@notionhq/client 5.23.3 → 5.25.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 +5 -1
- package/build/src/Client.d.ts.map +1 -1
- package/build/src/Client.js +13 -0
- package/build/src/Client.js.map +1 -1
- package/build/src/api-endpoints/async-tasks.d.ts +4 -60
- package/build/src/api-endpoints/async-tasks.d.ts.map +1 -1
- package/build/src/api-endpoints/async-tasks.js.map +1 -1
- package/build/src/api-endpoints/common.d.ts +10 -2
- package/build/src/api-endpoints/common.d.ts.map +1 -1
- package/build/src/api-endpoints/common.js.map +1 -1
- package/build/src/api-endpoints/meeting-notes.d.ts +68 -1
- package/build/src/api-endpoints/meeting-notes.d.ts.map +1 -1
- package/build/src/api-endpoints/meeting-notes.js +11 -1
- package/build/src/api-endpoints/meeting-notes.js.map +1 -1
- package/build/src/api-endpoints/pages.d.ts +15 -5
- package/build/src/api-endpoints/pages.d.ts.map +1 -1
- package/build/src/api-endpoints/pages.js +2 -2
- package/build/src/api-endpoints/pages.js.map +1 -1
- package/build/src/errors.d.ts +1 -0
- package/build/src/errors.d.ts.map +1 -1
- package/build/src/errors.js +3 -0
- package/build/src/errors.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meeting-notes.js","sourceRoot":"","sources":["../../../src/api-endpoints/meeting-notes.ts"],"names":[],"mappings":";AAAA,sBAAsB;AACtB,+CAA+C;;;AAoP/C;;GAEG;AACU,QAAA,iBAAiB,GAAG;IAC/B,MAAM,EAAE,MAAM;IACd,UAAU,EAAE,EAAE;IACd,WAAW,EAAE,EAAE;IACf,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC;IAEvC,IAAI,EAAE,GAAW,EAAE,CAAC,4BAA4B;CACxC,CAAA","sourcesContent":["// cspell:disable-file\n// Note: This is a generated file. DO NOT EDIT!\n\nimport type {\n IdResponse,\n PartialUserObjectResponse,\n RichTextItemResponse,\n} from \"./common\"\n\ntype QueryMeetingNotesBodyParameters = {\n // Optional filter for querying meeting notes. Supports combinator (and/or) and property\n // filters on title, attendees, created_time, created_by, last_edited_time,\n // last_edited_by.\n filter?: {\n // Operator for combinator filters.\n operator: \"and\" | \"or\"\n // Nested filters; each may be a combinator (and/or) or property filter.\n filters?: Array<\n | {\n // Operator for nested combinator filters.\n operator: \"and\" | \"or\"\n // Nested filters for combinator filters.\n filters: Array<\n | {\n // Property name.\n property: string\n filter: {\n // Operator.\n operator: string\n // Value for the operator.\n value?:\n | {\n type: \"relative\" | \"exact\"\n value:\n | string\n | {\n type: \"date\" | \"datetime\"\n start_date: string\n start_time?: string\n time_zone?: string\n }\n }\n | {\n type: \"relative\" | \"exact\"\n value:\n | string\n | {\n type: \"daterange\"\n start_date: string\n end_date?: string\n }\n direction?: \"past\" | \"future\"\n unit?: \"day\" | \"week\" | \"month\" | \"year\"\n count?: number\n }\n | {\n type: \"exact\"\n // The text value to filter on.\n value: string\n }\n | Array<{\n type: \"exact\"\n value: { table: \"notion_user\"; id: string }\n }>\n }\n }\n | {\n // Operator for nested combinator filters.\n operator: \"and\" | \"or\"\n filters: Array<{\n // Property name.\n property: string\n filter: {\n // Operator.\n operator: string\n // Value for the operator.\n value?:\n | {\n type: \"relative\" | \"exact\"\n value:\n | string\n | {\n type: \"date\" | \"datetime\"\n start_date: string\n start_time?: string\n time_zone?: string\n }\n }\n | {\n type: \"relative\" | \"exact\"\n value:\n | string\n | {\n type: \"daterange\"\n start_date: string\n end_date?: string\n }\n direction?: \"past\" | \"future\"\n unit?: \"day\" | \"week\" | \"month\" | \"year\"\n count?: number\n }\n | {\n type: \"exact\"\n // The text value to filter on.\n value: string\n }\n | Array<{\n type: \"exact\"\n value: { table: \"notion_user\"; id: string }\n }>\n }\n }>\n }\n >\n }\n | {\n // Property name.\n property: string\n filter: {\n // Operator.\n operator: string\n // Value for the operator.\n value?:\n | {\n type: \"relative\" | \"exact\"\n value:\n | string\n | {\n type: \"date\" | \"datetime\"\n start_date: string\n start_time?: string\n time_zone?: string\n }\n }\n | {\n type: \"relative\" | \"exact\"\n value:\n | string\n | {\n type: \"daterange\"\n start_date: string\n end_date?: string\n }\n direction?: \"past\" | \"future\"\n unit?: \"day\" | \"week\" | \"month\" | \"year\"\n count?: number\n }\n | {\n type: \"exact\"\n // The text value to filter on.\n value: string\n }\n | Array<{\n type: \"exact\"\n value: { table: \"notion_user\"; id: string }\n }>\n }\n }\n >\n }\n // Optional sort order for the results. Each entry specifies a property name and\n // direction.\n sort?: Array<{\n // Property name to sort by.\n property:\n | \"title\"\n | \"attendees\"\n | \"created_time\"\n | \"created_by\"\n | \"last_edited_time\"\n | \"last_edited_by\"\n // Sort direction. Must be 'ascending' or 'descending'.\n direction: \"ascending\" | \"descending\"\n }>\n // Maximum number of results to return. Defaults to 50.\n limit?: number\n}\n\nexport type QueryMeetingNotesParameters = QueryMeetingNotesBodyParameters\n\nexport type QueryMeetingNotesResponse = {\n // Meeting note transcription block objects.\n results: Array<{\n // Always \"block\".\n object: \"block\"\n // The ID of the meeting note block.\n id: IdResponse\n // Always \"meeting_notes\".\n type: \"meeting_notes\"\n // Meeting note content fields.\n meeting_notes: {\n // Title of the meeting note as rich text.\n title?: Array<RichTextItemResponse>\n // Current processing status of the meeting note transcription.\n status?:\n | \"transcription_not_started\"\n | \"transcription_paused\"\n | \"transcription_in_progress\"\n | \"summary_in_progress\"\n | \"notes_ready\"\n // Block IDs for each tab (summary, notes, transcript).\n children?: {\n // Block ID of the AI summary tab.\n summary_block_id?: IdResponse\n // Block ID of the meeting notes tab.\n notes_block_id?: IdResponse\n // Block ID of the transcript tab.\n transcript_block_id?: IdResponse\n }\n // Calendar event metadata associated with this meeting note.\n calendar_event?: {\n // ISO-8601 start time of the calendar event.\n start_time: string\n // ISO-8601 end time of the calendar event.\n end_time: string\n // List of attendee user IDs.\n attendees?: Array<IdResponse>\n }\n // Start and end times of the actual recording.\n recording?: {\n // ISO-8601 timestamp when the recording started.\n start_time?: string\n // ISO-8601 timestamp when the recording ended.\n end_time?: string\n }\n }\n // ISO-8601 timestamp when this meeting note was created.\n created_time: string\n // ISO-8601 timestamp when this meeting note was last edited.\n last_edited_time: string\n // User who created this meeting note.\n created_by: PartialUserObjectResponse\n // User who last edited this meeting note.\n last_edited_by: PartialUserObjectResponse\n // Whether this block has child blocks.\n has_children: boolean\n // Whether this meeting note is in the trash.\n in_trash: boolean\n /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */\n archived: boolean\n }>\n // Whether additional results exist beyond the returned limit.\n has_more: boolean\n}\n\n/**\n * Query meeting notes\n */\nexport const queryMeetingNotes = {\n method: \"post\",\n pathParams: [],\n queryParams: [],\n bodyParams: [\"filter\", \"sort\", \"limit\"],\n\n path: (): string => `blocks/meeting_notes/query`,\n} as const\n"]}
|
|
1
|
+
{"version":3,"file":"meeting-notes.js","sourceRoot":"","sources":["../../../src/api-endpoints/meeting-notes.ts"],"names":[],"mappings":";AAAA,sBAAsB;AACtB,+CAA+C;;;AA8I/C;;GAEG;AACU,QAAA,iBAAiB,GAAG;IAC/B,MAAM,EAAE,MAAM;IACd,UAAU,EAAE,EAAE;IACd,WAAW,EAAE,EAAE;IACf,UAAU,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC;IAEhE,IAAI,EAAE,GAAW,EAAE,CAAC,sBAAsB;CAClC,CAAA;AA8OV;;GAEG;AACU,QAAA,iBAAiB,GAAG;IAC/B,MAAM,EAAE,MAAM;IACd,UAAU,EAAE,EAAE;IACd,WAAW,EAAE,EAAE;IACf,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC;IAEvC,IAAI,EAAE,GAAW,EAAE,CAAC,4BAA4B;CACxC,CAAA","sourcesContent":["// cspell:disable-file\n// Note: This is a generated file. DO NOT EDIT!\n\nimport type {\n IdRequest,\n IdResponse,\n PartialUserObjectResponse,\n RichTextItemResponse,\n} from \"./common\"\n\ntype CreateMeetingNoteBodyParameters = {\n // Title for the meeting note.\n title?: string\n // Language hint for transcription. Defaults to automatic detection.\n language?:\n | \"auto\"\n | \"en\"\n | \"zh-CN\"\n | \"zh-TW\"\n | \"es\"\n | \"fr\"\n | \"de\"\n | \"ja\"\n | \"ko\"\n | \"pt\"\n | \"ru\"\n | \"th\"\n | \"vi\"\n | \"id\"\n | \"da\"\n | \"fi\"\n | \"no\"\n | \"nl\"\n | \"it\"\n | \"sv\"\n | \"ar\"\n | \"he\"\n | \"pl\"\n // Optional processing settings.\n options?: {\n // Whether to start summary generation after transcription.\n kickoff_summary?: boolean\n }\n} & (\n | {\n // Audio or video source for the meeting note.\n source: {\n // Always \"file_upload\".\n type: \"file_upload\"\n // ID of a completed public API file upload.\n file_upload_id: IdRequest\n }\n // Parent page for the new meeting note.\n parent: {\n // Always \"page_id\".\n type: \"page_id\"\n // Page ID where the meeting note should be created. Required for file_upload sources.\n page_id: IdRequest\n }\n }\n | {\n // Audio or video source for the meeting note.\n source: {\n // Always \"block\".\n type: \"block\"\n // ID of an existing audio, video, or file block.\n block_id: IdRequest\n }\n // Not accepted for block sources.\n parent?: never\n }\n)\n\nexport type CreateMeetingNoteParameters = CreateMeetingNoteBodyParameters\n\nexport type CreateMeetingNoteResponse =\n | {\n // Always \"block\".\n object: \"block\"\n // The ID of the meeting note block.\n id: IdResponse\n }\n | {\n // Always \"block\".\n object: \"block\"\n // The ID of the meeting note block.\n id: IdResponse\n // Always \"meeting_notes\".\n type: \"meeting_notes\"\n // Meeting note content fields.\n meeting_notes: {\n // Title of the meeting note as rich text.\n title?: Array<RichTextItemResponse>\n // Current processing status of the meeting note transcription.\n status?:\n | \"transcription_not_started\"\n | \"transcription_paused\"\n | \"transcription_in_progress\"\n | \"transcription_failed\"\n | \"summary_in_progress\"\n | \"notes_ready\"\n // Block IDs for each tab (summary, notes, transcript).\n children?: {\n // Block ID of the AI summary tab.\n summary_block_id?: IdResponse\n // Block ID of the meeting notes tab.\n notes_block_id?: IdResponse\n // Block ID of the transcript tab.\n transcript_block_id?: IdResponse\n }\n // Calendar event metadata associated with this meeting note.\n calendar_event?: {\n // ISO-8601 start time of the calendar event.\n start_time: string\n // ISO-8601 end time of the calendar event.\n end_time: string\n // List of attendee user IDs.\n attendees?: Array<IdResponse>\n }\n // Start and end times of the actual recording.\n recording?: {\n // ISO-8601 timestamp when the recording started.\n start_time?: string\n // ISO-8601 timestamp when the recording ended.\n end_time?: string\n }\n }\n // ISO-8601 timestamp when this meeting note was created.\n created_time: string\n // ISO-8601 timestamp when this meeting note was last edited.\n last_edited_time: string\n // User who created this meeting note.\n created_by: PartialUserObjectResponse\n // User who last edited this meeting note.\n last_edited_by: PartialUserObjectResponse\n // Whether this block has child blocks.\n has_children: boolean\n // Whether this meeting note is in the trash.\n in_trash: boolean\n /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */\n archived: boolean\n }\n\n/**\n * Create a meeting note\n */\nexport const createMeetingNote = {\n method: \"post\",\n pathParams: [],\n queryParams: [],\n bodyParams: [\"title\", \"language\", \"options\", \"source\", \"parent\"],\n\n path: (): string => `blocks/meeting_notes`,\n} as const\n\ntype QueryMeetingNotesBodyParameters = {\n // Optional filter for querying meeting notes. Supports combinator (and/or) and property\n // filters on title, attendees, created_time, created_by, last_edited_time,\n // last_edited_by.\n filter?: {\n // Operator for combinator filters.\n operator: \"and\" | \"or\"\n // Nested filters; each may be a combinator (and/or) or property filter.\n filters?: Array<\n | {\n // Operator for nested combinator filters.\n operator: \"and\" | \"or\"\n // Nested filters for combinator filters.\n filters: Array<\n | {\n // Property name.\n property: string\n filter: {\n // Operator.\n operator: string\n // Value for the operator.\n value?:\n | {\n type: \"relative\" | \"exact\"\n value:\n | string\n | {\n type: \"date\" | \"datetime\"\n start_date: string\n start_time?: string\n time_zone?: string\n }\n }\n | {\n type: \"relative\" | \"exact\"\n value:\n | string\n | {\n type: \"daterange\"\n start_date: string\n end_date?: string\n }\n direction?: \"past\" | \"future\"\n unit?: \"day\" | \"week\" | \"month\" | \"year\"\n count?: number\n }\n | {\n type: \"exact\"\n // The text value to filter on.\n value: string\n }\n | Array<{\n type: \"exact\"\n value: { table: \"notion_user\"; id: string }\n }>\n }\n }\n | {\n // Operator for nested combinator filters.\n operator: \"and\" | \"or\"\n filters: Array<{\n // Property name.\n property: string\n filter: {\n // Operator.\n operator: string\n // Value for the operator.\n value?:\n | {\n type: \"relative\" | \"exact\"\n value:\n | string\n | {\n type: \"date\" | \"datetime\"\n start_date: string\n start_time?: string\n time_zone?: string\n }\n }\n | {\n type: \"relative\" | \"exact\"\n value:\n | string\n | {\n type: \"daterange\"\n start_date: string\n end_date?: string\n }\n direction?: \"past\" | \"future\"\n unit?: \"day\" | \"week\" | \"month\" | \"year\"\n count?: number\n }\n | {\n type: \"exact\"\n // The text value to filter on.\n value: string\n }\n | Array<{\n type: \"exact\"\n value: { table: \"notion_user\"; id: string }\n }>\n }\n }>\n }\n >\n }\n | {\n // Property name.\n property: string\n filter: {\n // Operator.\n operator: string\n // Value for the operator.\n value?:\n | {\n type: \"relative\" | \"exact\"\n value:\n | string\n | {\n type: \"date\" | \"datetime\"\n start_date: string\n start_time?: string\n time_zone?: string\n }\n }\n | {\n type: \"relative\" | \"exact\"\n value:\n | string\n | {\n type: \"daterange\"\n start_date: string\n end_date?: string\n }\n direction?: \"past\" | \"future\"\n unit?: \"day\" | \"week\" | \"month\" | \"year\"\n count?: number\n }\n | {\n type: \"exact\"\n // The text value to filter on.\n value: string\n }\n | Array<{\n type: \"exact\"\n value: { table: \"notion_user\"; id: string }\n }>\n }\n }\n >\n }\n // Optional sort order for the results. Each entry specifies a property name and\n // direction.\n sort?: Array<{\n // Property name to sort by.\n property:\n | \"title\"\n | \"attendees\"\n | \"created_time\"\n | \"created_by\"\n | \"last_edited_time\"\n | \"last_edited_by\"\n // Sort direction. Must be 'ascending' or 'descending'.\n direction: \"ascending\" | \"descending\"\n }>\n // Maximum number of results to return. Defaults to 50.\n limit?: number\n}\n\nexport type QueryMeetingNotesParameters = QueryMeetingNotesBodyParameters\n\nexport type QueryMeetingNotesResponse = {\n // Meeting note transcription block objects.\n results: Array<{\n // Always \"block\".\n object: \"block\"\n // The ID of the meeting note block.\n id: IdResponse\n // Always \"meeting_notes\".\n type: \"meeting_notes\"\n // Meeting note content fields.\n meeting_notes: {\n // Title of the meeting note as rich text.\n title?: Array<RichTextItemResponse>\n // Current processing status of the meeting note transcription.\n status?:\n | \"transcription_not_started\"\n | \"transcription_paused\"\n | \"transcription_in_progress\"\n | \"summary_in_progress\"\n | \"notes_ready\"\n // Block IDs for each tab (summary, notes, transcript).\n children?: {\n // Block ID of the AI summary tab.\n summary_block_id?: IdResponse\n // Block ID of the meeting notes tab.\n notes_block_id?: IdResponse\n // Block ID of the transcript tab.\n transcript_block_id?: IdResponse\n }\n // Calendar event metadata associated with this meeting note.\n calendar_event?: {\n // ISO-8601 start time of the calendar event.\n start_time: string\n // ISO-8601 end time of the calendar event.\n end_time: string\n // List of attendee user IDs.\n attendees?: Array<IdResponse>\n }\n // Start and end times of the actual recording.\n recording?: {\n // ISO-8601 timestamp when the recording started.\n start_time?: string\n // ISO-8601 timestamp when the recording ended.\n end_time?: string\n }\n }\n // ISO-8601 timestamp when this meeting note was created.\n created_time: string\n // ISO-8601 timestamp when this meeting note was last edited.\n last_edited_time: string\n // User who created this meeting note.\n created_by: PartialUserObjectResponse\n // User who last edited this meeting note.\n last_edited_by: PartialUserObjectResponse\n // Whether this block has child blocks.\n has_children: boolean\n // Whether this meeting note is in the trash.\n in_trash: boolean\n /** @deprecated Use `in_trash` instead. Present for backwards compatibility with API versions prior to 2026-03-11. */\n archived: boolean\n }>\n // Whether additional results exist beyond the returned limit.\n has_more: boolean\n}\n\n/**\n * Query meeting notes\n */\nexport const queryMeetingNotes = {\n method: \"post\",\n pathParams: [],\n queryParams: [],\n bodyParams: [\"filter\", \"sort\", \"limit\"],\n\n path: (): string => `blocks/meeting_notes/query`,\n} as const\n"]}
|
|
@@ -55,7 +55,7 @@ export type FormulaPropertyItemObjectResponse = {
|
|
|
55
55
|
object: "property_item";
|
|
56
56
|
id: string;
|
|
57
57
|
};
|
|
58
|
-
type FormulaPropertyResponse = StringFormulaPropertyResponse | DateFormulaPropertyResponse | NumberFormulaPropertyResponse | BooleanFormulaPropertyResponse;
|
|
58
|
+
type FormulaPropertyResponse = StringFormulaPropertyResponse | DateFormulaPropertyResponse | NumberFormulaPropertyResponse | BooleanFormulaPropertyResponse | UnsupportedFormulaPropertyResponse;
|
|
59
59
|
export type LastEditedByPropertyItemObjectResponse = {
|
|
60
60
|
type: "last_edited_by";
|
|
61
61
|
last_edited_by: PartialUserObjectResponse | UserObjectResponse;
|
|
@@ -240,6 +240,10 @@ export type UniqueIdPropertyItemObjectResponse = {
|
|
|
240
240
|
object: "property_item";
|
|
241
241
|
id: string;
|
|
242
242
|
};
|
|
243
|
+
type UnsupportedFormulaPropertyResponse = {
|
|
244
|
+
type: "unsupported";
|
|
245
|
+
unsupported: EmptyObject;
|
|
246
|
+
};
|
|
243
247
|
export type UrlPropertyItemObjectResponse = {
|
|
244
248
|
type: "url";
|
|
245
249
|
url: string | null;
|
|
@@ -252,6 +256,9 @@ export type VerificationPropertyItemObjectResponse = {
|
|
|
252
256
|
object: "property_item";
|
|
253
257
|
id: string;
|
|
254
258
|
};
|
|
259
|
+
type CreatePageQueryParameters = {
|
|
260
|
+
filter_properties?: Array<string>;
|
|
261
|
+
};
|
|
255
262
|
type CreatePageBodyParameters = {
|
|
256
263
|
parent?: {
|
|
257
264
|
page_id: IdRequest;
|
|
@@ -375,7 +382,7 @@ type CreatePageBodyParameters = {
|
|
|
375
382
|
};
|
|
376
383
|
position?: PagePositionSchema;
|
|
377
384
|
};
|
|
378
|
-
export type CreatePageParameters = CreatePageBodyParameters;
|
|
385
|
+
export type CreatePageParameters = CreatePageQueryParameters & CreatePageBodyParameters;
|
|
379
386
|
export type CreatePageResponse = PageObjectResponse | PartialPageObjectResponse;
|
|
380
387
|
/**
|
|
381
388
|
* Create a page
|
|
@@ -383,7 +390,7 @@ export type CreatePageResponse = PageObjectResponse | PartialPageObjectResponse;
|
|
|
383
390
|
export declare const createPage: {
|
|
384
391
|
readonly method: "post";
|
|
385
392
|
readonly pathParams: readonly [];
|
|
386
|
-
readonly queryParams: readonly [];
|
|
393
|
+
readonly queryParams: readonly ["filter_properties"];
|
|
387
394
|
readonly bodyParams: readonly ["parent", "properties", "icon", "cover", "content", "children", "markdown", "allow_async", "template", "position"];
|
|
388
395
|
readonly path: () => string;
|
|
389
396
|
};
|
|
@@ -408,6 +415,9 @@ export declare const getPage: {
|
|
|
408
415
|
type UpdatePagePathParameters = {
|
|
409
416
|
page_id: IdRequest;
|
|
410
417
|
};
|
|
418
|
+
type UpdatePageQueryParameters = {
|
|
419
|
+
filter_properties?: Array<string>;
|
|
420
|
+
};
|
|
411
421
|
type UpdatePageBodyParameters = {
|
|
412
422
|
properties?: Record<string, {
|
|
413
423
|
title: Array<RichTextItemRequest>;
|
|
@@ -517,7 +527,7 @@ type UpdatePageBodyParameters = {
|
|
|
517
527
|
archived?: boolean;
|
|
518
528
|
is_archived?: boolean;
|
|
519
529
|
};
|
|
520
|
-
export type UpdatePageParameters = UpdatePagePathParameters & UpdatePageBodyParameters;
|
|
530
|
+
export type UpdatePageParameters = UpdatePagePathParameters & UpdatePageQueryParameters & UpdatePageBodyParameters;
|
|
521
531
|
export type UpdatePageResponse = PageObjectResponse | PartialPageObjectResponse;
|
|
522
532
|
/**
|
|
523
533
|
* Update page
|
|
@@ -525,7 +535,7 @@ export type UpdatePageResponse = PageObjectResponse | PartialPageObjectResponse;
|
|
|
525
535
|
export declare const updatePage: {
|
|
526
536
|
readonly method: "patch";
|
|
527
537
|
readonly pathParams: readonly ["page_id"];
|
|
528
|
-
readonly queryParams: readonly [];
|
|
538
|
+
readonly queryParams: readonly ["filter_properties"];
|
|
529
539
|
readonly bodyParams: readonly ["archived", "properties", "icon", "cover", "is_locked", "template", "erase_content", "in_trash", "is_archived"];
|
|
530
540
|
readonly path: (p: UpdatePagePathParameters) => string;
|
|
531
541
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../../src/api-endpoints/pages.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,iCAAiC,EACjC,kBAAkB,EAClB,SAAS,EACT,qCAAqC,EACrC,sCAAsC,EACtC,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,iCAAiC,EACjC,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,iCAAiC,EAClC,MAAM,UAAU,CAAA;AAEjB,KAAK,8BAA8B,GAAG;IACpC,IAAI,EAAE,SAAS,CAAA;IACf,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,gCAAgC,GAAG;IAC7C,IAAI,EAAE,QAAQ,CAAA;IACd,MAAM,EAAE,WAAW,CAAA;IACnB,MAAM,EAAE,eAAe,CAAA;IACvB,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAED,MAAM,MAAM,kCAAkC,GAAG;IAC/C,IAAI,EAAE,UAAU,CAAA;IAChB,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,eAAe,CAAA;IACvB,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAED,MAAM,MAAM,mCAAmC,GAAG;IAChD,IAAI,EAAE,YAAY,CAAA;IAClB,UAAU,EAAE,yBAAyB,GAAG,kBAAkB,CAAA;IAC1D,MAAM,EAAE,eAAe,CAAA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O,CAAA;KACjC,CAAA;CACF,CACJ,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG,gCAAgC,GACzE,gCAAgC,CAAA;AAElC,MAAM,MAAM,0BAA0B,GAAG,oBAAoB,CAAA;AAE7D;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;uBAanB,gCAAgC,KAAG,MAAM;CAE3C,CAAA"}
|
|
1
|
+
{"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../../src/api-endpoints/pages.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,iCAAiC,EACjC,kBAAkB,EAClB,SAAS,EACT,qCAAqC,EACrC,sCAAsC,EACtC,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,iCAAiC,EACjC,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,iCAAiC,EAClC,MAAM,UAAU,CAAA;AAEjB,KAAK,8BAA8B,GAAG;IACpC,IAAI,EAAE,SAAS,CAAA;IACf,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,gCAAgC,GAAG;IAC7C,IAAI,EAAE,QAAQ,CAAA;IACd,MAAM,EAAE,WAAW,CAAA;IACnB,MAAM,EAAE,eAAe,CAAA;IACvB,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAED,MAAM,MAAM,kCAAkC,GAAG;IAC/C,IAAI,EAAE,UAAU,CAAA;IAChB,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,eAAe,CAAA;IACvB,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAED,MAAM,MAAM,mCAAmC,GAAG;IAChD,IAAI,EAAE,YAAY,CAAA;IAClB,UAAU,EA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AA;KACjC,CAAA;CACF,GACD;IAEE,IAAI,EAAE,gBAAgB,CAAA;IAEtB,cAAc,EAAE;QAGd,eAAe,EAAE,KAAK,CAAC;YAErB,OAAO,EAAE,MAAM,CAAA;YAEf,OAAO,EAAE,MAAM,CAAA;YAGf,mBAAmB,CAAC,EAAE,OAAO,CAAA;SAC9B,CAAC,CAAA;QAGF,sBAAsB,CAAC,EAAE,OAAO,CAAA;KACjC,CAAA;CACF,GACD;IAEE,IAAI,EAAE,iBAAiB,CAAA;IAEvB,eAAe,EAAE;QAEf,OAAO,EAAE,MAAM,CAAA;QAGf,sBAAsB,CAAC,EAAE,OAAO,CAAA;KACjC,CAAA;CACF,CACJ,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG,gCAAgC,GACzE,gCAAgC,CAAA;AAElC,MAAM,MAAM,0BAA0B,GAAG,oBAAoB,CAAA;AAE7D;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;uBAanB,gCAAgC,KAAG,MAAM;CAE3C,CAAA"}
|
|
@@ -9,7 +9,7 @@ exports.updatePageMarkdown = exports.getPageMarkdown = exports.getPageProperty =
|
|
|
9
9
|
exports.createPage = {
|
|
10
10
|
method: "post",
|
|
11
11
|
pathParams: [],
|
|
12
|
-
queryParams: [],
|
|
12
|
+
queryParams: ["filter_properties"],
|
|
13
13
|
bodyParams: [
|
|
14
14
|
"parent",
|
|
15
15
|
"properties",
|
|
@@ -40,7 +40,7 @@ exports.getPage = {
|
|
|
40
40
|
exports.updatePage = {
|
|
41
41
|
method: "patch",
|
|
42
42
|
pathParams: ["page_id"],
|
|
43
|
-
queryParams: [],
|
|
43
|
+
queryParams: ["filter_properties"],
|
|
44
44
|
bodyParams: [
|
|
45
45
|
"archived",
|
|
46
46
|
"properties",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pages.js","sourceRoot":"","sources":["../../../src/api-endpoints/pages.ts"],"names":[],"mappings":";AAAA,sBAAsB;AACtB,+CAA+C;;;AAub/C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tC,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;AA2FV;;GAEG;AACU,QAAA,kBAAkB,GAAG;IAChC,MAAM,EAAE,OAAO;IACf,UAAU,EAAE,CAAC,SAAS,CAAC;IACvB,WAAW,EAAE,EAAE;IACf,UAAU,EAAE;QACV,aAAa;QACb,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 // Set to true to receive an async_task response for markdown page creation. Only\n // supported when markdown is provided.\n allow_async?: boolean\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 \"allow_async\",\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 | null\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 // Set to true to opt into receiving an async_task result when this update operation is\n // accepted for background execution. If omitted or false, the endpoint keeps the\n // existing synchronous response shape.\n allow_async?: boolean\n} & (\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 // Explicit position for inserted content. Use {\"type\":\"start\"} to prepend or\n // {\"type\":\"end\"} to append. Cannot be combined with after.\n position?:\n | {\n // Insert the content at the start of the page.\n type: \"start\"\n }\n | {\n // Insert the content at the end of the page.\n type: \"end\"\n }\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)\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 \"allow_async\",\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"]}
|
|
1
|
+
{"version":3,"file":"pages.js","sourceRoot":"","sources":["../../../src/api-endpoints/pages.ts"],"names":[],"mappings":";AAAA,sBAAsB;AACtB,+CAA+C;;;AAkc/C;;GAEG;AACU,QAAA,UAAU,GAAG;IACxB,MAAM,EAAE,MAAM;IACd,UAAU,EAAE,EAAE;IACd,WAAW,EAAE,CAAC,mBAAmB,CAAC;IAClC,UAAU,EAAE;QACV,QAAQ;QACR,YAAY;QACZ,MAAM;QACN,OAAO;QACP,SAAS;QACT,UAAU;QACV,UAAU;QACV,aAAa;QAC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;;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;AA2FV;;GAEG;AACU,QAAA,kBAAkB,GAAG;IAChC,MAAM,EAAE,OAAO;IACf,UAAU,EAAE,CAAC,SAAS,CAAC;IACvB,WAAW,EAAE,EAAE;IACf,UAAU,EAAE;QACV,aAAa;QACb,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 | UnsupportedFormulaPropertyResponse\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\ntype UnsupportedFormulaPropertyResponse = {\n type: \"unsupported\"\n unsupported: EmptyObject\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 CreatePageQueryParameters = {\n filter_properties?: Array<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 // Set to true to receive an async_task response for markdown page creation. Only\n // supported when markdown is provided.\n allow_async?: boolean\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 = CreatePageQueryParameters &\n CreatePageBodyParameters\n\nexport type CreatePageResponse = PageObjectResponse | PartialPageObjectResponse\n\n/**\n * Create a page\n */\nexport const createPage = {\n method: \"post\",\n pathParams: [],\n queryParams: [\"filter_properties\"],\n bodyParams: [\n \"parent\",\n \"properties\",\n \"icon\",\n \"cover\",\n \"content\",\n \"children\",\n \"markdown\",\n \"allow_async\",\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 UpdatePageQueryParameters = {\n filter_properties?: Array<string>\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 UpdatePageQueryParameters &\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: [\"filter_properties\"],\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 | null\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 // Set to true to opt into receiving an async_task result when this update operation is\n // accepted for background execution. If omitted or false, the endpoint keeps the\n // existing synchronous response shape.\n allow_async?: boolean\n} & (\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 // Explicit position for inserted content. Use {\"type\":\"start\"} to prepend or\n // {\"type\":\"end\"} to append. Cannot be combined with after.\n position?:\n | {\n // Insert the content at the start of the page.\n type: \"start\"\n }\n | {\n // Insert the content at the end of the page.\n type: \"end\"\n }\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)\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 \"allow_async\",\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"]}
|
package/build/src/errors.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare enum APIErrorCode {
|
|
|
10
10
|
InvalidJSON = "invalid_json",
|
|
11
11
|
InvalidRequestURL = "invalid_request_url",
|
|
12
12
|
InvalidRequest = "invalid_request",
|
|
13
|
+
InvalidBeta = "invalid_beta",
|
|
13
14
|
ValidationError = "validation_error",
|
|
14
15
|
ConflictError = "conflict_error",
|
|
15
16
|
InternalServerError = "internal_server_error",
|
|
@@ -1 +1 @@
|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,IAAI,gBAAgB;CAGrE;AAED,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,iBAAiB,EAC3B,QAAQ,EAAE,MAAM,GACf,gBAAgB,GAAG,wBAAwB,CAmB7C"}
|
package/build/src/errors.js
CHANGED
|
@@ -19,6 +19,7 @@ var APIErrorCode;
|
|
|
19
19
|
APIErrorCode["InvalidJSON"] = "invalid_json";
|
|
20
20
|
APIErrorCode["InvalidRequestURL"] = "invalid_request_url";
|
|
21
21
|
APIErrorCode["InvalidRequest"] = "invalid_request";
|
|
22
|
+
APIErrorCode["InvalidBeta"] = "invalid_beta";
|
|
22
23
|
APIErrorCode["ValidationError"] = "validation_error";
|
|
23
24
|
APIErrorCode["ConflictError"] = "conflict_error";
|
|
24
25
|
APIErrorCode["InternalServerError"] = "internal_server_error";
|
|
@@ -179,6 +180,7 @@ const httpResponseErrorCodes = {
|
|
|
179
180
|
[APIErrorCode.InvalidJSON]: true,
|
|
180
181
|
[APIErrorCode.InvalidRequestURL]: true,
|
|
181
182
|
[APIErrorCode.InvalidRequest]: true,
|
|
183
|
+
[APIErrorCode.InvalidBeta]: true,
|
|
182
184
|
[APIErrorCode.ValidationError]: true,
|
|
183
185
|
[APIErrorCode.ConflictError]: true,
|
|
184
186
|
[APIErrorCode.InternalServerError]: true,
|
|
@@ -230,6 +232,7 @@ const apiErrorCodes = {
|
|
|
230
232
|
[APIErrorCode.InvalidJSON]: true,
|
|
231
233
|
[APIErrorCode.InvalidRequestURL]: true,
|
|
232
234
|
[APIErrorCode.InvalidRequest]: true,
|
|
235
|
+
[APIErrorCode.InvalidBeta]: true,
|
|
233
236
|
[APIErrorCode.ValidationError]: true,
|
|
234
237
|
[APIErrorCode.ConflictError]: true,
|
|
235
238
|
[APIErrorCode.InternalServerError]: true,
|
package/build/src/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":";;;AAyEA,kDAI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AAQ;QACrC,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAC/B,CAAC;QACD,OAAM;IACR,CAAC;IAED,MAAM,eAAe,GAAG,MAAM,CAAC,iBAAiB,CAEnC,CAAA;IACb,MAAM,UAAU,GAAG,MAAM,CAAC,YAAY,CAAuB,CAAA;IAE7D,OAAO;QACL,GAAG,MAAM;QACT,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC;QACpB,OAAO,EAAE,MAAM,CAAC,SAAS,CAAC;QAC1B,eAAe;QACf,UAAU;KACX,CAAA;AACH,CAAC;AAED,SAAS,cAAc,CAAC,IAAa;IACnC,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,IAAI,aAAa,CAAA;AAC1D,CAAC","sourcesContent":["import { SupportedResponse } from \"./fetch-types\"\nimport { isObject } from \"./utils\"\nimport { Assert } from \"./type-utils\"\n\n/**\n * Error codes returned in responses from the API.\n */\nexport enum APIErrorCode {\n Unauthorized = \"unauthorized\",\n RestrictedResource = \"restricted_resource\",\n ObjectNotFound = \"object_not_found\",\n RateLimited = \"rate_limited\",\n InvalidJSON = \"invalid_json\",\n InvalidRequestURL = \"invalid_request_url\",\n InvalidRequest = \"invalid_request\",\n ValidationError = \"validation_error\",\n ConflictError = \"conflict_error\",\n InternalServerError = \"internal_server_error\",\n ServiceOverload = \"service_overload\",\n ServiceUnavailable = \"service_unavailable\",\n GatewayTimeout = \"gateway_timeout\",\n}\n\n/**\n * Error codes generated for client errors.\n */\nexport enum ClientErrorCode {\n RequestTimeout = \"notionhq_client_request_timeout\",\n ResponseError = \"notionhq_client_response_error\",\n InvalidPathParameter = \"notionhq_client_invalid_path_parameter\",\n}\n\n/**\n * Error codes on errors thrown by the `Client`.\n */\nexport type NotionErrorCode = APIErrorCode | ClientErrorCode\n\n/**\n * Base error type.\n */\nabstract class NotionClientErrorBase<\n Code extends NotionErrorCode,\n> extends Error {\n abstract code: Code\n}\n\n/**\n * Error type that encompasses all the kinds of errors that the Notion client will throw.\n */\nexport type NotionClientError =\n | RequestTimeoutError\n | UnknownHTTPResponseError\n | APIResponseError\n | InvalidPathParameterError\n\n// Assert that NotionClientError's `code` property is a narrow type.\n// This prevents us from accidentally regressing to `string`-typed name field.\ntype _assertCodeIsNarrow = Assert<NotionErrorCode, NotionClientError[\"code\"]>\n\n// Assert that the type of `name` in NotionErrorCode is a narrow type.\n// This prevents us from accidentally regressing to `string`-typed name field.\ntype _assertNameIsNarrow = Assert<\n | \"RequestTimeoutError\"\n | \"UnknownHTTPResponseError\"\n | \"APIResponseError\"\n | \"InvalidPathParameterError\",\n NotionClientError[\"name\"]\n>\n\n/**\n * @param error any value, usually a caught error.\n * @returns `true` if error is a `NotionClientError`.\n */\nexport function isNotionClientError(\n error: unknown\n): error is NotionClientError {\n return isObject(error) && error instanceof NotionClientErrorBase\n}\n\n/**\n * Narrows down the types of a NotionClientError.\n * @param error any value, usually a caught error.\n * @param codes an object mapping from possible error codes to `true`\n * @returns `true` if error is a `NotionClientError` with a code in `codes`.\n */\nfunction isNotionClientErrorWithCode<Code extends NotionErrorCode>(\n error: unknown,\n codes: { [C in Code]: true }\n): error is NotionClientError & { code: Code } {\n return isNotionClientError(error) && error.code in codes\n}\n\n/**\n * Error thrown by the client if a request times out.\n */\nexport class RequestTimeoutError extends NotionClientErrorBase<ClientErrorCode.RequestTimeout> {\n readonly code = ClientErrorCode.RequestTimeout\n readonly name = \"RequestTimeoutError\"\n\n constructor(message = \"Request to Notion API has timed out\") {\n super(message)\n }\n\n static isRequestTimeoutError(error: unknown): error is RequestTimeoutError {\n return isNotionClientErrorWithCode(error, {\n [ClientErrorCode.RequestTimeout]: true,\n })\n }\n\n static rejectAfterTimeout<T>(\n promise: Promise<T>,\n timeoutMS: number\n ): Promise<T> {\n return new Promise<T>((resolve, reject) => {\n const timeoutId = setTimeout(() => {\n reject(new RequestTimeoutError())\n }, timeoutMS)\n\n promise\n .then(resolve)\n .catch(reject)\n .then(() => clearTimeout(timeoutId))\n })\n }\n}\n\n/**\n * Error thrown when a path parameter contains invalid characters such as\n * path traversal sequences (..) that could alter the intended API endpoint.\n */\nexport class InvalidPathParameterError extends NotionClientErrorBase<ClientErrorCode.InvalidPathParameter> {\n readonly code = ClientErrorCode.InvalidPathParameter\n readonly name = \"InvalidPathParameterError\"\n\n constructor(\n message = \"Path parameter contains invalid characters that could alter the request path\"\n ) {\n super(message)\n }\n\n static isInvalidPathParameterError(\n error: unknown\n ): error is InvalidPathParameterError {\n return isNotionClientErrorWithCode(error, {\n [ClientErrorCode.InvalidPathParameter]: true,\n })\n }\n}\n\n/**\n * Validates that a request path does not contain path traversal sequences.\n * Throws InvalidPathParameterError if the path contains \"..\" segments,\n * including URL-encoded variants like %2e%2e.\n */\nexport function validateRequestPath(path: string): void {\n // Check for literal path traversal\n if (path.includes(\"..\")) {\n throw new InvalidPathParameterError(\n `Request path \"${path}\" contains path traversal sequence \"..\"`\n )\n }\n\n // Check for URL-encoded path traversal (%2e = '.')\n // Only decode if path contains potential encoded dots\n if (/%2e/i.test(path)) {\n let decoded: string\n try {\n decoded = decodeURIComponent(path)\n } catch {\n // Invalid percent encoding - not a traversal concern\n return\n }\n if (decoded.includes(\"..\")) {\n throw new InvalidPathParameterError(\n `Request path \"${path}\" contains encoded path traversal sequence`\n )\n }\n }\n}\n\n/**\n * Reads a header by name from a `SupportedResponse[\"headers\"]`, which is typed\n * as `unknown` because the SDK supports any `fetch` implementation. Handles\n * both a standard `Headers` object and a plain record. Header names are\n * case-insensitive per RFC 9110, so plain records are matched case-insensitively.\n */\nexport function getResponseHeader(\n headers: unknown,\n name: string\n): string | undefined {\n if (!isObject(headers)) {\n return undefined\n }\n\n const get = headers[\"get\"]\n if (typeof get === \"function\") {\n const value: unknown = get.call(headers, name)\n return typeof value === \"string\" ? value : undefined\n }\n\n const lowerName = name.toLowerCase()\n for (const [key, value] of Object.entries(headers)) {\n if (key.toLowerCase() !== lowerName) {\n continue\n }\n if (typeof value === \"string\") {\n return value\n }\n if (Array.isArray(value) && typeof value[0] === \"string\") {\n return value[0]\n }\n }\n return undefined\n}\n\ntype HTTPResponseErrorCode = ClientErrorCode.ResponseError | APIErrorCode\n\ntype AdditionalData = Record<string, string | string[]>\n\nclass HTTPResponseError<\n Code extends HTTPResponseErrorCode,\n> extends NotionClientErrorBase<Code> {\n readonly name: string = \"HTTPResponseError\"\n readonly code: Code\n readonly status: number\n readonly headers: SupportedResponse[\"headers\"]\n readonly body: string\n readonly additional_data: AdditionalData | undefined\n readonly request_id: string | undefined\n /**\n * Value of the `cf-ray` response header, when present.\n */\n readonly ray_id: string | undefined\n\n constructor(args: {\n code: Code\n status: number\n message: string\n headers: SupportedResponse[\"headers\"]\n rawBodyText: string\n additional_data: AdditionalData | undefined\n request_id: string | undefined\n }) {\n super(args.message)\n const { code, status, headers, rawBodyText, additional_data, request_id } =\n args\n this.code = code\n this.status = status\n this.headers = headers\n this.body = rawBodyText\n this.additional_data = additional_data\n this.request_id =\n request_id ?? getResponseHeader(headers, \"x-notion-request-id\")\n this.ray_id = getResponseHeader(headers, \"cf-ray\")\n }\n}\n\nconst httpResponseErrorCodes: { [C in HTTPResponseErrorCode]: true } = {\n [ClientErrorCode.ResponseError]: true,\n [APIErrorCode.Unauthorized]: true,\n [APIErrorCode.RestrictedResource]: true,\n [APIErrorCode.ObjectNotFound]: true,\n [APIErrorCode.RateLimited]: true,\n [APIErrorCode.InvalidJSON]: true,\n [APIErrorCode.InvalidRequestURL]: true,\n [APIErrorCode.InvalidRequest]: true,\n [APIErrorCode.ValidationError]: true,\n [APIErrorCode.ConflictError]: true,\n [APIErrorCode.InternalServerError]: true,\n [APIErrorCode.ServiceOverload]: true,\n [APIErrorCode.ServiceUnavailable]: true,\n [APIErrorCode.GatewayTimeout]: true,\n}\n\nexport function isHTTPResponseError(\n error: unknown\n): error is UnknownHTTPResponseError | APIResponseError {\n if (!isNotionClientErrorWithCode(error, httpResponseErrorCodes)) {\n return false\n }\n\n type _assert = Assert<\n UnknownHTTPResponseError | APIResponseError,\n typeof error\n >\n\n return true\n}\n\n/**\n * Error thrown if an API call responds with an unknown error code, or does not respond with\n * a property-formatted error.\n */\nexport class UnknownHTTPResponseError extends HTTPResponseError<ClientErrorCode.ResponseError> {\n readonly name = \"UnknownHTTPResponseError\"\n\n constructor(args: {\n status: number\n message: string | undefined\n headers: SupportedResponse[\"headers\"]\n rawBodyText: string\n }) {\n const ray_id = getResponseHeader(args.headers, \"cf-ray\")\n const request_id = getResponseHeader(args.headers, \"x-notion-request-id\")\n super({\n ...args,\n code: ClientErrorCode.ResponseError,\n message:\n args.message ??\n buildUnknownResponseMessage({\n status: args.status,\n contentType: getResponseHeader(args.headers, \"content-type\"),\n ray_id,\n request_id,\n }),\n additional_data: undefined,\n request_id,\n })\n }\n\n static isUnknownHTTPResponseError(\n error: unknown\n ): error is UnknownHTTPResponseError {\n return isNotionClientErrorWithCode(error, {\n [ClientErrorCode.ResponseError]: true,\n })\n }\n}\n\nconst apiErrorCodes: { [C in APIErrorCode]: true } = {\n [APIErrorCode.Unauthorized]: true,\n [APIErrorCode.RestrictedResource]: true,\n [APIErrorCode.ObjectNotFound]: true,\n [APIErrorCode.RateLimited]: true,\n [APIErrorCode.InvalidJSON]: true,\n [APIErrorCode.InvalidRequestURL]: true,\n [APIErrorCode.InvalidRequest]: true,\n [APIErrorCode.ValidationError]: true,\n [APIErrorCode.ConflictError]: true,\n [APIErrorCode.InternalServerError]: true,\n [APIErrorCode.ServiceOverload]: true,\n [APIErrorCode.ServiceUnavailable]: true,\n [APIErrorCode.GatewayTimeout]: true,\n}\n\n/**\n * A response from the API indicating a problem.\n * Use the `code` property to handle various kinds of errors. All its possible values are in `APIErrorCode`.\n */\nexport class APIResponseError extends HTTPResponseError<APIErrorCode> {\n readonly name = \"APIResponseError\"\n readonly request_id: string | undefined\n\n static isAPIResponseError(error: unknown): error is APIResponseError {\n return isNotionClientErrorWithCode(error, apiErrorCodes)\n }\n}\n\nexport function buildRequestError(\n response: SupportedResponse,\n bodyText: string\n): APIResponseError | UnknownHTTPResponseError {\n const apiErrorResponseBody = parseAPIErrorResponseBody(bodyText)\n if (apiErrorResponseBody !== undefined) {\n return new APIResponseError({\n code: apiErrorResponseBody.code,\n message: apiErrorResponseBody.message,\n headers: response.headers,\n status: response.status,\n rawBodyText: bodyText,\n additional_data: apiErrorResponseBody.additional_data,\n request_id: apiErrorResponseBody.request_id,\n })\n }\n return new UnknownHTTPResponseError({\n message: undefined,\n headers: response.headers,\n status: response.status,\n rawBodyText: bodyText,\n })\n}\n\n/**\n * Builds the default message for an unrecognized HTTP response.\n *\n * A response with a Cloudflare Ray ID but no Notion request ID was answered\n * before it reached the API. The message surfaces the Ray ID rather than\n * leaving callers to infer it from an HTML body.\n */\nfunction buildUnknownResponseMessage(args: {\n status: number\n contentType: string | undefined\n ray_id: string | undefined\n request_id: string | undefined\n}): string {\n const { status, contentType, ray_id, request_id } = args\n const base = `Request to Notion API failed with status: ${status}`\n if (ray_id === undefined || request_id !== undefined) {\n return base\n }\n const contentTypeNote =\n contentType !== undefined ? ` (content-type: ${contentType})` : \"\"\n const blockedRequestNote =\n status === 403\n ? \" This may mean the request was blocked by a network security rule.\"\n : \"\"\n return (\n `${base}. The response was returned by Notion's edge proxy before reaching ` +\n `the Notion API${contentTypeNote}.${blockedRequestNote} Cloudflare Ray ID: ` +\n `${ray_id}. Include this ID when contacting Notion support.`\n )\n}\n\nfunction parseAPIErrorResponseBody(body: string):\n | {\n code: APIErrorCode\n message: string\n additional_data: AdditionalData | undefined\n request_id: string | undefined\n }\n | undefined {\n if (typeof body !== \"string\") {\n return\n }\n\n let parsed: unknown\n try {\n parsed = JSON.parse(body)\n } catch (parseError) {\n return\n }\n\n if (\n !isObject(parsed) ||\n typeof parsed[\"message\"] !== \"string\" ||\n !isAPIErrorCode(parsed[\"code\"])\n ) {\n return\n }\n\n const additional_data = parsed[\"additional_data\"] as\n | AdditionalData\n | undefined\n const request_id = parsed[\"request_id\"] as string | undefined\n\n return {\n ...parsed,\n code: parsed[\"code\"],\n message: parsed[\"message\"],\n additional_data,\n request_id,\n }\n}\n\nfunction isAPIErrorCode(code: unknown): code is APIErrorCode {\n return typeof code === \"string\" && code in apiErrorCodes\n}\n"]}
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":";;;AA0EA,kDAIC;AA6ED,kDAwBC;AAQD,8CA2BC;AA8DD,kDAaC;AAwED,8CAsBC;AA9XD,mCAAkC;AAGlC;;GAEG;AACH,IAAY,YAeX;AAfD,WAAY,YAAY;IACtB,6CAA6B,CAAA;IAC7B,0DAA0C,CAAA;IAC1C,mDAAmC,CAAA;IACnC,4CAA4B,CAAA;IAC5B,4CAA4B,CAAA;IAC5B,yDAAyC,CAAA;IACzC,kDAAkC,CAAA;IAClC,4CAA4B,CAAA;IAC5B,oDAAoC,CAAA;IACpC,gDAAgC,CAAA;IAChC,6DAA6C,CAAA;IAC7C,oDAAoC,CAAA;IACpC,0DAA0C,CAAA;IAC1C,kDAAkC,CAAA;AACpC,CAAC,EAfW,YAAY,4BAAZ,YAAY,QAevB;AAED;;GAEG;AACH,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,qEAAkD,CAAA;IAClD,mEAAgD,CAAA;IAChD,kFAA+D,CAAA;AACjE,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B;AAOD;;GAEG;AACH,MAAe,qBAEb,SAAQ,KAAK;CAEd;AAyBD;;;GAGG;AACH,SAAgB,mBAAmB,CACjC,KAAc;IAEd,OAAO,IAAA,gBAAQ,EAAC,KAAK,CAAC,IAAI,KAAK,YAAY,qBAAqB,CAAA;AAClE,CAAC;AAED;;;;;GAKG;AACH,SAAS,2BAA2B,CAClC,KAAc,EACd,KAA4B;IAE5B,OAAO,mBAAmB,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAA;AAC1D,CAAC;AAED;;GAEG;AACH,MAAa,mBAAoB,SAAQ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AAyB,CAAC,IAAY;IAQ7C,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,OAAM;IACR,CAAC;IAED,IAAI,MAAe,CAAA;IACnB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAC3B,CAAC;IAAC,OAAO,UAAU,EAAE,CAAC;QACpB,OAAM;IACR,CAAC;IAED,IACE,CAAC,IAAA,gBAAQ,EAAC,MAAM,CAAC;QACjB,OAAO,MAAM,CAAC,SAAS,CAAC,KAAK,QAAQ;QACrC,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAC/B,CAAC;QACD,OAAM;IACR,CAAC;IAED,MAAM,eAAe,GAAG,MAAM,CAAC,iBAAiB,CAEnC,CAAA;IACb,MAAM,UAAU,GAAG,MAAM,CAAC,YAAY,CAAuB,CAAA;IAE7D,OAAO;QACL,GAAG,MAAM;QACT,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC;QACpB,OAAO,EAAE,MAAM,CAAC,SAAS,CAAC;QAC1B,eAAe;QACf,UAAU;KACX,CAAA;AACH,CAAC;AAED,SAAS,cAAc,CAAC,IAAa;IACnC,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,IAAI,aAAa,CAAA;AAC1D,CAAC","sourcesContent":["import { SupportedResponse } from \"./fetch-types\"\nimport { isObject } from \"./utils\"\nimport { Assert } from \"./type-utils\"\n\n/**\n * Error codes returned in responses from the API.\n */\nexport enum APIErrorCode {\n Unauthorized = \"unauthorized\",\n RestrictedResource = \"restricted_resource\",\n ObjectNotFound = \"object_not_found\",\n RateLimited = \"rate_limited\",\n InvalidJSON = \"invalid_json\",\n InvalidRequestURL = \"invalid_request_url\",\n InvalidRequest = \"invalid_request\",\n InvalidBeta = \"invalid_beta\",\n ValidationError = \"validation_error\",\n ConflictError = \"conflict_error\",\n InternalServerError = \"internal_server_error\",\n ServiceOverload = \"service_overload\",\n ServiceUnavailable = \"service_unavailable\",\n GatewayTimeout = \"gateway_timeout\",\n}\n\n/**\n * Error codes generated for client errors.\n */\nexport enum ClientErrorCode {\n RequestTimeout = \"notionhq_client_request_timeout\",\n ResponseError = \"notionhq_client_response_error\",\n InvalidPathParameter = \"notionhq_client_invalid_path_parameter\",\n}\n\n/**\n * Error codes on errors thrown by the `Client`.\n */\nexport type NotionErrorCode = APIErrorCode | ClientErrorCode\n\n/**\n * Base error type.\n */\nabstract class NotionClientErrorBase<\n Code extends NotionErrorCode,\n> extends Error {\n abstract code: Code\n}\n\n/**\n * Error type that encompasses all the kinds of errors that the Notion client will throw.\n */\nexport type NotionClientError =\n | RequestTimeoutError\n | UnknownHTTPResponseError\n | APIResponseError\n | InvalidPathParameterError\n\n// Assert that NotionClientError's `code` property is a narrow type.\n// This prevents us from accidentally regressing to `string`-typed name field.\ntype _assertCodeIsNarrow = Assert<NotionErrorCode, NotionClientError[\"code\"]>\n\n// Assert that the type of `name` in NotionErrorCode is a narrow type.\n// This prevents us from accidentally regressing to `string`-typed name field.\ntype _assertNameIsNarrow = Assert<\n | \"RequestTimeoutError\"\n | \"UnknownHTTPResponseError\"\n | \"APIResponseError\"\n | \"InvalidPathParameterError\",\n NotionClientError[\"name\"]\n>\n\n/**\n * @param error any value, usually a caught error.\n * @returns `true` if error is a `NotionClientError`.\n */\nexport function isNotionClientError(\n error: unknown\n): error is NotionClientError {\n return isObject(error) && error instanceof NotionClientErrorBase\n}\n\n/**\n * Narrows down the types of a NotionClientError.\n * @param error any value, usually a caught error.\n * @param codes an object mapping from possible error codes to `true`\n * @returns `true` if error is a `NotionClientError` with a code in `codes`.\n */\nfunction isNotionClientErrorWithCode<Code extends NotionErrorCode>(\n error: unknown,\n codes: { [C in Code]: true }\n): error is NotionClientError & { code: Code } {\n return isNotionClientError(error) && error.code in codes\n}\n\n/**\n * Error thrown by the client if a request times out.\n */\nexport class RequestTimeoutError extends NotionClientErrorBase<ClientErrorCode.RequestTimeout> {\n readonly code = ClientErrorCode.RequestTimeout\n readonly name = \"RequestTimeoutError\"\n\n constructor(message = \"Request to Notion API has timed out\") {\n super(message)\n }\n\n static isRequestTimeoutError(error: unknown): error is RequestTimeoutError {\n return isNotionClientErrorWithCode(error, {\n [ClientErrorCode.RequestTimeout]: true,\n })\n }\n\n static rejectAfterTimeout<T>(\n promise: Promise<T>,\n timeoutMS: number\n ): Promise<T> {\n return new Promise<T>((resolve, reject) => {\n const timeoutId = setTimeout(() => {\n reject(new RequestTimeoutError())\n }, timeoutMS)\n\n promise\n .then(resolve)\n .catch(reject)\n .then(() => clearTimeout(timeoutId))\n })\n }\n}\n\n/**\n * Error thrown when a path parameter contains invalid characters such as\n * path traversal sequences (..) that could alter the intended API endpoint.\n */\nexport class InvalidPathParameterError extends NotionClientErrorBase<ClientErrorCode.InvalidPathParameter> {\n readonly code = ClientErrorCode.InvalidPathParameter\n readonly name = \"InvalidPathParameterError\"\n\n constructor(\n message = \"Path parameter contains invalid characters that could alter the request path\"\n ) {\n super(message)\n }\n\n static isInvalidPathParameterError(\n error: unknown\n ): error is InvalidPathParameterError {\n return isNotionClientErrorWithCode(error, {\n [ClientErrorCode.InvalidPathParameter]: true,\n })\n }\n}\n\n/**\n * Validates that a request path does not contain path traversal sequences.\n * Throws InvalidPathParameterError if the path contains \"..\" segments,\n * including URL-encoded variants like %2e%2e.\n */\nexport function validateRequestPath(path: string): void {\n // Check for literal path traversal\n if (path.includes(\"..\")) {\n throw new InvalidPathParameterError(\n `Request path \"${path}\" contains path traversal sequence \"..\"`\n )\n }\n\n // Check for URL-encoded path traversal (%2e = '.')\n // Only decode if path contains potential encoded dots\n if (/%2e/i.test(path)) {\n let decoded: string\n try {\n decoded = decodeURIComponent(path)\n } catch {\n // Invalid percent encoding - not a traversal concern\n return\n }\n if (decoded.includes(\"..\")) {\n throw new InvalidPathParameterError(\n `Request path \"${path}\" contains encoded path traversal sequence`\n )\n }\n }\n}\n\n/**\n * Reads a header by name from a `SupportedResponse[\"headers\"]`, which is typed\n * as `unknown` because the SDK supports any `fetch` implementation. Handles\n * both a standard `Headers` object and a plain record. Header names are\n * case-insensitive per RFC 9110, so plain records are matched case-insensitively.\n */\nexport function getResponseHeader(\n headers: unknown,\n name: string\n): string | undefined {\n if (!isObject(headers)) {\n return undefined\n }\n\n const get = headers[\"get\"]\n if (typeof get === \"function\") {\n const value: unknown = get.call(headers, name)\n return typeof value === \"string\" ? value : undefined\n }\n\n const lowerName = name.toLowerCase()\n for (const [key, value] of Object.entries(headers)) {\n if (key.toLowerCase() !== lowerName) {\n continue\n }\n if (typeof value === \"string\") {\n return value\n }\n if (Array.isArray(value) && typeof value[0] === \"string\") {\n return value[0]\n }\n }\n return undefined\n}\n\ntype HTTPResponseErrorCode = ClientErrorCode.ResponseError | APIErrorCode\n\ntype AdditionalData = Record<string, string | string[]>\n\nclass HTTPResponseError<\n Code extends HTTPResponseErrorCode,\n> extends NotionClientErrorBase<Code> {\n readonly name: string = \"HTTPResponseError\"\n readonly code: Code\n readonly status: number\n readonly headers: SupportedResponse[\"headers\"]\n readonly body: string\n readonly additional_data: AdditionalData | undefined\n readonly request_id: string | undefined\n /**\n * Value of the `cf-ray` response header, when present.\n */\n readonly ray_id: string | undefined\n\n constructor(args: {\n code: Code\n status: number\n message: string\n headers: SupportedResponse[\"headers\"]\n rawBodyText: string\n additional_data: AdditionalData | undefined\n request_id: string | undefined\n }) {\n super(args.message)\n const { code, status, headers, rawBodyText, additional_data, request_id } =\n args\n this.code = code\n this.status = status\n this.headers = headers\n this.body = rawBodyText\n this.additional_data = additional_data\n this.request_id =\n request_id ?? getResponseHeader(headers, \"x-notion-request-id\")\n this.ray_id = getResponseHeader(headers, \"cf-ray\")\n }\n}\n\nconst httpResponseErrorCodes: { [C in HTTPResponseErrorCode]: true } = {\n [ClientErrorCode.ResponseError]: true,\n [APIErrorCode.Unauthorized]: true,\n [APIErrorCode.RestrictedResource]: true,\n [APIErrorCode.ObjectNotFound]: true,\n [APIErrorCode.RateLimited]: true,\n [APIErrorCode.InvalidJSON]: true,\n [APIErrorCode.InvalidRequestURL]: true,\n [APIErrorCode.InvalidRequest]: true,\n [APIErrorCode.InvalidBeta]: true,\n [APIErrorCode.ValidationError]: true,\n [APIErrorCode.ConflictError]: true,\n [APIErrorCode.InternalServerError]: true,\n [APIErrorCode.ServiceOverload]: true,\n [APIErrorCode.ServiceUnavailable]: true,\n [APIErrorCode.GatewayTimeout]: true,\n}\n\nexport function isHTTPResponseError(\n error: unknown\n): error is UnknownHTTPResponseError | APIResponseError {\n if (!isNotionClientErrorWithCode(error, httpResponseErrorCodes)) {\n return false\n }\n\n type _assert = Assert<\n UnknownHTTPResponseError | APIResponseError,\n typeof error\n >\n\n return true\n}\n\n/**\n * Error thrown if an API call responds with an unknown error code, or does not respond with\n * a property-formatted error.\n */\nexport class UnknownHTTPResponseError extends HTTPResponseError<ClientErrorCode.ResponseError> {\n readonly name = \"UnknownHTTPResponseError\"\n\n constructor(args: {\n status: number\n message: string | undefined\n headers: SupportedResponse[\"headers\"]\n rawBodyText: string\n }) {\n const ray_id = getResponseHeader(args.headers, \"cf-ray\")\n const request_id = getResponseHeader(args.headers, \"x-notion-request-id\")\n super({\n ...args,\n code: ClientErrorCode.ResponseError,\n message:\n args.message ??\n buildUnknownResponseMessage({\n status: args.status,\n contentType: getResponseHeader(args.headers, \"content-type\"),\n ray_id,\n request_id,\n }),\n additional_data: undefined,\n request_id,\n })\n }\n\n static isUnknownHTTPResponseError(\n error: unknown\n ): error is UnknownHTTPResponseError {\n return isNotionClientErrorWithCode(error, {\n [ClientErrorCode.ResponseError]: true,\n })\n }\n}\n\nconst apiErrorCodes: { [C in APIErrorCode]: true } = {\n [APIErrorCode.Unauthorized]: true,\n [APIErrorCode.RestrictedResource]: true,\n [APIErrorCode.ObjectNotFound]: true,\n [APIErrorCode.RateLimited]: true,\n [APIErrorCode.InvalidJSON]: true,\n [APIErrorCode.InvalidRequestURL]: true,\n [APIErrorCode.InvalidRequest]: true,\n [APIErrorCode.InvalidBeta]: true,\n [APIErrorCode.ValidationError]: true,\n [APIErrorCode.ConflictError]: true,\n [APIErrorCode.InternalServerError]: true,\n [APIErrorCode.ServiceOverload]: true,\n [APIErrorCode.ServiceUnavailable]: true,\n [APIErrorCode.GatewayTimeout]: true,\n}\n\n/**\n * A response from the API indicating a problem.\n * Use the `code` property to handle various kinds of errors. All its possible values are in `APIErrorCode`.\n */\nexport class APIResponseError extends HTTPResponseError<APIErrorCode> {\n readonly name = \"APIResponseError\"\n readonly request_id: string | undefined\n\n static isAPIResponseError(error: unknown): error is APIResponseError {\n return isNotionClientErrorWithCode(error, apiErrorCodes)\n }\n}\n\nexport function buildRequestError(\n response: SupportedResponse,\n bodyText: string\n): APIResponseError | UnknownHTTPResponseError {\n const apiErrorResponseBody = parseAPIErrorResponseBody(bodyText)\n if (apiErrorResponseBody !== undefined) {\n return new APIResponseError({\n code: apiErrorResponseBody.code,\n message: apiErrorResponseBody.message,\n headers: response.headers,\n status: response.status,\n rawBodyText: bodyText,\n additional_data: apiErrorResponseBody.additional_data,\n request_id: apiErrorResponseBody.request_id,\n })\n }\n return new UnknownHTTPResponseError({\n message: undefined,\n headers: response.headers,\n status: response.status,\n rawBodyText: bodyText,\n })\n}\n\n/**\n * Builds the default message for an unrecognized HTTP response.\n *\n * A response with a Cloudflare Ray ID but no Notion request ID was answered\n * before it reached the API. The message surfaces the Ray ID rather than\n * leaving callers to infer it from an HTML body.\n */\nfunction buildUnknownResponseMessage(args: {\n status: number\n contentType: string | undefined\n ray_id: string | undefined\n request_id: string | undefined\n}): string {\n const { status, contentType, ray_id, request_id } = args\n const base = `Request to Notion API failed with status: ${status}`\n if (ray_id === undefined || request_id !== undefined) {\n return base\n }\n const contentTypeNote =\n contentType !== undefined ? ` (content-type: ${contentType})` : \"\"\n const blockedRequestNote =\n status === 403\n ? \" This may mean the request was blocked by a network security rule.\"\n : \"\"\n return (\n `${base}. The response was returned by Notion's edge proxy before reaching ` +\n `the Notion API${contentTypeNote}.${blockedRequestNote} Cloudflare Ray ID: ` +\n `${ray_id}. Include this ID when contacting Notion support.`\n )\n}\n\nfunction parseAPIErrorResponseBody(body: string):\n | {\n code: APIErrorCode\n message: string\n additional_data: AdditionalData | undefined\n request_id: string | undefined\n }\n | undefined {\n if (typeof body !== \"string\") {\n return\n }\n\n let parsed: unknown\n try {\n parsed = JSON.parse(body)\n } catch (parseError) {\n return\n }\n\n if (\n !isObject(parsed) ||\n typeof parsed[\"message\"] !== \"string\" ||\n !isAPIErrorCode(parsed[\"code\"])\n ) {\n return\n }\n\n const additional_data = parsed[\"additional_data\"] as\n | AdditionalData\n | undefined\n const request_id = parsed[\"request_id\"] as string | undefined\n\n return {\n ...parsed,\n code: parsed[\"code\"],\n message: parsed[\"message\"],\n additional_data,\n request_id,\n }\n}\n\nfunction isAPIErrorCode(code: unknown): code is APIErrorCode {\n return typeof code === \"string\" && code in apiErrorCodes\n}\n"]}
|