@prismicio/types-internal 2.7.0 → 2.8.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.
@@ -4,7 +4,7 @@ export declare const ImageLinkType = "ImageLink";
4
4
  export declare const FilledImageLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{
5
5
  __TYPE__: t.LiteralC<"ImageLink">;
6
6
  }>>, t.IntersectionC<[t.ExactC<t.TypeC<{
7
- kind: t.Type<"image", "image", unknown>;
7
+ kind: t.StringC;
8
8
  id: t.StringC;
9
9
  url: t.StringC;
10
10
  height: t.StringC;
@@ -18,7 +18,7 @@ export declare type FilledImageLinkContent = t.TypeOf<typeof FilledImageLinkCont
18
18
  export declare const ImageLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{
19
19
  __TYPE__: t.LiteralC<"ImageLink">;
20
20
  }>>, t.UnionC<[t.IntersectionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
21
- kind: t.Type<"image", "image", unknown>;
21
+ kind: t.StringC;
22
22
  id: t.StringC;
23
23
  url: t.StringC;
24
24
  height: t.StringC;
@@ -38,7 +38,7 @@ export declare const FileLinkType = "FileLink";
38
38
  export declare const FilledFileLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{
39
39
  __TYPE__: t.LiteralC<"FileLink">;
40
40
  }>>, t.ExactC<t.IntersectionC<[t.TypeC<{
41
- kind: t.Type<"file", "file", unknown>;
41
+ kind: t.StringC;
42
42
  id: t.StringC;
43
43
  url: t.StringC;
44
44
  name: t.StringC;
@@ -50,7 +50,7 @@ export declare type FilledFileLinkContent = t.TypeOf<typeof FilledFileLinkConten
50
50
  export declare const FileLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{
51
51
  __TYPE__: t.LiteralC<"FileLink">;
52
52
  }>>, t.UnionC<[t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
53
- kind: t.Type<"file", "file", unknown>;
53
+ kind: t.StringC;
54
54
  id: t.StringC;
55
55
  url: t.StringC;
56
56
  name: t.StringC;
@@ -137,7 +137,7 @@ export declare const isLinkContent: (u: unknown) => u is {
137
137
  value: ({
138
138
  __TYPE__: "ImageLink";
139
139
  } & (({
140
- kind: "image";
140
+ kind: string;
141
141
  id: string;
142
142
  url: string;
143
143
  height: string;
@@ -154,7 +154,7 @@ export declare const isLinkContent: (u: unknown) => u is {
154
154
  })) | ({
155
155
  __TYPE__: "FileLink";
156
156
  } & (({
157
- kind: "file";
157
+ kind: string;
158
158
  id: string;
159
159
  url: string;
160
160
  name: string;
@@ -204,7 +204,7 @@ export declare const isLinkContent: (u: unknown) => u is {
204
204
  export declare const LinkLegacy: t.UnionC<[t.Type<{
205
205
  __TYPE__: "ImageLink";
206
206
  } & (({
207
- kind: "image";
207
+ kind: string;
208
208
  id: string;
209
209
  url: string;
210
210
  height: string;
@@ -219,7 +219,7 @@ export declare const LinkLegacy: t.UnionC<[t.Type<{
219
219
  kind: "image";
220
220
  text: string;
221
221
  }), ({
222
- kind: "image";
222
+ kind: string;
223
223
  id: string;
224
224
  url: string;
225
225
  height: string;
@@ -236,7 +236,7 @@ export declare const LinkLegacy: t.UnionC<[t.Type<{
236
236
  }, unknown>, t.Type<{
237
237
  __TYPE__: "FileLink";
238
238
  } & (({
239
- kind: "file";
239
+ kind: string;
240
240
  id: string;
241
241
  url: string;
242
242
  name: string;
@@ -249,7 +249,7 @@ export declare const LinkLegacy: t.UnionC<[t.Type<{
249
249
  kind: "file";
250
250
  text: string;
251
251
  }), ({
252
- kind: "file";
252
+ kind: string;
253
253
  id: string;
254
254
  url: string;
255
255
  name: string;
@@ -325,7 +325,7 @@ export declare const LinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<{
325
325
  value: ({
326
326
  __TYPE__: "ImageLink";
327
327
  } & (({
328
- kind: "image";
328
+ kind: string;
329
329
  id: string;
330
330
  url: string;
331
331
  height: string;
@@ -342,7 +342,7 @@ export declare const LinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<{
342
342
  })) | ({
343
343
  __TYPE__: "FileLink";
344
344
  } & (({
345
- kind: "file";
345
+ kind: string;
346
346
  id: string;
347
347
  url: string;
348
348
  name: string;
@@ -389,7 +389,7 @@ export declare const LinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<{
389
389
  text: string;
390
390
  });
391
391
  }, WithTypes<({
392
- kind: "image";
392
+ kind: string;
393
393
  id: string;
394
394
  url: string;
395
395
  height: string;
@@ -404,7 +404,7 @@ export declare const LinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<{
404
404
  kind: "image";
405
405
  text: string;
406
406
  } | ({
407
- kind: "file";
407
+ kind: string;
408
408
  id: string;
409
409
  url: string;
410
410
  name: string;
@@ -445,7 +445,7 @@ export declare const LinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<{
445
445
  export declare const Link: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
446
446
  __TYPE__: t.LiteralC<"ImageLink">;
447
447
  }>>, t.UnionC<[t.IntersectionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
448
- kind: t.Type<"image", "image", unknown>;
448
+ kind: t.StringC;
449
449
  id: t.StringC;
450
450
  url: t.StringC;
451
451
  height: t.StringC;
@@ -462,7 +462,7 @@ export declare const Link: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
462
462
  }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
463
463
  __TYPE__: t.LiteralC<"FileLink">;
464
464
  }>>, t.UnionC<[t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
465
- kind: t.Type<"file", "file", unknown>;
465
+ kind: t.StringC;
466
466
  id: t.StringC;
467
467
  url: t.StringC;
468
468
  name: t.StringC;
@@ -515,7 +515,7 @@ export declare const LinkContent: t.ExactC<t.TypeC<{
515
515
  value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
516
516
  __TYPE__: t.LiteralC<"ImageLink">;
517
517
  }>>, t.UnionC<[t.IntersectionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
518
- kind: t.Type<"image", "image", unknown>;
518
+ kind: t.StringC;
519
519
  id: t.StringC;
520
520
  url: t.StringC;
521
521
  height: t.StringC;
@@ -532,7 +532,7 @@ export declare const LinkContent: t.ExactC<t.TypeC<{
532
532
  }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
533
533
  __TYPE__: t.LiteralC<"FileLink">;
534
534
  }>>, t.UnionC<[t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
535
- kind: t.Type<"file", "file", unknown>;
535
+ kind: t.StringC;
536
536
  id: t.StringC;
537
537
  url: t.StringC;
538
538
  name: t.StringC;
@@ -588,7 +588,7 @@ export declare const isFilledLinkContent: (u: unknown) => u is {
588
588
  value: ({
589
589
  __TYPE__: "ImageLink";
590
590
  } & {
591
- kind: "image";
591
+ kind: string;
592
592
  id: string;
593
593
  url: string;
594
594
  height: string;
@@ -600,7 +600,7 @@ export declare const isFilledLinkContent: (u: unknown) => u is {
600
600
  }) | ({
601
601
  __TYPE__: "FileLink";
602
602
  } & {
603
- kind: "file";
603
+ kind: string;
604
604
  id: string;
605
605
  url: string;
606
606
  name: string;
@@ -626,7 +626,7 @@ export declare const isFilledLinkContent: (u: unknown) => u is {
626
626
  export declare const FilledLinkLegacy: t.UnionC<[t.Type<{
627
627
  __TYPE__: "ImageLink";
628
628
  } & {
629
- kind: "image";
629
+ kind: string;
630
630
  id: string;
631
631
  url: string;
632
632
  height: string;
@@ -636,7 +636,7 @@ export declare const FilledLinkLegacy: t.UnionC<[t.Type<{
636
636
  } & {
637
637
  date?: string | null | undefined;
638
638
  }, {
639
- kind: "image";
639
+ kind: string;
640
640
  id: string;
641
641
  url: string;
642
642
  height: string;
@@ -648,7 +648,7 @@ export declare const FilledLinkLegacy: t.UnionC<[t.Type<{
648
648
  }, unknown>, t.Type<{
649
649
  __TYPE__: "FileLink";
650
650
  } & {
651
- kind: "file";
651
+ kind: string;
652
652
  id: string;
653
653
  url: string;
654
654
  name: string;
@@ -656,7 +656,7 @@ export declare const FilledLinkLegacy: t.UnionC<[t.Type<{
656
656
  } & {
657
657
  date?: string | null | undefined;
658
658
  }, {
659
- kind: "file";
659
+ kind: string;
660
660
  id: string;
661
661
  url: string;
662
662
  name: string;
@@ -693,7 +693,7 @@ export declare const FilledLinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<
693
693
  value: ({
694
694
  __TYPE__: "ImageLink";
695
695
  } & {
696
- kind: "image";
696
+ kind: string;
697
697
  id: string;
698
698
  url: string;
699
699
  height: string;
@@ -705,7 +705,7 @@ export declare const FilledLinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<
705
705
  }) | ({
706
706
  __TYPE__: "FileLink";
707
707
  } & {
708
- kind: "file";
708
+ kind: string;
709
709
  id: string;
710
710
  url: string;
711
711
  name: string;
@@ -728,7 +728,7 @@ export declare const FilledLinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<
728
728
  } | null | undefined;
729
729
  });
730
730
  }, WithTypes<({
731
- kind: "image";
731
+ kind: string;
732
732
  id: string;
733
733
  url: string;
734
734
  height: string;
@@ -738,7 +738,7 @@ export declare const FilledLinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<
738
738
  } & {
739
739
  date?: string | null | undefined;
740
740
  }) | ({
741
- kind: "file";
741
+ kind: string;
742
742
  id: string;
743
743
  url: string;
744
744
  name: string;
@@ -759,7 +759,7 @@ export declare const FilledLinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<
759
759
  export declare const FilledLink: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
760
760
  __TYPE__: t.LiteralC<"ImageLink">;
761
761
  }>>, t.IntersectionC<[t.ExactC<t.TypeC<{
762
- kind: t.Type<"image", "image", unknown>;
762
+ kind: t.StringC;
763
763
  id: t.StringC;
764
764
  url: t.StringC;
765
765
  height: t.StringC;
@@ -771,7 +771,7 @@ export declare const FilledLink: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
771
771
  }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
772
772
  __TYPE__: t.LiteralC<"FileLink">;
773
773
  }>>, t.ExactC<t.IntersectionC<[t.TypeC<{
774
- kind: t.Type<"file", "file", unknown>;
774
+ kind: t.StringC;
775
775
  id: t.StringC;
776
776
  url: t.StringC;
777
777
  name: t.StringC;
@@ -800,7 +800,7 @@ export declare const FilledLinkContent: t.ExactC<t.TypeC<{
800
800
  value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
801
801
  __TYPE__: t.LiteralC<"ImageLink">;
802
802
  }>>, t.IntersectionC<[t.ExactC<t.TypeC<{
803
- kind: t.Type<"image", "image", unknown>;
803
+ kind: t.StringC;
804
804
  id: t.StringC;
805
805
  url: t.StringC;
806
806
  height: t.StringC;
@@ -812,7 +812,7 @@ export declare const FilledLinkContent: t.ExactC<t.TypeC<{
812
812
  }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
813
813
  __TYPE__: t.LiteralC<"FileLink">;
814
814
  }>>, t.ExactC<t.IntersectionC<[t.TypeC<{
815
- kind: t.Type<"file", "file", unknown>;
815
+ kind: t.StringC;
816
816
  id: t.StringC;
817
817
  url: t.StringC;
818
818
  name: t.StringC;
@@ -11,13 +11,9 @@ const function_2 = require("../../../validators/function");
11
11
  const utils_1 = require("../../utils");
12
12
  // ImageLink.
13
13
  exports.ImageLinkType = "ImageLink";
14
- const isImageLinkKind = (input) => typeof input === "string";
15
- const ImageLinkKind = new t.Type("ImageLinkKind", (input) => isImageLinkKind(input), (input, context) => isImageLinkKind(input)
16
- ? t.success("image")
17
- : t.failure(input, context), () => "image");
18
14
  const filledImageLinkLegacyCodec = t.intersection([
19
15
  t.strict({
20
- kind: ImageLinkKind,
16
+ kind: t.string,
21
17
  id: t.string,
22
18
  url: t.string,
23
19
  height: t.string,
@@ -73,13 +69,9 @@ exports.ImageLinkContent = t.intersection([
73
69
  ]);
74
70
  // FileLink.
75
71
  exports.FileLinkType = "FileLink";
76
- const isFileLinkKind = (input) => typeof input === "string";
77
- const FileLinkKind = new t.Type("FileLinkKind", (input) => isFileLinkKind(input), (input, context) => isFileLinkKind(input)
78
- ? t.success("file")
79
- : t.failure(input, context), () => "file");
80
72
  const filledFileLinkLegacyCodec = t.exact(t.intersection([
81
73
  t.type({
82
- kind: FileLinkKind,
74
+ kind: t.string,
83
75
  id: t.string,
84
76
  url: t.string,
85
77
  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.Type<"image", "image", unknown>;
119
+ kind: t.StringC;
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.Type<"file", "file", unknown>;
136
+ kind: t.StringC;
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: "image";
214
+ kind: string;
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: "file";
226
+ kind: string;
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: "image";
250
+ kind: string;
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: "file";
262
+ kind: string;
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: "image";
321
+ kind: string;
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: "file";
333
+ kind: string;
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: "image";
371
+ kind: string;
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: "file";
383
+ kind: string;
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: "image";
546
+ kind: string;
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: "file";
563
+ kind: string;
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: "image";
639
+ kind: string;
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: "file";
651
+ kind: string;
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: "image";
710
+ kind: string;
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: "file";
722
+ kind: string;
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: "image";
883
+ kind: string;
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: "file";
900
+ kind: string;
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: "image";
976
+ kind: string;
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: "file";
988
+ kind: string;
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: "image";
1047
+ kind: string;
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: "file";
1059
+ kind: string;
1060
1060
  id: string;
1061
1061
  url: string;
1062
1062
  name: string;