@prismicio/types-internal 2.7.0-alpha.0 → 2.7.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 +333 -1653
- package/lib/content/fields/WidgetContent.d.ts +333 -1653
- package/lib/content/fields/nestable/LinkContent.d.ts +38 -190
- package/lib/content/fields/nestable/LinkContent.js +5 -6
- package/lib/content/fields/nestable/NestableContent.d.ts +55 -275
- package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +102 -510
- package/lib/content/fields/nestable/RichTextContent/TextBlock.d.ts +727 -0
- package/lib/content/fields/nestable/RichTextContent/TextBlock.js +80 -0
- package/lib/content/fields/nestable/RichTextContent/index.d.ts +50 -250
- package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +110 -550
- package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +25 -125
- package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +110 -550
- package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +55 -275
- package/lib/content/fields/slices/Slice/SlicePrimaryContent.d.ts +55 -275
- package/lib/content/fields/slices/Slice/index.d.ts +200 -1000
- package/lib/content/fields/slices/SliceItem.d.ts +200 -1000
- package/lib/content/fields/slices/SlicesContent.d.ts +275 -1375
- package/lib/customtypes/CustomType.d.ts +18 -20
- package/lib/customtypes/CustomType.js +0 -1
- package/lib/customtypes/Section.d.ts +18 -18
- package/lib/customtypes/diff/SharedSlice.d.ts +8 -8
- package/lib/customtypes/diff/Variation.d.ts +8 -8
- package/lib/customtypes/widgets/Group.d.ts +6 -6
- package/lib/customtypes/widgets/Widget.d.ts +21 -21
- package/lib/customtypes/widgets/nestable/Link.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Link.js +1 -1
- package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +1 -1
- package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +2 -2
- package/lib/customtypes/widgets/slices/LegacySlice.d.ts +2 -2
- package/lib/customtypes/widgets/slices/SharedSlice.d.ts +8 -8
- package/lib/customtypes/widgets/slices/SlicePrimaryWidget.d.ts +6 -6
- package/lib/customtypes/widgets/slices/SliceWidget.d.ts +327 -0
- package/lib/customtypes/widgets/slices/SliceWidget.js +8 -0
- package/lib/customtypes/widgets/slices/Slices.d.ts +28 -28
- package/package.json +1 -1
- package/src/content/fields/nestable/LinkContent.ts +5 -6
- package/src/customtypes/CustomType.ts +0 -1
- package/src/customtypes/widgets/nestable/Link.ts +1 -1
|
@@ -13,11 +13,7 @@ export declare const ImageLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
|
13
13
|
kind: t.StringC;
|
|
14
14
|
}>, t.PartialC<{
|
|
15
15
|
date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
16
|
-
|
|
17
|
-
type: t.LiteralC<"Text">;
|
|
18
|
-
value: t.Type<string, string, unknown>;
|
|
19
|
-
__TYPE__: t.LiteralC<"FieldContent">;
|
|
20
|
-
}>>;
|
|
16
|
+
text: t.StringC;
|
|
21
17
|
}>]>>]>;
|
|
22
18
|
export declare type ImageLinkContent = t.TypeOf<typeof ImageLinkContent>;
|
|
23
19
|
export declare const FileLinkType = "FileLink";
|
|
@@ -29,20 +25,12 @@ export declare const FileLinkContent: t.IntersectionC<[t.ExactC<t.IntersectionC<
|
|
|
29
25
|
size: t.StringC;
|
|
30
26
|
}>, t.PartialC<{
|
|
31
27
|
date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
32
|
-
|
|
33
|
-
type: t.LiteralC<"Text">;
|
|
34
|
-
value: t.Type<string, string, unknown>;
|
|
35
|
-
__TYPE__: t.LiteralC<"FieldContent">;
|
|
36
|
-
}>>;
|
|
28
|
+
text: t.StringC;
|
|
37
29
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
38
30
|
__TYPE__: t.LiteralC<"FileLink">;
|
|
39
31
|
}>, t.PartialC<{
|
|
40
32
|
size: t.StringC;
|
|
41
|
-
|
|
42
|
-
type: t.LiteralC<"Text">;
|
|
43
|
-
value: t.Type<string, string, unknown>;
|
|
44
|
-
__TYPE__: t.LiteralC<"FieldContent">;
|
|
45
|
-
}>>;
|
|
33
|
+
text: t.StringC;
|
|
46
34
|
}>]>>]>;
|
|
47
35
|
export declare type FileLinkContent = t.TypeOf<typeof FileLinkContent>;
|
|
48
36
|
export declare const DocumentLinkType = "DocumentLink";
|
|
@@ -51,11 +39,7 @@ export declare const DocumentLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
|
51
39
|
}>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
52
40
|
id: t.Type<string, string, unknown>;
|
|
53
41
|
}>, t.PartialC<{
|
|
54
|
-
|
|
55
|
-
type: t.LiteralC<"Text">;
|
|
56
|
-
value: t.Type<string, string, unknown>;
|
|
57
|
-
__TYPE__: t.LiteralC<"FieldContent">;
|
|
58
|
-
}>>;
|
|
42
|
+
text: t.StringC;
|
|
59
43
|
}>]>>]>;
|
|
60
44
|
export declare type DocumentLinkContent = t.TypeOf<typeof DocumentLinkContent>;
|
|
61
45
|
export declare const ExternalLinkType = "ExternalLink";
|
|
@@ -71,11 +55,7 @@ export declare const ExternalLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
|
71
55
|
}, {
|
|
72
56
|
title?: string;
|
|
73
57
|
}, unknown>, t.NullC, t.UndefinedC]>;
|
|
74
|
-
|
|
75
|
-
type: t.LiteralC<"Text">;
|
|
76
|
-
value: t.Type<string, string, unknown>;
|
|
77
|
-
__TYPE__: t.LiteralC<"FieldContent">;
|
|
78
|
-
}>>;
|
|
58
|
+
text: t.StringC;
|
|
79
59
|
}>]>>]>;
|
|
80
60
|
export declare type ExternalLinkContent = t.TypeOf<typeof ExternalLinkContent>;
|
|
81
61
|
export declare const LinkContentType = "LinkContent";
|
|
@@ -93,11 +73,7 @@ export declare const isLinkContent: (u: unknown) => u is {
|
|
|
93
73
|
kind: string;
|
|
94
74
|
} & {
|
|
95
75
|
date?: string | null | undefined;
|
|
96
|
-
|
|
97
|
-
type: "Text";
|
|
98
|
-
value: string;
|
|
99
|
-
__TYPE__: "FieldContent";
|
|
100
|
-
};
|
|
76
|
+
text?: string;
|
|
101
77
|
}) | ({
|
|
102
78
|
id: string;
|
|
103
79
|
url: string;
|
|
@@ -106,30 +82,18 @@ export declare const isLinkContent: (u: unknown) => u is {
|
|
|
106
82
|
size: string;
|
|
107
83
|
} & {
|
|
108
84
|
date?: string | null | undefined;
|
|
109
|
-
|
|
110
|
-
type: "Text";
|
|
111
|
-
value: string;
|
|
112
|
-
__TYPE__: "FieldContent";
|
|
113
|
-
};
|
|
85
|
+
text?: string;
|
|
114
86
|
} & {
|
|
115
87
|
__TYPE__: "FileLink";
|
|
116
88
|
} & {
|
|
117
89
|
size?: string;
|
|
118
|
-
|
|
119
|
-
type: "Text";
|
|
120
|
-
value: string;
|
|
121
|
-
__TYPE__: "FieldContent";
|
|
122
|
-
};
|
|
90
|
+
text?: string;
|
|
123
91
|
}) | ({
|
|
124
92
|
__TYPE__: "DocumentLink";
|
|
125
93
|
} & {
|
|
126
94
|
id: string;
|
|
127
95
|
} & {
|
|
128
|
-
|
|
129
|
-
type: "Text";
|
|
130
|
-
value: string;
|
|
131
|
-
__TYPE__: "FieldContent";
|
|
132
|
-
};
|
|
96
|
+
text?: string;
|
|
133
97
|
}) | ({
|
|
134
98
|
__TYPE__: "ExternalLink";
|
|
135
99
|
} & {
|
|
@@ -140,11 +104,7 @@ export declare const isLinkContent: (u: unknown) => u is {
|
|
|
140
104
|
preview?: {
|
|
141
105
|
title?: string;
|
|
142
106
|
} | null | undefined;
|
|
143
|
-
|
|
144
|
-
type: "Text";
|
|
145
|
-
value: string;
|
|
146
|
-
__TYPE__: "FieldContent";
|
|
147
|
-
};
|
|
107
|
+
text?: string;
|
|
148
108
|
});
|
|
149
109
|
};
|
|
150
110
|
export declare const LinkLegacy: t.UnionC<[t.Type<{
|
|
@@ -159,11 +119,7 @@ export declare const LinkLegacy: t.UnionC<[t.Type<{
|
|
|
159
119
|
kind: string;
|
|
160
120
|
} & {
|
|
161
121
|
date?: string | null | undefined;
|
|
162
|
-
|
|
163
|
-
type: "Text";
|
|
164
|
-
value: string;
|
|
165
|
-
__TYPE__: "FieldContent";
|
|
166
|
-
};
|
|
122
|
+
text?: string;
|
|
167
123
|
}, {
|
|
168
124
|
id: string;
|
|
169
125
|
url: string;
|
|
@@ -174,11 +130,7 @@ export declare const LinkLegacy: t.UnionC<[t.Type<{
|
|
|
174
130
|
kind: string;
|
|
175
131
|
} & {
|
|
176
132
|
date?: string | null | undefined;
|
|
177
|
-
|
|
178
|
-
type: "Text";
|
|
179
|
-
value: string;
|
|
180
|
-
__TYPE__: "FieldContent";
|
|
181
|
-
};
|
|
133
|
+
text?: string;
|
|
182
134
|
}, unknown>, t.Type<{
|
|
183
135
|
id: string;
|
|
184
136
|
url: string;
|
|
@@ -187,20 +139,12 @@ export declare const LinkLegacy: t.UnionC<[t.Type<{
|
|
|
187
139
|
size: string;
|
|
188
140
|
} & {
|
|
189
141
|
date?: string | null | undefined;
|
|
190
|
-
|
|
191
|
-
type: "Text";
|
|
192
|
-
value: string;
|
|
193
|
-
__TYPE__: "FieldContent";
|
|
194
|
-
};
|
|
142
|
+
text?: string;
|
|
195
143
|
} & {
|
|
196
144
|
__TYPE__: "FileLink";
|
|
197
145
|
} & {
|
|
198
146
|
size?: string;
|
|
199
|
-
|
|
200
|
-
type: "Text";
|
|
201
|
-
value: string;
|
|
202
|
-
__TYPE__: "FieldContent";
|
|
203
|
-
};
|
|
147
|
+
text?: string;
|
|
204
148
|
}, {
|
|
205
149
|
id: string;
|
|
206
150
|
url: string;
|
|
@@ -209,29 +153,17 @@ export declare const LinkLegacy: t.UnionC<[t.Type<{
|
|
|
209
153
|
size: string;
|
|
210
154
|
} & {
|
|
211
155
|
date?: string | null | undefined;
|
|
212
|
-
|
|
213
|
-
type: "Text";
|
|
214
|
-
value: string;
|
|
215
|
-
__TYPE__: "FieldContent";
|
|
216
|
-
};
|
|
156
|
+
text?: string;
|
|
217
157
|
}, unknown>, t.Type<{
|
|
218
158
|
__TYPE__: "DocumentLink";
|
|
219
159
|
} & {
|
|
220
160
|
id: string;
|
|
221
161
|
} & {
|
|
222
|
-
|
|
223
|
-
type: "Text";
|
|
224
|
-
value: string;
|
|
225
|
-
__TYPE__: "FieldContent";
|
|
226
|
-
};
|
|
162
|
+
text?: string;
|
|
227
163
|
}, {
|
|
228
164
|
id: string;
|
|
229
165
|
} & {
|
|
230
|
-
|
|
231
|
-
type: "Text";
|
|
232
|
-
value: string;
|
|
233
|
-
__TYPE__: "FieldContent";
|
|
234
|
-
};
|
|
166
|
+
text?: string;
|
|
235
167
|
}, unknown>, t.Type<{
|
|
236
168
|
__TYPE__: "ExternalLink";
|
|
237
169
|
} & {
|
|
@@ -242,11 +174,7 @@ export declare const LinkLegacy: t.UnionC<[t.Type<{
|
|
|
242
174
|
preview?: {
|
|
243
175
|
title?: string;
|
|
244
176
|
} | null | undefined;
|
|
245
|
-
|
|
246
|
-
type: "Text";
|
|
247
|
-
value: string;
|
|
248
|
-
__TYPE__: "FieldContent";
|
|
249
|
-
};
|
|
177
|
+
text?: string;
|
|
250
178
|
}, {
|
|
251
179
|
url: string;
|
|
252
180
|
} & {
|
|
@@ -255,11 +183,7 @@ export declare const LinkLegacy: t.UnionC<[t.Type<{
|
|
|
255
183
|
preview?: {
|
|
256
184
|
title?: string;
|
|
257
185
|
} | null | undefined;
|
|
258
|
-
|
|
259
|
-
type: "Text";
|
|
260
|
-
value: string;
|
|
261
|
-
__TYPE__: "FieldContent";
|
|
262
|
-
};
|
|
186
|
+
text?: string;
|
|
263
187
|
}, unknown>]>;
|
|
264
188
|
export declare const LinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
265
189
|
__TYPE__: "LinkContent";
|
|
@@ -275,11 +199,7 @@ export declare const LinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
|
275
199
|
kind: string;
|
|
276
200
|
} & {
|
|
277
201
|
date?: string | null | undefined;
|
|
278
|
-
|
|
279
|
-
type: "Text";
|
|
280
|
-
value: string;
|
|
281
|
-
__TYPE__: "FieldContent";
|
|
282
|
-
};
|
|
202
|
+
text?: string;
|
|
283
203
|
}) | ({
|
|
284
204
|
id: string;
|
|
285
205
|
url: string;
|
|
@@ -288,30 +208,18 @@ export declare const LinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
|
288
208
|
size: string;
|
|
289
209
|
} & {
|
|
290
210
|
date?: string | null | undefined;
|
|
291
|
-
|
|
292
|
-
type: "Text";
|
|
293
|
-
value: string;
|
|
294
|
-
__TYPE__: "FieldContent";
|
|
295
|
-
};
|
|
211
|
+
text?: string;
|
|
296
212
|
} & {
|
|
297
213
|
__TYPE__: "FileLink";
|
|
298
214
|
} & {
|
|
299
215
|
size?: string;
|
|
300
|
-
|
|
301
|
-
type: "Text";
|
|
302
|
-
value: string;
|
|
303
|
-
__TYPE__: "FieldContent";
|
|
304
|
-
};
|
|
216
|
+
text?: string;
|
|
305
217
|
}) | ({
|
|
306
218
|
__TYPE__: "DocumentLink";
|
|
307
219
|
} & {
|
|
308
220
|
id: string;
|
|
309
221
|
} & {
|
|
310
|
-
|
|
311
|
-
type: "Text";
|
|
312
|
-
value: string;
|
|
313
|
-
__TYPE__: "FieldContent";
|
|
314
|
-
};
|
|
222
|
+
text?: string;
|
|
315
223
|
}) | ({
|
|
316
224
|
__TYPE__: "ExternalLink";
|
|
317
225
|
} & {
|
|
@@ -322,11 +230,7 @@ export declare const LinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
|
322
230
|
preview?: {
|
|
323
231
|
title?: string;
|
|
324
232
|
} | null | undefined;
|
|
325
|
-
|
|
326
|
-
type: "Text";
|
|
327
|
-
value: string;
|
|
328
|
-
__TYPE__: "FieldContent";
|
|
329
|
-
};
|
|
233
|
+
text?: string;
|
|
330
234
|
});
|
|
331
235
|
}, WithTypes<({
|
|
332
236
|
id: string;
|
|
@@ -338,11 +242,7 @@ export declare const LinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
|
338
242
|
kind: string;
|
|
339
243
|
} & {
|
|
340
244
|
date?: string | null | undefined;
|
|
341
|
-
|
|
342
|
-
type: "Text";
|
|
343
|
-
value: string;
|
|
344
|
-
__TYPE__: "FieldContent";
|
|
345
|
-
};
|
|
245
|
+
text?: string;
|
|
346
246
|
}) | ({
|
|
347
247
|
id: string;
|
|
348
248
|
url: string;
|
|
@@ -351,19 +251,11 @@ export declare const LinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
|
351
251
|
size: string;
|
|
352
252
|
} & {
|
|
353
253
|
date?: string | null | undefined;
|
|
354
|
-
|
|
355
|
-
type: "Text";
|
|
356
|
-
value: string;
|
|
357
|
-
__TYPE__: "FieldContent";
|
|
358
|
-
};
|
|
254
|
+
text?: string;
|
|
359
255
|
}) | ({
|
|
360
256
|
id: string;
|
|
361
257
|
} & {
|
|
362
|
-
|
|
363
|
-
type: "Text";
|
|
364
|
-
value: string;
|
|
365
|
-
__TYPE__: "FieldContent";
|
|
366
|
-
};
|
|
258
|
+
text?: string;
|
|
367
259
|
}) | ({
|
|
368
260
|
url: string;
|
|
369
261
|
} & {
|
|
@@ -372,11 +264,7 @@ export declare const LinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
|
372
264
|
preview?: {
|
|
373
265
|
title?: string;
|
|
374
266
|
} | null | undefined;
|
|
375
|
-
|
|
376
|
-
type: "Text";
|
|
377
|
-
value: string;
|
|
378
|
-
__TYPE__: "FieldContent";
|
|
379
|
-
};
|
|
267
|
+
text?: string;
|
|
380
268
|
})>, unknown>;
|
|
381
269
|
export declare const Link: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
382
270
|
__TYPE__: t.LiteralC<"ImageLink">;
|
|
@@ -390,11 +278,7 @@ export declare const Link: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
|
390
278
|
kind: t.StringC;
|
|
391
279
|
}>, t.PartialC<{
|
|
392
280
|
date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
393
|
-
|
|
394
|
-
type: t.LiteralC<"Text">;
|
|
395
|
-
value: t.Type<string, string, unknown>;
|
|
396
|
-
__TYPE__: t.LiteralC<"FieldContent">;
|
|
397
|
-
}>>;
|
|
281
|
+
text: t.StringC;
|
|
398
282
|
}>]>>]>, t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
399
283
|
id: t.StringC;
|
|
400
284
|
url: t.StringC;
|
|
@@ -403,30 +287,18 @@ export declare const Link: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
|
403
287
|
size: t.StringC;
|
|
404
288
|
}>, t.PartialC<{
|
|
405
289
|
date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
406
|
-
|
|
407
|
-
type: t.LiteralC<"Text">;
|
|
408
|
-
value: t.Type<string, string, unknown>;
|
|
409
|
-
__TYPE__: t.LiteralC<"FieldContent">;
|
|
410
|
-
}>>;
|
|
290
|
+
text: t.StringC;
|
|
411
291
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
412
292
|
__TYPE__: t.LiteralC<"FileLink">;
|
|
413
293
|
}>, t.PartialC<{
|
|
414
294
|
size: t.StringC;
|
|
415
|
-
|
|
416
|
-
type: t.LiteralC<"Text">;
|
|
417
|
-
value: t.Type<string, string, unknown>;
|
|
418
|
-
__TYPE__: t.LiteralC<"FieldContent">;
|
|
419
|
-
}>>;
|
|
295
|
+
text: t.StringC;
|
|
420
296
|
}>]>>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
421
297
|
__TYPE__: t.LiteralC<"DocumentLink">;
|
|
422
298
|
}>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
423
299
|
id: t.Type<string, string, unknown>;
|
|
424
300
|
}>, t.PartialC<{
|
|
425
|
-
|
|
426
|
-
type: t.LiteralC<"Text">;
|
|
427
|
-
value: t.Type<string, string, unknown>;
|
|
428
|
-
__TYPE__: t.LiteralC<"FieldContent">;
|
|
429
|
-
}>>;
|
|
301
|
+
text: t.StringC;
|
|
430
302
|
}>]>>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
431
303
|
__TYPE__: t.LiteralC<"ExternalLink">;
|
|
432
304
|
}>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
@@ -439,11 +311,7 @@ export declare const Link: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
|
439
311
|
}, {
|
|
440
312
|
title?: string;
|
|
441
313
|
}, unknown>, t.NullC, t.UndefinedC]>;
|
|
442
|
-
|
|
443
|
-
type: t.LiteralC<"Text">;
|
|
444
|
-
value: t.Type<string, string, unknown>;
|
|
445
|
-
__TYPE__: t.LiteralC<"FieldContent">;
|
|
446
|
-
}>>;
|
|
314
|
+
text: t.StringC;
|
|
447
315
|
}>]>>]>]>;
|
|
448
316
|
export declare const LinkContent: t.ExactC<t.TypeC<{
|
|
449
317
|
__TYPE__: t.LiteralC<"LinkContent">;
|
|
@@ -459,11 +327,7 @@ export declare const LinkContent: t.ExactC<t.TypeC<{
|
|
|
459
327
|
kind: t.StringC;
|
|
460
328
|
}>, t.PartialC<{
|
|
461
329
|
date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
462
|
-
|
|
463
|
-
type: t.LiteralC<"Text">;
|
|
464
|
-
value: t.Type<string, string, unknown>;
|
|
465
|
-
__TYPE__: t.LiteralC<"FieldContent">;
|
|
466
|
-
}>>;
|
|
330
|
+
text: t.StringC;
|
|
467
331
|
}>]>>]>, t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
468
332
|
id: t.StringC;
|
|
469
333
|
url: t.StringC;
|
|
@@ -472,30 +336,18 @@ export declare const LinkContent: t.ExactC<t.TypeC<{
|
|
|
472
336
|
size: t.StringC;
|
|
473
337
|
}>, t.PartialC<{
|
|
474
338
|
date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
475
|
-
|
|
476
|
-
type: t.LiteralC<"Text">;
|
|
477
|
-
value: t.Type<string, string, unknown>;
|
|
478
|
-
__TYPE__: t.LiteralC<"FieldContent">;
|
|
479
|
-
}>>;
|
|
339
|
+
text: t.StringC;
|
|
480
340
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
481
341
|
__TYPE__: t.LiteralC<"FileLink">;
|
|
482
342
|
}>, t.PartialC<{
|
|
483
343
|
size: t.StringC;
|
|
484
|
-
|
|
485
|
-
type: t.LiteralC<"Text">;
|
|
486
|
-
value: t.Type<string, string, unknown>;
|
|
487
|
-
__TYPE__: t.LiteralC<"FieldContent">;
|
|
488
|
-
}>>;
|
|
344
|
+
text: t.StringC;
|
|
489
345
|
}>]>>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
490
346
|
__TYPE__: t.LiteralC<"DocumentLink">;
|
|
491
347
|
}>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
492
348
|
id: t.Type<string, string, unknown>;
|
|
493
349
|
}>, t.PartialC<{
|
|
494
|
-
|
|
495
|
-
type: t.LiteralC<"Text">;
|
|
496
|
-
value: t.Type<string, string, unknown>;
|
|
497
|
-
__TYPE__: t.LiteralC<"FieldContent">;
|
|
498
|
-
}>>;
|
|
350
|
+
text: t.StringC;
|
|
499
351
|
}>]>>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
500
352
|
__TYPE__: t.LiteralC<"ExternalLink">;
|
|
501
353
|
}>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
@@ -508,11 +360,7 @@ export declare const LinkContent: t.ExactC<t.TypeC<{
|
|
|
508
360
|
}, {
|
|
509
361
|
title?: string;
|
|
510
362
|
}, unknown>, t.NullC, t.UndefinedC]>;
|
|
511
|
-
|
|
512
|
-
type: t.LiteralC<"Text">;
|
|
513
|
-
value: t.Type<string, string, unknown>;
|
|
514
|
-
__TYPE__: t.LiteralC<"FieldContent">;
|
|
515
|
-
}>>;
|
|
363
|
+
text: t.StringC;
|
|
516
364
|
}>]>>]>]>;
|
|
517
365
|
}>>;
|
|
518
366
|
export declare type LinkContent = t.TypeOf<typeof LinkContent>;
|
|
@@ -9,7 +9,6 @@ const io_ts_types_1 = require("io-ts-types");
|
|
|
9
9
|
const validators_1 = require("../../../validators");
|
|
10
10
|
const function_2 = require("../../../validators/function");
|
|
11
11
|
const utils_1 = require("../../utils");
|
|
12
|
-
const FieldContent_1 = require("./FieldContent");
|
|
13
12
|
exports.ImageLinkType = "ImageLink";
|
|
14
13
|
const imageLinkLegacyCodec = t.exact(t.intersection([
|
|
15
14
|
t.type({
|
|
@@ -23,7 +22,7 @@ const imageLinkLegacyCodec = t.exact(t.intersection([
|
|
|
23
22
|
}),
|
|
24
23
|
t.partial({
|
|
25
24
|
date: validators_1.StringOrNull,
|
|
26
|
-
|
|
25
|
+
text: t.string,
|
|
27
26
|
}),
|
|
28
27
|
]));
|
|
29
28
|
const ImageLinkLegacy = new t.Type("ImageLink", (u) => (0, utils_1.hasContentType)(u) && u.__TYPE__ === exports.ImageLinkType, (image) => {
|
|
@@ -53,7 +52,7 @@ const fileLinkLegacyCodec = t.exact(t.intersection([
|
|
|
53
52
|
}),
|
|
54
53
|
t.partial({
|
|
55
54
|
date: (0, function_2.nullable)(t.string),
|
|
56
|
-
|
|
55
|
+
text: t.string,
|
|
57
56
|
}),
|
|
58
57
|
]));
|
|
59
58
|
const FileLinkLegacy = new t.Type("FileLink", (u) => (0, utils_1.hasContentType)(u) && u.__TYPE__ === exports.FileLinkType, (file) => {
|
|
@@ -74,7 +73,7 @@ exports.FileLinkContent = t.intersection([
|
|
|
74
73
|
}),
|
|
75
74
|
t.partial({
|
|
76
75
|
size: (0, io_ts_types_1.withFallback)(t.string, "0"),
|
|
77
|
-
|
|
76
|
+
text: t.string,
|
|
78
77
|
}),
|
|
79
78
|
])),
|
|
80
79
|
]);
|
|
@@ -82,7 +81,7 @@ exports.DocumentLinkType = "DocumentLink";
|
|
|
82
81
|
const documentLinkLegacyCodec = t.exact(t.intersection([
|
|
83
82
|
t.type({ id: validators_1.NonEmptyString }),
|
|
84
83
|
t.partial({
|
|
85
|
-
|
|
84
|
+
text: t.string,
|
|
86
85
|
}),
|
|
87
86
|
]));
|
|
88
87
|
const DocumentLinkLegacy = new t.Type("DocumentLink", (u) => (0, utils_1.hasContentType)(u) && u.__TYPE__ === exports.DocumentLinkType, (file) => {
|
|
@@ -112,7 +111,7 @@ const externalLinkLegacyCodec = t.exact(t.intersection([
|
|
|
112
111
|
preview: (0, function_2.nullable)(t.partial({
|
|
113
112
|
title: t.string,
|
|
114
113
|
})),
|
|
115
|
-
|
|
114
|
+
text: t.string,
|
|
116
115
|
}),
|
|
117
116
|
]));
|
|
118
117
|
const ExternalLinkLegacy = new t.Type("ExternalLink", (u) => (0, utils_1.hasContentType)(u) && u.__TYPE__ === exports.ExternalLinkType, (file) => {
|