@endora-commerce/platform 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 (657) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +58 -0
  3. package/dist/cli/dispatch.d.ts +146 -0
  4. package/dist/cli/dispatch.d.ts.map +1 -0
  5. package/dist/cli/dispatch.js +259 -0
  6. package/dist/cli/dispatch.js.map +1 -0
  7. package/dist/cli/index.d.ts +58 -0
  8. package/dist/cli/index.d.ts.map +1 -0
  9. package/dist/cli/index.js +58 -0
  10. package/dist/cli/index.js.map +1 -0
  11. package/dist/cli/module-commands.d.ts +118 -0
  12. package/dist/cli/module-commands.d.ts.map +1 -0
  13. package/dist/cli/module-commands.js +120 -0
  14. package/dist/cli/module-commands.js.map +1 -0
  15. package/dist/commands/actor.d.ts +19 -0
  16. package/dist/commands/actor.d.ts.map +1 -0
  17. package/dist/commands/actor.js +45 -0
  18. package/dist/commands/actor.js.map +1 -0
  19. package/dist/commands/audit-from-context.d.ts +24 -0
  20. package/dist/commands/audit-from-context.d.ts.map +1 -0
  21. package/dist/commands/audit-from-context.js +28 -0
  22. package/dist/commands/audit-from-context.js.map +1 -0
  23. package/dist/commands/command-bus.d.ts +40 -0
  24. package/dist/commands/command-bus.d.ts.map +1 -0
  25. package/dist/commands/command-bus.js +46 -0
  26. package/dist/commands/command-bus.js.map +1 -0
  27. package/dist/commands/command.d.ts +76 -0
  28. package/dist/commands/command.d.ts.map +1 -0
  29. package/dist/commands/command.js +2 -0
  30. package/dist/commands/command.js.map +1 -0
  31. package/dist/commands/index.d.ts +65 -0
  32. package/dist/commands/index.d.ts.map +1 -0
  33. package/dist/commands/index.js +57 -0
  34. package/dist/commands/index.js.map +1 -0
  35. package/dist/commands/reversible.d.ts +66 -0
  36. package/dist/commands/reversible.d.ts.map +1 -0
  37. package/dist/commands/reversible.js +41 -0
  38. package/dist/commands/reversible.js.map +1 -0
  39. package/dist/composition/compose-app.d.ts +305 -0
  40. package/dist/composition/compose-app.d.ts.map +1 -0
  41. package/dist/composition/compose-app.js +939 -0
  42. package/dist/composition/compose-app.js.map +1 -0
  43. package/dist/composition/index.d.ts +92 -0
  44. package/dist/composition/index.d.ts.map +1 -0
  45. package/dist/composition/index.js +175 -0
  46. package/dist/composition/index.js.map +1 -0
  47. package/dist/composition/newsletter-token-secret.d.ts +19 -0
  48. package/dist/composition/newsletter-token-secret.d.ts.map +1 -0
  49. package/dist/composition/newsletter-token-secret.js +24 -0
  50. package/dist/composition/newsletter-token-secret.js.map +1 -0
  51. package/dist/composition/process-runs-workers.d.ts +17 -0
  52. package/dist/composition/process-runs-workers.d.ts.map +1 -0
  53. package/dist/composition/process-runs-workers.js +19 -0
  54. package/dist/composition/process-runs-workers.js.map +1 -0
  55. package/dist/db/baseline-migration-inventory.d.ts +15 -0
  56. package/dist/db/baseline-migration-inventory.d.ts.map +1 -0
  57. package/dist/db/baseline-migration-inventory.js +115 -0
  58. package/dist/db/baseline-migration-inventory.js.map +1 -0
  59. package/dist/db/configured-entities.d.ts +74 -0
  60. package/dist/db/configured-entities.d.ts.map +1 -0
  61. package/dist/db/configured-entities.js +20 -0
  62. package/dist/db/configured-entities.js.map +1 -0
  63. package/dist/db/configured-migrations.d.ts +199 -0
  64. package/dist/db/configured-migrations.d.ts.map +1 -0
  65. package/dist/db/configured-migrations.js +181 -0
  66. package/dist/db/configured-migrations.js.map +1 -0
  67. package/dist/db/index.d.ts +54 -0
  68. package/dist/db/index.d.ts.map +1 -0
  69. package/dist/db/index.js +54 -0
  70. package/dist/db/index.js.map +1 -0
  71. package/dist/db/migrate.d.ts +21 -0
  72. package/dist/db/migrate.d.ts.map +1 -0
  73. package/dist/db/migrate.js +48 -0
  74. package/dist/db/migrate.js.map +1 -0
  75. package/dist/db/migration-order.d.ts +159 -0
  76. package/dist/db/migration-order.d.ts.map +1 -0
  77. package/dist/db/migration-order.js +273 -0
  78. package/dist/db/migration-order.js.map +1 -0
  79. package/dist/db/mikro-orm.config.d.ts +51 -0
  80. package/dist/db/mikro-orm.config.d.ts.map +1 -0
  81. package/dist/db/mikro-orm.config.js +64 -0
  82. package/dist/db/mikro-orm.config.js.map +1 -0
  83. package/dist/db/orm.d.ts +40 -0
  84. package/dist/db/orm.d.ts.map +1 -0
  85. package/dist/db/orm.js +25 -0
  86. package/dist/db/orm.js.map +1 -0
  87. package/dist/db/platform-schema.d.ts +102 -0
  88. package/dist/db/platform-schema.d.ts.map +1 -0
  89. package/dist/db/platform-schema.js +79 -0
  90. package/dist/db/platform-schema.js.map +1 -0
  91. package/dist/db/pluralizing-naming-strategy.d.ts +16 -0
  92. package/dist/db/pluralizing-naming-strategy.d.ts.map +1 -0
  93. package/dist/db/pluralizing-naming-strategy.js +66 -0
  94. package/dist/db/pluralizing-naming-strategy.js.map +1 -0
  95. package/dist/demo/guard.d.ts +101 -0
  96. package/dist/demo/guard.d.ts.map +1 -0
  97. package/dist/demo/guard.js +168 -0
  98. package/dist/demo/guard.js.map +1 -0
  99. package/dist/demo/host-command.d.ts +133 -0
  100. package/dist/demo/host-command.d.ts.map +1 -0
  101. package/dist/demo/host-command.js +113 -0
  102. package/dist/demo/host-command.js.map +1 -0
  103. package/dist/demo/index.d.ts +82 -0
  104. package/dist/demo/index.d.ts.map +1 -0
  105. package/dist/demo/index.js +82 -0
  106. package/dist/demo/index.js.map +1 -0
  107. package/dist/demo/packages.d.ts +67 -0
  108. package/dist/demo/packages.d.ts.map +1 -0
  109. package/dist/demo/packages.js +132 -0
  110. package/dist/demo/packages.js.map +1 -0
  111. package/dist/demo/plan.d.ts +111 -0
  112. package/dist/demo/plan.d.ts.map +1 -0
  113. package/dist/demo/plan.js +74 -0
  114. package/dist/demo/plan.js.map +1 -0
  115. package/dist/demo/report.d.ts +17 -0
  116. package/dist/demo/report.d.ts.map +1 -0
  117. package/dist/demo/report.js +85 -0
  118. package/dist/demo/report.js.map +1 -0
  119. package/dist/demo/runner.d.ts +207 -0
  120. package/dist/demo/runner.d.ts.map +1 -0
  121. package/dist/demo/runner.js +169 -0
  122. package/dist/demo/runner.js.map +1 -0
  123. package/dist/demo/scope.d.ts +44 -0
  124. package/dist/demo/scope.d.ts.map +1 -0
  125. package/dist/demo/scope.js +44 -0
  126. package/dist/demo/scope.js.map +1 -0
  127. package/dist/env/index.d.ts +68 -0
  128. package/dist/env/index.d.ts.map +1 -0
  129. package/dist/env/index.js +427 -0
  130. package/dist/env/index.js.map +1 -0
  131. package/dist/events/bus.d.ts +29 -0
  132. package/dist/events/bus.d.ts.map +1 -0
  133. package/dist/events/bus.js +67 -0
  134. package/dist/events/bus.js.map +1 -0
  135. package/dist/events/index.d.ts +19 -0
  136. package/dist/events/index.d.ts.map +1 -0
  137. package/dist/events/index.js +19 -0
  138. package/dist/events/index.js.map +1 -0
  139. package/dist/http/cursor.d.ts +10 -0
  140. package/dist/http/cursor.d.ts.map +1 -0
  141. package/dist/http/cursor.js +20 -0
  142. package/dist/http/cursor.js.map +1 -0
  143. package/dist/http/error-envelope.d.ts +127 -0
  144. package/dist/http/error-envelope.d.ts.map +1 -0
  145. package/dist/http/error-envelope.js +402 -0
  146. package/dist/http/error-envelope.js.map +1 -0
  147. package/dist/http/health.d.ts +88 -0
  148. package/dist/http/health.d.ts.map +1 -0
  149. package/dist/http/health.js +77 -0
  150. package/dist/http/health.js.map +1 -0
  151. package/dist/http/index.d.ts +50 -0
  152. package/dist/http/index.d.ts.map +1 -0
  153. package/dist/http/index.js +50 -0
  154. package/dist/http/index.js.map +1 -0
  155. package/dist/http/interceptors/dispatch.d.ts +14 -0
  156. package/dist/http/interceptors/dispatch.d.ts.map +1 -0
  157. package/dist/http/interceptors/dispatch.js +113 -0
  158. package/dist/http/interceptors/dispatch.js.map +1 -0
  159. package/dist/http/interceptors/index.d.ts +6 -0
  160. package/dist/http/interceptors/index.d.ts.map +1 -0
  161. package/dist/http/interceptors/index.js +5 -0
  162. package/dist/http/interceptors/index.js.map +1 -0
  163. package/dist/http/interceptors/registry.d.ts +44 -0
  164. package/dist/http/interceptors/registry.d.ts.map +1 -0
  165. package/dist/http/interceptors/registry.js +123 -0
  166. package/dist/http/interceptors/registry.js.map +1 -0
  167. package/dist/http/interceptors/route-table.d.ts +33 -0
  168. package/dist/http/interceptors/route-table.d.ts.map +1 -0
  169. package/dist/http/interceptors/route-table.js +39 -0
  170. package/dist/http/interceptors/route-table.js.map +1 -0
  171. package/dist/http/interceptors/types.d.ts +101 -0
  172. package/dist/http/interceptors/types.d.ts.map +1 -0
  173. package/dist/http/interceptors/types.js +2 -0
  174. package/dist/http/interceptors/types.js.map +1 -0
  175. package/dist/http/interceptors/validation.d.ts +22 -0
  176. package/dist/http/interceptors/validation.d.ts.map +1 -0
  177. package/dist/http/interceptors/validation.js +39 -0
  178. package/dist/http/interceptors/validation.js.map +1 -0
  179. package/dist/http/logger.d.ts +9 -0
  180. package/dist/http/logger.d.ts.map +1 -0
  181. package/dist/http/logger.js +25 -0
  182. package/dist/http/logger.js.map +1 -0
  183. package/dist/http/openapi.d.ts +21 -0
  184. package/dist/http/openapi.d.ts.map +1 -0
  185. package/dist/http/openapi.js +114 -0
  186. package/dist/http/openapi.js.map +1 -0
  187. package/dist/http/product-audience.d.ts +78 -0
  188. package/dist/http/product-audience.d.ts.map +1 -0
  189. package/dist/http/product-audience.js +92 -0
  190. package/dist/http/product-audience.js.map +1 -0
  191. package/dist/http/request-actor.d.ts +82 -0
  192. package/dist/http/request-actor.d.ts.map +1 -0
  193. package/dist/http/request-actor.js +2 -0
  194. package/dist/http/request-actor.js.map +1 -0
  195. package/dist/http/server.d.ts +60 -0
  196. package/dist/http/server.d.ts.map +1 -0
  197. package/dist/http/server.js +117 -0
  198. package/dist/http/server.js.map +1 -0
  199. package/dist/http/storefront-revalidator.d.ts +29 -0
  200. package/dist/http/storefront-revalidator.d.ts.map +1 -0
  201. package/dist/http/storefront-revalidator.js +34 -0
  202. package/dist/http/storefront-revalidator.js.map +1 -0
  203. package/dist/http/test-actor-carrier.d.ts +28 -0
  204. package/dist/http/test-actor-carrier.d.ts.map +1 -0
  205. package/dist/http/test-actor-carrier.js +10 -0
  206. package/dist/http/test-actor-carrier.js.map +1 -0
  207. package/dist/http/trusted-proxy.d.ts +48 -0
  208. package/dist/http/trusted-proxy.d.ts.map +1 -0
  209. package/dist/http/trusted-proxy.js +136 -0
  210. package/dist/http/trusted-proxy.js.map +1 -0
  211. package/dist/kernel/audit/audit-log-entry.entity.d.ts +33 -0
  212. package/dist/kernel/audit/audit-log-entry.entity.d.ts.map +1 -0
  213. package/dist/kernel/audit/audit-log-entry.entity.js +102 -0
  214. package/dist/kernel/audit/audit-log-entry.entity.js.map +1 -0
  215. package/dist/kernel/audit/audit-log-service.d.ts +63 -0
  216. package/dist/kernel/audit/audit-log-service.d.ts.map +1 -0
  217. package/dist/kernel/audit/audit-log-service.js +107 -0
  218. package/dist/kernel/audit/audit-log-service.js.map +1 -0
  219. package/dist/kernel/cache/in-process-cache-registry.d.ts +93 -0
  220. package/dist/kernel/cache/in-process-cache-registry.d.ts.map +1 -0
  221. package/dist/kernel/cache/in-process-cache-registry.js +78 -0
  222. package/dist/kernel/cache/in-process-cache-registry.js.map +1 -0
  223. package/dist/kernel/cache/shared-drop-marks.d.ts +39 -0
  224. package/dist/kernel/cache/shared-drop-marks.d.ts.map +1 -0
  225. package/dist/kernel/cache/shared-drop-marks.js +68 -0
  226. package/dist/kernel/cache/shared-drop-marks.js.map +1 -0
  227. package/dist/kernel/compose.d.ts +234 -0
  228. package/dist/kernel/compose.d.ts.map +1 -0
  229. package/dist/kernel/compose.js +279 -0
  230. package/dist/kernel/compose.js.map +1 -0
  231. package/dist/kernel/container.d.ts +95 -0
  232. package/dist/kernel/container.d.ts.map +1 -0
  233. package/dist/kernel/container.js +90 -0
  234. package/dist/kernel/container.js.map +1 -0
  235. package/dist/kernel/contribution-sinks.d.ts +106 -0
  236. package/dist/kernel/contribution-sinks.d.ts.map +1 -0
  237. package/dist/kernel/contribution-sinks.js +153 -0
  238. package/dist/kernel/contribution-sinks.js.map +1 -0
  239. package/dist/kernel/crypto/password-hasher.d.ts +3 -0
  240. package/dist/kernel/crypto/password-hasher.d.ts.map +1 -0
  241. package/dist/kernel/crypto/password-hasher.js +44 -0
  242. package/dist/kernel/crypto/password-hasher.js.map +1 -0
  243. package/dist/kernel/i18n/error-envelope-options.d.ts +56 -0
  244. package/dist/kernel/i18n/error-envelope-options.d.ts.map +1 -0
  245. package/dist/kernel/i18n/error-envelope-options.js +46 -0
  246. package/dist/kernel/i18n/error-envelope-options.js.map +1 -0
  247. package/dist/kernel/i18n/error-translation.d.ts +144 -0
  248. package/dist/kernel/i18n/error-translation.d.ts.map +1 -0
  249. package/dist/kernel/i18n/error-translation.js +84 -0
  250. package/dist/kernel/i18n/error-translation.js.map +1 -0
  251. package/dist/kernel/i18n/request-language.d.ts +80 -0
  252. package/dist/kernel/i18n/request-language.d.ts.map +1 -0
  253. package/dist/kernel/i18n/request-language.js +168 -0
  254. package/dist/kernel/i18n/request-language.js.map +1 -0
  255. package/dist/kernel/index.d.ts +142 -0
  256. package/dist/kernel/index.d.ts.map +1 -0
  257. package/dist/kernel/index.js +160 -0
  258. package/dist/kernel/index.js.map +1 -0
  259. package/dist/kernel/lazy-port.d.ts +59 -0
  260. package/dist/kernel/lazy-port.d.ts.map +1 -0
  261. package/dist/kernel/lazy-port.js +78 -0
  262. package/dist/kernel/lazy-port.js.map +1 -0
  263. package/dist/kernel/lifecycle/activation-resolver.d.ts +63 -0
  264. package/dist/kernel/lifecycle/activation-resolver.d.ts.map +1 -0
  265. package/dist/kernel/lifecycle/activation-resolver.js +70 -0
  266. package/dist/kernel/lifecycle/activation-resolver.js.map +1 -0
  267. package/dist/kernel/lifecycle/capability-registry.d.ts +145 -0
  268. package/dist/kernel/lifecycle/capability-registry.d.ts.map +1 -0
  269. package/dist/kernel/lifecycle/capability-registry.js +170 -0
  270. package/dist/kernel/lifecycle/capability-registry.js.map +1 -0
  271. package/dist/kernel/lifecycle/effective-state.d.ts +126 -0
  272. package/dist/kernel/lifecycle/effective-state.d.ts.map +1 -0
  273. package/dist/kernel/lifecycle/effective-state.js +111 -0
  274. package/dist/kernel/lifecycle/effective-state.js.map +1 -0
  275. package/dist/kernel/lifecycle/module-registration.entity.d.ts +57 -0
  276. package/dist/kernel/lifecycle/module-registration.entity.d.ts.map +1 -0
  277. package/dist/kernel/lifecycle/module-registration.entity.js +111 -0
  278. package/dist/kernel/lifecycle/module-registration.entity.js.map +1 -0
  279. package/dist/kernel/lifecycle/plugin-helpers.d.ts +165 -0
  280. package/dist/kernel/lifecycle/plugin-helpers.d.ts.map +1 -0
  281. package/dist/kernel/lifecycle/plugin-helpers.js +395 -0
  282. package/dist/kernel/lifecycle/plugin-helpers.js.map +1 -0
  283. package/dist/kernel/lifecycle/registry-cache.d.ts +318 -0
  284. package/dist/kernel/lifecycle/registry-cache.d.ts.map +1 -0
  285. package/dist/kernel/lifecycle/registry-cache.js +509 -0
  286. package/dist/kernel/lifecycle/registry-cache.js.map +1 -0
  287. package/dist/kernel/lifecycle/required-modules.d.ts +137 -0
  288. package/dist/kernel/lifecycle/required-modules.d.ts.map +1 -0
  289. package/dist/kernel/lifecycle/required-modules.js +80 -0
  290. package/dist/kernel/lifecycle/required-modules.js.map +1 -0
  291. package/dist/kernel/lifecycle/unique-module-ids.d.ts +58 -0
  292. package/dist/kernel/lifecycle/unique-module-ids.d.ts.map +1 -0
  293. package/dist/kernel/lifecycle/unique-module-ids.js +82 -0
  294. package/dist/kernel/lifecycle/unique-module-ids.js.map +1 -0
  295. package/dist/kernel/logging.d.ts +116 -0
  296. package/dist/kernel/logging.d.ts.map +1 -0
  297. package/dist/kernel/logging.js +71 -0
  298. package/dist/kernel/logging.js.map +1 -0
  299. package/dist/kernel/module-context.d.ts +563 -0
  300. package/dist/kernel/module-context.d.ts.map +1 -0
  301. package/dist/kernel/module-context.js +670 -0
  302. package/dist/kernel/module-context.js.map +1 -0
  303. package/dist/kernel/ports/audit.d.ts +115 -0
  304. package/dist/kernel/ports/audit.d.ts.map +1 -0
  305. package/dist/kernel/ports/audit.js +2 -0
  306. package/dist/kernel/ports/audit.js.map +1 -0
  307. package/dist/kernel/ports/organizations.d.ts +56 -0
  308. package/dist/kernel/ports/organizations.d.ts.map +1 -0
  309. package/dist/kernel/ports/organizations.js +2 -0
  310. package/dist/kernel/ports/organizations.js.map +1 -0
  311. package/dist/kernel/ports/provide.d.ts +14 -0
  312. package/dist/kernel/ports/provide.d.ts.map +1 -0
  313. package/dist/kernel/ports/provide.js +50 -0
  314. package/dist/kernel/ports/provide.js.map +1 -0
  315. package/dist/kernel/ports/require-admin.d.ts +61 -0
  316. package/dist/kernel/ports/require-admin.d.ts.map +1 -0
  317. package/dist/kernel/ports/require-admin.js +2 -0
  318. package/dist/kernel/ports/require-admin.js.map +1 -0
  319. package/dist/kernel/ports/require-customer.d.ts +17 -0
  320. package/dist/kernel/ports/require-customer.d.ts.map +1 -0
  321. package/dist/kernel/ports/require-customer.js +2 -0
  322. package/dist/kernel/ports/require-customer.js.map +1 -0
  323. package/dist/kernel/ports/sales-channel.d.ts +84 -0
  324. package/dist/kernel/ports/sales-channel.d.ts.map +1 -0
  325. package/dist/kernel/ports/sales-channel.js +2 -0
  326. package/dist/kernel/ports/sales-channel.js.map +1 -0
  327. package/dist/kernel/ports/settings.d.ts +59 -0
  328. package/dist/kernel/ports/settings.d.ts.map +1 -0
  329. package/dist/kernel/ports/settings.js +2 -0
  330. package/dist/kernel/ports/settings.js.map +1 -0
  331. package/dist/kernel/public-api-base-url.d.ts +98 -0
  332. package/dist/kernel/public-api-base-url.d.ts.map +1 -0
  333. package/dist/kernel/public-api-base-url.js +144 -0
  334. package/dist/kernel/public-api-base-url.js.map +1 -0
  335. package/dist/kernel/request-scope-hook.d.ts +63 -0
  336. package/dist/kernel/request-scope-hook.d.ts.map +1 -0
  337. package/dist/kernel/request-scope-hook.js +67 -0
  338. package/dist/kernel/request-scope-hook.js.map +1 -0
  339. package/dist/kernel/sales-channels/channel-bridge-registry.d.ts +109 -0
  340. package/dist/kernel/sales-channels/channel-bridge-registry.d.ts.map +1 -0
  341. package/dist/kernel/sales-channels/channel-bridge-registry.js +75 -0
  342. package/dist/kernel/sales-channels/channel-bridge-registry.js.map +1 -0
  343. package/dist/kernel/sales-channels/compose.d.ts +69 -0
  344. package/dist/kernel/sales-channels/compose.d.ts.map +1 -0
  345. package/dist/kernel/sales-channels/compose.js +43 -0
  346. package/dist/kernel/sales-channels/compose.js.map +1 -0
  347. package/dist/kernel/sales-channels/default-channel-reconciler.d.ts +66 -0
  348. package/dist/kernel/sales-channels/default-channel-reconciler.d.ts.map +1 -0
  349. package/dist/kernel/sales-channels/default-channel-reconciler.js +91 -0
  350. package/dist/kernel/sales-channels/default-channel-reconciler.js.map +1 -0
  351. package/dist/kernel/sales-channels/no-system-default-channel.error.d.ts +28 -0
  352. package/dist/kernel/sales-channels/no-system-default-channel.error.d.ts.map +1 -0
  353. package/dist/kernel/sales-channels/no-system-default-channel.error.js +33 -0
  354. package/dist/kernel/sales-channels/no-system-default-channel.error.js.map +1 -0
  355. package/dist/kernel/sales-channels/request-channel-assortment.d.ts +72 -0
  356. package/dist/kernel/sales-channels/request-channel-assortment.d.ts.map +1 -0
  357. package/dist/kernel/sales-channels/request-channel-assortment.js +83 -0
  358. package/dist/kernel/sales-channels/request-channel-assortment.js.map +1 -0
  359. package/dist/kernel/sales-channels/sales-channel-membership.service.d.ts +157 -0
  360. package/dist/kernel/sales-channels/sales-channel-membership.service.d.ts.map +1 -0
  361. package/dist/kernel/sales-channels/sales-channel-membership.service.js +302 -0
  362. package/dist/kernel/sales-channels/sales-channel-membership.service.js.map +1 -0
  363. package/dist/kernel/sales-channels/sales-channel-resolver.middleware.d.ts +76 -0
  364. package/dist/kernel/sales-channels/sales-channel-resolver.middleware.d.ts.map +1 -0
  365. package/dist/kernel/sales-channels/sales-channel-resolver.middleware.js +184 -0
  366. package/dist/kernel/sales-channels/sales-channel-resolver.middleware.js.map +1 -0
  367. package/dist/kernel/sales-channels/sales-channel-resolver.service.d.ts +82 -0
  368. package/dist/kernel/sales-channels/sales-channel-resolver.service.d.ts.map +1 -0
  369. package/dist/kernel/sales-channels/sales-channel-resolver.service.js +126 -0
  370. package/dist/kernel/sales-channels/sales-channel-resolver.service.js.map +1 -0
  371. package/dist/kernel/sales-channels/sales-channel.entity.d.ts +50 -0
  372. package/dist/kernel/sales-channels/sales-channel.entity.d.ts.map +1 -0
  373. package/dist/kernel/sales-channels/sales-channel.entity.js +132 -0
  374. package/dist/kernel/sales-channels/sales-channel.entity.js.map +1 -0
  375. package/dist/kernel/sales-channels/sales-channels-cache.d.ts +170 -0
  376. package/dist/kernel/sales-channels/sales-channels-cache.d.ts.map +1 -0
  377. package/dist/kernel/sales-channels/sales-channels-cache.js +243 -0
  378. package/dist/kernel/sales-channels/sales-channels-cache.js.map +1 -0
  379. package/dist/kernel/scope.d.ts +153 -0
  380. package/dist/kernel/scope.d.ts.map +1 -0
  381. package/dist/kernel/scope.js +172 -0
  382. package/dist/kernel/scope.js.map +1 -0
  383. package/dist/kernel/settings/compose.d.ts +49 -0
  384. package/dist/kernel/settings/compose.d.ts.map +1 -0
  385. package/dist/kernel/settings/compose.js +21 -0
  386. package/dist/kernel/settings/compose.js.map +1 -0
  387. package/dist/kernel/settings/manifest-reconciler.d.ts +78 -0
  388. package/dist/kernel/settings/manifest-reconciler.d.ts.map +1 -0
  389. package/dist/kernel/settings/manifest-reconciler.js +343 -0
  390. package/dist/kernel/settings/manifest-reconciler.js.map +1 -0
  391. package/dist/kernel/settings/secret-value-codec.d.ts +52 -0
  392. package/dist/kernel/settings/secret-value-codec.d.ts.map +1 -0
  393. package/dist/kernel/settings/secret-value-codec.js +102 -0
  394. package/dist/kernel/settings/secret-value-codec.js.map +1 -0
  395. package/dist/kernel/settings/setting-group.entity.d.ts +25 -0
  396. package/dist/kernel/settings/setting-group.entity.d.ts.map +1 -0
  397. package/dist/kernel/settings/setting-group.entity.js +79 -0
  398. package/dist/kernel/settings/setting-group.entity.js.map +1 -0
  399. package/dist/kernel/settings/setting-value.entity.d.ts +23 -0
  400. package/dist/kernel/settings/setting-value.entity.d.ts.map +1 -0
  401. package/dist/kernel/settings/setting-value.entity.js +66 -0
  402. package/dist/kernel/settings/setting-value.entity.js.map +1 -0
  403. package/dist/kernel/settings/setting.entity.d.ts +56 -0
  404. package/dist/kernel/settings/setting.entity.d.ts.map +1 -0
  405. package/dist/kernel/settings/setting.entity.js +147 -0
  406. package/dist/kernel/settings/setting.entity.js.map +1 -0
  407. package/dist/kernel/settings/settings-cache.d.ts +158 -0
  408. package/dist/kernel/settings/settings-cache.d.ts.map +1 -0
  409. package/dist/kernel/settings/settings-cache.js +253 -0
  410. package/dist/kernel/settings/settings-cache.js.map +1 -0
  411. package/dist/kernel/settings/settings.service.d.ts +142 -0
  412. package/dist/kernel/settings/settings.service.d.ts.map +1 -0
  413. package/dist/kernel/settings/settings.service.js +294 -0
  414. package/dist/kernel/settings/settings.service.js.map +1 -0
  415. package/dist/lifecycle/backend.d.ts +51 -0
  416. package/dist/lifecycle/backend.d.ts.map +1 -0
  417. package/dist/lifecycle/backend.js +40 -0
  418. package/dist/lifecycle/backend.js.map +1 -0
  419. package/dist/lifecycle/commands/activation.commands.d.ts +97 -0
  420. package/dist/lifecycle/commands/activation.commands.d.ts.map +1 -0
  421. package/dist/lifecycle/commands/activation.commands.js +142 -0
  422. package/dist/lifecycle/commands/activation.commands.js.map +1 -0
  423. package/dist/lifecycle/commands/disable.d.ts +3 -0
  424. package/dist/lifecycle/commands/disable.d.ts.map +1 -0
  425. package/dist/lifecycle/commands/disable.js +126 -0
  426. package/dist/lifecycle/commands/disable.js.map +1 -0
  427. package/dist/lifecycle/commands/enable.d.ts +3 -0
  428. package/dist/lifecycle/commands/enable.d.ts.map +1 -0
  429. package/dist/lifecycle/commands/enable.js +102 -0
  430. package/dist/lifecycle/commands/enable.js.map +1 -0
  431. package/dist/lifecycle/commands/install.d.ts +3 -0
  432. package/dist/lifecycle/commands/install.d.ts.map +1 -0
  433. package/dist/lifecycle/commands/install.js +263 -0
  434. package/dist/lifecycle/commands/install.js.map +1 -0
  435. package/dist/lifecycle/commands/operator-entry.d.ts +104 -0
  436. package/dist/lifecycle/commands/operator-entry.d.ts.map +1 -0
  437. package/dist/lifecycle/commands/operator-entry.js +127 -0
  438. package/dist/lifecycle/commands/operator-entry.js.map +1 -0
  439. package/dist/lifecycle/commands/operator-runtime.d.ts +147 -0
  440. package/dist/lifecycle/commands/operator-runtime.d.ts.map +1 -0
  441. package/dist/lifecycle/commands/operator-runtime.js +40 -0
  442. package/dist/lifecycle/commands/operator-runtime.js.map +1 -0
  443. package/dist/lifecycle/commands/status.d.ts +3 -0
  444. package/dist/lifecycle/commands/status.d.ts.map +1 -0
  445. package/dist/lifecycle/commands/status.js +108 -0
  446. package/dist/lifecycle/commands/status.js.map +1 -0
  447. package/dist/lifecycle/commands/uninstall.d.ts +3 -0
  448. package/dist/lifecycle/commands/uninstall.d.ts.map +1 -0
  449. package/dist/lifecycle/commands/uninstall.js +223 -0
  450. package/dist/lifecycle/commands/uninstall.js.map +1 -0
  451. package/dist/lifecycle/divergence-declaration.d.ts +74 -0
  452. package/dist/lifecycle/divergence-declaration.d.ts.map +1 -0
  453. package/dist/lifecycle/divergence-declaration.js +92 -0
  454. package/dist/lifecycle/divergence-declaration.js.map +1 -0
  455. package/dist/lifecycle/i18n/en.json +4 -0
  456. package/dist/lifecycle/i18n/pl.json +4 -0
  457. package/dist/lifecycle/index.d.ts +110 -0
  458. package/dist/lifecycle/index.d.ts.map +1 -0
  459. package/dist/lifecycle/index.js +189 -0
  460. package/dist/lifecycle/index.js.map +1 -0
  461. package/dist/lifecycle/manifest-registry.d.ts +244 -0
  462. package/dist/lifecycle/manifest-registry.d.ts.map +1 -0
  463. package/dist/lifecycle/manifest-registry.js +223 -0
  464. package/dist/lifecycle/manifest-registry.js.map +1 -0
  465. package/dist/lifecycle/manifest.d.ts +166 -0
  466. package/dist/lifecycle/manifest.d.ts.map +1 -0
  467. package/dist/lifecycle/manifest.js +121 -0
  468. package/dist/lifecycle/manifest.js.map +1 -0
  469. package/dist/lifecycle/plugin.d.ts +56 -0
  470. package/dist/lifecycle/plugin.d.ts.map +1 -0
  471. package/dist/lifecycle/plugin.js +59 -0
  472. package/dist/lifecycle/plugin.js.map +1 -0
  473. package/dist/lifecycle/resident.d.ts +16 -0
  474. package/dist/lifecycle/resident.d.ts.map +1 -0
  475. package/dist/lifecycle/resident.js +59 -0
  476. package/dist/lifecycle/resident.js.map +1 -0
  477. package/dist/lifecycle/routes.admin.d.ts +57 -0
  478. package/dist/lifecycle/routes.admin.d.ts.map +1 -0
  479. package/dist/lifecycle/routes.admin.js +162 -0
  480. package/dist/lifecycle/routes.admin.js.map +1 -0
  481. package/dist/lifecycle/routes.storefront.d.ts +26 -0
  482. package/dist/lifecycle/routes.storefront.d.ts.map +1 -0
  483. package/dist/lifecycle/routes.storefront.js +36 -0
  484. package/dist/lifecycle/routes.storefront.js.map +1 -0
  485. package/dist/lifecycle/services/deactivation-ledger.d.ts +216 -0
  486. package/dist/lifecycle/services/deactivation-ledger.d.ts.map +1 -0
  487. package/dist/lifecycle/services/deactivation-ledger.js +171 -0
  488. package/dist/lifecycle/services/deactivation-ledger.js.map +1 -0
  489. package/dist/lifecycle/services/dep-graph.d.ts +119 -0
  490. package/dist/lifecycle/services/dep-graph.d.ts.map +1 -0
  491. package/dist/lifecycle/services/dep-graph.js +334 -0
  492. package/dist/lifecycle/services/dep-graph.js.map +1 -0
  493. package/dist/lifecycle/services/gating-graph.d.ts +164 -0
  494. package/dist/lifecycle/services/gating-graph.d.ts.map +1 -0
  495. package/dist/lifecycle/services/gating-graph.js +203 -0
  496. package/dist/lifecycle/services/gating-graph.js.map +1 -0
  497. package/dist/lifecycle/services/lock.d.ts +27 -0
  498. package/dist/lifecycle/services/lock.d.ts.map +1 -0
  499. package/dist/lifecycle/services/lock.js +82 -0
  500. package/dist/lifecycle/services/lock.js.map +1 -0
  501. package/dist/lifecycle/services/manifest-loader.d.ts +125 -0
  502. package/dist/lifecycle/services/manifest-loader.d.ts.map +1 -0
  503. package/dist/lifecycle/services/manifest-loader.js +210 -0
  504. package/dist/lifecycle/services/manifest-loader.js.map +1 -0
  505. package/dist/lifecycle/services/migration-ownership.d.ts +36 -0
  506. package/dist/lifecycle/services/migration-ownership.d.ts.map +1 -0
  507. package/dist/lifecycle/services/migration-ownership.js +15 -0
  508. package/dist/lifecycle/services/migration-ownership.js.map +1 -0
  509. package/dist/lifecycle/services/module-id-claims.d.ts +38 -0
  510. package/dist/lifecycle/services/module-id-claims.d.ts.map +1 -0
  511. package/dist/lifecycle/services/module-id-claims.js +123 -0
  512. package/dist/lifecycle/services/module-id-claims.js.map +1 -0
  513. package/dist/lifecycle/services/module-origin.d.ts +55 -0
  514. package/dist/lifecycle/services/module-origin.d.ts.map +1 -0
  515. package/dist/lifecycle/services/module-origin.js +47 -0
  516. package/dist/lifecycle/services/module-origin.js.map +1 -0
  517. package/dist/lifecycle/services/orchestrator.d.ts +235 -0
  518. package/dist/lifecycle/services/orchestrator.d.ts.map +1 -0
  519. package/dist/lifecycle/services/orchestrator.js +954 -0
  520. package/dist/lifecycle/services/orchestrator.js.map +1 -0
  521. package/dist/lifecycle/services/presence-load.d.ts +281 -0
  522. package/dist/lifecycle/services/presence-load.d.ts.map +1 -0
  523. package/dist/lifecycle/services/presence-load.js +437 -0
  524. package/dist/lifecycle/services/presence-load.js.map +1 -0
  525. package/dist/lifecycle/services/static-registry.d.ts +47 -0
  526. package/dist/lifecycle/services/static-registry.d.ts.map +1 -0
  527. package/dist/lifecycle/services/static-registry.js +41 -0
  528. package/dist/lifecycle/services/static-registry.js.map +1 -0
  529. package/dist/migrations/20260424T165847_core_foundation_init.d.ts +25 -0
  530. package/dist/migrations/20260424T165847_core_foundation_init.d.ts.map +1 -0
  531. package/dist/migrations/20260424T165847_core_foundation_init.js +238 -0
  532. package/dist/migrations/20260424T165847_core_foundation_init.js.map +1 -0
  533. package/dist/migrations/20260425T050720_core_commerce_init.d.ts +19 -0
  534. package/dist/migrations/20260425T050720_core_commerce_init.d.ts.map +1 -0
  535. package/dist/migrations/20260425T050720_core_commerce_init.js +200 -0
  536. package/dist/migrations/20260425T050720_core_commerce_init.js.map +1 -0
  537. package/dist/migrations/20260430T101450_core_settings_init.d.ts +25 -0
  538. package/dist/migrations/20260430T101450_core_settings_init.d.ts.map +1 -0
  539. package/dist/migrations/20260430T101450_core_settings_init.js +113 -0
  540. package/dist/migrations/20260430T101450_core_settings_init.js.map +1 -0
  541. package/dist/migrations/20260430T170044_core_sales_channels_promote.d.ts +67 -0
  542. package/dist/migrations/20260430T170044_core_sales_channels_promote.d.ts.map +1 -0
  543. package/dist/migrations/20260430T170044_core_sales_channels_promote.js +101 -0
  544. package/dist/migrations/20260430T170044_core_sales_channels_promote.js.map +1 -0
  545. package/dist/migrations/20260506T200657_core_module_lifecycle_init.d.ts +21 -0
  546. package/dist/migrations/20260506T200657_core_module_lifecycle_init.d.ts.map +1 -0
  547. package/dist/migrations/20260506T200657_core_module_lifecycle_init.js +41 -0
  548. package/dist/migrations/20260506T200657_core_module_lifecycle_init.js.map +1 -0
  549. package/dist/migrations/20260514T111329_core_settings_global_value.d.ts +30 -0
  550. package/dist/migrations/20260514T111329_core_settings_global_value.d.ts.map +1 -0
  551. package/dist/migrations/20260514T111329_core_settings_global_value.js +34 -0
  552. package/dist/migrations/20260514T111329_core_settings_global_value.js.map +1 -0
  553. package/dist/migrations/20260611T140411_core_settings_secret_value_type.d.ts +26 -0
  554. package/dist/migrations/20260611T140411_core_settings_secret_value_type.d.ts.map +1 -0
  555. package/dist/migrations/20260611T140411_core_settings_secret_value_type.js +63 -0
  556. package/dist/migrations/20260611T140411_core_settings_secret_value_type.js.map +1 -0
  557. package/dist/migrations/20260611T140419_core_settings_enum_options.d.ts +19 -0
  558. package/dist/migrations/20260611T140419_core_settings_enum_options.d.ts.map +1 -0
  559. package/dist/migrations/20260611T140419_core_settings_enum_options.js +23 -0
  560. package/dist/migrations/20260611T140419_core_settings_enum_options.js.map +1 -0
  561. package/dist/migrations/20260629T090100_core_settings_hidden_flag.d.ts +20 -0
  562. package/dist/migrations/20260629T090100_core_settings_hidden_flag.d.ts.map +1 -0
  563. package/dist/migrations/20260629T090100_core_settings_hidden_flag.js +24 -0
  564. package/dist/migrations/20260629T090100_core_settings_hidden_flag.js.map +1 -0
  565. package/dist/migrations/20260717T134752_core_tenant_scope_indexes.d.ts +27 -0
  566. package/dist/migrations/20260717T134752_core_tenant_scope_indexes.d.ts.map +1 -0
  567. package/dist/migrations/20260717T134752_core_tenant_scope_indexes.js +32 -0
  568. package/dist/migrations/20260717T134752_core_tenant_scope_indexes.js.map +1 -0
  569. package/dist/migrations/20260721T011510_core_settings_credential_ref_value_type.d.ts +24 -0
  570. package/dist/migrations/20260721T011510_core_settings_credential_ref_value_type.d.ts.map +1 -0
  571. package/dist/migrations/20260721T011510_core_settings_credential_ref_value_type.js +57 -0
  572. package/dist/migrations/20260721T011510_core_settings_credential_ref_value_type.js.map +1 -0
  573. package/dist/migrations/20260816T203339_core_retire_core_activation_settings.d.ts +39 -0
  574. package/dist/migrations/20260816T203339_core_retire_core_activation_settings.d.ts.map +1 -0
  575. package/dist/migrations/20260816T203339_core_retire_core_activation_settings.js +59 -0
  576. package/dist/migrations/20260816T203339_core_retire_core_activation_settings.js.map +1 -0
  577. package/dist/migrations/20260919T101500_core_module_registrations_boot_converged.d.ts +34 -0
  578. package/dist/migrations/20260919T101500_core_module_registrations_boot_converged.d.ts.map +1 -0
  579. package/dist/migrations/20260919T101500_core_module_registrations_boot_converged.js +38 -0
  580. package/dist/migrations/20260919T101500_core_module_registrations_boot_converged.js.map +1 -0
  581. package/dist/migrations/baseline-migrations.generated.d.ts +2 -0
  582. package/dist/migrations/baseline-migrations.generated.d.ts.map +1 -0
  583. package/dist/migrations/baseline-migrations.generated.js +136 -0
  584. package/dist/migrations/baseline-migrations.generated.js.map +1 -0
  585. package/dist/migrations/index.d.ts +62 -0
  586. package/dist/migrations/index.d.ts.map +1 -0
  587. package/dist/migrations/index.js +75 -0
  588. package/dist/migrations/index.js.map +1 -0
  589. package/dist/overlay/deployment-roots.d.ts +37 -0
  590. package/dist/overlay/deployment-roots.d.ts.map +1 -0
  591. package/dist/overlay/deployment-roots.js +90 -0
  592. package/dist/overlay/deployment-roots.js.map +1 -0
  593. package/dist/overlay/index.d.ts +62 -0
  594. package/dist/overlay/index.d.ts.map +1 -0
  595. package/dist/overlay/index.js +62 -0
  596. package/dist/overlay/index.js.map +1 -0
  597. package/dist/overlay/overlay-runtime.d.ts +173 -0
  598. package/dist/overlay/overlay-runtime.d.ts.map +1 -0
  599. package/dist/overlay/overlay-runtime.js +281 -0
  600. package/dist/overlay/overlay-runtime.js.map +1 -0
  601. package/dist/overlay/resolve-overlay.d.ts +41 -0
  602. package/dist/overlay/resolve-overlay.d.ts.map +1 -0
  603. package/dist/overlay/resolve-overlay.js +72 -0
  604. package/dist/overlay/resolve-overlay.js.map +1 -0
  605. package/dist/packages/index.d.ts +57 -0
  606. package/dist/packages/index.d.ts.map +1 -0
  607. package/dist/packages/index.js +57 -0
  608. package/dist/packages/index.js.map +1 -0
  609. package/dist/packages/installed-packages.d.ts +79 -0
  610. package/dist/packages/installed-packages.d.ts.map +1 -0
  611. package/dist/packages/installed-packages.js +312 -0
  612. package/dist/packages/installed-packages.js.map +1 -0
  613. package/dist/packages/package-entity-lookup.d.ts +120 -0
  614. package/dist/packages/package-entity-lookup.d.ts.map +1 -0
  615. package/dist/packages/package-entity-lookup.js +17 -0
  616. package/dist/packages/package-entity-lookup.js.map +1 -0
  617. package/dist/packages/package-runtime.d.ts +177 -0
  618. package/dist/packages/package-runtime.d.ts.map +1 -0
  619. package/dist/packages/package-runtime.js +386 -0
  620. package/dist/packages/package-runtime.js.map +1 -0
  621. package/dist/tenancy/derived-scope.d.ts +43 -0
  622. package/dist/tenancy/derived-scope.d.ts.map +1 -0
  623. package/dist/tenancy/derived-scope.js +76 -0
  624. package/dist/tenancy/derived-scope.js.map +1 -0
  625. package/dist/tenancy/escape-hatch.d.ts +30 -0
  626. package/dist/tenancy/escape-hatch.d.ts.map +1 -0
  627. package/dist/tenancy/escape-hatch.js +50 -0
  628. package/dist/tenancy/escape-hatch.js.map +1 -0
  629. package/dist/tenancy/filters.d.ts +87 -0
  630. package/dist/tenancy/filters.d.ts.map +1 -0
  631. package/dist/tenancy/filters.js +126 -0
  632. package/dist/tenancy/filters.js.map +1 -0
  633. package/dist/tenancy/index.d.ts +63 -0
  634. package/dist/tenancy/index.d.ts.map +1 -0
  635. package/dist/tenancy/index.js +61 -0
  636. package/dist/tenancy/index.js.map +1 -0
  637. package/dist/tenancy/org-scoped.decorator.d.ts +150 -0
  638. package/dist/tenancy/org-scoped.decorator.d.ts.map +1 -0
  639. package/dist/tenancy/org-scoped.decorator.js +339 -0
  640. package/dist/tenancy/org-scoped.decorator.js.map +1 -0
  641. package/dist/tenancy/org-write-guard.d.ts +106 -0
  642. package/dist/tenancy/org-write-guard.d.ts.map +1 -0
  643. package/dist/tenancy/org-write-guard.js +141 -0
  644. package/dist/tenancy/org-write-guard.js.map +1 -0
  645. package/dist/tenancy/resolve-tenant-context.d.ts +91 -0
  646. package/dist/tenancy/resolve-tenant-context.d.ts.map +1 -0
  647. package/dist/tenancy/resolve-tenant-context.js +85 -0
  648. package/dist/tenancy/resolve-tenant-context.js.map +1 -0
  649. package/dist/tenancy/scoped-em.d.ts +10 -0
  650. package/dist/tenancy/scoped-em.d.ts.map +1 -0
  651. package/dist/tenancy/scoped-em.js +11 -0
  652. package/dist/tenancy/scoped-em.js.map +1 -0
  653. package/dist/tenancy/tenant-context.d.ts +154 -0
  654. package/dist/tenancy/tenant-context.d.ts.map +1 -0
  655. package/dist/tenancy/tenant-context.js +109 -0
  656. package/dist/tenancy/tenant-context.js.map +1 -0
  657. package/package.json +123 -0
@@ -0,0 +1 @@
1
+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AAK,IAAI,OAAO,EAAE,CAAC;gBAC5B,mBAAmB,CAAC,QAAQ,CAAC,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EAA6B,CAAC,CAAC;YAC3F,CAAC;QACH,CAAC;QAED,MAAM,CAAC,IAAI;YACT,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;QAED,0EAA0E;QAC1E,4EAA4E;QAC5E,mEAAmE;QACnE,0EAA0E;QAC1E,mBAAmB;QACnB,GAAG,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC;KAClC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,115 @@
1
+ import type { EntityManager } from '@mikro-orm/postgresql';
2
+ import type { AuditLogEntry } from '../audit/audit-log-entry.entity.js';
3
+ /**
4
+ * Kernel port — the append-only audit log (D-160.10).
5
+ *
6
+ * The **container name is `auditLogService`**, and it is a composition-root
7
+ * registration rather than a module's: it is on `PLATFORM_OWNED_NAMES`
8
+ * (`backend/scripts/check-port-dependencies.ts`), so a consumer declares no
9
+ * manifest dependency for it and there is no owner to switch off. A module
10
+ * reads it off its own cradle, as it always has; what changes here is only the
11
+ * type it reads it as.
12
+ *
13
+ * **Why the class is not published, and why that is not a stylistic
14
+ * preference.** `contracts/host-package.md` §1.3 row 4 measured 39 modules
15
+ * naming `AuditLogService` in a constructor signature across 147 specifiers,
16
+ * and recorded the tension as its Q3: Principle XIII routes a domain write
17
+ * through `CommandBus.run` precisely so that the audit row and the write commit
18
+ * together, which makes the bus — not the writer — the caller of the audit log.
19
+ * Publishing the class as the platform's contract would freeze the shape the
20
+ * principle routes *around* into something the host owes third-party module
21
+ * packages a major version to change. D-160.10 answered it: publish the seam,
22
+ * keep the implementation the host's.
23
+ *
24
+ * The port is therefore written here rather than derived from the class. A
25
+ * `Pick<AuditLogService, …>`, a `ReturnType<>` or an `InstanceType<>` would each
26
+ * import the class into every consumer's type graph, which is the coupling the
27
+ * ruling removes; and each would silently re-widen the surface the day somebody
28
+ * adds a method.
29
+ *
30
+ * **Not in `@endora-commerce/contracts`.** Two of these four signatures name types that
31
+ * package cannot have: `recordWithin` takes the caller's MikroORM
32
+ * `EntityManager` — that *is* the co-transactional guarantee, not an
33
+ * implementation detail — and every method answers in `AuditLogEntry`, a kernel
34
+ * entity. `@endora-commerce/contracts` depends on `zod` alone and is consumed by the admin
35
+ * SPA and the storefront; giving it an ORM dependency to hold a backend-only
36
+ * seam would be a new runtime dependency (Constitution IV) on the one package
37
+ * three applications share. `kernel/ports/settings.ts` and
38
+ * `kernel/ports/sales-channel.ts` are the standing precedent: a platform port
39
+ * lives beside the platform, and §1.3 rows 3, 16, 27 and 53 already classify
40
+ * `kernel/ports/*` as published.
41
+ */
42
+ export interface AuditPort {
43
+ /**
44
+ * Append one entry on the port's **own** EntityManager, flushed immediately.
45
+ *
46
+ * What a caller reaches for when it has one row and no unit of work of its
47
+ * own to join. A write that is part of a domain transaction wants
48
+ * {@link AuditPort.recordWithin} — or, better, wants to be a Command
49
+ * (Principle XIII), which writes the row through the bus and gets undo with
50
+ * it.
51
+ */
52
+ record(input: RecordAuditInput): Promise<AuditLogEntry>;
53
+ /**
54
+ * Append one entry on the **caller's** transactional EntityManager, with no
55
+ * fork and no flush (feature 054, FR-003).
56
+ *
57
+ * The caller's `em.transactional(...)` commits it atomically with the domain
58
+ * write, so the audit row and the write live or die together. Passing an `em`
59
+ * that has no transaction open is not an error and not a guarantee: the entry
60
+ * is persisted into that unit of work and lands whenever it flushes.
61
+ */
62
+ recordWithin(em: EntityManager, input: RecordAuditInput): AuditLogEntry;
63
+ /**
64
+ * Entries matching a filter, newest first, capped (default 100, max 500).
65
+ *
66
+ * The admin audit viewer's read. An empty filter is every entry, which is why
67
+ * the cap is not optional.
68
+ */
69
+ query(filter?: AuditLogFilter): Promise<AuditLogEntry[]>;
70
+ /**
71
+ * Every entry recorded under one action for a **set** of objects, oldest
72
+ * first (issue #284).
73
+ *
74
+ * Deliberately uncapped, and that is the contract rather than an oversight: a
75
+ * limit over a set does not bound the work evenly, it drops whichever objects
76
+ * sort last, and an object whose history was silently truncated reads as an
77
+ * object with no history. The caller bounds the population by passing the ids
78
+ * on one page.
79
+ */
80
+ findByObjectIds(input: {
81
+ action: string;
82
+ objectType: string;
83
+ objectIds: readonly string[];
84
+ }): Promise<AuditLogEntry[]>;
85
+ }
86
+ /**
87
+ * One entry, as the caller states it.
88
+ *
89
+ * The actor fields are the caller's to fill and are not derived here — a worker
90
+ * or a system sweep legitimately has none. `recordAuditFromContext`
91
+ * (`src/commands/`) is the helper that fills them from the ambient tenant
92
+ * context for a request-shaped write.
93
+ */
94
+ export interface RecordAuditInput {
95
+ actorAdminUserId?: string | null;
96
+ impersonatedCustomerAccountId?: string | null;
97
+ action: string;
98
+ objectType: string;
99
+ objectId: string;
100
+ stateBefore?: Record<string, unknown> | null;
101
+ stateAfter?: Record<string, unknown> | null;
102
+ ipAddress?: string | null;
103
+ userAgent?: string | null;
104
+ requestId?: string | null;
105
+ }
106
+ /** The filter {@link AuditPort.query} takes. Every field is an equality match. */
107
+ export interface AuditLogFilter {
108
+ actorAdminUserId?: string;
109
+ impersonatedCustomerAccountId?: string;
110
+ action?: string;
111
+ objectType?: string;
112
+ objectId?: string;
113
+ limit?: number;
114
+ }
115
+ //# sourceMappingURL=audit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../../src/kernel/ports/audit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAExE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,WAAW,SAAS;IACxB;;;;;;;;OAQG;IACH,MAAM,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,aAAa,CAA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B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=audit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit.js","sourceRoot":"","sources":["../../../src/kernel/ports/audit.ts"],"names":[],"mappings":""}
@@ -0,0 +1,56 @@
1
+ import type { OrganizationStatus } from '@endora-commerce/contracts';
2
+ /**
3
+ * Kernel port — organisation read (feature 072, D-32; retyped by D-55).
4
+ *
5
+ * The Organization is the one tenant concept (Constitution XI), so almost every
6
+ * module needs to read one. The **owner is the `organizations` module**, which
7
+ * registers the default (`OrganizationContextService`) and keeps the entity, its
8
+ * table and its eight migrations.
9
+ *
10
+ * The kernel owns only the shape, and until D-55 that was not true here: all
11
+ * three methods were typed with the module-owned `Organization` entity class, so
12
+ * `@endora-commerce/kernel` reached `@endora-commerce/mod-organizations` — the
13
+ * package cycle F4 cannot start with. {@link OrganizationSnapshot} is the shape
14
+ * the port actually advertises, measured against every caller: `promotions`
15
+ * reads `status`, `carts` and `orders` discard the return value and want the
16
+ * throw, and `loadCartApprovalPolicy` never named an entity at all.
17
+ *
18
+ * `OrganizationStatus` comes from `@endora-commerce/contracts`, which already declares the
19
+ * union the entity re-declares — the second name is the existing one, not a new
20
+ * one. Nothing else moves: TypeScript is structural, so `OrganizationContextService`
21
+ * satisfies this port returning its entity, with no mapping layer and no
22
+ * implementation change.
23
+ *
24
+ * **This is the settled shape, not an interim one.** The entity stays in
25
+ * `organizations` permanently: the Organization's logic belongs to a module, and
26
+ * relocating the class would buy nothing measurable (the mapping layer is nil,
27
+ * the blast radius one file) at the price of splitting six migrations, renaming
28
+ * eight applied classes and a coordinated database rebuild. `src/tenancy` is the
29
+ * precedent that makes it right rather than merely cheap — it enforces
30
+ * Principle XI knowing the Organization as a UUID in a column and never as a
31
+ * class, which is exactly the grip a platform layer needs on the one tenant
32
+ * concept. A consumer that needs a field outside `{id, status}` grows the
33
+ * snapshot by a line; that is what a structural type is for.
34
+ */
35
+ export interface OrganizationSnapshot {
36
+ readonly id: string;
37
+ readonly status: OrganizationStatus;
38
+ }
39
+ export interface OrganizationReadPort {
40
+ /** The Organization, or `null` when it does not exist or is soft-deleted. */
41
+ loadEffectiveOrganization(organizationId: string): Promise<OrganizationSnapshot | null>;
42
+ /**
43
+ * Resolve the Organization and refuse when it may not transact.
44
+ *
45
+ * Returning the organisation it just validated is information this port
46
+ * legitimately advertises; that both current callers discard it is a fact
47
+ * about two call sites, not about the contract.
48
+ *
49
+ * @throws `OrganizationNotFoundError` when the organisation does not exist.
50
+ * @throws `OrganizationCannotTransactError` when its status is not `active`.
51
+ */
52
+ assertCanTransact(organizationId: string): Promise<OrganizationSnapshot>;
53
+ /** Per-organisation cart-approval policy; `false` for a customer with no organisation. */
54
+ loadCartApprovalPolicy(organizationId: string | null): Promise<boolean>;
55
+ }
56
+ //# sourceMappingURL=organizations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../../../src/kernel/ports/organizations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;CACrC;AAED,MAAM,WAAW,oBAAoB;IACnC,6EAA6E;IAC7E,yBAAyB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAExF;;;;;;;;;OASG;IACH,iBAAiB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEzE,0FAA0F;IAC1F,sBAAsB,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACzE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=organizations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizations.js","sourceRoot":"","sources":["../../../src/kernel/ports/organizations.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ import { type Resolver } from 'awilix';
2
+ import type { KernelContainer } from '../container.js';
3
+ /**
4
+ * Register `name` as a port owned by `moduleId`.
5
+ *
6
+ * The gate is a **transient** wrapper over the original resolver, which keeps
7
+ * its own lifetime. That split is load-bearing: a singleton port registered
8
+ * with the check inside its factory would run the check exactly once — at first
9
+ * resolution — and every later resolution would return the cached instance
10
+ * without asking, so switching the module off would stop nothing that had
11
+ * already been resolved once.
12
+ */
13
+ export declare function registerPort<T>(container: KernelContainer, moduleId: string, name: string, resolver: Resolver<T>): void;
14
+ //# sourceMappingURL=provide.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provide.d.ts","sourceRoot":"","sources":["../../../src/kernel/ports/provide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAG7D,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,iBAAiB,CAAC;AA6BrE;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,SAAS,EAAE,eAAe,EAC1B,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GACpB,IAAI,CASN"}
@@ -0,0 +1,50 @@
1
+ import { asFunction, Lifetime } from 'awilix';
2
+ import { ModuleDisabledError } from '../lifecycle/plugin-helpers.js';
3
+ import { effectiveState } from '../lifecycle/effective-state.js';
4
+ /**
5
+ * Registering a **port** — a name the owning module publishes for other modules
6
+ * to resolve (feature 072, T059; `contracts/module-context.md` §Ports).
7
+ *
8
+ * An ordinary registration and a port differ in exactly one way, and it is not
9
+ * cosmetic: a port is resolved by *another* module, so its availability is a
10
+ * cross-module question and the answer has to be the module's **effective**
11
+ * state (Constitution XVII). Resolving a port from a module that is not
12
+ * effectively present throws {@link ModuleDisabledError} — 503
13
+ * `MODULE_DISABLED` with `Retry-After` — instead of handing back a live service
14
+ * belonging to a module the operator switched off.
15
+ *
16
+ * Fail closed, because the alternative is a half-executed operation: a consumer
17
+ * that gets the service anyway writes rows, emits events and charges cards on
18
+ * behalf of a capability that is supposed to be absent.
19
+ *
20
+ * Kernel-owned ports (`settingsReadPort`, the sales-channel ports) are **not**
21
+ * registered through here and never gate: the kernel is the part every
22
+ * deployment has, so there is no state in which it is absent, and a gate that
23
+ * can never close is a gate nobody can reason about.
24
+ */
25
+ /** The private name the ungated resolver keeps, so the gate wraps rather than replaces. */
26
+ function ungatedNameFor(name) {
27
+ return `${name}$ungated$`;
28
+ }
29
+ /**
30
+ * Register `name` as a port owned by `moduleId`.
31
+ *
32
+ * The gate is a **transient** wrapper over the original resolver, which keeps
33
+ * its own lifetime. That split is load-bearing: a singleton port registered
34
+ * with the check inside its factory would run the check exactly once — at first
35
+ * resolution — and every later resolution would return the cached instance
36
+ * without asking, so switching the module off would stop nothing that had
37
+ * already been resolved once.
38
+ */
39
+ export function registerPort(container, moduleId, name, resolver) {
40
+ const ungated = ungatedNameFor(name);
41
+ container.register({ [ungated]: resolver });
42
+ container.register({
43
+ [name]: asFunction((cradle) => {
44
+ if (!effectiveState.isPresent(moduleId))
45
+ throw new ModuleDisabledError(moduleId);
46
+ return cradle[ungated];
47
+ }).setLifetime(Lifetime.TRANSIENT),
48
+ });
49
+ }
50
+ //# sourceMappingURL=provide.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provide.js","sourceRoot":"","sources":["../../../src/kernel/ports/provide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAiB,MAAM,QAAQ,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGjE;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,2FAA2F;AAC3F,SAAS,cAAc,CAAC,IAAY;IAClC,OAAO,GAAG,IAAI,WAAW,CAAC;AAC5B,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,YAAY,CAC1B,SAA0B,EAC1B,QAAgB,EAChB,IAAY,EACZ,QAAqB;IAErB,MAAM,OAAO,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IACrC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC5C,SAAS,CAAC,QAAQ,CAAC;QACjB,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,CAAC,MAAoB,EAAK,EAAE;YAC7C,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,QAAQ,CAAC;gBAAE,MAAM,IAAI,mBAAmB,CAAC,QAAQ,CAAC,CAAC;YACjF,OAAO,MAAM,CAAC,OAAO,CAAM,CAAC;QAC9B,CAAC,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC;KACnC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,61 @@
1
+ import type { FastifyReply, FastifyRequest } from 'fastify';
2
+ /**
3
+ * Kernel port — the admin guard (feature 072, D-32).
4
+ *
5
+ * Before this file the repository carried **17 byte-identical declarations** of
6
+ * `RequireAdminFactory`, one per module that happened to need it, and 53 files
7
+ * imported `catalog`'s copy — an infrastructure dependency on a domain module.
8
+ * This is the one declaration; every route surface imports it from here.
9
+ *
10
+ * The kernel owns the **type**. The `auth` module owns the **implementation**
11
+ * (`modules/auth/require-admin.ts`) because promoting an admin actor needs the
12
+ * auth plugin's per-request decorations, and checking a permission needs
13
+ * `admin_roles` — which `auth`'s manifest declares as a dependency.
14
+ */
15
+ export type RequireAdminFactory = (permission?: string) => (req: FastifyRequest, reply: FastifyReply) => Promise<void>;
16
+ /**
17
+ * The admin gate that succeeds when the actor holds **any** of the listed
18
+ * permission codes. Lives beside the single-permission factory so both shapes
19
+ * have one declaration.
20
+ */
21
+ export type RequireAdminAnyFactory = (codes: readonly string[]) => (req: FastifyRequest, reply: FastifyReply) => Promise<void>;
22
+ /**
23
+ * The slice of `admin_roles`' `PermissionService` the guard needs. Declared
24
+ * structurally so the kernel does not import a module's service class.
25
+ */
26
+ export interface AdminPermissionChecker {
27
+ hasPermission(adminUserId: string, code: string): Promise<boolean>;
28
+ }
29
+ /**
30
+ * Kernel port — **actor promotion**, registered by `auth` under the container
31
+ * name `promoteAdminActor`.
32
+ *
33
+ * The same split as the two factories above: the kernel owns the type, `auth`
34
+ * owns the implementation, because promotion reads `request.adminActor` and
35
+ * writes `request.actor` — two decorations that module's plugin applies and no
36
+ * platform file may reason about.
37
+ *
38
+ * It is here rather than in `@endora-commerce/contracts` for the reason
39
+ * {@link RequireCustomerGuard} is: the shape is a `FastifyRequest`, and that
40
+ * package declares no dependency on Fastify. It is deliberately **not** on the
41
+ * `./kernel` barrel — no module resolves it (the guards `auth` publishes are
42
+ * what a route surface takes), so `host-package.md` §1.3 classifies it
43
+ * *unreached* and publishing it would put a host-only name into the platform's
44
+ * module-facing contract.
45
+ *
46
+ * **Why a port at all**, when `auth` also exports the function from its own
47
+ * `./backend` subpath: `specs/117-instance-bring-up/` FR-030. The production
48
+ * composition root called the exported function, and
49
+ * `specs/110-instance-repository/` T118 moves that call site into
50
+ * `@endora-commerce/platform`, where importing a module is D-52/D-53's
51
+ * refusal. The container name is the spelling that survives the move, and it is
52
+ * the drain condition `auth`'s own barrel and
53
+ * `test/contract/kernel/harness-parity.test.ts` both named — *"actor promotion
54
+ * published as a port, resolved from the container"*.
55
+ *
56
+ * `void` rather than a returned actor, because it mutates the request in place:
57
+ * every caller reads `request.actor` afterwards, and a return value would be a
58
+ * second answer to the question the decoration already answers.
59
+ */
60
+ export type AdminActorPromotion = (req: FastifyRequest) => void;
61
+ //# sourceMappingURL=require-admin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"require-admin.d.ts","sourceRoot":"","sources":["../../../src/kernel/ports/require-admin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE5D;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAChC,UAAU,CAAC,EAAE,MAAM,KAChB,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAEjE;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,CACnC,KAAK,EAAE,SAAS,MAAM,EAAE,KACrB,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAEjE;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACpE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,GAAG,EAAE,cAAc,KAAK,IAAI,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=require-admin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"require-admin.js","sourceRoot":"","sources":["../../../src/kernel/ports/require-admin.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ import type { FastifyRequest } from 'fastify';
2
+ /**
3
+ * Kernel port — the customer guard (issue #43), the customer-side twin of
4
+ * {@link import('./require-admin.js').RequireAdminFactory}.
5
+ *
6
+ * The kernel owns the **type**; the `auth` module owns the **implementation**
7
+ * (`modules/auth/require-customer.ts`), because deciding whether a request
8
+ * carries a customer session means reading the actor its plugin decorates.
9
+ *
10
+ * A guard rather than a factory: there is no permission code to bind, so there
11
+ * is nothing for a factory to close over. Declared over the request alone so it
12
+ * is assignable at every `preHandler` site — Fastify passes a reply the guard
13
+ * has no use for, and a two-parameter type would not be assignable to the
14
+ * one-parameter shapes several modules already declare.
15
+ */
16
+ export type RequireCustomerGuard = (req: FastifyRequest) => Promise<void>;
17
+ //# sourceMappingURL=require-customer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"require-customer.d.ts","sourceRoot":"","sources":["../../../src/kernel/ports/require-customer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,GAAG,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=require-customer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"require-customer.js","sourceRoot":"","sources":["../../../src/kernel/ports/require-customer.ts"],"names":[],"mappings":""}
@@ -0,0 +1,84 @@
1
+ import type { ChannelMemberEntityType } from '@endora-commerce/contracts';
2
+ import type { CachedChannel } from '../sales-channels/sales-channels-cache.js';
3
+ import type { MembershipMutationOptions, MembershipMutationResult } from '../sales-channels/sales-channel-membership.service.js';
4
+ import type { SalesChannel } from '../sales-channels/sales-channel.entity.js';
5
+ /**
6
+ * Kernel port — sales-channel resolution and the membership/bridge accessors
7
+ * (feature 072, D-32; Constitution XII).
8
+ *
9
+ * Channel resolution is a platform concern: 49 call sites read the resolved
10
+ * channel, and the resolution order is a refusal contract, not a module
11
+ * preference. The resolver, its cache and the bridge accessors move into the
12
+ * kernel; `sales-channels.service.ts` (the admin CRUD surface, zero external
13
+ * importers) and `routes.admin.ts` stay in the module.
14
+ *
15
+ * Resolution order and refusal behaviour are unchanged by this port: bound
16
+ * API-key binding → `X-Sales-Channel` header → `?salesChannel=` (ignored on
17
+ * `/api/v1/admin/*`) → host map → system default. An unknown or inactive channel
18
+ * refuses and never falls back.
19
+ */
20
+ export interface SalesChannelResolutionPort {
21
+ /** Lookup by code; `null` when the code is unknown. */
22
+ getByCode(code: string): Promise<CachedChannel | null>;
23
+ /** Every channel, ordered by code. */
24
+ listAll(): Promise<CachedChannel[]>;
25
+ /** Lookup by id — a bound API key pins its channel by id, not code. */
26
+ getById(id: string): Promise<CachedChannel | null>;
27
+ /** Resolve a code to an *active* channel, distinguishing unknown from inactive. */
28
+ resolveActive(code: string): Promise<{
29
+ ok: true;
30
+ channel: CachedChannel;
31
+ } | {
32
+ ok: false;
33
+ error: 'unknown_sales_channel' | 'inactive_sales_channel';
34
+ code: string;
35
+ }>;
36
+ /**
37
+ * The system-default channel, used as the storefront/integration fallback.
38
+ * Never `null` (D-48): exactly one row holds the flag on a booted deployment,
39
+ * so a caller has nothing to branch on. Throws `NoSystemDefaultChannel` when
40
+ * the registry has none, which means composition has not run the reconciler.
41
+ */
42
+ getSystemDefault(): Promise<CachedChannel>;
43
+ /** Map a `Host` header onto a channel code via the env-configured host map. */
44
+ resolveHost(host: string | undefined): string | null;
45
+ }
46
+ /**
47
+ * The membership bridge tables (`sales_channel_<entity>`). Every module that
48
+ * scopes its own rows to a channel goes through this rather than writing the
49
+ * bridge table itself — the sanctioned bridge accessor of Constitution XII.
50
+ */
51
+ export interface SalesChannelMembershipPort {
52
+ addToChannel(channelId: string, entityType: ChannelMemberEntityType, entityId: string, options?: MembershipMutationOptions): Promise<MembershipMutationResult>;
53
+ removeFromChannel(channelId: string, entityType: ChannelMemberEntityType, entityId: string, options?: MembershipMutationOptions): Promise<MembershipMutationResult>;
54
+ /** Bind an entity to the system-default channel when it belongs to none (FR-008). */
55
+ bindToDefaultIfEmpty(entityType: ChannelMemberEntityType, entityId: string): Promise<MembershipMutationResult>;
56
+ /**
57
+ * Replace an entity's complete channel membership set atomically.
58
+ * Complete-record integrations use this instead of composing add/remove.
59
+ */
60
+ replaceChannelsForEntity(entityType: ChannelMemberEntityType, entityId: string, channelIds: readonly [string, ...string[]], options?: MembershipMutationOptions): Promise<MembershipMutationResult>;
61
+ /**
62
+ * Give the target every channel the source belongs to, one audited add per
63
+ * membership (issue #185). `catalog`'s product duplication is the caller.
64
+ */
65
+ copyMemberships(entityType: ChannelMemberEntityType, sourceEntityId: string, targetEntityId: string, options?: MembershipMutationOptions): Promise<{
66
+ copied: number;
67
+ }>;
68
+ /**
69
+ * Narrow a known set of entity ids to those bound to `channelId`. The
70
+ * intersection, not the enumeration — see the service's note on why this is
71
+ * a separate method from {@link listEntityIdsForChannel}.
72
+ */
73
+ filterEntityIdsInChannel(channelId: string, entityType: ChannelMemberEntityType, entityIds: readonly string[]): Promise<string[]>;
74
+ /** Channels an entity currently belongs to. */
75
+ listChannelsForEntity(entityType: ChannelMemberEntityType, entityId: string): Promise<SalesChannel[]>;
76
+ /** Entity ids of `entityType` that currently belong to `channelId`. */
77
+ listEntityIdsForChannel(channelId: string, entityType: ChannelMemberEntityType, page?: number, pageSize?: number): Promise<{
78
+ entityIds: string[];
79
+ total: number;
80
+ }>;
81
+ }
82
+ /** The channel resolved for the current scoped execution, or `null` outside HTTP. */
83
+ export type ResolvedChannel = CachedChannel;
84
+ //# sourceMappingURL=sales-channel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sales-channel.d.ts","sourceRoot":"","sources":["../../../src/kernel/ports/sales-channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAC/E,OAAO,KAAK,EACV,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,uDAAuD,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAE9E;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,0BAA0B;IACzC,uDAAuD;IACvD,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,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C,OAAO,CAAC,EAAE,yBAAyB,GAClC,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAErC;;;OAGG;IACH,eAAe,CACb,UAAU,EAAE,uBAAuB,EACnC,cAAc,EAAE,MAAM,EACtB,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,yBAAyB,GAClC,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAE/B;;;;OAIG;IACH,wBAAwB,CACtB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,uBAAuB,EACnC,SAAS,EAAE,SAAS,MAAM,EAAE,GAC3B,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAErB,+CAA+C;IAC/C,qBAAqB,CACnB,UAAU,EAAE,uBAAuB,EACnC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAE3B,uEAAuE;IACvE,uBAAuB,CACrB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,uBAAuB,EACnC,IAAI,CAAC,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACpD;AAED,qFAAqF;AACrF,MAAM,MAAM,eAAe,GAAG,aAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=sales-channel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sales-channel.js","sourceRoot":"","sources":["../../../src/kernel/ports/sales-channel.ts"],"names":[],"mappings":""}
@@ -0,0 +1,59 @@
1
+ import type { z } from 'zod';
2
+ /**
3
+ * Kernel port — settings read (feature 072, D-32).
4
+ *
5
+ * The settings **store** (entities, resolver, cache, secret codec and the
6
+ * manifest reconciler) is kernel-owned: boot and lifecycle gating both need it.
7
+ * The admin service, its routes and the storefront resolvers stay in the
8
+ * `settings` module.
9
+ *
10
+ * **Why this port is read-only, against `tasks.md` T014's "read/write".** There
11
+ * are exactly two writers of a setting value in the tree and neither belongs
12
+ * behind a kernel port:
13
+ *
14
+ * - `settings/services/settings-admin.service.ts` — the audited, optimistically
15
+ * locked, channel-subset-aware admin write. It carries an `AdminAuditContext`
16
+ * and the module-activation policy, so it is module-owned by D-32 and stays
17
+ * on the module's own surface.
18
+ * - `kernel/settings/manifest-reconciler.ts` — kernel-internal since T018, and
19
+ * a component does not reach itself through a port.
20
+ *
21
+ * Inventing a third, portable write shape would be a speculative abstraction
22
+ * with no caller. When a cross-module write appears, it goes here.
23
+ */
24
+ export interface SettingsReadPort {
25
+ /**
26
+ * Read one setting and validate it against the caller's schema.
27
+ *
28
+ * `salesChannelId` is a channel uuid for a channel-scoped read, or **`null`
29
+ * for a platform-wide read** — `settings.global_value ?? default_value`,
30
+ * skipping `setting_values` entirely (feature 072, D-41). `null` is not a
31
+ * degraded mode: it is what a reader that is not per-storefront says, and
32
+ * giving that tier a spelling is what removed the sentinels three modules had
33
+ * invented for it.
34
+ *
35
+ * @throws `SettingNotRegistered` when no setting carries `code`.
36
+ * @throws `SettingOutOfScopeForChannel` when the setting is scoped to other
37
+ * channels — including a platform-wide read of a channel-subset setting.
38
+ * @throws `SettingValueShapeMismatch` when the stored value fails `schema`.
39
+ * @throws `SettingsChannelIdInvalid` when `salesChannelId` is a non-null
40
+ * string that is not a channel uuid.
41
+ */
42
+ get<T>(code: string, salesChannelId: string | null, schema: z.ZodType<T>): Promise<T>;
43
+ /**
44
+ * Batch read. Every code resolves independently, so one missing code does not
45
+ * poison the batch — per-code failures come back as `{ ok: false, error }`.
46
+ * A malformed `salesChannelId` is not a per-code failure and propagates.
47
+ */
48
+ getMany(codes: string[], salesChannelId: string | null): Promise<Map<string, SettingsReadResult<unknown>>>;
49
+ }
50
+ /** One entry of a {@link SettingsReadPort.getMany} result. */
51
+ export type SettingsReadResult<T> = {
52
+ ok: true;
53
+ value: T;
54
+ } | {
55
+ ok: false;
56
+ error: 'not_registered' | 'out_of_scope' | 'shape_mismatch';
57
+ details?: unknown;
58
+ };
59
+ //# sourceMappingURL=settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/kernel/ports/settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;;;;;;;;;OAgBG;IACH,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAEtF;;;;OAIG;IACH,OAAO,CACL,KAAK,EAAE,MAAM,EAAE,EACf,cAAc,EAAE,MAAM,GAAG,IAAI,GAC5B,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;CACtD;AAED,8DAA8D;AAC9D,MAAM,MAAM,kBAAkB,CAAC,CAAC,IAC5B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,GACtB;IACE,EAAE,EAAE,KAAK,CAAC;IACV,KAAK,EAAE,gBAAgB,GAAG,cAAc,GAAG,gBAAgB,CAAC;IAC5D,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/kernel/ports/settings.ts"],"names":[],"mappings":""}