@prismicio/types-internal 2.5.0-alpha.0 → 2.5.0-alpha.2

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 (50) hide show
  1. package/lib/content/Document.d.ts +3972 -7926
  2. package/lib/content/fields/GroupContent.d.ts +17 -1754
  3. package/lib/content/fields/GroupContent.js +62 -22
  4. package/lib/content/fields/WidgetContent.d.ts +3371 -7324
  5. package/lib/content/fields/nestable/NestableContent.d.ts +3 -145
  6. package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +4 -212
  7. package/lib/content/fields/nestable/RichTextContent/Blocks.js +2 -0
  8. package/lib/content/fields/nestable/RichTextContent/index.d.ts +4 -184
  9. package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +6 -290
  10. package/lib/content/fields/slices/Slice/CompositeSliceContent.js +3 -0
  11. package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +2 -383
  12. package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +15 -1333
  13. package/lib/content/fields/slices/Slice/SharedSliceContent.js +2 -0
  14. package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +7 -1182
  15. package/lib/content/fields/slices/Slice/SimpleSliceContent.js +1 -0
  16. package/lib/content/fields/slices/Slice/SlicePrimaryContent.d.ts +7 -1182
  17. package/lib/content/fields/slices/Slice/index.d.ts +983 -2935
  18. package/lib/content/fields/slices/SliceItem.d.ts +148 -2100
  19. package/lib/content/fields/slices/SlicesContent.d.ts +866 -3644
  20. package/lib/content/fields/withDefaultValues.d.ts +4 -3
  21. package/lib/content/fields/withDefaultValues.js +17 -1
  22. package/lib/customtypes/CustomType.d.ts +70 -915
  23. package/lib/customtypes/Section.d.ts +70 -915
  24. package/lib/customtypes/diff/SharedSlice.d.ts +2 -340
  25. package/lib/customtypes/diff/Variation.d.ts +4 -351
  26. package/lib/customtypes/diff/Variation.js +4 -3
  27. package/lib/customtypes/diff/Widgets.d.ts +11 -0
  28. package/lib/customtypes/diff/Widgets.js +2 -0
  29. package/lib/customtypes/diff/index.d.ts +1 -0
  30. package/lib/customtypes/diff/index.js +1 -0
  31. package/lib/customtypes/widgets/Group.d.ts +15 -331
  32. package/lib/customtypes/widgets/Group.js +25 -5
  33. package/lib/customtypes/widgets/Widget.d.ts +7 -1014
  34. package/lib/customtypes/widgets/slices/LegacySlice.d.ts +2 -168
  35. package/lib/customtypes/widgets/slices/SharedSlice.d.ts +2 -336
  36. package/lib/customtypes/widgets/slices/SlicePrimaryWidget.d.ts +3 -338
  37. package/lib/customtypes/widgets/slices/Slices.d.ts +7 -1184
  38. package/lib/validators/function.js +8 -1
  39. package/package.json +5 -5
  40. package/src/content/fields/GroupContent.ts +107 -32
  41. package/src/content/fields/nestable/RichTextContent/Blocks.ts +3 -1
  42. package/src/content/fields/slices/Slice/CompositeSliceContent.ts +7 -4
  43. package/src/content/fields/slices/Slice/SharedSliceContent.ts +5 -3
  44. package/src/content/fields/slices/Slice/SimpleSliceContent.ts +3 -1
  45. package/src/content/fields/withDefaultValues.ts +27 -3
  46. package/src/customtypes/diff/Variation.ts +9 -20
  47. package/src/customtypes/diff/Widgets.ts +17 -0
  48. package/src/customtypes/diff/index.ts +1 -0
  49. package/src/customtypes/widgets/Group.ts +66 -20
  50. package/src/validators/function.ts +11 -1
@@ -1,1765 +1,28 @@
1
1
  import * as t from "io-ts";
2
2
  import type { ContentPath, TraverseWidgetContentFn } from "../../_internal/utils";
3
- import type { Group, NestableWidget } from "../../customtypes";
3
+ import { type Group, type NestableWidget } from "../../customtypes";
4
4
  import { LegacyContentCtx, WithTypes } from "../LegacyContentCtx";
5
+ import { NestableContent } from "./nestable";
6
+ export declare const GroupContentType: "GroupContentType";
7
+ export declare const isGroupContent: (u: unknown) => u is GroupContent;
8
+ export declare const GroupContent: t.Type<GroupContent>;
9
+ export declare type GroupContent = {
10
+ __TYPE__: typeof GroupContentType;
11
+ value: GroupItemContent[];
12
+ };
5
13
  export declare const GroupItemContentType: "GroupItemContent";
6
- export declare const GroupItemContent: t.ExactC<t.TypeC<{
7
- __TYPE__: t.LiteralC<"GroupItemContent">;
8
- value: t.ArrayC<t.TupleC<[t.StringC, t.UnionC<[t.ExactC<t.TypeC<{
9
- type: t.StringC;
10
- __TYPE__: t.LiteralC<"EmptyContent">;
11
- }>>, t.ExactC<t.TypeC<{
12
- __TYPE__: t.LiteralC<"BooleanContent">;
13
- value: t.BooleanC;
14
- }>>, t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
15
- embed_url: t.StringC;
16
- type: t.StringC;
17
- }>, t.PartialC<{
18
- version: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
19
- title: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
20
- author_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
21
- author_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
22
- provider_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
23
- provider_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
24
- cache_age: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
25
- thumbnail_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
26
- thumbnail_width: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
27
- thumbnail_height: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
28
- html: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
29
- }>]>>, t.ExactC<t.TypeC<{
30
- __TYPE__: t.LiteralC<"EmbedContent">;
31
- all: t.UnknownC;
32
- }>>]>, t.ExactC<t.TypeC<{
33
- type: t.LiteralC<"Text">;
34
- value: t.Type<string, string, unknown>;
35
- __TYPE__: t.LiteralC<"FieldContent">;
36
- }>>, t.ExactC<t.TypeC<{
37
- type: t.LiteralC<"Timestamp">;
38
- value: t.Type<string, string, unknown>;
39
- __TYPE__: t.LiteralC<"FieldContent">;
40
- }>>, t.ExactC<t.TypeC<{
41
- type: t.LiteralC<"Select">;
42
- value: t.Type<string, string, unknown>;
43
- __TYPE__: t.LiteralC<"FieldContent">;
44
- }>>, t.ExactC<t.TypeC<{
45
- type: t.LiteralC<"Range">;
46
- value: t.Type<string, string, unknown>;
47
- __TYPE__: t.LiteralC<"FieldContent">;
48
- }>>, t.ExactC<t.TypeC<{
49
- type: t.LiteralC<"Number">;
50
- value: t.Type<string, string, unknown>;
51
- __TYPE__: t.LiteralC<"FieldContent">;
52
- }>>, t.ExactC<t.TypeC<{
53
- type: t.LiteralC<"Date">;
54
- value: t.Type<string, string, unknown>;
55
- __TYPE__: t.LiteralC<"FieldContent">;
56
- }>>, t.ExactC<t.TypeC<{
57
- type: t.LiteralC<"Color">;
58
- value: t.Type<string, string, unknown>;
59
- __TYPE__: t.LiteralC<"FieldContent">;
60
- }>>, t.IntersectionC<[t.ExactC<t.TypeC<{
61
- position: t.ExactC<t.TypeC<{
62
- lat: t.NumberC;
63
- lng: t.NumberC;
64
- }>>;
65
- }>>, t.ExactC<t.TypeC<{
66
- __TYPE__: t.LiteralC<"GeoPointContent">;
67
- }>>]>, t.IntersectionC<[t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
68
- origin: t.ExactC<t.TypeC<{
69
- id: t.StringC;
70
- url: t.StringC;
71
- width: t.NumberC;
72
- height: t.NumberC;
73
- }>>;
74
- width: t.NumberC;
75
- height: t.NumberC;
76
- edit: t.TypeC<{
77
- zoom: t.NumberC;
78
- crop: t.TypeC<{
79
- x: t.NumberC;
80
- y: t.NumberC;
81
- }>;
82
- background: t.StringC;
83
- }>;
84
- }>, t.PartialC<{
85
- url: t.StringC;
86
- credits: t.Type<string | null, string | null, unknown>;
87
- alt: t.Type<string | null, string | null, unknown>;
88
- provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
89
- }>]>>, t.PartialC<{
90
- thumbnails: t.RecordC<t.StringC, t.ExactC<t.IntersectionC<[t.TypeC<{
91
- origin: t.ExactC<t.TypeC<{
92
- id: t.StringC;
93
- url: t.StringC;
94
- width: t.NumberC;
95
- height: t.NumberC;
96
- }>>;
97
- width: t.NumberC;
98
- height: t.NumberC;
99
- edit: t.TypeC<{
100
- zoom: t.NumberC;
101
- crop: t.TypeC<{
102
- x: t.NumberC;
103
- y: t.NumberC;
104
- }>;
105
- background: t.StringC;
106
- }>;
107
- }>, t.PartialC<{
108
- url: t.StringC;
109
- credits: t.Type<string | null, string | null, unknown>;
110
- alt: t.Type<string | null, string | null, unknown>;
111
- provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
112
- }>]>>>;
113
- }>]>, t.ExactC<t.TypeC<{
114
- __TYPE__: t.LiteralC<"ImageContent">;
115
- }>>]>, t.ExactC<t.TypeC<{
116
- __TYPE__: t.LiteralC<"IntegrationFieldsContent">;
117
- value: t.StringC;
118
- }>>, t.ExactC<t.TypeC<{
119
- __TYPE__: t.LiteralC<"LinkContent">;
120
- value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
121
- __TYPE__: t.LiteralC<"ImageLink">;
122
- }>>, t.ExactC<t.IntersectionC<[t.TypeC<{
123
- id: t.StringC;
124
- url: t.StringC;
125
- height: t.StringC;
126
- width: t.StringC;
127
- size: t.StringC;
128
- name: t.StringC;
129
- kind: t.StringC;
130
- }>, t.PartialC<{
131
- date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
132
- }>]>>]>, t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
133
- id: t.StringC;
134
- url: t.StringC;
135
- name: t.StringC;
136
- kind: t.StringC;
137
- size: t.StringC;
138
- }>, t.PartialC<{
139
- date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
140
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
141
- __TYPE__: t.LiteralC<"FileLink">;
142
- }>, t.PartialC<{
143
- size: t.StringC;
144
- }>]>>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
145
- __TYPE__: t.LiteralC<"DocumentLink">;
146
- }>>, t.ExactC<t.TypeC<{
147
- id: t.Type<string, string, unknown>;
148
- }>>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
149
- __TYPE__: t.LiteralC<"ExternalLink">;
150
- }>>, t.ExactC<t.IntersectionC<[t.TypeC<{
151
- url: t.StringC;
152
- }>, t.PartialC<{
153
- kind: t.LiteralC<"web">;
154
- target: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
155
- preview: t.UnionC<[t.Type<{
156
- title?: string;
157
- }, {
158
- title?: string;
159
- }, unknown>, t.NullC, t.UndefinedC]>;
160
- }>]>>]>]>;
161
- }>>, t.ExactC<t.TypeC<{
162
- __TYPE__: t.LiteralC<"StructuredTextContent">;
163
- value: t.ArrayC<t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
164
- type: t.LiteralC<"image">;
165
- data: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
166
- origin: t.ExactC<t.TypeC<{
167
- id: t.StringC;
168
- url: t.StringC;
169
- width: t.NumberC;
170
- height: t.NumberC;
171
- }>>;
172
- width: t.NumberC;
173
- height: t.NumberC;
174
- edit: t.TypeC<{
175
- zoom: t.NumberC;
176
- crop: t.TypeC<{
177
- x: t.NumberC;
178
- y: t.NumberC;
179
- }>;
180
- background: t.StringC;
181
- }>;
182
- }>, t.PartialC<{
183
- url: t.StringC;
184
- credits: t.Type<string | null, string | null, unknown>;
185
- alt: t.Type<string | null, string | null, unknown>;
186
- provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
187
- }>]>>, t.PartialC<{
188
- linkTo: t.UnionC<[t.Type<({
189
- __TYPE__: "ImageLink";
190
- } & {
191
- id: string;
192
- url: string;
193
- height: string;
194
- width: string;
195
- size: string;
196
- name: string;
197
- kind: string;
198
- } & {
199
- date?: string | null | undefined;
200
- }) | ({
201
- id: string;
202
- url: string;
203
- name: string;
204
- kind: string;
205
- size: string;
206
- } & {
207
- date?: string | null | undefined;
208
- } & {
209
- __TYPE__: "FileLink";
210
- } & {
211
- size?: string;
212
- }) | ({
213
- __TYPE__: "DocumentLink";
214
- } & {
215
- id: string;
216
- }) | ({
217
- __TYPE__: "ExternalLink";
218
- } & {
219
- url: string;
220
- } & {
221
- kind?: "web";
222
- target?: string | null | undefined;
223
- preview?: {
224
- title?: string;
225
- } | null | undefined;
226
- }), ({
227
- id: string;
228
- url: string;
229
- height: string;
230
- width: string;
231
- size: string;
232
- name: string;
233
- kind: string;
234
- } & {
235
- date?: string | null | undefined;
236
- }) | ({
237
- id: string;
238
- url: string;
239
- name: string;
240
- kind: string;
241
- size: string;
242
- } & {
243
- date?: string | null | undefined;
244
- }) | {
245
- id: string;
246
- } | ({
247
- url: string;
248
- } & {
249
- kind?: "web";
250
- target?: string | null | undefined;
251
- preview?: {
252
- title?: string;
253
- } | null | undefined;
254
- }), unknown>, t.NullC, t.UndefinedC]>;
255
- }>]>;
256
- }>, t.PartialC<{
257
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
258
- direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
259
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
260
- type: t.LiteralC<"embed">;
261
- data: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
262
- embed_url: t.StringC;
263
- type: t.StringC;
264
- }>, t.PartialC<{
265
- version: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
266
- title: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
267
- author_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
268
- author_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
269
- provider_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
270
- provider_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
271
- cache_age: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
272
- thumbnail_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
273
- thumbnail_width: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
274
- thumbnail_height: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
275
- html: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
276
- }>]>>, t.ExactC<t.TypeC<{
277
- __TYPE__: t.LiteralC<"EmbedContent">;
278
- all: t.UnknownC;
279
- }>>]>;
280
- }>, t.PartialC<{
281
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
282
- direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
283
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
284
- type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
285
- content: t.IntersectionC<[t.TypeC<{
286
- text: t.StringC;
287
- }>, t.PartialC<{
288
- spans: t.Type<({
289
- data: ({
290
- __TYPE__: "ImageLink";
291
- } & {
292
- id: string;
293
- url: string;
294
- height: string;
295
- width: string;
296
- size: string;
297
- name: string;
298
- kind: string;
299
- } & {
300
- date?: string | null | undefined;
301
- }) | ({
302
- id: string;
303
- url: string;
304
- name: string;
305
- kind: string;
306
- size: string;
307
- } & {
308
- date?: string | null | undefined;
309
- } & {
310
- __TYPE__: "FileLink";
311
- } & {
312
- size?: string;
313
- }) | ({
314
- __TYPE__: "DocumentLink";
315
- } & {
316
- id: string;
317
- }) | ({
318
- __TYPE__: "ExternalLink";
319
- } & {
320
- url: string;
321
- } & {
322
- kind?: "web";
323
- target?: string | null | undefined;
324
- preview?: {
325
- title?: string;
326
- } | null | undefined;
327
- });
328
- start: number;
329
- end: number;
330
- type: "hyperlink";
331
- } | {
332
- data: string;
333
- start: number;
334
- end: number;
335
- type: "label";
336
- } | {
337
- start: number;
338
- end: number;
339
- type: "strong" | "em" | "list-item";
340
- })[], ({
341
- data: ({
342
- __TYPE__: "ImageLink";
343
- } & {
344
- id: string;
345
- url: string;
346
- height: string;
347
- width: string;
348
- size: string;
349
- name: string;
350
- kind: string;
351
- } & {
352
- date?: string | null | undefined;
353
- }) | ({
354
- id: string;
355
- url: string;
356
- name: string;
357
- kind: string;
358
- size: string;
359
- } & {
360
- date?: string | null | undefined;
361
- } & {
362
- __TYPE__: "FileLink";
363
- } & {
364
- size?: string;
365
- }) | ({
366
- __TYPE__: "DocumentLink";
367
- } & {
368
- id: string;
369
- }) | ({
370
- __TYPE__: "ExternalLink";
371
- } & {
372
- url: string;
373
- } & {
374
- kind?: "web";
375
- target?: string | null | undefined;
376
- preview?: {
377
- title?: string;
378
- } | null | undefined;
379
- });
380
- start: number;
381
- end: number;
382
- type: "hyperlink";
383
- } | {
384
- data: string;
385
- start: number;
386
- end: number;
387
- type: "label";
388
- } | {
389
- start: number;
390
- end: number;
391
- type: "strong" | "em" | "list-item";
392
- })[], unknown>;
393
- }>]>;
394
- }>, t.PartialC<{
395
- label: t.StringC;
396
- direction: t.StringC;
397
- }>]>>]>>;
398
- }>>, t.ExactC<t.TypeC<{
399
- __TYPE__: t.LiteralC<"SeparatorContent">;
400
- }>>]>]>>;
401
- }>>;
402
- export declare type GroupItemContent = t.TypeOf<typeof GroupItemContent>;
14
+ export declare const GroupItemContent: t.Type<GroupItemContent>;
15
+ export declare type GroupItemContent = {
16
+ __TYPE__: typeof GroupItemContentType;
17
+ value: [string, NestableContent | GroupContent][];
18
+ };
403
19
  declare const itemLegacyReader: t.RecordC<t.StringC, t.UnknownC>;
404
20
  declare type GroupItemLegacy = t.TypeOf<typeof itemLegacyReader>;
405
- export declare const GroupItemLegacy: (ctx: LegacyContentCtx) => t.Type<{
406
- __TYPE__: "GroupItemContent";
407
- value: [string, {
408
- type: string;
409
- __TYPE__: "EmptyContent";
410
- } | {
411
- __TYPE__: "BooleanContent";
412
- value: boolean;
413
- } | ({
414
- embed_url: string;
415
- type: string;
416
- } & {
417
- version?: string | number | null;
418
- title?: string | null | undefined;
419
- author_name?: string | null | undefined;
420
- author_url?: string | null | undefined;
421
- provider_name?: string | null | undefined;
422
- provider_url?: string | null | undefined;
423
- cache_age?: string | number | null;
424
- thumbnail_url?: string | null | undefined;
425
- thumbnail_width?: number | null | undefined;
426
- thumbnail_height?: number | null | undefined;
427
- html?: string | null | undefined;
428
- } & {
429
- __TYPE__: "EmbedContent";
430
- all: unknown;
431
- }) | {
432
- type: "Color";
433
- value: string;
434
- __TYPE__: "FieldContent";
435
- } | {
436
- type: "Date";
437
- value: string;
438
- __TYPE__: "FieldContent";
439
- } | {
440
- type: "Number";
441
- value: string;
442
- __TYPE__: "FieldContent";
443
- } | {
444
- type: "Range";
445
- value: string;
446
- __TYPE__: "FieldContent";
447
- } | {
448
- type: "Select";
449
- value: string;
450
- __TYPE__: "FieldContent";
451
- } | {
452
- type: "Text";
453
- value: string;
454
- __TYPE__: "FieldContent";
455
- } | {
456
- type: "Timestamp";
457
- value: string;
458
- __TYPE__: "FieldContent";
459
- } | ({
460
- position: {
461
- lat: number;
462
- lng: number;
463
- };
464
- } & {
465
- __TYPE__: "GeoPointContent";
466
- }) | ({
467
- origin: {
468
- id: string;
469
- url: string;
470
- width: number;
471
- height: number;
472
- };
473
- width: number;
474
- height: number;
475
- edit: {
476
- zoom: number;
477
- crop: {
478
- x: number;
479
- y: number;
480
- };
481
- background: string;
482
- };
483
- } & {
484
- url?: string;
485
- credits?: string | null;
486
- alt?: string | null;
487
- provider?: string | null | undefined;
488
- } & {
489
- thumbnails?: {
490
- [x: string]: {
491
- origin: {
492
- id: string;
493
- url: string;
494
- width: number;
495
- height: number;
496
- };
497
- width: number;
498
- height: number;
499
- edit: {
500
- zoom: number;
501
- crop: {
502
- x: number;
503
- y: number;
504
- };
505
- background: string;
506
- };
507
- } & {
508
- url?: string;
509
- credits?: string | null;
510
- alt?: string | null;
511
- provider?: string | null | undefined;
512
- };
513
- };
514
- } & {
515
- __TYPE__: "ImageContent";
516
- }) | {
517
- __TYPE__: "IntegrationFieldsContent";
518
- value: string;
519
- } | {
520
- __TYPE__: "LinkContent";
521
- value: ({
522
- __TYPE__: "ImageLink";
523
- } & {
524
- id: string;
525
- url: string;
526
- height: string;
527
- width: string;
528
- size: string;
529
- name: string;
530
- kind: string;
531
- } & {
532
- date?: string | null | undefined;
533
- }) | ({
534
- id: string;
535
- url: string;
536
- name: string;
537
- kind: string;
538
- size: string;
539
- } & {
540
- date?: string | null | undefined;
541
- } & {
542
- __TYPE__: "FileLink";
543
- } & {
544
- size?: string;
545
- }) | ({
546
- __TYPE__: "DocumentLink";
547
- } & {
548
- id: string;
549
- }) | ({
550
- __TYPE__: "ExternalLink";
551
- } & {
552
- url: string;
553
- } & {
554
- kind?: "web";
555
- target?: string | null | undefined;
556
- preview?: {
557
- title?: string;
558
- } | null | undefined;
559
- });
560
- } | {
561
- __TYPE__: "StructuredTextContent";
562
- value: (({
563
- type: "image";
564
- data: {
565
- origin: {
566
- id: string;
567
- url: string;
568
- width: number;
569
- height: number;
570
- };
571
- width: number;
572
- height: number;
573
- edit: {
574
- zoom: number;
575
- crop: {
576
- x: number;
577
- y: number;
578
- };
579
- background: string;
580
- };
581
- } & {
582
- url?: string;
583
- credits?: string | null;
584
- alt?: string | null;
585
- provider?: string | null | undefined;
586
- } & {
587
- linkTo?: ({
588
- __TYPE__: "ImageLink";
589
- } & {
590
- id: string;
591
- url: string;
592
- height: string;
593
- width: string;
594
- size: string;
595
- name: string;
596
- kind: string;
597
- } & {
598
- date?: string | null | undefined;
599
- }) | ({
600
- id: string;
601
- url: string;
602
- name: string;
603
- kind: string;
604
- size: string;
605
- } & {
606
- date?: string | null | undefined;
607
- } & {
608
- __TYPE__: "FileLink";
609
- } & {
610
- size?: string;
611
- }) | ({
612
- __TYPE__: "DocumentLink";
613
- } & {
614
- id: string;
615
- }) | ({
616
- __TYPE__: "ExternalLink";
617
- } & {
618
- url: string;
619
- } & {
620
- kind?: "web";
621
- target?: string | null | undefined;
622
- preview?: {
623
- title?: string;
624
- } | null | undefined;
625
- }) | null | undefined;
626
- };
627
- } & {
628
- label?: string | null | undefined;
629
- direction?: string | null | undefined;
630
- }) | ({
631
- type: "embed";
632
- data: {
633
- embed_url: string;
634
- type: string;
635
- } & {
636
- version?: string | number | null;
637
- title?: string | null | undefined;
638
- author_name?: string | null | undefined;
639
- author_url?: string | null | undefined;
640
- provider_name?: string | null | undefined;
641
- provider_url?: string | null | undefined;
642
- cache_age?: string | number | null;
643
- thumbnail_url?: string | null | undefined;
644
- thumbnail_width?: number | null | undefined;
645
- thumbnail_height?: number | null | undefined;
646
- html?: string | null | undefined;
647
- } & {
648
- __TYPE__: "EmbedContent";
649
- all: unknown;
650
- };
651
- } & {
652
- label?: string | null | undefined;
653
- direction?: string | null | undefined;
654
- }) | ({
655
- type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
656
- content: {
657
- text: string;
658
- } & {
659
- spans?: ({
660
- data: ({
661
- __TYPE__: "ImageLink";
662
- } & {
663
- id: string;
664
- url: string;
665
- height: string;
666
- width: string;
667
- size: string;
668
- name: string;
669
- kind: string;
670
- } & {
671
- date?: string | null | undefined;
672
- }) | ({
673
- id: string;
674
- url: string;
675
- name: string;
676
- kind: string;
677
- size: string;
678
- } & {
679
- date?: string | null | undefined;
680
- } & {
681
- __TYPE__: "FileLink";
682
- } & {
683
- size?: string;
684
- }) | ({
685
- __TYPE__: "DocumentLink";
686
- } & {
687
- id: string;
688
- }) | ({
689
- __TYPE__: "ExternalLink";
690
- } & {
691
- url: string;
692
- } & {
693
- kind?: "web";
694
- target?: string | null | undefined;
695
- preview?: {
696
- title?: string;
697
- } | null | undefined;
698
- });
699
- start: number;
700
- end: number;
701
- type: "hyperlink";
702
- } | {
703
- data: string;
704
- start: number;
705
- end: number;
706
- type: "label";
707
- } | {
708
- start: number;
709
- end: number;
710
- type: "strong" | "em" | "list-item";
711
- })[];
712
- };
713
- } & {
714
- label?: string;
715
- direction?: string;
716
- }))[];
717
- } | {
718
- __TYPE__: "SeparatorContent";
719
- }][];
720
- }, WithTypes<{
21
+ export declare const GroupItemLegacy: (ctx: LegacyContentCtx) => t.Type<GroupItemContent, WithTypes<{
721
22
  [x: string]: unknown;
722
23
  }>, unknown>;
723
24
  declare type GroupLegacy = Array<GroupItemLegacy>;
724
- export declare const GroupLegacy: (ctx: LegacyContentCtx) => t.Type<{
725
- __TYPE__: "GroupContentType";
726
- value: {
727
- __TYPE__: "GroupItemContent";
728
- value: [string, {
729
- type: string;
730
- __TYPE__: "EmptyContent";
731
- } | {
732
- __TYPE__: "BooleanContent";
733
- value: boolean;
734
- } | ({
735
- embed_url: string;
736
- type: string;
737
- } & {
738
- version?: string | number | null;
739
- title?: string | null | undefined;
740
- author_name?: string | null | undefined;
741
- author_url?: string | null | undefined;
742
- provider_name?: string | null | undefined;
743
- provider_url?: string | null | undefined;
744
- cache_age?: string | number | null;
745
- thumbnail_url?: string | null | undefined;
746
- thumbnail_width?: number | null | undefined;
747
- thumbnail_height?: number | null | undefined;
748
- html?: string | null | undefined;
749
- } & {
750
- __TYPE__: "EmbedContent";
751
- all: unknown;
752
- }) | {
753
- type: "Color";
754
- value: string;
755
- __TYPE__: "FieldContent";
756
- } | {
757
- type: "Date";
758
- value: string;
759
- __TYPE__: "FieldContent";
760
- } | {
761
- type: "Number";
762
- value: string;
763
- __TYPE__: "FieldContent";
764
- } | {
765
- type: "Range";
766
- value: string;
767
- __TYPE__: "FieldContent";
768
- } | {
769
- type: "Select";
770
- value: string;
771
- __TYPE__: "FieldContent";
772
- } | {
773
- type: "Text";
774
- value: string;
775
- __TYPE__: "FieldContent";
776
- } | {
777
- type: "Timestamp";
778
- value: string;
779
- __TYPE__: "FieldContent";
780
- } | ({
781
- position: {
782
- lat: number;
783
- lng: number;
784
- };
785
- } & {
786
- __TYPE__: "GeoPointContent";
787
- }) | ({
788
- origin: {
789
- id: string;
790
- url: string;
791
- width: number;
792
- height: number;
793
- };
794
- width: number;
795
- height: number;
796
- edit: {
797
- zoom: number;
798
- crop: {
799
- x: number;
800
- y: number;
801
- };
802
- background: string;
803
- };
804
- } & {
805
- url?: string;
806
- credits?: string | null;
807
- alt?: string | null;
808
- provider?: string | null | undefined;
809
- } & {
810
- thumbnails?: {
811
- [x: string]: {
812
- origin: {
813
- id: string;
814
- url: string;
815
- width: number;
816
- height: number;
817
- };
818
- width: number;
819
- height: number;
820
- edit: {
821
- zoom: number;
822
- crop: {
823
- x: number;
824
- y: number;
825
- };
826
- background: string;
827
- };
828
- } & {
829
- url?: string;
830
- credits?: string | null;
831
- alt?: string | null;
832
- provider?: string | null | undefined;
833
- };
834
- };
835
- } & {
836
- __TYPE__: "ImageContent";
837
- }) | {
838
- __TYPE__: "IntegrationFieldsContent";
839
- value: string;
840
- } | {
841
- __TYPE__: "LinkContent";
842
- value: ({
843
- __TYPE__: "ImageLink";
844
- } & {
845
- id: string;
846
- url: string;
847
- height: string;
848
- width: string;
849
- size: string;
850
- name: string;
851
- kind: string;
852
- } & {
853
- date?: string | null | undefined;
854
- }) | ({
855
- id: string;
856
- url: string;
857
- name: string;
858
- kind: string;
859
- size: string;
860
- } & {
861
- date?: string | null | undefined;
862
- } & {
863
- __TYPE__: "FileLink";
864
- } & {
865
- size?: string;
866
- }) | ({
867
- __TYPE__: "DocumentLink";
868
- } & {
869
- id: string;
870
- }) | ({
871
- __TYPE__: "ExternalLink";
872
- } & {
873
- url: string;
874
- } & {
875
- kind?: "web";
876
- target?: string | null | undefined;
877
- preview?: {
878
- title?: string;
879
- } | null | undefined;
880
- });
881
- } | {
882
- __TYPE__: "StructuredTextContent";
883
- value: (({
884
- type: "image";
885
- data: {
886
- origin: {
887
- id: string;
888
- url: string;
889
- width: number;
890
- height: number;
891
- };
892
- width: number;
893
- height: number;
894
- edit: {
895
- zoom: number;
896
- crop: {
897
- x: number;
898
- y: number;
899
- };
900
- background: string;
901
- };
902
- } & {
903
- url?: string;
904
- credits?: string | null;
905
- alt?: string | null;
906
- provider?: string | null | undefined;
907
- } & {
908
- linkTo?: ({
909
- __TYPE__: "ImageLink";
910
- } & {
911
- id: string;
912
- url: string;
913
- height: string;
914
- width: string;
915
- size: string;
916
- name: string;
917
- kind: string;
918
- } & {
919
- date?: string | null | undefined;
920
- }) | ({
921
- id: string;
922
- url: string;
923
- name: string;
924
- kind: string;
925
- size: string;
926
- } & {
927
- date?: string | null | undefined;
928
- } & {
929
- __TYPE__: "FileLink";
930
- } & {
931
- size?: string;
932
- }) | ({
933
- __TYPE__: "DocumentLink";
934
- } & {
935
- id: string;
936
- }) | ({
937
- __TYPE__: "ExternalLink";
938
- } & {
939
- url: string;
940
- } & {
941
- kind?: "web";
942
- target?: string | null | undefined;
943
- preview?: {
944
- title?: string;
945
- } | null | undefined;
946
- }) | null | undefined;
947
- };
948
- } & {
949
- label?: string | null | undefined;
950
- direction?: string | null | undefined;
951
- }) | ({
952
- type: "embed";
953
- data: {
954
- embed_url: string;
955
- type: string;
956
- } & {
957
- version?: string | number | null;
958
- title?: string | null | undefined;
959
- author_name?: string | null | undefined;
960
- author_url?: string | null | undefined;
961
- provider_name?: string | null | undefined;
962
- provider_url?: string | null | undefined;
963
- cache_age?: string | number | null;
964
- thumbnail_url?: string | null | undefined;
965
- thumbnail_width?: number | null | undefined;
966
- thumbnail_height?: number | null | undefined;
967
- html?: string | null | undefined;
968
- } & {
969
- __TYPE__: "EmbedContent";
970
- all: unknown;
971
- };
972
- } & {
973
- label?: string | null | undefined;
974
- direction?: string | null | undefined;
975
- }) | ({
976
- type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
977
- content: {
978
- text: string;
979
- } & {
980
- spans?: ({
981
- data: ({
982
- __TYPE__: "ImageLink";
983
- } & {
984
- id: string;
985
- url: string;
986
- height: string;
987
- width: string;
988
- size: string;
989
- name: string;
990
- kind: string;
991
- } & {
992
- date?: string | null | undefined;
993
- }) | ({
994
- id: string;
995
- url: string;
996
- name: string;
997
- kind: string;
998
- size: string;
999
- } & {
1000
- date?: string | null | undefined;
1001
- } & {
1002
- __TYPE__: "FileLink";
1003
- } & {
1004
- size?: string;
1005
- }) | ({
1006
- __TYPE__: "DocumentLink";
1007
- } & {
1008
- id: string;
1009
- }) | ({
1010
- __TYPE__: "ExternalLink";
1011
- } & {
1012
- url: string;
1013
- } & {
1014
- kind?: "web";
1015
- target?: string | null | undefined;
1016
- preview?: {
1017
- title?: string;
1018
- } | null | undefined;
1019
- });
1020
- start: number;
1021
- end: number;
1022
- type: "hyperlink";
1023
- } | {
1024
- data: string;
1025
- start: number;
1026
- end: number;
1027
- type: "label";
1028
- } | {
1029
- start: number;
1030
- end: number;
1031
- type: "strong" | "em" | "list-item";
1032
- })[];
1033
- };
1034
- } & {
1035
- label?: string;
1036
- direction?: string;
1037
- }))[];
1038
- } | {
1039
- __TYPE__: "SeparatorContent";
1040
- }][];
1041
- }[];
1042
- }, WithTypes<GroupLegacy>, unknown>;
1043
- export declare const GroupContentType: "GroupContentType";
1044
- export declare const isGroupContent: (u: unknown) => u is {
1045
- __TYPE__: "GroupContentType";
1046
- value: {
1047
- __TYPE__: "GroupItemContent";
1048
- value: [string, {
1049
- type: string;
1050
- __TYPE__: "EmptyContent";
1051
- } | {
1052
- __TYPE__: "BooleanContent";
1053
- value: boolean;
1054
- } | ({
1055
- embed_url: string;
1056
- type: string;
1057
- } & {
1058
- version?: string | number | null;
1059
- title?: string | null | undefined;
1060
- author_name?: string | null | undefined;
1061
- author_url?: string | null | undefined;
1062
- provider_name?: string | null | undefined;
1063
- provider_url?: string | null | undefined;
1064
- cache_age?: string | number | null;
1065
- thumbnail_url?: string | null | undefined;
1066
- thumbnail_width?: number | null | undefined;
1067
- thumbnail_height?: number | null | undefined;
1068
- html?: string | null | undefined;
1069
- } & {
1070
- __TYPE__: "EmbedContent";
1071
- all: unknown;
1072
- }) | {
1073
- type: "Color";
1074
- value: string;
1075
- __TYPE__: "FieldContent";
1076
- } | {
1077
- type: "Date";
1078
- value: string;
1079
- __TYPE__: "FieldContent";
1080
- } | {
1081
- type: "Number";
1082
- value: string;
1083
- __TYPE__: "FieldContent";
1084
- } | {
1085
- type: "Range";
1086
- value: string;
1087
- __TYPE__: "FieldContent";
1088
- } | {
1089
- type: "Select";
1090
- value: string;
1091
- __TYPE__: "FieldContent";
1092
- } | {
1093
- type: "Text";
1094
- value: string;
1095
- __TYPE__: "FieldContent";
1096
- } | {
1097
- type: "Timestamp";
1098
- value: string;
1099
- __TYPE__: "FieldContent";
1100
- } | ({
1101
- position: {
1102
- lat: number;
1103
- lng: number;
1104
- };
1105
- } & {
1106
- __TYPE__: "GeoPointContent";
1107
- }) | ({
1108
- origin: {
1109
- id: string;
1110
- url: string;
1111
- width: number;
1112
- height: number;
1113
- };
1114
- width: number;
1115
- height: number;
1116
- edit: {
1117
- zoom: number;
1118
- crop: {
1119
- x: number;
1120
- y: number;
1121
- };
1122
- background: string;
1123
- };
1124
- } & {
1125
- url?: string;
1126
- credits?: string | null;
1127
- alt?: string | null;
1128
- provider?: string | null | undefined;
1129
- } & {
1130
- thumbnails?: {
1131
- [x: string]: {
1132
- origin: {
1133
- id: string;
1134
- url: string;
1135
- width: number;
1136
- height: number;
1137
- };
1138
- width: number;
1139
- height: number;
1140
- edit: {
1141
- zoom: number;
1142
- crop: {
1143
- x: number;
1144
- y: number;
1145
- };
1146
- background: string;
1147
- };
1148
- } & {
1149
- url?: string;
1150
- credits?: string | null;
1151
- alt?: string | null;
1152
- provider?: string | null | undefined;
1153
- };
1154
- };
1155
- } & {
1156
- __TYPE__: "ImageContent";
1157
- }) | {
1158
- __TYPE__: "IntegrationFieldsContent";
1159
- value: string;
1160
- } | {
1161
- __TYPE__: "LinkContent";
1162
- value: ({
1163
- __TYPE__: "ImageLink";
1164
- } & {
1165
- id: string;
1166
- url: string;
1167
- height: string;
1168
- width: string;
1169
- size: string;
1170
- name: string;
1171
- kind: string;
1172
- } & {
1173
- date?: string | null | undefined;
1174
- }) | ({
1175
- id: string;
1176
- url: string;
1177
- name: string;
1178
- kind: string;
1179
- size: string;
1180
- } & {
1181
- date?: string | null | undefined;
1182
- } & {
1183
- __TYPE__: "FileLink";
1184
- } & {
1185
- size?: string;
1186
- }) | ({
1187
- __TYPE__: "DocumentLink";
1188
- } & {
1189
- id: string;
1190
- }) | ({
1191
- __TYPE__: "ExternalLink";
1192
- } & {
1193
- url: string;
1194
- } & {
1195
- kind?: "web";
1196
- target?: string | null | undefined;
1197
- preview?: {
1198
- title?: string;
1199
- } | null | undefined;
1200
- });
1201
- } | {
1202
- __TYPE__: "StructuredTextContent";
1203
- value: (({
1204
- type: "image";
1205
- data: {
1206
- origin: {
1207
- id: string;
1208
- url: string;
1209
- width: number;
1210
- height: number;
1211
- };
1212
- width: number;
1213
- height: number;
1214
- edit: {
1215
- zoom: number;
1216
- crop: {
1217
- x: number;
1218
- y: number;
1219
- };
1220
- background: string;
1221
- };
1222
- } & {
1223
- url?: string;
1224
- credits?: string | null;
1225
- alt?: string | null;
1226
- provider?: string | null | undefined;
1227
- } & {
1228
- linkTo?: ({
1229
- __TYPE__: "ImageLink";
1230
- } & {
1231
- id: string;
1232
- url: string;
1233
- height: string;
1234
- width: string;
1235
- size: string;
1236
- name: string;
1237
- kind: string;
1238
- } & {
1239
- date?: string | null | undefined;
1240
- }) | ({
1241
- id: string;
1242
- url: string;
1243
- name: string;
1244
- kind: string;
1245
- size: string;
1246
- } & {
1247
- date?: string | null | undefined;
1248
- } & {
1249
- __TYPE__: "FileLink";
1250
- } & {
1251
- size?: string;
1252
- }) | ({
1253
- __TYPE__: "DocumentLink";
1254
- } & {
1255
- id: string;
1256
- }) | ({
1257
- __TYPE__: "ExternalLink";
1258
- } & {
1259
- url: string;
1260
- } & {
1261
- kind?: "web";
1262
- target?: string | null | undefined;
1263
- preview?: {
1264
- title?: string;
1265
- } | null | undefined;
1266
- }) | null | undefined;
1267
- };
1268
- } & {
1269
- label?: string | null | undefined;
1270
- direction?: string | null | undefined;
1271
- }) | ({
1272
- type: "embed";
1273
- data: {
1274
- embed_url: string;
1275
- type: string;
1276
- } & {
1277
- version?: string | number | null;
1278
- title?: string | null | undefined;
1279
- author_name?: string | null | undefined;
1280
- author_url?: string | null | undefined;
1281
- provider_name?: string | null | undefined;
1282
- provider_url?: string | null | undefined;
1283
- cache_age?: string | number | null;
1284
- thumbnail_url?: string | null | undefined;
1285
- thumbnail_width?: number | null | undefined;
1286
- thumbnail_height?: number | null | undefined;
1287
- html?: string | null | undefined;
1288
- } & {
1289
- __TYPE__: "EmbedContent";
1290
- all: unknown;
1291
- };
1292
- } & {
1293
- label?: string | null | undefined;
1294
- direction?: string | null | undefined;
1295
- }) | ({
1296
- type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
1297
- content: {
1298
- text: string;
1299
- } & {
1300
- spans?: ({
1301
- data: ({
1302
- __TYPE__: "ImageLink";
1303
- } & {
1304
- id: string;
1305
- url: string;
1306
- height: string;
1307
- width: string;
1308
- size: string;
1309
- name: string;
1310
- kind: string;
1311
- } & {
1312
- date?: string | null | undefined;
1313
- }) | ({
1314
- id: string;
1315
- url: string;
1316
- name: string;
1317
- kind: string;
1318
- size: string;
1319
- } & {
1320
- date?: string | null | undefined;
1321
- } & {
1322
- __TYPE__: "FileLink";
1323
- } & {
1324
- size?: string;
1325
- }) | ({
1326
- __TYPE__: "DocumentLink";
1327
- } & {
1328
- id: string;
1329
- }) | ({
1330
- __TYPE__: "ExternalLink";
1331
- } & {
1332
- url: string;
1333
- } & {
1334
- kind?: "web";
1335
- target?: string | null | undefined;
1336
- preview?: {
1337
- title?: string;
1338
- } | null | undefined;
1339
- });
1340
- start: number;
1341
- end: number;
1342
- type: "hyperlink";
1343
- } | {
1344
- data: string;
1345
- start: number;
1346
- end: number;
1347
- type: "label";
1348
- } | {
1349
- start: number;
1350
- end: number;
1351
- type: "strong" | "em" | "list-item";
1352
- })[];
1353
- };
1354
- } & {
1355
- label?: string;
1356
- direction?: string;
1357
- }))[];
1358
- } | {
1359
- __TYPE__: "SeparatorContent";
1360
- }][];
1361
- }[];
1362
- };
1363
- export declare const GroupContent: t.ExactC<t.TypeC<{
1364
- __TYPE__: t.LiteralC<"GroupContentType">;
1365
- value: t.ArrayC<t.ExactC<t.TypeC<{
1366
- __TYPE__: t.LiteralC<"GroupItemContent">;
1367
- value: t.ArrayC<t.TupleC<[t.StringC, t.UnionC<[t.ExactC<t.TypeC<{
1368
- type: t.StringC;
1369
- __TYPE__: t.LiteralC<"EmptyContent">;
1370
- }>>, t.ExactC<t.TypeC<{
1371
- __TYPE__: t.LiteralC<"BooleanContent">;
1372
- value: t.BooleanC;
1373
- }>>, t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
1374
- embed_url: t.StringC;
1375
- type: t.StringC;
1376
- }>, t.PartialC<{
1377
- version: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
1378
- title: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1379
- author_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1380
- author_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1381
- provider_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1382
- provider_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1383
- cache_age: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
1384
- thumbnail_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1385
- thumbnail_width: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
1386
- thumbnail_height: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
1387
- html: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1388
- }>]>>, t.ExactC<t.TypeC<{
1389
- __TYPE__: t.LiteralC<"EmbedContent">;
1390
- all: t.UnknownC;
1391
- }>>]>, t.ExactC<t.TypeC<{
1392
- type: t.LiteralC<"Text">;
1393
- value: t.Type<string, string, unknown>;
1394
- __TYPE__: t.LiteralC<"FieldContent">;
1395
- }>>, t.ExactC<t.TypeC<{
1396
- type: t.LiteralC<"Timestamp">;
1397
- value: t.Type<string, string, unknown>;
1398
- __TYPE__: t.LiteralC<"FieldContent">;
1399
- }>>, t.ExactC<t.TypeC<{
1400
- type: t.LiteralC<"Select">;
1401
- value: t.Type<string, string, unknown>;
1402
- __TYPE__: t.LiteralC<"FieldContent">;
1403
- }>>, t.ExactC<t.TypeC<{
1404
- type: t.LiteralC<"Range">;
1405
- value: t.Type<string, string, unknown>;
1406
- __TYPE__: t.LiteralC<"FieldContent">;
1407
- }>>, t.ExactC<t.TypeC<{
1408
- type: t.LiteralC<"Number">;
1409
- value: t.Type<string, string, unknown>;
1410
- __TYPE__: t.LiteralC<"FieldContent">;
1411
- }>>, t.ExactC<t.TypeC<{
1412
- type: t.LiteralC<"Date">;
1413
- value: t.Type<string, string, unknown>;
1414
- __TYPE__: t.LiteralC<"FieldContent">;
1415
- }>>, t.ExactC<t.TypeC<{
1416
- type: t.LiteralC<"Color">;
1417
- value: t.Type<string, string, unknown>;
1418
- __TYPE__: t.LiteralC<"FieldContent">;
1419
- }>>, t.IntersectionC<[t.ExactC<t.TypeC<{
1420
- position: t.ExactC<t.TypeC<{
1421
- lat: t.NumberC;
1422
- lng: t.NumberC;
1423
- }>>;
1424
- }>>, t.ExactC<t.TypeC<{
1425
- __TYPE__: t.LiteralC<"GeoPointContent">;
1426
- }>>]>, t.IntersectionC<[t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
1427
- origin: t.ExactC<t.TypeC<{
1428
- id: t.StringC;
1429
- url: t.StringC;
1430
- width: t.NumberC;
1431
- height: t.NumberC;
1432
- }>>;
1433
- width: t.NumberC;
1434
- height: t.NumberC;
1435
- edit: t.TypeC<{
1436
- zoom: t.NumberC;
1437
- crop: t.TypeC<{
1438
- x: t.NumberC;
1439
- y: t.NumberC;
1440
- }>;
1441
- background: t.StringC;
1442
- }>;
1443
- }>, t.PartialC<{
1444
- url: t.StringC;
1445
- credits: t.Type<string | null, string | null, unknown>;
1446
- alt: t.Type<string | null, string | null, unknown>;
1447
- provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1448
- }>]>>, t.PartialC<{
1449
- thumbnails: t.RecordC<t.StringC, t.ExactC<t.IntersectionC<[t.TypeC<{
1450
- origin: t.ExactC<t.TypeC<{
1451
- id: t.StringC;
1452
- url: t.StringC;
1453
- width: t.NumberC;
1454
- height: t.NumberC;
1455
- }>>;
1456
- width: t.NumberC;
1457
- height: t.NumberC;
1458
- edit: t.TypeC<{
1459
- zoom: t.NumberC;
1460
- crop: t.TypeC<{
1461
- x: t.NumberC;
1462
- y: t.NumberC;
1463
- }>;
1464
- background: t.StringC;
1465
- }>;
1466
- }>, t.PartialC<{
1467
- url: t.StringC;
1468
- credits: t.Type<string | null, string | null, unknown>;
1469
- alt: t.Type<string | null, string | null, unknown>;
1470
- provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1471
- }>]>>>;
1472
- }>]>, t.ExactC<t.TypeC<{
1473
- __TYPE__: t.LiteralC<"ImageContent">;
1474
- }>>]>, t.ExactC<t.TypeC<{
1475
- __TYPE__: t.LiteralC<"IntegrationFieldsContent">;
1476
- value: t.StringC;
1477
- }>>, t.ExactC<t.TypeC<{
1478
- __TYPE__: t.LiteralC<"LinkContent">;
1479
- value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
1480
- __TYPE__: t.LiteralC<"ImageLink">;
1481
- }>>, t.ExactC<t.IntersectionC<[t.TypeC<{
1482
- id: t.StringC;
1483
- url: t.StringC;
1484
- height: t.StringC;
1485
- width: t.StringC;
1486
- size: t.StringC;
1487
- name: t.StringC;
1488
- kind: t.StringC;
1489
- }>, t.PartialC<{
1490
- date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1491
- }>]>>]>, t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
1492
- id: t.StringC;
1493
- url: t.StringC;
1494
- name: t.StringC;
1495
- kind: t.StringC;
1496
- size: t.StringC;
1497
- }>, t.PartialC<{
1498
- date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1499
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
1500
- __TYPE__: t.LiteralC<"FileLink">;
1501
- }>, t.PartialC<{
1502
- size: t.StringC;
1503
- }>]>>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
1504
- __TYPE__: t.LiteralC<"DocumentLink">;
1505
- }>>, t.ExactC<t.TypeC<{
1506
- id: t.Type<string, string, unknown>;
1507
- }>>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
1508
- __TYPE__: t.LiteralC<"ExternalLink">;
1509
- }>>, t.ExactC<t.IntersectionC<[t.TypeC<{
1510
- url: t.StringC;
1511
- }>, t.PartialC<{
1512
- kind: t.LiteralC<"web">;
1513
- target: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1514
- preview: t.UnionC<[t.Type<{
1515
- title?: string;
1516
- }, {
1517
- title?: string;
1518
- }, unknown>, t.NullC, t.UndefinedC]>;
1519
- }>]>>]>]>;
1520
- }>>, t.ExactC<t.TypeC<{
1521
- __TYPE__: t.LiteralC<"StructuredTextContent">;
1522
- value: t.ArrayC<t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
1523
- type: t.LiteralC<"image">;
1524
- data: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
1525
- origin: t.ExactC<t.TypeC<{
1526
- id: t.StringC;
1527
- url: t.StringC;
1528
- width: t.NumberC;
1529
- height: t.NumberC;
1530
- }>>;
1531
- width: t.NumberC;
1532
- height: t.NumberC;
1533
- edit: t.TypeC<{
1534
- zoom: t.NumberC;
1535
- crop: t.TypeC<{
1536
- x: t.NumberC;
1537
- y: t.NumberC;
1538
- }>;
1539
- background: t.StringC;
1540
- }>;
1541
- }>, t.PartialC<{
1542
- url: t.StringC;
1543
- credits: t.Type<string | null, string | null, unknown>;
1544
- alt: t.Type<string | null, string | null, unknown>;
1545
- provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1546
- }>]>>, t.PartialC<{
1547
- linkTo: t.UnionC<[t.Type<({
1548
- __TYPE__: "ImageLink";
1549
- } & {
1550
- id: string;
1551
- url: string;
1552
- height: string;
1553
- width: string;
1554
- size: string;
1555
- name: string;
1556
- kind: string;
1557
- } & {
1558
- date?: string | null | undefined;
1559
- }) | ({
1560
- id: string;
1561
- url: string;
1562
- name: string;
1563
- kind: string;
1564
- size: string;
1565
- } & {
1566
- date?: string | null | undefined;
1567
- } & {
1568
- __TYPE__: "FileLink";
1569
- } & {
1570
- size?: string;
1571
- }) | ({
1572
- __TYPE__: "DocumentLink";
1573
- } & {
1574
- id: string;
1575
- }) | ({
1576
- __TYPE__: "ExternalLink";
1577
- } & {
1578
- url: string;
1579
- } & {
1580
- kind?: "web";
1581
- target?: string | null | undefined;
1582
- preview?: {
1583
- title?: string;
1584
- } | null | undefined;
1585
- }), ({
1586
- id: string;
1587
- url: string;
1588
- height: string;
1589
- width: string;
1590
- size: string;
1591
- name: string;
1592
- kind: string;
1593
- } & {
1594
- date?: string | null | undefined;
1595
- }) | ({
1596
- id: string;
1597
- url: string;
1598
- name: string;
1599
- kind: string;
1600
- size: string;
1601
- } & {
1602
- date?: string | null | undefined;
1603
- }) | {
1604
- id: string;
1605
- } | ({
1606
- url: string;
1607
- } & {
1608
- kind?: "web";
1609
- target?: string | null | undefined;
1610
- preview?: {
1611
- title?: string;
1612
- } | null | undefined;
1613
- }), unknown>, t.NullC, t.UndefinedC]>;
1614
- }>]>;
1615
- }>, t.PartialC<{
1616
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1617
- direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1618
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
1619
- type: t.LiteralC<"embed">;
1620
- data: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
1621
- embed_url: t.StringC;
1622
- type: t.StringC;
1623
- }>, t.PartialC<{
1624
- version: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
1625
- title: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1626
- author_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1627
- author_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1628
- provider_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1629
- provider_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1630
- cache_age: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
1631
- thumbnail_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1632
- thumbnail_width: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
1633
- thumbnail_height: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
1634
- html: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1635
- }>]>>, t.ExactC<t.TypeC<{
1636
- __TYPE__: t.LiteralC<"EmbedContent">;
1637
- all: t.UnknownC;
1638
- }>>]>;
1639
- }>, t.PartialC<{
1640
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1641
- direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1642
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
1643
- type: t.Type<"image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl", unknown>;
1644
- content: t.IntersectionC<[t.TypeC<{
1645
- text: t.StringC;
1646
- }>, t.PartialC<{
1647
- spans: t.Type<({
1648
- data: ({
1649
- __TYPE__: "ImageLink";
1650
- } & {
1651
- id: string;
1652
- url: string;
1653
- height: string;
1654
- width: string;
1655
- size: string;
1656
- name: string;
1657
- kind: string;
1658
- } & {
1659
- date?: string | null | undefined;
1660
- }) | ({
1661
- id: string;
1662
- url: string;
1663
- name: string;
1664
- kind: string;
1665
- size: string;
1666
- } & {
1667
- date?: string | null | undefined;
1668
- } & {
1669
- __TYPE__: "FileLink";
1670
- } & {
1671
- size?: string;
1672
- }) | ({
1673
- __TYPE__: "DocumentLink";
1674
- } & {
1675
- id: string;
1676
- }) | ({
1677
- __TYPE__: "ExternalLink";
1678
- } & {
1679
- url: string;
1680
- } & {
1681
- kind?: "web";
1682
- target?: string | null | undefined;
1683
- preview?: {
1684
- title?: string;
1685
- } | null | undefined;
1686
- });
1687
- start: number;
1688
- end: number;
1689
- type: "hyperlink";
1690
- } | {
1691
- data: string;
1692
- start: number;
1693
- end: number;
1694
- type: "label";
1695
- } | {
1696
- start: number;
1697
- end: number;
1698
- type: "strong" | "em" | "list-item";
1699
- })[], ({
1700
- data: ({
1701
- __TYPE__: "ImageLink";
1702
- } & {
1703
- id: string;
1704
- url: string;
1705
- height: string;
1706
- width: string;
1707
- size: string;
1708
- name: string;
1709
- kind: string;
1710
- } & {
1711
- date?: string | null | undefined;
1712
- }) | ({
1713
- id: string;
1714
- url: string;
1715
- name: string;
1716
- kind: string;
1717
- size: string;
1718
- } & {
1719
- date?: string | null | undefined;
1720
- } & {
1721
- __TYPE__: "FileLink";
1722
- } & {
1723
- size?: string;
1724
- }) | ({
1725
- __TYPE__: "DocumentLink";
1726
- } & {
1727
- id: string;
1728
- }) | ({
1729
- __TYPE__: "ExternalLink";
1730
- } & {
1731
- url: string;
1732
- } & {
1733
- kind?: "web";
1734
- target?: string | null | undefined;
1735
- preview?: {
1736
- title?: string;
1737
- } | null | undefined;
1738
- });
1739
- start: number;
1740
- end: number;
1741
- type: "hyperlink";
1742
- } | {
1743
- data: string;
1744
- start: number;
1745
- end: number;
1746
- type: "label";
1747
- } | {
1748
- start: number;
1749
- end: number;
1750
- type: "strong" | "em" | "list-item";
1751
- })[], unknown>;
1752
- }>]>;
1753
- }>, t.PartialC<{
1754
- label: t.StringC;
1755
- direction: t.StringC;
1756
- }>]>>]>>;
1757
- }>>, t.ExactC<t.TypeC<{
1758
- __TYPE__: t.LiteralC<"SeparatorContent">;
1759
- }>>]>]>>;
1760
- }>>>;
1761
- }>>;
1762
- export declare type GroupContent = t.TypeOf<typeof GroupContent>;
25
+ export declare const GroupLegacy: (ctx: LegacyContentCtx) => t.Type<GroupContent, WithTypes<GroupLegacy>, unknown>;
1763
26
  export declare const GroupContentDefaultValue: GroupContent;
1764
27
  export declare function groupContentWithDefaultValues(customType: Group, content: GroupContent): GroupContent;
1765
28
  export declare function traverseGroupContent({ path, key, apiId, model, content, }: {
@@ -1772,6 +35,6 @@ export declare function traverseGroupContent({ path, key, apiId, model, content,
1772
35
  export declare function traverseGroupItemsContent({ path, model, content, }: {
1773
36
  path: ContentPath;
1774
37
  content: Array<GroupItemContent>;
1775
- model?: Record<string, NestableWidget> | undefined;
38
+ model?: Record<string, Group | NestableWidget> | undefined;
1776
39
  }): (transform: TraverseWidgetContentFn) => Array<GroupItemContent>;
1777
40
  export {};