@prismicio/client 7.21.2 → 7.21.3-pr.431.23cc5c6

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 (217) hide show
  1. package/dist/iac/customType.cjs +54 -0
  2. package/dist/iac/customType.cjs.map +1 -0
  3. package/dist/iac/customType.d.cts +43 -0
  4. package/dist/iac/customType.d.cts.map +1 -0
  5. package/dist/iac/customType.d.ts +43 -0
  6. package/dist/iac/customType.d.ts.map +1 -0
  7. package/dist/iac/customType.js +53 -0
  8. package/dist/iac/customType.js.map +1 -0
  9. package/dist/iac/fields/boolean.cjs +38 -0
  10. package/dist/iac/fields/boolean.cjs.map +1 -0
  11. package/dist/iac/fields/boolean.d.cts +22 -0
  12. package/dist/iac/fields/boolean.d.cts.map +1 -0
  13. package/dist/iac/fields/boolean.d.ts +22 -0
  14. package/dist/iac/fields/boolean.d.ts.map +1 -0
  15. package/dist/iac/fields/boolean.js +38 -0
  16. package/dist/iac/fields/boolean.js.map +1 -0
  17. package/dist/iac/fields/color.cjs +29 -0
  18. package/dist/iac/fields/color.cjs.map +1 -0
  19. package/dist/iac/fields/color.d.cts +11 -0
  20. package/dist/iac/fields/color.d.cts.map +1 -0
  21. package/dist/iac/fields/color.d.ts +11 -0
  22. package/dist/iac/fields/color.d.ts.map +1 -0
  23. package/dist/iac/fields/color.js +29 -0
  24. package/dist/iac/fields/color.js.map +1 -0
  25. package/dist/iac/fields/contentRelationship.cjs +50 -0
  26. package/dist/iac/fields/contentRelationship.cjs.map +1 -0
  27. package/dist/iac/fields/contentRelationship.d.cts +23 -0
  28. package/dist/iac/fields/contentRelationship.d.cts.map +1 -0
  29. package/dist/iac/fields/contentRelationship.d.ts +23 -0
  30. package/dist/iac/fields/contentRelationship.d.ts.map +1 -0
  31. package/dist/iac/fields/contentRelationship.js +50 -0
  32. package/dist/iac/fields/contentRelationship.js.map +1 -0
  33. package/dist/iac/fields/date.cjs +29 -0
  34. package/dist/iac/fields/date.cjs.map +1 -0
  35. package/dist/iac/fields/date.d.cts +11 -0
  36. package/dist/iac/fields/date.d.cts.map +1 -0
  37. package/dist/iac/fields/date.d.ts +11 -0
  38. package/dist/iac/fields/date.d.ts.map +1 -0
  39. package/dist/iac/fields/date.js +29 -0
  40. package/dist/iac/fields/date.js.map +1 -0
  41. package/dist/iac/fields/embed.cjs +29 -0
  42. package/dist/iac/fields/embed.cjs.map +1 -0
  43. package/dist/iac/fields/embed.d.cts +11 -0
  44. package/dist/iac/fields/embed.d.cts.map +1 -0
  45. package/dist/iac/fields/embed.d.ts +11 -0
  46. package/dist/iac/fields/embed.d.ts.map +1 -0
  47. package/dist/iac/fields/embed.js +29 -0
  48. package/dist/iac/fields/embed.js.map +1 -0
  49. package/dist/iac/fields/geoPoint.cjs +26 -0
  50. package/dist/iac/fields/geoPoint.cjs.map +1 -0
  51. package/dist/iac/fields/geoPoint.d.cts +10 -0
  52. package/dist/iac/fields/geoPoint.d.cts.map +1 -0
  53. package/dist/iac/fields/geoPoint.d.ts +10 -0
  54. package/dist/iac/fields/geoPoint.d.ts.map +1 -0
  55. package/dist/iac/fields/geoPoint.js +26 -0
  56. package/dist/iac/fields/geoPoint.js.map +1 -0
  57. package/dist/iac/fields/group.cjs +38 -0
  58. package/dist/iac/fields/group.cjs.map +1 -0
  59. package/dist/iac/fields/group.d.cts +17 -0
  60. package/dist/iac/fields/group.d.cts.map +1 -0
  61. package/dist/iac/fields/group.d.ts +17 -0
  62. package/dist/iac/fields/group.d.ts.map +1 -0
  63. package/dist/iac/fields/group.js +38 -0
  64. package/dist/iac/fields/group.js.map +1 -0
  65. package/dist/iac/fields/image.cjs +48 -0
  66. package/dist/iac/fields/image.cjs.map +1 -0
  67. package/dist/iac/fields/image.d.cts +21 -0
  68. package/dist/iac/fields/image.d.cts.map +1 -0
  69. package/dist/iac/fields/image.d.ts +21 -0
  70. package/dist/iac/fields/image.d.ts.map +1 -0
  71. package/dist/iac/fields/image.js +48 -0
  72. package/dist/iac/fields/image.js.map +1 -0
  73. package/dist/iac/fields/integration.cjs +33 -0
  74. package/dist/iac/fields/integration.cjs.map +1 -0
  75. package/dist/iac/fields/integration.d.cts +15 -0
  76. package/dist/iac/fields/integration.d.cts.map +1 -0
  77. package/dist/iac/fields/integration.d.ts +15 -0
  78. package/dist/iac/fields/integration.d.ts.map +1 -0
  79. package/dist/iac/fields/integration.js +33 -0
  80. package/dist/iac/fields/integration.js.map +1 -0
  81. package/dist/iac/fields/link.cjs +45 -0
  82. package/dist/iac/fields/link.cjs.map +1 -0
  83. package/dist/iac/fields/link.d.cts +39 -0
  84. package/dist/iac/fields/link.d.cts.map +1 -0
  85. package/dist/iac/fields/link.d.ts +39 -0
  86. package/dist/iac/fields/link.d.ts.map +1 -0
  87. package/dist/iac/fields/link.js +45 -0
  88. package/dist/iac/fields/link.js.map +1 -0
  89. package/dist/iac/fields/linkToMedia.cjs +31 -0
  90. package/dist/iac/fields/linkToMedia.cjs.map +1 -0
  91. package/dist/iac/fields/linkToMedia.d.cts +11 -0
  92. package/dist/iac/fields/linkToMedia.d.cts.map +1 -0
  93. package/dist/iac/fields/linkToMedia.d.ts +11 -0
  94. package/dist/iac/fields/linkToMedia.d.ts.map +1 -0
  95. package/dist/iac/fields/linkToMedia.js +31 -0
  96. package/dist/iac/fields/linkToMedia.js.map +1 -0
  97. package/dist/iac/fields/number.cjs +29 -0
  98. package/dist/iac/fields/number.cjs.map +1 -0
  99. package/dist/iac/fields/number.d.cts +11 -0
  100. package/dist/iac/fields/number.d.cts.map +1 -0
  101. package/dist/iac/fields/number.d.ts +11 -0
  102. package/dist/iac/fields/number.d.ts.map +1 -0
  103. package/dist/iac/fields/number.js +29 -0
  104. package/dist/iac/fields/number.js.map +1 -0
  105. package/dist/iac/fields/richText.cjs +49 -0
  106. package/dist/iac/fields/richText.cjs.map +1 -0
  107. package/dist/iac/fields/richText.d.cts +33 -0
  108. package/dist/iac/fields/richText.d.cts.map +1 -0
  109. package/dist/iac/fields/richText.d.ts +33 -0
  110. package/dist/iac/fields/richText.d.ts.map +1 -0
  111. package/dist/iac/fields/richText.js +49 -0
  112. package/dist/iac/fields/richText.js.map +1 -0
  113. package/dist/iac/fields/select.cjs +46 -0
  114. package/dist/iac/fields/select.cjs.map +1 -0
  115. package/dist/iac/fields/select.d.cts +15 -0
  116. package/dist/iac/fields/select.d.cts.map +1 -0
  117. package/dist/iac/fields/select.d.ts +15 -0
  118. package/dist/iac/fields/select.d.ts.map +1 -0
  119. package/dist/iac/fields/select.js +46 -0
  120. package/dist/iac/fields/select.js.map +1 -0
  121. package/dist/iac/fields/sliceZone.cjs +37 -0
  122. package/dist/iac/fields/sliceZone.cjs.map +1 -0
  123. package/dist/iac/fields/sliceZone.d.cts +30 -0
  124. package/dist/iac/fields/sliceZone.d.cts.map +1 -0
  125. package/dist/iac/fields/sliceZone.d.ts +30 -0
  126. package/dist/iac/fields/sliceZone.d.ts.map +1 -0
  127. package/dist/iac/fields/sliceZone.js +37 -0
  128. package/dist/iac/fields/sliceZone.js.map +1 -0
  129. package/dist/iac/fields/table.cjs +26 -0
  130. package/dist/iac/fields/table.cjs.map +1 -0
  131. package/dist/iac/fields/table.d.cts +10 -0
  132. package/dist/iac/fields/table.d.cts.map +1 -0
  133. package/dist/iac/fields/table.d.ts +10 -0
  134. package/dist/iac/fields/table.d.ts.map +1 -0
  135. package/dist/iac/fields/table.js +26 -0
  136. package/dist/iac/fields/table.js.map +1 -0
  137. package/dist/iac/fields/text.cjs +29 -0
  138. package/dist/iac/fields/text.cjs.map +1 -0
  139. package/dist/iac/fields/text.d.cts +11 -0
  140. package/dist/iac/fields/text.d.cts.map +1 -0
  141. package/dist/iac/fields/text.d.ts +11 -0
  142. package/dist/iac/fields/text.d.ts.map +1 -0
  143. package/dist/iac/fields/text.js +29 -0
  144. package/dist/iac/fields/text.js.map +1 -0
  145. package/dist/iac/fields/timestamp.cjs +29 -0
  146. package/dist/iac/fields/timestamp.cjs.map +1 -0
  147. package/dist/iac/fields/timestamp.d.cts +11 -0
  148. package/dist/iac/fields/timestamp.d.cts.map +1 -0
  149. package/dist/iac/fields/timestamp.d.ts +11 -0
  150. package/dist/iac/fields/timestamp.d.ts.map +1 -0
  151. package/dist/iac/fields/timestamp.js +29 -0
  152. package/dist/iac/fields/timestamp.js.map +1 -0
  153. package/dist/iac/fields/uid.cjs +29 -0
  154. package/dist/iac/fields/uid.cjs.map +1 -0
  155. package/dist/iac/fields/uid.d.cts +11 -0
  156. package/dist/iac/fields/uid.d.cts.map +1 -0
  157. package/dist/iac/fields/uid.d.ts +11 -0
  158. package/dist/iac/fields/uid.d.ts.map +1 -0
  159. package/dist/iac/fields/uid.js +29 -0
  160. package/dist/iac/fields/uid.js.map +1 -0
  161. package/dist/iac/sharedSlice.cjs +54 -0
  162. package/dist/iac/sharedSlice.cjs.map +1 -0
  163. package/dist/iac/sharedSlice.d.cts +28 -0
  164. package/dist/iac/sharedSlice.d.cts.map +1 -0
  165. package/dist/iac/sharedSlice.d.ts +28 -0
  166. package/dist/iac/sharedSlice.d.ts.map +1 -0
  167. package/dist/iac/sharedSlice.js +54 -0
  168. package/dist/iac/sharedSlice.js.map +1 -0
  169. package/dist/iac/variation.cjs +45 -0
  170. package/dist/iac/variation.cjs.map +1 -0
  171. package/dist/iac/variation.d.cts +46 -0
  172. package/dist/iac/variation.d.cts.map +1 -0
  173. package/dist/iac/variation.d.ts +46 -0
  174. package/dist/iac/variation.d.ts.map +1 -0
  175. package/dist/iac/variation.js +44 -0
  176. package/dist/iac/variation.js.map +1 -0
  177. package/dist/iac.cjs +86 -0
  178. package/dist/iac.cjs.map +1 -0
  179. package/dist/iac.d.cts +109 -0
  180. package/dist/iac.d.cts.map +1 -0
  181. package/dist/iac.d.ts +110 -0
  182. package/dist/iac.d.ts.map +1 -0
  183. package/dist/iac.js +86 -0
  184. package/dist/iac.js.map +1 -0
  185. package/dist/index.d.cts +2 -2
  186. package/dist/index.d.ts +2 -2
  187. package/dist/package.cjs +1 -1
  188. package/dist/package.cjs.map +1 -1
  189. package/dist/package.js +1 -1
  190. package/dist/package.js.map +1 -1
  191. package/dist/types/model/types.d.cts +2 -2
  192. package/dist/types/model/types.d.ts +2 -2
  193. package/package.json +9 -2
  194. package/src/iac/customType.ts +98 -0
  195. package/src/iac/fields/boolean.ts +55 -0
  196. package/src/iac/fields/color.ts +33 -0
  197. package/src/iac/fields/contentRelationship.ts +74 -0
  198. package/src/iac/fields/date.ts +33 -0
  199. package/src/iac/fields/embed.ts +33 -0
  200. package/src/iac/fields/geoPoint.ts +33 -0
  201. package/src/iac/fields/group.ts +58 -0
  202. package/src/iac/fields/image.ts +65 -0
  203. package/src/iac/fields/index.ts +62 -0
  204. package/src/iac/fields/integration.ts +43 -0
  205. package/src/iac/fields/link.ts +79 -0
  206. package/src/iac/fields/linkToMedia.ts +37 -0
  207. package/src/iac/fields/number.ts +35 -0
  208. package/src/iac/fields/richText.ts +84 -0
  209. package/src/iac/fields/select.ts +63 -0
  210. package/src/iac/fields/sliceZone.ts +82 -0
  211. package/src/iac/fields/table.ts +31 -0
  212. package/src/iac/fields/text.ts +33 -0
  213. package/src/iac/fields/timestamp.ts +35 -0
  214. package/src/iac/fields/uid.ts +33 -0
  215. package/src/iac/index.ts +122 -0
  216. package/src/iac/sharedSlice.ts +81 -0
  217. package/src/iac/variation.ts +107 -0
@@ -0,0 +1,29 @@
1
+ const require_types = require('../../types/model/types.cjs');
2
+
3
+ //#region src/iac/fields/date.ts
4
+ /**
5
+ * Creates a date field model.
6
+ *
7
+ * @example
8
+ *
9
+ * ```ts
10
+ * model.date({ label: "Publication Date" })
11
+ * ```
12
+ *
13
+ * @param config - Configuration for the field.
14
+ *
15
+ * @returns A date field model.
16
+ */
17
+ const date = (config) => {
18
+ return {
19
+ type: require_types.CustomTypeModelFieldType.Date,
20
+ config: {
21
+ label: (config === null || config === void 0 ? void 0 : config.label) ?? null,
22
+ placeholder: config === null || config === void 0 ? void 0 : config.placeholder
23
+ }
24
+ };
25
+ };
26
+
27
+ //#endregion
28
+ exports.date = date;
29
+ //# sourceMappingURL=date.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.cjs","names":["CustomTypeModelFieldType"],"sources":["../../../src/iac/fields/date.ts"],"sourcesContent":["import type { CustomTypeModelDateField } from \"../../types/model/date\"\nimport { CustomTypeModelFieldType } from \"../../types/model/types\"\n\n/**\n * Configuration for a date field.\n */\nexport interface DateFieldConfig {\n\tlabel?: string | null\n\tplaceholder?: string\n}\n\n/**\n * Creates a date field model.\n *\n * @example\n *\n * ```ts\n * model.date({ label: \"Publication Date\" })\n * ```\n *\n * @param config - Configuration for the field.\n *\n * @returns A date field model.\n */\nexport const date = (config?: DateFieldConfig): CustomTypeModelDateField => {\n\treturn {\n\t\ttype: CustomTypeModelFieldType.Date,\n\t\tconfig: {\n\t\t\tlabel: config?.label ?? null,\n\t\t\tplaceholder: config?.placeholder,\n\t\t},\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAwBA,MAAa,QAAQ,WAAuD;AAC3E,QAAO;EACN,MAAMA,uCAAyB;EAC/B,QAAQ;GACP,wDAAO,OAAQ,UAAS;GACxB,6DAAa,OAAQ;GACrB;EACD"}
@@ -0,0 +1,11 @@
1
+ //#region src/iac/fields/date.d.ts
2
+ /**
3
+ * Configuration for a date field.
4
+ */
5
+ interface DateFieldConfig {
6
+ label?: string | null;
7
+ placeholder?: string;
8
+ }
9
+ //#endregion
10
+ export { DateFieldConfig };
11
+ //# sourceMappingURL=date.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.d.cts","names":[],"sources":["../../../src/iac/fields/date.ts"],"sourcesContent":[],"mappings":";AAMA;;;UAAiB,eAAA"}
@@ -0,0 +1,11 @@
1
+ //#region src/iac/fields/date.d.ts
2
+ /**
3
+ * Configuration for a date field.
4
+ */
5
+ interface DateFieldConfig {
6
+ label?: string | null;
7
+ placeholder?: string;
8
+ }
9
+ //#endregion
10
+ export { DateFieldConfig };
11
+ //# sourceMappingURL=date.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.d.ts","names":[],"sources":["../../../src/iac/fields/date.ts"],"sourcesContent":[],"mappings":";AAMA;;;UAAiB,eAAA"}
@@ -0,0 +1,29 @@
1
+ import { CustomTypeModelFieldType } from "../../types/model/types.js";
2
+
3
+ //#region src/iac/fields/date.ts
4
+ /**
5
+ * Creates a date field model.
6
+ *
7
+ * @example
8
+ *
9
+ * ```ts
10
+ * model.date({ label: "Publication Date" })
11
+ * ```
12
+ *
13
+ * @param config - Configuration for the field.
14
+ *
15
+ * @returns A date field model.
16
+ */
17
+ const date = (config) => {
18
+ return {
19
+ type: CustomTypeModelFieldType.Date,
20
+ config: {
21
+ label: (config === null || config === void 0 ? void 0 : config.label) ?? null,
22
+ placeholder: config === null || config === void 0 ? void 0 : config.placeholder
23
+ }
24
+ };
25
+ };
26
+
27
+ //#endregion
28
+ export { date };
29
+ //# sourceMappingURL=date.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.js","names":[],"sources":["../../../src/iac/fields/date.ts"],"sourcesContent":["import type { CustomTypeModelDateField } from \"../../types/model/date\"\nimport { CustomTypeModelFieldType } from \"../../types/model/types\"\n\n/**\n * Configuration for a date field.\n */\nexport interface DateFieldConfig {\n\tlabel?: string | null\n\tplaceholder?: string\n}\n\n/**\n * Creates a date field model.\n *\n * @example\n *\n * ```ts\n * model.date({ label: \"Publication Date\" })\n * ```\n *\n * @param config - Configuration for the field.\n *\n * @returns A date field model.\n */\nexport const date = (config?: DateFieldConfig): CustomTypeModelDateField => {\n\treturn {\n\t\ttype: CustomTypeModelFieldType.Date,\n\t\tconfig: {\n\t\t\tlabel: config?.label ?? null,\n\t\t\tplaceholder: config?.placeholder,\n\t\t},\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAwBA,MAAa,QAAQ,WAAuD;AAC3E,QAAO;EACN,MAAM,yBAAyB;EAC/B,QAAQ;GACP,wDAAO,OAAQ,UAAS;GACxB,6DAAa,OAAQ;GACrB;EACD"}
@@ -0,0 +1,29 @@
1
+ const require_types = require('../../types/model/types.cjs');
2
+
3
+ //#region src/iac/fields/embed.ts
4
+ /**
5
+ * Creates an embed field model.
6
+ *
7
+ * @example
8
+ *
9
+ * ```ts
10
+ * model.embed({ label: "Video" })
11
+ * ```
12
+ *
13
+ * @param config - Configuration for the field.
14
+ *
15
+ * @returns An embed field model.
16
+ */
17
+ const embed = (config) => {
18
+ return {
19
+ type: require_types.CustomTypeModelFieldType.Embed,
20
+ config: {
21
+ label: (config === null || config === void 0 ? void 0 : config.label) ?? null,
22
+ placeholder: config === null || config === void 0 ? void 0 : config.placeholder
23
+ }
24
+ };
25
+ };
26
+
27
+ //#endregion
28
+ exports.embed = embed;
29
+ //# sourceMappingURL=embed.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embed.cjs","names":["CustomTypeModelFieldType"],"sources":["../../../src/iac/fields/embed.ts"],"sourcesContent":["import type { CustomTypeModelEmbedField } from \"../../types/model/embed\"\nimport { CustomTypeModelFieldType } from \"../../types/model/types\"\n\n/**\n * Configuration for an embed field.\n */\nexport interface EmbedFieldConfig {\n\tlabel?: string | null\n\tplaceholder?: string\n}\n\n/**\n * Creates an embed field model.\n *\n * @example\n *\n * ```ts\n * model.embed({ label: \"Video\" })\n * ```\n *\n * @param config - Configuration for the field.\n *\n * @returns An embed field model.\n */\nexport const embed = (config?: EmbedFieldConfig): CustomTypeModelEmbedField => {\n\treturn {\n\t\ttype: CustomTypeModelFieldType.Embed,\n\t\tconfig: {\n\t\t\tlabel: config?.label ?? null,\n\t\t\tplaceholder: config?.placeholder,\n\t\t},\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAwBA,MAAa,SAAS,WAAyD;AAC9E,QAAO;EACN,MAAMA,uCAAyB;EAC/B,QAAQ;GACP,wDAAO,OAAQ,UAAS;GACxB,6DAAa,OAAQ;GACrB;EACD"}
@@ -0,0 +1,11 @@
1
+ //#region src/iac/fields/embed.d.ts
2
+ /**
3
+ * Configuration for an embed field.
4
+ */
5
+ interface EmbedFieldConfig {
6
+ label?: string | null;
7
+ placeholder?: string;
8
+ }
9
+ //#endregion
10
+ export { EmbedFieldConfig };
11
+ //# sourceMappingURL=embed.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embed.d.cts","names":[],"sources":["../../../src/iac/fields/embed.ts"],"sourcesContent":[],"mappings":";AAMA;;;UAAiB,gBAAA"}
@@ -0,0 +1,11 @@
1
+ //#region src/iac/fields/embed.d.ts
2
+ /**
3
+ * Configuration for an embed field.
4
+ */
5
+ interface EmbedFieldConfig {
6
+ label?: string | null;
7
+ placeholder?: string;
8
+ }
9
+ //#endregion
10
+ export { EmbedFieldConfig };
11
+ //# sourceMappingURL=embed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embed.d.ts","names":[],"sources":["../../../src/iac/fields/embed.ts"],"sourcesContent":[],"mappings":";AAMA;;;UAAiB,gBAAA"}
@@ -0,0 +1,29 @@
1
+ import { CustomTypeModelFieldType } from "../../types/model/types.js";
2
+
3
+ //#region src/iac/fields/embed.ts
4
+ /**
5
+ * Creates an embed field model.
6
+ *
7
+ * @example
8
+ *
9
+ * ```ts
10
+ * model.embed({ label: "Video" })
11
+ * ```
12
+ *
13
+ * @param config - Configuration for the field.
14
+ *
15
+ * @returns An embed field model.
16
+ */
17
+ const embed = (config) => {
18
+ return {
19
+ type: CustomTypeModelFieldType.Embed,
20
+ config: {
21
+ label: (config === null || config === void 0 ? void 0 : config.label) ?? null,
22
+ placeholder: config === null || config === void 0 ? void 0 : config.placeholder
23
+ }
24
+ };
25
+ };
26
+
27
+ //#endregion
28
+ export { embed };
29
+ //# sourceMappingURL=embed.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embed.js","names":[],"sources":["../../../src/iac/fields/embed.ts"],"sourcesContent":["import type { CustomTypeModelEmbedField } from \"../../types/model/embed\"\nimport { CustomTypeModelFieldType } from \"../../types/model/types\"\n\n/**\n * Configuration for an embed field.\n */\nexport interface EmbedFieldConfig {\n\tlabel?: string | null\n\tplaceholder?: string\n}\n\n/**\n * Creates an embed field model.\n *\n * @example\n *\n * ```ts\n * model.embed({ label: \"Video\" })\n * ```\n *\n * @param config - Configuration for the field.\n *\n * @returns An embed field model.\n */\nexport const embed = (config?: EmbedFieldConfig): CustomTypeModelEmbedField => {\n\treturn {\n\t\ttype: CustomTypeModelFieldType.Embed,\n\t\tconfig: {\n\t\t\tlabel: config?.label ?? null,\n\t\t\tplaceholder: config?.placeholder,\n\t\t},\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAwBA,MAAa,SAAS,WAAyD;AAC9E,QAAO;EACN,MAAM,yBAAyB;EAC/B,QAAQ;GACP,wDAAO,OAAQ,UAAS;GACxB,6DAAa,OAAQ;GACrB;EACD"}
@@ -0,0 +1,26 @@
1
+ const require_types = require('../../types/model/types.cjs');
2
+
3
+ //#region src/iac/fields/geoPoint.ts
4
+ /**
5
+ * Creates a geo point field model.
6
+ *
7
+ * @example
8
+ *
9
+ * ```ts
10
+ * model.geoPoint({ label: "Location" })
11
+ * ```
12
+ *
13
+ * @param config - Configuration for the field.
14
+ *
15
+ * @returns A geo point field model.
16
+ */
17
+ const geoPoint = (config) => {
18
+ return {
19
+ type: require_types.CustomTypeModelFieldType.GeoPoint,
20
+ config: { label: (config === null || config === void 0 ? void 0 : config.label) ?? null }
21
+ };
22
+ };
23
+
24
+ //#endregion
25
+ exports.geoPoint = geoPoint;
26
+ //# sourceMappingURL=geoPoint.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geoPoint.cjs","names":["CustomTypeModelFieldType"],"sources":["../../../src/iac/fields/geoPoint.ts"],"sourcesContent":["import type { CustomTypeModelGeoPointField } from \"../../types/model/geoPoint\"\nimport { CustomTypeModelFieldType } from \"../../types/model/types\"\n\n/**\n * Configuration for a geo point field.\n */\nexport interface GeoPointFieldConfig {\n\tlabel?: string | null\n}\n\n/**\n * Creates a geo point field model.\n *\n * @example\n *\n * ```ts\n * model.geoPoint({ label: \"Location\" })\n * ```\n *\n * @param config - Configuration for the field.\n *\n * @returns A geo point field model.\n */\nexport const geoPoint = (\n\tconfig?: GeoPointFieldConfig,\n): CustomTypeModelGeoPointField => {\n\treturn {\n\t\ttype: CustomTypeModelFieldType.GeoPoint,\n\t\tconfig: {\n\t\t\tlabel: config?.label ?? null,\n\t\t},\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAuBA,MAAa,YACZ,WACkC;AAClC,QAAO;EACN,MAAMA,uCAAyB;EAC/B,QAAQ,EACP,wDAAO,OAAQ,UAAS,MACxB;EACD"}
@@ -0,0 +1,10 @@
1
+ //#region src/iac/fields/geoPoint.d.ts
2
+ /**
3
+ * Configuration for a geo point field.
4
+ */
5
+ interface GeoPointFieldConfig {
6
+ label?: string | null;
7
+ }
8
+ //#endregion
9
+ export { GeoPointFieldConfig };
10
+ //# sourceMappingURL=geoPoint.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geoPoint.d.cts","names":[],"sources":["../../../src/iac/fields/geoPoint.ts"],"sourcesContent":[],"mappings":";AAMA;;;UAAiB,mBAAA"}
@@ -0,0 +1,10 @@
1
+ //#region src/iac/fields/geoPoint.d.ts
2
+ /**
3
+ * Configuration for a geo point field.
4
+ */
5
+ interface GeoPointFieldConfig {
6
+ label?: string | null;
7
+ }
8
+ //#endregion
9
+ export { GeoPointFieldConfig };
10
+ //# sourceMappingURL=geoPoint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geoPoint.d.ts","names":[],"sources":["../../../src/iac/fields/geoPoint.ts"],"sourcesContent":[],"mappings":";AAMA;;;UAAiB,mBAAA"}
@@ -0,0 +1,26 @@
1
+ import { CustomTypeModelFieldType } from "../../types/model/types.js";
2
+
3
+ //#region src/iac/fields/geoPoint.ts
4
+ /**
5
+ * Creates a geo point field model.
6
+ *
7
+ * @example
8
+ *
9
+ * ```ts
10
+ * model.geoPoint({ label: "Location" })
11
+ * ```
12
+ *
13
+ * @param config - Configuration for the field.
14
+ *
15
+ * @returns A geo point field model.
16
+ */
17
+ const geoPoint = (config) => {
18
+ return {
19
+ type: CustomTypeModelFieldType.GeoPoint,
20
+ config: { label: (config === null || config === void 0 ? void 0 : config.label) ?? null }
21
+ };
22
+ };
23
+
24
+ //#endregion
25
+ export { geoPoint };
26
+ //# sourceMappingURL=geoPoint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geoPoint.js","names":[],"sources":["../../../src/iac/fields/geoPoint.ts"],"sourcesContent":["import type { CustomTypeModelGeoPointField } from \"../../types/model/geoPoint\"\nimport { CustomTypeModelFieldType } from \"../../types/model/types\"\n\n/**\n * Configuration for a geo point field.\n */\nexport interface GeoPointFieldConfig {\n\tlabel?: string | null\n}\n\n/**\n * Creates a geo point field model.\n *\n * @example\n *\n * ```ts\n * model.geoPoint({ label: \"Location\" })\n * ```\n *\n * @param config - Configuration for the field.\n *\n * @returns A geo point field model.\n */\nexport const geoPoint = (\n\tconfig?: GeoPointFieldConfig,\n): CustomTypeModelGeoPointField => {\n\treturn {\n\t\ttype: CustomTypeModelFieldType.GeoPoint,\n\t\tconfig: {\n\t\t\tlabel: config?.label ?? null,\n\t\t},\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAuBA,MAAa,YACZ,WACkC;AAClC,QAAO;EACN,MAAM,yBAAyB;EAC/B,QAAQ,EACP,wDAAO,OAAQ,UAAS,MACxB;EACD"}
@@ -0,0 +1,38 @@
1
+ const require_types = require('../../types/model/types.cjs');
2
+
3
+ //#region src/iac/fields/group.ts
4
+ /**
5
+ * Creates a group field model.
6
+ *
7
+ * @example
8
+ *
9
+ * ```ts
10
+ * model.group({
11
+ * label: "Items",
12
+ * fields: {
13
+ * title: model.text({ label: "Title" }),
14
+ * image: model.image({ label: "Image" }),
15
+ * link: model.link({ label: "Link" })
16
+ * }
17
+ * })
18
+ * ```
19
+ *
20
+ * @typeParam Fields - Field definitions for type inference.
21
+ *
22
+ * @param config - Configuration for the field.
23
+ *
24
+ * @returns A group field model.
25
+ */
26
+ const group = (config) => {
27
+ return {
28
+ type: require_types.CustomTypeModelFieldType.Group,
29
+ config: {
30
+ label: (config === null || config === void 0 ? void 0 : config.label) ?? null,
31
+ fields: config === null || config === void 0 ? void 0 : config.fields
32
+ }
33
+ };
34
+ };
35
+
36
+ //#endregion
37
+ exports.group = group;
38
+ //# sourceMappingURL=group.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"group.cjs","names":["CustomTypeModelFieldType"],"sources":["../../../src/iac/fields/group.ts"],"sourcesContent":["import type { CustomTypeModelGroupField } from \"../../types/model/group\"\nimport type { CustomTypeModelFieldForGroup } from \"../../types/model/types\"\nimport { CustomTypeModelFieldType } from \"../../types/model/types\"\n\n/**\n * Configuration for a group field.\n */\nexport interface GroupFieldConfig<\n\tFields extends Record<string, CustomTypeModelFieldForGroup> = Record<\n\t\tstring,\n\t\tCustomTypeModelFieldForGroup\n\t>,\n> {\n\tlabel?: string | null\n\t/**\n\t * Fields within the group.\n\t */\n\tfields?: Fields\n}\n\n/**\n * Creates a group field model.\n *\n * @example\n *\n * ```ts\n * model.group({\n * label: \"Items\",\n * fields: {\n * title: model.text({ label: \"Title\" }),\n * image: model.image({ label: \"Image\" }),\n * link: model.link({ label: \"Link\" })\n * }\n * })\n * ```\n *\n * @typeParam Fields - Field definitions for type inference.\n *\n * @param config - Configuration for the field.\n *\n * @returns A group field model.\n */\nexport const group = <\n\tFields extends Record<string, CustomTypeModelFieldForGroup> = Record<\n\t\tstring,\n\t\tCustomTypeModelFieldForGroup\n\t>,\n>(\n\tconfig?: GroupFieldConfig<Fields>,\n): CustomTypeModelGroupField<Fields> => {\n\treturn {\n\t\ttype: CustomTypeModelFieldType.Group,\n\t\tconfig: {\n\t\t\tlabel: config?.label ?? null,\n\t\t\tfields: config?.fields,\n\t\t},\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,MAAa,SAMZ,WACuC;AACvC,QAAO;EACN,MAAMA,uCAAyB;EAC/B,QAAQ;GACP,wDAAO,OAAQ,UAAS;GACxB,wDAAQ,OAAQ;GAChB;EACD"}
@@ -0,0 +1,17 @@
1
+ import { CustomTypeModelFieldForGroup } from "../../types/model/types.cjs";
2
+
3
+ //#region src/iac/fields/group.d.ts
4
+
5
+ /**
6
+ * Configuration for a group field.
7
+ */
8
+ interface GroupFieldConfig<Fields extends Record<string, CustomTypeModelFieldForGroup> = Record<string, CustomTypeModelFieldForGroup>> {
9
+ label?: string | null;
10
+ /**
11
+ * Fields within the group.
12
+ */
13
+ fields?: Fields;
14
+ }
15
+ //#endregion
16
+ export { GroupFieldConfig };
17
+ //# sourceMappingURL=group.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"group.d.cts","names":[],"sources":["../../../src/iac/fields/group.ts"],"sourcesContent":[],"mappings":";;;;;AAOA;;AACgB,UADC,gBACD,CAAA,eAAA,MAAA,CAAA,MAAA,EAAe,4BAAf,CAAA,GAA+C,MAA/C,CAAA,MAAA,EAEd,4BAFc,CAAA,CAAA,CAAA;EAEd,KAAA,CAAA,EAAA,MAAA,GAAA,IAAA;EAF6D;;;WASrD"}
@@ -0,0 +1,17 @@
1
+ import { CustomTypeModelFieldForGroup } from "../../types/model/types.js";
2
+
3
+ //#region src/iac/fields/group.d.ts
4
+
5
+ /**
6
+ * Configuration for a group field.
7
+ */
8
+ interface GroupFieldConfig<Fields extends Record<string, CustomTypeModelFieldForGroup> = Record<string, CustomTypeModelFieldForGroup>> {
9
+ label?: string | null;
10
+ /**
11
+ * Fields within the group.
12
+ */
13
+ fields?: Fields;
14
+ }
15
+ //#endregion
16
+ export { GroupFieldConfig };
17
+ //# sourceMappingURL=group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"group.d.ts","names":[],"sources":["../../../src/iac/fields/group.ts"],"sourcesContent":[],"mappings":";;;;;AAOA;;AACgB,UADC,gBACD,CAAA,eAAA,MAAA,CAAA,MAAA,EAAe,4BAAf,CAAA,GAA+C,MAA/C,CAAA,MAAA,EAEd,4BAFc,CAAA,CAAA,CAAA;EAEd,KAAA,CAAA,EAAA,MAAA,GAAA,IAAA;EAF6D;;;WASrD"}
@@ -0,0 +1,38 @@
1
+ import { CustomTypeModelFieldType } from "../../types/model/types.js";
2
+
3
+ //#region src/iac/fields/group.ts
4
+ /**
5
+ * Creates a group field model.
6
+ *
7
+ * @example
8
+ *
9
+ * ```ts
10
+ * model.group({
11
+ * label: "Items",
12
+ * fields: {
13
+ * title: model.text({ label: "Title" }),
14
+ * image: model.image({ label: "Image" }),
15
+ * link: model.link({ label: "Link" })
16
+ * }
17
+ * })
18
+ * ```
19
+ *
20
+ * @typeParam Fields - Field definitions for type inference.
21
+ *
22
+ * @param config - Configuration for the field.
23
+ *
24
+ * @returns A group field model.
25
+ */
26
+ const group = (config) => {
27
+ return {
28
+ type: CustomTypeModelFieldType.Group,
29
+ config: {
30
+ label: (config === null || config === void 0 ? void 0 : config.label) ?? null,
31
+ fields: config === null || config === void 0 ? void 0 : config.fields
32
+ }
33
+ };
34
+ };
35
+
36
+ //#endregion
37
+ export { group };
38
+ //# sourceMappingURL=group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"group.js","names":[],"sources":["../../../src/iac/fields/group.ts"],"sourcesContent":["import type { CustomTypeModelGroupField } from \"../../types/model/group\"\nimport type { CustomTypeModelFieldForGroup } from \"../../types/model/types\"\nimport { CustomTypeModelFieldType } from \"../../types/model/types\"\n\n/**\n * Configuration for a group field.\n */\nexport interface GroupFieldConfig<\n\tFields extends Record<string, CustomTypeModelFieldForGroup> = Record<\n\t\tstring,\n\t\tCustomTypeModelFieldForGroup\n\t>,\n> {\n\tlabel?: string | null\n\t/**\n\t * Fields within the group.\n\t */\n\tfields?: Fields\n}\n\n/**\n * Creates a group field model.\n *\n * @example\n *\n * ```ts\n * model.group({\n * label: \"Items\",\n * fields: {\n * title: model.text({ label: \"Title\" }),\n * image: model.image({ label: \"Image\" }),\n * link: model.link({ label: \"Link\" })\n * }\n * })\n * ```\n *\n * @typeParam Fields - Field definitions for type inference.\n *\n * @param config - Configuration for the field.\n *\n * @returns A group field model.\n */\nexport const group = <\n\tFields extends Record<string, CustomTypeModelFieldForGroup> = Record<\n\t\tstring,\n\t\tCustomTypeModelFieldForGroup\n\t>,\n>(\n\tconfig?: GroupFieldConfig<Fields>,\n): CustomTypeModelGroupField<Fields> => {\n\treturn {\n\t\ttype: CustomTypeModelFieldType.Group,\n\t\tconfig: {\n\t\t\tlabel: config?.label ?? null,\n\t\t\tfields: config?.fields,\n\t\t},\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,MAAa,SAMZ,WACuC;AACvC,QAAO;EACN,MAAM,yBAAyB;EAC/B,QAAQ;GACP,wDAAO,OAAQ,UAAS;GACxB,wDAAQ,OAAQ;GAChB;EACD"}
@@ -0,0 +1,48 @@
1
+ const require_types = require('../../types/model/types.cjs');
2
+
3
+ //#region src/iac/fields/image.ts
4
+ /**
5
+ * Creates an image field model.
6
+ *
7
+ * @example
8
+ *
9
+ * ```ts
10
+ * // Simple image
11
+ * model.image({ label: "Hero Image" })
12
+ *
13
+ * // With constraints
14
+ * model.image({
15
+ * label: "Banner",
16
+ * constraint: { width: 1920, height: 1080 }
17
+ * })
18
+ *
19
+ * // With thumbnails (type-safe names)
20
+ * model.image({
21
+ * label: "Photo",
22
+ * thumbnails: [
23
+ * { name: "mobile", width: 640, height: 360 },
24
+ * { name: "tablet", width: 1024, height: 576 }
25
+ * ] as const
26
+ * })
27
+ * ```
28
+ *
29
+ * @typeParam ThumbnailNames - Thumbnail name literals for type inference.
30
+ *
31
+ * @param config - Configuration for the field.
32
+ *
33
+ * @returns An image field model.
34
+ */
35
+ const image = (config) => {
36
+ return {
37
+ type: require_types.CustomTypeModelFieldType.Image,
38
+ config: {
39
+ label: (config === null || config === void 0 ? void 0 : config.label) ?? null,
40
+ constraint: config === null || config === void 0 ? void 0 : config.constraint,
41
+ thumbnails: config === null || config === void 0 ? void 0 : config.thumbnails
42
+ }
43
+ };
44
+ };
45
+
46
+ //#endregion
47
+ exports.image = image;
48
+ //# sourceMappingURL=image.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.cjs","names":["CustomTypeModelFieldType"],"sources":["../../../src/iac/fields/image.ts"],"sourcesContent":["import type {\n\tCustomTypeModelImageConstraint,\n\tCustomTypeModelImageField,\n\tCustomTypeModelImageThumbnail,\n} from \"../../types/model/image\"\nimport { CustomTypeModelFieldType } from \"../../types/model/types\"\n\n/**\n * Configuration for an image field.\n */\nexport interface ImageFieldConfig<ThumbnailNames extends string = string> {\n\tlabel?: string | null\n\t/**\n\t * Dimension constraints for the image.\n\t */\n\tconstraint?: CustomTypeModelImageConstraint\n\t/**\n\t * Thumbnails (responsive views) for the image.\n\t */\n\tthumbnails?: readonly CustomTypeModelImageThumbnail<ThumbnailNames>[]\n}\n\n/**\n * Creates an image field model.\n *\n * @example\n *\n * ```ts\n * // Simple image\n * model.image({ label: \"Hero Image\" })\n *\n * // With constraints\n * model.image({\n * label: \"Banner\",\n * constraint: { width: 1920, height: 1080 }\n * })\n *\n * // With thumbnails (type-safe names)\n * model.image({\n * label: \"Photo\",\n * thumbnails: [\n * { name: \"mobile\", width: 640, height: 360 },\n * { name: \"tablet\", width: 1024, height: 576 }\n * ] as const\n * })\n * ```\n *\n * @typeParam ThumbnailNames - Thumbnail name literals for type inference.\n *\n * @param config - Configuration for the field.\n *\n * @returns An image field model.\n */\nexport const image = <ThumbnailNames extends string = string>(\n\tconfig?: ImageFieldConfig<ThumbnailNames>,\n): CustomTypeModelImageField<ThumbnailNames> => {\n\treturn {\n\t\ttype: CustomTypeModelFieldType.Image,\n\t\tconfig: {\n\t\t\tlabel: config?.label ?? null,\n\t\t\tconstraint: config?.constraint,\n\t\t\tthumbnails: config?.thumbnails,\n\t\t},\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA,MAAa,SACZ,WAC+C;AAC/C,QAAO;EACN,MAAMA,uCAAyB;EAC/B,QAAQ;GACP,wDAAO,OAAQ,UAAS;GACxB,4DAAY,OAAQ;GACpB,4DAAY,OAAQ;GACpB;EACD"}
@@ -0,0 +1,21 @@
1
+ import { CustomTypeModelImageConstraint, CustomTypeModelImageThumbnail } from "../../types/model/image.cjs";
2
+
3
+ //#region src/iac/fields/image.d.ts
4
+
5
+ /**
6
+ * Configuration for an image field.
7
+ */
8
+ interface ImageFieldConfig<ThumbnailNames extends string = string> {
9
+ label?: string | null;
10
+ /**
11
+ * Dimension constraints for the image.
12
+ */
13
+ constraint?: CustomTypeModelImageConstraint;
14
+ /**
15
+ * Thumbnails (responsive views) for the image.
16
+ */
17
+ thumbnails?: readonly CustomTypeModelImageThumbnail<ThumbnailNames>[];
18
+ }
19
+ //#endregion
20
+ export { ImageFieldConfig };
21
+ //# sourceMappingURL=image.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.d.cts","names":[],"sources":["../../../src/iac/fields/image.ts"],"sourcesContent":[],"mappings":";;;;;;AAUA;AAKc,UALG,gBAKH,CAAA,uBAAA,MAAA,GAAA,MAAA,CAAA,CAAA;EAIuC,KAAA,CAAA,EAAA,MAAA,GAAA,IAAA;EAA9B;;;eAJT;;;;wBAIS,8BAA8B"}
@@ -0,0 +1,21 @@
1
+ import { CustomTypeModelImageConstraint, CustomTypeModelImageThumbnail } from "../../types/model/image.js";
2
+
3
+ //#region src/iac/fields/image.d.ts
4
+
5
+ /**
6
+ * Configuration for an image field.
7
+ */
8
+ interface ImageFieldConfig<ThumbnailNames extends string = string> {
9
+ label?: string | null;
10
+ /**
11
+ * Dimension constraints for the image.
12
+ */
13
+ constraint?: CustomTypeModelImageConstraint;
14
+ /**
15
+ * Thumbnails (responsive views) for the image.
16
+ */
17
+ thumbnails?: readonly CustomTypeModelImageThumbnail<ThumbnailNames>[];
18
+ }
19
+ //#endregion
20
+ export { ImageFieldConfig };
21
+ //# sourceMappingURL=image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.d.ts","names":[],"sources":["../../../src/iac/fields/image.ts"],"sourcesContent":[],"mappings":";;;;;;AAUA;AAKc,UALG,gBAKH,CAAA,uBAAA,MAAA,GAAA,MAAA,CAAA,CAAA;EAIuC,KAAA,CAAA,EAAA,MAAA,GAAA,IAAA;EAA9B;;;eAJT;;;;wBAIS,8BAA8B"}
@@ -0,0 +1,48 @@
1
+ import { CustomTypeModelFieldType } from "../../types/model/types.js";
2
+
3
+ //#region src/iac/fields/image.ts
4
+ /**
5
+ * Creates an image field model.
6
+ *
7
+ * @example
8
+ *
9
+ * ```ts
10
+ * // Simple image
11
+ * model.image({ label: "Hero Image" })
12
+ *
13
+ * // With constraints
14
+ * model.image({
15
+ * label: "Banner",
16
+ * constraint: { width: 1920, height: 1080 }
17
+ * })
18
+ *
19
+ * // With thumbnails (type-safe names)
20
+ * model.image({
21
+ * label: "Photo",
22
+ * thumbnails: [
23
+ * { name: "mobile", width: 640, height: 360 },
24
+ * { name: "tablet", width: 1024, height: 576 }
25
+ * ] as const
26
+ * })
27
+ * ```
28
+ *
29
+ * @typeParam ThumbnailNames - Thumbnail name literals for type inference.
30
+ *
31
+ * @param config - Configuration for the field.
32
+ *
33
+ * @returns An image field model.
34
+ */
35
+ const image = (config) => {
36
+ return {
37
+ type: CustomTypeModelFieldType.Image,
38
+ config: {
39
+ label: (config === null || config === void 0 ? void 0 : config.label) ?? null,
40
+ constraint: config === null || config === void 0 ? void 0 : config.constraint,
41
+ thumbnails: config === null || config === void 0 ? void 0 : config.thumbnails
42
+ }
43
+ };
44
+ };
45
+
46
+ //#endregion
47
+ export { image };
48
+ //# sourceMappingURL=image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.js","names":[],"sources":["../../../src/iac/fields/image.ts"],"sourcesContent":["import type {\n\tCustomTypeModelImageConstraint,\n\tCustomTypeModelImageField,\n\tCustomTypeModelImageThumbnail,\n} from \"../../types/model/image\"\nimport { CustomTypeModelFieldType } from \"../../types/model/types\"\n\n/**\n * Configuration for an image field.\n */\nexport interface ImageFieldConfig<ThumbnailNames extends string = string> {\n\tlabel?: string | null\n\t/**\n\t * Dimension constraints for the image.\n\t */\n\tconstraint?: CustomTypeModelImageConstraint\n\t/**\n\t * Thumbnails (responsive views) for the image.\n\t */\n\tthumbnails?: readonly CustomTypeModelImageThumbnail<ThumbnailNames>[]\n}\n\n/**\n * Creates an image field model.\n *\n * @example\n *\n * ```ts\n * // Simple image\n * model.image({ label: \"Hero Image\" })\n *\n * // With constraints\n * model.image({\n * label: \"Banner\",\n * constraint: { width: 1920, height: 1080 }\n * })\n *\n * // With thumbnails (type-safe names)\n * model.image({\n * label: \"Photo\",\n * thumbnails: [\n * { name: \"mobile\", width: 640, height: 360 },\n * { name: \"tablet\", width: 1024, height: 576 }\n * ] as const\n * })\n * ```\n *\n * @typeParam ThumbnailNames - Thumbnail name literals for type inference.\n *\n * @param config - Configuration for the field.\n *\n * @returns An image field model.\n */\nexport const image = <ThumbnailNames extends string = string>(\n\tconfig?: ImageFieldConfig<ThumbnailNames>,\n): CustomTypeModelImageField<ThumbnailNames> => {\n\treturn {\n\t\ttype: CustomTypeModelFieldType.Image,\n\t\tconfig: {\n\t\t\tlabel: config?.label ?? null,\n\t\t\tconstraint: config?.constraint,\n\t\t\tthumbnails: config?.thumbnails,\n\t\t},\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA,MAAa,SACZ,WAC+C;AAC/C,QAAO;EACN,MAAM,yBAAyB;EAC/B,QAAQ;GACP,wDAAO,OAAQ,UAAS;GACxB,4DAAY,OAAQ;GACpB,4DAAY,OAAQ;GACpB;EACD"}
@@ -0,0 +1,33 @@
1
+ const require_types = require('../../types/model/types.cjs');
2
+
3
+ //#region src/iac/fields/integration.ts
4
+ /**
5
+ * Creates an integration field model.
6
+ *
7
+ * @example
8
+ *
9
+ * ```ts
10
+ * model.integration({
11
+ * label: "Product",
12
+ * catalog: "my-catalog-id"
13
+ * })
14
+ * ```
15
+ *
16
+ * @param config - Configuration for the field.
17
+ *
18
+ * @returns An integration field model.
19
+ */
20
+ const integration = (config) => {
21
+ return {
22
+ type: require_types.CustomTypeModelFieldType.Integration,
23
+ config: {
24
+ label: (config === null || config === void 0 ? void 0 : config.label) ?? null,
25
+ placeholder: config === null || config === void 0 ? void 0 : config.placeholder,
26
+ catalog: config === null || config === void 0 ? void 0 : config.catalog
27
+ }
28
+ };
29
+ };
30
+
31
+ //#endregion
32
+ exports.integration = integration;
33
+ //# sourceMappingURL=integration.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration.cjs","names":["CustomTypeModelFieldType"],"sources":["../../../src/iac/fields/integration.ts"],"sourcesContent":["import type { CustomTypeModelIntegrationField } from \"../../types/model/integration\"\nimport { CustomTypeModelFieldType } from \"../../types/model/types\"\n\n/**\n * Configuration for an integration field.\n */\nexport interface IntegrationFieldConfig {\n\tlabel?: string | null\n\tplaceholder?: string\n\t/**\n\t * The catalog ID for the integration.\n\t */\n\tcatalog?: string\n}\n\n/**\n * Creates an integration field model.\n *\n * @example\n *\n * ```ts\n * model.integration({\n * label: \"Product\",\n * catalog: \"my-catalog-id\"\n * })\n * ```\n *\n * @param config - Configuration for the field.\n *\n * @returns An integration field model.\n */\nexport const integration = (\n\tconfig?: IntegrationFieldConfig,\n): CustomTypeModelIntegrationField => {\n\treturn {\n\t\ttype: CustomTypeModelFieldType.Integration,\n\t\tconfig: {\n\t\t\tlabel: config?.label ?? null,\n\t\t\tplaceholder: config?.placeholder,\n\t\t\tcatalog: config?.catalog,\n\t\t},\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA+BA,MAAa,eACZ,WACqC;AACrC,QAAO;EACN,MAAMA,uCAAyB;EAC/B,QAAQ;GACP,wDAAO,OAAQ,UAAS;GACxB,6DAAa,OAAQ;GACrB,yDAAS,OAAQ;GACjB;EACD"}