@notionhq/client 5.13.0 → 5.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/package.json +1 -1
- package/build/src/Client.d.ts +37 -1
- package/build/src/Client.d.ts.map +1 -1
- package/build/src/Client.js +124 -0
- package/build/src/Client.js.map +1 -1
- package/build/src/api-endpoints.d.ts +841 -3
- package/build/src/api-endpoints.d.ts.map +1 -1
- package/build/src/api-endpoints.js +82 -1
- package/build/src/api-endpoints.js.map +1 -1
- package/build/src/helpers.d.ts +5 -1
- package/build/src/helpers.d.ts.map +1 -1
- package/build/src/helpers.js +7 -0
- package/build/src/helpers.js.map +1 -1
- package/build/src/index.d.ts +2 -2
- package/build/src/index.d.ts.map +1 -1
- package/build/src/index.js +2 -1
- package/build/src/index.js.map +1 -1
- package/package.json +1 -1
package/build/src/helpers.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BlockObjectResponse, CommentObjectResponse, DatabaseObjectResponse, DataSourceObjectResponse, EquationRichTextItemResponse, ListDataSourceTemplatesResponse, MentionRichTextItemResponse, PageObjectResponse, PartialBlockObjectResponse, PartialCommentObjectResponse, PartialDatabaseObjectResponse, PartialDataSourceObjectResponse, PartialPageObjectResponse, PartialUserObjectResponse, RichTextItemResponse, RichTextItemResponseCommon, TextRichTextItemResponse, UserObjectResponse } from "./api-endpoints";
|
|
1
|
+
import { BlockObjectResponse, CommentObjectResponse, DatabaseObjectResponse, DataSourceObjectResponse, DataSourceViewObjectResponse, EquationRichTextItemResponse, ListDataSourceTemplatesResponse, MentionRichTextItemResponse, PageObjectResponse, PartialBlockObjectResponse, PartialCommentObjectResponse, PartialDatabaseObjectResponse, PartialDataSourceObjectResponse, PartialDataSourceViewObjectResponse, PartialPageObjectResponse, PartialUserObjectResponse, RichTextItemResponse, RichTextItemResponseCommon, TextRichTextItemResponse, UserObjectResponse } from "./api-endpoints";
|
|
2
2
|
import type Client from "./Client";
|
|
3
3
|
type PaginatedArgs = {
|
|
4
4
|
start_cursor?: string;
|
|
@@ -120,6 +120,10 @@ export declare function isFullUser(response: UserObjectResponse | PartialUserObj
|
|
|
120
120
|
* @returns `true` if `response` is a full `CommentObjectResponse`.
|
|
121
121
|
*/
|
|
122
122
|
export declare function isFullComment(response: CommentObjectResponse | PartialCommentObjectResponse): response is CommentObjectResponse;
|
|
123
|
+
/**
|
|
124
|
+
* @returns `true` if `response` is a full `DataSourceViewObjectResponse`.
|
|
125
|
+
*/
|
|
126
|
+
export declare function isFullView(response: DataSourceViewObjectResponse | PartialDataSourceViewObjectResponse): response is DataSourceViewObjectResponse;
|
|
123
127
|
/**
|
|
124
128
|
* @returns `true` if `richText` is a `TextRichTextItemResponse`.
|
|
125
129
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,4BAA4B,EAC5B,+BAA+B,EAC/B,2BAA2B,EAC3B,kBAAkB,EAClB,0BAA0B,EAC1B,4BAA4B,EAC5B,6BAA6B,EAC7B,+BAA+B,EAC/B,yBAAyB,EACzB,yBAAyB,EACzB,oBAAoB,EACpB,0BAA0B,EAC1B,wBAAwB,EACxB,kBAAkB,EACnB,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,MAAM,MAAM,UAAU,CAAA;AAElC,KAAK,aAAa,GAAG;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,KAAK,aAAa,CAAC,CAAC,IAAI;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,CAAC,EAAE,CAAA;IACZ,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,QAAQ,EAAE,OAAO,CAAA;CAClB,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAu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,GAAG,yBAAyB,GACvD,QAAQ,IAAI,kBAAkB,CAEhC;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,qBAAqB,GAAG,4BAA4B,GAC7D,QAAQ,IAAI,qBAAqB,CAEnC;AAED;;GAEG;AACH,wBAAgB,UAAU,CACxB,QAAQ,EAAE,4BAA4B,GAAG,mCAAmC,GAC3E,QAAQ,IAAI,4BAA4B,CAE1C;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,oBAAoB,GAC7B,QAAQ,IAAI,0BAA0B,GAAG,wBAAwB,CAEnE;AAED;;GAEG;AACH,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,oBAAoB,GAC7B,QAAQ,IAAI,0BAA0B,GAAG,4BAA4B,CAEvE;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,oBAAoB,GAC7B,QAAQ,IAAI,0BAA0B,GAAG,2BAA2B,CAEtE;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA0C9D;AAeD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAEpE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAE5D;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAYlE"}
|
package/build/src/helpers.js
CHANGED
|
@@ -11,6 +11,7 @@ exports.isFullDatabase = isFullDatabase;
|
|
|
11
11
|
exports.isFullPageOrDataSource = isFullPageOrDataSource;
|
|
12
12
|
exports.isFullUser = isFullUser;
|
|
13
13
|
exports.isFullComment = isFullComment;
|
|
14
|
+
exports.isFullView = isFullView;
|
|
14
15
|
exports.isTextRichTextItemResponse = isTextRichTextItemResponse;
|
|
15
16
|
exports.isEquationRichTextItemResponse = isEquationRichTextItemResponse;
|
|
16
17
|
exports.isMentionRichTextItemResponse = isMentionRichTextItemResponse;
|
|
@@ -173,6 +174,12 @@ function isFullUser(response) {
|
|
|
173
174
|
function isFullComment(response) {
|
|
174
175
|
return "created_by" in response;
|
|
175
176
|
}
|
|
177
|
+
/**
|
|
178
|
+
* @returns `true` if `response` is a full `DataSourceViewObjectResponse`.
|
|
179
|
+
*/
|
|
180
|
+
function isFullView(response) {
|
|
181
|
+
return "type" in response;
|
|
182
|
+
}
|
|
176
183
|
/**
|
|
177
184
|
* @returns `true` if `richText` is a `TextRichTextItemResponse`.
|
|
178
185
|
*/
|
package/build/src/helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/helpers.ts"],"names":[],"mappings":";;AAoDA,kDAaC;AAoBD,kDASC;AA0BD,gEAcC;AAiBD,gEASC;AAeD,kCAIC;AAKD,gCAIC;AAKD,4CAIC;AAKD,wCAIC;AASD,wDAQC;AAKD,gCAIC;AAKD,sCAIC;AAKD,gEAIC;AAKD,wEAIC;AAKD,sEAIC;AAqBD,0CA0CC;AAmBD,8CAEC;AAMD,sCAEC;AAMD,wCAYC;AAzVD;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;GA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,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 EquationRichTextItemResponse,\n ListDataSourceTemplatesResponse,\n MentionRichTextItemResponse,\n PageObjectResponse,\n PartialBlockObjectResponse,\n PartialCommentObjectResponse,\n PartialDatabaseObjectResponse,\n PartialDataSourceObjectResponse,\n PartialPageObjectResponse,\n PartialUserObjectResponse,\n RichTextItemResponse,\n RichTextItemResponseCommon,\n TextRichTextItemResponse,\n UserObjectResponse,\n} from \"./api-endpoints\"\nimport type Client from \"./Client\"\n\ntype PaginatedArgs = {\n start_cursor?: string\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 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 `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":";;AAsDA,kDAaC;AAoBD,kDASC;AA0BD,gEAcC;AAiBD,gEASC;AAeD,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;AAlWD;;;;;;;;;;;;;;;;;;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,OA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,OAAO,IAAI,CAAA;AACb,CAAC;AAED;;;;GAIG;AACH,SAAS,UAAU,CAAC,SAAiB;IACnC,MAAM,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 ListDataSourceTemplatesResponse,\n MentionRichTextItemResponse,\n PageObjectResponse,\n PartialBlockObjectResponse,\n PartialCommentObjectResponse,\n PartialDatabaseObjectResponse,\n PartialDataSourceObjectResponse,\n PartialDataSourceViewObjectResponse,\n PartialPageObjectResponse,\n PartialUserObjectResponse,\n RichTextItemResponse,\n RichTextItemResponseCommon,\n TextRichTextItemResponse,\n UserObjectResponse,\n} from \"./api-endpoints\"\nimport type Client from \"./Client\"\n\ntype PaginatedArgs = {\n start_cursor?: string\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 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"]}
|
package/build/src/index.d.ts
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
*/
|
|
9
|
-
export type { AppendBlockChildrenParameters, AppendBlockChildrenResponse, AudioBlockObjectResponse, BlockObjectRequest, BlockObjectResponse, BookmarkBlockObjectResponse, BotUserObjectResponse, BreadcrumbBlockObjectResponse, BulletedListItemBlockObjectResponse, ButtonPropertyItemObjectResponse, CalloutBlockObjectResponse, CheckboxPropertyItemObjectResponse, ChildDatabaseBlockObjectResponse, ChildPageBlockObjectResponse, CodeBlockObjectResponse, ColumnBlockObjectResponse, ColumnListBlockObjectResponse, CommentObjectResponse, CompleteFileUploadParameters, CompleteFileUploadResponse, CreateCommentParameters, CreateCommentResponse, CreateDatabaseParameters, CreateDatabaseResponse, CreateDataSourceParameters, CreateDataSourceResponse, CreatedByPropertyItemObjectResponse, CreatedTimePropertyItemObjectResponse, CreateFileUploadParameters, CreateFileUploadResponse, CreatePageParameters, CreatePageResponse, DatabaseObjectResponse, DataSourceObjectResponse, DatePropertyItemObjectResponse, DeleteBlockParameters, DeleteBlockResponse, DividerBlockObjectResponse, EmailPropertyItemObjectResponse, EmbedBlockObjectResponse, EquationBlockObjectResponse, EquationRichTextItemResponse, FileBlockObjectResponse, FilesPropertyItemObjectResponse, FileUploadObjectResponse, FormulaPropertyItemObjectResponse, GetBlockParameters, GetBlockResponse, GetCommentParameters, GetCommentResponse, GetDatabaseParameters, GetDatabaseResponse, GetDataSourceParameters, GetDataSourceResponse, GetFileUploadParameters, GetFileUploadResponse, GetPageParameters, GetPagePropertyParameters, GetPagePropertyResponse, GetPageResponse, GetSelfParameters, GetSelfResponse, GetUserParameters, GetUserResponse, GroupObjectResponse, Heading1BlockObjectResponse, Heading2BlockObjectResponse, Heading3BlockObjectResponse, ImageBlockObjectResponse, LastEditedByPropertyItemObjectResponse, LastEditedTimePropertyItemObjectResponse, LinkPreviewBlockObjectResponse, LinkToPageBlockObjectResponse, ListBlockChildrenParameters, ListBlockChildrenResponse, ListCommentsParameters, ListCommentsResponse, ListFileUploadsParameters, ListFileUploadsResponse, ListUsersParameters, ListUsersResponse, MeetingNotesBlockObjectResponse, MentionRichTextItemResponse, MovePageParameters, MovePageResponse, MultiSelectPropertyItemObjectResponse, NumberedListItemBlockObjectResponse, NumberPropertyItemObjectResponse, OauthIntrospectParameters, OauthIntrospectResponse, OauthRevokeParameters, OauthRevokeResponse, OauthTokenParameters, OauthTokenResponse, PageObjectResponse, ParagraphBlockObjectResponse, PartialBlockObjectResponse, PartialCommentObjectResponse, PartialDatabaseObjectResponse, PartialDataSourceObjectResponse, PartialPageObjectResponse, PartialUserObjectResponse, PdfBlockObjectResponse, PeoplePropertyItemObjectResponse, PersonUserObjectResponse, PhoneNumberPropertyItemObjectResponse, PropertyItemListResponse, PropertyItemObjectResponse, QueryDataSourceParameters, QueryDataSourceResponse, QuoteBlockObjectResponse, RelationPropertyItemObjectResponse, RichTextItemResponse, RichTextPropertyItemObjectResponse, RollupPropertyItemObjectResponse, SearchParameters, SearchResponse, SelectPropertyItemObjectResponse, SendFileUploadParameters, SendFileUploadResponse, StatusPropertyItemObjectResponse, SyncedBlockBlockObjectResponse, TableBlockObjectResponse, TableOfContentsBlockObjectResponse, TableRowBlockObjectResponse, TemplateBlockObjectResponse, TextRichTextItemResponse, TitlePropertyItemObjectResponse, ToDoBlockObjectResponse, ToggleBlockObjectResponse, TranscriptionBlockObjectResponse, UniqueIdPropertyItemObjectResponse, UnsupportedBlockObjectResponse, UpdateBlockParameters, UpdateBlockResponse, UpdateDatabaseParameters, UpdateDatabaseResponse, UpdateDataSourceParameters, UpdateDataSourceResponse, UpdatePageParameters, UpdatePageResponse, UrlPropertyItemObjectResponse, UserObjectResponse, VerificationPropertyItemObjectResponse, VideoBlockObjectResponse, } from "./api-endpoints";
|
|
9
|
+
export type { AppendBlockChildrenParameters, AppendBlockChildrenResponse, AudioBlockObjectResponse, BlockObjectRequest, BlockObjectResponse, BookmarkBlockObjectResponse, BotUserObjectResponse, BreadcrumbBlockObjectResponse, BulletedListItemBlockObjectResponse, ButtonPropertyItemObjectResponse, CalloutBlockObjectResponse, CheckboxPropertyItemObjectResponse, ChildDatabaseBlockObjectResponse, ChildPageBlockObjectResponse, CodeBlockObjectResponse, ColumnBlockObjectResponse, ColumnListBlockObjectResponse, CommentObjectResponse, CompleteFileUploadParameters, CompleteFileUploadResponse, CreateCommentParameters, CreateCommentResponse, CreateDatabaseParameters, CreateDatabaseResponse, CreateDataSourceParameters, CreateDataSourceResponse, CreateViewParameters, CreateViewResponse, CreateViewQueryParameters, CreateViewQueryResponse, DashboardRowResponse, DashboardWidgetResponse, CreatedByPropertyItemObjectResponse, CreatedTimePropertyItemObjectResponse, CreateFileUploadParameters, CreateFileUploadResponse, CreatePageParameters, CreatePageResponse, DatabaseObjectResponse, DataSourceObjectResponse, DataSourceViewObjectResponse, DatePropertyItemObjectResponse, DeleteBlockParameters, DeleteBlockResponse, DeletedViewQueryResponse, DeleteViewParameters, DeleteViewResponse, DeleteViewQueryParameters, DeleteViewQueryResponse, DividerBlockObjectResponse, EmailPropertyItemObjectResponse, EmbedBlockObjectResponse, EquationBlockObjectResponse, EquationRichTextItemResponse, FileBlockObjectResponse, FilesPropertyItemObjectResponse, FileUploadObjectResponse, FormulaPropertyItemObjectResponse, GetBlockParameters, GetBlockResponse, GetCommentParameters, GetCommentResponse, GetDatabaseParameters, GetDatabaseResponse, GetDataSourceParameters, GetDataSourceResponse, GetFileUploadParameters, GetFileUploadResponse, GetPageParameters, GetPagePropertyParameters, GetPagePropertyResponse, GetPageResponse, GetSelfParameters, GetSelfResponse, GetUserParameters, GetUserResponse, GetViewParameters, GetViewResponse, GetViewQueryResultsParameters, GetViewQueryResultsResponse, GroupObjectResponse, Heading1BlockObjectResponse, Heading2BlockObjectResponse, Heading3BlockObjectResponse, ImageBlockObjectResponse, LastEditedByPropertyItemObjectResponse, LastEditedTimePropertyItemObjectResponse, LinkPreviewBlockObjectResponse, LinkToPageBlockObjectResponse, ListBlockChildrenParameters, ListBlockChildrenResponse, ListCommentsParameters, ListCommentsResponse, ListDatabaseViewsParameters, ListDatabaseViewsResponse, ListFileUploadsParameters, ListFileUploadsResponse, ListUsersParameters, ListUsersResponse, MeetingNotesBlockObjectResponse, MentionRichTextItemResponse, MovePageParameters, MovePageResponse, MultiSelectPropertyItemObjectResponse, NumberedListItemBlockObjectResponse, NumberPropertyItemObjectResponse, OauthIntrospectParameters, OauthIntrospectResponse, OauthRevokeParameters, OauthRevokeResponse, OauthTokenParameters, OauthTokenResponse, PageObjectResponse, ParagraphBlockObjectResponse, PartialBlockObjectResponse, PartialCommentObjectResponse, PartialDatabaseObjectResponse, PartialDataSourceObjectResponse, PartialDataSourceViewObjectResponse, PartialPageObjectResponse, PartialUserObjectResponse, PdfBlockObjectResponse, PeoplePropertyItemObjectResponse, PersonUserObjectResponse, PhoneNumberPropertyItemObjectResponse, PropertyItemListResponse, PropertyItemObjectResponse, QueryDataSourceParameters, QueryDataSourceResponse, QuoteBlockObjectResponse, RelationPropertyItemObjectResponse, RichTextItemResponse, RichTextPropertyItemObjectResponse, RollupPropertyItemObjectResponse, SearchParameters, SearchResponse, SelectPropertyItemObjectResponse, SendFileUploadParameters, SendFileUploadResponse, StatusPropertyItemObjectResponse, SyncedBlockBlockObjectResponse, TableBlockObjectResponse, TableOfContentsBlockObjectResponse, TableRowBlockObjectResponse, TemplateBlockObjectResponse, TextRichTextItemResponse, TitlePropertyItemObjectResponse, ToDoBlockObjectResponse, ToggleBlockObjectResponse, TranscriptionBlockObjectResponse, UniqueIdPropertyItemObjectResponse, UnsupportedBlockObjectResponse, UpdateBlockParameters, UpdateBlockResponse, UpdateDatabaseParameters, UpdateDatabaseResponse, UpdateDataSourceParameters, UpdateDataSourceResponse, UpdatePageParameters, UpdatePageResponse, UpdateViewParameters, UpdateViewResponse, UrlPropertyItemObjectResponse, UserObjectResponse, ViewQueryResponse, VerificationPropertyItemObjectResponse, VideoBlockObjectResponse, } from "./api-endpoints";
|
|
10
10
|
export { default as Client } from "./Client";
|
|
11
11
|
export { LogLevel, Logger } from "./logging";
|
|
12
12
|
export { NotionErrorCode, APIErrorCode, ClientErrorCode, NotionClientError, APIResponseError, UnknownHTTPResponseError, RequestTimeoutError, InvalidPathParameterError, isNotionClientError, isHTTPResponseError, } from "./errors";
|
|
13
13
|
export type { RetryOptions } from "./Client";
|
|
14
|
-
export { collectPaginatedAPI, iteratePaginatedAPI, collectDataSourceTemplates, iterateDataSourceTemplates, isFullBlock, isFullDataSource, isFullDatabase, isFullPage, isFullUser, isFullComment, isFullPageOrDataSource, extractNotionId, extractDatabaseId, extractPageId, extractBlockId, } from "./helpers";
|
|
14
|
+
export { collectPaginatedAPI, iteratePaginatedAPI, collectDataSourceTemplates, iterateDataSourceTemplates, isFullBlock, isFullDataSource, isFullDatabase, isFullPage, isFullUser, isFullComment, isFullView, isFullPageOrDataSource, extractNotionId, extractDatabaseId, extractPageId, extractBlockId, } from "./helpers";
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
package/build/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,YAAY,EACV,6BAA6B,EAC7B,2BAA2B,EAC3B,wBAAwB,EACxB,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC3B,qBAAqB,EACrB,6BAA6B,EAC7B,mCAAmC,EACnC,gCAAgC,EAChC,0BAA0B,EAC1B,kCAAkC,EAClC,gCAAgC,EAChC,4BAA4B,EAC5B,uBAAuB,EACvB,yBAAyB,EACzB,6BAA6B,EAC7B,qBAAqB,EACrB,4BAA4B,EAC5B,0BAA0B,EAC1B,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,mCAAmC,EACnC,qCAAqC,EACrC,0BAA0B,EAC1B,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EACtB,wBAAwB,EACxB,8BAA8B,EAC9B,qBAAqB,EACrB,mBAAmB,EACnB,0BAA0B,EAC1B,+BAA+B,EAC/B,wBAAwB,EACxB,2BAA2B,EAC3B,4BAA4B,EAC5B,uBAAuB,EACvB,+BAA+B,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,UAAU,CAAA;AACjB,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,0BAA0B,EAC1B,0BAA0B,EAC1B,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,UAAU,EACV,aAAa,EACb,UAAU,EACV,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,cAAc,GACf,MAAM,WAAW,CAAA"}
|
package/build/src/index.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
*/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.extractBlockId = exports.extractPageId = exports.extractDatabaseId = exports.extractNotionId = exports.isFullPageOrDataSource = exports.isFullComment = exports.isFullUser = exports.isFullPage = exports.isFullDatabase = exports.isFullDataSource = exports.isFullBlock = exports.iterateDataSourceTemplates = exports.collectDataSourceTemplates = exports.iteratePaginatedAPI = exports.collectPaginatedAPI = exports.isHTTPResponseError = exports.isNotionClientError = exports.InvalidPathParameterError = exports.RequestTimeoutError = exports.UnknownHTTPResponseError = exports.APIResponseError = exports.ClientErrorCode = exports.APIErrorCode = exports.LogLevel = exports.Client = void 0;
|
|
11
|
+
exports.extractBlockId = exports.extractPageId = exports.extractDatabaseId = exports.extractNotionId = exports.isFullPageOrDataSource = exports.isFullView = exports.isFullComment = exports.isFullUser = exports.isFullPage = exports.isFullDatabase = exports.isFullDataSource = exports.isFullBlock = exports.iterateDataSourceTemplates = exports.collectDataSourceTemplates = exports.iteratePaginatedAPI = exports.collectPaginatedAPI = exports.isHTTPResponseError = exports.isNotionClientError = exports.InvalidPathParameterError = exports.RequestTimeoutError = exports.UnknownHTTPResponseError = exports.APIResponseError = exports.ClientErrorCode = exports.APIErrorCode = exports.LogLevel = exports.Client = void 0;
|
|
12
12
|
var Client_1 = require("./Client");
|
|
13
13
|
Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return Client_1.default; } });
|
|
14
14
|
var logging_1 = require("./logging");
|
|
@@ -34,6 +34,7 @@ Object.defineProperty(exports, "isFullDatabase", { enumerable: true, get: functi
|
|
|
34
34
|
Object.defineProperty(exports, "isFullPage", { enumerable: true, get: function () { return helpers_1.isFullPage; } });
|
|
35
35
|
Object.defineProperty(exports, "isFullUser", { enumerable: true, get: function () { return helpers_1.isFullUser; } });
|
|
36
36
|
Object.defineProperty(exports, "isFullComment", { enumerable: true, get: function () { return helpers_1.isFullComment; } });
|
|
37
|
+
Object.defineProperty(exports, "isFullView", { enumerable: true, get: function () { return helpers_1.isFullView; } });
|
|
37
38
|
Object.defineProperty(exports, "isFullPageOrDataSource", { enumerable: true, get: function () { return helpers_1.isFullPageOrDataSource; } });
|
|
38
39
|
Object.defineProperty(exports, "extractNotionId", { enumerable: true, get: function () { return helpers_1.extractNotionId; } });
|
|
39
40
|
Object.defineProperty(exports, "extractDatabaseId", { enumerable: true, get: function () { return helpers_1.extractDatabaseId; } });
|
package/build/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AA2KH,mCAA4C;AAAnC,gGAAA,OAAO,OAAU;AAC1B,qCAA4C;AAAnC,mGAAA,QAAQ,OAAA;AACjB,mCAciB;AAXf,sGAAA,YAAY,OAAA;AACZ,yGAAA,eAAe,OAAA;AAGf,0GAAA,gBAAgB,OAAA;AAChB,kHAAA,wBAAwB,OAAA;AACxB,6GAAA,mBAAmB,OAAA;AACnB,mHAAA,yBAAyB,OAAA;AACzB,gBAAgB;AAChB,6GAAA,mBAAmB,OAAA;AACnB,6GAAA,mBAAmB,OAAA;AAGrB,qCAiBkB;AAhBhB,8GAAA,mBAAmB,OAAA;AACnB,8GAAA,mBAAmB,OAAA;AACnB,qHAAA,0BAA0B,OAAA;AAC1B,qHAAA,0BAA0B,OAAA;AAC1B,sGAAA,WAAW,OAAA;AACX,2GAAA,gBAAgB,OAAA;AAChB,yGAAA,cAAc,OAAA;AACd,qGAAA,UAAU,OAAA;AACV,qGAAA,UAAU,OAAA;AACV,wGAAA,aAAa,OAAA;AACb,qGAAA,UAAU,OAAA;AACV,iHAAA,sBAAsB,OAAA;AACtB,0GAAA,eAAe,OAAA;AACf,4GAAA,iBAAiB,OAAA;AACjB,wGAAA,aAAa,OAAA;AACb,yGAAA,cAAc,OAAA","sourcesContent":["/**\n * index.ts\n *\n * This file is the entry point for the Notion SDK.\n * It exports the Client class and all the API endpoints.\n *\n * @packageDocumentation\n */\n\nexport type {\n AppendBlockChildrenParameters,\n AppendBlockChildrenResponse,\n AudioBlockObjectResponse,\n BlockObjectRequest,\n BlockObjectResponse,\n BookmarkBlockObjectResponse,\n BotUserObjectResponse,\n BreadcrumbBlockObjectResponse,\n BulletedListItemBlockObjectResponse,\n ButtonPropertyItemObjectResponse,\n CalloutBlockObjectResponse,\n CheckboxPropertyItemObjectResponse,\n ChildDatabaseBlockObjectResponse,\n ChildPageBlockObjectResponse,\n CodeBlockObjectResponse,\n ColumnBlockObjectResponse,\n ColumnListBlockObjectResponse,\n CommentObjectResponse,\n CompleteFileUploadParameters,\n CompleteFileUploadResponse,\n CreateCommentParameters,\n CreateCommentResponse,\n CreateDatabaseParameters,\n CreateDatabaseResponse,\n CreateDataSourceParameters,\n CreateDataSourceResponse,\n CreateViewParameters,\n CreateViewResponse,\n CreateViewQueryParameters,\n CreateViewQueryResponse,\n DashboardRowResponse,\n DashboardWidgetResponse,\n CreatedByPropertyItemObjectResponse,\n CreatedTimePropertyItemObjectResponse,\n CreateFileUploadParameters,\n CreateFileUploadResponse,\n CreatePageParameters,\n CreatePageResponse,\n DatabaseObjectResponse,\n DataSourceObjectResponse,\n DataSourceViewObjectResponse,\n DatePropertyItemObjectResponse,\n DeleteBlockParameters,\n DeleteBlockResponse,\n DeletedViewQueryResponse,\n DeleteViewParameters,\n DeleteViewResponse,\n DeleteViewQueryParameters,\n DeleteViewQueryResponse,\n DividerBlockObjectResponse,\n EmailPropertyItemObjectResponse,\n EmbedBlockObjectResponse,\n EquationBlockObjectResponse,\n EquationRichTextItemResponse,\n FileBlockObjectResponse,\n FilesPropertyItemObjectResponse,\n FileUploadObjectResponse,\n FormulaPropertyItemObjectResponse,\n GetBlockParameters,\n GetBlockResponse,\n GetCommentParameters,\n GetCommentResponse,\n GetDatabaseParameters,\n GetDatabaseResponse,\n GetDataSourceParameters,\n GetDataSourceResponse,\n GetFileUploadParameters,\n GetFileUploadResponse,\n GetPageParameters,\n GetPagePropertyParameters,\n GetPagePropertyResponse,\n GetPageResponse,\n GetSelfParameters,\n GetSelfResponse,\n GetUserParameters,\n GetUserResponse,\n GetViewParameters,\n GetViewResponse,\n GetViewQueryResultsParameters,\n GetViewQueryResultsResponse,\n GroupObjectResponse,\n Heading1BlockObjectResponse,\n Heading2BlockObjectResponse,\n Heading3BlockObjectResponse,\n ImageBlockObjectResponse,\n LastEditedByPropertyItemObjectResponse,\n LastEditedTimePropertyItemObjectResponse,\n LinkPreviewBlockObjectResponse,\n LinkToPageBlockObjectResponse,\n ListBlockChildrenParameters,\n ListBlockChildrenResponse,\n ListCommentsParameters,\n ListCommentsResponse,\n ListDatabaseViewsParameters,\n ListDatabaseViewsResponse,\n ListFileUploadsParameters,\n ListFileUploadsResponse,\n ListUsersParameters,\n ListUsersResponse,\n MeetingNotesBlockObjectResponse,\n MentionRichTextItemResponse,\n MovePageParameters,\n MovePageResponse,\n MultiSelectPropertyItemObjectResponse,\n NumberedListItemBlockObjectResponse,\n NumberPropertyItemObjectResponse,\n OauthIntrospectParameters,\n OauthIntrospectResponse,\n OauthRevokeParameters,\n OauthRevokeResponse,\n OauthTokenParameters,\n OauthTokenResponse,\n PageObjectResponse,\n ParagraphBlockObjectResponse,\n PartialBlockObjectResponse,\n PartialCommentObjectResponse,\n PartialDatabaseObjectResponse,\n PartialDataSourceObjectResponse,\n PartialDataSourceViewObjectResponse,\n PartialPageObjectResponse,\n PartialUserObjectResponse,\n PdfBlockObjectResponse,\n PeoplePropertyItemObjectResponse,\n PersonUserObjectResponse,\n PhoneNumberPropertyItemObjectResponse,\n PropertyItemListResponse,\n PropertyItemObjectResponse,\n QueryDataSourceParameters,\n QueryDataSourceResponse,\n QuoteBlockObjectResponse,\n RelationPropertyItemObjectResponse,\n RichTextItemResponse,\n RichTextPropertyItemObjectResponse,\n RollupPropertyItemObjectResponse,\n SearchParameters,\n SearchResponse,\n SelectPropertyItemObjectResponse,\n SendFileUploadParameters,\n SendFileUploadResponse,\n StatusPropertyItemObjectResponse,\n SyncedBlockBlockObjectResponse,\n TableBlockObjectResponse,\n TableOfContentsBlockObjectResponse,\n TableRowBlockObjectResponse,\n TemplateBlockObjectResponse,\n TextRichTextItemResponse,\n TitlePropertyItemObjectResponse,\n ToDoBlockObjectResponse,\n ToggleBlockObjectResponse,\n TranscriptionBlockObjectResponse,\n UniqueIdPropertyItemObjectResponse,\n UnsupportedBlockObjectResponse,\n UpdateBlockParameters,\n UpdateBlockResponse,\n UpdateDatabaseParameters,\n UpdateDatabaseResponse,\n UpdateDataSourceParameters,\n UpdateDataSourceResponse,\n UpdatePageParameters,\n UpdatePageResponse,\n UpdateViewParameters,\n UpdateViewResponse,\n UrlPropertyItemObjectResponse,\n UserObjectResponse,\n ViewQueryResponse,\n VerificationPropertyItemObjectResponse,\n VideoBlockObjectResponse,\n} from \"./api-endpoints\"\nexport { default as Client } from \"./Client\"\nexport { LogLevel, Logger } from \"./logging\"\nexport {\n // Error codes\n NotionErrorCode,\n APIErrorCode,\n ClientErrorCode,\n // Error types\n NotionClientError,\n APIResponseError,\n UnknownHTTPResponseError,\n RequestTimeoutError,\n InvalidPathParameterError,\n // Error helpers\n isNotionClientError,\n isHTTPResponseError,\n} from \"./errors\"\nexport type { RetryOptions } from \"./Client\"\nexport {\n collectPaginatedAPI,\n iteratePaginatedAPI,\n collectDataSourceTemplates,\n iterateDataSourceTemplates,\n isFullBlock,\n isFullDataSource,\n isFullDatabase,\n isFullPage,\n isFullUser,\n isFullComment,\n isFullView,\n isFullPageOrDataSource,\n extractNotionId,\n extractDatabaseId,\n extractPageId,\n extractBlockId,\n} from \"./helpers\"\n"]}
|