@usethrottle/api-client 5.17.0 → 5.19.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 +7 -0
- package/dist/__tests__/cart-customer-detach-types.test.d.ts +2 -0
- package/dist/__tests__/cart-customer-detach-types.test.d.ts.map +1 -0
- package/dist/__tests__/cart-customer-detach-types.test.js +17 -0
- package/dist/__tests__/cart-customer-detach-types.test.js.map +1 -0
- package/dist/__tests__/currency-code-types.test.d.ts +2 -0
- package/dist/__tests__/currency-code-types.test.d.ts.map +1 -0
- package/dist/__tests__/currency-code-types.test.js +37 -0
- package/dist/__tests__/currency-code-types.test.js.map +1 -0
- package/dist/__tests__/money-reexports.test.d.ts +2 -0
- package/dist/__tests__/money-reexports.test.d.ts.map +1 -0
- package/dist/__tests__/money-reexports.test.js +33 -0
- package/dist/__tests__/money-reexports.test.js.map +1 -0
- package/dist/generated/services/ApplicationsService.d.ts +40 -4
- package/dist/generated/services/ApplicationsService.d.ts.map +1 -1
- package/dist/generated/services/ApplicationsService.js +2 -0
- package/dist/generated/services/ApplicationsService.js.map +1 -1
- package/dist/generated/services/CartsService.d.ts +211 -196
- package/dist/generated/services/CartsService.d.ts.map +1 -1
- package/dist/generated/services/CartsService.js.map +1 -1
- package/dist/generated/services/CheckoutSessionsService.d.ts +1 -1
- package/dist/generated/services/CheckoutSessionsService.d.ts.map +1 -1
- package/dist/generated/services/ConnectorsService.d.ts +42 -0
- package/dist/generated/services/ConnectorsService.d.ts.map +1 -1
- package/dist/generated/services/ConnectorsService.js +12 -0
- package/dist/generated/services/ConnectorsService.js.map +1 -1
- package/dist/generated/services/CustomersService.d.ts +1 -1
- package/dist/generated/services/CustomersService.js +1 -1
- package/dist/generated/services/DefaultService.d.ts +35 -3
- package/dist/generated/services/DefaultService.d.ts.map +1 -1
- package/dist/generated/services/DefaultService.js +32 -0
- package/dist/generated/services/DefaultService.js.map +1 -1
- package/dist/generated/services/DiscountsService.d.ts +111 -11
- package/dist/generated/services/DiscountsService.d.ts.map +1 -1
- package/dist/generated/services/DiscountsService.js.map +1 -1
- package/dist/generated/services/EmbedService.d.ts +1 -1
- package/dist/generated/services/EmbedService.d.ts.map +1 -1
- package/dist/generated/services/EmbedService.js +3 -2
- package/dist/generated/services/EmbedService.js.map +1 -1
- package/dist/generated/services/OrdersService.d.ts +208 -204
- package/dist/generated/services/OrdersService.d.ts.map +1 -1
- package/dist/generated/services/OrdersService.js +1 -0
- package/dist/generated/services/OrdersService.js.map +1 -1
- package/dist/generated/services/PaymentMethodsService.d.ts +5 -1
- package/dist/generated/services/PaymentMethodsService.d.ts.map +1 -1
- package/dist/generated/services/PaymentMethodsService.js +3 -1
- package/dist/generated/services/PaymentMethodsService.js.map +1 -1
- package/dist/generated/services/PaymentsService.d.ts +33 -26
- package/dist/generated/services/PaymentsService.d.ts.map +1 -1
- package/dist/generated/services/PaymentsService.js +4 -1
- package/dist/generated/services/PaymentsService.js.map +1 -1
- package/dist/generated/services/QuotesService.d.ts +248 -20
- package/dist/generated/services/QuotesService.d.ts.map +1 -1
- package/dist/generated/services/QuotesService.js +85 -1
- package/dist/generated/services/QuotesService.js.map +1 -1
- package/dist/generated/services/ReturnsService.d.ts +17 -0
- package/dist/generated/services/ReturnsService.d.ts.map +1 -1
- package/dist/generated/services/ReturnsService.js.map +1 -1
- package/dist/generated/services/StoresService.d.ts +5 -4
- package/dist/generated/services/StoresService.d.ts.map +1 -1
- package/dist/generated/services/StoresService.js +3 -0
- package/dist/generated/services/StoresService.js.map +1 -1
- package/dist/generated/services/SubscriptionsService.d.ts +28 -27
- package/dist/generated/services/SubscriptionsService.d.ts.map +1 -1
- package/dist/generated/services/SubscriptionsService.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CancelablePromise } from '../core/CancelablePromise.js';
|
|
2
|
+
import type { CurrencyCode } from '@usethrottle/money';
|
|
2
3
|
export declare class QuotesService {
|
|
3
4
|
/**
|
|
4
5
|
* List quotes with cursor pagination
|
|
@@ -24,8 +25,12 @@ export declare class QuotesService {
|
|
|
24
25
|
buyerReference?: string | null;
|
|
25
26
|
source?: 'dashboard' | 'api' | 'cart' | 'request_form';
|
|
26
27
|
sourceCartId?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
* Shipping address (canonical address fields): from the request form, or set by the merchant with `PATCH /quotes/{id}`. Prefilled into checkout on accept when the quote asks for a shipping address.
|
|
30
|
+
*/
|
|
31
|
+
shippingAddress?: any | null;
|
|
27
32
|
assignedMemberId?: string | null;
|
|
28
|
-
currency?:
|
|
33
|
+
currency?: CurrencyCode;
|
|
29
34
|
currentRevisionId?: string | null;
|
|
30
35
|
acceptedRevisionId?: string | null;
|
|
31
36
|
acceptedAt?: string | null;
|
|
@@ -76,15 +81,18 @@ export declare class QuotesService {
|
|
|
76
81
|
buyerReference?: string | null;
|
|
77
82
|
source?: 'dashboard' | 'api';
|
|
78
83
|
assignedMemberId?: string | null;
|
|
84
|
+
/**
|
|
85
|
+
* ISO currency code, stored uppercased. Omit it to use the store's main currency. Must be one of the store's enabled currencies, else `422 currency_not_enabled` (`422 currency_not_supported` for an unknown code, `422 currency_not_available_in_production` where production does not accept it).
|
|
86
|
+
*/
|
|
79
87
|
currency?: string;
|
|
80
88
|
internalNotes?: string | null;
|
|
81
89
|
items?: Array<{
|
|
82
90
|
type?: 'product' | 'subscription' | 'service' | 'ticket' | 'donation' | 'custom';
|
|
83
91
|
referenceId?: string | null;
|
|
84
92
|
sku?: string | null;
|
|
85
|
-
name
|
|
93
|
+
name?: string;
|
|
86
94
|
description?: string | null;
|
|
87
|
-
unitPrice
|
|
95
|
+
unitPrice?: number;
|
|
88
96
|
quantity?: number;
|
|
89
97
|
taxAmount?: number;
|
|
90
98
|
discountAmount?: number;
|
|
@@ -95,7 +103,7 @@ export declare class QuotesService {
|
|
|
95
103
|
position?: number;
|
|
96
104
|
metadata?: Record<string, any>;
|
|
97
105
|
/**
|
|
98
|
-
* Makes this line a subscription (type is forced to subscription). Send interval, or intervalUnit + intervalCount (1 hour to 1 year). totalPayments (2-60) makes it an installment plan; trialDays (0-365) adds a free trial, not combinable with totalPayments. The line unitPrice is what each renewal charges, including after a free trial, so it must be above 0 (400 invalid_line_item). At most 10 per quote, card pay-in-full quotes only (enforced at issue).
|
|
106
|
+
* Makes this line a subscription (type is forced to subscription). plan is required, except on a catalog-linked line (a SKU-only line, or one carrying metadata.catalogLink), where it defaults to <sku>:<cadence>. Send interval, or intervalUnit + intervalCount (1 hour to 1 year). totalPayments (2-60) makes it an installment plan; trialDays (0-365) adds a free trial, not combinable with totalPayments. The line unitPrice is what each renewal charges, including after a free trial, so it must be above 0 (400 invalid_line_item). At most 10 per quote, card pay-in-full quotes only (enforced at issue).
|
|
99
107
|
*/
|
|
100
108
|
recurring?: any | null;
|
|
101
109
|
}>;
|
|
@@ -138,8 +146,12 @@ export declare class QuotesService {
|
|
|
138
146
|
buyerReference?: string | null;
|
|
139
147
|
source?: 'dashboard' | 'api' | 'cart' | 'request_form';
|
|
140
148
|
sourceCartId?: string | null;
|
|
149
|
+
/**
|
|
150
|
+
* Shipping address (canonical address fields): from the request form, or set by the merchant with `PATCH /quotes/{id}`. Prefilled into checkout on accept when the quote asks for a shipping address.
|
|
151
|
+
*/
|
|
152
|
+
shippingAddress?: any | null;
|
|
141
153
|
assignedMemberId?: string | null;
|
|
142
|
-
currency?:
|
|
154
|
+
currency?: CurrencyCode;
|
|
143
155
|
currentRevisionId?: string | null;
|
|
144
156
|
acceptedRevisionId?: string | null;
|
|
145
157
|
acceptedAt?: string | null;
|
|
@@ -267,6 +279,10 @@ export declare class QuotesService {
|
|
|
267
279
|
createdAt?: string;
|
|
268
280
|
updatedAt?: string;
|
|
269
281
|
}>;
|
|
282
|
+
/**
|
|
283
|
+
* The quote's currency; the revision and item amounts are minor units of it
|
|
284
|
+
*/
|
|
285
|
+
currency?: CurrencyCode;
|
|
270
286
|
};
|
|
271
287
|
meta?: {
|
|
272
288
|
/**
|
|
@@ -296,8 +312,12 @@ export declare class QuotesService {
|
|
|
296
312
|
buyerReference?: string | null;
|
|
297
313
|
source?: 'dashboard' | 'api' | 'cart' | 'request_form';
|
|
298
314
|
sourceCartId?: string | null;
|
|
315
|
+
/**
|
|
316
|
+
* Shipping address (canonical address fields): from the request form, or set by the merchant with `PATCH /quotes/{id}`. Prefilled into checkout on accept when the quote asks for a shipping address.
|
|
317
|
+
*/
|
|
318
|
+
shippingAddress?: any | null;
|
|
299
319
|
assignedMemberId?: string | null;
|
|
300
|
-
currency?:
|
|
320
|
+
currency?: CurrencyCode;
|
|
301
321
|
currentRevisionId?: string | null;
|
|
302
322
|
acceptedRevisionId?: string | null;
|
|
303
323
|
acceptedAt?: string | null;
|
|
@@ -449,6 +469,14 @@ export declare class QuotesService {
|
|
|
449
469
|
* With status 'declined': the reason shown to the buyer.
|
|
450
470
|
*/
|
|
451
471
|
declinedReason?: string | null;
|
|
472
|
+
/**
|
|
473
|
+
* ISO currency code, stored uppercased. Changeable until the quote's first revision is issued, else `409 quote_currency_locked`; must be one of the environment's enabled currencies, else `422 currency_not_enabled` (`422 currency_not_supported` for an unknown code, `422 currency_not_available_in_production` where production does not accept it). The same currency is a no-op. Changing it flags every typed amount for review (`metadata.amountReview`); `POST /quotes/{id}/issue` answers `422 quote_amounts_need_review` until each is confirmed.
|
|
474
|
+
*/
|
|
475
|
+
currency?: string;
|
|
476
|
+
/**
|
|
477
|
+
* Replaces the whole shipping address. `null` or all blank clears it; otherwise addressLine1, city and countryCode (ISO alpha-2) are required, else `400 invalid_request`. Prefilled into checkout on accept.
|
|
478
|
+
*/
|
|
479
|
+
shippingAddress?: any | null;
|
|
452
480
|
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
453
481
|
data?: {
|
|
454
482
|
id?: string;
|
|
@@ -459,8 +487,12 @@ export declare class QuotesService {
|
|
|
459
487
|
buyerReference?: string | null;
|
|
460
488
|
source?: 'dashboard' | 'api' | 'cart' | 'request_form';
|
|
461
489
|
sourceCartId?: string | null;
|
|
490
|
+
/**
|
|
491
|
+
* Shipping address (canonical address fields): from the request form, or set by the merchant with `PATCH /quotes/{id}`. Prefilled into checkout on accept when the quote asks for a shipping address.
|
|
492
|
+
*/
|
|
493
|
+
shippingAddress?: any | null;
|
|
462
494
|
assignedMemberId?: string | null;
|
|
463
|
-
currency?:
|
|
495
|
+
currency?: CurrencyCode;
|
|
464
496
|
currentRevisionId?: string | null;
|
|
465
497
|
acceptedRevisionId?: string | null;
|
|
466
498
|
acceptedAt?: string | null;
|
|
@@ -609,6 +641,10 @@ export declare class QuotesService {
|
|
|
609
641
|
createdAt?: string;
|
|
610
642
|
updatedAt?: string;
|
|
611
643
|
}>;
|
|
644
|
+
/**
|
|
645
|
+
* The quote's currency; the revision and item amounts are minor units of it
|
|
646
|
+
*/
|
|
647
|
+
currency?: CurrencyCode;
|
|
612
648
|
};
|
|
613
649
|
meta?: {
|
|
614
650
|
/**
|
|
@@ -635,9 +671,9 @@ export declare class QuotesService {
|
|
|
635
671
|
type?: 'product' | 'subscription' | 'service' | 'ticket' | 'donation' | 'custom';
|
|
636
672
|
referenceId?: string | null;
|
|
637
673
|
sku?: string | null;
|
|
638
|
-
name
|
|
674
|
+
name?: string;
|
|
639
675
|
description?: string | null;
|
|
640
|
-
unitPrice
|
|
676
|
+
unitPrice?: number;
|
|
641
677
|
quantity?: number;
|
|
642
678
|
taxAmount?: number;
|
|
643
679
|
discountAmount?: number;
|
|
@@ -648,7 +684,7 @@ export declare class QuotesService {
|
|
|
648
684
|
position?: number;
|
|
649
685
|
metadata?: Record<string, any>;
|
|
650
686
|
/**
|
|
651
|
-
* Makes this line a subscription (type is forced to subscription). Send interval, or intervalUnit + intervalCount (1 hour to 1 year). totalPayments (2-60) makes it an installment plan; trialDays (0-365) adds a free trial, not combinable with totalPayments. The line unitPrice is what each renewal charges, including after a free trial, so it must be above 0 (400 invalid_line_item). At most 10 per quote, card pay-in-full quotes only (enforced at issue).
|
|
687
|
+
* Makes this line a subscription (type is forced to subscription). plan is required, except on a catalog-linked line (a SKU-only line, or one carrying metadata.catalogLink), where it defaults to <sku>:<cadence>. Send interval, or intervalUnit + intervalCount (1 hour to 1 year). totalPayments (2-60) makes it an installment plan; trialDays (0-365) adds a free trial, not combinable with totalPayments. The line unitPrice is what each renewal charges, including after a free trial, so it must be above 0 (400 invalid_line_item). At most 10 per quote, card pay-in-full quotes only (enforced at issue).
|
|
652
688
|
*/
|
|
653
689
|
recurring?: any | null;
|
|
654
690
|
}>;
|
|
@@ -785,6 +821,10 @@ export declare class QuotesService {
|
|
|
785
821
|
createdAt?: string;
|
|
786
822
|
updatedAt?: string;
|
|
787
823
|
}>;
|
|
824
|
+
/**
|
|
825
|
+
* The quote's currency; the revision and item amounts are minor units of it
|
|
826
|
+
*/
|
|
827
|
+
currency?: CurrencyCode;
|
|
788
828
|
};
|
|
789
829
|
meta?: {
|
|
790
830
|
/**
|
|
@@ -798,7 +838,7 @@ export declare class QuotesService {
|
|
|
798
838
|
};
|
|
799
839
|
}>;
|
|
800
840
|
/**
|
|
801
|
-
* Freeze the working revision, supersede the prior one, and propose the quote
|
|
841
|
+
* Freeze the working revision, supersede the prior one, and propose the quote. Answers `422 quote_amounts_need_review` with `details.pending` (each `{ kind: 'item', position, name }`, `{ kind: 'shippingFlatAmount' }` or `{ kind: 'depositAmount' }`) while an amount typed in another currency is unconfirmed (`metadata.amountReview`: `{ fromCurrency }` on an item, `{ fromCurrency, fields, fieldFrom }` on the revision).
|
|
802
842
|
* @param id
|
|
803
843
|
* @param requestBody
|
|
804
844
|
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
@@ -816,8 +856,12 @@ export declare class QuotesService {
|
|
|
816
856
|
buyerReference?: string | null;
|
|
817
857
|
source?: 'dashboard' | 'api' | 'cart' | 'request_form';
|
|
818
858
|
sourceCartId?: string | null;
|
|
859
|
+
/**
|
|
860
|
+
* Shipping address (canonical address fields): from the request form, or set by the merchant with `PATCH /quotes/{id}`. Prefilled into checkout on accept when the quote asks for a shipping address.
|
|
861
|
+
*/
|
|
862
|
+
shippingAddress?: any | null;
|
|
819
863
|
assignedMemberId?: string | null;
|
|
820
|
-
currency?:
|
|
864
|
+
currency?: CurrencyCode;
|
|
821
865
|
currentRevisionId?: string | null;
|
|
822
866
|
acceptedRevisionId?: string | null;
|
|
823
867
|
acceptedAt?: string | null;
|
|
@@ -945,6 +989,10 @@ export declare class QuotesService {
|
|
|
945
989
|
createdAt?: string;
|
|
946
990
|
updatedAt?: string;
|
|
947
991
|
}>;
|
|
992
|
+
/**
|
|
993
|
+
* The quote's currency; the revision and item amounts are minor units of it
|
|
994
|
+
*/
|
|
995
|
+
currency?: CurrencyCode;
|
|
948
996
|
};
|
|
949
997
|
meta?: {
|
|
950
998
|
/**
|
|
@@ -976,8 +1024,12 @@ export declare class QuotesService {
|
|
|
976
1024
|
buyerReference?: string | null;
|
|
977
1025
|
source?: 'dashboard' | 'api' | 'cart' | 'request_form';
|
|
978
1026
|
sourceCartId?: string | null;
|
|
1027
|
+
/**
|
|
1028
|
+
* Shipping address (canonical address fields): from the request form, or set by the merchant with `PATCH /quotes/{id}`. Prefilled into checkout on accept when the quote asks for a shipping address.
|
|
1029
|
+
*/
|
|
1030
|
+
shippingAddress?: any | null;
|
|
979
1031
|
assignedMemberId?: string | null;
|
|
980
|
-
currency?:
|
|
1032
|
+
currency?: CurrencyCode;
|
|
981
1033
|
currentRevisionId?: string | null;
|
|
982
1034
|
acceptedRevisionId?: string | null;
|
|
983
1035
|
acceptedAt?: string | null;
|
|
@@ -1074,8 +1126,12 @@ export declare class QuotesService {
|
|
|
1074
1126
|
buyerReference?: string | null;
|
|
1075
1127
|
source?: 'dashboard' | 'api' | 'cart' | 'request_form';
|
|
1076
1128
|
sourceCartId?: string | null;
|
|
1129
|
+
/**
|
|
1130
|
+
* Shipping address (canonical address fields): from the request form, or set by the merchant with `PATCH /quotes/{id}`. Prefilled into checkout on accept when the quote asks for a shipping address.
|
|
1131
|
+
*/
|
|
1132
|
+
shippingAddress?: any | null;
|
|
1077
1133
|
assignedMemberId?: string | null;
|
|
1078
|
-
currency?:
|
|
1134
|
+
currency?: CurrencyCode;
|
|
1079
1135
|
currentRevisionId?: string | null;
|
|
1080
1136
|
acceptedRevisionId?: string | null;
|
|
1081
1137
|
acceptedAt?: string | null;
|
|
@@ -1203,6 +1259,10 @@ export declare class QuotesService {
|
|
|
1203
1259
|
createdAt?: string;
|
|
1204
1260
|
updatedAt?: string;
|
|
1205
1261
|
}>;
|
|
1262
|
+
/**
|
|
1263
|
+
* The quote's currency; the revision and item amounts are minor units of it
|
|
1264
|
+
*/
|
|
1265
|
+
currency?: CurrencyCode;
|
|
1206
1266
|
};
|
|
1207
1267
|
meta?: {
|
|
1208
1268
|
/**
|
|
@@ -1245,8 +1305,12 @@ export declare class QuotesService {
|
|
|
1245
1305
|
buyerReference?: string | null;
|
|
1246
1306
|
source?: 'dashboard' | 'api' | 'cart' | 'request_form';
|
|
1247
1307
|
sourceCartId?: string | null;
|
|
1308
|
+
/**
|
|
1309
|
+
* Shipping address (canonical address fields): from the request form, or set by the merchant with `PATCH /quotes/{id}`. Prefilled into checkout on accept when the quote asks for a shipping address.
|
|
1310
|
+
*/
|
|
1311
|
+
shippingAddress?: any | null;
|
|
1248
1312
|
assignedMemberId?: string | null;
|
|
1249
|
-
currency?:
|
|
1313
|
+
currency?: CurrencyCode;
|
|
1250
1314
|
currentRevisionId?: string | null;
|
|
1251
1315
|
acceptedRevisionId?: string | null;
|
|
1252
1316
|
acceptedAt?: string | null;
|
|
@@ -1297,7 +1361,7 @@ export declare class QuotesService {
|
|
|
1297
1361
|
quoteNumber?: string;
|
|
1298
1362
|
status?: 'in_progress' | 'ready' | 'being_revised' | 'accepted' | 'ordered' | 'declined' | 'expired';
|
|
1299
1363
|
buyerReference?: string | null;
|
|
1300
|
-
currency?:
|
|
1364
|
+
currency?: CurrencyCode;
|
|
1301
1365
|
expiresAt?: string | null;
|
|
1302
1366
|
currentRevision?: any | null;
|
|
1303
1367
|
revisionHistory?: Array<{
|
|
@@ -1324,6 +1388,7 @@ export declare class QuotesService {
|
|
|
1324
1388
|
id?: string;
|
|
1325
1389
|
type?: string;
|
|
1326
1390
|
sku?: string | null;
|
|
1391
|
+
linkedSku?: string | null;
|
|
1327
1392
|
name?: string;
|
|
1328
1393
|
description?: string | null;
|
|
1329
1394
|
unitPrice?: number;
|
|
@@ -1380,7 +1445,7 @@ export declare class QuotesService {
|
|
|
1380
1445
|
quoteNumber?: string;
|
|
1381
1446
|
status?: 'in_progress' | 'ready' | 'being_revised' | 'accepted' | 'ordered' | 'declined' | 'expired';
|
|
1382
1447
|
buyerReference?: string | null;
|
|
1383
|
-
currency?:
|
|
1448
|
+
currency?: CurrencyCode;
|
|
1384
1449
|
expiresAt?: string | null;
|
|
1385
1450
|
currentRevision?: any | null;
|
|
1386
1451
|
revisionHistory?: Array<{
|
|
@@ -1407,6 +1472,7 @@ export declare class QuotesService {
|
|
|
1407
1472
|
id?: string;
|
|
1408
1473
|
type?: string;
|
|
1409
1474
|
sku?: string | null;
|
|
1475
|
+
linkedSku?: string | null;
|
|
1410
1476
|
name?: string;
|
|
1411
1477
|
description?: string | null;
|
|
1412
1478
|
unitPrice?: number;
|
|
@@ -1499,7 +1565,7 @@ export declare class QuotesService {
|
|
|
1499
1565
|
quoteNumber?: string;
|
|
1500
1566
|
status?: 'in_progress' | 'ready' | 'being_revised' | 'accepted' | 'ordered' | 'declined' | 'expired';
|
|
1501
1567
|
buyerReference?: string | null;
|
|
1502
|
-
currency?:
|
|
1568
|
+
currency?: CurrencyCode;
|
|
1503
1569
|
expiresAt?: string | null;
|
|
1504
1570
|
currentRevision?: any | null;
|
|
1505
1571
|
revisionHistory?: Array<{
|
|
@@ -1526,6 +1592,7 @@ export declare class QuotesService {
|
|
|
1526
1592
|
id?: string;
|
|
1527
1593
|
type?: string;
|
|
1528
1594
|
sku?: string | null;
|
|
1595
|
+
linkedSku?: string | null;
|
|
1529
1596
|
name?: string;
|
|
1530
1597
|
description?: string | null;
|
|
1531
1598
|
unitPrice?: number;
|
|
@@ -1585,7 +1652,7 @@ export declare class QuotesService {
|
|
|
1585
1652
|
quoteNumber?: string;
|
|
1586
1653
|
status?: 'in_progress' | 'ready' | 'being_revised' | 'accepted' | 'ordered' | 'declined' | 'expired';
|
|
1587
1654
|
buyerReference?: string | null;
|
|
1588
|
-
currency?:
|
|
1655
|
+
currency?: CurrencyCode;
|
|
1589
1656
|
expiresAt?: string | null;
|
|
1590
1657
|
currentRevision?: any | null;
|
|
1591
1658
|
revisionHistory?: Array<{
|
|
@@ -1612,6 +1679,7 @@ export declare class QuotesService {
|
|
|
1612
1679
|
id?: string;
|
|
1613
1680
|
type?: string;
|
|
1614
1681
|
sku?: string | null;
|
|
1682
|
+
linkedSku?: string | null;
|
|
1615
1683
|
name?: string;
|
|
1616
1684
|
description?: string | null;
|
|
1617
1685
|
unitPrice?: number;
|
|
@@ -1678,7 +1746,7 @@ export declare class QuotesService {
|
|
|
1678
1746
|
quoteNumber?: string;
|
|
1679
1747
|
status?: 'in_progress' | 'ready' | 'being_revised' | 'accepted' | 'ordered' | 'declined' | 'expired';
|
|
1680
1748
|
buyerReference?: string | null;
|
|
1681
|
-
currency?:
|
|
1749
|
+
currency?: CurrencyCode;
|
|
1682
1750
|
expiresAt?: string | null;
|
|
1683
1751
|
currentRevision?: any | null;
|
|
1684
1752
|
revisionHistory?: Array<{
|
|
@@ -1705,6 +1773,7 @@ export declare class QuotesService {
|
|
|
1705
1773
|
id?: string;
|
|
1706
1774
|
type?: string;
|
|
1707
1775
|
sku?: string | null;
|
|
1776
|
+
linkedSku?: string | null;
|
|
1708
1777
|
name?: string;
|
|
1709
1778
|
description?: string | null;
|
|
1710
1779
|
unitPrice?: number;
|
|
@@ -1799,6 +1868,10 @@ export declare class QuotesService {
|
|
|
1799
1868
|
fields?: {
|
|
1800
1869
|
companyName?: boolean;
|
|
1801
1870
|
phone?: boolean;
|
|
1871
|
+
/**
|
|
1872
|
+
* Ask for a shipping address (default false)
|
|
1873
|
+
*/
|
|
1874
|
+
shippingAddress?: boolean;
|
|
1802
1875
|
buyerReference?: boolean;
|
|
1803
1876
|
/**
|
|
1804
1877
|
* Item rows on the hosted form (default true)
|
|
@@ -1900,6 +1973,10 @@ export declare class QuotesService {
|
|
|
1900
1973
|
fields?: {
|
|
1901
1974
|
companyName?: boolean;
|
|
1902
1975
|
phone?: boolean;
|
|
1976
|
+
/**
|
|
1977
|
+
* Ask for a shipping address (default false)
|
|
1978
|
+
*/
|
|
1979
|
+
shippingAddress?: boolean;
|
|
1903
1980
|
buyerReference?: boolean;
|
|
1904
1981
|
/**
|
|
1905
1982
|
* Item rows on the hosted form (default true)
|
|
@@ -1997,9 +2074,17 @@ export declare class QuotesService {
|
|
|
1997
2074
|
introText?: string | null;
|
|
1998
2075
|
successMessage?: string | null;
|
|
1999
2076
|
redirectUrl?: string | null;
|
|
2077
|
+
/**
|
|
2078
|
+
* The currency the request's quote is created in (the store's main currency); a target price is typed in it
|
|
2079
|
+
*/
|
|
2080
|
+
currency?: CurrencyCode | null;
|
|
2000
2081
|
fields?: {
|
|
2001
2082
|
companyName?: boolean;
|
|
2002
2083
|
phone?: boolean;
|
|
2084
|
+
/**
|
|
2085
|
+
* Ask for a shipping address (default false)
|
|
2086
|
+
*/
|
|
2087
|
+
shippingAddress?: boolean;
|
|
2003
2088
|
buyerReference?: boolean;
|
|
2004
2089
|
lineItems?: boolean;
|
|
2005
2090
|
targetPrice?: boolean;
|
|
@@ -2048,6 +2133,10 @@ export declare class QuotesService {
|
|
|
2048
2133
|
* A cart the buyer already filled; its lines join the request. Resolved inside the form's own application + environment.
|
|
2049
2134
|
*/
|
|
2050
2135
|
cartId?: string | null;
|
|
2136
|
+
/**
|
|
2137
|
+
* Optional. All blank = none; otherwise addressLine1, city and countryCode are required. Stored on the quote; added to the address book only for a customer this request created.
|
|
2138
|
+
*/
|
|
2139
|
+
shippingAddress?: any | null;
|
|
2051
2140
|
/**
|
|
2052
2141
|
* Honeypot — must be empty
|
|
2053
2142
|
*/
|
|
@@ -2072,6 +2161,145 @@ export declare class QuotesService {
|
|
|
2072
2161
|
};
|
|
2073
2162
|
};
|
|
2074
2163
|
}>;
|
|
2164
|
+
/**
|
|
2165
|
+
* Is the Product Catalog available for quotes
|
|
2166
|
+
* Whether the Product Catalog extension is installed, active and reachable for signed lookups in this environment. Reads Throttle's database only. Requires `quotes:write` (API keys) or `application:quotes:write` (dashboard users). The application and environment come from the caller, never from the request. Responses carry `Cache-Control: no-store` and `Server-Timing: catalog;dur=<ms>` (time spent calling the Product Catalog; 0 when no call was made).
|
|
2167
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
2168
|
+
* @returns any Default Response
|
|
2169
|
+
* @throws ApiError
|
|
2170
|
+
*/
|
|
2171
|
+
static getApiV1QuoteCatalogStatus(xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
2172
|
+
data?: {
|
|
2173
|
+
available: boolean;
|
|
2174
|
+
};
|
|
2175
|
+
meta?: {
|
|
2176
|
+
/**
|
|
2177
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
2178
|
+
*/
|
|
2179
|
+
requestId?: string;
|
|
2180
|
+
pagination?: {
|
|
2181
|
+
cursor?: string | null;
|
|
2182
|
+
hasMore?: boolean;
|
|
2183
|
+
};
|
|
2184
|
+
};
|
|
2185
|
+
}>;
|
|
2186
|
+
/**
|
|
2187
|
+
* Search the Product Catalog for quote lines
|
|
2188
|
+
* Search active catalog variants by exact SKU, SKU fragment or text, priced in `currency` for `customerId`. Answers `{ rows, installationId }`, or `{ rows: [], available: false }` when the catalog is not available. Requires `quotes:write` (API keys) or `application:quotes:write` (dashboard users). The application and environment come from the caller, never from the request. Responses carry `Cache-Control: no-store` and `Server-Timing: catalog;dur=<ms>` (time spent calling the Product Catalog; 0 when no call was made).
|
|
2189
|
+
* @param q Search text, 2–100 characters once trimmed.
|
|
2190
|
+
* @param currency ISO 4217 code; one of the environment's currency and extra cart currencies (case-insensitive).
|
|
2191
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
2192
|
+
* @param customerId Prices for this customer (customer-group pricing). Must be a customer of this environment.
|
|
2193
|
+
* @param limit Rows to answer, 1–20 (default 8).
|
|
2194
|
+
* @returns any Default Response
|
|
2195
|
+
* @throws ApiError
|
|
2196
|
+
*/
|
|
2197
|
+
static getApiV1QuoteCatalogSearch(q: string, currency: string, xThrottleEnvironmentId?: string, customerId?: string, limit?: number): CancelablePromise<{
|
|
2198
|
+
data?: {
|
|
2199
|
+
rows: Array<{
|
|
2200
|
+
sku: string;
|
|
2201
|
+
variantId: string;
|
|
2202
|
+
productHandle: string;
|
|
2203
|
+
productTitle: string;
|
|
2204
|
+
name: string;
|
|
2205
|
+
optionValues: Array<string>;
|
|
2206
|
+
description: string | null;
|
|
2207
|
+
imageUrl: string | null;
|
|
2208
|
+
/**
|
|
2209
|
+
* Unit price in minor units; null when the variant has no price in `currency`.
|
|
2210
|
+
*/
|
|
2211
|
+
priceMinor: number | null;
|
|
2212
|
+
currency: CurrencyCode;
|
|
2213
|
+
priceKind: 'list' | 'sale' | 'group' | null;
|
|
2214
|
+
taxCode: string | null;
|
|
2215
|
+
stockStatus: 'in_stock' | 'out_of_stock' | 'backorder';
|
|
2216
|
+
minQuantity: number | null;
|
|
2217
|
+
maxQuantity: number | null;
|
|
2218
|
+
}>;
|
|
2219
|
+
/**
|
|
2220
|
+
* The Product Catalog installation that answered; a catalog-linked line's `catalogLink.installationId`. Absent when the catalog is not available.
|
|
2221
|
+
*/
|
|
2222
|
+
installationId?: string;
|
|
2223
|
+
/**
|
|
2224
|
+
* Present (false) only when the catalog is not available.
|
|
2225
|
+
*/
|
|
2226
|
+
available?: boolean;
|
|
2227
|
+
};
|
|
2228
|
+
meta?: {
|
|
2229
|
+
/**
|
|
2230
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
2231
|
+
*/
|
|
2232
|
+
requestId?: string;
|
|
2233
|
+
pagination?: {
|
|
2234
|
+
cursor?: string | null;
|
|
2235
|
+
hasMore?: boolean;
|
|
2236
|
+
};
|
|
2237
|
+
};
|
|
2238
|
+
}>;
|
|
2239
|
+
/**
|
|
2240
|
+
* Look up quote lines by SKU in the Product Catalog
|
|
2241
|
+
* Answers `{ lines, installationId }`: one entry per requested SKU, in request order; duplicates are allowed and each is answered. SKUs are matched trimmed; an empty SKU or one over 255 characters is `NOT_FOUND`. Requires `quotes:write` (API keys) or `application:quotes:write` (dashboard users). The application and environment come from the caller, never from the request. Responses carry `Cache-Control: no-store` and `Server-Timing: catalog;dur=<ms>` (time spent calling the Product Catalog; 0 when no call was made).
|
|
2242
|
+
* @param requestBody
|
|
2243
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
2244
|
+
* @returns any Default Response
|
|
2245
|
+
* @throws ApiError
|
|
2246
|
+
*/
|
|
2247
|
+
static postApiV1QuoteCatalogLines(requestBody: {
|
|
2248
|
+
skus: Array<string>;
|
|
2249
|
+
/**
|
|
2250
|
+
* ISO 4217 code; one of the environment's currency and extra cart currencies (case-insensitive).
|
|
2251
|
+
*/
|
|
2252
|
+
currency: string;
|
|
2253
|
+
/**
|
|
2254
|
+
* Prices for this customer (customer-group pricing). Must be a customer of this environment.
|
|
2255
|
+
*/
|
|
2256
|
+
customerId?: string | null;
|
|
2257
|
+
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
2258
|
+
data?: {
|
|
2259
|
+
lines: Array<{
|
|
2260
|
+
/**
|
|
2261
|
+
* The SKU exactly as requested.
|
|
2262
|
+
*/
|
|
2263
|
+
sku: string;
|
|
2264
|
+
ok: boolean;
|
|
2265
|
+
row?: {
|
|
2266
|
+
sku: string;
|
|
2267
|
+
variantId: string;
|
|
2268
|
+
productHandle: string;
|
|
2269
|
+
productTitle: string;
|
|
2270
|
+
name: string;
|
|
2271
|
+
optionValues: Array<string>;
|
|
2272
|
+
description: string | null;
|
|
2273
|
+
imageUrl: string | null;
|
|
2274
|
+
/**
|
|
2275
|
+
* Unit price in minor units; null when the variant has no price in `currency`.
|
|
2276
|
+
*/
|
|
2277
|
+
priceMinor: number | null;
|
|
2278
|
+
currency: CurrencyCode;
|
|
2279
|
+
priceKind: 'list' | 'sale' | 'group' | null;
|
|
2280
|
+
taxCode: string | null;
|
|
2281
|
+
stockStatus: 'in_stock' | 'out_of_stock' | 'backorder';
|
|
2282
|
+
minQuantity: number | null;
|
|
2283
|
+
maxQuantity: number | null;
|
|
2284
|
+
};
|
|
2285
|
+
code?: 'NOT_FOUND';
|
|
2286
|
+
}>;
|
|
2287
|
+
/**
|
|
2288
|
+
* The Product Catalog installation that answered; a catalog-linked line's `catalogLink.installationId`.
|
|
2289
|
+
*/
|
|
2290
|
+
installationId: string;
|
|
2291
|
+
};
|
|
2292
|
+
meta?: {
|
|
2293
|
+
/**
|
|
2294
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
2295
|
+
*/
|
|
2296
|
+
requestId?: string;
|
|
2297
|
+
pagination?: {
|
|
2298
|
+
cursor?: string | null;
|
|
2299
|
+
hasMore?: boolean;
|
|
2300
|
+
};
|
|
2301
|
+
};
|
|
2302
|
+
}>;
|
|
2075
2303
|
/**
|
|
2076
2304
|
* Get quote notification settings for an application
|
|
2077
2305
|
* @param applicationId
|