@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/credit-limits.js
CHANGED
|
@@ -13,6 +13,13 @@ export const creditLimitReservationReleaseReasonSchema = z.enum([
|
|
|
13
13
|
]);
|
|
14
14
|
export const creditLimitViewSchema = z.object({
|
|
15
15
|
organizationId: uuidSchema,
|
|
16
|
+
/**
|
|
17
|
+
* The organization's name, for the admin roster and detail; `null` when the
|
|
18
|
+
* organization cannot be read, and always `null` on the customer's own
|
|
19
|
+
* `GET /api/v1/me/credit-limit`. Answered since the admin roster shipped and
|
|
20
|
+
* declared here only by issue #599; optional for a client that predates it.
|
|
21
|
+
*/
|
|
22
|
+
organizationName: z.string().nullable().optional(),
|
|
16
23
|
grantedAmount: z.number().finite().nonnegative(),
|
|
17
24
|
availableAmount: z.number().finite(),
|
|
18
25
|
currency: z.string().length(3),
|
|
@@ -32,11 +39,25 @@ export const creditLimitViewSchema = z.object({
|
|
|
32
39
|
*/
|
|
33
40
|
activeReservations: z.array(z.object({
|
|
34
41
|
orderId: uuidSchema,
|
|
42
|
+
/**
|
|
43
|
+
* The order's customer-facing number (`businessId`, the one the buyer's
|
|
44
|
+
* order list shows), so neither the storefront (issue #661) nor the admin
|
|
45
|
+
* credit-limit screen (issue #1178) shows the database id. Answered by
|
|
46
|
+
* the customer's `GET /api/v1/me/credit-limit` and by the admin list,
|
|
47
|
+
* detail and adjustment replies; omitted from a fresh grant's reply,
|
|
48
|
+
* which holds no reservation. `null` when `orders` returned no such
|
|
49
|
+
* order; optional for a server that predates it.
|
|
50
|
+
*/
|
|
51
|
+
orderBusinessId: z.string().nullable().optional(),
|
|
35
52
|
amount: z.number().finite(),
|
|
36
53
|
createdAt: isoDateTimeSchema,
|
|
37
54
|
})),
|
|
38
55
|
grantedAt: isoDateTimeSchema,
|
|
39
56
|
});
|
|
57
|
+
/** `GET /api/v1/admin/credit-limits` — every granted credit limit (issue #599). */
|
|
58
|
+
export const creditLimitListResponseSchema = z.object({
|
|
59
|
+
data: z.array(creditLimitViewSchema),
|
|
60
|
+
});
|
|
40
61
|
export const grantCreditLimitRequestSchema = z.object({
|
|
41
62
|
grantedAmount: twoDecimalAmount(z.number().finite().positive()),
|
|
42
63
|
currency: z.string().length(3),
|
package/dist/crm.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import type { SupportedLanguage } from './platform-language.js';
|
|
2
3
|
import { type RecordReferenceType } from './record-references.js';
|
|
3
4
|
/**
|
|
4
5
|
* CRM — Sales Opportunities (`specs/143-crm-sales-opportunities/`).
|
|
@@ -68,8 +69,8 @@ export declare const propagationOutcomeKindSchema: z.ZodEnum<{
|
|
|
68
69
|
pending: "pending";
|
|
69
70
|
failed: "failed";
|
|
70
71
|
skipped: "skipped";
|
|
71
|
-
applied: "applied";
|
|
72
72
|
not_found: "not_found";
|
|
73
|
+
applied: "applied";
|
|
73
74
|
already_there: "already_there";
|
|
74
75
|
unknown_status: "unknown_status";
|
|
75
76
|
not_permitted: "not_permitted";
|
|
@@ -88,13 +89,13 @@ export type OpportunityCommentKind = z.infer<typeof opportunityCommentKindSchema
|
|
|
88
89
|
* Request and a Task. An alias, not a copy: CRM and Projects read one grammar.
|
|
89
90
|
*/
|
|
90
91
|
export declare const opportunityReferenceTypeSchema: z.ZodEnum<{
|
|
91
|
-
product: "product";
|
|
92
92
|
order: "order";
|
|
93
|
-
admin_user: "admin_user";
|
|
94
93
|
quote_request: "quote_request";
|
|
95
|
-
|
|
94
|
+
product: "product";
|
|
96
95
|
opportunity: "opportunity";
|
|
97
96
|
project: "project";
|
|
97
|
+
task: "task";
|
|
98
|
+
admin_user: "admin_user";
|
|
98
99
|
}>;
|
|
99
100
|
export type OpportunityReferenceType = RecordReferenceType;
|
|
100
101
|
/** The six `QuoteRequestStatus` values — a fixed union, unlike Order statuses. */
|
|
@@ -140,10 +141,10 @@ export declare const opportunityBoardFieldKindSchema: z.ZodEnum<{
|
|
|
140
141
|
date: "date";
|
|
141
142
|
text: "text";
|
|
142
143
|
contact: "contact";
|
|
143
|
-
|
|
144
|
+
organization: "organization";
|
|
144
145
|
select: "select";
|
|
146
|
+
multiselect: "multiselect";
|
|
145
147
|
tags: "tags";
|
|
146
|
-
organization: "organization";
|
|
147
148
|
salesChannel: "salesChannel";
|
|
148
149
|
assignee: "assignee";
|
|
149
150
|
money: "money";
|
|
@@ -162,10 +163,10 @@ export declare const OpportunityBoardCardFieldSchema: z.ZodObject<{
|
|
|
162
163
|
date: "date";
|
|
163
164
|
text: "text";
|
|
164
165
|
contact: "contact";
|
|
165
|
-
|
|
166
|
+
organization: "organization";
|
|
166
167
|
select: "select";
|
|
168
|
+
multiselect: "multiselect";
|
|
167
169
|
tags: "tags";
|
|
168
|
-
organization: "organization";
|
|
169
170
|
salesChannel: "salesChannel";
|
|
170
171
|
assignee: "assignee";
|
|
171
172
|
money: "money";
|
|
@@ -197,10 +198,10 @@ export declare const OpportunityBoardCardConfigSchema: z.ZodObject<{
|
|
|
197
198
|
date: "date";
|
|
198
199
|
text: "text";
|
|
199
200
|
contact: "contact";
|
|
200
|
-
|
|
201
|
+
organization: "organization";
|
|
201
202
|
select: "select";
|
|
203
|
+
multiselect: "multiselect";
|
|
202
204
|
tags: "tags";
|
|
203
|
-
organization: "organization";
|
|
204
205
|
salesChannel: "salesChannel";
|
|
205
206
|
assignee: "assignee";
|
|
206
207
|
money: "money";
|
|
@@ -226,10 +227,10 @@ export declare const OpportunityBoardCardConfigSchema: z.ZodObject<{
|
|
|
226
227
|
date: "date";
|
|
227
228
|
text: "text";
|
|
228
229
|
contact: "contact";
|
|
229
|
-
|
|
230
|
+
organization: "organization";
|
|
230
231
|
select: "select";
|
|
232
|
+
multiselect: "multiselect";
|
|
231
233
|
tags: "tags";
|
|
232
|
-
organization: "organization";
|
|
233
234
|
salesChannel: "salesChannel";
|
|
234
235
|
assignee: "assignee";
|
|
235
236
|
money: "money";
|
|
@@ -260,10 +261,10 @@ export declare const OpportunityBoardCardConfigResponseSchema: z.ZodObject<{
|
|
|
260
261
|
date: "date";
|
|
261
262
|
text: "text";
|
|
262
263
|
contact: "contact";
|
|
263
|
-
|
|
264
|
+
organization: "organization";
|
|
264
265
|
select: "select";
|
|
266
|
+
multiselect: "multiselect";
|
|
265
267
|
tags: "tags";
|
|
266
|
-
organization: "organization";
|
|
267
268
|
salesChannel: "salesChannel";
|
|
268
269
|
assignee: "assignee";
|
|
269
270
|
money: "money";
|
|
@@ -289,10 +290,10 @@ export declare const OpportunityBoardCardConfigResponseSchema: z.ZodObject<{
|
|
|
289
290
|
date: "date";
|
|
290
291
|
text: "text";
|
|
291
292
|
contact: "contact";
|
|
292
|
-
|
|
293
|
+
organization: "organization";
|
|
293
294
|
select: "select";
|
|
295
|
+
multiselect: "multiselect";
|
|
294
296
|
tags: "tags";
|
|
295
|
-
organization: "organization";
|
|
296
297
|
salesChannel: "salesChannel";
|
|
297
298
|
assignee: "assignee";
|
|
298
299
|
money: "money";
|
|
@@ -543,8 +544,8 @@ export declare const PropagationOutcomeSchema: z.ZodObject<{
|
|
|
543
544
|
outcome: z.ZodEnum<{
|
|
544
545
|
failed: "failed";
|
|
545
546
|
skipped: "skipped";
|
|
546
|
-
applied: "applied";
|
|
547
547
|
not_found: "not_found";
|
|
548
|
+
applied: "applied";
|
|
548
549
|
already_there: "already_there";
|
|
549
550
|
unknown_status: "unknown_status";
|
|
550
551
|
not_permitted: "not_permitted";
|
|
@@ -610,13 +611,13 @@ export declare const OpportunityDetailSchema: z.ZodObject<{
|
|
|
610
611
|
description: z.ZodNullable<z.ZodString>;
|
|
611
612
|
references: z.ZodArray<z.ZodObject<{
|
|
612
613
|
type: z.ZodEnum<{
|
|
613
|
-
product: "product";
|
|
614
614
|
order: "order";
|
|
615
|
-
admin_user: "admin_user";
|
|
616
615
|
quote_request: "quote_request";
|
|
617
|
-
|
|
616
|
+
product: "product";
|
|
618
617
|
opportunity: "opportunity";
|
|
619
618
|
project: "project";
|
|
619
|
+
task: "task";
|
|
620
|
+
admin_user: "admin_user";
|
|
620
621
|
}>;
|
|
621
622
|
id: z.ZodString;
|
|
622
623
|
available: z.ZodBoolean;
|
|
@@ -699,8 +700,8 @@ export declare const OpportunityDetailSchema: z.ZodObject<{
|
|
|
699
700
|
outcome: z.ZodEnum<{
|
|
700
701
|
failed: "failed";
|
|
701
702
|
skipped: "skipped";
|
|
702
|
-
applied: "applied";
|
|
703
703
|
not_found: "not_found";
|
|
704
|
+
applied: "applied";
|
|
704
705
|
already_there: "already_there";
|
|
705
706
|
unknown_status: "unknown_status";
|
|
706
707
|
not_permitted: "not_permitted";
|
|
@@ -764,13 +765,13 @@ export declare const OpportunityTransitionResultSchema: z.ZodObject<{
|
|
|
764
765
|
description: z.ZodNullable<z.ZodString>;
|
|
765
766
|
references: z.ZodArray<z.ZodObject<{
|
|
766
767
|
type: z.ZodEnum<{
|
|
767
|
-
product: "product";
|
|
768
768
|
order: "order";
|
|
769
|
-
admin_user: "admin_user";
|
|
770
769
|
quote_request: "quote_request";
|
|
771
|
-
|
|
770
|
+
product: "product";
|
|
772
771
|
opportunity: "opportunity";
|
|
773
772
|
project: "project";
|
|
773
|
+
task: "task";
|
|
774
|
+
admin_user: "admin_user";
|
|
774
775
|
}>;
|
|
775
776
|
id: z.ZodString;
|
|
776
777
|
available: z.ZodBoolean;
|
|
@@ -853,8 +854,8 @@ export declare const OpportunityTransitionResultSchema: z.ZodObject<{
|
|
|
853
854
|
outcome: z.ZodEnum<{
|
|
854
855
|
failed: "failed";
|
|
855
856
|
skipped: "skipped";
|
|
856
|
-
applied: "applied";
|
|
857
857
|
not_found: "not_found";
|
|
858
|
+
applied: "applied";
|
|
858
859
|
already_there: "already_there";
|
|
859
860
|
unknown_status: "unknown_status";
|
|
860
861
|
not_permitted: "not_permitted";
|
|
@@ -883,8 +884,8 @@ export declare const OpportunityTransitionResultSchema: z.ZodObject<{
|
|
|
883
884
|
outcome: z.ZodEnum<{
|
|
884
885
|
failed: "failed";
|
|
885
886
|
skipped: "skipped";
|
|
886
|
-
applied: "applied";
|
|
887
887
|
not_found: "not_found";
|
|
888
|
+
applied: "applied";
|
|
888
889
|
already_there: "already_there";
|
|
889
890
|
unknown_status: "unknown_status";
|
|
890
891
|
not_permitted: "not_permitted";
|
|
@@ -1042,13 +1043,13 @@ export declare const OpportunityDetailResponseSchema: z.ZodObject<{
|
|
|
1042
1043
|
description: z.ZodNullable<z.ZodString>;
|
|
1043
1044
|
references: z.ZodArray<z.ZodObject<{
|
|
1044
1045
|
type: z.ZodEnum<{
|
|
1045
|
-
product: "product";
|
|
1046
1046
|
order: "order";
|
|
1047
|
-
admin_user: "admin_user";
|
|
1048
1047
|
quote_request: "quote_request";
|
|
1049
|
-
|
|
1048
|
+
product: "product";
|
|
1050
1049
|
opportunity: "opportunity";
|
|
1051
1050
|
project: "project";
|
|
1051
|
+
task: "task";
|
|
1052
|
+
admin_user: "admin_user";
|
|
1052
1053
|
}>;
|
|
1053
1054
|
id: z.ZodString;
|
|
1054
1055
|
available: z.ZodBoolean;
|
|
@@ -1131,8 +1132,8 @@ export declare const OpportunityDetailResponseSchema: z.ZodObject<{
|
|
|
1131
1132
|
outcome: z.ZodEnum<{
|
|
1132
1133
|
failed: "failed";
|
|
1133
1134
|
skipped: "skipped";
|
|
1134
|
-
applied: "applied";
|
|
1135
1135
|
not_found: "not_found";
|
|
1136
|
+
applied: "applied";
|
|
1136
1137
|
already_there: "already_there";
|
|
1137
1138
|
unknown_status: "unknown_status";
|
|
1138
1139
|
not_permitted: "not_permitted";
|
|
@@ -1225,13 +1226,13 @@ export declare const OpportunityTransitionResponseSchema: z.ZodObject<{
|
|
|
1225
1226
|
description: z.ZodNullable<z.ZodString>;
|
|
1226
1227
|
references: z.ZodArray<z.ZodObject<{
|
|
1227
1228
|
type: z.ZodEnum<{
|
|
1228
|
-
product: "product";
|
|
1229
1229
|
order: "order";
|
|
1230
|
-
admin_user: "admin_user";
|
|
1231
1230
|
quote_request: "quote_request";
|
|
1232
|
-
|
|
1231
|
+
product: "product";
|
|
1233
1232
|
opportunity: "opportunity";
|
|
1234
1233
|
project: "project";
|
|
1234
|
+
task: "task";
|
|
1235
|
+
admin_user: "admin_user";
|
|
1235
1236
|
}>;
|
|
1236
1237
|
id: z.ZodString;
|
|
1237
1238
|
available: z.ZodBoolean;
|
|
@@ -1314,8 +1315,8 @@ export declare const OpportunityTransitionResponseSchema: z.ZodObject<{
|
|
|
1314
1315
|
outcome: z.ZodEnum<{
|
|
1315
1316
|
failed: "failed";
|
|
1316
1317
|
skipped: "skipped";
|
|
1317
|
-
applied: "applied";
|
|
1318
1318
|
not_found: "not_found";
|
|
1319
|
+
applied: "applied";
|
|
1319
1320
|
already_there: "already_there";
|
|
1320
1321
|
unknown_status: "unknown_status";
|
|
1321
1322
|
not_permitted: "not_permitted";
|
|
@@ -1344,8 +1345,8 @@ export declare const OpportunityTransitionResponseSchema: z.ZodObject<{
|
|
|
1344
1345
|
outcome: z.ZodEnum<{
|
|
1345
1346
|
failed: "failed";
|
|
1346
1347
|
skipped: "skipped";
|
|
1347
|
-
applied: "applied";
|
|
1348
1348
|
not_found: "not_found";
|
|
1349
|
+
applied: "applied";
|
|
1349
1350
|
already_there: "already_there";
|
|
1350
1351
|
unknown_status: "unknown_status";
|
|
1351
1352
|
not_permitted: "not_permitted";
|
|
@@ -1369,8 +1370,8 @@ export declare const PropagationOutcomeResponseSchema: z.ZodObject<{
|
|
|
1369
1370
|
outcome: z.ZodEnum<{
|
|
1370
1371
|
failed: "failed";
|
|
1371
1372
|
skipped: "skipped";
|
|
1372
|
-
applied: "applied";
|
|
1373
1373
|
not_found: "not_found";
|
|
1374
|
+
applied: "applied";
|
|
1374
1375
|
already_there: "already_there";
|
|
1375
1376
|
unknown_status: "unknown_status";
|
|
1376
1377
|
not_permitted: "not_permitted";
|
|
@@ -1595,13 +1596,13 @@ export declare const OpportunityCommentSchema: z.ZodObject<{
|
|
|
1595
1596
|
body: z.ZodString;
|
|
1596
1597
|
references: z.ZodArray<z.ZodObject<{
|
|
1597
1598
|
type: z.ZodEnum<{
|
|
1598
|
-
product: "product";
|
|
1599
1599
|
order: "order";
|
|
1600
|
-
admin_user: "admin_user";
|
|
1601
1600
|
quote_request: "quote_request";
|
|
1602
|
-
|
|
1601
|
+
product: "product";
|
|
1603
1602
|
opportunity: "opportunity";
|
|
1604
1603
|
project: "project";
|
|
1604
|
+
task: "task";
|
|
1605
|
+
admin_user: "admin_user";
|
|
1605
1606
|
}>;
|
|
1606
1607
|
id: z.ZodString;
|
|
1607
1608
|
available: z.ZodBoolean;
|
|
@@ -1633,13 +1634,13 @@ export declare const OpportunityCommentResponseSchema: z.ZodObject<{
|
|
|
1633
1634
|
body: z.ZodString;
|
|
1634
1635
|
references: z.ZodArray<z.ZodObject<{
|
|
1635
1636
|
type: z.ZodEnum<{
|
|
1636
|
-
product: "product";
|
|
1637
1637
|
order: "order";
|
|
1638
|
-
admin_user: "admin_user";
|
|
1639
1638
|
quote_request: "quote_request";
|
|
1640
|
-
|
|
1639
|
+
product: "product";
|
|
1641
1640
|
opportunity: "opportunity";
|
|
1642
1641
|
project: "project";
|
|
1642
|
+
task: "task";
|
|
1643
|
+
admin_user: "admin_user";
|
|
1643
1644
|
}>;
|
|
1644
1645
|
id: z.ZodString;
|
|
1645
1646
|
available: z.ZodBoolean;
|
|
@@ -1676,13 +1677,13 @@ export declare const OpportunityCommentListResponseSchema: z.ZodObject<{
|
|
|
1676
1677
|
body: z.ZodString;
|
|
1677
1678
|
references: z.ZodArray<z.ZodObject<{
|
|
1678
1679
|
type: z.ZodEnum<{
|
|
1679
|
-
product: "product";
|
|
1680
1680
|
order: "order";
|
|
1681
|
-
admin_user: "admin_user";
|
|
1682
1681
|
quote_request: "quote_request";
|
|
1683
|
-
|
|
1682
|
+
product: "product";
|
|
1684
1683
|
opportunity: "opportunity";
|
|
1685
1684
|
project: "project";
|
|
1685
|
+
task: "task";
|
|
1686
|
+
admin_user: "admin_user";
|
|
1686
1687
|
}>;
|
|
1687
1688
|
id: z.ZodString;
|
|
1688
1689
|
available: z.ZodBoolean;
|
|
@@ -1963,10 +1964,10 @@ export declare const OpportunityBoardSchema: z.ZodObject<{
|
|
|
1963
1964
|
date: "date";
|
|
1964
1965
|
text: "text";
|
|
1965
1966
|
contact: "contact";
|
|
1966
|
-
|
|
1967
|
+
organization: "organization";
|
|
1967
1968
|
select: "select";
|
|
1969
|
+
multiselect: "multiselect";
|
|
1968
1970
|
tags: "tags";
|
|
1969
|
-
organization: "organization";
|
|
1970
1971
|
salesChannel: "salesChannel";
|
|
1971
1972
|
assignee: "assignee";
|
|
1972
1973
|
money: "money";
|
|
@@ -2059,10 +2060,10 @@ export declare const OpportunityBoardResponseSchema: z.ZodObject<{
|
|
|
2059
2060
|
date: "date";
|
|
2060
2061
|
text: "text";
|
|
2061
2062
|
contact: "contact";
|
|
2062
|
-
|
|
2063
|
+
organization: "organization";
|
|
2063
2064
|
select: "select";
|
|
2065
|
+
multiselect: "multiselect";
|
|
2064
2066
|
tags: "tags";
|
|
2065
|
-
organization: "organization";
|
|
2066
2067
|
salesChannel: "salesChannel";
|
|
2067
2068
|
assignee: "assignee";
|
|
2068
2069
|
money: "money";
|
|
@@ -2233,13 +2234,13 @@ export declare const OpportunityHistoryEntrySchema: z.ZodObject<{
|
|
|
2233
2234
|
after: z.ZodNullable<z.ZodUnknown>;
|
|
2234
2235
|
references: z.ZodArray<z.ZodObject<{
|
|
2235
2236
|
type: z.ZodEnum<{
|
|
2236
|
-
product: "product";
|
|
2237
2237
|
order: "order";
|
|
2238
|
-
admin_user: "admin_user";
|
|
2239
2238
|
quote_request: "quote_request";
|
|
2240
|
-
|
|
2239
|
+
product: "product";
|
|
2241
2240
|
opportunity: "opportunity";
|
|
2242
2241
|
project: "project";
|
|
2242
|
+
task: "task";
|
|
2243
|
+
admin_user: "admin_user";
|
|
2243
2244
|
}>;
|
|
2244
2245
|
id: z.ZodString;
|
|
2245
2246
|
available: z.ZodBoolean;
|
|
@@ -2275,13 +2276,13 @@ export declare const OpportunityHistoryResponseSchema: z.ZodObject<{
|
|
|
2275
2276
|
after: z.ZodNullable<z.ZodUnknown>;
|
|
2276
2277
|
references: z.ZodArray<z.ZodObject<{
|
|
2277
2278
|
type: z.ZodEnum<{
|
|
2278
|
-
product: "product";
|
|
2279
2279
|
order: "order";
|
|
2280
|
-
admin_user: "admin_user";
|
|
2281
2280
|
quote_request: "quote_request";
|
|
2282
|
-
|
|
2281
|
+
product: "product";
|
|
2283
2282
|
opportunity: "opportunity";
|
|
2284
2283
|
project: "project";
|
|
2284
|
+
task: "task";
|
|
2285
|
+
admin_user: "admin_user";
|
|
2285
2286
|
}>;
|
|
2286
2287
|
id: z.ZodString;
|
|
2287
2288
|
available: z.ZodBoolean;
|
|
@@ -2371,6 +2372,17 @@ export declare const OpportunityAverageValueRowSchema: z.ZodObject<{
|
|
|
2371
2372
|
count: z.ZodNumber;
|
|
2372
2373
|
}, z.core.$strip>;
|
|
2373
2374
|
export type OpportunityAverageValueRow = z.infer<typeof OpportunityAverageValueRowSchema>;
|
|
2375
|
+
/**
|
|
2376
|
+
* Every analytics figure answers in this envelope: the figure, and the time
|
|
2377
|
+
* zone its days and months were counted in (issues #474, #475) — the
|
|
2378
|
+
* `analytics` module's reporting time zone, or `UTC` while that module is off.
|
|
2379
|
+
* An IANA name. Additive: `data` is where it always was, and a reply without
|
|
2380
|
+
* the zone parses as before.
|
|
2381
|
+
*/
|
|
2382
|
+
export declare function opportunityAnalyticsEnvelope<T extends z.ZodTypeAny>(data: T): z.ZodObject<{
|
|
2383
|
+
data: T;
|
|
2384
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
2385
|
+
}, z.core.$strip>;
|
|
2374
2386
|
export declare const OpportunityHandlingTimeResponseSchema: z.ZodObject<{
|
|
2375
2387
|
data: z.ZodObject<{
|
|
2376
2388
|
averageSeconds: z.ZodNullable<z.ZodNumber>;
|
|
@@ -2386,6 +2398,7 @@ export declare const OpportunityHandlingTimeResponseSchema: z.ZodObject<{
|
|
|
2386
2398
|
}, z.core.$strip>;
|
|
2387
2399
|
}, z.core.$strip>;
|
|
2388
2400
|
}, z.core.$strip>;
|
|
2401
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
2389
2402
|
}, z.core.$strip>;
|
|
2390
2403
|
export declare const OpportunityTimeInStatusResponseSchema: z.ZodObject<{
|
|
2391
2404
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -2393,6 +2406,7 @@ export declare const OpportunityTimeInStatusResponseSchema: z.ZodObject<{
|
|
|
2393
2406
|
averageSeconds: z.ZodNullable<z.ZodNumber>;
|
|
2394
2407
|
sampleCount: z.ZodNumber;
|
|
2395
2408
|
}, z.core.$strip>>;
|
|
2409
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
2396
2410
|
}, z.core.$strip>;
|
|
2397
2411
|
export declare const OpportunityRepEffectivenessResponseSchema: z.ZodObject<{
|
|
2398
2412
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -2407,6 +2421,7 @@ export declare const OpportunityRepEffectivenessResponseSchema: z.ZodObject<{
|
|
|
2407
2421
|
total: z.ZodString;
|
|
2408
2422
|
}, z.core.$strip>>;
|
|
2409
2423
|
}, z.core.$strip>>;
|
|
2424
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
2410
2425
|
}, z.core.$strip>;
|
|
2411
2426
|
export declare const TopOpportunitiesResponseSchema: z.ZodObject<{
|
|
2412
2427
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -2454,6 +2469,7 @@ export declare const TopOpportunitiesResponseSchema: z.ZodObject<{
|
|
|
2454
2469
|
updatedAt: z.ZodString;
|
|
2455
2470
|
cardValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2456
2471
|
}, z.core.$strip>>;
|
|
2472
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
2457
2473
|
}, z.core.$strip>;
|
|
2458
2474
|
export declare const OpportunityAverageValueResponseSchema: z.ZodObject<{
|
|
2459
2475
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -2461,6 +2477,7 @@ export declare const OpportunityAverageValueResponseSchema: z.ZodObject<{
|
|
|
2461
2477
|
average: z.ZodString;
|
|
2462
2478
|
count: z.ZodNumber;
|
|
2463
2479
|
}, z.core.$strip>>;
|
|
2480
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
2464
2481
|
}, z.core.$strip>;
|
|
2465
2482
|
/**
|
|
2466
2483
|
* The longest an Event may be. An Event is one calendar day in its own zone,
|
|
@@ -3027,6 +3044,15 @@ export interface OpportunityReadPort {
|
|
|
3027
3044
|
* link picker (R-5, R-16).
|
|
3028
3045
|
*/
|
|
3029
3046
|
search(query: OpportunitySearchQuery): Promise<OpportunityRecord[]>;
|
|
3047
|
+
/**
|
|
3048
|
+
* A status's name in `language`, by this module's own rule: the operator's
|
|
3049
|
+
* name in that language, else the status's default name, else the code (a
|
|
3050
|
+
* status the workflow no longer holds). Published for issue #455, so that a
|
|
3051
|
+
* module showing a linked Opportunity names its status as `crm` does rather
|
|
3052
|
+
* than showing `statusCode`. Reads no Opportunity, so it checks no
|
|
3053
|
+
* permission.
|
|
3054
|
+
*/
|
|
3055
|
+
statusName(code: string, language: SupportedLanguage): Promise<string>;
|
|
3030
3056
|
}
|
|
3031
3057
|
/** What `OpportunityReadPort.search` is asked. */
|
|
3032
3058
|
export interface OpportunitySearchQuery {
|
package/dist/crm.js
CHANGED
|
@@ -834,11 +834,21 @@ export const OpportunityAverageValueRowSchema = z.object({
|
|
|
834
834
|
average: z.string(),
|
|
835
835
|
count: z.number().int().nonnegative(),
|
|
836
836
|
});
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
837
|
+
/**
|
|
838
|
+
* Every analytics figure answers in this envelope: the figure, and the time
|
|
839
|
+
* zone its days and months were counted in (issues #474, #475) — the
|
|
840
|
+
* `analytics` module's reporting time zone, or `UTC` while that module is off.
|
|
841
|
+
* An IANA name. Additive: `data` is where it always was, and a reply without
|
|
842
|
+
* the zone parses as before.
|
|
843
|
+
*/
|
|
844
|
+
export function opportunityAnalyticsEnvelope(data) {
|
|
845
|
+
return z.object({ data, timeZone: z.string().min(1).optional() });
|
|
846
|
+
}
|
|
847
|
+
export const OpportunityHandlingTimeResponseSchema = opportunityAnalyticsEnvelope(OpportunityHandlingTimeSchema);
|
|
848
|
+
export const OpportunityTimeInStatusResponseSchema = opportunityAnalyticsEnvelope(z.array(OpportunityTimeInStatusRowSchema));
|
|
849
|
+
export const OpportunityRepEffectivenessResponseSchema = opportunityAnalyticsEnvelope(z.array(OpportunityRepEffectivenessRowSchema));
|
|
850
|
+
export const TopOpportunitiesResponseSchema = opportunityAnalyticsEnvelope(z.array(OpportunitySummarySchema));
|
|
851
|
+
export const OpportunityAverageValueResponseSchema = opportunityAnalyticsEnvelope(z.array(OpportunityAverageValueRowSchema));
|
|
842
852
|
// ---------------------------------------------------------------------------
|
|
843
853
|
// §12d Events on an Opportunity and the Calendar (US21, US22)
|
|
844
854
|
// ---------------------------------------------------------------------------
|