@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/quote-requests.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { isoDateTimeSchema, OriginReferenceSchema, uuidSchema } from './common.js';
|
|
3
3
|
import { lineGroupInputSchema, lineGroupKeySchema, lineGroupSchema, newLineGroupInputSchema, refineLineGrouping, } from './line-groups.js';
|
|
4
|
-
import { customFieldCarrySkipSchema } from './custom-fields.js';
|
|
4
|
+
import { customFieldCarrySkipSchema, customFieldValuesSchema } from './custom-fields.js';
|
|
5
5
|
import { fourDecimalUnitPrice } from './money-input.js';
|
|
6
|
+
import { lineQuantitySchema, REQUEST_LINE_ITEMS_MAX } from './line-bounds.js';
|
|
6
7
|
/**
|
|
7
8
|
* Quote Requests (RFQ) module contracts — feature 008 workflow rewrite.
|
|
8
9
|
* Source of truth per Principle V; the backend re-uses these schemas as
|
|
@@ -259,6 +260,50 @@ export const quoteRequestHistoryEntryKindSchema = z.enum([
|
|
|
259
260
|
// Feature 162.
|
|
260
261
|
'custom_field_carry_skipped',
|
|
261
262
|
]);
|
|
263
|
+
/**
|
|
264
|
+
* `specs/179-rfq-and-customer-notifications/` — one notification delivery of a
|
|
265
|
+
* history entry (`contracts/delivery-and-ports.md` §4): who was told, through
|
|
266
|
+
* which channel, and with what outcome. Admin history only; the customer
|
|
267
|
+
* projection never carries it (FR-071). The recipient's address is never part
|
|
268
|
+
* of it — `displayName` is resolved at read, `''` when the person is gone.
|
|
269
|
+
*/
|
|
270
|
+
export const quoteRequestDeliveryChannelSchema = z.enum([
|
|
271
|
+
'admin_in_app',
|
|
272
|
+
'admin_email',
|
|
273
|
+
'customer_email',
|
|
274
|
+
'customer_in_app',
|
|
275
|
+
'customer_push',
|
|
276
|
+
]);
|
|
277
|
+
export const quoteRequestDeliveryStatusSchema = z.enum([
|
|
278
|
+
'pending',
|
|
279
|
+
'sent',
|
|
280
|
+
'skipped_stale',
|
|
281
|
+
'skipped_module_off',
|
|
282
|
+
'skipped_deactivated',
|
|
283
|
+
'skipped_no_transport',
|
|
284
|
+
'skipped_logged',
|
|
285
|
+
'skipped_no_recipient',
|
|
286
|
+
'skipped_preference',
|
|
287
|
+
'skipped_no_subscription',
|
|
288
|
+
'failed',
|
|
289
|
+
]);
|
|
290
|
+
export const quoteRequestDeliverySchema = z
|
|
291
|
+
.object({
|
|
292
|
+
id: uuidSchema,
|
|
293
|
+
channel: quoteRequestDeliveryChannelSchema,
|
|
294
|
+
recipient: z
|
|
295
|
+
.object({
|
|
296
|
+
kind: z.enum(['admin', 'customer']),
|
|
297
|
+
id: uuidSchema,
|
|
298
|
+
displayName: z.string(),
|
|
299
|
+
})
|
|
300
|
+
.strict(),
|
|
301
|
+
status: quoteRequestDeliveryStatusSchema,
|
|
302
|
+
attempts: z.number().int().nonnegative(),
|
|
303
|
+
lastError: z.string().nullable(),
|
|
304
|
+
closedAt: isoDateTimeSchema.nullable(),
|
|
305
|
+
})
|
|
306
|
+
.strict();
|
|
262
307
|
export const quoteRequestHistoryEntrySchema = z.object({
|
|
263
308
|
/** Id of the first merged event. */
|
|
264
309
|
id: uuidSchema,
|
|
@@ -305,6 +350,11 @@ export const quoteRequestHistoryEntrySchema = z.object({
|
|
|
305
350
|
})
|
|
306
351
|
.nullable()
|
|
307
352
|
.optional(),
|
|
353
|
+
/**
|
|
354
|
+
* Feature 179 — admin history only: the notification deliveries whose source
|
|
355
|
+
* event is one of `eventIds`. Absent on the customer route (FR-071).
|
|
356
|
+
*/
|
|
357
|
+
deliveries: z.array(quoteRequestDeliverySchema).optional(),
|
|
308
358
|
});
|
|
309
359
|
/**
|
|
310
360
|
* How many of a quote request's most recent events its history is built from
|
|
@@ -542,6 +592,12 @@ export const quoteRequestSummarySchema = z.object({
|
|
|
542
592
|
*/
|
|
543
593
|
amount: quoteRequestAmountSchema.shape.amount.optional(),
|
|
544
594
|
agreement: quoteRequestAgreementSchema.optional(),
|
|
595
|
+
/**
|
|
596
|
+
* Issue #455 — `status` named in the response language, in this module's
|
|
597
|
+
* own wording (`QuoteRequestReadPort.statusName`), for another module's link
|
|
598
|
+
* picker to show. **Admin list only**; declared by issue #1270.
|
|
599
|
+
*/
|
|
600
|
+
statusName: z.string().optional(),
|
|
545
601
|
});
|
|
546
602
|
// ---------------------------------------------------------------------------
|
|
547
603
|
// Customer-facing request schemas
|
|
@@ -549,7 +605,7 @@ export const quoteRequestSummarySchema = z.object({
|
|
|
549
605
|
export const createQuoteRequestLineSchema = z.object({
|
|
550
606
|
productId: uuidSchema,
|
|
551
607
|
variantId: uuidSchema.optional(),
|
|
552
|
-
quantity:
|
|
608
|
+
quantity: lineQuantitySchema,
|
|
553
609
|
desiredUnitPrice: fourDecimalUnitPrice(z.number().finite().nonnegative()).optional(),
|
|
554
610
|
lineNote: z.string().max(2000).optional(),
|
|
555
611
|
/** Feature 043 — snapshot when the line was added as a packaging unit. */
|
|
@@ -565,12 +621,12 @@ export const createQuoteRequestLineSchema = z.object({
|
|
|
565
621
|
*/
|
|
566
622
|
export const createQuoteRequestSchema = z.object({
|
|
567
623
|
headerNote: z.string().max(2000).optional(),
|
|
568
|
-
items: z.array(createQuoteRequestLineSchema).min(1).max(
|
|
624
|
+
items: z.array(createQuoteRequestLineSchema).min(1).max(REQUEST_LINE_ITEMS_MAX),
|
|
569
625
|
});
|
|
570
626
|
export const patchQuoteRequestSchema = z
|
|
571
627
|
.object({
|
|
572
628
|
headerNote: z.string().max(2000).nullable().optional(),
|
|
573
|
-
items: z.array(createQuoteRequestLineSchema).min(1).max(
|
|
629
|
+
items: z.array(createQuoteRequestLineSchema).min(1).max(REQUEST_LINE_ITEMS_MAX).optional(),
|
|
574
630
|
})
|
|
575
631
|
.strict();
|
|
576
632
|
export const acceptRevisionSchema = z.object({
|
|
@@ -591,7 +647,7 @@ export const resubmitQuoteRequestSchema = z
|
|
|
591
647
|
export const adminCreateQuoteRequestLineSchema = z.object({
|
|
592
648
|
productId: uuidSchema,
|
|
593
649
|
variantId: uuidSchema.optional(),
|
|
594
|
-
quantity:
|
|
650
|
+
quantity: lineQuantitySchema,
|
|
595
651
|
agreedUnitPrice: fourDecimalUnitPrice(z.number().finite().nonnegative()),
|
|
596
652
|
lineNote: z.string().max(2000).optional(),
|
|
597
653
|
/** Feature 159 — the `groups[].key` this line belongs to; absent or `null` = ungrouped. */
|
|
@@ -605,7 +661,7 @@ export const adminCreateQuoteRequestSchema = z
|
|
|
605
661
|
/** Feature 159 — the new quote's groups in display order; lines name them by `groupKey`. */
|
|
606
662
|
groups: z.array(newLineGroupInputSchema).optional(),
|
|
607
663
|
/** In display order: each group's lines, then the ungrouped lines. */
|
|
608
|
-
items: z.array(adminCreateQuoteRequestLineSchema).min(1),
|
|
664
|
+
items: z.array(adminCreateQuoteRequestLineSchema).min(1).max(REQUEST_LINE_ITEMS_MAX),
|
|
609
665
|
expiresInDays: z.number().int().nonnegative().optional(),
|
|
610
666
|
/**
|
|
611
667
|
* Feature 163 (FR-018) — the sales channel the operator raises the request on:
|
|
@@ -623,6 +679,11 @@ export const adminCreateQuoteRequestSchema = z
|
|
|
623
679
|
* Not stored and not returned.
|
|
624
680
|
*/
|
|
625
681
|
origin: OriginReferenceSchema.optional(),
|
|
682
|
+
/**
|
|
683
|
+
* Feature 175 (FR-019) — the request's custom-field values, validated with
|
|
684
|
+
* the administrator's rules inside the creating Command.
|
|
685
|
+
*/
|
|
686
|
+
customFieldValues: customFieldValuesSchema.optional(),
|
|
626
687
|
})
|
|
627
688
|
.superRefine((body, ctx) => refineLineGrouping(ctx, body));
|
|
628
689
|
/**
|
|
@@ -645,7 +706,7 @@ export const adminPatchQuoteRequestLineSchema = z.object({
|
|
|
645
706
|
id: uuidSchema.optional(),
|
|
646
707
|
productId: uuidSchema,
|
|
647
708
|
variantId: uuidSchema.optional(),
|
|
648
|
-
quantity:
|
|
709
|
+
quantity: lineQuantitySchema,
|
|
649
710
|
agreedUnitPrice: fourDecimalUnitPrice(z.number().finite().nonnegative()).nullable().optional(),
|
|
650
711
|
lineNote: z.string().max(2000).nullable().optional(),
|
|
651
712
|
/** Feature 159 — the `groups[].key` this line belongs to; `null` = ungrouped. */
|
|
@@ -669,7 +730,7 @@ export const adminPatchQuoteRequestSchema = z
|
|
|
669
730
|
*/
|
|
670
731
|
groups: z.array(lineGroupInputSchema).optional(),
|
|
671
732
|
/** In display order: each group's lines, then the ungrouped lines. */
|
|
672
|
-
items: z.array(adminPatchQuoteRequestLineSchema).min(1).optional(),
|
|
733
|
+
items: z.array(adminPatchQuoteRequestLineSchema).min(1).max(REQUEST_LINE_ITEMS_MAX).optional(),
|
|
673
734
|
expiresInDays: z.number().int().nonnegative().optional(),
|
|
674
735
|
/** Feature 055 — custom-field values for this quote request (validated on write). */
|
|
675
736
|
customFieldValues: z.record(z.string(), z.unknown()).optional(),
|
|
@@ -22,13 +22,13 @@ import { z } from 'zod';
|
|
|
22
22
|
*/
|
|
23
23
|
export declare const RECORD_REFERENCE_TYPES: readonly ["product", "order", "admin_user", "quote_request", "task", "opportunity", "project"];
|
|
24
24
|
export declare const recordReferenceTypeSchema: z.ZodEnum<{
|
|
25
|
-
product: "product";
|
|
26
25
|
order: "order";
|
|
27
|
-
admin_user: "admin_user";
|
|
28
26
|
quote_request: "quote_request";
|
|
29
|
-
|
|
27
|
+
product: "product";
|
|
30
28
|
opportunity: "opportunity";
|
|
31
29
|
project: "project";
|
|
30
|
+
task: "task";
|
|
31
|
+
admin_user: "admin_user";
|
|
32
32
|
}>;
|
|
33
33
|
export type RecordReferenceType = z.infer<typeof recordReferenceTypeSchema>;
|
|
34
34
|
/**
|
|
@@ -82,13 +82,13 @@ export type RecordReferenceOrder = z.infer<typeof RecordReferenceOrderSchema>;
|
|
|
82
82
|
*/
|
|
83
83
|
export declare const RecordReferenceSchema: z.ZodObject<{
|
|
84
84
|
type: z.ZodEnum<{
|
|
85
|
-
product: "product";
|
|
86
85
|
order: "order";
|
|
87
|
-
admin_user: "admin_user";
|
|
88
86
|
quote_request: "quote_request";
|
|
89
|
-
|
|
87
|
+
product: "product";
|
|
90
88
|
opportunity: "opportunity";
|
|
91
89
|
project: "project";
|
|
90
|
+
task: "task";
|
|
91
|
+
admin_user: "admin_user";
|
|
92
92
|
}>;
|
|
93
93
|
id: z.ZodString;
|
|
94
94
|
available: z.ZodBoolean;
|
|
@@ -111,9 +111,9 @@ export declare const RECORD_DOCUMENT_KINDS: readonly ["order", "quote_request",
|
|
|
111
111
|
export declare const recordDocumentKindSchema: z.ZodEnum<{
|
|
112
112
|
order: "order";
|
|
113
113
|
quote_request: "quote_request";
|
|
114
|
-
task: "task";
|
|
115
114
|
opportunity: "opportunity";
|
|
116
115
|
project: "project";
|
|
116
|
+
task: "task";
|
|
117
117
|
}>;
|
|
118
118
|
export type RecordDocumentKind = z.infer<typeof recordDocumentKindSchema>;
|
|
119
119
|
export declare const RecordDocumentLookupItemSchema: z.ZodObject<{
|
|
@@ -126,9 +126,9 @@ export declare const RecordDocumentLookupGroupSchema: z.ZodObject<{
|
|
|
126
126
|
kind: z.ZodEnum<{
|
|
127
127
|
order: "order";
|
|
128
128
|
quote_request: "quote_request";
|
|
129
|
-
task: "task";
|
|
130
129
|
opportunity: "opportunity";
|
|
131
130
|
project: "project";
|
|
131
|
+
task: "task";
|
|
132
132
|
}>;
|
|
133
133
|
items: z.ZodArray<z.ZodObject<{
|
|
134
134
|
id: z.ZodString;
|
|
@@ -149,9 +149,9 @@ export declare const RecordDocumentLookupResponseSchema: z.ZodObject<{
|
|
|
149
149
|
kind: z.ZodEnum<{
|
|
150
150
|
order: "order";
|
|
151
151
|
quote_request: "quote_request";
|
|
152
|
-
task: "task";
|
|
153
152
|
opportunity: "opportunity";
|
|
154
153
|
project: "project";
|
|
154
|
+
task: "task";
|
|
155
155
|
}>;
|
|
156
156
|
items: z.ZodArray<z.ZodObject<{
|
|
157
157
|
id: z.ZodString;
|
|
@@ -179,13 +179,13 @@ export declare const RecordHistoryEntrySchema: z.ZodObject<{
|
|
|
179
179
|
after: z.ZodNullable<z.ZodUnknown>;
|
|
180
180
|
references: z.ZodArray<z.ZodObject<{
|
|
181
181
|
type: z.ZodEnum<{
|
|
182
|
-
product: "product";
|
|
183
182
|
order: "order";
|
|
184
|
-
admin_user: "admin_user";
|
|
185
183
|
quote_request: "quote_request";
|
|
186
|
-
|
|
184
|
+
product: "product";
|
|
187
185
|
opportunity: "opportunity";
|
|
188
186
|
project: "project";
|
|
187
|
+
task: "task";
|
|
188
|
+
admin_user: "admin_user";
|
|
189
189
|
}>;
|
|
190
190
|
id: z.ZodString;
|
|
191
191
|
available: z.ZodBoolean;
|
|
@@ -220,13 +220,13 @@ export declare const RecordHistoryPageSchema: z.ZodObject<{
|
|
|
220
220
|
after: z.ZodNullable<z.ZodUnknown>;
|
|
221
221
|
references: z.ZodArray<z.ZodObject<{
|
|
222
222
|
type: z.ZodEnum<{
|
|
223
|
-
product: "product";
|
|
224
223
|
order: "order";
|
|
225
|
-
admin_user: "admin_user";
|
|
226
224
|
quote_request: "quote_request";
|
|
227
|
-
|
|
225
|
+
product: "product";
|
|
228
226
|
opportunity: "opportunity";
|
|
229
227
|
project: "project";
|
|
228
|
+
task: "task";
|
|
229
|
+
admin_user: "admin_user";
|
|
230
230
|
}>;
|
|
231
231
|
id: z.ZodString;
|
|
232
232
|
available: z.ZodBoolean;
|
package/dist/returns.d.ts
CHANGED
|
@@ -847,6 +847,12 @@ export interface OrderReturnContext {
|
|
|
847
847
|
currency: string;
|
|
848
848
|
/** When the order entered its fulfilment-completing status; null if it has not. */
|
|
849
849
|
completingStatusEnteredAt: Date | null;
|
|
850
|
+
/**
|
|
851
|
+
* When the order was placed (`specs/177-tax-id-scope/`, FR-040): an
|
|
852
|
+
* organization converted from personal to company keeps a consumer's
|
|
853
|
+
* withdrawal right for an order placed before its `convertedToCompanyAt`.
|
|
854
|
+
*/
|
|
855
|
+
placedAt: Date;
|
|
850
856
|
/**
|
|
851
857
|
* The payment method the order was paid with (issue #905): a consumer's
|
|
852
858
|
* withdrawal is refunded by the same means of payment unless they agree
|
package/dist/returns.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { isoDateTimeSchema, uuidSchema } from './common.js';
|
|
3
3
|
import { twoDecimalAmount } from './money-input.js';
|
|
4
|
+
import { lineQuantitySchema, REQUEST_LINE_ITEMS_MAX } from './line-bounds.js';
|
|
4
5
|
/**
|
|
5
6
|
* Returns & Complaints (Refunds, RMA) — feature 046.
|
|
6
7
|
*
|
|
@@ -242,11 +243,12 @@ export const createReturnCaseRequestSchema = z.object({
|
|
|
242
243
|
lines: z
|
|
243
244
|
.array(z.object({
|
|
244
245
|
orderItemId: uuidSchema,
|
|
245
|
-
quantity:
|
|
246
|
+
quantity: lineQuantitySchema,
|
|
246
247
|
reasonId: uuidSchema,
|
|
247
248
|
description: z.string().max(2000).optional(),
|
|
248
249
|
}))
|
|
249
|
-
.min(1)
|
|
250
|
+
.min(1)
|
|
251
|
+
.max(REQUEST_LINE_ITEMS_MAX),
|
|
250
252
|
attachmentAssetIds: z.array(uuidSchema).optional(),
|
|
251
253
|
comment: z.string().max(2000).optional(),
|
|
252
254
|
});
|
package/dist/sales-channels.d.ts
CHANGED
|
@@ -198,9 +198,9 @@ export type SalesChannelListResponse = z.infer<typeof SalesChannelListResponseSc
|
|
|
198
198
|
/** Channel-scoped entity types tracked by the M:N membership service. */
|
|
199
199
|
export declare const ChannelMemberEntityTypeSchema: z.ZodEnum<{
|
|
200
200
|
customer: "customer";
|
|
201
|
-
product: "product";
|
|
202
201
|
category: "category";
|
|
203
202
|
organization: "organization";
|
|
203
|
+
product: "product";
|
|
204
204
|
"payment-method": "payment-method";
|
|
205
205
|
"delivery-method": "delivery-method";
|
|
206
206
|
tax: "tax";
|
|
@@ -209,7 +209,34 @@ export declare const ChannelMemberEntityTypeSchema: z.ZodEnum<{
|
|
|
209
209
|
"price-list": "price-list";
|
|
210
210
|
}>;
|
|
211
211
|
export type ChannelMemberEntityType = z.infer<typeof ChannelMemberEntityTypeSchema>;
|
|
212
|
-
/** `GET /api/v1/admin/sales-channels/{code}/{entityType}` —
|
|
212
|
+
/** `GET /api/v1/admin/sales-channels/{code}/{entityType}` — the ids of one entity type's members of a channel, paginated (`page` is 0-based). */
|
|
213
|
+
export declare const ChannelMemberIdListResponseSchema: z.ZodObject<{
|
|
214
|
+
salesChannelCode: z.ZodString;
|
|
215
|
+
entityType: z.ZodEnum<{
|
|
216
|
+
customer: "customer";
|
|
217
|
+
category: "category";
|
|
218
|
+
organization: "organization";
|
|
219
|
+
product: "product";
|
|
220
|
+
"payment-method": "payment-method";
|
|
221
|
+
"delivery-method": "delivery-method";
|
|
222
|
+
tax: "tax";
|
|
223
|
+
promotion: "promotion";
|
|
224
|
+
"cms-page": "cms-page";
|
|
225
|
+
"price-list": "price-list";
|
|
226
|
+
}>;
|
|
227
|
+
entityIds: z.ZodArray<z.ZodString>;
|
|
228
|
+
page: z.ZodNumber;
|
|
229
|
+
pageSize: z.ZodNumber;
|
|
230
|
+
total: z.ZodNumber;
|
|
231
|
+
}, z.core.$strip>;
|
|
232
|
+
export type ChannelMemberIdListResponse = z.infer<typeof ChannelMemberIdListResponseSchema>;
|
|
233
|
+
/**
|
|
234
|
+
* A `{ channels }` list of channel summaries. No route answers this shape; the
|
|
235
|
+
* entity-side list is {@link EntityMembershipListResponseSchema}.
|
|
236
|
+
*
|
|
237
|
+
* @deprecated Since issue #1160 — it never described the route it names: that route answers
|
|
238
|
+
* {@link ChannelMemberIdListResponseSchema}. Kept for one minor release, then removed (issue #1162).
|
|
239
|
+
*/
|
|
213
240
|
export declare const ChannelMembershipListResponseSchema: z.ZodObject<{
|
|
214
241
|
channels: z.ZodArray<z.ZodObject<{
|
|
215
242
|
id: z.ZodString;
|
|
@@ -228,14 +255,18 @@ export declare const ChannelMembershipListResponseSchema: z.ZodObject<{
|
|
|
228
255
|
updatedAt: z.ZodString;
|
|
229
256
|
}, z.core.$strip>>;
|
|
230
257
|
}, z.core.$strip>;
|
|
258
|
+
/**
|
|
259
|
+
* @deprecated Since issue #1160 — it never described the route it names: that route answers
|
|
260
|
+
* {@link ChannelMemberIdListResponse}. Kept for one minor release, then removed (issue #1162).
|
|
261
|
+
*/
|
|
231
262
|
export type ChannelMembershipListResponse = z.infer<typeof ChannelMembershipListResponseSchema>;
|
|
232
263
|
/** `GET /api/v1/admin/{entityType}/{id}/sales-channels` — list channels of an entity. */
|
|
233
264
|
export declare const EntityMembershipListResponseSchema: z.ZodObject<{
|
|
234
265
|
entityType: z.ZodEnum<{
|
|
235
266
|
customer: "customer";
|
|
236
|
-
product: "product";
|
|
237
267
|
category: "category";
|
|
238
268
|
organization: "organization";
|
|
269
|
+
product: "product";
|
|
239
270
|
"payment-method": "payment-method";
|
|
240
271
|
"delivery-method": "delivery-method";
|
|
241
272
|
tax: "tax";
|
package/dist/sales-channels.js
CHANGED
|
@@ -235,7 +235,22 @@ export const ChannelMemberEntityTypeSchema = z.enum([
|
|
|
235
235
|
// Feature 160 (D-287 P1) — a price book's channel set, `sales_channel_price_lists`.
|
|
236
236
|
'price-list',
|
|
237
237
|
]);
|
|
238
|
-
/** `GET /api/v1/admin/sales-channels/{code}/{entityType}` —
|
|
238
|
+
/** `GET /api/v1/admin/sales-channels/{code}/{entityType}` — the ids of one entity type's members of a channel, paginated (`page` is 0-based). */
|
|
239
|
+
export const ChannelMemberIdListResponseSchema = z.object({
|
|
240
|
+
salesChannelCode: SalesChannelCodeSchema,
|
|
241
|
+
entityType: ChannelMemberEntityTypeSchema,
|
|
242
|
+
entityIds: z.array(uuidSchema),
|
|
243
|
+
page: z.number().int().nonnegative(),
|
|
244
|
+
pageSize: z.number().int().positive(),
|
|
245
|
+
total: z.number().int().nonnegative(),
|
|
246
|
+
});
|
|
247
|
+
/**
|
|
248
|
+
* A `{ channels }` list of channel summaries. No route answers this shape; the
|
|
249
|
+
* entity-side list is {@link EntityMembershipListResponseSchema}.
|
|
250
|
+
*
|
|
251
|
+
* @deprecated Since issue #1160 — it never described the route it names: that route answers
|
|
252
|
+
* {@link ChannelMemberIdListResponseSchema}. Kept for one minor release, then removed (issue #1162).
|
|
253
|
+
*/
|
|
239
254
|
export const ChannelMembershipListResponseSchema = z.object({
|
|
240
255
|
channels: z.array(SalesChannelSummarySchema),
|
|
241
256
|
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { CUSTOM_FIELD_HOST_BINDINGS } from './custom-fields.js';
|
|
3
|
+
/**
|
|
4
|
+
* Declared extension columns on core tables (`specs/178-extensible-columns/`)
|
|
5
|
+
* — the wire half (FR-050, data-model §7).
|
|
6
|
+
*
|
|
7
|
+
* An installed module package may declare additive `x_<moduleId>_*` columns on
|
|
8
|
+
* a custom-field host table. The declaration API, the generated DDL and the
|
|
9
|
+
* accessor are `@endora-commerce/platform/kernel`'s; what lives here is what a
|
|
10
|
+
* consumer of an admin read sees: the `?extensions=` query parameter and the
|
|
11
|
+
* `extensions` attribute a host record gains when it names a module.
|
|
12
|
+
*/
|
|
13
|
+
/** A table an extension may declare columns on — derived from {@link CUSTOM_FIELD_HOST_BINDINGS}. */
|
|
14
|
+
export type ExtensibleHostTable = (typeof CUSTOM_FIELD_HOST_BINDINGS)[keyof typeof CUSTOM_FIELD_HOST_BINDINGS]['table'];
|
|
15
|
+
/**
|
|
16
|
+
* Every extensible host table, derived and never listed (OD-15): every
|
|
17
|
+
* custom-field host table is extensible. Which of them the platform has rolled
|
|
18
|
+
* out is the platform's, not this package's.
|
|
19
|
+
*/
|
|
20
|
+
export declare const EXTENSIBLE_HOST_TABLES: readonly ExtensibleHostTable[];
|
|
21
|
+
/**
|
|
22
|
+
* `?extensions=<moduleId>[,<moduleId>…]`, at most eight, merged into an
|
|
23
|
+
* extensible host's admin detail and list query schemas (FR-051).
|
|
24
|
+
*/
|
|
25
|
+
export declare const ExtensionsQuerySchema: z.ZodObject<{
|
|
26
|
+
extensions: z.ZodOptional<z.ZodString>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export type ExtensionsQuery = z.infer<typeof ExtensionsQuerySchema>;
|
|
29
|
+
/**
|
|
30
|
+
* `extensions` on a host record: per requested module, its declared keys and
|
|
31
|
+
* their values. Present only when the request named the module and the module
|
|
32
|
+
* exposes the host on admin reads (FR-052).
|
|
33
|
+
*/
|
|
34
|
+
export declare const ExtensionAttributesSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
35
|
+
export type ExtensionAttributes = z.infer<typeof ExtensionAttributesSchema>;
|
|
36
|
+
//# sourceMappingURL=schema-extensions.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { CUSTOM_FIELD_HOST_BINDINGS } from './custom-fields.js';
|
|
3
|
+
/**
|
|
4
|
+
* Every extensible host table, derived and never listed (OD-15): every
|
|
5
|
+
* custom-field host table is extensible. Which of them the platform has rolled
|
|
6
|
+
* out is the platform's, not this package's.
|
|
7
|
+
*/
|
|
8
|
+
export const EXTENSIBLE_HOST_TABLES = [
|
|
9
|
+
...new Set(Object.values(CUSTOM_FIELD_HOST_BINDINGS).map((binding) => binding.table)),
|
|
10
|
+
];
|
|
11
|
+
/** A module id as an extension names it — the manifest id grammar without a leading underscore. */
|
|
12
|
+
const extensionModuleIdSchema = z.string().regex(/^[a-z][a-z0-9_]*$/);
|
|
13
|
+
/**
|
|
14
|
+
* `?extensions=<moduleId>[,<moduleId>…]`, at most eight, merged into an
|
|
15
|
+
* extensible host's admin detail and list query schemas (FR-051).
|
|
16
|
+
*/
|
|
17
|
+
export const ExtensionsQuerySchema = z.object({
|
|
18
|
+
extensions: z
|
|
19
|
+
.string()
|
|
20
|
+
.regex(/^[a-z][a-z0-9_]*(,[a-z][a-z0-9_]*){0,7}$/)
|
|
21
|
+
.optional(),
|
|
22
|
+
});
|
|
23
|
+
/**
|
|
24
|
+
* `extensions` on a host record: per requested module, its declared keys and
|
|
25
|
+
* their values. Present only when the request named the module and the module
|
|
26
|
+
* exposes the host on admin reads (FR-052).
|
|
27
|
+
*/
|
|
28
|
+
export const ExtensionAttributesSchema = z.record(extensionModuleIdSchema, z.record(z.string(), z.json()));
|
|
29
|
+
//# sourceMappingURL=schema-extensions.js.map
|
package/dist/seo.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ import type { ScopedWriteOp } from './scoped-write-encoding.js';
|
|
|
9
9
|
* renders public pages for can carry meta overrides.
|
|
10
10
|
*/
|
|
11
11
|
export declare const seoEntityTypeSchema: z.ZodEnum<{
|
|
12
|
-
product: "product";
|
|
13
12
|
category: "category";
|
|
13
|
+
product: "product";
|
|
14
14
|
cms_page: "cms_page";
|
|
15
15
|
}>;
|
|
16
16
|
export type SeoEntityType = z.infer<typeof seoEntityTypeSchema>;
|
|
@@ -32,8 +32,8 @@ export type ResolvedMeta = z.infer<typeof resolvedMetaSchema>;
|
|
|
32
32
|
export declare const seoMetaOverrideSchema: z.ZodObject<{
|
|
33
33
|
id: z.ZodString;
|
|
34
34
|
entityType: z.ZodEnum<{
|
|
35
|
-
product: "product";
|
|
36
35
|
category: "category";
|
|
36
|
+
product: "product";
|
|
37
37
|
cms_page: "cms_page";
|
|
38
38
|
}>;
|
|
39
39
|
entityId: z.ZodString;
|
package/dist/settings.d.ts
CHANGED
|
@@ -275,6 +275,47 @@ export declare const SettingsListResponseSchema: z.ZodObject<{
|
|
|
275
275
|
}, z.core.$strip>>;
|
|
276
276
|
}, z.core.$strip>>;
|
|
277
277
|
}, z.core.$strip>;
|
|
278
|
+
export type SettingsListResponse = z.infer<typeof SettingsListResponseSchema>;
|
|
279
|
+
/**
|
|
280
|
+
* A setting group without its settings — the reply to `POST
|
|
281
|
+
* /api/v1/admin/settings/groups` and `PATCH /api/v1/admin/settings/groups/:code`
|
|
282
|
+
* (issue #599).
|
|
283
|
+
*/
|
|
284
|
+
export declare const SettingGroupSummaryDtoSchema: z.ZodObject<{
|
|
285
|
+
id: z.ZodUUID;
|
|
286
|
+
code: z.ZodString;
|
|
287
|
+
name: z.ZodString;
|
|
288
|
+
ownerModule: z.ZodString;
|
|
289
|
+
salesChannelCodes: z.ZodArray<z.ZodString>;
|
|
290
|
+
isSystemProtected: z.ZodBoolean;
|
|
291
|
+
}, z.core.$strip>;
|
|
292
|
+
export type SettingGroupSummaryDto = z.infer<typeof SettingGroupSummaryDtoSchema>;
|
|
293
|
+
/** One row of `GET /api/v1/admin/settings/groups`: the group, how many settings it holds, and when it last changed. */
|
|
294
|
+
export declare const SettingGroupRowDtoSchema: z.ZodObject<{
|
|
295
|
+
id: z.ZodUUID;
|
|
296
|
+
code: z.ZodString;
|
|
297
|
+
name: z.ZodString;
|
|
298
|
+
ownerModule: z.ZodString;
|
|
299
|
+
salesChannelCodes: z.ZodArray<z.ZodString>;
|
|
300
|
+
isSystemProtected: z.ZodBoolean;
|
|
301
|
+
settingCount: z.ZodNumber;
|
|
302
|
+
updatedAt: z.ZodISODateTime;
|
|
303
|
+
}, z.core.$strip>;
|
|
304
|
+
export type SettingGroupRowDto = z.infer<typeof SettingGroupRowDtoSchema>;
|
|
305
|
+
/** `GET /api/v1/admin/settings/groups` — every group, without its settings (issue #599). */
|
|
306
|
+
export declare const SettingGroupRowsResponseSchema: z.ZodObject<{
|
|
307
|
+
groups: z.ZodArray<z.ZodObject<{
|
|
308
|
+
id: z.ZodUUID;
|
|
309
|
+
code: z.ZodString;
|
|
310
|
+
name: z.ZodString;
|
|
311
|
+
ownerModule: z.ZodString;
|
|
312
|
+
salesChannelCodes: z.ZodArray<z.ZodString>;
|
|
313
|
+
isSystemProtected: z.ZodBoolean;
|
|
314
|
+
settingCount: z.ZodNumber;
|
|
315
|
+
updatedAt: z.ZodISODateTime;
|
|
316
|
+
}, z.core.$strip>>;
|
|
317
|
+
}, z.core.$strip>;
|
|
318
|
+
export type SettingGroupRowsResponse = z.infer<typeof SettingGroupRowsResponseSchema>;
|
|
278
319
|
export declare const SettingsListQuerySchema: z.ZodObject<{
|
|
279
320
|
groupCode: z.ZodOptional<z.ZodString>;
|
|
280
321
|
}, z.core.$strip>;
|
|
@@ -351,6 +392,7 @@ export declare const SettingDetailResponseSchema: z.ZodObject<{
|
|
|
351
392
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
352
393
|
}, z.core.$strip>>;
|
|
353
394
|
}, z.core.$strip>;
|
|
395
|
+
export type SettingDetailResponse = z.infer<typeof SettingDetailResponseSchema>;
|
|
354
396
|
/**
|
|
355
397
|
* Public shop / company contact information resolved for the active sales
|
|
356
398
|
* channel. Backs the storefront footer, the 404 "need help?" block and the
|
|
@@ -439,8 +481,8 @@ export type HomepageConfigResponse = z.infer<typeof HomepageConfigResponseSchema
|
|
|
439
481
|
/**
|
|
440
482
|
* The reporting time zone: the calendar in which a report counts a day, a
|
|
441
483
|
* month or any other range of days. A setting of the `analytics` module, so
|
|
442
|
-
* that no single reporting module owns it — Projects
|
|
443
|
-
*
|
|
484
|
+
* that no single reporting module owns it — Projects and CRM analytics read
|
|
485
|
+
* it (#474). An IANA name; default `UTC`. Read it through
|
|
444
486
|
* {@link ReportingTimeZonePort}, never by code: `analytics` can be switched
|
|
445
487
|
* off, and a reader then counts in `UTC`.
|
|
446
488
|
*/
|
package/dist/settings.js
CHANGED
|
@@ -293,6 +293,21 @@ export const SettingGroupDtoSchema = z.object({
|
|
|
293
293
|
export const SettingsListResponseSchema = z.object({
|
|
294
294
|
groups: z.array(SettingGroupDtoSchema),
|
|
295
295
|
});
|
|
296
|
+
/**
|
|
297
|
+
* A setting group without its settings — the reply to `POST
|
|
298
|
+
* /api/v1/admin/settings/groups` and `PATCH /api/v1/admin/settings/groups/:code`
|
|
299
|
+
* (issue #599).
|
|
300
|
+
*/
|
|
301
|
+
export const SettingGroupSummaryDtoSchema = SettingGroupDtoSchema.omit({ settings: true });
|
|
302
|
+
/** One row of `GET /api/v1/admin/settings/groups`: the group, how many settings it holds, and when it last changed. */
|
|
303
|
+
export const SettingGroupRowDtoSchema = SettingGroupSummaryDtoSchema.extend({
|
|
304
|
+
settingCount: z.number().int().nonnegative(),
|
|
305
|
+
updatedAt: z.iso.datetime(),
|
|
306
|
+
});
|
|
307
|
+
/** `GET /api/v1/admin/settings/groups` — every group, without its settings (issue #599). */
|
|
308
|
+
export const SettingGroupRowsResponseSchema = z.object({
|
|
309
|
+
groups: z.array(SettingGroupRowDtoSchema),
|
|
310
|
+
});
|
|
296
311
|
export const SettingsListQuerySchema = z.object({
|
|
297
312
|
groupCode: z.string().optional(),
|
|
298
313
|
});
|
|
@@ -401,8 +416,8 @@ export const HomepageConfigResponseSchema = z.object({ data: HomepageConfigSchem
|
|
|
401
416
|
/**
|
|
402
417
|
* The reporting time zone: the calendar in which a report counts a day, a
|
|
403
418
|
* month or any other range of days. A setting of the `analytics` module, so
|
|
404
|
-
* that no single reporting module owns it — Projects
|
|
405
|
-
*
|
|
419
|
+
* that no single reporting module owns it — Projects and CRM analytics read
|
|
420
|
+
* it (#474). An IANA name; default `UTC`. Read it through
|
|
406
421
|
* {@link ReportingTimeZonePort}, never by code: `analytics` can be switched
|
|
407
422
|
* off, and a reader then counts in `UTC`.
|
|
408
423
|
*/
|
package/dist/shopping-lists.d.ts
CHANGED
|
@@ -44,6 +44,29 @@ export declare const shoppingListSchema: z.ZodObject<{
|
|
|
44
44
|
updatedAt: z.ZodString;
|
|
45
45
|
}, z.core.$strip>;
|
|
46
46
|
export type ShoppingList = z.infer<typeof shoppingListSchema>;
|
|
47
|
+
/** `GET /api/v1/shopping-lists` — the signed-in customer's lists, each with its items (issue #599). */
|
|
48
|
+
export declare const shoppingListListResponseSchema: z.ZodObject<{
|
|
49
|
+
data: z.ZodArray<z.ZodObject<{
|
|
50
|
+
id: z.ZodString;
|
|
51
|
+
organizationId: z.ZodString;
|
|
52
|
+
customerAccountId: z.ZodString;
|
|
53
|
+
name: z.ZodString;
|
|
54
|
+
isDefault: z.ZodBoolean;
|
|
55
|
+
items: z.ZodArray<z.ZodObject<{
|
|
56
|
+
id: z.ZodString;
|
|
57
|
+
shoppingListId: z.ZodString;
|
|
58
|
+
productId: z.ZodString;
|
|
59
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
60
|
+
quantity: z.ZodNumber;
|
|
61
|
+
note: z.ZodNullable<z.ZodString>;
|
|
62
|
+
createdAt: z.ZodString;
|
|
63
|
+
updatedAt: z.ZodString;
|
|
64
|
+
}, z.core.$strip>>;
|
|
65
|
+
createdAt: z.ZodString;
|
|
66
|
+
updatedAt: z.ZodString;
|
|
67
|
+
}, z.core.$strip>>;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
export type ShoppingListListResponse = z.infer<typeof shoppingListListResponseSchema>;
|
|
47
70
|
/**
|
|
48
71
|
* The name `shopping_lists` stores on the default list it creates for every
|
|
49
72
|
* customer (at registration, or on the first default-list read). It is data,
|
|
@@ -80,6 +103,21 @@ export declare const renameShoppingListRequestSchema: z.ZodObject<{
|
|
|
80
103
|
name: z.ZodString;
|
|
81
104
|
}, z.core.$strict>;
|
|
82
105
|
export type RenameShoppingListRequest = z.infer<typeof renameShoppingListRequestSchema>;
|
|
106
|
+
/**
|
|
107
|
+
* Issue #1251 — `PATCH /api/v1/shopping-lists/:id`: the list's name, the quantities of any of
|
|
108
|
+
* its lines, or both, written together or not at all — the one *Save changes* of the
|
|
109
|
+
* storefront list page. Every body {@link renameShoppingListRequestSchema} accepts is accepted
|
|
110
|
+
* here. A line appears once, at most {@link REQUEST_LINE_ITEMS_MAX} of them; a line that is
|
|
111
|
+
* not on the list refuses the whole write.
|
|
112
|
+
*/
|
|
113
|
+
export declare const updateShoppingListRequestSchema: z.ZodObject<{
|
|
114
|
+
name: z.ZodOptional<z.ZodString>;
|
|
115
|
+
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
116
|
+
id: z.ZodString;
|
|
117
|
+
quantity: z.ZodNumber;
|
|
118
|
+
}, z.core.$strict>>>;
|
|
119
|
+
}, z.core.$strict>;
|
|
120
|
+
export type UpdateShoppingListRequest = z.infer<typeof updateShoppingListRequestSchema>;
|
|
83
121
|
export declare const addShoppingListItemRequestSchema: z.ZodObject<{
|
|
84
122
|
productId: z.ZodString;
|
|
85
123
|
variantId: z.ZodOptional<z.ZodString>;
|
|
@@ -149,7 +187,7 @@ export declare const convertToCartResponseSchema: z.ZodObject<{
|
|
|
149
187
|
export type ConvertToCartResponse = z.infer<typeof convertToCartResponseSchema>;
|
|
150
188
|
export declare const convertToRfqResponseSchema: z.ZodObject<{
|
|
151
189
|
shoppingListId: z.ZodString;
|
|
152
|
-
rfqId: z.ZodString
|
|
190
|
+
rfqId: z.ZodNullable<z.ZodString>;
|
|
153
191
|
added: z.ZodNumber;
|
|
154
192
|
skipped: z.ZodArray<z.ZodObject<{
|
|
155
193
|
itemId: z.ZodString;
|