import type { EmptyObject, IdRequest, IdResponse, InternalFileResponse, PartialUserObjectResponse, RichTextItemRequest, RichTextItemResponse } from "./common"; type BlockIdCommentParentResponse = { type: "block_id"; block_id: IdResponse; }; export type CommentObjectResponse = { object: "comment"; id: IdResponse; parent: CommentParentResponse; discussion_id: IdResponse; created_time: string; last_edited_time: string; created_by: PartialUserObjectResponse; rich_text: Array; display_name: { type: "custom" | "user" | "integration"; resolved_name: string | null; }; attachments?: Array<{ category: "audio" | "image" | "pdf" | "productivity" | "video"; file: InternalFileResponse; }>; }; type CommentParentResponse = PageIdCommentParentResponse | BlockIdCommentParentResponse; type PageIdCommentParentResponse = { type: "page_id"; page_id: IdResponse; }; export type PartialCommentObjectResponse = { object: "comment"; id: IdResponse; }; type CreateCommentBodyParameters = { attachments?: Array<{ file_upload_id: string; type?: "file_upload"; }>; display_name?: { type: "integration"; } | { type: "user"; } | { type: "custom"; custom: { name: string; }; }; } & ({ parent: { page_id: IdRequest; type?: "page_id"; } | { block_id: IdRequest; type?: "block_id"; }; rich_text: Array; } | { parent: { page_id: IdRequest; type?: "page_id"; } | { block_id: IdRequest; type?: "block_id"; }; markdown: string; } | { discussion_id: IdRequest; rich_text: Array; } | { discussion_id: IdRequest; markdown: string; }); export type CreateCommentParameters = CreateCommentBodyParameters; export type CreateCommentResponse = PartialCommentObjectResponse | CommentObjectResponse; /** * Create a comment */ export declare const createComment: { readonly method: "post"; readonly pathParams: readonly []; readonly queryParams: readonly []; readonly bodyParams: readonly ["attachments", "display_name", "parent", "rich_text", "markdown", "discussion_id"]; readonly path: () => string; }; type ListCommentsQueryParameters = { block_id: IdRequest; start_cursor?: string; page_size?: number; }; export type ListCommentsParameters = ListCommentsQueryParameters; export type ListCommentsResponse = { object: "list"; next_cursor: IdResponse | null; has_more: boolean; results: Array; type: "comment"; comment: EmptyObject; }; /** * List comments */ export declare const listComments: { readonly method: "get"; readonly pathParams: readonly []; readonly queryParams: readonly ["block_id", "start_cursor", "page_size"]; readonly bodyParams: readonly []; readonly path: () => string; }; type GetCommentPathParameters = { comment_id: IdRequest; }; export type GetCommentParameters = GetCommentPathParameters; export type GetCommentResponse = PartialCommentObjectResponse | CommentObjectResponse; /** * Retrieve a comment */ export declare const getComment: { readonly method: "get"; readonly pathParams: readonly ["comment_id"]; readonly queryParams: readonly []; readonly bodyParams: readonly []; readonly path: (p: GetCommentPathParameters) => string; }; export {}; //# sourceMappingURL=comments.d.ts.map