@endora-commerce/contracts 0.109.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/actor.d.ts +16 -0
- package/dist/addresses.d.ts +35 -0
- package/dist/addresses.js +8 -1
- package/dist/admin-actions.d.ts +2 -0
- package/dist/admin-actions.js +18 -0
- package/dist/admin-contributions.d.ts +99 -12
- package/dist/admin-contributions.js +36 -10
- package/dist/admin-roles.d.ts +17 -2
- package/dist/admin-users.d.ts +9 -0
- package/dist/admin.d.ts +114 -4
- package/dist/admin.js +98 -3
- package/dist/api-keys.d.ts +22 -0
- package/dist/api-keys.js +4 -0
- package/dist/assets-library.d.ts +45 -0
- package/dist/assets-library.js +20 -3
- package/dist/audit-logs.d.ts +12 -0
- package/dist/audit-logs.js +12 -0
- package/dist/auth.d.ts +9 -0
- package/dist/auth.js +9 -0
- package/dist/blog.d.ts +382 -22
- package/dist/blog.js +199 -17
- package/dist/carts.d.ts +423 -36
- package/dist/carts.js +150 -12
- package/dist/catalog.d.ts +379 -208
- package/dist/catalog.js +241 -163
- package/dist/cms-brand.d.ts +14 -14
- package/dist/cms.d.ts +71 -16
- package/dist/cms.js +15 -0
- package/dist/command-hooks.d.ts +301 -0
- package/dist/command-hooks.js +248 -0
- package/dist/common.d.ts +23 -6
- package/dist/common.js +25 -2
- package/dist/comparisons.d.ts +21 -14
- package/dist/comparisons.js +2 -1
- package/dist/credit-limits.d.ts +22 -0
- package/dist/credit-limits.js +35 -0
- package/dist/crm.d.ts +134 -78
- package/dist/crm.js +21 -5
- package/dist/custom-fields.d.ts +417 -49
- package/dist/custom-fields.js +142 -1
- package/dist/customer-accounts.d.ts +324 -22
- package/dist/customer-accounts.js +43 -0
- package/dist/customer-notifications.d.ts +143 -0
- package/dist/customer-notifications.js +41 -0
- package/dist/customers.d.ts +92 -73
- package/dist/customers.js +98 -10
- package/dist/dictionary.d.ts +53 -0
- package/dist/dictionary.js +25 -0
- package/dist/document-templates.d.ts +12 -12
- package/dist/email.d.ts +34 -0
- package/dist/email.js +6 -0
- package/dist/errors.d.ts +431 -3
- package/dist/errors.js +523 -3
- package/dist/forms-logic.d.ts +79 -0
- package/dist/forms-logic.fixtures.d.ts +52 -0
- package/dist/forms-logic.fixtures.js +610 -0
- package/dist/forms-logic.js +699 -0
- package/dist/forms.d.ts +9833 -0
- package/dist/forms.js +827 -0
- package/dist/i18n.d.ts +34 -0
- package/dist/i18n.js +15 -0
- package/dist/import-export.d.ts +180 -0
- package/dist/import-export.js +60 -0
- package/dist/index.d.ts +16 -1
- package/dist/index.js +30 -1
- package/dist/inventory.d.ts +9 -9
- package/dist/invoice-ledger.d.ts +13 -13
- package/dist/invoices.d.ts +126 -0
- package/dist/invoices.js +53 -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 +210 -4
- package/dist/mfa.js +136 -0
- package/dist/modules.d.ts +56 -8
- package/dist/modules.js +128 -3
- package/dist/money-decimal.d.ts +54 -0
- package/dist/money-decimal.js +95 -0
- package/dist/newsletter.d.ts +4 -4
- package/dist/orders.d.ts +246 -12
- package/dist/orders.js +140 -7
- package/dist/organization-hooks.d.ts +99 -0
- package/dist/organization-hooks.js +22 -0
- package/dist/organization-registry-lookup.d.ts +362 -0
- package/dist/organization-registry-lookup.js +196 -0
- package/dist/organization-roles.d.ts +341 -0
- package/dist/organization-roles.js +218 -0
- package/dist/organizations.d.ts +1074 -103
- package/dist/organizations.js +293 -28
- package/dist/page-builder-props.d.ts +56 -56
- package/dist/pim-connector.d.ts +7 -3
- package/dist/pim-connector.js +6 -2
- package/dist/pim-field-path.d.ts +5 -1
- package/dist/pim-field-path.js +37 -81
- package/dist/pim-locale-mapping.d.ts +131 -0
- package/dist/pim-locale-mapping.js +193 -0
- package/dist/price-books.d.ts +215 -63
- package/dist/price-books.js +47 -2
- package/dist/price-lists.d.ts +13 -10
- package/dist/product-feeds.d.ts +249 -100
- package/dist/product-feeds.js +46 -2
- package/dist/product-scope-model.d.ts +161 -0
- package/dist/product-scope-model.js +161 -0
- package/dist/product-scope-overrides.d.ts +0 -103
- package/dist/product-scope-overrides.js +0 -54
- package/dist/product-scoped-values.d.ts +2610 -0
- package/dist/product-scoped-values.js +425 -0
- package/dist/product-scopes.d.ts +199 -64
- package/dist/product-scopes.js +120 -23
- package/dist/product-tax-rates.d.ts +38 -0
- package/dist/product-tax-rates.js +45 -0
- package/dist/product-url-keys.d.ts +51 -45
- package/dist/product-url-keys.js +73 -39
- package/dist/product-value-resolver.d.ts +37 -60
- package/dist/product-value-resolver.js +36 -96
- package/dist/projects.d.ts +76 -28
- package/dist/projects.js +53 -9
- package/dist/promotions.d.ts +163 -11
- package/dist/promotions.js +23 -1
- package/dist/pwa.d.ts +41 -2
- package/dist/quick-order.d.ts +159 -9
- package/dist/quick-order.js +79 -4
- package/dist/quote-requests.d.ts +231 -17
- package/dist/quote-requests.js +111 -9
- package/dist/record-references.d.ts +15 -15
- package/dist/record-references.js +2 -3
- package/dist/record-rich-text.js +2 -1
- package/dist/returns.d.ts +214 -52
- package/dist/returns.js +143 -28
- package/dist/sales-channels.d.ts +34 -3
- package/dist/sales-channels.js +16 -1
- package/dist/saved-list-views.d.ts +28 -0
- package/dist/saved-list-views.js +14 -1
- package/dist/schema-extensions.d.ts +36 -0
- package/dist/schema-extensions.js +29 -0
- package/dist/scoped-write-encoding.d.ts +100 -0
- package/dist/scoped-write-encoding.js +135 -0
- package/dist/search.d.ts +18 -16
- package/dist/seo.d.ts +83 -30
- package/dist/seo.js +8 -1
- package/dist/settings.d.ts +173 -2
- package/dist/settings.js +53 -2
- package/dist/shopping-lists.d.ts +63 -4
- package/dist/shopping-lists.js +57 -3
- package/dist/storefront-cache-tags.d.ts +22 -0
- package/dist/storefront-cache-tags.js +12 -0
- package/dist/storefront-value-overrides.d.ts +18 -56
- package/dist/storefront-value-overrides.js +11 -86
- package/dist/tasks.d.ts +27 -27
- package/dist/taxes.d.ts +27 -0
- package/dist/taxes.js +4 -0
- package/dist/transactional-emails.d.ts +48 -22
- package/dist/webhooks.d.ts +75 -0
- package/dist/webhooks.js +24 -0
- package/package.json +5 -3
- 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/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/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/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-overrides.d.ts.map +0 -1
- package/dist/product-scope-overrides.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-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-translations.d.ts +0 -48
- package/dist/scoped-translations.d.ts.map +0 -1
- package/dist/scoped-translations.js +0 -78
- package/dist/scoped-translations.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/carts.d.ts
CHANGED
|
@@ -86,6 +86,11 @@ export declare const updateCartItemRequestStrictSchema: z.ZodObject<{
|
|
|
86
86
|
quantity: z.ZodNumber;
|
|
87
87
|
}, z.core.$strip>;
|
|
88
88
|
export type UpdateCartItemRequestStrict = z.infer<typeof updateCartItemRequestStrictSchema>;
|
|
89
|
+
/**
|
|
90
|
+
* `0` removes the line; anything else up to `LINE_QUANTITY_MAX` (issue #351,
|
|
91
|
+
* architect ruling R3 — it stopped at 999, below what the add path accepts, so a
|
|
92
|
+
* buyer could add a line they could then not edit).
|
|
93
|
+
*/
|
|
89
94
|
export declare const updateCartItemRequestSchema: z.ZodObject<{
|
|
90
95
|
quantity: z.ZodNumber;
|
|
91
96
|
}, z.core.$strip>;
|
|
@@ -105,8 +110,8 @@ export declare const cartStatusSchema: z.ZodEnum<{
|
|
|
105
110
|
export type CartStatus = z.infer<typeof cartStatusSchema>;
|
|
106
111
|
export declare const cartApprovalStatusSchema: z.ZodEnum<{
|
|
107
112
|
pending: "pending";
|
|
108
|
-
not_required: "not_required";
|
|
109
113
|
approved: "approved";
|
|
114
|
+
not_required: "not_required";
|
|
110
115
|
rejected_by_org_admin: "rejected_by_org_admin";
|
|
111
116
|
}>;
|
|
112
117
|
export type CartApprovalStatus = z.infer<typeof cartApprovalStatusSchema>;
|
|
@@ -128,16 +133,16 @@ export declare const couponDropReasonSchema: z.ZodEnum<{
|
|
|
128
133
|
}>;
|
|
129
134
|
export type CouponDropReason = z.infer<typeof couponDropReasonSchema>;
|
|
130
135
|
export declare const cartDroppedLineReasonSchema: z.ZodEnum<{
|
|
131
|
-
not_purchasable: "not_purchasable";
|
|
132
136
|
out_of_stock: "out_of_stock";
|
|
137
|
+
not_purchasable: "not_purchasable";
|
|
133
138
|
no_price_in_customer_list: "no_price_in_customer_list";
|
|
134
139
|
removed_by_conversion: "removed_by_conversion";
|
|
135
140
|
below_minimum: "below_minimum";
|
|
136
141
|
}>;
|
|
137
142
|
export type CartDroppedLineReason = z.infer<typeof cartDroppedLineReasonSchema>;
|
|
138
143
|
export declare const cartLineUnavailableReasonSchema: z.ZodEnum<{
|
|
139
|
-
not_purchasable: "not_purchasable";
|
|
140
144
|
out_of_stock: "out_of_stock";
|
|
145
|
+
not_purchasable: "not_purchasable";
|
|
141
146
|
no_price_in_customer_list: "no_price_in_customer_list";
|
|
142
147
|
}>;
|
|
143
148
|
export type CartLineUnavailableReason = z.infer<typeof cartLineUnavailableReasonSchema>;
|
|
@@ -160,8 +165,8 @@ export declare const cartViewLineSchema: z.ZodObject<{
|
|
|
160
165
|
}, z.core.$strip>;
|
|
161
166
|
unavailable: z.ZodBoolean;
|
|
162
167
|
unavailableReason: z.ZodNullable<z.ZodEnum<{
|
|
163
|
-
not_purchasable: "not_purchasable";
|
|
164
168
|
out_of_stock: "out_of_stock";
|
|
169
|
+
not_purchasable: "not_purchasable";
|
|
165
170
|
no_price_in_customer_list: "no_price_in_customer_list";
|
|
166
171
|
}>>;
|
|
167
172
|
packagingUnitName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -176,8 +181,42 @@ export declare const cartViewLineSchema: z.ZodObject<{
|
|
|
176
181
|
minimum: z.ZodNumber;
|
|
177
182
|
packagingUnitName: z.ZodOptional<z.ZodString>;
|
|
178
183
|
}, z.core.$strip>>>;
|
|
184
|
+
taxRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
185
|
+
lineGross: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
186
|
+
amount: z.ZodNumber;
|
|
187
|
+
currency: z.ZodString;
|
|
188
|
+
}, z.core.$strip>>>;
|
|
179
189
|
}, z.core.$strip>;
|
|
180
190
|
export type CartViewLine = z.infer<typeof cartViewLineSchema>;
|
|
191
|
+
/** Issue #436 — one rate's row of the cart's VAT: two-place amounts in the cart's currency. */
|
|
192
|
+
export declare const cartVatRowSchema: z.ZodObject<{
|
|
193
|
+
taxRate: z.ZodNumber;
|
|
194
|
+
net: z.ZodNumber;
|
|
195
|
+
vat: z.ZodNumber;
|
|
196
|
+
gross: z.ZodNumber;
|
|
197
|
+
}, z.core.$strip>;
|
|
198
|
+
export type CartVatRow = z.infer<typeof cartVatRowSchema>;
|
|
199
|
+
/**
|
|
200
|
+
* Issue #436 — the cart's VAT under the one VAT method (owner ruling of
|
|
201
|
+
* 2026-10-24): per rate, on the sum of the line nets at that rate, rounded
|
|
202
|
+
* half-up once; gross = net + VAT. The same computation the order makes at
|
|
203
|
+
* placement, for the same lines and rates, so the cart's gross is the order's
|
|
204
|
+
* before the checkout's delivery and payment charges, which the order adds
|
|
205
|
+
* untaxed. A client renders these figures and does not compute VAT itself.
|
|
206
|
+
*/
|
|
207
|
+
export declare const cartVatSchema: z.ZodObject<{
|
|
208
|
+
currency: z.ZodString;
|
|
209
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
210
|
+
taxRate: z.ZodNumber;
|
|
211
|
+
net: z.ZodNumber;
|
|
212
|
+
vat: z.ZodNumber;
|
|
213
|
+
gross: z.ZodNumber;
|
|
214
|
+
}, z.core.$strip>>;
|
|
215
|
+
vatTotal: z.ZodNumber;
|
|
216
|
+
subtotalGross: z.ZodNumber;
|
|
217
|
+
grandTotalGross: z.ZodNumber;
|
|
218
|
+
}, z.core.$strip>;
|
|
219
|
+
export type CartVat = z.infer<typeof cartVatSchema>;
|
|
181
220
|
export declare const cartMiniLineSchema: z.ZodObject<{
|
|
182
221
|
id: z.ZodString;
|
|
183
222
|
productId: z.ZodString;
|
|
@@ -203,6 +242,37 @@ export declare const cartAppliedPromotionSchema: z.ZodObject<{
|
|
|
203
242
|
currency: z.ZodString;
|
|
204
243
|
}, z.core.$strip>;
|
|
205
244
|
export type CartAppliedPromotion = z.infer<typeof cartAppliedPromotionSchema>;
|
|
245
|
+
/**
|
|
246
|
+
* Issue #650 — the rejection of the buyer's previous basket on this channel.
|
|
247
|
+
*
|
|
248
|
+
* A rejection closes the basket it rejects (`status = 'rejected'`), so the
|
|
249
|
+
* buyer's next cart read is a new active basket whose own `approvalStatus` is
|
|
250
|
+
* `not_required` and can never say `rejected_by_org_admin`. Without this the
|
|
251
|
+
* buyer was never told. It is answered while (a) the buyer has a rejected
|
|
252
|
+
* basket on the channel — the most recent one is answered — and
|
|
253
|
+
* (b) the current basket has not been sent for approval since. A basket
|
|
254
|
+
* ordered or converted to a quote request after the rejection ends it too.
|
|
255
|
+
* `null` otherwise, and always `null` for an anonymous basket.
|
|
256
|
+
*/
|
|
257
|
+
export declare const cartPreviousRejectionSchema: z.ZodObject<{
|
|
258
|
+
cartId: z.ZodString;
|
|
259
|
+
rejectedAt: z.ZodString;
|
|
260
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
261
|
+
restoredLineCount: z.ZodDefault<z.ZodNumber>;
|
|
262
|
+
skippedLines: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
263
|
+
productId: z.ZodString;
|
|
264
|
+
productName: z.ZodString;
|
|
265
|
+
reason: z.ZodEnum<{
|
|
266
|
+
out_of_stock: "out_of_stock";
|
|
267
|
+
not_purchasable: "not_purchasable";
|
|
268
|
+
no_price_in_customer_list: "no_price_in_customer_list";
|
|
269
|
+
removed_by_conversion: "removed_by_conversion";
|
|
270
|
+
below_minimum: "below_minimum";
|
|
271
|
+
}>;
|
|
272
|
+
minimum: z.ZodOptional<z.ZodNumber>;
|
|
273
|
+
}, z.core.$strip>>>;
|
|
274
|
+
}, z.core.$strip>;
|
|
275
|
+
export type CartPreviousRejection = z.infer<typeof cartPreviousRejectionSchema>;
|
|
206
276
|
export declare const cartFullPayloadSchema: z.ZodObject<{
|
|
207
277
|
id: z.ZodNullable<z.ZodString>;
|
|
208
278
|
customerAccountId: z.ZodNullable<z.ZodString>;
|
|
@@ -218,8 +288,8 @@ export declare const cartFullPayloadSchema: z.ZodObject<{
|
|
|
218
288
|
}>;
|
|
219
289
|
approvalStatus: z.ZodEnum<{
|
|
220
290
|
pending: "pending";
|
|
221
|
-
not_required: "not_required";
|
|
222
291
|
approved: "approved";
|
|
292
|
+
not_required: "not_required";
|
|
223
293
|
rejected_by_org_admin: "rejected_by_org_admin";
|
|
224
294
|
}>;
|
|
225
295
|
items: z.ZodArray<z.ZodObject<{
|
|
@@ -241,8 +311,8 @@ export declare const cartFullPayloadSchema: z.ZodObject<{
|
|
|
241
311
|
}, z.core.$strip>;
|
|
242
312
|
unavailable: z.ZodBoolean;
|
|
243
313
|
unavailableReason: z.ZodNullable<z.ZodEnum<{
|
|
244
|
-
not_purchasable: "not_purchasable";
|
|
245
314
|
out_of_stock: "out_of_stock";
|
|
315
|
+
not_purchasable: "not_purchasable";
|
|
246
316
|
no_price_in_customer_list: "no_price_in_customer_list";
|
|
247
317
|
}>>;
|
|
248
318
|
packagingUnitName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -257,6 +327,11 @@ export declare const cartFullPayloadSchema: z.ZodObject<{
|
|
|
257
327
|
minimum: z.ZodNumber;
|
|
258
328
|
packagingUnitName: z.ZodOptional<z.ZodString>;
|
|
259
329
|
}, z.core.$strip>>>;
|
|
330
|
+
taxRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
331
|
+
lineGross: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
332
|
+
amount: z.ZodNumber;
|
|
333
|
+
currency: z.ZodString;
|
|
334
|
+
}, z.core.$strip>>>;
|
|
260
335
|
}, z.core.$strip>>;
|
|
261
336
|
itemCount: z.ZodNumber;
|
|
262
337
|
subtotal: z.ZodObject<{
|
|
@@ -288,8 +363,8 @@ export declare const cartFullPayloadSchema: z.ZodObject<{
|
|
|
288
363
|
productId: z.ZodString;
|
|
289
364
|
productName: z.ZodString;
|
|
290
365
|
reason: z.ZodEnum<{
|
|
291
|
-
not_purchasable: "not_purchasable";
|
|
292
366
|
out_of_stock: "out_of_stock";
|
|
367
|
+
not_purchasable: "not_purchasable";
|
|
293
368
|
no_price_in_customer_list: "no_price_in_customer_list";
|
|
294
369
|
removed_by_conversion: "removed_by_conversion";
|
|
295
370
|
below_minimum: "below_minimum";
|
|
@@ -311,6 +386,36 @@ export declare const cartFullPayloadSchema: z.ZodObject<{
|
|
|
311
386
|
createdAt: z.ZodNullable<z.ZodString>;
|
|
312
387
|
updatedAt: z.ZodNullable<z.ZodString>;
|
|
313
388
|
lastActivityAt: z.ZodNullable<z.ZodString>;
|
|
389
|
+
previousRejection: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
390
|
+
cartId: z.ZodString;
|
|
391
|
+
rejectedAt: z.ZodString;
|
|
392
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
393
|
+
restoredLineCount: z.ZodDefault<z.ZodNumber>;
|
|
394
|
+
skippedLines: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
395
|
+
productId: z.ZodString;
|
|
396
|
+
productName: z.ZodString;
|
|
397
|
+
reason: z.ZodEnum<{
|
|
398
|
+
out_of_stock: "out_of_stock";
|
|
399
|
+
not_purchasable: "not_purchasable";
|
|
400
|
+
no_price_in_customer_list: "no_price_in_customer_list";
|
|
401
|
+
removed_by_conversion: "removed_by_conversion";
|
|
402
|
+
below_minimum: "below_minimum";
|
|
403
|
+
}>;
|
|
404
|
+
minimum: z.ZodOptional<z.ZodNumber>;
|
|
405
|
+
}, z.core.$strip>>>;
|
|
406
|
+
}, z.core.$strip>>>;
|
|
407
|
+
vat: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
408
|
+
currency: z.ZodString;
|
|
409
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
410
|
+
taxRate: z.ZodNumber;
|
|
411
|
+
net: z.ZodNumber;
|
|
412
|
+
vat: z.ZodNumber;
|
|
413
|
+
gross: z.ZodNumber;
|
|
414
|
+
}, z.core.$strip>>;
|
|
415
|
+
vatTotal: z.ZodNumber;
|
|
416
|
+
subtotalGross: z.ZodNumber;
|
|
417
|
+
grandTotalGross: z.ZodNumber;
|
|
418
|
+
}, z.core.$strip>>>;
|
|
314
419
|
}, z.core.$strip>;
|
|
315
420
|
export type CartFullPayload = z.infer<typeof cartFullPayloadSchema>;
|
|
316
421
|
export declare const cartFullResponseSchema: z.ZodObject<{
|
|
@@ -329,8 +434,8 @@ export declare const cartFullResponseSchema: z.ZodObject<{
|
|
|
329
434
|
}>;
|
|
330
435
|
approvalStatus: z.ZodEnum<{
|
|
331
436
|
pending: "pending";
|
|
332
|
-
not_required: "not_required";
|
|
333
437
|
approved: "approved";
|
|
438
|
+
not_required: "not_required";
|
|
334
439
|
rejected_by_org_admin: "rejected_by_org_admin";
|
|
335
440
|
}>;
|
|
336
441
|
items: z.ZodArray<z.ZodObject<{
|
|
@@ -352,8 +457,8 @@ export declare const cartFullResponseSchema: z.ZodObject<{
|
|
|
352
457
|
}, z.core.$strip>;
|
|
353
458
|
unavailable: z.ZodBoolean;
|
|
354
459
|
unavailableReason: z.ZodNullable<z.ZodEnum<{
|
|
355
|
-
not_purchasable: "not_purchasable";
|
|
356
460
|
out_of_stock: "out_of_stock";
|
|
461
|
+
not_purchasable: "not_purchasable";
|
|
357
462
|
no_price_in_customer_list: "no_price_in_customer_list";
|
|
358
463
|
}>>;
|
|
359
464
|
packagingUnitName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -368,6 +473,11 @@ export declare const cartFullResponseSchema: z.ZodObject<{
|
|
|
368
473
|
minimum: z.ZodNumber;
|
|
369
474
|
packagingUnitName: z.ZodOptional<z.ZodString>;
|
|
370
475
|
}, z.core.$strip>>>;
|
|
476
|
+
taxRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
477
|
+
lineGross: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
478
|
+
amount: z.ZodNumber;
|
|
479
|
+
currency: z.ZodString;
|
|
480
|
+
}, z.core.$strip>>>;
|
|
371
481
|
}, z.core.$strip>>;
|
|
372
482
|
itemCount: z.ZodNumber;
|
|
373
483
|
subtotal: z.ZodObject<{
|
|
@@ -399,8 +509,8 @@ export declare const cartFullResponseSchema: z.ZodObject<{
|
|
|
399
509
|
productId: z.ZodString;
|
|
400
510
|
productName: z.ZodString;
|
|
401
511
|
reason: z.ZodEnum<{
|
|
402
|
-
not_purchasable: "not_purchasable";
|
|
403
512
|
out_of_stock: "out_of_stock";
|
|
513
|
+
not_purchasable: "not_purchasable";
|
|
404
514
|
no_price_in_customer_list: "no_price_in_customer_list";
|
|
405
515
|
removed_by_conversion: "removed_by_conversion";
|
|
406
516
|
below_minimum: "below_minimum";
|
|
@@ -422,6 +532,36 @@ export declare const cartFullResponseSchema: z.ZodObject<{
|
|
|
422
532
|
createdAt: z.ZodNullable<z.ZodString>;
|
|
423
533
|
updatedAt: z.ZodNullable<z.ZodString>;
|
|
424
534
|
lastActivityAt: z.ZodNullable<z.ZodString>;
|
|
535
|
+
previousRejection: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
536
|
+
cartId: z.ZodString;
|
|
537
|
+
rejectedAt: z.ZodString;
|
|
538
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
539
|
+
restoredLineCount: z.ZodDefault<z.ZodNumber>;
|
|
540
|
+
skippedLines: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
541
|
+
productId: z.ZodString;
|
|
542
|
+
productName: z.ZodString;
|
|
543
|
+
reason: z.ZodEnum<{
|
|
544
|
+
out_of_stock: "out_of_stock";
|
|
545
|
+
not_purchasable: "not_purchasable";
|
|
546
|
+
no_price_in_customer_list: "no_price_in_customer_list";
|
|
547
|
+
removed_by_conversion: "removed_by_conversion";
|
|
548
|
+
below_minimum: "below_minimum";
|
|
549
|
+
}>;
|
|
550
|
+
minimum: z.ZodOptional<z.ZodNumber>;
|
|
551
|
+
}, z.core.$strip>>>;
|
|
552
|
+
}, z.core.$strip>>>;
|
|
553
|
+
vat: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
554
|
+
currency: z.ZodString;
|
|
555
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
556
|
+
taxRate: z.ZodNumber;
|
|
557
|
+
net: z.ZodNumber;
|
|
558
|
+
vat: z.ZodNumber;
|
|
559
|
+
gross: z.ZodNumber;
|
|
560
|
+
}, z.core.$strip>>;
|
|
561
|
+
vatTotal: z.ZodNumber;
|
|
562
|
+
subtotalGross: z.ZodNumber;
|
|
563
|
+
grandTotalGross: z.ZodNumber;
|
|
564
|
+
}, z.core.$strip>>>;
|
|
425
565
|
}, z.core.$strip>;
|
|
426
566
|
}, z.core.$strip>;
|
|
427
567
|
export type CartFullResponse = z.infer<typeof cartFullResponseSchema>;
|
|
@@ -447,8 +587,8 @@ export declare const cartMiniPayloadSchema: z.ZodObject<{
|
|
|
447
587
|
}>>;
|
|
448
588
|
approvalStatus: z.ZodOptional<z.ZodEnum<{
|
|
449
589
|
pending: "pending";
|
|
450
|
-
not_required: "not_required";
|
|
451
590
|
approved: "approved";
|
|
591
|
+
not_required: "not_required";
|
|
452
592
|
rejected_by_org_admin: "rejected_by_org_admin";
|
|
453
593
|
}>>;
|
|
454
594
|
items: z.ZodArray<z.ZodObject<{
|
|
@@ -496,8 +636,8 @@ export declare const cartMiniResponseSchema: z.ZodObject<{
|
|
|
496
636
|
}>>;
|
|
497
637
|
approvalStatus: z.ZodOptional<z.ZodEnum<{
|
|
498
638
|
pending: "pending";
|
|
499
|
-
not_required: "not_required";
|
|
500
639
|
approved: "approved";
|
|
640
|
+
not_required: "not_required";
|
|
501
641
|
rejected_by_org_admin: "rejected_by_org_admin";
|
|
502
642
|
}>>;
|
|
503
643
|
items: z.ZodArray<z.ZodObject<{
|
|
@@ -614,8 +754,8 @@ export declare const cartFromQrResponseSchema: z.ZodObject<{
|
|
|
614
754
|
productId: z.ZodString;
|
|
615
755
|
productName: z.ZodString;
|
|
616
756
|
reason: z.ZodEnum<{
|
|
617
|
-
not_purchasable: "not_purchasable";
|
|
618
757
|
out_of_stock: "out_of_stock";
|
|
758
|
+
not_purchasable: "not_purchasable";
|
|
619
759
|
no_price_in_customer_list: "no_price_in_customer_list";
|
|
620
760
|
removed_by_conversion: "removed_by_conversion";
|
|
621
761
|
below_minimum: "below_minimum";
|
|
@@ -633,8 +773,8 @@ export declare const cartFromShoppingListResponseSchema: z.ZodObject<{
|
|
|
633
773
|
productId: z.ZodString;
|
|
634
774
|
productName: z.ZodString;
|
|
635
775
|
reason: z.ZodEnum<{
|
|
636
|
-
not_purchasable: "not_purchasable";
|
|
637
776
|
out_of_stock: "out_of_stock";
|
|
777
|
+
not_purchasable: "not_purchasable";
|
|
638
778
|
no_price_in_customer_list: "no_price_in_customer_list";
|
|
639
779
|
removed_by_conversion: "removed_by_conversion";
|
|
640
780
|
below_minimum: "below_minimum";
|
|
@@ -648,6 +788,8 @@ export declare const orgCartSummarySchema: z.ZodObject<{
|
|
|
648
788
|
id: z.ZodString;
|
|
649
789
|
ownerCustomerAccountId: z.ZodString;
|
|
650
790
|
ownerDisplayName: z.ZodString;
|
|
791
|
+
ownerEmail: z.ZodNullable<z.ZodString>;
|
|
792
|
+
orderId: z.ZodNullable<z.ZodString>;
|
|
651
793
|
status: z.ZodEnum<{
|
|
652
794
|
completed: "completed";
|
|
653
795
|
active: "active";
|
|
@@ -657,8 +799,8 @@ export declare const orgCartSummarySchema: z.ZodObject<{
|
|
|
657
799
|
}>;
|
|
658
800
|
approvalStatus: z.ZodEnum<{
|
|
659
801
|
pending: "pending";
|
|
660
|
-
not_required: "not_required";
|
|
661
802
|
approved: "approved";
|
|
803
|
+
not_required: "not_required";
|
|
662
804
|
rejected_by_org_admin: "rejected_by_org_admin";
|
|
663
805
|
}>;
|
|
664
806
|
itemCount: z.ZodNumber;
|
|
@@ -675,6 +817,8 @@ export declare const orgCartsListResponseSchema: z.ZodObject<{
|
|
|
675
817
|
id: z.ZodString;
|
|
676
818
|
ownerCustomerAccountId: z.ZodString;
|
|
677
819
|
ownerDisplayName: z.ZodString;
|
|
820
|
+
ownerEmail: z.ZodNullable<z.ZodString>;
|
|
821
|
+
orderId: z.ZodNullable<z.ZodString>;
|
|
678
822
|
status: z.ZodEnum<{
|
|
679
823
|
completed: "completed";
|
|
680
824
|
active: "active";
|
|
@@ -684,8 +828,8 @@ export declare const orgCartsListResponseSchema: z.ZodObject<{
|
|
|
684
828
|
}>;
|
|
685
829
|
approvalStatus: z.ZodEnum<{
|
|
686
830
|
pending: "pending";
|
|
687
|
-
not_required: "not_required";
|
|
688
831
|
approved: "approved";
|
|
832
|
+
not_required: "not_required";
|
|
689
833
|
rejected_by_org_admin: "rejected_by_org_admin";
|
|
690
834
|
}>;
|
|
691
835
|
itemCount: z.ZodNumber;
|
|
@@ -719,6 +863,13 @@ export declare const cartAuditFeedEntrySchema: z.ZodObject<{
|
|
|
719
863
|
reason: z.ZodNullable<z.ZodString>;
|
|
720
864
|
}, z.core.$strip>;
|
|
721
865
|
export type CartAuditFeedEntry = z.infer<typeof cartAuditFeedEntrySchema>;
|
|
866
|
+
/**
|
|
867
|
+
* @deprecated Since issue #657 — not the shape of `GET
|
|
868
|
+
* /api/v1/organization/carts/:id`, and never was: the route has never answered
|
|
869
|
+
* `cartFullPayloadSchema`'s fields or `auditEntries`, so a real reply fails
|
|
870
|
+
* this schema. Use {@link orgCartDetailViewSchema}, which the route is typed
|
|
871
|
+
* against. Kept, unchanged, until the next breaking-change release removes it.
|
|
872
|
+
*/
|
|
722
873
|
export declare const orgCartDetailPayloadSchema: z.ZodObject<{
|
|
723
874
|
id: z.ZodNullable<z.ZodString>;
|
|
724
875
|
customerAccountId: z.ZodNullable<z.ZodString>;
|
|
@@ -734,8 +885,8 @@ export declare const orgCartDetailPayloadSchema: z.ZodObject<{
|
|
|
734
885
|
}>;
|
|
735
886
|
approvalStatus: z.ZodEnum<{
|
|
736
887
|
pending: "pending";
|
|
737
|
-
not_required: "not_required";
|
|
738
888
|
approved: "approved";
|
|
889
|
+
not_required: "not_required";
|
|
739
890
|
rejected_by_org_admin: "rejected_by_org_admin";
|
|
740
891
|
}>;
|
|
741
892
|
items: z.ZodArray<z.ZodObject<{
|
|
@@ -757,8 +908,8 @@ export declare const orgCartDetailPayloadSchema: z.ZodObject<{
|
|
|
757
908
|
}, z.core.$strip>;
|
|
758
909
|
unavailable: z.ZodBoolean;
|
|
759
910
|
unavailableReason: z.ZodNullable<z.ZodEnum<{
|
|
760
|
-
not_purchasable: "not_purchasable";
|
|
761
911
|
out_of_stock: "out_of_stock";
|
|
912
|
+
not_purchasable: "not_purchasable";
|
|
762
913
|
no_price_in_customer_list: "no_price_in_customer_list";
|
|
763
914
|
}>>;
|
|
764
915
|
packagingUnitName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -773,6 +924,11 @@ export declare const orgCartDetailPayloadSchema: z.ZodObject<{
|
|
|
773
924
|
minimum: z.ZodNumber;
|
|
774
925
|
packagingUnitName: z.ZodOptional<z.ZodString>;
|
|
775
926
|
}, z.core.$strip>>>;
|
|
927
|
+
taxRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
928
|
+
lineGross: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
929
|
+
amount: z.ZodNumber;
|
|
930
|
+
currency: z.ZodString;
|
|
931
|
+
}, z.core.$strip>>>;
|
|
776
932
|
}, z.core.$strip>>;
|
|
777
933
|
itemCount: z.ZodNumber;
|
|
778
934
|
subtotal: z.ZodObject<{
|
|
@@ -804,8 +960,8 @@ export declare const orgCartDetailPayloadSchema: z.ZodObject<{
|
|
|
804
960
|
productId: z.ZodString;
|
|
805
961
|
productName: z.ZodString;
|
|
806
962
|
reason: z.ZodEnum<{
|
|
807
|
-
not_purchasable: "not_purchasable";
|
|
808
963
|
out_of_stock: "out_of_stock";
|
|
964
|
+
not_purchasable: "not_purchasable";
|
|
809
965
|
no_price_in_customer_list: "no_price_in_customer_list";
|
|
810
966
|
removed_by_conversion: "removed_by_conversion";
|
|
811
967
|
below_minimum: "below_minimum";
|
|
@@ -827,6 +983,36 @@ export declare const orgCartDetailPayloadSchema: z.ZodObject<{
|
|
|
827
983
|
createdAt: z.ZodNullable<z.ZodString>;
|
|
828
984
|
updatedAt: z.ZodNullable<z.ZodString>;
|
|
829
985
|
lastActivityAt: z.ZodNullable<z.ZodString>;
|
|
986
|
+
previousRejection: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
987
|
+
cartId: z.ZodString;
|
|
988
|
+
rejectedAt: z.ZodString;
|
|
989
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
990
|
+
restoredLineCount: z.ZodDefault<z.ZodNumber>;
|
|
991
|
+
skippedLines: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
992
|
+
productId: z.ZodString;
|
|
993
|
+
productName: z.ZodString;
|
|
994
|
+
reason: z.ZodEnum<{
|
|
995
|
+
out_of_stock: "out_of_stock";
|
|
996
|
+
not_purchasable: "not_purchasable";
|
|
997
|
+
no_price_in_customer_list: "no_price_in_customer_list";
|
|
998
|
+
removed_by_conversion: "removed_by_conversion";
|
|
999
|
+
below_minimum: "below_minimum";
|
|
1000
|
+
}>;
|
|
1001
|
+
minimum: z.ZodOptional<z.ZodNumber>;
|
|
1002
|
+
}, z.core.$strip>>>;
|
|
1003
|
+
}, z.core.$strip>>>;
|
|
1004
|
+
vat: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1005
|
+
currency: z.ZodString;
|
|
1006
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
1007
|
+
taxRate: z.ZodNumber;
|
|
1008
|
+
net: z.ZodNumber;
|
|
1009
|
+
vat: z.ZodNumber;
|
|
1010
|
+
gross: z.ZodNumber;
|
|
1011
|
+
}, z.core.$strip>>;
|
|
1012
|
+
vatTotal: z.ZodNumber;
|
|
1013
|
+
subtotalGross: z.ZodNumber;
|
|
1014
|
+
grandTotalGross: z.ZodNumber;
|
|
1015
|
+
}, z.core.$strip>>>;
|
|
830
1016
|
ownerCustomerAccountId: z.ZodString;
|
|
831
1017
|
ownerDisplayName: z.ZodString;
|
|
832
1018
|
auditEntries: z.ZodArray<z.ZodObject<{
|
|
@@ -845,7 +1031,9 @@ export declare const orgCartDetailPayloadSchema: z.ZodObject<{
|
|
|
845
1031
|
reason: z.ZodNullable<z.ZodString>;
|
|
846
1032
|
}, z.core.$strip>>;
|
|
847
1033
|
}, z.core.$strip>;
|
|
1034
|
+
/** @deprecated Since issue #657 — use {@link OrgCartDetailView}. */
|
|
848
1035
|
export type OrgCartDetailPayload = z.infer<typeof orgCartDetailPayloadSchema>;
|
|
1036
|
+
/** @deprecated Since issue #657 — use {@link orgCartDetailViewResponseSchema}. */
|
|
849
1037
|
export declare const orgCartDetailResponseSchema: z.ZodObject<{
|
|
850
1038
|
data: z.ZodObject<{
|
|
851
1039
|
id: z.ZodNullable<z.ZodString>;
|
|
@@ -862,8 +1050,8 @@ export declare const orgCartDetailResponseSchema: z.ZodObject<{
|
|
|
862
1050
|
}>;
|
|
863
1051
|
approvalStatus: z.ZodEnum<{
|
|
864
1052
|
pending: "pending";
|
|
865
|
-
not_required: "not_required";
|
|
866
1053
|
approved: "approved";
|
|
1054
|
+
not_required: "not_required";
|
|
867
1055
|
rejected_by_org_admin: "rejected_by_org_admin";
|
|
868
1056
|
}>;
|
|
869
1057
|
items: z.ZodArray<z.ZodObject<{
|
|
@@ -885,8 +1073,8 @@ export declare const orgCartDetailResponseSchema: z.ZodObject<{
|
|
|
885
1073
|
}, z.core.$strip>;
|
|
886
1074
|
unavailable: z.ZodBoolean;
|
|
887
1075
|
unavailableReason: z.ZodNullable<z.ZodEnum<{
|
|
888
|
-
not_purchasable: "not_purchasable";
|
|
889
1076
|
out_of_stock: "out_of_stock";
|
|
1077
|
+
not_purchasable: "not_purchasable";
|
|
890
1078
|
no_price_in_customer_list: "no_price_in_customer_list";
|
|
891
1079
|
}>>;
|
|
892
1080
|
packagingUnitName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -901,6 +1089,11 @@ export declare const orgCartDetailResponseSchema: z.ZodObject<{
|
|
|
901
1089
|
minimum: z.ZodNumber;
|
|
902
1090
|
packagingUnitName: z.ZodOptional<z.ZodString>;
|
|
903
1091
|
}, z.core.$strip>>>;
|
|
1092
|
+
taxRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1093
|
+
lineGross: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1094
|
+
amount: z.ZodNumber;
|
|
1095
|
+
currency: z.ZodString;
|
|
1096
|
+
}, z.core.$strip>>>;
|
|
904
1097
|
}, z.core.$strip>>;
|
|
905
1098
|
itemCount: z.ZodNumber;
|
|
906
1099
|
subtotal: z.ZodObject<{
|
|
@@ -932,8 +1125,8 @@ export declare const orgCartDetailResponseSchema: z.ZodObject<{
|
|
|
932
1125
|
productId: z.ZodString;
|
|
933
1126
|
productName: z.ZodString;
|
|
934
1127
|
reason: z.ZodEnum<{
|
|
935
|
-
not_purchasable: "not_purchasable";
|
|
936
1128
|
out_of_stock: "out_of_stock";
|
|
1129
|
+
not_purchasable: "not_purchasable";
|
|
937
1130
|
no_price_in_customer_list: "no_price_in_customer_list";
|
|
938
1131
|
removed_by_conversion: "removed_by_conversion";
|
|
939
1132
|
below_minimum: "below_minimum";
|
|
@@ -955,6 +1148,36 @@ export declare const orgCartDetailResponseSchema: z.ZodObject<{
|
|
|
955
1148
|
createdAt: z.ZodNullable<z.ZodString>;
|
|
956
1149
|
updatedAt: z.ZodNullable<z.ZodString>;
|
|
957
1150
|
lastActivityAt: z.ZodNullable<z.ZodString>;
|
|
1151
|
+
previousRejection: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1152
|
+
cartId: z.ZodString;
|
|
1153
|
+
rejectedAt: z.ZodString;
|
|
1154
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
1155
|
+
restoredLineCount: z.ZodDefault<z.ZodNumber>;
|
|
1156
|
+
skippedLines: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1157
|
+
productId: z.ZodString;
|
|
1158
|
+
productName: z.ZodString;
|
|
1159
|
+
reason: z.ZodEnum<{
|
|
1160
|
+
out_of_stock: "out_of_stock";
|
|
1161
|
+
not_purchasable: "not_purchasable";
|
|
1162
|
+
no_price_in_customer_list: "no_price_in_customer_list";
|
|
1163
|
+
removed_by_conversion: "removed_by_conversion";
|
|
1164
|
+
below_minimum: "below_minimum";
|
|
1165
|
+
}>;
|
|
1166
|
+
minimum: z.ZodOptional<z.ZodNumber>;
|
|
1167
|
+
}, z.core.$strip>>>;
|
|
1168
|
+
}, z.core.$strip>>>;
|
|
1169
|
+
vat: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1170
|
+
currency: z.ZodString;
|
|
1171
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
1172
|
+
taxRate: z.ZodNumber;
|
|
1173
|
+
net: z.ZodNumber;
|
|
1174
|
+
vat: z.ZodNumber;
|
|
1175
|
+
gross: z.ZodNumber;
|
|
1176
|
+
}, z.core.$strip>>;
|
|
1177
|
+
vatTotal: z.ZodNumber;
|
|
1178
|
+
subtotalGross: z.ZodNumber;
|
|
1179
|
+
grandTotalGross: z.ZodNumber;
|
|
1180
|
+
}, z.core.$strip>>>;
|
|
958
1181
|
ownerCustomerAccountId: z.ZodString;
|
|
959
1182
|
ownerDisplayName: z.ZodString;
|
|
960
1183
|
auditEntries: z.ZodArray<z.ZodObject<{
|
|
@@ -974,19 +1197,134 @@ export declare const orgCartDetailResponseSchema: z.ZodObject<{
|
|
|
974
1197
|
}, z.core.$strip>>;
|
|
975
1198
|
}, z.core.$strip>;
|
|
976
1199
|
}, z.core.$strip>;
|
|
1200
|
+
/** @deprecated Since issue #657 — use {@link OrgCartDetailViewResponse}. */
|
|
977
1201
|
export type OrgCartDetailResponse = z.infer<typeof orgCartDetailResponseSchema>;
|
|
978
|
-
|
|
979
|
-
|
|
1202
|
+
/**
|
|
1203
|
+
* Issue #650 — one line of {@link orgCartDetailViewSchema}: what the
|
|
1204
|
+
* administrator is approving, at the price stored on the line.
|
|
1205
|
+
*/
|
|
1206
|
+
export declare const orgCartDetailLineSchema: z.ZodObject<{
|
|
1207
|
+
id: z.ZodString;
|
|
1208
|
+
productId: z.ZodString;
|
|
1209
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
1210
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
1211
|
+
productSku: z.ZodNullable<z.ZodString>;
|
|
1212
|
+
quantity: z.ZodNumber;
|
|
1213
|
+
unitPrice: z.ZodObject<{
|
|
1214
|
+
amount: z.ZodNumber;
|
|
1215
|
+
currency: z.ZodString;
|
|
1216
|
+
}, z.core.$strip>;
|
|
1217
|
+
lineTotal: z.ZodObject<{
|
|
1218
|
+
amount: z.ZodNumber;
|
|
1219
|
+
currency: z.ZodString;
|
|
1220
|
+
}, z.core.$strip>;
|
|
980
1221
|
}, z.core.$strip>;
|
|
981
|
-
export type
|
|
982
|
-
|
|
1222
|
+
export type OrgCartDetailLine = z.infer<typeof orgCartDetailLineSchema>;
|
|
1223
|
+
/**
|
|
1224
|
+
* `GET /api/v1/organization/carts/:id` — the Organization administrator's view
|
|
1225
|
+
* of one cart, as the route answers it (issue #650 added `items`).
|
|
1226
|
+
*
|
|
1227
|
+
* {@link orgCartDetailPayloadSchema} above is not this route's shape and never
|
|
1228
|
+
* was: the route has answered the summary fields plus the approval timestamps
|
|
1229
|
+
* since feature 027. It is left as published rather than changed under its
|
|
1230
|
+
* consumers, and deprecated since issue #657.
|
|
1231
|
+
*/
|
|
1232
|
+
export declare const orgCartDetailViewSchema: z.ZodObject<{
|
|
1233
|
+
id: z.ZodString;
|
|
1234
|
+
ownerDisplayName: z.ZodString;
|
|
1235
|
+
ownerEmail: z.ZodNullable<z.ZodString>;
|
|
1236
|
+
orderId: z.ZodNullable<z.ZodString>;
|
|
1237
|
+
status: z.ZodEnum<{
|
|
1238
|
+
completed: "completed";
|
|
1239
|
+
active: "active";
|
|
1240
|
+
rejected: "rejected";
|
|
1241
|
+
abandoned: "abandoned";
|
|
1242
|
+
working: "working";
|
|
1243
|
+
}>;
|
|
1244
|
+
approvalStatus: z.ZodEnum<{
|
|
1245
|
+
pending: "pending";
|
|
1246
|
+
approved: "approved";
|
|
1247
|
+
not_required: "not_required";
|
|
1248
|
+
rejected_by_org_admin: "rejected_by_org_admin";
|
|
1249
|
+
}>;
|
|
1250
|
+
itemCount: z.ZodNumber;
|
|
1251
|
+
total: z.ZodObject<{
|
|
1252
|
+
amount: z.ZodNumber;
|
|
1253
|
+
currency: z.ZodString;
|
|
1254
|
+
}, z.core.$strip>;
|
|
1255
|
+
lastActivityAt: z.ZodString;
|
|
1256
|
+
submittedForApprovalAt: z.ZodNullable<z.ZodString>;
|
|
1257
|
+
ownerCustomerAccountId: z.ZodNullable<z.ZodString>;
|
|
1258
|
+
approvedAt: z.ZodNullable<z.ZodString>;
|
|
1259
|
+
rejectedAt: z.ZodNullable<z.ZodString>;
|
|
1260
|
+
rejectedReason: z.ZodNullable<z.ZodString>;
|
|
1261
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1262
|
+
id: z.ZodString;
|
|
1263
|
+
productId: z.ZodString;
|
|
1264
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
1265
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
1266
|
+
productSku: z.ZodNullable<z.ZodString>;
|
|
1267
|
+
quantity: z.ZodNumber;
|
|
1268
|
+
unitPrice: z.ZodObject<{
|
|
1269
|
+
amount: z.ZodNumber;
|
|
1270
|
+
currency: z.ZodString;
|
|
1271
|
+
}, z.core.$strip>;
|
|
1272
|
+
lineTotal: z.ZodObject<{
|
|
1273
|
+
amount: z.ZodNumber;
|
|
1274
|
+
currency: z.ZodString;
|
|
1275
|
+
}, z.core.$strip>;
|
|
1276
|
+
}, z.core.$strip>>;
|
|
1277
|
+
}, z.core.$strip>;
|
|
1278
|
+
export type OrgCartDetailView = z.infer<typeof orgCartDetailViewSchema>;
|
|
1279
|
+
export declare const orgCartDetailViewResponseSchema: z.ZodObject<{
|
|
983
1280
|
data: z.ZodObject<{
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
1281
|
+
id: z.ZodString;
|
|
1282
|
+
ownerDisplayName: z.ZodString;
|
|
1283
|
+
ownerEmail: z.ZodNullable<z.ZodString>;
|
|
1284
|
+
orderId: z.ZodNullable<z.ZodString>;
|
|
1285
|
+
status: z.ZodEnum<{
|
|
1286
|
+
completed: "completed";
|
|
1287
|
+
active: "active";
|
|
1288
|
+
rejected: "rejected";
|
|
1289
|
+
abandoned: "abandoned";
|
|
1290
|
+
working: "working";
|
|
1291
|
+
}>;
|
|
1292
|
+
approvalStatus: z.ZodEnum<{
|
|
1293
|
+
pending: "pending";
|
|
1294
|
+
approved: "approved";
|
|
1295
|
+
not_required: "not_required";
|
|
1296
|
+
rejected_by_org_admin: "rejected_by_org_admin";
|
|
1297
|
+
}>;
|
|
1298
|
+
itemCount: z.ZodNumber;
|
|
1299
|
+
total: z.ZodObject<{
|
|
1300
|
+
amount: z.ZodNumber;
|
|
1301
|
+
currency: z.ZodString;
|
|
1302
|
+
}, z.core.$strip>;
|
|
1303
|
+
lastActivityAt: z.ZodString;
|
|
1304
|
+
submittedForApprovalAt: z.ZodNullable<z.ZodString>;
|
|
1305
|
+
ownerCustomerAccountId: z.ZodNullable<z.ZodString>;
|
|
1306
|
+
approvedAt: z.ZodNullable<z.ZodString>;
|
|
1307
|
+
rejectedAt: z.ZodNullable<z.ZodString>;
|
|
1308
|
+
rejectedReason: z.ZodNullable<z.ZodString>;
|
|
1309
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1310
|
+
id: z.ZodString;
|
|
1311
|
+
productId: z.ZodString;
|
|
1312
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
1313
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
1314
|
+
productSku: z.ZodNullable<z.ZodString>;
|
|
1315
|
+
quantity: z.ZodNumber;
|
|
1316
|
+
unitPrice: z.ZodObject<{
|
|
1317
|
+
amount: z.ZodNumber;
|
|
1318
|
+
currency: z.ZodString;
|
|
1319
|
+
}, z.core.$strip>;
|
|
1320
|
+
lineTotal: z.ZodObject<{
|
|
1321
|
+
amount: z.ZodNumber;
|
|
1322
|
+
currency: z.ZodString;
|
|
1323
|
+
}, z.core.$strip>;
|
|
1324
|
+
}, z.core.$strip>>;
|
|
987
1325
|
}, z.core.$strip>;
|
|
988
1326
|
}, z.core.$strip>;
|
|
989
|
-
export type
|
|
1327
|
+
export type OrgCartDetailViewResponse = z.infer<typeof orgCartDetailViewResponseSchema>;
|
|
990
1328
|
export declare const rejectOrgCartSchema: z.ZodObject<{
|
|
991
1329
|
reason: z.ZodString;
|
|
992
1330
|
}, z.core.$strip>;
|
|
@@ -1016,8 +1354,8 @@ export declare const adminCartSummarySchema: z.ZodObject<{
|
|
|
1016
1354
|
}>;
|
|
1017
1355
|
approvalStatus: z.ZodEnum<{
|
|
1018
1356
|
pending: "pending";
|
|
1019
|
-
not_required: "not_required";
|
|
1020
1357
|
approved: "approved";
|
|
1358
|
+
not_required: "not_required";
|
|
1021
1359
|
rejected_by_org_admin: "rejected_by_org_admin";
|
|
1022
1360
|
}>;
|
|
1023
1361
|
itemCount: z.ZodNumber;
|
|
@@ -1048,8 +1386,8 @@ export declare const adminCartsListResponseSchema: z.ZodObject<{
|
|
|
1048
1386
|
}>;
|
|
1049
1387
|
approvalStatus: z.ZodEnum<{
|
|
1050
1388
|
pending: "pending";
|
|
1051
|
-
not_required: "not_required";
|
|
1052
1389
|
approved: "approved";
|
|
1390
|
+
not_required: "not_required";
|
|
1053
1391
|
rejected_by_org_admin: "rejected_by_org_admin";
|
|
1054
1392
|
}>;
|
|
1055
1393
|
itemCount: z.ZodNumber;
|
|
@@ -1078,8 +1416,8 @@ export declare const adminCartsListQuerySchema: z.ZodObject<{
|
|
|
1078
1416
|
}>>>;
|
|
1079
1417
|
approvalStatus: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1080
1418
|
pending: "pending";
|
|
1081
|
-
not_required: "not_required";
|
|
1082
1419
|
approved: "approved";
|
|
1420
|
+
not_required: "not_required";
|
|
1083
1421
|
rejected_by_org_admin: "rejected_by_org_admin";
|
|
1084
1422
|
}>>>;
|
|
1085
1423
|
organizationId: z.ZodOptional<z.ZodString>;
|
|
@@ -1131,8 +1469,8 @@ export declare const adminCartDetailPayloadSchema: z.ZodObject<{
|
|
|
1131
1469
|
}>;
|
|
1132
1470
|
approvalStatus: z.ZodEnum<{
|
|
1133
1471
|
pending: "pending";
|
|
1134
|
-
not_required: "not_required";
|
|
1135
1472
|
approved: "approved";
|
|
1473
|
+
not_required: "not_required";
|
|
1136
1474
|
rejected_by_org_admin: "rejected_by_org_admin";
|
|
1137
1475
|
}>;
|
|
1138
1476
|
itemCount: z.ZodNumber;
|
|
@@ -1190,8 +1528,8 @@ export declare const adminCartDetailResponseSchema: z.ZodObject<{
|
|
|
1190
1528
|
}>;
|
|
1191
1529
|
approvalStatus: z.ZodEnum<{
|
|
1192
1530
|
pending: "pending";
|
|
1193
|
-
not_required: "not_required";
|
|
1194
1531
|
approved: "approved";
|
|
1532
|
+
not_required: "not_required";
|
|
1195
1533
|
rejected_by_org_admin: "rejected_by_org_admin";
|
|
1196
1534
|
}>;
|
|
1197
1535
|
itemCount: z.ZodNumber;
|
|
@@ -1531,6 +1869,19 @@ export type CartBatchLineOutcome = {
|
|
|
1531
1869
|
details?: unknown;
|
|
1532
1870
|
};
|
|
1533
1871
|
};
|
|
1872
|
+
/**
|
|
1873
|
+
* The cart writes `carts` publishes to other modules.
|
|
1874
|
+
*
|
|
1875
|
+
* There is deliberately no operation that empties a buyer's basket and closes
|
|
1876
|
+
* it without an order. `clearForCustomer` did exactly that — every line
|
|
1877
|
+
* deleted, the basket marked `completed` with no `completed_order_id` — and was
|
|
1878
|
+
* removed in issue #601: once #169 moved its callers off it, it was only the
|
|
1879
|
+
* next module's way back to a finished basket that produced nothing. A module
|
|
1880
|
+
* that places an order for a customer writes the lines into a working basket
|
|
1881
|
+
* (`addItems` with `workingBasket`) and leaves the active one alone; one that
|
|
1882
|
+
* means to re-seed the active basket calls `replaceItemsForCustomer`, which
|
|
1883
|
+
* keeps it active.
|
|
1884
|
+
*/
|
|
1534
1885
|
export interface CartWritePort {
|
|
1535
1886
|
getOrCreateForCustomer(ctx: CartCustomerContext): Promise<CartRecord>;
|
|
1536
1887
|
addItem(actor: {
|
|
@@ -1593,6 +1944,19 @@ export interface CartWritePort {
|
|
|
1593
1944
|
*
|
|
1594
1945
|
* `language` names a refused product — the language the response is answered
|
|
1595
1946
|
* in (`request.responseLanguage()`); absent, the record's own fallback chain.
|
|
1947
|
+
* A message language only: it never decides which (channel, language) a line
|
|
1948
|
+
* is asked about.
|
|
1949
|
+
*
|
|
1950
|
+
* `languageTag` (issue #1293) — the buyer request's scope language: the
|
|
1951
|
+
* channel language its `Accept-Language` asks for (`requestScopeLanguage`).
|
|
1952
|
+
* Every line is judged for availability, and a below-minimum line named, at
|
|
1953
|
+
* the basket's (channel, `languageTag` resolved against the channel's own
|
|
1954
|
+
* languages), exactly as `POST /cart/items` judges a line of the same
|
|
1955
|
+
* request. Absent: the channel's default language, as before — the answer
|
|
1956
|
+
* for a caller with no storefront request (an API-key order, an operator
|
|
1957
|
+
* naming a customer's channel). Honoured only while the basket's channel is
|
|
1958
|
+
* the request's resolved one; any other basket is asked about at its
|
|
1959
|
+
* channel's default language.
|
|
1596
1960
|
*/
|
|
1597
1961
|
addItems(actor: {
|
|
1598
1962
|
customer?: CartCustomerContext;
|
|
@@ -1603,10 +1967,10 @@ export interface CartWritePort {
|
|
|
1603
1967
|
workingBasket?: boolean;
|
|
1604
1968
|
keepRepeatedLines?: boolean;
|
|
1605
1969
|
language?: string;
|
|
1970
|
+
languageTag?: string;
|
|
1606
1971
|
}): Promise<CartWithItems & {
|
|
1607
1972
|
outcomes: CartBatchLineOutcome[];
|
|
1608
1973
|
}>;
|
|
1609
|
-
clearForCustomer(ctx: CartCustomerContext): Promise<void>;
|
|
1610
1974
|
/**
|
|
1611
1975
|
* Clear the customer's active cart and seed it with these lines, creating
|
|
1612
1976
|
* the cart when there is none. The single-active-cart model admin
|
|
@@ -1657,4 +2021,27 @@ export interface CustomerCartsView {
|
|
|
1657
2021
|
export interface CartQueryPort {
|
|
1658
2022
|
listForCustomer(customerAccountId: string): Promise<CustomerCartsView>;
|
|
1659
2023
|
}
|
|
2024
|
+
/**
|
|
2025
|
+
* Container name: `cartAnonymizationPort`. Owner: `carts`.
|
|
2026
|
+
*
|
|
2027
|
+
* `carts`' step in the customer-account anonymisation sweep (issue #920),
|
|
2028
|
+
* which `customers` runs before it writes the account's `anonymizedAt`. Every
|
|
2029
|
+
* cart of the account loses the free text operators and approvers wrote about
|
|
2030
|
+
* it: `Cart.rejectedReason` and the `reason` of its `cart_audit_entries` rows
|
|
2031
|
+
* are set to `null`. The status, the rejection's time and actor, and every
|
|
2032
|
+
* other column stay. Each cart it changed gets one `cart.anonymized` audit
|
|
2033
|
+
* entry, with a null actor and `hadRejectedReason` as its only payload. No
|
|
2034
|
+
* event is published.
|
|
2035
|
+
*
|
|
2036
|
+
* Answers how many carts it changed. Idempotent: a repeat call finds nothing
|
|
2037
|
+
* left to erase, writes nothing and records nothing. Carts the account only
|
|
2038
|
+
* acted on (a colleague's basket it approved or rejected) are not its carts
|
|
2039
|
+
* and are left alone. Run under the system scope the sweep's tick enters.
|
|
2040
|
+
*
|
|
2041
|
+
* **Owner off:** the seam fails closed, as {@link CartQueryPort}'s does; `carts`
|
|
2042
|
+
* declares `nonDeactivatable`, so it never enters that state.
|
|
2043
|
+
*/
|
|
2044
|
+
export interface CartAnonymizationPort {
|
|
2045
|
+
anonymizeForCustomerAccount(customerAccountId: string): Promise<number>;
|
|
2046
|
+
}
|
|
1660
2047
|
//# sourceMappingURL=carts.d.ts.map
|