@visus-io/notion-sdk-ts 3.0.2 → 3.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 +7 -6
- package/dist/api/asyncTasks.api.d.ts +70 -0
- package/dist/api/asyncTasks.api.js +68 -0
- package/dist/api/base.api.js +1 -0
- package/dist/api/blocks.api.d.ts +433 -73
- package/dist/api/blocks.api.js +39 -0
- package/dist/api/comments.api.d.ts +40 -5
- package/dist/api/comments.api.js +43 -1
- package/dist/api/customEmojis.api.d.ts +36 -0
- package/dist/api/customEmojis.api.js +36 -0
- package/dist/api/dataSources.api.d.ts +62 -11
- package/dist/api/dataSources.api.js +22 -0
- package/dist/api/databases.api.d.ts +40 -6
- package/dist/api/fileUploads.api.d.ts +1 -1
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.js +7 -1
- package/dist/api/pages.api.d.ts +142 -10
- package/dist/api/pages.api.js +64 -0
- package/dist/api/search.api.d.ts +10 -2
- package/dist/api/users.api.d.ts +1 -0
- package/dist/api/views.api.d.ts +284 -0
- package/dist/api/views.api.js +169 -0
- package/dist/client.js +3 -3
- package/dist/errors.d.ts +5 -1
- package/dist/errors.js +6 -0
- package/dist/helpers/block.helpers.d.ts +38 -1
- package/dist/helpers/block.helpers.js +45 -3
- package/dist/helpers/file.helpers.d.ts +36 -1
- package/dist/helpers/file.helpers.js +26 -4
- package/dist/helpers/filter.helpers.d.ts +6 -6
- package/dist/helpers/index.d.ts +3 -2
- package/dist/helpers/index.js +5 -1
- package/dist/helpers/pagination.helpers.d.ts +56 -0
- package/dist/helpers/pagination.helpers.js +86 -0
- package/dist/helpers/property.helpers.d.ts +29 -0
- package/dist/helpers/property.helpers.js +27 -0
- package/dist/helpers/webhook.helpers.d.ts +52 -0
- package/dist/helpers/webhook.helpers.js +81 -0
- package/dist/models/asyncTask.model.d.ts +59 -0
- package/dist/models/asyncTask.model.js +89 -0
- package/dist/models/block.model.js +4 -1
- package/dist/models/customEmoji.model.d.ts +28 -0
- package/dist/models/customEmoji.model.js +42 -0
- package/dist/models/dataSource.model.d.ts +3 -3
- package/dist/models/dataSource.model.js +1 -1
- package/dist/models/database.model.d.ts +7 -3
- package/dist/models/database.model.js +7 -1
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +7 -1
- package/dist/models/page.model.d.ts +2 -0
- package/dist/models/page.model.js +6 -0
- package/dist/models/view.model.d.ts +79 -0
- package/dist/models/view.model.js +119 -0
- package/dist/notion.d.ts +26 -7
- package/dist/notion.js +19 -3
- package/dist/schemas/asyncTask.schema.d.ts +42 -0
- package/dist/schemas/asyncTask.schema.js +83 -0
- package/dist/schemas/block.schema.d.ts +378 -72
- package/dist/schemas/block.schema.js +33 -7
- package/dist/schemas/comment.schema.d.ts +8 -3
- package/dist/schemas/customEmoji.schema.d.ts +13 -0
- package/dist/schemas/customEmoji.schema.js +48 -0
- package/dist/schemas/dataSource.schema.d.ts +68 -10
- package/dist/schemas/dataSource.schema.js +22 -4
- package/dist/schemas/database.schema.d.ts +38 -6
- package/dist/schemas/database.schema.js +3 -2
- package/dist/schemas/fileUpload.schema.d.ts +1 -1
- package/dist/schemas/icon.schema.d.ts +92 -0
- package/dist/schemas/icon.schema.js +88 -0
- package/dist/schemas/index.d.ts +6 -0
- package/dist/schemas/index.js +6 -0
- package/dist/schemas/meetingNotesQuery.schema.d.ts +4187 -0
- package/dist/schemas/meetingNotesQuery.schema.js +62 -0
- package/dist/schemas/page.schema.d.ts +46 -9
- package/dist/schemas/page.schema.js +4 -2
- package/dist/schemas/pageMarkdown.schema.d.ts +59 -0
- package/dist/schemas/pageMarkdown.schema.js +65 -0
- package/dist/schemas/pageProperties.schema.d.ts +30 -18
- package/dist/schemas/pageProperties.schema.js +2 -3
- package/dist/schemas/pagination.schema.d.ts +30 -3
- package/dist/schemas/pagination.schema.js +18 -1
- package/dist/schemas/parent.schema.d.ts +10 -1
- package/dist/schemas/parent.schema.js +9 -3
- package/dist/schemas/propertyObjects.schema.d.ts +12 -12
- package/dist/schemas/richText.schema.d.ts +8 -6
- package/dist/schemas/richText.schema.js +1 -1
- package/dist/schemas/user.schema.d.ts +2 -0
- package/dist/schemas/user.schema.js +2 -1
- package/dist/schemas/view.schema.d.ts +1077 -0
- package/dist/schemas/view.schema.js +115 -0
- package/package.json +2 -2
|
@@ -27,6 +27,7 @@ declare const createdByPropertySchema: z.ZodObject<{
|
|
|
27
27
|
avatar_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodNull]>>;
|
|
28
28
|
person: z.ZodObject<{
|
|
29
29
|
email: z.ZodEmail;
|
|
30
|
+
email_verified: z.ZodOptional<z.ZodBoolean>;
|
|
30
31
|
}, z.core.$strip>;
|
|
31
32
|
}, z.core.$strip>, z.ZodObject<{
|
|
32
33
|
object: z.ZodLiteral<"user">;
|
|
@@ -131,6 +132,7 @@ declare const lastEditedByPropertySchema: z.ZodObject<{
|
|
|
131
132
|
avatar_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodNull]>>;
|
|
132
133
|
person: z.ZodObject<{
|
|
133
134
|
email: z.ZodEmail;
|
|
135
|
+
email_verified: z.ZodOptional<z.ZodBoolean>;
|
|
134
136
|
}, z.core.$strip>;
|
|
135
137
|
}, z.core.$strip>, z.ZodObject<{
|
|
136
138
|
object: z.ZodLiteral<"user">;
|
|
@@ -170,11 +172,11 @@ declare const multiSelectPropertySchema: z.ZodObject<{
|
|
|
170
172
|
id: z.ZodString;
|
|
171
173
|
name: z.ZodString;
|
|
172
174
|
color: z.ZodEnum<{
|
|
175
|
+
default: "default";
|
|
173
176
|
blue: "blue";
|
|
174
177
|
blue_background: "blue_background";
|
|
175
178
|
brown: "brown";
|
|
176
179
|
brown_background: "brown_background";
|
|
177
|
-
default: "default";
|
|
178
180
|
gray: "gray";
|
|
179
181
|
gray_background: "gray_background";
|
|
180
182
|
green: "green";
|
|
@@ -210,6 +212,7 @@ declare const peoplePropertySchema: z.ZodObject<{
|
|
|
210
212
|
avatar_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodNull]>>;
|
|
211
213
|
person: z.ZodObject<{
|
|
212
214
|
email: z.ZodEmail;
|
|
215
|
+
email_verified: z.ZodOptional<z.ZodBoolean>;
|
|
213
216
|
}, z.core.$strip>;
|
|
214
217
|
}, z.core.$strip>, z.ZodObject<{
|
|
215
218
|
object: z.ZodLiteral<"user">;
|
|
@@ -269,11 +272,11 @@ declare const richTextPropertySchema: z.ZodObject<{
|
|
|
269
272
|
underline: z.ZodBoolean;
|
|
270
273
|
code: z.ZodBoolean;
|
|
271
274
|
color: z.ZodEnum<{
|
|
275
|
+
default: "default";
|
|
272
276
|
blue: "blue";
|
|
273
277
|
blue_background: "blue_background";
|
|
274
278
|
brown: "brown";
|
|
275
279
|
brown_background: "brown_background";
|
|
276
|
-
default: "default";
|
|
277
280
|
gray: "gray";
|
|
278
281
|
gray_background: "gray_background";
|
|
279
282
|
green: "green";
|
|
@@ -338,6 +341,7 @@ declare const richTextPropertySchema: z.ZodObject<{
|
|
|
338
341
|
avatar_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodNull]>>;
|
|
339
342
|
person: z.ZodObject<{
|
|
340
343
|
email: z.ZodEmail;
|
|
344
|
+
email_verified: z.ZodOptional<z.ZodBoolean>;
|
|
341
345
|
}, z.core.$strip>;
|
|
342
346
|
}, z.core.$strip>, z.ZodObject<{
|
|
343
347
|
object: z.ZodLiteral<"user">;
|
|
@@ -370,11 +374,11 @@ declare const richTextPropertySchema: z.ZodObject<{
|
|
|
370
374
|
underline: z.ZodBoolean;
|
|
371
375
|
code: z.ZodBoolean;
|
|
372
376
|
color: z.ZodEnum<{
|
|
377
|
+
default: "default";
|
|
373
378
|
blue: "blue";
|
|
374
379
|
blue_background: "blue_background";
|
|
375
380
|
brown: "brown";
|
|
376
381
|
brown_background: "brown_background";
|
|
377
|
-
default: "default";
|
|
378
382
|
gray: "gray";
|
|
379
383
|
gray_background: "gray_background";
|
|
380
384
|
green: "green";
|
|
@@ -405,11 +409,11 @@ declare const richTextPropertySchema: z.ZodObject<{
|
|
|
405
409
|
underline: z.ZodBoolean;
|
|
406
410
|
code: z.ZodBoolean;
|
|
407
411
|
color: z.ZodEnum<{
|
|
412
|
+
default: "default";
|
|
408
413
|
blue: "blue";
|
|
409
414
|
blue_background: "blue_background";
|
|
410
415
|
brown: "brown";
|
|
411
416
|
brown_background: "brown_background";
|
|
412
|
-
default: "default";
|
|
413
417
|
gray: "gray";
|
|
414
418
|
gray_background: "gray_background";
|
|
415
419
|
green: "green";
|
|
@@ -485,11 +489,11 @@ declare const selectPropertySchema: z.ZodObject<{
|
|
|
485
489
|
id: z.ZodString;
|
|
486
490
|
name: z.ZodString;
|
|
487
491
|
color: z.ZodEnum<{
|
|
492
|
+
default: "default";
|
|
488
493
|
blue: "blue";
|
|
489
494
|
blue_background: "blue_background";
|
|
490
495
|
brown: "brown";
|
|
491
496
|
brown_background: "brown_background";
|
|
492
|
-
default: "default";
|
|
493
497
|
gray: "gray";
|
|
494
498
|
gray_background: "gray_background";
|
|
495
499
|
green: "green";
|
|
@@ -515,11 +519,11 @@ declare const statusPropertySchema: z.ZodObject<{
|
|
|
515
519
|
id: z.ZodString;
|
|
516
520
|
name: z.ZodString;
|
|
517
521
|
color: z.ZodEnum<{
|
|
522
|
+
default: "default";
|
|
518
523
|
blue: "blue";
|
|
519
524
|
blue_background: "blue_background";
|
|
520
525
|
brown: "brown";
|
|
521
526
|
brown_background: "brown_background";
|
|
522
|
-
default: "default";
|
|
523
527
|
gray: "gray";
|
|
524
528
|
gray_background: "gray_background";
|
|
525
529
|
green: "green";
|
|
@@ -556,11 +560,11 @@ declare const titlePropertySchema: z.ZodObject<{
|
|
|
556
560
|
underline: z.ZodBoolean;
|
|
557
561
|
code: z.ZodBoolean;
|
|
558
562
|
color: z.ZodEnum<{
|
|
563
|
+
default: "default";
|
|
559
564
|
blue: "blue";
|
|
560
565
|
blue_background: "blue_background";
|
|
561
566
|
brown: "brown";
|
|
562
567
|
brown_background: "brown_background";
|
|
563
|
-
default: "default";
|
|
564
568
|
gray: "gray";
|
|
565
569
|
gray_background: "gray_background";
|
|
566
570
|
green: "green";
|
|
@@ -625,6 +629,7 @@ declare const titlePropertySchema: z.ZodObject<{
|
|
|
625
629
|
avatar_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodNull]>>;
|
|
626
630
|
person: z.ZodObject<{
|
|
627
631
|
email: z.ZodEmail;
|
|
632
|
+
email_verified: z.ZodOptional<z.ZodBoolean>;
|
|
628
633
|
}, z.core.$strip>;
|
|
629
634
|
}, z.core.$strip>, z.ZodObject<{
|
|
630
635
|
object: z.ZodLiteral<"user">;
|
|
@@ -657,11 +662,11 @@ declare const titlePropertySchema: z.ZodObject<{
|
|
|
657
662
|
underline: z.ZodBoolean;
|
|
658
663
|
code: z.ZodBoolean;
|
|
659
664
|
color: z.ZodEnum<{
|
|
665
|
+
default: "default";
|
|
660
666
|
blue: "blue";
|
|
661
667
|
blue_background: "blue_background";
|
|
662
668
|
brown: "brown";
|
|
663
669
|
brown_background: "brown_background";
|
|
664
|
-
default: "default";
|
|
665
670
|
gray: "gray";
|
|
666
671
|
gray_background: "gray_background";
|
|
667
672
|
green: "green";
|
|
@@ -692,11 +697,11 @@ declare const titlePropertySchema: z.ZodObject<{
|
|
|
692
697
|
underline: z.ZodBoolean;
|
|
693
698
|
code: z.ZodBoolean;
|
|
694
699
|
color: z.ZodEnum<{
|
|
700
|
+
default: "default";
|
|
695
701
|
blue: "blue";
|
|
696
702
|
blue_background: "blue_background";
|
|
697
703
|
brown: "brown";
|
|
698
704
|
brown_background: "brown_background";
|
|
699
|
-
default: "default";
|
|
700
705
|
gray: "gray";
|
|
701
706
|
gray_background: "gray_background";
|
|
702
707
|
green: "green";
|
|
@@ -749,6 +754,7 @@ declare const verificationPropertySchema: z.ZodObject<{
|
|
|
749
754
|
avatar_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodNull]>>;
|
|
750
755
|
person: z.ZodObject<{
|
|
751
756
|
email: z.ZodEmail;
|
|
757
|
+
email_verified: z.ZodOptional<z.ZodBoolean>;
|
|
752
758
|
}, z.core.$strip>;
|
|
753
759
|
}, z.core.$strip>, z.ZodObject<{
|
|
754
760
|
object: z.ZodLiteral<"user">;
|
|
@@ -795,6 +801,7 @@ export declare const pagePropertiesSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
795
801
|
avatar_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodNull]>>;
|
|
796
802
|
person: z.ZodObject<{
|
|
797
803
|
email: z.ZodEmail;
|
|
804
|
+
email_verified: z.ZodOptional<z.ZodBoolean>;
|
|
798
805
|
}, z.core.$strip>;
|
|
799
806
|
}, z.core.$strip>, z.ZodObject<{
|
|
800
807
|
object: z.ZodLiteral<"user">;
|
|
@@ -887,6 +894,7 @@ export declare const pagePropertiesSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
887
894
|
avatar_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodNull]>>;
|
|
888
895
|
person: z.ZodObject<{
|
|
889
896
|
email: z.ZodEmail;
|
|
897
|
+
email_verified: z.ZodOptional<z.ZodBoolean>;
|
|
890
898
|
}, z.core.$strip>;
|
|
891
899
|
}, z.core.$strip>, z.ZodObject<{
|
|
892
900
|
object: z.ZodLiteral<"user">;
|
|
@@ -922,11 +930,11 @@ export declare const pagePropertiesSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
922
930
|
id: z.ZodString;
|
|
923
931
|
name: z.ZodString;
|
|
924
932
|
color: z.ZodEnum<{
|
|
933
|
+
default: "default";
|
|
925
934
|
blue: "blue";
|
|
926
935
|
blue_background: "blue_background";
|
|
927
936
|
brown: "brown";
|
|
928
937
|
brown_background: "brown_background";
|
|
929
|
-
default: "default";
|
|
930
938
|
gray: "gray";
|
|
931
939
|
gray_background: "gray_background";
|
|
932
940
|
green: "green";
|
|
@@ -958,6 +966,7 @@ export declare const pagePropertiesSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
958
966
|
avatar_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodNull]>>;
|
|
959
967
|
person: z.ZodObject<{
|
|
960
968
|
email: z.ZodEmail;
|
|
969
|
+
email_verified: z.ZodOptional<z.ZodBoolean>;
|
|
961
970
|
}, z.core.$strip>;
|
|
962
971
|
}, z.core.$strip>, z.ZodObject<{
|
|
963
972
|
object: z.ZodLiteral<"user">;
|
|
@@ -1011,11 +1020,11 @@ export declare const pagePropertiesSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
1011
1020
|
underline: z.ZodBoolean;
|
|
1012
1021
|
code: z.ZodBoolean;
|
|
1013
1022
|
color: z.ZodEnum<{
|
|
1023
|
+
default: "default";
|
|
1014
1024
|
blue: "blue";
|
|
1015
1025
|
blue_background: "blue_background";
|
|
1016
1026
|
brown: "brown";
|
|
1017
1027
|
brown_background: "brown_background";
|
|
1018
|
-
default: "default";
|
|
1019
1028
|
gray: "gray";
|
|
1020
1029
|
gray_background: "gray_background";
|
|
1021
1030
|
green: "green";
|
|
@@ -1080,6 +1089,7 @@ export declare const pagePropertiesSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
1080
1089
|
avatar_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodNull]>>;
|
|
1081
1090
|
person: z.ZodObject<{
|
|
1082
1091
|
email: z.ZodEmail;
|
|
1092
|
+
email_verified: z.ZodOptional<z.ZodBoolean>;
|
|
1083
1093
|
}, z.core.$strip>;
|
|
1084
1094
|
}, z.core.$strip>, z.ZodObject<{
|
|
1085
1095
|
object: z.ZodLiteral<"user">;
|
|
@@ -1112,11 +1122,11 @@ export declare const pagePropertiesSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
1112
1122
|
underline: z.ZodBoolean;
|
|
1113
1123
|
code: z.ZodBoolean;
|
|
1114
1124
|
color: z.ZodEnum<{
|
|
1125
|
+
default: "default";
|
|
1115
1126
|
blue: "blue";
|
|
1116
1127
|
blue_background: "blue_background";
|
|
1117
1128
|
brown: "brown";
|
|
1118
1129
|
brown_background: "brown_background";
|
|
1119
|
-
default: "default";
|
|
1120
1130
|
gray: "gray";
|
|
1121
1131
|
gray_background: "gray_background";
|
|
1122
1132
|
green: "green";
|
|
@@ -1147,11 +1157,11 @@ export declare const pagePropertiesSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
1147
1157
|
underline: z.ZodBoolean;
|
|
1148
1158
|
code: z.ZodBoolean;
|
|
1149
1159
|
color: z.ZodEnum<{
|
|
1160
|
+
default: "default";
|
|
1150
1161
|
blue: "blue";
|
|
1151
1162
|
blue_background: "blue_background";
|
|
1152
1163
|
brown: "brown";
|
|
1153
1164
|
brown_background: "brown_background";
|
|
1154
|
-
default: "default";
|
|
1155
1165
|
gray: "gray";
|
|
1156
1166
|
gray_background: "gray_background";
|
|
1157
1167
|
green: "green";
|
|
@@ -1223,11 +1233,11 @@ export declare const pagePropertiesSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
1223
1233
|
id: z.ZodString;
|
|
1224
1234
|
name: z.ZodString;
|
|
1225
1235
|
color: z.ZodEnum<{
|
|
1236
|
+
default: "default";
|
|
1226
1237
|
blue: "blue";
|
|
1227
1238
|
blue_background: "blue_background";
|
|
1228
1239
|
brown: "brown";
|
|
1229
1240
|
brown_background: "brown_background";
|
|
1230
|
-
default: "default";
|
|
1231
1241
|
gray: "gray";
|
|
1232
1242
|
gray_background: "gray_background";
|
|
1233
1243
|
green: "green";
|
|
@@ -1251,11 +1261,11 @@ export declare const pagePropertiesSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
1251
1261
|
id: z.ZodString;
|
|
1252
1262
|
name: z.ZodString;
|
|
1253
1263
|
color: z.ZodEnum<{
|
|
1264
|
+
default: "default";
|
|
1254
1265
|
blue: "blue";
|
|
1255
1266
|
blue_background: "blue_background";
|
|
1256
1267
|
brown: "brown";
|
|
1257
1268
|
brown_background: "brown_background";
|
|
1258
|
-
default: "default";
|
|
1259
1269
|
gray: "gray";
|
|
1260
1270
|
gray_background: "gray_background";
|
|
1261
1271
|
green: "green";
|
|
@@ -1290,11 +1300,11 @@ export declare const pagePropertiesSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
1290
1300
|
underline: z.ZodBoolean;
|
|
1291
1301
|
code: z.ZodBoolean;
|
|
1292
1302
|
color: z.ZodEnum<{
|
|
1303
|
+
default: "default";
|
|
1293
1304
|
blue: "blue";
|
|
1294
1305
|
blue_background: "blue_background";
|
|
1295
1306
|
brown: "brown";
|
|
1296
1307
|
brown_background: "brown_background";
|
|
1297
|
-
default: "default";
|
|
1298
1308
|
gray: "gray";
|
|
1299
1309
|
gray_background: "gray_background";
|
|
1300
1310
|
green: "green";
|
|
@@ -1359,6 +1369,7 @@ export declare const pagePropertiesSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
1359
1369
|
avatar_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodNull]>>;
|
|
1360
1370
|
person: z.ZodObject<{
|
|
1361
1371
|
email: z.ZodEmail;
|
|
1372
|
+
email_verified: z.ZodOptional<z.ZodBoolean>;
|
|
1362
1373
|
}, z.core.$strip>;
|
|
1363
1374
|
}, z.core.$strip>, z.ZodObject<{
|
|
1364
1375
|
object: z.ZodLiteral<"user">;
|
|
@@ -1391,11 +1402,11 @@ export declare const pagePropertiesSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
1391
1402
|
underline: z.ZodBoolean;
|
|
1392
1403
|
code: z.ZodBoolean;
|
|
1393
1404
|
color: z.ZodEnum<{
|
|
1405
|
+
default: "default";
|
|
1394
1406
|
blue: "blue";
|
|
1395
1407
|
blue_background: "blue_background";
|
|
1396
1408
|
brown: "brown";
|
|
1397
1409
|
brown_background: "brown_background";
|
|
1398
|
-
default: "default";
|
|
1399
1410
|
gray: "gray";
|
|
1400
1411
|
gray_background: "gray_background";
|
|
1401
1412
|
green: "green";
|
|
@@ -1426,11 +1437,11 @@ export declare const pagePropertiesSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
1426
1437
|
underline: z.ZodBoolean;
|
|
1427
1438
|
code: z.ZodBoolean;
|
|
1428
1439
|
color: z.ZodEnum<{
|
|
1440
|
+
default: "default";
|
|
1429
1441
|
blue: "blue";
|
|
1430
1442
|
blue_background: "blue_background";
|
|
1431
1443
|
brown: "brown";
|
|
1432
1444
|
brown_background: "brown_background";
|
|
1433
|
-
default: "default";
|
|
1434
1445
|
gray: "gray";
|
|
1435
1446
|
gray_background: "gray_background";
|
|
1436
1447
|
green: "green";
|
|
@@ -1477,6 +1488,7 @@ export declare const pagePropertiesSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
1477
1488
|
avatar_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodNull]>>;
|
|
1478
1489
|
person: z.ZodObject<{
|
|
1479
1490
|
email: z.ZodEmail;
|
|
1491
|
+
email_verified: z.ZodOptional<z.ZodBoolean>;
|
|
1480
1492
|
}, z.core.$strip>;
|
|
1481
1493
|
}, z.core.$strip>, z.ZodObject<{
|
|
1482
1494
|
object: z.ZodLiteral<"user">;
|
|
@@ -200,15 +200,14 @@ const rollupPropertySchema = z.object({
|
|
|
200
200
|
'unchecked',
|
|
201
201
|
'unique',
|
|
202
202
|
]),
|
|
203
|
-
number: z.number().
|
|
203
|
+
number: z.number().nullish(),
|
|
204
204
|
date: z
|
|
205
205
|
.object({
|
|
206
206
|
start: shared_schema_1.notionDateStringSchema,
|
|
207
207
|
end: shared_schema_1.notionDateStringSchema.nullable(),
|
|
208
208
|
time_zone: z.string().trim().nullable(),
|
|
209
209
|
})
|
|
210
|
-
.
|
|
211
|
-
.optional(),
|
|
210
|
+
.nullish(),
|
|
212
211
|
array: z.array(z.unknown()).optional(),
|
|
213
212
|
}),
|
|
214
213
|
});
|
|
@@ -14,7 +14,25 @@ import * as z from 'zod';
|
|
|
14
14
|
* As of API version 2025-09-03, 'data_source' and 'page_or_data_source' are used
|
|
15
15
|
* instead of 'database' and 'page_or_database' in search results.
|
|
16
16
|
*/
|
|
17
|
-
export type PaginatedListType = 'block' | 'comment' | 'database' | 'data_source' | 'page' | 'page_or_database' | 'page_or_data_source' | 'property_item' | 'user';
|
|
17
|
+
export type PaginatedListType = 'block' | 'comment' | 'custom_emoji' | 'database' | 'data_source' | 'page' | 'page_or_database' | 'page_or_data_source' | 'property_item' | 'user' | 'view';
|
|
18
|
+
/**
|
|
19
|
+
* Reasons a query can be reported as incomplete despite `has_more` being `false`.
|
|
20
|
+
* Currently only emitted when a query hits the 10,000-result pagination depth cap.
|
|
21
|
+
*/
|
|
22
|
+
export declare const REQUEST_STATUS_INCOMPLETE_REASONS: readonly ["query_result_limit_reached"];
|
|
23
|
+
export type RequestStatusIncompleteReason = (typeof REQUEST_STATUS_INCOMPLETE_REASONS)[number];
|
|
24
|
+
/**
|
|
25
|
+
* Signals that a query was truncated even though `has_more` is `false` -- e.g. data source,
|
|
26
|
+
* view, and meeting-notes queries cap at 10,000 results. Callers that need every row must
|
|
27
|
+
* detect this and re-query with a narrower filter (see the pagination helpers).
|
|
28
|
+
*/
|
|
29
|
+
export declare const requestStatusSchema: z.ZodObject<{
|
|
30
|
+
type: z.ZodLiteral<"incomplete">;
|
|
31
|
+
incomplete_reason: z.ZodEnum<{
|
|
32
|
+
query_result_limit_reached: "query_result_limit_reached";
|
|
33
|
+
}>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type RequestStatus = z.infer<typeof requestStatusSchema>;
|
|
18
36
|
/**
|
|
19
37
|
* Base paginated list response schema.
|
|
20
38
|
*/
|
|
@@ -24,6 +42,7 @@ export declare const paginatedListSchema: <T extends z.ZodTypeAny>(resultSchema:
|
|
|
24
42
|
next_cursor: z.ZodNullable<z.ZodString>;
|
|
25
43
|
has_more: z.ZodBoolean;
|
|
26
44
|
type: z.ZodEnum<{
|
|
45
|
+
custom_emoji: "custom_emoji";
|
|
27
46
|
user: "user";
|
|
28
47
|
database: "database";
|
|
29
48
|
page: "page";
|
|
@@ -33,7 +52,14 @@ export declare const paginatedListSchema: <T extends z.ZodTypeAny>(resultSchema:
|
|
|
33
52
|
page_or_database: "page_or_database";
|
|
34
53
|
page_or_data_source: "page_or_data_source";
|
|
35
54
|
property_item: "property_item";
|
|
55
|
+
view: "view";
|
|
36
56
|
}>;
|
|
57
|
+
request_status: z.ZodOptional<z.ZodObject<{
|
|
58
|
+
type: z.ZodLiteral<"incomplete">;
|
|
59
|
+
incomplete_reason: z.ZodEnum<{
|
|
60
|
+
query_result_limit_reached: "query_result_limit_reached";
|
|
61
|
+
}>;
|
|
62
|
+
}, z.core.$strip>>;
|
|
37
63
|
}, z.core.$strip>;
|
|
38
64
|
/**
|
|
39
65
|
* Pagination parameters for requests.
|
|
@@ -41,8 +67,8 @@ export declare const paginatedListSchema: <T extends z.ZodTypeAny>(resultSchema:
|
|
|
41
67
|
export interface PaginationParameters {
|
|
42
68
|
/** The number of items to return (default: 100, max: 100) */
|
|
43
69
|
page_size?: number;
|
|
44
|
-
/** The cursor value from a previous response to continue pagination */
|
|
45
|
-
start_cursor?: string;
|
|
70
|
+
/** The cursor value from a previous response to continue pagination (`null` is treated the same as omitted) */
|
|
71
|
+
start_cursor?: string | null;
|
|
46
72
|
}
|
|
47
73
|
/**
|
|
48
74
|
* Helper to create paginated response type.
|
|
@@ -53,4 +79,5 @@ export type PaginatedList<T> = {
|
|
|
53
79
|
next_cursor: string | null;
|
|
54
80
|
has_more: boolean;
|
|
55
81
|
type: PaginatedListType;
|
|
82
|
+
request_status?: RequestStatus;
|
|
56
83
|
};
|
|
@@ -33,8 +33,22 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.paginatedListSchema = void 0;
|
|
36
|
+
exports.paginatedListSchema = exports.requestStatusSchema = exports.REQUEST_STATUS_INCOMPLETE_REASONS = void 0;
|
|
37
37
|
const z = __importStar(require("zod"));
|
|
38
|
+
/**
|
|
39
|
+
* Reasons a query can be reported as incomplete despite `has_more` being `false`.
|
|
40
|
+
* Currently only emitted when a query hits the 10,000-result pagination depth cap.
|
|
41
|
+
*/
|
|
42
|
+
exports.REQUEST_STATUS_INCOMPLETE_REASONS = ['query_result_limit_reached'];
|
|
43
|
+
/**
|
|
44
|
+
* Signals that a query was truncated even though `has_more` is `false` -- e.g. data source,
|
|
45
|
+
* view, and meeting-notes queries cap at 10,000 results. Callers that need every row must
|
|
46
|
+
* detect this and re-query with a narrower filter (see the pagination helpers).
|
|
47
|
+
*/
|
|
48
|
+
exports.requestStatusSchema = z.object({
|
|
49
|
+
type: z.literal('incomplete'),
|
|
50
|
+
incomplete_reason: z.enum(exports.REQUEST_STATUS_INCOMPLETE_REASONS),
|
|
51
|
+
});
|
|
38
52
|
/**
|
|
39
53
|
* Base paginated list response schema.
|
|
40
54
|
*/
|
|
@@ -48,6 +62,7 @@ const paginatedListSchema = (resultSchema) => {
|
|
|
48
62
|
type: z.enum([
|
|
49
63
|
'block',
|
|
50
64
|
'comment',
|
|
65
|
+
'custom_emoji',
|
|
51
66
|
'database',
|
|
52
67
|
'data_source',
|
|
53
68
|
'page',
|
|
@@ -55,7 +70,9 @@ const paginatedListSchema = (resultSchema) => {
|
|
|
55
70
|
'page_or_data_source',
|
|
56
71
|
'property_item',
|
|
57
72
|
'user',
|
|
73
|
+
'view',
|
|
58
74
|
]),
|
|
75
|
+
request_status: exports.requestStatusSchema.optional(),
|
|
59
76
|
});
|
|
60
77
|
};
|
|
61
78
|
exports.paginatedListSchema = paginatedListSchema;
|
|
@@ -9,7 +9,7 @@ import * as z from 'zod';
|
|
|
9
9
|
* https://developers.notion.com/reference/parent-object
|
|
10
10
|
*/
|
|
11
11
|
/** Database parent. */
|
|
12
|
-
declare const databaseParentSchema: z.ZodObject<{
|
|
12
|
+
export declare const databaseParentSchema: z.ZodObject<{
|
|
13
13
|
type: z.ZodLiteral<"database_id">;
|
|
14
14
|
database_id: z.ZodUUID;
|
|
15
15
|
}, z.core.$strip>;
|
|
@@ -34,6 +34,11 @@ declare const blockParentSchema: z.ZodObject<{
|
|
|
34
34
|
type: z.ZodLiteral<"block_id">;
|
|
35
35
|
block_id: z.ZodUUID;
|
|
36
36
|
}, z.core.$strip>;
|
|
37
|
+
/** Agent parent. */
|
|
38
|
+
declare const agentParentSchema: z.ZodObject<{
|
|
39
|
+
type: z.ZodLiteral<"agent_id">;
|
|
40
|
+
agent_id: z.ZodUUID;
|
|
41
|
+
}, z.core.$strip>;
|
|
37
42
|
export declare const parentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
38
43
|
type: z.ZodLiteral<"database_id">;
|
|
39
44
|
database_id: z.ZodUUID;
|
|
@@ -50,6 +55,9 @@ export declare const parentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
50
55
|
}, z.core.$strip>, z.ZodObject<{
|
|
51
56
|
type: z.ZodLiteral<"block_id">;
|
|
52
57
|
block_id: z.ZodUUID;
|
|
58
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
59
|
+
type: z.ZodLiteral<"agent_id">;
|
|
60
|
+
agent_id: z.ZodUUID;
|
|
53
61
|
}, z.core.$strip>], "type">;
|
|
54
62
|
export type NotionParent = z.infer<typeof parentSchema>;
|
|
55
63
|
export type DatabaseParent = z.infer<typeof databaseParentSchema>;
|
|
@@ -57,4 +65,5 @@ export type DataSourceParent = z.infer<typeof dataSourceParentSchema>;
|
|
|
57
65
|
export type PageParent = z.infer<typeof pageParentSchema>;
|
|
58
66
|
export type WorkspaceParent = z.infer<typeof workspaceParentSchema>;
|
|
59
67
|
export type BlockParent = z.infer<typeof blockParentSchema>;
|
|
68
|
+
export type AgentParent = z.infer<typeof agentParentSchema>;
|
|
60
69
|
export {};
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.parentSchema = void 0;
|
|
36
|
+
exports.parentSchema = exports.databaseParentSchema = void 0;
|
|
37
37
|
const z = __importStar(require("zod"));
|
|
38
38
|
/**
|
|
39
39
|
* Notion parent object schemas.
|
|
@@ -45,7 +45,7 @@ const z = __importStar(require("zod"));
|
|
|
45
45
|
* https://developers.notion.com/reference/parent-object
|
|
46
46
|
*/
|
|
47
47
|
/** Database parent. */
|
|
48
|
-
|
|
48
|
+
exports.databaseParentSchema = z.object({
|
|
49
49
|
type: z.literal('database_id'),
|
|
50
50
|
database_id: z.uuid(),
|
|
51
51
|
});
|
|
@@ -70,10 +70,16 @@ const blockParentSchema = z.object({
|
|
|
70
70
|
type: z.literal('block_id'),
|
|
71
71
|
block_id: z.uuid(),
|
|
72
72
|
});
|
|
73
|
+
/** Agent parent. */
|
|
74
|
+
const agentParentSchema = z.object({
|
|
75
|
+
type: z.literal('agent_id'),
|
|
76
|
+
agent_id: z.uuid(),
|
|
77
|
+
});
|
|
73
78
|
exports.parentSchema = z.discriminatedUnion('type', [
|
|
74
|
-
databaseParentSchema,
|
|
79
|
+
exports.databaseParentSchema,
|
|
75
80
|
dataSourceParentSchema,
|
|
76
81
|
pageParentSchema,
|
|
77
82
|
workspaceParentSchema,
|
|
78
83
|
blockParentSchema,
|
|
84
|
+
agentParentSchema,
|
|
79
85
|
]);
|
|
@@ -84,9 +84,9 @@ declare const multiSelectPropertySchema: z.ZodObject<{
|
|
|
84
84
|
id: z.ZodString;
|
|
85
85
|
name: z.ZodString;
|
|
86
86
|
color: z.ZodEnum<{
|
|
87
|
+
default: "default";
|
|
87
88
|
blue: "blue";
|
|
88
89
|
brown: "brown";
|
|
89
|
-
default: "default";
|
|
90
90
|
gray: "gray";
|
|
91
91
|
green: "green";
|
|
92
92
|
orange: "orange";
|
|
@@ -244,9 +244,9 @@ declare const selectPropertySchema: z.ZodObject<{
|
|
|
244
244
|
id: z.ZodString;
|
|
245
245
|
name: z.ZodString;
|
|
246
246
|
color: z.ZodEnum<{
|
|
247
|
+
default: "default";
|
|
247
248
|
blue: "blue";
|
|
248
249
|
brown: "brown";
|
|
249
|
-
default: "default";
|
|
250
250
|
gray: "gray";
|
|
251
251
|
green: "green";
|
|
252
252
|
orange: "orange";
|
|
@@ -269,9 +269,9 @@ declare const statusPropertySchema: z.ZodObject<{
|
|
|
269
269
|
id: z.ZodString;
|
|
270
270
|
name: z.ZodString;
|
|
271
271
|
color: z.ZodEnum<{
|
|
272
|
+
default: "default";
|
|
272
273
|
blue: "blue";
|
|
273
274
|
brown: "brown";
|
|
274
|
-
default: "default";
|
|
275
275
|
gray: "gray";
|
|
276
276
|
green: "green";
|
|
277
277
|
orange: "orange";
|
|
@@ -285,9 +285,9 @@ declare const statusPropertySchema: z.ZodObject<{
|
|
|
285
285
|
id: z.ZodString;
|
|
286
286
|
name: z.ZodString;
|
|
287
287
|
color: z.ZodEnum<{
|
|
288
|
+
default: "default";
|
|
288
289
|
blue: "blue";
|
|
289
290
|
brown: "brown";
|
|
290
|
-
default: "default";
|
|
291
291
|
gray: "gray";
|
|
292
292
|
green: "green";
|
|
293
293
|
orange: "orange";
|
|
@@ -396,9 +396,9 @@ export declare const propertyObjectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
396
396
|
id: z.ZodString;
|
|
397
397
|
name: z.ZodString;
|
|
398
398
|
color: z.ZodEnum<{
|
|
399
|
+
default: "default";
|
|
399
400
|
blue: "blue";
|
|
400
401
|
brown: "brown";
|
|
401
|
-
default: "default";
|
|
402
402
|
gray: "gray";
|
|
403
403
|
green: "green";
|
|
404
404
|
orange: "orange";
|
|
@@ -540,9 +540,9 @@ export declare const propertyObjectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
540
540
|
id: z.ZodString;
|
|
541
541
|
name: z.ZodString;
|
|
542
542
|
color: z.ZodEnum<{
|
|
543
|
+
default: "default";
|
|
543
544
|
blue: "blue";
|
|
544
545
|
brown: "brown";
|
|
545
|
-
default: "default";
|
|
546
546
|
gray: "gray";
|
|
547
547
|
green: "green";
|
|
548
548
|
orange: "orange";
|
|
@@ -563,9 +563,9 @@ export declare const propertyObjectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
563
563
|
id: z.ZodString;
|
|
564
564
|
name: z.ZodString;
|
|
565
565
|
color: z.ZodEnum<{
|
|
566
|
+
default: "default";
|
|
566
567
|
blue: "blue";
|
|
567
568
|
brown: "brown";
|
|
568
|
-
default: "default";
|
|
569
569
|
gray: "gray";
|
|
570
570
|
green: "green";
|
|
571
571
|
orange: "orange";
|
|
@@ -579,9 +579,9 @@ export declare const propertyObjectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
579
579
|
id: z.ZodString;
|
|
580
580
|
name: z.ZodString;
|
|
581
581
|
color: z.ZodEnum<{
|
|
582
|
+
default: "default";
|
|
582
583
|
blue: "blue";
|
|
583
584
|
brown: "brown";
|
|
584
|
-
default: "default";
|
|
585
585
|
gray: "gray";
|
|
586
586
|
green: "green";
|
|
587
587
|
orange: "orange";
|
|
@@ -681,9 +681,9 @@ export declare const propertiesObjectSchema: z.ZodRecord<z.ZodString, z.ZodDiscr
|
|
|
681
681
|
id: z.ZodString;
|
|
682
682
|
name: z.ZodString;
|
|
683
683
|
color: z.ZodEnum<{
|
|
684
|
+
default: "default";
|
|
684
685
|
blue: "blue";
|
|
685
686
|
brown: "brown";
|
|
686
|
-
default: "default";
|
|
687
687
|
gray: "gray";
|
|
688
688
|
green: "green";
|
|
689
689
|
orange: "orange";
|
|
@@ -825,9 +825,9 @@ export declare const propertiesObjectSchema: z.ZodRecord<z.ZodString, z.ZodDiscr
|
|
|
825
825
|
id: z.ZodString;
|
|
826
826
|
name: z.ZodString;
|
|
827
827
|
color: z.ZodEnum<{
|
|
828
|
+
default: "default";
|
|
828
829
|
blue: "blue";
|
|
829
830
|
brown: "brown";
|
|
830
|
-
default: "default";
|
|
831
831
|
gray: "gray";
|
|
832
832
|
green: "green";
|
|
833
833
|
orange: "orange";
|
|
@@ -848,9 +848,9 @@ export declare const propertiesObjectSchema: z.ZodRecord<z.ZodString, z.ZodDiscr
|
|
|
848
848
|
id: z.ZodString;
|
|
849
849
|
name: z.ZodString;
|
|
850
850
|
color: z.ZodEnum<{
|
|
851
|
+
default: "default";
|
|
851
852
|
blue: "blue";
|
|
852
853
|
brown: "brown";
|
|
853
|
-
default: "default";
|
|
854
854
|
gray: "gray";
|
|
855
855
|
green: "green";
|
|
856
856
|
orange: "orange";
|
|
@@ -864,9 +864,9 @@ export declare const propertiesObjectSchema: z.ZodRecord<z.ZodString, z.ZodDiscr
|
|
|
864
864
|
id: z.ZodString;
|
|
865
865
|
name: z.ZodString;
|
|
866
866
|
color: z.ZodEnum<{
|
|
867
|
+
default: "default";
|
|
867
868
|
blue: "blue";
|
|
868
869
|
brown: "brown";
|
|
869
|
-
default: "default";
|
|
870
870
|
gray: "gray";
|
|
871
871
|
green: "green";
|
|
872
872
|
orange: "orange";
|