@notionhq/client 2.2.0 → 2.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
CHANGED
|
@@ -196,7 +196,7 @@ Here is an example of using a type guard:
|
|
|
196
196
|
const fullOrPartialPages = await notion.databases.query({
|
|
197
197
|
database_id: "897e5a76-ae52-4b48-9fdf-e71f5945d1af",
|
|
198
198
|
})
|
|
199
|
-
for (const page of fullOrPartialPages) {
|
|
199
|
+
for (const page of fullOrPartialPages.results) {
|
|
200
200
|
if (!isFullPage(page)) {
|
|
201
201
|
continue
|
|
202
202
|
}
|
package/build/package.json
CHANGED
|
@@ -33,6 +33,7 @@ export declare type BotUserObjectResponse = {
|
|
|
33
33
|
type: "workspace";
|
|
34
34
|
workspace: true;
|
|
35
35
|
};
|
|
36
|
+
workspace_name: string | null;
|
|
36
37
|
};
|
|
37
38
|
name: string | null;
|
|
38
39
|
avatar_url: string | null;
|
|
@@ -1143,6 +1144,9 @@ export declare type LinkToPageBlockObjectResponse = {
|
|
|
1143
1144
|
} | {
|
|
1144
1145
|
type: "database_id";
|
|
1145
1146
|
database_id: IdRequest;
|
|
1147
|
+
} | {
|
|
1148
|
+
type: "comment_id";
|
|
1149
|
+
comment_id: IdRequest;
|
|
1146
1150
|
};
|
|
1147
1151
|
parent: {
|
|
1148
1152
|
type: "database_id";
|
|
@@ -1803,6 +1807,7 @@ declare type RichTextItemRequest = {
|
|
|
1803
1807
|
type: "workspace";
|
|
1804
1808
|
workspace: true;
|
|
1805
1809
|
};
|
|
1810
|
+
workspace_name: string | null;
|
|
1806
1811
|
};
|
|
1807
1812
|
id: IdRequest;
|
|
1808
1813
|
type?: "bot";
|
|
@@ -1943,6 +1948,9 @@ declare type BlockObjectRequestWithoutChildren = {
|
|
|
1943
1948
|
} | {
|
|
1944
1949
|
database_id: IdRequest;
|
|
1945
1950
|
type?: "database_id";
|
|
1951
|
+
} | {
|
|
1952
|
+
comment_id: IdRequest;
|
|
1953
|
+
type?: "comment_id";
|
|
1946
1954
|
};
|
|
1947
1955
|
type?: "link_to_page";
|
|
1948
1956
|
object?: "block";
|
|
@@ -2150,6 +2158,9 @@ declare type BlockObjectRequest = {
|
|
|
2150
2158
|
} | {
|
|
2151
2159
|
database_id: IdRequest;
|
|
2152
2160
|
type?: "database_id";
|
|
2161
|
+
} | {
|
|
2162
|
+
comment_id: IdRequest;
|
|
2163
|
+
type?: "comment_id";
|
|
2153
2164
|
};
|
|
2154
2165
|
type?: "link_to_page";
|
|
2155
2166
|
object?: "block";
|
|
@@ -2262,6 +2273,9 @@ declare type BlockObjectRequest = {
|
|
|
2262
2273
|
} | {
|
|
2263
2274
|
database_id: IdRequest;
|
|
2264
2275
|
type?: "database_id";
|
|
2276
|
+
} | {
|
|
2277
|
+
comment_id: IdRequest;
|
|
2278
|
+
type?: "comment_id";
|
|
2265
2279
|
};
|
|
2266
2280
|
type?: "link_to_page";
|
|
2267
2281
|
object?: "block";
|
|
@@ -2490,6 +2504,9 @@ declare type BlockObjectRequest = {
|
|
|
2490
2504
|
} | {
|
|
2491
2505
|
database_id: IdRequest;
|
|
2492
2506
|
type?: "database_id";
|
|
2507
|
+
} | {
|
|
2508
|
+
comment_id: IdRequest;
|
|
2509
|
+
type?: "comment_id";
|
|
2493
2510
|
};
|
|
2494
2511
|
type?: "link_to_page";
|
|
2495
2512
|
object?: "block";
|
|
@@ -2726,6 +2743,9 @@ declare type BlockObjectRequest = {
|
|
|
2726
2743
|
} | {
|
|
2727
2744
|
database_id: IdRequest;
|
|
2728
2745
|
type?: "database_id";
|
|
2746
|
+
} | {
|
|
2747
|
+
comment_id: IdRequest;
|
|
2748
|
+
type?: "comment_id";
|
|
2729
2749
|
};
|
|
2730
2750
|
type?: "link_to_page";
|
|
2731
2751
|
object?: "block";
|
|
@@ -2953,6 +2973,9 @@ declare type BlockObjectRequest = {
|
|
|
2953
2973
|
} | {
|
|
2954
2974
|
database_id: IdRequest;
|
|
2955
2975
|
type?: "database_id";
|
|
2976
|
+
} | {
|
|
2977
|
+
comment_id: IdRequest;
|
|
2978
|
+
type?: "comment_id";
|
|
2956
2979
|
};
|
|
2957
2980
|
type?: "link_to_page";
|
|
2958
2981
|
object?: "block";
|
|
@@ -3180,6 +3203,9 @@ declare type BlockObjectRequest = {
|
|
|
3180
3203
|
} | {
|
|
3181
3204
|
database_id: IdRequest;
|
|
3182
3205
|
type?: "database_id";
|
|
3206
|
+
} | {
|
|
3207
|
+
comment_id: IdRequest;
|
|
3208
|
+
type?: "comment_id";
|
|
3183
3209
|
};
|
|
3184
3210
|
type?: "link_to_page";
|
|
3185
3211
|
object?: "block";
|
|
@@ -3406,6 +3432,9 @@ declare type BlockObjectRequest = {
|
|
|
3406
3432
|
} | {
|
|
3407
3433
|
database_id: IdRequest;
|
|
3408
3434
|
type?: "database_id";
|
|
3435
|
+
} | {
|
|
3436
|
+
comment_id: IdRequest;
|
|
3437
|
+
type?: "comment_id";
|
|
3409
3438
|
};
|
|
3410
3439
|
type?: "link_to_page";
|
|
3411
3440
|
object?: "block";
|
|
@@ -3632,6 +3661,9 @@ declare type BlockObjectRequest = {
|
|
|
3632
3661
|
} | {
|
|
3633
3662
|
database_id: IdRequest;
|
|
3634
3663
|
type?: "database_id";
|
|
3664
|
+
} | {
|
|
3665
|
+
comment_id: IdRequest;
|
|
3666
|
+
type?: "comment_id";
|
|
3635
3667
|
};
|
|
3636
3668
|
type?: "link_to_page";
|
|
3637
3669
|
object?: "block";
|
|
@@ -3858,6 +3890,9 @@ declare type BlockObjectRequest = {
|
|
|
3858
3890
|
} | {
|
|
3859
3891
|
database_id: IdRequest;
|
|
3860
3892
|
type?: "database_id";
|
|
3893
|
+
} | {
|
|
3894
|
+
comment_id: IdRequest;
|
|
3895
|
+
type?: "comment_id";
|
|
3861
3896
|
};
|
|
3862
3897
|
type?: "link_to_page";
|
|
3863
3898
|
object?: "block";
|
|
@@ -4084,6 +4119,9 @@ declare type BlockObjectRequest = {
|
|
|
4084
4119
|
} | {
|
|
4085
4120
|
database_id: IdRequest;
|
|
4086
4121
|
type?: "database_id";
|
|
4122
|
+
} | {
|
|
4123
|
+
comment_id: IdRequest;
|
|
4124
|
+
type?: "comment_id";
|
|
4087
4125
|
};
|
|
4088
4126
|
type?: "link_to_page";
|
|
4089
4127
|
object?: "block";
|
|
@@ -4310,6 +4348,9 @@ declare type BlockObjectRequest = {
|
|
|
4310
4348
|
} | {
|
|
4311
4349
|
database_id: IdRequest;
|
|
4312
4350
|
type?: "database_id";
|
|
4351
|
+
} | {
|
|
4352
|
+
comment_id: IdRequest;
|
|
4353
|
+
type?: "comment_id";
|
|
4313
4354
|
};
|
|
4314
4355
|
type?: "link_to_page";
|
|
4315
4356
|
object?: "block";
|
|
@@ -4537,6 +4578,9 @@ declare type BlockObjectRequest = {
|
|
|
4537
4578
|
} | {
|
|
4538
4579
|
database_id: IdRequest;
|
|
4539
4580
|
type?: "database_id";
|
|
4581
|
+
} | {
|
|
4582
|
+
comment_id: IdRequest;
|
|
4583
|
+
type?: "comment_id";
|
|
4540
4584
|
};
|
|
4541
4585
|
type?: "link_to_page";
|
|
4542
4586
|
object?: "block";
|
|
@@ -4762,6 +4806,9 @@ declare type BlockObjectRequest = {
|
|
|
4762
4806
|
} | {
|
|
4763
4807
|
database_id: IdRequest;
|
|
4764
4808
|
type?: "database_id";
|
|
4809
|
+
} | {
|
|
4810
|
+
comment_id: IdRequest;
|
|
4811
|
+
type?: "comment_id";
|
|
4765
4812
|
};
|
|
4766
4813
|
type?: "link_to_page";
|
|
4767
4814
|
object?: "block";
|
|
@@ -4988,6 +5035,9 @@ declare type BlockObjectRequest = {
|
|
|
4988
5035
|
} | {
|
|
4989
5036
|
database_id: IdRequest;
|
|
4990
5037
|
type?: "database_id";
|
|
5038
|
+
} | {
|
|
5039
|
+
comment_id: IdRequest;
|
|
5040
|
+
type?: "comment_id";
|
|
4991
5041
|
};
|
|
4992
5042
|
type?: "link_to_page";
|
|
4993
5043
|
object?: "block";
|
|
@@ -5225,6 +5275,9 @@ declare type BlockObjectRequest = {
|
|
|
5225
5275
|
} | {
|
|
5226
5276
|
database_id: IdRequest;
|
|
5227
5277
|
type?: "database_id";
|
|
5278
|
+
} | {
|
|
5279
|
+
comment_id: IdRequest;
|
|
5280
|
+
type?: "comment_id";
|
|
5228
5281
|
};
|
|
5229
5282
|
type?: "link_to_page";
|
|
5230
5283
|
object?: "block";
|
|
@@ -5673,6 +5726,7 @@ declare type CreatePageBodyParameters = {
|
|
|
5673
5726
|
type: "workspace";
|
|
5674
5727
|
workspace: true;
|
|
5675
5728
|
};
|
|
5729
|
+
workspace_name: string | null;
|
|
5676
5730
|
};
|
|
5677
5731
|
id: IdRequest;
|
|
5678
5732
|
type?: "bot";
|
|
@@ -5770,6 +5824,7 @@ declare type CreatePageBodyParameters = {
|
|
|
5770
5824
|
type: "workspace";
|
|
5771
5825
|
workspace: true;
|
|
5772
5826
|
};
|
|
5827
|
+
workspace_name: string | null;
|
|
5773
5828
|
};
|
|
5774
5829
|
id: IdRequest;
|
|
5775
5830
|
type?: "bot";
|
|
@@ -5934,6 +5989,7 @@ declare type UpdatePageBodyParameters = {
|
|
|
5934
5989
|
type: "workspace";
|
|
5935
5990
|
workspace: true;
|
|
5936
5991
|
};
|
|
5992
|
+
workspace_name: string | null;
|
|
5937
5993
|
};
|
|
5938
5994
|
id: IdRequest;
|
|
5939
5995
|
type?: "bot";
|
|
@@ -6031,6 +6087,7 @@ declare type UpdatePageBodyParameters = {
|
|
|
6031
6087
|
type: "workspace";
|
|
6032
6088
|
workspace: true;
|
|
6033
6089
|
};
|
|
6090
|
+
workspace_name: string | null;
|
|
6034
6091
|
};
|
|
6035
6092
|
id: IdRequest;
|
|
6036
6093
|
type?: "bot";
|
|
@@ -6213,6 +6270,9 @@ declare type UpdateBlockBodyParameters = {
|
|
|
6213
6270
|
} | {
|
|
6214
6271
|
database_id: IdRequest;
|
|
6215
6272
|
type?: "database_id";
|
|
6273
|
+
} | {
|
|
6274
|
+
comment_id: IdRequest;
|
|
6275
|
+
type?: "comment_id";
|
|
6216
6276
|
};
|
|
6217
6277
|
type?: "link_to_page";
|
|
6218
6278
|
archived?: boolean;
|