@wix/auto_sdk_ecom_subscription-contracts 1.0.146 → 1.0.148

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.
@@ -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
- /** Subscription cycle. For example, if this order is for the 3rd cycle of a subscription, value will be `3`. */
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 recurring payment. */
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 is renewed automatically at the end of each period. */
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 if `autoRenewal: true`.
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 to allow the customer to cancel the subscription. */
866
+ /** Whether the buyer can cancel the subscription. */
857
867
  enableCustomerCancellation?: boolean;
858
- /** Period until first cycle starts. If None => no free trial */
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 period. Values: DAY, WEEK, MONTH, YEAR */
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. Replaces the subscription contract's previous tax information. */
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
- /** The catalog reference options before the change. */
2457
+ /** Catalog reference options before the change. */
2444
2458
  interface CatalogReferenceOptionsBeforeChange {
2445
- /** The catalog reference options. Absent when the line item had no options. */
2459
+ /** Catalog reference options. Absent when the line item had no options. */
2446
2460
  options?: Record<string, any> | null;
2447
2461
  }
2448
- /** The product name before the change. */
2462
+ /** Product name before the change. */
2449
2463
  interface ProductNameBeforeChange {
2450
- /** The product name. Absent when the line item had no product name. */
2464
+ /** Product name. Absent when the line item had no product name. */
2451
2465
  productName?: ProductName;
2452
2466
  }
2453
- /** The description lines before the change. */
2467
+ /** Description lines before the change. */
2454
2468
  interface DescriptionLinesBeforeChange {
2455
2469
  /**
2456
- * The description lines. Empty when the line item had no description lines.
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
- /** The image before the change. */
2475
+ /** Image before the change. */
2462
2476
  interface ImageBeforeChange {
2463
- /** The image. Absent when the line item had no image. */
2477
+ /** Image. Absent when the line item had no image. */
2464
2478
  image?: CommonImage;
2465
2479
  }
2466
- /** The physical properties before the change. */
2480
+ /** Physical properties before the change. */
2467
2481
  interface PhysicalPropertiesBeforeChange {
2468
- /** The physical properties. Absent when the line item had no physical properties. */
2482
+ /** Physical properties. Absent when the line item had no physical properties. */
2469
2483
  physicalProperties?: PhysicalProperties;
2470
2484
  }
2471
- /** The item type before the change. */
2485
+ /** Item type before the change. */
2472
2486
  interface ItemTypeBeforeChange {
2473
- /** The item type. Absent when the line item had no item type. */
2487
+ /** Item type. Absent when the line item had no item type. */
2474
2488
  itemType?: ItemType;
2475
2489
  }
2476
- /** The fulfiller ID before the change. */
2490
+ /** Fulfiller ID before the change. */
2477
2491
  interface FulfillerIdBeforeChange {
2478
2492
  /**
2479
- * The fulfiller ID. Absent when the line item had no fulfiller.
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
- /** The digital file before the change. */
2498
+ /** Digital file before the change. */
2485
2499
  interface DigitalFileBeforeChange {
2486
- /** The digital file. Absent when the line item had no digital file. */
2500
+ /** Digital file. Absent when the line item had no digital file. */
2487
2501
  digitalFile?: DigitalFile;
2488
2502
  }
2489
- /** The price description before the change. */
2503
+ /** Price description before the change. */
2490
2504
  interface PriceDescriptionBeforeChange {
2491
- /** The price description. Absent when the line item had no price description. */
2505
+ /** Price description. Absent when the line item had no price description. */
2492
2506
  priceDescription?: PriceDescription;
2493
2507
  }
2494
- /** The delivery profile ID before the change. */
2508
+ /** Delivery profile ID before the change. */
2495
2509
  interface DeliveryProfileIdBeforeChange {
2496
2510
  /**
2497
- * The delivery profile ID. Absent when the line item had no delivery profile.
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
- /** The shipping group ID before the change. */
2516
+ /** Shipping group ID before the change. */
2503
2517
  interface ShippingGroupIdBeforeChange {
2504
2518
  /**
2505
- * The shipping group ID. Absent when the line item had no shipping group.
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
- /** The tax info before the change. */
2524
+ /** Tax info before the change. */
2511
2525
  interface TaxInfoBeforeChange {
2512
- /** The tax info. Absent when the line item had no tax info. */
2526
+ /** Tax info. Absent when the line item had no tax info. */
2513
2527
  taxInfo?: LineItemTaxInfo;
2514
2528
  }
2515
- /** The inventory app ID before the change. */
2529
+ /** Inventory app ID before the change. */
2516
2530
  interface InventoryAppIdBeforeChange {
2517
2531
  /**
2518
- * The inventory app ID. Absent when the line item had no inventory app.
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
- /** The root catalog item ID before the change. */
2537
+ /** Root catalog item ID before the change. */
2524
2538
  interface RootCatalogItemIdBeforeChange {
2525
2539
  /**
2526
- * The root catalog item ID. Absent when the line item had no root catalog item.
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
- /** The modifier groups before the change. */
2546
+ /** Modifier groups before the change. */
2533
2547
  interface ModifierGroupsBeforeChange {
2534
2548
  /**
2535
- * The modifier groups. Empty when the line item had no modifier groups.
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
- /** The price undetermined flag before the change. */
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
- * The quantity before the change. Set only when the quantity changed.
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
- /** The price before the change. Set only when the price changed. */
2579
+ /** Price before the change. Set only when the price changed. */
2566
2580
  priceBeforeChange?: Price;
2567
- /** The catalog reference options before the change. Set only when the catalog reference options changed. */
2581
+ /** Catalog reference options before the change. Set only when the catalog reference options changed. */
2568
2582
  catalogReferenceOptionsBeforeChange?: CatalogReferenceOptionsBeforeChange;
2569
- /** The product name before the change. Set only when the product name changed. */
2583
+ /** Product name before the change. Set only when the product name changed. */
2570
2584
  productNameBeforeChange?: ProductNameBeforeChange;
2571
- /** The description lines before the change. Set only when the description lines changed. */
2585
+ /** Description lines before the change. Set only when the description lines changed. */
2572
2586
  descriptionLinesBeforeChange?: DescriptionLinesBeforeChange;
2573
- /** The image before the change. Set only when the image changed. */
2587
+ /** Image before the change. Set only when the image changed. */
2574
2588
  imageBeforeChange?: ImageBeforeChange;
2575
- /** The physical properties before the change. Set only when the physical properties changed. */
2589
+ /** Physical properties before the change. Set only when the physical properties changed. */
2576
2590
  physicalPropertiesBeforeChange?: PhysicalPropertiesBeforeChange;
2577
- /** The item type before the change. Set only when the item type changed. */
2591
+ /** Item type before the change. Set only when the item type changed. */
2578
2592
  itemTypeBeforeChange?: ItemTypeBeforeChange;
2579
- /** The fulfiller ID before the change. Set only when the fulfiller ID changed. */
2593
+ /** Fulfiller ID before the change. Set only when the fulfiller ID changed. */
2580
2594
  fulfillerIdBeforeChange?: FulfillerIdBeforeChange;
2581
- /** The digital file before the change. Set only when the digital file changed. */
2595
+ /** Digital file before the change. Set only when the digital file changed. */
2582
2596
  digitalFileBeforeChange?: DigitalFileBeforeChange;
2583
- /** The price description before the change. Set only when the price description changed. */
2597
+ /** Price description before the change. Set only when the price description changed. */
2584
2598
  priceDescriptionBeforeChange?: PriceDescriptionBeforeChange;
2585
- /** The tax info before the change. Set only when the line item's tax group changed because its catalog options changed. */
2599
+ /** Tax info before the change. Set only when the line item's tax group changed. */
2586
2600
  taxInfoBeforeChange?: TaxInfoBeforeChange;
2587
- /** The modifier groups before the change. Set only when the modifier groups changed. */
2601
+ /** Modifier groups before the change. Set only when the modifier groups changed. */
2588
2602
  modifierGroupsBeforeChange?: ModifierGroupsBeforeChange;
2589
- /** The price undetermined flag before the change. Set only when the price undetermined flag changed. */
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 {
package/build/es/meta.mjs CHANGED
@@ -108,6 +108,14 @@ function resolveWixEcomSubscriptionContractsV1SubscriptionContractsUrl(opts) {
108
108
  {
109
109
  srcPath: "/ecom/subscription-contracts/v1/bulk/subscription-contracts",
110
110
  destPath: "/v1/bulk/subscription-contracts"
111
+ },
112
+ {
113
+ srcPath: "/ecom/v1/subscription-contracts",
114
+ destPath: "/v1/subscription-contracts"
115
+ },
116
+ {
117
+ srcPath: "/ecom/v1/bulk/subscription-contracts",
118
+ destPath: "/v1/bulk/subscription-contracts"
111
119
  }
112
120
  ],
113
121
  "*.dev.wix-code.com": [
@@ -118,6 +126,14 @@ function resolveWixEcomSubscriptionContractsV1SubscriptionContractsUrl(opts) {
118
126
  {
119
127
  srcPath: "/ecom/subscription-contracts/v1/bulk/subscription-contracts",
120
128
  destPath: "/v1/bulk/subscription-contracts"
129
+ },
130
+ {
131
+ srcPath: "/_api/ecom/v1/subscription-contracts",
132
+ destPath: "/v1/subscription-contracts"
133
+ },
134
+ {
135
+ srcPath: "/_api/ecom/v1/bulk/subscription-contracts",
136
+ destPath: "/v1/bulk/subscription-contracts"
121
137
  }
122
138
  ],
123
139
  _: [
@@ -128,6 +144,14 @@ function resolveWixEcomSubscriptionContractsV1SubscriptionContractsUrl(opts) {
128
144
  {
129
145
  srcPath: "/ecom/subscription-contracts/v1/bulk/subscription-contracts",
130
146
  destPath: "/v1/bulk/subscription-contracts"
147
+ },
148
+ {
149
+ srcPath: "/_api/ecom/v1/subscription-contracts",
150
+ destPath: "/v1/subscription-contracts"
151
+ },
152
+ {
153
+ srcPath: "/_api/ecom/v1/bulk/subscription-contracts",
154
+ destPath: "/v1/bulk/subscription-contracts"
131
155
  }
132
156
  ],
133
157
  "manage._base_domain_": [
@@ -138,6 +162,14 @@ function resolveWixEcomSubscriptionContractsV1SubscriptionContractsUrl(opts) {
138
162
  {
139
163
  srcPath: "/ecom/subscription-contracts/v1/bulk/subscription-contracts",
140
164
  destPath: "/v1/bulk/subscription-contracts"
165
+ },
166
+ {
167
+ srcPath: "/_api/ecom/v1/subscription-contracts",
168
+ destPath: "/v1/subscription-contracts"
169
+ },
170
+ {
171
+ srcPath: "/_api/ecom/v1/bulk/subscription-contracts",
172
+ destPath: "/v1/bulk/subscription-contracts"
141
173
  }
142
174
  ]
143
175
  };