@endora-commerce/contracts 0.110.0 → 0.111.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/accept-language.d.ts +31 -0
- package/dist/accept-language.js +64 -0
- package/dist/admin-actions.d.ts +2 -0
- package/dist/admin-actions.js +18 -0
- package/dist/admin-contributions.d.ts +37 -5
- package/dist/admin-contributions.js +9 -2
- package/dist/admin-roles.d.ts +9 -0
- package/dist/admin.d.ts +37 -0
- package/dist/admin.js +19 -0
- package/dist/api-keys.d.ts +22 -0
- package/dist/api-keys.js +4 -0
- package/dist/assets-library.d.ts +19 -0
- package/dist/assets-library.js +14 -0
- package/dist/auth.d.ts +9 -0
- package/dist/auth.js +9 -0
- package/dist/carts.d.ts +30 -1
- package/dist/carts.js +20 -5
- package/dist/catalog.d.ts +61 -22
- package/dist/catalog.js +32 -6
- package/dist/cms.d.ts +33 -3
- package/dist/cms.js +15 -0
- package/dist/command-hooks.d.ts +301 -0
- package/dist/command-hooks.js +248 -0
- package/dist/comparisons.d.ts +14 -14
- package/dist/credit-limits.d.ts +21 -0
- package/dist/credit-limits.js +21 -0
- package/dist/crm.d.ts +81 -55
- package/dist/crm.js +15 -5
- package/dist/custom-fields.d.ts +403 -49
- package/dist/custom-fields.js +127 -0
- package/dist/customer-accounts.d.ts +138 -0
- package/dist/customer-accounts.js +4 -0
- package/dist/customer-notifications.d.ts +143 -0
- package/dist/customer-notifications.js +41 -0
- package/dist/customers.d.ts +52 -0
- package/dist/customers.js +53 -0
- package/dist/dictionary.d.ts +53 -0
- package/dist/dictionary.js +25 -0
- package/dist/document-templates.d.ts +4 -4
- package/dist/email.d.ts +34 -0
- package/dist/email.js +6 -0
- package/dist/errors.d.ts +312 -2
- package/dist/errors.js +377 -2
- package/dist/forms.d.ts +88 -88
- package/dist/i18n.d.ts +34 -0
- package/dist/i18n.js +15 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.js +12 -1
- package/dist/invoice-ledger.d.ts +6 -6
- package/dist/invoices.d.ts +126 -0
- package/dist/invoices.js +49 -0
- package/dist/line-bounds.d.ts +53 -0
- package/dist/line-bounds.js +65 -0
- package/dist/megamenu.d.ts +27 -27
- package/dist/mfa.d.ts +86 -0
- package/dist/mfa.js +90 -0
- package/dist/modules.d.ts +21 -5
- package/dist/modules.js +60 -3
- package/dist/orders.d.ts +141 -0
- package/dist/orders.js +80 -3
- package/dist/organization-hooks.d.ts +99 -0
- package/dist/organization-hooks.js +22 -0
- package/dist/organization-registry-lookup.d.ts +5 -5
- package/dist/organization-roles.d.ts +1 -0
- package/dist/organization-roles.js +7 -0
- package/dist/organizations.d.ts +954 -17
- package/dist/organizations.js +229 -8
- package/dist/price-books.d.ts +173 -25
- package/dist/price-books.js +41 -0
- package/dist/price-lists.d.ts +5 -2
- package/dist/product-feeds.d.ts +157 -8
- package/dist/product-feeds.js +41 -2
- package/dist/product-scopes.d.ts +17 -0
- package/dist/product-scopes.js +31 -5
- package/dist/projects.d.ts +61 -28
- package/dist/projects.js +47 -9
- package/dist/promotions.d.ts +157 -5
- package/dist/promotions.js +23 -1
- package/dist/pwa.d.ts +39 -0
- package/dist/quick-order.d.ts +9 -3
- package/dist/quick-order.js +4 -3
- package/dist/quote-requests.d.ts +168 -5
- package/dist/quote-requests.js +69 -8
- package/dist/record-references.d.ts +15 -15
- package/dist/returns.d.ts +6 -0
- package/dist/returns.js +4 -2
- package/dist/sales-channels.d.ts +34 -3
- package/dist/sales-channels.js +16 -1
- package/dist/schema-extensions.d.ts +36 -0
- package/dist/schema-extensions.js +29 -0
- package/dist/seo.d.ts +2 -2
- package/dist/settings.d.ts +44 -2
- package/dist/settings.js +17 -2
- package/dist/shopping-lists.d.ts +39 -1
- package/dist/shopping-lists.js +37 -3
- package/dist/storefront-cache-tags.d.ts +10 -0
- package/dist/tasks.d.ts +21 -21
- package/dist/taxes.d.ts +27 -0
- package/dist/taxes.js +4 -0
- package/dist/transactional-emails.d.ts +39 -13
- package/dist/webhooks.d.ts +75 -0
- package/dist/webhooks.js +24 -0
- package/package.json +4 -2
- package/dist/actor.d.ts.map +0 -1
- package/dist/actor.js.map +0 -1
- package/dist/addresses.d.ts.map +0 -1
- package/dist/addresses.js.map +0 -1
- package/dist/admin-actions.d.ts.map +0 -1
- package/dist/admin-actions.js.map +0 -1
- package/dist/admin-contributions.d.ts.map +0 -1
- package/dist/admin-contributions.js.map +0 -1
- package/dist/admin-feedback.d.ts.map +0 -1
- package/dist/admin-feedback.js.map +0 -1
- package/dist/admin-i18n.d.ts.map +0 -1
- package/dist/admin-i18n.js.map +0 -1
- package/dist/admin-name.d.ts.map +0 -1
- package/dist/admin-name.js.map +0 -1
- package/dist/admin-notifications.d.ts.map +0 -1
- package/dist/admin-notifications.js.map +0 -1
- package/dist/admin-preferences.d.ts.map +0 -1
- package/dist/admin-preferences.js.map +0 -1
- package/dist/admin-roles.d.ts.map +0 -1
- package/dist/admin-roles.js.map +0 -1
- package/dist/admin-search.d.ts.map +0 -1
- package/dist/admin-search.js.map +0 -1
- package/dist/admin-users.d.ts.map +0 -1
- package/dist/admin-users.js.map +0 -1
- package/dist/admin.d.ts.map +0 -1
- package/dist/admin.js.map +0 -1
- package/dist/analytics.d.ts.map +0 -1
- package/dist/analytics.js.map +0 -1
- package/dist/api-keys.d.ts.map +0 -1
- package/dist/api-keys.js.map +0 -1
- package/dist/assets-library.d.ts.map +0 -1
- package/dist/assets-library.js.map +0 -1
- package/dist/audit-logs.d.ts.map +0 -1
- package/dist/audit-logs.js.map +0 -1
- package/dist/auth.d.ts.map +0 -1
- package/dist/auth.js.map +0 -1
- package/dist/blog.d.ts.map +0 -1
- package/dist/blog.js.map +0 -1
- package/dist/capabilities.d.ts.map +0 -1
- package/dist/capabilities.js.map +0 -1
- package/dist/carts.d.ts.map +0 -1
- package/dist/carts.js.map +0 -1
- package/dist/catalog.d.ts.map +0 -1
- package/dist/catalog.js.map +0 -1
- package/dist/cms-brand.d.ts.map +0 -1
- package/dist/cms-brand.js.map +0 -1
- package/dist/cms-contact-form.d.ts.map +0 -1
- package/dist/cms-contact-form.js.map +0 -1
- package/dist/cms.d.ts.map +0 -1
- package/dist/cms.js.map +0 -1
- package/dist/common.d.ts.map +0 -1
- package/dist/common.js.map +0 -1
- package/dist/comparisons.d.ts.map +0 -1
- package/dist/comparisons.js.map +0 -1
- package/dist/credentials.d.ts.map +0 -1
- package/dist/credentials.js.map +0 -1
- package/dist/credit-limits.d.ts.map +0 -1
- package/dist/credit-limits.js.map +0 -1
- package/dist/crm-rich-text.d.ts.map +0 -1
- package/dist/crm-rich-text.js.map +0 -1
- package/dist/crm.d.ts.map +0 -1
- package/dist/crm.js.map +0 -1
- package/dist/currencies.d.ts.map +0 -1
- package/dist/currencies.js.map +0 -1
- package/dist/custom-fields.d.ts.map +0 -1
- package/dist/custom-fields.js.map +0 -1
- package/dist/customer-accounts.d.ts.map +0 -1
- package/dist/customer-accounts.js.map +0 -1
- package/dist/customers.d.ts.map +0 -1
- package/dist/customers.js.map +0 -1
- package/dist/dictionary.d.ts.map +0 -1
- package/dist/dictionary.js.map +0 -1
- package/dist/document-templates.d.ts.map +0 -1
- package/dist/document-templates.js.map +0 -1
- package/dist/document-values.d.ts.map +0 -1
- package/dist/document-values.js.map +0 -1
- package/dist/email-address.d.ts.map +0 -1
- package/dist/email-address.js.map +0 -1
- package/dist/email.d.ts.map +0 -1
- package/dist/email.js.map +0 -1
- package/dist/envelopes.d.ts.map +0 -1
- package/dist/envelopes.js.map +0 -1
- package/dist/environment-inputs.d.ts.map +0 -1
- package/dist/environment-inputs.js.map +0 -1
- package/dist/erp-connector.d.ts.map +0 -1
- package/dist/erp-connector.js.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js.map +0 -1
- package/dist/forms-logic.d.ts.map +0 -1
- package/dist/forms-logic.fixtures.d.ts.map +0 -1
- package/dist/forms-logic.fixtures.js.map +0 -1
- package/dist/forms-logic.js.map +0 -1
- package/dist/forms.d.ts.map +0 -1
- package/dist/forms.js.map +0 -1
- package/dist/google-analytics.d.ts.map +0 -1
- package/dist/google-analytics.js.map +0 -1
- package/dist/google-tag-manager.d.ts.map +0 -1
- package/dist/google-tag-manager.js.map +0 -1
- package/dist/i18n.d.ts.map +0 -1
- package/dist/i18n.js.map +0 -1
- package/dist/import-export.d.ts.map +0 -1
- package/dist/import-export.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/inventory.d.ts.map +0 -1
- package/dist/inventory.js.map +0 -1
- package/dist/invoice-ledger.d.ts.map +0 -1
- package/dist/invoice-ledger.js.map +0 -1
- package/dist/invoices.d.ts.map +0 -1
- package/dist/invoices.js.map +0 -1
- package/dist/kernel.d.ts.map +0 -1
- package/dist/kernel.js.map +0 -1
- package/dist/languages.d.ts.map +0 -1
- package/dist/languages.js.map +0 -1
- package/dist/line-groups.d.ts.map +0 -1
- package/dist/line-groups.js.map +0 -1
- package/dist/linkedin-ads.d.ts.map +0 -1
- package/dist/linkedin-ads.js.map +0 -1
- package/dist/localized-name.d.ts.map +0 -1
- package/dist/localized-name.js.map +0 -1
- package/dist/megamenu.d.ts.map +0 -1
- package/dist/megamenu.js.map +0 -1
- package/dist/meta-ads.d.ts.map +0 -1
- package/dist/meta-ads.js.map +0 -1
- package/dist/mfa.d.ts.map +0 -1
- package/dist/mfa.js.map +0 -1
- package/dist/modules.d.ts.map +0 -1
- package/dist/modules.js.map +0 -1
- package/dist/money-decimal.d.ts.map +0 -1
- package/dist/money-decimal.js.map +0 -1
- package/dist/money-input.d.ts.map +0 -1
- package/dist/money-input.js.map +0 -1
- package/dist/newsletter.d.ts.map +0 -1
- package/dist/newsletter.js.map +0 -1
- package/dist/order-minimums.d.ts.map +0 -1
- package/dist/order-minimums.js.map +0 -1
- package/dist/orders.d.ts.map +0 -1
- package/dist/orders.js.map +0 -1
- package/dist/organization-registry-lookup.d.ts.map +0 -1
- package/dist/organization-registry-lookup.js.map +0 -1
- package/dist/organization-roles.d.ts.map +0 -1
- package/dist/organization-roles.js.map +0 -1
- package/dist/organizations.d.ts.map +0 -1
- package/dist/organizations.js.map +0 -1
- package/dist/page-builder-props.d.ts.map +0 -1
- package/dist/page-builder-props.js.map +0 -1
- package/dist/page-builder-values.d.ts.map +0 -1
- package/dist/page-builder-values.js.map +0 -1
- package/dist/pagination.d.ts.map +0 -1
- package/dist/pagination.js.map +0 -1
- package/dist/payment-methods.d.ts.map +0 -1
- package/dist/payment-methods.js.map +0 -1
- package/dist/payment-return-url.d.ts.map +0 -1
- package/dist/payment-return-url.js.map +0 -1
- package/dist/payments.d.ts.map +0 -1
- package/dist/payments.js.map +0 -1
- package/dist/pim-connector.d.ts.map +0 -1
- package/dist/pim-connector.js.map +0 -1
- package/dist/pim-field-path.d.ts.map +0 -1
- package/dist/pim-field-path.js.map +0 -1
- package/dist/pim-locale-mapping.d.ts.map +0 -1
- package/dist/pim-locale-mapping.js.map +0 -1
- package/dist/platform-info.d.ts.map +0 -1
- package/dist/platform-info.js.map +0 -1
- package/dist/platform-language.d.ts.map +0 -1
- package/dist/platform-language.js.map +0 -1
- package/dist/price-book-decimal.d.ts.map +0 -1
- package/dist/price-book-decimal.js.map +0 -1
- package/dist/price-books.d.ts.map +0 -1
- package/dist/price-books.js.map +0 -1
- package/dist/price-lists.d.ts.map +0 -1
- package/dist/price-lists.js.map +0 -1
- package/dist/product-feeds.d.ts.map +0 -1
- package/dist/product-feeds.js.map +0 -1
- package/dist/product-scope-model.d.ts.map +0 -1
- package/dist/product-scope-model.js.map +0 -1
- package/dist/product-scope-overrides.d.ts.map +0 -1
- package/dist/product-scope-overrides.js.map +0 -1
- package/dist/product-scoped-values.d.ts.map +0 -1
- package/dist/product-scoped-values.js.map +0 -1
- package/dist/product-scopes.d.ts.map +0 -1
- package/dist/product-scopes.js.map +0 -1
- package/dist/product-summary-text.d.ts.map +0 -1
- package/dist/product-summary-text.js.map +0 -1
- package/dist/product-tax-rates.d.ts.map +0 -1
- package/dist/product-tax-rates.js.map +0 -1
- package/dist/product-url-keys.d.ts.map +0 -1
- package/dist/product-url-keys.js.map +0 -1
- package/dist/product-value-resolver.d.ts.map +0 -1
- package/dist/product-value-resolver.js.map +0 -1
- package/dist/projects.d.ts.map +0 -1
- package/dist/projects.js.map +0 -1
- package/dist/promotions.d.ts.map +0 -1
- package/dist/promotions.js.map +0 -1
- package/dist/prompt-actions.d.ts.map +0 -1
- package/dist/prompt-actions.js.map +0 -1
- package/dist/pwa.d.ts.map +0 -1
- package/dist/pwa.js.map +0 -1
- package/dist/quick-order.d.ts.map +0 -1
- package/dist/quick-order.js.map +0 -1
- package/dist/quote-requests.d.ts.map +0 -1
- package/dist/quote-requests.js.map +0 -1
- package/dist/record-references.d.ts.map +0 -1
- package/dist/record-references.js.map +0 -1
- package/dist/record-rich-text.d.ts.map +0 -1
- package/dist/record-rich-text.js.map +0 -1
- package/dist/returns.d.ts.map +0 -1
- package/dist/returns.js.map +0 -1
- package/dist/sales-channels.d.ts.map +0 -1
- package/dist/sales-channels.js.map +0 -1
- package/dist/saved-list-views.d.ts.map +0 -1
- package/dist/saved-list-views.js.map +0 -1
- package/dist/scope-notice.d.ts.map +0 -1
- package/dist/scope-notice.js.map +0 -1
- package/dist/scoped-write-encoding.d.ts.map +0 -1
- package/dist/scoped-write-encoding.js.map +0 -1
- package/dist/search.d.ts.map +0 -1
- package/dist/search.js.map +0 -1
- package/dist/seo.d.ts.map +0 -1
- package/dist/seo.js.map +0 -1
- package/dist/settings.d.ts.map +0 -1
- package/dist/settings.js.map +0 -1
- package/dist/shipments.d.ts.map +0 -1
- package/dist/shipments.js.map +0 -1
- package/dist/shipping-methods.d.ts.map +0 -1
- package/dist/shipping-methods.js.map +0 -1
- package/dist/shopping-lists.d.ts.map +0 -1
- package/dist/shopping-lists.js.map +0 -1
- package/dist/storefront-cache-tags.d.ts.map +0 -1
- package/dist/storefront-cache-tags.js.map +0 -1
- package/dist/storefront-language-path.d.ts.map +0 -1
- package/dist/storefront-language-path.js.map +0 -1
- package/dist/storefront-value-overrides.d.ts.map +0 -1
- package/dist/storefront-value-overrides.js.map +0 -1
- package/dist/tasks.d.ts.map +0 -1
- package/dist/tasks.js.map +0 -1
- package/dist/taxes.d.ts.map +0 -1
- package/dist/taxes.js.map +0 -1
- package/dist/text-normalization.d.ts.map +0 -1
- package/dist/text-normalization.js.map +0 -1
- package/dist/transactional-emails.d.ts.map +0 -1
- package/dist/transactional-emails.js.map +0 -1
- package/dist/webhooks.d.ts.map +0 -1
- package/dist/webhooks.js.map +0 -1
package/dist/customers.js
CHANGED
|
@@ -122,11 +122,46 @@ export const customerSelfProfileSchema = z.object({
|
|
|
122
122
|
organizationId: uuidSchema.nullable(),
|
|
123
123
|
customerGroupId: uuidSchema.nullable(),
|
|
124
124
|
twoFactorEnabled: z.boolean(),
|
|
125
|
+
/**
|
|
126
|
+
* Issue #652 (D-292) — the language the account's e-mails are written in, as
|
|
127
|
+
* the channel that captured it spells it; `null` while unknown. See
|
|
128
|
+
* `CustomerAccountRecord.preferredLanguage`.
|
|
129
|
+
*/
|
|
130
|
+
preferredLanguage: z.string().nullable(),
|
|
125
131
|
/** The member's role (`specs/170-organization-roles/` FR-056); it replaced the legacy `role`. */
|
|
126
132
|
organizationRole: organizationRoleRefSchema,
|
|
127
133
|
/** The member's effective organization permissions, sorted (FR-056). */
|
|
128
134
|
permissions: z.array(z.string()),
|
|
129
135
|
});
|
|
136
|
+
/**
|
|
137
|
+
* The longest language tag a preferred language may be — RFC 5646 §4.4.1's
|
|
138
|
+
* recommended minimum buffer, and the width of `customer_accounts.preferred_language`.
|
|
139
|
+
*/
|
|
140
|
+
export const CUSTOMER_PREFERRED_LANGUAGE_MAX_LENGTH = 35;
|
|
141
|
+
/**
|
|
142
|
+
* A BCP-47 tag's shape: a two- or three-letter primary subtag, then hyphenated
|
|
143
|
+
* subtags of one to eight letters or digits. The shape, not the registry — the
|
|
144
|
+
* route checks the tag against the request channel's own languages.
|
|
145
|
+
*/
|
|
146
|
+
const LANGUAGE_TAG_SHAPE = /^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$/;
|
|
147
|
+
/**
|
|
148
|
+
* `PATCH /api/v1/me/customer/preferred-language` — the buyer's explicit choice
|
|
149
|
+
* of the language their e-mails are written in (issue #652, D-292). Not
|
|
150
|
+
* nullable: the account page always submits a language. A tag the request's
|
|
151
|
+
* sales channel does not offer is refused `422 PREFERRED_LANGUAGE_NOT_OFFERED`;
|
|
152
|
+
* an offered one is stored in the channel's spelling, matched
|
|
153
|
+
* case-insensitively.
|
|
154
|
+
*/
|
|
155
|
+
export const patchCustomerPreferredLanguageBodySchema = z.object({
|
|
156
|
+
preferredLanguage: z
|
|
157
|
+
.string()
|
|
158
|
+
.trim()
|
|
159
|
+
.max(CUSTOMER_PREFERRED_LANGUAGE_MAX_LENGTH)
|
|
160
|
+
.regex(LANGUAGE_TAG_SHAPE),
|
|
161
|
+
});
|
|
162
|
+
export const patchCustomerPreferredLanguageResponseSchema = z.object({
|
|
163
|
+
data: z.object({ preferredLanguage: z.string() }),
|
|
164
|
+
});
|
|
130
165
|
// Password change reuses `changePasswordRequestSchema` from organizations.ts.
|
|
131
166
|
// ── Admin: list & detail ──────────────────────────────────────────────────
|
|
132
167
|
export const adminCustomerListItemSchema = z.object({
|
|
@@ -143,6 +178,19 @@ export const adminCustomerListItemSchema = z.object({
|
|
|
143
178
|
createdAt: isoDateTimeSchema,
|
|
144
179
|
lastLoginAt: isoDateTimeSchema.nullable(),
|
|
145
180
|
});
|
|
181
|
+
/**
|
|
182
|
+
* `GET /api/v1/admin/customers` — one page of the admin list (issue #599).
|
|
183
|
+
* Offset paging: `page` is 1-based, `pageSize` 1–100, `total` the rows the
|
|
184
|
+
* filters match across every page.
|
|
185
|
+
*/
|
|
186
|
+
export const adminCustomerListResponseSchema = z.object({
|
|
187
|
+
data: z.array(adminCustomerListItemSchema),
|
|
188
|
+
meta: z.object({
|
|
189
|
+
page: z.number().int().positive(),
|
|
190
|
+
pageSize: z.number().int().positive(),
|
|
191
|
+
total: z.number().int().nonnegative(),
|
|
192
|
+
}),
|
|
193
|
+
});
|
|
146
194
|
export const adminCustomerBlockInfoSchema = z.object({
|
|
147
195
|
blockedAt: isoDateTimeSchema,
|
|
148
196
|
blockSource: customerBlockSourceSchema,
|
|
@@ -160,6 +208,11 @@ export const adminCustomerDetailSchema = adminCustomerListItemSchema.extend({
|
|
|
160
208
|
deletion: adminCustomerDeletionInfoSchema.nullable(),
|
|
161
209
|
emailVerifiedAt: isoDateTimeSchema.nullable(),
|
|
162
210
|
twoFactorEnabled: z.boolean(),
|
|
211
|
+
/**
|
|
212
|
+
* Issue #652 (D-292) — the customer's e-mail language, shown read-only to
|
|
213
|
+
* staff; `null` while unknown (the store's default language is used).
|
|
214
|
+
*/
|
|
215
|
+
preferredLanguage: z.string().nullable(),
|
|
163
216
|
salesChannelIds: z.array(uuidSchema),
|
|
164
217
|
defaults: customerDefaultsSchema,
|
|
165
218
|
/** Feature 055 — custom-field values captured on this customer. */
|
package/dist/dictionary.d.ts
CHANGED
|
@@ -262,6 +262,59 @@ export declare const dictionaryLanguagesPageResponseSchema: z.ZodObject<{
|
|
|
262
262
|
}, z.core.$strip>;
|
|
263
263
|
}, z.core.$strip>;
|
|
264
264
|
export type DictionaryLanguagesPageResponse = z.infer<typeof dictionaryLanguagesPageResponseSchema>;
|
|
265
|
+
/** `GET /api/v1/admin/dictionary/translations/:entryType/:entryCode` — every translation of one entry (issue #599). */
|
|
266
|
+
export declare const dictionaryTranslationListResponseSchema: z.ZodObject<{
|
|
267
|
+
data: z.ZodArray<z.ZodObject<{
|
|
268
|
+
entryType: z.ZodEnum<{
|
|
269
|
+
language: "language";
|
|
270
|
+
currency: "currency";
|
|
271
|
+
country: "country";
|
|
272
|
+
}>;
|
|
273
|
+
entryCode: z.ZodString;
|
|
274
|
+
languageCode: z.ZodString;
|
|
275
|
+
label: z.ZodString;
|
|
276
|
+
createdAt: z.ZodString;
|
|
277
|
+
updatedAt: z.ZodString;
|
|
278
|
+
}, z.core.$strip>>;
|
|
279
|
+
}, z.core.$strip>;
|
|
280
|
+
export type DictionaryTranslationListResponse = z.infer<typeof dictionaryTranslationListResponseSchema>;
|
|
281
|
+
/**
|
|
282
|
+
* One stored dictionary code no dictionary row answers for (feature 017
|
|
283
|
+
* FR-022): which consumer stores it, where, and how many times.
|
|
284
|
+
*/
|
|
285
|
+
export declare const dictionaryOrphanRowSchema: z.ZodObject<{
|
|
286
|
+
dictionary: z.ZodEnum<{
|
|
287
|
+
language: "language";
|
|
288
|
+
currency: "currency";
|
|
289
|
+
country: "country";
|
|
290
|
+
}>;
|
|
291
|
+
consumer: z.ZodString;
|
|
292
|
+
tableName: z.ZodString;
|
|
293
|
+
columnName: z.ZodString;
|
|
294
|
+
code: z.ZodString;
|
|
295
|
+
count: z.ZodNumber;
|
|
296
|
+
}, z.core.$strip>;
|
|
297
|
+
export type DictionaryOrphanRow = z.infer<typeof dictionaryOrphanRowSchema>;
|
|
298
|
+
/** `GET /api/v1/admin/dictionary/audit/orphans` — the orphan report (issue #599). */
|
|
299
|
+
export declare const dictionaryOrphanReportResponseSchema: z.ZodObject<{
|
|
300
|
+
data: z.ZodArray<z.ZodObject<{
|
|
301
|
+
dictionary: z.ZodEnum<{
|
|
302
|
+
language: "language";
|
|
303
|
+
currency: "currency";
|
|
304
|
+
country: "country";
|
|
305
|
+
}>;
|
|
306
|
+
consumer: z.ZodString;
|
|
307
|
+
tableName: z.ZodString;
|
|
308
|
+
columnName: z.ZodString;
|
|
309
|
+
code: z.ZodString;
|
|
310
|
+
count: z.ZodNumber;
|
|
311
|
+
}, z.core.$strip>>;
|
|
312
|
+
meta: z.ZodObject<{
|
|
313
|
+
generatedAt: z.ZodString;
|
|
314
|
+
total: z.ZodNumber;
|
|
315
|
+
}, z.core.$strip>;
|
|
316
|
+
}, z.core.$strip>;
|
|
317
|
+
export type DictionaryOrphanReportResponse = z.infer<typeof dictionaryOrphanReportResponseSchema>;
|
|
265
318
|
export declare const resolvedCountrySchema: z.ZodObject<{
|
|
266
319
|
code: z.ZodString;
|
|
267
320
|
label: z.ZodString;
|
package/dist/dictionary.js
CHANGED
|
@@ -196,6 +196,31 @@ export const dictionaryLanguagesPageResponseSchema = z.object({
|
|
|
196
196
|
data: z.array(dictionaryLanguageSchema),
|
|
197
197
|
pagination: paginationMetaSchema,
|
|
198
198
|
});
|
|
199
|
+
/** `GET /api/v1/admin/dictionary/translations/:entryType/:entryCode` — every translation of one entry (issue #599). */
|
|
200
|
+
export const dictionaryTranslationListResponseSchema = z.object({
|
|
201
|
+
data: z.array(dictionaryTranslationSchema),
|
|
202
|
+
});
|
|
203
|
+
/**
|
|
204
|
+
* One stored dictionary code no dictionary row answers for (feature 017
|
|
205
|
+
* FR-022): which consumer stores it, where, and how many times.
|
|
206
|
+
*/
|
|
207
|
+
export const dictionaryOrphanRowSchema = z.object({
|
|
208
|
+
dictionary: dictionaryEntryTypeSchema,
|
|
209
|
+
consumer: z.string(),
|
|
210
|
+
tableName: z.string(),
|
|
211
|
+
columnName: z.string(),
|
|
212
|
+
code: z.string(),
|
|
213
|
+
count: z.number().int().positive(),
|
|
214
|
+
});
|
|
215
|
+
/** `GET /api/v1/admin/dictionary/audit/orphans` — the orphan report (issue #599). */
|
|
216
|
+
export const dictionaryOrphanReportResponseSchema = z.object({
|
|
217
|
+
data: z.array(dictionaryOrphanRowSchema),
|
|
218
|
+
meta: z.object({
|
|
219
|
+
generatedAt: isoDateTimeSchema,
|
|
220
|
+
/** The sum of every row's `count`. */
|
|
221
|
+
total: z.number().int().nonnegative(),
|
|
222
|
+
}),
|
|
223
|
+
});
|
|
199
224
|
// ---------------------------------------------------------------------------
|
|
200
225
|
// Storefront read facade — locale-resolved labels
|
|
201
226
|
// ---------------------------------------------------------------------------
|
|
@@ -597,8 +597,8 @@ export declare const documentFieldDescriptorSchema: z.ZodObject<{
|
|
|
597
597
|
object: "object";
|
|
598
598
|
array: "array";
|
|
599
599
|
text: "text";
|
|
600
|
-
external: "external";
|
|
601
600
|
select: "select";
|
|
601
|
+
external: "external";
|
|
602
602
|
uuid: "uuid";
|
|
603
603
|
color: "color";
|
|
604
604
|
textarea: "textarea";
|
|
@@ -1213,8 +1213,8 @@ export declare const documentBuilderComponentSchema: z.ZodObject<{
|
|
|
1213
1213
|
object: "object";
|
|
1214
1214
|
array: "array";
|
|
1215
1215
|
text: "text";
|
|
1216
|
-
external: "external";
|
|
1217
1216
|
select: "select";
|
|
1217
|
+
external: "external";
|
|
1218
1218
|
uuid: "uuid";
|
|
1219
1219
|
color: "color";
|
|
1220
1220
|
textarea: "textarea";
|
|
@@ -1256,8 +1256,8 @@ export declare const documentBuilderConfigSchema: z.ZodObject<{
|
|
|
1256
1256
|
object: "object";
|
|
1257
1257
|
array: "array";
|
|
1258
1258
|
text: "text";
|
|
1259
|
-
external: "external";
|
|
1260
1259
|
select: "select";
|
|
1260
|
+
external: "external";
|
|
1261
1261
|
uuid: "uuid";
|
|
1262
1262
|
color: "color";
|
|
1263
1263
|
textarea: "textarea";
|
|
@@ -1287,8 +1287,8 @@ export declare const documentBuilderConfigSchema: z.ZodObject<{
|
|
|
1287
1287
|
object: "object";
|
|
1288
1288
|
array: "array";
|
|
1289
1289
|
text: "text";
|
|
1290
|
-
external: "external";
|
|
1291
1290
|
select: "select";
|
|
1291
|
+
external: "external";
|
|
1292
1292
|
uuid: "uuid";
|
|
1293
1293
|
color: "color";
|
|
1294
1294
|
textarea: "textarea";
|
package/dist/email.d.ts
CHANGED
|
@@ -86,6 +86,40 @@ export interface EmailDeliveryRecordInput {
|
|
|
86
86
|
export interface EmailDeliveryRecorder {
|
|
87
87
|
record(input: EmailDeliveryRecordInput): Promise<string | null>;
|
|
88
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* The value an anonymised delivery record's `recipient` holds (issue #928).
|
|
91
|
+
* The column is not nullable, and `.invalid` is reserved (RFC 2606), so the
|
|
92
|
+
* marker can never be an address anything is delivered to.
|
|
93
|
+
*/
|
|
94
|
+
export declare const ANONYMIZED_EMAIL_RECIPIENT = "erased@anonymized.invalid";
|
|
95
|
+
/**
|
|
96
|
+
* Container name: `emailDeliveryAnonymizationPort`. Owner: `email`.
|
|
97
|
+
*
|
|
98
|
+
* `email`'s step in the customer-account anonymisation sweep (issue #928),
|
|
99
|
+
* which `customers` runs before it writes the account's `anonymizedAt`. Every
|
|
100
|
+
* delivery record addressed to `recipient` (compared case-insensitively) loses
|
|
101
|
+
* what it holds about the person: `recipient` becomes
|
|
102
|
+
* {@link ANONYMIZED_EMAIL_RECIPIENT}, and `subject`, `context` (the sender's
|
|
103
|
+
* `meta` envelope, which can carry a rejection reason) and `detail` (the
|
|
104
|
+
* transport's error text, which commonly quotes the address) become `null`.
|
|
105
|
+
* The message id, the kind, the status and reason, the channel, the document
|
|
106
|
+
* reference and the time stay: they are what "did this leave the building"
|
|
107
|
+
* is answered with.
|
|
108
|
+
*
|
|
109
|
+
* Each record it changed gets one `email_delivery.anonymized` audit entry,
|
|
110
|
+
* with a null actor and no payload. No event is published.
|
|
111
|
+
*
|
|
112
|
+
* Answers how many records it changed. Idempotent: a changed record no longer
|
|
113
|
+
* carries the address, so a repeat call finds nothing, writes nothing and
|
|
114
|
+
* records nothing. Run under the system scope the sweep's tick enters.
|
|
115
|
+
*
|
|
116
|
+
* **Owner off:** there is no such state. `email` declares
|
|
117
|
+
* `activation.nonDeactivatable`, which is why this name is an ordinary
|
|
118
|
+
* `ctx.di.register`, like {@link EmailDeliveryRecorder}'s.
|
|
119
|
+
*/
|
|
120
|
+
export interface EmailDeliveryAnonymizationPort {
|
|
121
|
+
anonymizeForRecipient(recipient: string): Promise<number>;
|
|
122
|
+
}
|
|
89
123
|
export interface EmailAttachment {
|
|
90
124
|
filename: string;
|
|
91
125
|
content: Uint8Array;
|
package/dist/email.js
CHANGED
|
@@ -49,4 +49,10 @@ export const emailDeliveryReasonSchema = z.enum([
|
|
|
49
49
|
/** Failed: no template exists for this code. */
|
|
50
50
|
'no_definition',
|
|
51
51
|
]);
|
|
52
|
+
/**
|
|
53
|
+
* The value an anonymised delivery record's `recipient` holds (issue #928).
|
|
54
|
+
* The column is not nullable, and `.invalid` is reserved (RFC 2606), so the
|
|
55
|
+
* marker can never be an address anything is delivered to.
|
|
56
|
+
*/
|
|
57
|
+
export const ANONYMIZED_EMAIL_RECIPIENT = 'erased@anonymized.invalid';
|
|
52
58
|
//# sourceMappingURL=email.js.map
|