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

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 (34) hide show
  1. package/lib/content/Document.d.ts +8 -8
  2. package/lib/content/fields/GroupContent.d.ts +8 -8
  3. package/lib/content/fields/GroupContent.js +14 -32
  4. package/lib/content/fields/WidgetContent.d.ts +8 -8
  5. package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +4 -4
  6. package/lib/content/fields/slices/Slice/CompositeSliceContent.js +0 -3
  7. package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +3 -2
  8. package/lib/content/fields/slices/Slice/RepeatableContent.js +4 -1
  9. package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +4 -4
  10. package/lib/content/fields/slices/Slice/SharedSliceContent.js +0 -2
  11. package/lib/content/fields/slices/Slice/SimpleSliceContent.js +0 -1
  12. package/lib/content/fields/slices/Slice/index.d.ts +6 -6
  13. package/lib/content/fields/slices/SliceItem.d.ts +6 -6
  14. package/lib/content/fields/slices/SlicesContent.d.ts +8 -8
  15. package/lib/customtypes/CustomType.d.ts +2042 -690
  16. package/lib/customtypes/Section.d.ts +2028 -676
  17. package/lib/customtypes/diff/SharedSlice.d.ts +678 -2
  18. package/lib/customtypes/diff/Variation.d.ts +678 -3
  19. package/lib/customtypes/widgets/Group.d.ts +996 -15
  20. package/lib/customtypes/widgets/Group.js +15 -27
  21. package/lib/customtypes/widgets/Widget.d.ts +1684 -7
  22. package/lib/customtypes/widgets/slices/LegacySlice.d.ts +168 -2
  23. package/lib/customtypes/widgets/slices/LegacySlice.js +1 -1
  24. package/lib/customtypes/widgets/slices/SharedSlice.d.ts +670 -2
  25. package/lib/customtypes/widgets/slices/SlicePrimaryWidget.d.ts +674 -3
  26. package/lib/customtypes/widgets/slices/Slices.d.ts +1522 -7
  27. package/package.json +1 -1
  28. package/src/content/fields/GroupContent.ts +24 -48
  29. package/src/content/fields/slices/Slice/CompositeSliceContent.ts +4 -7
  30. package/src/content/fields/slices/Slice/RepeatableContent.ts +9 -2
  31. package/src/content/fields/slices/Slice/SharedSliceContent.ts +3 -5
  32. package/src/content/fields/slices/Slice/SimpleSliceContent.ts +1 -3
  33. package/src/customtypes/widgets/Group.ts +34 -61
  34. package/src/customtypes/widgets/slices/LegacySlice.ts +2 -2
@@ -1,5 +1,4 @@
1
1
  import * as t from "io-ts";
2
- import { Group } from "../Group";
3
2
  import type { DynamicSlice, StaticSlice } from "./Slice";
4
3
  export declare const LegacySlice: t.UnionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
5
4
  type: t.LiteralC<"Color">;
@@ -157,6 +156,173 @@ export declare const LegacySlice: t.UnionC<[t.UnionC<[t.ExactC<t.IntersectionC<[
157
156
  placeholder: t.StringC;
158
157
  catalog: t.StringC;
159
158
  }>>;
160
- }>]>>]>, t.Type<Group, Group, unknown>]>;
159
+ }>]>>]>, t.ExactC<t.IntersectionC<[t.TypeC<{
160
+ type: t.LiteralC<"Group">;
161
+ }>, t.PartialC<{
162
+ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
163
+ icon: t.StringC;
164
+ description: t.StringC;
165
+ config: t.ExactC<t.PartialC<{
166
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
167
+ repeat: t.BooleanC;
168
+ fields: t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
169
+ type: t.LiteralC<"Color">;
170
+ }>, t.PartialC<{
171
+ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
172
+ config: t.ExactC<t.PartialC<{
173
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
174
+ placeholder: t.StringC;
175
+ }>>;
176
+ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
177
+ type: t.LiteralC<"Boolean">;
178
+ }>, t.PartialC<{
179
+ config: t.ExactC<t.PartialC<{
180
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
181
+ default_value: t.BooleanC;
182
+ placeholder_true: t.StringC;
183
+ placeholder_false: t.StringC;
184
+ }>>;
185
+ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
186
+ type: t.LiteralC<"Embed">;
187
+ }>, t.PartialC<{
188
+ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
189
+ config: t.ExactC<t.PartialC<{
190
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
191
+ placeholder: t.StringC;
192
+ useAsTitle: t.BooleanC;
193
+ }>>;
194
+ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
195
+ type: t.LiteralC<"GeoPoint">;
196
+ }>, t.PartialC<{
197
+ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
198
+ config: t.ExactC<t.PartialC<{
199
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
200
+ }>>;
201
+ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
202
+ type: t.LiteralC<"Date">;
203
+ }>, t.PartialC<{
204
+ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
205
+ config: t.ExactC<t.PartialC<{
206
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
207
+ placeholder: t.StringC;
208
+ default: t.StringC;
209
+ }>>;
210
+ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
211
+ type: t.LiteralC<"Number">;
212
+ }>, t.PartialC<{
213
+ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
214
+ config: t.ExactC<t.PartialC<{
215
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
216
+ placeholder: t.StringC;
217
+ min: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
218
+ max: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
219
+ step: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
220
+ }>>;
221
+ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
222
+ type: t.LiteralC<"Range">;
223
+ }>, t.PartialC<{
224
+ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
225
+ config: t.ExactC<t.PartialC<{
226
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
227
+ placeholder: t.StringC;
228
+ min: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
229
+ max: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
230
+ step: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
231
+ }>>;
232
+ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
233
+ type: t.LiteralC<"StructuredText">;
234
+ }>, t.PartialC<{
235
+ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
236
+ config: t.ExactC<t.PartialC<{
237
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
238
+ placeholder: t.StringC;
239
+ useAsTitle: t.BooleanC;
240
+ single: t.Type<string, string, unknown>;
241
+ multi: t.Type<string, string, unknown>;
242
+ imageConstraint: t.PartialC<{
243
+ width: t.Type<number | null, unknown, unknown>;
244
+ height: t.Type<number | null, unknown, unknown>;
245
+ }>;
246
+ labels: t.Type<readonly string[], object, unknown>;
247
+ allowTargetBlank: t.BooleanC;
248
+ }>>;
249
+ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
250
+ type: t.LiteralC<"Select">;
251
+ }>, t.PartialC<{
252
+ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
253
+ config: t.ExactC<t.PartialC<{
254
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
255
+ placeholder: t.StringC;
256
+ default_value: t.StringC;
257
+ options: t.ReadonlyArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
258
+ }>>;
259
+ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
260
+ type: t.LiteralC<"Separator">;
261
+ }>, t.PartialC<{
262
+ config: t.ExactC<t.PartialC<{
263
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
264
+ }>>;
265
+ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
266
+ type: t.LiteralC<"Text">;
267
+ }>, t.PartialC<{
268
+ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
269
+ config: t.ExactC<t.PartialC<{
270
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
271
+ useAsTitle: t.BooleanC;
272
+ placeholder: t.StringC;
273
+ }>>;
274
+ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
275
+ type: t.LiteralC<"Timestamp">;
276
+ }>, t.PartialC<{
277
+ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
278
+ config: t.ExactC<t.PartialC<{
279
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
280
+ placeholder: t.StringC;
281
+ default: t.StringC;
282
+ }>>;
283
+ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
284
+ type: t.LiteralC<"Link">;
285
+ }>, t.PartialC<{
286
+ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
287
+ config: t.ExactC<t.PartialC<{
288
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
289
+ useAsTitle: t.BooleanC;
290
+ placeholder: t.StringC;
291
+ select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
292
+ customtypes: t.ReadonlyArrayC<t.StringC>;
293
+ masks: t.Type<readonly string[], object, unknown>;
294
+ tags: t.Type<readonly string[], object, unknown>;
295
+ allowTargetBlank: t.BooleanC;
296
+ }>>;
297
+ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
298
+ type: t.LiteralC<"Image">;
299
+ }>, t.PartialC<{
300
+ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
301
+ config: t.ExactC<t.PartialC<{
302
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
303
+ placeholder: t.StringC;
304
+ constraint: t.PartialC<{
305
+ width: t.Type<number | null, unknown, unknown>;
306
+ height: t.Type<number | null, unknown, unknown>;
307
+ }>;
308
+ thumbnails: t.ReadonlyArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
309
+ name: t.StringC;
310
+ }>, t.PartialC<{
311
+ width: t.Type<number | null, unknown, unknown>;
312
+ height: t.Type<number | null, unknown, unknown>;
313
+ }>]>>>;
314
+ }>>;
315
+ }>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
316
+ type: t.LiteralC<"IntegrationFields">;
317
+ }>, t.PartialC<{
318
+ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
319
+ config: t.ExactC<t.PartialC<{
320
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
321
+ placeholder: t.StringC;
322
+ catalog: t.StringC;
323
+ }>>;
324
+ }>]>>]>>;
325
+ }>>;
326
+ }>]>>]>;
161
327
  export declare type LegacySlice = t.TypeOf<typeof LegacySlice>;
162
328
  export declare function isLegacySlice(slice: DynamicSlice | StaticSlice): slice is LegacySlice;
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const t = (0, tslib_1.__importStar)(require("io-ts"));
6
6
  const Group_1 = require("../Group");
7
7
  const NestableWidget_1 = require("../nestable/NestableWidget");
8
- exports.LegacySlice = t.union([NestableWidget_1.NestableWidget, Group_1.Group]);
8
+ exports.LegacySlice = t.union([NestableWidget_1.NestableWidget, Group_1.NestedGroup]);
9
9
  function isLegacySlice(slice) {
10
10
  return slice.type !== "Slice" && slice.type !== "SharedSlice";
11
11
  }