@sixtyninecommerce/admin 0.9.0 → 0.11.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/README.md +4598 -128
- package/dist/catalog/assets.d.ts +120 -8
- package/dist/catalog/assets.js +98 -12
- package/dist/catalog/collections.d.ts +279 -14
- package/dist/catalog/collections.js +246 -15
- package/dist/catalog/index.d.ts +9 -2
- package/dist/catalog/index.js +4 -0
- package/dist/catalog/products.d.ts +318 -17
- package/dist/catalog/products.js +182 -14
- package/dist/catalog/properties.d.ts +102 -14
- package/dist/catalog/properties.js +13 -0
- package/dist/catalog/recommendations.d.ts +261 -0
- package/dist/catalog/recommendations.js +145 -0
- package/dist/catalog/reviews.d.ts +368 -0
- package/dist/catalog/reviews.js +318 -0
- package/dist/catalog/types.d.ts +17 -1
- package/dist/catalog/types.js +10 -0
- package/dist/catalog/variant-find.d.ts +136 -0
- package/dist/catalog/variant-find.js +239 -0
- package/dist/catalog/variants.d.ts +282 -25
- package/dist/catalog/variants.js +173 -25
- package/dist/catalog/visibility.d.ts +20 -5
- package/dist/catalog/visibility.js +19 -1
- package/dist/client.d.ts +116 -9
- package/dist/client.js +41 -7
- package/dist/content/assets.d.ts +286 -0
- package/dist/content/assets.js +181 -0
- package/dist/content/items.d.ts +269 -0
- package/dist/content/items.js +170 -0
- package/dist/content/types.d.ts +282 -0
- package/dist/content/types.js +100 -0
- package/dist/customers/age-verification.d.ts +66 -0
- package/dist/customers/age-verification.js +79 -0
- package/dist/customers/credit.d.ts +263 -0
- package/dist/customers/credit.js +244 -0
- package/dist/customers/delivery-preferences.d.ts +120 -0
- package/dist/customers/delivery-preferences.js +97 -0
- package/dist/customers/groups.d.ts +207 -0
- package/dist/customers/groups.js +438 -0
- package/dist/customers/index.d.ts +447 -37
- package/dist/customers/index.js +313 -40
- package/dist/customers/invitation-status.d.ts +57 -0
- package/dist/customers/invitation-status.js +21 -0
- package/dist/customers/notes.d.ts +67 -0
- package/dist/customers/notes.js +51 -0
- package/dist/customers/notification-recipients.d.ts +97 -0
- package/dist/customers/notification-recipients.js +84 -0
- package/dist/customers/saved-lists.d.ts +42 -0
- package/dist/customers/saved-lists.js +61 -0
- package/dist/customers/vat.d.ts +83 -0
- package/dist/customers/vat.js +46 -0
- package/dist/customers/wire.d.ts +20 -0
- package/dist/customers/wire.js +35 -0
- package/dist/documents/ar.d.ts +307 -0
- package/dist/documents/ar.js +254 -0
- package/dist/documents/index.d.ts +731 -21
- package/dist/documents/index.js +436 -24
- package/dist/documents/pdf.d.ts +2 -0
- package/dist/documents/pdf.js +11 -0
- package/dist/fulfillments/create.d.ts +167 -0
- package/dist/fulfillments/create.js +216 -0
- package/dist/fulfillments/index.d.ts +121 -10
- package/dist/fulfillments/index.js +120 -2
- package/dist/fulfillments/payment-policy.d.ts +64 -0
- package/dist/fulfillments/payment-policy.js +140 -0
- package/dist/fulfillments/warehouse.d.ts +724 -0
- package/dist/fulfillments/warehouse.js +914 -0
- package/dist/geo/index.d.ts +119 -0
- package/dist/geo/index.js +107 -0
- package/dist/index.d.ts +129 -30
- package/dist/index.js +47 -9
- package/dist/integrations/afas-actions.d.ts +234 -0
- package/dist/integrations/afas-actions.js +310 -0
- package/dist/integrations/afas-types.d.ts +483 -0
- package/dist/integrations/afas-types.js +5 -0
- package/dist/integrations/afas.d.ts +234 -0
- package/dist/integrations/afas.js +290 -0
- package/dist/integrations/connections.d.ts +103 -0
- package/dist/integrations/connections.js +55 -0
- package/dist/integrations/esp.d.ts +313 -0
- package/dist/integrations/esp.js +169 -0
- package/dist/integrations/exact-online-types.d.ts +423 -0
- package/dist/integrations/exact-online-types.js +6 -0
- package/dist/integrations/exact-online.d.ts +248 -0
- package/dist/integrations/exact-online.js +376 -0
- package/dist/integrations/index.d.ts +40 -0
- package/dist/integrations/index.js +24 -0
- package/dist/integrations/pipeline-keys.d.ts +13 -0
- package/dist/integrations/pipeline-keys.js +22 -0
- package/dist/integrations/pipelines.d.ts +114 -0
- package/dist/integrations/pipelines.js +46 -0
- package/dist/integrations/types.d.ts +322 -0
- package/dist/integrations/types.js +8 -0
- package/dist/jobs/bulk-action-run.d.ts +11 -2
- package/dist/jobs/bulk-action-run.js +4 -5
- package/dist/locations/index.d.ts +66 -0
- package/dist/locations/index.js +31 -0
- package/dist/meta/index.d.ts +162 -0
- package/dist/orders/bulk.d.ts +75 -0
- package/dist/orders/bulk.js +150 -0
- package/dist/orders/cancel-with-money.d.ts +227 -0
- package/dist/orders/cancel-with-money.js +153 -0
- package/dist/orders/commit-edit.d.ts +7 -1
- package/dist/orders/commit-edit.js +5 -1
- package/dist/orders/deposit-policy.d.ts +103 -0
- package/dist/orders/deposit-policy.js +202 -0
- package/dist/orders/drafts.d.ts +800 -0
- package/dist/orders/drafts.js +771 -0
- package/dist/orders/fields.d.ts +245 -0
- package/dist/orders/fields.js +188 -0
- package/dist/orders/get.d.ts +29 -19
- package/dist/orders/get.js +17 -8
- package/dist/orders/index.d.ts +125 -5
- package/dist/orders/index.js +35 -2
- package/dist/orders/lifecycle.d.ts +128 -0
- package/dist/orders/lifecycle.js +158 -0
- package/dist/orders/line-price-preview.d.ts +7 -2
- package/dist/orders/list.d.ts +222 -0
- package/dist/orders/list.js +377 -0
- package/dist/orders/manual-discounts.d.ts +11 -2
- package/dist/orders/manual-discounts.js +2 -0
- package/dist/orders/manual-pricing.d.ts +5 -0
- package/dist/orders/order-entry.d.ts +20 -7
- package/dist/orders/plan-edit.d.ts +1 -1
- package/dist/orders/plan-edit.js +4 -1
- package/dist/orders/settings.d.ts +201 -0
- package/dist/orders/settings.js +325 -0
- package/dist/orders/status.d.ts +159 -13
- package/dist/orders/status.js +21 -0
- package/dist/orders/surcharges.d.ts +8 -1
- package/dist/orders/surcharges.js +3 -2
- package/dist/payments/account-credit.d.ts +30 -0
- package/dist/payments/account-credit.js +19 -0
- package/dist/payments/ar.d.ts +292 -0
- package/dist/payments/ar.js +223 -0
- package/dist/payments/connected-account.d.ts +47 -0
- package/dist/payments/connected-account.js +61 -0
- package/dist/payments/credit-noted-fields.d.ts +12 -0
- package/dist/payments/credit-noted-fields.js +37 -0
- package/dist/payments/index.d.ts +263 -10
- package/dist/payments/index.js +133 -1
- package/dist/payments/methods.d.ts +332 -0
- package/dist/payments/methods.js +363 -0
- package/dist/payments/mollie-methods.d.ts +159 -0
- package/dist/payments/mollie-methods.js +141 -0
- package/dist/payments/payment-links.d.ts +180 -0
- package/dist/payments/payment-links.js +97 -0
- package/dist/payments/provider-keys.d.ts +150 -0
- package/dist/payments/provider-keys.js +118 -0
- package/dist/payments/providers.d.ts +86 -11
- package/dist/payments/providers.js +29 -0
- package/dist/payments/requests.d.ts +144 -0
- package/dist/payments/requests.js +92 -0
- package/dist/payments/store-credit-fields.d.ts +15 -0
- package/dist/payments/store-credit-fields.js +51 -0
- package/dist/pickups/index.d.ts +104 -0
- package/dist/pickups/index.js +105 -0
- package/dist/platform/channels.d.ts +132 -0
- package/dist/platform/channels.js +128 -0
- package/dist/platform/geo.d.ts +123 -0
- package/dist/platform/geo.js +144 -0
- package/dist/platform/tax.d.ts +154 -0
- package/dist/platform/tax.js +139 -0
- package/dist/pos/anomalies.d.ts +158 -0
- package/dist/pos/anomalies.js +64 -0
- package/dist/pos/assisted-selling.d.ts +79 -0
- package/dist/pos/assisted-selling.js +38 -0
- package/dist/pos/exchanges.d.ts +103 -0
- package/dist/pos/exchanges.js +22 -0
- package/dist/pos/gift-cards.d.ts +135 -0
- package/dist/pos/gift-cards.js +47 -0
- package/dist/pos/index.d.ts +2125 -32
- package/dist/pos/index.js +742 -4
- package/dist/pos/no-receipt.d.ts +94 -0
- package/dist/pos/no-receipt.js +25 -0
- package/dist/pos/offline-sales.d.ts +187 -0
- package/dist/pos/offline-sales.js +116 -0
- package/dist/pos/pay-by-link.d.ts +143 -0
- package/dist/pos/pay-by-link.js +57 -0
- package/dist/pos/quick-keys.d.ts +103 -0
- package/dist/pos/quick-keys.js +45 -0
- package/dist/pos/reports.d.ts +360 -0
- package/dist/pos/reports.js +62 -0
- package/dist/pos/returns.d.ts +217 -0
- package/dist/pos/returns.js +53 -0
- package/dist/pricing/bulk-coupons.d.ts +139 -0
- package/dist/pricing/bulk-coupons.js +112 -0
- package/dist/pricing/index.d.ts +177 -4
- package/dist/pricing/index.js +176 -1
- package/dist/pricing/price-lists.d.ts +604 -0
- package/dist/pricing/price-lists.js +600 -0
- package/dist/pricing/vouchers.d.ts +103 -0
- package/dist/pricing/vouchers.js +69 -0
- package/dist/purchasing/alerts.d.ts +89 -0
- package/dist/purchasing/alerts.js +62 -0
- package/dist/purchasing/cost.d.ts +110 -0
- package/dist/purchasing/cost.js +86 -0
- package/dist/purchasing/index.d.ts +36 -0
- package/dist/purchasing/index.js +16 -0
- package/dist/purchasing/purchase-orders.d.ts +548 -0
- package/dist/purchasing/purchase-orders.js +491 -0
- package/dist/purchasing/replenishment.d.ts +281 -0
- package/dist/purchasing/replenishment.js +240 -0
- package/dist/purchasing/settings.d.ts +152 -0
- package/dist/purchasing/settings.js +181 -0
- package/dist/purchasing/suppliers.d.ts +476 -0
- package/dist/purchasing/suppliers.js +438 -0
- package/dist/quotes/index.d.ts +501 -0
- package/dist/quotes/index.js +439 -0
- package/dist/reports/index.d.ts +71 -8
- package/dist/reports/index.js +74 -11
- package/dist/returns/index.d.ts +818 -0
- package/dist/returns/index.js +844 -0
- package/dist/search/index.d.ts +174 -0
- package/dist/search/index.js +125 -0
- package/dist/shipping/definitions.d.ts +29 -0
- package/dist/shipping/definitions.js +47 -0
- package/dist/shipping/fulfillment-profiles.d.ts +174 -0
- package/dist/shipping/fulfillment-profiles.js +104 -0
- package/dist/shipping/hendriks.d.ts +97 -0
- package/dist/shipping/hendriks.js +50 -0
- package/dist/shipping/index.d.ts +48 -0
- package/dist/shipping/index.js +25 -0
- package/dist/shipping/methods.d.ts +198 -0
- package/dist/shipping/methods.js +240 -0
- package/dist/shipping/myparcel.d.ts +254 -0
- package/dist/shipping/myparcel.js +178 -0
- package/dist/shipping/parcel-count-suggestion.d.ts +2 -0
- package/dist/shipping/parcel-rule.d.ts +6 -5
- package/dist/shipping/parcel-rule.js +21 -23
- package/dist/shipping/rate-tables.d.ts +179 -0
- package/dist/shipping/rate-tables.js +184 -0
- package/dist/stock/index.d.ts +10 -3
- package/dist/stock/index.js +3 -0
- package/dist/stock/locations.d.ts +144 -0
- package/dist/stock/locations.js +168 -0
- package/dist/stock/transfers.d.ts +216 -43
- package/dist/stock/transfers.js +140 -13
- package/dist/stored-value/index.d.ts +214 -4
- package/dist/stored-value/index.js +152 -0
- package/dist/subscriptions/index.d.ts +682 -0
- package/dist/subscriptions/index.js +815 -0
- package/dist/tax/index.d.ts +76 -1
- package/dist/tax/index.js +50 -0
- package/dist/tenant/email-style.d.ts +102 -0
- package/dist/tenant/email-style.js +72 -0
- package/dist/tenant/email-templates.d.ts +66 -0
- package/dist/tenant/email-templates.js +54 -0
- package/dist/tenant/notifications.d.ts +23 -17
- package/dist/tenant/settings-sources.d.ts +1 -1
- package/dist/tenant/time-zone.d.ts +17 -0
- package/dist/tenant/time-zone.js +11 -0
- package/dist/types.d.ts +51 -4
- package/dist/users/index.d.ts +3 -0
- package/dist/users/index.js +2 -0
- package/dist/users/warehouses.d.ts +50 -0
- package/dist/users/warehouses.js +51 -0
- package/package.json +2 -2
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `admin.quotes`: B2B quotes, from the draft a sales rep builds to the order it converts into
|
|
3
|
+
* (headless spec §9.2 `quotes`; plan W10-35a).
|
|
4
|
+
*
|
|
5
|
+
* A quote is a store's offer to one customer, in one currency (`currencyCode`, one of the store's
|
|
6
|
+
* currencies). Staff build it (`createDraft`, `lines.*`, `setPricing`), move it through its
|
|
7
|
+
* statuses (`submit`, `approve`, `decline`, `cancel`) and turn an approved one into an order
|
|
8
|
+
* awaiting payment (`convertToOrder`). A customer can also request one from the storefront; it
|
|
9
|
+
* arrives `requested`.
|
|
10
|
+
*
|
|
11
|
+
* **The engine answers what can be done.** `Quote.editable` says whether the lines and prices may
|
|
12
|
+
* still change (every line and pricing method refuses `QUOTE_NOT_EDITABLE` exactly when it is
|
|
13
|
+
* false), and `Quote.convertible` whether `convertToOrder` would create the order now. Show the
|
|
14
|
+
* buttons from them; never re-derive either from the status.
|
|
15
|
+
*
|
|
16
|
+
* **Money** is an integer in minor units of the QUOTE's `currencyCode`. A line's `unitPrice`, its
|
|
17
|
+
* fixed discount, `discountAmount` and `effectiveUnitPrice` are in the store's primary tax mode
|
|
18
|
+
* (gross on a store whose prices include tax, net otherwise); `lineTotal` / `lineTotalWithTax`
|
|
19
|
+
* are the explicit net and gross halves. A percentage discount is in basis points (1000 = 10%).
|
|
20
|
+
* Every figure is the engine's own maths: the quote PDF and the converted order use the same.
|
|
21
|
+
*
|
|
22
|
+
* **Refusals** (`PlatformError`, by `code`): `QUOTE_NOT_FOUND` (404) for a quote or line the store
|
|
23
|
+
* does not have, another store's included; `QUOTE_LINE_INVALID` (400, `details[0].field` names the
|
|
24
|
+
* input) for a quantity, unit price, variant or pricing line it refuses; `QUOTE_DISCOUNT_INVALID`
|
|
25
|
+
* (400); `QUOTE_NOT_EDITABLE` (422); `QUOTE_CONVERT_STATE_INVALID` (422); `QUOTE_CURRENCY_MISMATCH`,
|
|
26
|
+
* `CURRENCY_NOT_AVAILABLE`, `ORDER_LINE_VARIANT_UNPRICED` (a line priced from the catalogue for a
|
|
27
|
+
* variant the store has no price for) and `HUB_HAS_NO_ORDERS` / `ORGANIZATION_WORKSPACE_NOT_A_STORE`
|
|
28
|
+
* (an organization workspace keeps no quotes). Each passes through as the engine sent it.
|
|
29
|
+
*
|
|
30
|
+
* Every value set below grows over time: treat a status this version does not name as one with
|
|
31
|
+
* no action (the engine's `editable` / `convertible` stay authoritative).
|
|
32
|
+
*/
|
|
33
|
+
import { type Transport } from '@sixtyninecommerce/core';
|
|
34
|
+
import type { Call } from '../types.js';
|
|
35
|
+
export declare const QUOTE_STATUSES: readonly ["draft", "requested", "in_review", "approved", "declined", "expired", "converted_to_order", "cancelled"];
|
|
36
|
+
export type QuoteStatus = (typeof QUOTE_STATUSES)[number];
|
|
37
|
+
/** `percentage`: basis points (1000 = 10%). `fixed`: minor units off the WHOLE line. */
|
|
38
|
+
export type QuoteLineDiscountType = 'percentage' | 'fixed';
|
|
39
|
+
/** A line's variant, in the quote's store. `storePrice` is null when the store has no price for it. */
|
|
40
|
+
export interface QuoteLineVariant {
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
sku: string;
|
|
44
|
+
storePrice: {
|
|
45
|
+
price: number;
|
|
46
|
+
priceWithTax: number;
|
|
47
|
+
} | null;
|
|
48
|
+
product: {
|
|
49
|
+
id: string;
|
|
50
|
+
name: string;
|
|
51
|
+
featuredAsset: {
|
|
52
|
+
id: string;
|
|
53
|
+
preview: string;
|
|
54
|
+
} | null;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export interface QuoteLine {
|
|
58
|
+
id: string;
|
|
59
|
+
productVariantId: string;
|
|
60
|
+
quantity: number;
|
|
61
|
+
/** In the store's primary tax mode; null until the line is priced ("Pending"). */
|
|
62
|
+
unitPrice: number | null;
|
|
63
|
+
discountType: QuoteLineDiscountType | null;
|
|
64
|
+
/** Basis points (percentage) or minor units (fixed); 0 with no discount. */
|
|
65
|
+
discountValue: number;
|
|
66
|
+
discountLabel: string | null;
|
|
67
|
+
position: number;
|
|
68
|
+
/** The whole-line discount, in the store's primary tax mode. Null while unpriced. */
|
|
69
|
+
discountAmount: number | null;
|
|
70
|
+
/**
|
|
71
|
+
* The per-unit price the converted order line gets: the discounted line total ÷ quantity,
|
|
72
|
+
* rounded. The figure to show as the line's unit price. Null while unpriced.
|
|
73
|
+
*/
|
|
74
|
+
effectiveUnitPrice: number | null;
|
|
75
|
+
/** Net line total after discount. Null while unpriced or when the variant is unavailable. */
|
|
76
|
+
lineTotal: number | null;
|
|
77
|
+
/** Gross line total after discount. Null while unpriced or when the variant is unavailable. */
|
|
78
|
+
lineTotalWithTax: number | null;
|
|
79
|
+
/** `lineTotalWithTax − lineTotal`. Null as those are. */
|
|
80
|
+
taxAmount: number | null;
|
|
81
|
+
/** The variant's applied tax rate as a percent (21, 13.5). Null when it is unavailable. */
|
|
82
|
+
taxRate: number | null;
|
|
83
|
+
/** Null when the variant was deleted or left the store. */
|
|
84
|
+
productVariant: QuoteLineVariant | null;
|
|
85
|
+
/**
|
|
86
|
+
* What the customer's price lists charge for the line (same basis as `unitPrice`), null when no
|
|
87
|
+
* list prices it. Only {@link QuotesModule.get} reads it: absent elsewhere.
|
|
88
|
+
*/
|
|
89
|
+
suggestedUnitPrice?: number | null;
|
|
90
|
+
createdAt: string;
|
|
91
|
+
updatedAt: string;
|
|
92
|
+
}
|
|
93
|
+
export interface QuoteStatusLogEntry {
|
|
94
|
+
id: string;
|
|
95
|
+
status: QuoteStatus;
|
|
96
|
+
createdAt: string;
|
|
97
|
+
actorUserId: string | null;
|
|
98
|
+
metadata: Record<string, unknown> | null;
|
|
99
|
+
}
|
|
100
|
+
export interface QuoteSalesRepresentative {
|
|
101
|
+
/** The administrator's id. */
|
|
102
|
+
id: string;
|
|
103
|
+
/** The administrator's user id: what `assignSalesRep` takes. */
|
|
104
|
+
userId: string;
|
|
105
|
+
firstName: string;
|
|
106
|
+
lastName: string;
|
|
107
|
+
emailAddress: string;
|
|
108
|
+
}
|
|
109
|
+
export interface QuoteDocument {
|
|
110
|
+
id: string;
|
|
111
|
+
documentNumber: string;
|
|
112
|
+
fileSize: number;
|
|
113
|
+
generatedAt: string;
|
|
114
|
+
lastSentAt: string | null;
|
|
115
|
+
/**
|
|
116
|
+
* A five-minute signed link to the PDF, minted per read: open it right away, never store it.
|
|
117
|
+
* Only {@link QuotesModule.get} reads it.
|
|
118
|
+
*/
|
|
119
|
+
downloadUrl?: string;
|
|
120
|
+
}
|
|
121
|
+
export interface Quote {
|
|
122
|
+
id: string;
|
|
123
|
+
code: string;
|
|
124
|
+
customerId: string;
|
|
125
|
+
/** Every money figure on the quote is in this currency, and the order is created in it. */
|
|
126
|
+
currencyCode: string;
|
|
127
|
+
status: QuoteStatus;
|
|
128
|
+
/** Whether the lines and prices may still change (see the module docs). */
|
|
129
|
+
editable: boolean;
|
|
130
|
+
/** Whether {@link QuotesModule.convertToOrder} would create the order now. */
|
|
131
|
+
convertible: boolean;
|
|
132
|
+
/** ISO-8601 instant the offer lapses at; null for no end. */
|
|
133
|
+
expiresAt: string | null;
|
|
134
|
+
/**
|
|
135
|
+
* The last day the offer is open, `YYYY-MM-DD`, in the store's time zone: show this as "valid
|
|
136
|
+
* until", never a date derived from `expiresAt` in the reader's zone. Null for no end.
|
|
137
|
+
*/
|
|
138
|
+
validUntil: string | null;
|
|
139
|
+
salesRepUserId: string | null;
|
|
140
|
+
customerNotes: string | null;
|
|
141
|
+
internalNotes: string | null;
|
|
142
|
+
/** The order the quote converted into, once it has. */
|
|
143
|
+
convertedOrderId: string | null;
|
|
144
|
+
customer: {
|
|
145
|
+
id: string;
|
|
146
|
+
firstName: string;
|
|
147
|
+
lastName: string;
|
|
148
|
+
emailAddress: string;
|
|
149
|
+
addresses: Array<{
|
|
150
|
+
company: string | null;
|
|
151
|
+
defaultBillingAddress: boolean;
|
|
152
|
+
defaultShippingAddress: boolean;
|
|
153
|
+
}> | null;
|
|
154
|
+
} | null;
|
|
155
|
+
salesRep: QuoteSalesRepresentative | null;
|
|
156
|
+
lines: QuoteLine[];
|
|
157
|
+
document: QuoteDocument | null;
|
|
158
|
+
/** Newest first. Only {@link QuotesModule.get} reads it. */
|
|
159
|
+
statusLogs?: QuoteStatusLogEntry[];
|
|
160
|
+
createdAt: string;
|
|
161
|
+
updatedAt: string;
|
|
162
|
+
/**
|
|
163
|
+
* Set when the caller's customer-data level blanked the customer (an app installation below
|
|
164
|
+
* `customerData: full`): read an empty name as "not granted", never as "none".
|
|
165
|
+
*/
|
|
166
|
+
redacted?: true;
|
|
167
|
+
}
|
|
168
|
+
export interface QuoteListOptions {
|
|
169
|
+
/** 1 to 100; 25 when left out. */
|
|
170
|
+
take?: number;
|
|
171
|
+
skip?: number;
|
|
172
|
+
status?: QuoteStatus;
|
|
173
|
+
customerId?: string;
|
|
174
|
+
/** Part of the quote code, case-insensitive. */
|
|
175
|
+
code?: string;
|
|
176
|
+
}
|
|
177
|
+
export interface QuoteList {
|
|
178
|
+
items: Quote[];
|
|
179
|
+
totalItems: number;
|
|
180
|
+
}
|
|
181
|
+
export interface CreateDraftQuoteInput {
|
|
182
|
+
customerId: string;
|
|
183
|
+
/** One of the store's currencies (`settings.get().availableCurrencyCodes`). */
|
|
184
|
+
currencyCode: string;
|
|
185
|
+
customerNotes?: string | null;
|
|
186
|
+
internalNotes?: string | null;
|
|
187
|
+
/** Lines to start with; each starts unpriced ("Pending"). */
|
|
188
|
+
items?: Array<{
|
|
189
|
+
productVariantId: string;
|
|
190
|
+
quantity: number;
|
|
191
|
+
}>;
|
|
192
|
+
}
|
|
193
|
+
export interface AddQuoteLineInput {
|
|
194
|
+
productVariantId: string;
|
|
195
|
+
/** 1 to 1,000,000. */
|
|
196
|
+
quantity: number;
|
|
197
|
+
/**
|
|
198
|
+
* In the store's primary tax mode. Left out, the engine suggests one: the customer's price-list
|
|
199
|
+
* price, else the catalogue price (refused `ORDER_LINE_VARIANT_UNPRICED` for a variant the
|
|
200
|
+
* store has no price for).
|
|
201
|
+
*/
|
|
202
|
+
unitPrice?: number | null;
|
|
203
|
+
discountType?: QuoteLineDiscountType | null;
|
|
204
|
+
discountValue?: number | null;
|
|
205
|
+
discountLabel?: string | null;
|
|
206
|
+
}
|
|
207
|
+
/** Each field left out keeps what the line has. */
|
|
208
|
+
export interface UpdateQuoteLineInput {
|
|
209
|
+
quantity?: number;
|
|
210
|
+
unitPrice?: number | null;
|
|
211
|
+
discountType?: QuoteLineDiscountType | null;
|
|
212
|
+
discountValue?: number | null;
|
|
213
|
+
discountLabel?: string | null;
|
|
214
|
+
position?: number;
|
|
215
|
+
}
|
|
216
|
+
export interface SetQuotePricingInput {
|
|
217
|
+
/**
|
|
218
|
+
* The last day the offer is open, `YYYY-MM-DD`: the engine stores the end of that day in the
|
|
219
|
+
* store's time zone. Null for no end; left out (with `expiresAt`) keeps the current one. Never
|
|
220
|
+
* together with `expiresAt` (`QUOTE_EXPIRY_INVALID`).
|
|
221
|
+
*/
|
|
222
|
+
validUntil?: string | null;
|
|
223
|
+
/** ISO-8601 instant, with its offset; null for no end. Prefer `validUntil`. */
|
|
224
|
+
expiresAt?: string | null;
|
|
225
|
+
customerNotes?: string | null;
|
|
226
|
+
internalNotes?: string | null;
|
|
227
|
+
/** One entry per line to price; a line of another quote is refused `QUOTE_LINE_INVALID`. */
|
|
228
|
+
lines: Array<{
|
|
229
|
+
lineId: string;
|
|
230
|
+
unitPrice: number;
|
|
231
|
+
discountType?: QuoteLineDiscountType | null;
|
|
232
|
+
discountValue?: number | null;
|
|
233
|
+
discountLabel?: string | null;
|
|
234
|
+
}>;
|
|
235
|
+
}
|
|
236
|
+
/** The new end as exactly one of `validUntil` (preferred) and `expiresAt`. */
|
|
237
|
+
export type ExtendQuoteValidityInput = ({
|
|
238
|
+
/**
|
|
239
|
+
* The new last day the offer is open, `YYYY-MM-DD`, ended in the store's time zone: today
|
|
240
|
+
* or later there, else `QUOTE_EXPIRY_INVALID`.
|
|
241
|
+
*/
|
|
242
|
+
validUntil: string;
|
|
243
|
+
expiresAt?: never;
|
|
244
|
+
} | {
|
|
245
|
+
/** A new end strictly after now (ISO-8601 with its offset); else `QUOTE_EXPIRY_INVALID`. */
|
|
246
|
+
expiresAt: string;
|
|
247
|
+
validUntil?: never;
|
|
248
|
+
}) & {
|
|
249
|
+
/** Left out: kept. Null: cleared. */
|
|
250
|
+
customerNotes?: string | null;
|
|
251
|
+
internalNotes?: string | null;
|
|
252
|
+
};
|
|
253
|
+
/** The order a quote converted into: awaiting payment (`ArrangingPayment`). */
|
|
254
|
+
export interface ConvertedQuoteOrder {
|
|
255
|
+
id: string;
|
|
256
|
+
code: string;
|
|
257
|
+
state: string;
|
|
258
|
+
currencyCode: string;
|
|
259
|
+
totalWithTax: number;
|
|
260
|
+
/** The key this attempt ran under (the one passed, or the one made up for it). */
|
|
261
|
+
idempotencyKey: string;
|
|
262
|
+
}
|
|
263
|
+
/** The store's quote PDF design and quote numbering. */
|
|
264
|
+
export interface QuoteConfig {
|
|
265
|
+
id: string;
|
|
266
|
+
channelId: string;
|
|
267
|
+
numberPrefix: string;
|
|
268
|
+
numberSuffix: string;
|
|
269
|
+
numberDigits: number;
|
|
270
|
+
/** `none`, `short` or `full`. */
|
|
271
|
+
yearFormat: string;
|
|
272
|
+
yearReset: boolean;
|
|
273
|
+
lastResetYear: number | null;
|
|
274
|
+
documentTitle: string;
|
|
275
|
+
footerText: string | null;
|
|
276
|
+
validityNoticeTemplate: string | null;
|
|
277
|
+
columnProduct: boolean;
|
|
278
|
+
columnSku: boolean;
|
|
279
|
+
columnQuantity: boolean;
|
|
280
|
+
columnUnitPriceExcl: boolean;
|
|
281
|
+
columnUnitPriceDiscount: boolean;
|
|
282
|
+
columnUnitPriceIncl: boolean;
|
|
283
|
+
columnUnitPriceAfterDiscount: boolean;
|
|
284
|
+
columnLineTotal: boolean;
|
|
285
|
+
columnLineDiscount: boolean;
|
|
286
|
+
columnTaxRate: boolean;
|
|
287
|
+
columnTaxAmount: boolean;
|
|
288
|
+
columnTotal: boolean;
|
|
289
|
+
showLogo: boolean;
|
|
290
|
+
defaultLanguage: string | null;
|
|
291
|
+
termsTitle: string | null;
|
|
292
|
+
termsBody: string | null;
|
|
293
|
+
acceptanceInstructions: string | null;
|
|
294
|
+
}
|
|
295
|
+
/** Each field left out keeps what the store has. */
|
|
296
|
+
export type UpdateQuoteConfigInput = Partial<Omit<QuoteConfig, 'id' | 'channelId' | 'lastResetYear'>>;
|
|
297
|
+
/** The store's OWN quote settings (an organization may apply its own `quotesEnabled` instead). */
|
|
298
|
+
export interface QuoteSettings {
|
|
299
|
+
/** Whether the storefront takes quote requests (the store's own switch). */
|
|
300
|
+
quotesEnabled: boolean;
|
|
301
|
+
defaultCurrencyCode: string;
|
|
302
|
+
/** The currencies a quote can be in. */
|
|
303
|
+
availableCurrencyCodes: string[];
|
|
304
|
+
}
|
|
305
|
+
/** One key per attempt for {@link QuotesModule.convertToOrder}. */
|
|
306
|
+
export interface KeyedQuoteCall extends Call {
|
|
307
|
+
/**
|
|
308
|
+
* Re-sent unchanged on a retry of THAT attempt (a timeout, a dropped connection). Left out, one
|
|
309
|
+
* is made up (a UUIDv7) and returned as `idempotencyKey` on the result, and on a thrown error as
|
|
310
|
+
* an untyped own property of the error. Never reuse a key for another quote or a fresh attempt.
|
|
311
|
+
*/
|
|
312
|
+
idempotencyKey?: string;
|
|
313
|
+
}
|
|
314
|
+
export interface QuoteLinesModule {
|
|
315
|
+
/**
|
|
316
|
+
* Add a line to an editable quote. Needs `UpdateOrder`. Refused `QUOTE_NOT_EDITABLE`,
|
|
317
|
+
* `QUOTE_LINE_INVALID`, `QUOTE_DISCOUNT_INVALID`, `ORDER_LINE_VARIANT_UNPRICED`,
|
|
318
|
+
* `QUOTE_NOT_FOUND`.
|
|
319
|
+
*
|
|
320
|
+
* @effect write
|
|
321
|
+
*/
|
|
322
|
+
add(quoteId: string, input: AddQuoteLineInput, options?: Call): Promise<Quote>;
|
|
323
|
+
/**
|
|
324
|
+
* Change a line of an editable quote; answers the quote. Needs `UpdateOrder`. Refused as
|
|
325
|
+
* {@link add}, and `QUOTE_NOT_FOUND` for a line the store does not have.
|
|
326
|
+
*
|
|
327
|
+
* @effect write
|
|
328
|
+
*/
|
|
329
|
+
update(lineId: string, input: UpdateQuoteLineInput, options?: Call): Promise<Quote>;
|
|
330
|
+
/**
|
|
331
|
+
* Take a line off an editable quote; answers the quote. A draft edit of an offer not yet made
|
|
332
|
+
* (an approved quote is not editable), so it is a write, not a delete. Needs `UpdateOrder`.
|
|
333
|
+
*
|
|
334
|
+
* @effect write
|
|
335
|
+
*/
|
|
336
|
+
remove(lineId: string, options?: Call): Promise<Quote>;
|
|
337
|
+
}
|
|
338
|
+
export interface QuoteConfigModule {
|
|
339
|
+
/**
|
|
340
|
+
* The store's quote PDF design and numbering (made with defaults on the first read; an
|
|
341
|
+
* organization's numbering format when the store inherits it). Needs `ReadSettings`.
|
|
342
|
+
*
|
|
343
|
+
* @effect read
|
|
344
|
+
*/
|
|
345
|
+
get(options?: Call): Promise<QuoteConfig>;
|
|
346
|
+
/**
|
|
347
|
+
* Change the quote PDF design or numbering. Needs `UpdateSettings`. A `yearFormat` other than
|
|
348
|
+
* `none`, `short` or `full` is refused `NUMBERING_YEAR_FORMAT_INVALID`.
|
|
349
|
+
*
|
|
350
|
+
* @effect write
|
|
351
|
+
*/
|
|
352
|
+
update(input: UpdateQuoteConfigInput, options?: Call): Promise<QuoteConfig>;
|
|
353
|
+
}
|
|
354
|
+
export interface QuoteSettingsModule {
|
|
355
|
+
/**
|
|
356
|
+
* The store's own quote switch and its currencies (ruling G80: typed per domain). Needs only a
|
|
357
|
+
* session in the store.
|
|
358
|
+
*
|
|
359
|
+
* @effect read
|
|
360
|
+
*/
|
|
361
|
+
get(options?: Call): Promise<QuoteSettings>;
|
|
362
|
+
}
|
|
363
|
+
export interface QuotesModule {
|
|
364
|
+
/**
|
|
365
|
+
* A page of the store's quotes, newest first, each with its lines. Needs `ReadOrder`.
|
|
366
|
+
*
|
|
367
|
+
* @effect read
|
|
368
|
+
*/
|
|
369
|
+
list(options?: QuoteListOptions & Call): Promise<QuoteList>;
|
|
370
|
+
/**
|
|
371
|
+
* One quote with its status history, each line's price-list suggestion and the PDF's download
|
|
372
|
+
* link; null for a quote the store does not have. Needs `ReadOrder`.
|
|
373
|
+
*
|
|
374
|
+
* @effect read
|
|
375
|
+
*/
|
|
376
|
+
get(quoteId: string, options?: Call): Promise<Quote | null>;
|
|
377
|
+
/**
|
|
378
|
+
* A new quote in `draft`, for one of the store's customers, in one of its currencies (else
|
|
379
|
+
* `CURRENCY_NOT_AVAILABLE`). The caller becomes its sales rep when eligible. Needs `UpdateOrder`.
|
|
380
|
+
*
|
|
381
|
+
* @effect write
|
|
382
|
+
*/
|
|
383
|
+
createDraft(input: CreateDraftQuoteInput, options?: Call): Promise<Quote>;
|
|
384
|
+
lines: QuoteLinesModule;
|
|
385
|
+
/**
|
|
386
|
+
* Price every line given, and set the expiry and notes, in one write. Only while the quote is
|
|
387
|
+
* editable (`QUOTE_NOT_EDITABLE`). Needs `UpdateOrder`.
|
|
388
|
+
*
|
|
389
|
+
* @effect write
|
|
390
|
+
*/
|
|
391
|
+
setPricing(quoteId: string, input: SetQuotePricingInput, options?: Call): Promise<Quote>;
|
|
392
|
+
/**
|
|
393
|
+
* Move an APPROVED quote's expiry (and its notes) without reopening it. Refused
|
|
394
|
+
* `QUOTE_NOT_EXTENDABLE` otherwise, and for an offer that already lapsed. Needs `UpdateOrder`.
|
|
395
|
+
*
|
|
396
|
+
* @effect write
|
|
397
|
+
*/
|
|
398
|
+
extendValidity(quoteId: string, input: ExtendQuoteValidityInput, options?: Call): Promise<Quote>;
|
|
399
|
+
/**
|
|
400
|
+
* Give the quote a sales rep (`salesRepresentatives` lists who qualifies), or none with `null`.
|
|
401
|
+
* Needs `UpdateOrder`.
|
|
402
|
+
*
|
|
403
|
+
* @effect write
|
|
404
|
+
*/
|
|
405
|
+
assignSalesRep(quoteId: string, salesRepUserId: string | null, options?: Call): Promise<Quote>;
|
|
406
|
+
/**
|
|
407
|
+
* The store's staff who may own a quote (they hold `UpdateOrder` in the store), at most 50,
|
|
408
|
+
* filtered by `term` on the name or email. Needs `UpdateOrder`.
|
|
409
|
+
*
|
|
410
|
+
* @effect read
|
|
411
|
+
*/
|
|
412
|
+
salesRepresentatives(term?: string | null, options?: Call): Promise<QuoteSalesRepresentative[]>;
|
|
413
|
+
/**
|
|
414
|
+
* `draft` or `requested` → `in_review`. Needs `UpdateOrder`.
|
|
415
|
+
*
|
|
416
|
+
* @effect write
|
|
417
|
+
*/
|
|
418
|
+
submit(quoteId: string, options?: Call): Promise<Quote>;
|
|
419
|
+
/**
|
|
420
|
+
* `in_review` → `approved`: the offer the customer holds (emailed with its PDF when the store
|
|
421
|
+
* sends quote emails). Every line must be priced. Needs `UpdateOrder`.
|
|
422
|
+
*
|
|
423
|
+
* @effect write
|
|
424
|
+
*/
|
|
425
|
+
approve(quoteId: string, options?: Call): Promise<Quote>;
|
|
426
|
+
/**
|
|
427
|
+
* Decline the quote, with the reason. Final: a declined quote never moves again. Needs
|
|
428
|
+
* `UpdateOrder`.
|
|
429
|
+
*
|
|
430
|
+
* @effect destructive
|
|
431
|
+
*/
|
|
432
|
+
decline(quoteId: string, reason: string, options?: Call): Promise<Quote>;
|
|
433
|
+
/**
|
|
434
|
+
* Cancel the quote, optionally with a reason. Final: a cancelled quote never moves again.
|
|
435
|
+
* Needs `UpdateOrder`.
|
|
436
|
+
*
|
|
437
|
+
* @effect destructive
|
|
438
|
+
*/
|
|
439
|
+
cancel(quoteId: string, reason?: string | null, options?: Call): Promise<Quote>;
|
|
440
|
+
/**
|
|
441
|
+
* Turn an approved quote into an order awaiting payment (`ArrangingPayment`), at the quoted
|
|
442
|
+
* prices, in the quote's currency. Needs `UpdateOrder`.
|
|
443
|
+
*
|
|
444
|
+
* It moves no money (the order is paid later, through its own methods), so it is a write; it
|
|
445
|
+
* creates an order, so it is keyed. One quote makes one order: a conversion that overlaps
|
|
446
|
+
* another waits for it and answers the same order, and a quote already converted answers its
|
|
447
|
+
* order. One key per attempt (`options.idempotencyKey`): a repeat under the same key answers the
|
|
448
|
+
* same order (as it stands now) or the same refusal; the same key with another quote is
|
|
449
|
+
* `IDEMPOTENCY_CONFLICT`.
|
|
450
|
+
*
|
|
451
|
+
* Refused, with nothing created: `QUOTE_CONVERT_STATE_INVALID` when `convertible` is false
|
|
452
|
+
* (`details` carry the `reason`: STATUS, EXPIRED, NO_LINES, LINE_UNPRICED), `QUOTE_NOT_FOUND`,
|
|
453
|
+
* `HUB_HAS_NO_ORDERS`, an order minimum or address the store refuses (the engine's sentence).
|
|
454
|
+
*
|
|
455
|
+
* @effect write
|
|
456
|
+
*/
|
|
457
|
+
convertToOrder(quoteId: string, options?: KeyedQuoteCall): Promise<ConvertedQuoteOrder>;
|
|
458
|
+
/**
|
|
459
|
+
* Render the quote PDF again (it is stored privately; read its link with {@link get}). Needs
|
|
460
|
+
* `UpdateOrder`.
|
|
461
|
+
*
|
|
462
|
+
* @effect write
|
|
463
|
+
*/
|
|
464
|
+
generateDocument(quoteId: string, options?: Call): Promise<QuoteDocument>;
|
|
465
|
+
/**
|
|
466
|
+
* Email the priced quote and its PDF (rendered first) to the customer. Refused when every line
|
|
467
|
+
* is not priced, or when the store's "Quote Approved" email is off or has no recipient. An
|
|
468
|
+
* email cannot be taken back.
|
|
469
|
+
*
|
|
470
|
+
* @effect irreversible
|
|
471
|
+
*/
|
|
472
|
+
sendToCustomer(quoteId: string, options?: Call): Promise<void>;
|
|
473
|
+
config: QuoteConfigModule;
|
|
474
|
+
settings: QuoteSettingsModule;
|
|
475
|
+
}
|
|
476
|
+
export declare const QUOTE_FIELDS = "\n id\n code\n customerId\n currencyCode\n status\n editable\n convertible\n expiresAt\n validUntil\n salesRepUserId\n customerNotes\n internalNotes\n convertedOrderId\n createdAt\n updatedAt\n customer {\n id\n firstName\n lastName\n emailAddress\n addresses {\n company\n defaultBillingAddress\n defaultShippingAddress\n }\n }\n salesRep {\n id\n userId\n firstName\n lastName\n emailAddress\n }\n lines {\n \n id\n productVariantId\n quantity\n unitPrice\n discountType\n discountValue\n discountLabel\n position\n discountAmount\n effectiveUnitPrice\n lineTotal\n lineTotalWithTax\n taxAmount\n taxRate\n createdAt\n updatedAt\n productVariant {\n id\n name\n sku\n storePrice {\n price\n priceWithTax\n }\n product {\n id\n name\n featuredAsset {\n id\n preview\n }\n }\n }\n\n }\n document {\n \n id\n documentNumber\n fileSize\n generatedAt\n lastSentAt\n\n }\n";
|
|
477
|
+
export declare const QUOTES_LIST_QUERY = "\n query QuotesList($options: AdminQuoteListOptions) {\n quotes(options: $options) {\n items {\n \n id\n code\n customerId\n currencyCode\n status\n editable\n convertible\n expiresAt\n validUntil\n salesRepUserId\n customerNotes\n internalNotes\n convertedOrderId\n createdAt\n updatedAt\n customer {\n id\n firstName\n lastName\n emailAddress\n addresses {\n company\n defaultBillingAddress\n defaultShippingAddress\n }\n }\n salesRep {\n id\n userId\n firstName\n lastName\n emailAddress\n }\n lines {\n \n id\n productVariantId\n quantity\n unitPrice\n discountType\n discountValue\n discountLabel\n position\n discountAmount\n effectiveUnitPrice\n lineTotal\n lineTotalWithTax\n taxAmount\n taxRate\n createdAt\n updatedAt\n productVariant {\n id\n name\n sku\n storePrice {\n price\n priceWithTax\n }\n product {\n id\n name\n featuredAsset {\n id\n preview\n }\n }\n }\n\n }\n document {\n \n id\n documentNumber\n fileSize\n generatedAt\n lastSentAt\n\n }\n\n }\n totalItems\n }\n }\n";
|
|
478
|
+
/**
|
|
479
|
+
* The detail read adds what costs per read: the signed PDF link (a storage round trip) and each
|
|
480
|
+
* line's price-list suggestion (the price-list strategy per line). The list never selects them.
|
|
481
|
+
*/
|
|
482
|
+
export declare const QUOTE_GET_QUERY = "\n query QuotesGet($id: ID!) {\n quote(id: $id) {\n \n id\n code\n customerId\n currencyCode\n status\n editable\n convertible\n expiresAt\n validUntil\n salesRepUserId\n customerNotes\n internalNotes\n convertedOrderId\n createdAt\n updatedAt\n customer {\n id\n firstName\n lastName\n emailAddress\n addresses {\n company\n defaultBillingAddress\n defaultShippingAddress\n }\n }\n salesRep {\n id\n userId\n firstName\n lastName\n emailAddress\n }\n lines {\n \n id\n productVariantId\n quantity\n unitPrice\n discountType\n discountValue\n discountLabel\n position\n discountAmount\n effectiveUnitPrice\n lineTotal\n lineTotalWithTax\n taxAmount\n taxRate\n createdAt\n updatedAt\n productVariant {\n id\n name\n sku\n storePrice {\n price\n priceWithTax\n }\n product {\n id\n name\n featuredAsset {\n id\n preview\n }\n }\n }\n\n }\n document {\n \n id\n documentNumber\n fileSize\n generatedAt\n lastSentAt\n\n }\n\n document {\n downloadUrl\n }\n lines {\n id\n suggestedUnitPrice\n }\n statusLogs {\n id\n status\n createdAt\n actorUserId\n metadata\n }\n }\n }\n";
|
|
483
|
+
export declare const QUOTE_CREATE_DRAFT_MUTATION = "\n mutation QuotesCreateDraft($input: CreateDraftQuoteInput!) {\n createDraftQuote(input: $input) {\n \n id\n code\n customerId\n currencyCode\n status\n editable\n convertible\n expiresAt\n validUntil\n salesRepUserId\n customerNotes\n internalNotes\n convertedOrderId\n createdAt\n updatedAt\n customer {\n id\n firstName\n lastName\n emailAddress\n addresses {\n company\n defaultBillingAddress\n defaultShippingAddress\n }\n }\n salesRep {\n id\n userId\n firstName\n lastName\n emailAddress\n }\n lines {\n \n id\n productVariantId\n quantity\n unitPrice\n discountType\n discountValue\n discountLabel\n position\n discountAmount\n effectiveUnitPrice\n lineTotal\n lineTotalWithTax\n taxAmount\n taxRate\n createdAt\n updatedAt\n productVariant {\n id\n name\n sku\n storePrice {\n price\n priceWithTax\n }\n product {\n id\n name\n featuredAsset {\n id\n preview\n }\n }\n }\n\n }\n document {\n \n id\n documentNumber\n fileSize\n generatedAt\n lastSentAt\n\n }\n\n }\n }\n";
|
|
484
|
+
export declare const QUOTE_ADD_LINE_MUTATION = "\n mutation QuotesAddLine($quoteId: ID!, $input: AddQuoteLineInput!) {\n addQuoteLine(quoteId: $quoteId, input: $input) {\n \n id\n code\n customerId\n currencyCode\n status\n editable\n convertible\n expiresAt\n validUntil\n salesRepUserId\n customerNotes\n internalNotes\n convertedOrderId\n createdAt\n updatedAt\n customer {\n id\n firstName\n lastName\n emailAddress\n addresses {\n company\n defaultBillingAddress\n defaultShippingAddress\n }\n }\n salesRep {\n id\n userId\n firstName\n lastName\n emailAddress\n }\n lines {\n \n id\n productVariantId\n quantity\n unitPrice\n discountType\n discountValue\n discountLabel\n position\n discountAmount\n effectiveUnitPrice\n lineTotal\n lineTotalWithTax\n taxAmount\n taxRate\n createdAt\n updatedAt\n productVariant {\n id\n name\n sku\n storePrice {\n price\n priceWithTax\n }\n product {\n id\n name\n featuredAsset {\n id\n preview\n }\n }\n }\n\n }\n document {\n \n id\n documentNumber\n fileSize\n generatedAt\n lastSentAt\n\n }\n\n }\n }\n";
|
|
485
|
+
export declare const QUOTE_UPDATE_LINE_MUTATION = "\n mutation QuotesUpdateLine($lineId: ID!, $input: UpdateQuoteLineInput!) {\n updateQuoteLine(lineId: $lineId, input: $input) {\n \n id\n code\n customerId\n currencyCode\n status\n editable\n convertible\n expiresAt\n validUntil\n salesRepUserId\n customerNotes\n internalNotes\n convertedOrderId\n createdAt\n updatedAt\n customer {\n id\n firstName\n lastName\n emailAddress\n addresses {\n company\n defaultBillingAddress\n defaultShippingAddress\n }\n }\n salesRep {\n id\n userId\n firstName\n lastName\n emailAddress\n }\n lines {\n \n id\n productVariantId\n quantity\n unitPrice\n discountType\n discountValue\n discountLabel\n position\n discountAmount\n effectiveUnitPrice\n lineTotal\n lineTotalWithTax\n taxAmount\n taxRate\n createdAt\n updatedAt\n productVariant {\n id\n name\n sku\n storePrice {\n price\n priceWithTax\n }\n product {\n id\n name\n featuredAsset {\n id\n preview\n }\n }\n }\n\n }\n document {\n \n id\n documentNumber\n fileSize\n generatedAt\n lastSentAt\n\n }\n\n }\n }\n";
|
|
486
|
+
export declare const QUOTE_REMOVE_LINE_MUTATION = "\n mutation QuotesRemoveLine($lineId: ID!) {\n removeQuoteLine(lineId: $lineId) {\n \n id\n code\n customerId\n currencyCode\n status\n editable\n convertible\n expiresAt\n validUntil\n salesRepUserId\n customerNotes\n internalNotes\n convertedOrderId\n createdAt\n updatedAt\n customer {\n id\n firstName\n lastName\n emailAddress\n addresses {\n company\n defaultBillingAddress\n defaultShippingAddress\n }\n }\n salesRep {\n id\n userId\n firstName\n lastName\n emailAddress\n }\n lines {\n \n id\n productVariantId\n quantity\n unitPrice\n discountType\n discountValue\n discountLabel\n position\n discountAmount\n effectiveUnitPrice\n lineTotal\n lineTotalWithTax\n taxAmount\n taxRate\n createdAt\n updatedAt\n productVariant {\n id\n name\n sku\n storePrice {\n price\n priceWithTax\n }\n product {\n id\n name\n featuredAsset {\n id\n preview\n }\n }\n }\n\n }\n document {\n \n id\n documentNumber\n fileSize\n generatedAt\n lastSentAt\n\n }\n\n }\n }\n";
|
|
487
|
+
export declare const QUOTE_SET_PRICING_MUTATION = "\n mutation QuotesSetPricing($quoteId: ID!, $input: SetQuotePricingInput!) {\n setQuotePricing(quoteId: $quoteId, input: $input) {\n \n id\n code\n customerId\n currencyCode\n status\n editable\n convertible\n expiresAt\n validUntil\n salesRepUserId\n customerNotes\n internalNotes\n convertedOrderId\n createdAt\n updatedAt\n customer {\n id\n firstName\n lastName\n emailAddress\n addresses {\n company\n defaultBillingAddress\n defaultShippingAddress\n }\n }\n salesRep {\n id\n userId\n firstName\n lastName\n emailAddress\n }\n lines {\n \n id\n productVariantId\n quantity\n unitPrice\n discountType\n discountValue\n discountLabel\n position\n discountAmount\n effectiveUnitPrice\n lineTotal\n lineTotalWithTax\n taxAmount\n taxRate\n createdAt\n updatedAt\n productVariant {\n id\n name\n sku\n storePrice {\n price\n priceWithTax\n }\n product {\n id\n name\n featuredAsset {\n id\n preview\n }\n }\n }\n\n }\n document {\n \n id\n documentNumber\n fileSize\n generatedAt\n lastSentAt\n\n }\n\n }\n }\n";
|
|
488
|
+
export declare const QUOTE_EXTEND_VALIDITY_MUTATION = "\n mutation QuotesExtendValidity($quoteId: ID!, $input: ExtendQuoteValidityInput!) {\n extendQuoteValidity(quoteId: $quoteId, input: $input) {\n \n id\n code\n customerId\n currencyCode\n status\n editable\n convertible\n expiresAt\n validUntil\n salesRepUserId\n customerNotes\n internalNotes\n convertedOrderId\n createdAt\n updatedAt\n customer {\n id\n firstName\n lastName\n emailAddress\n addresses {\n company\n defaultBillingAddress\n defaultShippingAddress\n }\n }\n salesRep {\n id\n userId\n firstName\n lastName\n emailAddress\n }\n lines {\n \n id\n productVariantId\n quantity\n unitPrice\n discountType\n discountValue\n discountLabel\n position\n discountAmount\n effectiveUnitPrice\n lineTotal\n lineTotalWithTax\n taxAmount\n taxRate\n createdAt\n updatedAt\n productVariant {\n id\n name\n sku\n storePrice {\n price\n priceWithTax\n }\n product {\n id\n name\n featuredAsset {\n id\n preview\n }\n }\n }\n\n }\n document {\n \n id\n documentNumber\n fileSize\n generatedAt\n lastSentAt\n\n }\n\n }\n }\n";
|
|
489
|
+
export declare const QUOTE_ASSIGN_SALES_REP_MUTATION = "\n mutation QuotesAssignSalesRep($quoteId: ID!, $salesRepUserId: ID) {\n assignQuoteSalesRep(quoteId: $quoteId, salesRepUserId: $salesRepUserId) {\n \n id\n code\n customerId\n currencyCode\n status\n editable\n convertible\n expiresAt\n validUntil\n salesRepUserId\n customerNotes\n internalNotes\n convertedOrderId\n createdAt\n updatedAt\n customer {\n id\n firstName\n lastName\n emailAddress\n addresses {\n company\n defaultBillingAddress\n defaultShippingAddress\n }\n }\n salesRep {\n id\n userId\n firstName\n lastName\n emailAddress\n }\n lines {\n \n id\n productVariantId\n quantity\n unitPrice\n discountType\n discountValue\n discountLabel\n position\n discountAmount\n effectiveUnitPrice\n lineTotal\n lineTotalWithTax\n taxAmount\n taxRate\n createdAt\n updatedAt\n productVariant {\n id\n name\n sku\n storePrice {\n price\n priceWithTax\n }\n product {\n id\n name\n featuredAsset {\n id\n preview\n }\n }\n }\n\n }\n document {\n \n id\n documentNumber\n fileSize\n generatedAt\n lastSentAt\n\n }\n\n }\n }\n";
|
|
490
|
+
export declare const QUOTE_SALES_REPRESENTATIVES_QUERY = "\n query QuotesSalesRepresentatives($search: String) {\n quoteSalesRepresentatives(search: $search) {\n id\n userId\n firstName\n lastName\n emailAddress\n }\n }\n";
|
|
491
|
+
export declare const QUOTE_SUBMIT_MUTATION = "\n mutation QuotesSubmit($quoteId: ID!) {\n submitQuoteForReview(quoteId: $quoteId) {\n \n id\n code\n customerId\n currencyCode\n status\n editable\n convertible\n expiresAt\n validUntil\n salesRepUserId\n customerNotes\n internalNotes\n convertedOrderId\n createdAt\n updatedAt\n customer {\n id\n firstName\n lastName\n emailAddress\n addresses {\n company\n defaultBillingAddress\n defaultShippingAddress\n }\n }\n salesRep {\n id\n userId\n firstName\n lastName\n emailAddress\n }\n lines {\n \n id\n productVariantId\n quantity\n unitPrice\n discountType\n discountValue\n discountLabel\n position\n discountAmount\n effectiveUnitPrice\n lineTotal\n lineTotalWithTax\n taxAmount\n taxRate\n createdAt\n updatedAt\n productVariant {\n id\n name\n sku\n storePrice {\n price\n priceWithTax\n }\n product {\n id\n name\n featuredAsset {\n id\n preview\n }\n }\n }\n\n }\n document {\n \n id\n documentNumber\n fileSize\n generatedAt\n lastSentAt\n\n }\n\n }\n }\n";
|
|
492
|
+
export declare const QUOTE_APPROVE_MUTATION = "\n mutation QuotesApprove($quoteId: ID!) {\n approveQuote(quoteId: $quoteId) {\n \n id\n code\n customerId\n currencyCode\n status\n editable\n convertible\n expiresAt\n validUntil\n salesRepUserId\n customerNotes\n internalNotes\n convertedOrderId\n createdAt\n updatedAt\n customer {\n id\n firstName\n lastName\n emailAddress\n addresses {\n company\n defaultBillingAddress\n defaultShippingAddress\n }\n }\n salesRep {\n id\n userId\n firstName\n lastName\n emailAddress\n }\n lines {\n \n id\n productVariantId\n quantity\n unitPrice\n discountType\n discountValue\n discountLabel\n position\n discountAmount\n effectiveUnitPrice\n lineTotal\n lineTotalWithTax\n taxAmount\n taxRate\n createdAt\n updatedAt\n productVariant {\n id\n name\n sku\n storePrice {\n price\n priceWithTax\n }\n product {\n id\n name\n featuredAsset {\n id\n preview\n }\n }\n }\n\n }\n document {\n \n id\n documentNumber\n fileSize\n generatedAt\n lastSentAt\n\n }\n\n }\n }\n";
|
|
493
|
+
export declare const QUOTE_DECLINE_MUTATION = "\n mutation QuotesDecline($quoteId: ID!, $reason: String!) {\n declineQuote(quoteId: $quoteId, reason: $reason) {\n \n id\n code\n customerId\n currencyCode\n status\n editable\n convertible\n expiresAt\n validUntil\n salesRepUserId\n customerNotes\n internalNotes\n convertedOrderId\n createdAt\n updatedAt\n customer {\n id\n firstName\n lastName\n emailAddress\n addresses {\n company\n defaultBillingAddress\n defaultShippingAddress\n }\n }\n salesRep {\n id\n userId\n firstName\n lastName\n emailAddress\n }\n lines {\n \n id\n productVariantId\n quantity\n unitPrice\n discountType\n discountValue\n discountLabel\n position\n discountAmount\n effectiveUnitPrice\n lineTotal\n lineTotalWithTax\n taxAmount\n taxRate\n createdAt\n updatedAt\n productVariant {\n id\n name\n sku\n storePrice {\n price\n priceWithTax\n }\n product {\n id\n name\n featuredAsset {\n id\n preview\n }\n }\n }\n\n }\n document {\n \n id\n documentNumber\n fileSize\n generatedAt\n lastSentAt\n\n }\n\n }\n }\n";
|
|
494
|
+
export declare const QUOTE_CANCEL_MUTATION = "\n mutation QuotesCancel($quoteId: ID!, $reason: String) {\n cancelQuote(quoteId: $quoteId, reason: $reason) {\n \n id\n code\n customerId\n currencyCode\n status\n editable\n convertible\n expiresAt\n validUntil\n salesRepUserId\n customerNotes\n internalNotes\n convertedOrderId\n createdAt\n updatedAt\n customer {\n id\n firstName\n lastName\n emailAddress\n addresses {\n company\n defaultBillingAddress\n defaultShippingAddress\n }\n }\n salesRep {\n id\n userId\n firstName\n lastName\n emailAddress\n }\n lines {\n \n id\n productVariantId\n quantity\n unitPrice\n discountType\n discountValue\n discountLabel\n position\n discountAmount\n effectiveUnitPrice\n lineTotal\n lineTotalWithTax\n taxAmount\n taxRate\n createdAt\n updatedAt\n productVariant {\n id\n name\n sku\n storePrice {\n price\n priceWithTax\n }\n product {\n id\n name\n featuredAsset {\n id\n preview\n }\n }\n }\n\n }\n document {\n \n id\n documentNumber\n fileSize\n generatedAt\n lastSentAt\n\n }\n\n }\n }\n";
|
|
495
|
+
export declare const QUOTE_CONVERT_MUTATION = "\n mutation QuotesConvertToOrder($quoteId: ID!, $idempotencyKey: String) {\n convertQuoteToOrder(quoteId: $quoteId, idempotencyKey: $idempotencyKey) {\n id\n code\n state\n currencyCode\n totalWithTax\n }\n }\n";
|
|
496
|
+
export declare const QUOTE_GENERATE_DOCUMENT_MUTATION = "\n mutation QuotesGenerateDocument($quoteId: ID!) {\n generateQuoteDocument(quoteId: $quoteId) {\n \n id\n documentNumber\n fileSize\n generatedAt\n lastSentAt\n\n }\n }\n";
|
|
497
|
+
export declare const QUOTE_SEND_TO_CUSTOMER_MUTATION = "\n mutation QuotesSendToCustomer($quoteId: ID!) {\n sendQuoteToCustomer(quoteId: $quoteId)\n }\n";
|
|
498
|
+
export declare const QUOTE_CONFIG_QUERY = "\n query QuotesConfig {\n quoteConfig {\n \n id\n channelId\n numberPrefix\n numberSuffix\n numberDigits\n yearFormat\n yearReset\n lastResetYear\n documentTitle\n footerText\n validityNoticeTemplate\n columnProduct\n columnSku\n columnQuantity\n columnUnitPriceExcl\n columnUnitPriceDiscount\n columnUnitPriceIncl\n columnUnitPriceAfterDiscount\n columnLineTotal\n columnLineDiscount\n columnTaxRate\n columnTaxAmount\n columnTotal\n showLogo\n defaultLanguage\n termsTitle\n termsBody\n acceptanceInstructions\n\n }\n }\n";
|
|
499
|
+
export declare const QUOTE_UPDATE_CONFIG_MUTATION = "\n mutation QuotesUpdateConfig($input: UpdateQuoteConfigInput!) {\n updateQuoteConfig(input: $input) {\n \n id\n channelId\n numberPrefix\n numberSuffix\n numberDigits\n yearFormat\n yearReset\n lastResetYear\n documentTitle\n footerText\n validityNoticeTemplate\n columnProduct\n columnSku\n columnQuantity\n columnUnitPriceExcl\n columnUnitPriceDiscount\n columnUnitPriceIncl\n columnUnitPriceAfterDiscount\n columnLineTotal\n columnLineDiscount\n columnTaxRate\n columnTaxAmount\n columnTotal\n showLogo\n defaultLanguage\n termsTitle\n termsBody\n acceptanceInstructions\n\n }\n }\n";
|
|
500
|
+
export declare const QUOTE_SETTINGS_QUERY = "\n query QuotesSettings {\n activeChannel {\n id\n defaultCurrencyCode\n availableCurrencyCodes\n customFields {\n quotesEnabled\n }\n }\n }\n";
|
|
501
|
+
export declare function createQuotesModule(transport: Transport): QuotesModule;
|