diff options
Diffstat (limited to 'src/ts')
| -rw-r--r-- | src/ts/types/comments.ts | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/ts/types/comments.ts b/src/ts/types/comments.ts index 51852d0..a1bb120 100644 --- a/src/ts/types/comments.ts +++ b/src/ts/types/comments.ts @@ -26,3 +26,25 @@ export type RawComment = Omit<Comment, 'author'> & { export type CommentsResponse = { nodes: RawComment[]; }; + +export type CreatedComment = { + clientMutationId: string; + success: boolean; + comment: null | { + approved: boolean; + }; +}; + +export type CreatedCommentResponse = { + createComment: CreatedComment; +}; + +export type CreatedCommentReturn = ( + author: string, + authorEmail: string, + authorUrl: string, + content: string, + parent: number, + commentOn: number, + mutationId: string +) => Promise<CreatedComment>; |
