@prismicio/types-internal 3.8.0 → 3.9.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.
@@ -5,12 +5,14 @@ import type { LegacyContentCtx, WithTypes } from "../LegacyContentCtx";
5
5
  export declare const RepeatableContent: t.ExactC<t.TypeC<{
6
6
  __TYPE__: t.LiteralC<"RepeatableContent">;
7
7
  type: t.LiteralC<"Link">;
8
- value: t.ArrayC<t.ExactC<t.TypeC<{
8
+ value: t.ArrayC<t.IntersectionC<[t.ExactC<t.TypeC<{
9
+ key: t.Type<string, string, unknown>;
10
+ }>>, t.ExactC<t.TypeC<{
9
11
  __TYPE__: t.LiteralC<"LinkContent">;
10
12
  value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
11
13
  __TYPE__: t.LiteralC<"ImageLink">;
12
- }>>, t.UnionC<[t.IntersectionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
13
- kind: t.StringC;
14
+ }>>, t.IntersectionC<[t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
15
+ kind: t.Type<"image", "image", unknown>;
14
16
  id: t.StringC;
15
17
  url: t.StringC;
16
18
  height: t.StringC;
@@ -19,38 +21,35 @@ export declare const RepeatableContent: t.ExactC<t.TypeC<{
19
21
  name: t.StringC;
20
22
  }>>, t.ExactC<t.PartialC<{
21
23
  date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
22
- }>>]>, t.ExactC<t.PartialC<{
23
- text: t.StringC;
24
24
  }>>]>, t.ExactC<t.TypeC<{
25
25
  kind: t.LiteralC<"image">;
26
+ }>>]>, t.ExactC<t.PartialC<{
26
27
  text: t.StringC;
27
28
  }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
28
29
  __TYPE__: t.LiteralC<"FileLink">;
29
- }>>, t.UnionC<[t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
30
- kind: t.StringC;
30
+ }>>, t.IntersectionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
31
+ kind: t.Type<"file", "file", unknown>;
31
32
  id: t.StringC;
32
33
  url: t.StringC;
33
34
  name: t.StringC;
34
35
  size: t.StringC;
35
36
  }>, t.PartialC<{
36
37
  date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
37
- }>]>>, t.ExactC<t.PartialC<{
38
- text: t.StringC;
39
- }>>]>, t.ExactC<t.TypeC<{
38
+ }>]>>, t.ExactC<t.TypeC<{
40
39
  kind: t.LiteralC<"file">;
40
+ }>>]>, t.ExactC<t.PartialC<{
41
41
  text: t.StringC;
42
42
  }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
43
43
  __TYPE__: t.LiteralC<"DocumentLink">;
44
- }>>, t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
44
+ }>>, t.IntersectionC<[t.UnionC<[t.ExactC<t.TypeC<{
45
45
  id: t.Type<string, string, unknown>;
46
- }>>, t.ExactC<t.PartialC<{
47
- text: t.StringC;
48
- }>>]>, t.ExactC<t.TypeC<{
46
+ }>>, t.ExactC<t.TypeC<{
49
47
  kind: t.LiteralC<"document">;
48
+ }>>]>, t.ExactC<t.PartialC<{
50
49
  text: t.StringC;
51
50
  }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
52
51
  __TYPE__: t.LiteralC<"ExternalLink">;
53
- }>>, t.UnionC<[t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
52
+ }>>, t.IntersectionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
54
53
  url: t.StringC;
55
54
  }>, t.PartialC<{
56
55
  kind: t.LiteralC<"web">;
@@ -60,33 +59,37 @@ export declare const RepeatableContent: t.ExactC<t.TypeC<{
60
59
  }, {
61
60
  title?: string;
62
61
  }, unknown>, t.NullC, t.UndefinedC]>;
63
- }>]>>, t.ExactC<t.PartialC<{
64
- text: t.StringC;
65
- }>>]>, t.ExactC<t.TypeC<{
62
+ }>]>>, t.ExactC<t.TypeC<{
66
63
  kind: t.LiteralC<"web">;
64
+ }>>]>, t.ExactC<t.PartialC<{
67
65
  text: t.StringC;
68
66
  }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
69
67
  __TYPE__: t.LiteralC<"MediaLink">;
70
- }>>, t.ExactC<t.TypeC<{
68
+ }>>, t.IntersectionC<[t.ExactC<t.TypeC<{
71
69
  kind: t.LiteralC<"media">;
70
+ }>>, t.ExactC<t.PartialC<{
72
71
  text: t.StringC;
73
- }>>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
72
+ }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
74
73
  __TYPE__: t.LiteralC<"AnyLink">;
75
- }>>, t.ExactC<t.TypeC<{
74
+ }>>, t.ExactC<t.IntersectionC<[t.TypeC<{
75
+ kind: t.LiteralC<"any">;
76
+ }>, t.PartialC<{
76
77
  text: t.StringC;
77
- }>>]>]>;
78
- }>>>;
78
+ }>]>>]>]>;
79
+ }>>]>>;
79
80
  }>>;
80
81
  export declare type RepeatableContent = t.TypeOf<typeof RepeatableContent>;
81
82
  export declare const isRepeatableContent: t.Is<{
82
83
  __TYPE__: "RepeatableContent";
83
84
  type: "Link";
84
- value: {
85
+ value: ({
86
+ key: string;
87
+ } & {
85
88
  __TYPE__: "LinkContent";
86
89
  value: ({
87
90
  __TYPE__: "ImageLink";
88
- } & (({
89
- kind: string;
91
+ } & ((({
92
+ kind: "image";
90
93
  id: string;
91
94
  url: string;
92
95
  height: string;
@@ -95,43 +98,41 @@ export declare const isRepeatableContent: t.Is<{
95
98
  name: string;
96
99
  } & {
97
100
  date?: string | null | undefined;
98
- } & {
99
- text?: string;
100
101
  }) | {
101
102
  kind: "image";
102
- text: string;
103
+ }) & {
104
+ text?: string;
103
105
  })) | ({
104
106
  __TYPE__: "FileLink";
105
- } & (({
106
- kind: string;
107
+ } & ((({
108
+ kind: "file";
107
109
  id: string;
108
110
  url: string;
109
111
  name: string;
110
112
  size: string;
111
113
  } & {
112
114
  date?: string | null | undefined;
113
- } & {
114
- text?: string;
115
115
  }) | {
116
116
  kind: "file";
117
- text: string;
117
+ }) & {
118
+ text?: string;
118
119
  })) | ({
119
120
  __TYPE__: "MediaLink";
120
121
  } & {
121
122
  kind: "media";
122
- text: string;
123
+ } & {
124
+ text?: string;
123
125
  }) | ({
124
126
  __TYPE__: "DocumentLink";
125
127
  } & (({
126
128
  id: string;
127
- } & {
128
- text?: string;
129
- }) | {
129
+ } | {
130
130
  kind: "document";
131
- text: string;
131
+ }) & {
132
+ text?: string;
132
133
  })) | ({
133
134
  __TYPE__: "ExternalLink";
134
- } & (({
135
+ } & ((({
135
136
  url: string;
136
137
  } & {
137
138
  kind?: "web";
@@ -139,17 +140,18 @@ export declare const isRepeatableContent: t.Is<{
139
140
  preview?: {
140
141
  title?: string;
141
142
  } | null | undefined;
142
- } & {
143
- text?: string;
144
143
  }) | {
145
144
  kind: "web";
146
- text: string;
145
+ }) & {
146
+ text?: string;
147
147
  })) | ({
148
148
  __TYPE__: "AnyLink";
149
149
  } & {
150
- text: string;
150
+ kind: "any";
151
+ } & {
152
+ text?: string;
151
153
  });
152
- }[];
154
+ })[];
153
155
  }>;
154
156
  export declare const RepeatableLegacy: (ctx: LegacyContentCtx, fieldType: "Link") => t.Type<RepeatableContent, WithTypes<Array<unknown>>, unknown>;
155
157
  export declare type RepeatableCustomType = Link;
@@ -96,7 +96,18 @@ export declare const StaticCustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
96
96
  useAsTitle?: boolean;
97
97
  placeholder?: string;
98
98
  select?: "media" | "document" | "web" | null;
99
- customtypes?: readonly string[];
99
+ customtypes?: readonly (string | ({
100
+ id: string;
101
+ } & {
102
+ fields?: readonly (string | {
103
+ id: string;
104
+ customtypes: readonly (string | ({
105
+ id: string;
106
+ } & {
107
+ fields?: readonly string[];
108
+ }))[];
109
+ })[];
110
+ }))[];
100
111
  masks?: readonly string[];
101
112
  tags?: readonly string[];
102
113
  allowTargetBlank?: boolean;
@@ -271,7 +282,18 @@ export declare const StaticCustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
271
282
  useAsTitle?: boolean;
272
283
  placeholder?: string;
273
284
  select?: "media" | "document" | "web" | null;
274
- customtypes?: readonly string[];
285
+ customtypes?: readonly (string | ({
286
+ id: string;
287
+ } & {
288
+ fields?: readonly (string | {
289
+ id: string;
290
+ customtypes: readonly (string | ({
291
+ id: string;
292
+ } & {
293
+ fields?: readonly string[];
294
+ }))[];
295
+ })[];
296
+ }))[];
275
297
  masks?: readonly string[];
276
298
  tags?: readonly string[];
277
299
  allowTargetBlank?: boolean;
@@ -446,7 +468,18 @@ export declare const StaticCustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
446
468
  useAsTitle?: boolean;
447
469
  placeholder?: string;
448
470
  select?: "media" | "document" | "web" | null;
449
- customtypes?: readonly string[];
471
+ customtypes?: readonly (string | ({
472
+ id: string;
473
+ } & {
474
+ fields?: readonly (string | {
475
+ id: string;
476
+ customtypes: readonly (string | ({
477
+ id: string;
478
+ } & {
479
+ fields?: readonly string[];
480
+ }))[];
481
+ })[];
482
+ }))[];
450
483
  masks?: readonly string[];
451
484
  tags?: readonly string[];
452
485
  allowTargetBlank?: boolean;
@@ -631,7 +664,18 @@ export declare const StaticCustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
631
664
  useAsTitle?: boolean;
632
665
  placeholder?: string;
633
666
  select?: "media" | "document" | "web" | null;
634
- customtypes?: readonly string[];
667
+ customtypes?: readonly (string | ({
668
+ id: string;
669
+ } & {
670
+ fields?: readonly (string | {
671
+ id: string;
672
+ customtypes: readonly (string | ({
673
+ id: string;
674
+ } & {
675
+ fields?: readonly string[];
676
+ }))[];
677
+ })[];
678
+ }))[];
635
679
  masks?: readonly string[];
636
680
  tags?: readonly string[];
637
681
  allowTargetBlank?: boolean;
@@ -806,7 +850,18 @@ export declare const StaticCustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
806
850
  useAsTitle?: boolean;
807
851
  placeholder?: string;
808
852
  select?: "media" | "document" | "web" | null;
809
- customtypes?: readonly string[];
853
+ customtypes?: readonly (string | ({
854
+ id: string;
855
+ } & {
856
+ fields?: readonly (string | {
857
+ id: string;
858
+ customtypes: readonly (string | ({
859
+ id: string;
860
+ } & {
861
+ fields?: readonly string[];
862
+ }))[];
863
+ })[];
864
+ }))[];
810
865
  masks?: readonly string[];
811
866
  tags?: readonly string[];
812
867
  allowTargetBlank?: boolean;
@@ -982,7 +1037,18 @@ export declare const StaticCustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
982
1037
  useAsTitle?: boolean;
983
1038
  placeholder?: string;
984
1039
  select?: "media" | "document" | "web" | null;
985
- customtypes?: readonly string[];
1040
+ customtypes?: readonly (string | ({
1041
+ id: string;
1042
+ } & {
1043
+ fields?: readonly (string | {
1044
+ id: string;
1045
+ customtypes: readonly (string | ({
1046
+ id: string;
1047
+ } & {
1048
+ fields?: readonly string[];
1049
+ }))[];
1050
+ })[];
1051
+ }))[];
986
1052
  masks?: readonly string[];
987
1053
  tags?: readonly string[];
988
1054
  allowTargetBlank?: boolean;
@@ -1150,7 +1216,18 @@ export declare const StaticCustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
1150
1216
  useAsTitle?: boolean;
1151
1217
  placeholder?: string;
1152
1218
  select?: "media" | "document" | "web" | null;
1153
- customtypes?: readonly string[];
1219
+ customtypes?: readonly (string | ({
1220
+ id: string;
1221
+ } & {
1222
+ fields?: readonly (string | {
1223
+ id: string;
1224
+ customtypes: readonly (string | ({
1225
+ id: string;
1226
+ } & {
1227
+ fields?: readonly string[];
1228
+ }))[];
1229
+ })[];
1230
+ }))[];
1154
1231
  masks?: readonly string[];
1155
1232
  tags?: readonly string[];
1156
1233
  allowTargetBlank?: boolean;
@@ -1334,7 +1411,18 @@ export declare const StaticCustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
1334
1411
  useAsTitle?: boolean;
1335
1412
  placeholder?: string;
1336
1413
  select?: "media" | "document" | "web" | null;
1337
- customtypes?: readonly string[];
1414
+ customtypes?: readonly (string | ({
1415
+ id: string;
1416
+ } & {
1417
+ fields?: readonly (string | {
1418
+ id: string;
1419
+ customtypes: readonly (string | ({
1420
+ id: string;
1421
+ } & {
1422
+ fields?: readonly string[];
1423
+ }))[];
1424
+ })[];
1425
+ }))[];
1338
1426
  masks?: readonly string[];
1339
1427
  tags?: readonly string[];
1340
1428
  allowTargetBlank?: boolean;
@@ -1509,7 +1597,18 @@ export declare const StaticCustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
1509
1597
  useAsTitle?: boolean;
1510
1598
  placeholder?: string;
1511
1599
  select?: "media" | "document" | "web" | null;
1512
- customtypes?: readonly string[];
1600
+ customtypes?: readonly (string | ({
1601
+ id: string;
1602
+ } & {
1603
+ fields?: readonly (string | {
1604
+ id: string;
1605
+ customtypes: readonly (string | ({
1606
+ id: string;
1607
+ } & {
1608
+ fields?: readonly string[];
1609
+ }))[];
1610
+ })[];
1611
+ }))[];
1513
1612
  masks?: readonly string[];
1514
1613
  tags?: readonly string[];
1515
1614
  allowTargetBlank?: boolean;
@@ -1684,7 +1783,18 @@ export declare const StaticCustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
1684
1783
  useAsTitle?: boolean;
1685
1784
  placeholder?: string;
1686
1785
  select?: "media" | "document" | "web" | null;
1687
- customtypes?: readonly string[];
1786
+ customtypes?: readonly (string | ({
1787
+ id: string;
1788
+ } & {
1789
+ fields?: readonly (string | {
1790
+ id: string;
1791
+ customtypes: readonly (string | ({
1792
+ id: string;
1793
+ } & {
1794
+ fields?: readonly string[];
1795
+ }))[];
1796
+ })[];
1797
+ }))[];
1688
1798
  masks?: readonly string[];
1689
1799
  tags?: readonly string[];
1690
1800
  allowTargetBlank?: boolean;
@@ -1858,7 +1968,18 @@ export declare const StaticCustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
1858
1968
  useAsTitle?: boolean;
1859
1969
  placeholder?: string;
1860
1970
  select?: "media" | "document" | "web" | null;
1861
- customtypes?: readonly string[];
1971
+ customtypes?: readonly (string | ({
1972
+ id: string;
1973
+ } & {
1974
+ fields?: readonly (string | {
1975
+ id: string;
1976
+ customtypes: readonly (string | ({
1977
+ id: string;
1978
+ } & {
1979
+ fields?: readonly string[];
1980
+ }))[];
1981
+ })[];
1982
+ }))[];
1862
1983
  masks?: readonly string[];
1863
1984
  tags?: readonly string[];
1864
1985
  allowTargetBlank?: boolean;
@@ -2058,7 +2179,18 @@ export declare const CustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
2058
2179
  useAsTitle?: boolean;
2059
2180
  placeholder?: string;
2060
2181
  select?: "media" | "document" | "web" | null;
2061
- customtypes?: readonly string[];
2182
+ customtypes?: readonly (string | ({
2183
+ id: string;
2184
+ } & {
2185
+ fields?: readonly (string | {
2186
+ id: string;
2187
+ customtypes: readonly (string | ({
2188
+ id: string;
2189
+ } & {
2190
+ fields?: readonly string[];
2191
+ }))[];
2192
+ })[];
2193
+ }))[];
2062
2194
  masks?: readonly string[];
2063
2195
  tags?: readonly string[];
2064
2196
  allowTargetBlank?: boolean;
@@ -2233,7 +2365,18 @@ export declare const CustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
2233
2365
  useAsTitle?: boolean;
2234
2366
  placeholder?: string;
2235
2367
  select?: "media" | "document" | "web" | null;
2236
- customtypes?: readonly string[];
2368
+ customtypes?: readonly (string | ({
2369
+ id: string;
2370
+ } & {
2371
+ fields?: readonly (string | {
2372
+ id: string;
2373
+ customtypes: readonly (string | ({
2374
+ id: string;
2375
+ } & {
2376
+ fields?: readonly string[];
2377
+ }))[];
2378
+ })[];
2379
+ }))[];
2237
2380
  masks?: readonly string[];
2238
2381
  tags?: readonly string[];
2239
2382
  allowTargetBlank?: boolean;
@@ -2408,7 +2551,18 @@ export declare const CustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
2408
2551
  useAsTitle?: boolean;
2409
2552
  placeholder?: string;
2410
2553
  select?: "media" | "document" | "web" | null;
2411
- customtypes?: readonly string[];
2554
+ customtypes?: readonly (string | ({
2555
+ id: string;
2556
+ } & {
2557
+ fields?: readonly (string | {
2558
+ id: string;
2559
+ customtypes: readonly (string | ({
2560
+ id: string;
2561
+ } & {
2562
+ fields?: readonly string[];
2563
+ }))[];
2564
+ })[];
2565
+ }))[];
2412
2566
  masks?: readonly string[];
2413
2567
  tags?: readonly string[];
2414
2568
  allowTargetBlank?: boolean;
@@ -2593,7 +2747,18 @@ export declare const CustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
2593
2747
  useAsTitle?: boolean;
2594
2748
  placeholder?: string;
2595
2749
  select?: "media" | "document" | "web" | null;
2596
- customtypes?: readonly string[];
2750
+ customtypes?: readonly (string | ({
2751
+ id: string;
2752
+ } & {
2753
+ fields?: readonly (string | {
2754
+ id: string;
2755
+ customtypes: readonly (string | ({
2756
+ id: string;
2757
+ } & {
2758
+ fields?: readonly string[];
2759
+ }))[];
2760
+ })[];
2761
+ }))[];
2597
2762
  masks?: readonly string[];
2598
2763
  tags?: readonly string[];
2599
2764
  allowTargetBlank?: boolean;
@@ -2768,7 +2933,18 @@ export declare const CustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
2768
2933
  useAsTitle?: boolean;
2769
2934
  placeholder?: string;
2770
2935
  select?: "media" | "document" | "web" | null;
2771
- customtypes?: readonly string[];
2936
+ customtypes?: readonly (string | ({
2937
+ id: string;
2938
+ } & {
2939
+ fields?: readonly (string | {
2940
+ id: string;
2941
+ customtypes: readonly (string | ({
2942
+ id: string;
2943
+ } & {
2944
+ fields?: readonly string[];
2945
+ }))[];
2946
+ })[];
2947
+ }))[];
2772
2948
  masks?: readonly string[];
2773
2949
  tags?: readonly string[];
2774
2950
  allowTargetBlank?: boolean;
@@ -2944,7 +3120,18 @@ export declare const CustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
2944
3120
  useAsTitle?: boolean;
2945
3121
  placeholder?: string;
2946
3122
  select?: "media" | "document" | "web" | null;
2947
- customtypes?: readonly string[];
3123
+ customtypes?: readonly (string | ({
3124
+ id: string;
3125
+ } & {
3126
+ fields?: readonly (string | {
3127
+ id: string;
3128
+ customtypes: readonly (string | ({
3129
+ id: string;
3130
+ } & {
3131
+ fields?: readonly string[];
3132
+ }))[];
3133
+ })[];
3134
+ }))[];
2948
3135
  masks?: readonly string[];
2949
3136
  tags?: readonly string[];
2950
3137
  allowTargetBlank?: boolean;
@@ -3112,7 +3299,18 @@ export declare const CustomType: t.ExactC<t.IntersectionC<[t.TypeC<{
3112
3299
  useAsTitle?: boolean;
3113
3300
  placeholder?: string;
3114
3301
  select?: "media" | "document" | "web" | null;
3115
- customtypes?: readonly string[];
3302
+ customtypes?: readonly (string | ({
3303
+ id: string;
3304
+ } & {
3305
+ fields?: readonly (string | {
3306
+ id: string;
3307
+ customtypes: readonly (string | ({
3308
+ id: string;
3309
+ } & {
3310
+ fields?: readonly string[];
3311
+ }))[];
3312
+ })[];
3313
+ }))[];
3116
3314
  masks?: readonly string[];
3117
3315
  tags?: readonly string[];
3118
3316
  allowTargetBlank?: boolean;