@endora-commerce/contracts 0.100.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (327) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +34 -0
  3. package/dist/actor.d.ts +79 -0
  4. package/dist/actor.d.ts.map +1 -0
  5. package/dist/actor.js +41 -0
  6. package/dist/actor.js.map +1 -0
  7. package/dist/addresses.d.ts +134 -0
  8. package/dist/addresses.d.ts.map +1 -0
  9. package/dist/addresses.js +16 -0
  10. package/dist/addresses.js.map +1 -0
  11. package/dist/admin-actions.d.ts +367 -0
  12. package/dist/admin-actions.d.ts.map +1 -0
  13. package/dist/admin-actions.js +287 -0
  14. package/dist/admin-actions.js.map +1 -0
  15. package/dist/admin-contributions.d.ts +518 -0
  16. package/dist/admin-contributions.d.ts.map +1 -0
  17. package/dist/admin-contributions.js +495 -0
  18. package/dist/admin-contributions.js.map +1 -0
  19. package/dist/admin-i18n.d.ts +135 -0
  20. package/dist/admin-i18n.d.ts.map +1 -0
  21. package/dist/admin-i18n.js +72 -0
  22. package/dist/admin-i18n.js.map +1 -0
  23. package/dist/admin-notifications.d.ts +55 -0
  24. package/dist/admin-notifications.d.ts.map +1 -0
  25. package/dist/admin-notifications.js +16 -0
  26. package/dist/admin-notifications.js.map +1 -0
  27. package/dist/admin-roles.d.ts +125 -0
  28. package/dist/admin-roles.d.ts.map +1 -0
  29. package/dist/admin-roles.js +2 -0
  30. package/dist/admin-roles.js.map +1 -0
  31. package/dist/admin-users.d.ts +178 -0
  32. package/dist/admin-users.d.ts.map +1 -0
  33. package/dist/admin-users.js +14 -0
  34. package/dist/admin-users.js.map +1 -0
  35. package/dist/admin.d.ts +243 -0
  36. package/dist/admin.d.ts.map +1 -0
  37. package/dist/admin.js +246 -0
  38. package/dist/admin.js.map +1 -0
  39. package/dist/analytics.d.ts +123 -0
  40. package/dist/analytics.d.ts.map +1 -0
  41. package/dist/analytics.js +68 -0
  42. package/dist/analytics.js.map +1 -0
  43. package/dist/api-keys.d.ts +97 -0
  44. package/dist/api-keys.d.ts.map +1 -0
  45. package/dist/api-keys.js +64 -0
  46. package/dist/api-keys.js.map +1 -0
  47. package/dist/assets-library.d.ts +684 -0
  48. package/dist/assets-library.d.ts.map +1 -0
  49. package/dist/assets-library.js +181 -0
  50. package/dist/assets-library.js.map +1 -0
  51. package/dist/audit-logs.d.ts +141 -0
  52. package/dist/audit-logs.d.ts.map +1 -0
  53. package/dist/audit-logs.js +31 -0
  54. package/dist/audit-logs.js.map +1 -0
  55. package/dist/auth.d.ts +174 -0
  56. package/dist/auth.d.ts.map +1 -0
  57. package/dist/auth.js +27 -0
  58. package/dist/auth.js.map +1 -0
  59. package/dist/blog.d.ts +669 -0
  60. package/dist/blog.d.ts.map +1 -0
  61. package/dist/blog.js +360 -0
  62. package/dist/blog.js.map +1 -0
  63. package/dist/capabilities.d.ts +40 -0
  64. package/dist/capabilities.d.ts.map +1 -0
  65. package/dist/capabilities.js +38 -0
  66. package/dist/capabilities.js.map +1 -0
  67. package/dist/carts.d.ts +1367 -0
  68. package/dist/carts.d.ts.map +1 -0
  69. package/dist/carts.js +405 -0
  70. package/dist/carts.js.map +1 -0
  71. package/dist/catalog.d.ts +2855 -0
  72. package/dist/catalog.d.ts.map +1 -0
  73. package/dist/catalog.js +1543 -0
  74. package/dist/catalog.js.map +1 -0
  75. package/dist/cms.d.ts +872 -0
  76. package/dist/cms.d.ts.map +1 -0
  77. package/dist/cms.js +468 -0
  78. package/dist/cms.js.map +1 -0
  79. package/dist/common.d.ts +82 -0
  80. package/dist/common.d.ts.map +1 -0
  81. package/dist/common.js +72 -0
  82. package/dist/common.js.map +1 -0
  83. package/dist/comparisons.d.ts +487 -0
  84. package/dist/comparisons.d.ts.map +1 -0
  85. package/dist/comparisons.js +221 -0
  86. package/dist/comparisons.js.map +1 -0
  87. package/dist/credentials.d.ts +292 -0
  88. package/dist/credentials.d.ts.map +1 -0
  89. package/dist/credentials.js +142 -0
  90. package/dist/credentials.js.map +1 -0
  91. package/dist/credit-limits.d.ts +111 -0
  92. package/dist/credit-limits.d.ts.map +1 -0
  93. package/dist/credit-limits.js +35 -0
  94. package/dist/credit-limits.js.map +1 -0
  95. package/dist/currencies.d.ts +127 -0
  96. package/dist/currencies.d.ts.map +1 -0
  97. package/dist/currencies.js +20 -0
  98. package/dist/currencies.js.map +1 -0
  99. package/dist/custom-fields.d.ts +345 -0
  100. package/dist/custom-fields.d.ts.map +1 -0
  101. package/dist/custom-fields.js +185 -0
  102. package/dist/custom-fields.js.map +1 -0
  103. package/dist/customer-accounts.d.ts +690 -0
  104. package/dist/customer-accounts.d.ts.map +1 -0
  105. package/dist/customer-accounts.js +41 -0
  106. package/dist/customer-accounts.js.map +1 -0
  107. package/dist/customers.d.ts +305 -0
  108. package/dist/customers.d.ts.map +1 -0
  109. package/dist/customers.js +158 -0
  110. package/dist/customers.js.map +1 -0
  111. package/dist/dictionary.d.ts +580 -0
  112. package/dist/dictionary.d.ts.map +1 -0
  113. package/dist/dictionary.js +297 -0
  114. package/dist/dictionary.js.map +1 -0
  115. package/dist/email-address.d.ts +62 -0
  116. package/dist/email-address.d.ts.map +1 -0
  117. package/dist/email-address.js +64 -0
  118. package/dist/email-address.js.map +1 -0
  119. package/dist/email.d.ts +175 -0
  120. package/dist/email.d.ts.map +1 -0
  121. package/dist/email.js +45 -0
  122. package/dist/email.js.map +1 -0
  123. package/dist/envelopes.d.ts +15 -0
  124. package/dist/envelopes.d.ts.map +1 -0
  125. package/dist/envelopes.js +16 -0
  126. package/dist/envelopes.js.map +1 -0
  127. package/dist/environment-inputs.d.ts +306 -0
  128. package/dist/environment-inputs.d.ts.map +1 -0
  129. package/dist/environment-inputs.js +277 -0
  130. package/dist/environment-inputs.js.map +1 -0
  131. package/dist/erp-connector.d.ts +52 -0
  132. package/dist/erp-connector.d.ts.map +1 -0
  133. package/dist/erp-connector.js +34 -0
  134. package/dist/erp-connector.js.map +1 -0
  135. package/dist/errors.d.ts +455 -0
  136. package/dist/errors.d.ts.map +1 -0
  137. package/dist/errors.js +532 -0
  138. package/dist/errors.js.map +1 -0
  139. package/dist/google-analytics.d.ts +181 -0
  140. package/dist/google-analytics.d.ts.map +1 -0
  141. package/dist/google-analytics.js +176 -0
  142. package/dist/google-analytics.js.map +1 -0
  143. package/dist/google-tag-manager.d.ts +111 -0
  144. package/dist/google-tag-manager.d.ts.map +1 -0
  145. package/dist/google-tag-manager.js +129 -0
  146. package/dist/google-tag-manager.js.map +1 -0
  147. package/dist/i18n.d.ts +69 -0
  148. package/dist/i18n.d.ts.map +1 -0
  149. package/dist/i18n.js +59 -0
  150. package/dist/i18n.js.map +1 -0
  151. package/dist/import-export.d.ts +63 -0
  152. package/dist/import-export.d.ts.map +1 -0
  153. package/dist/import-export.js +37 -0
  154. package/dist/import-export.js.map +1 -0
  155. package/dist/index.d.ts +82 -0
  156. package/dist/index.d.ts.map +1 -0
  157. package/dist/index.js +126 -0
  158. package/dist/index.js.map +1 -0
  159. package/dist/inventory.d.ts +673 -0
  160. package/dist/inventory.d.ts.map +1 -0
  161. package/dist/inventory.js +412 -0
  162. package/dist/inventory.js.map +1 -0
  163. package/dist/invoice-ledger.d.ts +366 -0
  164. package/dist/invoice-ledger.d.ts.map +1 -0
  165. package/dist/invoice-ledger.js +114 -0
  166. package/dist/invoice-ledger.js.map +1 -0
  167. package/dist/invoices.d.ts +845 -0
  168. package/dist/invoices.d.ts.map +1 -0
  169. package/dist/invoices.js +314 -0
  170. package/dist/invoices.js.map +1 -0
  171. package/dist/kernel.d.ts +49 -0
  172. package/dist/kernel.d.ts.map +1 -0
  173. package/dist/kernel.js +19 -0
  174. package/dist/kernel.js.map +1 -0
  175. package/dist/languages.d.ts +122 -0
  176. package/dist/languages.d.ts.map +1 -0
  177. package/dist/languages.js +24 -0
  178. package/dist/languages.js.map +1 -0
  179. package/dist/linkedin-ads.d.ts +167 -0
  180. package/dist/linkedin-ads.d.ts.map +1 -0
  181. package/dist/linkedin-ads.js +156 -0
  182. package/dist/linkedin-ads.js.map +1 -0
  183. package/dist/megamenu.d.ts +556 -0
  184. package/dist/megamenu.d.ts.map +1 -0
  185. package/dist/megamenu.js +186 -0
  186. package/dist/megamenu.js.map +1 -0
  187. package/dist/meta-ads.d.ts +126 -0
  188. package/dist/meta-ads.d.ts.map +1 -0
  189. package/dist/meta-ads.js +112 -0
  190. package/dist/meta-ads.js.map +1 -0
  191. package/dist/mfa.d.ts +274 -0
  192. package/dist/mfa.d.ts.map +1 -0
  193. package/dist/mfa.js +187 -0
  194. package/dist/mfa.js.map +1 -0
  195. package/dist/modules.d.ts +1706 -0
  196. package/dist/modules.d.ts.map +1 -0
  197. package/dist/modules.js +1390 -0
  198. package/dist/modules.js.map +1 -0
  199. package/dist/newsletter.d.ts +611 -0
  200. package/dist/newsletter.d.ts.map +1 -0
  201. package/dist/newsletter.js +345 -0
  202. package/dist/newsletter.js.map +1 -0
  203. package/dist/orders.d.ts +1175 -0
  204. package/dist/orders.d.ts.map +1 -0
  205. package/dist/orders.js +630 -0
  206. package/dist/orders.js.map +1 -0
  207. package/dist/organizations.d.ts +938 -0
  208. package/dist/organizations.d.ts.map +1 -0
  209. package/dist/organizations.js +418 -0
  210. package/dist/organizations.js.map +1 -0
  211. package/dist/pagination.d.ts +21 -0
  212. package/dist/pagination.d.ts.map +1 -0
  213. package/dist/pagination.js +22 -0
  214. package/dist/pagination.js.map +1 -0
  215. package/dist/payment-methods.d.ts +472 -0
  216. package/dist/payment-methods.d.ts.map +1 -0
  217. package/dist/payment-methods.js +175 -0
  218. package/dist/payment-methods.js.map +1 -0
  219. package/dist/payment-return-url.d.ts +53 -0
  220. package/dist/payment-return-url.d.ts.map +1 -0
  221. package/dist/payment-return-url.js +35 -0
  222. package/dist/payment-return-url.js.map +1 -0
  223. package/dist/payments.d.ts +386 -0
  224. package/dist/payments.d.ts.map +1 -0
  225. package/dist/payments.js +84 -0
  226. package/dist/payments.js.map +1 -0
  227. package/dist/pim-connector.d.ts +60 -0
  228. package/dist/pim-connector.d.ts.map +1 -0
  229. package/dist/pim-connector.js +43 -0
  230. package/dist/pim-connector.js.map +1 -0
  231. package/dist/pim-field-path.d.ts +6 -0
  232. package/dist/pim-field-path.d.ts.map +1 -0
  233. package/dist/pim-field-path.js +101 -0
  234. package/dist/pim-field-path.js.map +1 -0
  235. package/dist/platform-language.d.ts +20 -0
  236. package/dist/platform-language.d.ts.map +1 -0
  237. package/dist/platform-language.js +22 -0
  238. package/dist/platform-language.js.map +1 -0
  239. package/dist/price-lists.d.ts +685 -0
  240. package/dist/price-lists.d.ts.map +1 -0
  241. package/dist/price-lists.js +330 -0
  242. package/dist/price-lists.js.map +1 -0
  243. package/dist/product-feeds.d.ts +2837 -0
  244. package/dist/product-feeds.d.ts.map +1 -0
  245. package/dist/product-feeds.js +1504 -0
  246. package/dist/product-feeds.js.map +1 -0
  247. package/dist/product-scope-overrides.d.ts +134 -0
  248. package/dist/product-scope-overrides.d.ts.map +1 -0
  249. package/dist/product-scope-overrides.js +82 -0
  250. package/dist/product-scope-overrides.js.map +1 -0
  251. package/dist/product-value-resolver.d.ts +88 -0
  252. package/dist/product-value-resolver.d.ts.map +1 -0
  253. package/dist/product-value-resolver.js +128 -0
  254. package/dist/product-value-resolver.js.map +1 -0
  255. package/dist/promotions.d.ts +678 -0
  256. package/dist/promotions.d.ts.map +1 -0
  257. package/dist/promotions.js +479 -0
  258. package/dist/promotions.js.map +1 -0
  259. package/dist/prompt-actions.d.ts +582 -0
  260. package/dist/prompt-actions.d.ts.map +1 -0
  261. package/dist/prompt-actions.js +221 -0
  262. package/dist/prompt-actions.js.map +1 -0
  263. package/dist/pwa.d.ts +293 -0
  264. package/dist/pwa.d.ts.map +1 -0
  265. package/dist/pwa.js +204 -0
  266. package/dist/pwa.js.map +1 -0
  267. package/dist/quick-order.d.ts +340 -0
  268. package/dist/quick-order.d.ts.map +1 -0
  269. package/dist/quick-order.js +177 -0
  270. package/dist/quick-order.js.map +1 -0
  271. package/dist/quote-requests.d.ts +538 -0
  272. package/dist/quote-requests.d.ts.map +1 -0
  273. package/dist/quote-requests.js +308 -0
  274. package/dist/quote-requests.js.map +1 -0
  275. package/dist/returns.d.ts +774 -0
  276. package/dist/returns.d.ts.map +1 -0
  277. package/dist/returns.js +389 -0
  278. package/dist/returns.js.map +1 -0
  279. package/dist/sales-channels.d.ts +392 -0
  280. package/dist/sales-channels.d.ts.map +1 -0
  281. package/dist/sales-channels.js +285 -0
  282. package/dist/sales-channels.js.map +1 -0
  283. package/dist/scope-notice.d.ts +60 -0
  284. package/dist/scope-notice.d.ts.map +1 -0
  285. package/dist/scope-notice.js +56 -0
  286. package/dist/scope-notice.js.map +1 -0
  287. package/dist/search.d.ts +321 -0
  288. package/dist/search.d.ts.map +1 -0
  289. package/dist/search.js +160 -0
  290. package/dist/search.js.map +1 -0
  291. package/dist/seo.d.ts +113 -0
  292. package/dist/seo.d.ts.map +1 -0
  293. package/dist/seo.js +63 -0
  294. package/dist/seo.js.map +1 -0
  295. package/dist/settings.d.ts +453 -0
  296. package/dist/settings.d.ts.map +1 -0
  297. package/dist/settings.js +337 -0
  298. package/dist/settings.js.map +1 -0
  299. package/dist/shipments.d.ts +140 -0
  300. package/dist/shipments.d.ts.map +1 -0
  301. package/dist/shipments.js +14 -0
  302. package/dist/shipments.js.map +1 -0
  303. package/dist/shipping-methods.d.ts +350 -0
  304. package/dist/shipping-methods.d.ts.map +1 -0
  305. package/dist/shipping-methods.js +99 -0
  306. package/dist/shipping-methods.js.map +1 -0
  307. package/dist/shopping-lists.d.ts +122 -0
  308. package/dist/shopping-lists.d.ts.map +1 -0
  309. package/dist/shopping-lists.js +92 -0
  310. package/dist/shopping-lists.js.map +1 -0
  311. package/dist/taxes.d.ts +106 -0
  312. package/dist/taxes.d.ts.map +1 -0
  313. package/dist/taxes.js +80 -0
  314. package/dist/taxes.js.map +1 -0
  315. package/dist/text-normalization.d.ts +199 -0
  316. package/dist/text-normalization.d.ts.map +1 -0
  317. package/dist/text-normalization.js +205 -0
  318. package/dist/text-normalization.js.map +1 -0
  319. package/dist/transactional-emails.d.ts +459 -0
  320. package/dist/transactional-emails.d.ts.map +1 -0
  321. package/dist/transactional-emails.js +212 -0
  322. package/dist/transactional-emails.js.map +1 -0
  323. package/dist/webhooks.d.ts +69 -0
  324. package/dist/webhooks.d.ts.map +1 -0
  325. package/dist/webhooks.js +53 -0
  326. package/dist/webhooks.js.map +1 -0
  327. package/package.json +46 -0
package/dist/cms.d.ts ADDED
@@ -0,0 +1,872 @@
1
+ import { z } from 'zod';
2
+ export declare const cmsPageStatusSchema: z.ZodEnum<{
3
+ draft: "draft";
4
+ published: "published";
5
+ archived: "archived";
6
+ }>;
7
+ export type CmsPageStatus = z.infer<typeof cmsPageStatusSchema>;
8
+ export declare const cmsContentEnvelopeSchema: z.ZodObject<{
9
+ schema_version: z.ZodOptional<z.ZodNumber>;
10
+ languages: z.ZodRecord<z.ZodString, z.ZodUnknown>;
11
+ }, z.core.$strip>;
12
+ export type CmsContentEnvelope = z.infer<typeof cmsContentEnvelopeSchema>;
13
+ export declare const cmsPageSummarySchema: z.ZodObject<{
14
+ id: z.ZodString;
15
+ name: z.ZodString;
16
+ slug: z.ZodString;
17
+ status: z.ZodEnum<{
18
+ draft: "draft";
19
+ published: "published";
20
+ archived: "archived";
21
+ }>;
22
+ active: z.ZodBoolean;
23
+ description: z.ZodNullable<z.ZodString>;
24
+ salesChannelIds: z.ZodArray<z.ZodString>;
25
+ languages: z.ZodArray<z.ZodString>;
26
+ version: z.ZodNumber;
27
+ createdAt: z.ZodString;
28
+ updatedAt: z.ZodString;
29
+ }, z.core.$strip>;
30
+ export type CmsPageSummary = z.infer<typeof cmsPageSummarySchema>;
31
+ export declare const cmsPageDetailSchema: z.ZodObject<{
32
+ id: z.ZodString;
33
+ name: z.ZodString;
34
+ slug: z.ZodString;
35
+ status: z.ZodEnum<{
36
+ draft: "draft";
37
+ published: "published";
38
+ archived: "archived";
39
+ }>;
40
+ active: z.ZodBoolean;
41
+ description: z.ZodNullable<z.ZodString>;
42
+ salesChannelIds: z.ZodArray<z.ZodString>;
43
+ languages: z.ZodArray<z.ZodString>;
44
+ version: z.ZodNumber;
45
+ createdAt: z.ZodString;
46
+ updatedAt: z.ZodString;
47
+ meta: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
48
+ title: z.ZodOptional<z.ZodString>;
49
+ description: z.ZodOptional<z.ZodString>;
50
+ keywords: z.ZodOptional<z.ZodString>;
51
+ }, z.core.$strip>>>;
52
+ content: z.ZodObject<{
53
+ schema_version: z.ZodOptional<z.ZodNumber>;
54
+ languages: z.ZodRecord<z.ZodString, z.ZodUnknown>;
55
+ }, z.core.$strip>;
56
+ }, z.core.$strip>;
57
+ export type CmsPageDetail = z.infer<typeof cmsPageDetailSchema>;
58
+ export declare const createCmsPageRequestSchema: z.ZodObject<{
59
+ name: z.ZodString;
60
+ slug: z.ZodString;
61
+ active: z.ZodDefault<z.ZodBoolean>;
62
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
63
+ salesChannelIds: z.ZodArray<z.ZodString>;
64
+ languages: z.ZodArray<z.ZodString>;
65
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
66
+ title: z.ZodOptional<z.ZodString>;
67
+ description: z.ZodOptional<z.ZodString>;
68
+ keywords: z.ZodOptional<z.ZodString>;
69
+ }, z.core.$strip>>>;
70
+ }, z.core.$strip>;
71
+ export type CreateCmsPageRequest = z.infer<typeof createCmsPageRequestSchema>;
72
+ export declare const patchCmsPageRequestSchema: z.ZodObject<{
73
+ name: z.ZodOptional<z.ZodString>;
74
+ slug: z.ZodOptional<z.ZodString>;
75
+ active: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
76
+ description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
77
+ salesChannelIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
78
+ languages: z.ZodOptional<z.ZodArray<z.ZodString>>;
79
+ meta: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
80
+ title: z.ZodOptional<z.ZodString>;
81
+ description: z.ZodOptional<z.ZodString>;
82
+ keywords: z.ZodOptional<z.ZodString>;
83
+ }, z.core.$strip>>>>;
84
+ version: z.ZodOptional<z.ZodNumber>;
85
+ }, z.core.$strip>;
86
+ export type PatchCmsPageRequest = z.infer<typeof patchCmsPageRequestSchema>;
87
+ export declare const putCmsPageContentRequestSchema: z.ZodObject<{
88
+ data: z.ZodUnknown;
89
+ version: z.ZodNumber;
90
+ }, z.core.$strip>;
91
+ export type PutCmsPageContentRequest = z.infer<typeof putCmsPageContentRequestSchema>;
92
+ export declare const cmsBlockSummarySchema: z.ZodObject<{
93
+ id: z.ZodString;
94
+ name: z.ZodString;
95
+ code: z.ZodString;
96
+ active: z.ZodBoolean;
97
+ description: z.ZodNullable<z.ZodString>;
98
+ salesChannelIds: z.ZodArray<z.ZodString>;
99
+ languages: z.ZodArray<z.ZodString>;
100
+ version: z.ZodNumber;
101
+ createdAt: z.ZodString;
102
+ updatedAt: z.ZodString;
103
+ }, z.core.$strip>;
104
+ export type CmsBlockSummary = z.infer<typeof cmsBlockSummarySchema>;
105
+ export declare const cmsBlockDetailSchema: z.ZodObject<{
106
+ id: z.ZodString;
107
+ name: z.ZodString;
108
+ code: z.ZodString;
109
+ active: z.ZodBoolean;
110
+ description: z.ZodNullable<z.ZodString>;
111
+ salesChannelIds: z.ZodArray<z.ZodString>;
112
+ languages: z.ZodArray<z.ZodString>;
113
+ version: z.ZodNumber;
114
+ createdAt: z.ZodString;
115
+ updatedAt: z.ZodString;
116
+ content: z.ZodObject<{
117
+ schema_version: z.ZodOptional<z.ZodNumber>;
118
+ languages: z.ZodRecord<z.ZodString, z.ZodUnknown>;
119
+ }, z.core.$strip>;
120
+ }, z.core.$strip>;
121
+ export type CmsBlockDetail = z.infer<typeof cmsBlockDetailSchema>;
122
+ export declare const createCmsBlockRequestSchema: z.ZodObject<{
123
+ name: z.ZodString;
124
+ code: z.ZodString;
125
+ active: z.ZodDefault<z.ZodBoolean>;
126
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
127
+ salesChannelIds: z.ZodArray<z.ZodString>;
128
+ languages: z.ZodArray<z.ZodString>;
129
+ }, z.core.$strip>;
130
+ export type CreateCmsBlockRequest = z.infer<typeof createCmsBlockRequestSchema>;
131
+ export declare const patchCmsBlockRequestSchema: z.ZodObject<{
132
+ name: z.ZodOptional<z.ZodString>;
133
+ code: z.ZodOptional<z.ZodString>;
134
+ active: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
135
+ description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
136
+ salesChannelIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
137
+ languages: z.ZodOptional<z.ZodArray<z.ZodString>>;
138
+ version: z.ZodOptional<z.ZodNumber>;
139
+ }, z.core.$strip>;
140
+ export type PatchCmsBlockRequest = z.infer<typeof patchCmsBlockRequestSchema>;
141
+ export declare const cmsTemplateSummarySchema: z.ZodObject<{
142
+ id: z.ZodString;
143
+ name: z.ZodString;
144
+ code: z.ZodString;
145
+ description: z.ZodNullable<z.ZodString>;
146
+ salesChannelIds: z.ZodArray<z.ZodString>;
147
+ languages: z.ZodArray<z.ZodString>;
148
+ version: z.ZodNumber;
149
+ createdAt: z.ZodString;
150
+ updatedAt: z.ZodString;
151
+ }, z.core.$strip>;
152
+ export type CmsTemplateSummary = z.infer<typeof cmsTemplateSummarySchema>;
153
+ export declare const cmsTemplateDetailSchema: z.ZodObject<{
154
+ id: z.ZodString;
155
+ name: z.ZodString;
156
+ code: z.ZodString;
157
+ description: z.ZodNullable<z.ZodString>;
158
+ salesChannelIds: z.ZodArray<z.ZodString>;
159
+ languages: z.ZodArray<z.ZodString>;
160
+ version: z.ZodNumber;
161
+ createdAt: z.ZodString;
162
+ updatedAt: z.ZodString;
163
+ content: z.ZodObject<{
164
+ schema_version: z.ZodOptional<z.ZodNumber>;
165
+ languages: z.ZodRecord<z.ZodString, z.ZodUnknown>;
166
+ }, z.core.$strip>;
167
+ }, z.core.$strip>;
168
+ export type CmsTemplateDetail = z.infer<typeof cmsTemplateDetailSchema>;
169
+ export declare const createCmsTemplateRequestSchema: z.ZodObject<{
170
+ name: z.ZodString;
171
+ code: z.ZodString;
172
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
173
+ salesChannelIds: z.ZodArray<z.ZodString>;
174
+ languages: z.ZodArray<z.ZodString>;
175
+ }, z.core.$strip>;
176
+ export type CreateCmsTemplateRequest = z.infer<typeof createCmsTemplateRequestSchema>;
177
+ export declare const patchCmsTemplateRequestSchema: z.ZodObject<{
178
+ name: z.ZodOptional<z.ZodString>;
179
+ code: z.ZodOptional<z.ZodString>;
180
+ description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
181
+ salesChannelIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
182
+ languages: z.ZodOptional<z.ZodArray<z.ZodString>>;
183
+ version: z.ZodOptional<z.ZodNumber>;
184
+ }, z.core.$strip>;
185
+ export type PatchCmsTemplateRequest = z.infer<typeof patchCmsTemplateRequestSchema>;
186
+ export declare const cmsHookSummarySchema: z.ZodObject<{
187
+ id: z.ZodString;
188
+ name: z.ZodString;
189
+ code: z.ZodString;
190
+ active: z.ZodBoolean;
191
+ description: z.ZodNullable<z.ZodString>;
192
+ isSystem: z.ZodBoolean;
193
+ salesChannelIds: z.ZodArray<z.ZodString>;
194
+ attachmentCount: z.ZodNumber;
195
+ version: z.ZodNumber;
196
+ createdAt: z.ZodString;
197
+ updatedAt: z.ZodString;
198
+ }, z.core.$strip>;
199
+ export type CmsHookSummary = z.infer<typeof cmsHookSummarySchema>;
200
+ export declare const cmsHookDetailSchema: z.ZodObject<{
201
+ id: z.ZodString;
202
+ name: z.ZodString;
203
+ code: z.ZodString;
204
+ active: z.ZodBoolean;
205
+ description: z.ZodNullable<z.ZodString>;
206
+ isSystem: z.ZodBoolean;
207
+ salesChannelIds: z.ZodArray<z.ZodString>;
208
+ attachmentCount: z.ZodNumber;
209
+ version: z.ZodNumber;
210
+ createdAt: z.ZodString;
211
+ updatedAt: z.ZodString;
212
+ attachments: z.ZodArray<z.ZodObject<{
213
+ blockId: z.ZodString;
214
+ blockCode: z.ZodString;
215
+ position: z.ZodNumber;
216
+ }, z.core.$strip>>;
217
+ }, z.core.$strip>;
218
+ export type CmsHookDetail = z.infer<typeof cmsHookDetailSchema>;
219
+ export declare const createCmsHookRequestSchema: z.ZodObject<{
220
+ name: z.ZodString;
221
+ code: z.ZodString;
222
+ active: z.ZodDefault<z.ZodBoolean>;
223
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
224
+ salesChannelIds: z.ZodArray<z.ZodString>;
225
+ }, z.core.$strip>;
226
+ export type CreateCmsHookRequest = z.infer<typeof createCmsHookRequestSchema>;
227
+ export declare const patchCmsHookRequestSchema: z.ZodObject<{
228
+ name: z.ZodOptional<z.ZodString>;
229
+ active: z.ZodOptional<z.ZodBoolean>;
230
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
231
+ salesChannelIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
232
+ version: z.ZodOptional<z.ZodNumber>;
233
+ }, z.core.$strip>;
234
+ export type PatchCmsHookRequest = z.infer<typeof patchCmsHookRequestSchema>;
235
+ export declare const cmsHookAttachmentRequestSchema: z.ZodObject<{
236
+ blockId: z.ZodString;
237
+ position: z.ZodDefault<z.ZodNumber>;
238
+ }, z.core.$strip>;
239
+ export type CmsHookAttachmentRequest = z.infer<typeof cmsHookAttachmentRequestSchema>;
240
+ export declare const pageBuilderContextSchema: z.ZodEnum<{
241
+ invoice: "invoice";
242
+ email: "email";
243
+ cms: "cms";
244
+ newsletter: "newsletter";
245
+ }>;
246
+ export type PageBuilderContext = z.infer<typeof pageBuilderContextSchema>;
247
+ export declare const pageBuilderBreakpointsSchema: z.ZodObject<{
248
+ tabletMin: z.ZodNumber;
249
+ desktopMin: z.ZodNumber;
250
+ }, z.core.$strip>;
251
+ export type PageBuilderBreakpoints = z.infer<typeof pageBuilderBreakpointsSchema>;
252
+ export declare const cmsFieldDescriptorSchema: z.ZodObject<{
253
+ type: z.ZodEnum<{
254
+ number: "number";
255
+ object: "object";
256
+ array: "array";
257
+ text: "text";
258
+ textarea: "textarea";
259
+ select: "select";
260
+ radio: "radio";
261
+ external: "external";
262
+ uuid: "uuid";
263
+ richtext: "richtext";
264
+ }>;
265
+ label: z.ZodOptional<z.ZodString>;
266
+ required: z.ZodOptional<z.ZodBoolean>;
267
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
268
+ label: z.ZodString;
269
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
270
+ }, z.core.$strip>>>;
271
+ refKind: z.ZodOptional<z.ZodString>;
272
+ }, z.core.$strip>;
273
+ export type CmsFieldDescriptor = z.infer<typeof cmsFieldDescriptorSchema>;
274
+ export declare const cmsColorPaletteEntrySchema: z.ZodObject<{
275
+ id: z.ZodString;
276
+ name: z.ZodString;
277
+ hex: z.ZodString;
278
+ }, z.core.$strip>;
279
+ export type CmsColorPaletteEntry = z.infer<typeof cmsColorPaletteEntrySchema>;
280
+ export declare const cmsColorPaletteSchema: z.ZodArray<z.ZodObject<{
281
+ id: z.ZodString;
282
+ name: z.ZodString;
283
+ hex: z.ZodString;
284
+ }, z.core.$strip>>;
285
+ export type CmsColorPalette = z.infer<typeof cmsColorPaletteSchema>;
286
+ export declare const putCmsColorPaletteRequestSchema: z.ZodObject<{
287
+ entries: z.ZodArray<z.ZodObject<{
288
+ id: z.ZodString;
289
+ name: z.ZodString;
290
+ hex: z.ZodString;
291
+ }, z.core.$strip>>;
292
+ expectedVersion: z.ZodOptional<z.ZodString>;
293
+ }, z.core.$strip>;
294
+ export type PutCmsColorPaletteRequest = z.infer<typeof putCmsColorPaletteRequestSchema>;
295
+ /**
296
+ * The grammar of a **persisted** Page Builder block name:
297
+ * `<ownerModuleId>.<LocalName>`, one separator exactly
298
+ * (`specs/096-page-builder-block-ownership/data-model.md` §3).
299
+ *
300
+ * The owner segment is the declaring module's `id` and is matched by the same
301
+ * shape as `moduleIdRe`, minus the underscore prefix `moduleIdRe` reserves for
302
+ * platform-internal modules — none of which owns a block. The local segment is
303
+ * PascalCase, which all 74 pre-existing names already are.
304
+ *
305
+ * **This is the one place the grammar is written.**
306
+ * `@endora-commerce/page-builder-core`'s `block-name.ts` imports it for
307
+ * `parseBlockName` / `ownerOf` / `isNamespaced` / `formatBlockName`, and every
308
+ * other reader goes through those — the discipline `text-normalization.ts`
309
+ * keeps for diacritic folding and slugs, for the same reason: a second copy of
310
+ * a grammar is a second answer waiting to disagree, and this one is written
311
+ * into `jsonb` and never rewritten.
312
+ */
313
+ export declare const blockNameRe: RegExp;
314
+ /**
315
+ * The grammar of a declared palette category's key (`data-model.md` §2).
316
+ * snake_case, like a module id and unlike a block's local name — a category is
317
+ * a section of a palette, not a persisted identifier.
318
+ */
319
+ export declare const blockCategoryKeyRe: RegExp;
320
+ /**
321
+ * A module's declaration of one Page Builder block
322
+ * (`specs/096-page-builder-block-ownership/contracts/block-definition.md` §1).
323
+ *
324
+ * Declared on the module manifest as `blocks`, beside `permissions`, `actions`
325
+ * and `errorCodes`, and read by nothing at runtime until the registry is
326
+ * populated from it.
327
+ *
328
+ * **There is no `ownerModule` field, and its absence is the design.** The owner
329
+ * is the segment before the `.` in `name`, so ownership is stated once rather
330
+ * than twice; the registry keeps computing it for the descriptor it serves.
331
+ * `defineModuleManifest` refuses a `name` whose owner segment is not the
332
+ * declaring module's own `id`.
333
+ *
334
+ * `labelKey` and `descriptionKey` are **relative to the declaring module's own
335
+ * i18n namespace** — `blocks.productGrid.label`, never `catalog.blocks.…` —
336
+ * which is the rule manifest `actions` already follow, and which this layer
337
+ * cannot enforce for the reason it cannot enforce it there either: relativity
338
+ * is a fact about a bundle, and this schema sees a string.
339
+ */
340
+ export declare const BlockDefinitionSchema: z.ZodObject<{
341
+ name: z.ZodString;
342
+ labelKey: z.ZodString;
343
+ descriptionKey: z.ZodOptional<z.ZodString>;
344
+ category: z.ZodString;
345
+ contexts: z.ZodArray<z.ZodEnum<{
346
+ invoice: "invoice";
347
+ email: "email";
348
+ cms: "cms";
349
+ newsletter: "newsletter";
350
+ }>>;
351
+ fields: z.ZodRecord<z.ZodString, z.ZodObject<{
352
+ type: z.ZodEnum<{
353
+ number: "number";
354
+ object: "object";
355
+ array: "array";
356
+ text: "text";
357
+ textarea: "textarea";
358
+ select: "select";
359
+ radio: "radio";
360
+ external: "external";
361
+ uuid: "uuid";
362
+ richtext: "richtext";
363
+ }>;
364
+ label: z.ZodOptional<z.ZodString>;
365
+ required: z.ZodOptional<z.ZodBoolean>;
366
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
367
+ label: z.ZodString;
368
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
369
+ }, z.core.$strip>>>;
370
+ refKind: z.ZodOptional<z.ZodString>;
371
+ }, z.core.$strip>>;
372
+ defaultProps: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
373
+ responsiveFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
374
+ previewIcon: z.ZodOptional<z.ZodString>;
375
+ weight: z.ZodOptional<z.ZodNumber>;
376
+ }, z.core.$strip>;
377
+ export type BlockDefinition = z.infer<typeof BlockDefinitionSchema>;
378
+ /**
379
+ * A declared palette section (`data-model.md` §2).
380
+ *
381
+ * Categories are declared rather than hard-coded so that a module contributing
382
+ * a block into a category never has to edit a shared `categories` map in a
383
+ * package it does not own — the shape feature 091 removed from the admin. Two
384
+ * modules declaring the same `(key, context)` is therefore expected and is not
385
+ * a collision; the palette merges them.
386
+ *
387
+ * **`contracts/block-definition.md` §1.1 is normative for that merge** — what
388
+ * unions, what resolves, the total order that decides which declaration's
389
+ * `titleKey`, `weight` and `visible` are served as one record, and the two CI
390
+ * signals that hold this repository's modules to agreeing. It is cited rather
391
+ * than summarised here: a second statement of a merge rule is a second answer
392
+ * waiting to disagree. `defineModuleManifest` refuses one *manifest* declaring
393
+ * one `(key, context)` twice (§1 rule 4), which is the only case with a single
394
+ * author and therefore the only one decidable where it is written.
395
+ *
396
+ * A category exists **per context**: `layout` in the CMS palette and `layout`
397
+ * in the e-mail palette are two declarations.
398
+ *
399
+ * `visible` is absent-means-visible rather than a Zod `.default(true)`,
400
+ * deliberately: `ModuleManifest` is the schema's *output* type, so a default
401
+ * would oblige every author to write `visible: true` on every category — which
402
+ * is what `actions`' `keywords` and `weight` already do, and is not a precedent
403
+ * worth extending. It replaces the CMS palette's `_internal` hidden drawer.
404
+ */
405
+ export declare const BlockCategorySchema: z.ZodObject<{
406
+ key: z.ZodString;
407
+ titleKey: z.ZodString;
408
+ contexts: z.ZodArray<z.ZodEnum<{
409
+ invoice: "invoice";
410
+ email: "email";
411
+ cms: "cms";
412
+ newsletter: "newsletter";
413
+ }>>;
414
+ weight: z.ZodOptional<z.ZodNumber>;
415
+ visible: z.ZodOptional<z.ZodBoolean>;
416
+ }, z.core.$strip>;
417
+ export type BlockCategory = z.infer<typeof BlockCategorySchema>;
418
+ /**
419
+ * `GET /api/v1/admin/cms/page-builder/config`.
420
+ *
421
+ * Feature 096 extends this **additively**: every per-component field it gains
422
+ * is optional and the category list is optional, so a consumer reading only the
423
+ * five fields that were here before keeps working, and Phase 1 changes nothing
424
+ * a client can observe. `name` deliberately does **not** take `blockNameRe` —
425
+ * the registry serves the pre-migration bare names until the renderer maps are
426
+ * re-keyed, and a grammar here would make the vocabulary phase a breaking
427
+ * change.
428
+ */
429
+ export declare const cmsPageBuilderDescriptorSchema: z.ZodObject<{
430
+ schemaVersion: z.ZodNumber;
431
+ breakpoints: z.ZodOptional<z.ZodObject<{
432
+ tabletMin: z.ZodNumber;
433
+ desktopMin: z.ZodNumber;
434
+ }, z.core.$strip>>;
435
+ colorPalette: z.ZodOptional<z.ZodArray<z.ZodObject<{
436
+ id: z.ZodString;
437
+ name: z.ZodString;
438
+ hex: z.ZodString;
439
+ }, z.core.$strip>>>;
440
+ components: z.ZodArray<z.ZodObject<{
441
+ name: z.ZodString;
442
+ ownerModule: z.ZodString;
443
+ fields: z.ZodRecord<z.ZodString, z.ZodObject<{
444
+ type: z.ZodEnum<{
445
+ number: "number";
446
+ object: "object";
447
+ array: "array";
448
+ text: "text";
449
+ textarea: "textarea";
450
+ select: "select";
451
+ radio: "radio";
452
+ external: "external";
453
+ uuid: "uuid";
454
+ richtext: "richtext";
455
+ }>;
456
+ label: z.ZodOptional<z.ZodString>;
457
+ required: z.ZodOptional<z.ZodBoolean>;
458
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
459
+ label: z.ZodString;
460
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
461
+ }, z.core.$strip>>>;
462
+ refKind: z.ZodOptional<z.ZodString>;
463
+ }, z.core.$strip>>;
464
+ previewIcon: z.ZodOptional<z.ZodString>;
465
+ contexts: z.ZodOptional<z.ZodArray<z.ZodEnum<{
466
+ invoice: "invoice";
467
+ email: "email";
468
+ cms: "cms";
469
+ newsletter: "newsletter";
470
+ }>>>;
471
+ labelKey: z.ZodOptional<z.ZodString>;
472
+ descriptionKey: z.ZodOptional<z.ZodString>;
473
+ category: z.ZodOptional<z.ZodString>;
474
+ defaultProps: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
475
+ responsiveFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
476
+ weight: z.ZodOptional<z.ZodNumber>;
477
+ }, z.core.$strip>>;
478
+ categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
479
+ key: z.ZodString;
480
+ titleKey: z.ZodString;
481
+ contexts: z.ZodArray<z.ZodEnum<{
482
+ invoice: "invoice";
483
+ email: "email";
484
+ cms: "cms";
485
+ newsletter: "newsletter";
486
+ }>>;
487
+ weight: z.ZodOptional<z.ZodNumber>;
488
+ visible: z.ZodOptional<z.ZodBoolean>;
489
+ ownerModule: z.ZodOptional<z.ZodString>;
490
+ }, z.core.$strip>>>;
491
+ }, z.core.$strip>;
492
+ export type CmsPageBuilderDescriptor = z.infer<typeof cmsPageBuilderDescriptorSchema>;
493
+ export declare const cmsAssetEmbedResolutionSchema: z.ZodObject<{
494
+ url: z.ZodString;
495
+ mimeType: z.ZodString;
496
+ filename: z.ZodString;
497
+ label: z.ZodNullable<z.ZodString>;
498
+ visibility: z.ZodEnum<{
499
+ public: "public";
500
+ private: "private";
501
+ }>;
502
+ }, z.core.$strip>;
503
+ export type CmsAssetEmbedResolution = z.infer<typeof cmsAssetEmbedResolutionSchema>;
504
+ export declare const cmsResolvedBlockSchema: z.ZodObject<{
505
+ id: z.ZodString;
506
+ code: z.ZodString;
507
+ language: z.ZodString;
508
+ content: z.ZodObject<{
509
+ data: z.ZodUnknown;
510
+ }, z.core.$strip>;
511
+ }, z.core.$strip>;
512
+ export type CmsResolvedBlock = z.infer<typeof cmsResolvedBlockSchema>;
513
+ export declare const cmsResolvedTemplateSchema: z.ZodObject<{
514
+ id: z.ZodString;
515
+ code: z.ZodString;
516
+ language: z.ZodString;
517
+ content: z.ZodObject<{
518
+ data: z.ZodUnknown;
519
+ }, z.core.$strip>;
520
+ }, z.core.$strip>;
521
+ export type CmsResolvedTemplate = CmsResolvedBlock;
522
+ export declare const cmsResolvedPageSchema: z.ZodObject<{
523
+ id: z.ZodString;
524
+ slug: z.ZodString;
525
+ name: z.ZodString;
526
+ language: z.ZodString;
527
+ meta: z.ZodObject<{
528
+ title: z.ZodNullable<z.ZodString>;
529
+ description: z.ZodNullable<z.ZodString>;
530
+ keywords: z.ZodNullable<z.ZodString>;
531
+ }, z.core.$strip>;
532
+ content: z.ZodObject<{
533
+ data: z.ZodUnknown;
534
+ }, z.core.$strip>;
535
+ embeds: z.ZodObject<{
536
+ blocks: z.ZodRecord<z.ZodString, z.ZodObject<{
537
+ id: z.ZodString;
538
+ code: z.ZodString;
539
+ language: z.ZodString;
540
+ content: z.ZodObject<{
541
+ data: z.ZodUnknown;
542
+ }, z.core.$strip>;
543
+ }, z.core.$strip>>;
544
+ templates: z.ZodRecord<z.ZodString, z.ZodObject<{
545
+ id: z.ZodString;
546
+ code: z.ZodString;
547
+ language: z.ZodString;
548
+ content: z.ZodObject<{
549
+ data: z.ZodUnknown;
550
+ }, z.core.$strip>;
551
+ }, z.core.$strip>>;
552
+ }, z.core.$strip>;
553
+ assets: z.ZodRecord<z.ZodString, z.ZodObject<{
554
+ url: z.ZodString;
555
+ mimeType: z.ZodString;
556
+ filename: z.ZodString;
557
+ label: z.ZodNullable<z.ZodString>;
558
+ visibility: z.ZodEnum<{
559
+ public: "public";
560
+ private: "private";
561
+ }>;
562
+ }, z.core.$strip>>;
563
+ }, z.core.$strip>;
564
+ export type CmsResolvedPage = z.infer<typeof cmsResolvedPageSchema>;
565
+ export declare const cmsResolvedHookSchema: z.ZodObject<{
566
+ hookCode: z.ZodString;
567
+ blocks: z.ZodArray<z.ZodObject<{
568
+ id: z.ZodString;
569
+ code: z.ZodString;
570
+ language: z.ZodString;
571
+ content: z.ZodObject<{
572
+ data: z.ZodUnknown;
573
+ }, z.core.$strip>;
574
+ }, z.core.$strip>>;
575
+ }, z.core.$strip>;
576
+ export type CmsResolvedHook = z.infer<typeof cmsResolvedHookSchema>;
577
+ /**
578
+ * One published CMS page, as a crawler needs to be told about it
579
+ * (`specs/105-cms-root-page-urls/` FR-021; `contracts/cms-page-url.md` §4.1).
580
+ *
581
+ * `slug` is the **per-channel** slug — `cms_page_sales_channels.slug`, which is
582
+ * what §1 says the page's address is built from, and not `cms_pages.slug`,
583
+ * which carries one value for every channel the page is published to. The two
584
+ * agree for a single-channel page and are free to disagree for any other, which
585
+ * is why the join and not the column is the source.
586
+ *
587
+ * `updatedAt` is the page row's, and it is here because a sitemap entry with no
588
+ * `lastModified` tells a crawler nothing it did not already know. Nothing else
589
+ * of the page travels: this shape exists to enumerate addresses, and a rendered
590
+ * page-builder tree per row would put the whole CMS through memory on every
591
+ * sitemap build — the reasoning `CmsPageRecord` already states for dropping
592
+ * `body` and `content`.
593
+ */
594
+ export declare const cmsPageIndexEntrySchema: z.ZodObject<{
595
+ slug: z.ZodString;
596
+ updatedAt: z.ZodString;
597
+ }, z.core.$strip>;
598
+ export type CmsPageIndexEntry = z.infer<typeof cmsPageIndexEntrySchema>;
599
+ /** The published pages of the requested sales channel (FR-021). */
600
+ export declare const cmsPageIndexResponseSchema: z.ZodObject<{
601
+ pages: z.ZodArray<z.ZodObject<{
602
+ slug: z.ZodString;
603
+ updatedAt: z.ZodString;
604
+ }, z.core.$strip>>;
605
+ }, z.core.$strip>;
606
+ export type CmsPageIndexResponse = z.infer<typeof cmsPageIndexResponseSchema>;
607
+ /**
608
+ * The deployment's reserved first path segments, as the page editor reads them
609
+ * (`specs/105-cms-root-page-urls/` FR-033; `contracts/cms-page-url.md` §5.3).
610
+ *
611
+ * Normalised: lowercase, one path segment each, no duplicates — whatever an
612
+ * operator typed into the Setting. The editor compares a slug's first segment
613
+ * against this list, and the backend refuses a save against the same value, so
614
+ * the warning and the refusal cannot disagree.
615
+ */
616
+ export declare const cmsReservedSegmentsResponseSchema: z.ZodObject<{
617
+ segments: z.ZodArray<z.ZodString>;
618
+ }, z.core.$strip>;
619
+ export type CmsReservedSegmentsResponse = z.infer<typeof cmsReservedSegmentsResponseSchema>;
620
+ /**
621
+ * The first path segment of a CMS page slug — the only segment that can collide
622
+ * with a storefront route (`contracts/cms-page-url.md` §5.1).
623
+ *
624
+ * `cmsSlugRe` permits `/`, so `pomoc/dostawa` is one page at `/pomoc/dostawa`
625
+ * rather than a page under a section, and its first segment is `pomoc`. The
626
+ * storefront's route table decides the *first* segment of a URL and a catch-all
627
+ * takes everything after it, so that is what the refusal compares.
628
+ *
629
+ * **It lives here because two programs ask the question and must agree**: the
630
+ * backend, refusing a save, and the page editor, warning while the operator
631
+ * types. A second copy in the admin layer is a second answer waiting to
632
+ * disagree — the discipline `blockNameRe` and `slugify` already keep.
633
+ */
634
+ export declare function firstSlugSegment(slug: string): string;
635
+ /**
636
+ * One thing pointing at a CMS object, as a delete guard reports it.
637
+ *
638
+ * `kind` is deliberately open on the string side: the four `cms_*` tags are
639
+ * this module's own, and a scanner contributed by another module names its own
640
+ * kind. Closing the union would mean `cms` had to know every module that might
641
+ * ever embed a block.
642
+ */
643
+ export interface CmsReference {
644
+ kind: 'cms_page' | 'cms_block' | 'cms_template' | 'cms_hook' | 'megamenu' | string;
645
+ entityId: string;
646
+ label: string;
647
+ }
648
+ /**
649
+ * A scanner contributed by another module so its references block a CMS page,
650
+ * block or template from being deleted.
651
+ *
652
+ * Every method is optional — a scanner fills in only the edges it cares about.
653
+ * `ownerModuleId` is not: a contribution seam records its contributor, so the
654
+ * registry can state a policy for an absent owner instead of having no way to
655
+ * express one (D-39).
656
+ *
657
+ * The block and template scanners receive both an id and a code, because a
658
+ * contributor may have stored either.
659
+ */
660
+ export interface CmsExternalReferenceScanner {
661
+ ownerModuleId: string;
662
+ findPageReferences?: (pageId: string) => Promise<CmsReference[]>;
663
+ findBlockReferences?: (blockId: string, blockCode: string) => Promise<CmsReference[]>;
664
+ findTemplateReferences?: (templateId: string, templateCode: string) => Promise<CmsReference[]>;
665
+ }
666
+ /**
667
+ * Container name: `cmsReferenceRegistry`. Owner: `cms`.
668
+ *
669
+ * A **contribution seam**, and the reference-integrity twin of
670
+ * `assetReferenceRegistry`: `megamenu` is the one contributor today. Its
671
+ * absent-owner policy should be read the same way — these scanners exist to
672
+ * refuse a delete, not to render a surface, so an absent contributor's edges
673
+ * still matter. Publishing the shape must not change the classification.
674
+ */
675
+ export interface CmsReferenceRegistryPort {
676
+ register(scanner: CmsExternalReferenceScanner): void;
677
+ /** The contributing module of every registered scanner, in registration order. */
678
+ owners(): readonly string[];
679
+ }
680
+ /**
681
+ * A CMS page as `seo` reads it — never the ORM entity (FR-011).
682
+ *
683
+ * **`path` and `title` are the entity's two `@deprecated` columns**, and the
684
+ * first version of this record carried only those. `slug`, `name` and `active`
685
+ * join them in Phase C, because they are what `seo` measurably reads: the
686
+ * sitemap stamps `${baseUrl}/${slug}` and excludes `active === false`, and the
687
+ * meta-tag rule falls back to `name` when a page has no localized `metaTitle`.
688
+ * Publishing the record without them would have made the cut change which URL
689
+ * a crawler is given and put deactivated pages back into the sitemap — a
690
+ * product change wearing a refactor.
691
+ *
692
+ * The deprecated pair stays: `cms` owns the decision to retire them, and
693
+ * removing a published field to fix a consumer is the wrong direction.
694
+ */
695
+ export interface CmsPageRecord {
696
+ id: string;
697
+ /** @deprecated Use `slug`. The entity says so; the record repeats it. */
698
+ path: string;
699
+ /** The storefront slug — what a URL is built from. */
700
+ slug: string;
701
+ status: 'draft' | 'published' | 'archived';
702
+ /** Admin-facing page name, and the meta-title fallback. */
703
+ name: string;
704
+ /** An operator can deactivate a published page; a deactivated one has no URL. */
705
+ active: boolean;
706
+ /** @deprecated Use `name` + `metaTitle`. The entity says so; the record repeats it. */
707
+ title: Record<string, string>;
708
+ metaTitle: Record<string, string> | null;
709
+ metaDescription: Record<string, string> | null;
710
+ metaKeywords: Record<string, string> | null;
711
+ publishedAt: Date | null;
712
+ archivedAt: Date | null;
713
+ createdAt: Date;
714
+ updatedAt: Date;
715
+ }
716
+ /**
717
+ * Container name: `cmsPageReadPort`. Owner: `cms`.
718
+ *
719
+ * `seo` reads pages twice: to resolve one page's meta tags, and to enumerate
720
+ * the published ones for the sitemap. The `body` and `content` columns are
721
+ * absent from the record on purpose — a sitemap and a meta-tag resolver have
722
+ * no use for a page's rendered tree, and shipping it would make every sitemap
723
+ * build carry the whole CMS.
724
+ */
725
+ export interface CmsPageReadPort {
726
+ findById(id: string): Promise<CmsPageRecord | null>;
727
+ findByPath(path: string): Promise<CmsPageRecord | null>;
728
+ /**
729
+ * These ids, in the order given. The sitemap's read: it already holds the
730
+ * channel's member ids, so `listPublished` would fetch every page on the
731
+ * platform to keep one channel's few.
732
+ */
733
+ findByIds(ids: readonly string[]): Promise<CmsPageRecord[]>;
734
+ /** Published pages only, ordered by path — the platform-wide enumeration. */
735
+ listPublished(): Promise<CmsPageRecord[]>;
736
+ }
737
+ /**
738
+ * A predefined block a module asks `cms` to keep in place — feature 075 / D-87.
739
+ *
740
+ * Two modules ship one: `newsletter` owns the registration-form consent label
741
+ * and `google_analytics` owns the cookie-banner message. In both the *text* is
742
+ * the asking module's business and the *storage* is this one's, which is why
743
+ * the descriptor carries content and nothing else — no channel list, no block
744
+ * id, no version. The seam is "keep this block in place", not "write to my
745
+ * tables".
746
+ */
747
+ export interface CmsSeededBlock {
748
+ /**
749
+ * The block's stable code, and the only identity this seam has. A second call
750
+ * under the same code inserts nothing and updates nothing, so an operator who
751
+ * has edited the seeded text keeps that edit across every restart.
752
+ */
753
+ readonly code: string;
754
+ /** The admin-facing block name. Used only where the block is first created. */
755
+ readonly name: string;
756
+ /** The language codes the block ships content for, e.g. `['en-US', 'pl-PL']`. */
757
+ readonly languages: readonly string[];
758
+ /** The per-language Puck trees, in the envelope the CMS stores. */
759
+ readonly content: CmsContentEnvelope;
760
+ }
761
+ /**
762
+ * Container name: `cmsBlockSeedPort`. Owner: `cms`.
763
+ *
764
+ * The idempotent seeding seam for a predefined block, and deliberately nothing
765
+ * wider: a module that ships one needs it to exist and to resolve on every
766
+ * sales channel, and needs no other write into the CMS. `newsletter` and
767
+ * `google_analytics` reached `cms_blocks` and `cms_block_sales_channels` in raw
768
+ * SQL until feature 075 — four ledgered reaches that named no import specifier,
769
+ * so the boundary they crossed compiled and returned rows.
770
+ *
771
+ * **Called once per boot, from the asking module's route registration.** There
772
+ * rather than from a migration because a block resolves per sales channel and
773
+ * the system-default channel is created at boot rather than by schema; and
774
+ * re-run every boot because a channel created later has to be bound too.
775
+ *
776
+ * **When `cms` is switched off**, the gate on this registration answers 503
777
+ * `MODULE_DISABLED` instead of handing back a live service. A caller reaching
778
+ * it before the first request — which is where a seed runs — therefore decides
779
+ * presence first with `effectiveState.isPresent('cms')` and skips the seed: a
780
+ * gate's "no" at route registration stops the next start rather than one
781
+ * request. Skipping costs nothing that is not recovered. Deactivation drops no
782
+ * rows, so an already-seeded block outlives the flip, and the first boot after
783
+ * `cms` comes back binds it to whatever channels appeared meanwhile.
784
+ */
785
+ export interface CmsBlockSeedPort {
786
+ /**
787
+ * Insert `block` where no block carries its code, then bind it to every sales
788
+ * channel it is not already bound to. Both halves are idempotent, so the call
789
+ * is: a re-run inserts nothing and binds nothing.
790
+ */
791
+ ensureSeededBlock(block: CmsSeededBlock): Promise<void>;
792
+ }
793
+ /**
794
+ * A CMS block as a consumer outside `cms` reads it — never the ORM entity
795
+ * (FR-011).
796
+ *
797
+ * Three fields, because three is what the demand is. `content` is deliberately
798
+ * absent: the whole point of {@link CmsBlockReadPort.findLocalizedById} is that a
799
+ * consumer never holds the per-language envelope, so shipping it here would make
800
+ * the narrow read pointless and hand every caller a shape whose key layout is
801
+ * this module's storage decision.
802
+ */
803
+ export interface CmsBlockRecord {
804
+ id: string;
805
+ /** The block's stable, operator-visible code. */
806
+ code: string;
807
+ /**
808
+ * An operator can deactivate a block. It is on the record rather than applied
809
+ * as a hidden filter because the two consumers disagree about it on purpose:
810
+ * an admin-side existence check accepts a deactivated block (an operator may
811
+ * be editing it), and a storefront render does not.
812
+ */
813
+ active: boolean;
814
+ }
815
+ /**
816
+ * One block's authored content in **one** language.
817
+ *
818
+ * `data` is the Puck tree, opaque here exactly as it is in
819
+ * {@link CmsContentEnvelope} — this boundary carries content, it does not
820
+ * interpret it. What does not cross is the envelope itself: which key a language
821
+ * hangs off, whether a legacy `schema_version` rides along, and what an absent
822
+ * language means are `cms`' storage decisions, and a consumer that had to know
823
+ * them would be reading this module's columns with extra steps.
824
+ */
825
+ export interface CmsLocalizedBlockRecord {
826
+ id: string;
827
+ code: string;
828
+ /** The language actually resolved — the one asked for, never a fallback. */
829
+ language: string;
830
+ data: unknown;
831
+ }
832
+ /**
833
+ * Container name: `cmsBlockReadPort`. Owner: `cms`.
834
+ *
835
+ * `megamenu` reads blocks twice, and the two reads are different questions
836
+ * rather than one question at two widths (`specs/110-instance-repository/`
837
+ * T118c). Both were raw `select … from cms_blocks` in a composition root until
838
+ * this port existed, which is why the interface is shaped by the demand and not
839
+ * by the table:
840
+ *
841
+ * - {@link findById} answers *does this block exist?* for the admin-side target
842
+ * validator, which refuses a menu item pointing at a block that is not there.
843
+ * It does not filter on `active`, and the record carries the flag so the
844
+ * caller can.
845
+ * - {@link findLocalizedById} answers *what does this block render as, here?*
846
+ * for the storefront resolver, which inlines the tree into the menu payload.
847
+ *
848
+ * Two methods rather than one wide read: a validator that took the localized
849
+ * record would pull a content tree per menu item to test a row for existence,
850
+ * and a storefront that took the plain record would have to open the envelope
851
+ * itself. Nothing else `cms` knows about blocks is published — the module's own
852
+ * admin surface is much larger and stays where it is.
853
+ *
854
+ * **Owner off:** the seam fails closed — resolving this port throws
855
+ * `ModuleDisabledError` and the call answers 503 `MODULE_DISABLED`, so nothing
856
+ * half-executes. That is the honest answer for both consumers: an operator who
857
+ * has switched the CMS off has switched off the thing that owns the block a menu
858
+ * item names, and a menu that quietly dropped the embed would be reporting the
859
+ * content as gone rather than as unavailable.
860
+ */
861
+ export interface CmsBlockReadPort {
862
+ findById(id: string): Promise<CmsBlockRecord | null>;
863
+ /**
864
+ * The block's content in `language`, or `null` when there is no active block
865
+ * with that id **or** it carries nothing for that language. The two are one
866
+ * answer on purpose: a caller that inlines a block has the same thing to do in
867
+ * either case, and distinguishing them would put "what does an absent language
868
+ * mean" — which is the envelope's shape — back on the caller.
869
+ */
870
+ findLocalizedById(id: string, language: string): Promise<CmsLocalizedBlockRecord | null>;
871
+ }
872
+ //# sourceMappingURL=cms.d.ts.map