@wix/auto_sdk_ecom_checkout 1.0.17 → 1.0.19
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/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/ecom-v1-checkout-checkout.context.d.ts +34 -0
- package/build/cjs/src/ecom-v1-checkout-checkout.context.js +77 -0
- package/build/cjs/src/ecom-v1-checkout-checkout.context.js.map +1 -0
- package/build/cjs/src/ecom-v1-checkout-checkout.http.d.ts +122 -0
- package/build/cjs/src/ecom-v1-checkout-checkout.http.js +1338 -0
- package/build/cjs/src/ecom-v1-checkout-checkout.http.js.map +1 -0
- package/build/cjs/src/ecom-v1-checkout-checkout.meta.d.ts +59 -0
- package/build/cjs/src/ecom-v1-checkout-checkout.meta.js +351 -0
- package/build/cjs/src/ecom-v1-checkout-checkout.meta.js.map +1 -0
- package/build/cjs/src/ecom-v1-checkout-checkout.public.d.ts +186 -0
- package/build/cjs/src/ecom-v1-checkout-checkout.public.js +358 -0
- package/build/cjs/src/ecom-v1-checkout-checkout.public.js.map +1 -0
- package/build/{ecom-v1-checkout-checkout.universal-BV8QOlPP.d.mts → cjs/src/ecom-v1-checkout-checkout.types.d.ts} +390 -666
- package/build/cjs/src/ecom-v1-checkout-checkout.types.js +303 -0
- package/build/cjs/src/ecom-v1-checkout-checkout.types.js.map +1 -0
- package/build/{internal/ecom-v1-checkout-checkout.universal-DGEClxWR.d.mts → cjs/src/ecom-v1-checkout-checkout.universal.d.ts} +749 -455
- package/build/cjs/src/ecom-v1-checkout-checkout.universal.js +1561 -0
- package/build/cjs/src/ecom-v1-checkout-checkout.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/ecom-v1-checkout-checkout.context.d.ts +34 -0
- package/build/es/src/ecom-v1-checkout-checkout.context.js +42 -0
- package/build/es/src/ecom-v1-checkout-checkout.context.js.map +1 -0
- package/build/es/src/ecom-v1-checkout-checkout.http.d.ts +122 -0
- package/build/es/src/ecom-v1-checkout-checkout.http.js +1318 -0
- package/build/es/src/ecom-v1-checkout-checkout.http.js.map +1 -0
- package/build/es/src/ecom-v1-checkout-checkout.meta.d.ts +59 -0
- package/build/es/src/ecom-v1-checkout-checkout.meta.js +308 -0
- package/build/es/src/ecom-v1-checkout-checkout.meta.js.map +1 -0
- package/build/es/src/ecom-v1-checkout-checkout.public.d.ts +186 -0
- package/build/es/src/ecom-v1-checkout-checkout.public.js +306 -0
- package/build/es/src/ecom-v1-checkout-checkout.public.js.map +1 -0
- package/build/{ecom-v1-checkout-checkout.universal-BV8QOlPP.d.ts → es/src/ecom-v1-checkout-checkout.types.d.ts} +390 -666
- package/build/es/src/ecom-v1-checkout-checkout.types.js +300 -0
- package/build/es/src/ecom-v1-checkout-checkout.types.js.map +1 -0
- package/build/{internal/ecom-v1-checkout-checkout.universal-DGEClxWR.d.ts → es/src/ecom-v1-checkout-checkout.universal.d.ts} +749 -455
- package/build/es/src/ecom-v1-checkout-checkout.universal.js +1518 -0
- package/build/es/src/ecom-v1-checkout-checkout.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.context.d.ts +42 -0
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.context.js +77 -0
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.context.js.map +1 -0
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.http.d.ts +122 -0
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.http.js +1338 -0
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.http.js.map +1 -0
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.meta.d.ts +59 -0
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.meta.js +351 -0
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.meta.js.map +1 -0
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.public.d.ts +219 -0
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.public.js +358 -0
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.public.js.map +1 -0
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.types.d.ts +3418 -0
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.types.js +303 -0
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.types.js.map +1 -0
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.universal.d.ts +4480 -0
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.universal.js +1561 -0
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/ecom-v1-checkout-checkout.context.d.ts +42 -0
- package/build/internal/es/src/ecom-v1-checkout-checkout.context.js +42 -0
- package/build/internal/es/src/ecom-v1-checkout-checkout.context.js.map +1 -0
- package/build/internal/es/src/ecom-v1-checkout-checkout.http.d.ts +122 -0
- package/build/internal/es/src/ecom-v1-checkout-checkout.http.js +1318 -0
- package/build/internal/es/src/ecom-v1-checkout-checkout.http.js.map +1 -0
- package/build/internal/es/src/ecom-v1-checkout-checkout.meta.d.ts +59 -0
- package/build/internal/es/src/ecom-v1-checkout-checkout.meta.js +308 -0
- package/build/internal/es/src/ecom-v1-checkout-checkout.meta.js.map +1 -0
- package/build/internal/es/src/ecom-v1-checkout-checkout.public.d.ts +219 -0
- package/build/internal/es/src/ecom-v1-checkout-checkout.public.js +306 -0
- package/build/internal/es/src/ecom-v1-checkout-checkout.public.js.map +1 -0
- package/build/internal/es/src/ecom-v1-checkout-checkout.types.d.ts +3418 -0
- package/build/internal/es/src/ecom-v1-checkout-checkout.types.js +300 -0
- package/build/internal/es/src/ecom-v1-checkout-checkout.types.js.map +1 -0
- package/build/internal/es/src/ecom-v1-checkout-checkout.universal.d.ts +4480 -0
- package/build/internal/es/src/ecom-v1-checkout-checkout.universal.js +1518 -0
- package/build/internal/es/src/ecom-v1-checkout-checkout.universal.js.map +1 -0
- package/package.json +11 -12
- package/build/index.d.mts +0 -211
- package/build/index.d.ts +0 -211
- package/build/index.js +0 -2781
- package/build/index.js.map +0 -1
- package/build/index.mjs +0 -2707
- package/build/index.mjs.map +0 -1
- package/build/internal/index.d.mts +0 -252
- package/build/internal/index.d.ts +0 -252
- package/build/internal/index.js +0 -2781
- package/build/internal/index.js.map +0 -1
- package/build/internal/index.mjs +0 -2707
- package/build/internal/index.mjs.map +0 -1
- package/build/internal/meta.d.mts +0 -2345
- package/build/internal/meta.d.ts +0 -2345
- package/build/internal/meta.js +0 -1587
- package/build/internal/meta.js.map +0 -1
- package/build/internal/meta.mjs +0 -1544
- package/build/internal/meta.mjs.map +0 -1
- package/build/meta.d.mts +0 -2345
- package/build/meta.d.ts +0 -2345
- package/build/meta.js +0 -1587
- package/build/meta.js.map +0 -1
- package/build/meta.mjs +0 -1544
- package/build/meta.mjs.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
+
export interface Checkout {
|
|
2
3
|
/**
|
|
3
4
|
* Checkout ID.
|
|
4
5
|
* @format GUID
|
|
@@ -172,21 +173,6 @@ interface Checkout {
|
|
|
172
173
|
* @immutable
|
|
173
174
|
*/
|
|
174
175
|
externalReference?: ExternalReference;
|
|
175
|
-
/**
|
|
176
|
-
* Order ID.
|
|
177
|
-
*
|
|
178
|
-
* This field is empty until the checkout completes and becomes an order.
|
|
179
|
-
* @internal
|
|
180
|
-
* @format GUID
|
|
181
|
-
* @readonly
|
|
182
|
-
*/
|
|
183
|
-
orderId?: string | null;
|
|
184
|
-
/**
|
|
185
|
-
* Payment for subscriptions after free trial period.
|
|
186
|
-
* @internal
|
|
187
|
-
* @readonly
|
|
188
|
-
*/
|
|
189
|
-
payAfterFreeTrial?: PriceSummary;
|
|
190
176
|
/**
|
|
191
177
|
* The business location ID associated with the checkout.
|
|
192
178
|
*
|
|
@@ -194,25 +180,8 @@ interface Checkout {
|
|
|
194
180
|
* @format GUID
|
|
195
181
|
*/
|
|
196
182
|
businessLocationId?: string | null;
|
|
197
|
-
/**
|
|
198
|
-
* Whether payment is required to create an order.
|
|
199
|
-
*
|
|
200
|
-
* Payment is required if any of the following conditions are met:
|
|
201
|
-
* 1. At least one item requires a payment method. This can be because the item has the `savePaymentMethod` field set to `true`, or the item is a subscription with a price greater than zero.
|
|
202
|
-
* 2. The calculated total amount due for immediate payment is greater than zero - `checkout.payNow > 0`.
|
|
203
|
-
* @internal
|
|
204
|
-
* @readonly
|
|
205
|
-
*/
|
|
206
|
-
paymentRequired?: boolean;
|
|
207
|
-
/**
|
|
208
|
-
* Charges information for each subscription in the checkout.
|
|
209
|
-
* @internal
|
|
210
|
-
* @readonly
|
|
211
|
-
* @maxSize 100
|
|
212
|
-
*/
|
|
213
|
-
subscriptionCharges?: SubscriptionCharges[];
|
|
214
183
|
}
|
|
215
|
-
interface LineItem {
|
|
184
|
+
export interface LineItem {
|
|
216
185
|
/**
|
|
217
186
|
* Line item ID.
|
|
218
187
|
* @format GUID
|
|
@@ -372,18 +341,6 @@ interface LineItem {
|
|
|
372
341
|
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
373
342
|
*/
|
|
374
343
|
catalogOverrideFields?: CatalogOverrideFields;
|
|
375
|
-
/**
|
|
376
|
-
* Whether the price is not yet defined, and will be updated after the order is created.
|
|
377
|
-
* @internal
|
|
378
|
-
* @readonly
|
|
379
|
-
*/
|
|
380
|
-
priceUndetermined?: boolean;
|
|
381
|
-
/**
|
|
382
|
-
* Whether the line item quantity is fixed and cannot be changed.
|
|
383
|
-
* @internal
|
|
384
|
-
* @readonly
|
|
385
|
-
*/
|
|
386
|
-
fixedQuantity?: boolean;
|
|
387
344
|
/**
|
|
388
345
|
* Whether to save the payment method on the order.
|
|
389
346
|
*
|
|
@@ -391,55 +348,9 @@ interface LineItem {
|
|
|
391
348
|
* @readonly
|
|
392
349
|
*/
|
|
393
350
|
savePaymentMethod?: boolean;
|
|
394
|
-
/**
|
|
395
|
-
* Address to use for tax calculation purposes.
|
|
396
|
-
* @internal
|
|
397
|
-
*/
|
|
398
|
-
taxableAddress?: TaxableAddress;
|
|
399
|
-
/**
|
|
400
|
-
* Custom extended fields for the line item object.
|
|
401
|
-
*
|
|
402
|
-
* [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.
|
|
403
|
-
* @internal
|
|
404
|
-
*/
|
|
405
|
-
extendedFields?: ExtendedFields;
|
|
406
|
-
/**
|
|
407
|
-
* Policies to be displayed to the customer on the checkout page.
|
|
408
|
-
* @internal
|
|
409
|
-
* @readonly
|
|
410
|
-
* @maxSize 5
|
|
411
|
-
*/
|
|
412
|
-
policies?: Policy[];
|
|
413
|
-
/**
|
|
414
|
-
* ID of the app managing the inventory.
|
|
415
|
-
* @internal
|
|
416
|
-
* @format GUID
|
|
417
|
-
*/
|
|
418
|
-
inventoryAppId?: string | null;
|
|
419
|
-
/**
|
|
420
|
-
* Whether the item can only be purchased by site members.
|
|
421
|
-
*
|
|
422
|
-
* Default: `false`
|
|
423
|
-
* @internal
|
|
424
|
-
* @readonly
|
|
425
|
-
*/
|
|
426
|
-
membersOnly?: boolean;
|
|
427
|
-
/**
|
|
428
|
-
* Modifier groups that were added to the item.
|
|
429
|
-
* @internal
|
|
430
|
-
* @readonly
|
|
431
|
-
* @maxSize 10
|
|
432
|
-
*/
|
|
433
|
-
modifierGroups?: ModifierGroup[];
|
|
434
|
-
/**
|
|
435
|
-
* Total price of all item modifiers. Included in the item price.
|
|
436
|
-
* @internal
|
|
437
|
-
* @readonly
|
|
438
|
-
*/
|
|
439
|
-
modifiersTotalPrice?: MultiCurrencyPrice;
|
|
440
351
|
}
|
|
441
352
|
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
442
|
-
interface CatalogReference {
|
|
353
|
+
export interface CatalogReference {
|
|
443
354
|
/**
|
|
444
355
|
* ID of the item within the catalog it belongs to.
|
|
445
356
|
* @minLength 1
|
|
@@ -467,7 +378,7 @@ interface CatalogReference {
|
|
|
467
378
|
*/
|
|
468
379
|
options?: Record<string, any> | null;
|
|
469
380
|
}
|
|
470
|
-
interface ProductName {
|
|
381
|
+
export interface ProductName {
|
|
471
382
|
/**
|
|
472
383
|
* __Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
|
|
473
384
|
*
|
|
@@ -488,7 +399,7 @@ interface ProductName {
|
|
|
488
399
|
*/
|
|
489
400
|
translated?: string | null;
|
|
490
401
|
}
|
|
491
|
-
interface MultiCurrencyPrice {
|
|
402
|
+
export interface MultiCurrencyPrice {
|
|
492
403
|
/**
|
|
493
404
|
* Amount.
|
|
494
405
|
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
@@ -511,7 +422,7 @@ interface MultiCurrencyPrice {
|
|
|
511
422
|
*/
|
|
512
423
|
formattedConvertedAmount?: string;
|
|
513
424
|
}
|
|
514
|
-
interface ItemTaxFullDetails {
|
|
425
|
+
export interface ItemTaxFullDetails {
|
|
515
426
|
/** Amount for which tax is calculated. */
|
|
516
427
|
taxableAmount?: MultiCurrencyPrice;
|
|
517
428
|
/**
|
|
@@ -528,7 +439,7 @@ interface ItemTaxFullDetails {
|
|
|
528
439
|
*/
|
|
529
440
|
rateBreakdown?: TaxRateBreakdown[];
|
|
530
441
|
}
|
|
531
|
-
interface TaxRateBreakdown {
|
|
442
|
+
export interface TaxRateBreakdown {
|
|
532
443
|
/**
|
|
533
444
|
* Name of tax against which the calculation was performed.
|
|
534
445
|
* @maxLength 100
|
|
@@ -546,7 +457,7 @@ interface TaxRateBreakdown {
|
|
|
546
457
|
* TaxBreakdown represents tax information for a line item.
|
|
547
458
|
* It holds the tax amount and the tax rate for each tax authority that apply on the line item.
|
|
548
459
|
*/
|
|
549
|
-
interface TaxBreakdown {
|
|
460
|
+
export interface TaxBreakdown {
|
|
550
461
|
/**
|
|
551
462
|
* The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec".
|
|
552
463
|
* @maxLength 200
|
|
@@ -578,7 +489,7 @@ interface TaxBreakdown {
|
|
|
578
489
|
jurisdictionType?: JurisdictionType;
|
|
579
490
|
}
|
|
580
491
|
/** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
|
|
581
|
-
declare enum JurisdictionType {
|
|
492
|
+
export declare enum JurisdictionType {
|
|
582
493
|
UNDEFINED = "UNDEFINED",
|
|
583
494
|
COUNTRY = "COUNTRY",
|
|
584
495
|
STATE = "STATE",
|
|
@@ -586,7 +497,7 @@ declare enum JurisdictionType {
|
|
|
586
497
|
CITY = "CITY",
|
|
587
498
|
SPECIAL = "SPECIAL"
|
|
588
499
|
}
|
|
589
|
-
interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf {
|
|
500
|
+
export interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf {
|
|
590
501
|
/** Description line plain text value. */
|
|
591
502
|
plainText?: PlainTextValue;
|
|
592
503
|
/** Description line color value. */
|
|
@@ -595,16 +506,16 @@ interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDesc
|
|
|
595
506
|
name?: DescriptionLineName;
|
|
596
507
|
}
|
|
597
508
|
/** @oneof */
|
|
598
|
-
interface DescriptionLineValueOneOf {
|
|
509
|
+
export interface DescriptionLineValueOneOf {
|
|
599
510
|
/** Description line plain text value. */
|
|
600
511
|
plainText?: PlainTextValue;
|
|
601
512
|
/** Description line color value. */
|
|
602
513
|
colorInfo?: Color;
|
|
603
514
|
}
|
|
604
515
|
/** @oneof */
|
|
605
|
-
interface DescriptionLineDescriptionLineValueOneOf {
|
|
516
|
+
export interface DescriptionLineDescriptionLineValueOneOf {
|
|
606
517
|
}
|
|
607
|
-
interface DescriptionLineName {
|
|
518
|
+
export interface DescriptionLineName {
|
|
608
519
|
/**
|
|
609
520
|
* Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
|
|
610
521
|
* @maxLength 100
|
|
@@ -618,7 +529,7 @@ interface DescriptionLineName {
|
|
|
618
529
|
*/
|
|
619
530
|
translated?: string | null;
|
|
620
531
|
}
|
|
621
|
-
interface PlainTextValue {
|
|
532
|
+
export interface PlainTextValue {
|
|
622
533
|
/**
|
|
623
534
|
* Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
|
|
624
535
|
* @maxLength 600
|
|
@@ -632,7 +543,7 @@ interface PlainTextValue {
|
|
|
632
543
|
*/
|
|
633
544
|
translated?: string | null;
|
|
634
545
|
}
|
|
635
|
-
interface Color {
|
|
546
|
+
export interface Color {
|
|
636
547
|
/**
|
|
637
548
|
* Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
|
|
638
549
|
* @maxLength 500
|
|
@@ -648,7 +559,7 @@ interface Color {
|
|
|
648
559
|
/** HEX or RGB color code for display. */
|
|
649
560
|
code?: string | null;
|
|
650
561
|
}
|
|
651
|
-
declare enum DescriptionLineType {
|
|
562
|
+
export declare enum DescriptionLineType {
|
|
652
563
|
/** Unrecognized type. */
|
|
653
564
|
UNRECOGNISED = "UNRECOGNISED",
|
|
654
565
|
/** Plain text type. */
|
|
@@ -656,7 +567,7 @@ declare enum DescriptionLineType {
|
|
|
656
567
|
/** Color type. */
|
|
657
568
|
COLOR = "COLOR"
|
|
658
569
|
}
|
|
659
|
-
interface FocalPoint {
|
|
570
|
+
export interface FocalPoint {
|
|
660
571
|
/** X-coordinate of the focal point. */
|
|
661
572
|
x?: number;
|
|
662
573
|
/** Y-coordinate of the focal point. */
|
|
@@ -666,13 +577,13 @@ interface FocalPoint {
|
|
|
666
577
|
/** crop by width */
|
|
667
578
|
width?: number | null;
|
|
668
579
|
}
|
|
669
|
-
interface ItemAvailabilityInfo {
|
|
580
|
+
export interface ItemAvailabilityInfo {
|
|
670
581
|
/** Item availability status. */
|
|
671
582
|
status?: ItemAvailabilityStatus;
|
|
672
583
|
/** Quantity available. */
|
|
673
584
|
quantityAvailable?: number | null;
|
|
674
585
|
}
|
|
675
|
-
declare enum ItemAvailabilityStatus {
|
|
586
|
+
export declare enum ItemAvailabilityStatus {
|
|
676
587
|
AVAILABLE = "AVAILABLE",
|
|
677
588
|
/** Item does not exist. */
|
|
678
589
|
NOT_FOUND = "NOT_FOUND",
|
|
@@ -681,7 +592,7 @@ declare enum ItemAvailabilityStatus {
|
|
|
681
592
|
/** Available quantity is less than requested. */
|
|
682
593
|
PARTIALLY_AVAILABLE = "PARTIALLY_AVAILABLE"
|
|
683
594
|
}
|
|
684
|
-
interface PhysicalProperties {
|
|
595
|
+
export interface PhysicalProperties {
|
|
685
596
|
/** Line item weight. Measurement unit (`"KG"` or `"LB"`) is taken from `order.weightUnit`. */
|
|
686
597
|
weight?: number | null;
|
|
687
598
|
/**
|
|
@@ -692,39 +603,39 @@ interface PhysicalProperties {
|
|
|
692
603
|
/** Whether this line item is shippable. */
|
|
693
604
|
shippable?: boolean;
|
|
694
605
|
}
|
|
695
|
-
interface Scope {
|
|
606
|
+
export interface Scope {
|
|
696
607
|
/** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
|
|
697
608
|
namespace?: string;
|
|
698
609
|
/** Coupon scope's applied group (e.g., event or ticket in Wix Events) */
|
|
699
610
|
group?: Group;
|
|
700
611
|
}
|
|
701
|
-
interface Group {
|
|
612
|
+
export interface Group {
|
|
702
613
|
/** Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */
|
|
703
614
|
name?: string;
|
|
704
615
|
/** Item ID (when the coupon scope is limited to just one item). */
|
|
705
616
|
entityId?: string | null;
|
|
706
617
|
}
|
|
707
|
-
interface ItemType extends ItemTypeItemTypeDataOneOf {
|
|
618
|
+
export interface ItemType extends ItemTypeItemTypeDataOneOf {
|
|
708
619
|
/** Preset item type. */
|
|
709
620
|
preset?: ItemTypeItemType;
|
|
710
621
|
/** Custom item type. When none of the preset types are suitable, specifies the custom type. */
|
|
711
622
|
custom?: string;
|
|
712
623
|
}
|
|
713
624
|
/** @oneof */
|
|
714
|
-
interface ItemTypeItemTypeDataOneOf {
|
|
625
|
+
export interface ItemTypeItemTypeDataOneOf {
|
|
715
626
|
/** Preset item type. */
|
|
716
627
|
preset?: ItemTypeItemType;
|
|
717
628
|
/** Custom item type. When none of the preset types are suitable, specifies the custom type. */
|
|
718
629
|
custom?: string;
|
|
719
630
|
}
|
|
720
|
-
declare enum ItemTypeItemType {
|
|
631
|
+
export declare enum ItemTypeItemType {
|
|
721
632
|
UNRECOGNISED = "UNRECOGNISED",
|
|
722
633
|
PHYSICAL = "PHYSICAL",
|
|
723
634
|
DIGITAL = "DIGITAL",
|
|
724
635
|
GIFT_CARD = "GIFT_CARD",
|
|
725
636
|
SERVICE = "SERVICE"
|
|
726
637
|
}
|
|
727
|
-
interface SubscriptionOptionInfo {
|
|
638
|
+
export interface SubscriptionOptionInfo {
|
|
728
639
|
/** Subscription option settings. */
|
|
729
640
|
subscriptionSettings?: SubscriptionSettings;
|
|
730
641
|
/** Subscription option title. */
|
|
@@ -732,7 +643,7 @@ interface SubscriptionOptionInfo {
|
|
|
732
643
|
/** Subscription option description. */
|
|
733
644
|
description?: Description;
|
|
734
645
|
}
|
|
735
|
-
interface SubscriptionSettings {
|
|
646
|
+
export interface SubscriptionSettings {
|
|
736
647
|
/** Frequency of recurring payment. */
|
|
737
648
|
frequency?: SubscriptionFrequency;
|
|
738
649
|
/**
|
|
@@ -751,32 +662,16 @@ interface SubscriptionSettings {
|
|
|
751
662
|
* @min 1
|
|
752
663
|
*/
|
|
753
664
|
billingCycles?: number | null;
|
|
754
|
-
/**
|
|
755
|
-
* Whether to allow the customer to cancel the subscription..
|
|
756
|
-
* @internal
|
|
757
|
-
*/
|
|
758
|
-
enableCustomerCancellation?: boolean;
|
|
759
|
-
/**
|
|
760
|
-
* Period until first cycle starts. If applied payNow will be 0
|
|
761
|
-
* If None => no free trial
|
|
762
|
-
* @internal
|
|
763
|
-
*/
|
|
764
|
-
freeTrialPeriod?: FreeTrialPeriod;
|
|
765
|
-
/**
|
|
766
|
-
* The date the subscription will start. The subscription will be charged either now or according to freeTrialDays.
|
|
767
|
-
* @internal
|
|
768
|
-
*/
|
|
769
|
-
startDate?: Date | null;
|
|
770
665
|
}
|
|
771
666
|
/** Frequency unit of recurring payment */
|
|
772
|
-
declare enum SubscriptionFrequency {
|
|
667
|
+
export declare enum SubscriptionFrequency {
|
|
773
668
|
UNDEFINED = "UNDEFINED",
|
|
774
669
|
DAY = "DAY",
|
|
775
670
|
WEEK = "WEEK",
|
|
776
671
|
MONTH = "MONTH",
|
|
777
672
|
YEAR = "YEAR"
|
|
778
673
|
}
|
|
779
|
-
interface FreeTrialPeriod {
|
|
674
|
+
export interface FreeTrialPeriod {
|
|
780
675
|
/** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */
|
|
781
676
|
frequency?: SubscriptionFrequency;
|
|
782
677
|
/**
|
|
@@ -786,7 +681,7 @@ interface FreeTrialPeriod {
|
|
|
786
681
|
*/
|
|
787
682
|
interval?: number;
|
|
788
683
|
}
|
|
789
|
-
interface Title {
|
|
684
|
+
export interface Title {
|
|
790
685
|
/**
|
|
791
686
|
* Subscription option name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
|
|
792
687
|
* @minLength 1
|
|
@@ -802,7 +697,7 @@ interface Title {
|
|
|
802
697
|
*/
|
|
803
698
|
translated?: string | null;
|
|
804
699
|
}
|
|
805
|
-
interface Description {
|
|
700
|
+
export interface Description {
|
|
806
701
|
/**
|
|
807
702
|
* Subscription option description.
|
|
808
703
|
* @maxLength 500
|
|
@@ -814,7 +709,7 @@ interface Description {
|
|
|
814
709
|
*/
|
|
815
710
|
translated?: string | null;
|
|
816
711
|
}
|
|
817
|
-
interface SecuredMedia {
|
|
712
|
+
export interface SecuredMedia {
|
|
818
713
|
/**
|
|
819
714
|
* Media ID in Wix Media Manager.
|
|
820
715
|
* @minLength 1
|
|
@@ -830,7 +725,7 @@ interface SecuredMedia {
|
|
|
830
725
|
/** File type. */
|
|
831
726
|
fileType?: FileType;
|
|
832
727
|
}
|
|
833
|
-
declare enum FileType {
|
|
728
|
+
export declare enum FileType {
|
|
834
729
|
UNSPECIFIED = "UNSPECIFIED",
|
|
835
730
|
SECURE_PICTURE = "SECURE_PICTURE",
|
|
836
731
|
SECURE_VIDEO = "SECURE_VIDEO",
|
|
@@ -839,7 +734,7 @@ declare enum FileType {
|
|
|
839
734
|
SECURE_ARCHIVE = "SECURE_ARCHIVE"
|
|
840
735
|
}
|
|
841
736
|
/** Type of selected payment option for catalog item */
|
|
842
|
-
declare enum PaymentOptionType {
|
|
737
|
+
export declare enum PaymentOptionType {
|
|
843
738
|
/** The entire payment for this item happens as part of the checkout. */
|
|
844
739
|
FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE",
|
|
845
740
|
/** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */
|
|
@@ -851,7 +746,7 @@ declare enum PaymentOptionType {
|
|
|
851
746
|
/** Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */
|
|
852
747
|
MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE"
|
|
853
748
|
}
|
|
854
|
-
interface ServiceProperties {
|
|
749
|
+
export interface ServiceProperties {
|
|
855
750
|
/**
|
|
856
751
|
* Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
|
|
857
752
|
* For example, the start time of a class.
|
|
@@ -864,7 +759,7 @@ interface ServiceProperties {
|
|
|
864
759
|
*/
|
|
865
760
|
numberOfParticipants?: number | null;
|
|
866
761
|
}
|
|
867
|
-
interface PriceDescription {
|
|
762
|
+
export interface PriceDescription {
|
|
868
763
|
/**
|
|
869
764
|
* __Required.__ Price description in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
|
|
870
765
|
* @minLength 1
|
|
@@ -880,7 +775,7 @@ interface PriceDescription {
|
|
|
880
775
|
*/
|
|
881
776
|
translated?: string | null;
|
|
882
777
|
}
|
|
883
|
-
interface CatalogOverrideFields {
|
|
778
|
+
export interface CatalogOverrideFields {
|
|
884
779
|
/** Item name. */
|
|
885
780
|
productName?: ProductName;
|
|
886
781
|
/**
|
|
@@ -917,7 +812,7 @@ interface CatalogOverrideFields {
|
|
|
917
812
|
*/
|
|
918
813
|
savePaymentMethod?: boolean | null;
|
|
919
814
|
}
|
|
920
|
-
interface PaymentOption {
|
|
815
|
+
export interface PaymentOption {
|
|
921
816
|
/**
|
|
922
817
|
* Type of selected payment option for current item.
|
|
923
818
|
*
|
|
@@ -925,22 +820,22 @@ interface PaymentOption {
|
|
|
925
820
|
*/
|
|
926
821
|
value?: PaymentOptionType;
|
|
927
822
|
}
|
|
928
|
-
interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {
|
|
823
|
+
export interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {
|
|
929
824
|
/** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
|
|
930
825
|
addressType?: TaxableAddressType;
|
|
931
826
|
}
|
|
932
827
|
/** @oneof */
|
|
933
|
-
interface TaxableAddressTaxableAddressDataOneOf {
|
|
828
|
+
export interface TaxableAddressTaxableAddressDataOneOf {
|
|
934
829
|
/** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
|
|
935
830
|
addressType?: TaxableAddressType;
|
|
936
831
|
}
|
|
937
|
-
declare enum TaxableAddressType {
|
|
832
|
+
export declare enum TaxableAddressType {
|
|
938
833
|
UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS",
|
|
939
834
|
BUSINESS = "BUSINESS",
|
|
940
835
|
BILLING = "BILLING",
|
|
941
836
|
SHIPPING = "SHIPPING"
|
|
942
837
|
}
|
|
943
|
-
interface ExtendedFields {
|
|
838
|
+
export interface ExtendedFields {
|
|
944
839
|
/**
|
|
945
840
|
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
946
841
|
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
@@ -951,7 +846,7 @@ interface ExtendedFields {
|
|
|
951
846
|
*/
|
|
952
847
|
namespaces?: Record<string, Record<string, any>>;
|
|
953
848
|
}
|
|
954
|
-
interface Policy {
|
|
849
|
+
export interface Policy {
|
|
955
850
|
/**
|
|
956
851
|
* Policy title - should be translated
|
|
957
852
|
* @minLength 1
|
|
@@ -965,7 +860,7 @@ interface Policy {
|
|
|
965
860
|
*/
|
|
966
861
|
content?: string;
|
|
967
862
|
}
|
|
968
|
-
interface ModifierGroup {
|
|
863
|
+
export interface ModifierGroup {
|
|
969
864
|
/**
|
|
970
865
|
* Modifier group id.
|
|
971
866
|
* @minLength 1
|
|
@@ -981,7 +876,7 @@ interface ModifierGroup {
|
|
|
981
876
|
*/
|
|
982
877
|
modifiers?: ItemModifier[];
|
|
983
878
|
}
|
|
984
|
-
interface TranslatableString {
|
|
879
|
+
export interface TranslatableString {
|
|
985
880
|
/**
|
|
986
881
|
* __Required.__ String in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
|
|
987
882
|
*
|
|
@@ -1002,7 +897,7 @@ interface TranslatableString {
|
|
|
1002
897
|
*/
|
|
1003
898
|
translated?: string | null;
|
|
1004
899
|
}
|
|
1005
|
-
interface ItemModifier {
|
|
900
|
+
export interface ItemModifier {
|
|
1006
901
|
/**
|
|
1007
902
|
* Modifier ID.
|
|
1008
903
|
* @minLength 1
|
|
@@ -1023,14 +918,14 @@ interface ItemModifier {
|
|
|
1023
918
|
price?: MultiCurrencyPrice;
|
|
1024
919
|
}
|
|
1025
920
|
/** Billing Info and shipping details */
|
|
1026
|
-
interface AddressWithContact {
|
|
921
|
+
export interface AddressWithContact {
|
|
1027
922
|
/** Address. */
|
|
1028
923
|
address?: ApiAddress;
|
|
1029
924
|
/** Contact details. */
|
|
1030
925
|
contactDetails?: FullAddressContactDetails;
|
|
1031
926
|
}
|
|
1032
927
|
/** Physical address */
|
|
1033
|
-
interface ApiAddress {
|
|
928
|
+
export interface ApiAddress {
|
|
1034
929
|
/**
|
|
1035
930
|
* Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
|
|
1036
931
|
* @format COUNTRY
|
|
@@ -1074,20 +969,20 @@ interface ApiAddress {
|
|
|
1074
969
|
*/
|
|
1075
970
|
subdivisionFullname?: string | null;
|
|
1076
971
|
}
|
|
1077
|
-
interface StreetAddress {
|
|
972
|
+
export interface StreetAddress {
|
|
1078
973
|
/** Street number. */
|
|
1079
974
|
number?: string;
|
|
1080
975
|
/** Street name. */
|
|
1081
976
|
name?: string;
|
|
1082
977
|
}
|
|
1083
|
-
interface AddressLocation {
|
|
978
|
+
export interface AddressLocation {
|
|
1084
979
|
/** Address latitude. */
|
|
1085
980
|
latitude?: number | null;
|
|
1086
981
|
/** Address longitude. */
|
|
1087
982
|
longitude?: number | null;
|
|
1088
983
|
}
|
|
1089
984
|
/** Full contact details for an address */
|
|
1090
|
-
interface FullAddressContactDetails {
|
|
985
|
+
export interface FullAddressContactDetails {
|
|
1091
986
|
/**
|
|
1092
987
|
* First name.
|
|
1093
988
|
* @maxLength 100
|
|
@@ -1111,7 +1006,7 @@ interface FullAddressContactDetails {
|
|
|
1111
1006
|
/** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
|
|
1112
1007
|
vatId?: CommonVatId;
|
|
1113
1008
|
}
|
|
1114
|
-
interface CommonVatId {
|
|
1009
|
+
export interface CommonVatId {
|
|
1115
1010
|
/** Customer's tax ID. */
|
|
1116
1011
|
_id?: string;
|
|
1117
1012
|
/**
|
|
@@ -1124,14 +1019,14 @@ interface CommonVatId {
|
|
|
1124
1019
|
type?: CommonVatType;
|
|
1125
1020
|
}
|
|
1126
1021
|
/** tax info types */
|
|
1127
|
-
declare enum CommonVatType {
|
|
1022
|
+
export declare enum CommonVatType {
|
|
1128
1023
|
UNSPECIFIED = "UNSPECIFIED",
|
|
1129
1024
|
/** CPF - for individual tax payers. */
|
|
1130
1025
|
CPF = "CPF",
|
|
1131
1026
|
/** CNPJ - for corporations */
|
|
1132
1027
|
CNPJ = "CNPJ"
|
|
1133
1028
|
}
|
|
1134
|
-
interface ShippingInfo {
|
|
1029
|
+
export interface ShippingInfo {
|
|
1135
1030
|
/** Shipping address and contact details. */
|
|
1136
1031
|
shippingDestination?: AddressWithContact;
|
|
1137
1032
|
/** Selected option out of the options allowed for the `region`. */
|
|
@@ -1147,7 +1042,7 @@ interface ShippingInfo {
|
|
|
1147
1042
|
*/
|
|
1148
1043
|
carrierServiceOptions?: CarrierServiceOption[];
|
|
1149
1044
|
}
|
|
1150
|
-
interface SelectedCarrierServiceOption {
|
|
1045
|
+
export interface SelectedCarrierServiceOption {
|
|
1151
1046
|
/**
|
|
1152
1047
|
* Unique identifier of selected option. For example, "usps_std_overnight".
|
|
1153
1048
|
* @maxLength 100
|
|
@@ -1175,7 +1070,12 @@ interface SelectedCarrierServiceOption {
|
|
|
1175
1070
|
* @readonly
|
|
1176
1071
|
*/
|
|
1177
1072
|
requestedShippingOption?: boolean;
|
|
1178
|
-
/**
|
|
1073
|
+
/**
|
|
1074
|
+
* Other charges
|
|
1075
|
+
* @deprecated Other charges
|
|
1076
|
+
* @replacedBy additional_fees
|
|
1077
|
+
* @targetRemovalDate 2025-10-01
|
|
1078
|
+
*/
|
|
1179
1079
|
otherCharges?: SelectedCarrierServiceOptionOtherCharge[];
|
|
1180
1080
|
/**
|
|
1181
1081
|
* This carrier's unique ID
|
|
@@ -1190,7 +1090,7 @@ interface SelectedCarrierServiceOption {
|
|
|
1190
1090
|
/** If the delivery solution is a partial and doesn't apply to all items. */
|
|
1191
1091
|
partial?: boolean | null;
|
|
1192
1092
|
}
|
|
1193
|
-
interface DeliveryLogistics {
|
|
1093
|
+
export interface DeliveryLogistics {
|
|
1194
1094
|
/**
|
|
1195
1095
|
* Expected delivery time, in free text. For example, "3-5 business days".
|
|
1196
1096
|
* @maxLength 500
|
|
@@ -1204,7 +1104,7 @@ interface DeliveryLogistics {
|
|
|
1204
1104
|
/** Pickup details. */
|
|
1205
1105
|
pickupDetails?: PickupDetails;
|
|
1206
1106
|
}
|
|
1207
|
-
interface PickupDetails {
|
|
1107
|
+
export interface PickupDetails {
|
|
1208
1108
|
/** Pickup address. */
|
|
1209
1109
|
address?: ApiAddress;
|
|
1210
1110
|
/**
|
|
@@ -1215,18 +1115,18 @@ interface PickupDetails {
|
|
|
1215
1115
|
/** Pickup method */
|
|
1216
1116
|
pickupMethod?: PickupMethod;
|
|
1217
1117
|
}
|
|
1218
|
-
declare enum PickupMethod {
|
|
1118
|
+
export declare enum PickupMethod {
|
|
1219
1119
|
UNKNOWN_METHOD = "UNKNOWN_METHOD",
|
|
1220
1120
|
STORE_PICKUP = "STORE_PICKUP",
|
|
1221
1121
|
PICKUP_POINT = "PICKUP_POINT"
|
|
1222
1122
|
}
|
|
1223
|
-
interface DeliveryTimeSlot {
|
|
1123
|
+
export interface DeliveryTimeSlot {
|
|
1224
1124
|
/** starting time of the delivery time slot */
|
|
1225
1125
|
from?: Date | null;
|
|
1226
1126
|
/** ending time of the delivery time slot */
|
|
1227
1127
|
to?: Date | null;
|
|
1228
1128
|
}
|
|
1229
|
-
interface SelectedCarrierServiceOptionPrices {
|
|
1129
|
+
export interface SelectedCarrierServiceOptionPrices {
|
|
1230
1130
|
/** Total shipping price, after discount and after tax. */
|
|
1231
1131
|
totalPriceAfterTax?: MultiCurrencyPrice;
|
|
1232
1132
|
/** Total price of shipping after discounts (when relevant), and before tax. */
|
|
@@ -1238,7 +1138,7 @@ interface SelectedCarrierServiceOptionPrices {
|
|
|
1238
1138
|
/** Shipping price before discount and before tax. */
|
|
1239
1139
|
price?: MultiCurrencyPrice;
|
|
1240
1140
|
}
|
|
1241
|
-
interface SelectedCarrierServiceOptionOtherCharge {
|
|
1141
|
+
export interface SelectedCarrierServiceOptionOtherCharge {
|
|
1242
1142
|
/** Type of additional cost. */
|
|
1243
1143
|
type?: ChargeType;
|
|
1244
1144
|
/**
|
|
@@ -1249,11 +1149,11 @@ interface SelectedCarrierServiceOptionOtherCharge {
|
|
|
1249
1149
|
/** Price of added charge. */
|
|
1250
1150
|
cost?: SelectedCarrierServiceOptionPrices;
|
|
1251
1151
|
}
|
|
1252
|
-
declare enum ChargeType {
|
|
1152
|
+
export declare enum ChargeType {
|
|
1253
1153
|
HANDLING_FEE = "HANDLING_FEE",
|
|
1254
1154
|
INSURANCE = "INSURANCE"
|
|
1255
1155
|
}
|
|
1256
|
-
interface DeliveryAllocation {
|
|
1156
|
+
export interface DeliveryAllocation {
|
|
1257
1157
|
/** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */
|
|
1258
1158
|
deliveryCarrier?: Carrier;
|
|
1259
1159
|
/** The delivery region that are relevant for this delivery solution. */
|
|
@@ -1261,7 +1161,7 @@ interface DeliveryAllocation {
|
|
|
1261
1161
|
/** Populated if the delivery solution is a partially supplied by this carrier. */
|
|
1262
1162
|
applicableLineItems?: ApplicableLineItems;
|
|
1263
1163
|
}
|
|
1264
|
-
interface Carrier {
|
|
1164
|
+
export interface Carrier {
|
|
1265
1165
|
/**
|
|
1266
1166
|
* The carrier app id
|
|
1267
1167
|
* @format GUID
|
|
@@ -1273,7 +1173,7 @@ interface Carrier {
|
|
|
1273
1173
|
*/
|
|
1274
1174
|
code?: string;
|
|
1275
1175
|
}
|
|
1276
|
-
interface Region {
|
|
1176
|
+
export interface Region {
|
|
1277
1177
|
/**
|
|
1278
1178
|
* The delivery region id.
|
|
1279
1179
|
* @format GUID
|
|
@@ -1285,7 +1185,7 @@ interface Region {
|
|
|
1285
1185
|
*/
|
|
1286
1186
|
name?: string | null;
|
|
1287
1187
|
}
|
|
1288
|
-
interface ApplicableLineItems {
|
|
1188
|
+
export interface ApplicableLineItems {
|
|
1289
1189
|
/**
|
|
1290
1190
|
* Line items that the delivery solution is for.
|
|
1291
1191
|
* @maxSize 300
|
|
@@ -1294,7 +1194,7 @@ interface ApplicableLineItems {
|
|
|
1294
1194
|
*/
|
|
1295
1195
|
lineItemIds?: string[];
|
|
1296
1196
|
}
|
|
1297
|
-
interface ShippingRegion {
|
|
1197
|
+
export interface ShippingRegion {
|
|
1298
1198
|
/**
|
|
1299
1199
|
* Shipping region ID.
|
|
1300
1200
|
* @format GUID
|
|
@@ -1307,7 +1207,7 @@ interface ShippingRegion {
|
|
|
1307
1207
|
*/
|
|
1308
1208
|
name?: string;
|
|
1309
1209
|
}
|
|
1310
|
-
interface CarrierServiceOption {
|
|
1210
|
+
export interface CarrierServiceOption {
|
|
1311
1211
|
/**
|
|
1312
1212
|
* Carrier ID.
|
|
1313
1213
|
* @format GUID
|
|
@@ -1316,7 +1216,7 @@ interface CarrierServiceOption {
|
|
|
1316
1216
|
/** Shipping options offered by this carrier for this request. */
|
|
1317
1217
|
shippingOptions?: ShippingOption[];
|
|
1318
1218
|
}
|
|
1319
|
-
interface ShippingOption {
|
|
1219
|
+
export interface ShippingOption {
|
|
1320
1220
|
/**
|
|
1321
1221
|
* Unique code of provided shipping option like "usps_std_overnight".
|
|
1322
1222
|
* For legacy calculators this would be the UUID of the option.
|
|
@@ -1341,19 +1241,24 @@ interface ShippingOption {
|
|
|
1341
1241
|
/** If the delivery solution is a partial and doesn't apply to all items. */
|
|
1342
1242
|
partial?: boolean | null;
|
|
1343
1243
|
}
|
|
1344
|
-
interface ShippingPrice {
|
|
1244
|
+
export interface ShippingPrice {
|
|
1345
1245
|
/** Shipping price. */
|
|
1346
1246
|
price?: MultiCurrencyPrice;
|
|
1347
1247
|
/** Other costs such as insurance, handling & packaging for fragile items, etc. */
|
|
1348
1248
|
otherCharges?: OtherCharge[];
|
|
1349
1249
|
}
|
|
1350
|
-
interface OtherCharge {
|
|
1250
|
+
export interface OtherCharge {
|
|
1351
1251
|
/** Type of additional cost. */
|
|
1352
1252
|
type?: ChargeType;
|
|
1353
1253
|
/** Price of added cost. */
|
|
1354
1254
|
price?: MultiCurrencyPrice;
|
|
1255
|
+
/**
|
|
1256
|
+
* Description of the additional charge. For example, `"Handling fee of $5 applied for gift wrapping"`.
|
|
1257
|
+
* @maxLength 250
|
|
1258
|
+
*/
|
|
1259
|
+
details?: string | null;
|
|
1355
1260
|
}
|
|
1356
|
-
interface BuyerInfo extends BuyerInfoIdOneOf {
|
|
1261
|
+
export interface BuyerInfo extends BuyerInfoIdOneOf {
|
|
1357
1262
|
/**
|
|
1358
1263
|
* Visitor ID - if the buyer is **not** a site member.
|
|
1359
1264
|
* @format GUID
|
|
@@ -1379,7 +1284,7 @@ interface BuyerInfo extends BuyerInfoIdOneOf {
|
|
|
1379
1284
|
email?: string | null;
|
|
1380
1285
|
}
|
|
1381
1286
|
/** @oneof */
|
|
1382
|
-
interface BuyerInfoIdOneOf {
|
|
1287
|
+
export interface BuyerInfoIdOneOf {
|
|
1383
1288
|
/**
|
|
1384
1289
|
* Visitor ID - if the buyer is **not** a site member.
|
|
1385
1290
|
* @format GUID
|
|
@@ -1393,7 +1298,7 @@ interface BuyerInfoIdOneOf {
|
|
|
1393
1298
|
*/
|
|
1394
1299
|
memberId?: string;
|
|
1395
1300
|
}
|
|
1396
|
-
interface PriceSummary {
|
|
1301
|
+
export interface PriceSummary {
|
|
1397
1302
|
/** Subtotal of all line items, before discounts and before tax. */
|
|
1398
1303
|
subtotal?: MultiCurrencyPrice;
|
|
1399
1304
|
/** Total shipping price, before discounts and before tax. */
|
|
@@ -1407,7 +1312,7 @@ interface PriceSummary {
|
|
|
1407
1312
|
/** Total additional fees price before tax. */
|
|
1408
1313
|
additionalFees?: MultiCurrencyPrice;
|
|
1409
1314
|
}
|
|
1410
|
-
interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
|
|
1315
|
+
export interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
|
|
1411
1316
|
/** General shipping calculation error. */
|
|
1412
1317
|
generalShippingCalculationError?: Details;
|
|
1413
1318
|
/** Carrier errors. */
|
|
@@ -1429,13 +1334,13 @@ interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOne
|
|
|
1429
1334
|
discountsCalculationError?: Details;
|
|
1430
1335
|
}
|
|
1431
1336
|
/** @oneof */
|
|
1432
|
-
interface CalculationErrorsShippingCalculationErrorOneOf {
|
|
1337
|
+
export interface CalculationErrorsShippingCalculationErrorOneOf {
|
|
1433
1338
|
/** General shipping calculation error. */
|
|
1434
1339
|
generalShippingCalculationError?: Details;
|
|
1435
1340
|
/** Carrier errors. */
|
|
1436
1341
|
carrierErrors?: CarrierErrors;
|
|
1437
1342
|
}
|
|
1438
|
-
interface Details extends DetailsKindOneOf {
|
|
1343
|
+
export interface Details extends DetailsKindOneOf {
|
|
1439
1344
|
applicationError?: ApplicationError;
|
|
1440
1345
|
validationError?: ValidationError;
|
|
1441
1346
|
systemError?: SystemError;
|
|
@@ -1446,12 +1351,12 @@ interface Details extends DetailsKindOneOf {
|
|
|
1446
1351
|
tracing?: Record<string, string>;
|
|
1447
1352
|
}
|
|
1448
1353
|
/** @oneof */
|
|
1449
|
-
interface DetailsKindOneOf {
|
|
1354
|
+
export interface DetailsKindOneOf {
|
|
1450
1355
|
applicationError?: ApplicationError;
|
|
1451
1356
|
validationError?: ValidationError;
|
|
1452
1357
|
systemError?: SystemError;
|
|
1453
1358
|
}
|
|
1454
|
-
interface ApplicationError {
|
|
1359
|
+
export interface ApplicationError {
|
|
1455
1360
|
/** Error code. */
|
|
1456
1361
|
code?: string;
|
|
1457
1362
|
/** Description of the error. */
|
|
@@ -1491,10 +1396,10 @@ interface ApplicationError {
|
|
|
1491
1396
|
* ]
|
|
1492
1397
|
* }
|
|
1493
1398
|
*/
|
|
1494
|
-
interface ValidationError {
|
|
1399
|
+
export interface ValidationError {
|
|
1495
1400
|
fieldViolations?: FieldViolation[];
|
|
1496
1401
|
}
|
|
1497
|
-
declare enum RuleType {
|
|
1402
|
+
export declare enum RuleType {
|
|
1498
1403
|
VALIDATION = "VALIDATION",
|
|
1499
1404
|
OTHER = "OTHER",
|
|
1500
1405
|
MAX = "MAX",
|
|
@@ -1517,7 +1422,7 @@ declare enum RuleType {
|
|
|
1517
1422
|
EXACT_SIZE = "EXACT_SIZE",
|
|
1518
1423
|
REQUIRED_ONE_OF_FIELD = "REQUIRED_ONE_OF_FIELD"
|
|
1519
1424
|
}
|
|
1520
|
-
interface FieldViolation {
|
|
1425
|
+
export interface FieldViolation {
|
|
1521
1426
|
field?: string;
|
|
1522
1427
|
description?: string;
|
|
1523
1428
|
violatedRule?: RuleType;
|
|
@@ -1525,21 +1430,21 @@ interface FieldViolation {
|
|
|
1525
1430
|
ruleName?: string | null;
|
|
1526
1431
|
data?: Record<string, any> | null;
|
|
1527
1432
|
}
|
|
1528
|
-
interface SystemError {
|
|
1433
|
+
export interface SystemError {
|
|
1529
1434
|
/** Error code. */
|
|
1530
1435
|
errorCode?: string | null;
|
|
1531
1436
|
}
|
|
1532
|
-
interface CarrierErrors {
|
|
1437
|
+
export interface CarrierErrors {
|
|
1533
1438
|
/** Carrier errors. */
|
|
1534
1439
|
errors?: CarrierError[];
|
|
1535
1440
|
}
|
|
1536
|
-
interface CarrierError {
|
|
1441
|
+
export interface CarrierError {
|
|
1537
1442
|
/** Carrier ID. */
|
|
1538
1443
|
carrierId?: string;
|
|
1539
1444
|
/** Error details. */
|
|
1540
1445
|
error?: Details;
|
|
1541
1446
|
}
|
|
1542
|
-
interface GiftCard {
|
|
1447
|
+
export interface GiftCard {
|
|
1543
1448
|
/**
|
|
1544
1449
|
* Gift Card ID.
|
|
1545
1450
|
* @deprecated
|
|
@@ -1562,7 +1467,7 @@ interface GiftCard {
|
|
|
1562
1467
|
*/
|
|
1563
1468
|
externalId?: string | null;
|
|
1564
1469
|
}
|
|
1565
|
-
interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
1470
|
+
export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
1566
1471
|
/** Coupon details. */
|
|
1567
1472
|
coupon?: Coupon;
|
|
1568
1473
|
/** Merchant discount. */
|
|
@@ -1579,17 +1484,9 @@ interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
|
1579
1484
|
* @targetRemovalDate 2024-06-01
|
|
1580
1485
|
*/
|
|
1581
1486
|
lineItemIds?: string[];
|
|
1582
|
-
/**
|
|
1583
|
-
* Number of subscription cycle this discount applies to
|
|
1584
|
-
* default None - all billing cycle
|
|
1585
|
-
* @internal
|
|
1586
|
-
* @min 1
|
|
1587
|
-
* @max 999
|
|
1588
|
-
*/
|
|
1589
|
-
subscriptionCycles?: number | null;
|
|
1590
1487
|
}
|
|
1591
1488
|
/** @oneof */
|
|
1592
|
-
interface AppliedDiscountDiscountSourceOneOf {
|
|
1489
|
+
export interface AppliedDiscountDiscountSourceOneOf {
|
|
1593
1490
|
/** Coupon details. */
|
|
1594
1491
|
coupon?: Coupon;
|
|
1595
1492
|
/** Merchant discount. */
|
|
@@ -1597,13 +1494,13 @@ interface AppliedDiscountDiscountSourceOneOf {
|
|
|
1597
1494
|
/** Discount rule */
|
|
1598
1495
|
discountRule?: DiscountRule;
|
|
1599
1496
|
}
|
|
1600
|
-
declare enum DiscountType {
|
|
1497
|
+
export declare enum DiscountType {
|
|
1601
1498
|
GLOBAL = "GLOBAL",
|
|
1602
1499
|
SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
|
|
1603
1500
|
SHIPPING = "SHIPPING"
|
|
1604
1501
|
}
|
|
1605
1502
|
/** Coupon */
|
|
1606
|
-
interface Coupon {
|
|
1503
|
+
export interface Coupon {
|
|
1607
1504
|
/** Coupon ID. */
|
|
1608
1505
|
_id?: string;
|
|
1609
1506
|
/** Coupon code. */
|
|
@@ -1613,7 +1510,7 @@ interface Coupon {
|
|
|
1613
1510
|
/** Coupon name. */
|
|
1614
1511
|
name?: string;
|
|
1615
1512
|
}
|
|
1616
|
-
interface MerchantDiscount {
|
|
1513
|
+
export interface MerchantDiscount {
|
|
1617
1514
|
/** Discount value. */
|
|
1618
1515
|
amount?: MultiCurrencyPrice;
|
|
1619
1516
|
/**
|
|
@@ -1623,7 +1520,7 @@ interface MerchantDiscount {
|
|
|
1623
1520
|
*/
|
|
1624
1521
|
percentage?: number | null;
|
|
1625
1522
|
}
|
|
1626
|
-
interface DiscountRule {
|
|
1523
|
+
export interface DiscountRule {
|
|
1627
1524
|
/**
|
|
1628
1525
|
* Discount rule ID
|
|
1629
1526
|
* @format GUID
|
|
@@ -1634,7 +1531,7 @@ interface DiscountRule {
|
|
|
1634
1531
|
/** Discount value. */
|
|
1635
1532
|
amount?: MultiCurrencyPrice;
|
|
1636
1533
|
}
|
|
1637
|
-
interface DiscountRuleName {
|
|
1534
|
+
export interface DiscountRuleName {
|
|
1638
1535
|
/**
|
|
1639
1536
|
* Original discount rule name (in site's default language).
|
|
1640
1537
|
* @minLength 1
|
|
@@ -1648,7 +1545,7 @@ interface DiscountRuleName {
|
|
|
1648
1545
|
*/
|
|
1649
1546
|
translated?: string | null;
|
|
1650
1547
|
}
|
|
1651
|
-
interface LineItemDiscount {
|
|
1548
|
+
export interface LineItemDiscount {
|
|
1652
1549
|
/**
|
|
1653
1550
|
* ID of line item the discount applies to.
|
|
1654
1551
|
* @format GUID
|
|
@@ -1657,7 +1554,7 @@ interface LineItemDiscount {
|
|
|
1657
1554
|
/** Discount value. */
|
|
1658
1555
|
totalDiscountAmount?: MultiCurrencyPrice;
|
|
1659
1556
|
}
|
|
1660
|
-
interface CustomField {
|
|
1557
|
+
export interface CustomField {
|
|
1661
1558
|
/** Custom field value. */
|
|
1662
1559
|
value?: any;
|
|
1663
1560
|
/**
|
|
@@ -1673,7 +1570,7 @@ interface CustomField {
|
|
|
1673
1570
|
*/
|
|
1674
1571
|
translatedTitle?: string | null;
|
|
1675
1572
|
}
|
|
1676
|
-
declare enum WeightUnit {
|
|
1573
|
+
export declare enum WeightUnit {
|
|
1677
1574
|
/** Weight unit can't be classified due to an error. */
|
|
1678
1575
|
UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
|
|
1679
1576
|
/** Kilograms. */
|
|
@@ -1681,7 +1578,7 @@ declare enum WeightUnit {
|
|
|
1681
1578
|
/** Pounds. */
|
|
1682
1579
|
LB = "LB"
|
|
1683
1580
|
}
|
|
1684
|
-
interface TaxSummary {
|
|
1581
|
+
export interface TaxSummary {
|
|
1685
1582
|
/**
|
|
1686
1583
|
* Amount for which tax is calculated, added from line items.
|
|
1687
1584
|
* @readonly
|
|
@@ -1698,7 +1595,7 @@ interface TaxSummary {
|
|
|
1698
1595
|
*/
|
|
1699
1596
|
calculationDetails?: TaxCalculationDetails;
|
|
1700
1597
|
}
|
|
1701
|
-
interface TaxCalculationDetails extends TaxCalculationDetailsCalculationDetailsOneOf {
|
|
1598
|
+
export interface TaxCalculationDetails extends TaxCalculationDetailsCalculationDetailsOneOf {
|
|
1702
1599
|
/** Reason the manual calculation was used. */
|
|
1703
1600
|
manualRateReason?: ManualCalculationReason;
|
|
1704
1601
|
/** Details of the fallback rate calculation. */
|
|
@@ -1707,13 +1604,13 @@ interface TaxCalculationDetails extends TaxCalculationDetailsCalculationDetailsO
|
|
|
1707
1604
|
rateType?: RateType;
|
|
1708
1605
|
}
|
|
1709
1606
|
/** @oneof */
|
|
1710
|
-
interface TaxCalculationDetailsCalculationDetailsOneOf {
|
|
1607
|
+
export interface TaxCalculationDetailsCalculationDetailsOneOf {
|
|
1711
1608
|
/** Reason the manual calculation was used. */
|
|
1712
1609
|
manualRateReason?: ManualCalculationReason;
|
|
1713
1610
|
/** Details of the fallback rate calculation. */
|
|
1714
1611
|
autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;
|
|
1715
1612
|
}
|
|
1716
|
-
declare enum RateType {
|
|
1613
|
+
export declare enum RateType {
|
|
1717
1614
|
/** no tax being collected for this request due to location of purchase */
|
|
1718
1615
|
NO_TAX_COLLECTED = "NO_TAX_COLLECTED",
|
|
1719
1616
|
/** manual rate used for calculation */
|
|
@@ -1723,19 +1620,19 @@ declare enum RateType {
|
|
|
1723
1620
|
/** fallback rate used for calculation */
|
|
1724
1621
|
FALLBACK_RATE = "FALLBACK_RATE"
|
|
1725
1622
|
}
|
|
1726
|
-
declare enum ManualCalculationReason {
|
|
1623
|
+
export declare enum ManualCalculationReason {
|
|
1727
1624
|
/** user set calculator in Business Manager to be Manual */
|
|
1728
1625
|
GLOBAL_SETTING_TO_MANUAL = "GLOBAL_SETTING_TO_MANUAL",
|
|
1729
1626
|
/** specific region is on manual even though Global setting is Auto-tax */
|
|
1730
1627
|
REGION_SETTING_TO_MANUAL = "REGION_SETTING_TO_MANUAL"
|
|
1731
1628
|
}
|
|
1732
|
-
interface AutoTaxFallbackCalculationDetails {
|
|
1629
|
+
export interface AutoTaxFallbackCalculationDetails {
|
|
1733
1630
|
/** reason for fallback */
|
|
1734
1631
|
fallbackReason?: FallbackReason;
|
|
1735
1632
|
/** invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */
|
|
1736
1633
|
error?: ApplicationError;
|
|
1737
1634
|
}
|
|
1738
|
-
declare enum FallbackReason {
|
|
1635
|
+
export declare enum FallbackReason {
|
|
1739
1636
|
/** auto-tax failed to be calculated */
|
|
1740
1637
|
AUTO_TAX_FAILED = "AUTO_TAX_FAILED",
|
|
1741
1638
|
/** auto-tax was temporarily deactivated on a system-level */
|
|
@@ -1745,7 +1642,7 @@ declare enum FallbackReason {
|
|
|
1745
1642
|
* The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate.
|
|
1746
1643
|
* Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
|
|
1747
1644
|
*/
|
|
1748
|
-
interface AggregatedTaxBreakdown {
|
|
1645
|
+
export interface AggregatedTaxBreakdown {
|
|
1749
1646
|
/**
|
|
1750
1647
|
* The name of the tax against which this tax amount was calculated.
|
|
1751
1648
|
* @maxLength 200
|
|
@@ -1771,7 +1668,7 @@ interface AggregatedTaxBreakdown {
|
|
|
1771
1668
|
/** The sum of all the tax from line items that calculated by the tax identifiers. */
|
|
1772
1669
|
aggregatedTaxAmount?: MultiCurrencyPrice;
|
|
1773
1670
|
}
|
|
1774
|
-
declare enum ChannelType {
|
|
1671
|
+
export declare enum ChannelType {
|
|
1775
1672
|
/** Unspecified sales channel. This value is not supported. */
|
|
1776
1673
|
UNSPECIFIED = "UNSPECIFIED",
|
|
1777
1674
|
/** A web client. */
|
|
@@ -1805,7 +1702,7 @@ declare enum ChannelType {
|
|
|
1805
1702
|
/** [Faire marketplace integration](https://support.wix.com/en/article/wix-stores-creating-a-faire-store-using-the-faire-integration-app). */
|
|
1806
1703
|
FAIRE_COM = "FAIRE_COM"
|
|
1807
1704
|
}
|
|
1808
|
-
interface CreatedBy extends CreatedByIdOneOf {
|
|
1705
|
+
export interface CreatedBy extends CreatedByIdOneOf {
|
|
1809
1706
|
/**
|
|
1810
1707
|
* User ID. When the order was created by a Wix user on behalf of a buyer.
|
|
1811
1708
|
* For example, via POS (point of service).
|
|
@@ -1829,7 +1726,7 @@ interface CreatedBy extends CreatedByIdOneOf {
|
|
|
1829
1726
|
appId?: string;
|
|
1830
1727
|
}
|
|
1831
1728
|
/** @oneof */
|
|
1832
|
-
interface CreatedByIdOneOf {
|
|
1729
|
+
export interface CreatedByIdOneOf {
|
|
1833
1730
|
/**
|
|
1834
1731
|
* User ID. When the order was created by a Wix user on behalf of a buyer.
|
|
1835
1732
|
* For example, via POS (point of service).
|
|
@@ -1853,7 +1750,7 @@ interface CreatedByIdOneOf {
|
|
|
1853
1750
|
appId?: string;
|
|
1854
1751
|
}
|
|
1855
1752
|
/** Reserved for internal use. */
|
|
1856
|
-
interface MembershipOptions {
|
|
1753
|
+
export interface MembershipOptions {
|
|
1857
1754
|
/**
|
|
1858
1755
|
* Reserved for internal use.
|
|
1859
1756
|
* @readonly
|
|
@@ -1869,7 +1766,7 @@ interface MembershipOptions {
|
|
|
1869
1766
|
/** Selected membership to apply to this checkout. */
|
|
1870
1767
|
selectedMemberships?: SelectedMemberships;
|
|
1871
1768
|
}
|
|
1872
|
-
interface Membership {
|
|
1769
|
+
export interface Membership {
|
|
1873
1770
|
/**
|
|
1874
1771
|
* Membership ID.
|
|
1875
1772
|
* @minLength 1
|
|
@@ -1898,7 +1795,7 @@ interface Membership {
|
|
|
1898
1795
|
/** Additional data about this membership. */
|
|
1899
1796
|
additionalData?: Record<string, any> | null;
|
|
1900
1797
|
}
|
|
1901
|
-
interface MembershipName {
|
|
1798
|
+
export interface MembershipName {
|
|
1902
1799
|
/**
|
|
1903
1800
|
* Membership name.
|
|
1904
1801
|
* @maxLength 100
|
|
@@ -1910,7 +1807,7 @@ interface MembershipName {
|
|
|
1910
1807
|
*/
|
|
1911
1808
|
translated?: string | null;
|
|
1912
1809
|
}
|
|
1913
|
-
interface MembershipPaymentCredits {
|
|
1810
|
+
export interface MembershipPaymentCredits {
|
|
1914
1811
|
/**
|
|
1915
1812
|
* Membership's total amount of credits.
|
|
1916
1813
|
* @min 1
|
|
@@ -1919,7 +1816,7 @@ interface MembershipPaymentCredits {
|
|
|
1919
1816
|
/** Membership's remaining amount of credits. */
|
|
1920
1817
|
remaining?: number;
|
|
1921
1818
|
}
|
|
1922
|
-
interface InvalidMembership {
|
|
1819
|
+
export interface InvalidMembership {
|
|
1923
1820
|
/** Membership details. */
|
|
1924
1821
|
membership?: Membership;
|
|
1925
1822
|
/**
|
|
@@ -1929,14 +1826,14 @@ interface InvalidMembership {
|
|
|
1929
1826
|
*/
|
|
1930
1827
|
reason?: string;
|
|
1931
1828
|
}
|
|
1932
|
-
interface SelectedMemberships {
|
|
1829
|
+
export interface SelectedMemberships {
|
|
1933
1830
|
/**
|
|
1934
1831
|
* Selected memberships.
|
|
1935
1832
|
* @maxSize 300
|
|
1936
1833
|
*/
|
|
1937
1834
|
memberships?: SelectedMembership[];
|
|
1938
1835
|
}
|
|
1939
|
-
interface SelectedMembership {
|
|
1836
|
+
export interface SelectedMembership {
|
|
1940
1837
|
/**
|
|
1941
1838
|
* Membership ID.
|
|
1942
1839
|
* @minLength 1
|
|
@@ -1957,7 +1854,7 @@ interface SelectedMembership {
|
|
|
1957
1854
|
*/
|
|
1958
1855
|
lineItemIds?: string[];
|
|
1959
1856
|
}
|
|
1960
|
-
interface AdditionalFee {
|
|
1857
|
+
export interface AdditionalFee {
|
|
1961
1858
|
/**
|
|
1962
1859
|
* Additional fee's unique code (or ID) for future processing.
|
|
1963
1860
|
* @minLength 1
|
|
@@ -1990,27 +1887,21 @@ interface AdditionalFee {
|
|
|
1990
1887
|
* @format GUID
|
|
1991
1888
|
*/
|
|
1992
1889
|
lineItemIds?: string[];
|
|
1993
|
-
/**
|
|
1994
|
-
* Number of subscription cycle this fee applies to
|
|
1995
|
-
* default None - all billing cycle
|
|
1996
|
-
* @internal
|
|
1997
|
-
* @min 1
|
|
1998
|
-
* @max 999
|
|
1999
|
-
*/
|
|
2000
|
-
subscriptionCycles?: number | null;
|
|
2001
1890
|
/** the source the additional fee was added from */
|
|
2002
1891
|
source?: AdditionalFeeSource;
|
|
2003
1892
|
}
|
|
2004
|
-
declare enum AdditionalFeeSource {
|
|
1893
|
+
export declare enum AdditionalFeeSource {
|
|
2005
1894
|
UNKNOWN_ADDITIONAL_FEE_SOURCE = "UNKNOWN_ADDITIONAL_FEE_SOURCE",
|
|
2006
1895
|
/** The additional fee was added by an additional fee service plugin */
|
|
2007
1896
|
SERVICE_PLUGIN = "SERVICE_PLUGIN",
|
|
2008
1897
|
/** The additional fee was added on the item either via the catalog or on custom line item */
|
|
2009
1898
|
ITEM = "ITEM",
|
|
2010
1899
|
/** The additional fee was added manually on the request */
|
|
2011
|
-
MANUAL = "MANUAL"
|
|
1900
|
+
MANUAL = "MANUAL",
|
|
1901
|
+
/** The additional fee was added by the shipping provider */
|
|
1902
|
+
SHIPPING = "SHIPPING"
|
|
2012
1903
|
}
|
|
2013
|
-
interface ConversionInfo {
|
|
1904
|
+
export interface ConversionInfo {
|
|
2014
1905
|
/**
|
|
2015
1906
|
* The site currency.
|
|
2016
1907
|
* @readonly
|
|
@@ -2024,7 +1915,7 @@ interface ConversionInfo {
|
|
|
2024
1915
|
*/
|
|
2025
1916
|
conversionRate?: string;
|
|
2026
1917
|
}
|
|
2027
|
-
interface Violation {
|
|
1918
|
+
export interface Violation {
|
|
2028
1919
|
/** Severity of the violation. The violations are shown on the cart and checkout pages. A warning is displayed as yellow, and allows a site visitor to proceed with caution. An error is displayed as red, and doesn't allow a site visitor to proceed with the eCommerce flow. */
|
|
2029
1920
|
severity?: Severity;
|
|
2030
1921
|
/** Target location on a checkout or cart page where the violation will be displayed. */
|
|
@@ -2036,7 +1927,7 @@ interface Violation {
|
|
|
2036
1927
|
*/
|
|
2037
1928
|
description?: string | null;
|
|
2038
1929
|
}
|
|
2039
|
-
declare enum Severity {
|
|
1930
|
+
export declare enum Severity {
|
|
2040
1931
|
/** The user is allowed to move forward in the flow. */
|
|
2041
1932
|
WARNING = "WARNING",
|
|
2042
1933
|
/**
|
|
@@ -2045,53 +1936,48 @@ declare enum Severity {
|
|
|
2045
1936
|
*/
|
|
2046
1937
|
ERROR = "ERROR"
|
|
2047
1938
|
}
|
|
2048
|
-
interface Target extends TargetTargetTypeOneOf {
|
|
1939
|
+
export interface Target extends TargetTargetTypeOneOf {
|
|
2049
1940
|
/** General (other) violation. */
|
|
2050
1941
|
other?: Other;
|
|
2051
1942
|
/** Specific line item violation. */
|
|
2052
1943
|
lineItem?: TargetLineItem;
|
|
2053
1944
|
}
|
|
2054
1945
|
/** @oneof */
|
|
2055
|
-
interface TargetTargetTypeOneOf {
|
|
1946
|
+
export interface TargetTargetTypeOneOf {
|
|
2056
1947
|
/** General (other) violation. */
|
|
2057
1948
|
other?: Other;
|
|
2058
1949
|
/** Specific line item violation. */
|
|
2059
1950
|
lineItem?: TargetLineItem;
|
|
2060
1951
|
}
|
|
2061
1952
|
/** Available locations on the webpage */
|
|
2062
|
-
declare enum NameInOther {
|
|
1953
|
+
export declare enum NameInOther {
|
|
2063
1954
|
/** Default location, in case no specific location is specified. */
|
|
2064
1955
|
OTHER_DEFAULT = "OTHER_DEFAULT"
|
|
2065
1956
|
}
|
|
2066
1957
|
/** Available locations on the line item */
|
|
2067
|
-
declare enum NameInLineItem {
|
|
1958
|
+
export declare enum NameInLineItem {
|
|
2068
1959
|
/** Default location, in case no specific location is specified. */
|
|
2069
1960
|
LINE_ITEM_DEFAULT = "LINE_ITEM_DEFAULT"
|
|
2070
1961
|
}
|
|
2071
|
-
declare enum SuggestedFix {
|
|
1962
|
+
export declare enum SuggestedFix {
|
|
2072
1963
|
/** No suggested fix is specified. The user should refer to the violation description to resolve the issue. */
|
|
2073
1964
|
UNKNOWN_SUGGESTED_FIX = "UNKNOWN_SUGGESTED_FIX",
|
|
2074
1965
|
/** The line item should be removed from the cart or checkout to resolve the violation. */
|
|
2075
1966
|
REMOVE_LINE_ITEM = "REMOVE_LINE_ITEM"
|
|
2076
1967
|
}
|
|
2077
1968
|
/** General (other) violation. */
|
|
2078
|
-
interface Other {
|
|
1969
|
+
export interface Other {
|
|
2079
1970
|
/** Location on a checkout or a cart page where a general (other) violation will be displayed. */
|
|
2080
1971
|
name?: NameInOther;
|
|
2081
1972
|
}
|
|
2082
1973
|
/** Specific line item violation. */
|
|
2083
|
-
interface TargetLineItem {
|
|
1974
|
+
export interface TargetLineItem {
|
|
2084
1975
|
/** Location on a checkout or a cart page where the specific line item violation will be displayed. */
|
|
2085
1976
|
name?: NameInLineItem;
|
|
2086
1977
|
/** ID of the line item containing the violation. */
|
|
2087
1978
|
_id?: string | null;
|
|
2088
|
-
/**
|
|
2089
|
-
* Suggested fix for resolving the line item violation.
|
|
2090
|
-
* @internal
|
|
2091
|
-
*/
|
|
2092
|
-
suggestedFix?: SuggestedFix;
|
|
2093
1979
|
}
|
|
2094
|
-
interface CustomSettings {
|
|
1980
|
+
export interface CustomSettings {
|
|
2095
1981
|
/**
|
|
2096
1982
|
* Whether to restrict the option to add or remove a gift card on the checkout page.
|
|
2097
1983
|
*
|
|
@@ -2117,7 +2003,7 @@ interface CustomSettings {
|
|
|
2117
2003
|
*/
|
|
2118
2004
|
disabledManualPayment?: boolean;
|
|
2119
2005
|
}
|
|
2120
|
-
interface CustomContentReference {
|
|
2006
|
+
export interface CustomContentReference {
|
|
2121
2007
|
/**
|
|
2122
2008
|
* ID of the app providing the content.
|
|
2123
2009
|
*
|
|
@@ -2133,7 +2019,7 @@ interface CustomContentReference {
|
|
|
2133
2019
|
*/
|
|
2134
2020
|
componentId?: string;
|
|
2135
2021
|
}
|
|
2136
|
-
interface ExternalReference {
|
|
2022
|
+
export interface ExternalReference {
|
|
2137
2023
|
/**
|
|
2138
2024
|
* ID of the app associated with the purchase flow.
|
|
2139
2025
|
* For example, the Wix Pay Links app ID.
|
|
@@ -2150,7 +2036,7 @@ interface ExternalReference {
|
|
|
2150
2036
|
*/
|
|
2151
2037
|
resourceId?: string | null;
|
|
2152
2038
|
}
|
|
2153
|
-
interface SubscriptionCharges {
|
|
2039
|
+
export interface SubscriptionCharges {
|
|
2154
2040
|
/**
|
|
2155
2041
|
* ids of the items the subscription is defined on
|
|
2156
2042
|
* @format GUID
|
|
@@ -2170,7 +2056,7 @@ interface SubscriptionCharges {
|
|
|
2170
2056
|
*/
|
|
2171
2057
|
charges?: Charge[];
|
|
2172
2058
|
}
|
|
2173
|
-
interface Charge {
|
|
2059
|
+
export interface Charge {
|
|
2174
2060
|
/** The cycle number from which the charge starts. */
|
|
2175
2061
|
cycleFrom?: number;
|
|
2176
2062
|
/** The number of cycles for which the charge is applicable. */
|
|
@@ -2180,13 +2066,13 @@ interface Charge {
|
|
|
2180
2066
|
/** The billing date from which the charge starts. */
|
|
2181
2067
|
cycleBillingDate?: Date | null;
|
|
2182
2068
|
}
|
|
2183
|
-
interface UpdatedCheckoutMessage {
|
|
2069
|
+
export interface UpdatedCheckoutMessage {
|
|
2184
2070
|
/** Previous checkout. */
|
|
2185
2071
|
oldCheckout?: Checkout;
|
|
2186
2072
|
/** Updated checkout. */
|
|
2187
2073
|
updatedCheckout?: Checkout;
|
|
2188
2074
|
}
|
|
2189
|
-
interface CreateCheckoutRequest {
|
|
2075
|
+
export interface CreateCheckoutRequest {
|
|
2190
2076
|
/** Checkout information. */
|
|
2191
2077
|
checkoutInfo?: Checkout;
|
|
2192
2078
|
/** The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
|
|
@@ -2222,7 +2108,7 @@ interface CreateCheckoutRequest {
|
|
|
2222
2108
|
*/
|
|
2223
2109
|
overrideCheckoutUrl?: string | null;
|
|
2224
2110
|
}
|
|
2225
|
-
interface CustomLineItem {
|
|
2111
|
+
export interface CustomLineItem {
|
|
2226
2112
|
/**
|
|
2227
2113
|
* Custom line item quantity.
|
|
2228
2114
|
*
|
|
@@ -2321,20 +2207,6 @@ interface CustomLineItem {
|
|
|
2321
2207
|
deliveryProfileId?: string | null;
|
|
2322
2208
|
/** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */
|
|
2323
2209
|
catalogReference?: CatalogReference;
|
|
2324
|
-
/**
|
|
2325
|
-
* Whether the price is not yet defined, and will be updated after the order is created.
|
|
2326
|
-
*
|
|
2327
|
-
* Default: `false`
|
|
2328
|
-
* @internal
|
|
2329
|
-
*/
|
|
2330
|
-
priceUndetermined?: boolean;
|
|
2331
|
-
/**
|
|
2332
|
-
* Whether the line item quantity is fixed and cannot be changed.
|
|
2333
|
-
*
|
|
2334
|
-
* Default: `false`
|
|
2335
|
-
* @internal
|
|
2336
|
-
*/
|
|
2337
|
-
fixedQuantity?: boolean;
|
|
2338
2210
|
/**
|
|
2339
2211
|
* Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.
|
|
2340
2212
|
* @minLength 1
|
|
@@ -2349,32 +2221,8 @@ interface CustomLineItem {
|
|
|
2349
2221
|
* @readonly
|
|
2350
2222
|
*/
|
|
2351
2223
|
savePaymentMethod?: boolean;
|
|
2352
|
-
/**
|
|
2353
|
-
* Policies to be displayed to the customer on the checkout page.
|
|
2354
|
-
* @internal
|
|
2355
|
-
* @maxSize 5
|
|
2356
|
-
*/
|
|
2357
|
-
policies?: Policy[];
|
|
2358
|
-
/**
|
|
2359
|
-
* ID of the app managing the inventory.
|
|
2360
|
-
* @internal
|
|
2361
|
-
* @format GUID
|
|
2362
|
-
*/
|
|
2363
|
-
inventoryAppId?: string | null;
|
|
2364
|
-
/**
|
|
2365
|
-
* Whether the item can only be purchased by site members.
|
|
2366
|
-
*
|
|
2367
|
-
* Default: `false`
|
|
2368
|
-
* @internal
|
|
2369
|
-
*/
|
|
2370
|
-
membersOnly?: boolean;
|
|
2371
|
-
/**
|
|
2372
|
-
* Address to use for tax calculation purposes.
|
|
2373
|
-
* @internal
|
|
2374
|
-
*/
|
|
2375
|
-
taxableAddress?: TaxableAddress;
|
|
2376
2224
|
}
|
|
2377
|
-
interface MerchantDiscountInput {
|
|
2225
|
+
export interface MerchantDiscountInput {
|
|
2378
2226
|
/**
|
|
2379
2227
|
* Discount amount.
|
|
2380
2228
|
* @decimalValue options { gte:0 }
|
|
@@ -2387,75 +2235,75 @@ interface MerchantDiscountInput {
|
|
|
2387
2235
|
*/
|
|
2388
2236
|
lineItemIds?: string[];
|
|
2389
2237
|
}
|
|
2390
|
-
interface CreateCheckoutResponse {
|
|
2238
|
+
export interface CreateCheckoutResponse {
|
|
2391
2239
|
/** Newly created checkout. */
|
|
2392
2240
|
checkout?: Checkout;
|
|
2393
2241
|
}
|
|
2394
|
-
interface ShippingCalculationErrorData extends ShippingCalculationErrorDataShippingCalculationErrorOneOf {
|
|
2242
|
+
export interface ShippingCalculationErrorData extends ShippingCalculationErrorDataShippingCalculationErrorOneOf {
|
|
2395
2243
|
generalShippingCalculationError?: Details;
|
|
2396
2244
|
carrierErrors?: CarrierErrors;
|
|
2397
2245
|
}
|
|
2398
2246
|
/** @oneof */
|
|
2399
|
-
interface ShippingCalculationErrorDataShippingCalculationErrorOneOf {
|
|
2247
|
+
export interface ShippingCalculationErrorDataShippingCalculationErrorOneOf {
|
|
2400
2248
|
generalShippingCalculationError?: Details;
|
|
2401
2249
|
carrierErrors?: CarrierErrors;
|
|
2402
2250
|
}
|
|
2403
|
-
interface GetCheckoutRequest {
|
|
2251
|
+
export interface GetCheckoutRequest {
|
|
2404
2252
|
/**
|
|
2405
2253
|
* Checkout ID.
|
|
2406
2254
|
* @format GUID
|
|
2407
2255
|
*/
|
|
2408
2256
|
_id: string;
|
|
2409
2257
|
}
|
|
2410
|
-
interface GetCheckoutResponse {
|
|
2258
|
+
export interface GetCheckoutResponse {
|
|
2411
2259
|
/** Retrieved checkout. */
|
|
2412
2260
|
checkout?: Checkout;
|
|
2413
2261
|
}
|
|
2414
|
-
interface GetCheckoutWithAllExtendedFieldsRequest {
|
|
2262
|
+
export interface GetCheckoutWithAllExtendedFieldsRequest {
|
|
2415
2263
|
/**
|
|
2416
2264
|
* Checkout ID.
|
|
2417
2265
|
* @format GUID
|
|
2418
2266
|
*/
|
|
2419
2267
|
_id?: string;
|
|
2420
2268
|
}
|
|
2421
|
-
interface GetCheckoutWithAllExtendedFieldsResponse {
|
|
2269
|
+
export interface GetCheckoutWithAllExtendedFieldsResponse {
|
|
2422
2270
|
/** Retrieved checkout. */
|
|
2423
2271
|
checkout?: Checkout;
|
|
2424
2272
|
}
|
|
2425
|
-
interface GetCheckoutByCartIdRequest {
|
|
2273
|
+
export interface GetCheckoutByCartIdRequest {
|
|
2426
2274
|
/**
|
|
2427
2275
|
* Cart ID.
|
|
2428
2276
|
* @format GUID
|
|
2429
2277
|
*/
|
|
2430
2278
|
_id: string;
|
|
2431
2279
|
}
|
|
2432
|
-
interface GetCheckoutByCartIdResponse {
|
|
2280
|
+
export interface GetCheckoutByCartIdResponse {
|
|
2433
2281
|
/** Retrieved checkout. */
|
|
2434
2282
|
checkout?: Checkout;
|
|
2435
2283
|
}
|
|
2436
|
-
interface GetWixCheckoutURLRequest {
|
|
2284
|
+
export interface GetWixCheckoutURLRequest {
|
|
2437
2285
|
/**
|
|
2438
2286
|
* Checkout ID.
|
|
2439
2287
|
* @format GUID
|
|
2440
2288
|
*/
|
|
2441
2289
|
_id: string;
|
|
2442
2290
|
}
|
|
2443
|
-
interface GetWixCheckoutURLResponse {
|
|
2291
|
+
export interface GetWixCheckoutURLResponse {
|
|
2444
2292
|
/** Checkout URL. */
|
|
2445
2293
|
checkoutUrl?: string;
|
|
2446
2294
|
}
|
|
2447
|
-
interface GetCheckoutURLRequest {
|
|
2295
|
+
export interface GetCheckoutURLRequest {
|
|
2448
2296
|
/**
|
|
2449
2297
|
* Checkout ID.
|
|
2450
2298
|
* @format GUID
|
|
2451
2299
|
*/
|
|
2452
2300
|
_id: string;
|
|
2453
2301
|
}
|
|
2454
|
-
interface GetCheckoutURLResponse {
|
|
2302
|
+
export interface GetCheckoutURLResponse {
|
|
2455
2303
|
/** Checkout URL. */
|
|
2456
2304
|
checkoutUrl?: string;
|
|
2457
2305
|
}
|
|
2458
|
-
interface UpdateCheckoutRequest {
|
|
2306
|
+
export interface UpdateCheckoutRequest {
|
|
2459
2307
|
/** Checkout information. */
|
|
2460
2308
|
checkout: Checkout;
|
|
2461
2309
|
/** The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
|
|
@@ -2483,44 +2331,44 @@ interface UpdateCheckoutRequest {
|
|
|
2483
2331
|
*/
|
|
2484
2332
|
customLineItems?: CustomLineItem[];
|
|
2485
2333
|
}
|
|
2486
|
-
interface UpdateCheckoutResponse {
|
|
2334
|
+
export interface UpdateCheckoutResponse {
|
|
2487
2335
|
/** Updated checkout. */
|
|
2488
2336
|
checkout?: Checkout;
|
|
2489
2337
|
}
|
|
2490
|
-
interface RemoveCouponRequest {
|
|
2338
|
+
export interface RemoveCouponRequest {
|
|
2491
2339
|
/**
|
|
2492
2340
|
* ID of the checkout to remove the coupon from.
|
|
2493
2341
|
* @format GUID
|
|
2494
2342
|
*/
|
|
2495
2343
|
_id: string;
|
|
2496
2344
|
}
|
|
2497
|
-
interface RemoveCouponResponse {
|
|
2345
|
+
export interface RemoveCouponResponse {
|
|
2498
2346
|
/** Updated checkout after removal of coupon. */
|
|
2499
2347
|
checkout?: Checkout;
|
|
2500
2348
|
}
|
|
2501
|
-
interface RemoveGiftCardRequest {
|
|
2349
|
+
export interface RemoveGiftCardRequest {
|
|
2502
2350
|
/**
|
|
2503
2351
|
* ID of the checkout to remove the gift card from.
|
|
2504
2352
|
* @format GUID
|
|
2505
2353
|
*/
|
|
2506
2354
|
_id: string;
|
|
2507
2355
|
}
|
|
2508
|
-
interface RemoveGiftCardResponse {
|
|
2356
|
+
export interface RemoveGiftCardResponse {
|
|
2509
2357
|
/** Updated checkout after removal of gift card. */
|
|
2510
2358
|
checkout?: Checkout;
|
|
2511
2359
|
}
|
|
2512
|
-
interface RemoveOverrideCheckoutUrlRequest {
|
|
2360
|
+
export interface RemoveOverrideCheckoutUrlRequest {
|
|
2513
2361
|
/**
|
|
2514
2362
|
* ID of the checkout to remove the override checkout url from.
|
|
2515
2363
|
* @format GUID
|
|
2516
2364
|
*/
|
|
2517
2365
|
_id: string;
|
|
2518
2366
|
}
|
|
2519
|
-
interface RemoveOverrideCheckoutUrlResponse {
|
|
2367
|
+
export interface RemoveOverrideCheckoutUrlResponse {
|
|
2520
2368
|
/** Updated checkout after removal of override checkout url. */
|
|
2521
2369
|
checkout?: Checkout;
|
|
2522
2370
|
}
|
|
2523
|
-
interface AddToCheckoutRequest {
|
|
2371
|
+
export interface AddToCheckoutRequest {
|
|
2524
2372
|
/**
|
|
2525
2373
|
* Checkout ID.
|
|
2526
2374
|
* @format GUID
|
|
@@ -2540,11 +2388,11 @@ interface AddToCheckoutRequest {
|
|
|
2540
2388
|
*/
|
|
2541
2389
|
customLineItems?: CustomLineItem[];
|
|
2542
2390
|
}
|
|
2543
|
-
interface AddToCheckoutResponse {
|
|
2391
|
+
export interface AddToCheckoutResponse {
|
|
2544
2392
|
/** Updated checkout. */
|
|
2545
2393
|
checkout?: Checkout;
|
|
2546
2394
|
}
|
|
2547
|
-
interface RemoveLineItemsRequest {
|
|
2395
|
+
export interface RemoveLineItemsRequest {
|
|
2548
2396
|
/**
|
|
2549
2397
|
* ID of the checkout to remove line items from.
|
|
2550
2398
|
* @format GUID
|
|
@@ -2558,11 +2406,11 @@ interface RemoveLineItemsRequest {
|
|
|
2558
2406
|
*/
|
|
2559
2407
|
lineItemIds: string[];
|
|
2560
2408
|
}
|
|
2561
|
-
interface RemoveLineItemsResponse {
|
|
2409
|
+
export interface RemoveLineItemsResponse {
|
|
2562
2410
|
/** Updated checkout after removal of line items. */
|
|
2563
2411
|
checkout?: Checkout;
|
|
2564
2412
|
}
|
|
2565
|
-
interface CreateOrderRequest {
|
|
2413
|
+
export interface CreateOrderRequest {
|
|
2566
2414
|
/**
|
|
2567
2415
|
* Checkout ID.
|
|
2568
2416
|
* @format GUID
|
|
@@ -2573,7 +2421,7 @@ interface CreateOrderRequest {
|
|
|
2573
2421
|
/** Whether to authorize the payment and delay the capture. */
|
|
2574
2422
|
delayCapture?: boolean;
|
|
2575
2423
|
}
|
|
2576
|
-
interface CreateOrderResponse extends CreateOrderResponseIdOneOf {
|
|
2424
|
+
export interface CreateOrderResponse extends CreateOrderResponseIdOneOf {
|
|
2577
2425
|
/**
|
|
2578
2426
|
* ID of the newly created order.
|
|
2579
2427
|
* @format GUID
|
|
@@ -2596,7 +2444,7 @@ interface CreateOrderResponse extends CreateOrderResponseIdOneOf {
|
|
|
2596
2444
|
paymentGatewayOrderId?: string | null;
|
|
2597
2445
|
}
|
|
2598
2446
|
/** @oneof */
|
|
2599
|
-
interface CreateOrderResponseIdOneOf {
|
|
2447
|
+
export interface CreateOrderResponseIdOneOf {
|
|
2600
2448
|
/**
|
|
2601
2449
|
* ID of newly created order.
|
|
2602
2450
|
* @format GUID
|
|
@@ -2608,32 +2456,32 @@ interface CreateOrderResponseIdOneOf {
|
|
|
2608
2456
|
*/
|
|
2609
2457
|
subscriptionId?: string;
|
|
2610
2458
|
}
|
|
2611
|
-
interface PaymentErrorResponseData {
|
|
2459
|
+
export interface PaymentErrorResponseData {
|
|
2612
2460
|
paymentResponseToken?: string | null;
|
|
2613
2461
|
transactionStatus?: string;
|
|
2614
2462
|
failureDetails?: string | null;
|
|
2615
2463
|
}
|
|
2616
|
-
interface DoublePaymentErrorData extends DoublePaymentErrorDataIdOneOf {
|
|
2464
|
+
export interface DoublePaymentErrorData extends DoublePaymentErrorDataIdOneOf {
|
|
2617
2465
|
/** @format GUID */
|
|
2618
2466
|
orderId?: string;
|
|
2619
2467
|
/** @format GUID */
|
|
2620
2468
|
subscriptionId?: string;
|
|
2621
2469
|
}
|
|
2622
2470
|
/** @oneof */
|
|
2623
|
-
interface DoublePaymentErrorDataIdOneOf {
|
|
2471
|
+
export interface DoublePaymentErrorDataIdOneOf {
|
|
2624
2472
|
/** @format GUID */
|
|
2625
2473
|
orderId?: string;
|
|
2626
2474
|
/** @format GUID */
|
|
2627
2475
|
subscriptionId?: string;
|
|
2628
2476
|
}
|
|
2629
|
-
interface RedeemErrorData {
|
|
2477
|
+
export interface RedeemErrorData {
|
|
2630
2478
|
reason?: string;
|
|
2631
2479
|
}
|
|
2632
|
-
interface ViolationsList {
|
|
2480
|
+
export interface ViolationsList {
|
|
2633
2481
|
/** Violations risen by ValidationsSPI implementers. */
|
|
2634
2482
|
violations?: Violation[];
|
|
2635
2483
|
}
|
|
2636
|
-
interface CreateOrderAndChargeRequest {
|
|
2484
|
+
export interface CreateOrderAndChargeRequest {
|
|
2637
2485
|
/**
|
|
2638
2486
|
* Checkout ID.
|
|
2639
2487
|
* @format GUID
|
|
@@ -2646,7 +2494,7 @@ interface CreateOrderAndChargeRequest {
|
|
|
2646
2494
|
/** Whether to authorize the payment and delay the capture. */
|
|
2647
2495
|
delayCapture?: boolean;
|
|
2648
2496
|
}
|
|
2649
|
-
interface CreateOrderAndChargeResponse extends CreateOrderAndChargeResponseIdOneOf {
|
|
2497
|
+
export interface CreateOrderAndChargeResponse extends CreateOrderAndChargeResponseIdOneOf {
|
|
2650
2498
|
/**
|
|
2651
2499
|
* ID of newly created order.
|
|
2652
2500
|
* @format GUID
|
|
@@ -2668,15 +2516,9 @@ interface CreateOrderAndChargeResponse extends CreateOrderAndChargeResponseIdOne
|
|
|
2668
2516
|
* + If the total price is not 0, but the payment is covered by alternative payment methods, such as a gift card.
|
|
2669
2517
|
*/
|
|
2670
2518
|
paymentGatewayOrderId?: string | null;
|
|
2671
|
-
/**
|
|
2672
|
-
* Whether an order was successfully created from this checkout and the payment transaction was completed
|
|
2673
|
-
* @internal
|
|
2674
|
-
* @readonly
|
|
2675
|
-
*/
|
|
2676
|
-
checkoutCompleted?: boolean;
|
|
2677
2519
|
}
|
|
2678
2520
|
/** @oneof */
|
|
2679
|
-
interface CreateOrderAndChargeResponseIdOneOf {
|
|
2521
|
+
export interface CreateOrderAndChargeResponseIdOneOf {
|
|
2680
2522
|
/**
|
|
2681
2523
|
* ID of newly created order.
|
|
2682
2524
|
* @format GUID
|
|
@@ -2688,42 +2530,36 @@ interface CreateOrderAndChargeResponseIdOneOf {
|
|
|
2688
2530
|
*/
|
|
2689
2531
|
subscriptionId?: string;
|
|
2690
2532
|
}
|
|
2691
|
-
interface MarkCheckoutAsCompletedAndRedirectToUrlRequest {
|
|
2533
|
+
export interface MarkCheckoutAsCompletedAndRedirectToUrlRequest {
|
|
2692
2534
|
/**
|
|
2693
2535
|
* Server-signed JWT token with required information to complete checkout
|
|
2694
2536
|
* @maxLength 4096
|
|
2695
2537
|
*/
|
|
2696
2538
|
token: string;
|
|
2697
2539
|
}
|
|
2698
|
-
interface RawHttpResponse {
|
|
2540
|
+
export interface RawHttpResponse {
|
|
2699
2541
|
body?: Uint8Array;
|
|
2700
2542
|
statusCode?: number | null;
|
|
2701
2543
|
headers?: HeadersEntry[];
|
|
2702
2544
|
}
|
|
2703
|
-
interface HeadersEntry {
|
|
2545
|
+
export interface HeadersEntry {
|
|
2704
2546
|
key?: string;
|
|
2705
2547
|
value?: string;
|
|
2706
2548
|
}
|
|
2707
|
-
interface MarkCheckoutAsCompletedRequest {
|
|
2549
|
+
export interface MarkCheckoutAsCompletedRequest {
|
|
2708
2550
|
/**
|
|
2709
2551
|
* Checkout ID.
|
|
2710
2552
|
* @format GUID
|
|
2711
2553
|
*/
|
|
2712
2554
|
_id: string;
|
|
2713
|
-
/**
|
|
2714
|
-
* Order ID.
|
|
2715
|
-
* @internal
|
|
2716
|
-
* @format GUID
|
|
2717
|
-
*/
|
|
2718
|
-
orderId?: string | null;
|
|
2719
2555
|
}
|
|
2720
|
-
interface MarkCheckoutAsCompletedResponse {
|
|
2556
|
+
export interface MarkCheckoutAsCompletedResponse {
|
|
2721
2557
|
}
|
|
2722
2558
|
/** Triggered when an order created from this checkout is successfully paid for or when a checkout is marked as completed. */
|
|
2723
|
-
interface CheckoutMarkedAsCompleted {
|
|
2559
|
+
export interface CheckoutMarkedAsCompleted {
|
|
2724
2560
|
checkout?: Checkout;
|
|
2725
2561
|
}
|
|
2726
|
-
interface UpdateLineItemsQuantityRequest {
|
|
2562
|
+
export interface UpdateLineItemsQuantityRequest {
|
|
2727
2563
|
/**
|
|
2728
2564
|
* Checkout ID.
|
|
2729
2565
|
* @format GUID
|
|
@@ -2736,7 +2572,7 @@ interface UpdateLineItemsQuantityRequest {
|
|
|
2736
2572
|
*/
|
|
2737
2573
|
lineItems: LineItemQuantityUpdate[];
|
|
2738
2574
|
}
|
|
2739
|
-
interface LineItemQuantityUpdate {
|
|
2575
|
+
export interface LineItemQuantityUpdate {
|
|
2740
2576
|
/**
|
|
2741
2577
|
* ID of the line item to update.
|
|
2742
2578
|
* @format GUID
|
|
@@ -2754,37 +2590,37 @@ interface LineItemQuantityUpdate {
|
|
|
2754
2590
|
*/
|
|
2755
2591
|
quantity?: number;
|
|
2756
2592
|
}
|
|
2757
|
-
interface UpdateLineItemsQuantityResponse {
|
|
2593
|
+
export interface UpdateLineItemsQuantityResponse {
|
|
2758
2594
|
/** Updated checkout. */
|
|
2759
2595
|
checkout?: Checkout;
|
|
2760
2596
|
}
|
|
2761
|
-
interface GetCheckoutPaymentSettingsRequest {
|
|
2597
|
+
export interface GetCheckoutPaymentSettingsRequest {
|
|
2762
2598
|
/**
|
|
2763
2599
|
* Checkout ID.
|
|
2764
2600
|
* @format GUID
|
|
2765
2601
|
*/
|
|
2766
2602
|
_id: string;
|
|
2767
2603
|
}
|
|
2768
|
-
interface GetCheckoutPaymentSettingsResponse {
|
|
2604
|
+
export interface GetCheckoutPaymentSettingsResponse {
|
|
2769
2605
|
blockedPaymentOptions?: GetCheckoutPaymentSettingsResponsePaymentOption[];
|
|
2770
2606
|
}
|
|
2771
|
-
declare enum GetCheckoutPaymentSettingsResponsePaymentOption {
|
|
2607
|
+
export declare enum GetCheckoutPaymentSettingsResponsePaymentOption {
|
|
2772
2608
|
UNKNOWN_PAYMENT_OPTION = "UNKNOWN_PAYMENT_OPTION",
|
|
2773
2609
|
MANUAL = "MANUAL"
|
|
2774
2610
|
}
|
|
2775
|
-
interface DeleteCheckoutRequest {
|
|
2611
|
+
export interface DeleteCheckoutRequest {
|
|
2776
2612
|
/**
|
|
2777
2613
|
* ID of the checkout to delete.
|
|
2778
2614
|
* @format GUID
|
|
2779
2615
|
*/
|
|
2780
2616
|
_id?: string;
|
|
2781
2617
|
}
|
|
2782
|
-
interface DeleteCheckoutResponse {
|
|
2618
|
+
export interface DeleteCheckoutResponse {
|
|
2783
2619
|
}
|
|
2784
|
-
interface SubscriptionCreated {
|
|
2620
|
+
export interface SubscriptionCreated {
|
|
2785
2621
|
subscription?: Subscription;
|
|
2786
2622
|
}
|
|
2787
|
-
interface Subscription {
|
|
2623
|
+
export interface Subscription {
|
|
2788
2624
|
/**
|
|
2789
2625
|
* Subscription id (auto-generated upon subscription creation)
|
|
2790
2626
|
* @readonly
|
|
@@ -2848,7 +2684,7 @@ interface Subscription {
|
|
|
2848
2684
|
billingInfo?: BillingInfo;
|
|
2849
2685
|
}
|
|
2850
2686
|
/** Buyer Info */
|
|
2851
|
-
interface V1BuyerInfo {
|
|
2687
|
+
export interface V1BuyerInfo {
|
|
2852
2688
|
/**
|
|
2853
2689
|
* Wix customer ID
|
|
2854
2690
|
* @format GUID
|
|
@@ -2857,14 +2693,14 @@ interface V1BuyerInfo {
|
|
|
2857
2693
|
/** Customer type */
|
|
2858
2694
|
identityType?: IdentityType;
|
|
2859
2695
|
}
|
|
2860
|
-
declare enum IdentityType {
|
|
2696
|
+
export declare enum IdentityType {
|
|
2861
2697
|
UNSPECIFIED_IDENTITY_TYPE = "UNSPECIFIED_IDENTITY_TYPE",
|
|
2862
2698
|
/** Site member */
|
|
2863
2699
|
MEMBER = "MEMBER",
|
|
2864
2700
|
/** Contact */
|
|
2865
2701
|
CONTACT = "CONTACT"
|
|
2866
2702
|
}
|
|
2867
|
-
interface V1LineItem {
|
|
2703
|
+
export interface V1LineItem {
|
|
2868
2704
|
/** Line item ID (auto-generated) */
|
|
2869
2705
|
index?: number;
|
|
2870
2706
|
/**
|
|
@@ -2893,7 +2729,7 @@ interface V1LineItem {
|
|
|
2893
2729
|
/** Product details */
|
|
2894
2730
|
productDetails?: ProductDetails;
|
|
2895
2731
|
}
|
|
2896
|
-
interface OptionSelection {
|
|
2732
|
+
export interface OptionSelection {
|
|
2897
2733
|
/**
|
|
2898
2734
|
* Option name
|
|
2899
2735
|
* @maxLength 200
|
|
@@ -2905,7 +2741,7 @@ interface OptionSelection {
|
|
|
2905
2741
|
*/
|
|
2906
2742
|
selection?: string;
|
|
2907
2743
|
}
|
|
2908
|
-
interface CustomTextFieldSelection {
|
|
2744
|
+
export interface CustomTextFieldSelection {
|
|
2909
2745
|
/**
|
|
2910
2746
|
* Custom text field name
|
|
2911
2747
|
* @maxLength 100
|
|
@@ -2917,7 +2753,7 @@ interface CustomTextFieldSelection {
|
|
|
2917
2753
|
*/
|
|
2918
2754
|
value?: string;
|
|
2919
2755
|
}
|
|
2920
|
-
interface ChargeDetails {
|
|
2756
|
+
export interface ChargeDetails {
|
|
2921
2757
|
/**
|
|
2922
2758
|
* price of line item (depends on subscription option)
|
|
2923
2759
|
* @max 999999999.99
|
|
@@ -2946,7 +2782,7 @@ interface ChargeDetails {
|
|
|
2946
2782
|
*/
|
|
2947
2783
|
taxRate?: string | null;
|
|
2948
2784
|
}
|
|
2949
|
-
interface ProductDetails {
|
|
2785
|
+
export interface ProductDetails {
|
|
2950
2786
|
/**
|
|
2951
2787
|
* Line item product ID (optional for POS orders)
|
|
2952
2788
|
* @minLength 1
|
|
@@ -2999,7 +2835,7 @@ interface ProductDetails {
|
|
|
2999
2835
|
*/
|
|
3000
2836
|
appId?: string | null;
|
|
3001
2837
|
}
|
|
3002
|
-
declare enum LineItemType {
|
|
2838
|
+
export declare enum LineItemType {
|
|
3003
2839
|
/** Line item type can't be classified, due to an error */
|
|
3004
2840
|
UNSPECIFIED_LINE_ITEM_TYPE = "UNSPECIFIED_LINE_ITEM_TYPE",
|
|
3005
2841
|
/** Physical item type */
|
|
@@ -3009,7 +2845,7 @@ declare enum LineItemType {
|
|
|
3009
2845
|
/** Custom item price */
|
|
3010
2846
|
CUSTOM_AMOUNT_ITEM = "CUSTOM_AMOUNT_ITEM"
|
|
3011
2847
|
}
|
|
3012
|
-
interface MediaItem {
|
|
2848
|
+
export interface MediaItem {
|
|
3013
2849
|
/**
|
|
3014
2850
|
* Media type
|
|
3015
2851
|
* @readonly
|
|
@@ -3043,13 +2879,13 @@ interface MediaItem {
|
|
|
3043
2879
|
*/
|
|
3044
2880
|
altText?: string | null;
|
|
3045
2881
|
}
|
|
3046
|
-
declare enum MediaItemType {
|
|
2882
|
+
export declare enum MediaItemType {
|
|
3047
2883
|
/** Media item type can't be classified, due to an error */
|
|
3048
2884
|
UNSPECIFIED_MEDIA_TYPE_ITEM = "UNSPECIFIED_MEDIA_TYPE_ITEM",
|
|
3049
2885
|
/** Image item type */
|
|
3050
2886
|
IMAGE = "IMAGE"
|
|
3051
2887
|
}
|
|
3052
|
-
interface Totals {
|
|
2888
|
+
export interface Totals {
|
|
3053
2889
|
/**
|
|
3054
2890
|
* Subtotal of all line items, before tax
|
|
3055
2891
|
* @max 999999999.99
|
|
@@ -3086,7 +2922,7 @@ interface Totals {
|
|
|
3086
2922
|
*/
|
|
3087
2923
|
quantity?: number;
|
|
3088
2924
|
}
|
|
3089
|
-
interface StoreSettings {
|
|
2925
|
+
export interface StoreSettings {
|
|
3090
2926
|
/**
|
|
3091
2927
|
* Currency used for pricing in this store
|
|
3092
2928
|
* @maxLength 3
|
|
@@ -3104,7 +2940,7 @@ interface StoreSettings {
|
|
|
3104
2940
|
*/
|
|
3105
2941
|
buyerLanguage?: string | null;
|
|
3106
2942
|
}
|
|
3107
|
-
interface Address extends AddressAddressLine1OptionsOneOf {
|
|
2943
|
+
export interface Address extends AddressAddressLine1OptionsOneOf {
|
|
3108
2944
|
/**
|
|
3109
2945
|
* Address line 1 (free text)
|
|
3110
2946
|
* @maxLength 1000
|
|
@@ -3158,7 +2994,7 @@ interface Address extends AddressAddressLine1OptionsOneOf {
|
|
|
3158
2994
|
vatId?: VatId;
|
|
3159
2995
|
}
|
|
3160
2996
|
/** @oneof */
|
|
3161
|
-
interface AddressAddressLine1OptionsOneOf {
|
|
2997
|
+
export interface AddressAddressLine1OptionsOneOf {
|
|
3162
2998
|
/**
|
|
3163
2999
|
* Address line 1 (free text)
|
|
3164
3000
|
* @maxLength 1000
|
|
@@ -3167,7 +3003,7 @@ interface AddressAddressLine1OptionsOneOf {
|
|
|
3167
3003
|
/** Address line 1 (street) */
|
|
3168
3004
|
street?: Street;
|
|
3169
3005
|
}
|
|
3170
|
-
interface FullName {
|
|
3006
|
+
export interface FullName {
|
|
3171
3007
|
/**
|
|
3172
3008
|
* Customer's first name
|
|
3173
3009
|
* @maxLength 1000
|
|
@@ -3179,7 +3015,7 @@ interface FullName {
|
|
|
3179
3015
|
*/
|
|
3180
3016
|
lastName?: string;
|
|
3181
3017
|
}
|
|
3182
|
-
interface Street {
|
|
3018
|
+
export interface Street {
|
|
3183
3019
|
/**
|
|
3184
3020
|
* Street number
|
|
3185
3021
|
* @maxLength 500
|
|
@@ -3191,7 +3027,7 @@ interface Street {
|
|
|
3191
3027
|
*/
|
|
3192
3028
|
name?: string;
|
|
3193
3029
|
}
|
|
3194
|
-
interface VatId {
|
|
3030
|
+
export interface VatId {
|
|
3195
3031
|
/**
|
|
3196
3032
|
* Customer's tax ID.
|
|
3197
3033
|
* @maxLength 50
|
|
@@ -3205,7 +3041,7 @@ interface VatId {
|
|
|
3205
3041
|
type?: VatType;
|
|
3206
3042
|
}
|
|
3207
3043
|
/** Brazilian tax info types */
|
|
3208
|
-
declare enum VatType {
|
|
3044
|
+
export declare enum VatType {
|
|
3209
3045
|
/** When the tax info type can't be classified, due to an error */
|
|
3210
3046
|
UNSPECIFIED_TAX_TYPE = "UNSPECIFIED_TAX_TYPE",
|
|
3211
3047
|
/** CPF - for individual tax payers */
|
|
@@ -3213,7 +3049,7 @@ declare enum VatType {
|
|
|
3213
3049
|
/** CNPJ - for corporations */
|
|
3214
3050
|
CNPJ = "CNPJ"
|
|
3215
3051
|
}
|
|
3216
|
-
interface V1ShippingInfo extends V1ShippingInfoDetailsOneOf {
|
|
3052
|
+
export interface V1ShippingInfo extends V1ShippingInfoDetailsOneOf {
|
|
3217
3053
|
/** Shipment details (when this object describes shipment) */
|
|
3218
3054
|
shipmentDetails?: ShipmentDetails;
|
|
3219
3055
|
/** Pickup details (when this object describes pickup) */
|
|
@@ -3230,13 +3066,13 @@ interface V1ShippingInfo extends V1ShippingInfoDetailsOneOf {
|
|
|
3230
3066
|
estimatedDeliveryTime?: string | null;
|
|
3231
3067
|
}
|
|
3232
3068
|
/** @oneof */
|
|
3233
|
-
interface V1ShippingInfoDetailsOneOf {
|
|
3069
|
+
export interface V1ShippingInfoDetailsOneOf {
|
|
3234
3070
|
/** Shipment details (when this object describes shipment) */
|
|
3235
3071
|
shipmentDetails?: ShipmentDetails;
|
|
3236
3072
|
/** Pickup details (when this object describes pickup) */
|
|
3237
3073
|
pickupDetails?: V1PickupDetails;
|
|
3238
3074
|
}
|
|
3239
|
-
interface ShipmentDetails {
|
|
3075
|
+
export interface ShipmentDetails {
|
|
3240
3076
|
/** Shipping destination address */
|
|
3241
3077
|
address?: Address;
|
|
3242
3078
|
/**
|
|
@@ -3257,7 +3093,7 @@ interface ShipmentDetails {
|
|
|
3257
3093
|
*/
|
|
3258
3094
|
taxRate?: string | null;
|
|
3259
3095
|
}
|
|
3260
|
-
interface V1PickupDetails {
|
|
3096
|
+
export interface V1PickupDetails {
|
|
3261
3097
|
/** Pickup address */
|
|
3262
3098
|
address?: PickupAddress;
|
|
3263
3099
|
/**
|
|
@@ -3266,7 +3102,7 @@ interface V1PickupDetails {
|
|
|
3266
3102
|
*/
|
|
3267
3103
|
pickupInstructions?: string | null;
|
|
3268
3104
|
}
|
|
3269
|
-
interface PickupAddress {
|
|
3105
|
+
export interface PickupAddress {
|
|
3270
3106
|
/**
|
|
3271
3107
|
* Country code (2 letters)
|
|
3272
3108
|
* @format COUNTRY
|
|
@@ -3293,7 +3129,7 @@ interface PickupAddress {
|
|
|
3293
3129
|
*/
|
|
3294
3130
|
zipCode?: string;
|
|
3295
3131
|
}
|
|
3296
|
-
interface AppliedCoupon {
|
|
3132
|
+
export interface AppliedCoupon {
|
|
3297
3133
|
/** Coupon ID */
|
|
3298
3134
|
couponId?: string;
|
|
3299
3135
|
/**
|
|
@@ -3308,7 +3144,7 @@ interface AppliedCoupon {
|
|
|
3308
3144
|
code?: string;
|
|
3309
3145
|
}
|
|
3310
3146
|
/** Custom field */
|
|
3311
|
-
interface V1CustomField {
|
|
3147
|
+
export interface V1CustomField {
|
|
3312
3148
|
/**
|
|
3313
3149
|
* Free text that the customer entered in the custom field during the checkout process
|
|
3314
3150
|
* @maxLength 250
|
|
@@ -3325,7 +3161,7 @@ interface V1CustomField {
|
|
|
3325
3161
|
*/
|
|
3326
3162
|
translatedTitle?: string;
|
|
3327
3163
|
}
|
|
3328
|
-
interface V1SubscriptionOptionInfo {
|
|
3164
|
+
export interface V1SubscriptionOptionInfo {
|
|
3329
3165
|
/** @format GUID */
|
|
3330
3166
|
_id?: string | null;
|
|
3331
3167
|
/**
|
|
@@ -3337,29 +3173,29 @@ interface V1SubscriptionOptionInfo {
|
|
|
3337
3173
|
description?: string | null;
|
|
3338
3174
|
discount?: Discount;
|
|
3339
3175
|
}
|
|
3340
|
-
interface Discount {
|
|
3176
|
+
export interface Discount {
|
|
3341
3177
|
/** Discount type. */
|
|
3342
3178
|
type?: DiscountDiscountType;
|
|
3343
3179
|
/** Discount value. */
|
|
3344
3180
|
value?: number;
|
|
3345
3181
|
}
|
|
3346
|
-
declare enum DiscountDiscountType {
|
|
3182
|
+
export declare enum DiscountDiscountType {
|
|
3347
3183
|
UNDEFINED = "UNDEFINED",
|
|
3348
3184
|
/** No discount */
|
|
3349
3185
|
AMOUNT = "AMOUNT",
|
|
3350
3186
|
PERCENT = "PERCENT"
|
|
3351
3187
|
}
|
|
3352
|
-
interface ChannelInfo {
|
|
3188
|
+
export interface ChannelInfo {
|
|
3353
3189
|
/** Sales channel that submitted the subscription */
|
|
3354
3190
|
type?: ChannelInfoChannelType;
|
|
3355
3191
|
}
|
|
3356
|
-
declare enum ChannelInfoChannelType {
|
|
3192
|
+
export declare enum ChannelInfoChannelType {
|
|
3357
3193
|
UNSPECIFIED = "UNSPECIFIED",
|
|
3358
3194
|
WEB = "WEB",
|
|
3359
3195
|
OTHER_PLATFORM = "OTHER_PLATFORM",
|
|
3360
3196
|
WIX_APP_STORE = "WIX_APP_STORE"
|
|
3361
3197
|
}
|
|
3362
|
-
interface V1SubscriptionSettings {
|
|
3198
|
+
export interface V1SubscriptionSettings {
|
|
3363
3199
|
/** Frequency of recurring payment. */
|
|
3364
3200
|
frequency?: SubscriptionFrequency;
|
|
3365
3201
|
/** Whether subscription is renewed automatically at the end of each period. */
|
|
@@ -3371,7 +3207,7 @@ interface V1SubscriptionSettings {
|
|
|
3371
3207
|
*/
|
|
3372
3208
|
billingCycles?: number | null;
|
|
3373
3209
|
}
|
|
3374
|
-
interface BillingInfo {
|
|
3210
|
+
export interface BillingInfo {
|
|
3375
3211
|
/**
|
|
3376
3212
|
* Payment method used for this order
|
|
3377
3213
|
* @maxLength 50
|
|
@@ -3388,9 +3224,9 @@ interface BillingInfo {
|
|
|
3388
3224
|
*/
|
|
3389
3225
|
paymentGatewayOrderId?: string | null;
|
|
3390
3226
|
}
|
|
3391
|
-
interface Empty {
|
|
3227
|
+
export interface Empty {
|
|
3392
3228
|
}
|
|
3393
|
-
interface DomainEvent extends DomainEventBodyOneOf {
|
|
3229
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
3394
3230
|
createdEvent?: EntityCreatedEvent;
|
|
3395
3231
|
updatedEvent?: EntityUpdatedEvent;
|
|
3396
3232
|
deletedEvent?: EntityDeletedEvent;
|
|
@@ -3433,19 +3269,19 @@ interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
3433
3269
|
entityEventSequence?: string | null;
|
|
3434
3270
|
}
|
|
3435
3271
|
/** @oneof */
|
|
3436
|
-
interface DomainEventBodyOneOf {
|
|
3272
|
+
export interface DomainEventBodyOneOf {
|
|
3437
3273
|
createdEvent?: EntityCreatedEvent;
|
|
3438
3274
|
updatedEvent?: EntityUpdatedEvent;
|
|
3439
3275
|
deletedEvent?: EntityDeletedEvent;
|
|
3440
3276
|
actionEvent?: ActionEvent;
|
|
3441
3277
|
}
|
|
3442
|
-
interface EntityCreatedEvent {
|
|
3278
|
+
export interface EntityCreatedEvent {
|
|
3443
3279
|
entity?: string;
|
|
3444
3280
|
}
|
|
3445
|
-
interface RestoreInfo {
|
|
3281
|
+
export interface RestoreInfo {
|
|
3446
3282
|
deletedDate?: Date | null;
|
|
3447
3283
|
}
|
|
3448
|
-
interface EntityUpdatedEvent {
|
|
3284
|
+
export interface EntityUpdatedEvent {
|
|
3449
3285
|
/**
|
|
3450
3286
|
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
3451
3287
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
@@ -3453,14 +3289,14 @@ interface EntityUpdatedEvent {
|
|
|
3453
3289
|
*/
|
|
3454
3290
|
currentEntity?: string;
|
|
3455
3291
|
}
|
|
3456
|
-
interface EntityDeletedEvent {
|
|
3292
|
+
export interface EntityDeletedEvent {
|
|
3457
3293
|
/** Entity that was deleted */
|
|
3458
3294
|
deletedEntity?: string | null;
|
|
3459
3295
|
}
|
|
3460
|
-
interface ActionEvent {
|
|
3296
|
+
export interface ActionEvent {
|
|
3461
3297
|
body?: string;
|
|
3462
3298
|
}
|
|
3463
|
-
interface MessageEnvelope {
|
|
3299
|
+
export interface MessageEnvelope {
|
|
3464
3300
|
/**
|
|
3465
3301
|
* App instance ID.
|
|
3466
3302
|
* @format GUID
|
|
@@ -3476,7 +3312,7 @@ interface MessageEnvelope {
|
|
|
3476
3312
|
/** Stringify payload. */
|
|
3477
3313
|
data?: string;
|
|
3478
3314
|
}
|
|
3479
|
-
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
3315
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
3480
3316
|
/**
|
|
3481
3317
|
* ID of a site visitor that has not logged in to the site.
|
|
3482
3318
|
* @format GUID
|
|
@@ -3501,7 +3337,7 @@ interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
3501
3337
|
identityType?: WebhookIdentityType;
|
|
3502
3338
|
}
|
|
3503
3339
|
/** @oneof */
|
|
3504
|
-
interface IdentificationDataIdOneOf {
|
|
3340
|
+
export interface IdentificationDataIdOneOf {
|
|
3505
3341
|
/**
|
|
3506
3342
|
* ID of a site visitor that has not logged in to the site.
|
|
3507
3343
|
* @format GUID
|
|
@@ -3523,14 +3359,14 @@ interface IdentificationDataIdOneOf {
|
|
|
3523
3359
|
*/
|
|
3524
3360
|
appId?: string;
|
|
3525
3361
|
}
|
|
3526
|
-
declare enum WebhookIdentityType {
|
|
3362
|
+
export declare enum WebhookIdentityType {
|
|
3527
3363
|
UNKNOWN = "UNKNOWN",
|
|
3528
3364
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
3529
3365
|
MEMBER = "MEMBER",
|
|
3530
3366
|
WIX_USER = "WIX_USER",
|
|
3531
3367
|
APP = "APP"
|
|
3532
3368
|
}
|
|
3533
|
-
interface BaseEventMetadata {
|
|
3369
|
+
export interface BaseEventMetadata {
|
|
3534
3370
|
/**
|
|
3535
3371
|
* App instance ID.
|
|
3536
3372
|
* @format GUID
|
|
@@ -3544,7 +3380,7 @@ interface BaseEventMetadata {
|
|
|
3544
3380
|
/** The identification type and identity data. */
|
|
3545
3381
|
identity?: IdentificationData;
|
|
3546
3382
|
}
|
|
3547
|
-
interface EventMetadata extends BaseEventMetadata {
|
|
3383
|
+
export interface EventMetadata extends BaseEventMetadata {
|
|
3548
3384
|
/**
|
|
3549
3385
|
* Unique event ID.
|
|
3550
3386
|
* Allows clients to ignore duplicate webhooks.
|
|
@@ -3582,19 +3418,142 @@ interface EventMetadata extends BaseEventMetadata {
|
|
|
3582
3418
|
*/
|
|
3583
3419
|
entityEventSequence?: string | null;
|
|
3584
3420
|
}
|
|
3585
|
-
interface CheckoutCompletedEnvelope {
|
|
3421
|
+
export interface CheckoutCompletedEnvelope {
|
|
3586
3422
|
data: CheckoutMarkedAsCompleted;
|
|
3587
3423
|
metadata: EventMetadata;
|
|
3588
3424
|
}
|
|
3589
|
-
|
|
3425
|
+
/**
|
|
3426
|
+
* Triggered when an order created from this checkout is
|
|
3427
|
+
* successfully paid for or when a checkout is marked as completed.
|
|
3428
|
+
* @permissionScope Manage Stores - all permissions
|
|
3429
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3430
|
+
* @permissionScope Read eCommerce - all read permissions
|
|
3431
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
3432
|
+
* @permissionScope Read Orders
|
|
3433
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
|
|
3434
|
+
* @permissionScope Read Stores - all read permissions
|
|
3435
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
3436
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3437
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3438
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3439
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3440
|
+
* @permissionScope Manage Orders
|
|
3441
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
3442
|
+
* @permissionId ECOM.READ_CHECKOUTS
|
|
3443
|
+
* @webhook
|
|
3444
|
+
* @eventType wix.ecom.v1.checkout_completed
|
|
3445
|
+
* @serviceIdentifier com.wix.ecom.checkout.api.v1.CheckoutService
|
|
3446
|
+
* @slug completed
|
|
3447
|
+
*/
|
|
3448
|
+
export declare function onCheckoutCompleted(handler: (event: CheckoutCompletedEnvelope) => void | Promise<void>): void;
|
|
3449
|
+
export interface CheckoutCreatedEnvelope {
|
|
3590
3450
|
entity: Checkout;
|
|
3591
3451
|
metadata: EventMetadata;
|
|
3592
3452
|
}
|
|
3593
|
-
|
|
3453
|
+
/**
|
|
3454
|
+
* Triggered when a checkout is created.
|
|
3455
|
+
* @permissionScope Manage Stores - all permissions
|
|
3456
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3457
|
+
* @permissionScope Read eCommerce - all read permissions
|
|
3458
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
3459
|
+
* @permissionScope Read Orders
|
|
3460
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
|
|
3461
|
+
* @permissionScope Read Stores - all read permissions
|
|
3462
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
3463
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3464
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3465
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3466
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3467
|
+
* @permissionScope Manage Orders
|
|
3468
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
3469
|
+
* @permissionId ECOM.READ_CHECKOUTS
|
|
3470
|
+
* @webhook
|
|
3471
|
+
* @eventType wix.ecom.v1.checkout_created
|
|
3472
|
+
* @serviceIdentifier com.wix.ecom.checkout.api.v1.CheckoutService
|
|
3473
|
+
* @slug created
|
|
3474
|
+
*/
|
|
3475
|
+
export declare function onCheckoutCreated(handler: (event: CheckoutCreatedEnvelope) => void | Promise<void>): void;
|
|
3476
|
+
export interface CheckoutUpdatedEnvelope {
|
|
3594
3477
|
entity: Checkout;
|
|
3595
3478
|
metadata: EventMetadata;
|
|
3596
3479
|
}
|
|
3597
|
-
|
|
3480
|
+
/**
|
|
3481
|
+
* Triggered when a checkout is updated.
|
|
3482
|
+
* @permissionScope Manage Stores - all permissions
|
|
3483
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3484
|
+
* @permissionScope Read eCommerce - all read permissions
|
|
3485
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
3486
|
+
* @permissionScope Read Orders
|
|
3487
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
|
|
3488
|
+
* @permissionScope Read Stores - all read permissions
|
|
3489
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
3490
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3491
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3492
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3493
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3494
|
+
* @permissionScope Manage Orders
|
|
3495
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
3496
|
+
* @permissionId ECOM.READ_CHECKOUTS
|
|
3497
|
+
* @webhook
|
|
3498
|
+
* @eventType wix.ecom.v1.checkout_updated
|
|
3499
|
+
* @serviceIdentifier com.wix.ecom.checkout.api.v1.CheckoutService
|
|
3500
|
+
* @slug updated
|
|
3501
|
+
*/
|
|
3502
|
+
export declare function onCheckoutUpdated(handler: (event: CheckoutUpdatedEnvelope) => void | Promise<void>): void;
|
|
3503
|
+
type CheckoutNonNullablePaths = `lineItems` | `lineItems.${number}.quantity` | `lineItems.${number}.catalogReference.catalogItemId` | `lineItems.${number}.catalogReference.appId` | `lineItems.${number}.productName.original` | `lineItems.${number}.price.amount` | `lineItems.${number}.price.convertedAmount` | `lineItems.${number}.price.formattedAmount` | `lineItems.${number}.price.formattedConvertedAmount` | `lineItems.${number}.taxDetails.taxRate` | `lineItems.${number}.taxDetails.rateBreakdown` | `lineItems.${number}.taxDetails.rateBreakdown.${number}.name` | `lineItems.${number}.taxDetails.rateBreakdown.${number}.rate` | `lineItems.${number}.descriptionLines` | `lineItems.${number}.descriptionLines.${number}.plainText.original` | `lineItems.${number}.descriptionLines.${number}.colorInfo.original` | `lineItems.${number}.descriptionLines.${number}.name.original` | `lineItems.${number}.availability.status` | `lineItems.${number}.physicalProperties.shippable` | `lineItems.${number}.itemType.preset` | `lineItems.${number}.itemType.custom` | `lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.frequency` | `lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.autoRenewal` | `lineItems.${number}.subscriptionOptionInfo.title.original` | `lineItems.${number}.subscriptionOptionInfo.description.original` | `lineItems.${number}.paymentOption` | `lineItems.${number}.priceDescription.original` | `lineItems.${number}.customLineItem` | `lineItems.${number}.catalogOverrideFields.descriptionLines` | `lineItems.${number}.catalogOverrideFields.paymentOption.value` | `lineItems.${number}.savePaymentMethod` | `billingInfo.address.streetAddress.number` | `billingInfo.address.streetAddress.name` | `billingInfo.contactDetails.vatId._id` | `billingInfo.contactDetails.vatId.type` | `shippingInfo.shippingDestination.address.streetAddress.number` | `shippingInfo.shippingDestination.address.streetAddress.name` | `shippingInfo.shippingDestination.contactDetails.vatId._id` | `shippingInfo.shippingDestination.contactDetails.vatId.type` | `shippingInfo.selectedCarrierServiceOption.code` | `shippingInfo.selectedCarrierServiceOption.title` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.businessLocation` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.pickupMethod` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.amount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.convertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedConvertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxRate` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.name` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.rate` | `shippingInfo.selectedCarrierServiceOption.requestedShippingOption` | `shippingInfo.selectedCarrierServiceOption.otherCharges` | `shippingInfo.selectedCarrierServiceOption.otherCharges.${number}.type` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations.${number}.deliveryCarrier.code` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations.${number}.applicableLineItems.lineItemIds` | `shippingInfo.region._id` | `shippingInfo.region.name` | `shippingInfo.carrierServiceOptions` | `shippingInfo.carrierServiceOptions.${number}.carrierId` | `shippingInfo.carrierServiceOptions.${number}.shippingOptions` | `shippingInfo.carrierServiceOptions.${number}.shippingOptions.${number}.code` | `shippingInfo.carrierServiceOptions.${number}.shippingOptions.${number}.title` | `shippingInfo.carrierServiceOptions.${number}.shippingOptions.${number}.cost.otherCharges` | `shippingInfo.carrierServiceOptions.${number}.shippingOptions.${number}.cost.otherCharges.${number}.type` | `shippingInfo.carrierServiceOptions.${number}.shippingOptions.${number}.deliveryAllocations` | `buyerInfo.visitorId` | `buyerInfo.memberId` | `conversionCurrency` | `priceSummary.subtotal.amount` | `priceSummary.subtotal.convertedAmount` | `priceSummary.subtotal.formattedAmount` | `priceSummary.subtotal.formattedConvertedAmount` | `calculationErrors.generalShippingCalculationError.applicationError.code` | `calculationErrors.generalShippingCalculationError.applicationError.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculationErrors.carrierErrors.errors` | `calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculationErrors.orderValidationErrors` | `giftCard._id` | `giftCard.obfuscatedCode` | `giftCard.amount.amount` | `giftCard.amount.convertedAmount` | `giftCard.amount.formattedAmount` | `giftCard.amount.formattedConvertedAmount` | `giftCard.appId` | `appliedDiscounts` | `appliedDiscounts.${number}.coupon._id` | `appliedDiscounts.${number}.coupon.code` | `appliedDiscounts.${number}.coupon.amount.amount` | `appliedDiscounts.${number}.coupon.amount.convertedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedConvertedAmount` | `appliedDiscounts.${number}.coupon.name` | `appliedDiscounts.${number}.discountRule._id` | `appliedDiscounts.${number}.discountRule.name.original` | `appliedDiscounts.${number}.discountType` | `appliedDiscounts.${number}.lineItemIds` | `customFields` | `customFields.${number}.title` | `weightUnit` | `taxSummary.taxableAmount.amount` | `taxSummary.taxableAmount.convertedAmount` | `taxSummary.taxableAmount.formattedAmount` | `taxSummary.taxableAmount.formattedConvertedAmount` | `taxSummary.calculationDetails.manualRateReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.fallbackReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.code` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.description` | `taxSummary.calculationDetails.rateType` | `currency` | `channelType` | `siteLanguage` | `buyerLanguage` | `completed` | `taxIncludedInPrice` | `createdBy.userId` | `createdBy.memberId` | `createdBy.visitorId` | `createdBy.appId` | `payNow.subtotal.amount` | `payNow.subtotal.convertedAmount` | `payNow.subtotal.formattedAmount` | `payNow.subtotal.formattedConvertedAmount` | `payLater.subtotal.amount` | `payLater.subtotal.convertedAmount` | `payLater.subtotal.formattedAmount` | `payLater.subtotal.formattedConvertedAmount` | `membershipOptions.eligibleMemberships` | `membershipOptions.eligibleMemberships.${number}._id` | `membershipOptions.eligibleMemberships.${number}.appId` | `membershipOptions.eligibleMemberships.${number}.name.original` | `membershipOptions.eligibleMemberships.${number}.lineItemIds` | `membershipOptions.eligibleMemberships.${number}.credits.total` | `membershipOptions.eligibleMemberships.${number}.credits.remaining` | `membershipOptions.invalidMemberships` | `membershipOptions.invalidMemberships.${number}.reason` | `membershipOptions.selectedMemberships.memberships` | `membershipOptions.selectedMemberships.memberships.${number}._id` | `membershipOptions.selectedMemberships.memberships.${number}.appId` | `membershipOptions.selectedMemberships.memberships.${number}.lineItemIds` | `additionalFees` | `additionalFees.${number}.name` | `additionalFees.${number}.price.amount` | `additionalFees.${number}.price.convertedAmount` | `additionalFees.${number}.price.formattedAmount` | `additionalFees.${number}.price.formattedConvertedAmount` | `additionalFees.${number}.taxDetails.taxRate` | `additionalFees.${number}.taxDetails.rateBreakdown` | `additionalFees.${number}.taxDetails.rateBreakdown.${number}.name` | `additionalFees.${number}.taxDetails.rateBreakdown.${number}.rate` | `additionalFees.${number}.lineItemIds` | `additionalFees.${number}.source` | `violations` | `violations.${number}.severity` | `violations.${number}.target.other.name` | `violations.${number}.target.lineItem.name` | `customSettings.lockGiftCard` | `customSettings.lockCouponCode` | `customSettings.disabledPolicyAgreementCheckbox` | `customSettings.disabledManualPayment` | `customContentReference.appId` | `customContentReference.componentId` | `externalReference.appId`;
|
|
3504
|
+
/**
|
|
3505
|
+
* Creates a checkout.
|
|
3506
|
+
*
|
|
3507
|
+
*
|
|
3508
|
+
* The `createCheckout()` function returns a Promise that resolves to the new checkout when it's created.
|
|
3509
|
+
*
|
|
3510
|
+
* > **Notes:**
|
|
3511
|
+
* > + Checkout must include at least 1 item in the `options.lineItems` array.
|
|
3512
|
+
* > + `options.channelType` is required.
|
|
3513
|
+
* > + If `_id` for `options.lineItems` is added, make sure that each `_id` is unique.
|
|
3514
|
+
* > + If `options.checkoutInfo.customFields` are added, then `options.checkoutInfo.customFields.value` is required.
|
|
3515
|
+
* @public
|
|
3516
|
+
* @requiredField options.channelType
|
|
3517
|
+
* @requiredField options.checkoutInfo.customFields.value
|
|
3518
|
+
* @requiredField options.checkoutInfo.membershipOptions.selectedMemberships.memberships._id
|
|
3519
|
+
* @requiredField options.checkoutInfo.membershipOptions.selectedMemberships.memberships.appId
|
|
3520
|
+
* @requiredField options.checkoutInfo.membershipOptions.selectedMemberships.memberships.lineItemIds
|
|
3521
|
+
* @requiredField options.customLineItems.descriptionLines.name
|
|
3522
|
+
* @requiredField options.customLineItems.descriptionLines.value
|
|
3523
|
+
* @requiredField options.customLineItems.itemType
|
|
3524
|
+
* @requiredField options.customLineItems.price
|
|
3525
|
+
* @requiredField options.customLineItems.productName
|
|
3526
|
+
* @requiredField options.customLineItems.quantity
|
|
3527
|
+
* @requiredField options.lineItems.catalogReference
|
|
3528
|
+
* @requiredField options.lineItems.catalogReference.appId
|
|
3529
|
+
* @requiredField options.lineItems.catalogReference.catalogItemId
|
|
3530
|
+
* @requiredField options.lineItems.quantity
|
|
3531
|
+
* @param options - Checkout creation options.
|
|
3532
|
+
* @permissionId ECOM.MODIFY_CHECKOUTS
|
|
3533
|
+
* @permissionId ECOM.ADMIN_MODIFY_CHECKOUTS
|
|
3534
|
+
* @permissionScope Manage Stores - all permissions
|
|
3535
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3536
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3537
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3538
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3539
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3540
|
+
* @permissionScope Manage Orders
|
|
3541
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
3542
|
+
* @permissionScope Manage Stores - all permissions
|
|
3543
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3544
|
+
* @permissionScope Manage eCommerce - Admin Permissions
|
|
3545
|
+
* @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN
|
|
3546
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3547
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3548
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3549
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3550
|
+
* @applicableIdentity APP
|
|
3551
|
+
* @applicableIdentity VISITOR
|
|
3552
|
+
* @returns Fulfilled - the newly created checkout.
|
|
3553
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.CreateCheckout
|
|
3554
|
+
*/
|
|
3555
|
+
export declare function createCheckout(options?: NonNullablePaths<CreateCheckoutOptions, `channelType` | `checkoutInfo.customFields.${number}.value` | `checkoutInfo.membershipOptions.selectedMemberships.memberships.${number}._id` | `checkoutInfo.membershipOptions.selectedMemberships.memberships.${number}.appId` | `checkoutInfo.membershipOptions.selectedMemberships.memberships.${number}.lineItemIds` | `customLineItems.${number}.descriptionLines` | `customLineItems.${number}.descriptionLines.${number}.name` | `customLineItems.${number}.itemType` | `customLineItems.${number}.price` | `customLineItems.${number}.productName` | `customLineItems.${number}.quantity` | `lineItems.${number}.catalogReference` | `lineItems.${number}.catalogReference.appId` | `lineItems.${number}.catalogReference.catalogItemId` | `lineItems.${number}.quantity`>): Promise<NonNullablePaths<Checkout, CheckoutNonNullablePaths>>;
|
|
3556
|
+
export interface CreateCheckoutOptions {
|
|
3598
3557
|
/** Checkout information. */
|
|
3599
3558
|
checkoutInfo?: Checkout;
|
|
3600
3559
|
/** The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
|
|
@@ -3630,7 +3589,142 @@ interface CreateCheckoutOptions {
|
|
|
3630
3589
|
*/
|
|
3631
3590
|
overrideCheckoutUrl?: string | null;
|
|
3632
3591
|
}
|
|
3633
|
-
|
|
3592
|
+
/**
|
|
3593
|
+
* Retrieves a checkout.
|
|
3594
|
+
*
|
|
3595
|
+
*
|
|
3596
|
+
* The `getCheckout()` function returns a Promise that resolves when the specified checkout is retrieved.
|
|
3597
|
+
* @param _id - Checkout ID.
|
|
3598
|
+
* @public
|
|
3599
|
+
* @requiredField _id
|
|
3600
|
+
* @permissionId ECOM.READ_CHECKOUTS
|
|
3601
|
+
* @permissionScope Manage Stores - all permissions
|
|
3602
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3603
|
+
* @permissionScope Read eCommerce - all read permissions
|
|
3604
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
3605
|
+
* @permissionScope Read Orders
|
|
3606
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
|
|
3607
|
+
* @permissionScope Read Stores - all read permissions
|
|
3608
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
3609
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3610
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3611
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3612
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3613
|
+
* @permissionScope Manage Orders
|
|
3614
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
3615
|
+
* @applicableIdentity APP
|
|
3616
|
+
* @applicableIdentity VISITOR
|
|
3617
|
+
* @returns Fulfilled - the requested checkout.
|
|
3618
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckout
|
|
3619
|
+
*/
|
|
3620
|
+
export declare function getCheckout(_id: string): Promise<NonNullablePaths<Checkout, CheckoutNonNullablePaths>>;
|
|
3621
|
+
/**
|
|
3622
|
+
* Retrieves the checkout associated with a specified cart.
|
|
3623
|
+
* @param _id - Cart ID.
|
|
3624
|
+
* @public
|
|
3625
|
+
* @requiredField _id
|
|
3626
|
+
* @permissionId ECOM.READ_CHECKOUTS
|
|
3627
|
+
* @permissionScope Manage Stores - all permissions
|
|
3628
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3629
|
+
* @permissionScope Read eCommerce - all read permissions
|
|
3630
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
3631
|
+
* @permissionScope Read Orders
|
|
3632
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
|
|
3633
|
+
* @permissionScope Read Stores - all read permissions
|
|
3634
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
3635
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3636
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3637
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3638
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3639
|
+
* @permissionScope Manage Orders
|
|
3640
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
3641
|
+
* @applicableIdentity APP
|
|
3642
|
+
* @applicableIdentity VISITOR
|
|
3643
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckoutByCartId
|
|
3644
|
+
*/
|
|
3645
|
+
export declare function getCheckoutByCartId(_id: string): Promise<NonNullablePaths<GetCheckoutByCartIdResponse, {
|
|
3646
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
3647
|
+
}[CheckoutNonNullablePaths]>>;
|
|
3648
|
+
/**
|
|
3649
|
+
* Retrieves the checkout page URL of a specified checkout.
|
|
3650
|
+
*
|
|
3651
|
+
* By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page.
|
|
3652
|
+
* However, if `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
|
|
3653
|
+
* @param _id - Checkout ID.
|
|
3654
|
+
* @public
|
|
3655
|
+
* @requiredField _id
|
|
3656
|
+
* @permissionId ECOM.READ_CHECKOUTS
|
|
3657
|
+
* @permissionScope Manage Stores - all permissions
|
|
3658
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3659
|
+
* @permissionScope Read eCommerce - all read permissions
|
|
3660
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
3661
|
+
* @permissionScope Read Orders
|
|
3662
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
|
|
3663
|
+
* @permissionScope Read Stores - all read permissions
|
|
3664
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
3665
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3666
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3667
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3668
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3669
|
+
* @permissionScope Manage Orders
|
|
3670
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
3671
|
+
* @applicableIdentity APP
|
|
3672
|
+
* @applicableIdentity VISITOR
|
|
3673
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckoutURL
|
|
3674
|
+
*/
|
|
3675
|
+
export declare function getCheckoutUrl(_id: string): Promise<NonNullablePaths<GetCheckoutURLResponse, `checkoutUrl`>>;
|
|
3676
|
+
/**
|
|
3677
|
+
* Updates a checkout.
|
|
3678
|
+
*
|
|
3679
|
+
*
|
|
3680
|
+
* The `updateCheckout()` function returns a Promise that resolves to the updated checkout when the specified properties are updated.
|
|
3681
|
+
*
|
|
3682
|
+
* >**Notes:**
|
|
3683
|
+
* > + If nothing is passed in the request, the call will fail.
|
|
3684
|
+
* > + The `checkout.buyerInfo.email` may not be removed once it is set.
|
|
3685
|
+
* @param _id - Checkout ID.
|
|
3686
|
+
* @public
|
|
3687
|
+
* @requiredField _id
|
|
3688
|
+
* @requiredField checkout
|
|
3689
|
+
* @requiredField checkout.customFields.value
|
|
3690
|
+
* @requiredField checkout.membershipOptions.selectedMemberships.memberships._id
|
|
3691
|
+
* @requiredField checkout.membershipOptions.selectedMemberships.memberships.appId
|
|
3692
|
+
* @requiredField checkout.membershipOptions.selectedMemberships.memberships.lineItemIds
|
|
3693
|
+
* @requiredField options.customLineItems.descriptionLines.name
|
|
3694
|
+
* @requiredField options.customLineItems.descriptionLines.value
|
|
3695
|
+
* @requiredField options.customLineItems.itemType
|
|
3696
|
+
* @requiredField options.customLineItems.productName
|
|
3697
|
+
* @requiredField options.customLineItems.quantity
|
|
3698
|
+
* @requiredField options.lineItems.catalogReference
|
|
3699
|
+
* @requiredField options.lineItems.catalogReference.appId
|
|
3700
|
+
* @requiredField options.lineItems.catalogReference.catalogItemId
|
|
3701
|
+
* @requiredField options.lineItems.quantity
|
|
3702
|
+
* @param options - Checkout update options.
|
|
3703
|
+
* @permissionId ECOM.MODIFY_CHECKOUTS
|
|
3704
|
+
* @permissionId ECOM.ADMIN_MODIFY_CHECKOUTS
|
|
3705
|
+
* @permissionScope Manage Stores - all permissions
|
|
3706
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3707
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3708
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3709
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3710
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3711
|
+
* @permissionScope Manage Orders
|
|
3712
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
3713
|
+
* @permissionScope Manage Stores - all permissions
|
|
3714
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3715
|
+
* @permissionScope Manage eCommerce - Admin Permissions
|
|
3716
|
+
* @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN
|
|
3717
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3718
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3719
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3720
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3721
|
+
* @applicableIdentity APP
|
|
3722
|
+
* @applicableIdentity VISITOR
|
|
3723
|
+
* @returns Updated checkout.
|
|
3724
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.UpdateCheckout
|
|
3725
|
+
*/
|
|
3726
|
+
export declare function updateCheckout(_id: string, checkout: NonNullablePaths<UpdateCheckout, `customFields.${number}.value` | `membershipOptions.selectedMemberships.memberships.${number}._id` | `membershipOptions.selectedMemberships.memberships.${number}.appId` | `membershipOptions.selectedMemberships.memberships.${number}.lineItemIds`>, options?: NonNullablePaths<UpdateCheckoutOptions, `customLineItems.${number}.descriptionLines` | `customLineItems.${number}.descriptionLines.${number}.name` | `customLineItems.${number}.itemType` | `customLineItems.${number}.productName` | `customLineItems.${number}.quantity` | `lineItems.${number}.catalogReference` | `lineItems.${number}.catalogReference.appId` | `lineItems.${number}.catalogReference.catalogItemId` | `lineItems.${number}.quantity`>): Promise<NonNullablePaths<Checkout, CheckoutNonNullablePaths>>;
|
|
3727
|
+
export interface UpdateCheckout {
|
|
3634
3728
|
/**
|
|
3635
3729
|
* Checkout ID.
|
|
3636
3730
|
* @format GUID
|
|
@@ -3804,21 +3898,6 @@ interface UpdateCheckout {
|
|
|
3804
3898
|
* @immutable
|
|
3805
3899
|
*/
|
|
3806
3900
|
externalReference?: ExternalReference;
|
|
3807
|
-
/**
|
|
3808
|
-
* Order ID.
|
|
3809
|
-
*
|
|
3810
|
-
* This field is empty until the checkout completes and becomes an order.
|
|
3811
|
-
* @internal
|
|
3812
|
-
* @format GUID
|
|
3813
|
-
* @readonly
|
|
3814
|
-
*/
|
|
3815
|
-
orderId?: string | null;
|
|
3816
|
-
/**
|
|
3817
|
-
* Payment for subscriptions after free trial period.
|
|
3818
|
-
* @internal
|
|
3819
|
-
* @readonly
|
|
3820
|
-
*/
|
|
3821
|
-
payAfterFreeTrial?: PriceSummary;
|
|
3822
3901
|
/**
|
|
3823
3902
|
* The business location ID associated with the checkout.
|
|
3824
3903
|
*
|
|
@@ -3826,25 +3905,8 @@ interface UpdateCheckout {
|
|
|
3826
3905
|
* @format GUID
|
|
3827
3906
|
*/
|
|
3828
3907
|
businessLocationId?: string | null;
|
|
3829
|
-
/**
|
|
3830
|
-
* Whether payment is required to create an order.
|
|
3831
|
-
*
|
|
3832
|
-
* Payment is required if any of the following conditions are met:
|
|
3833
|
-
* 1. At least one item requires a payment method. This can be because the item has the `savePaymentMethod` field set to `true`, or the item is a subscription with a price greater than zero.
|
|
3834
|
-
* 2. The calculated total amount due for immediate payment is greater than zero - `checkout.payNow > 0`.
|
|
3835
|
-
* @internal
|
|
3836
|
-
* @readonly
|
|
3837
|
-
*/
|
|
3838
|
-
paymentRequired?: boolean;
|
|
3839
|
-
/**
|
|
3840
|
-
* Charges information for each subscription in the checkout.
|
|
3841
|
-
* @internal
|
|
3842
|
-
* @readonly
|
|
3843
|
-
* @maxSize 100
|
|
3844
|
-
*/
|
|
3845
|
-
subscriptionCharges?: SubscriptionCharges[];
|
|
3846
3908
|
}
|
|
3847
|
-
interface UpdateCheckoutOptions {
|
|
3909
|
+
export interface UpdateCheckoutOptions {
|
|
3848
3910
|
/** The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */
|
|
3849
3911
|
couponCode?: string | null;
|
|
3850
3912
|
/** Gift card code. */
|
|
@@ -3870,7 +3932,127 @@ interface UpdateCheckoutOptions {
|
|
|
3870
3932
|
*/
|
|
3871
3933
|
customLineItems?: CustomLineItem[];
|
|
3872
3934
|
}
|
|
3873
|
-
|
|
3935
|
+
/**
|
|
3936
|
+
* Removes the coupon from a specified checkout.
|
|
3937
|
+
*
|
|
3938
|
+
*
|
|
3939
|
+
* The `removeCoupon()` function returns a Promise that resolves to the updated checkout when the coupon is removed from the specified checkout.
|
|
3940
|
+
*
|
|
3941
|
+
* >**Note:** A checkout can only hold 1 coupon.
|
|
3942
|
+
* @param _id - ID of the checkout to remove the coupon from.
|
|
3943
|
+
* @public
|
|
3944
|
+
* @requiredField _id
|
|
3945
|
+
* @permissionId ECOM.MODIFY_CHECKOUTS
|
|
3946
|
+
* @permissionScope Manage Stores - all permissions
|
|
3947
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3948
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3949
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3950
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3951
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3952
|
+
* @permissionScope Manage Orders
|
|
3953
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
3954
|
+
* @applicableIdentity APP
|
|
3955
|
+
* @applicableIdentity VISITOR
|
|
3956
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.RemoveCoupon
|
|
3957
|
+
*/
|
|
3958
|
+
export declare function removeCoupon(_id: string): Promise<NonNullablePaths<RemoveCouponResponse, {
|
|
3959
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
3960
|
+
}[CheckoutNonNullablePaths]>>;
|
|
3961
|
+
/**
|
|
3962
|
+
* Removes the gift card from a specified checkout.
|
|
3963
|
+
*
|
|
3964
|
+
*
|
|
3965
|
+
* The `removeGiftCard()` function returns a Promise that resolves to the updated checkout when the gift card is removed from the specified checkout.
|
|
3966
|
+
*
|
|
3967
|
+
* >**Note:** A checkout can only hold 1 gift card.
|
|
3968
|
+
* @param _id - ID of the checkout to remove the gift card from.
|
|
3969
|
+
* @public
|
|
3970
|
+
* @requiredField _id
|
|
3971
|
+
* @permissionId ECOM.MODIFY_CHECKOUTS
|
|
3972
|
+
* @permissionScope Manage Stores - all permissions
|
|
3973
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3974
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3975
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3976
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3977
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3978
|
+
* @permissionScope Manage Orders
|
|
3979
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
3980
|
+
* @applicableIdentity APP
|
|
3981
|
+
* @applicableIdentity VISITOR
|
|
3982
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.RemoveGiftCard
|
|
3983
|
+
*/
|
|
3984
|
+
export declare function removeGiftCard(_id: string): Promise<NonNullablePaths<RemoveGiftCardResponse, {
|
|
3985
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
3986
|
+
}[CheckoutNonNullablePaths]>>;
|
|
3987
|
+
/**
|
|
3988
|
+
* Removes the `overrideCheckoutUrl` from a specified checkout.
|
|
3989
|
+
*
|
|
3990
|
+
* When `overrideCheckoutUrl` is removed, the `checkoutUrl` will be set to the default, standard
|
|
3991
|
+
* Wix checkout page URL.
|
|
3992
|
+
* @param _id - ID of the checkout to remove the override checkout url from.
|
|
3993
|
+
* @public
|
|
3994
|
+
* @requiredField _id
|
|
3995
|
+
* @permissionId ECOM.MODIFY_CHECKOUTS
|
|
3996
|
+
* @permissionScope Manage Stores - all permissions
|
|
3997
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3998
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3999
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4000
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
4001
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
4002
|
+
* @permissionScope Manage Orders
|
|
4003
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
4004
|
+
* @applicableIdentity APP
|
|
4005
|
+
* @applicableIdentity VISITOR
|
|
4006
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.RemoveOverrideCheckoutUrl
|
|
4007
|
+
*/
|
|
4008
|
+
export declare function removeOverrideCheckoutUrl(_id: string): Promise<NonNullablePaths<RemoveOverrideCheckoutUrlResponse, {
|
|
4009
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
4010
|
+
}[CheckoutNonNullablePaths]>>;
|
|
4011
|
+
/**
|
|
4012
|
+
* Adds catalog line items and/or custom line items to a checkout.
|
|
4013
|
+
*
|
|
4014
|
+
*
|
|
4015
|
+
* The `addToCheckout()` function returns a Promise that resolves to the updated checkout when the specified items have been added.
|
|
4016
|
+
* > **Note:** When adding catalog items, `options.lineItems.catalogReference` is required.
|
|
4017
|
+
* @param _id - Checkout ID.
|
|
4018
|
+
* @public
|
|
4019
|
+
* @requiredField _id
|
|
4020
|
+
* @requiredField options.customLineItems.descriptionLines.name
|
|
4021
|
+
* @requiredField options.customLineItems.descriptionLines.value
|
|
4022
|
+
* @requiredField options.customLineItems.itemType
|
|
4023
|
+
* @requiredField options.customLineItems.productName
|
|
4024
|
+
* @requiredField options.customLineItems.quantity
|
|
4025
|
+
* @requiredField options.lineItems.catalogReference
|
|
4026
|
+
* @requiredField options.lineItems.catalogReference.appId
|
|
4027
|
+
* @requiredField options.lineItems.catalogReference.catalogItemId
|
|
4028
|
+
* @requiredField options.lineItems.quantity
|
|
4029
|
+
* @param options - Items to be added to checkout.
|
|
4030
|
+
* @permissionId ECOM.MODIFY_CHECKOUTS
|
|
4031
|
+
* @permissionId ECOM.ADMIN_MODIFY_CHECKOUTS
|
|
4032
|
+
* @permissionScope Manage Stores - all permissions
|
|
4033
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4034
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
4035
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4036
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
4037
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
4038
|
+
* @permissionScope Manage Orders
|
|
4039
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
4040
|
+
* @permissionScope Manage Stores - all permissions
|
|
4041
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4042
|
+
* @permissionScope Manage eCommerce - Admin Permissions
|
|
4043
|
+
* @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN
|
|
4044
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
4045
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4046
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
4047
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
4048
|
+
* @applicableIdentity APP
|
|
4049
|
+
* @applicableIdentity VISITOR
|
|
4050
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.AddToCheckout
|
|
4051
|
+
*/
|
|
4052
|
+
export declare function addToCheckout(_id: string, options?: NonNullablePaths<AddToCheckoutOptions, `customLineItems.${number}.descriptionLines` | `customLineItems.${number}.descriptionLines.${number}.name` | `customLineItems.${number}.itemType` | `customLineItems.${number}.productName` | `customLineItems.${number}.quantity` | `lineItems.${number}.catalogReference` | `lineItems.${number}.catalogReference.appId` | `lineItems.${number}.catalogReference.catalogItemId` | `lineItems.${number}.quantity`>): Promise<NonNullablePaths<AddToCheckoutResponse, {
|
|
4053
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
4054
|
+
}[CheckoutNonNullablePaths]>>;
|
|
4055
|
+
export interface AddToCheckoutOptions {
|
|
3874
4056
|
/**
|
|
3875
4057
|
* Catalog line items.
|
|
3876
4058
|
* @maxSize 100
|
|
@@ -3885,13 +4067,71 @@ interface AddToCheckoutOptions {
|
|
|
3885
4067
|
*/
|
|
3886
4068
|
customLineItems?: CustomLineItem[];
|
|
3887
4069
|
}
|
|
3888
|
-
|
|
4070
|
+
/**
|
|
4071
|
+
* Removes line items from the specified checkout.
|
|
4072
|
+
*
|
|
4073
|
+
*
|
|
4074
|
+
* The `removeLineItems()` function returns a Promise that resolves to the updated checkout when the line items are removed from the specified checkout.
|
|
4075
|
+
* @param _id - ID of the checkout to remove line items from.
|
|
4076
|
+
* @public
|
|
4077
|
+
* @requiredField _id
|
|
4078
|
+
* @requiredField lineItemIds
|
|
4079
|
+
* @param lineItemIds - IDs of the line items to be removed.
|
|
4080
|
+
* To find the IDs of the checkout line items you'd like to remove, pass the `checkout._id` to [getCheckout()](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/getcheckout) and look for the IDs under `lineItems` and/or `customLineItems`.
|
|
4081
|
+
* @permissionId ECOM.MODIFY_CHECKOUTS
|
|
4082
|
+
* @permissionScope Manage Stores - all permissions
|
|
4083
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4084
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
4085
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4086
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
4087
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
4088
|
+
* @permissionScope Manage Orders
|
|
4089
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
4090
|
+
* @applicableIdentity APP
|
|
4091
|
+
* @applicableIdentity VISITOR
|
|
4092
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.RemoveLineItems
|
|
4093
|
+
*/
|
|
4094
|
+
export declare function removeLineItems(_id: string, lineItemIds: string[]): Promise<NonNullablePaths<RemoveLineItemsResponse, {
|
|
4095
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
4096
|
+
}[CheckoutNonNullablePaths]>>;
|
|
4097
|
+
/**
|
|
4098
|
+
* Creates an order from a specified checkout.
|
|
4099
|
+
*
|
|
4100
|
+
* The `createOrder()` function returns a Promise that resolves to the new order's ID and `paymentGatewayOrderID` when the order is created.
|
|
4101
|
+
* Pass the `paymentGatewayOrderId` as the `paymentId` param to the [`startPayment()`](https://www.wix.com/velo/reference/wix-pay-frontend/startpayment) function to allow a customer to pay for their order.
|
|
4102
|
+
*
|
|
4103
|
+
* > **Note:** The following requirements must be met for an order to be created from a checkout.
|
|
4104
|
+
* > + A checkout cannot have calculation errors. Pass the `checkout._id` to [Get Checkout](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/getcheckout) and take a look at the `calculationErrors` field.
|
|
4105
|
+
* > + A checkout must have at least 1 line item.
|
|
4106
|
+
* > + All of the line Items have an `availability.status` of `"AVAILABLE"` or `"PARTIALLY_AVAILABLE"`.
|
|
4107
|
+
* > + If there is a payment to be made, meaning that `priceSummary.total` is greater than 0, the `billingInfo.address` field must be provided.
|
|
4108
|
+
* > + When a checkout has line items to be shipped, the `shippingInfo.shippingDestination.address` and `shippingInfo.selectedCarrierServiceOption` fields must be provided.
|
|
4109
|
+
* > + When a checkout has line items for pickup, the `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails` field must be provided.
|
|
4110
|
+
* @param _id - Checkout ID.
|
|
4111
|
+
* @public
|
|
4112
|
+
* @requiredField _id
|
|
4113
|
+
* @param options - Further order creation options.
|
|
4114
|
+
* @permissionId ECOM.CREATE_ORDER_FROM_CHECKOUT
|
|
4115
|
+
* @permissionScope Manage Stores - all permissions
|
|
4116
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4117
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
4118
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4119
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
4120
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
4121
|
+
* @permissionScope Manage Orders
|
|
4122
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
4123
|
+
* @applicableIdentity APP
|
|
4124
|
+
* @applicableIdentity VISITOR
|
|
4125
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.CreateOrder
|
|
4126
|
+
*/
|
|
4127
|
+
export declare function createOrder(_id: string, options?: CreateOrderOptions): Promise<NonNullablePaths<CreateOrderResponse, `orderId` | `subscriptionId`>>;
|
|
4128
|
+
export interface CreateOrderOptions {
|
|
3889
4129
|
/** Whether the payment method should be saved on the order. */
|
|
3890
4130
|
savePaymentMethod?: boolean;
|
|
3891
4131
|
/** Whether to authorize the payment and delay the capture. */
|
|
3892
4132
|
delayCapture?: boolean;
|
|
3893
4133
|
}
|
|
3894
|
-
interface CreateOrderAndChargeOptions {
|
|
4134
|
+
export interface CreateOrderAndChargeOptions {
|
|
3895
4135
|
/** Payment token. */
|
|
3896
4136
|
paymentToken?: string | null;
|
|
3897
4137
|
/** Whether the payment method should be saved on the order. */
|
|
@@ -3899,5 +4139,59 @@ interface CreateOrderAndChargeOptions {
|
|
|
3899
4139
|
/** Whether to authorize the payment and delay the capture. */
|
|
3900
4140
|
delayCapture?: boolean;
|
|
3901
4141
|
}
|
|
3902
|
-
|
|
3903
|
-
|
|
4142
|
+
/**
|
|
4143
|
+
* Marks a checkout as completed - `checkout.complete` boolean is set to `true`.
|
|
4144
|
+
*
|
|
4145
|
+
*
|
|
4146
|
+
* The `markCheckoutAsCompleted()` function returns a Promise that resolves when the specified checkout is marked as completed.
|
|
4147
|
+
* @param _id - Checkout ID.
|
|
4148
|
+
* @public
|
|
4149
|
+
* @requiredField _id
|
|
4150
|
+
* @permissionId ECOM.MODIFY_CHECKOUTS
|
|
4151
|
+
* @permissionScope Manage Stores - all permissions
|
|
4152
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4153
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
4154
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4155
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
4156
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
4157
|
+
* @permissionScope Manage Orders
|
|
4158
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
4159
|
+
* @applicableIdentity APP
|
|
4160
|
+
* @applicableIdentity VISITOR
|
|
4161
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.MarkCheckoutAsCompleted
|
|
4162
|
+
*/
|
|
4163
|
+
export declare function markCheckoutAsCompleted(_id: string): Promise<void>;
|
|
4164
|
+
/**
|
|
4165
|
+
* Updates the quantity of one or more line items in a checkout.
|
|
4166
|
+
*
|
|
4167
|
+
* This endpoint is only for updating the quantity of line items. To entirely remove a line item from
|
|
4168
|
+
* the checkout, use [`removeLineItems()`](#removelineitems).
|
|
4169
|
+
* To add a new line item to the checkout, use [`addToCheckout()`](#addtocheckout).
|
|
4170
|
+
*
|
|
4171
|
+
* This endpoint checks the amount of stock remaining for this line item. If the specified `quantity`
|
|
4172
|
+
* is greater than the remaining stock, then the `quantity` returned in the response is the total amount
|
|
4173
|
+
* of remaining stock.
|
|
4174
|
+
* @param _id - Checkout ID.
|
|
4175
|
+
* @param lineItems - Line item info to update.
|
|
4176
|
+
* @public
|
|
4177
|
+
* @requiredField _id
|
|
4178
|
+
* @requiredField lineItems
|
|
4179
|
+
* @requiredField lineItems._id
|
|
4180
|
+
* @requiredField lineItems.quantity
|
|
4181
|
+
* @permissionId ECOM.MODIFY_CHECKOUTS
|
|
4182
|
+
* @permissionScope Manage Stores - all permissions
|
|
4183
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4184
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
4185
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4186
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
4187
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
4188
|
+
* @permissionScope Manage Orders
|
|
4189
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
4190
|
+
* @applicableIdentity APP
|
|
4191
|
+
* @applicableIdentity VISITOR
|
|
4192
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.UpdateLineItemsQuantity
|
|
4193
|
+
*/
|
|
4194
|
+
export declare function updateLineItemsQuantity(_id: string, lineItems: NonNullablePaths<LineItemQuantityUpdate, `_id` | `quantity`>[]): Promise<NonNullablePaths<UpdateLineItemsQuantityResponse, {
|
|
4195
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
4196
|
+
}[CheckoutNonNullablePaths]>>;
|
|
4197
|
+
export {};
|