@prismicio/types-internal 2.8.0 → 3.0.0-alpha.0

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,10 +1,33 @@
1
+ /**
2
+ * LinkContent is a union of different link content types.
3
+ *
4
+ * Most link content types are built from a union of a filled and an unfilled version.
5
+ *
6
+ * Filled versions make sure that the important fields that make the link work
7
+ * are present. They are also exported for when there's a need to ensure that
8
+ * the link is filled when used in a specific context, e.g. links in rich text fields.
9
+ *
10
+ * Unfilled versions are used when the link is not filled yet but contains other
11
+ * information like the text.
12
+ *
13
+ * There are some exceptions that don't have a filled version (e.g. MediaLink)
14
+ * for when the exact subtype is not yet known.
15
+ *
16
+ * Unfilled versions all have a special `kind` property that is used to
17
+ * determine the type of the link. For legacy reasons, filled versions don't
18
+ * necessarily require this property or its type is loose (e.g. `string`). In
19
+ * this cases, the type is determined based on a specific combination of the
20
+ * rest of the link data. This is why the order of the subtypes in the union is
21
+ * important and should be from the most specific to the least specific. A
22
+ * battery of tests ensures that the correct type is inferred.
23
+ */
1
24
  import * as t from "io-ts";
2
25
  import type { LegacyContentCtx, WithTypes } from "../../LegacyContentCtx";
3
26
  export declare const ImageLinkType = "ImageLink";
4
27
  export declare const FilledImageLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{
5
28
  __TYPE__: t.LiteralC<"ImageLink">;
6
29
  }>>, t.IntersectionC<[t.ExactC<t.TypeC<{
7
- kind: t.StringC;
30
+ kind: t.Type<"image", "image", unknown>;
8
31
  id: t.StringC;
9
32
  url: t.StringC;
10
33
  height: t.StringC;
@@ -18,7 +41,7 @@ export declare type FilledImageLinkContent = t.TypeOf<typeof FilledImageLinkCont
18
41
  export declare const ImageLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{
19
42
  __TYPE__: t.LiteralC<"ImageLink">;
20
43
  }>>, t.UnionC<[t.IntersectionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
21
- kind: t.StringC;
44
+ kind: t.Type<"image", "image", unknown>;
22
45
  id: t.StringC;
23
46
  url: t.StringC;
24
47
  height: t.StringC;
@@ -38,7 +61,7 @@ export declare const FileLinkType = "FileLink";
38
61
  export declare const FilledFileLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{
39
62
  __TYPE__: t.LiteralC<"FileLink">;
40
63
  }>>, t.ExactC<t.IntersectionC<[t.TypeC<{
41
- kind: t.StringC;
64
+ kind: t.Type<"file", "file", unknown>;
42
65
  id: t.StringC;
43
66
  url: t.StringC;
44
67
  name: t.StringC;
@@ -50,7 +73,7 @@ export declare type FilledFileLinkContent = t.TypeOf<typeof FilledFileLinkConten
50
73
  export declare const FileLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{
51
74
  __TYPE__: t.LiteralC<"FileLink">;
52
75
  }>>, t.UnionC<[t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
53
- kind: t.StringC;
76
+ kind: t.Type<"file", "file", unknown>;
54
77
  id: t.StringC;
55
78
  url: t.StringC;
56
79
  name: t.StringC;
@@ -137,7 +160,7 @@ export declare const isLinkContent: (u: unknown) => u is {
137
160
  value: ({
138
161
  __TYPE__: "ImageLink";
139
162
  } & (({
140
- kind: string;
163
+ kind: "image";
141
164
  id: string;
142
165
  url: string;
143
166
  height: string;
@@ -154,7 +177,7 @@ export declare const isLinkContent: (u: unknown) => u is {
154
177
  })) | ({
155
178
  __TYPE__: "FileLink";
156
179
  } & (({
157
- kind: string;
180
+ kind: "file";
158
181
  id: string;
159
182
  url: string;
160
183
  name: string;
@@ -204,7 +227,7 @@ export declare const isLinkContent: (u: unknown) => u is {
204
227
  export declare const LinkLegacy: t.UnionC<[t.Type<{
205
228
  __TYPE__: "ImageLink";
206
229
  } & (({
207
- kind: string;
230
+ kind: "image";
208
231
  id: string;
209
232
  url: string;
210
233
  height: string;
@@ -219,7 +242,7 @@ export declare const LinkLegacy: t.UnionC<[t.Type<{
219
242
  kind: "image";
220
243
  text: string;
221
244
  }), ({
222
- kind: string;
245
+ kind: "image";
223
246
  id: string;
224
247
  url: string;
225
248
  height: string;
@@ -236,7 +259,7 @@ export declare const LinkLegacy: t.UnionC<[t.Type<{
236
259
  }, unknown>, t.Type<{
237
260
  __TYPE__: "FileLink";
238
261
  } & (({
239
- kind: string;
262
+ kind: "file";
240
263
  id: string;
241
264
  url: string;
242
265
  name: string;
@@ -249,7 +272,7 @@ export declare const LinkLegacy: t.UnionC<[t.Type<{
249
272
  kind: "file";
250
273
  text: string;
251
274
  }), ({
252
- kind: string;
275
+ kind: "file";
253
276
  id: string;
254
277
  url: string;
255
278
  name: string;
@@ -325,7 +348,7 @@ export declare const LinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<{
325
348
  value: ({
326
349
  __TYPE__: "ImageLink";
327
350
  } & (({
328
- kind: string;
351
+ kind: "image";
329
352
  id: string;
330
353
  url: string;
331
354
  height: string;
@@ -342,7 +365,7 @@ export declare const LinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<{
342
365
  })) | ({
343
366
  __TYPE__: "FileLink";
344
367
  } & (({
345
- kind: string;
368
+ kind: "file";
346
369
  id: string;
347
370
  url: string;
348
371
  name: string;
@@ -389,7 +412,7 @@ export declare const LinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<{
389
412
  text: string;
390
413
  });
391
414
  }, WithTypes<({
392
- kind: string;
415
+ kind: "image";
393
416
  id: string;
394
417
  url: string;
395
418
  height: string;
@@ -404,7 +427,7 @@ export declare const LinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<{
404
427
  kind: "image";
405
428
  text: string;
406
429
  } | ({
407
- kind: string;
430
+ kind: "file";
408
431
  id: string;
409
432
  url: string;
410
433
  name: string;
@@ -445,7 +468,7 @@ export declare const LinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<{
445
468
  export declare const Link: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
446
469
  __TYPE__: t.LiteralC<"ImageLink">;
447
470
  }>>, t.UnionC<[t.IntersectionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
448
- kind: t.StringC;
471
+ kind: t.Type<"image", "image", unknown>;
449
472
  id: t.StringC;
450
473
  url: t.StringC;
451
474
  height: t.StringC;
@@ -462,7 +485,7 @@ export declare const Link: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
462
485
  }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
463
486
  __TYPE__: t.LiteralC<"FileLink">;
464
487
  }>>, t.UnionC<[t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
465
- kind: t.StringC;
488
+ kind: t.Type<"file", "file", unknown>;
466
489
  id: t.StringC;
467
490
  url: t.StringC;
468
491
  name: t.StringC;
@@ -515,7 +538,7 @@ export declare const LinkContent: t.ExactC<t.TypeC<{
515
538
  value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
516
539
  __TYPE__: t.LiteralC<"ImageLink">;
517
540
  }>>, t.UnionC<[t.IntersectionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
518
- kind: t.StringC;
541
+ kind: t.Type<"image", "image", unknown>;
519
542
  id: t.StringC;
520
543
  url: t.StringC;
521
544
  height: t.StringC;
@@ -532,7 +555,7 @@ export declare const LinkContent: t.ExactC<t.TypeC<{
532
555
  }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
533
556
  __TYPE__: t.LiteralC<"FileLink">;
534
557
  }>>, t.UnionC<[t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
535
- kind: t.StringC;
558
+ kind: t.Type<"file", "file", unknown>;
536
559
  id: t.StringC;
537
560
  url: t.StringC;
538
561
  name: t.StringC;
@@ -588,7 +611,7 @@ export declare const isFilledLinkContent: (u: unknown) => u is {
588
611
  value: ({
589
612
  __TYPE__: "ImageLink";
590
613
  } & {
591
- kind: string;
614
+ kind: "image";
592
615
  id: string;
593
616
  url: string;
594
617
  height: string;
@@ -600,7 +623,7 @@ export declare const isFilledLinkContent: (u: unknown) => u is {
600
623
  }) | ({
601
624
  __TYPE__: "FileLink";
602
625
  } & {
603
- kind: string;
626
+ kind: "file";
604
627
  id: string;
605
628
  url: string;
606
629
  name: string;
@@ -626,7 +649,7 @@ export declare const isFilledLinkContent: (u: unknown) => u is {
626
649
  export declare const FilledLinkLegacy: t.UnionC<[t.Type<{
627
650
  __TYPE__: "ImageLink";
628
651
  } & {
629
- kind: string;
652
+ kind: "image";
630
653
  id: string;
631
654
  url: string;
632
655
  height: string;
@@ -636,7 +659,7 @@ export declare const FilledLinkLegacy: t.UnionC<[t.Type<{
636
659
  } & {
637
660
  date?: string | null | undefined;
638
661
  }, {
639
- kind: string;
662
+ kind: "image";
640
663
  id: string;
641
664
  url: string;
642
665
  height: string;
@@ -648,7 +671,7 @@ export declare const FilledLinkLegacy: t.UnionC<[t.Type<{
648
671
  }, unknown>, t.Type<{
649
672
  __TYPE__: "FileLink";
650
673
  } & {
651
- kind: string;
674
+ kind: "file";
652
675
  id: string;
653
676
  url: string;
654
677
  name: string;
@@ -656,7 +679,7 @@ export declare const FilledLinkLegacy: t.UnionC<[t.Type<{
656
679
  } & {
657
680
  date?: string | null | undefined;
658
681
  }, {
659
- kind: string;
682
+ kind: "file";
660
683
  id: string;
661
684
  url: string;
662
685
  name: string;
@@ -693,7 +716,7 @@ export declare const FilledLinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<
693
716
  value: ({
694
717
  __TYPE__: "ImageLink";
695
718
  } & {
696
- kind: string;
719
+ kind: "image";
697
720
  id: string;
698
721
  url: string;
699
722
  height: string;
@@ -705,7 +728,7 @@ export declare const FilledLinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<
705
728
  }) | ({
706
729
  __TYPE__: "FileLink";
707
730
  } & {
708
- kind: string;
731
+ kind: "file";
709
732
  id: string;
710
733
  url: string;
711
734
  name: string;
@@ -728,7 +751,7 @@ export declare const FilledLinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<
728
751
  } | null | undefined;
729
752
  });
730
753
  }, WithTypes<({
731
- kind: string;
754
+ kind: "image";
732
755
  id: string;
733
756
  url: string;
734
757
  height: string;
@@ -738,7 +761,7 @@ export declare const FilledLinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<
738
761
  } & {
739
762
  date?: string | null | undefined;
740
763
  }) | ({
741
- kind: string;
764
+ kind: "file";
742
765
  id: string;
743
766
  url: string;
744
767
  name: string;
@@ -759,7 +782,7 @@ export declare const FilledLinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<
759
782
  export declare const FilledLink: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
760
783
  __TYPE__: t.LiteralC<"ImageLink">;
761
784
  }>>, t.IntersectionC<[t.ExactC<t.TypeC<{
762
- kind: t.StringC;
785
+ kind: t.Type<"image", "image", unknown>;
763
786
  id: t.StringC;
764
787
  url: t.StringC;
765
788
  height: t.StringC;
@@ -771,7 +794,7 @@ export declare const FilledLink: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
771
794
  }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
772
795
  __TYPE__: t.LiteralC<"FileLink">;
773
796
  }>>, t.ExactC<t.IntersectionC<[t.TypeC<{
774
- kind: t.StringC;
797
+ kind: t.Type<"file", "file", unknown>;
775
798
  id: t.StringC;
776
799
  url: t.StringC;
777
800
  name: t.StringC;
@@ -800,7 +823,7 @@ export declare const FilledLinkContent: t.ExactC<t.TypeC<{
800
823
  value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
801
824
  __TYPE__: t.LiteralC<"ImageLink">;
802
825
  }>>, t.IntersectionC<[t.ExactC<t.TypeC<{
803
- kind: t.StringC;
826
+ kind: t.Type<"image", "image", unknown>;
804
827
  id: t.StringC;
805
828
  url: t.StringC;
806
829
  height: t.StringC;
@@ -812,7 +835,7 @@ export declare const FilledLinkContent: t.ExactC<t.TypeC<{
812
835
  }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
813
836
  __TYPE__: t.LiteralC<"FileLink">;
814
837
  }>>, t.ExactC<t.IntersectionC<[t.TypeC<{
815
- kind: t.StringC;
838
+ kind: t.Type<"file", "file", unknown>;
816
839
  id: t.StringC;
817
840
  url: t.StringC;
818
841
  name: t.StringC;
@@ -1,4 +1,27 @@
1
1
  "use strict";
2
+ /**
3
+ * LinkContent is a union of different link content types.
4
+ *
5
+ * Most link content types are built from a union of a filled and an unfilled version.
6
+ *
7
+ * Filled versions make sure that the important fields that make the link work
8
+ * are present. They are also exported for when there's a need to ensure that
9
+ * the link is filled when used in a specific context, e.g. links in rich text fields.
10
+ *
11
+ * Unfilled versions are used when the link is not filled yet but contains other
12
+ * information like the text.
13
+ *
14
+ * There are some exceptions that don't have a filled version (e.g. MediaLink)
15
+ * for when the exact subtype is not yet known.
16
+ *
17
+ * Unfilled versions all have a special `kind` property that is used to
18
+ * determine the type of the link. For legacy reasons, filled versions don't
19
+ * necessarily require this property or its type is loose (e.g. `string`). In
20
+ * this cases, the type is determined based on a specific combination of the
21
+ * rest of the link data. This is why the order of the subtypes in the union is
22
+ * important and should be from the most specific to the least specific. A
23
+ * battery of tests ensures that the correct type is inferred.
24
+ */
2
25
  Object.defineProperty(exports, "__esModule", { value: true });
3
26
  exports.FilledLinkContent = exports.FilledLink = exports.FilledLinkContentLegacy = exports.FilledLinkLegacy = exports.isFilledLinkContent = exports.LinkContent = exports.Link = exports.LinkContentLegacy = exports.LinkLegacy = exports.isLinkContent = exports.LinkContentType = exports.AnyLinkContent = exports.AnyLinkType = exports.ExternalLinkContent = exports.FilledExternalLinkContent = exports.ExternalLinkType = exports.DocumentLinkContent = exports.FilledDocumentLinkContent = exports.DocumentLinkType = exports.MediaLinkContent = exports.MediaLinkType = exports.FileLinkContent = exports.FilledFileLinkContent = exports.FileLinkType = exports.ImageLinkContent = exports.FilledImageLinkContent = exports.ImageLinkType = void 0;
4
27
  const tslib_1 = require("tslib");
@@ -11,9 +34,13 @@ const function_2 = require("../../../validators/function");
11
34
  const utils_1 = require("../../utils");
12
35
  // ImageLink.
13
36
  exports.ImageLinkType = "ImageLink";
37
+ const isImageLinkKind = (input) => typeof input === "string";
38
+ const ImageLinkKind = new t.Type("ImageLinkKind", (input) => isImageLinkKind(input), (input, context) => isImageLinkKind(input)
39
+ ? t.success("image")
40
+ : t.failure(input, context), () => "image");
14
41
  const filledImageLinkLegacyCodec = t.intersection([
15
42
  t.strict({
16
- kind: t.string,
43
+ kind: ImageLinkKind,
17
44
  id: t.string,
18
45
  url: t.string,
19
46
  height: t.string,
@@ -69,9 +96,13 @@ exports.ImageLinkContent = t.intersection([
69
96
  ]);
70
97
  // FileLink.
71
98
  exports.FileLinkType = "FileLink";
99
+ const isFileLinkKind = (input) => typeof input === "string";
100
+ const FileLinkKind = new t.Type("FileLinkKind", (input) => isFileLinkKind(input), (input, context) => isFileLinkKind(input)
101
+ ? t.success("file")
102
+ : t.failure(input, context), () => "file");
72
103
  const filledFileLinkLegacyCodec = t.exact(t.intersection([
73
104
  t.type({
74
- kind: t.string,
105
+ kind: FileLinkKind,
75
106
  id: t.string,
76
107
  url: t.string,
77
108
  name: t.string,
@@ -116,7 +116,7 @@ export declare const NestableContent: t.UnionC<[t.ExactC<t.TypeC<{
116
116
  value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
117
117
  __TYPE__: t.LiteralC<"ImageLink">;
118
118
  }>>, t.UnionC<[t.IntersectionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
119
- kind: t.StringC;
119
+ kind: t.Type<"image", "image", unknown>;
120
120
  id: t.StringC;
121
121
  url: t.StringC;
122
122
  height: t.StringC;
@@ -133,7 +133,7 @@ export declare const NestableContent: t.UnionC<[t.ExactC<t.TypeC<{
133
133
  }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
134
134
  __TYPE__: t.LiteralC<"FileLink">;
135
135
  }>>, t.UnionC<[t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
136
- kind: t.StringC;
136
+ kind: t.Type<"file", "file", unknown>;
137
137
  id: t.StringC;
138
138
  url: t.StringC;
139
139
  name: t.StringC;
@@ -211,7 +211,7 @@ export declare const NestableContent: t.UnionC<[t.ExactC<t.TypeC<{
211
211
  linkTo: t.UnionC<[t.Type<({
212
212
  __TYPE__: "ImageLink";
213
213
  } & {
214
- kind: string;
214
+ kind: "image";
215
215
  id: string;
216
216
  url: string;
217
217
  height: string;
@@ -223,7 +223,7 @@ export declare const NestableContent: t.UnionC<[t.ExactC<t.TypeC<{
223
223
  }) | ({
224
224
  __TYPE__: "FileLink";
225
225
  } & {
226
- kind: string;
226
+ kind: "file";
227
227
  id: string;
228
228
  url: string;
229
229
  name: string;
@@ -247,7 +247,7 @@ export declare const NestableContent: t.UnionC<[t.ExactC<t.TypeC<{
247
247
  }), ({
248
248
  __TYPE__: "ImageLink";
249
249
  } & {
250
- kind: string;
250
+ kind: "image";
251
251
  id: string;
252
252
  url: string;
253
253
  height: string;
@@ -259,7 +259,7 @@ export declare const NestableContent: t.UnionC<[t.ExactC<t.TypeC<{
259
259
  }) | ({
260
260
  __TYPE__: "FileLink";
261
261
  } & {
262
- kind: string;
262
+ kind: "file";
263
263
  id: string;
264
264
  url: string;
265
265
  name: string;
@@ -318,7 +318,7 @@ export declare const NestableContent: t.UnionC<[t.ExactC<t.TypeC<{
318
318
  data: ({
319
319
  __TYPE__: "ImageLink";
320
320
  } & {
321
- kind: string;
321
+ kind: "image";
322
322
  id: string;
323
323
  url: string;
324
324
  height: string;
@@ -330,7 +330,7 @@ export declare const NestableContent: t.UnionC<[t.ExactC<t.TypeC<{
330
330
  }) | ({
331
331
  __TYPE__: "FileLink";
332
332
  } & {
333
- kind: string;
333
+ kind: "file";
334
334
  id: string;
335
335
  url: string;
336
336
  name: string;
@@ -368,7 +368,7 @@ export declare const NestableContent: t.UnionC<[t.ExactC<t.TypeC<{
368
368
  data: ({
369
369
  __TYPE__: "ImageLink";
370
370
  } & {
371
- kind: string;
371
+ kind: "image";
372
372
  id: string;
373
373
  url: string;
374
374
  height: string;
@@ -380,7 +380,7 @@ export declare const NestableContent: t.UnionC<[t.ExactC<t.TypeC<{
380
380
  }) | ({
381
381
  __TYPE__: "FileLink";
382
382
  } & {
383
- kind: string;
383
+ kind: "file";
384
384
  id: string;
385
385
  url: string;
386
386
  name: string;
@@ -543,7 +543,7 @@ export declare const isNestableContent: (u: unknown) => u is {
543
543
  value: ({
544
544
  __TYPE__: "ImageLink";
545
545
  } & (({
546
- kind: string;
546
+ kind: "image";
547
547
  id: string;
548
548
  url: string;
549
549
  height: string;
@@ -560,7 +560,7 @@ export declare const isNestableContent: (u: unknown) => u is {
560
560
  })) | ({
561
561
  __TYPE__: "FileLink";
562
562
  } & (({
563
- kind: string;
563
+ kind: "file";
564
564
  id: string;
565
565
  url: string;
566
566
  name: string;
@@ -636,7 +636,7 @@ export declare const isNestableContent: (u: unknown) => u is {
636
636
  linkTo?: ({
637
637
  __TYPE__: "ImageLink";
638
638
  } & {
639
- kind: string;
639
+ kind: "image";
640
640
  id: string;
641
641
  url: string;
642
642
  height: string;
@@ -648,7 +648,7 @@ export declare const isNestableContent: (u: unknown) => u is {
648
648
  }) | ({
649
649
  __TYPE__: "FileLink";
650
650
  } & {
651
- kind: string;
651
+ kind: "file";
652
652
  id: string;
653
653
  url: string;
654
654
  name: string;
@@ -707,7 +707,7 @@ export declare const isNestableContent: (u: unknown) => u is {
707
707
  data: ({
708
708
  __TYPE__: "ImageLink";
709
709
  } & {
710
- kind: string;
710
+ kind: "image";
711
711
  id: string;
712
712
  url: string;
713
713
  height: string;
@@ -719,7 +719,7 @@ export declare const isNestableContent: (u: unknown) => u is {
719
719
  }) | ({
720
720
  __TYPE__: "FileLink";
721
721
  } & {
722
- kind: string;
722
+ kind: "file";
723
723
  id: string;
724
724
  url: string;
725
725
  name: string;
@@ -880,7 +880,7 @@ export declare const NestableLegacy: (ctx: LegacyContentCtx) => {
880
880
  value: ({
881
881
  __TYPE__: "ImageLink";
882
882
  } & (({
883
- kind: string;
883
+ kind: "image";
884
884
  id: string;
885
885
  url: string;
886
886
  height: string;
@@ -897,7 +897,7 @@ export declare const NestableLegacy: (ctx: LegacyContentCtx) => {
897
897
  })) | ({
898
898
  __TYPE__: "FileLink";
899
899
  } & (({
900
- kind: string;
900
+ kind: "file";
901
901
  id: string;
902
902
  url: string;
903
903
  name: string;
@@ -973,7 +973,7 @@ export declare const NestableLegacy: (ctx: LegacyContentCtx) => {
973
973
  linkTo?: ({
974
974
  __TYPE__: "ImageLink";
975
975
  } & {
976
- kind: string;
976
+ kind: "image";
977
977
  id: string;
978
978
  url: string;
979
979
  height: string;
@@ -985,7 +985,7 @@ export declare const NestableLegacy: (ctx: LegacyContentCtx) => {
985
985
  }) | ({
986
986
  __TYPE__: "FileLink";
987
987
  } & {
988
- kind: string;
988
+ kind: "file";
989
989
  id: string;
990
990
  url: string;
991
991
  name: string;
@@ -1044,7 +1044,7 @@ export declare const NestableLegacy: (ctx: LegacyContentCtx) => {
1044
1044
  data: ({
1045
1045
  __TYPE__: "ImageLink";
1046
1046
  } & {
1047
- kind: string;
1047
+ kind: "image";
1048
1048
  id: string;
1049
1049
  url: string;
1050
1050
  height: string;
@@ -1056,7 +1056,7 @@ export declare const NestableLegacy: (ctx: LegacyContentCtx) => {
1056
1056
  }) | ({
1057
1057
  __TYPE__: "FileLink";
1058
1058
  } & {
1059
- kind: string;
1059
+ kind: "file";
1060
1060
  id: string;
1061
1061
  url: string;
1062
1062
  name: string;