@notionhq/client 5.14.0 → 5.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/package.json +1 -1
- package/build/src/Client.d.ts +7 -1
- package/build/src/Client.d.ts.map +1 -1
- package/build/src/Client.js +15 -0
- package/build/src/Client.js.map +1 -1
- package/build/src/api-endpoints/blocks.d.ts +984 -0
- package/build/src/api-endpoints/blocks.d.ts.map +1 -0
- package/build/src/api-endpoints/blocks.js +89 -0
- package/build/src/api-endpoints/blocks.js.map +1 -0
- package/build/src/api-endpoints/comments.d.ts +112 -0
- package/build/src/api-endpoints/comments.d.ts.map +1 -0
- package/build/src/api-endpoints/comments.js +42 -0
- package/build/src/api-endpoints/comments.js.map +1 -0
- package/build/src/api-endpoints/common.d.ts +1939 -0
- package/build/src/api-endpoints/common.d.ts.map +1 -0
- package/build/src/api-endpoints/common.js +5 -0
- package/build/src/api-endpoints/common.js.map +1 -0
- package/build/src/api-endpoints/custom-emojis.d.ts +26 -0
- package/build/src/api-endpoints/custom-emojis.d.ts.map +1 -0
- package/build/src/api-endpoints/custom-emojis.js +16 -0
- package/build/src/api-endpoints/custom-emojis.js.map +1 -0
- package/build/src/api-endpoints/data-sources.d.ts +430 -0
- package/build/src/api-endpoints/data-sources.d.ts.map +1 -0
- package/build/src/api-endpoints/data-sources.js +64 -0
- package/build/src/api-endpoints/data-sources.js.map +1 -0
- package/build/src/api-endpoints/databases.d.ts +109 -0
- package/build/src/api-endpoints/databases.d.ts.map +1 -0
- package/build/src/api-endpoints/databases.js +53 -0
- package/build/src/api-endpoints/databases.js.map +1 -0
- package/build/src/api-endpoints/file-uploads.d.ts +138 -0
- package/build/src/api-endpoints/file-uploads.d.ts.map +1 -0
- package/build/src/api-endpoints/file-uploads.js +63 -0
- package/build/src/api-endpoints/file-uploads.js.map +1 -0
- package/build/src/api-endpoints/oauth.d.ts +90 -0
- package/build/src/api-endpoints/oauth.d.ts.map +1 -0
- package/build/src/api-endpoints/oauth.js +42 -0
- package/build/src/api-endpoints/oauth.js.map +1 -0
- package/build/src/api-endpoints/pages.d.ts +639 -0
- package/build/src/api-endpoints/pages.d.ts.map +1 -0
- package/build/src/api-endpoints/pages.js +102 -0
- package/build/src/api-endpoints/pages.js.map +1 -0
- package/build/src/api-endpoints/search.d.ts +36 -0
- package/build/src/api-endpoints/search.d.ts.map +1 -0
- package/build/src/api-endpoints/search.js +16 -0
- package/build/src/api-endpoints/search.js.map +1 -0
- package/build/src/api-endpoints/users.d.ts +53 -0
- package/build/src/api-endpoints/users.d.ts.map +1 -0
- package/build/src/api-endpoints/users.js +36 -0
- package/build/src/api-endpoints/users.js.map +1 -0
- package/build/src/api-endpoints/views.d.ts +504 -0
- package/build/src/api-endpoints/views.d.ts.map +1 -0
- package/build/src/api-endpoints/views.js +86 -0
- package/build/src/api-endpoints/views.js.map +1 -0
- package/build/src/api-endpoints/webhooks.d.ts +302 -0
- package/build/src/api-endpoints/webhooks.d.ts.map +1 -0
- package/build/src/api-endpoints/webhooks.js +5 -0
- package/build/src/api-endpoints/webhooks.js.map +1 -0
- package/build/src/api-endpoints.d.ts +13 -4916
- package/build/src/api-endpoints.d.ts.map +1 -1
- package/build/src/api-endpoints.js +31 -533
- package/build/src/api-endpoints.js.map +1 -1
- package/build/src/index.d.ts +1 -1
- package/build/src/index.d.ts.map +1 -1
- package/build/src/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// cspell:disable-file
|
|
3
|
+
// Note: This is a generated file. DO NOT EDIT!
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.updatePageMarkdown = exports.getPageMarkdown = exports.getPageProperty = exports.movePage = exports.updatePage = exports.getPage = exports.createPage = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* Create a page
|
|
8
|
+
*/
|
|
9
|
+
exports.createPage = {
|
|
10
|
+
method: "post",
|
|
11
|
+
pathParams: [],
|
|
12
|
+
queryParams: [],
|
|
13
|
+
bodyParams: [
|
|
14
|
+
"parent",
|
|
15
|
+
"properties",
|
|
16
|
+
"icon",
|
|
17
|
+
"cover",
|
|
18
|
+
"content",
|
|
19
|
+
"children",
|
|
20
|
+
"markdown",
|
|
21
|
+
"template",
|
|
22
|
+
"position",
|
|
23
|
+
],
|
|
24
|
+
path: () => `pages`,
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Retrieve a page
|
|
28
|
+
*/
|
|
29
|
+
exports.getPage = {
|
|
30
|
+
method: "get",
|
|
31
|
+
pathParams: ["page_id"],
|
|
32
|
+
queryParams: ["filter_properties"],
|
|
33
|
+
bodyParams: [],
|
|
34
|
+
path: (p) => `pages/${p.page_id}`,
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Update page
|
|
38
|
+
*/
|
|
39
|
+
exports.updatePage = {
|
|
40
|
+
method: "patch",
|
|
41
|
+
pathParams: ["page_id"],
|
|
42
|
+
queryParams: [],
|
|
43
|
+
bodyParams: [
|
|
44
|
+
"archived",
|
|
45
|
+
"properties",
|
|
46
|
+
"icon",
|
|
47
|
+
"cover",
|
|
48
|
+
"is_locked",
|
|
49
|
+
"template",
|
|
50
|
+
"erase_content",
|
|
51
|
+
"in_trash",
|
|
52
|
+
"is_archived",
|
|
53
|
+
],
|
|
54
|
+
path: (p) => `pages/${p.page_id}`,
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Move a page
|
|
58
|
+
*/
|
|
59
|
+
exports.movePage = {
|
|
60
|
+
method: "post",
|
|
61
|
+
pathParams: ["page_id"],
|
|
62
|
+
queryParams: [],
|
|
63
|
+
bodyParams: ["parent"],
|
|
64
|
+
path: (p) => `pages/${p.page_id}/move`,
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Retrieve a page property item
|
|
68
|
+
*/
|
|
69
|
+
exports.getPageProperty = {
|
|
70
|
+
method: "get",
|
|
71
|
+
pathParams: ["page_id", "property_id"],
|
|
72
|
+
queryParams: ["start_cursor", "page_size"],
|
|
73
|
+
bodyParams: [],
|
|
74
|
+
path: (p) => `pages/${p.page_id}/properties/${p.property_id}`,
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Retrieve a page as markdown
|
|
78
|
+
*/
|
|
79
|
+
exports.getPageMarkdown = {
|
|
80
|
+
method: "get",
|
|
81
|
+
pathParams: ["page_id"],
|
|
82
|
+
queryParams: ["include_transcript"],
|
|
83
|
+
bodyParams: [],
|
|
84
|
+
path: (p) => `pages/${p.page_id}/markdown`,
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Update a page's content as markdown
|
|
88
|
+
*/
|
|
89
|
+
exports.updatePageMarkdown = {
|
|
90
|
+
method: "patch",
|
|
91
|
+
pathParams: ["page_id"],
|
|
92
|
+
queryParams: [],
|
|
93
|
+
bodyParams: [
|
|
94
|
+
"type",
|
|
95
|
+
"insert_content",
|
|
96
|
+
"replace_content_range",
|
|
97
|
+
"update_content",
|
|
98
|
+
"replace_content",
|
|
99
|
+
],
|
|
100
|
+
path: (p) => `pages/${p.page_id}/markdown`,
|
|
101
|
+
};
|
|
102
|
+
//# sourceMappingURL=pages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pages.js","sourceRoot":"","sources":["../../../src/api-endpoints/pages.ts"],"names":[],"mappings":";AAAA,sBAAsB;AACtB,+CAA+C;;;AAob/C;;GAEG;AACU,QAAA,UAAU,GAAG;IACxB,MAAM,EAAE,MAAM;IACd,UAAU,EAAE,EAAE;IACd,WAAW,EAAE,EAAE;IACf,UAAU,EAAE;QACV,QAAQ;QACR,YAAY;QACZ,MAAM;QACN,OAAO;QACP,SAAS;QACT,UAAU;QACV,UAAU;QACV,UAAU;QACV,UAAU;KACX;IAED,IAAI,EAAE,GAAW,EAAE,CAAC,OAAO;CACnB,CAAA;AAiBV;;GAEG;AACU,QAAA,OAAO,GAAG;IACrB,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,CAAC,SAAS,CAAC;IACvB,WAAW,EAAE,CAAC,mBAAmB,CAAC;IAClC,UAAU,EAAE,EAAE;IAEd,IAAI,EAAE,CAAC,CAAwB,EAAU,EAAE,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE;CACxD,CAAA;AA6HV;;GAEG;AACU,QAAA,UAAU,GAAG;IACxB,MAAM,EAAE,OAAO;IACf,UAAU,EAAE,CAAC,SAAS,CAAC;IACvB,WAAW,EAAE,EAAE;IACf,UAAU,EAAE;QACV,UAAU;QACV,YAAY;QACZ,MAAM;QACN,OAAO;QACP,WAAW;QACX,UAAU;QACV,eAAe;QACf,UAAU;QACV,aAAa;KACd;IAED,IAAI,EAAE,CAAC,CAA2B,EAAU,EAAE,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE;CAC3D,CAAA;AA8BV;;GAEG;AACU,QAAA,QAAQ,GAAG;IACtB,MAAM,EAAE,MAAM;IACd,UAAU,EAAE,CAAC,SAAS,CAAC;IACvB,WAAW,EAAE,EAAE;IACf,UAAU,EAAE,CAAC,QAAQ,CAAC;IAEtB,IAAI,EAAE,CAAC,CAAyB,EAAU,EAAE,CAAC,SAAS,CAAC,CAAC,OAAO,OAAO;CAC9D,CAAA;AAmBV;;GAEG;AACU,QAAA,eAAe,GAAG;IAC7B,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,CAAC,SAAS,EAAE,aAAa,CAAC;IACtC,WAAW,EAAE,CAAC,cAAc,EAAE,WAAW,CAAC;IAC1C,UAAU,EAAE,EAAE;IAEd,IAAI,EAAE,CAAC,CAAgC,EAAU,EAAE,CACjD,SAAS,CAAC,CAAC,OAAO,eAAe,CAAC,CAAC,WAAW,EAAE;CAC1C,CAAA;AAoBV;;GAEG;AACU,QAAA,eAAe,GAAG;IAC7B,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,CAAC,SAAS,CAAC;IACvB,WAAW,EAAE,CAAC,oBAAoB,CAAC;IACnC,UAAU,EAAE,EAAE;IAEd,IAAI,EAAE,CAAC,CAAgC,EAAU,EAAE,CACjD,SAAS,CAAC,CAAC,OAAO,WAAW;CACvB,CAAA;AA0EV;;GAEG;AACU,QAAA,kBAAkB,GAAG;IAChC,MAAM,EAAE,OAAO;IACf,UAAU,EAAE,CAAC,SAAS,CAAC;IACvB,WAAW,EAAE,EAAE;IACf,UAAU,EAAE;QACV,MAAM;QACN,gBAAgB;QAChB,uBAAuB;QACvB,gBAAgB;QAChB,iBAAiB;KAClB;IAED,IAAI,EAAE,CAAC,CAAmC,EAAU,EAAE,CACpD,SAAS,CAAC,CAAC,OAAO,WAAW;CACvB,CAAA","sourcesContent":["// cspell:disable-file\n// Note: This is a generated file. DO NOT EDIT!\n\nimport type {\n BlockObjectRequest,\n DateRequest,\n DateResponse,\n EmptyObject,\n FileUploadWithOptionalNameRequest,\n GroupObjectRequest,\n IdRequest,\n InternalOrExternalFileWithNameRequest,\n InternalOrExternalFileWithNameResponse,\n PageCoverRequest,\n PageIconRequest,\n PageMarkdownResponse,\n PageObjectResponse,\n PagePositionSchema,\n PartialPageObjectResponse,\n PartialUserObjectRequest,\n PartialUserObjectResponse,\n RelationItemPropertyValueResponse,\n RichTextItemRequest,\n RichTextItemResponse,\n RollupFunction,\n SelectColor,\n StringRequest,\n TemplateTimezone,\n TextRequest,\n UserObjectResponse,\n VerificationPropertyValueResponse,\n} from \"./common\"\n\ntype BooleanFormulaPropertyResponse = {\n type: \"boolean\"\n boolean: boolean | null\n}\n\nexport type ButtonPropertyItemObjectResponse = {\n type: \"button\"\n button: EmptyObject\n object: \"property_item\"\n id: string\n}\n\nexport type CheckboxPropertyItemObjectResponse = {\n type: \"checkbox\"\n checkbox: boolean\n object: \"property_item\"\n id: string\n}\n\nexport type CreatedByPropertyItemObjectResponse = {\n type: \"created_by\"\n created_by: PartialUserObjectResponse | UserObjectResponse\n object: \"property_item\"\n id: string\n}\n\nexport type CreatedTimePropertyItemObjectResponse = {\n type: \"created_time\"\n created_time: string\n object: \"property_item\"\n id: string\n}\n\ntype DateFormulaPropertyResponse = { type: \"date\"; date: DateResponse | null }\n\nexport type DatePropertyItemObjectResponse = {\n type: \"date\"\n date: DateResponse | null\n object: \"property_item\"\n id: string\n}\n\nexport type EmailPropertyItemObjectResponse = {\n type: \"email\"\n email: string | null\n object: \"property_item\"\n id: string\n}\n\nexport type FilesPropertyItemObjectResponse = {\n type: \"files\"\n files: Array<InternalOrExternalFileWithNameResponse>\n object: \"property_item\"\n id: string\n}\n\nexport type FormulaPropertyItemObjectResponse = {\n type: \"formula\"\n formula: FormulaPropertyResponse\n object: \"property_item\"\n id: string\n}\n\ntype FormulaPropertyResponse =\n | StringFormulaPropertyResponse\n | DateFormulaPropertyResponse\n | NumberFormulaPropertyResponse\n | BooleanFormulaPropertyResponse\n\nexport type LastEditedByPropertyItemObjectResponse = {\n type: \"last_edited_by\"\n last_edited_by: PartialUserObjectResponse | UserObjectResponse\n object: \"property_item\"\n id: string\n}\n\nexport type LastEditedTimePropertyItemObjectResponse = {\n type: \"last_edited_time\"\n last_edited_time: string\n object: \"property_item\"\n id: string\n}\n\nexport type MultiSelectPropertyItemObjectResponse = {\n type: \"multi_select\"\n multi_select: Array<PartialSelectResponse>\n object: \"property_item\"\n id: string\n}\n\ntype NumberFormulaPropertyResponse = { type: \"number\"; number: number | null }\n\nexport type NumberPropertyItemObjectResponse = {\n type: \"number\"\n number: number | null\n object: \"property_item\"\n id: string\n}\n\ntype PartialSelectResponse = { id: string; name: string; color: SelectColor }\n\nexport type PeoplePropertyItemObjectResponse = {\n type: \"people\"\n people: PartialUserObjectResponse | UserObjectResponse\n object: \"property_item\"\n id: string\n}\n\nexport type PhoneNumberPropertyItemObjectResponse = {\n type: \"phone_number\"\n phone_number: string | null\n object: \"property_item\"\n id: string\n}\n\nexport type PlacePropertyItemObjectResponse = {\n type: \"place\"\n place: {\n lat: number\n lon: number\n name?: string | null\n address?: string | null\n aws_place_id?: string | null\n google_place_id?: string | null\n } | null\n object: \"property_item\"\n id: string\n}\n\nexport type PropertyItemListResponse = PropertyItemPropertyItemListResponse\n\nexport type PropertyItemObjectResponse =\n | NumberPropertyItemObjectResponse\n | UrlPropertyItemObjectResponse\n | SelectPropertyItemObjectResponse\n | MultiSelectPropertyItemObjectResponse\n | StatusPropertyItemObjectResponse\n | DatePropertyItemObjectResponse\n | EmailPropertyItemObjectResponse\n | PhoneNumberPropertyItemObjectResponse\n | CheckboxPropertyItemObjectResponse\n | FilesPropertyItemObjectResponse\n | CreatedByPropertyItemObjectResponse\n | CreatedTimePropertyItemObjectResponse\n | LastEditedByPropertyItemObjectResponse\n | LastEditedTimePropertyItemObjectResponse\n | FormulaPropertyItemObjectResponse\n | ButtonPropertyItemObjectResponse\n | UniqueIdPropertyItemObjectResponse\n | VerificationPropertyItemObjectResponse\n | PlacePropertyItemObjectResponse\n | TitlePropertyItemObjectResponse\n | RichTextPropertyItemObjectResponse\n | PeoplePropertyItemObjectResponse\n | RelationPropertyItemObjectResponse\n | RollupPropertyItemObjectResponse\n\ntype PropertyItemPropertyItemListResponse = {\n type: \"property_item\"\n property_item:\n | { type: \"title\"; title: EmptyObject; next_url: string | null; id: string }\n | {\n type: \"rich_text\"\n rich_text: EmptyObject\n next_url: string | null\n id: string\n }\n | {\n type: \"people\"\n people: EmptyObject\n next_url: string | null\n id: string\n }\n | {\n type: \"relation\"\n relation: EmptyObject\n next_url: string | null\n id: string\n }\n | {\n type: \"rollup\"\n rollup:\n | { type: \"number\"; number: number | null; function: RollupFunction }\n | {\n type: \"date\"\n date: DateResponse | null\n function: RollupFunction\n }\n | {\n type: \"array\"\n array: Array<EmptyObject>\n function: RollupFunction\n }\n | {\n type: \"unsupported\"\n unsupported: EmptyObject\n function: RollupFunction\n }\n | {\n type: \"incomplete\"\n incomplete: EmptyObject\n function: RollupFunction\n }\n next_url: string | null\n id: string\n }\n object: \"list\"\n next_cursor: string | null\n has_more: boolean\n results: Array<PropertyItemObjectResponse>\n}\n\nexport type RelationPropertyItemObjectResponse = {\n type: \"relation\"\n relation: { id: string }\n object: \"property_item\"\n id: string\n}\n\nexport type RichTextPropertyItemObjectResponse = {\n type: \"rich_text\"\n rich_text: RichTextItemResponse\n object: \"property_item\"\n id: string\n}\n\nexport type RollupPropertyItemObjectResponse = {\n type: \"rollup\"\n rollup:\n | { type: \"number\"; number: number | null; function: RollupFunction }\n | { type: \"date\"; date: DateResponse | null; function: RollupFunction }\n | { type: \"array\"; array: Array<EmptyObject>; function: RollupFunction }\n | {\n type: \"unsupported\"\n unsupported: EmptyObject\n function: RollupFunction\n }\n | { type: \"incomplete\"; incomplete: EmptyObject; function: RollupFunction }\n object: \"property_item\"\n id: string\n}\n\nexport type SelectPropertyItemObjectResponse = {\n type: \"select\"\n select: PartialSelectResponse | null\n object: \"property_item\"\n id: string\n}\n\nexport type StatusPropertyItemObjectResponse = {\n type: \"status\"\n status: PartialSelectResponse | null\n object: \"property_item\"\n id: string\n}\n\ntype StringFormulaPropertyResponse = { type: \"string\"; string: string | null }\n\nexport type TitlePropertyItemObjectResponse = {\n type: \"title\"\n title: RichTextItemResponse\n object: \"property_item\"\n id: string\n}\n\nexport type UniqueIdPropertyItemObjectResponse = {\n type: \"unique_id\"\n unique_id: { prefix: string | null; number: number | null }\n object: \"property_item\"\n id: string\n}\n\nexport type UrlPropertyItemObjectResponse = {\n type: \"url\"\n url: string | null\n object: \"property_item\"\n id: string\n}\n\nexport type VerificationPropertyItemObjectResponse = {\n type: \"verification\"\n verification: VerificationPropertyValueResponse | null\n object: \"property_item\"\n id: string\n}\n\ntype CreatePageBodyParameters = {\n parent?:\n | { page_id: IdRequest; type?: \"page_id\" }\n | { database_id: IdRequest; type?: \"database_id\" }\n | { data_source_id: IdRequest; type?: \"data_source_id\" }\n | { workspace: true; type?: \"workspace\" }\n properties?: Record<\n string,\n | { title: Array<RichTextItemRequest>; type?: \"title\" }\n | { rich_text: Array<RichTextItemRequest>; type?: \"rich_text\" }\n | { number: number | null; type?: \"number\" }\n | { url: TextRequest | null; type?: \"url\" }\n | {\n select:\n | {\n id: StringRequest\n name?: TextRequest\n color?: SelectColor\n description?: TextRequest | null\n }\n | {\n name: TextRequest\n id?: StringRequest\n color?: SelectColor\n description?: TextRequest | null\n }\n | null\n type?: \"select\"\n }\n | {\n multi_select: Array<\n | {\n id: StringRequest\n name?: TextRequest\n color?: SelectColor\n description?: TextRequest | null\n }\n | {\n name: TextRequest\n id?: StringRequest\n color?: SelectColor\n description?: TextRequest | null\n }\n >\n type?: \"multi_select\"\n }\n | {\n people: Array<PartialUserObjectRequest | GroupObjectRequest>\n type?: \"people\"\n }\n | { email: StringRequest | null; type?: \"email\" }\n | { phone_number: StringRequest | null; type?: \"phone_number\" }\n | { date: DateRequest | null; type?: \"date\" }\n | { checkbox: boolean; type?: \"checkbox\" }\n | { relation: Array<RelationItemPropertyValueResponse>; type?: \"relation\" }\n | {\n files: Array<\n | InternalOrExternalFileWithNameRequest\n | FileUploadWithOptionalNameRequest\n >\n type?: \"files\"\n }\n | {\n status:\n | {\n id: StringRequest\n name?: TextRequest\n color?: SelectColor\n description?: TextRequest | null\n }\n | {\n name: TextRequest\n id?: StringRequest\n color?: SelectColor\n description?: TextRequest | null\n }\n | null\n type?: \"status\"\n }\n | {\n place: {\n lat: number\n lon: number\n name?: string | null\n address?: string | null\n aws_place_id?: string | null\n google_place_id?: string | null\n } | null\n type?: \"place\"\n }\n | {\n verification:\n | { state: \"verified\"; date?: DateRequest }\n | { state: \"unverified\" }\n type?: \"verification\"\n }\n >\n icon?: PageIconRequest | null\n cover?: PageCoverRequest | null\n content?: Array<BlockObjectRequest>\n children?: Array<BlockObjectRequest>\n // Page content as Notion-flavored Markdown. Mutually exclusive with content/children.\n markdown?: string\n template?:\n | { type: \"none\" }\n | { type: \"default\"; timezone?: TemplateTimezone }\n | {\n type: \"template_id\"\n template_id: IdRequest\n timezone?: TemplateTimezone\n }\n position?: PagePositionSchema\n}\n\nexport type CreatePageParameters = CreatePageBodyParameters\n\nexport type CreatePageResponse = PageObjectResponse | PartialPageObjectResponse\n\n/**\n * Create a page\n */\nexport const createPage = {\n method: \"post\",\n pathParams: [],\n queryParams: [],\n bodyParams: [\n \"parent\",\n \"properties\",\n \"icon\",\n \"cover\",\n \"content\",\n \"children\",\n \"markdown\",\n \"template\",\n \"position\",\n ],\n\n path: (): string => `pages`,\n} as const\n\ntype GetPagePathParameters = {\n // The ID of the page to retrieve.\n page_id: IdRequest\n}\n\ntype GetPageQueryParameters = {\n // Supply a list of property IDs to filter properties in the response. Note that if a\n // page doesn't have a property, it won't be included in the filtered response.\n filter_properties?: Array<string>\n}\n\nexport type GetPageParameters = GetPagePathParameters & GetPageQueryParameters\n\nexport type GetPageResponse = PartialPageObjectResponse | PageObjectResponse\n\n/**\n * Retrieve a page\n */\nexport const getPage = {\n method: \"get\",\n pathParams: [\"page_id\"],\n queryParams: [\"filter_properties\"],\n bodyParams: [],\n\n path: (p: GetPagePathParameters): string => `pages/${p.page_id}`,\n} as const\n\ntype UpdatePagePathParameters = {\n page_id: IdRequest\n}\n\ntype UpdatePageBodyParameters = {\n properties?: Record<\n string,\n | { title: Array<RichTextItemRequest>; type?: \"title\" }\n | { rich_text: Array<RichTextItemRequest>; type?: \"rich_text\" }\n | { number: number | null; type?: \"number\" }\n | { url: TextRequest | null; type?: \"url\" }\n | {\n select:\n | {\n id: StringRequest\n name?: TextRequest\n color?: SelectColor\n description?: TextRequest | null\n }\n | {\n name: TextRequest\n id?: StringRequest\n color?: SelectColor\n description?: TextRequest | null\n }\n | null\n type?: \"select\"\n }\n | {\n multi_select: Array<\n | {\n id: StringRequest\n name?: TextRequest\n color?: SelectColor\n description?: TextRequest | null\n }\n | {\n name: TextRequest\n id?: StringRequest\n color?: SelectColor\n description?: TextRequest | null\n }\n >\n type?: \"multi_select\"\n }\n | {\n people: Array<PartialUserObjectRequest | GroupObjectRequest>\n type?: \"people\"\n }\n | { email: StringRequest | null; type?: \"email\" }\n | { phone_number: StringRequest | null; type?: \"phone_number\" }\n | { date: DateRequest | null; type?: \"date\" }\n | { checkbox: boolean; type?: \"checkbox\" }\n | { relation: Array<RelationItemPropertyValueResponse>; type?: \"relation\" }\n | {\n files: Array<\n | InternalOrExternalFileWithNameRequest\n | FileUploadWithOptionalNameRequest\n >\n type?: \"files\"\n }\n | {\n status:\n | {\n id: StringRequest\n name?: TextRequest\n color?: SelectColor\n description?: TextRequest | null\n }\n | {\n name: TextRequest\n id?: StringRequest\n color?: SelectColor\n description?: TextRequest | null\n }\n | null\n type?: \"status\"\n }\n | {\n place: {\n lat: number\n lon: number\n name?: string | null\n address?: string | null\n aws_place_id?: string | null\n google_place_id?: string | null\n } | null\n type?: \"place\"\n }\n | {\n verification:\n | { state: \"verified\"; date?: DateRequest }\n | { state: \"unverified\" }\n type?: \"verification\"\n }\n >\n icon?: PageIconRequest | null\n cover?: PageCoverRequest | null\n // Whether the page should be locked from editing in the Notion app UI. If not provided,\n // the locked state will not be updated.\n is_locked?: boolean\n template?:\n | { type: \"default\"; timezone?: TemplateTimezone }\n | {\n type: \"template_id\"\n template_id: IdRequest\n timezone?: TemplateTimezone\n }\n // Whether to erase all existing content from the page. When used with a template, the\n // template content replaces the existing content. When used without a template, simply\n // clears the page content.\n erase_content?: boolean\n in_trash?: boolean\n /** @deprecated Use `in_trash` instead. */\n archived?: boolean\n is_archived?: boolean\n}\n\nexport type UpdatePageParameters = UpdatePagePathParameters &\n UpdatePageBodyParameters\n\nexport type UpdatePageResponse = PageObjectResponse | PartialPageObjectResponse\n\n/**\n * Update page\n */\nexport const updatePage = {\n method: \"patch\",\n pathParams: [\"page_id\"],\n queryParams: [],\n bodyParams: [\n \"archived\",\n \"properties\",\n \"icon\",\n \"cover\",\n \"is_locked\",\n \"template\",\n \"erase_content\",\n \"in_trash\",\n \"is_archived\",\n ],\n\n path: (p: UpdatePagePathParameters): string => `pages/${p.page_id}`,\n} as const\n\ntype MovePagePathParameters = {\n // The ID of the page to move.\n page_id: IdRequest\n}\n\ntype MovePageBodyParameters = {\n // The new parent of the page.\n parent:\n | {\n // The ID of the parent page (with or without dashes), for example,\n // 195de9221179449fab8075a27c979105\n page_id: IdRequest\n // Always `page_id`\n type?: \"page_id\"\n }\n | {\n // The ID of the parent data source (collection), with or without dashes. For example,\n // f336d0bc-b841-465b-8045-024475c079dd\n data_source_id: IdRequest\n // Always `data_source_id`\n type?: \"data_source_id\"\n }\n}\n\nexport type MovePageParameters = MovePagePathParameters & MovePageBodyParameters\n\nexport type MovePageResponse = PartialPageObjectResponse | PageObjectResponse\n\n/**\n * Move a page\n */\nexport const movePage = {\n method: \"post\",\n pathParams: [\"page_id\"],\n queryParams: [],\n bodyParams: [\"parent\"],\n\n path: (p: MovePagePathParameters): string => `pages/${p.page_id}/move`,\n} as const\n\ntype GetPagePropertyPathParameters = {\n page_id: IdRequest\n property_id: string\n}\n\ntype GetPagePropertyQueryParameters = {\n start_cursor?: string\n page_size?: number\n}\n\nexport type GetPagePropertyParameters = GetPagePropertyPathParameters &\n GetPagePropertyQueryParameters\n\nexport type GetPagePropertyResponse =\n | PropertyItemObjectResponse\n | PropertyItemListResponse\n\n/**\n * Retrieve a page property item\n */\nexport const getPageProperty = {\n method: \"get\",\n pathParams: [\"page_id\", \"property_id\"],\n queryParams: [\"start_cursor\", \"page_size\"],\n bodyParams: [],\n\n path: (p: GetPagePropertyPathParameters): string =>\n `pages/${p.page_id}/properties/${p.property_id}`,\n} as const\n\ntype GetPageMarkdownPathParameters = {\n // The ID of the page (or block) to retrieve as markdown. Non-navigable block IDs from\n // truncated responses can be passed here to fetch their subtrees.\n page_id: IdRequest\n}\n\ntype GetPageMarkdownQueryParameters = {\n // Whether to include meeting note transcripts. Defaults to false. When true, full\n // transcripts are included; when false, a placeholder with the meeting note URL is shown\n // instead.\n include_transcript?: boolean\n}\n\nexport type GetPageMarkdownParameters = GetPageMarkdownPathParameters &\n GetPageMarkdownQueryParameters\n\nexport type GetPageMarkdownResponse = PageMarkdownResponse\n\n/**\n * Retrieve a page as markdown\n */\nexport const getPageMarkdown = {\n method: \"get\",\n pathParams: [\"page_id\"],\n queryParams: [\"include_transcript\"],\n bodyParams: [],\n\n path: (p: GetPageMarkdownPathParameters): string =>\n `pages/${p.page_id}/markdown`,\n} as const\n\ntype UpdatePageMarkdownPathParameters = {\n // The ID of the page to update.\n page_id: IdRequest\n}\n\ntype UpdatePageMarkdownBodyParameters =\n | {\n // Always `insert_content`\n type: \"insert_content\"\n // Insert new content into the page.\n insert_content: {\n // The enhanced markdown content to insert into the page.\n content: string\n // Selection of existing content to insert after, using the ellipsis format (\"start\n // text...end text\"). Omit to append at the end of the page.\n after?: string\n }\n }\n | {\n // Always `replace_content_range`\n type: \"replace_content_range\"\n // Replace a range of content in the page.\n replace_content_range: {\n // The new enhanced markdown content to replace the matched range.\n content: string\n // Selection of existing content to replace, using the ellipsis format (\"start text...end\n // text\").\n content_range: string\n // Set to true to allow the operation to delete child pages or databases. Defaults to\n // false.\n allow_deleting_content?: boolean\n }\n }\n | {\n // Always `update_content`\n type: \"update_content\"\n // Update specific content using search-and-replace operations.\n update_content: {\n // An array of search-and-replace operations, each with old_str (content to find) and\n // new_str (replacement content).\n content_updates: Array<{\n // The existing content string to find and replace. Must exactly match the page content.\n old_str: string\n // The new content string to replace old_str with.\n new_str: string\n // If true, replaces all occurrences of old_str. If false (default), the operation fails\n // if there are multiple matches.\n replace_all_matches?: boolean\n }>\n // Set to true to allow the operation to delete child pages or databases. Defaults to\n // false.\n allow_deleting_content?: boolean\n }\n }\n | {\n // Always `replace_content`\n type: \"replace_content\"\n // Replace the entire page content with new markdown.\n replace_content: {\n // The new enhanced markdown content to replace the entire page content.\n new_str: string\n // Set to true to allow the operation to delete child pages or databases. Defaults to\n // false.\n allow_deleting_content?: boolean\n }\n }\n\nexport type UpdatePageMarkdownParameters = UpdatePageMarkdownPathParameters &\n UpdatePageMarkdownBodyParameters\n\nexport type UpdatePageMarkdownResponse = PageMarkdownResponse\n\n/**\n * Update a page's content as markdown\n */\nexport const updatePageMarkdown = {\n method: \"patch\",\n pathParams: [\"page_id\"],\n queryParams: [],\n bodyParams: [\n \"type\",\n \"insert_content\",\n \"replace_content_range\",\n \"update_content\",\n \"replace_content\",\n ],\n\n path: (p: UpdatePageMarkdownPathParameters): string =>\n `pages/${p.page_id}/markdown`,\n} as const\n"]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { EmptyObject, PageObjectResponse, PartialPageObjectResponse } from "./common";
|
|
2
|
+
import type { DataSourceObjectResponse, PartialDataSourceObjectResponse } from "./data-sources";
|
|
3
|
+
type SearchBodyParameters = {
|
|
4
|
+
sort?: {
|
|
5
|
+
timestamp: "last_edited_time";
|
|
6
|
+
direction: "ascending" | "descending";
|
|
7
|
+
};
|
|
8
|
+
query?: string;
|
|
9
|
+
start_cursor?: string;
|
|
10
|
+
page_size?: number;
|
|
11
|
+
filter?: {
|
|
12
|
+
property: "object";
|
|
13
|
+
value: "page" | "data_source";
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export type SearchParameters = SearchBodyParameters;
|
|
17
|
+
export type SearchResponse = {
|
|
18
|
+
type: "page_or_data_source";
|
|
19
|
+
page_or_data_source: EmptyObject;
|
|
20
|
+
object: "list";
|
|
21
|
+
next_cursor: string | null;
|
|
22
|
+
has_more: boolean;
|
|
23
|
+
results: Array<PageObjectResponse | PartialPageObjectResponse | PartialDataSourceObjectResponse | DataSourceObjectResponse>;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Search by title
|
|
27
|
+
*/
|
|
28
|
+
export declare const search: {
|
|
29
|
+
readonly method: "post";
|
|
30
|
+
readonly pathParams: readonly [];
|
|
31
|
+
readonly queryParams: readonly [];
|
|
32
|
+
readonly bodyParams: readonly ["sort", "query", "start_cursor", "page_size", "filter"];
|
|
33
|
+
readonly path: () => string;
|
|
34
|
+
};
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/api-endpoints/search.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAClB,yBAAyB,EAC1B,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EACV,wBAAwB,EACxB,+BAA+B,EAChC,MAAM,gBAAgB,CAAA;AAEvB,KAAK,oBAAoB,GAAG;IAC1B,IAAI,CAAC,EAAE;QACL,SAAS,EAAE,kBAAkB,CAAA;QAC7B,SAAS,EAAE,WAAW,GAAG,YAAY,CAAA;KACtC,CAAA;IACD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE;QAAE,QAAQ,EAAE,QAAQ,CAAC;QAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CAAA;KAAE,CAAA;CAC/D,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,CAAA;AAEnD,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,qBAAqB,CAAA;IAC3B,mBAAmB,EAAE,WAAW,CAAA;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,QAAQ,EAAE,OAAO,CAAA;IACjB,OAAO,EAAE,KAAK,CACV,kBAAkB,GAClB,yBAAyB,GACzB,+BAA+B,GAC/B,wBAAwB,CAC3B,CAAA;CACF,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,MAAM;;;;;yBAMP,MAAM;CACR,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// cspell:disable-file
|
|
3
|
+
// Note: This is a generated file. DO NOT EDIT!
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.search = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* Search by title
|
|
8
|
+
*/
|
|
9
|
+
exports.search = {
|
|
10
|
+
method: "post",
|
|
11
|
+
pathParams: [],
|
|
12
|
+
queryParams: [],
|
|
13
|
+
bodyParams: ["sort", "query", "start_cursor", "page_size", "filter"],
|
|
14
|
+
path: () => `search`,
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/api-endpoints/search.ts"],"names":[],"mappings":";AAAA,sBAAsB;AACtB,+CAA+C;;;AAuC/C;;GAEG;AACU,QAAA,MAAM,GAAG;IACpB,MAAM,EAAE,MAAM;IACd,UAAU,EAAE,EAAE;IACd,WAAW,EAAE,EAAE;IACf,UAAU,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,QAAQ,CAAC;IAEpE,IAAI,EAAE,GAAW,EAAE,CAAC,QAAQ;CACpB,CAAA","sourcesContent":["// cspell:disable-file\n// Note: This is a generated file. DO NOT EDIT!\n\nimport type {\n EmptyObject,\n PageObjectResponse,\n PartialPageObjectResponse,\n} from \"./common\"\nimport type {\n DataSourceObjectResponse,\n PartialDataSourceObjectResponse,\n} from \"./data-sources\"\n\ntype SearchBodyParameters = {\n sort?: {\n timestamp: \"last_edited_time\"\n direction: \"ascending\" | \"descending\"\n }\n query?: string\n start_cursor?: string\n page_size?: number\n filter?: { property: \"object\"; value: \"page\" | \"data_source\" }\n}\n\nexport type SearchParameters = SearchBodyParameters\n\nexport type SearchResponse = {\n type: \"page_or_data_source\"\n page_or_data_source: EmptyObject\n object: \"list\"\n next_cursor: string | null\n has_more: boolean\n results: Array<\n | PageObjectResponse\n | PartialPageObjectResponse\n | PartialDataSourceObjectResponse\n | DataSourceObjectResponse\n >\n}\n\n/**\n * Search by title\n */\nexport const search = {\n method: \"post\",\n pathParams: [],\n queryParams: [],\n bodyParams: [\"sort\", \"query\", \"start_cursor\", \"page_size\", \"filter\"],\n\n path: (): string => `search`,\n} as const\n"]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { EmptyObject, IdRequest, UserObjectResponse } from "./common";
|
|
2
|
+
export type GetSelfParameters = Record<string, never>;
|
|
3
|
+
export type GetSelfResponse = UserObjectResponse;
|
|
4
|
+
/**
|
|
5
|
+
* Retrieve your token's bot user
|
|
6
|
+
*/
|
|
7
|
+
export declare const getSelf: {
|
|
8
|
+
readonly method: "get";
|
|
9
|
+
readonly pathParams: readonly [];
|
|
10
|
+
readonly queryParams: readonly [];
|
|
11
|
+
readonly bodyParams: readonly [];
|
|
12
|
+
readonly path: () => string;
|
|
13
|
+
};
|
|
14
|
+
type GetUserPathParameters = {
|
|
15
|
+
user_id: IdRequest;
|
|
16
|
+
};
|
|
17
|
+
export type GetUserParameters = GetUserPathParameters;
|
|
18
|
+
export type GetUserResponse = UserObjectResponse;
|
|
19
|
+
/**
|
|
20
|
+
* Retrieve a user
|
|
21
|
+
*/
|
|
22
|
+
export declare const getUser: {
|
|
23
|
+
readonly method: "get";
|
|
24
|
+
readonly pathParams: readonly ["user_id"];
|
|
25
|
+
readonly queryParams: readonly [];
|
|
26
|
+
readonly bodyParams: readonly [];
|
|
27
|
+
readonly path: (p: GetUserPathParameters) => string;
|
|
28
|
+
};
|
|
29
|
+
type ListUsersQueryParameters = {
|
|
30
|
+
start_cursor?: string;
|
|
31
|
+
page_size?: number;
|
|
32
|
+
};
|
|
33
|
+
export type ListUsersParameters = ListUsersQueryParameters;
|
|
34
|
+
export type ListUsersResponse = {
|
|
35
|
+
type: "user";
|
|
36
|
+
user: EmptyObject;
|
|
37
|
+
object: "list";
|
|
38
|
+
next_cursor: string | null;
|
|
39
|
+
has_more: boolean;
|
|
40
|
+
results: Array<UserObjectResponse>;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* List all users
|
|
44
|
+
*/
|
|
45
|
+
export declare const listUsers: {
|
|
46
|
+
readonly method: "get";
|
|
47
|
+
readonly pathParams: readonly [];
|
|
48
|
+
readonly queryParams: readonly ["start_cursor", "page_size"];
|
|
49
|
+
readonly bodyParams: readonly [];
|
|
50
|
+
readonly path: () => string;
|
|
51
|
+
};
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=users.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../src/api-endpoints/users.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAE1E,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AAErD,MAAM,MAAM,eAAe,GAAG,kBAAkB,CAAA;AAEhD;;GAEG;AACH,eAAO,MAAM,OAAO;;;;;yBAMR,MAAM;CACR,CAAA;AAEV,KAAK,qBAAqB,GAAG;IAC3B,OAAO,EAAE,SAAS,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,CAAA;AAErD,MAAM,MAAM,eAAe,GAAG,kBAAkB,CAAA;AAEhD;;GAEG;AACH,eAAO,MAAM,OAAO;;;;;uBAMR,qBAAqB,KAAG,MAAM;CAChC,CAAA;AAEV,KAAK,wBAAwB,GAAG;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,wBAAwB,CAAA;AAE1D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,WAAW,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,QAAQ,EAAE,OAAO,CAAA;IACjB,OAAO,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAA;CACnC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;yBAMV,MAAM;CACR,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// cspell:disable-file
|
|
3
|
+
// Note: This is a generated file. DO NOT EDIT!
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.listUsers = exports.getUser = exports.getSelf = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* Retrieve your token's bot user
|
|
8
|
+
*/
|
|
9
|
+
exports.getSelf = {
|
|
10
|
+
method: "get",
|
|
11
|
+
pathParams: [],
|
|
12
|
+
queryParams: [],
|
|
13
|
+
bodyParams: [],
|
|
14
|
+
path: () => `users/me`,
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Retrieve a user
|
|
18
|
+
*/
|
|
19
|
+
exports.getUser = {
|
|
20
|
+
method: "get",
|
|
21
|
+
pathParams: ["user_id"],
|
|
22
|
+
queryParams: [],
|
|
23
|
+
bodyParams: [],
|
|
24
|
+
path: (p) => `users/${p.user_id}`,
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* List all users
|
|
28
|
+
*/
|
|
29
|
+
exports.listUsers = {
|
|
30
|
+
method: "get",
|
|
31
|
+
pathParams: [],
|
|
32
|
+
queryParams: ["start_cursor", "page_size"],
|
|
33
|
+
bodyParams: [],
|
|
34
|
+
path: () => `users`,
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=users.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"users.js","sourceRoot":"","sources":["../../../src/api-endpoints/users.ts"],"names":[],"mappings":";AAAA,sBAAsB;AACtB,+CAA+C;;;AAQ/C;;GAEG;AACU,QAAA,OAAO,GAAG;IACrB,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,EAAE;IACd,WAAW,EAAE,EAAE;IACf,UAAU,EAAE,EAAE;IAEd,IAAI,EAAE,GAAW,EAAE,CAAC,UAAU;CACtB,CAAA;AAUV;;GAEG;AACU,QAAA,OAAO,GAAG;IACrB,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,CAAC,SAAS,CAAC;IACvB,WAAW,EAAE,EAAE;IACf,UAAU,EAAE,EAAE;IAEd,IAAI,EAAE,CAAC,CAAwB,EAAU,EAAE,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE;CACxD,CAAA;AAkBV;;GAEG;AACU,QAAA,SAAS,GAAG;IACvB,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,EAAE;IACd,WAAW,EAAE,CAAC,cAAc,EAAE,WAAW,CAAC;IAC1C,UAAU,EAAE,EAAE;IAEd,IAAI,EAAE,GAAW,EAAE,CAAC,OAAO;CACnB,CAAA","sourcesContent":["// cspell:disable-file\n// Note: This is a generated file. DO NOT EDIT!\n\nimport type { EmptyObject, IdRequest, UserObjectResponse } from \"./common\"\n\nexport type GetSelfParameters = Record<string, never>\n\nexport type GetSelfResponse = UserObjectResponse\n\n/**\n * Retrieve your token's bot user\n */\nexport const getSelf = {\n method: \"get\",\n pathParams: [],\n queryParams: [],\n bodyParams: [],\n\n path: (): string => `users/me`,\n} as const\n\ntype GetUserPathParameters = {\n user_id: IdRequest\n}\n\nexport type GetUserParameters = GetUserPathParameters\n\nexport type GetUserResponse = UserObjectResponse\n\n/**\n * Retrieve a user\n */\nexport const getUser = {\n method: \"get\",\n pathParams: [\"user_id\"],\n queryParams: [],\n bodyParams: [],\n\n path: (p: GetUserPathParameters): string => `users/${p.user_id}`,\n} as const\n\ntype ListUsersQueryParameters = {\n start_cursor?: string\n page_size?: number\n}\n\nexport type ListUsersParameters = ListUsersQueryParameters\n\nexport type ListUsersResponse = {\n type: \"user\"\n user: EmptyObject\n object: \"list\"\n next_cursor: string | null\n has_more: boolean\n results: Array<UserObjectResponse>\n}\n\n/**\n * List all users\n */\nexport const listUsers = {\n method: \"get\",\n pathParams: [],\n queryParams: [\"start_cursor\", \"page_size\"],\n bodyParams: [],\n\n path: (): string => `users`,\n} as const\n"]}
|