@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,7 +6,25 @@ export declare const SimpleSliceContent: t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
6
6
  }>>, t.ExactC<t.TypeC<{
7
7
  __TYPE__: t.LiteralC<"BooleanContent">;
8
8
  value: t.BooleanC;
9
- }>>, t.Type<import("../../nestable").EmbedContent, import("../../nestable").EmbedContent, unknown>, t.ExactC<t.TypeC<{
9
+ }>>, t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
10
+ embed_url: t.StringC;
11
+ type: t.StringC;
12
+ }>, t.PartialC<{
13
+ version: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
14
+ title: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
15
+ author_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
16
+ author_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
17
+ provider_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
18
+ provider_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
19
+ cache_age: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
20
+ thumbnail_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
21
+ thumbnail_width: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
22
+ thumbnail_height: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
23
+ html: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
24
+ }>]>>, t.ExactC<t.TypeC<{
25
+ __TYPE__: t.LiteralC<"EmbedContent">;
26
+ all: t.UnknownC;
27
+ }>>]>, t.ExactC<t.TypeC<{
10
28
  type: t.LiteralC<"Text">;
11
29
  value: t.Type<string, string, unknown>;
12
30
  __TYPE__: t.LiteralC<"FieldContent">;
@@ -245,7 +263,25 @@ export declare const SimpleSliceContent: t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
245
263
  direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
246
264
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
247
265
  type: t.LiteralC<"embed">;
248
- data: t.Type<import("../../nestable").EmbedContent, import("../../nestable").EmbedContent, unknown>;
266
+ data: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
267
+ embed_url: t.StringC;
268
+ type: t.StringC;
269
+ }>, t.PartialC<{
270
+ version: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
271
+ title: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
272
+ author_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
273
+ author_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
274
+ provider_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
275
+ provider_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
276
+ cache_age: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
277
+ thumbnail_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
278
+ thumbnail_width: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
279
+ thumbnail_height: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
280
+ html: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
281
+ }>]>>, t.ExactC<t.TypeC<{
282
+ __TYPE__: t.LiteralC<"EmbedContent">;
283
+ all: t.UnknownC;
284
+ }>>]>;
249
285
  }>, t.PartialC<{
250
286
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
251
287
  direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -284,7 +320,25 @@ export declare const SimpleSliceContent: t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
284
320
  }>>, t.ExactC<t.TypeC<{
285
321
  __TYPE__: t.LiteralC<"BooleanContent">;
286
322
  value: t.BooleanC;
287
- }>>, t.Type<import("../../nestable").EmbedContent, import("../../nestable").EmbedContent, unknown>, t.ExactC<t.TypeC<{
323
+ }>>, t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
324
+ embed_url: t.StringC;
325
+ type: t.StringC;
326
+ }>, t.PartialC<{
327
+ version: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
328
+ title: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
329
+ author_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
330
+ author_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
331
+ provider_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
332
+ provider_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
333
+ cache_age: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
334
+ thumbnail_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
335
+ thumbnail_width: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
336
+ thumbnail_height: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
337
+ html: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
338
+ }>]>>, t.ExactC<t.TypeC<{
339
+ __TYPE__: t.LiteralC<"EmbedContent">;
340
+ all: t.UnknownC;
341
+ }>>]>, t.ExactC<t.TypeC<{
288
342
  type: t.LiteralC<"Text">;
289
343
  value: t.Type<string, string, unknown>;
290
344
  __TYPE__: t.LiteralC<"FieldContent">;
@@ -523,7 +577,25 @@ export declare const SimpleSliceContent: t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
523
577
  direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
524
578
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
525
579
  type: t.LiteralC<"embed">;
526
- data: t.Type<import("../../nestable").EmbedContent, import("../../nestable").EmbedContent, unknown>;
580
+ data: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
581
+ embed_url: t.StringC;
582
+ type: t.StringC;
583
+ }>, t.PartialC<{
584
+ version: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
585
+ title: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
586
+ author_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
587
+ author_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
588
+ provider_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
589
+ provider_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
590
+ cache_age: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
591
+ thumbnail_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
592
+ thumbnail_width: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
593
+ thumbnail_height: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
594
+ html: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
595
+ }>]>>, t.ExactC<t.TypeC<{
596
+ __TYPE__: t.LiteralC<"EmbedContent">;
597
+ all: t.UnknownC;
598
+ }>>]>;
527
599
  }>, t.PartialC<{
528
600
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
529
601
  direction: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -557,9 +629,30 @@ export declare const SimpleSliceContent: t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
557
629
  }>>]>;
558
630
  export type SimpleSliceContent = t.TypeOf<typeof SimpleSliceContent>;
559
631
  export declare const isSimpleSliceContent: (u: unknown) => u is {
632
+ type: string;
633
+ __TYPE__: "EmptyContent";
634
+ } | {
560
635
  __TYPE__: "BooleanContent";
561
636
  value: boolean;
562
- } | import("../../nestable").EmbedContent | {
637
+ } | ({
638
+ embed_url: string;
639
+ type: string;
640
+ } & {
641
+ version?: string | number | null;
642
+ title?: string | null | undefined;
643
+ author_name?: string | null | undefined;
644
+ author_url?: string | null | undefined;
645
+ provider_name?: string | null | undefined;
646
+ provider_url?: string | null | undefined;
647
+ cache_age?: string | number | null;
648
+ thumbnail_url?: string | null | undefined;
649
+ thumbnail_width?: number | null | undefined;
650
+ thumbnail_height?: number | null | undefined;
651
+ html?: string | null | undefined;
652
+ } & {
653
+ __TYPE__: "EmbedContent";
654
+ all: unknown;
655
+ }) | {
563
656
  type: "Color";
564
657
  value: string;
565
658
  __TYPE__: "FieldContent";
@@ -688,9 +781,6 @@ export declare const isSimpleSliceContent: (u: unknown) => u is {
688
781
  title?: string;
689
782
  } | null | undefined;
690
783
  });
691
- } | {
692
- type: string;
693
- __TYPE__: "EmptyContent";
694
784
  } | {
695
785
  __TYPE__: "StructuredTextContent";
696
786
  value: (({
@@ -763,7 +853,25 @@ export declare const isSimpleSliceContent: (u: unknown) => u is {
763
853
  direction?: string | null | undefined;
764
854
  }) | ({
765
855
  type: "embed";
766
- data: import("../../nestable").EmbedContent;
856
+ data: {
857
+ embed_url: string;
858
+ type: string;
859
+ } & {
860
+ version?: string | number | null;
861
+ title?: string | null | undefined;
862
+ author_name?: string | null | undefined;
863
+ author_url?: string | null | undefined;
864
+ provider_name?: string | null | undefined;
865
+ provider_url?: string | null | undefined;
866
+ cache_age?: string | number | null;
867
+ thumbnail_url?: string | null | undefined;
868
+ thumbnail_width?: number | null | undefined;
869
+ thumbnail_height?: number | null | undefined;
870
+ html?: string | null | undefined;
871
+ } & {
872
+ __TYPE__: "EmbedContent";
873
+ all: unknown;
874
+ };
767
875
  } & {
768
876
  label?: string | null | undefined;
769
877
  direction?: string | null | undefined;
@@ -791,9 +899,30 @@ export declare const isSimpleSliceContent: (u: unknown) => u is {
791
899
  value: {
792
900
  __TYPE__: "GroupItemContent";
793
901
  value: [string, {
902
+ type: string;
903
+ __TYPE__: "EmptyContent";
904
+ } | {
794
905
  __TYPE__: "BooleanContent";
795
906
  value: boolean;
796
- } | import("../../nestable").EmbedContent | {
907
+ } | ({
908
+ embed_url: string;
909
+ type: string;
910
+ } & {
911
+ version?: string | number | null;
912
+ title?: string | null | undefined;
913
+ author_name?: string | null | undefined;
914
+ author_url?: string | null | undefined;
915
+ provider_name?: string | null | undefined;
916
+ provider_url?: string | null | undefined;
917
+ cache_age?: string | number | null;
918
+ thumbnail_url?: string | null | undefined;
919
+ thumbnail_width?: number | null | undefined;
920
+ thumbnail_height?: number | null | undefined;
921
+ html?: string | null | undefined;
922
+ } & {
923
+ __TYPE__: "EmbedContent";
924
+ all: unknown;
925
+ }) | {
797
926
  type: "Color";
798
927
  value: string;
799
928
  __TYPE__: "FieldContent";
@@ -922,9 +1051,6 @@ export declare const isSimpleSliceContent: (u: unknown) => u is {
922
1051
  title?: string;
923
1052
  } | null | undefined;
924
1053
  });
925
- } | {
926
- type: string;
927
- __TYPE__: "EmptyContent";
928
1054
  } | {
929
1055
  __TYPE__: "StructuredTextContent";
930
1056
  value: (({
@@ -997,7 +1123,25 @@ export declare const isSimpleSliceContent: (u: unknown) => u is {
997
1123
  direction?: string | null | undefined;
998
1124
  }) | ({
999
1125
  type: "embed";
1000
- data: import("../../nestable").EmbedContent;
1126
+ data: {
1127
+ embed_url: string;
1128
+ type: string;
1129
+ } & {
1130
+ version?: string | number | null;
1131
+ title?: string | null | undefined;
1132
+ author_name?: string | null | undefined;
1133
+ author_url?: string | null | undefined;
1134
+ provider_name?: string | null | undefined;
1135
+ provider_url?: string | null | undefined;
1136
+ cache_age?: string | number | null;
1137
+ thumbnail_url?: string | null | undefined;
1138
+ thumbnail_width?: number | null | undefined;
1139
+ thumbnail_height?: number | null | undefined;
1140
+ html?: string | null | undefined;
1141
+ } & {
1142
+ __TYPE__: "EmbedContent";
1143
+ all: unknown;
1144
+ };
1001
1145
  } & {
1002
1146
  label?: string | null | undefined;
1003
1147
  direction?: string | null | undefined;
@@ -1025,9 +1169,30 @@ export declare const isSimpleSliceContent: (u: unknown) => u is {
1025
1169
  };
1026
1170
  export declare const SimpleSliceLegacy: (ctx: LegacyContentCtx) => {
1027
1171
  decode: (value: unknown) => import("fp-ts/lib/Either").Left<t.Errors> | import("fp-ts/lib/Either").Right<{
1172
+ type: string;
1173
+ __TYPE__: "EmptyContent";
1174
+ }> | import("fp-ts/lib/Either").Right<{
1028
1175
  __TYPE__: "BooleanContent";
1029
1176
  value: boolean;
1030
- }> | import("fp-ts/lib/Either").Right<import("../../nestable").EmbedContent> | import("fp-ts/lib/Either").Right<{
1177
+ }> | import("fp-ts/lib/Either").Right<{
1178
+ embed_url: string;
1179
+ type: string;
1180
+ } & {
1181
+ version?: string | number | null;
1182
+ title?: string | null | undefined;
1183
+ author_name?: string | null | undefined;
1184
+ author_url?: string | null | undefined;
1185
+ provider_name?: string | null | undefined;
1186
+ provider_url?: string | null | undefined;
1187
+ cache_age?: string | number | null;
1188
+ thumbnail_url?: string | null | undefined;
1189
+ thumbnail_width?: number | null | undefined;
1190
+ thumbnail_height?: number | null | undefined;
1191
+ html?: string | null | undefined;
1192
+ } & {
1193
+ __TYPE__: "EmbedContent";
1194
+ all: unknown;
1195
+ }> | import("fp-ts/lib/Either").Right<{
1031
1196
  type: "Color";
1032
1197
  value: string;
1033
1198
  __TYPE__: "FieldContent";
@@ -1156,9 +1321,6 @@ export declare const SimpleSliceLegacy: (ctx: LegacyContentCtx) => {
1156
1321
  title?: string;
1157
1322
  } | null | undefined;
1158
1323
  });
1159
- }> | import("fp-ts/lib/Either").Right<{
1160
- type: string;
1161
- __TYPE__: "EmptyContent";
1162
1324
  }> | import("fp-ts/lib/Either").Right<{
1163
1325
  __TYPE__: "StructuredTextContent";
1164
1326
  value: (({
@@ -1231,7 +1393,25 @@ export declare const SimpleSliceLegacy: (ctx: LegacyContentCtx) => {
1231
1393
  direction?: string | null | undefined;
1232
1394
  }) | ({
1233
1395
  type: "embed";
1234
- data: import("../../nestable").EmbedContent;
1396
+ data: {
1397
+ embed_url: string;
1398
+ type: string;
1399
+ } & {
1400
+ version?: string | number | null;
1401
+ title?: string | null | undefined;
1402
+ author_name?: string | null | undefined;
1403
+ author_url?: string | null | undefined;
1404
+ provider_name?: string | null | undefined;
1405
+ provider_url?: string | null | undefined;
1406
+ cache_age?: string | number | null;
1407
+ thumbnail_url?: string | null | undefined;
1408
+ thumbnail_width?: number | null | undefined;
1409
+ thumbnail_height?: number | null | undefined;
1410
+ html?: string | null | undefined;
1411
+ } & {
1412
+ __TYPE__: "EmbedContent";
1413
+ all: unknown;
1414
+ };
1235
1415
  } & {
1236
1416
  label?: string | null | undefined;
1237
1417
  direction?: string | null | undefined;