@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.
Files changed (45) hide show
  1. package/README.md +25 -9
  2. package/dist/api/base.api.d.ts +1 -1
  3. package/dist/api/blocks.api.d.ts +260 -80
  4. package/dist/api/comments.api.d.ts +7 -7
  5. package/dist/api/dataSources.api.d.ts +12 -12
  6. package/dist/api/databases.api.d.ts +12 -12
  7. package/dist/api/fileUploads.api.d.ts +2 -2
  8. package/dist/api/pages.api.d.ts +29 -29
  9. package/dist/api/users.api.d.ts +1 -1
  10. package/dist/helpers/block.helpers.d.ts +4 -0
  11. package/dist/helpers/block.helpers.js +11 -0
  12. package/dist/models/base.model.d.ts +2 -2
  13. package/dist/schemas/block.schema.d.ts +261 -81
  14. package/dist/schemas/block.schema.js +157 -81
  15. package/dist/schemas/comment.schema.d.ts +9 -9
  16. package/dist/schemas/comment.schema.js +54 -20
  17. package/dist/schemas/dataSource.schema.d.ts +13 -13
  18. package/dist/schemas/dataSource.schema.js +46 -12
  19. package/dist/schemas/database.schema.d.ts +13 -13
  20. package/dist/schemas/database.schema.js +51 -17
  21. package/dist/schemas/emoji.schema.d.ts +1 -1
  22. package/dist/schemas/emoji.schema.js +37 -4
  23. package/dist/schemas/file.schema.d.ts +3 -3
  24. package/dist/schemas/file.schema.js +49 -15
  25. package/dist/schemas/fileUpload.schema.d.ts +3 -3
  26. package/dist/schemas/fileUpload.schema.js +47 -13
  27. package/dist/schemas/index.d.ts +1 -0
  28. package/dist/schemas/index.js +1 -0
  29. package/dist/schemas/page.schema.d.ts +30 -30
  30. package/dist/schemas/page.schema.js +47 -13
  31. package/dist/schemas/pageProperties.schema.d.ts +47 -47
  32. package/dist/schemas/pageProperties.schema.js +162 -128
  33. package/dist/schemas/pagination.schema.d.ts +1 -1
  34. package/dist/schemas/pagination.schema.js +40 -7
  35. package/dist/schemas/parent.schema.d.ts +1 -1
  36. package/dist/schemas/parent.schema.js +51 -18
  37. package/dist/schemas/propertyObjects.schema.d.ts +1 -1
  38. package/dist/schemas/propertyObjects.schema.js +194 -161
  39. package/dist/schemas/richText.schema.d.ts +7 -7
  40. package/dist/schemas/richText.schema.js +95 -56
  41. package/dist/schemas/shared.schema.d.ts +15 -0
  42. package/dist/schemas/shared.schema.js +54 -0
  43. package/dist/schemas/user.schema.d.ts +3 -3
  44. package/dist/schemas/user.schema.js +63 -30
  45. 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
- npm install # Install dependencies
140
- npm run build # Compile TypeScript
153
+ bun install # Install dependencies
154
+ bun run build # Compile TypeScript
141
155
 
142
- npm test # Run tests
143
- npm run test:watch # Watch mode
144
- npm run test:coverage # Coverage report
156
+ bun run test # Run tests
157
+ bun run test:watch # Watch mode
158
+ bun run test:coverage # Coverage report
145
159
 
146
- npm run lint # ESLint
147
- npm run lint:fix # Auto-fix
148
- npm run format # Prettier
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
@@ -1,6 +1,6 @@
1
1
  import type { NotionClient } from '../client';
2
2
  import type { PaginatedList, PaginatedListType, PaginationParameters } from '../schemas';
3
- import type { z } from 'zod';
3
+ import type * as z from 'zod';
4
4
  /**
5
5
  * Configuration for API resource operations, including paths, schemas, and model classes.
6
6
  *