@visus-io/notion-sdk-ts 2.0.1 → 2.1.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/README.md +25 -9
- package/dist/api/base.api.d.ts +1 -1
- package/dist/api/blocks.api.d.ts +260 -80
- package/dist/api/comments.api.d.ts +7 -7
- package/dist/api/dataSources.api.d.ts +12 -12
- package/dist/api/databases.api.d.ts +12 -12
- package/dist/api/fileUploads.api.d.ts +2 -2
- package/dist/api/pages.api.d.ts +29 -29
- package/dist/api/users.api.d.ts +1 -1
- package/dist/helpers/block.helpers.d.ts +4 -0
- package/dist/helpers/block.helpers.js +11 -0
- package/dist/models/base.model.d.ts +2 -2
- package/dist/schemas/block.schema.d.ts +261 -81
- package/dist/schemas/block.schema.js +157 -81
- package/dist/schemas/comment.schema.d.ts +9 -9
- package/dist/schemas/comment.schema.js +54 -20
- package/dist/schemas/dataSource.schema.d.ts +13 -13
- package/dist/schemas/dataSource.schema.js +46 -12
- package/dist/schemas/database.schema.d.ts +13 -13
- package/dist/schemas/database.schema.js +51 -17
- package/dist/schemas/emoji.schema.d.ts +1 -1
- package/dist/schemas/emoji.schema.js +37 -4
- package/dist/schemas/file.schema.d.ts +3 -3
- package/dist/schemas/file.schema.js +49 -15
- package/dist/schemas/fileUpload.schema.d.ts +3 -3
- package/dist/schemas/fileUpload.schema.js +47 -13
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/page.schema.d.ts +30 -30
- package/dist/schemas/page.schema.js +47 -13
- package/dist/schemas/pageProperties.schema.d.ts +47 -47
- package/dist/schemas/pageProperties.schema.js +162 -128
- package/dist/schemas/pagination.schema.d.ts +1 -1
- package/dist/schemas/pagination.schema.js +40 -7
- package/dist/schemas/parent.schema.d.ts +1 -1
- package/dist/schemas/parent.schema.js +51 -18
- package/dist/schemas/propertyObjects.schema.d.ts +1 -1
- package/dist/schemas/propertyObjects.schema.js +194 -161
- package/dist/schemas/richText.schema.d.ts +7 -7
- package/dist/schemas/richText.schema.js +95 -56
- package/dist/schemas/shared.schema.d.ts +15 -0
- package/dist/schemas/shared.schema.js +54 -0
- package/dist/schemas/user.schema.d.ts +3 -3
- package/dist/schemas/user.schema.js +63 -30
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -26,9 +26,11 @@ A type-safe TypeScript SDK for the Notion API with Zod validation, OOP models, a
|
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
28
|
npm install @visus-io/notion-sdk-ts
|
|
29
|
+
# or
|
|
30
|
+
bun add @visus-io/notion-sdk-ts
|
|
29
31
|
```
|
|
30
32
|
|
|
31
|
-
**Requirements:** Node.js 18+ (uses native `fetch`)
|
|
33
|
+
**Requirements:** Node.js 18+ or Bun 1.3.10+ (uses native `fetch`)
|
|
32
34
|
|
|
33
35
|
## Quick Start
|
|
34
36
|
|
|
@@ -135,19 +137,33 @@ See the [**Migration Guide**](https://github.com/visus-io/notion-sdk-ts/wiki/Mig
|
|
|
135
137
|
|
|
136
138
|
## Development
|
|
137
139
|
|
|
140
|
+
This project uses [Bun](https://bun.sh) as its package manager for faster dependency installation and script execution.
|
|
141
|
+
|
|
142
|
+
### Prerequisites
|
|
143
|
+
|
|
144
|
+
Install Bun if you haven't already:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
curl -fsSL https://bun.sh/install | bash
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Development Commands
|
|
151
|
+
|
|
138
152
|
```bash
|
|
139
|
-
|
|
140
|
-
|
|
153
|
+
bun install # Install dependencies
|
|
154
|
+
bun run build # Compile TypeScript
|
|
141
155
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
156
|
+
bun run test # Run tests
|
|
157
|
+
bun run test:watch # Watch mode
|
|
158
|
+
bun run test:coverage # Coverage report
|
|
145
159
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
160
|
+
bun run lint # ESLint
|
|
161
|
+
bun run lint:fix # Auto-fix
|
|
162
|
+
bun run format # Prettier
|
|
149
163
|
```
|
|
150
164
|
|
|
165
|
+
> **Note:** While this project uses Bun for development, the published package works with both Node.js 18+ and Bun 1.3.10+.
|
|
166
|
+
|
|
151
167
|
See [**Development & Contributing**](https://github.com/visus-io/notion-sdk-ts/wiki/Development) for more details.
|
|
152
168
|
|
|
153
169
|
## Links
|
package/dist/api/base.api.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NotionClient } from '../client';
|
|
2
2
|
import type { PaginatedList, PaginatedListType, PaginationParameters } from '../schemas';
|
|
3
|
-
import type
|
|
3
|
+
import type * as z from 'zod';
|
|
4
4
|
/**
|
|
5
5
|
* Configuration for API resource operations, including paths, schemas, and model classes.
|
|
6
6
|
*
|