@wix/auto_sdk_ecom_subscription-contracts 1.0.146 → 1.0.147
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.js.map +1 -1
- package/build/cjs/index.typings.d.ts +69 -55
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +69 -55
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +69 -55
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +69 -55
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +73 -59
- package/build/internal/cjs/meta.d.ts +73 -59
- package/build/internal/es/index.typings.d.mts +73 -59
- package/build/internal/es/meta.d.mts +73 -59
- package/package.json +2 -2
package/build/cjs/meta.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import '@wix/sdk-types';
|
|
|
6
6
|
*
|
|
7
7
|
* A subscription contract is created when a buyer checks out with a subscription item. Each billing cycle, an order is created from the contract's current content. The order's `lineItems.subscriptionInfo.id` holds the contract ID, and `lineItems.subscriptionInfo.cycleNumber` holds the billing cycle the order is for.
|
|
8
8
|
*
|
|
9
|
-
* To change a subscription contract, create a draft subscription contract, edit it, and commit it.
|
|
9
|
+
* To change a subscription contract, create a [draft subscription contract](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/payments/subscriptions/draft-subscription-contracts/introduction), edit it, and commit it.
|
|
10
10
|
*/
|
|
11
11
|
interface SubscriptionContract {
|
|
12
12
|
/**
|
|
@@ -190,9 +190,13 @@ interface V1SubscriptionSettings {
|
|
|
190
190
|
}
|
|
191
191
|
declare enum SubscriptionFrequency {
|
|
192
192
|
UNDEFINED = "UNDEFINED",
|
|
193
|
+
/** Day. */
|
|
193
194
|
DAY = "DAY",
|
|
195
|
+
/** Week. */
|
|
194
196
|
WEEK = "WEEK",
|
|
197
|
+
/** Month. */
|
|
195
198
|
MONTH = "MONTH",
|
|
199
|
+
/** Year. */
|
|
196
200
|
YEAR = "YEAR"
|
|
197
201
|
}
|
|
198
202
|
/** @enumType */
|
|
@@ -780,10 +784,16 @@ interface DigitalFile {
|
|
|
780
784
|
interface SubscriptionInfo {
|
|
781
785
|
/**
|
|
782
786
|
* Subscription ID.
|
|
787
|
+
*
|
|
788
|
+
* For a subscription bought through Wix eCommerce, this is the ID of the subscription contract the order was created from.
|
|
789
|
+
* To retrieve the subscription contract, call [Get Subscription Contract](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/payments/subscriptions/subscription-contracts/get-subscription-contract).
|
|
783
790
|
* @format GUID
|
|
784
791
|
*/
|
|
785
792
|
id?: string | null;
|
|
786
|
-
/**
|
|
793
|
+
/**
|
|
794
|
+
* Billing cycle the order is for. For example, `3` for the third billing cycle of a subscription.
|
|
795
|
+
* When a subscription starts with a free trial, the order created at checkout is for cycle `0`.
|
|
796
|
+
*/
|
|
787
797
|
cycleNumber?: number;
|
|
788
798
|
/**
|
|
789
799
|
* Subscription option title. For example, `"Monthly coffee Subscription"`.
|
|
@@ -838,7 +848,7 @@ interface SubscriptionDescription {
|
|
|
838
848
|
translated?: string | null;
|
|
839
849
|
}
|
|
840
850
|
interface SubscriptionSettings {
|
|
841
|
-
/** Frequency of
|
|
851
|
+
/** Frequency unit of the billing cycle. */
|
|
842
852
|
frequency?: V2SubscriptionFrequencyWithLiterals;
|
|
843
853
|
/**
|
|
844
854
|
* Number of frequency units in a billing cycle. For example, frequency `MONTH` with interval `3` means billing every 3 months.
|
|
@@ -846,16 +856,20 @@ interface SubscriptionSettings {
|
|
|
846
856
|
* @max 3650
|
|
847
857
|
*/
|
|
848
858
|
interval?: number | null;
|
|
849
|
-
/** Whether subscription
|
|
859
|
+
/** Whether the subscription renews automatically at the end of each billing cycle. */
|
|
850
860
|
autoRenewal?: boolean;
|
|
851
861
|
/**
|
|
852
|
-
* Number of billing cycles before subscription ends. Ignored
|
|
862
|
+
* Number of billing cycles before the subscription ends. Ignored when `autoRenewal` is `true`.
|
|
853
863
|
* @min 1
|
|
854
864
|
*/
|
|
855
865
|
billingCycles?: number | null;
|
|
856
|
-
/** Whether
|
|
866
|
+
/** Whether the buyer can cancel the subscription. */
|
|
857
867
|
enableCustomerCancellation?: boolean;
|
|
858
|
-
/**
|
|
868
|
+
/**
|
|
869
|
+
* Free trial period before the first billing cycle starts.
|
|
870
|
+
*
|
|
871
|
+
* Returned only when the subscription has a free trial.
|
|
872
|
+
*/
|
|
859
873
|
freeTrialPeriod?: FreeTrialPeriod;
|
|
860
874
|
}
|
|
861
875
|
/** Frequency unit of recurring payment */
|
|
@@ -869,7 +883,7 @@ declare enum V2SubscriptionFrequency {
|
|
|
869
883
|
/** @enumType */
|
|
870
884
|
type V2SubscriptionFrequencyWithLiterals = V2SubscriptionFrequency | 'UNDEFINED' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
|
|
871
885
|
interface FreeTrialPeriod {
|
|
872
|
-
/** Frequency of
|
|
886
|
+
/** Frequency unit of the free trial period. */
|
|
873
887
|
frequency?: V2SubscriptionFrequencyWithLiterals;
|
|
874
888
|
/**
|
|
875
889
|
* Number of frequency units in the free trial period. For example, frequency `MONTH` with interval `3` means a 3-month free trial.
|
|
@@ -2357,7 +2371,7 @@ interface SubscriptionContractChangesCommitted {
|
|
|
2357
2371
|
* @maxLength 200
|
|
2358
2372
|
*/
|
|
2359
2373
|
reason?: string | null;
|
|
2360
|
-
/** Price summary of the contract after the commit. */
|
|
2374
|
+
/** Price summary of the subscription contract after the commit. Same as `changes.priceSummary`. */
|
|
2361
2375
|
priceSummary?: PriceSummary;
|
|
2362
2376
|
}
|
|
2363
2377
|
interface SubscriptionContractDiffs {
|
|
@@ -2384,7 +2398,7 @@ interface SubscriptionContractDiffs {
|
|
|
2384
2398
|
additionalFees?: AdditionalFeeDelta[];
|
|
2385
2399
|
/** Price summary after the changes. Replaces the subscription contract's previous price summary. */
|
|
2386
2400
|
priceSummary?: PriceSummary;
|
|
2387
|
-
/** Tax information after the changes.
|
|
2401
|
+
/** Tax information after the changes. */
|
|
2388
2402
|
taxInfo?: OrderTaxInfo;
|
|
2389
2403
|
/** Shipping information after the changes. Replaces the subscription contract's previous shipping information. */
|
|
2390
2404
|
shippingInfo?: ShippingInformation;
|
|
@@ -2440,104 +2454,104 @@ interface CommonImage {
|
|
|
2440
2454
|
*/
|
|
2441
2455
|
filename?: string | null;
|
|
2442
2456
|
}
|
|
2443
|
-
/**
|
|
2457
|
+
/** Catalog reference options before the change. */
|
|
2444
2458
|
interface CatalogReferenceOptionsBeforeChange {
|
|
2445
|
-
/**
|
|
2459
|
+
/** Catalog reference options. Absent when the line item had no options. */
|
|
2446
2460
|
options?: Record<string, any> | null;
|
|
2447
2461
|
}
|
|
2448
|
-
/**
|
|
2462
|
+
/** Product name before the change. */
|
|
2449
2463
|
interface ProductNameBeforeChange {
|
|
2450
|
-
/**
|
|
2464
|
+
/** Product name. Absent when the line item had no product name. */
|
|
2451
2465
|
productName?: ProductName;
|
|
2452
2466
|
}
|
|
2453
|
-
/**
|
|
2467
|
+
/** Description lines before the change. */
|
|
2454
2468
|
interface DescriptionLinesBeforeChange {
|
|
2455
2469
|
/**
|
|
2456
|
-
*
|
|
2470
|
+
* Description lines. Empty when the line item had no description lines.
|
|
2457
2471
|
* @maxSize 20
|
|
2458
2472
|
*/
|
|
2459
2473
|
descriptionLines?: DescriptionLine[];
|
|
2460
2474
|
}
|
|
2461
|
-
/**
|
|
2475
|
+
/** Image before the change. */
|
|
2462
2476
|
interface ImageBeforeChange {
|
|
2463
|
-
/**
|
|
2477
|
+
/** Image. Absent when the line item had no image. */
|
|
2464
2478
|
image?: CommonImage;
|
|
2465
2479
|
}
|
|
2466
|
-
/**
|
|
2480
|
+
/** Physical properties before the change. */
|
|
2467
2481
|
interface PhysicalPropertiesBeforeChange {
|
|
2468
|
-
/**
|
|
2482
|
+
/** Physical properties. Absent when the line item had no physical properties. */
|
|
2469
2483
|
physicalProperties?: PhysicalProperties;
|
|
2470
2484
|
}
|
|
2471
|
-
/**
|
|
2485
|
+
/** Item type before the change. */
|
|
2472
2486
|
interface ItemTypeBeforeChange {
|
|
2473
|
-
/**
|
|
2487
|
+
/** Item type. Absent when the line item had no item type. */
|
|
2474
2488
|
itemType?: ItemType;
|
|
2475
2489
|
}
|
|
2476
|
-
/**
|
|
2490
|
+
/** Fulfiller ID before the change. */
|
|
2477
2491
|
interface FulfillerIdBeforeChange {
|
|
2478
2492
|
/**
|
|
2479
|
-
*
|
|
2493
|
+
* Fulfiller ID. Absent when the line item had no fulfiller.
|
|
2480
2494
|
* @format GUID
|
|
2481
2495
|
*/
|
|
2482
2496
|
fulfillerId?: string | null;
|
|
2483
2497
|
}
|
|
2484
|
-
/**
|
|
2498
|
+
/** Digital file before the change. */
|
|
2485
2499
|
interface DigitalFileBeforeChange {
|
|
2486
|
-
/**
|
|
2500
|
+
/** Digital file. Absent when the line item had no digital file. */
|
|
2487
2501
|
digitalFile?: DigitalFile;
|
|
2488
2502
|
}
|
|
2489
|
-
/**
|
|
2503
|
+
/** Price description before the change. */
|
|
2490
2504
|
interface PriceDescriptionBeforeChange {
|
|
2491
|
-
/**
|
|
2505
|
+
/** Price description. Absent when the line item had no price description. */
|
|
2492
2506
|
priceDescription?: PriceDescription;
|
|
2493
2507
|
}
|
|
2494
|
-
/**
|
|
2508
|
+
/** Delivery profile ID before the change. */
|
|
2495
2509
|
interface DeliveryProfileIdBeforeChange {
|
|
2496
2510
|
/**
|
|
2497
|
-
*
|
|
2511
|
+
* Delivery profile ID. Absent when the line item had no delivery profile.
|
|
2498
2512
|
* @format GUID
|
|
2499
2513
|
*/
|
|
2500
2514
|
deliveryProfileId?: string | null;
|
|
2501
2515
|
}
|
|
2502
|
-
/**
|
|
2516
|
+
/** Shipping group ID before the change. */
|
|
2503
2517
|
interface ShippingGroupIdBeforeChange {
|
|
2504
2518
|
/**
|
|
2505
|
-
*
|
|
2519
|
+
* Shipping group ID. Absent when the line item had no shipping group.
|
|
2506
2520
|
* @format GUID
|
|
2507
2521
|
*/
|
|
2508
2522
|
shippingGroupId?: string | null;
|
|
2509
2523
|
}
|
|
2510
|
-
/**
|
|
2524
|
+
/** Tax info before the change. */
|
|
2511
2525
|
interface TaxInfoBeforeChange {
|
|
2512
|
-
/**
|
|
2526
|
+
/** Tax info. Absent when the line item had no tax info. */
|
|
2513
2527
|
taxInfo?: LineItemTaxInfo;
|
|
2514
2528
|
}
|
|
2515
|
-
/**
|
|
2529
|
+
/** Inventory app ID before the change. */
|
|
2516
2530
|
interface InventoryAppIdBeforeChange {
|
|
2517
2531
|
/**
|
|
2518
|
-
*
|
|
2532
|
+
* Inventory app ID. Absent when the line item had no inventory app.
|
|
2519
2533
|
* @format GUID
|
|
2520
2534
|
*/
|
|
2521
2535
|
inventoryAppId?: string | null;
|
|
2522
2536
|
}
|
|
2523
|
-
/**
|
|
2537
|
+
/** Root catalog item ID before the change. */
|
|
2524
2538
|
interface RootCatalogItemIdBeforeChange {
|
|
2525
2539
|
/**
|
|
2526
|
-
*
|
|
2540
|
+
* Root catalog item ID. Absent when the line item had no root catalog item.
|
|
2527
2541
|
* @minLength 1
|
|
2528
2542
|
* @maxLength 36
|
|
2529
2543
|
*/
|
|
2530
2544
|
rootCatalogItemId?: string | null;
|
|
2531
2545
|
}
|
|
2532
|
-
/**
|
|
2546
|
+
/** Modifier groups before the change. */
|
|
2533
2547
|
interface ModifierGroupsBeforeChange {
|
|
2534
2548
|
/**
|
|
2535
|
-
*
|
|
2549
|
+
* Modifier groups. Empty when the line item had no modifier groups.
|
|
2536
2550
|
* @maxSize 10
|
|
2537
2551
|
*/
|
|
2538
2552
|
modifierGroups?: ModifierGroup[];
|
|
2539
2553
|
}
|
|
2540
|
-
/**
|
|
2554
|
+
/** Price undetermined flag before the change. */
|
|
2541
2555
|
interface PriceUndeterminedBeforeChange {
|
|
2542
2556
|
/** Whether the price of the line item was undetermined. */
|
|
2543
2557
|
priceUndetermined?: boolean;
|
|
@@ -2557,36 +2571,36 @@ declare enum ChangeType {
|
|
|
2557
2571
|
type ChangeTypeWithLiterals = ChangeType | 'UNKNOWN_CHANGE_TYPE' | 'ADDED' | 'CHANGED' | 'REMOVED';
|
|
2558
2572
|
interface ItemChangedDetails {
|
|
2559
2573
|
/**
|
|
2560
|
-
*
|
|
2574
|
+
* Quantity before the change. Set only when the quantity changed.
|
|
2561
2575
|
* @min 1
|
|
2562
2576
|
* @max 1000000
|
|
2563
2577
|
*/
|
|
2564
2578
|
quantityBeforeChange?: number | null;
|
|
2565
|
-
/**
|
|
2579
|
+
/** Price before the change. Set only when the price changed. */
|
|
2566
2580
|
priceBeforeChange?: Price;
|
|
2567
|
-
/**
|
|
2581
|
+
/** Catalog reference options before the change. Set only when the catalog reference options changed. */
|
|
2568
2582
|
catalogReferenceOptionsBeforeChange?: CatalogReferenceOptionsBeforeChange;
|
|
2569
|
-
/**
|
|
2583
|
+
/** Product name before the change. Set only when the product name changed. */
|
|
2570
2584
|
productNameBeforeChange?: ProductNameBeforeChange;
|
|
2571
|
-
/**
|
|
2585
|
+
/** Description lines before the change. Set only when the description lines changed. */
|
|
2572
2586
|
descriptionLinesBeforeChange?: DescriptionLinesBeforeChange;
|
|
2573
|
-
/**
|
|
2587
|
+
/** Image before the change. Set only when the image changed. */
|
|
2574
2588
|
imageBeforeChange?: ImageBeforeChange;
|
|
2575
|
-
/**
|
|
2589
|
+
/** Physical properties before the change. Set only when the physical properties changed. */
|
|
2576
2590
|
physicalPropertiesBeforeChange?: PhysicalPropertiesBeforeChange;
|
|
2577
|
-
/**
|
|
2591
|
+
/** Item type before the change. Set only when the item type changed. */
|
|
2578
2592
|
itemTypeBeforeChange?: ItemTypeBeforeChange;
|
|
2579
|
-
/**
|
|
2593
|
+
/** Fulfiller ID before the change. Set only when the fulfiller ID changed. */
|
|
2580
2594
|
fulfillerIdBeforeChange?: FulfillerIdBeforeChange;
|
|
2581
|
-
/**
|
|
2595
|
+
/** Digital file before the change. Set only when the digital file changed. */
|
|
2582
2596
|
digitalFileBeforeChange?: DigitalFileBeforeChange;
|
|
2583
|
-
/**
|
|
2597
|
+
/** Price description before the change. Set only when the price description changed. */
|
|
2584
2598
|
priceDescriptionBeforeChange?: PriceDescriptionBeforeChange;
|
|
2585
|
-
/**
|
|
2599
|
+
/** Tax info before the change. Set only when the line item's tax group changed. */
|
|
2586
2600
|
taxInfoBeforeChange?: TaxInfoBeforeChange;
|
|
2587
|
-
/**
|
|
2601
|
+
/** Modifier groups before the change. Set only when the modifier groups changed. */
|
|
2588
2602
|
modifierGroupsBeforeChange?: ModifierGroupsBeforeChange;
|
|
2589
|
-
/**
|
|
2603
|
+
/** Price undetermined flag before the change. Set only when the price undetermined flag changed. */
|
|
2590
2604
|
priceUndeterminedBeforeChange?: PriceUndeterminedBeforeChange;
|
|
2591
2605
|
}
|
|
2592
2606
|
interface AppliedDiscountDelta extends AppliedDiscountDeltaDeltaDetailsOneOf {
|