@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.
- package/lib/content/Document.d.ts +3972 -7926
- package/lib/content/fields/GroupContent.d.ts +17 -1754
- package/lib/content/fields/GroupContent.js +62 -22
- package/lib/content/fields/WidgetContent.d.ts +3371 -7324
- package/lib/content/fields/nestable/NestableContent.d.ts +3 -145
- package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +4 -212
- package/lib/content/fields/nestable/RichTextContent/Blocks.js +2 -0
- package/lib/content/fields/nestable/RichTextContent/index.d.ts +4 -184
- package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +6 -290
- package/lib/content/fields/slices/Slice/CompositeSliceContent.js +3 -0
- package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +2 -383
- package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +15 -1333
- package/lib/content/fields/slices/Slice/SharedSliceContent.js +2 -0
- package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +7 -1182
- package/lib/content/fields/slices/Slice/SimpleSliceContent.js +1 -0
- package/lib/content/fields/slices/Slice/SlicePrimaryContent.d.ts +7 -1182
- package/lib/content/fields/slices/Slice/index.d.ts +983 -2935
- package/lib/content/fields/slices/SliceItem.d.ts +148 -2100
- package/lib/content/fields/slices/SlicesContent.d.ts +866 -3644
- package/lib/content/fields/withDefaultValues.d.ts +4 -3
- package/lib/content/fields/withDefaultValues.js +17 -1
- package/lib/customtypes/CustomType.d.ts +70 -915
- package/lib/customtypes/Section.d.ts +70 -915
- package/lib/customtypes/diff/SharedSlice.d.ts +2 -340
- package/lib/customtypes/diff/Variation.d.ts +4 -351
- package/lib/customtypes/diff/Variation.js +4 -3
- package/lib/customtypes/diff/Widgets.d.ts +11 -0
- package/lib/customtypes/diff/Widgets.js +2 -0
- package/lib/customtypes/diff/index.d.ts +1 -0
- package/lib/customtypes/diff/index.js +1 -0
- package/lib/customtypes/widgets/Group.d.ts +15 -331
- package/lib/customtypes/widgets/Group.js +25 -5
- package/lib/customtypes/widgets/Widget.d.ts +7 -1014
- package/lib/customtypes/widgets/slices/LegacySlice.d.ts +2 -168
- package/lib/customtypes/widgets/slices/SharedSlice.d.ts +2 -336
- package/lib/customtypes/widgets/slices/SlicePrimaryWidget.d.ts +3 -338
- package/lib/customtypes/widgets/slices/Slices.d.ts +7 -1184
- package/lib/validators/function.js +8 -1
- package/package.json +5 -5
- package/src/content/fields/GroupContent.ts +107 -32
- package/src/content/fields/nestable/RichTextContent/Blocks.ts +3 -1
- package/src/content/fields/slices/Slice/CompositeSliceContent.ts +7 -4
- package/src/content/fields/slices/Slice/SharedSliceContent.ts +5 -3
- package/src/content/fields/slices/Slice/SimpleSliceContent.ts +3 -1
- package/src/content/fields/withDefaultValues.ts +27 -3
- package/src/customtypes/diff/Variation.ts +9 -20
- package/src/customtypes/diff/Widgets.ts +17 -0
- package/src/customtypes/diff/index.ts +1 -0
- package/src/customtypes/widgets/Group.ts +66 -20
- package/src/validators/function.ts +11 -1
|
@@ -1,321 +1,6 @@
|
|
|
1
1
|
import * as t from "io-ts";
|
|
2
2
|
import type { LegacyContentCtx } from "../../../LegacyContentCtx";
|
|
3
|
-
export declare const RepeatableWidgetsLegacy: (ctx: LegacyContentCtx) => t.ArrayC<t.Type<{
|
|
4
|
-
__TYPE__: "GroupItemContent";
|
|
5
|
-
value: [string, {
|
|
6
|
-
type: string;
|
|
7
|
-
__TYPE__: "EmptyContent";
|
|
8
|
-
} | {
|
|
9
|
-
__TYPE__: "BooleanContent";
|
|
10
|
-
value: boolean;
|
|
11
|
-
} | ({
|
|
12
|
-
embed_url: string;
|
|
13
|
-
type: string;
|
|
14
|
-
} & {
|
|
15
|
-
version?: string | number | null;
|
|
16
|
-
title?: string | null | undefined;
|
|
17
|
-
author_name?: string | null | undefined;
|
|
18
|
-
author_url?: string | null | undefined;
|
|
19
|
-
provider_name?: string | null | undefined;
|
|
20
|
-
provider_url?: string | null | undefined;
|
|
21
|
-
cache_age?: string | number | null;
|
|
22
|
-
thumbnail_url?: string | null | undefined;
|
|
23
|
-
thumbnail_width?: number | null | undefined;
|
|
24
|
-
thumbnail_height?: number | null | undefined;
|
|
25
|
-
html?: string | null | undefined;
|
|
26
|
-
} & {
|
|
27
|
-
__TYPE__: "EmbedContent";
|
|
28
|
-
all: unknown;
|
|
29
|
-
}) | {
|
|
30
|
-
type: "Color";
|
|
31
|
-
value: string;
|
|
32
|
-
__TYPE__: "FieldContent";
|
|
33
|
-
} | {
|
|
34
|
-
type: "Date";
|
|
35
|
-
value: string;
|
|
36
|
-
__TYPE__: "FieldContent";
|
|
37
|
-
} | {
|
|
38
|
-
type: "Number";
|
|
39
|
-
value: string;
|
|
40
|
-
__TYPE__: "FieldContent";
|
|
41
|
-
} | {
|
|
42
|
-
type: "Range";
|
|
43
|
-
value: string;
|
|
44
|
-
__TYPE__: "FieldContent";
|
|
45
|
-
} | {
|
|
46
|
-
type: "Select";
|
|
47
|
-
value: string;
|
|
48
|
-
__TYPE__: "FieldContent";
|
|
49
|
-
} | {
|
|
50
|
-
type: "Text";
|
|
51
|
-
value: string;
|
|
52
|
-
__TYPE__: "FieldContent";
|
|
53
|
-
} | {
|
|
54
|
-
type: "Timestamp";
|
|
55
|
-
value: string;
|
|
56
|
-
__TYPE__: "FieldContent";
|
|
57
|
-
} | ({
|
|
58
|
-
position: {
|
|
59
|
-
lat: number;
|
|
60
|
-
lng: number;
|
|
61
|
-
};
|
|
62
|
-
} & {
|
|
63
|
-
__TYPE__: "GeoPointContent";
|
|
64
|
-
}) | ({
|
|
65
|
-
origin: {
|
|
66
|
-
id: string;
|
|
67
|
-
url: string;
|
|
68
|
-
width: number;
|
|
69
|
-
height: number;
|
|
70
|
-
};
|
|
71
|
-
width: number;
|
|
72
|
-
height: number;
|
|
73
|
-
edit: {
|
|
74
|
-
zoom: number;
|
|
75
|
-
crop: {
|
|
76
|
-
x: number;
|
|
77
|
-
y: number;
|
|
78
|
-
};
|
|
79
|
-
background: string;
|
|
80
|
-
};
|
|
81
|
-
} & {
|
|
82
|
-
url?: string;
|
|
83
|
-
credits?: string | null;
|
|
84
|
-
alt?: string | null;
|
|
85
|
-
provider?: string | null | undefined;
|
|
86
|
-
} & {
|
|
87
|
-
thumbnails?: {
|
|
88
|
-
[x: string]: {
|
|
89
|
-
origin: {
|
|
90
|
-
id: string;
|
|
91
|
-
url: string;
|
|
92
|
-
width: number;
|
|
93
|
-
height: number;
|
|
94
|
-
};
|
|
95
|
-
width: number;
|
|
96
|
-
height: number;
|
|
97
|
-
edit: {
|
|
98
|
-
zoom: number;
|
|
99
|
-
crop: {
|
|
100
|
-
x: number;
|
|
101
|
-
y: number;
|
|
102
|
-
};
|
|
103
|
-
background: string;
|
|
104
|
-
};
|
|
105
|
-
} & {
|
|
106
|
-
url?: string;
|
|
107
|
-
credits?: string | null;
|
|
108
|
-
alt?: string | null;
|
|
109
|
-
provider?: string | null | undefined;
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
} & {
|
|
113
|
-
__TYPE__: "ImageContent";
|
|
114
|
-
}) | {
|
|
115
|
-
__TYPE__: "IntegrationFieldsContent";
|
|
116
|
-
value: string;
|
|
117
|
-
} | {
|
|
118
|
-
__TYPE__: "LinkContent";
|
|
119
|
-
value: ({
|
|
120
|
-
__TYPE__: "ImageLink";
|
|
121
|
-
} & {
|
|
122
|
-
id: string;
|
|
123
|
-
url: string;
|
|
124
|
-
height: string;
|
|
125
|
-
width: string;
|
|
126
|
-
size: string;
|
|
127
|
-
name: string;
|
|
128
|
-
kind: string;
|
|
129
|
-
} & {
|
|
130
|
-
date?: string | null | undefined;
|
|
131
|
-
}) | ({
|
|
132
|
-
id: string;
|
|
133
|
-
url: string;
|
|
134
|
-
name: string;
|
|
135
|
-
kind: string;
|
|
136
|
-
size: string;
|
|
137
|
-
} & {
|
|
138
|
-
date?: string | null | undefined;
|
|
139
|
-
} & {
|
|
140
|
-
__TYPE__: "FileLink";
|
|
141
|
-
} & {
|
|
142
|
-
size?: string;
|
|
143
|
-
}) | ({
|
|
144
|
-
__TYPE__: "DocumentLink";
|
|
145
|
-
} & {
|
|
146
|
-
id: string;
|
|
147
|
-
}) | ({
|
|
148
|
-
__TYPE__: "ExternalLink";
|
|
149
|
-
} & {
|
|
150
|
-
url: string;
|
|
151
|
-
} & {
|
|
152
|
-
kind?: "web";
|
|
153
|
-
target?: string | null | undefined;
|
|
154
|
-
preview?: {
|
|
155
|
-
title?: string;
|
|
156
|
-
} | null | undefined;
|
|
157
|
-
});
|
|
158
|
-
} | {
|
|
159
|
-
__TYPE__: "StructuredTextContent";
|
|
160
|
-
value: (({
|
|
161
|
-
type: "image";
|
|
162
|
-
data: {
|
|
163
|
-
origin: {
|
|
164
|
-
id: string;
|
|
165
|
-
url: string;
|
|
166
|
-
width: number;
|
|
167
|
-
height: number;
|
|
168
|
-
};
|
|
169
|
-
width: number;
|
|
170
|
-
height: number;
|
|
171
|
-
edit: {
|
|
172
|
-
zoom: number;
|
|
173
|
-
crop: {
|
|
174
|
-
x: number;
|
|
175
|
-
y: number;
|
|
176
|
-
};
|
|
177
|
-
background: string;
|
|
178
|
-
};
|
|
179
|
-
} & {
|
|
180
|
-
url?: string;
|
|
181
|
-
credits?: string | null;
|
|
182
|
-
alt?: string | null;
|
|
183
|
-
provider?: string | null | undefined;
|
|
184
|
-
} & {
|
|
185
|
-
linkTo?: ({
|
|
186
|
-
__TYPE__: "ImageLink";
|
|
187
|
-
} & {
|
|
188
|
-
id: string;
|
|
189
|
-
url: string;
|
|
190
|
-
height: string;
|
|
191
|
-
width: string;
|
|
192
|
-
size: string;
|
|
193
|
-
name: string;
|
|
194
|
-
kind: string;
|
|
195
|
-
} & {
|
|
196
|
-
date?: string | null | undefined;
|
|
197
|
-
}) | ({
|
|
198
|
-
id: string;
|
|
199
|
-
url: string;
|
|
200
|
-
name: string;
|
|
201
|
-
kind: string;
|
|
202
|
-
size: string;
|
|
203
|
-
} & {
|
|
204
|
-
date?: string | null | undefined;
|
|
205
|
-
} & {
|
|
206
|
-
__TYPE__: "FileLink";
|
|
207
|
-
} & {
|
|
208
|
-
size?: string;
|
|
209
|
-
}) | ({
|
|
210
|
-
__TYPE__: "DocumentLink";
|
|
211
|
-
} & {
|
|
212
|
-
id: string;
|
|
213
|
-
}) | ({
|
|
214
|
-
__TYPE__: "ExternalLink";
|
|
215
|
-
} & {
|
|
216
|
-
url: string;
|
|
217
|
-
} & {
|
|
218
|
-
kind?: "web";
|
|
219
|
-
target?: string | null | undefined;
|
|
220
|
-
preview?: {
|
|
221
|
-
title?: string;
|
|
222
|
-
} | null | undefined;
|
|
223
|
-
}) | null | undefined;
|
|
224
|
-
};
|
|
225
|
-
} & {
|
|
226
|
-
label?: string | null | undefined;
|
|
227
|
-
direction?: string | null | undefined;
|
|
228
|
-
}) | ({
|
|
229
|
-
type: "embed";
|
|
230
|
-
data: {
|
|
231
|
-
embed_url: string;
|
|
232
|
-
type: string;
|
|
233
|
-
} & {
|
|
234
|
-
version?: string | number | null;
|
|
235
|
-
title?: string | null | undefined;
|
|
236
|
-
author_name?: string | null | undefined;
|
|
237
|
-
author_url?: string | null | undefined;
|
|
238
|
-
provider_name?: string | null | undefined;
|
|
239
|
-
provider_url?: string | null | undefined;
|
|
240
|
-
cache_age?: string | number | null;
|
|
241
|
-
thumbnail_url?: string | null | undefined;
|
|
242
|
-
thumbnail_width?: number | null | undefined;
|
|
243
|
-
thumbnail_height?: number | null | undefined;
|
|
244
|
-
html?: string | null | undefined;
|
|
245
|
-
} & {
|
|
246
|
-
__TYPE__: "EmbedContent";
|
|
247
|
-
all: unknown;
|
|
248
|
-
};
|
|
249
|
-
} & {
|
|
250
|
-
label?: string | null | undefined;
|
|
251
|
-
direction?: string | null | undefined;
|
|
252
|
-
}) | ({
|
|
253
|
-
type: "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "strong" | "em" | "preformatted" | "hyperlink" | "embed" | "list-item" | "o-list-item" | "rtl";
|
|
254
|
-
content: {
|
|
255
|
-
text: string;
|
|
256
|
-
} & {
|
|
257
|
-
spans?: ({
|
|
258
|
-
data: ({
|
|
259
|
-
__TYPE__: "ImageLink";
|
|
260
|
-
} & {
|
|
261
|
-
id: string;
|
|
262
|
-
url: string;
|
|
263
|
-
height: string;
|
|
264
|
-
width: string;
|
|
265
|
-
size: string;
|
|
266
|
-
name: string;
|
|
267
|
-
kind: string;
|
|
268
|
-
} & {
|
|
269
|
-
date?: string | null | undefined;
|
|
270
|
-
}) | ({
|
|
271
|
-
id: string;
|
|
272
|
-
url: string;
|
|
273
|
-
name: string;
|
|
274
|
-
kind: string;
|
|
275
|
-
size: string;
|
|
276
|
-
} & {
|
|
277
|
-
date?: string | null | undefined;
|
|
278
|
-
} & {
|
|
279
|
-
__TYPE__: "FileLink";
|
|
280
|
-
} & {
|
|
281
|
-
size?: string;
|
|
282
|
-
}) | ({
|
|
283
|
-
__TYPE__: "DocumentLink";
|
|
284
|
-
} & {
|
|
285
|
-
id: string;
|
|
286
|
-
}) | ({
|
|
287
|
-
__TYPE__: "ExternalLink";
|
|
288
|
-
} & {
|
|
289
|
-
url: string;
|
|
290
|
-
} & {
|
|
291
|
-
kind?: "web";
|
|
292
|
-
target?: string | null | undefined;
|
|
293
|
-
preview?: {
|
|
294
|
-
title?: string;
|
|
295
|
-
} | null | undefined;
|
|
296
|
-
});
|
|
297
|
-
start: number;
|
|
298
|
-
end: number;
|
|
299
|
-
type: "hyperlink";
|
|
300
|
-
} | {
|
|
301
|
-
data: string;
|
|
302
|
-
start: number;
|
|
303
|
-
end: number;
|
|
304
|
-
type: "label";
|
|
305
|
-
} | {
|
|
306
|
-
start: number;
|
|
307
|
-
end: number;
|
|
308
|
-
type: "strong" | "em" | "list-item";
|
|
309
|
-
})[];
|
|
310
|
-
};
|
|
311
|
-
} & {
|
|
312
|
-
label?: string;
|
|
313
|
-
direction?: string;
|
|
314
|
-
}))[];
|
|
315
|
-
} | {
|
|
316
|
-
__TYPE__: "SeparatorContent";
|
|
317
|
-
}][];
|
|
318
|
-
}, import("../../../LegacyContentCtx").WithTypes<{
|
|
3
|
+
export declare const RepeatableWidgetsLegacy: (ctx: LegacyContentCtx) => t.ArrayC<t.Type<import("../../GroupContent").GroupItemContent, import("../../../LegacyContentCtx").WithTypes<{
|
|
319
4
|
[x: string]: unknown;
|
|
320
5
|
}>, unknown>>;
|
|
321
6
|
export declare const RepeatableWidgets: t.ArrayC<t.ExactC<t.TypeC<{
|
|
@@ -500,73 +185,7 @@ export declare const RepeatableWidgets: t.ArrayC<t.ExactC<t.TypeC<{
|
|
|
500
185
|
alt: t.Type<string | null, string | null, unknown>;
|
|
501
186
|
provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
502
187
|
}>]>>, t.PartialC<{
|
|
503
|
-
linkTo: t.UnionC<[t.Type<
|
|
504
|
-
__TYPE__: "ImageLink";
|
|
505
|
-
} & {
|
|
506
|
-
id: string;
|
|
507
|
-
url: string;
|
|
508
|
-
height: string;
|
|
509
|
-
width: string;
|
|
510
|
-
size: string;
|
|
511
|
-
name: string;
|
|
512
|
-
kind: string;
|
|
513
|
-
} & {
|
|
514
|
-
date?: string | null | undefined;
|
|
515
|
-
}) | ({
|
|
516
|
-
id: string;
|
|
517
|
-
url: string;
|
|
518
|
-
name: string;
|
|
519
|
-
kind: string;
|
|
520
|
-
size: string;
|
|
521
|
-
} & {
|
|
522
|
-
date?: string | null | undefined;
|
|
523
|
-
} & {
|
|
524
|
-
__TYPE__: "FileLink";
|
|
525
|
-
} & {
|
|
526
|
-
size?: string;
|
|
527
|
-
}) | ({
|
|
528
|
-
__TYPE__: "DocumentLink";
|
|
529
|
-
} & {
|
|
530
|
-
id: string;
|
|
531
|
-
}) | ({
|
|
532
|
-
__TYPE__: "ExternalLink";
|
|
533
|
-
} & {
|
|
534
|
-
url: string;
|
|
535
|
-
} & {
|
|
536
|
-
kind?: "web";
|
|
537
|
-
target?: string | null | undefined;
|
|
538
|
-
preview?: {
|
|
539
|
-
title?: string;
|
|
540
|
-
} | null | undefined;
|
|
541
|
-
}), ({
|
|
542
|
-
id: string;
|
|
543
|
-
url: string;
|
|
544
|
-
height: string;
|
|
545
|
-
width: string;
|
|
546
|
-
size: string;
|
|
547
|
-
name: string;
|
|
548
|
-
kind: string;
|
|
549
|
-
} & {
|
|
550
|
-
date?: string | null | undefined;
|
|
551
|
-
}) | ({
|
|
552
|
-
id: string;
|
|
553
|
-
url: string;
|
|
554
|
-
name: string;
|
|
555
|
-
kind: string;
|
|
556
|
-
size: string;
|
|
557
|
-
} & {
|
|
558
|
-
date?: string | null | undefined;
|
|
559
|
-
}) | {
|
|
560
|
-
id: string;
|
|
561
|
-
} | ({
|
|
562
|
-
url: string;
|
|
563
|
-
} & {
|
|
564
|
-
kind?: "web";
|
|
565
|
-
target?: string | null | undefined;
|
|
566
|
-
preview?: {
|
|
567
|
-
title?: string;
|
|
568
|
-
} | null | undefined;
|
|
569
|
-
}), unknown>, t.NullC, t.UndefinedC]>;
|
|
188
|
+
linkTo: t.UnionC<[t.Type<any, any, unknown>, t.NullC, t.UndefinedC]>;
|
|
570
189
|
}>]>;
|
|
571
190
|
}>, t.PartialC<{
|
|
572
191
|
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|