@prismicio/types-internal 2.5.0-alpha.0 → 2.5.0-alpha.2

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 (50) hide show
  1. package/lib/content/Document.d.ts +3972 -7926
  2. package/lib/content/fields/GroupContent.d.ts +17 -1754
  3. package/lib/content/fields/GroupContent.js +62 -22
  4. package/lib/content/fields/WidgetContent.d.ts +3371 -7324
  5. package/lib/content/fields/nestable/NestableContent.d.ts +3 -145
  6. package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +4 -212
  7. package/lib/content/fields/nestable/RichTextContent/Blocks.js +2 -0
  8. package/lib/content/fields/nestable/RichTextContent/index.d.ts +4 -184
  9. package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +6 -290
  10. package/lib/content/fields/slices/Slice/CompositeSliceContent.js +3 -0
  11. package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +2 -383
  12. package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +15 -1333
  13. package/lib/content/fields/slices/Slice/SharedSliceContent.js +2 -0
  14. package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +7 -1182
  15. package/lib/content/fields/slices/Slice/SimpleSliceContent.js +1 -0
  16. package/lib/content/fields/slices/Slice/SlicePrimaryContent.d.ts +7 -1182
  17. package/lib/content/fields/slices/Slice/index.d.ts +983 -2935
  18. package/lib/content/fields/slices/SliceItem.d.ts +148 -2100
  19. package/lib/content/fields/slices/SlicesContent.d.ts +866 -3644
  20. package/lib/content/fields/withDefaultValues.d.ts +4 -3
  21. package/lib/content/fields/withDefaultValues.js +17 -1
  22. package/lib/customtypes/CustomType.d.ts +70 -915
  23. package/lib/customtypes/Section.d.ts +70 -915
  24. package/lib/customtypes/diff/SharedSlice.d.ts +2 -340
  25. package/lib/customtypes/diff/Variation.d.ts +4 -351
  26. package/lib/customtypes/diff/Variation.js +4 -3
  27. package/lib/customtypes/diff/Widgets.d.ts +11 -0
  28. package/lib/customtypes/diff/Widgets.js +2 -0
  29. package/lib/customtypes/diff/index.d.ts +1 -0
  30. package/lib/customtypes/diff/index.js +1 -0
  31. package/lib/customtypes/widgets/Group.d.ts +15 -331
  32. package/lib/customtypes/widgets/Group.js +25 -5
  33. package/lib/customtypes/widgets/Widget.d.ts +7 -1014
  34. package/lib/customtypes/widgets/slices/LegacySlice.d.ts +2 -168
  35. package/lib/customtypes/widgets/slices/SharedSlice.d.ts +2 -336
  36. package/lib/customtypes/widgets/slices/SlicePrimaryWidget.d.ts +3 -338
  37. package/lib/customtypes/widgets/slices/Slices.d.ts +7 -1184
  38. package/lib/validators/function.js +8 -1
  39. package/package.json +5 -5
  40. package/src/content/fields/GroupContent.ts +107 -32
  41. package/src/content/fields/nestable/RichTextContent/Blocks.ts +3 -1
  42. package/src/content/fields/slices/Slice/CompositeSliceContent.ts +7 -4
  43. package/src/content/fields/slices/Slice/SharedSliceContent.ts +5 -3
  44. package/src/content/fields/slices/Slice/SimpleSliceContent.ts +3 -1
  45. package/src/content/fields/withDefaultValues.ts +27 -3
  46. package/src/customtypes/diff/Variation.ts +9 -20
  47. package/src/customtypes/diff/Widgets.ts +17 -0
  48. package/src/customtypes/diff/index.ts +1 -0
  49. package/src/customtypes/widgets/Group.ts +66 -20
  50. package/src/validators/function.ts +11 -1
@@ -1,4 +1,5 @@
1
1
  import * as t from "io-ts";
2
+ import { Group } from "../Group";
2
3
  export declare const SlicePrimaryWidget: t.UnionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
3
4
  type: t.LiteralC<"Color">;
4
5
  }>, t.PartialC<{
@@ -155,174 +156,7 @@ export declare const SlicePrimaryWidget: t.UnionC<[t.UnionC<[t.ExactC<t.Intersec
155
156
  placeholder: t.StringC;
156
157
  catalog: t.StringC;
157
158
  }>>;
158
- }>]>>]>, t.ExactC<t.IntersectionC<[t.TypeC<{
159
- type: t.LiteralC<"Group">;
160
- }>, t.PartialC<{
161
- fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
162
- icon: t.StringC;
163
- description: t.StringC;
164
- config: t.ExactC<t.PartialC<{
165
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
166
- repeat: t.BooleanC;
167
- fields: t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
168
- type: t.LiteralC<"Color">;
169
- }>, t.PartialC<{
170
- fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
171
- config: t.ExactC<t.PartialC<{
172
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
173
- placeholder: t.StringC;
174
- }>>;
175
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
176
- type: t.LiteralC<"Boolean">;
177
- }>, t.PartialC<{
178
- config: t.ExactC<t.PartialC<{
179
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
180
- default_value: t.BooleanC;
181
- placeholder_true: t.StringC;
182
- placeholder_false: t.StringC;
183
- }>>;
184
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
185
- type: t.LiteralC<"Embed">;
186
- }>, t.PartialC<{
187
- fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
188
- config: t.ExactC<t.PartialC<{
189
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
190
- placeholder: t.StringC;
191
- useAsTitle: t.BooleanC;
192
- }>>;
193
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
194
- type: t.LiteralC<"GeoPoint">;
195
- }>, t.PartialC<{
196
- fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
197
- config: t.ExactC<t.PartialC<{
198
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
199
- }>>;
200
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
201
- type: t.LiteralC<"Date">;
202
- }>, t.PartialC<{
203
- fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
204
- config: t.ExactC<t.PartialC<{
205
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
206
- placeholder: t.StringC;
207
- default: t.StringC;
208
- }>>;
209
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
210
- type: t.LiteralC<"Number">;
211
- }>, t.PartialC<{
212
- fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
213
- config: t.ExactC<t.PartialC<{
214
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
215
- placeholder: t.StringC;
216
- min: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
217
- max: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
218
- step: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
219
- }>>;
220
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
221
- type: t.LiteralC<"Range">;
222
- }>, t.PartialC<{
223
- fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
224
- config: t.ExactC<t.PartialC<{
225
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
226
- placeholder: t.StringC;
227
- min: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
228
- max: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
229
- step: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
230
- }>>;
231
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
232
- type: t.LiteralC<"StructuredText">;
233
- }>, t.PartialC<{
234
- fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
235
- config: t.ExactC<t.PartialC<{
236
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
237
- placeholder: t.StringC;
238
- useAsTitle: t.BooleanC;
239
- single: t.Type<string, string, unknown>;
240
- multi: t.Type<string, string, unknown>;
241
- imageConstraint: t.PartialC<{
242
- width: t.Type<number | null, unknown, unknown>;
243
- height: t.Type<number | null, unknown, unknown>;
244
- }>;
245
- labels: t.Type<readonly string[], object, unknown>;
246
- allowTargetBlank: t.BooleanC;
247
- }>>;
248
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
249
- type: t.LiteralC<"Select">;
250
- }>, t.PartialC<{
251
- fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
252
- config: t.ExactC<t.PartialC<{
253
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
254
- placeholder: t.StringC;
255
- default_value: t.StringC;
256
- options: t.ReadonlyArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
257
- }>>;
258
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
259
- type: t.LiteralC<"Separator">;
260
- }>, t.PartialC<{
261
- config: t.ExactC<t.PartialC<{
262
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
263
- }>>;
264
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
265
- type: t.LiteralC<"Text">;
266
- }>, t.PartialC<{
267
- fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
268
- config: t.ExactC<t.PartialC<{
269
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
270
- useAsTitle: t.BooleanC;
271
- placeholder: t.StringC;
272
- }>>;
273
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
274
- type: t.LiteralC<"Timestamp">;
275
- }>, t.PartialC<{
276
- fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
277
- config: t.ExactC<t.PartialC<{
278
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
279
- placeholder: t.StringC;
280
- default: t.StringC;
281
- }>>;
282
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
283
- type: t.LiteralC<"Link">;
284
- }>, t.PartialC<{
285
- fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
286
- config: t.ExactC<t.PartialC<{
287
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
288
- useAsTitle: t.BooleanC;
289
- placeholder: t.StringC;
290
- select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
291
- customtypes: t.ReadonlyArrayC<t.StringC>;
292
- masks: t.Type<readonly string[], object, unknown>;
293
- tags: t.Type<readonly string[], object, unknown>;
294
- allowTargetBlank: t.BooleanC;
295
- }>>;
296
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
297
- type: t.LiteralC<"Image">;
298
- }>, t.PartialC<{
299
- fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
300
- config: t.ExactC<t.PartialC<{
301
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
302
- placeholder: t.StringC;
303
- constraint: t.PartialC<{
304
- width: t.Type<number | null, unknown, unknown>;
305
- height: t.Type<number | null, unknown, unknown>;
306
- }>;
307
- thumbnails: t.ReadonlyArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
308
- name: t.StringC;
309
- }>, t.PartialC<{
310
- width: t.Type<number | null, unknown, unknown>;
311
- height: t.Type<number | null, unknown, unknown>;
312
- }>]>>>;
313
- }>>;
314
- }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
315
- type: t.LiteralC<"IntegrationFields">;
316
- }>, t.PartialC<{
317
- fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
318
- config: t.ExactC<t.PartialC<{
319
- label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
320
- placeholder: t.StringC;
321
- catalog: t.StringC;
322
- }>>;
323
- }>]>>]>>;
324
- }>>;
325
- }>]>>]>;
159
+ }>]>>]>, t.Type<Group, Group, unknown>]>;
326
160
  export declare type SlicePrimaryWidget = t.TypeOf<typeof SlicePrimaryWidget>;
327
161
  export declare type SlicePrimaryFieldTypes = SlicePrimaryWidget["type"];
328
162
  export declare const isSlicePrimaryWidget: (u: unknown) => u is ({
@@ -481,173 +315,4 @@ export declare const isSlicePrimaryWidget: (u: unknown) => u is ({
481
315
  placeholder?: string;
482
316
  default?: string;
483
317
  };
484
- }) | ({
485
- type: "Group";
486
- } & {
487
- fieldset?: string | null | undefined;
488
- icon?: string;
489
- description?: string;
490
- config?: {
491
- label?: string | null | undefined;
492
- repeat?: boolean;
493
- fields?: {
494
- [x: string]: ({
495
- type: "Boolean";
496
- } & {
497
- config?: {
498
- label?: string | null | undefined;
499
- default_value?: boolean;
500
- placeholder_true?: string;
501
- placeholder_false?: string;
502
- };
503
- }) | ({
504
- type: "Color";
505
- } & {
506
- fieldset?: string | null | undefined;
507
- config?: {
508
- label?: string | null | undefined;
509
- placeholder?: string;
510
- };
511
- }) | ({
512
- type: "Date";
513
- } & {
514
- fieldset?: string | null | undefined;
515
- config?: {
516
- label?: string | null | undefined;
517
- placeholder?: string;
518
- default?: string;
519
- };
520
- }) | ({
521
- type: "Embed";
522
- } & {
523
- fieldset?: string | null | undefined;
524
- config?: {
525
- label?: string | null | undefined;
526
- placeholder?: string;
527
- useAsTitle?: boolean;
528
- };
529
- }) | ({
530
- type: "GeoPoint";
531
- } & {
532
- fieldset?: string | null | undefined;
533
- config?: {
534
- label?: string | null | undefined;
535
- };
536
- }) | ({
537
- type: "Image";
538
- } & {
539
- fieldset?: string | null | undefined;
540
- config?: {
541
- label?: string | null | undefined;
542
- placeholder?: string;
543
- constraint?: {
544
- width?: number | null;
545
- height?: number | null;
546
- };
547
- thumbnails?: readonly ({
548
- name: string;
549
- } & {
550
- width?: number | null;
551
- height?: number | null;
552
- })[];
553
- };
554
- }) | ({
555
- type: "IntegrationFields";
556
- } & {
557
- fieldset?: string | null | undefined;
558
- config?: {
559
- label?: string | null | undefined;
560
- placeholder?: string;
561
- catalog?: string;
562
- };
563
- }) | ({
564
- type: "Link";
565
- } & {
566
- fieldset?: string | null | undefined;
567
- config?: {
568
- label?: string | null | undefined;
569
- useAsTitle?: boolean;
570
- placeholder?: string;
571
- select?: "media" | "document" | "web" | null;
572
- customtypes?: readonly string[];
573
- masks?: readonly string[];
574
- tags?: readonly string[];
575
- allowTargetBlank?: boolean;
576
- };
577
- }) | ({
578
- type: "Number";
579
- } & {
580
- fieldset?: string | null | undefined;
581
- config?: {
582
- label?: string | null | undefined;
583
- placeholder?: string;
584
- min?: number;
585
- max?: number;
586
- step?: number;
587
- };
588
- }) | ({
589
- type: "Range";
590
- } & {
591
- fieldset?: string | null | undefined;
592
- config?: {
593
- label?: string | null | undefined;
594
- placeholder?: string;
595
- min?: number;
596
- max?: number;
597
- step?: number;
598
- };
599
- }) | ({
600
- type: "StructuredText";
601
- } & {
602
- fieldset?: string | null | undefined;
603
- config?: {
604
- label?: string | null | undefined;
605
- placeholder?: string;
606
- useAsTitle?: boolean;
607
- single?: string;
608
- multi?: string;
609
- imageConstraint?: {
610
- width?: number | null;
611
- height?: number | null;
612
- };
613
- labels?: readonly string[];
614
- allowTargetBlank?: boolean;
615
- };
616
- }) | ({
617
- type: "Select";
618
- } & {
619
- fieldset?: string | null | undefined;
620
- config?: {
621
- label?: string | null | undefined;
622
- placeholder?: string;
623
- default_value?: string;
624
- options?: readonly string[];
625
- };
626
- }) | ({
627
- type: "Separator";
628
- } & {
629
- config?: {
630
- label?: string | null | undefined;
631
- };
632
- }) | ({
633
- type: "Text";
634
- } & {
635
- fieldset?: string | null | undefined;
636
- config?: {
637
- label?: string | null | undefined;
638
- useAsTitle?: boolean;
639
- placeholder?: string;
640
- };
641
- }) | ({
642
- type: "Timestamp";
643
- } & {
644
- fieldset?: string | null | undefined;
645
- config?: {
646
- label?: string | null | undefined;
647
- placeholder?: string;
648
- default?: string;
649
- };
650
- });
651
- };
652
- };
653
- });
318
+ }) | Group;