@prismicio/types-internal 0.3.0 → 1.0.0-alpha.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.
Files changed (48) hide show
  1. package/lib/customtypes/CustomType.d.ts +309 -311
  2. package/lib/customtypes/Section.d.ts +309 -309
  3. package/lib/customtypes/widgets/Group.d.ts +22 -23
  4. package/lib/customtypes/widgets/UID.d.ts +1 -2
  5. package/lib/customtypes/widgets/Widget.d.ts +353 -354
  6. package/lib/customtypes/widgets/WidgetTypes.d.ts +21 -21
  7. package/lib/customtypes/widgets/WidgetTypes.js +21 -22
  8. package/lib/customtypes/widgets/nestable/BooleanField.d.ts +1 -2
  9. package/lib/customtypes/widgets/nestable/Color.d.ts +1 -2
  10. package/lib/customtypes/widgets/nestable/Date.d.ts +1 -2
  11. package/lib/customtypes/widgets/nestable/Embed.d.ts +1 -2
  12. package/lib/customtypes/widgets/nestable/GeoPoint.d.ts +1 -2
  13. package/lib/customtypes/widgets/nestable/Image.d.ts +2 -3
  14. package/lib/customtypes/widgets/nestable/Image.js +1 -1
  15. package/lib/customtypes/widgets/nestable/IntegrationField.d.ts +1 -2
  16. package/lib/customtypes/widgets/nestable/Link.d.ts +4 -5
  17. package/lib/customtypes/widgets/nestable/Link.js +1 -1
  18. package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +21 -21
  19. package/lib/customtypes/widgets/nestable/Number.d.ts +1 -2
  20. package/lib/customtypes/widgets/nestable/Range.d.ts +1 -2
  21. package/lib/customtypes/widgets/nestable/RichText.d.ts +21 -22
  22. package/lib/customtypes/widgets/nestable/RichText.js +36 -37
  23. package/lib/customtypes/widgets/nestable/Select.d.ts +2 -3
  24. package/lib/customtypes/widgets/nestable/Select.js +1 -1
  25. package/lib/customtypes/widgets/nestable/Separator.d.ts +1 -2
  26. package/lib/customtypes/widgets/nestable/Text.d.ts +1 -2
  27. package/lib/customtypes/widgets/nestable/Timestamp.d.ts +1 -2
  28. package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +43 -44
  29. package/lib/customtypes/widgets/slices/LegacySlice.d.ts +43 -43
  30. package/lib/customtypes/widgets/slices/SharedSlice.d.ts +86 -87
  31. package/lib/customtypes/widgets/slices/SharedSlice.js +1 -1
  32. package/lib/customtypes/widgets/slices/SharedSliceRef.d.ts +1 -2
  33. package/lib/customtypes/widgets/slices/Slices.d.ts +529 -531
  34. package/lib/customtypes/widgets/slices/Slices.js +1 -1
  35. package/lib/customtypes/widgets/slices/SlicesTypes.d.ts +4 -4
  36. package/lib/customtypes/widgets/slices/SlicesTypes.js +4 -5
  37. package/lib/documents/widgets/nestable/StructuredTextContent/Block.d.ts +16 -17
  38. package/lib/documents/widgets/nestable/StructuredTextContent/Block.js +1 -1
  39. package/package.json +1 -1
  40. package/src/customtypes/widgets/WidgetTypes.ts +21 -21
  41. package/src/customtypes/widgets/nestable/Image.ts +1 -1
  42. package/src/customtypes/widgets/nestable/Link.ts +3 -3
  43. package/src/customtypes/widgets/nestable/RichText.ts +34 -34
  44. package/src/customtypes/widgets/nestable/Select.ts +3 -1
  45. package/src/customtypes/widgets/slices/SharedSlice.ts +1 -1
  46. package/src/customtypes/widgets/slices/Slices.ts +1 -1
  47. package/src/customtypes/widgets/slices/SlicesTypes.ts +4 -4
  48. package/src/documents/widgets/nestable/StructuredTextContent/Block.ts +1 -1
@@ -1,7 +1,6 @@
1
1
  import * as t from "io-ts";
2
- import WidgetTypes from "./WidgetTypes";
3
2
  declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
4
- type: t.LiteralC<WidgetTypes.Group>;
3
+ type: t.LiteralC<"Group">;
5
4
  }>, t.PartialC<{
6
5
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
7
6
  icon: t.StringC;
@@ -10,7 +9,7 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
10
9
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
11
10
  repeat: t.BooleanC;
12
11
  fields: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
13
- type: t.LiteralC<WidgetTypes.Color>;
12
+ type: t.LiteralC<"Color">;
14
13
  }>, t.PartialC<{
15
14
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
16
15
  config: t.ExactC<t.PartialC<{
@@ -18,7 +17,7 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
18
17
  placeholder: t.StringC;
19
18
  }>>;
20
19
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
21
- type: t.LiteralC<WidgetTypes.BooleanField>;
20
+ type: t.LiteralC<"Boolean">;
22
21
  }>, t.PartialC<{
23
22
  config: t.ExactC<t.PartialC<{
24
23
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
@@ -27,7 +26,7 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
27
26
  placeholder_false: t.StringC;
28
27
  }>>;
29
28
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
30
- type: t.LiteralC<WidgetTypes.Embed>;
29
+ type: t.LiteralC<"Embed">;
31
30
  }>, t.PartialC<{
32
31
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
33
32
  config: t.ExactC<t.PartialC<{
@@ -36,14 +35,14 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
36
35
  useAsTitle: t.BooleanC;
37
36
  }>>;
38
37
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
39
- type: t.LiteralC<WidgetTypes.GeoPoint>;
38
+ type: t.LiteralC<"GeoPoint">;
40
39
  }>, t.PartialC<{
41
40
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
42
41
  config: t.ExactC<t.PartialC<{
43
42
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
44
43
  }>>;
45
44
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
46
- type: t.LiteralC<WidgetTypes.Date>;
45
+ type: t.LiteralC<"Date">;
47
46
  }>, t.PartialC<{
48
47
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
49
48
  config: t.ExactC<t.PartialC<{
@@ -52,7 +51,7 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
52
51
  default: t.StringC;
53
52
  }>>;
54
53
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
55
- type: t.LiteralC<WidgetTypes.Number>;
54
+ type: t.LiteralC<"Number">;
56
55
  }>, t.PartialC<{
57
56
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
58
57
  config: t.ExactC<t.PartialC<{
@@ -63,7 +62,7 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
63
62
  step: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
64
63
  }>>;
65
64
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
66
- type: t.LiteralC<WidgetTypes.Range>;
65
+ type: t.LiteralC<"Range">;
67
66
  }>, t.PartialC<{
68
67
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
69
68
  config: t.ExactC<t.PartialC<{
@@ -74,7 +73,7 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
74
73
  step: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
75
74
  }>>;
76
75
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
77
- type: t.LiteralC<WidgetTypes.RichText>;
76
+ type: t.LiteralC<"StructuredText">;
78
77
  }>, t.PartialC<{
79
78
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
80
79
  config: t.ExactC<t.PartialC<{
@@ -87,27 +86,27 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
87
86
  width: t.Type<number | null, unknown, unknown>;
88
87
  height: t.Type<number | null, unknown, unknown>;
89
88
  }>;
90
- labels: t.Type<string[], object, unknown>;
89
+ labels: t.Type<readonly string[], object, unknown>;
91
90
  allowTargetBlank: t.BooleanC;
92
91
  }>>;
93
92
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
94
- type: t.LiteralC<WidgetTypes.Select>;
93
+ type: t.LiteralC<"Select">;
95
94
  }>, t.PartialC<{
96
95
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
97
96
  config: t.ExactC<t.PartialC<{
98
97
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
99
98
  placeholder: t.StringC;
100
99
  default_value: t.StringC;
101
- options: t.ArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
100
+ options: t.ReadonlyArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
102
101
  }>>;
103
102
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
104
- type: t.LiteralC<WidgetTypes.Separator>;
103
+ type: t.LiteralC<"Separator">;
105
104
  }>, t.PartialC<{
106
105
  config: t.ExactC<t.PartialC<{
107
106
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
108
107
  }>>;
109
108
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
110
- type: t.LiteralC<WidgetTypes.Text>;
109
+ type: t.LiteralC<"Text">;
111
110
  }>, t.PartialC<{
112
111
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
113
112
  config: t.ExactC<t.PartialC<{
@@ -116,7 +115,7 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
116
115
  placeholder: t.StringC;
117
116
  }>>;
118
117
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
119
- type: t.LiteralC<WidgetTypes.Timestamp>;
118
+ type: t.LiteralC<"Timestamp">;
120
119
  }>, t.PartialC<{
121
120
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
122
121
  config: t.ExactC<t.PartialC<{
@@ -125,7 +124,7 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
125
124
  default: t.StringC;
126
125
  }>>;
127
126
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
128
- type: t.LiteralC<WidgetTypes.Link>;
127
+ type: t.LiteralC<"Link">;
129
128
  }>, t.PartialC<{
130
129
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
131
130
  config: t.ExactC<t.PartialC<{
@@ -133,13 +132,13 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
133
132
  useAsTitle: t.BooleanC;
134
133
  placeholder: t.StringC;
135
134
  select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
136
- customtypes: t.ArrayC<t.StringC>;
137
- masks: t.Type<string[], object, unknown>;
138
- tags: t.Type<string[], object, unknown>;
135
+ customtypes: t.ReadonlyArrayC<t.StringC>;
136
+ masks: t.Type<readonly string[], object, unknown>;
137
+ tags: t.Type<readonly string[], object, unknown>;
139
138
  allowTargetBlank: t.BooleanC;
140
139
  }>>;
141
140
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
142
- type: t.LiteralC<WidgetTypes.Image>;
141
+ type: t.LiteralC<"Image">;
143
142
  }>, t.PartialC<{
144
143
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
145
144
  config: t.ExactC<t.PartialC<{
@@ -149,7 +148,7 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
149
148
  width: t.Type<number | null, unknown, unknown>;
150
149
  height: t.Type<number | null, unknown, unknown>;
151
150
  }>;
152
- thumbnails: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
151
+ thumbnails: t.ReadonlyArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
153
152
  name: t.StringC;
154
153
  }>, t.PartialC<{
155
154
  width: t.Type<number | null, unknown, unknown>;
@@ -157,7 +156,7 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
157
156
  }>]>>>;
158
157
  }>>;
159
158
  }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
160
- type: t.LiteralC<WidgetTypes.IntegrationField>;
159
+ type: t.LiteralC<"IntegrationFields">;
161
160
  }>, t.PartialC<{
162
161
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
163
162
  config: t.ExactC<t.PartialC<{
@@ -1,7 +1,6 @@
1
1
  import * as t from "io-ts";
2
- import WidgetTypes from "./WidgetTypes";
3
2
  declare const UID: t.ExactC<t.IntersectionC<[t.TypeC<{
4
- type: t.LiteralC<WidgetTypes.UID>;
3
+ type: t.LiteralC<"UID">;
5
4
  }>, t.PartialC<{
6
5
  fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
7
6
  config: t.ExactC<t.PartialC<{