@wix/auto_sdk_ecom_checkout 1.0.16 → 1.0.18
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-C4Y04uL3.d.mts → cjs/src/ecom-v1-checkout-checkout.types.d.ts} +382 -658
- package/build/cjs/src/ecom-v1-checkout-checkout.types.js +301 -0
- package/build/cjs/src/ecom-v1-checkout-checkout.types.js.map +1 -0
- package/build/{internal/ecom-v1-checkout-checkout.universal-ClmAJ_ss.d.mts → cjs/src/ecom-v1-checkout-checkout.universal.d.ts} +743 -449
- package/build/cjs/src/ecom-v1-checkout-checkout.universal.js +1559 -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-C4Y04uL3.d.ts → es/src/ecom-v1-checkout-checkout.types.d.ts} +382 -658
- package/build/es/src/ecom-v1-checkout-checkout.types.js +298 -0
- package/build/es/src/ecom-v1-checkout-checkout.types.js.map +1 -0
- package/build/{internal/ecom-v1-checkout-checkout.universal-ClmAJ_ss.d.ts → es/src/ecom-v1-checkout-checkout.universal.d.ts} +743 -449
- package/build/es/src/ecom-v1-checkout-checkout.universal.js +1516 -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 +3406 -0
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.types.js +301 -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 +4468 -0
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.universal.js +1559 -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 +3406 -0
- package/build/internal/es/src/ecom-v1-checkout-checkout.types.js +298 -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 +4468 -0
- package/build/internal/es/src/ecom-v1-checkout-checkout.universal.js +1516 -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 -2322
- package/build/internal/meta.d.ts +0 -2322
- 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 -2322
- package/build/meta.d.ts +0 -2322
- 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
|
|
@@ -167,20 +168,11 @@ interface Checkout {
|
|
|
167
168
|
*/
|
|
168
169
|
customContentReference?: CustomContentReference;
|
|
169
170
|
/**
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
* @internal
|
|
174
|
-
* @format GUID
|
|
175
|
-
* @readonly
|
|
176
|
-
*/
|
|
177
|
-
orderId?: string | null;
|
|
178
|
-
/**
|
|
179
|
-
* Payment for subscriptions after free trial period.
|
|
180
|
-
* @internal
|
|
181
|
-
* @readonly
|
|
171
|
+
* References to an external app and resource associated with this checkout.
|
|
172
|
+
* Used for integration and tracking across different platforms.
|
|
173
|
+
* @immutable
|
|
182
174
|
*/
|
|
183
|
-
|
|
175
|
+
externalReference?: ExternalReference;
|
|
184
176
|
/**
|
|
185
177
|
* The business location ID associated with the checkout.
|
|
186
178
|
*
|
|
@@ -188,25 +180,8 @@ interface Checkout {
|
|
|
188
180
|
* @format GUID
|
|
189
181
|
*/
|
|
190
182
|
businessLocationId?: string | null;
|
|
191
|
-
/**
|
|
192
|
-
* Whether payment is required to create an order.
|
|
193
|
-
*
|
|
194
|
-
* Payment is required if any of the following conditions are met:
|
|
195
|
-
* 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.
|
|
196
|
-
* 2. The calculated total amount due for immediate payment is greater than zero - `checkout.payNow > 0`.
|
|
197
|
-
* @internal
|
|
198
|
-
* @readonly
|
|
199
|
-
*/
|
|
200
|
-
paymentRequired?: boolean;
|
|
201
|
-
/**
|
|
202
|
-
* Charges information for each subscription in the checkout.
|
|
203
|
-
* @internal
|
|
204
|
-
* @readonly
|
|
205
|
-
* @maxSize 100
|
|
206
|
-
*/
|
|
207
|
-
subscriptionCharges?: SubscriptionCharges[];
|
|
208
183
|
}
|
|
209
|
-
interface LineItem {
|
|
184
|
+
export interface LineItem {
|
|
210
185
|
/**
|
|
211
186
|
* Line item ID.
|
|
212
187
|
* @format GUID
|
|
@@ -366,18 +341,6 @@ interface LineItem {
|
|
|
366
341
|
* Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
367
342
|
*/
|
|
368
343
|
catalogOverrideFields?: CatalogOverrideFields;
|
|
369
|
-
/**
|
|
370
|
-
* Whether the price is not yet defined, and will be updated after the order is created.
|
|
371
|
-
* @internal
|
|
372
|
-
* @readonly
|
|
373
|
-
*/
|
|
374
|
-
priceUndetermined?: boolean;
|
|
375
|
-
/**
|
|
376
|
-
* Whether the line item quantity is fixed and cannot be changed.
|
|
377
|
-
* @internal
|
|
378
|
-
* @readonly
|
|
379
|
-
*/
|
|
380
|
-
fixedQuantity?: boolean;
|
|
381
344
|
/**
|
|
382
345
|
* Whether to save the payment method on the order.
|
|
383
346
|
*
|
|
@@ -385,55 +348,9 @@ interface LineItem {
|
|
|
385
348
|
* @readonly
|
|
386
349
|
*/
|
|
387
350
|
savePaymentMethod?: boolean;
|
|
388
|
-
/**
|
|
389
|
-
* Address to use for tax calculation purposes.
|
|
390
|
-
* @internal
|
|
391
|
-
*/
|
|
392
|
-
taxableAddress?: TaxableAddress;
|
|
393
|
-
/**
|
|
394
|
-
* Custom extended fields for the line item object.
|
|
395
|
-
*
|
|
396
|
-
* [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.
|
|
397
|
-
* @internal
|
|
398
|
-
*/
|
|
399
|
-
extendedFields?: ExtendedFields;
|
|
400
|
-
/**
|
|
401
|
-
* Policies to be displayed to the customer on the checkout page.
|
|
402
|
-
* @internal
|
|
403
|
-
* @readonly
|
|
404
|
-
* @maxSize 5
|
|
405
|
-
*/
|
|
406
|
-
policies?: Policy[];
|
|
407
|
-
/**
|
|
408
|
-
* ID of the app managing the inventory.
|
|
409
|
-
* @internal
|
|
410
|
-
* @format GUID
|
|
411
|
-
*/
|
|
412
|
-
inventoryAppId?: string | null;
|
|
413
|
-
/**
|
|
414
|
-
* Whether the item can only be purchased by site members.
|
|
415
|
-
*
|
|
416
|
-
* Default: `false`
|
|
417
|
-
* @internal
|
|
418
|
-
* @readonly
|
|
419
|
-
*/
|
|
420
|
-
membersOnly?: boolean;
|
|
421
|
-
/**
|
|
422
|
-
* Modifier groups that were added to the item.
|
|
423
|
-
* @internal
|
|
424
|
-
* @readonly
|
|
425
|
-
* @maxSize 10
|
|
426
|
-
*/
|
|
427
|
-
modifierGroups?: ModifierGroup[];
|
|
428
|
-
/**
|
|
429
|
-
* Total price of all item modifiers. Included in the item price.
|
|
430
|
-
* @internal
|
|
431
|
-
* @readonly
|
|
432
|
-
*/
|
|
433
|
-
modifiersTotalPrice?: MultiCurrencyPrice;
|
|
434
351
|
}
|
|
435
352
|
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
436
|
-
interface CatalogReference {
|
|
353
|
+
export interface CatalogReference {
|
|
437
354
|
/**
|
|
438
355
|
* ID of the item within the catalog it belongs to.
|
|
439
356
|
* @minLength 1
|
|
@@ -461,7 +378,7 @@ interface CatalogReference {
|
|
|
461
378
|
*/
|
|
462
379
|
options?: Record<string, any> | null;
|
|
463
380
|
}
|
|
464
|
-
interface ProductName {
|
|
381
|
+
export interface ProductName {
|
|
465
382
|
/**
|
|
466
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).
|
|
467
384
|
*
|
|
@@ -482,7 +399,7 @@ interface ProductName {
|
|
|
482
399
|
*/
|
|
483
400
|
translated?: string | null;
|
|
484
401
|
}
|
|
485
|
-
interface MultiCurrencyPrice {
|
|
402
|
+
export interface MultiCurrencyPrice {
|
|
486
403
|
/**
|
|
487
404
|
* Amount.
|
|
488
405
|
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
@@ -505,7 +422,7 @@ interface MultiCurrencyPrice {
|
|
|
505
422
|
*/
|
|
506
423
|
formattedConvertedAmount?: string;
|
|
507
424
|
}
|
|
508
|
-
interface ItemTaxFullDetails {
|
|
425
|
+
export interface ItemTaxFullDetails {
|
|
509
426
|
/** Amount for which tax is calculated. */
|
|
510
427
|
taxableAmount?: MultiCurrencyPrice;
|
|
511
428
|
/**
|
|
@@ -522,7 +439,7 @@ interface ItemTaxFullDetails {
|
|
|
522
439
|
*/
|
|
523
440
|
rateBreakdown?: TaxRateBreakdown[];
|
|
524
441
|
}
|
|
525
|
-
interface TaxRateBreakdown {
|
|
442
|
+
export interface TaxRateBreakdown {
|
|
526
443
|
/**
|
|
527
444
|
* Name of tax against which the calculation was performed.
|
|
528
445
|
* @maxLength 100
|
|
@@ -540,7 +457,7 @@ interface TaxRateBreakdown {
|
|
|
540
457
|
* TaxBreakdown represents tax information for a line item.
|
|
541
458
|
* It holds the tax amount and the tax rate for each tax authority that apply on the line item.
|
|
542
459
|
*/
|
|
543
|
-
interface TaxBreakdown {
|
|
460
|
+
export interface TaxBreakdown {
|
|
544
461
|
/**
|
|
545
462
|
* The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec".
|
|
546
463
|
* @maxLength 200
|
|
@@ -572,7 +489,7 @@ interface TaxBreakdown {
|
|
|
572
489
|
jurisdictionType?: JurisdictionType;
|
|
573
490
|
}
|
|
574
491
|
/** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
|
|
575
|
-
declare enum JurisdictionType {
|
|
492
|
+
export declare enum JurisdictionType {
|
|
576
493
|
UNDEFINED = "UNDEFINED",
|
|
577
494
|
COUNTRY = "COUNTRY",
|
|
578
495
|
STATE = "STATE",
|
|
@@ -580,7 +497,7 @@ declare enum JurisdictionType {
|
|
|
580
497
|
CITY = "CITY",
|
|
581
498
|
SPECIAL = "SPECIAL"
|
|
582
499
|
}
|
|
583
|
-
interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf {
|
|
500
|
+
export interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf {
|
|
584
501
|
/** Description line plain text value. */
|
|
585
502
|
plainText?: PlainTextValue;
|
|
586
503
|
/** Description line color value. */
|
|
@@ -589,16 +506,16 @@ interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDesc
|
|
|
589
506
|
name?: DescriptionLineName;
|
|
590
507
|
}
|
|
591
508
|
/** @oneof */
|
|
592
|
-
interface DescriptionLineValueOneOf {
|
|
509
|
+
export interface DescriptionLineValueOneOf {
|
|
593
510
|
/** Description line plain text value. */
|
|
594
511
|
plainText?: PlainTextValue;
|
|
595
512
|
/** Description line color value. */
|
|
596
513
|
colorInfo?: Color;
|
|
597
514
|
}
|
|
598
515
|
/** @oneof */
|
|
599
|
-
interface DescriptionLineDescriptionLineValueOneOf {
|
|
516
|
+
export interface DescriptionLineDescriptionLineValueOneOf {
|
|
600
517
|
}
|
|
601
|
-
interface DescriptionLineName {
|
|
518
|
+
export interface DescriptionLineName {
|
|
602
519
|
/**
|
|
603
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).
|
|
604
521
|
* @maxLength 100
|
|
@@ -612,7 +529,7 @@ interface DescriptionLineName {
|
|
|
612
529
|
*/
|
|
613
530
|
translated?: string | null;
|
|
614
531
|
}
|
|
615
|
-
interface PlainTextValue {
|
|
532
|
+
export interface PlainTextValue {
|
|
616
533
|
/**
|
|
617
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).
|
|
618
535
|
* @maxLength 600
|
|
@@ -626,7 +543,7 @@ interface PlainTextValue {
|
|
|
626
543
|
*/
|
|
627
544
|
translated?: string | null;
|
|
628
545
|
}
|
|
629
|
-
interface Color {
|
|
546
|
+
export interface Color {
|
|
630
547
|
/**
|
|
631
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).
|
|
632
549
|
* @maxLength 500
|
|
@@ -642,7 +559,7 @@ interface Color {
|
|
|
642
559
|
/** HEX or RGB color code for display. */
|
|
643
560
|
code?: string | null;
|
|
644
561
|
}
|
|
645
|
-
declare enum DescriptionLineType {
|
|
562
|
+
export declare enum DescriptionLineType {
|
|
646
563
|
/** Unrecognized type. */
|
|
647
564
|
UNRECOGNISED = "UNRECOGNISED",
|
|
648
565
|
/** Plain text type. */
|
|
@@ -650,7 +567,7 @@ declare enum DescriptionLineType {
|
|
|
650
567
|
/** Color type. */
|
|
651
568
|
COLOR = "COLOR"
|
|
652
569
|
}
|
|
653
|
-
interface FocalPoint {
|
|
570
|
+
export interface FocalPoint {
|
|
654
571
|
/** X-coordinate of the focal point. */
|
|
655
572
|
x?: number;
|
|
656
573
|
/** Y-coordinate of the focal point. */
|
|
@@ -660,13 +577,13 @@ interface FocalPoint {
|
|
|
660
577
|
/** crop by width */
|
|
661
578
|
width?: number | null;
|
|
662
579
|
}
|
|
663
|
-
interface ItemAvailabilityInfo {
|
|
580
|
+
export interface ItemAvailabilityInfo {
|
|
664
581
|
/** Item availability status. */
|
|
665
582
|
status?: ItemAvailabilityStatus;
|
|
666
583
|
/** Quantity available. */
|
|
667
584
|
quantityAvailable?: number | null;
|
|
668
585
|
}
|
|
669
|
-
declare enum ItemAvailabilityStatus {
|
|
586
|
+
export declare enum ItemAvailabilityStatus {
|
|
670
587
|
AVAILABLE = "AVAILABLE",
|
|
671
588
|
/** Item does not exist. */
|
|
672
589
|
NOT_FOUND = "NOT_FOUND",
|
|
@@ -675,7 +592,7 @@ declare enum ItemAvailabilityStatus {
|
|
|
675
592
|
/** Available quantity is less than requested. */
|
|
676
593
|
PARTIALLY_AVAILABLE = "PARTIALLY_AVAILABLE"
|
|
677
594
|
}
|
|
678
|
-
interface PhysicalProperties {
|
|
595
|
+
export interface PhysicalProperties {
|
|
679
596
|
/** Line item weight. Measurement unit (`"KG"` or `"LB"`) is taken from `order.weightUnit`. */
|
|
680
597
|
weight?: number | null;
|
|
681
598
|
/**
|
|
@@ -686,39 +603,39 @@ interface PhysicalProperties {
|
|
|
686
603
|
/** Whether this line item is shippable. */
|
|
687
604
|
shippable?: boolean;
|
|
688
605
|
}
|
|
689
|
-
interface Scope {
|
|
606
|
+
export interface Scope {
|
|
690
607
|
/** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
|
|
691
608
|
namespace?: string;
|
|
692
609
|
/** Coupon scope's applied group (e.g., event or ticket in Wix Events) */
|
|
693
610
|
group?: Group;
|
|
694
611
|
}
|
|
695
|
-
interface Group {
|
|
612
|
+
export interface Group {
|
|
696
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). */
|
|
697
614
|
name?: string;
|
|
698
615
|
/** Item ID (when the coupon scope is limited to just one item). */
|
|
699
616
|
entityId?: string | null;
|
|
700
617
|
}
|
|
701
|
-
interface ItemType extends ItemTypeItemTypeDataOneOf {
|
|
618
|
+
export interface ItemType extends ItemTypeItemTypeDataOneOf {
|
|
702
619
|
/** Preset item type. */
|
|
703
620
|
preset?: ItemTypeItemType;
|
|
704
621
|
/** Custom item type. When none of the preset types are suitable, specifies the custom type. */
|
|
705
622
|
custom?: string;
|
|
706
623
|
}
|
|
707
624
|
/** @oneof */
|
|
708
|
-
interface ItemTypeItemTypeDataOneOf {
|
|
625
|
+
export interface ItemTypeItemTypeDataOneOf {
|
|
709
626
|
/** Preset item type. */
|
|
710
627
|
preset?: ItemTypeItemType;
|
|
711
628
|
/** Custom item type. When none of the preset types are suitable, specifies the custom type. */
|
|
712
629
|
custom?: string;
|
|
713
630
|
}
|
|
714
|
-
declare enum ItemTypeItemType {
|
|
631
|
+
export declare enum ItemTypeItemType {
|
|
715
632
|
UNRECOGNISED = "UNRECOGNISED",
|
|
716
633
|
PHYSICAL = "PHYSICAL",
|
|
717
634
|
DIGITAL = "DIGITAL",
|
|
718
635
|
GIFT_CARD = "GIFT_CARD",
|
|
719
636
|
SERVICE = "SERVICE"
|
|
720
637
|
}
|
|
721
|
-
interface SubscriptionOptionInfo {
|
|
638
|
+
export interface SubscriptionOptionInfo {
|
|
722
639
|
/** Subscription option settings. */
|
|
723
640
|
subscriptionSettings?: SubscriptionSettings;
|
|
724
641
|
/** Subscription option title. */
|
|
@@ -726,7 +643,7 @@ interface SubscriptionOptionInfo {
|
|
|
726
643
|
/** Subscription option description. */
|
|
727
644
|
description?: Description;
|
|
728
645
|
}
|
|
729
|
-
interface SubscriptionSettings {
|
|
646
|
+
export interface SubscriptionSettings {
|
|
730
647
|
/** Frequency of recurring payment. */
|
|
731
648
|
frequency?: SubscriptionFrequency;
|
|
732
649
|
/**
|
|
@@ -745,32 +662,16 @@ interface SubscriptionSettings {
|
|
|
745
662
|
* @min 1
|
|
746
663
|
*/
|
|
747
664
|
billingCycles?: number | null;
|
|
748
|
-
/**
|
|
749
|
-
* Whether to allow the customer to cancel the subscription..
|
|
750
|
-
* @internal
|
|
751
|
-
*/
|
|
752
|
-
enableCustomerCancellation?: boolean;
|
|
753
|
-
/**
|
|
754
|
-
* Period until first cycle starts. If applied payNow will be 0
|
|
755
|
-
* If None => no free trial
|
|
756
|
-
* @internal
|
|
757
|
-
*/
|
|
758
|
-
freeTrialPeriod?: FreeTrialPeriod;
|
|
759
|
-
/**
|
|
760
|
-
* The date the subscription will start. The subscription will be charged either now or according to freeTrialDays.
|
|
761
|
-
* @internal
|
|
762
|
-
*/
|
|
763
|
-
startDate?: Date | null;
|
|
764
665
|
}
|
|
765
666
|
/** Frequency unit of recurring payment */
|
|
766
|
-
declare enum SubscriptionFrequency {
|
|
667
|
+
export declare enum SubscriptionFrequency {
|
|
767
668
|
UNDEFINED = "UNDEFINED",
|
|
768
669
|
DAY = "DAY",
|
|
769
670
|
WEEK = "WEEK",
|
|
770
671
|
MONTH = "MONTH",
|
|
771
672
|
YEAR = "YEAR"
|
|
772
673
|
}
|
|
773
|
-
interface FreeTrialPeriod {
|
|
674
|
+
export interface FreeTrialPeriod {
|
|
774
675
|
/** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */
|
|
775
676
|
frequency?: SubscriptionFrequency;
|
|
776
677
|
/**
|
|
@@ -780,7 +681,7 @@ interface FreeTrialPeriod {
|
|
|
780
681
|
*/
|
|
781
682
|
interval?: number;
|
|
782
683
|
}
|
|
783
|
-
interface Title {
|
|
684
|
+
export interface Title {
|
|
784
685
|
/**
|
|
785
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).
|
|
786
687
|
* @minLength 1
|
|
@@ -796,7 +697,7 @@ interface Title {
|
|
|
796
697
|
*/
|
|
797
698
|
translated?: string | null;
|
|
798
699
|
}
|
|
799
|
-
interface Description {
|
|
700
|
+
export interface Description {
|
|
800
701
|
/**
|
|
801
702
|
* Subscription option description.
|
|
802
703
|
* @maxLength 500
|
|
@@ -808,7 +709,7 @@ interface Description {
|
|
|
808
709
|
*/
|
|
809
710
|
translated?: string | null;
|
|
810
711
|
}
|
|
811
|
-
interface SecuredMedia {
|
|
712
|
+
export interface SecuredMedia {
|
|
812
713
|
/**
|
|
813
714
|
* Media ID in Wix Media Manager.
|
|
814
715
|
* @minLength 1
|
|
@@ -824,7 +725,7 @@ interface SecuredMedia {
|
|
|
824
725
|
/** File type. */
|
|
825
726
|
fileType?: FileType;
|
|
826
727
|
}
|
|
827
|
-
declare enum FileType {
|
|
728
|
+
export declare enum FileType {
|
|
828
729
|
UNSPECIFIED = "UNSPECIFIED",
|
|
829
730
|
SECURE_PICTURE = "SECURE_PICTURE",
|
|
830
731
|
SECURE_VIDEO = "SECURE_VIDEO",
|
|
@@ -833,7 +734,7 @@ declare enum FileType {
|
|
|
833
734
|
SECURE_ARCHIVE = "SECURE_ARCHIVE"
|
|
834
735
|
}
|
|
835
736
|
/** Type of selected payment option for catalog item */
|
|
836
|
-
declare enum PaymentOptionType {
|
|
737
|
+
export declare enum PaymentOptionType {
|
|
837
738
|
/** The entire payment for this item happens as part of the checkout. */
|
|
838
739
|
FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE",
|
|
839
740
|
/** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */
|
|
@@ -845,7 +746,7 @@ declare enum PaymentOptionType {
|
|
|
845
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`. */
|
|
846
747
|
MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE"
|
|
847
748
|
}
|
|
848
|
-
interface ServiceProperties {
|
|
749
|
+
export interface ServiceProperties {
|
|
849
750
|
/**
|
|
850
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.
|
|
851
752
|
* For example, the start time of a class.
|
|
@@ -858,7 +759,7 @@ interface ServiceProperties {
|
|
|
858
759
|
*/
|
|
859
760
|
numberOfParticipants?: number | null;
|
|
860
761
|
}
|
|
861
|
-
interface PriceDescription {
|
|
762
|
+
export interface PriceDescription {
|
|
862
763
|
/**
|
|
863
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).
|
|
864
765
|
* @minLength 1
|
|
@@ -874,7 +775,7 @@ interface PriceDescription {
|
|
|
874
775
|
*/
|
|
875
776
|
translated?: string | null;
|
|
876
777
|
}
|
|
877
|
-
interface CatalogOverrideFields {
|
|
778
|
+
export interface CatalogOverrideFields {
|
|
878
779
|
/** Item name. */
|
|
879
780
|
productName?: ProductName;
|
|
880
781
|
/**
|
|
@@ -911,7 +812,7 @@ interface CatalogOverrideFields {
|
|
|
911
812
|
*/
|
|
912
813
|
savePaymentMethod?: boolean | null;
|
|
913
814
|
}
|
|
914
|
-
interface PaymentOption {
|
|
815
|
+
export interface PaymentOption {
|
|
915
816
|
/**
|
|
916
817
|
* Type of selected payment option for current item.
|
|
917
818
|
*
|
|
@@ -919,22 +820,22 @@ interface PaymentOption {
|
|
|
919
820
|
*/
|
|
920
821
|
value?: PaymentOptionType;
|
|
921
822
|
}
|
|
922
|
-
interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {
|
|
823
|
+
export interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {
|
|
923
824
|
/** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
|
|
924
825
|
addressType?: TaxableAddressType;
|
|
925
826
|
}
|
|
926
827
|
/** @oneof */
|
|
927
|
-
interface TaxableAddressTaxableAddressDataOneOf {
|
|
828
|
+
export interface TaxableAddressTaxableAddressDataOneOf {
|
|
928
829
|
/** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
|
|
929
830
|
addressType?: TaxableAddressType;
|
|
930
831
|
}
|
|
931
|
-
declare enum TaxableAddressType {
|
|
832
|
+
export declare enum TaxableAddressType {
|
|
932
833
|
UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS",
|
|
933
834
|
BUSINESS = "BUSINESS",
|
|
934
835
|
BILLING = "BILLING",
|
|
935
836
|
SHIPPING = "SHIPPING"
|
|
936
837
|
}
|
|
937
|
-
interface ExtendedFields {
|
|
838
|
+
export interface ExtendedFields {
|
|
938
839
|
/**
|
|
939
840
|
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
940
841
|
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
@@ -945,7 +846,7 @@ interface ExtendedFields {
|
|
|
945
846
|
*/
|
|
946
847
|
namespaces?: Record<string, Record<string, any>>;
|
|
947
848
|
}
|
|
948
|
-
interface Policy {
|
|
849
|
+
export interface Policy {
|
|
949
850
|
/**
|
|
950
851
|
* Policy title - should be translated
|
|
951
852
|
* @minLength 1
|
|
@@ -959,7 +860,7 @@ interface Policy {
|
|
|
959
860
|
*/
|
|
960
861
|
content?: string;
|
|
961
862
|
}
|
|
962
|
-
interface ModifierGroup {
|
|
863
|
+
export interface ModifierGroup {
|
|
963
864
|
/**
|
|
964
865
|
* Modifier group id.
|
|
965
866
|
* @minLength 1
|
|
@@ -975,7 +876,7 @@ interface ModifierGroup {
|
|
|
975
876
|
*/
|
|
976
877
|
modifiers?: ItemModifier[];
|
|
977
878
|
}
|
|
978
|
-
interface TranslatableString {
|
|
879
|
+
export interface TranslatableString {
|
|
979
880
|
/**
|
|
980
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).
|
|
981
882
|
*
|
|
@@ -996,7 +897,7 @@ interface TranslatableString {
|
|
|
996
897
|
*/
|
|
997
898
|
translated?: string | null;
|
|
998
899
|
}
|
|
999
|
-
interface ItemModifier {
|
|
900
|
+
export interface ItemModifier {
|
|
1000
901
|
/**
|
|
1001
902
|
* Modifier ID.
|
|
1002
903
|
* @minLength 1
|
|
@@ -1017,14 +918,14 @@ interface ItemModifier {
|
|
|
1017
918
|
price?: MultiCurrencyPrice;
|
|
1018
919
|
}
|
|
1019
920
|
/** Billing Info and shipping details */
|
|
1020
|
-
interface AddressWithContact {
|
|
921
|
+
export interface AddressWithContact {
|
|
1021
922
|
/** Address. */
|
|
1022
923
|
address?: ApiAddress;
|
|
1023
924
|
/** Contact details. */
|
|
1024
925
|
contactDetails?: FullAddressContactDetails;
|
|
1025
926
|
}
|
|
1026
927
|
/** Physical address */
|
|
1027
|
-
interface ApiAddress {
|
|
928
|
+
export interface ApiAddress {
|
|
1028
929
|
/**
|
|
1029
930
|
* Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
|
|
1030
931
|
* @format COUNTRY
|
|
@@ -1068,20 +969,20 @@ interface ApiAddress {
|
|
|
1068
969
|
*/
|
|
1069
970
|
subdivisionFullname?: string | null;
|
|
1070
971
|
}
|
|
1071
|
-
interface StreetAddress {
|
|
972
|
+
export interface StreetAddress {
|
|
1072
973
|
/** Street number. */
|
|
1073
974
|
number?: string;
|
|
1074
975
|
/** Street name. */
|
|
1075
976
|
name?: string;
|
|
1076
977
|
}
|
|
1077
|
-
interface AddressLocation {
|
|
978
|
+
export interface AddressLocation {
|
|
1078
979
|
/** Address latitude. */
|
|
1079
980
|
latitude?: number | null;
|
|
1080
981
|
/** Address longitude. */
|
|
1081
982
|
longitude?: number | null;
|
|
1082
983
|
}
|
|
1083
984
|
/** Full contact details for an address */
|
|
1084
|
-
interface FullAddressContactDetails {
|
|
985
|
+
export interface FullAddressContactDetails {
|
|
1085
986
|
/**
|
|
1086
987
|
* First name.
|
|
1087
988
|
* @maxLength 100
|
|
@@ -1105,7 +1006,7 @@ interface FullAddressContactDetails {
|
|
|
1105
1006
|
/** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
|
|
1106
1007
|
vatId?: CommonVatId;
|
|
1107
1008
|
}
|
|
1108
|
-
interface CommonVatId {
|
|
1009
|
+
export interface CommonVatId {
|
|
1109
1010
|
/** Customer's tax ID. */
|
|
1110
1011
|
_id?: string;
|
|
1111
1012
|
/**
|
|
@@ -1118,14 +1019,14 @@ interface CommonVatId {
|
|
|
1118
1019
|
type?: CommonVatType;
|
|
1119
1020
|
}
|
|
1120
1021
|
/** tax info types */
|
|
1121
|
-
declare enum CommonVatType {
|
|
1022
|
+
export declare enum CommonVatType {
|
|
1122
1023
|
UNSPECIFIED = "UNSPECIFIED",
|
|
1123
1024
|
/** CPF - for individual tax payers. */
|
|
1124
1025
|
CPF = "CPF",
|
|
1125
1026
|
/** CNPJ - for corporations */
|
|
1126
1027
|
CNPJ = "CNPJ"
|
|
1127
1028
|
}
|
|
1128
|
-
interface ShippingInfo {
|
|
1029
|
+
export interface ShippingInfo {
|
|
1129
1030
|
/** Shipping address and contact details. */
|
|
1130
1031
|
shippingDestination?: AddressWithContact;
|
|
1131
1032
|
/** Selected option out of the options allowed for the `region`. */
|
|
@@ -1141,7 +1042,7 @@ interface ShippingInfo {
|
|
|
1141
1042
|
*/
|
|
1142
1043
|
carrierServiceOptions?: CarrierServiceOption[];
|
|
1143
1044
|
}
|
|
1144
|
-
interface SelectedCarrierServiceOption {
|
|
1045
|
+
export interface SelectedCarrierServiceOption {
|
|
1145
1046
|
/**
|
|
1146
1047
|
* Unique identifier of selected option. For example, "usps_std_overnight".
|
|
1147
1048
|
* @maxLength 100
|
|
@@ -1184,7 +1085,7 @@ interface SelectedCarrierServiceOption {
|
|
|
1184
1085
|
/** If the delivery solution is a partial and doesn't apply to all items. */
|
|
1185
1086
|
partial?: boolean | null;
|
|
1186
1087
|
}
|
|
1187
|
-
interface DeliveryLogistics {
|
|
1088
|
+
export interface DeliveryLogistics {
|
|
1188
1089
|
/**
|
|
1189
1090
|
* Expected delivery time, in free text. For example, "3-5 business days".
|
|
1190
1091
|
* @maxLength 500
|
|
@@ -1198,7 +1099,7 @@ interface DeliveryLogistics {
|
|
|
1198
1099
|
/** Pickup details. */
|
|
1199
1100
|
pickupDetails?: PickupDetails;
|
|
1200
1101
|
}
|
|
1201
|
-
interface PickupDetails {
|
|
1102
|
+
export interface PickupDetails {
|
|
1202
1103
|
/** Pickup address. */
|
|
1203
1104
|
address?: ApiAddress;
|
|
1204
1105
|
/**
|
|
@@ -1209,18 +1110,18 @@ interface PickupDetails {
|
|
|
1209
1110
|
/** Pickup method */
|
|
1210
1111
|
pickupMethod?: PickupMethod;
|
|
1211
1112
|
}
|
|
1212
|
-
declare enum PickupMethod {
|
|
1113
|
+
export declare enum PickupMethod {
|
|
1213
1114
|
UNKNOWN_METHOD = "UNKNOWN_METHOD",
|
|
1214
1115
|
STORE_PICKUP = "STORE_PICKUP",
|
|
1215
1116
|
PICKUP_POINT = "PICKUP_POINT"
|
|
1216
1117
|
}
|
|
1217
|
-
interface DeliveryTimeSlot {
|
|
1118
|
+
export interface DeliveryTimeSlot {
|
|
1218
1119
|
/** starting time of the delivery time slot */
|
|
1219
1120
|
from?: Date | null;
|
|
1220
1121
|
/** ending time of the delivery time slot */
|
|
1221
1122
|
to?: Date | null;
|
|
1222
1123
|
}
|
|
1223
|
-
interface SelectedCarrierServiceOptionPrices {
|
|
1124
|
+
export interface SelectedCarrierServiceOptionPrices {
|
|
1224
1125
|
/** Total shipping price, after discount and after tax. */
|
|
1225
1126
|
totalPriceAfterTax?: MultiCurrencyPrice;
|
|
1226
1127
|
/** Total price of shipping after discounts (when relevant), and before tax. */
|
|
@@ -1232,7 +1133,7 @@ interface SelectedCarrierServiceOptionPrices {
|
|
|
1232
1133
|
/** Shipping price before discount and before tax. */
|
|
1233
1134
|
price?: MultiCurrencyPrice;
|
|
1234
1135
|
}
|
|
1235
|
-
interface SelectedCarrierServiceOptionOtherCharge {
|
|
1136
|
+
export interface SelectedCarrierServiceOptionOtherCharge {
|
|
1236
1137
|
/** Type of additional cost. */
|
|
1237
1138
|
type?: ChargeType;
|
|
1238
1139
|
/**
|
|
@@ -1243,11 +1144,11 @@ interface SelectedCarrierServiceOptionOtherCharge {
|
|
|
1243
1144
|
/** Price of added charge. */
|
|
1244
1145
|
cost?: SelectedCarrierServiceOptionPrices;
|
|
1245
1146
|
}
|
|
1246
|
-
declare enum ChargeType {
|
|
1147
|
+
export declare enum ChargeType {
|
|
1247
1148
|
HANDLING_FEE = "HANDLING_FEE",
|
|
1248
1149
|
INSURANCE = "INSURANCE"
|
|
1249
1150
|
}
|
|
1250
|
-
interface DeliveryAllocation {
|
|
1151
|
+
export interface DeliveryAllocation {
|
|
1251
1152
|
/** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */
|
|
1252
1153
|
deliveryCarrier?: Carrier;
|
|
1253
1154
|
/** The delivery region that are relevant for this delivery solution. */
|
|
@@ -1255,7 +1156,7 @@ interface DeliveryAllocation {
|
|
|
1255
1156
|
/** Populated if the delivery solution is a partially supplied by this carrier. */
|
|
1256
1157
|
applicableLineItems?: ApplicableLineItems;
|
|
1257
1158
|
}
|
|
1258
|
-
interface Carrier {
|
|
1159
|
+
export interface Carrier {
|
|
1259
1160
|
/**
|
|
1260
1161
|
* The carrier app id
|
|
1261
1162
|
* @format GUID
|
|
@@ -1267,7 +1168,7 @@ interface Carrier {
|
|
|
1267
1168
|
*/
|
|
1268
1169
|
code?: string;
|
|
1269
1170
|
}
|
|
1270
|
-
interface Region {
|
|
1171
|
+
export interface Region {
|
|
1271
1172
|
/**
|
|
1272
1173
|
* The delivery region id.
|
|
1273
1174
|
* @format GUID
|
|
@@ -1279,7 +1180,7 @@ interface Region {
|
|
|
1279
1180
|
*/
|
|
1280
1181
|
name?: string | null;
|
|
1281
1182
|
}
|
|
1282
|
-
interface ApplicableLineItems {
|
|
1183
|
+
export interface ApplicableLineItems {
|
|
1283
1184
|
/**
|
|
1284
1185
|
* Line items that the delivery solution is for.
|
|
1285
1186
|
* @maxSize 300
|
|
@@ -1288,7 +1189,7 @@ interface ApplicableLineItems {
|
|
|
1288
1189
|
*/
|
|
1289
1190
|
lineItemIds?: string[];
|
|
1290
1191
|
}
|
|
1291
|
-
interface ShippingRegion {
|
|
1192
|
+
export interface ShippingRegion {
|
|
1292
1193
|
/**
|
|
1293
1194
|
* Shipping region ID.
|
|
1294
1195
|
* @format GUID
|
|
@@ -1301,7 +1202,7 @@ interface ShippingRegion {
|
|
|
1301
1202
|
*/
|
|
1302
1203
|
name?: string;
|
|
1303
1204
|
}
|
|
1304
|
-
interface CarrierServiceOption {
|
|
1205
|
+
export interface CarrierServiceOption {
|
|
1305
1206
|
/**
|
|
1306
1207
|
* Carrier ID.
|
|
1307
1208
|
* @format GUID
|
|
@@ -1310,7 +1211,7 @@ interface CarrierServiceOption {
|
|
|
1310
1211
|
/** Shipping options offered by this carrier for this request. */
|
|
1311
1212
|
shippingOptions?: ShippingOption[];
|
|
1312
1213
|
}
|
|
1313
|
-
interface ShippingOption {
|
|
1214
|
+
export interface ShippingOption {
|
|
1314
1215
|
/**
|
|
1315
1216
|
* Unique code of provided shipping option like "usps_std_overnight".
|
|
1316
1217
|
* For legacy calculators this would be the UUID of the option.
|
|
@@ -1335,19 +1236,19 @@ interface ShippingOption {
|
|
|
1335
1236
|
/** If the delivery solution is a partial and doesn't apply to all items. */
|
|
1336
1237
|
partial?: boolean | null;
|
|
1337
1238
|
}
|
|
1338
|
-
interface ShippingPrice {
|
|
1239
|
+
export interface ShippingPrice {
|
|
1339
1240
|
/** Shipping price. */
|
|
1340
1241
|
price?: MultiCurrencyPrice;
|
|
1341
1242
|
/** Other costs such as insurance, handling & packaging for fragile items, etc. */
|
|
1342
1243
|
otherCharges?: OtherCharge[];
|
|
1343
1244
|
}
|
|
1344
|
-
interface OtherCharge {
|
|
1245
|
+
export interface OtherCharge {
|
|
1345
1246
|
/** Type of additional cost. */
|
|
1346
1247
|
type?: ChargeType;
|
|
1347
1248
|
/** Price of added cost. */
|
|
1348
1249
|
price?: MultiCurrencyPrice;
|
|
1349
1250
|
}
|
|
1350
|
-
interface BuyerInfo extends BuyerInfoIdOneOf {
|
|
1251
|
+
export interface BuyerInfo extends BuyerInfoIdOneOf {
|
|
1351
1252
|
/**
|
|
1352
1253
|
* Visitor ID - if the buyer is **not** a site member.
|
|
1353
1254
|
* @format GUID
|
|
@@ -1373,7 +1274,7 @@ interface BuyerInfo extends BuyerInfoIdOneOf {
|
|
|
1373
1274
|
email?: string | null;
|
|
1374
1275
|
}
|
|
1375
1276
|
/** @oneof */
|
|
1376
|
-
interface BuyerInfoIdOneOf {
|
|
1277
|
+
export interface BuyerInfoIdOneOf {
|
|
1377
1278
|
/**
|
|
1378
1279
|
* Visitor ID - if the buyer is **not** a site member.
|
|
1379
1280
|
* @format GUID
|
|
@@ -1387,7 +1288,7 @@ interface BuyerInfoIdOneOf {
|
|
|
1387
1288
|
*/
|
|
1388
1289
|
memberId?: string;
|
|
1389
1290
|
}
|
|
1390
|
-
interface PriceSummary {
|
|
1291
|
+
export interface PriceSummary {
|
|
1391
1292
|
/** Subtotal of all line items, before discounts and before tax. */
|
|
1392
1293
|
subtotal?: MultiCurrencyPrice;
|
|
1393
1294
|
/** Total shipping price, before discounts and before tax. */
|
|
@@ -1401,7 +1302,7 @@ interface PriceSummary {
|
|
|
1401
1302
|
/** Total additional fees price before tax. */
|
|
1402
1303
|
additionalFees?: MultiCurrencyPrice;
|
|
1403
1304
|
}
|
|
1404
|
-
interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
|
|
1305
|
+
export interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
|
|
1405
1306
|
/** General shipping calculation error. */
|
|
1406
1307
|
generalShippingCalculationError?: Details;
|
|
1407
1308
|
/** Carrier errors. */
|
|
@@ -1423,13 +1324,13 @@ interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOne
|
|
|
1423
1324
|
discountsCalculationError?: Details;
|
|
1424
1325
|
}
|
|
1425
1326
|
/** @oneof */
|
|
1426
|
-
interface CalculationErrorsShippingCalculationErrorOneOf {
|
|
1327
|
+
export interface CalculationErrorsShippingCalculationErrorOneOf {
|
|
1427
1328
|
/** General shipping calculation error. */
|
|
1428
1329
|
generalShippingCalculationError?: Details;
|
|
1429
1330
|
/** Carrier errors. */
|
|
1430
1331
|
carrierErrors?: CarrierErrors;
|
|
1431
1332
|
}
|
|
1432
|
-
interface Details extends DetailsKindOneOf {
|
|
1333
|
+
export interface Details extends DetailsKindOneOf {
|
|
1433
1334
|
applicationError?: ApplicationError;
|
|
1434
1335
|
validationError?: ValidationError;
|
|
1435
1336
|
systemError?: SystemError;
|
|
@@ -1440,12 +1341,12 @@ interface Details extends DetailsKindOneOf {
|
|
|
1440
1341
|
tracing?: Record<string, string>;
|
|
1441
1342
|
}
|
|
1442
1343
|
/** @oneof */
|
|
1443
|
-
interface DetailsKindOneOf {
|
|
1344
|
+
export interface DetailsKindOneOf {
|
|
1444
1345
|
applicationError?: ApplicationError;
|
|
1445
1346
|
validationError?: ValidationError;
|
|
1446
1347
|
systemError?: SystemError;
|
|
1447
1348
|
}
|
|
1448
|
-
interface ApplicationError {
|
|
1349
|
+
export interface ApplicationError {
|
|
1449
1350
|
/** Error code. */
|
|
1450
1351
|
code?: string;
|
|
1451
1352
|
/** Description of the error. */
|
|
@@ -1485,10 +1386,10 @@ interface ApplicationError {
|
|
|
1485
1386
|
* ]
|
|
1486
1387
|
* }
|
|
1487
1388
|
*/
|
|
1488
|
-
interface ValidationError {
|
|
1389
|
+
export interface ValidationError {
|
|
1489
1390
|
fieldViolations?: FieldViolation[];
|
|
1490
1391
|
}
|
|
1491
|
-
declare enum RuleType {
|
|
1392
|
+
export declare enum RuleType {
|
|
1492
1393
|
VALIDATION = "VALIDATION",
|
|
1493
1394
|
OTHER = "OTHER",
|
|
1494
1395
|
MAX = "MAX",
|
|
@@ -1511,7 +1412,7 @@ declare enum RuleType {
|
|
|
1511
1412
|
EXACT_SIZE = "EXACT_SIZE",
|
|
1512
1413
|
REQUIRED_ONE_OF_FIELD = "REQUIRED_ONE_OF_FIELD"
|
|
1513
1414
|
}
|
|
1514
|
-
interface FieldViolation {
|
|
1415
|
+
export interface FieldViolation {
|
|
1515
1416
|
field?: string;
|
|
1516
1417
|
description?: string;
|
|
1517
1418
|
violatedRule?: RuleType;
|
|
@@ -1519,21 +1420,21 @@ interface FieldViolation {
|
|
|
1519
1420
|
ruleName?: string | null;
|
|
1520
1421
|
data?: Record<string, any> | null;
|
|
1521
1422
|
}
|
|
1522
|
-
interface SystemError {
|
|
1423
|
+
export interface SystemError {
|
|
1523
1424
|
/** Error code. */
|
|
1524
1425
|
errorCode?: string | null;
|
|
1525
1426
|
}
|
|
1526
|
-
interface CarrierErrors {
|
|
1427
|
+
export interface CarrierErrors {
|
|
1527
1428
|
/** Carrier errors. */
|
|
1528
1429
|
errors?: CarrierError[];
|
|
1529
1430
|
}
|
|
1530
|
-
interface CarrierError {
|
|
1431
|
+
export interface CarrierError {
|
|
1531
1432
|
/** Carrier ID. */
|
|
1532
1433
|
carrierId?: string;
|
|
1533
1434
|
/** Error details. */
|
|
1534
1435
|
error?: Details;
|
|
1535
1436
|
}
|
|
1536
|
-
interface GiftCard {
|
|
1437
|
+
export interface GiftCard {
|
|
1537
1438
|
/**
|
|
1538
1439
|
* Gift Card ID.
|
|
1539
1440
|
* @deprecated
|
|
@@ -1556,7 +1457,7 @@ interface GiftCard {
|
|
|
1556
1457
|
*/
|
|
1557
1458
|
externalId?: string | null;
|
|
1558
1459
|
}
|
|
1559
|
-
interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
1460
|
+
export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
1560
1461
|
/** Coupon details. */
|
|
1561
1462
|
coupon?: Coupon;
|
|
1562
1463
|
/** Merchant discount. */
|
|
@@ -1573,17 +1474,9 @@ interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
|
1573
1474
|
* @targetRemovalDate 2024-06-01
|
|
1574
1475
|
*/
|
|
1575
1476
|
lineItemIds?: string[];
|
|
1576
|
-
/**
|
|
1577
|
-
* Number of subscription cycle this discount applies to
|
|
1578
|
-
* default None - all billing cycle
|
|
1579
|
-
* @internal
|
|
1580
|
-
* @min 1
|
|
1581
|
-
* @max 999
|
|
1582
|
-
*/
|
|
1583
|
-
subscriptionCycles?: number | null;
|
|
1584
1477
|
}
|
|
1585
1478
|
/** @oneof */
|
|
1586
|
-
interface AppliedDiscountDiscountSourceOneOf {
|
|
1479
|
+
export interface AppliedDiscountDiscountSourceOneOf {
|
|
1587
1480
|
/** Coupon details. */
|
|
1588
1481
|
coupon?: Coupon;
|
|
1589
1482
|
/** Merchant discount. */
|
|
@@ -1591,13 +1484,13 @@ interface AppliedDiscountDiscountSourceOneOf {
|
|
|
1591
1484
|
/** Discount rule */
|
|
1592
1485
|
discountRule?: DiscountRule;
|
|
1593
1486
|
}
|
|
1594
|
-
declare enum DiscountType {
|
|
1487
|
+
export declare enum DiscountType {
|
|
1595
1488
|
GLOBAL = "GLOBAL",
|
|
1596
1489
|
SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
|
|
1597
1490
|
SHIPPING = "SHIPPING"
|
|
1598
1491
|
}
|
|
1599
1492
|
/** Coupon */
|
|
1600
|
-
interface Coupon {
|
|
1493
|
+
export interface Coupon {
|
|
1601
1494
|
/** Coupon ID. */
|
|
1602
1495
|
_id?: string;
|
|
1603
1496
|
/** Coupon code. */
|
|
@@ -1607,7 +1500,7 @@ interface Coupon {
|
|
|
1607
1500
|
/** Coupon name. */
|
|
1608
1501
|
name?: string;
|
|
1609
1502
|
}
|
|
1610
|
-
interface MerchantDiscount {
|
|
1503
|
+
export interface MerchantDiscount {
|
|
1611
1504
|
/** Discount value. */
|
|
1612
1505
|
amount?: MultiCurrencyPrice;
|
|
1613
1506
|
/**
|
|
@@ -1617,7 +1510,7 @@ interface MerchantDiscount {
|
|
|
1617
1510
|
*/
|
|
1618
1511
|
percentage?: number | null;
|
|
1619
1512
|
}
|
|
1620
|
-
interface DiscountRule {
|
|
1513
|
+
export interface DiscountRule {
|
|
1621
1514
|
/**
|
|
1622
1515
|
* Discount rule ID
|
|
1623
1516
|
* @format GUID
|
|
@@ -1628,7 +1521,7 @@ interface DiscountRule {
|
|
|
1628
1521
|
/** Discount value. */
|
|
1629
1522
|
amount?: MultiCurrencyPrice;
|
|
1630
1523
|
}
|
|
1631
|
-
interface DiscountRuleName {
|
|
1524
|
+
export interface DiscountRuleName {
|
|
1632
1525
|
/**
|
|
1633
1526
|
* Original discount rule name (in site's default language).
|
|
1634
1527
|
* @minLength 1
|
|
@@ -1642,7 +1535,7 @@ interface DiscountRuleName {
|
|
|
1642
1535
|
*/
|
|
1643
1536
|
translated?: string | null;
|
|
1644
1537
|
}
|
|
1645
|
-
interface LineItemDiscount {
|
|
1538
|
+
export interface LineItemDiscount {
|
|
1646
1539
|
/**
|
|
1647
1540
|
* ID of line item the discount applies to.
|
|
1648
1541
|
* @format GUID
|
|
@@ -1651,7 +1544,7 @@ interface LineItemDiscount {
|
|
|
1651
1544
|
/** Discount value. */
|
|
1652
1545
|
totalDiscountAmount?: MultiCurrencyPrice;
|
|
1653
1546
|
}
|
|
1654
|
-
interface CustomField {
|
|
1547
|
+
export interface CustomField {
|
|
1655
1548
|
/** Custom field value. */
|
|
1656
1549
|
value?: any;
|
|
1657
1550
|
/**
|
|
@@ -1667,7 +1560,7 @@ interface CustomField {
|
|
|
1667
1560
|
*/
|
|
1668
1561
|
translatedTitle?: string | null;
|
|
1669
1562
|
}
|
|
1670
|
-
declare enum WeightUnit {
|
|
1563
|
+
export declare enum WeightUnit {
|
|
1671
1564
|
/** Weight unit can't be classified due to an error. */
|
|
1672
1565
|
UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
|
|
1673
1566
|
/** Kilograms. */
|
|
@@ -1675,7 +1568,7 @@ declare enum WeightUnit {
|
|
|
1675
1568
|
/** Pounds. */
|
|
1676
1569
|
LB = "LB"
|
|
1677
1570
|
}
|
|
1678
|
-
interface TaxSummary {
|
|
1571
|
+
export interface TaxSummary {
|
|
1679
1572
|
/**
|
|
1680
1573
|
* Amount for which tax is calculated, added from line items.
|
|
1681
1574
|
* @readonly
|
|
@@ -1692,7 +1585,7 @@ interface TaxSummary {
|
|
|
1692
1585
|
*/
|
|
1693
1586
|
calculationDetails?: TaxCalculationDetails;
|
|
1694
1587
|
}
|
|
1695
|
-
interface TaxCalculationDetails extends TaxCalculationDetailsCalculationDetailsOneOf {
|
|
1588
|
+
export interface TaxCalculationDetails extends TaxCalculationDetailsCalculationDetailsOneOf {
|
|
1696
1589
|
/** Reason the manual calculation was used. */
|
|
1697
1590
|
manualRateReason?: ManualCalculationReason;
|
|
1698
1591
|
/** Details of the fallback rate calculation. */
|
|
@@ -1701,13 +1594,13 @@ interface TaxCalculationDetails extends TaxCalculationDetailsCalculationDetailsO
|
|
|
1701
1594
|
rateType?: RateType;
|
|
1702
1595
|
}
|
|
1703
1596
|
/** @oneof */
|
|
1704
|
-
interface TaxCalculationDetailsCalculationDetailsOneOf {
|
|
1597
|
+
export interface TaxCalculationDetailsCalculationDetailsOneOf {
|
|
1705
1598
|
/** Reason the manual calculation was used. */
|
|
1706
1599
|
manualRateReason?: ManualCalculationReason;
|
|
1707
1600
|
/** Details of the fallback rate calculation. */
|
|
1708
1601
|
autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails;
|
|
1709
1602
|
}
|
|
1710
|
-
declare enum RateType {
|
|
1603
|
+
export declare enum RateType {
|
|
1711
1604
|
/** no tax being collected for this request due to location of purchase */
|
|
1712
1605
|
NO_TAX_COLLECTED = "NO_TAX_COLLECTED",
|
|
1713
1606
|
/** manual rate used for calculation */
|
|
@@ -1717,19 +1610,19 @@ declare enum RateType {
|
|
|
1717
1610
|
/** fallback rate used for calculation */
|
|
1718
1611
|
FALLBACK_RATE = "FALLBACK_RATE"
|
|
1719
1612
|
}
|
|
1720
|
-
declare enum ManualCalculationReason {
|
|
1613
|
+
export declare enum ManualCalculationReason {
|
|
1721
1614
|
/** user set calculator in Business Manager to be Manual */
|
|
1722
1615
|
GLOBAL_SETTING_TO_MANUAL = "GLOBAL_SETTING_TO_MANUAL",
|
|
1723
1616
|
/** specific region is on manual even though Global setting is Auto-tax */
|
|
1724
1617
|
REGION_SETTING_TO_MANUAL = "REGION_SETTING_TO_MANUAL"
|
|
1725
1618
|
}
|
|
1726
|
-
interface AutoTaxFallbackCalculationDetails {
|
|
1619
|
+
export interface AutoTaxFallbackCalculationDetails {
|
|
1727
1620
|
/** reason for fallback */
|
|
1728
1621
|
fallbackReason?: FallbackReason;
|
|
1729
1622
|
/** invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */
|
|
1730
1623
|
error?: ApplicationError;
|
|
1731
1624
|
}
|
|
1732
|
-
declare enum FallbackReason {
|
|
1625
|
+
export declare enum FallbackReason {
|
|
1733
1626
|
/** auto-tax failed to be calculated */
|
|
1734
1627
|
AUTO_TAX_FAILED = "AUTO_TAX_FAILED",
|
|
1735
1628
|
/** auto-tax was temporarily deactivated on a system-level */
|
|
@@ -1739,7 +1632,7 @@ declare enum FallbackReason {
|
|
|
1739
1632
|
* 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.
|
|
1740
1633
|
* Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
|
|
1741
1634
|
*/
|
|
1742
|
-
interface AggregatedTaxBreakdown {
|
|
1635
|
+
export interface AggregatedTaxBreakdown {
|
|
1743
1636
|
/**
|
|
1744
1637
|
* The name of the tax against which this tax amount was calculated.
|
|
1745
1638
|
* @maxLength 200
|
|
@@ -1765,7 +1658,7 @@ interface AggregatedTaxBreakdown {
|
|
|
1765
1658
|
/** The sum of all the tax from line items that calculated by the tax identifiers. */
|
|
1766
1659
|
aggregatedTaxAmount?: MultiCurrencyPrice;
|
|
1767
1660
|
}
|
|
1768
|
-
declare enum ChannelType {
|
|
1661
|
+
export declare enum ChannelType {
|
|
1769
1662
|
/** Unspecified sales channel. This value is not supported. */
|
|
1770
1663
|
UNSPECIFIED = "UNSPECIFIED",
|
|
1771
1664
|
/** A web client. */
|
|
@@ -1799,7 +1692,7 @@ declare enum ChannelType {
|
|
|
1799
1692
|
/** [Faire marketplace integration](https://support.wix.com/en/article/wix-stores-creating-a-faire-store-using-the-faire-integration-app). */
|
|
1800
1693
|
FAIRE_COM = "FAIRE_COM"
|
|
1801
1694
|
}
|
|
1802
|
-
interface CreatedBy extends CreatedByIdOneOf {
|
|
1695
|
+
export interface CreatedBy extends CreatedByIdOneOf {
|
|
1803
1696
|
/**
|
|
1804
1697
|
* User ID. When the order was created by a Wix user on behalf of a buyer.
|
|
1805
1698
|
* For example, via POS (point of service).
|
|
@@ -1823,7 +1716,7 @@ interface CreatedBy extends CreatedByIdOneOf {
|
|
|
1823
1716
|
appId?: string;
|
|
1824
1717
|
}
|
|
1825
1718
|
/** @oneof */
|
|
1826
|
-
interface CreatedByIdOneOf {
|
|
1719
|
+
export interface CreatedByIdOneOf {
|
|
1827
1720
|
/**
|
|
1828
1721
|
* User ID. When the order was created by a Wix user on behalf of a buyer.
|
|
1829
1722
|
* For example, via POS (point of service).
|
|
@@ -1847,7 +1740,7 @@ interface CreatedByIdOneOf {
|
|
|
1847
1740
|
appId?: string;
|
|
1848
1741
|
}
|
|
1849
1742
|
/** Reserved for internal use. */
|
|
1850
|
-
interface MembershipOptions {
|
|
1743
|
+
export interface MembershipOptions {
|
|
1851
1744
|
/**
|
|
1852
1745
|
* Reserved for internal use.
|
|
1853
1746
|
* @readonly
|
|
@@ -1863,7 +1756,7 @@ interface MembershipOptions {
|
|
|
1863
1756
|
/** Selected membership to apply to this checkout. */
|
|
1864
1757
|
selectedMemberships?: SelectedMemberships;
|
|
1865
1758
|
}
|
|
1866
|
-
interface Membership {
|
|
1759
|
+
export interface Membership {
|
|
1867
1760
|
/**
|
|
1868
1761
|
* Membership ID.
|
|
1869
1762
|
* @minLength 1
|
|
@@ -1892,7 +1785,7 @@ interface Membership {
|
|
|
1892
1785
|
/** Additional data about this membership. */
|
|
1893
1786
|
additionalData?: Record<string, any> | null;
|
|
1894
1787
|
}
|
|
1895
|
-
interface MembershipName {
|
|
1788
|
+
export interface MembershipName {
|
|
1896
1789
|
/**
|
|
1897
1790
|
* Membership name.
|
|
1898
1791
|
* @maxLength 100
|
|
@@ -1904,7 +1797,7 @@ interface MembershipName {
|
|
|
1904
1797
|
*/
|
|
1905
1798
|
translated?: string | null;
|
|
1906
1799
|
}
|
|
1907
|
-
interface MembershipPaymentCredits {
|
|
1800
|
+
export interface MembershipPaymentCredits {
|
|
1908
1801
|
/**
|
|
1909
1802
|
* Membership's total amount of credits.
|
|
1910
1803
|
* @min 1
|
|
@@ -1913,7 +1806,7 @@ interface MembershipPaymentCredits {
|
|
|
1913
1806
|
/** Membership's remaining amount of credits. */
|
|
1914
1807
|
remaining?: number;
|
|
1915
1808
|
}
|
|
1916
|
-
interface InvalidMembership {
|
|
1809
|
+
export interface InvalidMembership {
|
|
1917
1810
|
/** Membership details. */
|
|
1918
1811
|
membership?: Membership;
|
|
1919
1812
|
/**
|
|
@@ -1923,14 +1816,14 @@ interface InvalidMembership {
|
|
|
1923
1816
|
*/
|
|
1924
1817
|
reason?: string;
|
|
1925
1818
|
}
|
|
1926
|
-
interface SelectedMemberships {
|
|
1819
|
+
export interface SelectedMemberships {
|
|
1927
1820
|
/**
|
|
1928
1821
|
* Selected memberships.
|
|
1929
1822
|
* @maxSize 300
|
|
1930
1823
|
*/
|
|
1931
1824
|
memberships?: SelectedMembership[];
|
|
1932
1825
|
}
|
|
1933
|
-
interface SelectedMembership {
|
|
1826
|
+
export interface SelectedMembership {
|
|
1934
1827
|
/**
|
|
1935
1828
|
* Membership ID.
|
|
1936
1829
|
* @minLength 1
|
|
@@ -1951,7 +1844,7 @@ interface SelectedMembership {
|
|
|
1951
1844
|
*/
|
|
1952
1845
|
lineItemIds?: string[];
|
|
1953
1846
|
}
|
|
1954
|
-
interface AdditionalFee {
|
|
1847
|
+
export interface AdditionalFee {
|
|
1955
1848
|
/**
|
|
1956
1849
|
* Additional fee's unique code (or ID) for future processing.
|
|
1957
1850
|
* @minLength 1
|
|
@@ -1984,18 +1877,10 @@ interface AdditionalFee {
|
|
|
1984
1877
|
* @format GUID
|
|
1985
1878
|
*/
|
|
1986
1879
|
lineItemIds?: string[];
|
|
1987
|
-
/**
|
|
1988
|
-
* Number of subscription cycle this fee applies to
|
|
1989
|
-
* default None - all billing cycle
|
|
1990
|
-
* @internal
|
|
1991
|
-
* @min 1
|
|
1992
|
-
* @max 999
|
|
1993
|
-
*/
|
|
1994
|
-
subscriptionCycles?: number | null;
|
|
1995
1880
|
/** the source the additional fee was added from */
|
|
1996
1881
|
source?: AdditionalFeeSource;
|
|
1997
1882
|
}
|
|
1998
|
-
declare enum AdditionalFeeSource {
|
|
1883
|
+
export declare enum AdditionalFeeSource {
|
|
1999
1884
|
UNKNOWN_ADDITIONAL_FEE_SOURCE = "UNKNOWN_ADDITIONAL_FEE_SOURCE",
|
|
2000
1885
|
/** The additional fee was added by an additional fee service plugin */
|
|
2001
1886
|
SERVICE_PLUGIN = "SERVICE_PLUGIN",
|
|
@@ -2004,7 +1889,7 @@ declare enum AdditionalFeeSource {
|
|
|
2004
1889
|
/** The additional fee was added manually on the request */
|
|
2005
1890
|
MANUAL = "MANUAL"
|
|
2006
1891
|
}
|
|
2007
|
-
interface ConversionInfo {
|
|
1892
|
+
export interface ConversionInfo {
|
|
2008
1893
|
/**
|
|
2009
1894
|
* The site currency.
|
|
2010
1895
|
* @readonly
|
|
@@ -2018,7 +1903,7 @@ interface ConversionInfo {
|
|
|
2018
1903
|
*/
|
|
2019
1904
|
conversionRate?: string;
|
|
2020
1905
|
}
|
|
2021
|
-
interface Violation {
|
|
1906
|
+
export interface Violation {
|
|
2022
1907
|
/** 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. */
|
|
2023
1908
|
severity?: Severity;
|
|
2024
1909
|
/** Target location on a checkout or cart page where the violation will be displayed. */
|
|
@@ -2030,7 +1915,7 @@ interface Violation {
|
|
|
2030
1915
|
*/
|
|
2031
1916
|
description?: string | null;
|
|
2032
1917
|
}
|
|
2033
|
-
declare enum Severity {
|
|
1918
|
+
export declare enum Severity {
|
|
2034
1919
|
/** The user is allowed to move forward in the flow. */
|
|
2035
1920
|
WARNING = "WARNING",
|
|
2036
1921
|
/**
|
|
@@ -2039,53 +1924,48 @@ declare enum Severity {
|
|
|
2039
1924
|
*/
|
|
2040
1925
|
ERROR = "ERROR"
|
|
2041
1926
|
}
|
|
2042
|
-
interface Target extends TargetTargetTypeOneOf {
|
|
1927
|
+
export interface Target extends TargetTargetTypeOneOf {
|
|
2043
1928
|
/** General (other) violation. */
|
|
2044
1929
|
other?: Other;
|
|
2045
1930
|
/** Specific line item violation. */
|
|
2046
1931
|
lineItem?: TargetLineItem;
|
|
2047
1932
|
}
|
|
2048
1933
|
/** @oneof */
|
|
2049
|
-
interface TargetTargetTypeOneOf {
|
|
1934
|
+
export interface TargetTargetTypeOneOf {
|
|
2050
1935
|
/** General (other) violation. */
|
|
2051
1936
|
other?: Other;
|
|
2052
1937
|
/** Specific line item violation. */
|
|
2053
1938
|
lineItem?: TargetLineItem;
|
|
2054
1939
|
}
|
|
2055
1940
|
/** Available locations on the webpage */
|
|
2056
|
-
declare enum NameInOther {
|
|
1941
|
+
export declare enum NameInOther {
|
|
2057
1942
|
/** Default location, in case no specific location is specified. */
|
|
2058
1943
|
OTHER_DEFAULT = "OTHER_DEFAULT"
|
|
2059
1944
|
}
|
|
2060
1945
|
/** Available locations on the line item */
|
|
2061
|
-
declare enum NameInLineItem {
|
|
1946
|
+
export declare enum NameInLineItem {
|
|
2062
1947
|
/** Default location, in case no specific location is specified. */
|
|
2063
1948
|
LINE_ITEM_DEFAULT = "LINE_ITEM_DEFAULT"
|
|
2064
1949
|
}
|
|
2065
|
-
declare enum SuggestedFix {
|
|
1950
|
+
export declare enum SuggestedFix {
|
|
2066
1951
|
/** No suggested fix is specified. The user should refer to the violation description to resolve the issue. */
|
|
2067
1952
|
UNKNOWN_SUGGESTED_FIX = "UNKNOWN_SUGGESTED_FIX",
|
|
2068
1953
|
/** The line item should be removed from the cart or checkout to resolve the violation. */
|
|
2069
1954
|
REMOVE_LINE_ITEM = "REMOVE_LINE_ITEM"
|
|
2070
1955
|
}
|
|
2071
1956
|
/** General (other) violation. */
|
|
2072
|
-
interface Other {
|
|
1957
|
+
export interface Other {
|
|
2073
1958
|
/** Location on a checkout or a cart page where a general (other) violation will be displayed. */
|
|
2074
1959
|
name?: NameInOther;
|
|
2075
1960
|
}
|
|
2076
1961
|
/** Specific line item violation. */
|
|
2077
|
-
interface TargetLineItem {
|
|
1962
|
+
export interface TargetLineItem {
|
|
2078
1963
|
/** Location on a checkout or a cart page where the specific line item violation will be displayed. */
|
|
2079
1964
|
name?: NameInLineItem;
|
|
2080
1965
|
/** ID of the line item containing the violation. */
|
|
2081
1966
|
_id?: string | null;
|
|
2082
|
-
/**
|
|
2083
|
-
* Suggested fix for resolving the line item violation.
|
|
2084
|
-
* @internal
|
|
2085
|
-
*/
|
|
2086
|
-
suggestedFix?: SuggestedFix;
|
|
2087
1967
|
}
|
|
2088
|
-
interface CustomSettings {
|
|
1968
|
+
export interface CustomSettings {
|
|
2089
1969
|
/**
|
|
2090
1970
|
* Whether to restrict the option to add or remove a gift card on the checkout page.
|
|
2091
1971
|
*
|
|
@@ -2111,7 +1991,7 @@ interface CustomSettings {
|
|
|
2111
1991
|
*/
|
|
2112
1992
|
disabledManualPayment?: boolean;
|
|
2113
1993
|
}
|
|
2114
|
-
interface CustomContentReference {
|
|
1994
|
+
export interface CustomContentReference {
|
|
2115
1995
|
/**
|
|
2116
1996
|
* ID of the app providing the content.
|
|
2117
1997
|
*
|
|
@@ -2127,7 +2007,7 @@ interface CustomContentReference {
|
|
|
2127
2007
|
*/
|
|
2128
2008
|
componentId?: string;
|
|
2129
2009
|
}
|
|
2130
|
-
interface ExternalReference {
|
|
2010
|
+
export interface ExternalReference {
|
|
2131
2011
|
/**
|
|
2132
2012
|
* ID of the app associated with the purchase flow.
|
|
2133
2013
|
* For example, the Wix Pay Links app ID.
|
|
@@ -2144,7 +2024,7 @@ interface ExternalReference {
|
|
|
2144
2024
|
*/
|
|
2145
2025
|
resourceId?: string | null;
|
|
2146
2026
|
}
|
|
2147
|
-
interface SubscriptionCharges {
|
|
2027
|
+
export interface SubscriptionCharges {
|
|
2148
2028
|
/**
|
|
2149
2029
|
* ids of the items the subscription is defined on
|
|
2150
2030
|
* @format GUID
|
|
@@ -2164,7 +2044,7 @@ interface SubscriptionCharges {
|
|
|
2164
2044
|
*/
|
|
2165
2045
|
charges?: Charge[];
|
|
2166
2046
|
}
|
|
2167
|
-
interface Charge {
|
|
2047
|
+
export interface Charge {
|
|
2168
2048
|
/** The cycle number from which the charge starts. */
|
|
2169
2049
|
cycleFrom?: number;
|
|
2170
2050
|
/** The number of cycles for which the charge is applicable. */
|
|
@@ -2174,13 +2054,13 @@ interface Charge {
|
|
|
2174
2054
|
/** The billing date from which the charge starts. */
|
|
2175
2055
|
cycleBillingDate?: Date | null;
|
|
2176
2056
|
}
|
|
2177
|
-
interface UpdatedCheckoutMessage {
|
|
2057
|
+
export interface UpdatedCheckoutMessage {
|
|
2178
2058
|
/** Previous checkout. */
|
|
2179
2059
|
oldCheckout?: Checkout;
|
|
2180
2060
|
/** Updated checkout. */
|
|
2181
2061
|
updatedCheckout?: Checkout;
|
|
2182
2062
|
}
|
|
2183
|
-
interface CreateCheckoutRequest {
|
|
2063
|
+
export interface CreateCheckoutRequest {
|
|
2184
2064
|
/** Checkout information. */
|
|
2185
2065
|
checkoutInfo?: Checkout;
|
|
2186
2066
|
/** 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). */
|
|
@@ -2216,7 +2096,7 @@ interface CreateCheckoutRequest {
|
|
|
2216
2096
|
*/
|
|
2217
2097
|
overrideCheckoutUrl?: string | null;
|
|
2218
2098
|
}
|
|
2219
|
-
interface CustomLineItem {
|
|
2099
|
+
export interface CustomLineItem {
|
|
2220
2100
|
/**
|
|
2221
2101
|
* Custom line item quantity.
|
|
2222
2102
|
*
|
|
@@ -2315,20 +2195,6 @@ interface CustomLineItem {
|
|
|
2315
2195
|
deliveryProfileId?: string | null;
|
|
2316
2196
|
/** 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. */
|
|
2317
2197
|
catalogReference?: CatalogReference;
|
|
2318
|
-
/**
|
|
2319
|
-
* Whether the price is not yet defined, and will be updated after the order is created.
|
|
2320
|
-
*
|
|
2321
|
-
* Default: `false`
|
|
2322
|
-
* @internal
|
|
2323
|
-
*/
|
|
2324
|
-
priceUndetermined?: boolean;
|
|
2325
|
-
/**
|
|
2326
|
-
* Whether the line item quantity is fixed and cannot be changed.
|
|
2327
|
-
*
|
|
2328
|
-
* Default: `false`
|
|
2329
|
-
* @internal
|
|
2330
|
-
*/
|
|
2331
|
-
fixedQuantity?: boolean;
|
|
2332
2198
|
/**
|
|
2333
2199
|
* Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page.
|
|
2334
2200
|
* @minLength 1
|
|
@@ -2343,32 +2209,8 @@ interface CustomLineItem {
|
|
|
2343
2209
|
* @readonly
|
|
2344
2210
|
*/
|
|
2345
2211
|
savePaymentMethod?: boolean;
|
|
2346
|
-
/**
|
|
2347
|
-
* Policies to be displayed to the customer on the checkout page.
|
|
2348
|
-
* @internal
|
|
2349
|
-
* @maxSize 5
|
|
2350
|
-
*/
|
|
2351
|
-
policies?: Policy[];
|
|
2352
|
-
/**
|
|
2353
|
-
* ID of the app managing the inventory.
|
|
2354
|
-
* @internal
|
|
2355
|
-
* @format GUID
|
|
2356
|
-
*/
|
|
2357
|
-
inventoryAppId?: string | null;
|
|
2358
|
-
/**
|
|
2359
|
-
* Whether the item can only be purchased by site members.
|
|
2360
|
-
*
|
|
2361
|
-
* Default: `false`
|
|
2362
|
-
* @internal
|
|
2363
|
-
*/
|
|
2364
|
-
membersOnly?: boolean;
|
|
2365
|
-
/**
|
|
2366
|
-
* Address to use for tax calculation purposes.
|
|
2367
|
-
* @internal
|
|
2368
|
-
*/
|
|
2369
|
-
taxableAddress?: TaxableAddress;
|
|
2370
2212
|
}
|
|
2371
|
-
interface MerchantDiscountInput {
|
|
2213
|
+
export interface MerchantDiscountInput {
|
|
2372
2214
|
/**
|
|
2373
2215
|
* Discount amount.
|
|
2374
2216
|
* @decimalValue options { gte:0 }
|
|
@@ -2381,75 +2223,75 @@ interface MerchantDiscountInput {
|
|
|
2381
2223
|
*/
|
|
2382
2224
|
lineItemIds?: string[];
|
|
2383
2225
|
}
|
|
2384
|
-
interface CreateCheckoutResponse {
|
|
2226
|
+
export interface CreateCheckoutResponse {
|
|
2385
2227
|
/** Newly created checkout. */
|
|
2386
2228
|
checkout?: Checkout;
|
|
2387
2229
|
}
|
|
2388
|
-
interface ShippingCalculationErrorData extends ShippingCalculationErrorDataShippingCalculationErrorOneOf {
|
|
2230
|
+
export interface ShippingCalculationErrorData extends ShippingCalculationErrorDataShippingCalculationErrorOneOf {
|
|
2389
2231
|
generalShippingCalculationError?: Details;
|
|
2390
2232
|
carrierErrors?: CarrierErrors;
|
|
2391
2233
|
}
|
|
2392
2234
|
/** @oneof */
|
|
2393
|
-
interface ShippingCalculationErrorDataShippingCalculationErrorOneOf {
|
|
2235
|
+
export interface ShippingCalculationErrorDataShippingCalculationErrorOneOf {
|
|
2394
2236
|
generalShippingCalculationError?: Details;
|
|
2395
2237
|
carrierErrors?: CarrierErrors;
|
|
2396
2238
|
}
|
|
2397
|
-
interface GetCheckoutRequest {
|
|
2239
|
+
export interface GetCheckoutRequest {
|
|
2398
2240
|
/**
|
|
2399
2241
|
* Checkout ID.
|
|
2400
2242
|
* @format GUID
|
|
2401
2243
|
*/
|
|
2402
2244
|
_id: string;
|
|
2403
2245
|
}
|
|
2404
|
-
interface GetCheckoutResponse {
|
|
2246
|
+
export interface GetCheckoutResponse {
|
|
2405
2247
|
/** Retrieved checkout. */
|
|
2406
2248
|
checkout?: Checkout;
|
|
2407
2249
|
}
|
|
2408
|
-
interface GetCheckoutWithAllExtendedFieldsRequest {
|
|
2250
|
+
export interface GetCheckoutWithAllExtendedFieldsRequest {
|
|
2409
2251
|
/**
|
|
2410
2252
|
* Checkout ID.
|
|
2411
2253
|
* @format GUID
|
|
2412
2254
|
*/
|
|
2413
2255
|
_id?: string;
|
|
2414
2256
|
}
|
|
2415
|
-
interface GetCheckoutWithAllExtendedFieldsResponse {
|
|
2257
|
+
export interface GetCheckoutWithAllExtendedFieldsResponse {
|
|
2416
2258
|
/** Retrieved checkout. */
|
|
2417
2259
|
checkout?: Checkout;
|
|
2418
2260
|
}
|
|
2419
|
-
interface GetCheckoutByCartIdRequest {
|
|
2261
|
+
export interface GetCheckoutByCartIdRequest {
|
|
2420
2262
|
/**
|
|
2421
2263
|
* Cart ID.
|
|
2422
2264
|
* @format GUID
|
|
2423
2265
|
*/
|
|
2424
2266
|
_id: string;
|
|
2425
2267
|
}
|
|
2426
|
-
interface GetCheckoutByCartIdResponse {
|
|
2268
|
+
export interface GetCheckoutByCartIdResponse {
|
|
2427
2269
|
/** Retrieved checkout. */
|
|
2428
2270
|
checkout?: Checkout;
|
|
2429
2271
|
}
|
|
2430
|
-
interface GetWixCheckoutURLRequest {
|
|
2272
|
+
export interface GetWixCheckoutURLRequest {
|
|
2431
2273
|
/**
|
|
2432
2274
|
* Checkout ID.
|
|
2433
2275
|
* @format GUID
|
|
2434
2276
|
*/
|
|
2435
2277
|
_id: string;
|
|
2436
2278
|
}
|
|
2437
|
-
interface GetWixCheckoutURLResponse {
|
|
2279
|
+
export interface GetWixCheckoutURLResponse {
|
|
2438
2280
|
/** Checkout URL. */
|
|
2439
2281
|
checkoutUrl?: string;
|
|
2440
2282
|
}
|
|
2441
|
-
interface GetCheckoutURLRequest {
|
|
2283
|
+
export interface GetCheckoutURLRequest {
|
|
2442
2284
|
/**
|
|
2443
2285
|
* Checkout ID.
|
|
2444
2286
|
* @format GUID
|
|
2445
2287
|
*/
|
|
2446
2288
|
_id: string;
|
|
2447
2289
|
}
|
|
2448
|
-
interface GetCheckoutURLResponse {
|
|
2290
|
+
export interface GetCheckoutURLResponse {
|
|
2449
2291
|
/** Checkout URL. */
|
|
2450
2292
|
checkoutUrl?: string;
|
|
2451
2293
|
}
|
|
2452
|
-
interface UpdateCheckoutRequest {
|
|
2294
|
+
export interface UpdateCheckoutRequest {
|
|
2453
2295
|
/** Checkout information. */
|
|
2454
2296
|
checkout: Checkout;
|
|
2455
2297
|
/** 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). */
|
|
@@ -2477,44 +2319,44 @@ interface UpdateCheckoutRequest {
|
|
|
2477
2319
|
*/
|
|
2478
2320
|
customLineItems?: CustomLineItem[];
|
|
2479
2321
|
}
|
|
2480
|
-
interface UpdateCheckoutResponse {
|
|
2322
|
+
export interface UpdateCheckoutResponse {
|
|
2481
2323
|
/** Updated checkout. */
|
|
2482
2324
|
checkout?: Checkout;
|
|
2483
2325
|
}
|
|
2484
|
-
interface RemoveCouponRequest {
|
|
2326
|
+
export interface RemoveCouponRequest {
|
|
2485
2327
|
/**
|
|
2486
2328
|
* ID of the checkout to remove the coupon from.
|
|
2487
2329
|
* @format GUID
|
|
2488
2330
|
*/
|
|
2489
2331
|
_id: string;
|
|
2490
2332
|
}
|
|
2491
|
-
interface RemoveCouponResponse {
|
|
2333
|
+
export interface RemoveCouponResponse {
|
|
2492
2334
|
/** Updated checkout after removal of coupon. */
|
|
2493
2335
|
checkout?: Checkout;
|
|
2494
2336
|
}
|
|
2495
|
-
interface RemoveGiftCardRequest {
|
|
2337
|
+
export interface RemoveGiftCardRequest {
|
|
2496
2338
|
/**
|
|
2497
2339
|
* ID of the checkout to remove the gift card from.
|
|
2498
2340
|
* @format GUID
|
|
2499
2341
|
*/
|
|
2500
2342
|
_id: string;
|
|
2501
2343
|
}
|
|
2502
|
-
interface RemoveGiftCardResponse {
|
|
2344
|
+
export interface RemoveGiftCardResponse {
|
|
2503
2345
|
/** Updated checkout after removal of gift card. */
|
|
2504
2346
|
checkout?: Checkout;
|
|
2505
2347
|
}
|
|
2506
|
-
interface RemoveOverrideCheckoutUrlRequest {
|
|
2348
|
+
export interface RemoveOverrideCheckoutUrlRequest {
|
|
2507
2349
|
/**
|
|
2508
2350
|
* ID of the checkout to remove the override checkout url from.
|
|
2509
2351
|
* @format GUID
|
|
2510
2352
|
*/
|
|
2511
2353
|
_id: string;
|
|
2512
2354
|
}
|
|
2513
|
-
interface RemoveOverrideCheckoutUrlResponse {
|
|
2355
|
+
export interface RemoveOverrideCheckoutUrlResponse {
|
|
2514
2356
|
/** Updated checkout after removal of override checkout url. */
|
|
2515
2357
|
checkout?: Checkout;
|
|
2516
2358
|
}
|
|
2517
|
-
interface AddToCheckoutRequest {
|
|
2359
|
+
export interface AddToCheckoutRequest {
|
|
2518
2360
|
/**
|
|
2519
2361
|
* Checkout ID.
|
|
2520
2362
|
* @format GUID
|
|
@@ -2534,11 +2376,11 @@ interface AddToCheckoutRequest {
|
|
|
2534
2376
|
*/
|
|
2535
2377
|
customLineItems?: CustomLineItem[];
|
|
2536
2378
|
}
|
|
2537
|
-
interface AddToCheckoutResponse {
|
|
2379
|
+
export interface AddToCheckoutResponse {
|
|
2538
2380
|
/** Updated checkout. */
|
|
2539
2381
|
checkout?: Checkout;
|
|
2540
2382
|
}
|
|
2541
|
-
interface RemoveLineItemsRequest {
|
|
2383
|
+
export interface RemoveLineItemsRequest {
|
|
2542
2384
|
/**
|
|
2543
2385
|
* ID of the checkout to remove line items from.
|
|
2544
2386
|
* @format GUID
|
|
@@ -2552,11 +2394,11 @@ interface RemoveLineItemsRequest {
|
|
|
2552
2394
|
*/
|
|
2553
2395
|
lineItemIds: string[];
|
|
2554
2396
|
}
|
|
2555
|
-
interface RemoveLineItemsResponse {
|
|
2397
|
+
export interface RemoveLineItemsResponse {
|
|
2556
2398
|
/** Updated checkout after removal of line items. */
|
|
2557
2399
|
checkout?: Checkout;
|
|
2558
2400
|
}
|
|
2559
|
-
interface CreateOrderRequest {
|
|
2401
|
+
export interface CreateOrderRequest {
|
|
2560
2402
|
/**
|
|
2561
2403
|
* Checkout ID.
|
|
2562
2404
|
* @format GUID
|
|
@@ -2567,7 +2409,7 @@ interface CreateOrderRequest {
|
|
|
2567
2409
|
/** Whether to authorize the payment and delay the capture. */
|
|
2568
2410
|
delayCapture?: boolean;
|
|
2569
2411
|
}
|
|
2570
|
-
interface CreateOrderResponse extends CreateOrderResponseIdOneOf {
|
|
2412
|
+
export interface CreateOrderResponse extends CreateOrderResponseIdOneOf {
|
|
2571
2413
|
/**
|
|
2572
2414
|
* ID of the newly created order.
|
|
2573
2415
|
* @format GUID
|
|
@@ -2590,7 +2432,7 @@ interface CreateOrderResponse extends CreateOrderResponseIdOneOf {
|
|
|
2590
2432
|
paymentGatewayOrderId?: string | null;
|
|
2591
2433
|
}
|
|
2592
2434
|
/** @oneof */
|
|
2593
|
-
interface CreateOrderResponseIdOneOf {
|
|
2435
|
+
export interface CreateOrderResponseIdOneOf {
|
|
2594
2436
|
/**
|
|
2595
2437
|
* ID of newly created order.
|
|
2596
2438
|
* @format GUID
|
|
@@ -2602,32 +2444,32 @@ interface CreateOrderResponseIdOneOf {
|
|
|
2602
2444
|
*/
|
|
2603
2445
|
subscriptionId?: string;
|
|
2604
2446
|
}
|
|
2605
|
-
interface PaymentErrorResponseData {
|
|
2447
|
+
export interface PaymentErrorResponseData {
|
|
2606
2448
|
paymentResponseToken?: string | null;
|
|
2607
2449
|
transactionStatus?: string;
|
|
2608
2450
|
failureDetails?: string | null;
|
|
2609
2451
|
}
|
|
2610
|
-
interface DoublePaymentErrorData extends DoublePaymentErrorDataIdOneOf {
|
|
2452
|
+
export interface DoublePaymentErrorData extends DoublePaymentErrorDataIdOneOf {
|
|
2611
2453
|
/** @format GUID */
|
|
2612
2454
|
orderId?: string;
|
|
2613
2455
|
/** @format GUID */
|
|
2614
2456
|
subscriptionId?: string;
|
|
2615
2457
|
}
|
|
2616
2458
|
/** @oneof */
|
|
2617
|
-
interface DoublePaymentErrorDataIdOneOf {
|
|
2459
|
+
export interface DoublePaymentErrorDataIdOneOf {
|
|
2618
2460
|
/** @format GUID */
|
|
2619
2461
|
orderId?: string;
|
|
2620
2462
|
/** @format GUID */
|
|
2621
2463
|
subscriptionId?: string;
|
|
2622
2464
|
}
|
|
2623
|
-
interface RedeemErrorData {
|
|
2465
|
+
export interface RedeemErrorData {
|
|
2624
2466
|
reason?: string;
|
|
2625
2467
|
}
|
|
2626
|
-
interface ViolationsList {
|
|
2468
|
+
export interface ViolationsList {
|
|
2627
2469
|
/** Violations risen by ValidationsSPI implementers. */
|
|
2628
2470
|
violations?: Violation[];
|
|
2629
2471
|
}
|
|
2630
|
-
interface CreateOrderAndChargeRequest {
|
|
2472
|
+
export interface CreateOrderAndChargeRequest {
|
|
2631
2473
|
/**
|
|
2632
2474
|
* Checkout ID.
|
|
2633
2475
|
* @format GUID
|
|
@@ -2640,7 +2482,7 @@ interface CreateOrderAndChargeRequest {
|
|
|
2640
2482
|
/** Whether to authorize the payment and delay the capture. */
|
|
2641
2483
|
delayCapture?: boolean;
|
|
2642
2484
|
}
|
|
2643
|
-
interface CreateOrderAndChargeResponse extends CreateOrderAndChargeResponseIdOneOf {
|
|
2485
|
+
export interface CreateOrderAndChargeResponse extends CreateOrderAndChargeResponseIdOneOf {
|
|
2644
2486
|
/**
|
|
2645
2487
|
* ID of newly created order.
|
|
2646
2488
|
* @format GUID
|
|
@@ -2662,15 +2504,9 @@ interface CreateOrderAndChargeResponse extends CreateOrderAndChargeResponseIdOne
|
|
|
2662
2504
|
* + If the total price is not 0, but the payment is covered by alternative payment methods, such as a gift card.
|
|
2663
2505
|
*/
|
|
2664
2506
|
paymentGatewayOrderId?: string | null;
|
|
2665
|
-
/**
|
|
2666
|
-
* Whether an order was successfully created from this checkout and the payment transaction was completed
|
|
2667
|
-
* @internal
|
|
2668
|
-
* @readonly
|
|
2669
|
-
*/
|
|
2670
|
-
checkoutCompleted?: boolean;
|
|
2671
2507
|
}
|
|
2672
2508
|
/** @oneof */
|
|
2673
|
-
interface CreateOrderAndChargeResponseIdOneOf {
|
|
2509
|
+
export interface CreateOrderAndChargeResponseIdOneOf {
|
|
2674
2510
|
/**
|
|
2675
2511
|
* ID of newly created order.
|
|
2676
2512
|
* @format GUID
|
|
@@ -2682,42 +2518,36 @@ interface CreateOrderAndChargeResponseIdOneOf {
|
|
|
2682
2518
|
*/
|
|
2683
2519
|
subscriptionId?: string;
|
|
2684
2520
|
}
|
|
2685
|
-
interface MarkCheckoutAsCompletedAndRedirectToUrlRequest {
|
|
2521
|
+
export interface MarkCheckoutAsCompletedAndRedirectToUrlRequest {
|
|
2686
2522
|
/**
|
|
2687
2523
|
* Server-signed JWT token with required information to complete checkout
|
|
2688
2524
|
* @maxLength 4096
|
|
2689
2525
|
*/
|
|
2690
2526
|
token: string;
|
|
2691
2527
|
}
|
|
2692
|
-
interface RawHttpResponse {
|
|
2528
|
+
export interface RawHttpResponse {
|
|
2693
2529
|
body?: Uint8Array;
|
|
2694
2530
|
statusCode?: number | null;
|
|
2695
2531
|
headers?: HeadersEntry[];
|
|
2696
2532
|
}
|
|
2697
|
-
interface HeadersEntry {
|
|
2533
|
+
export interface HeadersEntry {
|
|
2698
2534
|
key?: string;
|
|
2699
2535
|
value?: string;
|
|
2700
2536
|
}
|
|
2701
|
-
interface MarkCheckoutAsCompletedRequest {
|
|
2537
|
+
export interface MarkCheckoutAsCompletedRequest {
|
|
2702
2538
|
/**
|
|
2703
2539
|
* Checkout ID.
|
|
2704
2540
|
* @format GUID
|
|
2705
2541
|
*/
|
|
2706
2542
|
_id: string;
|
|
2707
|
-
/**
|
|
2708
|
-
* Order ID.
|
|
2709
|
-
* @internal
|
|
2710
|
-
* @format GUID
|
|
2711
|
-
*/
|
|
2712
|
-
orderId?: string | null;
|
|
2713
2543
|
}
|
|
2714
|
-
interface MarkCheckoutAsCompletedResponse {
|
|
2544
|
+
export interface MarkCheckoutAsCompletedResponse {
|
|
2715
2545
|
}
|
|
2716
2546
|
/** Triggered when an order created from this checkout is successfully paid for or when a checkout is marked as completed. */
|
|
2717
|
-
interface CheckoutMarkedAsCompleted {
|
|
2547
|
+
export interface CheckoutMarkedAsCompleted {
|
|
2718
2548
|
checkout?: Checkout;
|
|
2719
2549
|
}
|
|
2720
|
-
interface UpdateLineItemsQuantityRequest {
|
|
2550
|
+
export interface UpdateLineItemsQuantityRequest {
|
|
2721
2551
|
/**
|
|
2722
2552
|
* Checkout ID.
|
|
2723
2553
|
* @format GUID
|
|
@@ -2730,7 +2560,7 @@ interface UpdateLineItemsQuantityRequest {
|
|
|
2730
2560
|
*/
|
|
2731
2561
|
lineItems: LineItemQuantityUpdate[];
|
|
2732
2562
|
}
|
|
2733
|
-
interface LineItemQuantityUpdate {
|
|
2563
|
+
export interface LineItemQuantityUpdate {
|
|
2734
2564
|
/**
|
|
2735
2565
|
* ID of the line item to update.
|
|
2736
2566
|
* @format GUID
|
|
@@ -2748,37 +2578,37 @@ interface LineItemQuantityUpdate {
|
|
|
2748
2578
|
*/
|
|
2749
2579
|
quantity?: number;
|
|
2750
2580
|
}
|
|
2751
|
-
interface UpdateLineItemsQuantityResponse {
|
|
2581
|
+
export interface UpdateLineItemsQuantityResponse {
|
|
2752
2582
|
/** Updated checkout. */
|
|
2753
2583
|
checkout?: Checkout;
|
|
2754
2584
|
}
|
|
2755
|
-
interface GetCheckoutPaymentSettingsRequest {
|
|
2585
|
+
export interface GetCheckoutPaymentSettingsRequest {
|
|
2756
2586
|
/**
|
|
2757
2587
|
* Checkout ID.
|
|
2758
2588
|
* @format GUID
|
|
2759
2589
|
*/
|
|
2760
2590
|
_id: string;
|
|
2761
2591
|
}
|
|
2762
|
-
interface GetCheckoutPaymentSettingsResponse {
|
|
2592
|
+
export interface GetCheckoutPaymentSettingsResponse {
|
|
2763
2593
|
blockedPaymentOptions?: GetCheckoutPaymentSettingsResponsePaymentOption[];
|
|
2764
2594
|
}
|
|
2765
|
-
declare enum GetCheckoutPaymentSettingsResponsePaymentOption {
|
|
2595
|
+
export declare enum GetCheckoutPaymentSettingsResponsePaymentOption {
|
|
2766
2596
|
UNKNOWN_PAYMENT_OPTION = "UNKNOWN_PAYMENT_OPTION",
|
|
2767
2597
|
MANUAL = "MANUAL"
|
|
2768
2598
|
}
|
|
2769
|
-
interface DeleteCheckoutRequest {
|
|
2599
|
+
export interface DeleteCheckoutRequest {
|
|
2770
2600
|
/**
|
|
2771
2601
|
* ID of the checkout to delete.
|
|
2772
2602
|
* @format GUID
|
|
2773
2603
|
*/
|
|
2774
2604
|
_id?: string;
|
|
2775
2605
|
}
|
|
2776
|
-
interface DeleteCheckoutResponse {
|
|
2606
|
+
export interface DeleteCheckoutResponse {
|
|
2777
2607
|
}
|
|
2778
|
-
interface SubscriptionCreated {
|
|
2608
|
+
export interface SubscriptionCreated {
|
|
2779
2609
|
subscription?: Subscription;
|
|
2780
2610
|
}
|
|
2781
|
-
interface Subscription {
|
|
2611
|
+
export interface Subscription {
|
|
2782
2612
|
/**
|
|
2783
2613
|
* Subscription id (auto-generated upon subscription creation)
|
|
2784
2614
|
* @readonly
|
|
@@ -2842,7 +2672,7 @@ interface Subscription {
|
|
|
2842
2672
|
billingInfo?: BillingInfo;
|
|
2843
2673
|
}
|
|
2844
2674
|
/** Buyer Info */
|
|
2845
|
-
interface V1BuyerInfo {
|
|
2675
|
+
export interface V1BuyerInfo {
|
|
2846
2676
|
/**
|
|
2847
2677
|
* Wix customer ID
|
|
2848
2678
|
* @format GUID
|
|
@@ -2851,14 +2681,14 @@ interface V1BuyerInfo {
|
|
|
2851
2681
|
/** Customer type */
|
|
2852
2682
|
identityType?: IdentityType;
|
|
2853
2683
|
}
|
|
2854
|
-
declare enum IdentityType {
|
|
2684
|
+
export declare enum IdentityType {
|
|
2855
2685
|
UNSPECIFIED_IDENTITY_TYPE = "UNSPECIFIED_IDENTITY_TYPE",
|
|
2856
2686
|
/** Site member */
|
|
2857
2687
|
MEMBER = "MEMBER",
|
|
2858
2688
|
/** Contact */
|
|
2859
2689
|
CONTACT = "CONTACT"
|
|
2860
2690
|
}
|
|
2861
|
-
interface V1LineItem {
|
|
2691
|
+
export interface V1LineItem {
|
|
2862
2692
|
/** Line item ID (auto-generated) */
|
|
2863
2693
|
index?: number;
|
|
2864
2694
|
/**
|
|
@@ -2887,7 +2717,7 @@ interface V1LineItem {
|
|
|
2887
2717
|
/** Product details */
|
|
2888
2718
|
productDetails?: ProductDetails;
|
|
2889
2719
|
}
|
|
2890
|
-
interface OptionSelection {
|
|
2720
|
+
export interface OptionSelection {
|
|
2891
2721
|
/**
|
|
2892
2722
|
* Option name
|
|
2893
2723
|
* @maxLength 200
|
|
@@ -2899,7 +2729,7 @@ interface OptionSelection {
|
|
|
2899
2729
|
*/
|
|
2900
2730
|
selection?: string;
|
|
2901
2731
|
}
|
|
2902
|
-
interface CustomTextFieldSelection {
|
|
2732
|
+
export interface CustomTextFieldSelection {
|
|
2903
2733
|
/**
|
|
2904
2734
|
* Custom text field name
|
|
2905
2735
|
* @maxLength 100
|
|
@@ -2911,7 +2741,7 @@ interface CustomTextFieldSelection {
|
|
|
2911
2741
|
*/
|
|
2912
2742
|
value?: string;
|
|
2913
2743
|
}
|
|
2914
|
-
interface ChargeDetails {
|
|
2744
|
+
export interface ChargeDetails {
|
|
2915
2745
|
/**
|
|
2916
2746
|
* price of line item (depends on subscription option)
|
|
2917
2747
|
* @max 999999999.99
|
|
@@ -2940,7 +2770,7 @@ interface ChargeDetails {
|
|
|
2940
2770
|
*/
|
|
2941
2771
|
taxRate?: string | null;
|
|
2942
2772
|
}
|
|
2943
|
-
interface ProductDetails {
|
|
2773
|
+
export interface ProductDetails {
|
|
2944
2774
|
/**
|
|
2945
2775
|
* Line item product ID (optional for POS orders)
|
|
2946
2776
|
* @minLength 1
|
|
@@ -2993,7 +2823,7 @@ interface ProductDetails {
|
|
|
2993
2823
|
*/
|
|
2994
2824
|
appId?: string | null;
|
|
2995
2825
|
}
|
|
2996
|
-
declare enum LineItemType {
|
|
2826
|
+
export declare enum LineItemType {
|
|
2997
2827
|
/** Line item type can't be classified, due to an error */
|
|
2998
2828
|
UNSPECIFIED_LINE_ITEM_TYPE = "UNSPECIFIED_LINE_ITEM_TYPE",
|
|
2999
2829
|
/** Physical item type */
|
|
@@ -3003,7 +2833,7 @@ declare enum LineItemType {
|
|
|
3003
2833
|
/** Custom item price */
|
|
3004
2834
|
CUSTOM_AMOUNT_ITEM = "CUSTOM_AMOUNT_ITEM"
|
|
3005
2835
|
}
|
|
3006
|
-
interface MediaItem {
|
|
2836
|
+
export interface MediaItem {
|
|
3007
2837
|
/**
|
|
3008
2838
|
* Media type
|
|
3009
2839
|
* @readonly
|
|
@@ -3037,13 +2867,13 @@ interface MediaItem {
|
|
|
3037
2867
|
*/
|
|
3038
2868
|
altText?: string | null;
|
|
3039
2869
|
}
|
|
3040
|
-
declare enum MediaItemType {
|
|
2870
|
+
export declare enum MediaItemType {
|
|
3041
2871
|
/** Media item type can't be classified, due to an error */
|
|
3042
2872
|
UNSPECIFIED_MEDIA_TYPE_ITEM = "UNSPECIFIED_MEDIA_TYPE_ITEM",
|
|
3043
2873
|
/** Image item type */
|
|
3044
2874
|
IMAGE = "IMAGE"
|
|
3045
2875
|
}
|
|
3046
|
-
interface Totals {
|
|
2876
|
+
export interface Totals {
|
|
3047
2877
|
/**
|
|
3048
2878
|
* Subtotal of all line items, before tax
|
|
3049
2879
|
* @max 999999999.99
|
|
@@ -3080,7 +2910,7 @@ interface Totals {
|
|
|
3080
2910
|
*/
|
|
3081
2911
|
quantity?: number;
|
|
3082
2912
|
}
|
|
3083
|
-
interface StoreSettings {
|
|
2913
|
+
export interface StoreSettings {
|
|
3084
2914
|
/**
|
|
3085
2915
|
* Currency used for pricing in this store
|
|
3086
2916
|
* @maxLength 3
|
|
@@ -3098,7 +2928,7 @@ interface StoreSettings {
|
|
|
3098
2928
|
*/
|
|
3099
2929
|
buyerLanguage?: string | null;
|
|
3100
2930
|
}
|
|
3101
|
-
interface Address extends AddressAddressLine1OptionsOneOf {
|
|
2931
|
+
export interface Address extends AddressAddressLine1OptionsOneOf {
|
|
3102
2932
|
/**
|
|
3103
2933
|
* Address line 1 (free text)
|
|
3104
2934
|
* @maxLength 1000
|
|
@@ -3152,7 +2982,7 @@ interface Address extends AddressAddressLine1OptionsOneOf {
|
|
|
3152
2982
|
vatId?: VatId;
|
|
3153
2983
|
}
|
|
3154
2984
|
/** @oneof */
|
|
3155
|
-
interface AddressAddressLine1OptionsOneOf {
|
|
2985
|
+
export interface AddressAddressLine1OptionsOneOf {
|
|
3156
2986
|
/**
|
|
3157
2987
|
* Address line 1 (free text)
|
|
3158
2988
|
* @maxLength 1000
|
|
@@ -3161,7 +2991,7 @@ interface AddressAddressLine1OptionsOneOf {
|
|
|
3161
2991
|
/** Address line 1 (street) */
|
|
3162
2992
|
street?: Street;
|
|
3163
2993
|
}
|
|
3164
|
-
interface FullName {
|
|
2994
|
+
export interface FullName {
|
|
3165
2995
|
/**
|
|
3166
2996
|
* Customer's first name
|
|
3167
2997
|
* @maxLength 1000
|
|
@@ -3173,7 +3003,7 @@ interface FullName {
|
|
|
3173
3003
|
*/
|
|
3174
3004
|
lastName?: string;
|
|
3175
3005
|
}
|
|
3176
|
-
interface Street {
|
|
3006
|
+
export interface Street {
|
|
3177
3007
|
/**
|
|
3178
3008
|
* Street number
|
|
3179
3009
|
* @maxLength 500
|
|
@@ -3185,7 +3015,7 @@ interface Street {
|
|
|
3185
3015
|
*/
|
|
3186
3016
|
name?: string;
|
|
3187
3017
|
}
|
|
3188
|
-
interface VatId {
|
|
3018
|
+
export interface VatId {
|
|
3189
3019
|
/**
|
|
3190
3020
|
* Customer's tax ID.
|
|
3191
3021
|
* @maxLength 50
|
|
@@ -3199,7 +3029,7 @@ interface VatId {
|
|
|
3199
3029
|
type?: VatType;
|
|
3200
3030
|
}
|
|
3201
3031
|
/** Brazilian tax info types */
|
|
3202
|
-
declare enum VatType {
|
|
3032
|
+
export declare enum VatType {
|
|
3203
3033
|
/** When the tax info type can't be classified, due to an error */
|
|
3204
3034
|
UNSPECIFIED_TAX_TYPE = "UNSPECIFIED_TAX_TYPE",
|
|
3205
3035
|
/** CPF - for individual tax payers */
|
|
@@ -3207,7 +3037,7 @@ declare enum VatType {
|
|
|
3207
3037
|
/** CNPJ - for corporations */
|
|
3208
3038
|
CNPJ = "CNPJ"
|
|
3209
3039
|
}
|
|
3210
|
-
interface V1ShippingInfo extends V1ShippingInfoDetailsOneOf {
|
|
3040
|
+
export interface V1ShippingInfo extends V1ShippingInfoDetailsOneOf {
|
|
3211
3041
|
/** Shipment details (when this object describes shipment) */
|
|
3212
3042
|
shipmentDetails?: ShipmentDetails;
|
|
3213
3043
|
/** Pickup details (when this object describes pickup) */
|
|
@@ -3224,13 +3054,13 @@ interface V1ShippingInfo extends V1ShippingInfoDetailsOneOf {
|
|
|
3224
3054
|
estimatedDeliveryTime?: string | null;
|
|
3225
3055
|
}
|
|
3226
3056
|
/** @oneof */
|
|
3227
|
-
interface V1ShippingInfoDetailsOneOf {
|
|
3057
|
+
export interface V1ShippingInfoDetailsOneOf {
|
|
3228
3058
|
/** Shipment details (when this object describes shipment) */
|
|
3229
3059
|
shipmentDetails?: ShipmentDetails;
|
|
3230
3060
|
/** Pickup details (when this object describes pickup) */
|
|
3231
3061
|
pickupDetails?: V1PickupDetails;
|
|
3232
3062
|
}
|
|
3233
|
-
interface ShipmentDetails {
|
|
3063
|
+
export interface ShipmentDetails {
|
|
3234
3064
|
/** Shipping destination address */
|
|
3235
3065
|
address?: Address;
|
|
3236
3066
|
/**
|
|
@@ -3251,7 +3081,7 @@ interface ShipmentDetails {
|
|
|
3251
3081
|
*/
|
|
3252
3082
|
taxRate?: string | null;
|
|
3253
3083
|
}
|
|
3254
|
-
interface V1PickupDetails {
|
|
3084
|
+
export interface V1PickupDetails {
|
|
3255
3085
|
/** Pickup address */
|
|
3256
3086
|
address?: PickupAddress;
|
|
3257
3087
|
/**
|
|
@@ -3260,7 +3090,7 @@ interface V1PickupDetails {
|
|
|
3260
3090
|
*/
|
|
3261
3091
|
pickupInstructions?: string | null;
|
|
3262
3092
|
}
|
|
3263
|
-
interface PickupAddress {
|
|
3093
|
+
export interface PickupAddress {
|
|
3264
3094
|
/**
|
|
3265
3095
|
* Country code (2 letters)
|
|
3266
3096
|
* @format COUNTRY
|
|
@@ -3287,7 +3117,7 @@ interface PickupAddress {
|
|
|
3287
3117
|
*/
|
|
3288
3118
|
zipCode?: string;
|
|
3289
3119
|
}
|
|
3290
|
-
interface AppliedCoupon {
|
|
3120
|
+
export interface AppliedCoupon {
|
|
3291
3121
|
/** Coupon ID */
|
|
3292
3122
|
couponId?: string;
|
|
3293
3123
|
/**
|
|
@@ -3302,7 +3132,7 @@ interface AppliedCoupon {
|
|
|
3302
3132
|
code?: string;
|
|
3303
3133
|
}
|
|
3304
3134
|
/** Custom field */
|
|
3305
|
-
interface V1CustomField {
|
|
3135
|
+
export interface V1CustomField {
|
|
3306
3136
|
/**
|
|
3307
3137
|
* Free text that the customer entered in the custom field during the checkout process
|
|
3308
3138
|
* @maxLength 250
|
|
@@ -3319,7 +3149,7 @@ interface V1CustomField {
|
|
|
3319
3149
|
*/
|
|
3320
3150
|
translatedTitle?: string;
|
|
3321
3151
|
}
|
|
3322
|
-
interface V1SubscriptionOptionInfo {
|
|
3152
|
+
export interface V1SubscriptionOptionInfo {
|
|
3323
3153
|
/** @format GUID */
|
|
3324
3154
|
_id?: string | null;
|
|
3325
3155
|
/**
|
|
@@ -3331,29 +3161,29 @@ interface V1SubscriptionOptionInfo {
|
|
|
3331
3161
|
description?: string | null;
|
|
3332
3162
|
discount?: Discount;
|
|
3333
3163
|
}
|
|
3334
|
-
interface Discount {
|
|
3164
|
+
export interface Discount {
|
|
3335
3165
|
/** Discount type. */
|
|
3336
3166
|
type?: DiscountDiscountType;
|
|
3337
3167
|
/** Discount value. */
|
|
3338
3168
|
value?: number;
|
|
3339
3169
|
}
|
|
3340
|
-
declare enum DiscountDiscountType {
|
|
3170
|
+
export declare enum DiscountDiscountType {
|
|
3341
3171
|
UNDEFINED = "UNDEFINED",
|
|
3342
3172
|
/** No discount */
|
|
3343
3173
|
AMOUNT = "AMOUNT",
|
|
3344
3174
|
PERCENT = "PERCENT"
|
|
3345
3175
|
}
|
|
3346
|
-
interface ChannelInfo {
|
|
3176
|
+
export interface ChannelInfo {
|
|
3347
3177
|
/** Sales channel that submitted the subscription */
|
|
3348
3178
|
type?: ChannelInfoChannelType;
|
|
3349
3179
|
}
|
|
3350
|
-
declare enum ChannelInfoChannelType {
|
|
3180
|
+
export declare enum ChannelInfoChannelType {
|
|
3351
3181
|
UNSPECIFIED = "UNSPECIFIED",
|
|
3352
3182
|
WEB = "WEB",
|
|
3353
3183
|
OTHER_PLATFORM = "OTHER_PLATFORM",
|
|
3354
3184
|
WIX_APP_STORE = "WIX_APP_STORE"
|
|
3355
3185
|
}
|
|
3356
|
-
interface V1SubscriptionSettings {
|
|
3186
|
+
export interface V1SubscriptionSettings {
|
|
3357
3187
|
/** Frequency of recurring payment. */
|
|
3358
3188
|
frequency?: SubscriptionFrequency;
|
|
3359
3189
|
/** Whether subscription is renewed automatically at the end of each period. */
|
|
@@ -3365,7 +3195,7 @@ interface V1SubscriptionSettings {
|
|
|
3365
3195
|
*/
|
|
3366
3196
|
billingCycles?: number | null;
|
|
3367
3197
|
}
|
|
3368
|
-
interface BillingInfo {
|
|
3198
|
+
export interface BillingInfo {
|
|
3369
3199
|
/**
|
|
3370
3200
|
* Payment method used for this order
|
|
3371
3201
|
* @maxLength 50
|
|
@@ -3382,9 +3212,9 @@ interface BillingInfo {
|
|
|
3382
3212
|
*/
|
|
3383
3213
|
paymentGatewayOrderId?: string | null;
|
|
3384
3214
|
}
|
|
3385
|
-
interface Empty {
|
|
3215
|
+
export interface Empty {
|
|
3386
3216
|
}
|
|
3387
|
-
interface DomainEvent extends DomainEventBodyOneOf {
|
|
3217
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
3388
3218
|
createdEvent?: EntityCreatedEvent;
|
|
3389
3219
|
updatedEvent?: EntityUpdatedEvent;
|
|
3390
3220
|
deletedEvent?: EntityDeletedEvent;
|
|
@@ -3427,19 +3257,19 @@ interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
3427
3257
|
entityEventSequence?: string | null;
|
|
3428
3258
|
}
|
|
3429
3259
|
/** @oneof */
|
|
3430
|
-
interface DomainEventBodyOneOf {
|
|
3260
|
+
export interface DomainEventBodyOneOf {
|
|
3431
3261
|
createdEvent?: EntityCreatedEvent;
|
|
3432
3262
|
updatedEvent?: EntityUpdatedEvent;
|
|
3433
3263
|
deletedEvent?: EntityDeletedEvent;
|
|
3434
3264
|
actionEvent?: ActionEvent;
|
|
3435
3265
|
}
|
|
3436
|
-
interface EntityCreatedEvent {
|
|
3266
|
+
export interface EntityCreatedEvent {
|
|
3437
3267
|
entity?: string;
|
|
3438
3268
|
}
|
|
3439
|
-
interface RestoreInfo {
|
|
3269
|
+
export interface RestoreInfo {
|
|
3440
3270
|
deletedDate?: Date | null;
|
|
3441
3271
|
}
|
|
3442
|
-
interface EntityUpdatedEvent {
|
|
3272
|
+
export interface EntityUpdatedEvent {
|
|
3443
3273
|
/**
|
|
3444
3274
|
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
3445
3275
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
@@ -3447,14 +3277,14 @@ interface EntityUpdatedEvent {
|
|
|
3447
3277
|
*/
|
|
3448
3278
|
currentEntity?: string;
|
|
3449
3279
|
}
|
|
3450
|
-
interface EntityDeletedEvent {
|
|
3280
|
+
export interface EntityDeletedEvent {
|
|
3451
3281
|
/** Entity that was deleted */
|
|
3452
3282
|
deletedEntity?: string | null;
|
|
3453
3283
|
}
|
|
3454
|
-
interface ActionEvent {
|
|
3284
|
+
export interface ActionEvent {
|
|
3455
3285
|
body?: string;
|
|
3456
3286
|
}
|
|
3457
|
-
interface MessageEnvelope {
|
|
3287
|
+
export interface MessageEnvelope {
|
|
3458
3288
|
/**
|
|
3459
3289
|
* App instance ID.
|
|
3460
3290
|
* @format GUID
|
|
@@ -3470,7 +3300,7 @@ interface MessageEnvelope {
|
|
|
3470
3300
|
/** Stringify payload. */
|
|
3471
3301
|
data?: string;
|
|
3472
3302
|
}
|
|
3473
|
-
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
3303
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
3474
3304
|
/**
|
|
3475
3305
|
* ID of a site visitor that has not logged in to the site.
|
|
3476
3306
|
* @format GUID
|
|
@@ -3495,7 +3325,7 @@ interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
3495
3325
|
identityType?: WebhookIdentityType;
|
|
3496
3326
|
}
|
|
3497
3327
|
/** @oneof */
|
|
3498
|
-
interface IdentificationDataIdOneOf {
|
|
3328
|
+
export interface IdentificationDataIdOneOf {
|
|
3499
3329
|
/**
|
|
3500
3330
|
* ID of a site visitor that has not logged in to the site.
|
|
3501
3331
|
* @format GUID
|
|
@@ -3517,14 +3347,14 @@ interface IdentificationDataIdOneOf {
|
|
|
3517
3347
|
*/
|
|
3518
3348
|
appId?: string;
|
|
3519
3349
|
}
|
|
3520
|
-
declare enum WebhookIdentityType {
|
|
3350
|
+
export declare enum WebhookIdentityType {
|
|
3521
3351
|
UNKNOWN = "UNKNOWN",
|
|
3522
3352
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
3523
3353
|
MEMBER = "MEMBER",
|
|
3524
3354
|
WIX_USER = "WIX_USER",
|
|
3525
3355
|
APP = "APP"
|
|
3526
3356
|
}
|
|
3527
|
-
interface BaseEventMetadata {
|
|
3357
|
+
export interface BaseEventMetadata {
|
|
3528
3358
|
/**
|
|
3529
3359
|
* App instance ID.
|
|
3530
3360
|
* @format GUID
|
|
@@ -3538,7 +3368,7 @@ interface BaseEventMetadata {
|
|
|
3538
3368
|
/** The identification type and identity data. */
|
|
3539
3369
|
identity?: IdentificationData;
|
|
3540
3370
|
}
|
|
3541
|
-
interface EventMetadata extends BaseEventMetadata {
|
|
3371
|
+
export interface EventMetadata extends BaseEventMetadata {
|
|
3542
3372
|
/**
|
|
3543
3373
|
* Unique event ID.
|
|
3544
3374
|
* Allows clients to ignore duplicate webhooks.
|
|
@@ -3576,19 +3406,142 @@ interface EventMetadata extends BaseEventMetadata {
|
|
|
3576
3406
|
*/
|
|
3577
3407
|
entityEventSequence?: string | null;
|
|
3578
3408
|
}
|
|
3579
|
-
interface CheckoutCompletedEnvelope {
|
|
3409
|
+
export interface CheckoutCompletedEnvelope {
|
|
3580
3410
|
data: CheckoutMarkedAsCompleted;
|
|
3581
3411
|
metadata: EventMetadata;
|
|
3582
3412
|
}
|
|
3583
|
-
|
|
3413
|
+
/**
|
|
3414
|
+
* Triggered when an order created from this checkout is
|
|
3415
|
+
* successfully paid for or when a checkout is marked as completed.
|
|
3416
|
+
* @permissionScope Manage Stores - all permissions
|
|
3417
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3418
|
+
* @permissionScope Read eCommerce - all read permissions
|
|
3419
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
3420
|
+
* @permissionScope Read Orders
|
|
3421
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
|
|
3422
|
+
* @permissionScope Read Stores - all read permissions
|
|
3423
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
3424
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3425
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3426
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3427
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3428
|
+
* @permissionScope Manage Orders
|
|
3429
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
3430
|
+
* @permissionId ECOM.READ_CHECKOUTS
|
|
3431
|
+
* @webhook
|
|
3432
|
+
* @eventType wix.ecom.v1.checkout_completed
|
|
3433
|
+
* @serviceIdentifier com.wix.ecom.checkout.api.v1.CheckoutService
|
|
3434
|
+
* @slug completed
|
|
3435
|
+
*/
|
|
3436
|
+
export declare function onCheckoutCompleted(handler: (event: CheckoutCompletedEnvelope) => void | Promise<void>): void;
|
|
3437
|
+
export interface CheckoutCreatedEnvelope {
|
|
3584
3438
|
entity: Checkout;
|
|
3585
3439
|
metadata: EventMetadata;
|
|
3586
3440
|
}
|
|
3587
|
-
|
|
3441
|
+
/**
|
|
3442
|
+
* Triggered when a checkout is created.
|
|
3443
|
+
* @permissionScope Manage Stores - all permissions
|
|
3444
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3445
|
+
* @permissionScope Read eCommerce - all read permissions
|
|
3446
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
3447
|
+
* @permissionScope Read Orders
|
|
3448
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
|
|
3449
|
+
* @permissionScope Read Stores - all read permissions
|
|
3450
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
3451
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3452
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3453
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3454
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3455
|
+
* @permissionScope Manage Orders
|
|
3456
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
3457
|
+
* @permissionId ECOM.READ_CHECKOUTS
|
|
3458
|
+
* @webhook
|
|
3459
|
+
* @eventType wix.ecom.v1.checkout_created
|
|
3460
|
+
* @serviceIdentifier com.wix.ecom.checkout.api.v1.CheckoutService
|
|
3461
|
+
* @slug created
|
|
3462
|
+
*/
|
|
3463
|
+
export declare function onCheckoutCreated(handler: (event: CheckoutCreatedEnvelope) => void | Promise<void>): void;
|
|
3464
|
+
export interface CheckoutUpdatedEnvelope {
|
|
3588
3465
|
entity: Checkout;
|
|
3589
3466
|
metadata: EventMetadata;
|
|
3590
3467
|
}
|
|
3591
|
-
|
|
3468
|
+
/**
|
|
3469
|
+
* Triggered when a checkout is updated.
|
|
3470
|
+
* @permissionScope Manage Stores - all permissions
|
|
3471
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3472
|
+
* @permissionScope Read eCommerce - all read permissions
|
|
3473
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
3474
|
+
* @permissionScope Read Orders
|
|
3475
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
|
|
3476
|
+
* @permissionScope Read Stores - all read permissions
|
|
3477
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
3478
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3479
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3480
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3481
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3482
|
+
* @permissionScope Manage Orders
|
|
3483
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
3484
|
+
* @permissionId ECOM.READ_CHECKOUTS
|
|
3485
|
+
* @webhook
|
|
3486
|
+
* @eventType wix.ecom.v1.checkout_updated
|
|
3487
|
+
* @serviceIdentifier com.wix.ecom.checkout.api.v1.CheckoutService
|
|
3488
|
+
* @slug updated
|
|
3489
|
+
*/
|
|
3490
|
+
export declare function onCheckoutUpdated(handler: (event: CheckoutUpdatedEnvelope) => void | Promise<void>): void;
|
|
3491
|
+
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`;
|
|
3492
|
+
/**
|
|
3493
|
+
* Creates a checkout.
|
|
3494
|
+
*
|
|
3495
|
+
*
|
|
3496
|
+
* The `createCheckout()` function returns a Promise that resolves to the new checkout when it's created.
|
|
3497
|
+
*
|
|
3498
|
+
* > **Notes:**
|
|
3499
|
+
* > + Checkout must include at least 1 item in the `options.lineItems` array.
|
|
3500
|
+
* > + `options.channelType` is required.
|
|
3501
|
+
* > + If `_id` for `options.lineItems` is added, make sure that each `_id` is unique.
|
|
3502
|
+
* > + If `options.checkoutInfo.customFields` are added, then `options.checkoutInfo.customFields.value` is required.
|
|
3503
|
+
* @public
|
|
3504
|
+
* @requiredField options.channelType
|
|
3505
|
+
* @requiredField options.checkoutInfo.customFields.value
|
|
3506
|
+
* @requiredField options.checkoutInfo.membershipOptions.selectedMemberships.memberships._id
|
|
3507
|
+
* @requiredField options.checkoutInfo.membershipOptions.selectedMemberships.memberships.appId
|
|
3508
|
+
* @requiredField options.checkoutInfo.membershipOptions.selectedMemberships.memberships.lineItemIds
|
|
3509
|
+
* @requiredField options.customLineItems.descriptionLines.name
|
|
3510
|
+
* @requiredField options.customLineItems.descriptionLines.value
|
|
3511
|
+
* @requiredField options.customLineItems.itemType
|
|
3512
|
+
* @requiredField options.customLineItems.price
|
|
3513
|
+
* @requiredField options.customLineItems.productName
|
|
3514
|
+
* @requiredField options.customLineItems.quantity
|
|
3515
|
+
* @requiredField options.lineItems.catalogReference
|
|
3516
|
+
* @requiredField options.lineItems.catalogReference.appId
|
|
3517
|
+
* @requiredField options.lineItems.catalogReference.catalogItemId
|
|
3518
|
+
* @requiredField options.lineItems.quantity
|
|
3519
|
+
* @param options - Checkout creation options.
|
|
3520
|
+
* @permissionId ECOM.MODIFY_CHECKOUTS
|
|
3521
|
+
* @permissionId ECOM.ADMIN_MODIFY_CHECKOUTS
|
|
3522
|
+
* @permissionScope Manage Stores - all permissions
|
|
3523
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3524
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3525
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3526
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3527
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3528
|
+
* @permissionScope Manage Orders
|
|
3529
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
3530
|
+
* @permissionScope Manage Stores - all permissions
|
|
3531
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3532
|
+
* @permissionScope Manage eCommerce - Admin Permissions
|
|
3533
|
+
* @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN
|
|
3534
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3535
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3536
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3537
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3538
|
+
* @applicableIdentity APP
|
|
3539
|
+
* @applicableIdentity VISITOR
|
|
3540
|
+
* @returns Fulfilled - the newly created checkout.
|
|
3541
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.CreateCheckout
|
|
3542
|
+
*/
|
|
3543
|
+
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>>;
|
|
3544
|
+
export interface CreateCheckoutOptions {
|
|
3592
3545
|
/** Checkout information. */
|
|
3593
3546
|
checkoutInfo?: Checkout;
|
|
3594
3547
|
/** 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). */
|
|
@@ -3624,7 +3577,142 @@ interface CreateCheckoutOptions {
|
|
|
3624
3577
|
*/
|
|
3625
3578
|
overrideCheckoutUrl?: string | null;
|
|
3626
3579
|
}
|
|
3627
|
-
|
|
3580
|
+
/**
|
|
3581
|
+
* Retrieves a checkout.
|
|
3582
|
+
*
|
|
3583
|
+
*
|
|
3584
|
+
* The `getCheckout()` function returns a Promise that resolves when the specified checkout is retrieved.
|
|
3585
|
+
* @param _id - Checkout ID.
|
|
3586
|
+
* @public
|
|
3587
|
+
* @requiredField _id
|
|
3588
|
+
* @permissionId ECOM.READ_CHECKOUTS
|
|
3589
|
+
* @permissionScope Manage Stores - all permissions
|
|
3590
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3591
|
+
* @permissionScope Read eCommerce - all read permissions
|
|
3592
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
3593
|
+
* @permissionScope Read Orders
|
|
3594
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
|
|
3595
|
+
* @permissionScope Read Stores - all read permissions
|
|
3596
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
3597
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3598
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3599
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3600
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3601
|
+
* @permissionScope Manage Orders
|
|
3602
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
3603
|
+
* @applicableIdentity APP
|
|
3604
|
+
* @applicableIdentity VISITOR
|
|
3605
|
+
* @returns Fulfilled - the requested checkout.
|
|
3606
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckout
|
|
3607
|
+
*/
|
|
3608
|
+
export declare function getCheckout(_id: string): Promise<NonNullablePaths<Checkout, CheckoutNonNullablePaths>>;
|
|
3609
|
+
/**
|
|
3610
|
+
* Retrieves the checkout associated with a specified cart.
|
|
3611
|
+
* @param _id - Cart ID.
|
|
3612
|
+
* @public
|
|
3613
|
+
* @requiredField _id
|
|
3614
|
+
* @permissionId ECOM.READ_CHECKOUTS
|
|
3615
|
+
* @permissionScope Manage Stores - all permissions
|
|
3616
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3617
|
+
* @permissionScope Read eCommerce - all read permissions
|
|
3618
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
3619
|
+
* @permissionScope Read Orders
|
|
3620
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
|
|
3621
|
+
* @permissionScope Read Stores - all read permissions
|
|
3622
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
3623
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3624
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3625
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3626
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3627
|
+
* @permissionScope Manage Orders
|
|
3628
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
3629
|
+
* @applicableIdentity APP
|
|
3630
|
+
* @applicableIdentity VISITOR
|
|
3631
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckoutByCartId
|
|
3632
|
+
*/
|
|
3633
|
+
export declare function getCheckoutByCartId(_id: string): Promise<NonNullablePaths<GetCheckoutByCartIdResponse, {
|
|
3634
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
3635
|
+
}[CheckoutNonNullablePaths]>>;
|
|
3636
|
+
/**
|
|
3637
|
+
* Retrieves the checkout page URL of a specified checkout.
|
|
3638
|
+
*
|
|
3639
|
+
* By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page.
|
|
3640
|
+
* However, if `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
|
|
3641
|
+
* @param _id - Checkout ID.
|
|
3642
|
+
* @public
|
|
3643
|
+
* @requiredField _id
|
|
3644
|
+
* @permissionId ECOM.READ_CHECKOUTS
|
|
3645
|
+
* @permissionScope Manage Stores - all permissions
|
|
3646
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3647
|
+
* @permissionScope Read eCommerce - all read permissions
|
|
3648
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
3649
|
+
* @permissionScope Read Orders
|
|
3650
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-ORDERS
|
|
3651
|
+
* @permissionScope Read Stores - all read permissions
|
|
3652
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
3653
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3654
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3655
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3656
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3657
|
+
* @permissionScope Manage Orders
|
|
3658
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
3659
|
+
* @applicableIdentity APP
|
|
3660
|
+
* @applicableIdentity VISITOR
|
|
3661
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckoutURL
|
|
3662
|
+
*/
|
|
3663
|
+
export declare function getCheckoutUrl(_id: string): Promise<NonNullablePaths<GetCheckoutURLResponse, `checkoutUrl`>>;
|
|
3664
|
+
/**
|
|
3665
|
+
* Updates a checkout.
|
|
3666
|
+
*
|
|
3667
|
+
*
|
|
3668
|
+
* The `updateCheckout()` function returns a Promise that resolves to the updated checkout when the specified properties are updated.
|
|
3669
|
+
*
|
|
3670
|
+
* >**Notes:**
|
|
3671
|
+
* > + If nothing is passed in the request, the call will fail.
|
|
3672
|
+
* > + The `checkout.buyerInfo.email` may not be removed once it is set.
|
|
3673
|
+
* @param _id - Checkout ID.
|
|
3674
|
+
* @public
|
|
3675
|
+
* @requiredField _id
|
|
3676
|
+
* @requiredField checkout
|
|
3677
|
+
* @requiredField checkout.customFields.value
|
|
3678
|
+
* @requiredField checkout.membershipOptions.selectedMemberships.memberships._id
|
|
3679
|
+
* @requiredField checkout.membershipOptions.selectedMemberships.memberships.appId
|
|
3680
|
+
* @requiredField checkout.membershipOptions.selectedMemberships.memberships.lineItemIds
|
|
3681
|
+
* @requiredField options.customLineItems.descriptionLines.name
|
|
3682
|
+
* @requiredField options.customLineItems.descriptionLines.value
|
|
3683
|
+
* @requiredField options.customLineItems.itemType
|
|
3684
|
+
* @requiredField options.customLineItems.productName
|
|
3685
|
+
* @requiredField options.customLineItems.quantity
|
|
3686
|
+
* @requiredField options.lineItems.catalogReference
|
|
3687
|
+
* @requiredField options.lineItems.catalogReference.appId
|
|
3688
|
+
* @requiredField options.lineItems.catalogReference.catalogItemId
|
|
3689
|
+
* @requiredField options.lineItems.quantity
|
|
3690
|
+
* @param options - Checkout update options.
|
|
3691
|
+
* @permissionId ECOM.MODIFY_CHECKOUTS
|
|
3692
|
+
* @permissionId ECOM.ADMIN_MODIFY_CHECKOUTS
|
|
3693
|
+
* @permissionScope Manage Stores - all permissions
|
|
3694
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3695
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3696
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3697
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3698
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3699
|
+
* @permissionScope Manage Orders
|
|
3700
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
3701
|
+
* @permissionScope Manage Stores - all permissions
|
|
3702
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3703
|
+
* @permissionScope Manage eCommerce - Admin Permissions
|
|
3704
|
+
* @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN
|
|
3705
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3706
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3707
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3708
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3709
|
+
* @applicableIdentity APP
|
|
3710
|
+
* @applicableIdentity VISITOR
|
|
3711
|
+
* @returns Updated checkout.
|
|
3712
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.UpdateCheckout
|
|
3713
|
+
*/
|
|
3714
|
+
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>>;
|
|
3715
|
+
export interface UpdateCheckout {
|
|
3628
3716
|
/**
|
|
3629
3717
|
* Checkout ID.
|
|
3630
3718
|
* @format GUID
|
|
@@ -3793,20 +3881,11 @@ interface UpdateCheckout {
|
|
|
3793
3881
|
*/
|
|
3794
3882
|
customContentReference?: CustomContentReference;
|
|
3795
3883
|
/**
|
|
3796
|
-
*
|
|
3797
|
-
*
|
|
3798
|
-
*
|
|
3799
|
-
* @internal
|
|
3800
|
-
* @format GUID
|
|
3801
|
-
* @readonly
|
|
3802
|
-
*/
|
|
3803
|
-
orderId?: string | null;
|
|
3804
|
-
/**
|
|
3805
|
-
* Payment for subscriptions after free trial period.
|
|
3806
|
-
* @internal
|
|
3807
|
-
* @readonly
|
|
3884
|
+
* References to an external app and resource associated with this checkout.
|
|
3885
|
+
* Used for integration and tracking across different platforms.
|
|
3886
|
+
* @immutable
|
|
3808
3887
|
*/
|
|
3809
|
-
|
|
3888
|
+
externalReference?: ExternalReference;
|
|
3810
3889
|
/**
|
|
3811
3890
|
* The business location ID associated with the checkout.
|
|
3812
3891
|
*
|
|
@@ -3814,25 +3893,8 @@ interface UpdateCheckout {
|
|
|
3814
3893
|
* @format GUID
|
|
3815
3894
|
*/
|
|
3816
3895
|
businessLocationId?: string | null;
|
|
3817
|
-
/**
|
|
3818
|
-
* Whether payment is required to create an order.
|
|
3819
|
-
*
|
|
3820
|
-
* Payment is required if any of the following conditions are met:
|
|
3821
|
-
* 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.
|
|
3822
|
-
* 2. The calculated total amount due for immediate payment is greater than zero - `checkout.payNow > 0`.
|
|
3823
|
-
* @internal
|
|
3824
|
-
* @readonly
|
|
3825
|
-
*/
|
|
3826
|
-
paymentRequired?: boolean;
|
|
3827
|
-
/**
|
|
3828
|
-
* Charges information for each subscription in the checkout.
|
|
3829
|
-
* @internal
|
|
3830
|
-
* @readonly
|
|
3831
|
-
* @maxSize 100
|
|
3832
|
-
*/
|
|
3833
|
-
subscriptionCharges?: SubscriptionCharges[];
|
|
3834
3896
|
}
|
|
3835
|
-
interface UpdateCheckoutOptions {
|
|
3897
|
+
export interface UpdateCheckoutOptions {
|
|
3836
3898
|
/** 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). */
|
|
3837
3899
|
couponCode?: string | null;
|
|
3838
3900
|
/** Gift card code. */
|
|
@@ -3858,7 +3920,127 @@ interface UpdateCheckoutOptions {
|
|
|
3858
3920
|
*/
|
|
3859
3921
|
customLineItems?: CustomLineItem[];
|
|
3860
3922
|
}
|
|
3861
|
-
|
|
3923
|
+
/**
|
|
3924
|
+
* Removes the coupon from a specified checkout.
|
|
3925
|
+
*
|
|
3926
|
+
*
|
|
3927
|
+
* The `removeCoupon()` function returns a Promise that resolves to the updated checkout when the coupon is removed from the specified checkout.
|
|
3928
|
+
*
|
|
3929
|
+
* >**Note:** A checkout can only hold 1 coupon.
|
|
3930
|
+
* @param _id - ID of the checkout to remove the coupon from.
|
|
3931
|
+
* @public
|
|
3932
|
+
* @requiredField _id
|
|
3933
|
+
* @permissionId ECOM.MODIFY_CHECKOUTS
|
|
3934
|
+
* @permissionScope Manage Stores - all permissions
|
|
3935
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3936
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3937
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3938
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3939
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3940
|
+
* @permissionScope Manage Orders
|
|
3941
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
3942
|
+
* @applicableIdentity APP
|
|
3943
|
+
* @applicableIdentity VISITOR
|
|
3944
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.RemoveCoupon
|
|
3945
|
+
*/
|
|
3946
|
+
export declare function removeCoupon(_id: string): Promise<NonNullablePaths<RemoveCouponResponse, {
|
|
3947
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
3948
|
+
}[CheckoutNonNullablePaths]>>;
|
|
3949
|
+
/**
|
|
3950
|
+
* Removes the gift card from a specified checkout.
|
|
3951
|
+
*
|
|
3952
|
+
*
|
|
3953
|
+
* The `removeGiftCard()` function returns a Promise that resolves to the updated checkout when the gift card is removed from the specified checkout.
|
|
3954
|
+
*
|
|
3955
|
+
* >**Note:** A checkout can only hold 1 gift card.
|
|
3956
|
+
* @param _id - ID of the checkout to remove the gift card from.
|
|
3957
|
+
* @public
|
|
3958
|
+
* @requiredField _id
|
|
3959
|
+
* @permissionId ECOM.MODIFY_CHECKOUTS
|
|
3960
|
+
* @permissionScope Manage Stores - all permissions
|
|
3961
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3962
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3963
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3964
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3965
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3966
|
+
* @permissionScope Manage Orders
|
|
3967
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
3968
|
+
* @applicableIdentity APP
|
|
3969
|
+
* @applicableIdentity VISITOR
|
|
3970
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.RemoveGiftCard
|
|
3971
|
+
*/
|
|
3972
|
+
export declare function removeGiftCard(_id: string): Promise<NonNullablePaths<RemoveGiftCardResponse, {
|
|
3973
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
3974
|
+
}[CheckoutNonNullablePaths]>>;
|
|
3975
|
+
/**
|
|
3976
|
+
* Removes the `overrideCheckoutUrl` from a specified checkout.
|
|
3977
|
+
*
|
|
3978
|
+
* When `overrideCheckoutUrl` is removed, the `checkoutUrl` will be set to the default, standard
|
|
3979
|
+
* Wix checkout page URL.
|
|
3980
|
+
* @param _id - ID of the checkout to remove the override checkout url from.
|
|
3981
|
+
* @public
|
|
3982
|
+
* @requiredField _id
|
|
3983
|
+
* @permissionId ECOM.MODIFY_CHECKOUTS
|
|
3984
|
+
* @permissionScope Manage Stores - all permissions
|
|
3985
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3986
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3987
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3988
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3989
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3990
|
+
* @permissionScope Manage Orders
|
|
3991
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
3992
|
+
* @applicableIdentity APP
|
|
3993
|
+
* @applicableIdentity VISITOR
|
|
3994
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.RemoveOverrideCheckoutUrl
|
|
3995
|
+
*/
|
|
3996
|
+
export declare function removeOverrideCheckoutUrl(_id: string): Promise<NonNullablePaths<RemoveOverrideCheckoutUrlResponse, {
|
|
3997
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
3998
|
+
}[CheckoutNonNullablePaths]>>;
|
|
3999
|
+
/**
|
|
4000
|
+
* Adds catalog line items and/or custom line items to a checkout.
|
|
4001
|
+
*
|
|
4002
|
+
*
|
|
4003
|
+
* The `addToCheckout()` function returns a Promise that resolves to the updated checkout when the specified items have been added.
|
|
4004
|
+
* > **Note:** When adding catalog items, `options.lineItems.catalogReference` is required.
|
|
4005
|
+
* @param _id - Checkout ID.
|
|
4006
|
+
* @public
|
|
4007
|
+
* @requiredField _id
|
|
4008
|
+
* @requiredField options.customLineItems.descriptionLines.name
|
|
4009
|
+
* @requiredField options.customLineItems.descriptionLines.value
|
|
4010
|
+
* @requiredField options.customLineItems.itemType
|
|
4011
|
+
* @requiredField options.customLineItems.productName
|
|
4012
|
+
* @requiredField options.customLineItems.quantity
|
|
4013
|
+
* @requiredField options.lineItems.catalogReference
|
|
4014
|
+
* @requiredField options.lineItems.catalogReference.appId
|
|
4015
|
+
* @requiredField options.lineItems.catalogReference.catalogItemId
|
|
4016
|
+
* @requiredField options.lineItems.quantity
|
|
4017
|
+
* @param options - Items to be added to checkout.
|
|
4018
|
+
* @permissionId ECOM.MODIFY_CHECKOUTS
|
|
4019
|
+
* @permissionId ECOM.ADMIN_MODIFY_CHECKOUTS
|
|
4020
|
+
* @permissionScope Manage Stores - all permissions
|
|
4021
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4022
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
4023
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4024
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
4025
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
4026
|
+
* @permissionScope Manage Orders
|
|
4027
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
4028
|
+
* @permissionScope Manage Stores - all permissions
|
|
4029
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4030
|
+
* @permissionScope Manage eCommerce - Admin Permissions
|
|
4031
|
+
* @permissionScopeId SCOPE.ECOM.MANAGE-ADMIN
|
|
4032
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
4033
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4034
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
4035
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
4036
|
+
* @applicableIdentity APP
|
|
4037
|
+
* @applicableIdentity VISITOR
|
|
4038
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.AddToCheckout
|
|
4039
|
+
*/
|
|
4040
|
+
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, {
|
|
4041
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
4042
|
+
}[CheckoutNonNullablePaths]>>;
|
|
4043
|
+
export interface AddToCheckoutOptions {
|
|
3862
4044
|
/**
|
|
3863
4045
|
* Catalog line items.
|
|
3864
4046
|
* @maxSize 100
|
|
@@ -3873,13 +4055,71 @@ interface AddToCheckoutOptions {
|
|
|
3873
4055
|
*/
|
|
3874
4056
|
customLineItems?: CustomLineItem[];
|
|
3875
4057
|
}
|
|
3876
|
-
|
|
4058
|
+
/**
|
|
4059
|
+
* Removes line items from the specified checkout.
|
|
4060
|
+
*
|
|
4061
|
+
*
|
|
4062
|
+
* The `removeLineItems()` function returns a Promise that resolves to the updated checkout when the line items are removed from the specified checkout.
|
|
4063
|
+
* @param _id - ID of the checkout to remove line items from.
|
|
4064
|
+
* @public
|
|
4065
|
+
* @requiredField _id
|
|
4066
|
+
* @requiredField lineItemIds
|
|
4067
|
+
* @param lineItemIds - IDs of the line items to be removed.
|
|
4068
|
+
* 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`.
|
|
4069
|
+
* @permissionId ECOM.MODIFY_CHECKOUTS
|
|
4070
|
+
* @permissionScope Manage Stores - all permissions
|
|
4071
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4072
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
4073
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4074
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
4075
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
4076
|
+
* @permissionScope Manage Orders
|
|
4077
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
4078
|
+
* @applicableIdentity APP
|
|
4079
|
+
* @applicableIdentity VISITOR
|
|
4080
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.RemoveLineItems
|
|
4081
|
+
*/
|
|
4082
|
+
export declare function removeLineItems(_id: string, lineItemIds: string[]): Promise<NonNullablePaths<RemoveLineItemsResponse, {
|
|
4083
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
4084
|
+
}[CheckoutNonNullablePaths]>>;
|
|
4085
|
+
/**
|
|
4086
|
+
* Creates an order from a specified checkout.
|
|
4087
|
+
*
|
|
4088
|
+
* The `createOrder()` function returns a Promise that resolves to the new order's ID and `paymentGatewayOrderID` when the order is created.
|
|
4089
|
+
* 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.
|
|
4090
|
+
*
|
|
4091
|
+
* > **Note:** The following requirements must be met for an order to be created from a checkout.
|
|
4092
|
+
* > + 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.
|
|
4093
|
+
* > + A checkout must have at least 1 line item.
|
|
4094
|
+
* > + All of the line Items have an `availability.status` of `"AVAILABLE"` or `"PARTIALLY_AVAILABLE"`.
|
|
4095
|
+
* > + If there is a payment to be made, meaning that `priceSummary.total` is greater than 0, the `billingInfo.address` field must be provided.
|
|
4096
|
+
* > + When a checkout has line items to be shipped, the `shippingInfo.shippingDestination.address` and `shippingInfo.selectedCarrierServiceOption` fields must be provided.
|
|
4097
|
+
* > + When a checkout has line items for pickup, the `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails` field must be provided.
|
|
4098
|
+
* @param _id - Checkout ID.
|
|
4099
|
+
* @public
|
|
4100
|
+
* @requiredField _id
|
|
4101
|
+
* @param options - Further order creation options.
|
|
4102
|
+
* @permissionId ECOM.CREATE_ORDER_FROM_CHECKOUT
|
|
4103
|
+
* @permissionScope Manage Stores - all permissions
|
|
4104
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4105
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
4106
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4107
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
4108
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
4109
|
+
* @permissionScope Manage Orders
|
|
4110
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
4111
|
+
* @applicableIdentity APP
|
|
4112
|
+
* @applicableIdentity VISITOR
|
|
4113
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.CreateOrder
|
|
4114
|
+
*/
|
|
4115
|
+
export declare function createOrder(_id: string, options?: CreateOrderOptions): Promise<NonNullablePaths<CreateOrderResponse, `orderId` | `subscriptionId`>>;
|
|
4116
|
+
export interface CreateOrderOptions {
|
|
3877
4117
|
/** Whether the payment method should be saved on the order. */
|
|
3878
4118
|
savePaymentMethod?: boolean;
|
|
3879
4119
|
/** Whether to authorize the payment and delay the capture. */
|
|
3880
4120
|
delayCapture?: boolean;
|
|
3881
4121
|
}
|
|
3882
|
-
interface CreateOrderAndChargeOptions {
|
|
4122
|
+
export interface CreateOrderAndChargeOptions {
|
|
3883
4123
|
/** Payment token. */
|
|
3884
4124
|
paymentToken?: string | null;
|
|
3885
4125
|
/** Whether the payment method should be saved on the order. */
|
|
@@ -3887,5 +4127,59 @@ interface CreateOrderAndChargeOptions {
|
|
|
3887
4127
|
/** Whether to authorize the payment and delay the capture. */
|
|
3888
4128
|
delayCapture?: boolean;
|
|
3889
4129
|
}
|
|
3890
|
-
|
|
3891
|
-
|
|
4130
|
+
/**
|
|
4131
|
+
* Marks a checkout as completed - `checkout.complete` boolean is set to `true`.
|
|
4132
|
+
*
|
|
4133
|
+
*
|
|
4134
|
+
* The `markCheckoutAsCompleted()` function returns a Promise that resolves when the specified checkout is marked as completed.
|
|
4135
|
+
* @param _id - Checkout ID.
|
|
4136
|
+
* @public
|
|
4137
|
+
* @requiredField _id
|
|
4138
|
+
* @permissionId ECOM.MODIFY_CHECKOUTS
|
|
4139
|
+
* @permissionScope Manage Stores - all permissions
|
|
4140
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4141
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
4142
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4143
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
4144
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
4145
|
+
* @permissionScope Manage Orders
|
|
4146
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
4147
|
+
* @applicableIdentity APP
|
|
4148
|
+
* @applicableIdentity VISITOR
|
|
4149
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.MarkCheckoutAsCompleted
|
|
4150
|
+
*/
|
|
4151
|
+
export declare function markCheckoutAsCompleted(_id: string): Promise<void>;
|
|
4152
|
+
/**
|
|
4153
|
+
* Updates the quantity of one or more line items in a checkout.
|
|
4154
|
+
*
|
|
4155
|
+
* This endpoint is only for updating the quantity of line items. To entirely remove a line item from
|
|
4156
|
+
* the checkout, use [`removeLineItems()`](#removelineitems).
|
|
4157
|
+
* To add a new line item to the checkout, use [`addToCheckout()`](#addtocheckout).
|
|
4158
|
+
*
|
|
4159
|
+
* This endpoint checks the amount of stock remaining for this line item. If the specified `quantity`
|
|
4160
|
+
* is greater than the remaining stock, then the `quantity` returned in the response is the total amount
|
|
4161
|
+
* of remaining stock.
|
|
4162
|
+
* @param _id - Checkout ID.
|
|
4163
|
+
* @param lineItems - Line item info to update.
|
|
4164
|
+
* @public
|
|
4165
|
+
* @requiredField _id
|
|
4166
|
+
* @requiredField lineItems
|
|
4167
|
+
* @requiredField lineItems._id
|
|
4168
|
+
* @requiredField lineItems.quantity
|
|
4169
|
+
* @permissionId ECOM.MODIFY_CHECKOUTS
|
|
4170
|
+
* @permissionScope Manage Stores - all permissions
|
|
4171
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4172
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
4173
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4174
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
4175
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
4176
|
+
* @permissionScope Manage Orders
|
|
4177
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
4178
|
+
* @applicableIdentity APP
|
|
4179
|
+
* @applicableIdentity VISITOR
|
|
4180
|
+
* @fqn com.wix.ecom.checkout.api.v1.CheckoutService.UpdateLineItemsQuantity
|
|
4181
|
+
*/
|
|
4182
|
+
export declare function updateLineItemsQuantity(_id: string, lineItems: NonNullablePaths<LineItemQuantityUpdate, `_id` | `quantity`>[]): Promise<NonNullablePaths<UpdateLineItemsQuantityResponse, {
|
|
4183
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
4184
|
+
}[CheckoutNonNullablePaths]>>;
|
|
4185
|
+
export {};
|