@endora-commerce/contracts 0.108.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.
- package/dist/actor.d.ts +16 -0
- package/dist/actor.d.ts.map +1 -1
- package/dist/addresses.d.ts +35 -0
- package/dist/addresses.d.ts.map +1 -1
- package/dist/addresses.js +8 -1
- package/dist/addresses.js.map +1 -1
- package/dist/admin-actions.d.ts +12 -3
- package/dist/admin-actions.d.ts.map +1 -1
- package/dist/admin-actions.js +34 -3
- package/dist/admin-actions.js.map +1 -1
- package/dist/admin-contributions.d.ts +94 -10
- package/dist/admin-contributions.d.ts.map +1 -1
- package/dist/admin-contributions.js +65 -0
- package/dist/admin-contributions.js.map +1 -1
- package/dist/admin-notifications.d.ts +17 -1
- package/dist/admin-notifications.d.ts.map +1 -1
- package/dist/admin-preferences.d.ts +108 -0
- package/dist/admin-preferences.d.ts.map +1 -0
- package/dist/admin-preferences.js +133 -0
- package/dist/admin-preferences.js.map +1 -0
- package/dist/admin-roles.d.ts +8 -2
- package/dist/admin-roles.d.ts.map +1 -1
- package/dist/admin-roles.js.map +1 -1
- package/dist/admin-users.d.ts +9 -0
- package/dist/admin-users.d.ts.map +1 -1
- package/dist/admin.d.ts +92 -5
- package/dist/admin.d.ts.map +1 -1
- package/dist/admin.js +86 -3
- package/dist/admin.js.map +1 -1
- package/dist/assets-library.d.ts +123 -3
- package/dist/assets-library.d.ts.map +1 -1
- package/dist/assets-library.js +11 -3
- package/dist/assets-library.js.map +1 -1
- package/dist/audit-logs.d.ts +12 -0
- package/dist/audit-logs.d.ts.map +1 -1
- package/dist/audit-logs.js +12 -0
- package/dist/audit-logs.js.map +1 -1
- package/dist/blog.d.ts +431 -14
- package/dist/blog.d.ts.map +1 -1
- package/dist/blog.js +251 -7
- package/dist/blog.js.map +1 -1
- package/dist/carts.d.ts +507 -92
- package/dist/carts.d.ts.map +1 -1
- package/dist/carts.js +197 -21
- package/dist/carts.js.map +1 -1
- package/dist/catalog.d.ts +515 -144
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +356 -68
- package/dist/catalog.js.map +1 -1
- package/dist/cms-brand.d.ts +2233 -0
- package/dist/cms-brand.d.ts.map +1 -0
- package/dist/cms-brand.js +311 -0
- package/dist/cms-brand.js.map +1 -0
- package/dist/cms-contact-form.d.ts +55 -0
- package/dist/cms-contact-form.d.ts.map +1 -0
- package/dist/cms-contact-form.js +100 -0
- package/dist/cms-contact-form.js.map +1 -0
- package/dist/cms.d.ts +576 -17
- package/dist/cms.d.ts.map +1 -1
- package/dist/cms.js +251 -0
- package/dist/cms.js.map +1 -1
- package/dist/common.d.ts +23 -6
- package/dist/common.d.ts.map +1 -1
- package/dist/common.js +25 -2
- package/dist/common.js.map +1 -1
- package/dist/comparisons.d.ts +28 -21
- package/dist/comparisons.d.ts.map +1 -1
- package/dist/comparisons.js +2 -1
- package/dist/comparisons.js.map +1 -1
- package/dist/credit-limits.d.ts +1 -0
- package/dist/credit-limits.d.ts.map +1 -1
- package/dist/credit-limits.js +14 -0
- package/dist/credit-limits.js.map +1 -1
- package/dist/crm-rich-text.d.ts +10 -61
- package/dist/crm-rich-text.d.ts.map +1 -1
- package/dist/crm-rich-text.js +10 -300
- package/dist/crm-rich-text.js.map +1 -1
- package/dist/crm.d.ts +173 -115
- package/dist/crm.d.ts.map +1 -1
- package/dist/crm.js +35 -88
- package/dist/crm.js.map +1 -1
- package/dist/custom-fields.d.ts +54 -22
- package/dist/custom-fields.d.ts.map +1 -1
- package/dist/custom-fields.js +21 -1
- package/dist/custom-fields.js.map +1 -1
- package/dist/customer-accounts.d.ts +216 -22
- package/dist/customer-accounts.d.ts.map +1 -1
- package/dist/customer-accounts.js +70 -0
- package/dist/customer-accounts.js.map +1 -1
- package/dist/customers.d.ts +40 -73
- package/dist/customers.d.ts.map +1 -1
- package/dist/customers.js +45 -10
- package/dist/customers.js.map +1 -1
- package/dist/document-templates.d.ts +35 -23
- package/dist/document-templates.d.ts.map +1 -1
- package/dist/document-values.d.ts +8 -0
- package/dist/document-values.d.ts.map +1 -1
- package/dist/document-values.js +24 -6
- package/dist/document-values.js.map +1 -1
- package/dist/email.d.ts +5 -0
- package/dist/email.d.ts.map +1 -1
- package/dist/errors.d.ts +224 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +269 -1
- package/dist/errors.js.map +1 -1
- package/dist/forms-logic.d.ts +79 -0
- package/dist/forms-logic.d.ts.map +1 -0
- package/dist/forms-logic.fixtures.d.ts +52 -0
- package/dist/forms-logic.fixtures.d.ts.map +1 -0
- package/dist/forms-logic.fixtures.js +610 -0
- package/dist/forms-logic.fixtures.js.map +1 -0
- package/dist/forms-logic.js +699 -0
- package/dist/forms-logic.js.map +1 -0
- package/dist/forms.d.ts +9833 -0
- package/dist/forms.d.ts.map +1 -0
- package/dist/forms.js +827 -0
- package/dist/forms.js.map +1 -0
- package/dist/import-export.d.ts +180 -0
- package/dist/import-export.d.ts.map +1 -1
- package/dist/import-export.js +60 -0
- package/dist/import-export.js.map +1 -1
- package/dist/index.d.ts +22 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +45 -1
- package/dist/index.js.map +1 -1
- package/dist/inventory.d.ts +6 -6
- package/dist/invoice-ledger.d.ts +7 -7
- package/dist/invoices.d.ts +6 -2
- package/dist/invoices.d.ts.map +1 -1
- package/dist/invoices.js +7 -0
- package/dist/invoices.js.map +1 -1
- package/dist/megamenu.d.ts +674 -0
- package/dist/megamenu.d.ts.map +1 -1
- package/dist/megamenu.js +96 -3
- package/dist/megamenu.js.map +1 -1
- package/dist/mfa.d.ts +125 -4
- package/dist/mfa.d.ts.map +1 -1
- package/dist/mfa.js +54 -2
- package/dist/mfa.js.map +1 -1
- package/dist/modules.d.ts +44 -5
- package/dist/modules.d.ts.map +1 -1
- package/dist/modules.js +73 -0
- package/dist/modules.js.map +1 -1
- package/dist/money-decimal.d.ts +54 -0
- package/dist/money-decimal.d.ts.map +1 -1
- package/dist/money-decimal.js +95 -0
- package/dist/money-decimal.js.map +1 -1
- package/dist/newsletter.d.ts +7 -7
- package/dist/orders.d.ts +128 -10
- package/dist/orders.d.ts.map +1 -1
- package/dist/orders.js +74 -4
- package/dist/orders.js.map +1 -1
- package/dist/organization-registry-lookup.d.ts +362 -0
- package/dist/organization-registry-lookup.d.ts.map +1 -0
- package/dist/organization-registry-lookup.js +196 -0
- package/dist/organization-registry-lookup.js.map +1 -0
- package/dist/organization-roles.d.ts +340 -0
- package/dist/organization-roles.d.ts.map +1 -0
- package/dist/organization-roles.js +211 -0
- package/dist/organization-roles.js.map +1 -0
- package/dist/organizations.d.ts +123 -89
- package/dist/organizations.d.ts.map +1 -1
- package/dist/organizations.js +68 -24
- package/dist/organizations.js.map +1 -1
- package/dist/page-builder-props.d.ts +1401 -0
- package/dist/page-builder-props.d.ts.map +1 -0
- package/dist/page-builder-props.js +266 -0
- package/dist/page-builder-props.js.map +1 -0
- package/dist/page-builder-values.d.ts +95 -0
- package/dist/page-builder-values.d.ts.map +1 -0
- package/dist/page-builder-values.js +164 -0
- package/dist/page-builder-values.js.map +1 -0
- package/dist/pim-connector.d.ts +6 -2
- package/dist/pim-connector.d.ts.map +1 -1
- package/dist/pim-connector.js +6 -2
- package/dist/pim-connector.js.map +1 -1
- package/dist/pim-field-path.d.ts +5 -1
- package/dist/pim-field-path.d.ts.map +1 -1
- package/dist/pim-field-path.js +37 -81
- package/dist/pim-field-path.js.map +1 -1
- package/dist/pim-locale-mapping.d.ts +131 -0
- package/dist/pim-locale-mapping.d.ts.map +1 -0
- package/dist/pim-locale-mapping.js +193 -0
- package/dist/pim-locale-mapping.js.map +1 -0
- package/dist/platform-language.d.ts +9 -0
- package/dist/platform-language.d.ts.map +1 -1
- package/dist/platform-language.js +14 -0
- package/dist/platform-language.js.map +1 -1
- package/dist/price-books.d.ts +47 -43
- package/dist/price-books.d.ts.map +1 -1
- package/dist/price-books.js +6 -2
- package/dist/price-books.js.map +1 -1
- package/dist/price-lists.d.ts +48 -14
- package/dist/price-lists.d.ts.map +1 -1
- package/dist/price-lists.js +24 -1
- package/dist/price-lists.js.map +1 -1
- package/dist/product-feeds.d.ts +144 -84
- package/dist/product-feeds.d.ts.map +1 -1
- package/dist/product-feeds.js +23 -0
- package/dist/product-feeds.js.map +1 -1
- package/dist/product-scope-model.d.ts +161 -0
- package/dist/product-scope-model.d.ts.map +1 -0
- package/dist/product-scope-model.js +161 -0
- package/dist/product-scope-model.js.map +1 -0
- package/dist/product-scope-overrides.d.ts +0 -103
- package/dist/product-scope-overrides.d.ts.map +1 -1
- package/dist/product-scope-overrides.js +0 -54
- package/dist/product-scope-overrides.js.map +1 -1
- package/dist/product-scoped-values.d.ts +2610 -0
- package/dist/product-scoped-values.d.ts.map +1 -0
- package/dist/product-scoped-values.js +425 -0
- package/dist/product-scoped-values.js.map +1 -0
- package/dist/product-scopes.d.ts +746 -0
- package/dist/product-scopes.d.ts.map +1 -0
- package/dist/product-scopes.js +436 -0
- package/dist/product-scopes.js.map +1 -0
- package/dist/product-summary-text.d.ts +23 -0
- package/dist/product-summary-text.d.ts.map +1 -0
- package/dist/product-summary-text.js +64 -0
- package/dist/product-summary-text.js.map +1 -0
- package/dist/product-tax-rates.d.ts +38 -0
- package/dist/product-tax-rates.d.ts.map +1 -0
- package/dist/product-tax-rates.js +45 -0
- package/dist/product-tax-rates.js.map +1 -0
- package/dist/product-url-keys.d.ts +210 -0
- package/dist/product-url-keys.d.ts.map +1 -0
- package/dist/product-url-keys.js +200 -0
- package/dist/product-url-keys.js.map +1 -0
- package/dist/product-value-resolver.d.ts +37 -60
- package/dist/product-value-resolver.d.ts.map +1 -1
- package/dist/product-value-resolver.js +36 -96
- package/dist/product-value-resolver.js.map +1 -1
- package/dist/projects.d.ts +2370 -0
- package/dist/projects.d.ts.map +1 -0
- package/dist/projects.js +843 -0
- package/dist/projects.js.map +1 -0
- package/dist/promotions.d.ts +10 -10
- package/dist/prompt-actions.d.ts +19 -1
- package/dist/prompt-actions.d.ts.map +1 -1
- package/dist/prompt-actions.js +31 -2
- package/dist/prompt-actions.js.map +1 -1
- package/dist/pwa.d.ts +2 -2
- package/dist/quick-order.d.ts +150 -7
- package/dist/quick-order.d.ts.map +1 -1
- package/dist/quick-order.js +76 -2
- package/dist/quick-order.js.map +1 -1
- package/dist/quote-requests.d.ts +99 -13
- package/dist/quote-requests.d.ts.map +1 -1
- package/dist/quote-requests.js +66 -1
- package/dist/quote-requests.js.map +1 -1
- package/dist/record-references.d.ts +252 -0
- package/dist/record-references.d.ts.map +1 -0
- package/dist/record-references.js +178 -0
- package/dist/record-references.js.map +1 -0
- package/dist/record-rich-text.d.ts +66 -0
- package/dist/record-rich-text.d.ts.map +1 -0
- package/dist/record-rich-text.js +304 -0
- package/dist/record-rich-text.js.map +1 -0
- package/dist/returns.d.ts +234 -52
- package/dist/returns.d.ts.map +1 -1
- package/dist/returns.js +139 -26
- package/dist/returns.js.map +1 -1
- package/dist/sales-channels.d.ts +51 -7
- package/dist/sales-channels.d.ts.map +1 -1
- package/dist/sales-channels.js +38 -4
- package/dist/sales-channels.js.map +1 -1
- package/dist/saved-list-views.d.ts +56 -0
- package/dist/saved-list-views.d.ts.map +1 -1
- package/dist/saved-list-views.js +27 -1
- package/dist/saved-list-views.js.map +1 -1
- package/dist/scoped-write-encoding.d.ts +100 -0
- package/dist/scoped-write-encoding.d.ts.map +1 -0
- package/dist/scoped-write-encoding.js +135 -0
- package/dist/scoped-write-encoding.js.map +1 -0
- package/dist/search.d.ts +25 -15
- package/dist/search.d.ts.map +1 -1
- package/dist/seo.d.ts +127 -15
- package/dist/seo.d.ts.map +1 -1
- package/dist/seo.js +38 -4
- package/dist/seo.js.map +1 -1
- package/dist/settings.d.ts +161 -3
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +73 -3
- package/dist/settings.js.map +1 -1
- package/dist/shopping-lists.d.ts +24 -3
- package/dist/shopping-lists.d.ts.map +1 -1
- package/dist/shopping-lists.js +20 -0
- package/dist/shopping-lists.js.map +1 -1
- package/dist/storefront-cache-tags.d.ts +41 -0
- package/dist/storefront-cache-tags.d.ts.map +1 -1
- package/dist/storefront-cache-tags.js +36 -0
- package/dist/storefront-cache-tags.js.map +1 -1
- package/dist/storefront-language-path.d.ts +77 -0
- package/dist/storefront-language-path.d.ts.map +1 -0
- package/dist/storefront-language-path.js +123 -0
- package/dist/storefront-language-path.js.map +1 -0
- package/dist/storefront-value-overrides.d.ts +18 -56
- package/dist/storefront-value-overrides.d.ts.map +1 -1
- package/dist/storefront-value-overrides.js +11 -86
- package/dist/storefront-value-overrides.js.map +1 -1
- package/dist/tasks.d.ts +2842 -0
- package/dist/tasks.d.ts.map +1 -0
- package/dist/tasks.js +901 -0
- package/dist/tasks.js.map +1 -0
- package/dist/transactional-emails.d.ts +14 -11
- package/dist/transactional-emails.d.ts.map +1 -1
- package/dist/transactional-emails.js +13 -0
- package/dist/transactional-emails.js.map +1 -1
- package/package.json +3 -3
|
@@ -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
|
-
|
|
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
|
|
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
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
*
|
|
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.
|
|
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,14 +906,80 @@ 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
|
}
|
|
955
|
+
/**
|
|
956
|
+
* D-287 P0 — the one customer-group rule every pricing path applies, and the
|
|
957
|
+
* one the megamenu's customer-group audience reads (feature 168, plan R-5):
|
|
958
|
+
*
|
|
959
|
+
* effective group = explicit ?? customer.customerGroupId ?? organization.customerGroupId ?? null
|
|
960
|
+
*
|
|
961
|
+
* `explicit` is a group a caller already resolved for the customer (the quote
|
|
962
|
+
* reference price and the admin order preview pass one); otherwise the signed-in
|
|
963
|
+
* customer's own group overrides the organisation's (feature 040 R6). Before
|
|
964
|
+
* this, listings, the product page and the cart passed the organisation alone
|
|
965
|
+
* and priced on its group while quotes and the admin preview honoured the
|
|
966
|
+
* customer's — the same buyer met different winning lists
|
|
967
|
+
* (`specs/pricing/read-paths-and-performance.md` §2.2).
|
|
968
|
+
*
|
|
969
|
+
* The customer's group counts only when the account belongs to the
|
|
970
|
+
* organisation the resolution is for. An account named beside another tenant's
|
|
971
|
+
* organisation is ignored rather than allowed to price that tenant's lists on
|
|
972
|
+
* its group (the same mismatch `BuyerLinePriceService` refuses outright).
|
|
973
|
+
*/
|
|
974
|
+
export declare function effectiveCustomerGroupId(input: {
|
|
975
|
+
explicit?: string | null;
|
|
976
|
+
customer?: {
|
|
977
|
+
organizationId?: string | null;
|
|
978
|
+
customerGroupId?: string | null;
|
|
979
|
+
} | null;
|
|
980
|
+
organization?: {
|
|
981
|
+
id: string;
|
|
982
|
+
customerGroupId?: string | null;
|
|
983
|
+
} | null;
|
|
984
|
+
}): string | null;
|
|
791
985
|
//# sourceMappingURL=customer-accounts.d.ts.map
|
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AAqB,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,4 +55,57 @@ 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';
|
|
80
|
+
// --- effective customer group ------------------------------------------------
|
|
81
|
+
/**
|
|
82
|
+
* D-287 P0 — the one customer-group rule every pricing path applies, and the
|
|
83
|
+
* one the megamenu's customer-group audience reads (feature 168, plan R-5):
|
|
84
|
+
*
|
|
85
|
+
* effective group = explicit ?? customer.customerGroupId ?? organization.customerGroupId ?? null
|
|
86
|
+
*
|
|
87
|
+
* `explicit` is a group a caller already resolved for the customer (the quote
|
|
88
|
+
* reference price and the admin order preview pass one); otherwise the signed-in
|
|
89
|
+
* customer's own group overrides the organisation's (feature 040 R6). Before
|
|
90
|
+
* this, listings, the product page and the cart passed the organisation alone
|
|
91
|
+
* and priced on its group while quotes and the admin preview honoured the
|
|
92
|
+
* customer's — the same buyer met different winning lists
|
|
93
|
+
* (`specs/pricing/read-paths-and-performance.md` §2.2).
|
|
94
|
+
*
|
|
95
|
+
* The customer's group counts only when the account belongs to the
|
|
96
|
+
* organisation the resolution is for. An account named beside another tenant's
|
|
97
|
+
* organisation is ignored rather than allowed to price that tenant's lists on
|
|
98
|
+
* its group (the same mismatch `BuyerLinePriceService` refuses outright).
|
|
99
|
+
*/
|
|
100
|
+
export function effectiveCustomerGroupId(input) {
|
|
101
|
+
if (input.explicit)
|
|
102
|
+
return input.explicit;
|
|
103
|
+
const organization = input.organization ?? null;
|
|
104
|
+
const customer = input.customer ?? null;
|
|
105
|
+
if (customer && (customer.organizationId ?? null) === (organization?.id ?? null)) {
|
|
106
|
+
if (customer.customerGroupId)
|
|
107
|
+
return customer.customerGroupId;
|
|
108
|
+
}
|
|
109
|
+
return organization?.customerGroupId ?? null;
|
|
110
|
+
}
|
|
41
111
|
//# sourceMappingURL=customer-accounts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer-accounts.js","sourceRoot":"","sources":["../src/customer-accounts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,CAAC,EAAE,M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C,EAAE,CAAC;IAC/B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAChC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACxD,CAAC,CAAC;AAqCH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAsB,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;AAskB1F,iFAAiF;AAEjF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gDAAgD,GAC3D,+CAAwD,CAAC;AAiZ3D,gFAAgF;AAEhF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAIxC;IACC,IAAI,KAAK,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC,QAAQ,CAAC;IAC1C,MAAM,YAAY,GAAG,KAAK,CAAC,YAAY,IAAI,IAAI,CAAC;IAChD,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,IAAI,IAAI,CAAC;IACxC,IAAI,QAAQ,IAAI,CAAC,QAAQ,CAAC,cAAc,IAAI,IAAI,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"}
|
package/dist/customers.d.ts
CHANGED
|
@@ -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
|
package/dist/customers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customers.d.ts","sourceRoot":"","sources":["../src/customers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"customers.d.ts","sourceRoot":"","sources":["../src/customers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;;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,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;;;;;;;GAQG;AACH,eAAO,MAAM,gCAAgC,EAAE,SAAS,MAAM,EAAoC,CAAC;AAEnG,eAAO,MAAM,6BAA6B;;;;EAIxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6B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