@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
@@ -0,0 +1,367 @@
1
+ import { z } from 'zod';
2
+ export declare const KnownIconNameSchema: z.ZodEnum<{
3
+ Plus: "Plus";
4
+ Sparkles: "Sparkles";
5
+ Settings: "Settings";
6
+ Search: "Search";
7
+ Boxes: "Boxes";
8
+ Layers: "Layers";
9
+ Menu: "Menu";
10
+ PlusCircle: "PlusCircle";
11
+ PlusSquare: "PlusSquare";
12
+ FilePlus: "FilePlus";
13
+ FolderPlus: "FolderPlus";
14
+ Upload: "Upload";
15
+ FileUp: "FileUp";
16
+ CloudUpload: "CloudUpload";
17
+ Download: "Download";
18
+ FileDown: "FileDown";
19
+ FileText: "FileText";
20
+ BookOpen: "BookOpen";
21
+ Rss: "Rss";
22
+ Package: "Package";
23
+ Tag: "Tag";
24
+ ShoppingCart: "ShoppingCart";
25
+ Receipt: "Receipt";
26
+ CreditCard: "CreditCard";
27
+ Users: "Users";
28
+ UserPlus: "UserPlus";
29
+ Inbox: "Inbox";
30
+ ListChecks: "ListChecks";
31
+ ClipboardList: "ClipboardList";
32
+ Image: "Image";
33
+ Video: "Video";
34
+ LayoutDashboard: "LayoutDashboard";
35
+ PanelLeft: "PanelLeft";
36
+ KeyRound: "KeyRound";
37
+ ShieldCheck: "ShieldCheck";
38
+ Edit: "Edit";
39
+ Archive: "Archive";
40
+ Box: "Box";
41
+ Truck: "Truck";
42
+ CircleDollarSign: "CircleDollarSign";
43
+ Activity: "Activity";
44
+ LineChart: "LineChart";
45
+ Smartphone: "Smartphone";
46
+ Webhook: "Webhook";
47
+ Scale: "Scale";
48
+ PlugZap: "PlugZap";
49
+ PercentDiamond: "PercentDiamond";
50
+ Newspaper: "Newspaper";
51
+ Languages: "Languages";
52
+ Eraser: "Eraser";
53
+ Warehouse: "Warehouse";
54
+ TrendingDown: "TrendingDown";
55
+ Bell: "Bell";
56
+ PackageOpen: "PackageOpen";
57
+ Building2: "Building2";
58
+ Store: "Store";
59
+ ClipboardCheck: "ClipboardCheck";
60
+ }>;
61
+ export type KnownIconName = z.infer<typeof KnownIconNameSchema>;
62
+ export declare const ModuleActionSchema: z.ZodObject<{
63
+ id: z.ZodString;
64
+ labelKey: z.ZodString;
65
+ descriptionKey: z.ZodOptional<z.ZodString>;
66
+ icon: z.ZodEnum<{
67
+ Plus: "Plus";
68
+ Sparkles: "Sparkles";
69
+ Settings: "Settings";
70
+ Search: "Search";
71
+ Boxes: "Boxes";
72
+ Layers: "Layers";
73
+ Menu: "Menu";
74
+ PlusCircle: "PlusCircle";
75
+ PlusSquare: "PlusSquare";
76
+ FilePlus: "FilePlus";
77
+ FolderPlus: "FolderPlus";
78
+ Upload: "Upload";
79
+ FileUp: "FileUp";
80
+ CloudUpload: "CloudUpload";
81
+ Download: "Download";
82
+ FileDown: "FileDown";
83
+ FileText: "FileText";
84
+ BookOpen: "BookOpen";
85
+ Rss: "Rss";
86
+ Package: "Package";
87
+ Tag: "Tag";
88
+ ShoppingCart: "ShoppingCart";
89
+ Receipt: "Receipt";
90
+ CreditCard: "CreditCard";
91
+ Users: "Users";
92
+ UserPlus: "UserPlus";
93
+ Inbox: "Inbox";
94
+ ListChecks: "ListChecks";
95
+ ClipboardList: "ClipboardList";
96
+ Image: "Image";
97
+ Video: "Video";
98
+ LayoutDashboard: "LayoutDashboard";
99
+ PanelLeft: "PanelLeft";
100
+ KeyRound: "KeyRound";
101
+ ShieldCheck: "ShieldCheck";
102
+ Edit: "Edit";
103
+ Archive: "Archive";
104
+ Box: "Box";
105
+ Truck: "Truck";
106
+ CircleDollarSign: "CircleDollarSign";
107
+ Activity: "Activity";
108
+ LineChart: "LineChart";
109
+ Smartphone: "Smartphone";
110
+ Webhook: "Webhook";
111
+ Scale: "Scale";
112
+ PlugZap: "PlugZap";
113
+ PercentDiamond: "PercentDiamond";
114
+ Newspaper: "Newspaper";
115
+ Languages: "Languages";
116
+ Eraser: "Eraser";
117
+ Warehouse: "Warehouse";
118
+ TrendingDown: "TrendingDown";
119
+ Bell: "Bell";
120
+ PackageOpen: "PackageOpen";
121
+ Building2: "Building2";
122
+ Store: "Store";
123
+ ClipboardCheck: "ClipboardCheck";
124
+ }>;
125
+ targetRoute: z.ZodString;
126
+ requiredPermission: z.ZodOptional<z.ZodString>;
127
+ keywords: z.ZodDefault<z.ZodArray<z.ZodString>>;
128
+ weight: z.ZodDefault<z.ZodNumber>;
129
+ }, z.core.$strip>;
130
+ export type ModuleAction = z.infer<typeof ModuleActionSchema>;
131
+ /**
132
+ * Top-level `actions` array on a module's manifest. Enforces
133
+ * within-module id uniqueness — duplicates fail the install with a
134
+ * clear, indexed error rather than silently dropping one (FR-005).
135
+ */
136
+ export declare const ModuleActionsManifestSchema: z.ZodArray<z.ZodObject<{
137
+ id: z.ZodString;
138
+ labelKey: z.ZodString;
139
+ descriptionKey: z.ZodOptional<z.ZodString>;
140
+ icon: z.ZodEnum<{
141
+ Plus: "Plus";
142
+ Sparkles: "Sparkles";
143
+ Settings: "Settings";
144
+ Search: "Search";
145
+ Boxes: "Boxes";
146
+ Layers: "Layers";
147
+ Menu: "Menu";
148
+ PlusCircle: "PlusCircle";
149
+ PlusSquare: "PlusSquare";
150
+ FilePlus: "FilePlus";
151
+ FolderPlus: "FolderPlus";
152
+ Upload: "Upload";
153
+ FileUp: "FileUp";
154
+ CloudUpload: "CloudUpload";
155
+ Download: "Download";
156
+ FileDown: "FileDown";
157
+ FileText: "FileText";
158
+ BookOpen: "BookOpen";
159
+ Rss: "Rss";
160
+ Package: "Package";
161
+ Tag: "Tag";
162
+ ShoppingCart: "ShoppingCart";
163
+ Receipt: "Receipt";
164
+ CreditCard: "CreditCard";
165
+ Users: "Users";
166
+ UserPlus: "UserPlus";
167
+ Inbox: "Inbox";
168
+ ListChecks: "ListChecks";
169
+ ClipboardList: "ClipboardList";
170
+ Image: "Image";
171
+ Video: "Video";
172
+ LayoutDashboard: "LayoutDashboard";
173
+ PanelLeft: "PanelLeft";
174
+ KeyRound: "KeyRound";
175
+ ShieldCheck: "ShieldCheck";
176
+ Edit: "Edit";
177
+ Archive: "Archive";
178
+ Box: "Box";
179
+ Truck: "Truck";
180
+ CircleDollarSign: "CircleDollarSign";
181
+ Activity: "Activity";
182
+ LineChart: "LineChart";
183
+ Smartphone: "Smartphone";
184
+ Webhook: "Webhook";
185
+ Scale: "Scale";
186
+ PlugZap: "PlugZap";
187
+ PercentDiamond: "PercentDiamond";
188
+ Newspaper: "Newspaper";
189
+ Languages: "Languages";
190
+ Eraser: "Eraser";
191
+ Warehouse: "Warehouse";
192
+ TrendingDown: "TrendingDown";
193
+ Bell: "Bell";
194
+ PackageOpen: "PackageOpen";
195
+ Building2: "Building2";
196
+ Store: "Store";
197
+ ClipboardCheck: "ClipboardCheck";
198
+ }>;
199
+ targetRoute: z.ZodString;
200
+ requiredPermission: z.ZodOptional<z.ZodString>;
201
+ keywords: z.ZodDefault<z.ZodArray<z.ZodString>>;
202
+ weight: z.ZodDefault<z.ZodNumber>;
203
+ }, z.core.$strip>>;
204
+ export type ModuleActionsManifest = z.infer<typeof ModuleActionsManifestSchema>;
205
+ export declare const GetAdminActionsQuerySchema: z.ZodObject<{
206
+ language: z.ZodEnum<{
207
+ en: "en";
208
+ pl: "pl";
209
+ }>;
210
+ }, z.core.$strip>;
211
+ export type GetAdminActionsQuery = z.infer<typeof GetAdminActionsQuerySchema>;
212
+ /**
213
+ * Per-row view returned by the endpoint. Labels and descriptions are
214
+ * already resolved into the requested language by the server; the
215
+ * admin renders them verbatim. `keywords` is the raw list as declared
216
+ * in the manifest — the admin applies its own diacritic-insensitive
217
+ * normalize at filter time.
218
+ */
219
+ export declare const AdminActionViewSchema: z.ZodObject<{
220
+ moduleId: z.ZodString;
221
+ actionId: z.ZodString;
222
+ label: z.ZodString;
223
+ description: z.ZodNullable<z.ZodString>;
224
+ icon: z.ZodEnum<{
225
+ Plus: "Plus";
226
+ Sparkles: "Sparkles";
227
+ Settings: "Settings";
228
+ Search: "Search";
229
+ Boxes: "Boxes";
230
+ Layers: "Layers";
231
+ Menu: "Menu";
232
+ PlusCircle: "PlusCircle";
233
+ PlusSquare: "PlusSquare";
234
+ FilePlus: "FilePlus";
235
+ FolderPlus: "FolderPlus";
236
+ Upload: "Upload";
237
+ FileUp: "FileUp";
238
+ CloudUpload: "CloudUpload";
239
+ Download: "Download";
240
+ FileDown: "FileDown";
241
+ FileText: "FileText";
242
+ BookOpen: "BookOpen";
243
+ Rss: "Rss";
244
+ Package: "Package";
245
+ Tag: "Tag";
246
+ ShoppingCart: "ShoppingCart";
247
+ Receipt: "Receipt";
248
+ CreditCard: "CreditCard";
249
+ Users: "Users";
250
+ UserPlus: "UserPlus";
251
+ Inbox: "Inbox";
252
+ ListChecks: "ListChecks";
253
+ ClipboardList: "ClipboardList";
254
+ Image: "Image";
255
+ Video: "Video";
256
+ LayoutDashboard: "LayoutDashboard";
257
+ PanelLeft: "PanelLeft";
258
+ KeyRound: "KeyRound";
259
+ ShieldCheck: "ShieldCheck";
260
+ Edit: "Edit";
261
+ Archive: "Archive";
262
+ Box: "Box";
263
+ Truck: "Truck";
264
+ CircleDollarSign: "CircleDollarSign";
265
+ Activity: "Activity";
266
+ LineChart: "LineChart";
267
+ Smartphone: "Smartphone";
268
+ Webhook: "Webhook";
269
+ Scale: "Scale";
270
+ PlugZap: "PlugZap";
271
+ PercentDiamond: "PercentDiamond";
272
+ Newspaper: "Newspaper";
273
+ Languages: "Languages";
274
+ Eraser: "Eraser";
275
+ Warehouse: "Warehouse";
276
+ TrendingDown: "TrendingDown";
277
+ Bell: "Bell";
278
+ PackageOpen: "PackageOpen";
279
+ Building2: "Building2";
280
+ Store: "Store";
281
+ ClipboardCheck: "ClipboardCheck";
282
+ }>;
283
+ targetRoute: z.ZodString;
284
+ keywords: z.ZodArray<z.ZodString>;
285
+ weight: z.ZodNumber;
286
+ }, z.core.$strip>;
287
+ export type AdminActionView = z.infer<typeof AdminActionViewSchema>;
288
+ export declare const GetAdminActionsResponseSchema: z.ZodObject<{
289
+ data: z.ZodArray<z.ZodObject<{
290
+ moduleId: z.ZodString;
291
+ actionId: z.ZodString;
292
+ label: z.ZodString;
293
+ description: z.ZodNullable<z.ZodString>;
294
+ icon: z.ZodEnum<{
295
+ Plus: "Plus";
296
+ Sparkles: "Sparkles";
297
+ Settings: "Settings";
298
+ Search: "Search";
299
+ Boxes: "Boxes";
300
+ Layers: "Layers";
301
+ Menu: "Menu";
302
+ PlusCircle: "PlusCircle";
303
+ PlusSquare: "PlusSquare";
304
+ FilePlus: "FilePlus";
305
+ FolderPlus: "FolderPlus";
306
+ Upload: "Upload";
307
+ FileUp: "FileUp";
308
+ CloudUpload: "CloudUpload";
309
+ Download: "Download";
310
+ FileDown: "FileDown";
311
+ FileText: "FileText";
312
+ BookOpen: "BookOpen";
313
+ Rss: "Rss";
314
+ Package: "Package";
315
+ Tag: "Tag";
316
+ ShoppingCart: "ShoppingCart";
317
+ Receipt: "Receipt";
318
+ CreditCard: "CreditCard";
319
+ Users: "Users";
320
+ UserPlus: "UserPlus";
321
+ Inbox: "Inbox";
322
+ ListChecks: "ListChecks";
323
+ ClipboardList: "ClipboardList";
324
+ Image: "Image";
325
+ Video: "Video";
326
+ LayoutDashboard: "LayoutDashboard";
327
+ PanelLeft: "PanelLeft";
328
+ KeyRound: "KeyRound";
329
+ ShieldCheck: "ShieldCheck";
330
+ Edit: "Edit";
331
+ Archive: "Archive";
332
+ Box: "Box";
333
+ Truck: "Truck";
334
+ CircleDollarSign: "CircleDollarSign";
335
+ Activity: "Activity";
336
+ LineChart: "LineChart";
337
+ Smartphone: "Smartphone";
338
+ Webhook: "Webhook";
339
+ Scale: "Scale";
340
+ PlugZap: "PlugZap";
341
+ PercentDiamond: "PercentDiamond";
342
+ Newspaper: "Newspaper";
343
+ Languages: "Languages";
344
+ Eraser: "Eraser";
345
+ Warehouse: "Warehouse";
346
+ TrendingDown: "TrendingDown";
347
+ Bell: "Bell";
348
+ PackageOpen: "PackageOpen";
349
+ Building2: "Building2";
350
+ Store: "Store";
351
+ ClipboardCheck: "ClipboardCheck";
352
+ }>;
353
+ targetRoute: z.ZodString;
354
+ keywords: z.ZodArray<z.ZodString>;
355
+ weight: z.ZodNumber;
356
+ }, z.core.$strip>>;
357
+ meta: z.ZodObject<{
358
+ language: z.ZodEnum<{
359
+ en: "en";
360
+ pl: "pl";
361
+ }>;
362
+ total: z.ZodNumber;
363
+ registryVersion: z.ZodNumber;
364
+ }, z.core.$strip>;
365
+ }, z.core.$strip>;
366
+ export type GetAdminActionsResponse = z.infer<typeof GetAdminActionsResponseSchema>;
367
+ //# sourceMappingURL=admin-actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-actions.d.ts","sourceRoot":"","sources":["../src/admin-actions.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgK9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAchE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0B7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;;;GAIG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAoBpC,CAAC;AACL,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAYhF,eAAO,MAAM,0BAA0B;;;;;iBAErC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAShC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
@@ -0,0 +1,287 @@
1
+ // Module-Contributed Admin Actions — feature 020 contract surface.
2
+ //
3
+ // Modules declare zero-or-more actions inline in their manifest's
4
+ // `actions` field. Each action becomes a row in the platform's
5
+ // command-palette Actions group at install time. This file defines:
6
+ //
7
+ // 1. The closed allowlist of icon names a module may reference (kept
8
+ // small on purpose — adding a new icon is a one-line PR reviewed
9
+ // alongside the action that needs it).
10
+ // 2. The Zod schema for a single declared action.
11
+ // 3. The `actions` array shape attached to ModuleManifestSchema, with
12
+ // a `superRefine` rejecting duplicate ids within a single module.
13
+ // 4. The HTTP query and response envelope for
14
+ // `GET /api/v1/admin/admin-actions`.
15
+ //
16
+ // Permission codes are NOT format-constrained — the codebase uses a mix
17
+ // of colon (`catalog:write`) and dot (`cms.write`) notation; this
18
+ // feature passes whatever the module declares verbatim to the existing
19
+ // hasPermission() check (research §R8).
20
+ import { z } from 'zod';
21
+ // ---------------------------------------------------------------------------
22
+ // Closed allowlist of icon names. Each entry corresponds 1:1 to a
23
+ // lucide-react component name. The admin shell maps strings to
24
+ // components in admin/src/lib/admin-actions/icon-map.ts.
25
+ // ---------------------------------------------------------------------------
26
+ export const KnownIconNameSchema = z.enum([
27
+ // generic
28
+ 'Plus',
29
+ 'Sparkles',
30
+ 'Settings',
31
+ 'Search',
32
+ 'Boxes',
33
+ 'Layers',
34
+ 'Menu',
35
+ // create / write
36
+ 'PlusCircle',
37
+ 'PlusSquare',
38
+ 'FilePlus',
39
+ 'FolderPlus',
40
+ // import / upload
41
+ 'Upload',
42
+ 'FileUp',
43
+ 'CloudUpload',
44
+ // export / download
45
+ 'Download',
46
+ 'FileDown',
47
+ // documents
48
+ 'FileText',
49
+ 'BookOpen',
50
+ // syndication
51
+ 'Rss',
52
+ // commerce
53
+ 'Package',
54
+ 'Tag',
55
+ 'ShoppingCart',
56
+ 'Receipt',
57
+ // Feature 076 (D-83 item 8) — `payment_methods`' landing action. The same
58
+ // icon the sidebar already renders for `/payment-methods`.
59
+ 'CreditCard',
60
+ // people
61
+ 'Users',
62
+ 'UserPlus',
63
+ // workflows
64
+ 'Inbox',
65
+ 'ListChecks',
66
+ 'ClipboardList',
67
+ // media
68
+ 'Image',
69
+ 'Video',
70
+ // navigation
71
+ 'LayoutDashboard',
72
+ 'PanelLeft',
73
+ // security
74
+ 'KeyRound',
75
+ // Feature 091 (Phase 4, batch four) — `admin_roles`' sidebar entry and
76
+ // palette action, which became module declarations and therefore have to name
77
+ // their icon rather than import it. The allowlist is what a nav entry's
78
+ // `icon` is validated against too, so the glyph `AppShell.tsx` rendered by
79
+ // hand joins it here instead of the entry silently changing to a name that
80
+ // happened to be on the list.
81
+ 'ShieldCheck',
82
+ // Feature 080 (D-163.1) — the six icons the dashboard's recent-activity
83
+ // renderings used before they became manifest declarations. They were
84
+ // lucide imports inside `admin/src/modules/home/activity-render.ts`, which
85
+ // is the hand-maintained table that ruling retires; a declared icon has to
86
+ // come from this allowlist like every other, so they join it here.
87
+ 'Edit',
88
+ 'Archive',
89
+ 'Box',
90
+ 'Truck',
91
+ 'CircleDollarSign',
92
+ 'Activity',
93
+ // Feature 091 (Phase 4, batch two) — `analytics`' sidebar entry, which became
94
+ // a module declaration and therefore has to name its icon rather than import
95
+ // it. The allowlist is what a nav entry's `icon` is validated against too, so
96
+ // the glyph `AppShell.tsx` rendered by hand joins it here instead of the
97
+ // entry silently changing to a name that happened to be on the list.
98
+ 'LineChart',
99
+ // Feature 091 (Phase 4, batch six) — `pwa`' sidebar entry, which became a
100
+ // module declaration and therefore has to name its icon rather than import
101
+ // it. Same rule as the two entries above and the same reason for adding a
102
+ // name rather than reusing one: the entry keeps the glyph `AppShell.tsx`
103
+ // drew for it, so nothing an operator sees moves with the declaration.
104
+ 'Smartphone',
105
+ // Feature 091 (Phase 4, the plan's batch 6) — `webhooks`' and `comparisons`'
106
+ // sidebar entries and palette actions, for the same reason: the two glyphs
107
+ // `AppShell.tsx` imported from `lucide-react` by hand have to be nameable now
108
+ // that the declarations are the modules' own. `api_keys` needed nothing —
109
+ // `KeyRound` is already above, because `credentials`' row renders it too.
110
+ //
111
+ // The batch numbers collide and the members do not: !1214 shipped `pwa` as
112
+ // "batch six" while `plan.md`'s batch 6 is this set. Both entries stand.
113
+ 'Webhook',
114
+ 'Scale',
115
+ // Feature 092 (`specs/092-pimcore-pim-sync/`) — `pim_pimcore`'s sidebar entry.
116
+ // The glyph `pim_ergonode`'s hand-written NAV row already renders for the
117
+ // connector directly above it; a module declaration has to name its icon
118
+ // rather than import it, so the name joins the allowlist here instead of the
119
+ // entry degrading to one that happens to be on it already.
120
+ 'PlugZap',
121
+ // Feature 091 (Phase 4, the plan's batch 7) — `promotions`' two sidebar
122
+ // entries and its two palette rows, which become module declarations here and
123
+ // therefore have to name their icon rather than import it. Both rows drew the
124
+ // same glyph by hand in `AppShell.tsx`, so one name keeps both exactly as they
125
+ // were; the alternative is the entry degrading to a name that happens to be on
126
+ // the list already. `payment_methods`, `customer_accounts` and `product_feeds`
127
+ // need nothing — `CreditCard`, `Users` and `Rss` are all above, each added by
128
+ // an earlier palette action of that same module.
129
+ 'PercentDiamond',
130
+ // Feature 091 (Phase 4, batch 8) — `megamenu`'s sidebar entry, which becomes a
131
+ // module declaration here and therefore has to name its icon rather than
132
+ // import it. `AppShell.tsx` drew `Newspaper` for it by hand, beside the four
133
+ // `/cms/*` rows and the three `/blog/*` ones; keeping the glyph means adding
134
+ // the name, and the alternative is the entry silently degrading to a name that
135
+ // happens to be on the list. The batch's other five need nothing — `Search`,
136
+ // `Receipt`, `Truck`, `CreditCard` and `Package` are all above.
137
+ 'Newspaper',
138
+ // Feature 091 (Phase 4, batch 10) — `dictionaries`' two sidebar entries and
139
+ // the two palette actions that replace its hand-written *Navigate* rows, and
140
+ // `settings`' cache row. All three glyphs were imported into `AppShell.tsx`
141
+ // from `lucide-react` by hand; a module declaration has to name its icon
142
+ // rather than import it, so the names join the allowlist here instead of the
143
+ // entries degrading to names that happen to be on it already. The batch's
144
+ // other rows need nothing — `Languages` covers `/dictionary`, `ListChecks` is
145
+ // already above for `catalog`'s bulk-operations row, and `Settings` and
146
+ // `KeyRound` have been there since the first palette actions of the two
147
+ // modules that render them.
148
+ 'Languages',
149
+ 'Eraser',
150
+ // Feature 091 (Phase 4, batch 13) — four of `inventory`'s five sidebar
151
+ // entries. `AppShell.tsx` imported all four from `lucide-react` by hand
152
+ // (`Warehouse as WarehouseIcon`, `TrendingDown`, `Bell as BellOutline`,
153
+ // `PackageOpen`), and a module declaration has to *name* its icon rather than
154
+ // import it, so the names join the allowlist here instead of four rows
155
+ // silently degrading to names that happen to be on it already — which for
156
+ // this batch would have been four operator-visible glyph changes bought for
157
+ // nothing. The batch's other rows need nothing: `Box` covers the stock
158
+ // roster, `CircleDollarSign` `/price-lists`, and `PlugZap` `/pim-ergonode` —
159
+ // `pim_pimcore` added that last one for the row directly below it.
160
+ 'Warehouse',
161
+ 'TrendingDown',
162
+ 'Bell',
163
+ 'PackageOpen',
164
+ // Feature 091 (Phase 4, batch 14) — `organizations`' sidebar entry and the
165
+ // palette action that replaces its hand-written *Navigate* row, and
166
+ // `sales_channels`' sidebar entry and the palette action that replaces its
167
+ // row. `AppShell.tsx` imported both glyphs from `lucide-react` by hand, and a
168
+ // module declaration has to *name* its icon rather than import it, so the
169
+ // names join the allowlist here instead of four declarations degrading to
170
+ // names that happen to be on it already — which would be two operator-visible
171
+ // glyph changes bought for nothing. `customers`' two rows and its two
172
+ // existing actions need nothing: `Users` has been above since the first
173
+ // palette actions of that module.
174
+ 'Building2',
175
+ 'Store',
176
+ // Feature 091 (Phase 4, batch 15) — `orders`' three sidebar entries.
177
+ // `AppShell.tsx` imported the glyph from `lucide-react` by hand, and a module
178
+ // declaration has to *name* its icon rather than import it, so the name joins
179
+ // the allowlist here instead of three declarations degrading to one that
180
+ // happens to be on it already — `ShoppingCart`, which this module's own
181
+ // `open-orders` action names, is a different glyph the sidebar has never
182
+ // rendered. The batch's other seven rows need nothing: `Package`, `Boxes`,
183
+ // `Tag` and `FileText` cover `catalog`'s five, and `ListChecks` — the
184
+ // bulk-operations glyph — has been above since feature 020.
185
+ 'ClipboardCheck',
186
+ ]);
187
+ // ---------------------------------------------------------------------------
188
+ // Field-level patterns
189
+ // ---------------------------------------------------------------------------
190
+ const actionIdRe = /^[a-z][a-z0-9-]*$/;
191
+ const translationKeyRe = /^[a-z][a-zA-Z0-9_]*(\.[a-z][a-zA-Z0-9_]*)*$/;
192
+ const adminRouteRe = /^\/[A-Za-z0-9/_-]*$/;
193
+ // ---------------------------------------------------------------------------
194
+ // Manifest-side action declaration
195
+ // ---------------------------------------------------------------------------
196
+ export const ModuleActionSchema = z.object({
197
+ id: z
198
+ .string()
199
+ .min(2)
200
+ .max(64)
201
+ .regex(actionIdRe, 'Action id must be lowercase slug (letters, digits, dashes; leading letter)'),
202
+ labelKey: z.string().min(1).max(255).regex(translationKeyRe, 'Translation key must be dot-separated camelCase namespaces'),
203
+ descriptionKey: z
204
+ .string()
205
+ .min(1)
206
+ .max(255)
207
+ .regex(translationKeyRe, 'Translation key must be dot-separated camelCase namespaces')
208
+ .optional(),
209
+ icon: KnownIconNameSchema,
210
+ targetRoute: z
211
+ .string()
212
+ .min(2)
213
+ .max(255)
214
+ .regex(adminRouteRe, 'Admin route must be a leading-slash ASCII path'),
215
+ /**
216
+ * Permission code passed verbatim to the admin's hasPermission(). The
217
+ * codebase mixes colon and dot notation; both are accepted by design.
218
+ */
219
+ requiredPermission: z.string().min(1).max(64).optional(),
220
+ keywords: z.array(z.string().trim().min(1).max(64)).max(10).default([]),
221
+ weight: z.number().int().min(0).max(9999).default(100),
222
+ });
223
+ /**
224
+ * Top-level `actions` array on a module's manifest. Enforces
225
+ * within-module id uniqueness — duplicates fail the install with a
226
+ * clear, indexed error rather than silently dropping one (FR-005).
227
+ */
228
+ export const ModuleActionsManifestSchema = z
229
+ .array(ModuleActionSchema)
230
+ .max(50, 'A single module cannot declare more than 50 actions')
231
+ .superRefine((actions, ctx) => {
232
+ const seen = new Map();
233
+ for (let i = 0; i < actions.length; i++) {
234
+ const action = actions[i];
235
+ if (!action)
236
+ continue;
237
+ const id = action.id;
238
+ const prev = seen.get(id);
239
+ if (prev !== undefined) {
240
+ ctx.addIssue({
241
+ code: 'custom',
242
+ path: [i, 'id'],
243
+ message: `Duplicate action id "${id}" — first seen at index ${prev}`,
244
+ });
245
+ }
246
+ else {
247
+ seen.set(id, i);
248
+ }
249
+ }
250
+ });
251
+ // ---------------------------------------------------------------------------
252
+ // HTTP — GET /api/v1/admin/admin-actions
253
+ // ---------------------------------------------------------------------------
254
+ // Imported via re-export from admin-i18n.ts to avoid a circular import.
255
+ // The HTTP handler validates the language enum the same way the i18n
256
+ // endpoint does (feature 019).
257
+ import { SupportedAdminLanguageSchema } from './admin-i18n.js';
258
+ export const GetAdminActionsQuerySchema = z.object({
259
+ language: SupportedAdminLanguageSchema,
260
+ });
261
+ /**
262
+ * Per-row view returned by the endpoint. Labels and descriptions are
263
+ * already resolved into the requested language by the server; the
264
+ * admin renders them verbatim. `keywords` is the raw list as declared
265
+ * in the manifest — the admin applies its own diacritic-insensitive
266
+ * normalize at filter time.
267
+ */
268
+ export const AdminActionViewSchema = z.object({
269
+ moduleId: z.string(),
270
+ actionId: z.string(),
271
+ label: z.string(),
272
+ description: z.string().nullable(),
273
+ icon: KnownIconNameSchema,
274
+ targetRoute: z.string(),
275
+ keywords: z.array(z.string()),
276
+ weight: z.number().int(),
277
+ });
278
+ export const GetAdminActionsResponseSchema = z.object({
279
+ data: z.array(AdminActionViewSchema),
280
+ meta: z.object({
281
+ language: SupportedAdminLanguageSchema,
282
+ total: z.number().int().nonnegative(),
283
+ /** MAX(version) across the visible rows; 0 when `data` is empty. */
284
+ registryVersion: z.number().int().nonnegative(),
285
+ }),
286
+ });
287
+ //# sourceMappingURL=admin-actions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-actions.js","sourceRoot":"","sources":["../src/admin-actions.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,EAAE;AACF,kEAAkE;AAClE,+DAA+D;AAC/D,oEAAoE;AACpE,EAAE;AACF,uEAAuE;AACvE,sEAAsE;AACtE,4CAA4C;AAC5C,oDAAoD;AACpD,wEAAwE;AACxE,uEAAuE;AACvE,gDAAgD;AAChD,0CAA0C;AAC1C,EAAE;AACF,wEAAwE;AACxE,kEAAkE;AAClE,uEAAuE;AACvE,wCAAwC;AAExC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,8EAA8E;AAC9E,kEAAkE;AAClE,+DAA+D;AAC/D,yDAAyD;AACzD,8EAA8E;AAE9E,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC;IACxC,UAAU;IACV,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,MAAM;I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