@usethrottle/api-client 5.28.1 → 5.29.1
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/generated/services/ApplicationsService.d.ts +8 -8
- package/dist/generated/services/ApplicationsService.d.ts.map +1 -1
- package/dist/generated/services/CartsService.d.ts +314 -38
- package/dist/generated/services/CartsService.d.ts.map +1 -1
- package/dist/generated/services/CartsService.js +8 -2
- package/dist/generated/services/CartsService.js.map +1 -1
- package/dist/generated/services/CheckoutSessionsService.d.ts +16 -1
- package/dist/generated/services/CheckoutSessionsService.d.ts.map +1 -1
- package/dist/generated/services/CheckoutSessionsService.js +1 -1
- package/dist/generated/services/CheckoutSessionsService.js.map +1 -1
- package/dist/generated/services/CustomersService.d.ts +0 -4
- package/dist/generated/services/CustomersService.d.ts.map +1 -1
- package/dist/generated/services/CustomersService.js +1 -1
- package/dist/generated/services/CustomersService.js.map +1 -1
- package/dist/generated/services/DefaultService.d.ts +26 -5
- package/dist/generated/services/DefaultService.d.ts.map +1 -1
- package/dist/generated/services/DefaultService.js +4 -8
- package/dist/generated/services/DefaultService.js.map +1 -1
- package/dist/generated/services/DiscountsService.d.ts +45 -21
- package/dist/generated/services/DiscountsService.d.ts.map +1 -1
- package/dist/generated/services/DiscountsService.js.map +1 -1
- package/dist/generated/services/ExtensionsService.d.ts +46 -0
- package/dist/generated/services/ExtensionsService.d.ts.map +1 -1
- package/dist/generated/services/ExtensionsService.js.map +1 -1
- package/dist/generated/services/MediaService.d.ts +14 -14
- package/dist/generated/services/MediaService.d.ts.map +1 -1
- package/dist/generated/services/MediaService.js +8 -8
- package/dist/generated/services/MediaService.js.map +1 -1
- package/dist/generated/services/OrdersService.d.ts +103 -8
- package/dist/generated/services/OrdersService.d.ts.map +1 -1
- package/dist/generated/services/OrdersService.js +3 -3
- package/dist/generated/services/OrdersService.js.map +1 -1
- package/dist/generated/services/PaymentsService.d.ts +0 -4
- package/dist/generated/services/PaymentsService.d.ts.map +1 -1
- package/dist/generated/services/PaymentsService.js +1 -1
- package/dist/generated/services/PaymentsService.js.map +1 -1
- package/dist/generated/services/QuotesService.d.ts +0 -4
- package/dist/generated/services/QuotesService.d.ts.map +1 -1
- package/dist/generated/services/QuotesService.js +2 -2
- package/dist/generated/services/QuotesService.js.map +1 -1
- package/dist/generated/services/SubscriptionsService.d.ts +60 -4
- package/dist/generated/services/SubscriptionsService.d.ts.map +1 -1
- package/dist/generated/services/SubscriptionsService.js +1 -1
- package/dist/generated/services/SubscriptionsService.js.map +1 -1
- package/dist/generated/services/WebhooksOutboundService.d.ts +3 -3
- package/dist/generated/services/WebhooksOutboundService.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -2,7 +2,7 @@ import type { CancelablePromise } from '../core/CancelablePromise.js';
|
|
|
2
2
|
export declare class MediaService {
|
|
3
3
|
/**
|
|
4
4
|
* Upload an image (multipart/form-data, field: file, optional field: alt).
|
|
5
|
-
* Adds an image to the store's media library. PNG, JPEG, WebP, GIF or
|
|
5
|
+
* Adds an image to the store's media library. PNG, JPEG, WebP, GIF, AVIF or SVG, at most 10 MB and 40 megapixels (an SVG: at most 20 KB). The type is read from the file's bytes, not its declared content type. Stores the original and WebP width variants. A JPEG original loses its EXIF data (GPS, camera) but keeps its pixels and orientation; other raster formats are stored as uploaded. An SVG is sanitised first and the sanitised copy is what is stored and served: scripts, `foreignObject`, `style` elements, event attributes, animation, external references and any DOCTYPE are removed or refused (a DOCTYPE or ENTITY refuses the file), so the stored bytes can differ from the upload. An SVG has no variants; its width and height come from its `viewBox`. Requires `media:write`.
|
|
6
6
|
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
7
7
|
* @returns any Default Response
|
|
8
8
|
* @throws ApiError
|
|
@@ -14,7 +14,7 @@ export declare class MediaService {
|
|
|
14
14
|
* Public URL of the original image.
|
|
15
15
|
*/
|
|
16
16
|
url?: string;
|
|
17
|
-
mime?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif' | 'image/avif';
|
|
17
|
+
mime?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif' | 'image/avif' | 'image/svg+xml';
|
|
18
18
|
/**
|
|
19
19
|
* Size of the original in bytes.
|
|
20
20
|
*/
|
|
@@ -23,7 +23,7 @@ export declare class MediaService {
|
|
|
23
23
|
height?: number;
|
|
24
24
|
alt?: string;
|
|
25
25
|
/**
|
|
26
|
-
* WebP copies at 320, 640, 1024, 1600 and 2400 px wide, never upscaled. Build `srcset` from these.
|
|
26
|
+
* WebP copies at 320, 640, 1024, 1600 and 2400 px wide, never upscaled. Build `srcset` from these. Empty for an SVG.
|
|
27
27
|
*/
|
|
28
28
|
variants?: Array<{
|
|
29
29
|
width?: number;
|
|
@@ -61,7 +61,7 @@ export declare class MediaService {
|
|
|
61
61
|
* Public URL of the original image.
|
|
62
62
|
*/
|
|
63
63
|
url?: string;
|
|
64
|
-
mime?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif' | 'image/avif';
|
|
64
|
+
mime?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif' | 'image/avif' | 'image/svg+xml';
|
|
65
65
|
/**
|
|
66
66
|
* Size of the original in bytes.
|
|
67
67
|
*/
|
|
@@ -70,7 +70,7 @@ export declare class MediaService {
|
|
|
70
70
|
height?: number;
|
|
71
71
|
alt?: string;
|
|
72
72
|
/**
|
|
73
|
-
* WebP copies at 320, 640, 1024, 1600 and 2400 px wide, never upscaled. Build `srcset` from these.
|
|
73
|
+
* WebP copies at 320, 640, 1024, 1600 and 2400 px wide, never upscaled. Build `srcset` from these. Empty for an SVG.
|
|
74
74
|
*/
|
|
75
75
|
variants?: Array<{
|
|
76
76
|
width?: number;
|
|
@@ -86,7 +86,7 @@ export declare class MediaService {
|
|
|
86
86
|
}>;
|
|
87
87
|
/**
|
|
88
88
|
* Add an image from a URL.
|
|
89
|
-
* Throttle downloads the image and adds it to the media library. The URL must be public: private, loopback and link-local addresses are refused on every redirect (at most 3), and the download is capped at 10 MB. Requires `media:write`.
|
|
89
|
+
* Throttle downloads the image and adds it to the media library (an SVG is sanitised the same way as an upload). The URL must be public: private, loopback and link-local addresses are refused on every redirect (at most 3), and the download is capped at 10 MB. Requires `media:write`.
|
|
90
90
|
* @param requestBody
|
|
91
91
|
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
92
92
|
* @returns any Default Response
|
|
@@ -105,7 +105,7 @@ export declare class MediaService {
|
|
|
105
105
|
* Public URL of the original image.
|
|
106
106
|
*/
|
|
107
107
|
url?: string;
|
|
108
|
-
mime?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif' | 'image/avif';
|
|
108
|
+
mime?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif' | 'image/avif' | 'image/svg+xml';
|
|
109
109
|
/**
|
|
110
110
|
* Size of the original in bytes.
|
|
111
111
|
*/
|
|
@@ -114,7 +114,7 @@ export declare class MediaService {
|
|
|
114
114
|
height?: number;
|
|
115
115
|
alt?: string;
|
|
116
116
|
/**
|
|
117
|
-
* WebP copies at 320, 640, 1024, 1600 and 2400 px wide, never upscaled. Build `srcset` from these.
|
|
117
|
+
* WebP copies at 320, 640, 1024, 1600 and 2400 px wide, never upscaled. Build `srcset` from these. Empty for an SVG.
|
|
118
118
|
*/
|
|
119
119
|
variants?: Array<{
|
|
120
120
|
width?: number;
|
|
@@ -149,7 +149,7 @@ export declare class MediaService {
|
|
|
149
149
|
* Public URL of the original image.
|
|
150
150
|
*/
|
|
151
151
|
url?: string;
|
|
152
|
-
mime?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif' | 'image/avif';
|
|
152
|
+
mime?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif' | 'image/avif' | 'image/svg+xml';
|
|
153
153
|
/**
|
|
154
154
|
* Size of the original in bytes.
|
|
155
155
|
*/
|
|
@@ -158,7 +158,7 @@ export declare class MediaService {
|
|
|
158
158
|
height?: number;
|
|
159
159
|
alt?: string;
|
|
160
160
|
/**
|
|
161
|
-
* WebP copies at 320, 640, 1024, 1600 and 2400 px wide, never upscaled. Build `srcset` from these.
|
|
161
|
+
* WebP copies at 320, 640, 1024, 1600 and 2400 px wide, never upscaled. Build `srcset` from these. Empty for an SVG.
|
|
162
162
|
*/
|
|
163
163
|
variants?: Array<{
|
|
164
164
|
width?: number;
|
|
@@ -196,7 +196,7 @@ export declare class MediaService {
|
|
|
196
196
|
* Public URL of the original image.
|
|
197
197
|
*/
|
|
198
198
|
url?: string;
|
|
199
|
-
mime?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif' | 'image/avif';
|
|
199
|
+
mime?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif' | 'image/avif' | 'image/svg+xml';
|
|
200
200
|
/**
|
|
201
201
|
* Size of the original in bytes.
|
|
202
202
|
*/
|
|
@@ -205,7 +205,7 @@ export declare class MediaService {
|
|
|
205
205
|
height?: number;
|
|
206
206
|
alt?: string;
|
|
207
207
|
/**
|
|
208
|
-
* WebP copies at 320, 640, 1024, 1600 and 2400 px wide, never upscaled. Build `srcset` from these.
|
|
208
|
+
* WebP copies at 320, 640, 1024, 1600 and 2400 px wide, never upscaled. Build `srcset` from these. Empty for an SVG.
|
|
209
209
|
*/
|
|
210
210
|
variants?: Array<{
|
|
211
211
|
width?: number;
|
|
@@ -240,7 +240,7 @@ export declare class MediaService {
|
|
|
240
240
|
* Public URL of the original image.
|
|
241
241
|
*/
|
|
242
242
|
url?: string;
|
|
243
|
-
mime?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif' | 'image/avif';
|
|
243
|
+
mime?: 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif' | 'image/avif' | 'image/svg+xml';
|
|
244
244
|
/**
|
|
245
245
|
* Size of the original in bytes.
|
|
246
246
|
*/
|
|
@@ -249,7 +249,7 @@ export declare class MediaService {
|
|
|
249
249
|
height?: number;
|
|
250
250
|
alt?: string;
|
|
251
251
|
/**
|
|
252
|
-
* WebP copies at 320, 640, 1024, 1600 and 2400 px wide, never upscaled. Build `srcset` from these.
|
|
252
|
+
* WebP copies at 320, 640, 1024, 1600 and 2400 px wide, never upscaled. Build `srcset` from these. Empty for an SVG.
|
|
253
253
|
*/
|
|
254
254
|
variants?: Array<{
|
|
255
255
|
width?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaService.d.ts","sourceRoot":"","sources":["../../../src/generated/services/MediaService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGtE,qBAAa,YAAY;IACrB;;;;;;OAMG;WACW,cAAc,CACxB,sBAAsB,CAAC,EAAE,MAAM,GAChC,iBAAiB,CAAC;QACjB,IAAI,CAAC,EAAE;YACH,EAAE,CAAC,EAAE,MAAM,CAAC;YACZ;;eAEG;YACH,GAAG,CAAC,EAAE,MAAM,CAAC;YACb,IAAI,CAAC,EAAE,WAAW,GAAG,YAAY,GAAG,YAAY,GAAG,WAAW,GAAG,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"MediaService.d.ts","sourceRoot":"","sources":["../../../src/generated/services/MediaService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGtE,qBAAa,YAAY;IACrB;;;;;;OAMG;WACW,cAAc,CACxB,sBAAsB,CAAC,EAAE,MAAM,GAChC,iBAAiB,CAAC;QACjB,IAAI,CAAC,EAAE;YACH,EAAE,CAAC,EAAE,MAAM,CAAC;YACZ;;eAEG;YACH,GAAG,CAAC,EAAE,MAAM,CAAC;YACb,IAAI,CAAC,EAAE,WAAW,GAAG,YAAY,GAAG,YAAY,GAAG,WAAW,GAAG,YAAY,GAAG,eAAe,CAAC;YAChG;;eAEG;YACH,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,KAAK,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M,CAAC;aAChB,CAAC,CAAC;YACH,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;SAC7B,CAAC;QACF,IAAI,CAAC,EAAE;YACH;;eAEG;YACH,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,UAAU,CAAC,EAAE;gBACT,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;gBACvB,OAAO,CAAC,EAAE,OAAO,CAAC;aACrB,CAAC;SACL,CAAC;KACL,CAAC;CAeL"}
|
|
@@ -3,7 +3,7 @@ import { request as __request } from '../core/request.js';
|
|
|
3
3
|
export class MediaService {
|
|
4
4
|
/**
|
|
5
5
|
* Upload an image (multipart/form-data, field: file, optional field: alt).
|
|
6
|
-
* Adds an image to the store's media library. PNG, JPEG, WebP, GIF or
|
|
6
|
+
* Adds an image to the store's media library. PNG, JPEG, WebP, GIF, AVIF or SVG, at most 10 MB and 40 megapixels (an SVG: at most 20 KB). The type is read from the file's bytes, not its declared content type. Stores the original and WebP width variants. A JPEG original loses its EXIF data (GPS, camera) but keeps its pixels and orientation; other raster formats are stored as uploaded. An SVG is sanitised first and the sanitised copy is what is stored and served: scripts, `foreignObject`, `style` elements, event attributes, animation, external references and any DOCTYPE are removed or refused (a DOCTYPE or ENTITY refuses the file), so the stored bytes can differ from the upload. An SVG has no variants; its width and height come from its `viewBox`. Requires `media:write`.
|
|
7
7
|
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
8
8
|
* @returns any Default Response
|
|
9
9
|
* @throws ApiError
|
|
@@ -18,9 +18,9 @@ export class MediaService {
|
|
|
18
18
|
errors: {
|
|
19
19
|
400: `\`no_file\` or \`validation_error\`.`,
|
|
20
20
|
409: `\`media_quota_exceeded\`: 10,000 images or 5 GB of originals (deleted images count toward the 5 GB until their files are removed after 30 days).`,
|
|
21
|
-
413: `\`file_too_large\`: over 10 MB.`,
|
|
22
|
-
415: `\`unsupported_media_type\`: not a PNG, JPEG, WebP, GIF
|
|
23
|
-
422: `\`image_too_large\` (over 40 megapixels) or \`
|
|
21
|
+
413: `\`file_too_large\`: over 10 MB (an SVG: over 20 KB).`,
|
|
22
|
+
415: `\`unsupported_media_type\`: not a PNG, JPEG, WebP, GIF, AVIF or SVG image.`,
|
|
23
|
+
422: `\`image_too_large\` (over 40 megapixels), \`invalid_image\`, or \`invalid_svg\` (an SVG that is not well-formed XML, has a DOCTYPE or ENTITY, or has nothing safe to draw left after sanitising).`,
|
|
24
24
|
429: `\`rate_limited\`: more than 60 uploads a minute for this store.`,
|
|
25
25
|
},
|
|
26
26
|
});
|
|
@@ -56,7 +56,7 @@ export class MediaService {
|
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
58
|
* Add an image from a URL.
|
|
59
|
-
* Throttle downloads the image and adds it to the media library. The URL must be public: private, loopback and link-local addresses are refused on every redirect (at most 3), and the download is capped at 10 MB. Requires `media:write`.
|
|
59
|
+
* Throttle downloads the image and adds it to the media library (an SVG is sanitised the same way as an upload). The URL must be public: private, loopback and link-local addresses are refused on every redirect (at most 3), and the download is capped at 10 MB. Requires `media:write`.
|
|
60
60
|
* @param requestBody
|
|
61
61
|
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
62
62
|
* @returns any Default Response
|
|
@@ -74,9 +74,9 @@ export class MediaService {
|
|
|
74
74
|
errors: {
|
|
75
75
|
400: `\`no_file\` or \`validation_error\`.`,
|
|
76
76
|
409: `\`media_quota_exceeded\`: 10,000 images or 5 GB of originals (deleted images count toward the 5 GB until their files are removed after 30 days).`,
|
|
77
|
-
413: `\`file_too_large\`: over 10 MB.`,
|
|
78
|
-
415: `\`unsupported_media_type\`: not a PNG, JPEG, WebP, GIF
|
|
79
|
-
422: `\`fetch_failed\` (the host did not resolve, answered non-200 or timed out), \`too_many_redirects\` (more than 3), \`image_too_large\` (over 40 megapixels) or \`
|
|
77
|
+
413: `\`file_too_large\`: over 10 MB (an SVG: over 20 KB).`,
|
|
78
|
+
415: `\`unsupported_media_type\`: not a PNG, JPEG, WebP, GIF, AVIF or SVG image.`,
|
|
79
|
+
422: `\`fetch_failed\` (the host did not resolve, answered non-200 or timed out), \`too_many_redirects\` (more than 3), \`image_too_large\` (over 40 megapixels), \`invalid_image\`, or \`invalid_svg\` (an SVG that is not well-formed XML, has a DOCTYPE or ENTITY, or has nothing safe to draw left after sanitising).`,
|
|
80
80
|
429: `\`rate_limited\`: more than 60 uploads a minute for this store.`,
|
|
81
81
|
},
|
|
82
82
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaService.js","sourceRoot":"","sources":["../../../src/generated/services/MediaService.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC1D,MAAM,OAAO,YAAY;IACrB;;;;;;OAMG;IACI,MAAM,CAAC,cAAc,CACxB,sBAA+B;QAqC/B,OAAO,SAAS,CAAC,OAAO,EAAE;YACtB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,eAAe;YACpB,OAAO,EAAE;gBACL,2BAA2B,EAAE,sBAAsB;aACtD;YACD,MAAM,EAAE;gBACJ,GAAG,EAAE,sCAAsC;gBAC3C,GAAG,EAAE,kJAAkJ;gBACvJ,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"MediaService.js","sourceRoot":"","sources":["../../../src/generated/services/MediaService.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC1D,MAAM,OAAO,YAAY;IACrB;;;;;;OAMG;IACI,MAAM,CAAC,cAAc,CACxB,sBAA+B;QAqC/B,OAA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
discountId?: string | null;
|
|
210
210
|
discountCode?: string | null;
|
|
211
|
+
shippingDiscountId?: string | null;
|
|
212
|
+
shippingDiscountCode?: string | null;
|
|
211
213
|
orderNumber?: string;
|
|
212
214
|
status?: 'draft' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'cancelled' | 'closed';
|
|
213
215
|
displayStatus?: string;
|
|
@@ -248,6 +250,10 @@ export declare class OrdersService {
|
|
|
248
250
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
249
251
|
*/
|
|
250
252
|
shippingTotal?: number;
|
|
253
|
+
/**
|
|
254
|
+
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
255
|
+
*/
|
|
256
|
+
shippingDiscountTotal?: number;
|
|
251
257
|
/**
|
|
252
258
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
253
259
|
*/
|
|
@@ -463,6 +469,8 @@ export declare class OrdersService {
|
|
|
463
469
|
workspaceId?: string;
|
|
464
470
|
discountId?: string | null;
|
|
465
471
|
discountCode?: string | null;
|
|
472
|
+
shippingDiscountId?: string | null;
|
|
473
|
+
shippingDiscountCode?: string | null;
|
|
466
474
|
orderNumber?: string;
|
|
467
475
|
status?: 'draft' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'cancelled' | 'closed';
|
|
468
476
|
displayStatus?: string;
|
|
@@ -503,6 +511,10 @@ export declare class OrdersService {
|
|
|
503
511
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
504
512
|
*/
|
|
505
513
|
shippingTotal?: number;
|
|
514
|
+
/**
|
|
515
|
+
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
516
|
+
*/
|
|
517
|
+
shippingDiscountTotal?: number;
|
|
506
518
|
/**
|
|
507
519
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
508
520
|
*/
|
|
@@ -726,6 +738,8 @@ export declare class OrdersService {
|
|
|
726
738
|
workspaceId?: string;
|
|
727
739
|
discountId?: string | null;
|
|
728
740
|
discountCode?: string | null;
|
|
741
|
+
shippingDiscountId?: string | null;
|
|
742
|
+
shippingDiscountCode?: string | null;
|
|
729
743
|
orderNumber?: string;
|
|
730
744
|
status?: 'draft' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'cancelled' | 'closed';
|
|
731
745
|
displayStatus?: string;
|
|
@@ -766,6 +780,10 @@ export declare class OrdersService {
|
|
|
766
780
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
767
781
|
*/
|
|
768
782
|
shippingTotal?: number;
|
|
783
|
+
/**
|
|
784
|
+
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
785
|
+
*/
|
|
786
|
+
shippingDiscountTotal?: number;
|
|
769
787
|
/**
|
|
770
788
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
771
789
|
*/
|
|
@@ -1026,6 +1044,8 @@ export declare class OrdersService {
|
|
|
1026
1044
|
workspaceId?: string;
|
|
1027
1045
|
discountId?: string | null;
|
|
1028
1046
|
discountCode?: string | null;
|
|
1047
|
+
shippingDiscountId?: string | null;
|
|
1048
|
+
shippingDiscountCode?: string | null;
|
|
1029
1049
|
orderNumber?: string;
|
|
1030
1050
|
status?: 'draft' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'cancelled' | 'closed';
|
|
1031
1051
|
displayStatus?: string;
|
|
@@ -1066,6 +1086,10 @@ export declare class OrdersService {
|
|
|
1066
1086
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
1067
1087
|
*/
|
|
1068
1088
|
shippingTotal?: number;
|
|
1089
|
+
/**
|
|
1090
|
+
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
1091
|
+
*/
|
|
1092
|
+
shippingDiscountTotal?: number;
|
|
1069
1093
|
/**
|
|
1070
1094
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
1071
1095
|
*/
|
|
@@ -1277,6 +1301,8 @@ export declare class OrdersService {
|
|
|
1277
1301
|
workspaceId?: string;
|
|
1278
1302
|
discountId?: string | null;
|
|
1279
1303
|
discountCode?: string | null;
|
|
1304
|
+
shippingDiscountId?: string | null;
|
|
1305
|
+
shippingDiscountCode?: string | null;
|
|
1280
1306
|
orderNumber?: string;
|
|
1281
1307
|
status?: 'draft' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'cancelled' | 'closed';
|
|
1282
1308
|
displayStatus?: string;
|
|
@@ -1317,6 +1343,10 @@ export declare class OrdersService {
|
|
|
1317
1343
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
1318
1344
|
*/
|
|
1319
1345
|
shippingTotal?: number;
|
|
1346
|
+
/**
|
|
1347
|
+
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
1348
|
+
*/
|
|
1349
|
+
shippingDiscountTotal?: number;
|
|
1320
1350
|
/**
|
|
1321
1351
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
1322
1352
|
*/
|
|
@@ -1523,6 +1553,8 @@ export declare class OrdersService {
|
|
|
1523
1553
|
workspaceId?: string;
|
|
1524
1554
|
discountId?: string | null;
|
|
1525
1555
|
discountCode?: string | null;
|
|
1556
|
+
shippingDiscountId?: string | null;
|
|
1557
|
+
shippingDiscountCode?: string | null;
|
|
1526
1558
|
orderNumber?: string;
|
|
1527
1559
|
status?: 'draft' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'cancelled' | 'closed';
|
|
1528
1560
|
displayStatus?: string;
|
|
@@ -1563,6 +1595,10 @@ export declare class OrdersService {
|
|
|
1563
1595
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
1564
1596
|
*/
|
|
1565
1597
|
shippingTotal?: number;
|
|
1598
|
+
/**
|
|
1599
|
+
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
1600
|
+
*/
|
|
1601
|
+
shippingDiscountTotal?: number;
|
|
1566
1602
|
/**
|
|
1567
1603
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
1568
1604
|
*/
|
|
@@ -1769,6 +1805,8 @@ export declare class OrdersService {
|
|
|
1769
1805
|
workspaceId?: string;
|
|
1770
1806
|
discountId?: string | null;
|
|
1771
1807
|
discountCode?: string | null;
|
|
1808
|
+
shippingDiscountId?: string | null;
|
|
1809
|
+
shippingDiscountCode?: string | null;
|
|
1772
1810
|
orderNumber?: string;
|
|
1773
1811
|
status?: 'draft' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'cancelled' | 'closed';
|
|
1774
1812
|
displayStatus?: string;
|
|
@@ -1809,6 +1847,10 @@ export declare class OrdersService {
|
|
|
1809
1847
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
1810
1848
|
*/
|
|
1811
1849
|
shippingTotal?: number;
|
|
1850
|
+
/**
|
|
1851
|
+
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
1852
|
+
*/
|
|
1853
|
+
shippingDiscountTotal?: number;
|
|
1812
1854
|
/**
|
|
1813
1855
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
1814
1856
|
*/
|
|
@@ -2016,6 +2058,8 @@ export declare class OrdersService {
|
|
|
2016
2058
|
workspaceId?: string;
|
|
2017
2059
|
discountId?: string | null;
|
|
2018
2060
|
discountCode?: string | null;
|
|
2061
|
+
shippingDiscountId?: string | null;
|
|
2062
|
+
shippingDiscountCode?: string | null;
|
|
2019
2063
|
orderNumber?: string;
|
|
2020
2064
|
status?: 'draft' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'cancelled' | 'closed';
|
|
2021
2065
|
displayStatus?: string;
|
|
@@ -2056,6 +2100,10 @@ export declare class OrdersService {
|
|
|
2056
2100
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
2057
2101
|
*/
|
|
2058
2102
|
shippingTotal?: number;
|
|
2103
|
+
/**
|
|
2104
|
+
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
2105
|
+
*/
|
|
2106
|
+
shippingDiscountTotal?: number;
|
|
2059
2107
|
/**
|
|
2060
2108
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
2061
2109
|
*/
|
|
@@ -2272,6 +2320,8 @@ export declare class OrdersService {
|
|
|
2272
2320
|
workspaceId?: string;
|
|
2273
2321
|
discountId?: string | null;
|
|
2274
2322
|
discountCode?: string | null;
|
|
2323
|
+
shippingDiscountId?: string | null;
|
|
2324
|
+
shippingDiscountCode?: string | null;
|
|
2275
2325
|
orderNumber?: string;
|
|
2276
2326
|
status?: 'draft' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'cancelled' | 'closed';
|
|
2277
2327
|
displayStatus?: string;
|
|
@@ -2312,6 +2362,10 @@ export declare class OrdersService {
|
|
|
2312
2362
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
2313
2363
|
*/
|
|
2314
2364
|
shippingTotal?: number;
|
|
2365
|
+
/**
|
|
2366
|
+
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
2367
|
+
*/
|
|
2368
|
+
shippingDiscountTotal?: number;
|
|
2315
2369
|
/**
|
|
2316
2370
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
2317
2371
|
*/
|
|
@@ -2518,6 +2572,8 @@ export declare class OrdersService {
|
|
|
2518
2572
|
workspaceId?: string;
|
|
2519
2573
|
discountId?: string | null;
|
|
2520
2574
|
discountCode?: string | null;
|
|
2575
|
+
shippingDiscountId?: string | null;
|
|
2576
|
+
shippingDiscountCode?: string | null;
|
|
2521
2577
|
orderNumber?: string;
|
|
2522
2578
|
status?: 'draft' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'cancelled' | 'closed';
|
|
2523
2579
|
displayStatus?: string;
|
|
@@ -2558,6 +2614,10 @@ export declare class OrdersService {
|
|
|
2558
2614
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
2559
2615
|
*/
|
|
2560
2616
|
shippingTotal?: number;
|
|
2617
|
+
/**
|
|
2618
|
+
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
2619
|
+
*/
|
|
2620
|
+
shippingDiscountTotal?: number;
|
|
2561
2621
|
/**
|
|
2562
2622
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
2563
2623
|
*/
|
|
@@ -2770,6 +2830,8 @@ export declare class OrdersService {
|
|
|
2770
2830
|
workspaceId?: string;
|
|
2771
2831
|
discountId?: string | null;
|
|
2772
2832
|
discountCode?: string | null;
|
|
2833
|
+
shippingDiscountId?: string | null;
|
|
2834
|
+
shippingDiscountCode?: string | null;
|
|
2773
2835
|
orderNumber?: string;
|
|
2774
2836
|
status?: 'draft' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'cancelled' | 'closed';
|
|
2775
2837
|
displayStatus?: string;
|
|
@@ -2810,6 +2872,10 @@ export declare class OrdersService {
|
|
|
2810
2872
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
2811
2873
|
*/
|
|
2812
2874
|
shippingTotal?: number;
|
|
2875
|
+
/**
|
|
2876
|
+
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
2877
|
+
*/
|
|
2878
|
+
shippingDiscountTotal?: number;
|
|
2813
2879
|
/**
|
|
2814
2880
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
2815
2881
|
*/
|
|
@@ -3016,6 +3082,8 @@ export declare class OrdersService {
|
|
|
3016
3082
|
workspaceId?: string;
|
|
3017
3083
|
discountId?: string | null;
|
|
3018
3084
|
discountCode?: string | null;
|
|
3085
|
+
shippingDiscountId?: string | null;
|
|
3086
|
+
shippingDiscountCode?: string | null;
|
|
3019
3087
|
orderNumber?: string;
|
|
3020
3088
|
status?: 'draft' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'cancelled' | 'closed';
|
|
3021
3089
|
displayStatus?: string;
|
|
@@ -3056,6 +3124,10 @@ export declare class OrdersService {
|
|
|
3056
3124
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
3057
3125
|
*/
|
|
3058
3126
|
shippingTotal?: number;
|
|
3127
|
+
/**
|
|
3128
|
+
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
3129
|
+
*/
|
|
3130
|
+
shippingDiscountTotal?: number;
|
|
3059
3131
|
/**
|
|
3060
3132
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
3061
3133
|
*/
|
|
@@ -3259,6 +3331,8 @@ export declare class OrdersService {
|
|
|
3259
3331
|
workspaceId?: string;
|
|
3260
3332
|
discountId?: string | null;
|
|
3261
3333
|
discountCode?: string | null;
|
|
3334
|
+
shippingDiscountId?: string | null;
|
|
3335
|
+
shippingDiscountCode?: string | null;
|
|
3262
3336
|
orderNumber?: string;
|
|
3263
3337
|
status?: 'draft' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'cancelled' | 'closed';
|
|
3264
3338
|
displayStatus?: string;
|
|
@@ -3299,6 +3373,10 @@ export declare class OrdersService {
|
|
|
3299
3373
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
3300
3374
|
*/
|
|
3301
3375
|
shippingTotal?: number;
|
|
3376
|
+
/**
|
|
3377
|
+
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
3378
|
+
*/
|
|
3379
|
+
shippingDiscountTotal?: number;
|
|
3302
3380
|
/**
|
|
3303
3381
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
3304
3382
|
*/
|
|
@@ -3566,6 +3644,8 @@ export declare class OrdersService {
|
|
|
3566
3644
|
workspaceId?: string;
|
|
3567
3645
|
discountId?: string | null;
|
|
3568
3646
|
discountCode?: string | null;
|
|
3647
|
+
shippingDiscountId?: string | null;
|
|
3648
|
+
shippingDiscountCode?: string | null;
|
|
3569
3649
|
orderNumber?: string;
|
|
3570
3650
|
status?: 'draft' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'cancelled' | 'closed';
|
|
3571
3651
|
displayStatus?: string;
|
|
@@ -3606,6 +3686,10 @@ export declare class OrdersService {
|
|
|
3606
3686
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
3607
3687
|
*/
|
|
3608
3688
|
shippingTotal?: number;
|
|
3689
|
+
/**
|
|
3690
|
+
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
3691
|
+
*/
|
|
3692
|
+
shippingDiscountTotal?: number;
|
|
3609
3693
|
/**
|
|
3610
3694
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
3611
3695
|
*/
|
|
@@ -3909,17 +3993,17 @@ export declare class OrdersService {
|
|
|
3909
3993
|
/**
|
|
3910
3994
|
* Start a card payment the merchant types in for the customer (a mail or telephone order) on a draft order built in the dashboard. Returns a 30-minute `embedUrl` that only the Throttle dashboard can show; the secure card form there charges the order as a MOTO transaction and the card never reaches Throttle. The card is saved to the order's customer when `saveCard` is true or the order has a subscription line (renewals charge it). Cancels any open payment link first. An API key needs both `orders:write` and `checkout_sessions:write`.
|
|
3911
3995
|
* @param id
|
|
3912
|
-
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
3913
3996
|
* @param requestBody
|
|
3997
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
3914
3998
|
* @returns any Default Response
|
|
3915
3999
|
* @throws ApiError
|
|
3916
4000
|
*/
|
|
3917
|
-
static postApiV1OrdersCardEntry(id: string,
|
|
4001
|
+
static postApiV1OrdersCardEntry(id: string, requestBody: {
|
|
3918
4002
|
/**
|
|
3919
4003
|
* Save the card to the order's customer for future orders. Default false; always true when the order has a subscription line.
|
|
3920
4004
|
*/
|
|
3921
4005
|
saveCard?: boolean;
|
|
3922
|
-
}): CancelablePromise<{
|
|
4006
|
+
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
3923
4007
|
data?: {
|
|
3924
4008
|
sessionId?: string;
|
|
3925
4009
|
/**
|
|
@@ -3932,7 +4016,16 @@ export declare class OrdersService {
|
|
|
3932
4016
|
*/
|
|
3933
4017
|
saveCard?: boolean;
|
|
3934
4018
|
};
|
|
3935
|
-
meta?:
|
|
4019
|
+
meta?: {
|
|
4020
|
+
/**
|
|
4021
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
4022
|
+
*/
|
|
4023
|
+
requestId?: string;
|
|
4024
|
+
pagination?: {
|
|
4025
|
+
cursor?: string | null;
|
|
4026
|
+
hasMore?: boolean;
|
|
4027
|
+
};
|
|
4028
|
+
};
|
|
3936
4029
|
}>;
|
|
3937
4030
|
/**
|
|
3938
4031
|
* Issue a Net-N invoice for a draft order built with `POST /orders/from-cart`, accepting the Invoice Terms on the buyer's behalf, and move the order to processing. Cancels any payment link first. Requires an active Invoice Terms connector. An API key needs both `payments:write` and `orders:write`.
|
|
@@ -4053,6 +4146,8 @@ export declare class OrdersService {
|
|
|
4053
4146
|
workspaceId?: string;
|
|
4054
4147
|
discountId?: string | null;
|
|
4055
4148
|
discountCode?: string | null;
|
|
4149
|
+
shippingDiscountId?: string | null;
|
|
4150
|
+
shippingDiscountCode?: string | null;
|
|
4056
4151
|
orderNumber?: string;
|
|
4057
4152
|
status?: 'draft' | 'pending' | 'processing' | 'partially_fulfilled' | 'fulfilled' | 'cancelled' | 'closed';
|
|
4058
4153
|
type?: 'one_time' | 'recurring' | 'mixed';
|
|
@@ -4087,6 +4182,10 @@ export declare class OrdersService {
|
|
|
4087
4182
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
4088
4183
|
*/
|
|
4089
4184
|
shippingTotal?: number;
|
|
4185
|
+
/**
|
|
4186
|
+
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
4187
|
+
*/
|
|
4188
|
+
shippingDiscountTotal?: number;
|
|
4090
4189
|
/**
|
|
4091
4190
|
* Integer minor units of `currency` (ISO 4217 exponent).
|
|
4092
4191
|
*/
|
|
@@ -4390,10 +4489,6 @@ export declare class OrdersService {
|
|
|
4390
4489
|
url?: string | null;
|
|
4391
4490
|
}>;
|
|
4392
4491
|
meta: {
|
|
4393
|
-
/**
|
|
4394
|
-
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
4395
|
-
*/
|
|
4396
|
-
requestId?: string;
|
|
4397
4492
|
pagination?: {
|
|
4398
4493
|
cursor?: string | null;
|
|
4399
4494
|
hasMore?: boolean;
|