@sitecoreai-labs/sitecoreai-cli 0.0.4

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 (569) hide show
  1. package/AGENTS.md +67 -0
  2. package/LICENSE +21 -0
  3. package/README.md +357 -0
  4. package/bin/sitecoreai-cli +3 -0
  5. package/dist/cli.d.ts +3 -0
  6. package/dist/cli.d.ts.map +1 -0
  7. package/dist/cli.js +358 -0
  8. package/dist/commands/config.d.ts +3 -0
  9. package/dist/commands/config.d.ts.map +1 -0
  10. package/dist/commands/config.js +27 -0
  11. package/dist/commands/deploy/deployments.d.ts +3 -0
  12. package/dist/commands/deploy/deployments.d.ts.map +1 -0
  13. package/dist/commands/deploy/deployments.js +58 -0
  14. package/dist/commands/deploy/editing-host.d.ts +3 -0
  15. package/dist/commands/deploy/editing-host.d.ts.map +1 -0
  16. package/dist/commands/deploy/editing-host.js +49 -0
  17. package/dist/commands/deploy/environments/deployments.d.ts +3 -0
  18. package/dist/commands/deploy/environments/deployments.d.ts.map +1 -0
  19. package/dist/commands/deploy/environments/deployments.js +28 -0
  20. package/dist/commands/deploy/environments/index.d.ts +3 -0
  21. package/dist/commands/deploy/environments/index.d.ts.map +1 -0
  22. package/dist/commands/deploy/environments/index.js +29 -0
  23. package/dist/commands/deploy/environments/mutations.d.ts +9 -0
  24. package/dist/commands/deploy/environments/mutations.d.ts.map +1 -0
  25. package/dist/commands/deploy/environments/mutations.js +103 -0
  26. package/dist/commands/deploy/environments/queries.d.ts +7 -0
  27. package/dist/commands/deploy/environments/queries.d.ts.map +1 -0
  28. package/dist/commands/deploy/environments/queries.js +56 -0
  29. package/dist/commands/deploy/environments/variables.d.ts +3 -0
  30. package/dist/commands/deploy/environments/variables.d.ts.map +1 -0
  31. package/dist/commands/deploy/environments/variables.js +40 -0
  32. package/dist/commands/deploy/environments.d.ts +2 -0
  33. package/dist/commands/deploy/environments.d.ts.map +1 -0
  34. package/dist/commands/deploy/environments.js +17 -0
  35. package/dist/commands/deploy/index.d.ts +3 -0
  36. package/dist/commands/deploy/index.d.ts.map +1 -0
  37. package/dist/commands/deploy/index.js +26 -0
  38. package/dist/commands/deploy/logs.d.ts +3 -0
  39. package/dist/commands/deploy/logs.d.ts.map +1 -0
  40. package/dist/commands/deploy/logs.js +39 -0
  41. package/dist/commands/deploy/organizations.d.ts +3 -0
  42. package/dist/commands/deploy/organizations.d.ts.map +1 -0
  43. package/dist/commands/deploy/organizations.js +29 -0
  44. package/dist/commands/deploy/projects.d.ts +3 -0
  45. package/dist/commands/deploy/projects.d.ts.map +1 -0
  46. package/dist/commands/deploy/projects.js +74 -0
  47. package/dist/commands/deploy/shared.d.ts +3 -0
  48. package/dist/commands/deploy/shared.d.ts.map +1 -0
  49. package/dist/commands/deploy/shared.js +12 -0
  50. package/dist/commands/deploy/site.d.ts +10 -0
  51. package/dist/commands/deploy/site.d.ts.map +1 -0
  52. package/dist/commands/deploy/site.js +36 -0
  53. package/dist/commands/deploy/source-control.d.ts +3 -0
  54. package/dist/commands/deploy/source-control.d.ts.map +1 -0
  55. package/dist/commands/deploy/source-control.js +89 -0
  56. package/dist/commands/deploy.d.ts +2 -0
  57. package/dist/commands/deploy.d.ts.map +1 -0
  58. package/dist/commands/deploy.js +5 -0
  59. package/dist/commands/history.d.ts +3 -0
  60. package/dist/commands/history.d.ts.map +1 -0
  61. package/dist/commands/history.js +88 -0
  62. package/dist/commands/init.d.ts +3 -0
  63. package/dist/commands/init.d.ts.map +1 -0
  64. package/dist/commands/init.js +32 -0
  65. package/dist/commands/login.d.ts +3 -0
  66. package/dist/commands/login.d.ts.map +1 -0
  67. package/dist/commands/login.js +21 -0
  68. package/dist/commands/logout.d.ts +3 -0
  69. package/dist/commands/logout.d.ts.map +1 -0
  70. package/dist/commands/logout.js +18 -0
  71. package/dist/commands/recipe/index.d.ts +3 -0
  72. package/dist/commands/recipe/index.d.ts.map +1 -0
  73. package/dist/commands/recipe/index.js +158 -0
  74. package/dist/commands/serialization/index.d.ts +3 -0
  75. package/dist/commands/serialization/index.d.ts.map +1 -0
  76. package/dist/commands/serialization/index.js +89 -0
  77. package/dist/commands/serialization/package.d.ts +3 -0
  78. package/dist/commands/serialization/package.d.ts.map +1 -0
  79. package/dist/commands/serialization/package.js +36 -0
  80. package/dist/commands/shared.d.ts +21 -0
  81. package/dist/commands/shared.d.ts.map +1 -0
  82. package/dist/commands/shared.js +82 -0
  83. package/dist/commands/shell.d.ts +10 -0
  84. package/dist/commands/shell.d.ts.map +1 -0
  85. package/dist/commands/shell.js +155 -0
  86. package/dist/commands/status.d.ts +3 -0
  87. package/dist/commands/status.d.ts.map +1 -0
  88. package/dist/commands/status.js +15 -0
  89. package/dist/commands/telemetry.d.ts +3 -0
  90. package/dist/commands/telemetry.d.ts.map +1 -0
  91. package/dist/commands/telemetry.js +28 -0
  92. package/dist/config/env-overrides.d.ts +4 -0
  93. package/dist/config/env-overrides.d.ts.map +1 -0
  94. package/dist/config/env-overrides.js +199 -0
  95. package/dist/config/index.d.ts +5 -0
  96. package/dist/config/index.d.ts.map +1 -0
  97. package/dist/config/index.js +13 -0
  98. package/dist/config/modules.d.ts +4 -0
  99. package/dist/config/modules.d.ts.map +1 -0
  100. package/dist/config/modules.js +152 -0
  101. package/dist/config/paths.d.ts +2 -0
  102. package/dist/config/paths.d.ts.map +1 -0
  103. package/dist/config/paths.js +39 -0
  104. package/dist/config/root-config.d.ts +10 -0
  105. package/dist/config/root-config.d.ts.map +1 -0
  106. package/dist/config/root-config.js +159 -0
  107. package/dist/config/schema.json +278 -0
  108. package/dist/config/serialization-module.schema.json +127 -0
  109. package/dist/config/telemetry.schema.json +21 -0
  110. package/dist/config/types.d.ts +245 -0
  111. package/dist/config/types.d.ts.map +1 -0
  112. package/dist/config/types.js +19 -0
  113. package/dist/config/validation.d.ts +10 -0
  114. package/dist/config/validation.d.ts.map +1 -0
  115. package/dist/config/validation.js +43 -0
  116. package/dist/deploy/api/common/headers.d.ts +2 -0
  117. package/dist/deploy/api/common/headers.d.ts.map +1 -0
  118. package/dist/deploy/api/common/headers.js +10 -0
  119. package/dist/deploy/api/common/index.d.ts +4 -0
  120. package/dist/deploy/api/common/index.d.ts.map +1 -0
  121. package/dist/deploy/api/common/index.js +19 -0
  122. package/dist/deploy/api/common/request.d.ts +9 -0
  123. package/dist/deploy/api/common/request.d.ts.map +1 -0
  124. package/dist/deploy/api/common/request.js +253 -0
  125. package/dist/deploy/api/common/types.d.ts +44 -0
  126. package/dist/deploy/api/common/types.d.ts.map +1 -0
  127. package/dist/deploy/api/common/types.js +5 -0
  128. package/dist/deploy/api/common.d.ts +2 -0
  129. package/dist/deploy/api/common.d.ts.map +1 -0
  130. package/dist/deploy/api/common.js +17 -0
  131. package/dist/deploy/api/deployment-logs.d.ts +2 -0
  132. package/dist/deploy/api/deployment-logs.d.ts.map +1 -0
  133. package/dist/deploy/api/deployment-logs.js +23 -0
  134. package/dist/deploy/api/deployments.d.ts +9 -0
  135. package/dist/deploy/api/deployments.d.ts.map +1 -0
  136. package/dist/deploy/api/deployments.js +61 -0
  137. package/dist/deploy/api/environments.d.ts +21 -0
  138. package/dist/deploy/api/environments.d.ts.map +1 -0
  139. package/dist/deploy/api/environments.js +67 -0
  140. package/dist/deploy/api/index.d.ts +9 -0
  141. package/dist/deploy/api/index.d.ts.map +1 -0
  142. package/dist/deploy/api/index.js +24 -0
  143. package/dist/deploy/api/logs.d.ts +8 -0
  144. package/dist/deploy/api/logs.d.ts.map +1 -0
  145. package/dist/deploy/api/logs.js +29 -0
  146. package/dist/deploy/api/organizations.d.ts +6 -0
  147. package/dist/deploy/api/organizations.d.ts.map +1 -0
  148. package/dist/deploy/api/organizations.js +18 -0
  149. package/dist/deploy/api/projects.d.ts +13 -0
  150. package/dist/deploy/api/projects.d.ts.map +1 -0
  151. package/dist/deploy/api/projects.js +42 -0
  152. package/dist/deploy/api/source-control.d.ts +15 -0
  153. package/dist/deploy/api/source-control.d.ts.map +1 -0
  154. package/dist/deploy/api/source-control.js +71 -0
  155. package/dist/deploy/api.d.ts +2 -0
  156. package/dist/deploy/api.d.ts.map +1 -0
  157. package/dist/deploy/api.js +17 -0
  158. package/dist/deploy/tasks/deployment-result.d.ts +6 -0
  159. package/dist/deploy/tasks/deployment-result.d.ts.map +1 -0
  160. package/dist/deploy/tasks/deployment-result.js +36 -0
  161. package/dist/deploy/tasks/deployments.d.ts +10 -0
  162. package/dist/deploy/tasks/deployments.d.ts.map +1 -0
  163. package/dist/deploy/tasks/deployments.js +201 -0
  164. package/dist/deploy/tasks/editing-host.d.ts +28 -0
  165. package/dist/deploy/tasks/editing-host.d.ts.map +1 -0
  166. package/dist/deploy/tasks/editing-host.js +216 -0
  167. package/dist/deploy/tasks/environments.d.ts +20 -0
  168. package/dist/deploy/tasks/environments.d.ts.map +1 -0
  169. package/dist/deploy/tasks/environments.js +364 -0
  170. package/dist/deploy/tasks/index.d.ts +10 -0
  171. package/dist/deploy/tasks/index.d.ts.map +1 -0
  172. package/dist/deploy/tasks/index.js +25 -0
  173. package/dist/deploy/tasks/logs.d.ts +5 -0
  174. package/dist/deploy/tasks/logs.d.ts.map +1 -0
  175. package/dist/deploy/tasks/logs.js +56 -0
  176. package/dist/deploy/tasks/organizations.d.ts +6 -0
  177. package/dist/deploy/tasks/organizations.d.ts.map +1 -0
  178. package/dist/deploy/tasks/organizations.js +51 -0
  179. package/dist/deploy/tasks/projects.d.ts +11 -0
  180. package/dist/deploy/tasks/projects.d.ts.map +1 -0
  181. package/dist/deploy/tasks/projects.js +246 -0
  182. package/dist/deploy/tasks/shared.d.ts +63 -0
  183. package/dist/deploy/tasks/shared.d.ts.map +1 -0
  184. package/dist/deploy/tasks/shared.js +261 -0
  185. package/dist/deploy/tasks/site-bind.d.ts +21 -0
  186. package/dist/deploy/tasks/site-bind.d.ts.map +1 -0
  187. package/dist/deploy/tasks/site-bind.js +142 -0
  188. package/dist/deploy/tasks/site.d.ts +14 -0
  189. package/dist/deploy/tasks/site.d.ts.map +1 -0
  190. package/dist/deploy/tasks/site.js +29 -0
  191. package/dist/deploy/tasks/source-control.d.ts +14 -0
  192. package/dist/deploy/tasks/source-control.d.ts.map +1 -0
  193. package/dist/deploy/tasks/source-control.js +173 -0
  194. package/dist/deploy/tasks/types.d.ts +204 -0
  195. package/dist/deploy/tasks/types.d.ts.map +1 -0
  196. package/dist/deploy/tasks/types.js +7 -0
  197. package/dist/deploy/tasks.d.ts +3 -0
  198. package/dist/deploy/tasks.d.ts.map +1 -0
  199. package/dist/deploy/tasks.js +18 -0
  200. package/dist/recipe/api/auth.d.ts +9 -0
  201. package/dist/recipe/api/auth.d.ts.map +1 -0
  202. package/dist/recipe/api/auth.js +12 -0
  203. package/dist/recipe/api/authoring-client.d.ts +37 -0
  204. package/dist/recipe/api/authoring-client.d.ts.map +1 -0
  205. package/dist/recipe/api/authoring-client.js +495 -0
  206. package/dist/recipe/api/client.d.ts +99 -0
  207. package/dist/recipe/api/client.d.ts.map +1 -0
  208. package/dist/recipe/api/client.js +17 -0
  209. package/dist/recipe/api/graphql.d.ts +15 -0
  210. package/dist/recipe/api/graphql.d.ts.map +1 -0
  211. package/dist/recipe/api/graphql.js +38 -0
  212. package/dist/recipe/api/ref-encoding.d.ts +38 -0
  213. package/dist/recipe/api/ref-encoding.d.ts.map +1 -0
  214. package/dist/recipe/api/ref-encoding.js +160 -0
  215. package/dist/recipe/api/site-discovery.d.ts +49 -0
  216. package/dist/recipe/api/site-discovery.d.ts.map +1 -0
  217. package/dist/recipe/api/site-discovery.js +127 -0
  218. package/dist/recipe/api/sites-client.d.ts +48 -0
  219. package/dist/recipe/api/sites-client.d.ts.map +1 -0
  220. package/dist/recipe/api/sites-client.js +19 -0
  221. package/dist/recipe/cache.d.ts +36 -0
  222. package/dist/recipe/cache.d.ts.map +1 -0
  223. package/dist/recipe/cache.js +114 -0
  224. package/dist/recipe/compile/component-section.d.ts +46 -0
  225. package/dist/recipe/compile/component-section.d.ts.map +1 -0
  226. package/dist/recipe/compile/component-section.js +143 -0
  227. package/dist/recipe/compile/component-template.d.ts +34 -0
  228. package/dist/recipe/compile/component-template.d.ts.map +1 -0
  229. package/dist/recipe/compile/component-template.js +709 -0
  230. package/dist/recipe/compile/content-item.d.ts +31 -0
  231. package/dist/recipe/compile/content-item.d.ts.map +1 -0
  232. package/dist/recipe/compile/content-item.js +189 -0
  233. package/dist/recipe/compile/content-template.d.ts +18 -0
  234. package/dist/recipe/compile/content-template.d.ts.map +1 -0
  235. package/dist/recipe/compile/content-template.js +52 -0
  236. package/dist/recipe/compile/enumeration.d.ts +59 -0
  237. package/dist/recipe/compile/enumeration.d.ts.map +1 -0
  238. package/dist/recipe/compile/enumeration.js +236 -0
  239. package/dist/recipe/compile/page-design.d.ts +22 -0
  240. package/dist/recipe/compile/page-design.d.ts.map +1 -0
  241. package/dist/recipe/compile/page-design.js +93 -0
  242. package/dist/recipe/compile/parameters-template.d.ts +14 -0
  243. package/dist/recipe/compile/parameters-template.d.ts.map +1 -0
  244. package/dist/recipe/compile/parameters-template.js +92 -0
  245. package/dist/recipe/compile/partial-design.d.ts +18 -0
  246. package/dist/recipe/compile/partial-design.d.ts.map +1 -0
  247. package/dist/recipe/compile/partial-design.js +76 -0
  248. package/dist/recipe/compile/section-definition.d.ts +18 -0
  249. package/dist/recipe/compile/section-definition.d.ts.map +1 -0
  250. package/dist/recipe/compile/section-definition.js +26 -0
  251. package/dist/recipe/compile/shared.d.ts +442 -0
  252. package/dist/recipe/compile/shared.d.ts.map +1 -0
  253. package/dist/recipe/compile/shared.js +843 -0
  254. package/dist/recipe/compile/site-template.d.ts +52 -0
  255. package/dist/recipe/compile/site-template.d.ts.map +1 -0
  256. package/dist/recipe/compile/site-template.js +140 -0
  257. package/dist/recipe/compile/site.d.ts +44 -0
  258. package/dist/recipe/compile/site.d.ts.map +1 -0
  259. package/dist/recipe/compile/site.js +127 -0
  260. package/dist/recipe/compile.d.ts +93 -0
  261. package/dist/recipe/compile.d.ts.map +1 -0
  262. package/dist/recipe/compile.js +741 -0
  263. package/dist/recipe/execute.d.ts +119 -0
  264. package/dist/recipe/execute.d.ts.map +1 -0
  265. package/dist/recipe/execute.js +273 -0
  266. package/dist/recipe/guids.d.ts +400 -0
  267. package/dist/recipe/guids.d.ts.map +1 -0
  268. package/dist/recipe/guids.js +488 -0
  269. package/dist/recipe/index.d.ts +32 -0
  270. package/dist/recipe/index.d.ts.map +1 -0
  271. package/dist/recipe/index.js +156 -0
  272. package/dist/recipe/io.d.ts +21 -0
  273. package/dist/recipe/io.d.ts.map +1 -0
  274. package/dist/recipe/io.js +147 -0
  275. package/dist/recipe/ir/operations.d.ts +692 -0
  276. package/dist/recipe/ir/operations.d.ts.map +1 -0
  277. package/dist/recipe/ir/operations.js +347 -0
  278. package/dist/recipe/ir/sitecore-templates.d.ts +455 -0
  279. package/dist/recipe/ir/sitecore-templates.d.ts.map +1 -0
  280. package/dist/recipe/ir/sitecore-templates.js +465 -0
  281. package/dist/recipe/layout/emit.d.ts +101 -0
  282. package/dist/recipe/layout/emit.d.ts.map +1 -0
  283. package/dist/recipe/layout/emit.js +127 -0
  284. package/dist/recipe/layout/templates-mapping.d.ts +28 -0
  285. package/dist/recipe/layout/templates-mapping.d.ts.map +1 -0
  286. package/dist/recipe/layout/templates-mapping.js +29 -0
  287. package/dist/recipe/plan.d.ts +134 -0
  288. package/dist/recipe/plan.d.ts.map +1 -0
  289. package/dist/recipe/plan.js +565 -0
  290. package/dist/recipe/policy.d.ts +43 -0
  291. package/dist/recipe/policy.d.ts.map +1 -0
  292. package/dist/recipe/policy.js +75 -0
  293. package/dist/recipe/rollback.d.ts +72 -0
  294. package/dist/recipe/rollback.d.ts.map +1 -0
  295. package/dist/recipe/rollback.js +130 -0
  296. package/dist/recipe/schema/field-types.d.ts +72 -0
  297. package/dist/recipe/schema/field-types.d.ts.map +1 -0
  298. package/dist/recipe/schema/field-types.js +118 -0
  299. package/dist/recipe/schema/recipe.d.ts +1545 -0
  300. package/dist/recipe/schema/recipe.d.ts.map +1 -0
  301. package/dist/recipe/schema/recipe.js +1175 -0
  302. package/dist/recipe/schema/source-fields.d.ts +48 -0
  303. package/dist/recipe/schema/source-fields.d.ts.map +1 -0
  304. package/dist/recipe/schema/source-fields.js +79 -0
  305. package/dist/recipe/tasks/compile.d.ts +14 -0
  306. package/dist/recipe/tasks/compile.d.ts.map +1 -0
  307. package/dist/recipe/tasks/compile.js +89 -0
  308. package/dist/recipe/tasks/diff.d.ts +17 -0
  309. package/dist/recipe/tasks/diff.d.ts.map +1 -0
  310. package/dist/recipe/tasks/diff.js +6 -0
  311. package/dist/recipe/tasks/index.d.ts +9 -0
  312. package/dist/recipe/tasks/index.d.ts.map +1 -0
  313. package/dist/recipe/tasks/index.js +13 -0
  314. package/dist/recipe/tasks/placeholder-allow.d.ts +53 -0
  315. package/dist/recipe/tasks/placeholder-allow.d.ts.map +1 -0
  316. package/dist/recipe/tasks/placeholder-allow.js +218 -0
  317. package/dist/recipe/tasks/plan.d.ts +11 -0
  318. package/dist/recipe/tasks/plan.d.ts.map +1 -0
  319. package/dist/recipe/tasks/plan.js +72 -0
  320. package/dist/recipe/tasks/prune-defaults.d.ts +90 -0
  321. package/dist/recipe/tasks/prune-defaults.d.ts.map +1 -0
  322. package/dist/recipe/tasks/prune-defaults.js +184 -0
  323. package/dist/recipe/tasks/push.d.ts +18 -0
  324. package/dist/recipe/tasks/push.d.ts.map +1 -0
  325. package/dist/recipe/tasks/push.js +417 -0
  326. package/dist/recipe/tasks/shared.d.ts +152 -0
  327. package/dist/recipe/tasks/shared.d.ts.map +1 -0
  328. package/dist/recipe/tasks/shared.js +94 -0
  329. package/dist/recipe/validate.d.ts +103 -0
  330. package/dist/recipe/validate.d.ts.map +1 -0
  331. package/dist/recipe/validate.js +297 -0
  332. package/dist/serialization/commands.d.ts +48 -0
  333. package/dist/serialization/commands.d.ts.map +1 -0
  334. package/dist/serialization/commands.js +175 -0
  335. package/dist/serialization/compare.d.ts +29 -0
  336. package/dist/serialization/compare.d.ts.map +1 -0
  337. package/dist/serialization/compare.js +124 -0
  338. package/dist/serialization/field-filter.d.ts +7 -0
  339. package/dist/serialization/field-filter.d.ts.map +1 -0
  340. package/dist/serialization/field-filter.js +20 -0
  341. package/dist/serialization/filesystem-store/constants.d.ts +3 -0
  342. package/dist/serialization/filesystem-store/constants.d.ts.map +1 -0
  343. package/dist/serialization/filesystem-store/constants.js +5 -0
  344. package/dist/serialization/filesystem-store/index.d.ts +4 -0
  345. package/dist/serialization/filesystem-store/index.d.ts.map +1 -0
  346. package/dist/serialization/filesystem-store/index.js +15 -0
  347. package/dist/serialization/filesystem-store/items.d.ts +10 -0
  348. package/dist/serialization/filesystem-store/items.d.ts.map +1 -0
  349. package/dist/serialization/filesystem-store/items.js +64 -0
  350. package/dist/serialization/filesystem-store/roles.d.ts +6 -0
  351. package/dist/serialization/filesystem-store/roles.d.ts.map +1 -0
  352. package/dist/serialization/filesystem-store/roles.js +46 -0
  353. package/dist/serialization/filesystem-store/users.d.ts +6 -0
  354. package/dist/serialization/filesystem-store/users.d.ts.map +1 -0
  355. package/dist/serialization/filesystem-store/users.js +46 -0
  356. package/dist/serialization/filesystem-store/utils.d.ts +2 -0
  357. package/dist/serialization/filesystem-store/utils.d.ts.map +1 -0
  358. package/dist/serialization/filesystem-store/utils.js +17 -0
  359. package/dist/serialization/filesystem-store.d.ts +2 -0
  360. package/dist/serialization/filesystem-store.d.ts.map +1 -0
  361. package/dist/serialization/filesystem-store.js +17 -0
  362. package/dist/serialization/item-path.d.ts +32 -0
  363. package/dist/serialization/item-path.d.ts.map +1 -0
  364. package/dist/serialization/item-path.js +123 -0
  365. package/dist/serialization/path-provider.d.ts +12 -0
  366. package/dist/serialization/path-provider.d.ts.map +1 -0
  367. package/dist/serialization/path-provider.js +271 -0
  368. package/dist/serialization/signature.d.ts +4 -0
  369. package/dist/serialization/signature.d.ts.map +1 -0
  370. package/dist/serialization/signature.js +71 -0
  371. package/dist/serialization/sitecore-api/auth.d.ts +31 -0
  372. package/dist/serialization/sitecore-api/auth.d.ts.map +1 -0
  373. package/dist/serialization/sitecore-api/auth.js +319 -0
  374. package/dist/serialization/sitecore-api/graphql.d.ts +12 -0
  375. package/dist/serialization/sitecore-api/graphql.d.ts.map +1 -0
  376. package/dist/serialization/sitecore-api/graphql.js +20 -0
  377. package/dist/serialization/sitecore-api/history.d.ts +9 -0
  378. package/dist/serialization/sitecore-api/history.d.ts.map +1 -0
  379. package/dist/serialization/sitecore-api/history.js +36 -0
  380. package/dist/serialization/sitecore-api/index.d.ts +7 -0
  381. package/dist/serialization/sitecore-api/index.d.ts.map +1 -0
  382. package/dist/serialization/sitecore-api/index.js +22 -0
  383. package/dist/serialization/sitecore-api/items.d.ts +8 -0
  384. package/dist/serialization/sitecore-api/items.d.ts.map +1 -0
  385. package/dist/serialization/sitecore-api/items.js +132 -0
  386. package/dist/serialization/sitecore-api/publish.d.ts +14 -0
  387. package/dist/serialization/sitecore-api/publish.d.ts.map +1 -0
  388. package/dist/serialization/sitecore-api/publish.js +43 -0
  389. package/dist/serialization/sitecore-api/roles.d.ts +9 -0
  390. package/dist/serialization/sitecore-api/roles.d.ts.map +1 -0
  391. package/dist/serialization/sitecore-api/roles.js +42 -0
  392. package/dist/serialization/sitecore-api/users.d.ts +9 -0
  393. package/dist/serialization/sitecore-api/users.d.ts.map +1 -0
  394. package/dist/serialization/sitecore-api/users.js +62 -0
  395. package/dist/serialization/sitecore-api.d.ts +2 -0
  396. package/dist/serialization/sitecore-api.d.ts.map +1 -0
  397. package/dist/serialization/sitecore-api.js +17 -0
  398. package/dist/serialization/tasks/diff.d.ts +3 -0
  399. package/dist/serialization/tasks/diff.d.ts.map +1 -0
  400. package/dist/serialization/tasks/diff.js +109 -0
  401. package/dist/serialization/tasks/env/constants.d.ts +2 -0
  402. package/dist/serialization/tasks/env/constants.d.ts.map +1 -0
  403. package/dist/serialization/tasks/env/constants.js +4 -0
  404. package/dist/serialization/tasks/env/deploy-token.d.ts +3 -0
  405. package/dist/serialization/tasks/env/deploy-token.d.ts.map +1 -0
  406. package/dist/serialization/tasks/env/deploy-token.js +128 -0
  407. package/dist/serialization/tasks/env/index.d.ts +5 -0
  408. package/dist/serialization/tasks/env/index.d.ts.map +1 -0
  409. package/dist/serialization/tasks/env/index.js +11 -0
  410. package/dist/serialization/tasks/env/init/auth.d.ts +24 -0
  411. package/dist/serialization/tasks/env/init/auth.d.ts.map +1 -0
  412. package/dist/serialization/tasks/env/init/auth.js +122 -0
  413. package/dist/serialization/tasks/env/init/deploy-lookup.d.ts +22 -0
  414. package/dist/serialization/tasks/env/init/deploy-lookup.d.ts.map +1 -0
  415. package/dist/serialization/tasks/env/init/deploy-lookup.js +244 -0
  416. package/dist/serialization/tasks/env/init.d.ts +3 -0
  417. package/dist/serialization/tasks/env/init.d.ts.map +1 -0
  418. package/dist/serialization/tasks/env/init.js +253 -0
  419. package/dist/serialization/tasks/env/logout.d.ts +3 -0
  420. package/dist/serialization/tasks/env/logout.d.ts.map +1 -0
  421. package/dist/serialization/tasks/env/logout.js +61 -0
  422. package/dist/serialization/tasks/env/status.d.ts +3 -0
  423. package/dist/serialization/tasks/env/status.d.ts.map +1 -0
  424. package/dist/serialization/tasks/env/status.js +149 -0
  425. package/dist/serialization/tasks/env.d.ts +2 -0
  426. package/dist/serialization/tasks/env.d.ts.map +1 -0
  427. package/dist/serialization/tasks/env.js +17 -0
  428. package/dist/serialization/tasks/helpers/collect.d.ts +8 -0
  429. package/dist/serialization/tasks/helpers/collect.d.ts.map +1 -0
  430. package/dist/serialization/tasks/helpers/collect.js +29 -0
  431. package/dist/serialization/tasks/helpers/commands.d.ts +5 -0
  432. package/dist/serialization/tasks/helpers/commands.d.ts.map +1 -0
  433. package/dist/serialization/tasks/helpers/commands.js +14 -0
  434. package/dist/serialization/tasks/helpers/filesystem.d.ts +6 -0
  435. package/dist/serialization/tasks/helpers/filesystem.d.ts.map +1 -0
  436. package/dist/serialization/tasks/helpers/filesystem.js +27 -0
  437. package/dist/serialization/tasks/helpers/index.d.ts +6 -0
  438. package/dist/serialization/tasks/helpers/index.d.ts.map +1 -0
  439. package/dist/serialization/tasks/helpers/index.js +13 -0
  440. package/dist/serialization/tasks/helpers/items.d.ts +3 -0
  441. package/dist/serialization/tasks/helpers/items.d.ts.map +1 -0
  442. package/dist/serialization/tasks/helpers/items.js +5 -0
  443. package/dist/serialization/tasks/helpers/sitecore.d.ts +5 -0
  444. package/dist/serialization/tasks/helpers/sitecore.d.ts.map +1 -0
  445. package/dist/serialization/tasks/helpers/sitecore.js +109 -0
  446. package/dist/serialization/tasks/helpers.d.ts +2 -0
  447. package/dist/serialization/tasks/helpers.d.ts.map +1 -0
  448. package/dist/serialization/tasks/helpers.js +17 -0
  449. package/dist/serialization/tasks/index.d.ts +8 -0
  450. package/dist/serialization/tasks/index.d.ts.map +1 -0
  451. package/dist/serialization/tasks/index.js +19 -0
  452. package/dist/serialization/tasks/info.d.ts +4 -0
  453. package/dist/serialization/tasks/info.d.ts.map +1 -0
  454. package/dist/serialization/tasks/info.js +82 -0
  455. package/dist/serialization/tasks/package.d.ts +4 -0
  456. package/dist/serialization/tasks/package.d.ts.map +1 -0
  457. package/dist/serialization/tasks/package.js +171 -0
  458. package/dist/serialization/tasks/pull.d.ts +3 -0
  459. package/dist/serialization/tasks/pull.d.ts.map +1 -0
  460. package/dist/serialization/tasks/pull.js +82 -0
  461. package/dist/serialization/tasks/push.d.ts +3 -0
  462. package/dist/serialization/tasks/push.d.ts.map +1 -0
  463. package/dist/serialization/tasks/push.js +101 -0
  464. package/dist/serialization/tasks/roles.d.ts +6 -0
  465. package/dist/serialization/tasks/roles.d.ts.map +1 -0
  466. package/dist/serialization/tasks/roles.js +103 -0
  467. package/dist/serialization/tasks/shared.d.ts +19 -0
  468. package/dist/serialization/tasks/shared.d.ts.map +1 -0
  469. package/dist/serialization/tasks/shared.js +59 -0
  470. package/dist/serialization/tasks/types.d.ts +73 -0
  471. package/dist/serialization/tasks/types.d.ts.map +1 -0
  472. package/dist/serialization/tasks/types.js +8 -0
  473. package/dist/serialization/tasks/users.d.ts +5 -0
  474. package/dist/serialization/tasks/users.d.ts.map +1 -0
  475. package/dist/serialization/tasks/users.js +90 -0
  476. package/dist/serialization/tasks/validate.d.ts +5 -0
  477. package/dist/serialization/tasks/validate.d.ts.map +1 -0
  478. package/dist/serialization/tasks/validate.js +50 -0
  479. package/dist/serialization/tasks/watch.d.ts +3 -0
  480. package/dist/serialization/tasks/watch.d.ts.map +1 -0
  481. package/dist/serialization/tasks/watch.js +75 -0
  482. package/dist/serialization/tasks.d.ts +4 -0
  483. package/dist/serialization/tasks.d.ts.map +1 -0
  484. package/dist/serialization/tasks.js +19 -0
  485. package/dist/serialization/tree-spec.d.ts +51 -0
  486. package/dist/serialization/tree-spec.d.ts.map +1 -0
  487. package/dist/serialization/tree-spec.js +241 -0
  488. package/dist/serialization/types.d.ts +75 -0
  489. package/dist/serialization/types.d.ts.map +1 -0
  490. package/dist/serialization/types.js +2 -0
  491. package/dist/serialization/wildcard.d.ts +3 -0
  492. package/dist/serialization/wildcard.d.ts.map +1 -0
  493. package/dist/serialization/wildcard.js +24 -0
  494. package/dist/serialization/yaml.d.ts +9 -0
  495. package/dist/serialization/yaml.d.ts.map +1 -0
  496. package/dist/serialization/yaml.js +307 -0
  497. package/dist/shared/browser.d.ts +2 -0
  498. package/dist/shared/browser.d.ts.map +1 -0
  499. package/dist/shared/browser.js +36 -0
  500. package/dist/shared/cli-options.d.ts +17 -0
  501. package/dist/shared/cli-options.d.ts.map +1 -0
  502. package/dist/shared/cli-options.js +8 -0
  503. package/dist/shared/cli-tasks.d.ts +38 -0
  504. package/dist/shared/cli-tasks.d.ts.map +1 -0
  505. package/dist/shared/cli-tasks.js +108 -0
  506. package/dist/shared/config-template.d.ts +23 -0
  507. package/dist/shared/config-template.d.ts.map +1 -0
  508. package/dist/shared/config-template.js +38 -0
  509. package/dist/shared/env.d.ts +28 -0
  510. package/dist/shared/env.d.ts.map +1 -0
  511. package/dist/shared/env.js +38 -0
  512. package/dist/shared/errors.d.ts +21 -0
  513. package/dist/shared/errors.d.ts.map +1 -0
  514. package/dist/shared/errors.js +59 -0
  515. package/dist/shared/graphql.d.ts +76 -0
  516. package/dist/shared/graphql.d.ts.map +1 -0
  517. package/dist/shared/graphql.js +222 -0
  518. package/dist/shared/history.d.ts +12 -0
  519. package/dist/shared/history.d.ts.map +1 -0
  520. package/dist/shared/history.js +62 -0
  521. package/dist/shared/keychain.d.ts +15 -0
  522. package/dist/shared/keychain.d.ts.map +1 -0
  523. package/dist/shared/keychain.js +177 -0
  524. package/dist/shared/logger.d.ts +24 -0
  525. package/dist/shared/logger.d.ts.map +1 -0
  526. package/dist/shared/logger.js +157 -0
  527. package/dist/shared/output.d.ts +7 -0
  528. package/dist/shared/output.d.ts.map +1 -0
  529. package/dist/shared/output.js +21 -0
  530. package/dist/shared/prompt.d.ts +5 -0
  531. package/dist/shared/prompt.d.ts.map +1 -0
  532. package/dist/shared/prompt.js +87 -0
  533. package/dist/shared/redact.d.ts +3 -0
  534. package/dist/shared/redact.d.ts.map +1 -0
  535. package/dist/shared/redact.js +47 -0
  536. package/dist/shared/spinner.d.ts +5 -0
  537. package/dist/shared/spinner.d.ts.map +1 -0
  538. package/dist/shared/spinner.js +89 -0
  539. package/dist/shared/style.d.ts +2 -0
  540. package/dist/shared/style.d.ts.map +1 -0
  541. package/dist/shared/style.js +61 -0
  542. package/dist/shared/telemetry.d.ts +21 -0
  543. package/dist/shared/telemetry.d.ts.map +1 -0
  544. package/dist/shared/telemetry.js +226 -0
  545. package/dist/shared/validate.d.ts +3 -0
  546. package/dist/shared/validate.d.ts.map +1 -0
  547. package/dist/shared/validate.js +32 -0
  548. package/dist/sites/api/collections.d.ts +25 -0
  549. package/dist/sites/api/collections.d.ts.map +1 -0
  550. package/dist/sites/api/collections.js +21 -0
  551. package/dist/sites/api/index.d.ts +26 -0
  552. package/dist/sites/api/index.d.ts.map +1 -0
  553. package/dist/sites/api/index.js +55 -0
  554. package/dist/sites/api/jobs.d.ts +31 -0
  555. package/dist/sites/api/jobs.d.ts.map +1 -0
  556. package/dist/sites/api/jobs.js +10 -0
  557. package/dist/sites/api/languages.d.ts +22 -0
  558. package/dist/sites/api/languages.d.ts.map +1 -0
  559. package/dist/sites/api/languages.js +18 -0
  560. package/dist/sites/api/request.d.ts +24 -0
  561. package/dist/sites/api/request.d.ts.map +1 -0
  562. package/dist/sites/api/request.js +99 -0
  563. package/dist/sites/api/sites.d.ts +53 -0
  564. package/dist/sites/api/sites.d.ts.map +1 -0
  565. package/dist/sites/api/sites.js +41 -0
  566. package/dist/sites/api/types.d.ts +29 -0
  567. package/dist/sites/api/types.d.ts.map +1 -0
  568. package/dist/sites/api/types.js +4 -0
  569. package/package.json +109 -0
@@ -0,0 +1,1175 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RecipeSchema = exports.EnumerationRecipeSchema = exports.EnumerationValueSchema = exports.SiteRecipeSchema = exports.SiteGroupingSchema = exports.SiteTemplateRecipeSchema = exports.SiteTemplateTaxonomyEntrySchema = exports.SiteTemplateDictionaryEntrySchema = exports.PageDesignRecipeSchema = exports.PartialDesignRecipeSchema = exports.LayoutSchema = exports.ComponentPlacementSchema = exports.ContentItemRecipeSchema = exports.ContentFieldValueSchema = exports.SectionDefinitionRecipeSchema = exports.ParametersTemplateRecipeSchema = exports.ContentTemplateRecipeSchema = exports.RecipeMetaSchema = exports.RecipeMetaTaxSchema = exports.ComponentTemplateRecipeSchema = exports.ComponentSectionRecipeSchema = exports.RecipeDatasourceSchema = exports.RenderingDatasourceLocationSchema = exports.PlaceholderDefinitionSchema = exports.RenderingVariantDefinitionSchema = exports.ParamDefinitionSchema = exports.FieldDefinitionSchema = exports.SitecoreFieldAugmentSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const field_types_1 = require("./field-types");
6
+ /**
7
+ * Recipe author surface — what users hand-author for one Sitecore template.
8
+ *
9
+ * Two recipe kinds:
10
+ *
11
+ * ComponentTemplateRecipe — Has a rendering. Becomes a placeable component
12
+ * on Sitecore pages. Owns its datasource template
13
+ * AND its rendering item.
14
+ * ContentTemplateRecipe — Fields only, no rendering. A data shape
15
+ * referenced by other recipes (Treelist source,
16
+ * child-item pattern, etc.). Not placeable on a
17
+ * page directly.
18
+ *
19
+ * Component recipes have three peer buckets reflecting the Sitecore mechanism
20
+ * each piece of state uses:
21
+ *
22
+ * fields Datasource fields — per-content, reusable across placements.
23
+ * variants SXA Rendering Variants — items under <Rendering>/Variants,
24
+ * selected per-placement via the FieldNames parameter. Maps
25
+ * to a CVA component's `variant` axis.
26
+ * params Plain Rendering Parameters — key/value on the placement,
27
+ * not shared. Maps to orthogonal CVA modifiers (size, color).
28
+ *
29
+ * Both kinds may declare `insertOptions: string[]` — recipe handles whose
30
+ * templates are allowed as direct children of this datasource item (the
31
+ * child-item pattern, e.g. accordion → accordion-items).
32
+ *
33
+ * **This schema must stay in sync with the registry's working copy at
34
+ * `<registry>/src/lib/registry/sitecore-recipes.ts`.** Once scai exposes a
35
+ * typed recipe export, the registry imports from scai and the duplication
36
+ * goes away.
37
+ *
38
+ * The `handle` is load-bearing forever — a uuidv5 derives every item GUID
39
+ * from it (see `guids.ts`), so renaming a handle creates a *different*
40
+ * template.
41
+ */
42
+ const HANDLE_PATTERN = /^[a-z][a-z0-9-]*@[0-9]+$/;
43
+ /**
44
+ * Sitecore-side override on a field or param. Defaults apply when omitted.
45
+ *
46
+ * The picker-scope concept (Sitecore's `Source` field) is expressed as
47
+ * three composable structured fields rather than a stringly-typed
48
+ * mini-language. They combine: e.g. `sourceScope` + `sourceTypes` becomes
49
+ * `DataSource=<path>&IncludeTemplatesForSelection={GUID},...` on emit.
50
+ *
51
+ * sourceTypes — "picker filter": only items of these recipe handles.
52
+ * sourceQuery — "where to look": a Sitecore Query (e.g. `$site/...`).
53
+ * sourceScope — "where to look": a fixed content-tree path.
54
+ * sourceRaw — escape hatch; verbatim Source string (mutually exclusive
55
+ * with the structured fields).
56
+ */
57
+ exports.SitecoreFieldAugmentSchema = zod_1.z
58
+ .object({
59
+ /** Override the default shape→Sitecore type mapping. */
60
+ type: field_types_1.SitecoreFieldTypeSchema.optional(),
61
+ /**
62
+ * Picker filter: restrict to items conforming to one of these recipe
63
+ * handles. Compiler resolves each handle to its deterministic template
64
+ * GUID and emits `IncludeTemplatesForSelection={GUID},{GUID}`.
65
+ */
66
+ sourceTypes: zod_1.z.array(zod_1.z.string()).optional(),
67
+ /**
68
+ * Where to look: a Sitecore Query (e.g. `$site/*[@@name='Data']`).
69
+ * Standalone, becomes the entire Source as `query:<query>` (the
70
+ * shorthand Sitecore evaluates directly for Droplist-style fields).
71
+ * Combined with `sourceTypes`, becomes `DataSource=query:<query>&...`.
72
+ */
73
+ sourceQuery: zod_1.z.string().optional(),
74
+ /**
75
+ * Where to look: a fixed Sitecore content-tree path. Emitted as
76
+ * `DataSource=<path>`, alone or combined with `sourceTypes`.
77
+ */
78
+ sourceScope: zod_1.z.string().optional(),
79
+ /**
80
+ * Escape hatch: verbatim Source string. Mutually exclusive with the
81
+ * structured fields above. Use when you need a Source form that
82
+ * doesn't fit the structured surface (e.g. a bare path Treelist
83
+ * source like `/sitecore/content/Tags`).
84
+ */
85
+ sourceRaw: zod_1.z.string().optional(),
86
+ /** Author-facing hint surfaced in the CMS. */
87
+ hint: zod_1.z.string().optional(),
88
+ /** Required marker (translates to a Sitecore validation rule). */
89
+ required: zod_1.z.boolean().optional(),
90
+ /** Default value via the template's __Standard Values item. */
91
+ defaultValue: zod_1.z.string().optional(),
92
+ /**
93
+ * For enum-shaped fields: handle of an `EnumerationRecipe` whose
94
+ * value items back this field's dropdown. When set, the compiler:
95
+ * - emits `Type: Droplink` and `Source: <enum's content path>`
96
+ * so the editor enumerates the shared enum's child items;
97
+ * - resolves the field's `default` against that enum's value
98
+ * items (so `default: "primary"` becomes a GUID reference to
99
+ * the corresponding value item).
100
+ *
101
+ * Inline enums (no `enumHandle`) get value items emitted as
102
+ * children of the field-definition itself, scoped to the field.
103
+ * Use `enumHandle` for shared enums (color schemes, size scales,
104
+ * spacing scales) so adding/renaming a value updates every
105
+ * referencing field on the next push.
106
+ */
107
+ enumHandle: zod_1.z.string().regex(HANDLE_PATTERN).optional(),
108
+ /** Ordinal within the section/params block; auto-assigned 100/200/… if omitted. */
109
+ sortOrder: zod_1.z.number().int().optional(),
110
+ /**
111
+ * Section name to group this field under (only meaningful for `fields`,
112
+ * not `params`/`variants`). Defaults to "Content".
113
+ */
114
+ section: zod_1.z.string().optional(),
115
+ })
116
+ .refine((v) => v.sourceRaw === undefined ||
117
+ (v.sourceTypes === undefined && v.sourceQuery === undefined && v.sourceScope === undefined), {
118
+ message: "sourceRaw is mutually exclusive with sourceTypes/sourceQuery/sourceScope",
119
+ path: ["sourceRaw"],
120
+ });
121
+ exports.FieldDefinitionSchema = zod_1.z.object({
122
+ name: zod_1.z.string().min(1),
123
+ shape: field_types_1.FieldShapeSchema,
124
+ /** Required when `shape === "enum"` — the enumerated values. */
125
+ values: zod_1.z.array(zod_1.z.string()).optional(),
126
+ /** For `shape === "reference"`: false = single (Droplink), true = multi (Treelist). */
127
+ multiple: zod_1.z.boolean().optional(),
128
+ /** Default value at the abstract layer (also passable via `sitecore.defaultValue`). */
129
+ default: zod_1.z.string().optional(),
130
+ sitecore: exports.SitecoreFieldAugmentSchema.optional(),
131
+ });
132
+ exports.ParamDefinitionSchema = zod_1.z.object({
133
+ name: zod_1.z.string().min(1),
134
+ shape: field_types_1.FieldShapeSchema,
135
+ values: zod_1.z.array(zod_1.z.string()).optional(),
136
+ default: zod_1.z.string().optional(),
137
+ sitecore: exports.SitecoreFieldAugmentSchema.optional(),
138
+ });
139
+ /**
140
+ * Phase 1 = Variants Lite: bare Variant item per `name`, no internal
141
+ * structure. Phase 2+ may add per-variant template-card bindings for full
142
+ * SXA NVELOPe authoring.
143
+ *
144
+ * `name` MUST be PascalCase. The Sitecore Content SDK looks up variants
145
+ * at render time via case-sensitive `component[name]` indexing on the
146
+ * component module's named exports, and React convention requires
147
+ * exported component identifiers to be PascalCase. Using lowercase or
148
+ * kebab-case here makes the SDK's variant lookup return `undefined` —
149
+ * Pages then renders the missing-component fallback.
150
+ *
151
+ * The `Default` variant is special-cased by the SDK
152
+ * (`DEFAULT_EXPORT_NAME = "Default"`): when `params.FieldNames` matches
153
+ * that, the SDK falls through to `component.default || component.Default
154
+ * || component`, so any of those export shapes work for the default
155
+ * variant. All OTHER variant names require an exact-match named export
156
+ * in the component file (e.g. `name: "FullWidth"` → `export function
157
+ * FullWidth(...)`).
158
+ */
159
+ const VARIANT_NAME_PATTERN = /^[A-Z][A-Za-z0-9]*$/;
160
+ exports.RenderingVariantDefinitionSchema = zod_1.z.object({
161
+ name: zod_1.z.string().regex(VARIANT_NAME_PATTERN, {
162
+ message: "Variant `name` must be PascalCase (e.g. `Default`, `FullWidth`) — the Content SDK uses it as a case-sensitive key into the component module's named exports.",
163
+ }),
164
+ });
165
+ exports.PlaceholderDefinitionSchema = zod_1.z.object({
166
+ /** Placeholder key string used in layout XML. */
167
+ key: zod_1.z.string().min(1),
168
+ /** Optional restriction: only these rendering handles may drop here. */
169
+ allowedRenderingHandles: zod_1.z.array(zod_1.z.string()).optional(),
170
+ });
171
+ /**
172
+ * One entry in the modern semantic-scope datasource locations list.
173
+ *
174
+ * Each entry compiles to a single Sitecore Source segment; the compiler
175
+ * pipe-joins entries into the rendering's `Datasource Location` field so
176
+ * one rendering can offer authors per-page auto-creation AND a shared
177
+ * site-level pool of datasources to pick from.
178
+ *
179
+ * - `page` → relative `./Data` (no subfolder) or `./Data/<subfolder>`.
180
+ * SXA materialises the `Data` and `<subfolder>` items lazily on first
181
+ * datasource creation; no extra CreateItem op is emitted.
182
+ * - `site` → absolute `<contentItemsRoot>` (no subfolder) or
183
+ * `<contentItemsRoot>/<subfolder>`. With `subfolder` the compiler
184
+ * emits a `CreateOnly` `CreateItem` for the data folder so the
185
+ * shared pool exists before any rendering tries to read from it.
186
+ */
187
+ exports.RenderingDatasourceLocationSchema = zod_1.z.discriminatedUnion("scope", [
188
+ zod_1.z.object({
189
+ scope: zod_1.z.literal("page"),
190
+ /** Optional `Data` subfolder; absent = `./Data`. */
191
+ subfolder: zod_1.z.string().min(1).optional(),
192
+ }),
193
+ zod_1.z.object({
194
+ scope: zod_1.z.literal("site"),
195
+ /**
196
+ * Optional subfolder under `<contentItemsRoot>`. When present the
197
+ * compiler emits a `CreateOnly` folder item so the shared pool is
198
+ * materialised once per recipe-set.
199
+ */
200
+ subfolder: zod_1.z.string().min(1).optional(),
201
+ }),
202
+ ]);
203
+ /**
204
+ * Top-level datasource block on `ComponentTemplateRecipe`. Captures
205
+ * everything the rendering needs to know about its datasource:
206
+ *
207
+ * - **template**: optional reference to a separate
208
+ * `ContentTemplateRecipe`. When set, the compiler points the
209
+ * rendering's Datasource Template field at that template (its
210
+ * fields land under `Content Models/<group>/<name>`). When unset,
211
+ * the component template itself is the datasource template (legacy
212
+ * inline-`fields:` pattern).
213
+ * - **autoCreate**: toggles `IsAutoDatasourceRendering=true` in the
214
+ * rendering's `OtherProperties` URL-encoded blob. Default true.
215
+ * - **openPropertiesAfterAdd**: opens the rendering parameters
216
+ * dialog right after the rendering is dropped on a page. Default
217
+ * false.
218
+ * - **locations**: semantic page/site scope entries — each compiles
219
+ * to one Sitecore Source segment (a relative `./Data/...` path or
220
+ * an absolute `<contentItemsRoot>/...` path).
221
+ * - **query**: raw Sitecore Source segments — included verbatim.
222
+ * Use `"query:$site/*[@@name='Data']/CustomPath"`-style entries for
223
+ * authors who need a Source shape that doesn't fit the semantic
224
+ * `locations` model.
225
+ *
226
+ * The compiler pipe-joins `locations` (resolved to paths) and `query`
227
+ * (verbatim) into the rendering's `Datasource Location` field.
228
+ */
229
+ exports.RecipeDatasourceSchema = zod_1.z.object({
230
+ /** Reference to a separate `ContentTemplateRecipe`. */
231
+ template: zod_1.z
232
+ .object({
233
+ handle: zod_1.z.string().regex(HANDLE_PATTERN, {
234
+ message: "datasource.template.handle must match `<kebab-name>@<major>`",
235
+ }),
236
+ })
237
+ .optional(),
238
+ /** Sets `IsAutoDatasourceRendering` in `OtherProperties`. Default true. */
239
+ autoCreate: zod_1.z.boolean().default(true),
240
+ /** Open the properties dialog after add. Default false. */
241
+ openPropertiesAfterAdd: zod_1.z.boolean().default(false),
242
+ /**
243
+ * Semantic-scope locations that compile to a path-style Sitecore
244
+ * Source segment each. Empty when only `query` entries are needed.
245
+ */
246
+ locations: zod_1.z.array(exports.RenderingDatasourceLocationSchema).default([]),
247
+ /**
248
+ * Raw Sitecore Source segments — included verbatim in the joined
249
+ * `Datasource Location` field. Each entry should be a complete
250
+ * segment (e.g. `"query:$site/*[@@name='Data']/Custom"` or
251
+ * `"fast:/sitecore/content/...//*[@@templatename='Foo']"`). Empty
252
+ * when only `locations` entries are needed.
253
+ */
254
+ query: zod_1.z.array(zod_1.z.string().min(1)).default([]),
255
+ });
256
+ /**
257
+ * Container for a related set of components in the Sitecore tree.
258
+ * Owns the SIX organisational items that previously emitted implicitly
259
+ * from `ComponentTemplateRecipe.section: string`:
260
+ *
261
+ * 1. Templates section folder — `<componentsRoot>/<name>/`
262
+ * 2. Component Folders bucket — `<componentsRoot>/<name>/Component Folders/`
263
+ * 3. Presentation Parameters bucket — `<componentsRoot>/<name>/Presentation Parameters/`
264
+ * 4. Renderings-tree section folder — `<renderingsRoot>/<name>/`
265
+ * 5. Headless Variants section — `<headlessVariantsRoot>/<name>/`
266
+ * 6. Available Renderings section — `<availableRenderingsRoot>/<name>` (built by
267
+ * the cross-recipe aggregator from every
268
+ * `ComponentTemplateRecipe` referencing this
269
+ * section by handle)
270
+ *
271
+ * `ComponentTemplateRecipe.section` references this recipe by handle
272
+ * (`section: { handle: "ui-section@1" }`); the compiler errors at
273
+ * INPUT_INVALID time if a component points at a section handle no
274
+ * `ComponentSectionRecipe` in the set defines.
275
+ */
276
+ exports.ComponentSectionRecipeSchema = zod_1.z.object({
277
+ kind: zod_1.z.literal("component-section"),
278
+ schemaVersion: zod_1.z.literal("1"),
279
+ /** Stable identifier of the form `<kebab-name>@<major>`, e.g. `ui-section@1`. */
280
+ handle: zod_1.z.string().regex(HANDLE_PATTERN, {
281
+ message: "handle must match `<kebab-name>@<major>`, e.g. ui-section@1",
282
+ }),
283
+ /** Folder name in the Sitecore tree (e.g. `"ui"`). */
284
+ name: zod_1.z.string().min(1),
285
+ /** Author-facing label (defaults to `name`). */
286
+ displayName: zod_1.z.string().min(1).optional(),
287
+ description: zod_1.z.string().optional(),
288
+ /** Defaults to `office/16x16/folder.png`. */
289
+ icon: zod_1.z.string().optional(),
290
+ /**
291
+ * Sort order across sections. Optional. Default = alphabetic by
292
+ * `name` (a–z). When `sortOrder` is set on any section in the set,
293
+ * sections with explicit values sort numerically first; ties and
294
+ * unset entries fall through to alphabetic by name.
295
+ */
296
+ sortOrder: zod_1.z.number().int().optional(),
297
+ });
298
+ exports.ComponentTemplateRecipeSchema = zod_1.z.object({
299
+ kind: zod_1.z.literal("component-template"),
300
+ schemaVersion: zod_1.z.literal("1"),
301
+ /** Stable identifier of the form `<kebab-name>@<major>`, e.g. `cta-button@1`. */
302
+ handle: zod_1.z.string().regex(HANDLE_PATTERN, {
303
+ message: "handle must match `<kebab-name>@<major>`, e.g. cta-button@1",
304
+ }),
305
+ /** Matches the React export name and the consumer's component-map.ts key. */
306
+ name: zod_1.z.string().min(1),
307
+ /** Author-facing label surfaced in the CMS tree and Pages experience. */
308
+ displayName: zod_1.z.string().min(1),
309
+ description: zod_1.z.string().optional(),
310
+ /** Defaults to "Office/32x32/document.png" if omitted. */
311
+ icon: zod_1.z.string().optional(),
312
+ /**
313
+ * Reference to a `ComponentSectionRecipe` whose section folders this
314
+ * component lives under. The referenced recipe owns the templates
315
+ * section folder, Component Folders bucket, Presentation Parameters
316
+ * bucket, renderings-tree section folder, Headless Variants section,
317
+ * and Available Renderings section item.
318
+ *
319
+ * Compile errors INPUT_INVALID if `section.handle` doesn't resolve to
320
+ * a `ComponentSectionRecipe` in the same recipe set.
321
+ *
322
+ * Optional: omit for the flat layout (component + rendering land
323
+ * directly at `<templatesRoot>` / `<renderingsRoot>` with no section
324
+ * scaffolding). Registry-driven recipes inject this from
325
+ * `meta.tax.subgroup` at registry build time.
326
+ */
327
+ section: zod_1.z
328
+ .object({
329
+ handle: zod_1.z.string().regex(HANDLE_PATTERN, {
330
+ message: "section.handle must match `<kebab-name>@<major>`",
331
+ }),
332
+ })
333
+ .optional(),
334
+ fields: zod_1.z.array(exports.FieldDefinitionSchema).default([]),
335
+ /**
336
+ * Recipe handles whose templates are allowed as direct children of this
337
+ * datasource item. Maps to the datasource standard-values item's
338
+ * `Insert Options` field. Used for the **child-item pattern** — e.g.
339
+ * an accordion whose accordion-items live as Sitecore children of its
340
+ * own datasource rather than being referenced via a Treelist.
341
+ *
342
+ * Both reference patterns can coexist on the same recipe: declare a
343
+ * Treelist field with `template:<handle>` source AND list the same
344
+ * handle in `insertOptions`. Tenants pick which authoring flow they
345
+ * prefer; the React component handles either resolution path.
346
+ */
347
+ insertOptions: zod_1.z.array(zod_1.z.string()).optional(),
348
+ /**
349
+ * Datasource configuration — the rendering's data shape, picker
350
+ * locations, auto-create behaviour, and dialog UX. See
351
+ * `RecipeDatasourceSchema` for the full surface. Optional: omit
352
+ * for a rendering with no author-pickable datasource (e.g. a
353
+ * static component).
354
+ */
355
+ datasource: exports.RecipeDatasourceSchema.optional(),
356
+ /**
357
+ * Reference to a separate `ParametersTemplateRecipe`. When present,
358
+ * the rendering's Parameters Template field points at this template
359
+ * and the compiler does NOT synthesise an anonymous parameters
360
+ * template from inline `params:`.
361
+ *
362
+ * When this is absent and `params:` is non-empty, the compiler
363
+ * synthesises a section-local Parameters template at
364
+ * `Components/<section>/Presentation Parameters/<Component> Parameters`.
365
+ */
366
+ parameters: zod_1.z
367
+ .object({
368
+ handle: zod_1.z.string().regex(HANDLE_PATTERN, {
369
+ message: "parameters.handle must match `<kebab-name>@<major>`",
370
+ }),
371
+ })
372
+ .optional(),
373
+ /**
374
+ * Children declaration — when present, the compiler emits a
375
+ * Component Folder template at
376
+ * `Components/<section>/Component Folders/<Component> Folder`. The
377
+ * folder template's `__Standard Values` carries an Insert Options
378
+ * field referencing the listed allowed handles, so author-side
379
+ * "Insert" UX surfaces the right children under each instance.
380
+ */
381
+ children: zod_1.z
382
+ .object({
383
+ allowedHandles: zod_1.z.array(zod_1.z.string().regex(HANDLE_PATTERN)).min(1),
384
+ })
385
+ .optional(),
386
+ /**
387
+ * `SectionDefinitionRecipe` handles whose `Available Renderings`
388
+ * multi-list field should include this rendering's GUID. Drives the
389
+ * Sitecore Pages "Toolbox" surface — adding to this list registers
390
+ * the rendering with one or more Available Rendering Section
391
+ * Definition items.
392
+ */
393
+ availableIn: zod_1.z.array(zod_1.z.string().regex(HANDLE_PATTERN)).optional(),
394
+ variants: zod_1.z.array(exports.RenderingVariantDefinitionSchema).default([]),
395
+ params: zod_1.z.array(exports.ParamDefinitionSchema).default([]),
396
+ /**
397
+ * SXA placeholder keys this rendering can be PLACED INTO — the
398
+ * allow-list. At apply time scai walks the configured Placeholder
399
+ * Settings roots, finds items whose `Placeholder Key` field matches
400
+ * each entry here, and appends this rendering's itemId to their
401
+ * `Allowed Controls` field. Without this, the rendering exists in
402
+ * CM but Pages won't offer it in any placeholder picker.
403
+ *
404
+ * Example: `["headless-main", "headless-main-{*}", "sxa-footer"]`.
405
+ *
406
+ * Distinct from `placeholders` (below), which declares slots THIS
407
+ * component EXPOSES for child renderings.
408
+ */
409
+ placedIn: zod_1.z.array(zod_1.z.string().min(1)).default([]),
410
+ /**
411
+ * Container slots — placeholders this component DEFINES for child
412
+ * renderings to drop into. Only meaningful for container components
413
+ * (e.g. a section wrapper that exposes a `headless-main-{*}` slot).
414
+ * Each entry carries the placeholder key + an optional restriction
415
+ * on which rendering handles may be dropped there.
416
+ *
417
+ * Distinct from `placedIn` (above), which lists placeholder keys
418
+ * this rendering can be placed INTO.
419
+ */
420
+ placeholders: zod_1.z.array(exports.PlaceholderDefinitionSchema).default([]),
421
+ /**
422
+ * First-class option for SXA "renderings with dynamic placeholders".
423
+ * When true, the compiler sets `IsRenderingsWithDynamicPlaceholders=true`
424
+ * in the rendering's `OtherProperties` blob — equivalent to passing
425
+ * `otherProperties: { IsRenderingsWithDynamicPlaceholders: "true" }`
426
+ * but typed and discoverable. Default false.
427
+ */
428
+ dynamicPlaceholders: zod_1.z.boolean().default(false),
429
+ /**
430
+ * Free-form key/value pairs encoded into the rendering's
431
+ * `OtherProperties` URL-encoded shared field. Common keys are
432
+ * surfaced as dedicated options elsewhere on the recipe
433
+ * (`autoCreate` → `IsAutoDatasourceRendering`, `dynamicPlaceholders`
434
+ * → `IsRenderingsWithDynamicPlaceholders`); use this for anything
435
+ * else that needs to land in OtherProperties without a first-class
436
+ * option.
437
+ *
438
+ * Explicitly-set keys here OVERRIDE the auto-set values from
439
+ * `autoCreate` / `dynamicPlaceholders` — useful for the rare case
440
+ * where you need to force a specific value.
441
+ */
442
+ otherProperties: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
443
+ });
444
+ /**
445
+ * A content-only template. Has fields but no rendering — exists as a data
446
+ * shape referenced by other recipes via:
447
+ *
448
+ * - A `reference` field with `sitecore.sourceTypes: ["<handle>"]`
449
+ * (related-items pattern: items live wherever, picker filters by template)
450
+ * - `insertOptions: ["<handle>"]` on a parent recipe (child-item pattern:
451
+ * items live as children of the parent's datasource)
452
+ *
453
+ * Not placeable on a page directly. The compiler emits the template,
454
+ * sections, fields, and standard values — but no rendering item.
455
+ *
456
+ * Examples: accordion-item, tabs-item, faq-item — content shapes that
457
+ * appear as part of a parent component, never standalone.
458
+ */
459
+ /**
460
+ * Optional taxonomy metadata, mirroring the registry's `meta.tax.*`
461
+ * namespace. `group` is the only field the compiler currently consumes
462
+ * — it drives `Content Models/<group>/<name>` nesting for content
463
+ * templates. Other fields (`section`, `subgroup`, `tag`) are accepted
464
+ * so registry → recipe pipelines can pass them through without
465
+ * losing data, but they're not load-bearing for compilation.
466
+ */
467
+ exports.RecipeMetaTaxSchema = zod_1.z
468
+ .object({
469
+ section: zod_1.z.string().optional(),
470
+ group: zod_1.z.string().optional(),
471
+ subgroup: zod_1.z.string().optional(),
472
+ tag: zod_1.z.string().optional(),
473
+ })
474
+ .partial()
475
+ .optional();
476
+ exports.RecipeMetaSchema = zod_1.z
477
+ .object({
478
+ tax: exports.RecipeMetaTaxSchema,
479
+ })
480
+ .partial()
481
+ .optional();
482
+ exports.ContentTemplateRecipeSchema = zod_1.z.object({
483
+ kind: zod_1.z.literal("content-template"),
484
+ schemaVersion: zod_1.z.literal("1"),
485
+ handle: zod_1.z.string().regex(HANDLE_PATTERN, {
486
+ message: "handle must match `<kebab-name>@<major>`, e.g. accordion-item@1",
487
+ }),
488
+ name: zod_1.z.string().min(1),
489
+ displayName: zod_1.z.string().min(1),
490
+ description: zod_1.z.string().optional(),
491
+ /**
492
+ * Optional taxonomy metadata. `meta.tax.group` drives Content Models
493
+ * folder nesting: when set, the template lands at
494
+ * `<contentModelsRoot>/<group>/<name>` instead of flat under
495
+ * `<contentModelsRoot>/<name>`. Other taxonomy fields pass through
496
+ * unmodified for downstream consumers.
497
+ */
498
+ meta: exports.RecipeMetaSchema,
499
+ fields: zod_1.z.array(exports.FieldDefinitionSchema).default([]),
500
+ /**
501
+ * Recipe handles allowed as children of this content template's items.
502
+ * Enables nested child-item patterns (e.g. a section content template
503
+ * that allows item content templates underneath).
504
+ */
505
+ insertOptions: zod_1.z.array(zod_1.z.string()).optional(),
506
+ });
507
+ /**
508
+ * A standalone Parameters Template — a Sitecore template item that holds
509
+ * rendering-parameter fields, referenced from one or more
510
+ * `ComponentTemplateRecipe.parameters`. Lands at
511
+ * `<componentsRoot>/<section>/Presentation Parameters/<name>`.
512
+ *
513
+ * Authoring shape mirrors a stripped-down ContentTemplateRecipe — the
514
+ * compiler emits a Template + Section + Field children + standard
515
+ * values, parented under the section's "Presentation Parameters"
516
+ * folder. Distinct from inline `params:` (which the compiler hoists
517
+ * into an anonymous parameters template owned by one component);
518
+ * standalone parameters templates are reusable across components.
519
+ *
520
+ * Identity: `paramsTemplateId(handle)` derives the deterministic GUID.
521
+ * Same identity scheme as the inline-hoisted variant — the seed is the
522
+ * recipe handle, and the namespace is `NAMESPACE_TEMPLATE`. The seed
523
+ * suffix is `::params`, identical between inline and standalone forms,
524
+ * which keeps re-pushes idempotent if a recipe migrates from inline to
525
+ * standalone (the GUID stays the same).
526
+ */
527
+ exports.ParametersTemplateRecipeSchema = zod_1.z.object({
528
+ kind: zod_1.z.literal("parameters-template"),
529
+ schemaVersion: zod_1.z.literal("1"),
530
+ handle: zod_1.z.string().regex(HANDLE_PATTERN, {
531
+ message: "handle must match `<kebab-name>@<major>`, e.g. cta-button-params@1",
532
+ }),
533
+ name: zod_1.z.string().min(1),
534
+ displayName: zod_1.z.string().min(1),
535
+ description: zod_1.z.string().optional(),
536
+ /** Defaults to "Office/32x32/document.png" if omitted. */
537
+ icon: zod_1.z.string().optional(),
538
+ /**
539
+ * Section name under which this parameters template lands —
540
+ * `Components/<section>/Presentation Parameters/<name>`. Required:
541
+ * presentation parameters are organised per-section by convention.
542
+ */
543
+ section: zod_1.z.string().min(1),
544
+ params: zod_1.z.array(exports.ParamDefinitionSchema).default([]),
545
+ });
546
+ /**
547
+ * Available Rendering Section Definition — declares an SXA section
548
+ * definition item that the registry uses as the target for
549
+ * `availableIn` bindings. Each section definition holds an `Available
550
+ * Renderings` multi-list field whose pipe-separated GUID list controls
551
+ * which renderings appear in the section's toolbox group.
552
+ *
553
+ * The section definition typically lives in the content tree under
554
+ * `/sitecore/content/<tenant>/<site>/Presentation/Available Renderings/<Section>`,
555
+ * but exact path is recipe-supplied via `sitePath` so the same recipe
556
+ * shape works across SXA Headless and classic SXA layouts.
557
+ *
558
+ * Identity: section definitions are referenced by deterministic GUID
559
+ * via `sectionDefinitionId(handle)`. The compiler currently does not
560
+ * emit CreateItem ops for section definitions (they're assumed to
561
+ * pre-exist on the tenant — they're SXA-shipped scaffolding). The
562
+ * recipe surface accepts them so cross-recipe validation of
563
+ * `availableIn` references can resolve.
564
+ */
565
+ exports.SectionDefinitionRecipeSchema = zod_1.z.object({
566
+ kind: zod_1.z.literal("section-definition"),
567
+ schemaVersion: zod_1.z.literal("1"),
568
+ handle: zod_1.z.string().regex(HANDLE_PATTERN, {
569
+ message: "handle must match `<kebab-name>@<major>`, e.g. showcase-section@1",
570
+ }),
571
+ name: zod_1.z.string().min(1),
572
+ displayName: zod_1.z.string().optional(),
573
+ description: zod_1.z.string().optional(),
574
+ /**
575
+ * Sitecore content-tree path of the section definition item
576
+ * (e.g. `/sitecore/content/<tenant>/<site>/Presentation/Available
577
+ * Renderings/<Section>`). The compiler uses this as the lookup target
578
+ * when emitting `AppendToMultiList` ops for the section's
579
+ * `Available Renderings` field — the executor resolves the path to
580
+ * a Sitecore itemId at apply time.
581
+ */
582
+ sitePath: zod_1.z.string().min(1),
583
+ });
584
+ /**
585
+ * A single field value on a `ContentItemRecipe`. Tagged on `shape` so the
586
+ * Phase 4 compiler can dispatch each value to the right Sitecore wire
587
+ * encoder (image XML, link XML, pipe-separated GUID list, …) without
588
+ * cross-recipe shape lookup at parse time.
589
+ *
590
+ * Shapes mirror `FieldShape` from `field-types.ts`, with `link` split
591
+ * into `link-external` / `link-internal` and `reference` lifted to
592
+ * always-array (`refs: string[]`) — both differences reflect that the
593
+ * value-level form encodes the stored representation, not the abstract
594
+ * field shape on the template.
595
+ *
596
+ * Cross-recipe handle references (`link-internal.ref`, `reference.refs`)
597
+ * resolve via the same `templateId(handle)` / `contentItemId(handle)`
598
+ * derivation the rest of the recipe surface uses.
599
+ */
600
+ exports.ContentFieldValueSchema = zod_1.z.discriminatedUnion("shape", [
601
+ zod_1.z.object({ shape: zod_1.z.literal("text"), value: zod_1.z.string() }),
602
+ zod_1.z.object({ shape: zod_1.z.literal("richText"), value: zod_1.z.string() }),
603
+ zod_1.z.object({ shape: zod_1.z.literal("boolean"), value: zod_1.z.boolean() }),
604
+ zod_1.z.object({ shape: zod_1.z.literal("number"), value: zod_1.z.number() }),
605
+ zod_1.z.object({ shape: zod_1.z.literal("integer"), value: zod_1.z.number().int() }),
606
+ /** ISO 8601 date (`YYYY-MM-DD`) — compiler converts to Sitecore's wire format. */
607
+ zod_1.z.object({ shape: zod_1.z.literal("date"), value: zod_1.z.string() }),
608
+ /** ISO 8601 datetime (`YYYY-MM-DDTHH:mm:ssZ`). */
609
+ zod_1.z.object({ shape: zod_1.z.literal("datetime"), value: zod_1.z.string() }),
610
+ /** One of the enum's declared values, by name. */
611
+ zod_1.z.object({ shape: zod_1.z.literal("enum"), value: zod_1.z.string() }),
612
+ zod_1.z.object({
613
+ shape: zod_1.z.literal("image"),
614
+ /** Sitecore media-library path. Compiler emits the image XML form. */
615
+ mediaPath: zod_1.z.string().min(1),
616
+ alt: zod_1.z.string().optional(),
617
+ width: zod_1.z.number().int().positive().optional(),
618
+ height: zod_1.z.number().int().positive().optional(),
619
+ }),
620
+ zod_1.z.object({
621
+ shape: zod_1.z.literal("link-external"),
622
+ href: zod_1.z.string().min(1),
623
+ text: zod_1.z.string().optional(),
624
+ target: zod_1.z.string().optional(),
625
+ title: zod_1.z.string().optional(),
626
+ }),
627
+ zod_1.z.object({
628
+ shape: zod_1.z.literal("link-internal"),
629
+ /** Recipe handle (page or content item). Compiler resolves to a GUID. */
630
+ ref: zod_1.z.string().min(1),
631
+ text: zod_1.z.string().optional(),
632
+ target: zod_1.z.string().optional(),
633
+ }),
634
+ zod_1.z.object({
635
+ shape: zod_1.z.literal("reference"),
636
+ /**
637
+ * One or more recipe handles. Always an array, even for single-ref
638
+ * fields — the value-level shape doesn't depend on whether the
639
+ * template field is `multiple: true`. Compiler emits one GUID
640
+ * (single-ref fields) or pipe-separated GUIDs (Treelist/Multilist).
641
+ */
642
+ refs: zod_1.z.array(zod_1.z.string().min(1)),
643
+ }),
644
+ ]);
645
+ /**
646
+ * A concrete content item — one Sitecore item conforming to a content
647
+ * template, populated with the recipe's field values. The Phase 4
648
+ * companion to `ContentTemplateRecipe`: templates declare shape, content
649
+ * items declare instance.
650
+ *
651
+ * Used as the `kind: "shared"` datasource target for `PartialDesignRecipe`
652
+ * and `PageDesignRecipe` placements (e.g. `site-logo-content@1`,
653
+ * `primary-nav-content@1`). The handle is load-bearing — `contentItemId`
654
+ * derives the deterministic Sitecore GUID from it.
655
+ *
656
+ * Field-shape ↔ template-shape validation is deferred to the Phase 4
657
+ * compiler (it requires cross-recipe lookup; Zod can't enforce it alone).
658
+ */
659
+ exports.ContentItemRecipeSchema = zod_1.z.object({
660
+ kind: zod_1.z.literal("content-item"),
661
+ schemaVersion: zod_1.z.literal("1"),
662
+ handle: zod_1.z.string().regex(HANDLE_PATTERN, {
663
+ message: "handle must match `<kebab-name>@<major>`, e.g. site-logo-content@1",
664
+ }),
665
+ name: zod_1.z.string().min(1),
666
+ displayName: zod_1.z.string().min(1),
667
+ description: zod_1.z.string().optional(),
668
+ /**
669
+ * Handle of the content (or component) template this item conforms to.
670
+ * Compiler resolves via `templateId(handle)` to set the item's
671
+ * Template-Of GUID.
672
+ */
673
+ templateType: zod_1.z.string().regex(HANDLE_PATTERN, {
674
+ message: "templateType must match `<kebab-name>@<major>`, e.g. nav-link@1",
675
+ }),
676
+ /** Field values keyed by field name on the template. */
677
+ fields: zod_1.z.record(zod_1.z.string(), exports.ContentFieldValueSchema).default({}),
678
+ });
679
+ /**
680
+ * One rendering placed into a placeholder, with its variant, parameters,
681
+ * and datasource binding. The Phase 4 compiler emits each ComponentPlacement
682
+ * as one `<r>` element in Sitecore's layout XML.
683
+ *
684
+ * The single shape used by anything that holds layout — `PartialDesignRecipe`,
685
+ * `PageDesignRecipe`, and (when Phase 3 lands) `PageRecipe`. The
686
+ * `componentHandle` resolves to a `ComponentTemplateRecipe`'s rendering
687
+ * GUID via `renderingId(handle)`.
688
+ *
689
+ * `datasourceRef` distinguishes how the rendering gets its content:
690
+ *
691
+ * shared — points at a `ContentItemRecipe` by handle (catalog-shipped
692
+ * reusable content like `site-logo-content@1`).
693
+ * scoped — page-local content at `<page>/<slot>`. Used by `PageRecipe`;
694
+ * `PartialDesignRecipe` and `PageDesignRecipe` typically don't
695
+ * use this kind, but the shared schema accepts it.
696
+ * none — config-driven rendering with no datasource (rare).
697
+ */
698
+ exports.ComponentPlacementSchema = zod_1.z.object({
699
+ /** Handle of a `ComponentTemplateRecipe`. */
700
+ componentHandle: zod_1.z.string().regex(HANDLE_PATTERN, {
701
+ message: "componentHandle must match `<kebab-name>@<major>`",
702
+ }),
703
+ /** SXA Rendering Variant name. Defaults to the component's first variant. */
704
+ variant: zod_1.z.string().optional(),
705
+ /** Rendering Parameters (URL-encoded into the placement's params blob). */
706
+ params: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
707
+ /** How the rendering's content is bound. Omit for `kind: "none"` semantics. */
708
+ datasourceRef: zod_1.z
709
+ .discriminatedUnion("kind", [
710
+ zod_1.z.object({
711
+ kind: zod_1.z.literal("shared"),
712
+ /** Handle of a `ContentItemRecipe`. */
713
+ handle: zod_1.z.string().regex(HANDLE_PATTERN),
714
+ }),
715
+ zod_1.z.object({
716
+ kind: zod_1.z.literal("scoped"),
717
+ /** Slot path within the host item, e.g. `/main/0`. */
718
+ slot: zod_1.z.string().min(1),
719
+ }),
720
+ zod_1.z.object({ kind: zod_1.z.literal("none") }),
721
+ ])
722
+ .optional(),
723
+ });
724
+ /**
725
+ * Layout block keyed by placeholder. Each placeholder holds an ordered
726
+ * array of `ComponentPlacement`s — render order is array order.
727
+ */
728
+ exports.LayoutSchema = zod_1.z.object({
729
+ placeholders: zod_1.z.record(zod_1.z.string(), zod_1.z.array(exports.ComponentPlacementSchema)).default({}),
730
+ });
731
+ /**
732
+ * A reusable layout chunk — header, footer, sidebar, byline. Lives at
733
+ * `/sitecore/.../Presentation/Partial Designs/<name>` on a tenant. Linked
734
+ * by 1..n `PageDesignRecipe`s. Owns its own placeholders and pre-placed
735
+ * renderings; the compiler emits the same layout XML form pages use.
736
+ *
737
+ * Identity: `partialDesignId(handle)` derives the deterministic GUID from
738
+ * the recipe handle.
739
+ */
740
+ exports.PartialDesignRecipeSchema = zod_1.z.object({
741
+ kind: zod_1.z.literal("partial-design"),
742
+ schemaVersion: zod_1.z.literal("1"),
743
+ handle: zod_1.z.string().regex(HANDLE_PATTERN, {
744
+ message: "handle must match `<kebab-name>@<major>`, e.g. standard-header@1",
745
+ }),
746
+ name: zod_1.z.string().min(1),
747
+ displayName: zod_1.z.string().min(1),
748
+ description: zod_1.z.string().optional(),
749
+ /** Defaults to the partial-design icon if omitted. */
750
+ icon: zod_1.z.string().optional(),
751
+ /** Placeholders this partial holds, with their pre-placed renderings. */
752
+ layout: exports.LayoutSchema,
753
+ });
754
+ /**
755
+ * Maps page templates to a layout. Lives at
756
+ * `/sitecore/.../Presentation/Page Designs/<name>` on a tenant. Establishes
757
+ * the templates-to-design mapping (the Sitecore SXA Page Designs root
758
+ * field), lists which partial designs wrap content, and optionally adds
759
+ * its own pre-placed renderings.
760
+ *
761
+ * Identity: `pageDesignId(handle)` derives the deterministic GUID from
762
+ * the recipe handle.
763
+ */
764
+ exports.PageDesignRecipeSchema = zod_1.z.object({
765
+ kind: zod_1.z.literal("page-design"),
766
+ schemaVersion: zod_1.z.literal("1"),
767
+ handle: zod_1.z.string().regex(HANDLE_PATTERN, {
768
+ message: "handle must match `<kebab-name>@<major>`, e.g. landing-design@1",
769
+ }),
770
+ name: zod_1.z.string().min(1),
771
+ displayName: zod_1.z.string().min(1),
772
+ description: zod_1.z.string().optional(),
773
+ icon: zod_1.z.string().optional(),
774
+ /**
775
+ * Page template handles this design applies to. Compiler builds the
776
+ * URL-string templates-to-designs mapping field on the Sitecore Page
777
+ * Designs root from this list, resolved via `templateId(handle)`.
778
+ */
779
+ appliesTo: zod_1.z.array(zod_1.z.string().regex(HANDLE_PATTERN)).default([]),
780
+ /**
781
+ * Partials linked into this design, in render order. Compiler emits the
782
+ * pipe-separated GUID list on the design's `PartialDesigns` field,
783
+ * resolved via `partialDesignId(handle)`.
784
+ */
785
+ partials: zod_1.z.array(zod_1.z.string().regex(HANDLE_PATTERN)).default([]),
786
+ /**
787
+ * Optional own layout — for designs that add page-design-level
788
+ * placements beyond just wrapping partials. Most designs leave this
789
+ * empty because the page itself owns its content placements.
790
+ */
791
+ layout: exports.LayoutSchema.optional(),
792
+ });
793
+ /**
794
+ * Default dictionary entry on a `SiteTemplateRecipe`. Every entry the
795
+ * template declares becomes a Sitecore dictionary phrase with the
796
+ * supplied default value. Sites instancing the template can override
797
+ * the value per-phrase via `SiteRecipe.dictionaryOverrides`; phrases
798
+ * not overridden read the template default.
799
+ */
800
+ exports.SiteTemplateDictionaryEntrySchema = zod_1.z.object({
801
+ /** Phrase key — the dictionary item's name. Stable across overrides. */
802
+ phrase: zod_1.z.string().min(1),
803
+ /** Default value (the translated string for the template's primary language). */
804
+ defaultValue: zod_1.z.string(),
805
+ });
806
+ /**
807
+ * Default taxonomy bucket on a `SiteTemplateRecipe`. Each bucket has a
808
+ * root folder name (e.g. "Content Types") and a list of tag names that
809
+ * become the default children. Sites can override the tag list
810
+ * per-root via `SiteRecipe.taxonomyOverrides`.
811
+ */
812
+ exports.SiteTemplateTaxonomyEntrySchema = zod_1.z.object({
813
+ root: zod_1.z.string().min(1),
814
+ /** Default tag names under this root. Empty list means "create the root, no tags". */
815
+ defaultTags: zod_1.z.array(zod_1.z.string().min(1)).default([]),
816
+ });
817
+ /**
818
+ * A `SiteTemplateRecipe` defines a reusable brand/site shape — page
819
+ * templates, designs, partials (transitively), insert-options matrix,
820
+ * templates-to-designs mapping, dictionary structure, and taxonomy
821
+ * structure. The Sitecore SXA "site template" the registry's catalog
822
+ * ships as a single artifact.
823
+ *
824
+ * Many `SiteRecipe`s can reference one `SiteTemplateRecipe`. A
825
+ * customer with three brands has three Sites instancing one Template;
826
+ * that's the multi-brand demo pattern this kind enables.
827
+ *
828
+ * Identity: `templateId(handle)` derives the GUID — site templates
829
+ * are regular Sitecore template items under `/sitecore/templates/Project/<Module>`,
830
+ * not Sites-API-managed instances. Compile path goes through
831
+ * Authoring GraphQL, not the Sites API.
832
+ *
833
+ * Cross-recipe handle resolution: `pageTemplates` and
834
+ * `insertOptionsMatrix.*` resolve to `ContentTemplateRecipe` handles;
835
+ * `pageDesigns` and `templatesToDesigns.*` values resolve to
836
+ * `PageDesignRecipe` handles. The cross-recipe validator
837
+ * (`validateRecipeSet`) catches missing handles before push.
838
+ */
839
+ exports.SiteTemplateRecipeSchema = zod_1.z.object({
840
+ kind: zod_1.z.literal("site-template"),
841
+ schemaVersion: zod_1.z.literal("1"),
842
+ handle: zod_1.z.string().regex(HANDLE_PATTERN, {
843
+ message: "handle must match `<kebab-name>@<major>`, e.g. ccl-brand-template@1",
844
+ }),
845
+ name: zod_1.z.string().min(1),
846
+ displayName: zod_1.z.string().min(1),
847
+ description: zod_1.z.string().optional(),
848
+ icon: zod_1.z.string().optional(),
849
+ /**
850
+ * Page-template handles this brand offers (resolve to
851
+ * `ContentTemplateRecipe`). The site's content tree allows pages
852
+ * conforming to any of these.
853
+ */
854
+ pageTemplates: zod_1.z.array(zod_1.z.string().regex(HANDLE_PATTERN)).default([]),
855
+ /**
856
+ * Insert-options matrix — keyed by parent page-template handle,
857
+ * value is the list of child page-template handles allowed under it.
858
+ * Drives Sitecore's "Insert Options" UI for content authors.
859
+ * Empty / omitted means no constraints (any page template can have
860
+ * any other page template as a child).
861
+ */
862
+ insertOptionsMatrix: zod_1.z
863
+ .record(zod_1.z.string().regex(HANDLE_PATTERN), zod_1.z.array(zod_1.z.string().regex(HANDLE_PATTERN)))
864
+ .optional(),
865
+ /**
866
+ * Page-design handles this brand offers (resolve to
867
+ * `PageDesignRecipe`). Authors pick from these when creating a page
868
+ * unless `templatesToDesigns` provides a default for the page's
869
+ * template.
870
+ */
871
+ pageDesigns: zod_1.z.array(zod_1.z.string().regex(HANDLE_PATTERN)).default([]),
872
+ /**
873
+ * Default templates-to-designs mapping — keyed by page-template
874
+ * handle, value is the default page-design handle. Sites can
875
+ * override per-template at the SXA Page Designs root level
876
+ * (which scai's `compileRecipeSet` aggregates from
877
+ * `PageDesignRecipe.appliesTo`).
878
+ */
879
+ templatesToDesigns: zod_1.z
880
+ .record(zod_1.z.string().regex(HANDLE_PATTERN), zod_1.z.string().regex(HANDLE_PATTERN))
881
+ .optional(),
882
+ /**
883
+ * Default dictionary phrases. Sites can override values per-phrase;
884
+ * unoverridden phrases use the template default.
885
+ */
886
+ dictionary: zod_1.z.array(exports.SiteTemplateDictionaryEntrySchema).optional(),
887
+ /**
888
+ * Default taxonomy structure. Sites can override tag lists per-root.
889
+ */
890
+ taxonomy: zod_1.z.array(exports.SiteTemplateTaxonomyEntrySchema).optional(),
891
+ });
892
+ /**
893
+ * Site grouping — hostname + language binding. The Sitecore Sites API
894
+ * `NewSiteInput.hostName` field receives `hostName`; multi-host
895
+ * setups are configured via separate Site Hosts after creation
896
+ * (Sites API has its own hosts surface for that, not modelled here).
897
+ */
898
+ exports.SiteGroupingSchema = zod_1.z.object({
899
+ /**
900
+ * Hostname this site responds to (e.g. `solterra.example.com`).
901
+ * Optional — Sites API defaults to `*` (matches any host) when
902
+ * omitted. Tenants with one site per environment can leave this
903
+ * blank; multi-brand tenants set it explicitly.
904
+ */
905
+ hostName: zod_1.z.string().min(1).optional(),
906
+ /**
907
+ * Language ISO code for this grouping. Defaults to the site's
908
+ * primary `language` if not set; provided here for forward-compat
909
+ * with multi-language groupings (e.g. one site responds to
910
+ * `en.example.com` and `de.example.com`).
911
+ */
912
+ language: zod_1.z.string().min(2).optional(),
913
+ /**
914
+ * Optional target host for hostname rewrites — used when the site
915
+ * lives behind a CDN/proxy that maps a public hostname to an
916
+ * internal one. SXA's `targetHostName` field; rarely set.
917
+ */
918
+ targetHostName: zod_1.z.string().min(1).optional(),
919
+ });
920
+ /**
921
+ * A `SiteRecipe` instances a `SiteTemplateRecipe` at a specific path
922
+ * with a specific hostname and language. Customers with multiple
923
+ * brands ship multiple SiteRecipes pointing at the same template;
924
+ * each gets its own hostname, content tree, taxonomy values, and
925
+ * dictionary overrides.
926
+ *
927
+ * Identity: `siteId(handle)` derives a stable refKey for IR purposes.
928
+ * The actual Sitecore site itemId is server-assigned by the Sites API
929
+ * `createSite` mutation (which runs as a job — callers poll
930
+ * `getJobStatus` until the site is materialised).
931
+ *
932
+ * Compile path: `SiteRecipe` execution goes through the Sites API
933
+ * (`src/sites/api/`), not Authoring GraphQL. The compiler emits a
934
+ * `CreateSiteFromTemplate` IR op that the executor dispatches to
935
+ * Sites API; site-grouping fields, dictionary overrides, and
936
+ * taxonomy overrides land via subsequent ops on the resulting site.
937
+ *
938
+ * Cross-recipe handle resolution: `siteTemplate` resolves to a
939
+ * `SiteTemplateRecipe`; `initialHome` (when present) resolves to a
940
+ * `PageRecipe` (Phase 6+ — schema accepts the handle now, executor
941
+ * support lands later).
942
+ */
943
+ exports.SiteRecipeSchema = zod_1.z.object({
944
+ kind: zod_1.z.literal("site"),
945
+ schemaVersion: zod_1.z.literal("1"),
946
+ handle: zod_1.z.string().regex(HANDLE_PATTERN, {
947
+ message: "handle must match `<kebab-name>@<major>`, e.g. solterra-co@1",
948
+ }),
949
+ /**
950
+ * Sitecore site item Name (becomes the `siteName` on Sites API
951
+ * `NewSiteInput`). Distinct from `handle` — handle is the recipe
952
+ * identity, name is what Sitecore stores.
953
+ */
954
+ name: zod_1.z.string().min(1),
955
+ displayName: zod_1.z.string().min(1),
956
+ description: zod_1.z.string().optional(),
957
+ /**
958
+ * The `SiteTemplateRecipe` this site instances. Compiler resolves
959
+ * to the template's Sitecore itemId (which Sites API
960
+ * `NewSiteInput.templateId` requires) via `templateId(handle)` +
961
+ * captured-itemId map at execute time.
962
+ */
963
+ siteTemplate: zod_1.z.string().regex(HANDLE_PATTERN, {
964
+ message: "siteTemplate must reference a SiteTemplateRecipe by handle, e.g. ccl-brand-template@1",
965
+ }),
966
+ /**
967
+ * Primary language ISO code (e.g. `en`, `da`, `fr-CA`). Must be
968
+ * available on the environment — recipe push adds it via
969
+ * Sites API `addLanguage` if not already present.
970
+ */
971
+ language: zod_1.z.string().min(2),
972
+ /**
973
+ * Additional supported languages on this site. Each must be
974
+ * available on the environment (recipe push adds missing ones).
975
+ */
976
+ languages: zod_1.z.array(zod_1.z.string().min(2)).optional(),
977
+ /**
978
+ * Existing site collection ID to place the site in. Mutually
979
+ * exclusive with `collectionName` (cross-field constraint enforced
980
+ * by the compiler, not Zod — the discriminated union can't carry
981
+ * refinements). Look up via `listCollections`.
982
+ */
983
+ collectionId: zod_1.z.string().min(1).optional(),
984
+ /**
985
+ * Name of a NEW collection to create alongside the site. Mutually
986
+ * exclusive with `collectionId`. Exactly one of these must be
987
+ * provided — compiler validates.
988
+ */
989
+ collectionName: zod_1.z.string().min(1).optional(),
990
+ /** Display name for the new collection (only when `collectionName` is set). */
991
+ collectionDisplayName: zod_1.z.string().min(1).optional(),
992
+ /** Description for the new collection (only when `collectionName` is set). */
993
+ collectionDescription: zod_1.z.string().optional(),
994
+ /**
995
+ * Sitecore content-tree path of the collection, used to compose
996
+ * dictionary / taxonomy override target paths
997
+ * (`<collectionPath>/<siteName>/Dictionary/<phrase>` etc.). Optional —
998
+ * when unset, the compiler derives a path from `collectionName`
999
+ * (`/sitecore/content/<collectionName>`) per the SXA default
1000
+ * convention. **Required** when `collectionId` is used AND the recipe
1001
+ * declares any dictionary or taxonomy overrides — there's no way to
1002
+ * resolve `collectionId` to a content-tree path at compile time.
1003
+ * Without it, the compiler skips override emission entirely (push
1004
+ * still creates the site, but the overrides don't apply).
1005
+ *
1006
+ * Operator-supplied. The compiler trims a trailing `/` defensively
1007
+ * but otherwise treats this as the truth.
1008
+ */
1009
+ collectionPath: zod_1.z.string().min(1).optional(),
1010
+ /**
1011
+ * Site grouping — hostname binding. Sites API uses
1012
+ * `NewSiteInput.hostName` for the primary host; multi-host setups
1013
+ * use the separate Site Hosts surface.
1014
+ */
1015
+ siteGrouping: exports.SiteGroupingSchema.optional(),
1016
+ /**
1017
+ * Per-phrase override for dictionary values declared on the
1018
+ * `SiteTemplateRecipe.dictionary`. Keys are phrase names; values
1019
+ * replace the template default. Phrases not in this map use the
1020
+ * template default.
1021
+ */
1022
+ dictionaryOverrides: zod_1.z.record(zod_1.z.string().min(1), zod_1.z.string()).optional(),
1023
+ /**
1024
+ * Per-root override for taxonomy default tags. Keys are taxonomy
1025
+ * root names declared on the template; values replace the
1026
+ * template's default tag list for that root.
1027
+ */
1028
+ taxonomyOverrides: zod_1.z.record(zod_1.z.string().min(1), zod_1.z.array(zod_1.z.string().min(1))).optional(),
1029
+ /**
1030
+ * Optional initial home page — a `PageRecipe` handle. Phase 6+
1031
+ * concern; schema accepts the handle now so SiteRecipes can
1032
+ * declare it; the executor will materialise it once page-recipe
1033
+ * execution lands.
1034
+ */
1035
+ initialHome: zod_1.z.string().regex(HANDLE_PATTERN).optional(),
1036
+ });
1037
+ /**
1038
+ * Discriminated union of recipe kinds. Compilers and validators can accept
1039
+ * `Recipe` and dispatch on `kind`.
1040
+ */
1041
+ /**
1042
+ * One value in an `EnumerationRecipe`. Compiles to a Sitecore item that
1043
+ * conforms to the per-site `Enumeration Value` template (NOT the
1044
+ * `Enumeration` template — that one is for the per-enum container).
1045
+ * `Enumeration Value` carries an `Enumeration` Template Section with a
1046
+ * single `Value` Single-Line Text shared field — see
1047
+ * `EnumerationRecipeSchema` for the full template structure.
1048
+ *
1049
+ * `name` — Sitecore item name and uuidv5 GUID seed for the
1050
+ * value item. Load-bearing: renaming `name` creates
1051
+ * a *different* value item and orphans every
1052
+ * existing reference. Also written to the `Value`
1053
+ * shared field on the value item, which is what
1054
+ * SXA-aware consumers (XM Cloud Pages, JSS variants,
1055
+ * custom Edge resolvers) read via the canonical
1056
+ * "picked item's Value field" pattern.
1057
+ * `displayName` — `__Display name` on the item, defaults to `name`.
1058
+ * What the editor's Droplink dropdown shows. Use
1059
+ * this to change the visible label without touching
1060
+ * `name`.
1061
+ */
1062
+ exports.EnumerationValueSchema = zod_1.z.object({
1063
+ name: zod_1.z.string().min(1),
1064
+ displayName: zod_1.z.string().min(1).optional(),
1065
+ });
1066
+ /**
1067
+ * A reusable enumeration — backs Droplink fields whose options are
1068
+ * shared across multiple components (color schemes, size scales,
1069
+ * spacing scales, etc.). Each value lands as a child item under
1070
+ * `<enumerationsRoot>/[<subfolder>/]<EnumName>/<ValueName>`.
1071
+ *
1072
+ * Reference from any field via `sitecore.enumHandle: "<handle>"`. On
1073
+ * re-push, adding a value to the enumeration surfaces it on every
1074
+ * referencing field automatically (the Droplink Source resolves by
1075
+ * location at editor time, so consumer field-definitions don't need
1076
+ * to change).
1077
+ *
1078
+ * Underlying template structure (emitted once per site by
1079
+ * `ensureEnumerationTemplates` — three distinct templates, each with
1080
+ * its own role; never collapsed):
1081
+ *
1082
+ * Enumerations Folder (Template — folder layers in the
1083
+ * enum content tree: site enumerations
1084
+ * root + per-folder grouping items)
1085
+ * └── __Standard Values Insert Options:
1086
+ * Enumeration, Enumerations Folder
1087
+ *
1088
+ * Enumeration (Template — per-enum CONTAINER items
1089
+ * like `Color Scheme`, `Heading Size`)
1090
+ * └── __Standard Values Insert Options: Enumeration Value
1091
+ *
1092
+ * Enumeration Value (Template — leaf VALUE items like
1093
+ * `primary`, `accent`, `lg`)
1094
+ * └── Enumeration (Template Section)
1095
+ * └── Value (Single-Line Text, shared)
1096
+ *
1097
+ * Each value item conforms to `Enumeration Value` and stores its `name`
1098
+ * on the `Value` shared field. That payload is what Droplink consumers
1099
+ * read via the SXA "picked item's Value field" pattern — without it,
1100
+ * components wired against the enum stay empty.
1101
+ *
1102
+ * The matching consumer-side surface is `Type=Droplink` (the default
1103
+ * for `shape: "enum"`). Inline Droplink (`shape: "enum"` with `values`
1104
+ * but no `enumHandle`) is unsupported — authors must either point at
1105
+ * an EnumerationRecipe via `enumHandle` or override `sitecore.type` to
1106
+ * `"droplist"` for an inline pipe-list dropdown.
1107
+ */
1108
+ exports.EnumerationRecipeSchema = zod_1.z.object({
1109
+ kind: zod_1.z.literal("enumeration"),
1110
+ schemaVersion: zod_1.z.literal("1"),
1111
+ handle: zod_1.z.string().regex(HANDLE_PATTERN),
1112
+ /** Item name under `<enumerationsRoot>` (e.g. `ColorScheme`). */
1113
+ name: zod_1.z.string().min(1),
1114
+ /** Author-facing label (defaults to `name` when omitted). */
1115
+ displayName: zod_1.z.string().min(1).optional(),
1116
+ description: zod_1.z.string().optional(),
1117
+ /**
1118
+ * Optional placement of the enum's items in the content tree. Mirrors
1119
+ * the `scope` + `folder` shape used by component
1120
+ * `rendering.datasource.locations`, but kept SINGULAR (`location`,
1121
+ * not `locations`) — an enum's value items live in exactly one place
1122
+ * by construction, so multi-location dual identity isn't a thing.
1123
+ *
1124
+ * scope: "site" → under the site's enumerations root.
1125
+ * scope: "siteCollection" → reserved for shared-vocabulary use
1126
+ * (not yet implemented; throws
1127
+ * INPUT_INVALID at compile time).
1128
+ * folder → optional grouping segment(s) under the
1129
+ * scope root. Materialised as `CreateOnly`
1130
+ * items conforming to the per-site
1131
+ * `Enumerations Folder` template. Multiple
1132
+ * recipes naming the same folder share it,
1133
+ * not collide. Multi-segment paths like
1134
+ * `"Theme/Color"` work too — splits on
1135
+ * `/`, intermediate segments emit one
1136
+ * grouping item each.
1137
+ *
1138
+ * Omit `location` entirely → enum lands flat at the site enumerations
1139
+ * root, no grouping folder.
1140
+ */
1141
+ location: zod_1.z
1142
+ .object({
1143
+ scope: zod_1.z.enum(["site", "siteCollection"]),
1144
+ folder: zod_1.z.string().min(1).optional(),
1145
+ })
1146
+ .optional(),
1147
+ values: zod_1.z.array(exports.EnumerationValueSchema).min(1),
1148
+ /**
1149
+ * Default value for this enumeration. Compiled into the per-enum
1150
+ * container item's `Value` shared field so Edge consumers querying
1151
+ * the container directly receive a default when the picker hasn't
1152
+ * been bound yet (the canonical Sitecore "carry the default on the
1153
+ * enumeration item itself" pattern).
1154
+ *
1155
+ * Must match one of `values[].name`. Validated by
1156
+ * `compileEnumerationRecipe` at compile time (cross-field validation
1157
+ * can't go on the schema itself — `discriminatedUnion` doesn't accept
1158
+ * `ZodEffects` members). Optional — omit to leave the default empty
1159
+ * (consumers fall back to component-level defaults).
1160
+ */
1161
+ default: zod_1.z.string().min(1).optional(),
1162
+ });
1163
+ exports.RecipeSchema = zod_1.z.discriminatedUnion("kind", [
1164
+ exports.ComponentSectionRecipeSchema,
1165
+ exports.ComponentTemplateRecipeSchema,
1166
+ exports.ContentTemplateRecipeSchema,
1167
+ exports.ContentItemRecipeSchema,
1168
+ exports.ParametersTemplateRecipeSchema,
1169
+ exports.SectionDefinitionRecipeSchema,
1170
+ exports.PartialDesignRecipeSchema,
1171
+ exports.PageDesignRecipeSchema,
1172
+ exports.SiteTemplateRecipeSchema,
1173
+ exports.SiteRecipeSchema,
1174
+ exports.EnumerationRecipeSchema,
1175
+ ]);