@prismicio/types-internal 2.0.0-alpha.7 → 2.0.0-alpha.9

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.
Files changed (31) hide show
  1. package/lib/content/Document.d.ts +632 -56
  2. package/lib/content/fields/GroupContent.d.ts +199 -19
  3. package/lib/content/fields/WidgetContent.d.ts +960 -96
  4. package/lib/content/fields/index.d.ts +1 -0
  5. package/lib/content/fields/index.js +1 -0
  6. package/lib/content/fields/nestable/EmbedContent.d.ts +44 -41
  7. package/lib/content/fields/nestable/EmbedContent.js +15 -38
  8. package/lib/content/fields/nestable/NestableContent.d.ts +120 -13
  9. package/lib/content/fields/nestable/NestableContent.js +2 -1
  10. package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +76 -5
  11. package/lib/content/fields/nestable/RichTextContent/Blocks.js +15 -7
  12. package/lib/content/fields/nestable/RichTextContent/index.d.ts +76 -4
  13. package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +240 -24
  14. package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +79 -7
  15. package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +240 -24
  16. package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +199 -19
  17. package/lib/content/fields/slices/Slice/index.d.ts +436 -37
  18. package/lib/content/fields/slices/Slice/index.js +3 -0
  19. package/lib/content/fields/slices/SliceItem.d.ts +474 -42
  20. package/lib/content/fields/slices/SliceItem.js +2 -2
  21. package/lib/content/fields/slices/SlicesContent.d.ts +720 -72
  22. package/lib/content/fields/slices/index.d.ts +1 -3
  23. package/lib/content/fields/slices/index.js +1 -3
  24. package/package.json +1 -1
  25. package/src/content/fields/index.ts +1 -0
  26. package/src/content/fields/nestable/EmbedContent.ts +20 -59
  27. package/src/content/fields/nestable/NestableContent.ts +3 -2
  28. package/src/content/fields/nestable/RichTextContent/Blocks.ts +19 -8
  29. package/src/content/fields/slices/Slice/index.ts +4 -0
  30. package/src/content/fields/slices/SliceItem.ts +2 -2
  31. package/src/content/fields/slices/index.ts +1 -3
@@ -6,9 +6,30 @@ export declare const isSharedSliceContent: (u: unknown) => u is {
6
6
  variation: string;
7
7
  primary: {
8
8
  [x: string]: {
9
+ type: string;
10
+ __TYPE__: "EmptyContent";
11
+ } | {
9
12
  __TYPE__: "BooleanContent";
10
13
  value: boolean;
11
- } | import("../../nestable").EmbedContent | {
14
+ } | ({
15
+ embed_url: string;
16
+ type: string;
17
+ } & {
18
+ version?: string | number | null;
19
+ title?: string | null | undefined;
20
+ author_name?: string | null | undefined;
21
+ author_url?: string | null | undefined;
22
+ provider_name?: string | null | undefined;
23
+ provider_url?: string | null | undefined;
24
+ cache_age?: string | number | null;
25
+ thumbnail_url?: string | null | undefined;
26
+ thumbnail_width?: number | null | undefined;
27
+ thumbnail_height?: number | null | undefined;
28
+ html?: string | null | undefined;
29
+ } & {
30
+ __TYPE__: "EmbedContent";
31
+ all: unknown;
32
+ }) | {
12
33
  type: "Color";
13
34
  value: string;
14
35
  __TYPE__: "FieldContent";
@@ -137,9 +158,6 @@ export declare const isSharedSliceContent: (u: unknown) => u is {
137
158
  title?: string;
138
159
  } | null | undefined;
139
160
  });
140
- } | {
141
- type: string;
142
- __TYPE__: "EmptyContent";
143
161
  } | {
144
162
  __TYPE__: "StructuredTextContent";
145
163
  value: (({
@@ -212,7 +230,25 @@ export declare const isSharedSliceContent: (u: unknown) => u is {
212
230
  direction?: string | null | undefined;
213
231
  }) | ({
214
232
  type: "embed";
215
- data: import("../../nestable").EmbedContent;
233
+ data: {
234
+ embed_url: string;
235
+ type: string;
236
+ } & {
237
+ version?: string | number | null;
238
+ title?: string | null | undefined;
239
+ author_name?: string | null | undefined;
240
+ author_url?: string | null | undefined;
241
+ provider_name?: string | null | undefined;
242
+ provider_url?: string | null | undefined;
243
+ cache_age?: string | number | null;
244
+ thumbnail_url?: string | null | undefined;
245
+ thumbnail_width?: number | null | undefined;
246
+ thumbnail_height?: number | null | undefined;
247
+ html?: string | null | undefined;
248
+ } & {
249
+ __TYPE__: "EmbedContent";
250
+ all: unknown;
251
+ };
216
252
  } & {
217
253
  label?: string | null | undefined;
218
254
  direction?: string | null | undefined;
@@ -240,9 +276,30 @@ export declare const isSharedSliceContent: (u: unknown) => u is {
240
276
  items: {
241
277
  __TYPE__: "GroupItemContent";
242
278
  value: [string, {
279
+ type: string;
280
+ __TYPE__: "EmptyContent";
281
+ } | {
243
282
  __TYPE__: "BooleanContent";
244
283
  value: boolean;
245
- } | import("../../nestable").EmbedContent | {
284
+ } | ({
285
+ embed_url: string;
286
+ type: string;
287
+ } & {
288
+ version?: string | number | null;
289
+ title?: string | null | undefined;
290
+ author_name?: string | null | undefined;
291
+ author_url?: string | null | undefined;
292
+ provider_name?: string | null | undefined;
293
+ provider_url?: string | null | undefined;
294
+ cache_age?: string | number | null;
295
+ thumbnail_url?: string | null | undefined;
296
+ thumbnail_width?: number | null | undefined;
297
+ thumbnail_height?: number | null | undefined;
298
+ html?: string | null | undefined;
299
+ } & {
300
+ __TYPE__: "EmbedContent";
301
+ all: unknown;
302
+ }) | {
246
303
  type: "Color";
247
304
  value: string;
248
305
  __TYPE__: "FieldContent";
@@ -371,9 +428,6 @@ export declare const isSharedSliceContent: (u: unknown) => u is {
371
428
  title?: string;
372
429
  } | null | undefined;
373
430
  });
374
- } | {
375
- type: string;
376
- __TYPE__: "EmptyContent";
377
431
  } | {
378
432
  __TYPE__: "StructuredTextContent";
379
433
  value: (({
@@ -446,7 +500,25 @@ export declare const isSharedSliceContent: (u: unknown) => u is {
446
500
  direction?: string | null | undefined;
447
501
  }) | ({
448
502
  type: "embed";
449
- data: import("../../nestable").EmbedContent;
503
+ data: {
504
+ embed_url: string;
505
+ type: string;
506
+ } & {
507
+ version?: string | number | null;
508
+ title?: string | null | undefined;
509
+ author_name?: string | null | undefined;
510
+ author_url?: string | null | undefined;
511
+ provider_name?: string | null | undefined;
512
+ provider_url?: string | null | undefined;
513
+ cache_age?: string | number | null;
514
+ thumbnail_url?: string | null | undefined;
515
+ thumbnail_width?: number | null | undefined;
516
+ thumbnail_height?: number | null | undefined;
517
+ html?: string | null | undefined;
518
+ } & {
519
+ __TYPE__: "EmbedContent";
520
+ all: unknown;
521
+ };
450
522
  } & {
451
523
  label?: string | null | undefined;
452
524
  direction?: string | null | undefined;
@@ -477,9 +549,30 @@ export declare const SharedSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
477
549
  variation: string;
478
550
  primary: {
479
551
  [x: string]: {
552
+ type: string;
553
+ __TYPE__: "EmptyContent";
554
+ } | {
480
555
  __TYPE__: "BooleanContent";
481
556
  value: boolean;
482
- } | import("../../nestable").EmbedContent | {
557
+ } | ({
558
+ embed_url: string;
559
+ type: string;
560
+ } & {
561
+ version?: string | number | null;
562
+ title?: string | null | undefined;
563
+ author_name?: string | null | undefined;
564
+ author_url?: string | null | undefined;
565
+ provider_name?: string | null | undefined;
566
+ provider_url?: string | null | undefined;
567
+ cache_age?: string | number | null;
568
+ thumbnail_url?: string | null | undefined;
569
+ thumbnail_width?: number | null | undefined;
570
+ thumbnail_height?: number | null | undefined;
571
+ html?: string | null | undefined;
572
+ } & {
573
+ __TYPE__: "EmbedContent";
574
+ all: unknown;
575
+ }) | {
483
576
  type: "Color";
484
577
  value: string;
485
578
  __TYPE__: "FieldContent";
@@ -608,9 +701,6 @@ export declare const SharedSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
608
701
  title?: string;
609
702
  } | null | undefined;
610
703
  });
611
- } | {
612
- type: string;
613
- __TYPE__: "EmptyContent";
614
704
  } | {
615
705
  __TYPE__: "StructuredTextContent";
616
706
  value: (({
@@ -683,7 +773,25 @@ export declare const SharedSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
683
773
  direction?: string | null | undefined;
684
774
  }) | ({
685
775
  type: "embed";
686
- data: import("../../nestable").EmbedContent;
776
+ data: {
777
+ embed_url: string;
778
+ type: string;
779
+ } & {
780
+ version?: string | number | null;
781
+ title?: string | null | undefined;
782
+ author_name?: string | null | undefined;
783
+ author_url?: string | null | undefined;
784
+ provider_name?: string | null | undefined;
785
+ provider_url?: string | null | undefined;
786
+ cache_age?: string | number | null;
787
+ thumbnail_url?: string | null | undefined;
788
+ thumbnail_width?: number | null | undefined;
789
+ thumbnail_height?: number | null | undefined;
790
+ html?: string | null | undefined;
791
+ } & {
792
+ __TYPE__: "EmbedContent";
793
+ all: unknown;
794
+ };
687
795
  } & {
688
796
  label?: string | null | undefined;
689
797
  direction?: string | null | undefined;
@@ -711,9 +819,30 @@ export declare const SharedSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
711
819
  items: {
712
820
  __TYPE__: "GroupItemContent";
713
821
  value: [string, {
822
+ type: string;
823
+ __TYPE__: "EmptyContent";
824
+ } | {
714
825
  __TYPE__: "BooleanContent";
715
826
  value: boolean;
716
- } | import("../../nestable").EmbedContent | {
827
+ } | ({
828
+ embed_url: string;
829
+ type: string;
830
+ } & {
831
+ version?: string | number | null;
832
+ title?: string | null | undefined;
833
+ author_name?: string | null | undefined;
834
+ author_url?: string | null | undefined;
835
+ provider_name?: string | null | undefined;
836
+ provider_url?: string | null | undefined;
837
+ cache_age?: string | number | null;
838
+ thumbnail_url?: string | null | undefined;
839
+ thumbnail_width?: number | null | undefined;
840
+ thumbnail_height?: number | null | undefined;
841
+ html?: string | null | undefined;
842
+ } & {
843
+ __TYPE__: "EmbedContent";
844
+ all: unknown;
845
+ }) | {
717
846
  type: "Color";
718
847
  value: string;
719
848
  __TYPE__: "FieldContent";
@@ -842,9 +971,6 @@ export declare const SharedSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
842
971
  title?: string;
843
972
  } | null | undefined;
844
973
  });
845
- } | {
846
- type: string;
847
- __TYPE__: "EmptyContent";
848
974
  } | {
849
975
  __TYPE__: "StructuredTextContent";
850
976
  value: (({
@@ -917,7 +1043,25 @@ export declare const SharedSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
917
1043
  direction?: string | null | undefined;
918
1044
  }) | ({
919
1045
  type: "embed";
920
- data: import("../../nestable").EmbedContent;
1046
+ data: {
1047
+ embed_url: string;
1048
+ type: string;
1049
+ } & {
1050
+ version?: string | number | null;
1051
+ title?: string | null | undefined;
1052
+ author_name?: string | null | undefined;
1053
+ author_url?: string | null | undefined;
1054
+ provider_name?: string | null | undefined;
1055
+ provider_url?: string | null | undefined;
1056
+ cache_age?: string | number | null;
1057
+ thumbnail_url?: string | null | undefined;
1058
+ thumbnail_width?: number | null | undefined;
1059
+ thumbnail_height?: number | null | undefined;
1060
+ html?: string | null | undefined;
1061
+ } & {
1062
+ __TYPE__: "EmbedContent";
1063
+ all: unknown;
1064
+ };
921
1065
  } & {
922
1066
  label?: string | null | undefined;
923
1067
  direction?: string | null | undefined;
@@ -958,7 +1102,25 @@ export declare const SharedSliceContent: t.ExactC<t.TypeC<{
958
1102
  }>>, t.ExactC<t.TypeC<{
959
1103
  __TYPE__: t.LiteralC<"BooleanContent">;
960
1104
  value: t.BooleanC;
961
- }>>, t.Type<import("../../nestable").EmbedContent, import("../../nestable").EmbedContent, unknown>, t.ExactC<t.TypeC<{
1105
+ }>>, t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
1106
+ embed_url: t.StringC;
1107
+ type: t.StringC;
1108
+ }>, t.PartialC<{
1109
+ version: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
1110
+ title: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1111
+ author_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1112
+ author_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1113
+ provider_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1114
+ provider_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1115
+ cache_age: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
1116
+ thumbnail_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1117
+ thumbnail_width: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
1118
+ thumbnail_height: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
1119
+ html: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1120
+ }>]>>, t.ExactC<t.TypeC<{
1121
+ __TYPE__: t.LiteralC<"EmbedContent">;
1122
+ all: t.UnknownC;
1123
+ }>>]>, t.ExactC<t.TypeC<{
962
1124
  type: t.LiteralC<"Text">;
963
1125
  value: t.Type<string, string, unknown>;
964
1126
  __TYPE__: t.LiteralC<"FieldContent">;
@@ -1197,7 +1359,25 @@ export declare const SharedSliceContent: t.ExactC<t.TypeC<{
1197
1359
  direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1198
1360
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
1199
1361
  type: t.LiteralC<"embed">;
1200
- data: t.Type<import("../../nestable").EmbedContent, import("../../nestable").EmbedContent, unknown>;
1362
+ data: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
1363
+ embed_url: t.StringC;
1364
+ type: t.StringC;
1365
+ }>, t.PartialC<{
1366
+ version: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
1367
+ title: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1368
+ author_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1369
+ author_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1370
+ provider_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1371
+ provider_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1372
+ cache_age: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
1373
+ thumbnail_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1374
+ thumbnail_width: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
1375
+ thumbnail_height: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
1376
+ html: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1377
+ }>]>>, t.ExactC<t.TypeC<{
1378
+ __TYPE__: t.LiteralC<"EmbedContent">;
1379
+ all: t.UnknownC;
1380
+ }>>]>;
1201
1381
  }>, t.PartialC<{
1202
1382
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1203
1383
  direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -1235,7 +1415,25 @@ export declare const SharedSliceContent: t.ExactC<t.TypeC<{
1235
1415
  }>>, t.ExactC<t.TypeC<{
1236
1416
  __TYPE__: t.LiteralC<"BooleanContent">;
1237
1417
  value: t.BooleanC;
1238
- }>>, t.Type<import("../../nestable").EmbedContent, import("../../nestable").EmbedContent, unknown>, t.ExactC<t.TypeC<{
1418
+ }>>, t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
1419
+ embed_url: t.StringC;
1420
+ type: t.StringC;
1421
+ }>, t.PartialC<{
1422
+ version: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
1423
+ title: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1424
+ author_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1425
+ author_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1426
+ provider_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1427
+ provider_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1428
+ cache_age: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
1429
+ thumbnail_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1430
+ thumbnail_width: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
1431
+ thumbnail_height: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
1432
+ html: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1433
+ }>]>>, t.ExactC<t.TypeC<{
1434
+ __TYPE__: t.LiteralC<"EmbedContent">;
1435
+ all: t.UnknownC;
1436
+ }>>]>, t.ExactC<t.TypeC<{
1239
1437
  type: t.LiteralC<"Text">;
1240
1438
  value: t.Type<string, string, unknown>;
1241
1439
  __TYPE__: t.LiteralC<"FieldContent">;
@@ -1474,7 +1672,25 @@ export declare const SharedSliceContent: t.ExactC<t.TypeC<{
1474
1672
  direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1475
1673
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
1476
1674
  type: t.LiteralC<"embed">;
1477
- data: t.Type<import("../../nestable").EmbedContent, import("../../nestable").EmbedContent, unknown>;
1675
+ data: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
1676
+ embed_url: t.StringC;
1677
+ type: t.StringC;
1678
+ }>, t.PartialC<{
1679
+ version: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
1680
+ title: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1681
+ author_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1682
+ author_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1683
+ provider_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1684
+ provider_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1685
+ cache_age: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
1686
+ thumbnail_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1687
+ thumbnail_width: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
1688
+ thumbnail_height: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
1689
+ html: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1690
+ }>]>>, t.ExactC<t.TypeC<{
1691
+ __TYPE__: t.LiteralC<"EmbedContent">;
1692
+ all: t.UnknownC;
1693
+ }>>]>;
1478
1694
  }>, t.PartialC<{
1479
1695
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
1480
1696
  direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;