@prismicio/types-internal 3.16.0 → 3.16.1-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 (235) hide show
  1. package/lib/content/fields/RepeatableContent.d.ts +51 -123
  2. package/lib/content/fields/RepeatableContent.js +10 -14
  3. package/lib/content/fields/nestable/RichTextContent/Block.d.ts +1036 -0
  4. package/lib/content/fields/nestable/RichTextContent/Block.js +31 -0
  5. package/lib/content/fields/nestable/RichTextContent/EmbedBlock.d.ts +60 -0
  6. package/lib/content/fields/nestable/RichTextContent/EmbedBlock.js +53 -0
  7. package/lib/content/fields/nestable/RichTextContent/ImageBlock.d.ts +203 -0
  8. package/lib/content/fields/nestable/RichTextContent/ImageBlock.js +36 -0
  9. package/lib/content/fields/nestable/RichTextContent/TableBlock.d.ts +500 -0
  10. package/lib/content/fields/nestable/RichTextContent/TableBlock.js +21 -0
  11. package/lib/content/fields/nestable/RichTextContent/TextBlock.d.ts +590 -0
  12. package/lib/content/fields/nestable/RichTextContent/TextBlock.js +80 -0
  13. package/lib/scripts/release.d.ts +1 -0
  14. package/lib/scripts/release.js +34 -0
  15. package/lib/src/_internal/utils.d.ts +36 -0
  16. package/lib/src/_internal/utils.js +20 -0
  17. package/lib/src/common/Asset.d.ts +16 -0
  18. package/lib/src/common/Asset.js +11 -0
  19. package/lib/src/common/Embed.d.ts +15 -0
  20. package/lib/src/common/Embed.js +10 -0
  21. package/lib/src/common/HexaColorCode.d.ts +4 -0
  22. package/lib/src/common/HexaColorCode.js +7 -0
  23. package/lib/src/common/UUID.d.ts +6 -0
  24. package/lib/src/common/UUID.js +8 -0
  25. package/lib/src/common/WidgetKey.d.ts +3 -0
  26. package/lib/src/common/WidgetKey.js +8 -0
  27. package/lib/src/common/index.d.ts +3 -0
  28. package/lib/src/common/index.js +6 -0
  29. package/lib/src/content/Document.d.ts +11803 -0
  30. package/lib/src/content/Document.js +266 -0
  31. package/lib/src/content/LegacyContentCtx.d.ts +64 -0
  32. package/lib/src/content/LegacyContentCtx.js +130 -0
  33. package/lib/src/content/fields/EmptyContent.d.ts +16 -0
  34. package/lib/src/content/fields/EmptyContent.js +30 -0
  35. package/lib/src/content/fields/GroupContent.d.ts +42 -0
  36. package/lib/src/content/fields/GroupContent.js +208 -0
  37. package/lib/src/content/fields/UIDContent.d.ts +16 -0
  38. package/lib/src/content/fields/UIDContent.js +25 -0
  39. package/lib/src/content/fields/WidgetContent.d.ts +11749 -0
  40. package/lib/src/content/fields/WidgetContent.js +57 -0
  41. package/lib/src/content/fields/index.d.ts +6 -0
  42. package/lib/src/content/fields/index.js +9 -0
  43. package/lib/src/content/fields/nestable/BooleanContent.d.ts +18 -0
  44. package/lib/src/content/fields/nestable/BooleanContent.js +35 -0
  45. package/lib/src/content/fields/nestable/EmbedContent.d.ts +78 -0
  46. package/lib/src/content/fields/nestable/EmbedContent.js +56 -0
  47. package/lib/src/content/fields/nestable/FieldContent/ColorContent.d.ts +18 -0
  48. package/lib/src/content/fields/nestable/FieldContent/ColorContent.js +35 -0
  49. package/lib/src/content/fields/nestable/FieldContent/DateContent.d.ts +18 -0
  50. package/lib/src/content/fields/nestable/FieldContent/DateContent.js +35 -0
  51. package/lib/src/content/fields/nestable/FieldContent/NumberContent.d.ts +18 -0
  52. package/lib/src/content/fields/nestable/FieldContent/NumberContent.js +35 -0
  53. package/lib/src/content/fields/nestable/FieldContent/RangeContent.d.ts +18 -0
  54. package/lib/src/content/fields/nestable/FieldContent/RangeContent.js +35 -0
  55. package/lib/src/content/fields/nestable/FieldContent/SelectContent.d.ts +20 -0
  56. package/lib/src/content/fields/nestable/FieldContent/SelectContent.js +46 -0
  57. package/lib/src/content/fields/nestable/FieldContent/TextContent.d.ts +18 -0
  58. package/lib/src/content/fields/nestable/FieldContent/TextContent.js +35 -0
  59. package/lib/src/content/fields/nestable/FieldContent/TimestampContent.d.ts +18 -0
  60. package/lib/src/content/fields/nestable/FieldContent/TimestampContent.js +35 -0
  61. package/lib/src/content/fields/nestable/FieldContent/common.d.ts +1 -0
  62. package/lib/src/content/fields/nestable/FieldContent/common.js +4 -0
  63. package/lib/src/content/fields/nestable/FieldContent/index.d.ts +49 -0
  64. package/lib/src/content/fields/nestable/FieldContent/index.js +38 -0
  65. package/lib/src/content/fields/nestable/GeoPointContent.d.ts +33 -0
  66. package/lib/src/content/fields/nestable/GeoPointContent.js +31 -0
  67. package/lib/src/content/fields/nestable/ImageContent.d.ts +227 -0
  68. package/lib/src/content/fields/nestable/ImageContent.js +73 -0
  69. package/lib/src/content/fields/nestable/IntegrationFieldContent.d.ts +16 -0
  70. package/lib/src/content/fields/nestable/IntegrationFieldContent.js +28 -0
  71. package/lib/src/content/fields/nestable/LinkContent.d.ts +919 -0
  72. package/lib/src/content/fields/nestable/LinkContent.js +399 -0
  73. package/lib/src/content/fields/nestable/NestableContent.d.ts +1953 -0
  74. package/lib/src/content/fields/nestable/NestableContent.js +167 -0
  75. package/lib/src/content/fields/nestable/RepeatableContent.d.ts +176 -0
  76. package/lib/src/content/fields/nestable/RepeatableContent.js +104 -0
  77. package/lib/src/content/fields/nestable/RichTextContent/Blocks.d.ts +1261 -0
  78. package/lib/src/content/fields/nestable/RichTextContent/Blocks.js +170 -0
  79. package/lib/src/content/fields/nestable/RichTextContent/index.d.ts +1004 -0
  80. package/lib/src/content/fields/nestable/RichTextContent/index.js +28 -0
  81. package/lib/src/content/fields/nestable/SeparatorContent.d.ts +13 -0
  82. package/lib/src/content/fields/nestable/SeparatorContent.js +22 -0
  83. package/lib/src/content/fields/nestable/TableContent.d.ts +770 -0
  84. package/lib/src/content/fields/nestable/TableContent.js +121 -0
  85. package/lib/src/content/fields/nestable/index.d.ts +12 -0
  86. package/lib/src/content/fields/nestable/index.js +15 -0
  87. package/lib/src/content/fields/slices/Slice/CompositeSliceContent.d.ts +3934 -0
  88. package/lib/src/content/fields/slices/Slice/CompositeSliceContent.js +195 -0
  89. package/lib/src/content/fields/slices/Slice/RepeatableContent.d.ts +774 -0
  90. package/lib/src/content/fields/slices/Slice/RepeatableContent.js +21 -0
  91. package/lib/src/content/fields/slices/Slice/SharedSliceContent.d.ts +3937 -0
  92. package/lib/src/content/fields/slices/Slice/SharedSliceContent.js +215 -0
  93. package/lib/src/content/fields/slices/Slice/SimpleSliceContent.d.ts +1962 -0
  94. package/lib/src/content/fields/slices/Slice/SimpleSliceContent.js +130 -0
  95. package/lib/src/content/fields/slices/Slice/SlicePrimaryContent.d.ts +1952 -0
  96. package/lib/src/content/fields/slices/Slice/SlicePrimaryContent.js +30 -0
  97. package/lib/src/content/fields/slices/Slice/index.d.ts +6810 -0
  98. package/lib/src/content/fields/slices/Slice/index.js +45 -0
  99. package/lib/src/content/fields/slices/SliceItem.d.ts +6846 -0
  100. package/lib/src/content/fields/slices/SliceItem.js +116 -0
  101. package/lib/src/content/fields/slices/SlicesContent.d.ts +9809 -0
  102. package/lib/src/content/fields/slices/SlicesContent.js +187 -0
  103. package/lib/src/content/fields/slices/index.d.ts +3 -0
  104. package/lib/src/content/fields/slices/index.js +6 -0
  105. package/lib/src/content/fields/withDefaultValues.d.ts +9 -0
  106. package/lib/src/content/fields/withDefaultValues.js +79 -0
  107. package/lib/src/content/index.d.ts +3 -0
  108. package/lib/src/content/index.js +6 -0
  109. package/lib/src/content/utils.d.ts +14 -0
  110. package/lib/src/content/utils.js +33 -0
  111. package/lib/src/customtypes/CustomType.d.ts +3680 -0
  112. package/lib/src/customtypes/CustomType.js +184 -0
  113. package/lib/src/customtypes/Section.d.ts +3635 -0
  114. package/lib/src/customtypes/Section.js +66 -0
  115. package/lib/src/customtypes/diff/Changes.d.ts +17 -0
  116. package/lib/src/customtypes/diff/Changes.js +9 -0
  117. package/lib/src/customtypes/diff/SharedSlice.d.ts +1624 -0
  118. package/lib/src/customtypes/diff/SharedSlice.js +55 -0
  119. package/lib/src/customtypes/diff/Variation.d.ts +1605 -0
  120. package/lib/src/customtypes/diff/Variation.js +113 -0
  121. package/lib/src/customtypes/diff/Widgets.d.ts +11 -0
  122. package/lib/src/customtypes/diff/Widgets.js +2 -0
  123. package/lib/src/customtypes/diff/index.d.ts +4 -0
  124. package/lib/src/customtypes/diff/index.js +7 -0
  125. package/lib/src/customtypes/index.d.ts +4 -0
  126. package/lib/src/customtypes/index.js +7 -0
  127. package/lib/src/customtypes/widgets/Group.d.ts +1352 -0
  128. package/lib/src/customtypes/widgets/Group.js +92 -0
  129. package/lib/src/customtypes/widgets/UID.d.ts +19 -0
  130. package/lib/src/customtypes/widgets/UID.js +21 -0
  131. package/lib/src/customtypes/widgets/Widget.d.ts +4457 -0
  132. package/lib/src/customtypes/widgets/Widget.js +49 -0
  133. package/lib/src/customtypes/widgets/index.d.ts +6 -0
  134. package/lib/src/customtypes/widgets/index.js +9 -0
  135. package/lib/src/customtypes/widgets/nestable/BooleanField.d.ts +20 -0
  136. package/lib/src/customtypes/widgets/nestable/BooleanField.js +21 -0
  137. package/lib/src/customtypes/widgets/nestable/Color.d.ts +17 -0
  138. package/lib/src/customtypes/widgets/nestable/Color.js +20 -0
  139. package/lib/src/customtypes/widgets/nestable/Date.d.ts +19 -0
  140. package/lib/src/customtypes/widgets/nestable/Date.js +21 -0
  141. package/lib/src/customtypes/widgets/nestable/Embed.d.ts +19 -0
  142. package/lib/src/customtypes/widgets/nestable/Embed.js +21 -0
  143. package/lib/src/customtypes/widgets/nestable/GeoPoint.d.ts +15 -0
  144. package/lib/src/customtypes/widgets/nestable/GeoPoint.js +19 -0
  145. package/lib/src/customtypes/widgets/nestable/Image.d.ts +44 -0
  146. package/lib/src/customtypes/widgets/nestable/Image.js +29 -0
  147. package/lib/src/customtypes/widgets/nestable/IntegrationField.d.ts +19 -0
  148. package/lib/src/customtypes/widgets/nestable/IntegrationField.js +21 -0
  149. package/lib/src/customtypes/widgets/nestable/Link.d.ts +196 -0
  150. package/lib/src/customtypes/widgets/nestable/Link.js +167 -0
  151. package/lib/src/customtypes/widgets/nestable/NestableWidget.d.ts +217 -0
  152. package/lib/src/customtypes/widgets/nestable/NestableWidget.js +39 -0
  153. package/lib/src/customtypes/widgets/nestable/Number.d.ts +23 -0
  154. package/lib/src/customtypes/widgets/nestable/Number.js +24 -0
  155. package/lib/src/customtypes/widgets/nestable/Range.d.ts +23 -0
  156. package/lib/src/customtypes/widgets/nestable/Range.js +24 -0
  157. package/lib/src/customtypes/widgets/nestable/RichText.d.ts +73 -0
  158. package/lib/src/customtypes/widgets/nestable/RichText.js +131 -0
  159. package/lib/src/customtypes/widgets/nestable/Select.d.ts +21 -0
  160. package/lib/src/customtypes/widgets/nestable/Select.js +22 -0
  161. package/lib/src/customtypes/widgets/nestable/Separator.d.ts +14 -0
  162. package/lib/src/customtypes/widgets/nestable/Separator.js +18 -0
  163. package/lib/src/customtypes/widgets/nestable/Table.d.ts +21 -0
  164. package/lib/src/customtypes/widgets/nestable/Table.js +30 -0
  165. package/lib/src/customtypes/widgets/nestable/Text.d.ts +19 -0
  166. package/lib/src/customtypes/widgets/nestable/Text.js +21 -0
  167. package/lib/src/customtypes/widgets/nestable/Timestamp.d.ts +19 -0
  168. package/lib/src/customtypes/widgets/nestable/Timestamp.js +21 -0
  169. package/lib/src/customtypes/widgets/nestable/index.d.ts +17 -0
  170. package/lib/src/customtypes/widgets/nestable/index.js +20 -0
  171. package/lib/src/customtypes/widgets/shared/ImageConstraint.d.ts +7 -0
  172. package/lib/src/customtypes/widgets/shared/ImageConstraint.js +31 -0
  173. package/lib/src/customtypes/widgets/shared/index.d.ts +1 -0
  174. package/lib/src/customtypes/widgets/shared/index.js +8 -0
  175. package/lib/src/customtypes/widgets/slices/CompositeSlice.d.ts +455 -0
  176. package/lib/src/customtypes/widgets/slices/CompositeSlice.js +63 -0
  177. package/lib/src/customtypes/widgets/slices/LegacySlice.d.ts +442 -0
  178. package/lib/src/customtypes/widgets/slices/LegacySlice.js +12 -0
  179. package/lib/src/customtypes/widgets/slices/SharedSlice.d.ts +1807 -0
  180. package/lib/src/customtypes/widgets/slices/SharedSlice.js +118 -0
  181. package/lib/src/customtypes/widgets/slices/SharedSliceRef.d.ts +5 -0
  182. package/lib/src/customtypes/widgets/slices/SharedSliceRef.js +9 -0
  183. package/lib/src/customtypes/widgets/slices/Slice.d.ts +6 -0
  184. package/lib/src/customtypes/widgets/slices/Slice.js +2 -0
  185. package/lib/src/customtypes/widgets/slices/SlicePrimaryWidget.d.ts +1259 -0
  186. package/lib/src/customtypes/widgets/slices/SlicePrimaryWidget.js +10 -0
  187. package/lib/src/customtypes/widgets/slices/Slices.d.ts +5917 -0
  188. package/lib/src/customtypes/widgets/slices/Slices.js +146 -0
  189. package/lib/src/customtypes/widgets/slices/SlicesTypes.d.ts +6 -0
  190. package/lib/src/customtypes/widgets/slices/SlicesTypes.js +11 -0
  191. package/lib/src/customtypes/widgets/slices/index.d.ts +8 -0
  192. package/lib/src/customtypes/widgets/slices/index.js +11 -0
  193. package/lib/src/utils/Arrays.d.ts +1 -0
  194. package/lib/src/utils/Arrays.js +13 -0
  195. package/lib/src/utils/DocumentId.d.ts +2 -0
  196. package/lib/src/utils/DocumentId.js +7 -0
  197. package/lib/src/utils/Objects.d.ts +8 -0
  198. package/lib/src/utils/Objects.js +42 -0
  199. package/lib/src/utils/index.d.ts +3 -0
  200. package/lib/src/utils/index.js +7 -0
  201. package/lib/src/validators/BasicTypes.d.ts +10 -0
  202. package/lib/src/validators/BasicTypes.js +25 -0
  203. package/lib/src/validators/DateFromString.d.ts +3 -0
  204. package/lib/src/validators/DateFromString.js +11 -0
  205. package/lib/src/validators/DateFromStringOrNumber.d.ts +3 -0
  206. package/lib/src/validators/DateFromStringOrNumber.js +10 -0
  207. package/lib/src/validators/DateFromTsMs.d.ts +3 -0
  208. package/lib/src/validators/DateFromTsMs.js +10 -0
  209. package/lib/src/validators/DefaultOrElse.d.ts +5 -0
  210. package/lib/src/validators/DefaultOrElse.js +21 -0
  211. package/lib/src/validators/IntFromNumber.d.ts +5 -0
  212. package/lib/src/validators/IntFromNumber.js +14 -0
  213. package/lib/src/validators/IntFromPixels.d.ts +8 -0
  214. package/lib/src/validators/IntFromPixels.js +24 -0
  215. package/lib/src/validators/NonEmptyString.d.ts +3 -0
  216. package/lib/src/validators/NonEmptyString.js +6 -0
  217. package/lib/src/validators/NonEmptyStringOrNull.d.ts +3 -0
  218. package/lib/src/validators/NonEmptyStringOrNull.js +15 -0
  219. package/lib/src/validators/NumberOrNull.d.ts +3 -0
  220. package/lib/src/validators/NumberOrNull.js +6 -0
  221. package/lib/src/validators/NumberRange.d.ts +32 -0
  222. package/lib/src/validators/NumberRange.js +40 -0
  223. package/lib/src/validators/StringFromBoolean.d.ts +5 -0
  224. package/lib/src/validators/StringFromBoolean.js +10 -0
  225. package/lib/src/validators/StringFromNumber.d.ts +5 -0
  226. package/lib/src/validators/StringFromNumber.js +10 -0
  227. package/lib/src/validators/StringOrNull.d.ts +3 -0
  228. package/lib/src/validators/StringOrNull.js +6 -0
  229. package/lib/src/validators/TrimmedString.d.ts +5 -0
  230. package/lib/src/validators/TrimmedString.js +23 -0
  231. package/lib/src/validators/function.d.ts +34 -0
  232. package/lib/src/validators/function.js +100 -0
  233. package/lib/src/validators/index.d.ts +15 -0
  234. package/lib/src/validators/index.js +31 -0
  235. package/package.json +1 -1
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Widgets = exports.FieldType = exports.DynamicWidget = exports.StaticWidget = exports.widgetReader = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
6
+ const Group_1 = require("./Group");
7
+ const nestable_1 = require("./nestable");
8
+ const NestableWidget_1 = require("./nestable/NestableWidget");
9
+ const Slices_1 = require("./slices/Slices");
10
+ const UID_1 = require("./UID");
11
+ function widgetReader(codec) {
12
+ return t.union([UID_1.UID, NestableWidget_1.NestableWidget, Group_1.Group, codec]);
13
+ }
14
+ exports.widgetReader = widgetReader;
15
+ exports.StaticWidget = widgetReader(Slices_1.StaticSlices);
16
+ exports.DynamicWidget = widgetReader(Slices_1.DynamicSlices);
17
+ exports.FieldType = t.keyof({
18
+ [nestable_1.ColorFieldType]: null,
19
+ [nestable_1.BooleanFieldType]: null,
20
+ [nestable_1.NumberFieldType]: null,
21
+ [nestable_1.EmbedFieldType]: null,
22
+ [nestable_1.GeoPointFieldType]: null,
23
+ [nestable_1.DateFieldType]: null,
24
+ [nestable_1.RangeFieldType]: null,
25
+ [nestable_1.RichTextFieldType]: null,
26
+ [nestable_1.SelectFieldType]: null,
27
+ [nestable_1.SeparatorFieldType]: null,
28
+ [nestable_1.TableFieldType]: null,
29
+ [nestable_1.TextFieldType]: null,
30
+ [nestable_1.TimestampFieldType]: null,
31
+ [nestable_1.LinkFieldType]: null,
32
+ [nestable_1.ImageFieldType]: null,
33
+ [nestable_1.IntegrationFieldType]: null,
34
+ [UID_1.UIDFieldType]: null,
35
+ [Group_1.GroupFieldType]: null,
36
+ [Slices_1.SlicesFieldType]: null,
37
+ [Slices_1.LegacySlicesFieldType]: null,
38
+ });
39
+ exports.Widgets = {
40
+ toStatic(widget, sharedSlices) {
41
+ switch (widget.type) {
42
+ case "Choice":
43
+ case "Slices":
44
+ return Slices_1.Slices.toStatic(widget, sharedSlices);
45
+ default:
46
+ return widget;
47
+ }
48
+ },
49
+ };
@@ -0,0 +1,6 @@
1
+ export * from "./Group";
2
+ export * from "./nestable";
3
+ export * from "./shared";
4
+ export * from "./slices";
5
+ export * from "./UID";
6
+ export * from "./Widget";
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ (0, tslib_1.__exportStar)(require("./Group"), exports);
5
+ (0, tslib_1.__exportStar)(require("./nestable"), exports);
6
+ (0, tslib_1.__exportStar)(require("./shared"), exports);
7
+ (0, tslib_1.__exportStar)(require("./slices"), exports);
8
+ (0, tslib_1.__exportStar)(require("./UID"), exports);
9
+ (0, tslib_1.__exportStar)(require("./Widget"), exports);
@@ -0,0 +1,20 @@
1
+ import * as t from "io-ts";
2
+ export declare const BooleanFieldType = "Boolean";
3
+ export declare const BooleanConfig: t.ExactC<t.PartialC<{
4
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
5
+ default_value: t.BooleanC;
6
+ placeholder_true: t.StringC;
7
+ placeholder_false: t.StringC;
8
+ }>>;
9
+ export declare type BooleanConfig = t.TypeOf<typeof BooleanConfig>;
10
+ export declare const BooleanField: t.ExactC<t.IntersectionC<[t.TypeC<{
11
+ type: t.LiteralC<"Boolean">;
12
+ }>, t.PartialC<{
13
+ config: t.ExactC<t.PartialC<{
14
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
15
+ default_value: t.BooleanC;
16
+ placeholder_true: t.StringC;
17
+ placeholder_false: t.StringC;
18
+ }>>;
19
+ }>]>>;
20
+ export declare type BooleanField = t.TypeOf<typeof BooleanField>;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BooleanField = exports.BooleanConfig = exports.BooleanFieldType = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
6
+ const validators_1 = require("../../../validators");
7
+ exports.BooleanFieldType = "Boolean";
8
+ exports.BooleanConfig = t.exact(t.partial({
9
+ label: validators_1.StringOrNull,
10
+ default_value: t.boolean,
11
+ placeholder_true: t.string,
12
+ placeholder_false: t.string,
13
+ }));
14
+ exports.BooleanField = t.exact(t.intersection([
15
+ t.type({
16
+ type: t.literal(exports.BooleanFieldType),
17
+ }),
18
+ t.partial({
19
+ config: exports.BooleanConfig,
20
+ }),
21
+ ]));
@@ -0,0 +1,17 @@
1
+ import * as t from "io-ts";
2
+ export declare const ColorFieldType = "Color";
3
+ export declare const ColorConfig: t.ExactC<t.PartialC<{
4
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
5
+ placeholder: t.StringC;
6
+ }>>;
7
+ export declare type ColorConfig = t.TypeOf<typeof ColorConfig>;
8
+ export declare const Color: t.ExactC<t.IntersectionC<[t.TypeC<{
9
+ type: t.LiteralC<"Color">;
10
+ }>, t.PartialC<{
11
+ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
12
+ config: t.ExactC<t.PartialC<{
13
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
14
+ placeholder: t.StringC;
15
+ }>>;
16
+ }>]>>;
17
+ export declare type Color = t.TypeOf<typeof Color>;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Color = exports.ColorConfig = exports.ColorFieldType = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
6
+ const validators_1 = require("../../../validators");
7
+ exports.ColorFieldType = "Color";
8
+ exports.ColorConfig = t.exact(t.partial({
9
+ label: validators_1.StringOrNull,
10
+ placeholder: t.string,
11
+ }));
12
+ exports.Color = t.exact(t.intersection([
13
+ t.type({
14
+ type: t.literal(exports.ColorFieldType),
15
+ }),
16
+ t.partial({
17
+ fieldset: validators_1.StringOrNull,
18
+ config: exports.ColorConfig,
19
+ }),
20
+ ]));
@@ -0,0 +1,19 @@
1
+ import * as t from "io-ts";
2
+ export declare const DateFieldType = "Date";
3
+ export declare const DateConfig: t.ExactC<t.PartialC<{
4
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
5
+ placeholder: t.StringC;
6
+ default: t.StringC;
7
+ }>>;
8
+ export declare type DateConfig = t.TypeOf<typeof DateConfig>;
9
+ export declare const Date: t.ExactC<t.IntersectionC<[t.TypeC<{
10
+ type: t.LiteralC<"Date">;
11
+ }>, t.PartialC<{
12
+ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
13
+ config: t.ExactC<t.PartialC<{
14
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
15
+ placeholder: t.StringC;
16
+ default: t.StringC;
17
+ }>>;
18
+ }>]>>;
19
+ export declare type Date = t.TypeOf<typeof Date>;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Date = exports.DateConfig = exports.DateFieldType = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
6
+ const validators_1 = require("../../../validators");
7
+ exports.DateFieldType = "Date";
8
+ exports.DateConfig = t.exact(t.partial({
9
+ label: validators_1.StringOrNull,
10
+ placeholder: t.string,
11
+ default: t.string,
12
+ }));
13
+ exports.Date = t.exact(t.intersection([
14
+ t.type({
15
+ type: t.literal(exports.DateFieldType),
16
+ }),
17
+ t.partial({
18
+ fieldset: validators_1.StringOrNull,
19
+ config: exports.DateConfig,
20
+ }),
21
+ ]));
@@ -0,0 +1,19 @@
1
+ import * as t from "io-ts";
2
+ export declare const EmbedFieldType = "Embed";
3
+ export declare const EmbedConfig: t.ExactC<t.PartialC<{
4
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
5
+ placeholder: t.StringC;
6
+ useAsTitle: t.BooleanC;
7
+ }>>;
8
+ export declare type EmbedConfig = t.TypeOf<typeof EmbedConfig>;
9
+ export declare const Embed: t.ExactC<t.IntersectionC<[t.TypeC<{
10
+ type: t.LiteralC<"Embed">;
11
+ }>, t.PartialC<{
12
+ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
13
+ config: t.ExactC<t.PartialC<{
14
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
15
+ placeholder: t.StringC;
16
+ useAsTitle: t.BooleanC;
17
+ }>>;
18
+ }>]>>;
19
+ export declare type Embed = t.TypeOf<typeof Embed>;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Embed = exports.EmbedConfig = exports.EmbedFieldType = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
6
+ const validators_1 = require("../../../validators");
7
+ exports.EmbedFieldType = "Embed";
8
+ exports.EmbedConfig = t.exact(t.partial({
9
+ label: validators_1.StringOrNull,
10
+ placeholder: t.string,
11
+ useAsTitle: t.boolean,
12
+ }));
13
+ exports.Embed = t.exact(t.intersection([
14
+ t.type({
15
+ type: t.literal(exports.EmbedFieldType),
16
+ }),
17
+ t.partial({
18
+ fieldset: validators_1.StringOrNull,
19
+ config: exports.EmbedConfig,
20
+ }),
21
+ ]));
@@ -0,0 +1,15 @@
1
+ import * as t from "io-ts";
2
+ export declare const GeoPointFieldType = "GeoPoint";
3
+ export declare const GeoPointConfig: t.ExactC<t.PartialC<{
4
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
5
+ }>>;
6
+ export declare type GeoPointConfig = t.TypeOf<typeof GeoPointConfig>;
7
+ export declare const GeoPoint: t.ExactC<t.IntersectionC<[t.TypeC<{
8
+ type: t.LiteralC<"GeoPoint">;
9
+ }>, t.PartialC<{
10
+ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
11
+ config: t.ExactC<t.PartialC<{
12
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
13
+ }>>;
14
+ }>]>>;
15
+ export declare type GeoPoint = t.TypeOf<typeof GeoPoint>;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GeoPoint = exports.GeoPointConfig = exports.GeoPointFieldType = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
6
+ const validators_1 = require("../../../validators");
7
+ exports.GeoPointFieldType = "GeoPoint";
8
+ exports.GeoPointConfig = t.exact(t.partial({
9
+ label: validators_1.StringOrNull,
10
+ }));
11
+ exports.GeoPoint = t.exact(t.intersection([
12
+ t.type({
13
+ type: t.literal(exports.GeoPointFieldType),
14
+ }),
15
+ t.partial({
16
+ fieldset: validators_1.StringOrNull,
17
+ config: exports.GeoPointConfig,
18
+ }),
19
+ ]));
@@ -0,0 +1,44 @@
1
+ import * as t from "io-ts";
2
+ export declare const ImageFieldType = "Image";
3
+ export declare const Thumbnail: t.ExactC<t.IntersectionC<[t.TypeC<{
4
+ name: t.StringC;
5
+ }>, t.PartialC<{
6
+ width: t.Type<number | null, unknown, unknown>;
7
+ height: t.Type<number | null, unknown, unknown>;
8
+ }>]>>;
9
+ export declare type Thumbnail = t.TypeOf<typeof Thumbnail>;
10
+ export declare const ImageConfig: t.ExactC<t.PartialC<{
11
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
12
+ placeholder: t.StringC;
13
+ constraint: t.PartialC<{
14
+ width: t.Type<number | null, unknown, unknown>;
15
+ height: t.Type<number | null, unknown, unknown>;
16
+ }>;
17
+ thumbnails: t.ReadonlyArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
18
+ name: t.StringC;
19
+ }>, t.PartialC<{
20
+ width: t.Type<number | null, unknown, unknown>;
21
+ height: t.Type<number | null, unknown, unknown>;
22
+ }>]>>>;
23
+ }>>;
24
+ export declare type ImageConfig = t.TypeOf<typeof ImageConfig>;
25
+ export declare const Image: t.ExactC<t.IntersectionC<[t.TypeC<{
26
+ type: t.LiteralC<"Image">;
27
+ }>, t.PartialC<{
28
+ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
29
+ config: t.ExactC<t.PartialC<{
30
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
31
+ placeholder: t.StringC;
32
+ constraint: t.PartialC<{
33
+ width: t.Type<number | null, unknown, unknown>;
34
+ height: t.Type<number | null, unknown, unknown>;
35
+ }>;
36
+ thumbnails: t.ReadonlyArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
37
+ name: t.StringC;
38
+ }>, t.PartialC<{
39
+ width: t.Type<number | null, unknown, unknown>;
40
+ height: t.Type<number | null, unknown, unknown>;
41
+ }>]>>>;
42
+ }>>;
43
+ }>]>>;
44
+ export declare type Image = t.TypeOf<typeof Image>;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Image = exports.ImageConfig = exports.Thumbnail = exports.ImageFieldType = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
6
+ const validators_1 = require("../../../validators");
7
+ const ImageConstraint_1 = (0, tslib_1.__importDefault)(require("../shared/ImageConstraint"));
8
+ exports.ImageFieldType = "Image";
9
+ exports.Thumbnail = t.exact(t.intersection([
10
+ t.type({
11
+ name: t.string,
12
+ }),
13
+ ImageConstraint_1.default,
14
+ ]));
15
+ exports.ImageConfig = t.exact(t.partial({
16
+ label: validators_1.StringOrNull,
17
+ placeholder: t.string,
18
+ constraint: ImageConstraint_1.default,
19
+ thumbnails: t.readonlyArray(exports.Thumbnail),
20
+ }));
21
+ exports.Image = t.exact(t.intersection([
22
+ t.type({
23
+ type: t.literal(exports.ImageFieldType),
24
+ }),
25
+ t.partial({
26
+ fieldset: validators_1.StringOrNull,
27
+ config: exports.ImageConfig,
28
+ }),
29
+ ]));
@@ -0,0 +1,19 @@
1
+ import * as t from "io-ts";
2
+ export declare const IntegrationFieldType = "IntegrationFields";
3
+ export declare const IntegrationFieldConfig: t.ExactC<t.PartialC<{
4
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
5
+ placeholder: t.StringC;
6
+ catalog: t.StringC;
7
+ }>>;
8
+ export declare type IntegrationFieldConfig = t.TypeOf<typeof IntegrationFieldConfig>;
9
+ export declare const IntegrationField: t.ExactC<t.IntersectionC<[t.TypeC<{
10
+ type: t.LiteralC<"IntegrationFields">;
11
+ }>, t.PartialC<{
12
+ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
13
+ config: t.ExactC<t.PartialC<{
14
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
15
+ placeholder: t.StringC;
16
+ catalog: t.StringC;
17
+ }>>;
18
+ }>]>>;
19
+ export declare type IntegrationField = t.TypeOf<typeof IntegrationField>;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IntegrationField = exports.IntegrationFieldConfig = exports.IntegrationFieldType = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
6
+ const validators_1 = require("../../../validators");
7
+ exports.IntegrationFieldType = "IntegrationFields";
8
+ exports.IntegrationFieldConfig = t.exact(t.partial({
9
+ label: validators_1.StringOrNull,
10
+ placeholder: t.string,
11
+ catalog: t.string,
12
+ }));
13
+ exports.IntegrationField = t.exact(t.intersection([
14
+ t.type({
15
+ type: t.literal(exports.IntegrationFieldType),
16
+ }),
17
+ t.partial({
18
+ fieldset: validators_1.StringOrNull,
19
+ config: exports.IntegrationFieldConfig,
20
+ }),
21
+ ]));
@@ -0,0 +1,196 @@
1
+ import * as t from "io-ts";
2
+ export declare const CustomTypes: t.Type<readonly (string | {
3
+ id: string;
4
+ fields: readonly (string | {
5
+ id: string;
6
+ customtypes: readonly (string | {
7
+ id: string;
8
+ fields: readonly (string | {
9
+ id: string;
10
+ fields: readonly string[];
11
+ })[];
12
+ })[];
13
+ } | {
14
+ id: string;
15
+ fields: readonly (string | {
16
+ id: string;
17
+ customtypes: readonly (string | {
18
+ id: string;
19
+ fields: readonly (string | {
20
+ id: string;
21
+ fields: readonly string[];
22
+ })[];
23
+ })[];
24
+ })[];
25
+ })[];
26
+ })[], readonly (string | {
27
+ id: string;
28
+ fields: readonly (string | {
29
+ id: string;
30
+ customtypes: readonly (string | {
31
+ id: string;
32
+ fields: readonly (string | {
33
+ id: string;
34
+ fields: readonly string[];
35
+ })[];
36
+ })[];
37
+ } | {
38
+ id: string;
39
+ fields: readonly (string | {
40
+ id: string;
41
+ customtypes: readonly (string | {
42
+ id: string;
43
+ fields: readonly (string | {
44
+ id: string;
45
+ fields: readonly string[];
46
+ })[];
47
+ })[];
48
+ })[];
49
+ })[];
50
+ })[], unknown>;
51
+ export declare const LinkFieldType = "Link";
52
+ export declare const LinkConfig: t.ExactC<t.PartialC<{
53
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
54
+ useAsTitle: t.BooleanC;
55
+ placeholder: t.StringC;
56
+ select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
57
+ customtypes: t.Type<readonly (string | {
58
+ id: string;
59
+ fields: readonly (string | {
60
+ id: string;
61
+ customtypes: readonly (string | {
62
+ id: string;
63
+ fields: readonly (string | {
64
+ id: string;
65
+ fields: readonly string[];
66
+ })[];
67
+ })[];
68
+ } | {
69
+ id: string;
70
+ fields: readonly (string | {
71
+ id: string;
72
+ customtypes: readonly (string | {
73
+ id: string;
74
+ fields: readonly (string | {
75
+ id: string;
76
+ fields: readonly string[];
77
+ })[];
78
+ })[];
79
+ })[];
80
+ })[];
81
+ })[], readonly (string | {
82
+ id: string;
83
+ fields: readonly (string | {
84
+ id: string;
85
+ customtypes: readonly (string | {
86
+ id: string;
87
+ fields: readonly (string | {
88
+ id: string;
89
+ fields: readonly string[];
90
+ })[];
91
+ })[];
92
+ } | {
93
+ id: string;
94
+ fields: readonly (string | {
95
+ id: string;
96
+ customtypes: readonly (string | {
97
+ id: string;
98
+ fields: readonly (string | {
99
+ id: string;
100
+ fields: readonly string[];
101
+ })[];
102
+ })[];
103
+ })[];
104
+ })[];
105
+ })[], unknown>;
106
+ masks: t.Type<readonly string[], object, unknown>;
107
+ tags: t.Type<readonly string[], object, unknown>;
108
+ allowTargetBlank: t.BooleanC;
109
+ allowText: t.BooleanC;
110
+ /**
111
+ * `repeat` property is used to allow multiple links to be added.
112
+ * `undefined` means that the field is not repeatable (hence repeat = false).
113
+ */
114
+ repeat: t.BooleanC;
115
+ /**
116
+ * `variants` allows an option to be picked from a list (e.g. "primary"). To
117
+ * be considered, the list must have at least one item.
118
+ */
119
+ variants: t.ArrayC<t.StringC>;
120
+ }>>;
121
+ export declare type LinkConfig = t.TypeOf<typeof LinkConfig>;
122
+ export declare const Link: t.ExactC<t.IntersectionC<[t.TypeC<{
123
+ type: t.LiteralC<"Link">;
124
+ }>, t.PartialC<{
125
+ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
126
+ config: t.ExactC<t.PartialC<{
127
+ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
128
+ useAsTitle: t.BooleanC;
129
+ placeholder: t.StringC;
130
+ select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
131
+ customtypes: t.Type<readonly (string | {
132
+ id: string;
133
+ fields: readonly (string | {
134
+ id: string;
135
+ customtypes: readonly (string | {
136
+ id: string;
137
+ fields: readonly (string | {
138
+ id: string;
139
+ fields: readonly string[];
140
+ })[];
141
+ })[];
142
+ } | {
143
+ id: string;
144
+ fields: readonly (string | {
145
+ id: string;
146
+ customtypes: readonly (string | {
147
+ id: string;
148
+ fields: readonly (string | {
149
+ id: string;
150
+ fields: readonly string[];
151
+ })[];
152
+ })[];
153
+ })[];
154
+ })[];
155
+ })[], readonly (string | {
156
+ id: string;
157
+ fields: readonly (string | {
158
+ id: string;
159
+ customtypes: readonly (string | {
160
+ id: string;
161
+ fields: readonly (string | {
162
+ id: string;
163
+ fields: readonly string[];
164
+ })[];
165
+ })[];
166
+ } | {
167
+ id: string;
168
+ fields: readonly (string | {
169
+ id: string;
170
+ customtypes: readonly (string | {
171
+ id: string;
172
+ fields: readonly (string | {
173
+ id: string;
174
+ fields: readonly string[];
175
+ })[];
176
+ })[];
177
+ })[];
178
+ })[];
179
+ })[], unknown>;
180
+ masks: t.Type<readonly string[], object, unknown>;
181
+ tags: t.Type<readonly string[], object, unknown>;
182
+ allowTargetBlank: t.BooleanC;
183
+ allowText: t.BooleanC;
184
+ /**
185
+ * `repeat` property is used to allow multiple links to be added.
186
+ * `undefined` means that the field is not repeatable (hence repeat = false).
187
+ */
188
+ repeat: t.BooleanC;
189
+ /**
190
+ * `variants` allows an option to be picked from a list (e.g. "primary"). To
191
+ * be considered, the list must have at least one item.
192
+ */
193
+ variants: t.ArrayC<t.StringC>;
194
+ }>>;
195
+ }>]>>;
196
+ export declare type Link = t.TypeOf<typeof Link>;