@endora-commerce/contracts 0.109.0 → 0.110.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 (241) hide show
  1. package/dist/actor.d.ts +16 -0
  2. package/dist/actor.d.ts.map +1 -1
  3. package/dist/addresses.d.ts +35 -0
  4. package/dist/addresses.d.ts.map +1 -1
  5. package/dist/addresses.js +8 -1
  6. package/dist/addresses.js.map +1 -1
  7. package/dist/admin-contributions.d.ts +62 -7
  8. package/dist/admin-contributions.d.ts.map +1 -1
  9. package/dist/admin-contributions.js +27 -8
  10. package/dist/admin-contributions.js.map +1 -1
  11. package/dist/admin-roles.d.ts +8 -2
  12. package/dist/admin-roles.d.ts.map +1 -1
  13. package/dist/admin-roles.js.map +1 -1
  14. package/dist/admin-users.d.ts +9 -0
  15. package/dist/admin-users.d.ts.map +1 -1
  16. package/dist/admin.d.ts +77 -4
  17. package/dist/admin.d.ts.map +1 -1
  18. package/dist/admin.js +79 -3
  19. package/dist/admin.js.map +1 -1
  20. package/dist/assets-library.d.ts +26 -0
  21. package/dist/assets-library.d.ts.map +1 -1
  22. package/dist/assets-library.js +6 -3
  23. package/dist/assets-library.js.map +1 -1
  24. package/dist/audit-logs.d.ts +12 -0
  25. package/dist/audit-logs.d.ts.map +1 -1
  26. package/dist/audit-logs.js +12 -0
  27. package/dist/audit-logs.js.map +1 -1
  28. package/dist/blog.d.ts +382 -22
  29. package/dist/blog.d.ts.map +1 -1
  30. package/dist/blog.js +199 -17
  31. package/dist/blog.js.map +1 -1
  32. package/dist/carts.d.ts +394 -36
  33. package/dist/carts.d.ts.map +1 -1
  34. package/dist/carts.js +131 -8
  35. package/dist/carts.js.map +1 -1
  36. package/dist/catalog.d.ts +351 -219
  37. package/dist/catalog.d.ts.map +1 -1
  38. package/dist/catalog.js +209 -157
  39. package/dist/catalog.js.map +1 -1
  40. package/dist/cms-brand.d.ts +14 -14
  41. package/dist/cms.d.ts +41 -16
  42. package/dist/cms.d.ts.map +1 -1
  43. package/dist/cms.js.map +1 -1
  44. package/dist/common.d.ts +23 -6
  45. package/dist/common.d.ts.map +1 -1
  46. package/dist/common.js +25 -2
  47. package/dist/common.js.map +1 -1
  48. package/dist/comparisons.d.ts +28 -21
  49. package/dist/comparisons.d.ts.map +1 -1
  50. package/dist/comparisons.js +2 -1
  51. package/dist/comparisons.js.map +1 -1
  52. package/dist/credit-limits.d.ts +1 -0
  53. package/dist/credit-limits.d.ts.map +1 -1
  54. package/dist/credit-limits.js +14 -0
  55. package/dist/credit-limits.js.map +1 -1
  56. package/dist/crm.d.ts +79 -49
  57. package/dist/crm.d.ts.map +1 -1
  58. package/dist/crm.js +6 -0
  59. package/dist/crm.js.map +1 -1
  60. package/dist/custom-fields.d.ts +27 -13
  61. package/dist/custom-fields.d.ts.map +1 -1
  62. package/dist/custom-fields.js +15 -1
  63. package/dist/custom-fields.js.map +1 -1
  64. package/dist/customer-accounts.d.ts +186 -22
  65. package/dist/customer-accounts.d.ts.map +1 -1
  66. package/dist/customer-accounts.js +39 -0
  67. package/dist/customer-accounts.js.map +1 -1
  68. package/dist/customers.d.ts +40 -73
  69. package/dist/customers.d.ts.map +1 -1
  70. package/dist/customers.js +45 -10
  71. package/dist/customers.js.map +1 -1
  72. package/dist/document-templates.d.ts +12 -12
  73. package/dist/errors.d.ts +119 -1
  74. package/dist/errors.d.ts.map +1 -1
  75. package/dist/errors.js +146 -1
  76. package/dist/errors.js.map +1 -1
  77. package/dist/forms-logic.d.ts +79 -0
  78. package/dist/forms-logic.d.ts.map +1 -0
  79. package/dist/forms-logic.fixtures.d.ts +52 -0
  80. package/dist/forms-logic.fixtures.d.ts.map +1 -0
  81. package/dist/forms-logic.fixtures.js +610 -0
  82. package/dist/forms-logic.fixtures.js.map +1 -0
  83. package/dist/forms-logic.js +699 -0
  84. package/dist/forms-logic.js.map +1 -0
  85. package/dist/forms.d.ts +9833 -0
  86. package/dist/forms.d.ts.map +1 -0
  87. package/dist/forms.js +827 -0
  88. package/dist/forms.js.map +1 -0
  89. package/dist/import-export.d.ts +180 -0
  90. package/dist/import-export.d.ts.map +1 -1
  91. package/dist/import-export.js +60 -0
  92. package/dist/import-export.js.map +1 -1
  93. package/dist/index.d.ts +10 -1
  94. package/dist/index.d.ts.map +1 -1
  95. package/dist/index.js +18 -0
  96. package/dist/index.js.map +1 -1
  97. package/dist/inventory.d.ts +9 -9
  98. package/dist/invoice-ledger.d.ts +7 -7
  99. package/dist/invoices.d.ts.map +1 -1
  100. package/dist/invoices.js +4 -0
  101. package/dist/invoices.js.map +1 -1
  102. package/dist/mfa.d.ts +124 -4
  103. package/dist/mfa.d.ts.map +1 -1
  104. package/dist/mfa.js +46 -0
  105. package/dist/mfa.js.map +1 -1
  106. package/dist/modules.d.ts +36 -4
  107. package/dist/modules.d.ts.map +1 -1
  108. package/dist/modules.js +68 -0
  109. package/dist/modules.js.map +1 -1
  110. package/dist/money-decimal.d.ts +54 -0
  111. package/dist/money-decimal.d.ts.map +1 -1
  112. package/dist/money-decimal.js +95 -0
  113. package/dist/money-decimal.js.map +1 -1
  114. package/dist/newsletter.d.ts +4 -4
  115. package/dist/orders.d.ts +105 -12
  116. package/dist/orders.d.ts.map +1 -1
  117. package/dist/orders.js +60 -4
  118. package/dist/orders.js.map +1 -1
  119. package/dist/organization-registry-lookup.d.ts +362 -0
  120. package/dist/organization-registry-lookup.d.ts.map +1 -0
  121. package/dist/organization-registry-lookup.js +196 -0
  122. package/dist/organization-registry-lookup.js.map +1 -0
  123. package/dist/organization-roles.d.ts +340 -0
  124. package/dist/organization-roles.d.ts.map +1 -0
  125. package/dist/organization-roles.js +211 -0
  126. package/dist/organization-roles.js.map +1 -0
  127. package/dist/organizations.d.ts +123 -89
  128. package/dist/organizations.d.ts.map +1 -1
  129. package/dist/organizations.js +68 -24
  130. package/dist/organizations.js.map +1 -1
  131. package/dist/page-builder-props.d.ts +56 -56
  132. package/dist/pim-connector.d.ts +7 -3
  133. package/dist/pim-connector.d.ts.map +1 -1
  134. package/dist/pim-connector.js +6 -2
  135. package/dist/pim-connector.js.map +1 -1
  136. package/dist/pim-field-path.d.ts +5 -1
  137. package/dist/pim-field-path.d.ts.map +1 -1
  138. package/dist/pim-field-path.js +37 -81
  139. package/dist/pim-field-path.js.map +1 -1
  140. package/dist/pim-locale-mapping.d.ts +131 -0
  141. package/dist/pim-locale-mapping.d.ts.map +1 -0
  142. package/dist/pim-locale-mapping.js +193 -0
  143. package/dist/pim-locale-mapping.js.map +1 -0
  144. package/dist/price-books.d.ts +67 -63
  145. package/dist/price-books.d.ts.map +1 -1
  146. package/dist/price-books.js +6 -2
  147. package/dist/price-books.js.map +1 -1
  148. package/dist/price-lists.d.ts +8 -8
  149. package/dist/product-feeds.d.ts +94 -94
  150. package/dist/product-feeds.d.ts.map +1 -1
  151. package/dist/product-feeds.js +5 -0
  152. package/dist/product-feeds.js.map +1 -1
  153. package/dist/product-scope-model.d.ts +161 -0
  154. package/dist/product-scope-model.d.ts.map +1 -0
  155. package/dist/product-scope-model.js +161 -0
  156. package/dist/product-scope-model.js.map +1 -0
  157. package/dist/product-scope-overrides.d.ts +0 -103
  158. package/dist/product-scope-overrides.d.ts.map +1 -1
  159. package/dist/product-scope-overrides.js +0 -54
  160. package/dist/product-scope-overrides.js.map +1 -1
  161. package/dist/product-scoped-values.d.ts +2610 -0
  162. package/dist/product-scoped-values.d.ts.map +1 -0
  163. package/dist/product-scoped-values.js +425 -0
  164. package/dist/product-scoped-values.js.map +1 -0
  165. package/dist/product-scopes.d.ts +182 -64
  166. package/dist/product-scopes.d.ts.map +1 -1
  167. package/dist/product-scopes.js +89 -18
  168. package/dist/product-scopes.js.map +1 -1
  169. package/dist/product-tax-rates.d.ts +38 -0
  170. package/dist/product-tax-rates.d.ts.map +1 -0
  171. package/dist/product-tax-rates.js +45 -0
  172. package/dist/product-tax-rates.js.map +1 -0
  173. package/dist/product-url-keys.d.ts +51 -45
  174. package/dist/product-url-keys.d.ts.map +1 -1
  175. package/dist/product-url-keys.js +73 -39
  176. package/dist/product-url-keys.js.map +1 -1
  177. package/dist/product-value-resolver.d.ts +37 -60
  178. package/dist/product-value-resolver.d.ts.map +1 -1
  179. package/dist/product-value-resolver.js +36 -96
  180. package/dist/product-value-resolver.js.map +1 -1
  181. package/dist/projects.d.ts +15 -0
  182. package/dist/projects.d.ts.map +1 -1
  183. package/dist/projects.js +6 -0
  184. package/dist/projects.js.map +1 -1
  185. package/dist/promotions.d.ts +10 -10
  186. package/dist/pwa.d.ts +2 -2
  187. package/dist/quick-order.d.ts +150 -6
  188. package/dist/quick-order.d.ts.map +1 -1
  189. package/dist/quick-order.js +75 -1
  190. package/dist/quick-order.js.map +1 -1
  191. package/dist/quote-requests.d.ts +63 -12
  192. package/dist/quote-requests.d.ts.map +1 -1
  193. package/dist/quote-requests.js +42 -1
  194. package/dist/quote-requests.js.map +1 -1
  195. package/dist/record-references.d.ts.map +1 -1
  196. package/dist/record-references.js +2 -3
  197. package/dist/record-references.js.map +1 -1
  198. package/dist/record-rich-text.d.ts.map +1 -1
  199. package/dist/record-rich-text.js +2 -1
  200. package/dist/record-rich-text.js.map +1 -1
  201. package/dist/returns.d.ts +208 -52
  202. package/dist/returns.d.ts.map +1 -1
  203. package/dist/returns.js +139 -26
  204. package/dist/returns.js.map +1 -1
  205. package/dist/saved-list-views.d.ts +28 -0
  206. package/dist/saved-list-views.d.ts.map +1 -1
  207. package/dist/saved-list-views.js +14 -1
  208. package/dist/saved-list-views.js.map +1 -1
  209. package/dist/scoped-write-encoding.d.ts +100 -0
  210. package/dist/scoped-write-encoding.d.ts.map +1 -0
  211. package/dist/scoped-write-encoding.js +135 -0
  212. package/dist/scoped-write-encoding.js.map +1 -0
  213. package/dist/search.d.ts +18 -16
  214. package/dist/search.d.ts.map +1 -1
  215. package/dist/seo.d.ts +81 -28
  216. package/dist/seo.d.ts.map +1 -1
  217. package/dist/seo.js +8 -1
  218. package/dist/seo.js.map +1 -1
  219. package/dist/settings.d.ts +129 -0
  220. package/dist/settings.d.ts.map +1 -1
  221. package/dist/settings.js +36 -0
  222. package/dist/settings.js.map +1 -1
  223. package/dist/shopping-lists.d.ts +24 -3
  224. package/dist/shopping-lists.d.ts.map +1 -1
  225. package/dist/shopping-lists.js +20 -0
  226. package/dist/shopping-lists.js.map +1 -1
  227. package/dist/storefront-cache-tags.d.ts +12 -0
  228. package/dist/storefront-cache-tags.d.ts.map +1 -1
  229. package/dist/storefront-cache-tags.js +12 -0
  230. package/dist/storefront-cache-tags.js.map +1 -1
  231. package/dist/storefront-value-overrides.d.ts +18 -56
  232. package/dist/storefront-value-overrides.d.ts.map +1 -1
  233. package/dist/storefront-value-overrides.js +11 -86
  234. package/dist/storefront-value-overrides.js.map +1 -1
  235. package/dist/tasks.d.ts +6 -6
  236. package/dist/transactional-emails.d.ts +9 -9
  237. package/package.json +2 -2
  238. package/dist/scoped-translations.d.ts +0 -48
  239. package/dist/scoped-translations.d.ts.map +0 -1
  240. package/dist/scoped-translations.js +0 -78
  241. package/dist/scoped-translations.js.map +0 -1
@@ -17,6 +17,14 @@
17
17
  * Nothing here imports from `backend/src/` (FR-034).
18
18
  */
19
19
  import { z } from 'zod';
20
+ export declare const CUSTOMER_ACCOUNT_ANONYMIZED_EVENT = "customer_account.anonymized.v1";
21
+ export declare const CustomerAccountAnonymizedEventV1Schema: z.ZodObject<{
22
+ eventId: z.ZodString;
23
+ occurredAt: z.ZodString;
24
+ customerAccountId: z.ZodString;
25
+ organizationId: z.ZodString;
26
+ }, z.core.$strict>;
27
+ export type CustomerAccountAnonymizedEventV1 = z.infer<typeof CustomerAccountAnonymizedEventV1Schema>;
20
28
  export declare const customerGroupSchema: z.ZodObject<{
21
29
  id: z.ZodString;
22
30
  code: z.ZodString;
@@ -60,8 +68,20 @@ export interface CustomerGroupReadPort {
60
68
  /** Every group, ordered by code. */
61
69
  listAll(): Promise<CustomerGroupRecord[]>;
62
70
  }
63
- export type CustomerAccountRole = 'organization_admin' | 'regular_user';
64
71
  export type CustomerAccountBlockSource = 'staff' | 'org_owner';
72
+ /**
73
+ * The codes a redacted `customer_account` audit row keeps (issue #844).
74
+ *
75
+ * Owner: `customer_accounts`; **codes only**. When an anonymised subject's
76
+ * audit history is erased, the platform's rule keeps ids, timestamps, booleans
77
+ * and a few global code keys, and erases every other value. These are the keys
78
+ * this module's audit snapshots record a *code* under that the rule would not
79
+ * otherwise keep — `blockSource` (`staff` / `org_owner`) and `via` (how a
80
+ * password was changed: `reset_token` / `self_service`). A value under one of
81
+ * them is still erased unless it has a code's shape. Adding a key here keeps it
82
+ * in every erased history, so add a key only when its values are codes.
83
+ */
84
+ export declare const CUSTOMER_ACCOUNT_AUDIT_KEEP_KEYS: readonly string[];
65
85
  /**
66
86
  * A customer account as it crosses a module boundary — a plain shape, never
67
87
  * the ORM entity (FR-011).
@@ -82,7 +102,12 @@ export interface CustomerAccountRecord {
82
102
  email: string;
83
103
  firstName: string;
84
104
  lastName: string;
85
- role: CustomerAccountRole;
105
+ /**
106
+ * The organization role the account holds — a role of {@link organizationId}
107
+ * (`specs/170-organization-roles/` data-model §2; a composite foreign key in
108
+ * the database). Never `null`: every account holds exactly one.
109
+ */
110
+ organizationRoleId: string;
86
111
  emailVerifiedAt: Date | null;
87
112
  /** Whether a confirmed TOTP enrolment exists. The secret itself never travels. */
88
113
  twoFactorEnabled: boolean;
@@ -138,15 +163,20 @@ export interface CustomerAccountReadPort {
138
163
  * forgotten.
139
164
  */
140
165
  findInOrganization(id: string, organizationId: string, options?: CustomerAccountLookupOptions): Promise<CustomerAccountRecord | null>;
141
- /** Members of an organisation, ordered by role then creation date. */
166
+ /** Members of an organisation: its *Administrator* holders first, then by creation date. */
142
167
  listByOrganization(organizationId: string, options?: CustomerAccountLookupOptions): Promise<CustomerAccountRecord[]>;
143
168
  /**
144
- * How many accounts in the organisation hold the role, optionally ignoring
145
- * one id and optionally counting only unblocked accounts. This is the shape
146
- * the "an organisation may not lose its last admin" rule is spelled with, in
147
- * three modules, three slightly different ways.
169
+ * How many accounts of the organisation hold its *Administrator* role — the
170
+ * predicate the "an organisation keeps at least one administrator" rule is
171
+ * spelled with since `specs/170-organization-roles/`
172
+ * (`contracts/commands-audit-events.md` §3): optionally ignoring one id, and
173
+ * optionally counting only active or only unblocked accounts.
174
+ *
175
+ * A count, not a guard: it takes no lock. The member Commands that must not
176
+ * race (`customer_account.change_role`, `customer_account.remove_member`)
177
+ * lock the holders themselves before counting.
148
178
  */
149
- countByOrganizationRole(organizationId: string, role: CustomerAccountRole, options?: {
179
+ countAdministrators(organizationId: string, options?: {
150
180
  excludeCustomerAccountId?: string;
151
181
  activeOnly?: boolean;
152
182
  notBlocked?: boolean;
@@ -196,7 +226,12 @@ export interface CustomerAccountCreateInput {
196
226
  password: string;
197
227
  firstName: string;
198
228
  lastName: string;
199
- role: CustomerAccountRole;
229
+ /**
230
+ * The organization role the account will hold, a role of
231
+ * {@link organizationId}. Required: no production path relies on the
232
+ * database's default (research R-28).
233
+ */
234
+ organizationRoleId: string;
200
235
  /**
201
236
  * Whether the address is already confirmed. Accepting an invitation implies
202
237
  * it — the invitation was delivered to that address; self-registration and
@@ -238,7 +273,7 @@ export interface CustomerAccountProfilePatch {
238
273
  * organisation panel" rather than "this account's e-mail changed" — and both
239
274
  * are kept, which is what the role endpoint has always recorded.
240
275
  *
241
- * `changeRole` is **not** here: {@link CustomerRolePort} already owns it, with
276
+ * A role change is **not** here: {@link CustomerAccountRoleCommandPort} owns it, with
242
277
  * the "an organisation keeps at least one admin" guard.
243
278
  * {@link CustomerAccountMemberWritePort.promoteToOrganizationAdmin} is a
244
279
  * different question — the break-glass path an operator reaches *because* an
@@ -275,8 +310,12 @@ export interface CustomerAccountMemberWritePort {
275
310
  * Feature 051 — binds an org-less account to the organisation just
276
311
  * provisioned for it. Throws HTTP 404 `NOT_FOUND` when no account has that
277
312
  * id.
313
+ *
314
+ * `organizationRoleId` is a role **of `organizationId`**, written in the same
315
+ * statement: the composite foreign key refuses the previous Organization's
316
+ * role (`specs/170-organization-roles/` data-model §2, research R-34).
278
317
  */
279
- attachToOrganization(customerAccountId: string, organizationId: string): Promise<CustomerAccountRecord>;
318
+ attachToOrganization(customerAccountId: string, organizationId: string, organizationRoleId: string): Promise<CustomerAccountRecord>;
280
319
  }
281
320
  /** What a caller sets the session cookie from after a successful first factor. */
282
321
  export interface CustomerLoginResult {
@@ -546,9 +585,87 @@ export interface CustomerRollupScopePort {
546
585
  */
547
586
  export interface CustomerRolePort {
548
587
  listMembers(organizationId: string): Promise<CustomerAccountRecord[]>;
549
- changeRole(organizationId: string, targetCustomerAccountId: string, newRole: CustomerAccountRole): Promise<CustomerAccountRecord>;
550
588
  removeMember(organizationId: string, targetCustomerAccountId: string): Promise<void>;
551
589
  }
590
+ /**
591
+ * Announced on commit whenever an account's organization role changes —
592
+ * `customer_account.change_role` (also as a child of `organization_role.delete`)
593
+ * and `customer_account.promote_organization_admin` (data-model §7). `carts`
594
+ * resets the approval state of a member who gained
595
+ * `carts.order_without_approval` from it (FR-034).
596
+ */
597
+ export declare const CUSTOMER_ACCOUNT_ORGANIZATION_ROLE_CHANGED_EVENT: "customer_account.organization_role_changed.v1";
598
+ export interface CustomerAccountOrganizationRoleChangedEventV1 {
599
+ readonly eventId: string;
600
+ readonly occurredAt: string;
601
+ readonly organizationId: string;
602
+ readonly customerAccountId: string;
603
+ readonly fromRoleId: string;
604
+ readonly toRoleId: string;
605
+ }
606
+ /** `customer_account.change_role`'s input: the member and the role of its own Organization it moves to. */
607
+ export interface CustomerAccountRoleChangeInput {
608
+ readonly organizationId: string;
609
+ readonly customerAccountId: string;
610
+ readonly roleId: string;
611
+ /**
612
+ * Also move a **removed** (soft-deleted) member. Only the reassignment of a
613
+ * deleted role's holders asks for it: the foreign key counts removed accounts
614
+ * as holders, so they must move too. Every other caller leaves it unset, and a
615
+ * removed member answers `404` as an unknown one does.
616
+ */
617
+ readonly includeRemoved?: boolean;
618
+ }
619
+ /** What `customer_account.change_role` answers. `fromRoleId === toRoleId` when nothing changed. */
620
+ export interface CustomerAccountRoleChangeResult {
621
+ readonly organizationId: string;
622
+ readonly customerAccountId: string;
623
+ readonly fromRoleId: string;
624
+ readonly toRoleId: string;
625
+ }
626
+ /**
627
+ * A Command as the platform's Command Bus runs it, named structurally because
628
+ * this package depends on no platform code and may name no `EntityManager`.
629
+ * The platform's `Command<TResult>` is assignable to it and it to that, so a
630
+ * caller hands it to `commandBus.run` or, as a child, to `ctx.run` unchanged.
631
+ * Its `run` belongs to the bus; a caller never invokes it.
632
+ */
633
+ export interface CustomerAccountRoleChangeCommand {
634
+ readonly action: string;
635
+ readonly objectType: string;
636
+ readonly objectId: string;
637
+ run(ctx: never): Promise<{
638
+ readonly result: CustomerAccountRoleChangeResult;
639
+ }>;
640
+ }
641
+ /**
642
+ * Container name: `customerAccountRoleCommandPort`. Owner: `customer_accounts`.
643
+ *
644
+ * The role assignment as a **Command factory** (`specs/170-organization-roles/`
645
+ * `contracts/commands-audit-events.md` §2; research R-22): `organizations`
646
+ * deletes a held role by running one `changeRole` Command per holder as a
647
+ * **child** of `organization_role.delete`, through `ctx.run` — on the parent's
648
+ * transaction, each with its own audit entry, all committing or none. No
649
+ * `EntityManager` crosses: the child runs on the one the bus hands it.
650
+ *
651
+ * `changeRole` refuses `404 NOT_FOUND` for an account that is not a live member
652
+ * of the Organization or a role the Organization does not have, and `409
653
+ * CANNOT_DEMOTE_LAST_ADMIN` when it would leave the Organization without an
654
+ * active administrator — counted under a `for update` lock on the holders
655
+ * (research R-29).
656
+ *
657
+ * `holdersOf` lists every account holding the role — blocked and soft-deleted
658
+ * ones included, because the foreign key does not distinguish them.
659
+ *
660
+ * **Owner off:** the seam fails closed — resolving this port throws
661
+ * `ModuleDisabledError` and the call answers 503 `MODULE_DISABLED`. Whether
662
+ * `customer_accounts` has an off state at all is its manifest's `activation` to
663
+ * say, not this line's: a module declaring `nonDeactivatable` never enters one.
664
+ */
665
+ export interface CustomerAccountRoleCommandPort {
666
+ changeRole(input: CustomerAccountRoleChangeInput): CustomerAccountRoleChangeCommand;
667
+ holdersOf(organizationId: string, roleId: string): Promise<string[]>;
668
+ }
552
669
  /**
553
670
  * A standalone (org-less) self-registration, as `customers` asks for one.
554
671
  *
@@ -584,6 +701,21 @@ export interface CustomerAccountWriteRequestMeta {
584
701
  userAgent?: string | null;
585
702
  requestId?: string | null;
586
703
  }
704
+ /**
705
+ * Who moves an account between Organizations, and the role it holds there
706
+ * (`specs/170-organization-roles/` research R-34).
707
+ *
708
+ * `organizationRoleId` is a role of the **destination** Organization and is
709
+ * written in the same statement as the Organization: the composite foreign key
710
+ * refuses the previous Organization's role. The caller resolves it — the
711
+ * destination's *Administrator* for a personal Organization (from the
712
+ * provisioning answer), else the destination's predefined role of the kind the
713
+ * account held (owner ruling PR-11).
714
+ */
715
+ export interface CustomerAccountOrganizationMoveInput {
716
+ actorAdminUserId: string;
717
+ organizationRoleId: string;
718
+ }
587
719
  /** Which lifecycle bucket the admin customer list is asking for. */
588
720
  export type CustomerAccountLifecycleStatus = 'active' | 'blocked' | 'deleted';
589
721
  /**
@@ -669,7 +801,7 @@ export interface CustomerAccountAdminSearchPort {
669
801
  * staff member may act on this customer, and whether blocking them would
670
802
  * strand an organisation without an administrator, are `customers`' questions
671
803
  * and stay there — the counting half of the second one is
672
- * {@link CustomerAccountReadPort.countByOrganizationRole}, which already
804
+ * {@link CustomerAccountReadPort.countAdministrators}, which already
673
805
  * exists. What moves is the write and the one audit row that describes it, so
674
806
  * that a row on this table is never written by a module that does not own it
675
807
  * and never written without being recorded. Unlike
@@ -737,9 +869,7 @@ export interface CustomerAccountLifecycleWritePort {
737
869
  * refuses at the column. What an operator detaching a member actually wants
738
870
  * is {@link detachToPersonalOrganization} below.
739
871
  */
740
- setOrganization(customerAccountId: string, organizationId: string, input: {
741
- actorAdminUserId: string;
742
- }): Promise<CustomerAccountRecord>;
872
+ setOrganization(customerAccountId: string, organizationId: string, input: CustomerAccountOrganizationMoveInput): Promise<CustomerAccountRecord>;
743
873
  /**
744
874
  * D-178 — the operator's "this person no longer belongs to that company",
745
875
  * expressed as the move it has to be rather than as the detach it used to be.
@@ -753,9 +883,7 @@ export interface CustomerAccountLifecycleWritePort {
753
883
  * the verb an operator's history already reads, now describing what really
754
884
  * happened.
755
885
  */
756
- detachToPersonalOrganization(customerAccountId: string, personalOrganizationId: string, input: {
757
- actorAdminUserId: string;
758
- }): Promise<CustomerAccountRecord>;
886
+ detachToPersonalOrganization(customerAccountId: string, personalOrganizationId: string, input: CustomerAccountOrganizationMoveInput): Promise<CustomerAccountRecord>;
759
887
  /** `null` clears the direct group; the organisation's own group still applies. */
760
888
  setCustomerGroup(customerAccountId: string, customerGroupId: string | null, input: {
761
889
  actorAdminUserId: string;
@@ -778,13 +906,49 @@ export interface CustomerAccountLifecycleWritePort {
778
906
  setCustomFieldValues(customerAccountId: string, merge: (current: Record<string, unknown>) => Promise<Record<string, unknown>>): Promise<CustomerAccountRecord>;
779
907
  /**
780
908
  * Soft-deleted accounts whose retention window elapsed before `cutoff` and
781
- * that have not been anonymised yet — the sweep's work list.
909
+ * that have not been anonymised yet — the sweep's work list. It also lists,
910
+ * whatever the cutoff, an anonymised account that an earlier scrub left a
911
+ * block reason (before issue #843) or custom field values (before #802) on,
912
+ * until {@link anonymize} has finished it.
782
913
  */
783
914
  listDueForAnonymization(cutoff: Date): Promise<CustomerAccountRecord[]>;
915
+ /**
916
+ * Whether {@link listDueForAnonymization} at `cutoff` would list anything —
917
+ * **yes or no, and nothing else** (issue #857).
918
+ *
919
+ * The sweep's scheduled tick asks this with no tenant context, before it
920
+ * enters the system scope, so that a tick with no account due writes no
921
+ * `tenant.escape_hatch` audit row. It is the work list's own predicate, so
922
+ * `false` means the sweep would anonymise nobody. No id, row or count of any
923
+ * account leaves it.
924
+ */
925
+ hasDueForAnonymization(cutoff: Date): Promise<boolean>;
784
926
  /**
785
927
  * Irreversibly scrubs the account's personal data. Returns the account
786
- * unchanged when it was already anonymised, and throws HTTP 404
787
- * `CUSTOMER_NOT_FOUND` for an id nothing matches.
928
+ * unchanged when it was already fully anonymised, and throws HTTP 404
929
+ * `CUSTOMER_NOT_FOUND` for an id nothing matches. The row is locked before
930
+ * `anonymizedAt` is read (issue #857), so two concurrent calls for one
931
+ * account scrub, audit and announce it once.
932
+ *
933
+ * It is the anonymisation cascade's **last** write (issue #800): the
934
+ * `anonymizedAt` it stamps is what takes the account off
935
+ * {@link listDueForAnonymization}, so it is the commit marker for the
936
+ * organisation and address scrubs that run before it.
937
+ *
938
+ * The scrub clears the e-mail, both names, the credentials, **every**
939
+ * custom field value and the operator's block reason (issue #843; the block
940
+ * itself stays), and commits in one transaction with its
941
+ * `customer_account.anonymized` audit row, which records none of the erased
942
+ * data (issue #802). `customer_account.anonymized.v1` is announced after
943
+ * that commit, only on the transition.
944
+ *
945
+ * An account an earlier scrub left a block reason or custom field values on
946
+ * is finished once: those are cleared, `anonymizedAt` is kept, and one more
947
+ * `customer_account.anonymized` row is written, with no second announcement.
948
+ * The rows tell the two apart by `stateBefore.anonymizedAt`: `null` on the
949
+ * first scrub, the original ISO timestamp on a finish. On both,
950
+ * `stateBefore` is `{ anonymizedAt, customFieldKeys, hadBlockReason }` and
951
+ * `stateAfter.anonymizedAt` is the time of the first scrub.
788
952
  */
789
953
  anonymize(customerAccountId: string): Promise<CustomerAccountRecord>;
790
954
  }
@@ -1 +1 @@
1
- {"version":3,"file":"customer-accounts.d.ts","sourceRoot":"","sources":["../src/customer-accounts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,mBAAmB;;;;;;;iBAO9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,gCAAgC;;;;iBAI3C,CAAC;AAEH,6EAA6E;AAC7E,MAAM,WAAW,mBAAmB;IAClC,EAAE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AAO,CAAC,qBAAqB,EAAE,CAAC,CAAC;IAExE;;;;;;;;;OASG;IACH,sBAAsB,CAAC,MAAM,EAAE,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,SAAS,CAAC,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;CACtE;AAID;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAC9C,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE;QAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;IACtF,YAAY,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;CACvE,GAAG,MAAM,GAAG,IAAI,CAQhB"}
@@ -18,6 +18,23 @@
18
18
  */
19
19
  import { z } from 'zod';
20
20
  import { isoDateTimeSchema, uuidSchema } from './common.js';
21
+ // --- the anonymisation event ---------------------------------------------------
22
+ //
23
+ // `specs/170-forms-module/` research R-17, contracts/events-and-webhook.md §3.
24
+ // `CustomerAccountLifecycleWritePort.anonymize` announces the irreversible step
25
+ // once, after its write and its audit row, so a module holding data attributed
26
+ // to the account can erase it within the same sweep step. Ids only: the account
27
+ // has just been scrubbed, and the event says which one, never what it held. Not
28
+ // offered to outbound webhooks.
29
+ export const CUSTOMER_ACCOUNT_ANONYMIZED_EVENT = 'customer_account.anonymized.v1';
30
+ export const CustomerAccountAnonymizedEventV1Schema = z
31
+ .object({
32
+ eventId: z.string().min(1),
33
+ occurredAt: isoDateTimeSchema,
34
+ customerAccountId: z.string().uuid(),
35
+ organizationId: z.string().uuid(),
36
+ })
37
+ .strict();
21
38
  // --- customer groups ---------------------------------------------------------
22
39
  //
23
40
  // Feature 076, D-79 — the segmentation bucket a customer belongs to. It used to
@@ -38,6 +55,28 @@ export const upsertCustomerGroupRequestSchema = z.object({
38
55
  name: z.string().min(1).max(160),
39
56
  description: z.string().max(1000).nullable().optional(),
40
57
  });
58
+ /**
59
+ * The codes a redacted `customer_account` audit row keeps (issue #844).
60
+ *
61
+ * Owner: `customer_accounts`; **codes only**. When an anonymised subject's
62
+ * audit history is erased, the platform's rule keeps ids, timestamps, booleans
63
+ * and a few global code keys, and erases every other value. These are the keys
64
+ * this module's audit snapshots record a *code* under that the rule would not
65
+ * otherwise keep — `blockSource` (`staff` / `org_owner`) and `via` (how a
66
+ * password was changed: `reset_token` / `self_service`). A value under one of
67
+ * them is still erased unless it has a code's shape. Adding a key here keeps it
68
+ * in every erased history, so add a key only when its values are codes.
69
+ */
70
+ export const CUSTOMER_ACCOUNT_AUDIT_KEEP_KEYS = ['blockSource', 'via'];
71
+ // --- organization role assignment (`specs/170-organization-roles/`) -----------
72
+ /**
73
+ * Announced on commit whenever an account's organization role changes —
74
+ * `customer_account.change_role` (also as a child of `organization_role.delete`)
75
+ * and `customer_account.promote_organization_admin` (data-model §7). `carts`
76
+ * resets the approval state of a member who gained
77
+ * `carts.order_without_approval` from it (FR-034).
78
+ */
79
+ export const CUSTOMER_ACCOUNT_ORGANIZATION_ROLE_CHANGED_EVENT = 'customer_account.organization_role_changed.v1';
41
80
  // --- effective customer group ------------------------------------------------
42
81
  /**
43
82
  * D-287 P0 — the one customer-group rule every pricing path applies, and the
@@ -1 +1 @@
1
- {"version":3,"file":"customer-accounts.js","sourceRoot":"","sources":["../src/customer-accounts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE5D,gFAA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CAAC,KAAK,CAAC,YAAY,EAAE,EAAE,IAAI,IAAI,CAAC,EAAE,CAAC;QACjF,IAAI,QAAQ,CAAC,eAAe;YAAE,OAAO,QAAQ,CAAC,eAAe,CAAC;IAChE,CAAC;IACD,OAAO,YAAY,EAAE,eAAe,IAAI,IAAI,CAAC;AAC/C,CAAC"}
@@ -18,26 +18,22 @@ export declare const customerBlockSourceSchema: z.ZodEnum<{
18
18
  org_owner: "org_owner";
19
19
  }>;
20
20
  export type CustomerBlockSource = z.infer<typeof customerBlockSourceSchema>;
21
+ /**
22
+ * The codes a redacted `customer_address` audit row keeps (issue #844) — the
23
+ * legacy personal address book's rows (`specs/173-b2c-address-book-merge/`).
24
+ *
25
+ * Owner: `customers`; **codes only** — see `CUSTOMER_ACCOUNT_AUDIT_KEEP_KEYS`
26
+ * for the rule they extend. `mergeRefusal` is the code a refused merge into the
27
+ * Organization book records; `countryCode` is kept as the address scrub keeps
28
+ * the country.
29
+ */
30
+ export declare const CUSTOMER_ADDRESS_AUDIT_KEEP_KEYS: readonly string[];
21
31
  export declare const customerLifecycleStatusSchema: z.ZodEnum<{
22
32
  active: "active";
23
- blocked: "blocked";
24
33
  deleted: "deleted";
34
+ blocked: "blocked";
25
35
  }>;
26
36
  export type CustomerLifecycleStatus = z.infer<typeof customerLifecycleStatusSchema>;
27
- export declare const customerAddressInputSchema: z.ZodObject<{
28
- kind: z.ZodEnum<{
29
- delivery: "delivery";
30
- billing: "billing";
31
- }>;
32
- recipientName: z.ZodString;
33
- street: z.ZodString;
34
- city: z.ZodString;
35
- postalCode: z.ZodString;
36
- country: z.ZodString;
37
- phone: z.ZodOptional<z.ZodString>;
38
- isDefault: z.ZodOptional<z.ZodBoolean>;
39
- }, z.core.$strip>;
40
- export type CustomerAddressInput = z.infer<typeof customerAddressInputSchema>;
41
37
  export declare const customerAddressSchema: z.ZodObject<{
42
38
  id: z.ZodString;
43
39
  customerAccountId: z.ZodString;
@@ -54,6 +50,7 @@ export declare const customerAddressSchema: z.ZodObject<{
54
50
  isDefault: z.ZodBoolean;
55
51
  createdAt: z.ZodString;
56
52
  updatedAt: z.ZodString;
53
+ mergeRefusal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
57
54
  }, z.core.$strip>;
58
55
  export type CustomerAddress = z.infer<typeof customerAddressSchema>;
59
56
  /**
@@ -76,6 +73,11 @@ export declare const organizationAddressRefSchema: z.ZodObject<{
76
73
  isDefault: z.ZodBoolean;
77
74
  }, z.core.$strip>;
78
75
  export type OrganizationAddressRef = z.infer<typeof organizationAddressRefSchema>;
76
+ /**
77
+ * `GET /api/v1/admin/customers/:id/addresses` — the admin card (OD-6): the
78
+ * customer's Organization book, read-only, and under `personal` only the
79
+ * personal-book rows the retirement job refused, each with its `mergeRefusal`.
80
+ */
79
81
  export declare const customerAddressBookSchema: z.ZodObject<{
80
82
  personal: z.ZodArray<z.ZodObject<{
81
83
  id: z.ZodString;
@@ -93,6 +95,7 @@ export declare const customerAddressBookSchema: z.ZodObject<{
93
95
  isDefault: z.ZodBoolean;
94
96
  createdAt: z.ZodString;
95
97
  updatedAt: z.ZodString;
98
+ mergeRefusal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
96
99
  }, z.core.$strip>>;
97
100
  organization: z.ZodArray<z.ZodObject<{
98
101
  id: z.ZodString;
@@ -133,6 +136,18 @@ export declare const customerRegisterRequestSchema: z.ZodObject<{
133
136
  acceptedTermsVersion: z.ZodString;
134
137
  }, z.core.$strip>;
135
138
  export type CustomerRegisterRequest = z.infer<typeof customerRegisterRequestSchema>;
139
+ /**
140
+ * `GET /api/v1/storefront/settings/customer-registration` — whether the
141
+ * storefront may offer individual (org-less) self-registration (issue #756).
142
+ * It is the answer `POST /api/v1/customers/register` applies, read before the
143
+ * form is rendered rather than after it is submitted.
144
+ */
145
+ export declare const customerRegistrationOptionsResponseSchema: z.ZodObject<{
146
+ data: z.ZodObject<{
147
+ allowRegistrationWithoutOrganization: z.ZodBoolean;
148
+ }, z.core.$strip>;
149
+ }, z.core.$strip>;
150
+ export type CustomerRegistrationOptionsResponse = z.infer<typeof customerRegistrationOptionsResponseSchema>;
136
151
  export declare const customerSelfProfileSchema: z.ZodObject<{
137
152
  id: z.ZodString;
138
153
  email: z.ZodString;
@@ -141,6 +156,16 @@ export declare const customerSelfProfileSchema: z.ZodObject<{
141
156
  organizationId: z.ZodNullable<z.ZodString>;
142
157
  customerGroupId: z.ZodNullable<z.ZodString>;
143
158
  twoFactorEnabled: z.ZodBoolean;
159
+ organizationRole: z.ZodObject<{
160
+ id: z.ZodString;
161
+ name: z.ZodString;
162
+ kind: z.ZodEnum<{
163
+ custom: "custom";
164
+ administrator: "administrator";
165
+ member: "member";
166
+ }>;
167
+ }, z.core.$strict>;
168
+ permissions: z.ZodArray<z.ZodString>;
144
169
  }, z.core.$strip>;
145
170
  export type CustomerSelfProfile = z.infer<typeof customerSelfProfileSchema>;
146
171
  export declare const adminCustomerListItemSchema: z.ZodObject<{
@@ -244,62 +269,4 @@ export declare const onlineCustomerSchema: z.ZodObject<{
244
269
  lastSeenAt: z.ZodString;
245
270
  }, z.core.$strip>;
246
271
  export type OnlineCustomer = z.infer<typeof onlineCustomerSchema>;
247
- /**
248
- * A customer's own saved address — never the ORM entity (FR-011).
249
- *
250
- * Distinct from `AddressRecord` in `addresses.ts`, and the difference is the
251
- * key: this one hangs off a **customer account**, that one off an
252
- * **organisation**. Both tables exist because a B2C buyer keeps addresses that
253
- * are theirs rather than their personal organisation's, and merging the two
254
- * shapes here would hide which of the two a caller is holding.
255
- */
256
- export interface CustomerAddressRecord {
257
- id: string;
258
- customerAccountId: string;
259
- kind: 'delivery' | 'billing';
260
- recipientName: string;
261
- street: string;
262
- city: string;
263
- postalCode: string;
264
- country: string;
265
- phone: string | null;
266
- isDefault: boolean;
267
- createdAt: Date;
268
- updatedAt: Date;
269
- deletedAt: Date | null;
270
- }
271
- /**
272
- * Container name: `customerAddressReadPort`. Owner: `customers`.
273
- *
274
- * `findById` is scoped by customer account for the reason its organisation
275
- * twin gives: every caller already knows whose address it is asking for, and
276
- * one query is what stops the ownership check being forgotten.
277
- *
278
- * **`liveOnly` defaults to `false`: `findById` returns a soft-deleted address.**
279
- * Same split as {@link AddressReadPort} — the by-id lookup resolves an id
280
- * something else already stored, so it answers with the row it finds;
281
- * `listForCustomer` is choosing an address to use *now*, so it filters
282
- * `deletedAt: null` unconditionally and takes no flag.
283
- *
284
- * The intended consumer is `quick_order`'s one-click default eligibility check,
285
- * which today spells the rule itself:
286
- * `personal != null && !personal.deletedAt && personal.customerAccountId === customerAccountId`
287
- * (`quick_order/services/default-preference-service.ts`). Two of those three
288
- * conjuncts do become redundant against this port; **`!personal.deletedAt` does
289
- * not**. Dropping it with the others makes deleted addresses eligible one-click
290
- * shipping defaults, so a cut passes `{ liveOnly: true }` (Phase-P
291
- * unreached-port audit, A8).
292
- *
293
- * **Owner off:** the seam fails closed — resolving this port throws
294
- * `ModuleDisabledError` and the call answers 503 `MODULE_DISABLED`, so nothing
295
- * half-executes. Whether `customers` has an off state at all is its manifest's
296
- * `activation` to say, not this line's: a module declaring
297
- * `nonDeactivatable` never enters one.
298
- */
299
- export interface CustomerAddressReadPort {
300
- findById(customerAccountId: string, addressId: string, options?: {
301
- liveOnly?: boolean;
302
- }): Promise<CustomerAddressRecord | null>;
303
- listForCustomer(customerAccountId: string, kind?: 'delivery' | 'billing'): Promise<CustomerAddressRecord[]>;
304
- }
305
272
  //# sourceMappingURL=customers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"customers.d.ts","sourceRoot":"","sources":["../src/customers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;GAQG;AAIH,eAAO,MAAM,yBAAyB;;;EAAkC,CAAC;AACzE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,yBAAyB;;;EAAiC,CAAC;AACxE,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