Skip to content

Commit 8a45437

Browse files
authored
[TASK-270049] Update Notion JS SDK with GetComment endpoint (#595)
- Add `retrieve` method to the `comments` namespace in `Client.ts` - `api-endpoints.ts` is all generated code which includes `getComment` endpoint definition in api-endpoints.ts - Exporting the new types in the `index.ts`
1 parent f849574 commit 8a45437

File tree

3 files changed

+186
-130
lines changed

3 files changed

+186
-130
lines changed

src/Client.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ import {
7373
type ListCommentsParameters,
7474
type ListCommentsResponse,
7575
listComments,
76+
type GetCommentParameters,
77+
type GetCommentResponse,
78+
getComment,
7679
type OauthTokenResponse,
7780
type OauthTokenParameters,
7881
oauthToken,
@@ -580,6 +583,21 @@ export default class Client {
580583
auth: args?.auth,
581584
})
582585
},
586+
587+
/**
588+
* Retrieve a comment
589+
*/
590+
retrieve: (
591+
args: WithAuth<GetCommentParameters>
592+
): Promise<GetCommentResponse> => {
593+
return this.request<GetCommentResponse>({
594+
path: getComment.path(args),
595+
method: getComment.method,
596+
query: pick(args, getComment.queryParams),
597+
body: pick(args, getComment.bodyParams),
598+
auth: args?.auth,
599+
})
600+
},
583601
}
584602

585603
public readonly fileUploads = {

0 commit comments

Comments
 (0)