@notionhq/client 5.24.0 → 5.25.1

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notionhq/client",
3
- "version": "5.24.0",
3
+ "version": "5.25.1",
4
4
  "description": "A simple and easy to use client for the Notion API",
5
5
  "engines": {
6
6
  "node": ">=18"
@@ -37,101 +37,39 @@ export type GetAsyncTaskResponse = {
37
37
  status: "failed";
38
38
  error: {
39
39
  object: "error";
40
- status: 400;
41
- code: "invalid_json";
42
- message: string;
43
- additional_data?: Record<string, string | Array<string>>;
44
- } | {
45
- object: "error";
46
- status: 400;
47
- code: "invalid_request_url";
48
40
  message: string;
49
41
  additional_data?: Record<string, string | Array<string>>;
50
- } | {
51
- object: "error";
42
+ } & ({
52
43
  status: 400;
53
- code: "invalid_request";
54
- message: string;
55
- additional_data?: Record<string, string | Array<string>>;
56
- } | {
57
- object: "error";
58
- status: 400;
59
- code: "missing_version";
60
- message: string;
61
- additional_data?: Record<string, string | Array<string>>;
44
+ code: "invalid_json" | "invalid_request_url" | "invalid_request" | "missing_version" | "invalid_beta" | "validation_error";
62
45
  } | {
63
- object: "error";
64
- status: 400;
65
- code: "invalid_beta";
66
- message: string;
67
- additional_data?: Record<string, string | Array<string>>;
68
- } | {
69
- object: "error";
70
- status: 400;
71
- code: "validation_error";
72
- message: string;
73
- additional_data?: Record<string, string | Array<string>>;
74
- } | {
75
- object: "error";
76
46
  status: 401;
77
47
  code: "unauthorized";
78
- message: string;
79
- additional_data?: Record<string, string | Array<string>>;
80
48
  } | {
81
- object: "error";
82
49
  status: 403;
83
50
  code: "restricted_resource";
84
- message: string;
85
- additional_data?: Record<string, string | Array<string>>;
86
51
  } | {
87
- object: "error";
88
52
  status: 404;
89
53
  code: "object_not_found";
90
- message: string;
91
- additional_data?: Record<string, string | Array<string>>;
92
54
  } | {
93
- object: "error";
94
55
  status: 429;
95
56
  code: "rate_limited";
96
- message: string;
97
- additional_data?: Record<string, string | Array<string>>;
98
57
  } | {
99
- object: "error";
100
58
  status: 529;
101
59
  code: "service_overload";
102
- message: string;
103
- additional_data?: Record<string, string | Array<string>>;
104
60
  } | {
105
- object: "error";
106
61
  status: 500;
107
62
  code: "internal_server_error";
108
- message: string;
109
- additional_data?: Record<string, string | Array<string>>;
110
63
  } | {
111
- object: "error";
112
64
  status: 503;
113
65
  code: "service_unavailable";
114
- message: string;
115
- additional_data?: Record<string, string | Array<string>>;
116
66
  } | {
117
- object: "error";
118
67
  status: 504;
119
68
  code: "gateway_timeout";
120
- message: string;
121
- additional_data?: Record<string, string | Array<string>>;
122
- } | {
123
- object: "error";
124
- status: 409;
125
- code: "conflict_error";
126
- message: string;
127
- additional_data?: Record<string, string | Array<string>>;
128
69
  } | {
129
- object: "error";
130
70
  status: 409;
131
- code: "row_limit_exceeded";
132
- message: string;
133
- additional_data?: Record<string, string | Array<string>>;
134
- };
71
+ code: "conflict_error" | "row_limit_exceeded";
72
+ });
135
73
  };
136
74
  /**
137
75
  * Retrieve an async task
@@ -1 +1 @@
1
- {"version":3,"file":"async-tasks.d.ts","sourceRoot":"","sources":["../../../src/api-endpoints/async-tasks.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,UAAU,CAAA;AAEvE,KAAK,0BAA0B,GAAG;IAEhC,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,0BAA0B,CAAA;AAE/D,MAAM,MAAM,oBAAoB,GAC5B;IACE,MAAM,EAAE,YAAY,CAAA;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE;QAAE,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IACpD,MAAM,EAAE,QAAQ,GAAG,SAAS,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AM,EAAE,GAAG,CAAC;QAAC,IAAI,EAAE,kBAAkB,CAAA;KAAE,GACzC;QAAE,MAAM,EAAE,GAAG,CAAC;QAAC,IAAI,EAAE,uBAAuB,CAAA;KAAE,GAC9C;QAAE,MAAM,EAAE,GAAG,CAAC;QAAC,IAAI,EAAE,qBAAqB,CAAA;KAAE,GAC5C;QAAE,MAAM,EAAE,GAAG,CAAC;QAAC,IAAI,EAAE,iBAAiB,CAAA;KAAE,GACxC;QAAE,MAAM,EAAE,GAAG,CAAC;QAAC,IAAI,EAAE,gBAAgB,GAAG,oBAAoB,CAAA;KAAE,CACjE,CAAA;CACF,CAAA;AAEL;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;uBAMb,0BAA0B,KAAG,MAAM;CACrC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"async-tasks.js","sourceRoot":"","sources":["../../../src/api-endpoints/async-tasks.ts"],"names":[],"mappings":";AAAA,sBAAsB;AACtB,+CAA+C;;;AAwJ/C;;GAEG;AACU,QAAA,YAAY,GAAG;IAC1B,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,CAAC,SAAS,CAAC;IACvB,WAAW,EAAE,EAAE;IACf,UAAU,EAAE,EAAE;IAEd,IAAI,EAAE,CAAC,CAA6B,EAAU,EAAE,CAAC,eAAe,CAAC,CAAC,OAAO,EAAE;CACnE,CAAA","sourcesContent":["// cspell:disable-file\n// Note: This is a generated file. DO NOT EDIT!\n\nimport type { PublicApiAsyncTaskStatusResultJsonValue } from \"./common\"\n\ntype GetAsyncTaskPathParameters = {\n // The ID of the async task to retrieve.\n task_id: string\n}\n\nexport type GetAsyncTaskParameters = GetAsyncTaskPathParameters\n\nexport type GetAsyncTaskResponse =\n | {\n object: \"async_task\"\n id: string\n status_url: string\n created_time: string\n operation: { surface: \"rest\" | \"mcp\"; name: string }\n status: \"queued\" | \"running\" | \"retrying\"\n poll_after_seconds: number\n }\n | {\n object: \"async_task\"\n id: string\n status_url: string\n created_time: string\n operation: { surface: \"rest\" | \"mcp\"; name: string }\n status: \"succeeded\"\n result: Record<string, PublicApiAsyncTaskStatusResultJsonValue>\n }\n | {\n object: \"async_task\"\n id: string\n status_url: string\n created_time: string\n operation: { surface: \"rest\" | \"mcp\"; name: string }\n status: \"failed\"\n error:\n | {\n object: \"error\"\n status: 400\n code: \"invalid_json\"\n message: string\n additional_data?: Record<string, string | Array<string>>\n }\n | {\n object: \"error\"\n status: 400\n code: \"invalid_request_url\"\n message: string\n additional_data?: Record<string, string | Array<string>>\n }\n | {\n object: \"error\"\n status: 400\n code: \"invalid_request\"\n message: string\n additional_data?: Record<string, string | Array<string>>\n }\n | {\n object: \"error\"\n status: 400\n code: \"missing_version\"\n message: string\n additional_data?: Record<string, string | Array<string>>\n }\n | {\n object: \"error\"\n status: 400\n code: \"invalid_beta\"\n message: string\n additional_data?: Record<string, string | Array<string>>\n }\n | {\n object: \"error\"\n status: 400\n code: \"validation_error\"\n message: string\n additional_data?: Record<string, string | Array<string>>\n }\n | {\n object: \"error\"\n status: 401\n code: \"unauthorized\"\n message: string\n additional_data?: Record<string, string | Array<string>>\n }\n | {\n object: \"error\"\n status: 403\n code: \"restricted_resource\"\n message: string\n additional_data?: Record<string, string | Array<string>>\n }\n | {\n object: \"error\"\n status: 404\n code: \"object_not_found\"\n message: string\n additional_data?: Record<string, string | Array<string>>\n }\n | {\n object: \"error\"\n status: 429\n code: \"rate_limited\"\n message: string\n additional_data?: Record<string, string | Array<string>>\n }\n | {\n object: \"error\"\n status: 529\n code: \"service_overload\"\n message: string\n additional_data?: Record<string, string | Array<string>>\n }\n | {\n object: \"error\"\n status: 500\n code: \"internal_server_error\"\n message: string\n additional_data?: Record<string, string | Array<string>>\n }\n | {\n object: \"error\"\n status: 503\n code: \"service_unavailable\"\n message: string\n additional_data?: Record<string, string | Array<string>>\n }\n | {\n object: \"error\"\n status: 504\n code: \"gateway_timeout\"\n message: string\n additional_data?: Record<string, string | Array<string>>\n }\n | {\n object: \"error\"\n status: 409\n code: \"conflict_error\"\n message: string\n additional_data?: Record<string, string | Array<string>>\n }\n | {\n object: \"error\"\n status: 409\n code: \"row_limit_exceeded\"\n message: string\n additional_data?: Record<string, string | Array<string>>\n }\n }\n\n/**\n * Retrieve an async task\n */\nexport const getAsyncTask = {\n method: \"get\",\n pathParams: [\"task_id\"],\n queryParams: [],\n bodyParams: [],\n\n path: (p: GetAsyncTaskPathParameters): string => `async_tasks/${p.task_id}`,\n} as const\n"]}
1
+ {"version":3,"file":"async-tasks.js","sourceRoot":"","sources":["../../../src/api-endpoints/async-tasks.ts"],"names":[],"mappings":";AAAA,sBAAsB;AACtB,+CAA+C;;;AAgE/C;;GAEG;AACU,QAAA,YAAY,GAAG;IAC1B,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,CAAC,SAAS,CAAC;IACvB,WAAW,EAAE,EAAE;IACf,UAAU,EAAE,EAAE;IAEd,IAAI,EAAE,CAAC,CAA6B,EAAU,EAAE,CAAC,eAAe,CAAC,CAAC,OAAO,EAAE;CACnE,CAAA","sourcesContent":["// cspell:disable-file\n// Note: This is a generated file. DO NOT EDIT!\n\nimport type { PublicApiAsyncTaskStatusResultJsonValue } from \"./common\"\n\ntype GetAsyncTaskPathParameters = {\n // The ID of the async task to retrieve.\n task_id: string\n}\n\nexport type GetAsyncTaskParameters = GetAsyncTaskPathParameters\n\nexport type GetAsyncTaskResponse =\n | {\n object: \"async_task\"\n id: string\n status_url: string\n created_time: string\n operation: { surface: \"rest\" | \"mcp\"; name: string }\n status: \"queued\" | \"running\" | \"retrying\"\n poll_after_seconds: number\n }\n | {\n object: \"async_task\"\n id: string\n status_url: string\n created_time: string\n operation: { surface: \"rest\" | \"mcp\"; name: string }\n status: \"succeeded\"\n result: Record<string, PublicApiAsyncTaskStatusResultJsonValue>\n }\n | {\n object: \"async_task\"\n id: string\n status_url: string\n created_time: string\n operation: { surface: \"rest\" | \"mcp\"; name: string }\n status: \"failed\"\n error: {\n object: \"error\"\n message: string\n additional_data?: Record<string, string | Array<string>>\n } & (\n | {\n status: 400\n code:\n | \"invalid_json\"\n | \"invalid_request_url\"\n | \"invalid_request\"\n | \"missing_version\"\n | \"invalid_beta\"\n | \"validation_error\"\n }\n | { status: 401; code: \"unauthorized\" }\n | { status: 403; code: \"restricted_resource\" }\n | { status: 404; code: \"object_not_found\" }\n | { status: 429; code: \"rate_limited\" }\n | { status: 529; code: \"service_overload\" }\n | { status: 500; code: \"internal_server_error\" }\n | { status: 503; code: \"service_unavailable\" }\n | { status: 504; code: \"gateway_timeout\" }\n | { status: 409; code: \"conflict_error\" | \"row_limit_exceeded\" }\n )\n }\n\n/**\n * Retrieve an async task\n */\nexport const getAsyncTask = {\n method: \"get\",\n pathParams: [\"task_id\"],\n queryParams: [],\n bodyParams: [],\n\n path: (p: GetAsyncTaskPathParameters): string => `async_tasks/${p.task_id}`,\n} as const\n"]}
@@ -256,6 +256,9 @@ export type VerificationPropertyItemObjectResponse = {
256
256
  object: "property_item";
257
257
  id: string;
258
258
  };
259
+ type CreatePageQueryParameters = {
260
+ filter_properties?: Array<string>;
261
+ };
259
262
  type CreatePageBodyParameters = {
260
263
  parent?: {
261
264
  page_id: IdRequest;
@@ -379,7 +382,7 @@ type CreatePageBodyParameters = {
379
382
  };
380
383
  position?: PagePositionSchema;
381
384
  };
382
- export type CreatePageParameters = CreatePageBodyParameters;
385
+ export type CreatePageParameters = CreatePageQueryParameters & CreatePageBodyParameters;
383
386
  export type CreatePageResponse = PageObjectResponse | PartialPageObjectResponse;
384
387
  /**
385
388
  * Create a page
@@ -387,7 +390,7 @@ export type CreatePageResponse = PageObjectResponse | PartialPageObjectResponse;
387
390
  export declare const createPage: {
388
391
  readonly method: "post";
389
392
  readonly pathParams: readonly [];
390
- readonly queryParams: readonly [];
393
+ readonly queryParams: readonly ["filter_properties"];
391
394
  readonly bodyParams: readonly ["parent", "properties", "icon", "cover", "content", "children", "markdown", "allow_async", "template", "position"];
392
395
  readonly path: () => string;
393
396
  };
@@ -412,6 +415,9 @@ export declare const getPage: {
412
415
  type UpdatePagePathParameters = {
413
416
  page_id: IdRequest;
414
417
  };
418
+ type UpdatePageQueryParameters = {
419
+ filter_properties?: Array<string>;
420
+ };
415
421
  type UpdatePageBodyParameters = {
416
422
  properties?: Record<string, {
417
423
  title: Array<RichTextItemRequest>;
@@ -521,7 +527,7 @@ type UpdatePageBodyParameters = {
521
527
  archived?: boolean;
522
528
  is_archived?: boolean;
523
529
  };
524
- export type UpdatePageParameters = UpdatePagePathParameters & UpdatePageBodyParameters;
530
+ export type UpdatePageParameters = UpdatePagePathParameters & UpdatePageQueryParameters & UpdatePageBodyParameters;
525
531
  export type UpdatePageResponse = PageObjectResponse | PartialPageObjectResponse;
526
532
  /**
527
533
  * Update page
@@ -529,7 +535,7 @@ export type UpdatePageResponse = PageObjectResponse | PartialPageObjectResponse;
529
535
  export declare const updatePage: {
530
536
  readonly method: "patch";
531
537
  readonly pathParams: readonly ["page_id"];
532
- readonly queryParams: readonly [];
538
+ readonly queryParams: readonly ["filter_properties"];
533
539
  readonly bodyParams: readonly ["archived", "properties", "icon", "cover", "is_locked", "template", "erase_content", "in_trash", "is_archived"];
534
540
  readonly path: (p: UpdatePagePathParameters) => string;
535
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,MAA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B,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;;;AA6b/C;;GAEG;AACU,QAAA,UAAU,GAAG;IACxB,MAAM,EAAE,MAAM;IACd,UAAU,EAAE,EAAE;IACd,WAAW,EAAE,EAAE;IACf,UAAU,EAAE;QACV,QAAQ;QACR,YAAY;QACZ,MAAM;QACN,OAAO;QACP,SAAS;QACT,UAAU;QACV,UAAU;QACV,aAAa;QACb,UAAU;QACV,UAAU;KACX;IAED,IAAI,EAAE,GAAW,EAAE,CAAC,OAAO;CACnB,CAAA;AAiBV;;GAEG;AACU,QAAA,OAAO,GAAG;IACrB,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,CAAC,SAAS,CAAC;IACvB,WAAW,EAAE,CAAC,mBAAmB,CAAC;IAClC,UAAU,EAAE,EAAE;IAEd,IAAI,EAAE,CAAC,CAAwB,EAAU,EAAE,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE;CACxD,CAAA;AA6HV;;GAEG;AACU,QAAA,UAAU,GAAG;IACxB,MAAM,EAAE,OAAO;IACf,UAAU,EAAE,CAAC,SAAS,CAAC;IACvB,WAAW,EAAE,EAAE;IACf,UAA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ED,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 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;QACb,UAAU;QACV,UAAU;KACX;IAED,IAAI,EAAE,GAAW,EAAE,CAAC,OAAO;CACnB,CAAA;AAiBV;;GAEG;AACU,QAAA,OAAO,GAAG;IACrB,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,CAAC,SAAS,CAAC;IACvB,WAAW,EAAE,CAAC,mBAAmB,CAAC;IAClC,UAAU,EAAE,EAAE;IAEd,IAAI,EAAE,CAAC,CAAwB,EAAU,EAAE,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE;CACxD,CAAA;AAkIV;;GAEG;AACU,QAAA,UAAU,GAAG;IACxB,MAAM,EAAE,OAAO;IACf,UAAU,EAAE,CAAC,SAAS,CAAC;IACvB,WAAW,EAAE,CAAC,mBAAmB,CAAC;IAClC,UAAU,EAAE;QACV,UAAU;QACV,YAAY;QACZ,MAAM;QACN,OAAO;QACP,WAAW;QACX,UAAU;QACV,eAAe;QACf,UAAU;QACV,aAAa;KACd;I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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"]}
@@ -273,13 +273,13 @@ function isFullPage(response) {
273
273
  * @returns `true` if `response` is a full `DataSourceObjectResponse`.
274
274
  */
275
275
  function isFullDataSource(response) {
276
- return response.object === "data_source";
276
+ return response.object === "data_source" && "title" in response;
277
277
  }
278
278
  /**
279
279
  * @returns `true` if `response` is a full `DatabaseObjectResponse`.
280
280
  */
281
281
  function isFullDatabase(response) {
282
- return response.object === "database";
282
+ return response.object === "database" && "title" in response;
283
283
  }
284
284
  /**
285
285
  * @returns `true` if `response` is a full `DataSourceObjectResponse` or a full
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/helpers.ts"],"names":[],"mappings":";;AA2DA,kDAaC;AAoBD,kDASC;AA0BD,gEAcC;AAiBD,gEASC;AAqED,4DAmDC;AAuBD,4DASC;AAwCD,kCAIC;AAKD,gCAIC;AAKD,4CAIC;AAKD,wCAIC;AASD,wDAQC;AAKD,gCAIC;AAKD,sCAIC;AAKD,gCAIC;AAKD,gEAIC;AAKD,wEAIC;AAKD,sEAIC;AAqBD,0CA0CC;AAmBD,8CAEC;AAMD,sCAEC;AAMD,wCAYC;AAnhBD;;;;;;;;;;;;;;;;;;GAkBG;AACI,KAAK,SAAS,CAAC,CAAC,mBAAmB,CACxC,MAAoD,EACpD,aAAmB;IAEnB,IAAI,UAAU,GAA8B,aAAa,CAAC,YAAY,CAAA;IACtE,GAAG,CAAC;QACF,MAAM,QAAQ,GA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ViewObjectResponse,\n EquationRichTextItemResponse,\n GroupFilterOperatorArray,\n ListDataSourceTemplatesResponse,\n MentionRichTextItemResponse,\n PageObjectResponse,\n PartialBlockObjectResponse,\n PartialCommentObjectResponse,\n PartialDatabaseObjectResponse,\n PartialDataSourceObjectResponse,\n PartialDataSourceViewObjectResponse,\n PartialPageObjectResponse,\n PartialUserObjectResponse,\n PropertyFilter,\n QueryDataSourceParameters,\n QueryDataSourceResponse,\n RichTextItemResponse,\n RichTextItemResponseCommon,\n TextRichTextItemResponse,\n TimestampFilter,\n UserObjectResponse,\n} from \"./api-endpoints\"\nimport type Client from \"./Client\"\n\ntype PaginatedArgs = {\n start_cursor?: string | null\n}\n\ntype PaginatedList<T> = {\n object: \"list\"\n results: T[]\n next_cursor: string | null\n has_more: boolean\n}\n\n/**\n * Returns an async iterator over the results of any paginated Notion API.\n *\n * Example (given a notion Client called `notion`):\n *\n * ```\n * for await (const block of iteratePaginatedAPI(notion.blocks.children.list, {\n * block_id: parentBlockId,\n * })) {\n * // Do something with block.\n * }\n * ```\n *\n * @param listFn A bound function on the Notion client that represents a conforming paginated\n * API. Example: `notion.blocks.children.list`.\n * @param firstPageArgs Arguments that should be passed to the API on the first and subsequent\n * calls to the API. Any necessary `next_cursor` will be automatically populated by\n * this function. Example: `{ block_id: \"<my block id>\" }`\n */\nexport async function* iteratePaginatedAPI<Args extends PaginatedArgs, Item>(\n listFn: (args: Args) => Promise<PaginatedList<Item>>,\n firstPageArgs: Args\n): AsyncIterableIterator<Item> {\n let nextCursor: string | null | undefined = firstPageArgs.start_cursor\n do {\n const response: PaginatedList<Item> = await listFn({\n ...firstPageArgs,\n start_cursor: nextCursor,\n })\n yield* response.results\n nextCursor = response.next_cursor\n } while (nextCursor)\n}\n\n/**\n * Collect all of the results of paginating an API into an in-memory array.\n *\n * Example (given a notion Client called `notion`):\n *\n * ```\n * const blocks = await collectPaginatedAPI(notion.blocks.children.list, {\n * block_id: parentBlockId,\n * })\n * // Do something with blocks.\n * ```\n *\n * @param listFn A bound function on the Notion client that represents a conforming paginated\n * API. Example: `notion.blocks.children.list`.\n * @param firstPageArgs Arguments that should be passed to the API on the first and subsequent\n * calls to the API. Any necessary `next_cursor` will be automatically populated by\n * this function. Example: `{ block_id: \"<my block id>\" }`\n */\nexport async function collectPaginatedAPI<Args extends PaginatedArgs, Item>(\n listFn: (args: Args) => Promise<PaginatedList<Item>>,\n firstPageArgs: Args\n): Promise<Item[]> {\n const results: Item[] = []\n for await (const item of iteratePaginatedAPI(listFn, firstPageArgs)) {\n results.push(item)\n }\n return results\n}\n\ntype DataSourceTemplate = ListDataSourceTemplatesResponse[\"templates\"][number]\n\ntype ListDataSourceTemplatesArgs = PaginatedArgs & {\n data_source_id: string\n name?: string\n page_size?: number\n}\n\n/**\n * Returns an async iterator over data source templates.\n *\n * Example (given a notion Client called `notion`):\n *\n * ```\n * for await (const template of iterateDataSourceTemplates(notion, {\n * data_source_id: dataSourceId,\n * })) {\n * console.log(template.name, template.is_default)\n * }\n * ```\n *\n * @param client A Notion client instance.\n * @param args Arguments including the data_source_id and optional start_cursor.\n */\nexport async function* iterateDataSourceTemplates(\n client: Client,\n args: ListDataSourceTemplatesArgs\n): AsyncIterableIterator<DataSourceTemplate> {\n let nextCursor: string | null | undefined = args.start_cursor\n do {\n const response: ListDataSourceTemplatesResponse =\n await client.dataSources.listTemplates({\n ...args,\n start_cursor: nextCursor,\n })\n yield* response.templates\n nextCursor = response.next_cursor\n } while (nextCursor)\n}\n\n/**\n * Collect all data source templates into an in-memory array.\n *\n * Example (given a notion Client called `notion`):\n *\n * ```\n * const templates = await collectDataSourceTemplates(notion, {\n * data_source_id: dataSourceId,\n * })\n * // Do something with templates.\n * ```\n *\n * @param client A Notion client instance.\n * @param args Arguments including the data_source_id and optional start_cursor.\n */\nexport async function collectDataSourceTemplates(\n client: Client,\n args: ListDataSourceTemplatesArgs\n): Promise<DataSourceTemplate[]> {\n const results: DataSourceTemplate[] = []\n for await (const template of iterateDataSourceTemplates(client, args)) {\n results.push(template)\n }\n return results\n}\n\ntype DataSourceRow = QueryDataSourceResponse[\"results\"][number]\n\n/**\n * A filter the full-query helpers can combine with a created_time window bound.\n *\n * A top-level `or` filter is intentionally excluded: the helpers add a\n * created_time lower bound with `and`, and Notion only supports two levels of\n * filter nesting, so an `or` at the root leaves no room for the bound. Express\n * such queries as an `and` group, or run the helper once per `or` branch and\n * merge the results.\n */\nexport type FullDataSourceQueryFilter =\n | PropertyFilter\n | TimestampFilter\n | { and: GroupFilterOperatorArray }\n\n/**\n * Arguments for the full-query helpers. The same as `dataSources.query`, minus\n * the fields the helper controls: `start_cursor` (pagination is automatic) and\n * `sorts` (the helper sorts by created_time to partition). `filter` is narrowed\n * to {@link FullDataSourceQueryFilter}.\n */\nexport type FullDataSourceQueryArgs = Omit<\n QueryDataSourceParameters,\n \"start_cursor\" | \"sorts\" | \"filter\"\n> & {\n filter?: FullDataSourceQueryFilter\n}\n\n/**\n * Iterate over every row of a data source, including rows past the per-query\n * result limit that `dataSources.query` enforces on large data sources.\n *\n * A single query (one filter and sort) returns at most a fixed number of rows\n * (10,000 by default). Once that limit is reached, `has_more` becomes `false`\n * and the response carries `request_status.type === \"incomplete\"`. Plain\n * pagination such as {@link iteratePaginatedAPI} stops there and silently\n * misses the rest of the data source.\n *\n * This helper works around the limit by partitioning the data source into\n * created_time windows. It sorts by created_time ascending; whenever a window\n * reaches the limit, it starts a fresh query from the last row's created_time.\n * Each fresh query has a different filter, so it gets its own result budget.\n * Rows that share a boundary timestamp are de-duplicated by id, so every row is\n * yielded exactly once.\n *\n * created_time is used because it never changes. last_edited_time would shift\n * rows between windows as they are edited, causing gaps or duplicates.\n *\n * Throws if a single created_time value holds more rows than the limit, since\n * the window cannot be narrowed by time alone. Add a filter in that case so\n * each window stays under the limit.\n *\n * Example (given a notion Client called `notion`):\n *\n * ```\n * for await (const row of iterateAllDataSourceRows(notion, {\n * data_source_id: dataSourceId,\n * })) {\n * // Do something with row.\n * }\n * ```\n *\n * @param client A Notion client instance.\n * @param args Query arguments. `start_cursor` and `sorts` are managed by the\n * helper; `filter` is combined with the created_time window bound.\n */\nexport async function* iterateAllDataSourceRows(\n client: Client,\n args: FullDataSourceQueryArgs\n): AsyncIterableIterator<DataSourceRow> {\n const seenRowIds = new Set<string>()\n let windowStart: string | undefined = undefined\n\n for (;;) {\n let limitReached = false\n let lastCreatedTime: string | undefined = undefined\n let cursor: string | undefined = undefined\n\n do {\n const response = await client.dataSources.query({\n ...args,\n sorts: [{ timestamp: \"created_time\", direction: \"ascending\" }],\n filter: createdTimeLowerBound(args.filter, windowStart),\n start_cursor: cursor,\n })\n for (const row of response.results) {\n // Wiki data sources can return child data-source rows alongside pages.\n // Both carry created_time and either can be the window's boundary row,\n // so advance on either; reading only pages would stall a window made up\n // of data-source rows and throw spuriously.\n if (isFullPageOrDataSource(row)) {\n lastCreatedTime = row.created_time\n }\n if (!seenRowIds.has(row.id)) {\n seenRowIds.add(row.id)\n yield row\n }\n }\n if (response.request_status?.type === \"incomplete\") {\n limitReached = true\n }\n cursor = response.next_cursor ?? undefined\n } while (cursor)\n\n if (!limitReached) {\n return\n }\n if (lastCreatedTime === undefined || lastCreatedTime === windowStart) {\n throw new Error(\n \"iterateAllDataSourceRows cannot make progress: the per-query result \" +\n \"limit was reached but the created_time window could not advance \" +\n `past ${String(lastCreatedTime)}. More rows share this timestamp ` +\n \"than the limit allows. Add a filter to narrow the query.\"\n )\n }\n windowStart = lastCreatedTime\n }\n}\n\n/**\n * Collect every row of a data source into an in-memory array, including rows\n * past the per-query result limit. See {@link iterateAllDataSourceRows} for how\n * the limit is handled.\n *\n * Before using this, check that the full data source fits in memory. For very\n * large data sources, prefer {@link iterateAllDataSourceRows} and process rows\n * as they stream.\n *\n * Example (given a notion Client called `notion`):\n *\n * ```\n * const rows = await collectAllDataSourceRows(notion, {\n * data_source_id: dataSourceId,\n * })\n * // Do something with rows.\n * ```\n *\n * @param client A Notion client instance.\n * @param args Query arguments. See {@link iterateAllDataSourceRows}.\n */\nexport async function collectAllDataSourceRows(\n client: Client,\n args: FullDataSourceQueryArgs\n): Promise<DataSourceRow[]> {\n const rows: DataSourceRow[] = []\n for await (const row of iterateAllDataSourceRows(client, args)) {\n rows.push(row)\n }\n return rows\n}\n\n/**\n * Combine a caller-provided filter with the created_time lower bound used to\n * advance the partition window. Returns the filter unchanged for the first\n * window, which has no bound yet.\n */\nfunction createdTimeLowerBound(\n filter: FullDataSourceQueryFilter | undefined,\n windowStart: string | undefined\n): FullDataSourceQueryFilter | undefined {\n if (windowStart === undefined) {\n return filter\n }\n const bound: TimestampFilter = {\n timestamp: \"created_time\",\n created_time: { on_or_after: windowStart },\n }\n if (filter === undefined) {\n return bound\n }\n if (\"and\" in filter) {\n return { and: [...filter.and, bound] }\n }\n return { and: [filter, bound] }\n}\n\ntype ObjectResponse =\n | PageObjectResponse\n | PartialPageObjectResponse\n | DataSourceObjectResponse\n | PartialDataSourceObjectResponse\n | DatabaseObjectResponse\n | PartialDatabaseObjectResponse\n | BlockObjectResponse\n | PartialBlockObjectResponse\n\n/**\n * @returns `true` if `response` is a full `BlockObjectResponse`.\n */\nexport function isFullBlock(\n response: ObjectResponse\n): response is BlockObjectResponse {\n return response.object === \"block\" && \"type\" in response\n}\n\n/**\n * @returns `true` if `response` is a full `PageObjectResponse`.\n */\nexport function isFullPage(\n response: ObjectResponse\n): response is PageObjectResponse {\n return response.object === \"page\" && \"url\" in response\n}\n\n/**\n * @returns `true` if `response` is a full `DataSourceObjectResponse`.\n */\nexport function isFullDataSource(\n response: ObjectResponse\n): response is DataSourceObjectResponse {\n return response.object === \"data_source\"\n}\n\n/**\n * @returns `true` if `response` is a full `DatabaseObjectResponse`.\n */\nexport function isFullDatabase(\n response: ObjectResponse\n): response is DatabaseObjectResponse {\n return response.object === \"database\"\n}\n\n/**\n * @returns `true` if `response` is a full `DataSourceObjectResponse` or a full\n * `PageObjectResponse`.\n *\n * Can be used on the results of the list response from `queryDataSource` or\n * `search` APIs.\n */\nexport function isFullPageOrDataSource(\n response: ObjectResponse\n): response is DataSourceObjectResponse | PageObjectResponse {\n if (response.object === \"data_source\") {\n return isFullDataSource(response)\n } else {\n return isFullPage(response)\n }\n}\n\n/**\n * @returns `true` if `response` is a full `UserObjectResponse`.\n */\nexport function isFullUser(\n response: UserObjectResponse | PartialUserObjectResponse\n): response is UserObjectResponse {\n return \"type\" in response\n}\n\n/**\n * @returns `true` if `response` is a full `CommentObjectResponse`.\n */\nexport function isFullComment(\n response: CommentObjectResponse | PartialCommentObjectResponse\n): response is CommentObjectResponse {\n return \"created_by\" in response\n}\n\n/**\n * @returns `true` if `response` is a full `DataSourceViewObjectResponse`.\n */\nexport function isFullView(\n response: DataSourceViewObjectResponse | PartialDataSourceViewObjectResponse\n): response is DataSourceViewObjectResponse {\n return \"type\" in response\n}\n\n/**\n * @returns `true` if `richText` is a `TextRichTextItemResponse`.\n */\nexport function isTextRichTextItemResponse(\n richText: RichTextItemResponse\n): richText is RichTextItemResponseCommon & TextRichTextItemResponse {\n return richText.type === \"text\"\n}\n\n/**\n * @returns `true` if `richText` is an `EquationRichTextItemResponse`.\n */\nexport function isEquationRichTextItemResponse(\n richText: RichTextItemResponse\n): richText is RichTextItemResponseCommon & EquationRichTextItemResponse {\n return richText.type === \"equation\"\n}\n\n/**\n * @returns `true` if `richText` is an `MentionRichTextItemResponse`.\n */\nexport function isMentionRichTextItemResponse(\n richText: RichTextItemResponse\n): richText is RichTextItemResponseCommon & MentionRichTextItemResponse {\n return richText.type === \"mention\"\n}\n\n/**\n * Extracts a Notion ID from a Notion URL or returns the input if it's already a valid ID.\n *\n * Prioritizes path IDs over query parameters to avoid extracting view IDs instead of database IDs.\n *\n * @param urlOrId A Notion URL or ID string\n * @returns The extracted UUID in standard format (with hyphens) or null if invalid\n *\n * @example\n * ```typescript\n * // Database URL with view ID - extracts database ID, not view ID\n * extractNotionId('https://notion.so/workspace/DB-abc123def456789012345678901234ab?v=viewid123')\n * // Returns: 'abc123de-f456-7890-1234-5678901234ab' (database ID)\n *\n * // Already formatted UUID\n * extractNotionId('12345678-1234-1234-1234-123456789abc')\n * // Returns: '12345678-1234-1234-1234-123456789abc'\n * ```\n */\nexport function extractNotionId(urlOrId: string): string | null {\n if (!urlOrId || typeof urlOrId !== \"string\") {\n return null\n }\n\n const trimmed = urlOrId.trim()\n\n // Check if it's already a properly formatted UUID\n const uuidRegex =\n /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i\n if (uuidRegex.test(trimmed)) {\n return trimmed.toLowerCase()\n }\n\n // Check if it's a compact UUID (32 chars, no hyphens)\n const compactUuidRegex = /^[0-9a-f]{32}$/i\n if (compactUuidRegex.test(trimmed)) {\n return formatUuid(trimmed)\n }\n\n // Extract from URL - prioritize path over query parameters\n // This prevents extracting view IDs when database IDs are in the path\n const pathMatch = trimmed.match(/\\/[^/?#]*-([0-9a-f]{32})(?:[/?#]|$)/i)\n if (pathMatch && pathMatch[1]) {\n return formatUuid(pathMatch[1])\n }\n\n // Fallback to query parameters if no path ID found\n const queryMatch = trimmed.match(\n /[?&](?:p|page_id|database_id)=([0-9a-f]{32})/i\n )\n if (queryMatch && queryMatch[1]) {\n return formatUuid(queryMatch[1])\n }\n\n // Last resort: any 32-char hex string in the URL\n const anyMatch = trimmed.match(/([0-9a-f]{32})/i)\n if (anyMatch && anyMatch[1]) {\n return formatUuid(anyMatch[1])\n }\n\n return null\n}\n\n/**\n * Formats a 32-character hex string into a standard UUID format.\n * @param compactId 32-character hex string without hyphens\n * @returns UUID with hyphens in standard format\n */\nfunction formatUuid(compactId: string): string {\n const clean = compactId.toLowerCase()\n return `${clean.slice(0, 8)}-${clean.slice(8, 12)}-${clean.slice(\n 12,\n 16\n )}-${clean.slice(16, 20)}-${clean.slice(20, 32)}`\n}\n\n/**\n * Extracts a database ID from a Notion database URL.\n * Convenience wrapper around `extractNotionId`.\n */\nexport function extractDatabaseId(databaseUrl: string): string | null {\n return extractNotionId(databaseUrl)\n}\n\n/**\n * Extracts a page ID from a Notion page URL.\n * Convenience wrapper around `extractNotionId`.\n */\nexport function extractPageId(pageUrl: string): string | null {\n return extractNotionId(pageUrl)\n}\n\n/**\n * Extracts a block ID from a Notion URL with a block fragment.\n * Looks for #block-<id> or #<id> patterns.\n */\nexport function extractBlockId(urlWithBlock: string): string | null {\n if (!urlWithBlock || typeof urlWithBlock !== \"string\") {\n return null\n }\n\n // Look for block fragment in URL (#block-32chars or just #32chars)\n const blockMatch = urlWithBlock.match(/#(?:block-)?([0-9a-f]{32})/i)\n if (blockMatch && blockMatch[1]) {\n return formatUuid(blockMatch[1])\n }\n\n return null\n}\n"]}
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/helpers.ts"],"names":[],"mappings":";;AA2DA,kDAaC;AAoBD,kDASC;AA0BD,gEAcC;AAiBD,gEASC;AAqED,4DAmDC;AAuBD,4DASC;AAwCD,kCAIC;AAKD,gCAIC;AAKD,4CAIC;AAKD,wCAIC;AASD,wDAQC;AAKD,gCAIC;AAKD,sCAIC;AAKD,gCAIC;AAKD,gEAIC;AAKD,wEAIC;AAKD,sEAIC;AAqBD,0CA0CC;AAmBD,8CAEC;AAMD,sCAEC;AAMD,wCAYC;AAnhBD;;;;;;;;;;;;;;;;;;GAkBG;AACI,KAAK,SAAS,CAAC,CAAC,mBAAmB,CACxC,MAAoD,EACpD,aAAmB;IAEnB,IAAI,UAAU,GAA8B,aAAa,CAAC,YAAY,CAAA;IACtE,GAAG,CAAC;QACF,MAAM,QAAQ,GAAwB,MAAM,MAAM,CAAC;YACjD,GAAG,aAAa;YAChB,YAAY,EAAE,UAAU;SACzB,CAAC,CAAA;QACF,KAAK,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAA;QACvB,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAA;IACnC,CAAC,QAAQ,UAAU,EAAC;AACtB,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACI,K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M,KAAK,GAAG,SAAS,CAAC,WAAW,EAAE,CAAA;IACrC,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC,KAAK,CAC9D,EAAE,EACF,EAAE,CACH,IAAI,KAAK,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAA;AACnD,CAAC;AAED;;;GAGG;AACH,SAAgB,iBAAiB,CAAC,WAAmB;IACnD,OAAO,eAAe,CAAC,WAAW,CAAC,CAAA;AACrC,CAAC;AAED;;;GAGG;AACH,SAAgB,aAAa,CAAC,OAAe;IAC3C,OAAO,eAAe,CAAC,OAAO,CAAC,CAAA;AACjC,CAAC;AAED;;;GAGG;AACH,SAAgB,cAAc,CAAC,YAAoB;IACjD,IAAI,CAAC,YAAY,IAAI,OAAO,YAAY,KAAK,QAAQ,EAAE,CAAC;QACtD,OAAO,IAAI,CAAA;IACb,CAAC;IAED,mEAAmE;IACnE,MAAM,UAAU,GAAG,YAAY,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAA;IACpE,IAAI,UAAU,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;QAChC,OAAO,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;IAClC,CAAC;IAED,OAAO,IAAI,CAAA;AACb,CAAC","sourcesContent":["import {\n BlockObjectResponse,\n CommentObjectResponse,\n DatabaseObjectResponse,\n DataSourceObjectResponse,\n DataSourceViewObjectResponse,\n EquationRichTextItemResponse,\n GroupFilterOperatorArray,\n ListDataSourceTemplatesResponse,\n MentionRichTextItemResponse,\n PageObjectResponse,\n PartialBlockObjectResponse,\n PartialCommentObjectResponse,\n PartialDatabaseObjectResponse,\n PartialDataSourceObjectResponse,\n PartialDataSourceViewObjectResponse,\n PartialPageObjectResponse,\n PartialUserObjectResponse,\n PropertyFilter,\n QueryDataSourceParameters,\n QueryDataSourceResponse,\n RichTextItemResponse,\n RichTextItemResponseCommon,\n TextRichTextItemResponse,\n TimestampFilter,\n UserObjectResponse,\n} from \"./api-endpoints\"\nimport type Client from \"./Client\"\n\ntype PaginatedArgs = {\n start_cursor?: string | null\n}\n\ntype PaginatedList<T> = {\n object: \"list\"\n results: T[]\n next_cursor: string | null\n has_more: boolean\n}\n\n/**\n * Returns an async iterator over the results of any paginated Notion API.\n *\n * Example (given a notion Client called `notion`):\n *\n * ```\n * for await (const block of iteratePaginatedAPI(notion.blocks.children.list, {\n * block_id: parentBlockId,\n * })) {\n * // Do something with block.\n * }\n * ```\n *\n * @param listFn A bound function on the Notion client that represents a conforming paginated\n * API. Example: `notion.blocks.children.list`.\n * @param firstPageArgs Arguments that should be passed to the API on the first and subsequent\n * calls to the API. Any necessary `next_cursor` will be automatically populated by\n * this function. Example: `{ block_id: \"<my block id>\" }`\n */\nexport async function* iteratePaginatedAPI<Args extends PaginatedArgs, Item>(\n listFn: (args: Args) => Promise<PaginatedList<Item>>,\n firstPageArgs: Args\n): AsyncIterableIterator<Item> {\n let nextCursor: string | null | undefined = firstPageArgs.start_cursor\n do {\n const response: PaginatedList<Item> = await listFn({\n ...firstPageArgs,\n start_cursor: nextCursor,\n })\n yield* response.results\n nextCursor = response.next_cursor\n } while (nextCursor)\n}\n\n/**\n * Collect all of the results of paginating an API into an in-memory array.\n *\n * Example (given a notion Client called `notion`):\n *\n * ```\n * const blocks = await collectPaginatedAPI(notion.blocks.children.list, {\n * block_id: parentBlockId,\n * })\n * // Do something with blocks.\n * ```\n *\n * @param listFn A bound function on the Notion client that represents a conforming paginated\n * API. Example: `notion.blocks.children.list`.\n * @param firstPageArgs Arguments that should be passed to the API on the first and subsequent\n * calls to the API. Any necessary `next_cursor` will be automatically populated by\n * this function. Example: `{ block_id: \"<my block id>\" }`\n */\nexport async function collectPaginatedAPI<Args extends PaginatedArgs, Item>(\n listFn: (args: Args) => Promise<PaginatedList<Item>>,\n firstPageArgs: Args\n): Promise<Item[]> {\n const results: Item[] = []\n for await (const item of iteratePaginatedAPI(listFn, firstPageArgs)) {\n results.push(item)\n }\n return results\n}\n\ntype DataSourceTemplate = ListDataSourceTemplatesResponse[\"templates\"][number]\n\ntype ListDataSourceTemplatesArgs = PaginatedArgs & {\n data_source_id: string\n name?: string\n page_size?: number\n}\n\n/**\n * Returns an async iterator over data source templates.\n *\n * Example (given a notion Client called `notion`):\n *\n * ```\n * for await (const template of iterateDataSourceTemplates(notion, {\n * data_source_id: dataSourceId,\n * })) {\n * console.log(template.name, template.is_default)\n * }\n * ```\n *\n * @param client A Notion client instance.\n * @param args Arguments including the data_source_id and optional start_cursor.\n */\nexport async function* iterateDataSourceTemplates(\n client: Client,\n args: ListDataSourceTemplatesArgs\n): AsyncIterableIterator<DataSourceTemplate> {\n let nextCursor: string | null | undefined = args.start_cursor\n do {\n const response: ListDataSourceTemplatesResponse =\n await client.dataSources.listTemplates({\n ...args,\n start_cursor: nextCursor,\n })\n yield* response.templates\n nextCursor = response.next_cursor\n } while (nextCursor)\n}\n\n/**\n * Collect all data source templates into an in-memory array.\n *\n * Example (given a notion Client called `notion`):\n *\n * ```\n * const templates = await collectDataSourceTemplates(notion, {\n * data_source_id: dataSourceId,\n * })\n * // Do something with templates.\n * ```\n *\n * @param client A Notion client instance.\n * @param args Arguments including the data_source_id and optional start_cursor.\n */\nexport async function collectDataSourceTemplates(\n client: Client,\n args: ListDataSourceTemplatesArgs\n): Promise<DataSourceTemplate[]> {\n const results: DataSourceTemplate[] = []\n for await (const template of iterateDataSourceTemplates(client, args)) {\n results.push(template)\n }\n return results\n}\n\ntype DataSourceRow = QueryDataSourceResponse[\"results\"][number]\n\n/**\n * A filter the full-query helpers can combine with a created_time window bound.\n *\n * A top-level `or` filter is intentionally excluded: the helpers add a\n * created_time lower bound with `and`, and Notion only supports two levels of\n * filter nesting, so an `or` at the root leaves no room for the bound. Express\n * such queries as an `and` group, or run the helper once per `or` branch and\n * merge the results.\n */\nexport type FullDataSourceQueryFilter =\n | PropertyFilter\n | TimestampFilter\n | { and: GroupFilterOperatorArray }\n\n/**\n * Arguments for the full-query helpers. The same as `dataSources.query`, minus\n * the fields the helper controls: `start_cursor` (pagination is automatic) and\n * `sorts` (the helper sorts by created_time to partition). `filter` is narrowed\n * to {@link FullDataSourceQueryFilter}.\n */\nexport type FullDataSourceQueryArgs = Omit<\n QueryDataSourceParameters,\n \"start_cursor\" | \"sorts\" | \"filter\"\n> & {\n filter?: FullDataSourceQueryFilter\n}\n\n/**\n * Iterate over every row of a data source, including rows past the per-query\n * result limit that `dataSources.query` enforces on large data sources.\n *\n * A single query (one filter and sort) returns at most a fixed number of rows\n * (10,000 by default). Once that limit is reached, `has_more` becomes `false`\n * and the response carries `request_status.type === \"incomplete\"`. Plain\n * pagination such as {@link iteratePaginatedAPI} stops there and silently\n * misses the rest of the data source.\n *\n * This helper works around the limit by partitioning the data source into\n * created_time windows. It sorts by created_time ascending; whenever a window\n * reaches the limit, it starts a fresh query from the last row's created_time.\n * Each fresh query has a different filter, so it gets its own result budget.\n * Rows that share a boundary timestamp are de-duplicated by id, so every row is\n * yielded exactly once.\n *\n * created_time is used because it never changes. last_edited_time would shift\n * rows between windows as they are edited, causing gaps or duplicates.\n *\n * Throws if a single created_time value holds more rows than the limit, since\n * the window cannot be narrowed by time alone. Add a filter in that case so\n * each window stays under the limit.\n *\n * Example (given a notion Client called `notion`):\n *\n * ```\n * for await (const row of iterateAllDataSourceRows(notion, {\n * data_source_id: dataSourceId,\n * })) {\n * // Do something with row.\n * }\n * ```\n *\n * @param client A Notion client instance.\n * @param args Query arguments. `start_cursor` and `sorts` are managed by the\n * helper; `filter` is combined with the created_time window bound.\n */\nexport async function* iterateAllDataSourceRows(\n client: Client,\n args: FullDataSourceQueryArgs\n): AsyncIterableIterator<DataSourceRow> {\n const seenRowIds = new Set<string>()\n let windowStart: string | undefined = undefined\n\n for (;;) {\n let limitReached = false\n let lastCreatedTime: string | undefined = undefined\n let cursor: string | undefined = undefined\n\n do {\n const response = await client.dataSources.query({\n ...args,\n sorts: [{ timestamp: \"created_time\", direction: \"ascending\" }],\n filter: createdTimeLowerBound(args.filter, windowStart),\n start_cursor: cursor,\n })\n for (const row of response.results) {\n // Wiki data sources can return child data-source rows alongside pages.\n // Both carry created_time and either can be the window's boundary row,\n // so advance on either; reading only pages would stall a window made up\n // of data-source rows and throw spuriously.\n if (isFullPageOrDataSource(row)) {\n lastCreatedTime = row.created_time\n }\n if (!seenRowIds.has(row.id)) {\n seenRowIds.add(row.id)\n yield row\n }\n }\n if (response.request_status?.type === \"incomplete\") {\n limitReached = true\n }\n cursor = response.next_cursor ?? undefined\n } while (cursor)\n\n if (!limitReached) {\n return\n }\n if (lastCreatedTime === undefined || lastCreatedTime === windowStart) {\n throw new Error(\n \"iterateAllDataSourceRows cannot make progress: the per-query result \" +\n \"limit was reached but the created_time window could not advance \" +\n `past ${String(lastCreatedTime)}. More rows share this timestamp ` +\n \"than the limit allows. Add a filter to narrow the query.\"\n )\n }\n windowStart = lastCreatedTime\n }\n}\n\n/**\n * Collect every row of a data source into an in-memory array, including rows\n * past the per-query result limit. See {@link iterateAllDataSourceRows} for how\n * the limit is handled.\n *\n * Before using this, check that the full data source fits in memory. For very\n * large data sources, prefer {@link iterateAllDataSourceRows} and process rows\n * as they stream.\n *\n * Example (given a notion Client called `notion`):\n *\n * ```\n * const rows = await collectAllDataSourceRows(notion, {\n * data_source_id: dataSourceId,\n * })\n * // Do something with rows.\n * ```\n *\n * @param client A Notion client instance.\n * @param args Query arguments. See {@link iterateAllDataSourceRows}.\n */\nexport async function collectAllDataSourceRows(\n client: Client,\n args: FullDataSourceQueryArgs\n): Promise<DataSourceRow[]> {\n const rows: DataSourceRow[] = []\n for await (const row of iterateAllDataSourceRows(client, args)) {\n rows.push(row)\n }\n return rows\n}\n\n/**\n * Combine a caller-provided filter with the created_time lower bound used to\n * advance the partition window. Returns the filter unchanged for the first\n * window, which has no bound yet.\n */\nfunction createdTimeLowerBound(\n filter: FullDataSourceQueryFilter | undefined,\n windowStart: string | undefined\n): FullDataSourceQueryFilter | undefined {\n if (windowStart === undefined) {\n return filter\n }\n const bound: TimestampFilter = {\n timestamp: \"created_time\",\n created_time: { on_or_after: windowStart },\n }\n if (filter === undefined) {\n return bound\n }\n if (\"and\" in filter) {\n return { and: [...filter.and, bound] }\n }\n return { and: [filter, bound] }\n}\n\ntype ObjectResponse =\n | PageObjectResponse\n | PartialPageObjectResponse\n | DataSourceObjectResponse\n | PartialDataSourceObjectResponse\n | DatabaseObjectResponse\n | PartialDatabaseObjectResponse\n | BlockObjectResponse\n | PartialBlockObjectResponse\n\n/**\n * @returns `true` if `response` is a full `BlockObjectResponse`.\n */\nexport function isFullBlock(\n response: ObjectResponse\n): response is BlockObjectResponse {\n return response.object === \"block\" && \"type\" in response\n}\n\n/**\n * @returns `true` if `response` is a full `PageObjectResponse`.\n */\nexport function isFullPage(\n response: ObjectResponse\n): response is PageObjectResponse {\n return response.object === \"page\" && \"url\" in response\n}\n\n/**\n * @returns `true` if `response` is a full `DataSourceObjectResponse`.\n */\nexport function isFullDataSource(\n response: ObjectResponse\n): response is DataSourceObjectResponse {\n return response.object === \"data_source\" && \"title\" in response\n}\n\n/**\n * @returns `true` if `response` is a full `DatabaseObjectResponse`.\n */\nexport function isFullDatabase(\n response: ObjectResponse\n): response is DatabaseObjectResponse {\n return response.object === \"database\" && \"title\" in response\n}\n\n/**\n * @returns `true` if `response` is a full `DataSourceObjectResponse` or a full\n * `PageObjectResponse`.\n *\n * Can be used on the results of the list response from `queryDataSource` or\n * `search` APIs.\n */\nexport function isFullPageOrDataSource(\n response: ObjectResponse\n): response is DataSourceObjectResponse | PageObjectResponse {\n if (response.object === \"data_source\") {\n return isFullDataSource(response)\n } else {\n return isFullPage(response)\n }\n}\n\n/**\n * @returns `true` if `response` is a full `UserObjectResponse`.\n */\nexport function isFullUser(\n response: UserObjectResponse | PartialUserObjectResponse\n): response is UserObjectResponse {\n return \"type\" in response\n}\n\n/**\n * @returns `true` if `response` is a full `CommentObjectResponse`.\n */\nexport function isFullComment(\n response: CommentObjectResponse | PartialCommentObjectResponse\n): response is CommentObjectResponse {\n return \"created_by\" in response\n}\n\n/**\n * @returns `true` if `response` is a full `DataSourceViewObjectResponse`.\n */\nexport function isFullView(\n response: DataSourceViewObjectResponse | PartialDataSourceViewObjectResponse\n): response is DataSourceViewObjectResponse {\n return \"type\" in response\n}\n\n/**\n * @returns `true` if `richText` is a `TextRichTextItemResponse`.\n */\nexport function isTextRichTextItemResponse(\n richText: RichTextItemResponse\n): richText is RichTextItemResponseCommon & TextRichTextItemResponse {\n return richText.type === \"text\"\n}\n\n/**\n * @returns `true` if `richText` is an `EquationRichTextItemResponse`.\n */\nexport function isEquationRichTextItemResponse(\n richText: RichTextItemResponse\n): richText is RichTextItemResponseCommon & EquationRichTextItemResponse {\n return richText.type === \"equation\"\n}\n\n/**\n * @returns `true` if `richText` is an `MentionRichTextItemResponse`.\n */\nexport function isMentionRichTextItemResponse(\n richText: RichTextItemResponse\n): richText is RichTextItemResponseCommon & MentionRichTextItemResponse {\n return richText.type === \"mention\"\n}\n\n/**\n * Extracts a Notion ID from a Notion URL or returns the input if it's already a valid ID.\n *\n * Prioritizes path IDs over query parameters to avoid extracting view IDs instead of database IDs.\n *\n * @param urlOrId A Notion URL or ID string\n * @returns The extracted UUID in standard format (with hyphens) or null if invalid\n *\n * @example\n * ```typescript\n * // Database URL with view ID - extracts database ID, not view ID\n * extractNotionId('https://notion.so/workspace/DB-abc123def456789012345678901234ab?v=viewid123')\n * // Returns: 'abc123de-f456-7890-1234-5678901234ab' (database ID)\n *\n * // Already formatted UUID\n * extractNotionId('12345678-1234-1234-1234-123456789abc')\n * // Returns: '12345678-1234-1234-1234-123456789abc'\n * ```\n */\nexport function extractNotionId(urlOrId: string): string | null {\n if (!urlOrId || typeof urlOrId !== \"string\") {\n return null\n }\n\n const trimmed = urlOrId.trim()\n\n // Check if it's already a properly formatted UUID\n const uuidRegex =\n /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i\n if (uuidRegex.test(trimmed)) {\n return trimmed.toLowerCase()\n }\n\n // Check if it's a compact UUID (32 chars, no hyphens)\n const compactUuidRegex = /^[0-9a-f]{32}$/i\n if (compactUuidRegex.test(trimmed)) {\n return formatUuid(trimmed)\n }\n\n // Extract from URL - prioritize path over query parameters\n // This prevents extracting view IDs when database IDs are in the path\n const pathMatch = trimmed.match(/\\/[^/?#]*-([0-9a-f]{32})(?:[/?#]|$)/i)\n if (pathMatch && pathMatch[1]) {\n return formatUuid(pathMatch[1])\n }\n\n // Fallback to query parameters if no path ID found\n const queryMatch = trimmed.match(\n /[?&](?:p|page_id|database_id)=([0-9a-f]{32})/i\n )\n if (queryMatch && queryMatch[1]) {\n return formatUuid(queryMatch[1])\n }\n\n // Last resort: any 32-char hex string in the URL\n const anyMatch = trimmed.match(/([0-9a-f]{32})/i)\n if (anyMatch && anyMatch[1]) {\n return formatUuid(anyMatch[1])\n }\n\n return null\n}\n\n/**\n * Formats a 32-character hex string into a standard UUID format.\n * @param compactId 32-character hex string without hyphens\n * @returns UUID with hyphens in standard format\n */\nfunction formatUuid(compactId: string): string {\n const clean = compactId.toLowerCase()\n return `${clean.slice(0, 8)}-${clean.slice(8, 12)}-${clean.slice(\n 12,\n 16\n )}-${clean.slice(16, 20)}-${clean.slice(20, 32)}`\n}\n\n/**\n * Extracts a database ID from a Notion database URL.\n * Convenience wrapper around `extractNotionId`.\n */\nexport function extractDatabaseId(databaseUrl: string): string | null {\n return extractNotionId(databaseUrl)\n}\n\n/**\n * Extracts a page ID from a Notion page URL.\n * Convenience wrapper around `extractNotionId`.\n */\nexport function extractPageId(pageUrl: string): string | null {\n return extractNotionId(pageUrl)\n}\n\n/**\n * Extracts a block ID from a Notion URL with a block fragment.\n * Looks for #block-<id> or #<id> patterns.\n */\nexport function extractBlockId(urlWithBlock: string): string | null {\n if (!urlWithBlock || typeof urlWithBlock !== \"string\") {\n return null\n }\n\n // Look for block fragment in URL (#block-32chars or just #32chars)\n const blockMatch = urlWithBlock.match(/#(?:block-)?([0-9a-f]{32})/i)\n if (blockMatch && blockMatch[1]) {\n return formatUuid(blockMatch[1])\n }\n\n return null\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notionhq/client",
3
- "version": "5.24.0",
3
+ "version": "5.25.1",
4
4
  "description": "A simple and easy to use client for the Notion API",
5
5
  "engines": {
6
6
  "node": ">=18"