@endora-commerce/contracts 0.107.0 → 0.109.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/admin-actions.d.ts +12 -3
- package/dist/admin-actions.d.ts.map +1 -1
- package/dist/admin-actions.js +34 -3
- package/dist/admin-actions.js.map +1 -1
- package/dist/admin-contributions.d.ts +35 -6
- package/dist/admin-contributions.d.ts.map +1 -1
- package/dist/admin-contributions.js +46 -0
- package/dist/admin-contributions.js.map +1 -1
- package/dist/admin-feedback.d.ts +61 -0
- package/dist/admin-feedback.d.ts.map +1 -0
- package/dist/admin-feedback.js +71 -0
- package/dist/admin-feedback.js.map +1 -0
- package/dist/admin-name.d.ts +21 -0
- package/dist/admin-name.d.ts.map +1 -0
- package/dist/admin-name.js +30 -0
- package/dist/admin-name.js.map +1 -0
- package/dist/admin-notifications.d.ts +17 -1
- package/dist/admin-notifications.d.ts.map +1 -1
- package/dist/admin-preferences.d.ts +108 -0
- package/dist/admin-preferences.d.ts.map +1 -0
- package/dist/admin-preferences.js +133 -0
- package/dist/admin-preferences.js.map +1 -0
- package/dist/admin.d.ts +15 -1
- package/dist/admin.d.ts.map +1 -1
- package/dist/admin.js +7 -0
- package/dist/admin.js.map +1 -1
- package/dist/assets-library.d.ts +97 -3
- package/dist/assets-library.d.ts.map +1 -1
- package/dist/assets-library.js +5 -0
- package/dist/assets-library.js.map +1 -1
- package/dist/blog.d.ts +57 -0
- package/dist/blog.d.ts.map +1 -1
- package/dist/blog.js +63 -1
- package/dist/blog.js.map +1 -1
- package/dist/carts.d.ts +303 -50
- package/dist/carts.d.ts.map +1 -1
- package/dist/carts.js +95 -13
- package/dist/carts.js.map +1 -1
- package/dist/catalog.d.ts +512 -40
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +362 -23
- package/dist/catalog.js.map +1 -1
- package/dist/cms-brand.d.ts +2233 -0
- package/dist/cms-brand.d.ts.map +1 -0
- package/dist/cms-brand.js +311 -0
- package/dist/cms-brand.js.map +1 -0
- package/dist/cms-contact-form.d.ts +55 -0
- package/dist/cms-contact-form.d.ts.map +1 -0
- package/dist/cms-contact-form.js +100 -0
- package/dist/cms-contact-form.js.map +1 -0
- package/dist/cms.d.ts +537 -3
- package/dist/cms.d.ts.map +1 -1
- package/dist/cms.js +251 -0
- package/dist/cms.js.map +1 -1
- package/dist/common.d.ts +4 -0
- package/dist/common.d.ts.map +1 -1
- package/dist/common.js +14 -0
- package/dist/common.js.map +1 -1
- package/dist/comparisons.d.ts +7 -0
- package/dist/comparisons.d.ts.map +1 -1
- package/dist/comparisons.js +2 -0
- package/dist/comparisons.js.map +1 -1
- package/dist/credit-limits.d.ts.map +1 -1
- package/dist/credit-limits.js +3 -2
- package/dist/credit-limits.js.map +1 -1
- package/dist/crm-rich-text.d.ts +13 -0
- package/dist/crm-rich-text.d.ts.map +1 -0
- package/dist/crm-rich-text.js +13 -0
- package/dist/crm-rich-text.js.map +1 -0
- package/dist/crm.d.ts +180 -62
- package/dist/crm.d.ts.map +1 -1
- package/dist/crm.js +63 -107
- package/dist/crm.js.map +1 -1
- package/dist/custom-fields.d.ts +436 -5
- package/dist/custom-fields.d.ts.map +1 -1
- package/dist/custom-fields.js +325 -10
- package/dist/custom-fields.js.map +1 -1
- package/dist/customer-accounts.d.ts +30 -0
- package/dist/customer-accounts.d.ts.map +1 -1
- package/dist/customer-accounts.js +31 -0
- package/dist/customer-accounts.js.map +1 -1
- package/dist/document-templates.d.ts +211 -23
- package/dist/document-templates.d.ts.map +1 -1
- package/dist/document-templates.js +98 -1
- package/dist/document-templates.js.map +1 -1
- package/dist/document-values.d.ts +12 -1
- package/dist/document-values.d.ts.map +1 -1
- package/dist/document-values.js +41 -11
- package/dist/document-values.js.map +1 -1
- package/dist/email.d.ts +5 -0
- package/dist/email.d.ts.map +1 -1
- package/dist/errors.d.ts +142 -8
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +189 -8
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +24 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +43 -1
- package/dist/index.js.map +1 -1
- package/dist/inventory.d.ts +3 -3
- package/dist/invoices.d.ts +6 -2
- package/dist/invoices.d.ts.map +1 -1
- package/dist/invoices.js +10 -4
- package/dist/invoices.js.map +1 -1
- package/dist/line-groups.d.ts +80 -0
- package/dist/line-groups.d.ts.map +1 -0
- package/dist/line-groups.js +130 -0
- package/dist/line-groups.js.map +1 -0
- package/dist/localized-name.d.ts +20 -0
- package/dist/localized-name.d.ts.map +1 -0
- package/dist/localized-name.js +45 -0
- package/dist/localized-name.js.map +1 -0
- package/dist/megamenu.d.ts +674 -0
- package/dist/megamenu.d.ts.map +1 -1
- package/dist/megamenu.js +96 -3
- package/dist/megamenu.js.map +1 -1
- package/dist/mfa.d.ts +1 -0
- package/dist/mfa.d.ts.map +1 -1
- package/dist/mfa.js +8 -2
- package/dist/mfa.js.map +1 -1
- package/dist/modules.d.ts +8 -1
- package/dist/modules.d.ts.map +1 -1
- package/dist/modules.js +5 -0
- package/dist/modules.js.map +1 -1
- package/dist/money-decimal.d.ts +162 -0
- package/dist/money-decimal.d.ts.map +1 -0
- package/dist/money-decimal.js +365 -0
- package/dist/money-decimal.js.map +1 -0
- package/dist/money-input.d.ts +64 -0
- package/dist/money-input.d.ts.map +1 -0
- package/dist/money-input.js +111 -0
- package/dist/money-input.js.map +1 -0
- package/dist/newsletter.d.ts +3 -3
- package/dist/order-minimums.d.ts +111 -0
- package/dist/order-minimums.d.ts.map +1 -0
- package/dist/order-minimums.js +196 -0
- package/dist/order-minimums.js.map +1 -0
- package/dist/orders.d.ts +206 -2
- package/dist/orders.d.ts.map +1 -1
- package/dist/orders.js +106 -5
- package/dist/orders.js.map +1 -1
- package/dist/page-builder-props.d.ts +1401 -0
- package/dist/page-builder-props.d.ts.map +1 -0
- package/dist/page-builder-props.js +266 -0
- package/dist/page-builder-props.js.map +1 -0
- package/dist/page-builder-values.d.ts +95 -0
- package/dist/page-builder-values.d.ts.map +1 -0
- package/dist/page-builder-values.js +164 -0
- package/dist/page-builder-values.js.map +1 -0
- package/dist/payment-methods.d.ts.map +1 -1
- package/dist/payment-methods.js +2 -1
- package/dist/payment-methods.js.map +1 -1
- package/dist/pim-connector.d.ts +1 -1
- package/dist/platform-language.d.ts +9 -0
- package/dist/platform-language.d.ts.map +1 -1
- package/dist/platform-language.js +14 -0
- package/dist/platform-language.js.map +1 -1
- package/dist/price-book-decimal.d.ts +84 -0
- package/dist/price-book-decimal.d.ts.map +1 -0
- package/dist/price-book-decimal.js +175 -0
- package/dist/price-book-decimal.js.map +1 -0
- package/dist/price-books.d.ts +2206 -0
- package/dist/price-books.d.ts.map +1 -0
- package/dist/price-books.js +777 -0
- package/dist/price-books.js.map +1 -0
- package/dist/price-lists.d.ts +309 -614
- package/dist/price-lists.d.ts.map +1 -1
- package/dist/price-lists.js +113 -453
- package/dist/price-lists.js.map +1 -1
- package/dist/product-feeds.d.ts +195 -54
- package/dist/product-feeds.d.ts.map +1 -1
- package/dist/product-feeds.js +36 -1
- package/dist/product-feeds.js.map +1 -1
- package/dist/product-scopes.d.ts +628 -0
- package/dist/product-scopes.d.ts.map +1 -0
- package/dist/product-scopes.js +365 -0
- package/dist/product-scopes.js.map +1 -0
- package/dist/product-summary-text.d.ts +23 -0
- package/dist/product-summary-text.d.ts.map +1 -0
- package/dist/product-summary-text.js +64 -0
- package/dist/product-summary-text.js.map +1 -0
- package/dist/product-url-keys.d.ts +204 -0
- package/dist/product-url-keys.d.ts.map +1 -0
- package/dist/product-url-keys.js +166 -0
- package/dist/product-url-keys.js.map +1 -0
- package/dist/product-value-resolver.d.ts +6 -0
- package/dist/product-value-resolver.d.ts.map +1 -1
- package/dist/product-value-resolver.js +6 -1
- package/dist/product-value-resolver.js.map +1 -1
- package/dist/projects.d.ts +2355 -0
- package/dist/projects.d.ts.map +1 -0
- package/dist/projects.js +837 -0
- package/dist/projects.js.map +1 -0
- package/dist/promotions.d.ts +2 -2
- package/dist/promotions.d.ts.map +1 -1
- package/dist/promotions.js +8 -2
- package/dist/promotions.js.map +1 -1
- package/dist/prompt-actions.d.ts +19 -1
- package/dist/prompt-actions.d.ts.map +1 -1
- package/dist/prompt-actions.js +31 -2
- package/dist/prompt-actions.js.map +1 -1
- package/dist/quick-order.d.ts +39 -1
- package/dist/quick-order.d.ts.map +1 -1
- package/dist/quick-order.js +44 -1
- package/dist/quick-order.js.map +1 -1
- package/dist/quote-requests.d.ts +305 -1
- package/dist/quote-requests.d.ts.map +1 -1
- package/dist/quote-requests.js +173 -5
- package/dist/quote-requests.js.map +1 -1
- package/dist/record-references.d.ts +252 -0
- package/dist/record-references.d.ts.map +1 -0
- package/dist/record-references.js +179 -0
- package/dist/record-references.js.map +1 -0
- package/dist/record-rich-text.d.ts +66 -0
- package/dist/record-rich-text.d.ts.map +1 -0
- package/dist/record-rich-text.js +303 -0
- package/dist/record-rich-text.js.map +1 -0
- package/dist/returns.d.ts +81 -2
- package/dist/returns.d.ts.map +1 -1
- package/dist/returns.js +39 -4
- package/dist/returns.js.map +1 -1
- package/dist/sales-channels.d.ts +53 -7
- package/dist/sales-channels.d.ts.map +1 -1
- package/dist/sales-channels.js +40 -4
- package/dist/sales-channels.js.map +1 -1
- package/dist/saved-list-views.d.ts +28 -0
- package/dist/saved-list-views.d.ts.map +1 -1
- package/dist/saved-list-views.js +14 -1
- package/dist/saved-list-views.js.map +1 -1
- package/dist/scoped-translations.d.ts +48 -0
- package/dist/scoped-translations.d.ts.map +1 -0
- package/dist/scoped-translations.js +78 -0
- package/dist/scoped-translations.js.map +1 -0
- package/dist/search.d.ts +73 -5
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +4 -0
- package/dist/search.js.map +1 -1
- package/dist/seo.d.ts +64 -5
- package/dist/seo.d.ts.map +1 -1
- package/dist/seo.js +31 -4
- package/dist/seo.js.map +1 -1
- package/dist/settings.d.ts +32 -3
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +37 -3
- package/dist/settings.js.map +1 -1
- package/dist/shipping-methods.d.ts.map +1 -1
- package/dist/shipping-methods.js +2 -1
- package/dist/shipping-methods.js.map +1 -1
- package/dist/shopping-lists.d.ts +24 -0
- package/dist/shopping-lists.d.ts.map +1 -1
- package/dist/shopping-lists.js +20 -1
- package/dist/shopping-lists.js.map +1 -1
- package/dist/storefront-cache-tags.d.ts +29 -0
- package/dist/storefront-cache-tags.d.ts.map +1 -1
- package/dist/storefront-cache-tags.js +24 -0
- package/dist/storefront-cache-tags.js.map +1 -1
- package/dist/storefront-language-path.d.ts +77 -0
- package/dist/storefront-language-path.d.ts.map +1 -0
- package/dist/storefront-language-path.js +123 -0
- package/dist/storefront-language-path.js.map +1 -0
- package/dist/storefront-value-overrides.d.ts +67 -0
- package/dist/storefront-value-overrides.d.ts.map +1 -0
- package/dist/storefront-value-overrides.js +93 -0
- package/dist/storefront-value-overrides.js.map +1 -0
- package/dist/tasks.d.ts +2842 -0
- package/dist/tasks.d.ts.map +1 -0
- package/dist/tasks.js +901 -0
- package/dist/tasks.js.map +1 -0
- package/dist/transactional-emails.d.ts +7 -4
- package/dist/transactional-emails.d.ts.map +1 -1
- package/dist/transactional-emails.js +13 -0
- package/dist/transactional-emails.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credit-limits.d.ts","sourceRoot":"","sources":["../src/credit-limits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"credit-limits.d.ts","sourceRoot":"","sources":["../src/credit-limits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;GAGG;AAEH,eAAO,MAAM,kCAAkC;;;EAAiC,CAAC;AACjF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F,eAAO,MAAM,yCAAyC;;;;EAIpD,CAAC;AACH,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,yCAAyC,CACjD,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;iBAahC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,6BAA6B;;;;iBAIxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,8BAA8B;;;;iBAIzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;;;;;;;;OAYG;IACH,sBAAsB,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC9E;;;;;;;;;;;;OAYG;IACH,2BAA2B,CACzB,QAAQ,EAAE,SAAS,MAAM,EAAE,GAC1B,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,CAAC;CAC1E;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,yBAAyB;IACxC,kBAAkB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,aAAa,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;IACtF,KAAK,CAAC,KAAK,EAAE;QACX,cAAc,EAAE,MAAM,CAAC;QACvB,aAAa,EAAE,MAAM,CAAC;QACtB,QAAQ,EAAE,MAAM,CAAC;KAClB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACrB,MAAM,CAAC,KAAK,EAAE;QACZ,cAAc,EAAE,MAAM,CAAC;QACvB,aAAa,EAAE,MAAM,CAAC;QACtB,mBAAmB,CAAC,EAAE,OAAO,CAAC;KAC/B,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CAC9B;AAgBD,6EAA6E;AAC7E,eAAO,MAAM,2BAA2B;;CAE9B,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,gCAAgC;;;;;kBAYlC,CAAC;AACZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,mEAAmE;AACnE,eAAO,MAAM,gCAAgC,uCAAkD,CAAC;AAEhG,uEAAuE;AACvE,eAAO,MAAM,kCAAkC;;;;;;;CAErC,CAAC"}
|
package/dist/credit-limits.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { isoDateTimeSchema, uuidSchema } from './common.js';
|
|
3
|
+
import { twoDecimalAmount } from './money-input.js';
|
|
3
4
|
/**
|
|
4
5
|
* Credit Limit module contracts (US6) — see
|
|
5
6
|
* specs/001-b2b-platform-foundation/contracts/credit_limits.contract.md.
|
|
@@ -23,12 +24,12 @@ export const creditLimitViewSchema = z.object({
|
|
|
23
24
|
grantedAt: isoDateTimeSchema,
|
|
24
25
|
});
|
|
25
26
|
export const grantCreditLimitRequestSchema = z.object({
|
|
26
|
-
grantedAmount: z.number().finite().positive(),
|
|
27
|
+
grantedAmount: twoDecimalAmount(z.number().finite().positive()),
|
|
27
28
|
currency: z.string().length(3),
|
|
28
29
|
reason: z.string().max(2000).optional(),
|
|
29
30
|
});
|
|
30
31
|
export const adjustCreditLimitRequestSchema = z.object({
|
|
31
|
-
grantedAmount: z.number().finite().nonnegative(),
|
|
32
|
+
grantedAmount: twoDecimalAmount(z.number().finite().nonnegative()),
|
|
32
33
|
reason: z.string().max(2000).optional(),
|
|
33
34
|
allowOverAllocation: z.boolean().optional(),
|
|
34
35
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credit-limits.js","sourceRoot":"","sources":["../src/credit-limits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"credit-limits.js","sourceRoot":"","sources":["../src/credit-limits.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The formatted-text grammar of an Opportunity's free text, under the names CRM
|
|
3
|
+
* has always exported (`specs/158-crm-opportunity-inline-editing/`).
|
|
4
|
+
*
|
|
5
|
+
* The grammar itself lives in `record-rich-text.ts` since
|
|
6
|
+
* `specs/163-projects-and-tasks/` (research R-14): Projects read and write the
|
|
7
|
+
* same formatted text, so it moved under neutral names and every name below is
|
|
8
|
+
* an **alias** of the shared one — the same function, the same type — widened to
|
|
9
|
+
* the five reference types of `record-references.ts`. A text CRM stored before
|
|
10
|
+
* reads exactly as it did.
|
|
11
|
+
*/
|
|
12
|
+
export { formatRecordRichText as formatOpportunityRichText, isSafeRecordRichHref as isSafeOpportunityRichHref, parseRecordRichText as parseOpportunityRichText, recordRichTextToPlain as opportunityRichTextToPlain, type RecordRichBlock as OpportunityRichBlock, type RecordRichInline as OpportunityRichInline, type RecordRichMark as OpportunityRichMark, } from './record-rich-text.js';
|
|
13
|
+
//# sourceMappingURL=crm-rich-text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crm-rich-text.d.ts","sourceRoot":"","sources":["../src/crm-rich-text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,oBAAoB,IAAI,yBAAyB,EACjD,oBAAoB,IAAI,yBAAyB,EACjD,mBAAmB,IAAI,wBAAwB,EAC/C,qBAAqB,IAAI,0BAA0B,EACnD,KAAK,eAAe,IAAI,oBAAoB,EAC5C,KAAK,gBAAgB,IAAI,qBAAqB,EAC9C,KAAK,cAAc,IAAI,mBAAmB,GAC3C,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The formatted-text grammar of an Opportunity's free text, under the names CRM
|
|
3
|
+
* has always exported (`specs/158-crm-opportunity-inline-editing/`).
|
|
4
|
+
*
|
|
5
|
+
* The grammar itself lives in `record-rich-text.ts` since
|
|
6
|
+
* `specs/163-projects-and-tasks/` (research R-14): Projects read and write the
|
|
7
|
+
* same formatted text, so it moved under neutral names and every name below is
|
|
8
|
+
* an **alias** of the shared one — the same function, the same type — widened to
|
|
9
|
+
* the five reference types of `record-references.ts`. A text CRM stored before
|
|
10
|
+
* reads exactly as it did.
|
|
11
|
+
*/
|
|
12
|
+
export { formatRecordRichText as formatOpportunityRichText, isSafeRecordRichHref as isSafeOpportunityRichHref, parseRecordRichText as parseOpportunityRichText, recordRichTextToPlain as opportunityRichTextToPlain, } from './record-rich-text.js';
|
|
13
|
+
//# sourceMappingURL=crm-rich-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crm-rich-text.js","sourceRoot":"","sources":["../src/crm-rich-text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,oBAAoB,IAAI,yBAAyB,EACjD,oBAAoB,IAAI,yBAAyB,EACjD,mBAAmB,IAAI,wBAAwB,EAC/C,qBAAqB,IAAI,0BAA0B,GAIpD,MAAM,uBAAuB,CAAC"}
|
package/dist/crm.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { type RecordReferenceType } from './record-references.js';
|
|
2
3
|
/**
|
|
3
4
|
* CRM — Sales Opportunities (`specs/143-crm-sales-opportunities/`).
|
|
4
5
|
*
|
|
@@ -45,8 +46,8 @@ export declare const opportunityDocumentKindSchema: z.ZodEnum<{
|
|
|
45
46
|
}>;
|
|
46
47
|
export type OpportunityDocumentKind = z.infer<typeof opportunityDocumentKindSchema>;
|
|
47
48
|
export declare const opportunityLinkSourceSchema: z.ZodEnum<{
|
|
48
|
-
manual: "manual";
|
|
49
49
|
auto: "auto";
|
|
50
|
+
manual: "manual";
|
|
50
51
|
created_from_opportunity: "created_from_opportunity";
|
|
51
52
|
quote_conversion: "quote_conversion";
|
|
52
53
|
}>;
|
|
@@ -81,57 +82,34 @@ export declare const opportunityCommentKindSchema: z.ZodEnum<{
|
|
|
81
82
|
}>;
|
|
82
83
|
export type OpportunityCommentKind = z.infer<typeof opportunityCommentKindSchema>;
|
|
83
84
|
/**
|
|
84
|
-
* What a free text can refer to
|
|
85
|
-
*
|
|
86
|
-
*
|
|
85
|
+
* What a free text can refer to — the shared reference types of
|
|
86
|
+
* `record-references.ts` (`specs/163-projects-and-tasks/` research R-14): a
|
|
87
|
+
* Product, an Order, a person (`admin_user`), and since that feature a Quote
|
|
88
|
+
* Request and a Task. An alias, not a copy: CRM and Projects read one grammar.
|
|
87
89
|
*/
|
|
88
90
|
export declare const opportunityReferenceTypeSchema: z.ZodEnum<{
|
|
91
|
+
product: "product";
|
|
89
92
|
order: "order";
|
|
90
93
|
admin_user: "admin_user";
|
|
91
|
-
|
|
94
|
+
quote_request: "quote_request";
|
|
95
|
+
task: "task";
|
|
96
|
+
opportunity: "opportunity";
|
|
97
|
+
project: "project";
|
|
92
98
|
}>;
|
|
93
|
-
export type OpportunityReferenceType =
|
|
99
|
+
export type OpportunityReferenceType = RecordReferenceType;
|
|
94
100
|
/** The six `QuoteRequestStatus` values — a fixed union, unlike Order statuses. */
|
|
95
101
|
export declare const QUOTE_REQUEST_STATUS_VALUES: readonly ["Created from admin", "Pending", "Canceled", "Approved", "Completed", "Expired"];
|
|
96
|
-
export interface OpportunityReferenceToken {
|
|
97
|
-
type: OpportunityReferenceType;
|
|
98
|
-
id: string;
|
|
99
|
-
}
|
|
100
|
-
export declare function formatOpportunityReferenceToken(type: OpportunityReferenceType, id: string): string;
|
|
101
|
-
/** Every well-formed token in `text`, in first-appearance order, each target once. */
|
|
102
|
-
export declare function extractOpportunityReferenceTokens(text: string): OpportunityReferenceToken[];
|
|
103
|
-
/** A stretch of plain text, or one well-formed token, in the order they appear. */
|
|
104
|
-
export type OpportunityReferenceTextPart = {
|
|
105
|
-
kind: 'text';
|
|
106
|
-
text: string;
|
|
107
|
-
} | ({
|
|
108
|
-
kind: 'reference';
|
|
109
|
-
} & OpportunityReferenceToken);
|
|
110
|
-
/**
|
|
111
|
-
* `text` cut at its well-formed tokens, for a screen that shows each token as
|
|
112
|
-
* a link: the parts, joined back, are the text. A malformed token stays text.
|
|
113
|
-
*/
|
|
114
|
-
export declare function splitOpportunityReferenceText(text: string): OpportunityReferenceTextPart[];
|
|
115
|
-
/** The people a text mentions, each once, in first-appearance order. */
|
|
116
|
-
export declare function mentionedAdminUserIds(text: string | null | undefined): string[];
|
|
117
102
|
/**
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
103
|
+
* The reference-token grammar: `[[<type>:<uuid>]]` for the five types of
|
|
104
|
+
* {@link opportunityReferenceTypeSchema}.
|
|
105
|
+
*
|
|
106
|
+
* Written once, in `record-references.ts` (`specs/163-projects-and-tasks/`
|
|
107
|
+
* research R-14, FR-044), and exported here under the names CRM has always
|
|
108
|
+
* exported — each an **alias** of the shared function or schema, never a copy,
|
|
109
|
+
* so CRM and Projects cannot drift. What a person types to get one — `@`, `@@`,
|
|
110
|
+
* `@@@` — is the composer's and is never stored.
|
|
122
111
|
*/
|
|
123
|
-
export
|
|
124
|
-
type: z.ZodEnum<{
|
|
125
|
-
order: "order";
|
|
126
|
-
admin_user: "admin_user";
|
|
127
|
-
product: "product";
|
|
128
|
-
}>;
|
|
129
|
-
id: z.ZodString;
|
|
130
|
-
available: z.ZodBoolean;
|
|
131
|
-
label: z.ZodNullable<z.ZodString>;
|
|
132
|
-
url: z.ZodNullable<z.ZodString>;
|
|
133
|
-
}, z.core.$strip>;
|
|
134
|
-
export type OpportunityReference = z.infer<typeof OpportunityReferenceSchema>;
|
|
112
|
+
export { extractRecordReferenceTokens as extractOpportunityReferenceTokens, formatRecordReferenceToken as formatOpportunityReferenceToken, mentionedAdminUserIds, RecordReferenceOrderSchema as OpportunityReferenceOrderSchema, RecordReferenceSchema as OpportunityReferenceSchema, splitRecordReferenceText as splitOpportunityReferenceText, type RecordReference as OpportunityReference, type RecordReferenceOrder as OpportunityReferenceOrder, type RecordReferenceTextPart as OpportunityReferenceTextPart, type RecordReferenceToken as OpportunityReferenceToken, } from './record-references.js';
|
|
135
113
|
export declare const opportunityStateSchema: z.ZodEnum<{
|
|
136
114
|
open: "open";
|
|
137
115
|
won: "won";
|
|
@@ -332,7 +310,13 @@ export declare const OpportunityBoardCardConfigResponseSchema: z.ZodObject<{
|
|
|
332
310
|
}, z.core.$strip>;
|
|
333
311
|
/**
|
|
334
312
|
* One field's filter: the operators of every kind in one object. Which of them
|
|
335
|
-
* apply is the field's kind to say
|
|
313
|
+
* apply is the field's kind to say. The board ignores the others; the
|
|
314
|
+
* Opportunities list refuses them on a `custom:` reference with 400
|
|
315
|
+
* `VALIDATION_FAILED`, as it refuses an inverted range.
|
|
316
|
+
*
|
|
317
|
+
* The same object as the admin lists' custom-field filter
|
|
318
|
+
* (`specs/157-custom-fields-list-filters/`), so a board filter and a list
|
|
319
|
+
* filter read one grammar.
|
|
336
320
|
*/
|
|
337
321
|
export declare const OpportunityFieldFilterSchema: z.ZodObject<{
|
|
338
322
|
contains: z.ZodOptional<z.ZodString>;
|
|
@@ -420,8 +404,8 @@ export type CreateOpportunityRequest = z.infer<typeof CreateOpportunityRequestSc
|
|
|
420
404
|
*/
|
|
421
405
|
export declare const UpdateOpportunityRequestSchema: z.ZodObject<{
|
|
422
406
|
description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
423
|
-
title: z.ZodOptional<z.ZodString>;
|
|
424
407
|
salesChannelId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
408
|
+
title: z.ZodOptional<z.ZodString>;
|
|
425
409
|
customerAccountId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
426
410
|
tagIds: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
427
411
|
customFieldValues: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
@@ -529,8 +513,8 @@ export declare const OpportunityLinkSchema: z.ZodObject<{
|
|
|
529
513
|
currency: z.ZodOptional<z.ZodString>;
|
|
530
514
|
syncStatus: z.ZodBoolean;
|
|
531
515
|
linkSource: z.ZodEnum<{
|
|
532
|
-
manual: "manual";
|
|
533
516
|
auto: "auto";
|
|
517
|
+
manual: "manual";
|
|
534
518
|
created_from_opportunity: "created_from_opportunity";
|
|
535
519
|
quote_conversion: "quote_conversion";
|
|
536
520
|
}>;
|
|
@@ -621,14 +605,25 @@ export declare const OpportunityDetailSchema: z.ZodObject<{
|
|
|
621
605
|
description: z.ZodNullable<z.ZodString>;
|
|
622
606
|
references: z.ZodArray<z.ZodObject<{
|
|
623
607
|
type: z.ZodEnum<{
|
|
608
|
+
product: "product";
|
|
624
609
|
order: "order";
|
|
625
610
|
admin_user: "admin_user";
|
|
626
|
-
|
|
611
|
+
quote_request: "quote_request";
|
|
612
|
+
task: "task";
|
|
613
|
+
opportunity: "opportunity";
|
|
614
|
+
project: "project";
|
|
627
615
|
}>;
|
|
628
616
|
id: z.ZodString;
|
|
629
617
|
available: z.ZodBoolean;
|
|
630
618
|
label: z.ZodNullable<z.ZodString>;
|
|
631
619
|
url: z.ZodNullable<z.ZodString>;
|
|
620
|
+
order: z.ZodOptional<z.ZodObject<{
|
|
621
|
+
status: z.ZodString;
|
|
622
|
+
total: z.ZodString;
|
|
623
|
+
currency: z.ZodString;
|
|
624
|
+
placedAt: z.ZodString;
|
|
625
|
+
customerName: z.ZodNullable<z.ZodString>;
|
|
626
|
+
}, z.core.$strip>>;
|
|
632
627
|
}, z.core.$strip>>;
|
|
633
628
|
customerAccount: z.ZodNullable<z.ZodObject<{
|
|
634
629
|
id: z.ZodString;
|
|
@@ -675,8 +670,8 @@ export declare const OpportunityDetailSchema: z.ZodObject<{
|
|
|
675
670
|
currency: z.ZodOptional<z.ZodString>;
|
|
676
671
|
syncStatus: z.ZodBoolean;
|
|
677
672
|
linkSource: z.ZodEnum<{
|
|
678
|
-
manual: "manual";
|
|
679
673
|
auto: "auto";
|
|
674
|
+
manual: "manual";
|
|
680
675
|
created_from_opportunity: "created_from_opportunity";
|
|
681
676
|
quote_conversion: "quote_conversion";
|
|
682
677
|
}>;
|
|
@@ -759,14 +754,25 @@ export declare const OpportunityTransitionResultSchema: z.ZodObject<{
|
|
|
759
754
|
description: z.ZodNullable<z.ZodString>;
|
|
760
755
|
references: z.ZodArray<z.ZodObject<{
|
|
761
756
|
type: z.ZodEnum<{
|
|
757
|
+
product: "product";
|
|
762
758
|
order: "order";
|
|
763
759
|
admin_user: "admin_user";
|
|
764
|
-
|
|
760
|
+
quote_request: "quote_request";
|
|
761
|
+
task: "task";
|
|
762
|
+
opportunity: "opportunity";
|
|
763
|
+
project: "project";
|
|
765
764
|
}>;
|
|
766
765
|
id: z.ZodString;
|
|
767
766
|
available: z.ZodBoolean;
|
|
768
767
|
label: z.ZodNullable<z.ZodString>;
|
|
769
768
|
url: z.ZodNullable<z.ZodString>;
|
|
769
|
+
order: z.ZodOptional<z.ZodObject<{
|
|
770
|
+
status: z.ZodString;
|
|
771
|
+
total: z.ZodString;
|
|
772
|
+
currency: z.ZodString;
|
|
773
|
+
placedAt: z.ZodString;
|
|
774
|
+
customerName: z.ZodNullable<z.ZodString>;
|
|
775
|
+
}, z.core.$strip>>;
|
|
770
776
|
}, z.core.$strip>>;
|
|
771
777
|
customerAccount: z.ZodNullable<z.ZodObject<{
|
|
772
778
|
id: z.ZodString;
|
|
@@ -813,8 +819,8 @@ export declare const OpportunityTransitionResultSchema: z.ZodObject<{
|
|
|
813
819
|
currency: z.ZodOptional<z.ZodString>;
|
|
814
820
|
syncStatus: z.ZodBoolean;
|
|
815
821
|
linkSource: z.ZodEnum<{
|
|
816
|
-
manual: "manual";
|
|
817
822
|
auto: "auto";
|
|
823
|
+
manual: "manual";
|
|
818
824
|
created_from_opportunity: "created_from_opportunity";
|
|
819
825
|
quote_conversion: "quote_conversion";
|
|
820
826
|
}>;
|
|
@@ -1021,14 +1027,25 @@ export declare const OpportunityDetailResponseSchema: z.ZodObject<{
|
|
|
1021
1027
|
description: z.ZodNullable<z.ZodString>;
|
|
1022
1028
|
references: z.ZodArray<z.ZodObject<{
|
|
1023
1029
|
type: z.ZodEnum<{
|
|
1030
|
+
product: "product";
|
|
1024
1031
|
order: "order";
|
|
1025
1032
|
admin_user: "admin_user";
|
|
1026
|
-
|
|
1033
|
+
quote_request: "quote_request";
|
|
1034
|
+
task: "task";
|
|
1035
|
+
opportunity: "opportunity";
|
|
1036
|
+
project: "project";
|
|
1027
1037
|
}>;
|
|
1028
1038
|
id: z.ZodString;
|
|
1029
1039
|
available: z.ZodBoolean;
|
|
1030
1040
|
label: z.ZodNullable<z.ZodString>;
|
|
1031
1041
|
url: z.ZodNullable<z.ZodString>;
|
|
1042
|
+
order: z.ZodOptional<z.ZodObject<{
|
|
1043
|
+
status: z.ZodString;
|
|
1044
|
+
total: z.ZodString;
|
|
1045
|
+
currency: z.ZodString;
|
|
1046
|
+
placedAt: z.ZodString;
|
|
1047
|
+
customerName: z.ZodNullable<z.ZodString>;
|
|
1048
|
+
}, z.core.$strip>>;
|
|
1032
1049
|
}, z.core.$strip>>;
|
|
1033
1050
|
customerAccount: z.ZodNullable<z.ZodObject<{
|
|
1034
1051
|
id: z.ZodString;
|
|
@@ -1075,8 +1092,8 @@ export declare const OpportunityDetailResponseSchema: z.ZodObject<{
|
|
|
1075
1092
|
currency: z.ZodOptional<z.ZodString>;
|
|
1076
1093
|
syncStatus: z.ZodBoolean;
|
|
1077
1094
|
linkSource: z.ZodEnum<{
|
|
1078
|
-
manual: "manual";
|
|
1079
1095
|
auto: "auto";
|
|
1096
|
+
manual: "manual";
|
|
1080
1097
|
created_from_opportunity: "created_from_opportunity";
|
|
1081
1098
|
quote_conversion: "quote_conversion";
|
|
1082
1099
|
}>;
|
|
@@ -1126,8 +1143,8 @@ export declare const OpportunityLinkResponseSchema: z.ZodObject<{
|
|
|
1126
1143
|
currency: z.ZodOptional<z.ZodString>;
|
|
1127
1144
|
syncStatus: z.ZodBoolean;
|
|
1128
1145
|
linkSource: z.ZodEnum<{
|
|
1129
|
-
manual: "manual";
|
|
1130
1146
|
auto: "auto";
|
|
1147
|
+
manual: "manual";
|
|
1131
1148
|
created_from_opportunity: "created_from_opportunity";
|
|
1132
1149
|
quote_conversion: "quote_conversion";
|
|
1133
1150
|
}>;
|
|
@@ -1183,14 +1200,25 @@ export declare const OpportunityTransitionResponseSchema: z.ZodObject<{
|
|
|
1183
1200
|
description: z.ZodNullable<z.ZodString>;
|
|
1184
1201
|
references: z.ZodArray<z.ZodObject<{
|
|
1185
1202
|
type: z.ZodEnum<{
|
|
1203
|
+
product: "product";
|
|
1186
1204
|
order: "order";
|
|
1187
1205
|
admin_user: "admin_user";
|
|
1188
|
-
|
|
1206
|
+
quote_request: "quote_request";
|
|
1207
|
+
task: "task";
|
|
1208
|
+
opportunity: "opportunity";
|
|
1209
|
+
project: "project";
|
|
1189
1210
|
}>;
|
|
1190
1211
|
id: z.ZodString;
|
|
1191
1212
|
available: z.ZodBoolean;
|
|
1192
1213
|
label: z.ZodNullable<z.ZodString>;
|
|
1193
1214
|
url: z.ZodNullable<z.ZodString>;
|
|
1215
|
+
order: z.ZodOptional<z.ZodObject<{
|
|
1216
|
+
status: z.ZodString;
|
|
1217
|
+
total: z.ZodString;
|
|
1218
|
+
currency: z.ZodString;
|
|
1219
|
+
placedAt: z.ZodString;
|
|
1220
|
+
customerName: z.ZodNullable<z.ZodString>;
|
|
1221
|
+
}, z.core.$strip>>;
|
|
1194
1222
|
}, z.core.$strip>>;
|
|
1195
1223
|
customerAccount: z.ZodNullable<z.ZodObject<{
|
|
1196
1224
|
id: z.ZodString;
|
|
@@ -1237,8 +1265,8 @@ export declare const OpportunityTransitionResponseSchema: z.ZodObject<{
|
|
|
1237
1265
|
currency: z.ZodOptional<z.ZodString>;
|
|
1238
1266
|
syncStatus: z.ZodBoolean;
|
|
1239
1267
|
linkSource: z.ZodEnum<{
|
|
1240
|
-
manual: "manual";
|
|
1241
1268
|
auto: "auto";
|
|
1269
|
+
manual: "manual";
|
|
1242
1270
|
created_from_opportunity: "created_from_opportunity";
|
|
1243
1271
|
quote_conversion: "quote_conversion";
|
|
1244
1272
|
}>;
|
|
@@ -1344,8 +1372,8 @@ export declare const UpdateOpportunityStatusRequestSchema: z.ZodObject<{
|
|
|
1344
1372
|
won: "won";
|
|
1345
1373
|
lost: "lost";
|
|
1346
1374
|
}>>;
|
|
1347
|
-
name: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
1348
1375
|
color: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1376
|
+
name: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
1349
1377
|
defaultName: z.ZodOptional<z.ZodString>;
|
|
1350
1378
|
isInitial: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
1351
1379
|
}, z.core.$strict>;
|
|
@@ -1537,14 +1565,25 @@ export declare const OpportunityCommentSchema: z.ZodObject<{
|
|
|
1537
1565
|
body: z.ZodString;
|
|
1538
1566
|
references: z.ZodArray<z.ZodObject<{
|
|
1539
1567
|
type: z.ZodEnum<{
|
|
1568
|
+
product: "product";
|
|
1540
1569
|
order: "order";
|
|
1541
1570
|
admin_user: "admin_user";
|
|
1542
|
-
|
|
1571
|
+
quote_request: "quote_request";
|
|
1572
|
+
task: "task";
|
|
1573
|
+
opportunity: "opportunity";
|
|
1574
|
+
project: "project";
|
|
1543
1575
|
}>;
|
|
1544
1576
|
id: z.ZodString;
|
|
1545
1577
|
available: z.ZodBoolean;
|
|
1546
1578
|
label: z.ZodNullable<z.ZodString>;
|
|
1547
1579
|
url: z.ZodNullable<z.ZodString>;
|
|
1580
|
+
order: z.ZodOptional<z.ZodObject<{
|
|
1581
|
+
status: z.ZodString;
|
|
1582
|
+
total: z.ZodString;
|
|
1583
|
+
currency: z.ZodString;
|
|
1584
|
+
placedAt: z.ZodString;
|
|
1585
|
+
customerName: z.ZodNullable<z.ZodString>;
|
|
1586
|
+
}, z.core.$strip>>;
|
|
1548
1587
|
}, z.core.$strip>>;
|
|
1549
1588
|
editedAt: z.ZodNullable<z.ZodString>;
|
|
1550
1589
|
createdAt: z.ZodString;
|
|
@@ -1564,14 +1603,25 @@ export declare const OpportunityCommentResponseSchema: z.ZodObject<{
|
|
|
1564
1603
|
body: z.ZodString;
|
|
1565
1604
|
references: z.ZodArray<z.ZodObject<{
|
|
1566
1605
|
type: z.ZodEnum<{
|
|
1606
|
+
product: "product";
|
|
1567
1607
|
order: "order";
|
|
1568
1608
|
admin_user: "admin_user";
|
|
1569
|
-
|
|
1609
|
+
quote_request: "quote_request";
|
|
1610
|
+
task: "task";
|
|
1611
|
+
opportunity: "opportunity";
|
|
1612
|
+
project: "project";
|
|
1570
1613
|
}>;
|
|
1571
1614
|
id: z.ZodString;
|
|
1572
1615
|
available: z.ZodBoolean;
|
|
1573
1616
|
label: z.ZodNullable<z.ZodString>;
|
|
1574
1617
|
url: z.ZodNullable<z.ZodString>;
|
|
1618
|
+
order: z.ZodOptional<z.ZodObject<{
|
|
1619
|
+
status: z.ZodString;
|
|
1620
|
+
total: z.ZodString;
|
|
1621
|
+
currency: z.ZodString;
|
|
1622
|
+
placedAt: z.ZodString;
|
|
1623
|
+
customerName: z.ZodNullable<z.ZodString>;
|
|
1624
|
+
}, z.core.$strip>>;
|
|
1575
1625
|
}, z.core.$strip>>;
|
|
1576
1626
|
editedAt: z.ZodNullable<z.ZodString>;
|
|
1577
1627
|
createdAt: z.ZodString;
|
|
@@ -1596,14 +1646,25 @@ export declare const OpportunityCommentListResponseSchema: z.ZodObject<{
|
|
|
1596
1646
|
body: z.ZodString;
|
|
1597
1647
|
references: z.ZodArray<z.ZodObject<{
|
|
1598
1648
|
type: z.ZodEnum<{
|
|
1649
|
+
product: "product";
|
|
1599
1650
|
order: "order";
|
|
1600
1651
|
admin_user: "admin_user";
|
|
1601
|
-
|
|
1652
|
+
quote_request: "quote_request";
|
|
1653
|
+
task: "task";
|
|
1654
|
+
opportunity: "opportunity";
|
|
1655
|
+
project: "project";
|
|
1602
1656
|
}>;
|
|
1603
1657
|
id: z.ZodString;
|
|
1604
1658
|
available: z.ZodBoolean;
|
|
1605
1659
|
label: z.ZodNullable<z.ZodString>;
|
|
1606
1660
|
url: z.ZodNullable<z.ZodString>;
|
|
1661
|
+
order: z.ZodOptional<z.ZodObject<{
|
|
1662
|
+
status: z.ZodString;
|
|
1663
|
+
total: z.ZodString;
|
|
1664
|
+
currency: z.ZodString;
|
|
1665
|
+
placedAt: z.ZodString;
|
|
1666
|
+
customerName: z.ZodNullable<z.ZodString>;
|
|
1667
|
+
}, z.core.$strip>>;
|
|
1607
1668
|
}, z.core.$strip>>;
|
|
1608
1669
|
editedAt: z.ZodNullable<z.ZodString>;
|
|
1609
1670
|
createdAt: z.ZodString;
|
|
@@ -2097,6 +2158,20 @@ export declare const OpportunityQuoteRequestLookupQuerySchema: z.ZodObject<{
|
|
|
2097
2158
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
2098
2159
|
}, z.core.$strip>;
|
|
2099
2160
|
export type OpportunityQuoteRequestLookupQuery = z.infer<typeof OpportunityQuoteRequestLookupQuerySchema>;
|
|
2161
|
+
/**
|
|
2162
|
+
* `GET /crm/lookups/documents` — the `@@` document list of an Opportunity's
|
|
2163
|
+
* texts (`specs/163-projects-and-tasks/` FR-044). The answer is the shared
|
|
2164
|
+
* `RecordDocumentLookupResponse` (`record-references.ts`), the one Projects
|
|
2165
|
+
* serves too. Orders and Quote Requests are those of the Opportunity's
|
|
2166
|
+
* Organization — or, on the create form before there is an Opportunity, of the
|
|
2167
|
+
* Organization chosen there; with neither, the list offers Tasks only.
|
|
2168
|
+
*/
|
|
2169
|
+
export declare const OpportunityDocumentLookupQuerySchema: z.ZodObject<{
|
|
2170
|
+
opportunityId: z.ZodOptional<z.ZodString>;
|
|
2171
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
2172
|
+
q: z.ZodOptional<z.ZodString>;
|
|
2173
|
+
}, z.core.$strip>;
|
|
2174
|
+
export type OpportunityDocumentLookupQuery = z.infer<typeof OpportunityDocumentLookupQuerySchema>;
|
|
2100
2175
|
export declare const OpportunityQuoteRequestOptionSchema: z.ZodObject<{
|
|
2101
2176
|
id: z.ZodString;
|
|
2102
2177
|
number: z.ZodString;
|
|
@@ -2128,14 +2203,25 @@ export declare const OpportunityHistoryEntrySchema: z.ZodObject<{
|
|
|
2128
2203
|
after: z.ZodNullable<z.ZodUnknown>;
|
|
2129
2204
|
references: z.ZodArray<z.ZodObject<{
|
|
2130
2205
|
type: z.ZodEnum<{
|
|
2206
|
+
product: "product";
|
|
2131
2207
|
order: "order";
|
|
2132
2208
|
admin_user: "admin_user";
|
|
2133
|
-
|
|
2209
|
+
quote_request: "quote_request";
|
|
2210
|
+
task: "task";
|
|
2211
|
+
opportunity: "opportunity";
|
|
2212
|
+
project: "project";
|
|
2134
2213
|
}>;
|
|
2135
2214
|
id: z.ZodString;
|
|
2136
2215
|
available: z.ZodBoolean;
|
|
2137
2216
|
label: z.ZodNullable<z.ZodString>;
|
|
2138
2217
|
url: z.ZodNullable<z.ZodString>;
|
|
2218
|
+
order: z.ZodOptional<z.ZodObject<{
|
|
2219
|
+
status: z.ZodString;
|
|
2220
|
+
total: z.ZodString;
|
|
2221
|
+
currency: z.ZodString;
|
|
2222
|
+
placedAt: z.ZodString;
|
|
2223
|
+
customerName: z.ZodNullable<z.ZodString>;
|
|
2224
|
+
}, z.core.$strip>>;
|
|
2139
2225
|
}, z.core.$strip>>;
|
|
2140
2226
|
}, z.core.$strip>;
|
|
2141
2227
|
export type OpportunityHistoryEntry = z.infer<typeof OpportunityHistoryEntrySchema>;
|
|
@@ -2159,14 +2245,25 @@ export declare const OpportunityHistoryResponseSchema: z.ZodObject<{
|
|
|
2159
2245
|
after: z.ZodNullable<z.ZodUnknown>;
|
|
2160
2246
|
references: z.ZodArray<z.ZodObject<{
|
|
2161
2247
|
type: z.ZodEnum<{
|
|
2248
|
+
product: "product";
|
|
2162
2249
|
order: "order";
|
|
2163
2250
|
admin_user: "admin_user";
|
|
2164
|
-
|
|
2251
|
+
quote_request: "quote_request";
|
|
2252
|
+
task: "task";
|
|
2253
|
+
opportunity: "opportunity";
|
|
2254
|
+
project: "project";
|
|
2165
2255
|
}>;
|
|
2166
2256
|
id: z.ZodString;
|
|
2167
2257
|
available: z.ZodBoolean;
|
|
2168
2258
|
label: z.ZodNullable<z.ZodString>;
|
|
2169
2259
|
url: z.ZodNullable<z.ZodString>;
|
|
2260
|
+
order: z.ZodOptional<z.ZodObject<{
|
|
2261
|
+
status: z.ZodString;
|
|
2262
|
+
total: z.ZodString;
|
|
2263
|
+
currency: z.ZodString;
|
|
2264
|
+
placedAt: z.ZodString;
|
|
2265
|
+
customerName: z.ZodNullable<z.ZodString>;
|
|
2266
|
+
}, z.core.$strip>>;
|
|
2170
2267
|
}, z.core.$strip>>;
|
|
2171
2268
|
}, z.core.$strip>>;
|
|
2172
2269
|
pagination: z.ZodObject<{
|
|
@@ -2886,7 +2983,29 @@ export interface OpportunityReadPort {
|
|
|
2886
2983
|
findById(id: string): Promise<OpportunityRecord | null>;
|
|
2887
2984
|
findByDocument(kind: OpportunityDocumentKind, documentId: string): Promise<OpportunityRecord | null>;
|
|
2888
2985
|
listOpenForOrganization(organizationId: string): Promise<OpportunityRecord[]>;
|
|
2986
|
+
/**
|
|
2987
|
+
* The Opportunities of `ids` in the caller's tenant scope, in no particular
|
|
2988
|
+
* order — a missing or malformed id is simply absent. One query for a page of
|
|
2989
|
+
* references (`specs/165-task-management/` R-5). Checks no permission: the
|
|
2990
|
+
* caller checks `crm:read`, as for every other method.
|
|
2991
|
+
*/
|
|
2992
|
+
findByIds(ids: readonly string[]): Promise<OpportunityRecord[]>;
|
|
2993
|
+
/**
|
|
2994
|
+
* Opportunities in the caller's tenant scope whose number or title contains
|
|
2995
|
+
* `q` (case-insensitively; every one for an empty `q`), newest first, at most
|
|
2996
|
+
* `limit` (≤ 20) — the Opportunities group of the `@@` list and the Tasks
|
|
2997
|
+
* link picker (R-5, R-16).
|
|
2998
|
+
*/
|
|
2999
|
+
search(query: OpportunitySearchQuery): Promise<OpportunityRecord[]>;
|
|
3000
|
+
}
|
|
3001
|
+
/** What `OpportunityReadPort.search` is asked. */
|
|
3002
|
+
export interface OpportunitySearchQuery {
|
|
3003
|
+
q?: string;
|
|
3004
|
+
/** At most {@link OPPORTUNITY_READ_PORT_SEARCH_MAX}. */
|
|
3005
|
+
limit: number;
|
|
2889
3006
|
}
|
|
3007
|
+
/** The most Opportunities one `OpportunityReadPort.search` answers. */
|
|
3008
|
+
export declare const OPPORTUNITY_READ_PORT_SEARCH_MAX = 20;
|
|
2890
3009
|
/** Why a requested transition did not happen. */
|
|
2891
3010
|
export declare const OPPORTUNITY_TRANSITION_REFUSALS: readonly ["not_found", "unknown_status", "not_permitted", "vetoed"];
|
|
2892
3011
|
export type OpportunityTransitionRefusal = (typeof OPPORTUNITY_TRANSITION_REFUSALS)[number];
|
|
@@ -2930,5 +3049,4 @@ export interface OpportunityTransitionPort {
|
|
|
2930
3049
|
reason?: string | null;
|
|
2931
3050
|
}): Promise<OpportunityTransitionOutcome>;
|
|
2932
3051
|
}
|
|
2933
|
-
export {};
|
|
2934
3052
|
//# sourceMappingURL=crm.d.ts.map
|