@visus-io/notion-sdk-ts 3.1.1 → 3.2.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.
- package/README.md +3 -3
- package/dist/api/blocks.api.d.ts +1083 -224
- package/dist/api/blocks.api.js +4 -0
- package/dist/api/comments.api.d.ts +19 -1
- package/dist/api/comments.api.js +1 -1
- package/dist/api/dataSources.api.d.ts +41 -0
- package/dist/api/databases.api.d.ts +52 -5
- package/dist/api/databases.api.js +5 -3
- package/dist/api/fileUploads.api.d.ts +17 -7
- package/dist/api/fileUploads.api.js +30 -16
- package/dist/api/pages.api.d.ts +49 -0
- package/dist/client.d.ts +33 -2
- package/dist/client.js +88 -21
- package/dist/errors.d.ts +7 -0
- package/dist/errors.js +7 -0
- package/dist/helpers/filter.helpers.d.ts +11 -4
- package/dist/helpers/filter.helpers.js +73 -30
- package/dist/helpers/pagination.helpers.d.ts +7 -2
- package/dist/helpers/pagination.helpers.js +26 -5
- package/dist/models/dataSource.model.d.ts +6 -1
- package/dist/models/dataSource.model.js +7 -0
- package/dist/models/database.model.d.ts +5 -1
- package/dist/models/database.model.js +6 -0
- package/dist/models/page.model.d.ts +20 -1
- package/dist/models/page.model.js +33 -2
- package/dist/models/user.model.d.ts +5 -0
- package/dist/models/user.model.js +10 -0
- package/dist/schemas/block.schema.d.ts +1082 -224
- package/dist/schemas/block.schema.js +40 -25
- package/dist/schemas/comment.schema.d.ts +18 -0
- package/dist/schemas/dataSource.schema.d.ts +41 -0
- package/dist/schemas/dataSource.schema.js +3 -0
- package/dist/schemas/database.schema.d.ts +54 -0
- package/dist/schemas/database.schema.js +11 -1
- package/dist/schemas/meetingNotesQuery.schema.d.ts +1082 -224
- package/dist/schemas/page.schema.d.ts +49 -0
- package/dist/schemas/page.schema.js +2 -1
- package/dist/schemas/pageMarkdown.schema.js +1 -1
- package/dist/schemas/pageProperties.schema.d.ts +105 -1
- package/dist/schemas/pageProperties.schema.js +17 -1
- package/dist/schemas/pagination.schema.d.ts +1 -1
- package/dist/schemas/propertyObjects.schema.js +2 -1
- package/dist/schemas/richText.schema.d.ts +36 -0
- package/dist/schemas/richText.schema.js +21 -0
- package/dist/schemas/shared.schema.d.ts +3 -7
- package/dist/schemas/shared.schema.js +5 -9
- package/dist/schemas/view.schema.d.ts +49 -0
- package/dist/validation.d.ts +8 -0
- package/dist/validation.js +16 -0
- package/package.json +16 -15
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ A type-safe TypeScript SDK for the Notion API with Zod validation, OOP models, a
|
|
|
19
19
|
- **Automatic pagination** `paginate()`, `paginateIterator()`, and `paginateWithMetadata()` helpers automatically fetch all pages, plus `iterateAllDataSourceRows()`/`collectAllDataSourceRows()` to work around the 10,000-result query cap
|
|
20
20
|
- **Automatic rate limiting** Respects `Retry-After` header with exponential backoff fallback (configurable)
|
|
21
21
|
- **Client-side size validation** Enforces Notion API size limits before sending requests
|
|
22
|
-
- **Zero bloat** Single runtime dependency (`zod`); uses built-in `fetch` (Node
|
|
22
|
+
- **Zero bloat** Single runtime dependency (`zod`); uses built-in `fetch` (Node 22+)
|
|
23
23
|
|
|
24
24
|
## Installation
|
|
25
25
|
|
|
@@ -29,7 +29,7 @@ npm install @visus-io/notion-sdk-ts
|
|
|
29
29
|
bun add @visus-io/notion-sdk-ts
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
**Requirements:** Node.js
|
|
32
|
+
**Requirements:** Node.js 22+ or Bun 1.4.0+ (uses native `fetch`)
|
|
33
33
|
|
|
34
34
|
## Quick Start
|
|
35
35
|
|
|
@@ -118,7 +118,7 @@ bun run docs:dev # Run the docs site locally
|
|
|
118
118
|
bun run docs:build # Build the docs site
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
-
> **Note:** While this project uses Bun for development, the published package works with both Node.js
|
|
121
|
+
> **Note:** While this project uses Bun for development, the published package works with both Node.js 22+ and Bun 1.4.0+.
|
|
122
122
|
|
|
123
123
|
See [**ARCHITECTURE.md**](./ARCHITECTURE.md) for project structure and architecture.
|
|
124
124
|
|