app/frontend/support/schema.ts in decidim-comments-0.4.3 vs app/frontend/support/schema.ts in decidim-comments-0.4.4

- old
+ new

@@ -1,160 +1,1445 @@ -// This file was automatically generated and should not be edited. /* tslint:disable */ +// This file was automatically generated and should not be edited. -export interface AddCommentMutationVariables { - commentableId: string; - commentableType: string; - body: string; - alignment: number | null; - userGroupId: string | null; -} +export type addCommentMutationVariables = { + commentableId: string, + commentableType: string, + body: string, + alignment?: number | null, + userGroupId?: string | null, +}; -export interface AddCommentMutation { +export type addCommentMutation = { // A commentable - commentable: { + commentable: { // Add a new comment to a commentable - addComment: CommentThreadFragment & CommentFragment & CommentDataFragment & UpVoteButtonFragment & DownVoteButtonFragment, - } | null; -} + addComment: { + // Check if the commentable has comments + hasComments: boolean, + // The Comment's unique ID + id: string, + // The Comment's signed global id + sgid: string, + // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` + type: string, + // The comment message + body: string, + // The creation date of the comment + createdAt: string, + // The comment's author + author: ( { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } | { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } + ), + // Whether the object can have new comments or not + acceptsNewComments: boolean, + // The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)' + alignment: number | null, + // Check if the current user has reported the comment + alreadyReported: boolean, + // The number of comment's upVotes + upVotes: number, + // Check if the current user has upvoted the comment + upVoted: boolean, + // Check if the current user has downvoted the comment + downVoted: boolean, + // The number of comment's downVotes + downVotes: number, + comments: Array< { + // The Comment's unique ID + id: string, + // The Comment's signed global id + sgid: string, + // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` + type: string, + // The comment message + body: string, + // The creation date of the comment + createdAt: string, + // The comment's author + author: ( { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } | { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } + ), + // Check if the commentable has comments + hasComments: boolean, + // Whether the object can have new comments or not + acceptsNewComments: boolean, + // The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)' + alignment: number | null, + // Check if the current user has reported the comment + alreadyReported: boolean, + // The number of comment's upVotes + upVotes: number, + // Check if the current user has upvoted the comment + upVoted: boolean, + // Check if the current user has downvoted the comment + downVoted: boolean, + // The number of comment's downVotes + downVotes: number, + comments: Array< { + // The Comment's unique ID + id: string, + // The Comment's signed global id + sgid: string, + // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` + type: string, + // The comment message + body: string, + // The creation date of the comment + createdAt: string, + // The comment's author + author: ( { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } | { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } + ), + // Check if the commentable has comments + hasComments: boolean, + // Whether the object can have new comments or not + acceptsNewComments: boolean, + // The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)' + alignment: number | null, + // Check if the current user has reported the comment + alreadyReported: boolean, + // The number of comment's upVotes + upVotes: number, + // Check if the current user has upvoted the comment + upVoted: boolean, + // Check if the current user has downvoted the comment + downVoted: boolean, + // The number of comment's downVotes + downVotes: number, + comments: Array< { + // The Comment's unique ID + id: string, + // The Comment's signed global id + sgid: string, + // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` + type: string, + // The comment message + body: string, + // The creation date of the comment + createdAt: string, + // The comment's author + author: ( { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } | { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } + ), + // Check if the commentable has comments + hasComments: boolean, + // Whether the object can have new comments or not + acceptsNewComments: boolean, + // The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)' + alignment: number | null, + // Check if the current user has reported the comment + alreadyReported: boolean, + // The number of comment's upVotes + upVotes: number, + // Check if the current user has upvoted the comment + upVoted: boolean, + // Check if the current user has downvoted the comment + downVoted: boolean, + // The number of comment's downVotes + downVotes: number, + } >, + } >, + } >, + } | null, + } | null, +}; -export interface DownVoteMutationVariables { - id: string; -} +export type DownVoteMutationVariables = { + id: string, +}; -export interface DownVoteMutation { +export type DownVoteMutation = { // A comment - comment: { - downVote: CommentFragment & CommentDataFragment & UpVoteButtonFragment & DownVoteButtonFragment, - } | null; -} + comment: { + downVote: { + // The Comment's unique ID + id: string, + // The Comment's signed global id + sgid: string, + // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` + type: string, + // The comment message + body: string, + // The creation date of the comment + createdAt: string, + // The comment's author + author: ( { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } | { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } + ), + // Check if the commentable has comments + hasComments: boolean, + // Whether the object can have new comments or not + acceptsNewComments: boolean, + // The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)' + alignment: number | null, + // Check if the current user has reported the comment + alreadyReported: boolean, + // The number of comment's upVotes + upVotes: number, + // Check if the current user has upvoted the comment + upVoted: boolean, + // Check if the current user has downvoted the comment + downVoted: boolean, + // The number of comment's downVotes + downVotes: number, + comments: Array< { + // The Comment's unique ID + id: string, + // The Comment's signed global id + sgid: string, + // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` + type: string, + // The comment message + body: string, + // The creation date of the comment + createdAt: string, + // The comment's author + author: ( { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } | { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } + ), + // Check if the commentable has comments + hasComments: boolean, + // Whether the object can have new comments or not + acceptsNewComments: boolean, + // The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)' + alignment: number | null, + // Check if the current user has reported the comment + alreadyReported: boolean, + // The number of comment's upVotes + upVotes: number, + // Check if the current user has upvoted the comment + upVoted: boolean, + // Check if the current user has downvoted the comment + downVoted: boolean, + // The number of comment's downVotes + downVotes: number, + comments: Array< { + // The Comment's unique ID + id: string, + // The Comment's signed global id + sgid: string, + // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` + type: string, + // The comment message + body: string, + // The creation date of the comment + createdAt: string, + // The comment's author + author: ( { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } | { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } + ), + // Check if the commentable has comments + hasComments: boolean, + // Whether the object can have new comments or not + acceptsNewComments: boolean, + // The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)' + alignment: number | null, + // Check if the current user has reported the comment + alreadyReported: boolean, + // The number of comment's upVotes + upVotes: number, + // Check if the current user has upvoted the comment + upVoted: boolean, + // Check if the current user has downvoted the comment + downVoted: boolean, + // The number of comment's downVotes + downVotes: number, + comments: Array< { + // The Comment's unique ID + id: string, + // The Comment's signed global id + sgid: string, + // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` + type: string, + // The comment message + body: string, + // The creation date of the comment + createdAt: string, + // The comment's author + author: ( { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } | { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } + ), + // Check if the commentable has comments + hasComments: boolean, + // Whether the object can have new comments or not + acceptsNewComments: boolean, + // The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)' + alignment: number | null, + // Check if the current user has reported the comment + alreadyReported: boolean, + // The number of comment's upVotes + upVotes: number, + // Check if the current user has upvoted the comment + upVoted: boolean, + // Check if the current user has downvoted the comment + downVoted: boolean, + // The number of comment's downVotes + downVotes: number, + } >, + } >, + } >, + }, + } | null, +}; -export interface UpVoteMutationVariables { - id: string; -} +export type UpVoteMutationVariables = { + id: string, +}; -export interface UpVoteMutation { +export type UpVoteMutation = { // A comment - comment: { - upVote: CommentFragment & CommentDataFragment & UpVoteButtonFragment & DownVoteButtonFragment, - } | null; -} + comment: { + upVote: { + // The Comment's unique ID + id: string, + // The Comment's signed global id + sgid: string, + // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` + type: string, + // The comment message + body: string, + // The creation date of the comment + createdAt: string, + // The comment's author + author: ( { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } | { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } + ), + // Check if the commentable has comments + hasComments: boolean, + // Whether the object can have new comments or not + acceptsNewComments: boolean, + // The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)' + alignment: number | null, + // Check if the current user has reported the comment + alreadyReported: boolean, + // The number of comment's upVotes + upVotes: number, + // Check if the current user has upvoted the comment + upVoted: boolean, + // Check if the current user has downvoted the comment + downVoted: boolean, + // The number of comment's downVotes + downVotes: number, + comments: Array< { + // The Comment's unique ID + id: string, + // The Comment's signed global id + sgid: string, + // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` + type: string, + // The comment message + body: string, + // The creation date of the comment + createdAt: string, + // The comment's author + author: ( { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } | { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } + ), + // Check if the commentable has comments + hasComments: boolean, + // Whether the object can have new comments or not + acceptsNewComments: boolean, + // The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)' + alignment: number | null, + // Check if the current user has reported the comment + alreadyReported: boolean, + // The number of comment's upVotes + upVotes: number, + // Check if the current user has upvoted the comment + upVoted: boolean, + // Check if the current user has downvoted the comment + downVoted: boolean, + // The number of comment's downVotes + downVotes: number, + comments: Array< { + // The Comment's unique ID + id: string, + // The Comment's signed global id + sgid: string, + // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` + type: string, + // The comment message + body: string, + // The creation date of the comment + createdAt: string, + // The comment's author + author: ( { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } | { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } + ), + // Check if the commentable has comments + hasComments: boolean, + // Whether the object can have new comments or not + acceptsNewComments: boolean, + // The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)' + alignment: number | null, + // Check if the current user has reported the comment + alreadyReported: boolean, + // The number of comment's upVotes + upVotes: number, + // Check if the current user has upvoted the comment + upVoted: boolean, + // Check if the current user has downvoted the comment + downVoted: boolean, + // The number of comment's downVotes + downVotes: number, + comments: Array< { + // The Comment's unique ID + id: string, + // The Comment's signed global id + sgid: string, + // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` + type: string, + // The comment message + body: string, + // The creation date of the comment + createdAt: string, + // The comment's author + author: ( { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } | { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } + ), + // Check if the commentable has comments + hasComments: boolean, + // Whether the object can have new comments or not + acceptsNewComments: boolean, + // The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)' + alignment: number | null, + // Check if the current user has reported the comment + alreadyReported: boolean, + // The number of comment's upVotes + upVotes: number, + // Check if the current user has upvoted the comment + upVoted: boolean, + // Check if the current user has downvoted the comment + downVoted: boolean, + // The number of comment's downVotes + downVotes: number, + } >, + } >, + } >, + }, + } | null, +}; -export interface GetCommentsQueryVariables { - commentableId: string; - commentableType: string; - orderBy: string | null; -} +export type GetCommentsQueryVariables = { + commentableId: string, + commentableType: string, + orderBy?: string | null, +}; -export interface GetCommentsQuery { +export type GetCommentsQuery = { // Return's information about the logged in user - session: AddCommentFormSessionFragment & { + session: { // The current user - user: { + user: { // The user's name name: string, // The user's avatar url avatarUrl: string, // The user's organization name organizationName: string, } | null, - } | null; - commentable: AddCommentFormCommentableFragment & { + // The current user verified user groups + verifiedUserGroups: Array< { + // The user group's id + id: string, + // The user group's name + name: string, + } >, + } | null, + commentable: { // Whether the object can have new comments or not acceptsNewComments: boolean, // Whether the object comments have alignment or not commentsHaveAlignment: boolean, // Whether the object comments have votes or not commentsHaveVotes: boolean, - comments: Array< CommentThreadFragment & CommentFragment & CommentDataFragment & UpVoteButtonFragment & DownVoteButtonFragment & { + comments: Array< { // The Comment's unique ID id: string, + // Check if the commentable has comments + hasComments: boolean, + // The Comment's signed global id + sgid: string, + // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` + type: string, + // The comment message + body: string, + // The creation date of the comment + createdAt: string, + // The comment's author + author: ( { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } | { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } + ), + // Whether the object can have new comments or not + acceptsNewComments: boolean, + // The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)' + alignment: number | null, + // Check if the current user has reported the comment + alreadyReported: boolean, + // The number of comment's upVotes + upVotes: number, + // Check if the current user has upvoted the comment + upVoted: boolean, + // Check if the current user has downvoted the comment + downVoted: boolean, + // The number of comment's downVotes + downVotes: number, + comments: Array< { + // The Comment's unique ID + id: string, + // The Comment's signed global id + sgid: string, + // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` + type: string, + // The comment message + body: string, + // The creation date of the comment + createdAt: string, + // The comment's author + author: ( { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } | { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } + ), + // Check if the commentable has comments + hasComments: boolean, + // Whether the object can have new comments or not + acceptsNewComments: boolean, + // The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)' + alignment: number | null, + // Check if the current user has reported the comment + alreadyReported: boolean, + // The number of comment's upVotes + upVotes: number, + // Check if the current user has upvoted the comment + upVoted: boolean, + // Check if the current user has downvoted the comment + downVoted: boolean, + // The number of comment's downVotes + downVotes: number, + comments: Array< { + // The Comment's unique ID + id: string, + // The Comment's signed global id + sgid: string, + // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` + type: string, + // The comment message + body: string, + // The creation date of the comment + createdAt: string, + // The comment's author + author: ( { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } | { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } + ), + // Check if the commentable has comments + hasComments: boolean, + // Whether the object can have new comments or not + acceptsNewComments: boolean, + // The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)' + alignment: number | null, + // Check if the current user has reported the comment + alreadyReported: boolean, + // The number of comment's upVotes + upVotes: number, + // Check if the current user has upvoted the comment + upVoted: boolean, + // Check if the current user has downvoted the comment + downVoted: boolean, + // The number of comment's downVotes + downVotes: number, + comments: Array< { + // The Comment's unique ID + id: string, + // The Comment's signed global id + sgid: string, + // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` + type: string, + // The comment message + body: string, + // The creation date of the comment + createdAt: string, + // The comment's author + author: ( { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } | { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } + ), + // Check if the commentable has comments + hasComments: boolean, + // Whether the object can have new comments or not + acceptsNewComments: boolean, + // The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)' + alignment: number | null, + // Check if the current user has reported the comment + alreadyReported: boolean, + // The number of comment's upVotes + upVotes: number, + // Check if the current user has upvoted the comment + upVoted: boolean, + // Check if the current user has downvoted the comment + downVoted: boolean, + // The number of comment's downVotes + downVotes: number, + } >, + } >, + } >, } >, - }; -} + // The commentable's ID + id: string, + // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` + type: string, + }, +}; -export interface AddCommentFormCommentableFragment { +export type AddCommentFormCommentableFragment = { // The commentable's ID - id: string; + id: string, // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` - type: string; -} + type: string, +}; -export interface AddCommentFormSessionFragment { +export type AddCommentFormSessionFragment = { // The current user verified user groups - verifiedUserGroups: Array< { + verifiedUserGroups: Array< { // The user group's id id: string, // The user group's name name: string, - } >; -} + } >, +}; -export interface CommentFragment extends CommentDataFragment, UpVoteButtonFragment, DownVoteButtonFragment { - comments: Array< CommentDataFragment & UpVoteButtonFragment & DownVoteButtonFragment & { - comments: Array< CommentDataFragment & UpVoteButtonFragment & DownVoteButtonFragment & { - comments: Array<CommentDataFragment & UpVoteButtonFragment & DownVoteButtonFragment>, +export type CommentFragment = { + // The Comment's unique ID + id: string, + // The Comment's signed global id + sgid: string, + // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` + type: string, + // The comment message + body: string, + // The creation date of the comment + createdAt: string, + // The comment's author + author: ( { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } | { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } + ), + // Check if the commentable has comments + hasComments: boolean, + // Whether the object can have new comments or not + acceptsNewComments: boolean, + // The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)' + alignment: number | null, + // Check if the current user has reported the comment + alreadyReported: boolean, + // The number of comment's upVotes + upVotes: number, + // Check if the current user has upvoted the comment + upVoted: boolean, + // Check if the current user has downvoted the comment + downVoted: boolean, + // The number of comment's downVotes + downVotes: number, + comments: Array< { + // The Comment's unique ID + id: string, + // The Comment's signed global id + sgid: string, + // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` + type: string, + // The comment message + body: string, + // The creation date of the comment + createdAt: string, + // The comment's author + author: ( { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } | { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } + ), + // Check if the commentable has comments + hasComments: boolean, + // Whether the object can have new comments or not + acceptsNewComments: boolean, + // The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)' + alignment: number | null, + // Check if the current user has reported the comment + alreadyReported: boolean, + // The number of comment's upVotes + upVotes: number, + // Check if the current user has upvoted the comment + upVoted: boolean, + // Check if the current user has downvoted the comment + downVoted: boolean, + // The number of comment's downVotes + downVotes: number, + comments: Array< { + // The Comment's unique ID + id: string, + // The Comment's signed global id + sgid: string, + // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` + type: string, + // The comment message + body: string, + // The creation date of the comment + createdAt: string, + // The comment's author + author: ( { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } | { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } + ), + // Check if the commentable has comments + hasComments: boolean, + // Whether the object can have new comments or not + acceptsNewComments: boolean, + // The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)' + alignment: number | null, + // Check if the current user has reported the comment + alreadyReported: boolean, + // The number of comment's upVotes + upVotes: number, + // Check if the current user has upvoted the comment + upVoted: boolean, + // Check if the current user has downvoted the comment + downVoted: boolean, + // The number of comment's downVotes + downVotes: number, + comments: Array< { + // The Comment's unique ID + id: string, + // The Comment's signed global id + sgid: string, + // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` + type: string, + // The comment message + body: string, + // The creation date of the comment + createdAt: string, + // The comment's author + author: ( { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } | { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } + ), + // Check if the commentable has comments + hasComments: boolean, + // Whether the object can have new comments or not + acceptsNewComments: boolean, + // The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)' + alignment: number | null, + // Check if the current user has reported the comment + alreadyReported: boolean, + // The number of comment's upVotes + upVotes: number, + // Check if the current user has upvoted the comment + upVoted: boolean, + // Check if the current user has downvoted the comment + downVoted: boolean, + // The number of comment's downVotes + downVotes: number, + } >, } >, - } >; -} + } >, +}; -export interface CommentDataFragment extends UpVoteButtonFragment, DownVoteButtonFragment { +export type CommentDataFragment = { // The Comment's unique ID - id: string; + id: string, // The Comment's signed global id - sgid: string; + sgid: string, // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` - type: string; + type: string, // The comment message - body: string; + body: string, // The creation date of the comment - createdAt: string; + createdAt: string, // The comment's author - author: { - // The author's name - name: string, - // The author's avatar url - avatarUrl: string, - // Whether the author is verified or not - isVerified: boolean, - // Whether the author is a user or another kind of author (User Group) - isUser: boolean, - // Whether the author's account has been deleted or not - deleted: boolean, - }; + author: ( { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } | { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } + ), // Check if the commentable has comments - hasComments: boolean; + hasComments: boolean, // Whether the object can have new comments or not - acceptsNewComments: boolean; + acceptsNewComments: boolean, // The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)' - alignment: number | null; + alignment: number | null, // Check if the current user has reported the comment - alreadyReported: boolean; -} + alreadyReported: boolean, + // The number of comment's upVotes + upVotes: number, + // Check if the current user has upvoted the comment + upVoted: boolean, + // Check if the current user has downvoted the comment + downVoted: boolean, + // The number of comment's downVotes + downVotes: number, +}; -export interface CommentThreadFragment extends CommentFragment, CommentDataFragment, UpVoteButtonFragment, DownVoteButtonFragment { +export type CommentThreadFragment = { // Check if the commentable has comments - hasComments: boolean; -} + hasComments: boolean, + // The Comment's unique ID + id: string, + // The Comment's signed global id + sgid: string, + // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` + type: string, + // The comment message + body: string, + // The creation date of the comment + createdAt: string, + // The comment's author + author: ( { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } | { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } + ), + // Whether the object can have new comments or not + acceptsNewComments: boolean, + // The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)' + alignment: number | null, + // Check if the current user has reported the comment + alreadyReported: boolean, + // The number of comment's upVotes + upVotes: number, + // Check if the current user has upvoted the comment + upVoted: boolean, + // Check if the current user has downvoted the comment + downVoted: boolean, + // The number of comment's downVotes + downVotes: number, + comments: Array< { + // The Comment's unique ID + id: string, + // The Comment's signed global id + sgid: string, + // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` + type: string, + // The comment message + body: string, + // The creation date of the comment + createdAt: string, + // The comment's author + author: ( { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } | { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } + ), + // Check if the commentable has comments + hasComments: boolean, + // Whether the object can have new comments or not + acceptsNewComments: boolean, + // The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)' + alignment: number | null, + // Check if the current user has reported the comment + alreadyReported: boolean, + // The number of comment's upVotes + upVotes: number, + // Check if the current user has upvoted the comment + upVoted: boolean, + // Check if the current user has downvoted the comment + downVoted: boolean, + // The number of comment's downVotes + downVotes: number, + comments: Array< { + // The Comment's unique ID + id: string, + // The Comment's signed global id + sgid: string, + // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` + type: string, + // The comment message + body: string, + // The creation date of the comment + createdAt: string, + // The comment's author + author: ( { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } | { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } + ), + // Check if the commentable has comments + hasComments: boolean, + // Whether the object can have new comments or not + acceptsNewComments: boolean, + // The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)' + alignment: number | null, + // Check if the current user has reported the comment + alreadyReported: boolean, + // The number of comment's upVotes + upVotes: number, + // Check if the current user has upvoted the comment + upVoted: boolean, + // Check if the current user has downvoted the comment + downVoted: boolean, + // The number of comment's downVotes + downVotes: number, + comments: Array< { + // The Comment's unique ID + id: string, + // The Comment's signed global id + sgid: string, + // The commentable's class name. i.e. `Decidim::ParticipatoryProcess` + type: string, + // The comment message + body: string, + // The creation date of the comment + createdAt: string, + // The comment's author + author: ( { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } | { + // The author's name + name: string, + // The author's avatar url + avatarUrl: string, + // Whether the author is verified or not + isVerified: boolean, + // Whether the author is a user or another kind of author (User Group) + isUser: boolean, + // Whether the author's account has been deleted or not + deleted: boolean, + } + ), + // Check if the commentable has comments + hasComments: boolean, + // Whether the object can have new comments or not + acceptsNewComments: boolean, + // The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)' + alignment: number | null, + // Check if the current user has reported the comment + alreadyReported: boolean, + // The number of comment's upVotes + upVotes: number, + // Check if the current user has upvoted the comment + upVoted: boolean, + // Check if the current user has downvoted the comment + downVoted: boolean, + // The number of comment's downVotes + downVotes: number, + } >, + } >, + } >, +}; -export interface DownVoteButtonFragment { +export type DownVoteButtonFragment = { // The Comment's unique ID - id: string; + id: string, // The number of comment's downVotes - downVotes: number; + downVotes: number, // Check if the current user has downvoted the comment - downVoted: boolean; + downVoted: boolean, // Check if the current user has upvoted the comment - upVoted: boolean; -} + upVoted: boolean, +}; -export interface UpVoteButtonFragment { +export type UpVoteButtonFragment = { // The Comment's unique ID - id: string; + id: string, // The number of comment's upVotes - upVotes: number; + upVotes: number, // Check if the current user has upvoted the comment - upVoted: boolean; + upVoted: boolean, // Check if the current user has downvoted the comment - downVoted: boolean; -} + downVoted: boolean, +}; /* tslint:enable */