@notionhq/client 2.2.15 → 2.2.16

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notionhq/client",
3
- "version": "2.2.15",
3
+ "version": "2.2.16",
4
4
  "description": "A simple and easy to use client for the Notion API",
5
5
  "engines": {
6
6
  "node": ">=12"
@@ -124,7 +124,7 @@ type AnnotationResponse = {
124
124
  strikethrough: boolean;
125
125
  underline: boolean;
126
126
  code: boolean;
127
- color: "default" | "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red" | "gray_background" | "brown_background" | "orange_background" | "yellow_background" | "green_background" | "blue_background" | "purple_background" | "pink_background" | "red_background";
127
+ color: "default" | "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red" | "default_background" | "gray_background" | "brown_background" | "orange_background" | "yellow_background" | "green_background" | "blue_background" | "purple_background" | "pink_background" | "red_background";
128
128
  };
129
129
  export type TextRichTextItemResponse = {
130
130
  type: "text";
@@ -141,6 +141,9 @@ export type TextRichTextItemResponse = {
141
141
  type LinkPreviewMentionResponse = {
142
142
  url: TextRequest;
143
143
  };
144
+ type LinkMentionResponse = {
145
+ href: string;
146
+ };
144
147
  type TemplateMentionDateTemplateMentionResponse = {
145
148
  type: "template_mention_date";
146
149
  template_mention_date: "today" | "now";
@@ -150,6 +153,11 @@ type TemplateMentionUserTemplateMentionResponse = {
150
153
  template_mention_user: "me";
151
154
  };
152
155
  type TemplateMentionResponse = TemplateMentionDateTemplateMentionResponse | TemplateMentionUserTemplateMentionResponse;
156
+ type CustomEmojiResponse = {
157
+ id: IdRequest;
158
+ name: string;
159
+ url: string;
160
+ };
153
161
  export type MentionRichTextItemResponse = {
154
162
  type: "mention";
155
163
  mention: {
@@ -161,6 +169,9 @@ export type MentionRichTextItemResponse = {
161
169
  } | {
162
170
  type: "link_preview";
163
171
  link_preview: LinkPreviewMentionResponse;
172
+ } | {
173
+ type: "link_mention";
174
+ link_mention: LinkMentionResponse;
164
175
  } | {
165
176
  type: "template_mention";
166
177
  template_mention: TemplateMentionResponse;
@@ -174,6 +185,9 @@ export type MentionRichTextItemResponse = {
174
185
  database: {
175
186
  id: IdRequest;
176
187
  };
188
+ } | {
189
+ type: "custom_emoji";
190
+ custom_emoji: CustomEmojiResponse;
177
191
  };
178
192
  annotations: AnnotationResponse;
179
193
  plain_text: string;
@@ -426,6 +440,9 @@ export type PageObjectResponse = {
426
440
  url: string;
427
441
  expiry_time: string;
428
442
  };
443
+ } | null | {
444
+ type: "custom_emoji";
445
+ custom_emoji: CustomEmojiResponse;
429
446
  } | null;
430
447
  cover: {
431
448
  type: "external";
@@ -676,6 +693,9 @@ export type DatabaseObjectResponse = {
676
693
  url: string;
677
694
  expiry_time: string;
678
695
  };
696
+ } | null | {
697
+ type: "custom_emoji";
698
+ custom_emoji: CustomEmojiResponse;
679
699
  } | null;
680
700
  cover: {
681
701
  type: "external";
@@ -719,7 +739,7 @@ export type PartialBlockObjectResponse = {
719
739
  object: "block";
720
740
  id: string;
721
741
  };
722
- type ApiColor = "default" | "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red" | "gray_background" | "brown_background" | "orange_background" | "yellow_background" | "green_background" | "blue_background" | "purple_background" | "pink_background" | "red_background";
742
+ type ApiColor = "default" | "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red" | "default_background" | "gray_background" | "brown_background" | "orange_background" | "yellow_background" | "green_background" | "blue_background" | "purple_background" | "pink_background" | "red_background";
723
743
  export type ParagraphBlockObjectResponse = {
724
744
  type: "paragraph";
725
745
  paragraph: {
@@ -1128,7 +1148,7 @@ export type EquationBlockObjectResponse = {
1128
1148
  archived: boolean;
1129
1149
  in_trash: boolean;
1130
1150
  };
1131
- type LanguageRequest = "abap" | "agda" | "arduino" | "assembly" | "bash" | "basic" | "bnf" | "c" | "c#" | "c++" | "clojure" | "coffeescript" | "coq" | "css" | "dart" | "dhall" | "diff" | "docker" | "ebnf" | "elixir" | "elm" | "erlang" | "f#" | "flow" | "fortran" | "gherkin" | "glsl" | "go" | "graphql" | "groovy" | "haskell" | "html" | "idris" | "java" | "javascript" | "json" | "julia" | "kotlin" | "latex" | "less" | "lisp" | "livescript" | "llvm ir" | "lua" | "makefile" | "markdown" | "markup" | "matlab" | "mathematica" | "mermaid" | "nix" | "notion formula" | "objective-c" | "ocaml" | "pascal" | "perl" | "php" | "plain text" | "powershell" | "prolog" | "protobuf" | "purescript" | "python" | "r" | "racket" | "reason" | "ruby" | "rust" | "sass" | "scala" | "scheme" | "scss" | "shell" | "solidity" | "sql" | "swift" | "toml" | "typescript" | "vb.net" | "verilog" | "vhdl" | "visual basic" | "webassembly" | "xml" | "yaml" | "java/c/c++/c#";
1151
+ type LanguageRequest = "abap" | "agda" | "arduino" | "ascii art" | "assembly" | "bash" | "basic" | "bnf" | "c" | "c#" | "c++" | "clojure" | "coffeescript" | "coq" | "css" | "dart" | "dhall" | "diff" | "docker" | "ebnf" | "elixir" | "elm" | "erlang" | "f#" | "flow" | "fortran" | "gherkin" | "glsl" | "go" | "graphql" | "groovy" | "haskell" | "hcl" | "html" | "idris" | "java" | "javascript" | "json" | "julia" | "kotlin" | "latex" | "less" | "lisp" | "livescript" | "llvm ir" | "lua" | "makefile" | "markdown" | "markup" | "matlab" | "mathematica" | "mermaid" | "nix" | "notion formula" | "objective-c" | "ocaml" | "pascal" | "perl" | "php" | "plain text" | "powershell" | "prolog" | "protobuf" | "purescript" | "python" | "r" | "racket" | "reason" | "ruby" | "rust" | "sass" | "scala" | "scheme" | "scss" | "shell" | "smalltalk" | "solidity" | "sql" | "swift" | "toml" | "typescript" | "vb.net" | "verilog" | "vhdl" | "visual basic" | "webassembly" | "xml" | "yaml" | "java/c/c++/c#";
1132
1152
  export type CodeBlockObjectResponse = {
1133
1153
  type: "code";
1134
1154
  code: {
@@ -1178,6 +1198,9 @@ export type CalloutBlockObjectResponse = {
1178
1198
  url: string;
1179
1199
  expiry_time: string;
1180
1200
  };
1201
+ } | null | {
1202
+ type: "custom_emoji";
1203
+ custom_emoji: CustomEmojiResponse;
1181
1204
  } | null;
1182
1205
  };
1183
1206
  parent: {
@@ -2015,7 +2038,7 @@ type RichTextItemRequest = {
2015
2038
  strikethrough?: boolean;
2016
2039
  underline?: boolean;
2017
2040
  code?: boolean;
2018
- color?: "default" | "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red" | "gray_background" | "brown_background" | "orange_background" | "yellow_background" | "green_background" | "blue_background" | "purple_background" | "pink_background" | "red_background";
2041
+ color?: "default" | "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red" | "default_background" | "gray_background" | "brown_background" | "orange_background" | "yellow_background" | "green_background" | "blue_background" | "purple_background" | "pink_background" | "red_background";
2019
2042
  };
2020
2043
  } | {
2021
2044
  mention: {
@@ -2068,6 +2091,12 @@ type RichTextItemRequest = {
2068
2091
  };
2069
2092
  } | {
2070
2093
  template_mention: TemplateMentionRequest;
2094
+ } | {
2095
+ custom_emoji: {
2096
+ id: IdRequest;
2097
+ name?: string;
2098
+ url?: string;
2099
+ };
2071
2100
  };
2072
2101
  type?: "mention";
2073
2102
  annotations?: {
@@ -2076,7 +2105,7 @@ type RichTextItemRequest = {
2076
2105
  strikethrough?: boolean;
2077
2106
  underline?: boolean;
2078
2107
  code?: boolean;
2079
- color?: "default" | "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red" | "gray_background" | "brown_background" | "orange_background" | "yellow_background" | "green_background" | "blue_background" | "purple_background" | "pink_background" | "red_background";
2108
+ color?: "default" | "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red" | "default_background" | "gray_background" | "brown_background" | "orange_background" | "yellow_background" | "green_background" | "blue_background" | "purple_background" | "pink_background" | "red_background";
2080
2109
  };
2081
2110
  } | {
2082
2111
  equation: {
@@ -2089,7 +2118,7 @@ type RichTextItemRequest = {
2089
2118
  strikethrough?: boolean;
2090
2119
  underline?: boolean;
2091
2120
  code?: boolean;
2092
- color?: "default" | "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red" | "gray_background" | "brown_background" | "orange_background" | "yellow_background" | "green_background" | "blue_background" | "purple_background" | "pink_background" | "red_background";
2121
+ color?: "default" | "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red" | "default_background" | "gray_background" | "brown_background" | "orange_background" | "yellow_background" | "green_background" | "blue_background" | "purple_background" | "pink_background" | "red_background";
2093
2122
  };
2094
2123
  };
2095
2124
  export type BlockObjectRequestWithoutChildren = {
@@ -2288,6 +2317,13 @@ export type BlockObjectRequestWithoutChildren = {
2288
2317
  url: TextRequest;
2289
2318
  };
2290
2319
  type?: "external";
2320
+ } | {
2321
+ custom_emoji: {
2322
+ id: IdRequest;
2323
+ name?: string;
2324
+ url?: string;
2325
+ };
2326
+ type?: "custom_emoji";
2291
2327
  };
2292
2328
  color?: ApiColor;
2293
2329
  };
@@ -2657,6 +2693,13 @@ export type BlockObjectRequest = {
2657
2693
  url: TextRequest;
2658
2694
  };
2659
2695
  type?: "external";
2696
+ } | {
2697
+ custom_emoji: {
2698
+ id: IdRequest;
2699
+ name?: string;
2700
+ url?: string;
2701
+ };
2702
+ type?: "custom_emoji";
2660
2703
  };
2661
2704
  };
2662
2705
  type?: "callout";
@@ -2904,6 +2947,13 @@ export type BlockObjectRequest = {
2904
2947
  url: TextRequest;
2905
2948
  };
2906
2949
  type?: "external";
2950
+ } | {
2951
+ custom_emoji: {
2952
+ id: IdRequest;
2953
+ name?: string;
2954
+ url?: string;
2955
+ };
2956
+ type?: "custom_emoji";
2907
2957
  };
2908
2958
  };
2909
2959
  type?: "callout";
@@ -3150,6 +3200,13 @@ export type BlockObjectRequest = {
3150
3200
  url: TextRequest;
3151
3201
  };
3152
3202
  type?: "external";
3203
+ } | {
3204
+ custom_emoji: {
3205
+ id: IdRequest;
3206
+ name?: string;
3207
+ url?: string;
3208
+ };
3209
+ type?: "custom_emoji";
3153
3210
  };
3154
3211
  };
3155
3212
  type?: "callout";
@@ -3396,6 +3453,13 @@ export type BlockObjectRequest = {
3396
3453
  url: TextRequest;
3397
3454
  };
3398
3455
  type?: "external";
3456
+ } | {
3457
+ custom_emoji: {
3458
+ id: IdRequest;
3459
+ name?: string;
3460
+ url?: string;
3461
+ };
3462
+ type?: "custom_emoji";
3399
3463
  };
3400
3464
  };
3401
3465
  type?: "callout";
@@ -3642,6 +3706,13 @@ export type BlockObjectRequest = {
3642
3706
  url: TextRequest;
3643
3707
  };
3644
3708
  type?: "external";
3709
+ } | {
3710
+ custom_emoji: {
3711
+ id: IdRequest;
3712
+ name?: string;
3713
+ url?: string;
3714
+ };
3715
+ type?: "custom_emoji";
3645
3716
  };
3646
3717
  };
3647
3718
  type?: "callout";
@@ -3887,6 +3958,13 @@ export type BlockObjectRequest = {
3887
3958
  url: TextRequest;
3888
3959
  };
3889
3960
  type?: "external";
3961
+ } | {
3962
+ custom_emoji: {
3963
+ id: IdRequest;
3964
+ name?: string;
3965
+ url?: string;
3966
+ };
3967
+ type?: "custom_emoji";
3890
3968
  };
3891
3969
  };
3892
3970
  type?: "callout";
@@ -4132,6 +4210,13 @@ export type BlockObjectRequest = {
4132
4210
  url: TextRequest;
4133
4211
  };
4134
4212
  type?: "external";
4213
+ } | {
4214
+ custom_emoji: {
4215
+ id: IdRequest;
4216
+ name?: string;
4217
+ url?: string;
4218
+ };
4219
+ type?: "custom_emoji";
4135
4220
  };
4136
4221
  };
4137
4222
  type?: "callout";
@@ -4377,6 +4462,13 @@ export type BlockObjectRequest = {
4377
4462
  url: TextRequest;
4378
4463
  };
4379
4464
  type?: "external";
4465
+ } | {
4466
+ custom_emoji: {
4467
+ id: IdRequest;
4468
+ name?: string;
4469
+ url?: string;
4470
+ };
4471
+ type?: "custom_emoji";
4380
4472
  };
4381
4473
  };
4382
4474
  type?: "callout";
@@ -4622,6 +4714,13 @@ export type BlockObjectRequest = {
4622
4714
  url: TextRequest;
4623
4715
  };
4624
4716
  type?: "external";
4717
+ } | {
4718
+ custom_emoji: {
4719
+ id: IdRequest;
4720
+ name?: string;
4721
+ url?: string;
4722
+ };
4723
+ type?: "custom_emoji";
4625
4724
  };
4626
4725
  };
4627
4726
  type?: "callout";
@@ -4867,6 +4966,13 @@ export type BlockObjectRequest = {
4867
4966
  url: TextRequest;
4868
4967
  };
4869
4968
  type?: "external";
4969
+ } | {
4970
+ custom_emoji: {
4971
+ id: IdRequest;
4972
+ name?: string;
4973
+ url?: string;
4974
+ };
4975
+ type?: "custom_emoji";
4870
4976
  };
4871
4977
  };
4872
4978
  type?: "callout";
@@ -5113,6 +5219,13 @@ export type BlockObjectRequest = {
5113
5219
  url: TextRequest;
5114
5220
  };
5115
5221
  type?: "external";
5222
+ } | {
5223
+ custom_emoji: {
5224
+ id: IdRequest;
5225
+ name?: string;
5226
+ url?: string;
5227
+ };
5228
+ type?: "custom_emoji";
5116
5229
  };
5117
5230
  };
5118
5231
  type?: "callout";
@@ -5357,6 +5470,13 @@ export type BlockObjectRequest = {
5357
5470
  url: TextRequest;
5358
5471
  };
5359
5472
  type?: "external";
5473
+ } | {
5474
+ custom_emoji: {
5475
+ id: IdRequest;
5476
+ name?: string;
5477
+ url?: string;
5478
+ };
5479
+ type?: "custom_emoji";
5360
5480
  };
5361
5481
  };
5362
5482
  type?: "callout";
@@ -5602,6 +5722,13 @@ export type BlockObjectRequest = {
5602
5722
  url: TextRequest;
5603
5723
  };
5604
5724
  type?: "external";
5725
+ } | {
5726
+ custom_emoji: {
5727
+ id: IdRequest;
5728
+ name?: string;
5729
+ url?: string;
5730
+ };
5731
+ type?: "custom_emoji";
5605
5732
  };
5606
5733
  };
5607
5734
  type?: "callout";
@@ -5625,6 +5752,13 @@ export type BlockObjectRequest = {
5625
5752
  url: TextRequest;
5626
5753
  };
5627
5754
  type?: "external";
5755
+ } | {
5756
+ custom_emoji: {
5757
+ id: IdRequest;
5758
+ name?: string;
5759
+ url?: string;
5760
+ };
5761
+ type?: "custom_emoji";
5628
5762
  };
5629
5763
  };
5630
5764
  type?: "callout";
@@ -5858,6 +5992,13 @@ export type BlockObjectRequest = {
5858
5992
  url: TextRequest;
5859
5993
  };
5860
5994
  type?: "external";
5995
+ } | {
5996
+ custom_emoji: {
5997
+ id: IdRequest;
5998
+ name?: string;
5999
+ url?: string;
6000
+ };
6001
+ type?: "custom_emoji";
5861
6002
  };
5862
6003
  };
5863
6004
  type?: "callout";
@@ -6361,6 +6502,13 @@ type CreatePageBodyParameters = {
6361
6502
  url: TextRequest;
6362
6503
  };
6363
6504
  type?: "external";
6505
+ } | null | {
6506
+ custom_emoji: {
6507
+ id: IdRequest;
6508
+ name?: string;
6509
+ url?: string;
6510
+ };
6511
+ type?: "custom_emoji";
6364
6512
  } | null;
6365
6513
  cover?: {
6366
6514
  external: {
@@ -6612,6 +6760,13 @@ type UpdatePageBodyParameters = {
6612
6760
  url: TextRequest;
6613
6761
  };
6614
6762
  type?: "external";
6763
+ } | null | {
6764
+ custom_emoji: {
6765
+ id: IdRequest;
6766
+ name?: string;
6767
+ url?: string;
6768
+ };
6769
+ type?: "custom_emoji";
6615
6770
  } | null;
6616
6771
  cover?: {
6617
6772
  external: {
@@ -6878,6 +7033,13 @@ type UpdateBlockBodyParameters = {
6878
7033
  url: TextRequest;
6879
7034
  };
6880
7035
  type?: "external";
7036
+ } | {
7037
+ custom_emoji: {
7038
+ id: IdRequest;
7039
+ name?: string;
7040
+ url?: string;
7041
+ };
7042
+ type?: "custom_emoji";
6881
7043
  };
6882
7044
  color?: ApiColor;
6883
7045
  };
@@ -6999,6 +7161,13 @@ type UpdateDatabaseBodyParameters = {
6999
7161
  url: TextRequest;
7000
7162
  };
7001
7163
  type?: "external";
7164
+ } | null | {
7165
+ custom_emoji: {
7166
+ id: IdRequest;
7167
+ name?: string;
7168
+ url?: string;
7169
+ };
7170
+ type?: "custom_emoji";
7002
7171
  } | null;
7003
7172
  cover?: {
7004
7173
  external: {
@@ -7399,6 +7568,13 @@ type CreateDatabaseBodyParameters = {
7399
7568
  url: TextRequest;
7400
7569
  };
7401
7570
  type?: "external";
7571
+ } | null | {
7572
+ custom_emoji: {
7573
+ id: IdRequest;
7574
+ name?: string;
7575
+ url?: string;
7576
+ };
7577
+ type?: "custom_emoji";
7402
7578
  } | null;
7403
7579
  cover?: {
7404
7580
  external: {