@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.
- package/build/cjs/index.js +32 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +69 -55
- package/build/cjs/index.typings.js +32 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +69 -55
- package/build/cjs/meta.js +32 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs +32 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +69 -55
- package/build/es/index.typings.mjs +32 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +69 -55
- package/build/es/meta.mjs +32 -0
- 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
|
@@ -6,7 +6,7 @@ import { QuerySpec, Query, NonNullablePaths } from '@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 */
|
|
@@ -757,10 +761,16 @@ interface DigitalFile {
|
|
|
757
761
|
interface SubscriptionInfo {
|
|
758
762
|
/**
|
|
759
763
|
* Subscription ID.
|
|
764
|
+
*
|
|
765
|
+
* For a subscription bought through Wix eCommerce, this is the ID of the subscription contract the order was created from.
|
|
766
|
+
* 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).
|
|
760
767
|
* @format GUID
|
|
761
768
|
*/
|
|
762
769
|
_id?: string | null;
|
|
763
|
-
/**
|
|
770
|
+
/**
|
|
771
|
+
* Billing cycle the order is for. For example, `3` for the third billing cycle of a subscription.
|
|
772
|
+
* When a subscription starts with a free trial, the order created at checkout is for cycle `0`.
|
|
773
|
+
*/
|
|
764
774
|
cycleNumber?: number;
|
|
765
775
|
/**
|
|
766
776
|
* Subscription option title. For example, `"Monthly coffee Subscription"`.
|
|
@@ -815,7 +825,7 @@ interface SubscriptionDescription {
|
|
|
815
825
|
translated?: string | null;
|
|
816
826
|
}
|
|
817
827
|
interface SubscriptionSettings {
|
|
818
|
-
/** Frequency of
|
|
828
|
+
/** Frequency unit of the billing cycle. */
|
|
819
829
|
frequency?: V2SubscriptionFrequencyWithLiterals;
|
|
820
830
|
/**
|
|
821
831
|
* Number of frequency units in a billing cycle. For example, frequency `MONTH` with interval `3` means billing every 3 months.
|
|
@@ -823,16 +833,20 @@ interface SubscriptionSettings {
|
|
|
823
833
|
* @max 3650
|
|
824
834
|
*/
|
|
825
835
|
interval?: number | null;
|
|
826
|
-
/** Whether subscription
|
|
836
|
+
/** Whether the subscription renews automatically at the end of each billing cycle. */
|
|
827
837
|
autoRenewal?: boolean;
|
|
828
838
|
/**
|
|
829
|
-
* Number of billing cycles before subscription ends. Ignored
|
|
839
|
+
* Number of billing cycles before the subscription ends. Ignored when `autoRenewal` is `true`.
|
|
830
840
|
* @min 1
|
|
831
841
|
*/
|
|
832
842
|
billingCycles?: number | null;
|
|
833
|
-
/** Whether
|
|
843
|
+
/** Whether the buyer can cancel the subscription. */
|
|
834
844
|
enableCustomerCancellation?: boolean;
|
|
835
|
-
/**
|
|
845
|
+
/**
|
|
846
|
+
* Free trial period before the first billing cycle starts.
|
|
847
|
+
*
|
|
848
|
+
* Returned only when the subscription has a free trial.
|
|
849
|
+
*/
|
|
836
850
|
freeTrialPeriod?: FreeTrialPeriod;
|
|
837
851
|
}
|
|
838
852
|
/** Frequency unit of recurring payment */
|
|
@@ -846,7 +860,7 @@ declare enum V2SubscriptionFrequency {
|
|
|
846
860
|
/** @enumType */
|
|
847
861
|
type V2SubscriptionFrequencyWithLiterals = V2SubscriptionFrequency | 'UNDEFINED' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR';
|
|
848
862
|
interface FreeTrialPeriod {
|
|
849
|
-
/** Frequency of
|
|
863
|
+
/** Frequency unit of the free trial period. */
|
|
850
864
|
frequency?: V2SubscriptionFrequencyWithLiterals;
|
|
851
865
|
/**
|
|
852
866
|
* Number of frequency units in the free trial period. For example, frequency `MONTH` with interval `3` means a 3-month free trial.
|
|
@@ -2334,7 +2348,7 @@ interface SubscriptionContractChangesCommitted {
|
|
|
2334
2348
|
* @maxLength 200
|
|
2335
2349
|
*/
|
|
2336
2350
|
reason?: string | null;
|
|
2337
|
-
/** Price summary of the contract after the commit. */
|
|
2351
|
+
/** Price summary of the subscription contract after the commit. Same as `changes.priceSummary`. */
|
|
2338
2352
|
priceSummary?: PriceSummary;
|
|
2339
2353
|
}
|
|
2340
2354
|
interface SubscriptionContractDiffs {
|
|
@@ -2361,7 +2375,7 @@ interface SubscriptionContractDiffs {
|
|
|
2361
2375
|
additionalFees?: AdditionalFeeDelta[];
|
|
2362
2376
|
/** Price summary after the changes. Replaces the subscription contract's previous price summary. */
|
|
2363
2377
|
priceSummary?: PriceSummary;
|
|
2364
|
-
/** Tax information after the changes.
|
|
2378
|
+
/** Tax information after the changes. */
|
|
2365
2379
|
taxInfo?: OrderTaxInfo;
|
|
2366
2380
|
/** Shipping information after the changes. Replaces the subscription contract's previous shipping information. */
|
|
2367
2381
|
shippingInfo?: ShippingInformation;
|
|
@@ -2384,104 +2398,104 @@ interface LineItemDeltaDeltaDetailsOneOf {
|
|
|
2384
2398
|
/** Values the line item had before the change. */
|
|
2385
2399
|
changed?: ItemChangedDetails;
|
|
2386
2400
|
}
|
|
2387
|
-
/**
|
|
2401
|
+
/** Catalog reference options before the change. */
|
|
2388
2402
|
interface CatalogReferenceOptionsBeforeChange {
|
|
2389
|
-
/**
|
|
2403
|
+
/** Catalog reference options. Absent when the line item had no options. */
|
|
2390
2404
|
options?: Record<string, any> | null;
|
|
2391
2405
|
}
|
|
2392
|
-
/**
|
|
2406
|
+
/** Product name before the change. */
|
|
2393
2407
|
interface ProductNameBeforeChange {
|
|
2394
|
-
/**
|
|
2408
|
+
/** Product name. Absent when the line item had no product name. */
|
|
2395
2409
|
productName?: ProductName;
|
|
2396
2410
|
}
|
|
2397
|
-
/**
|
|
2411
|
+
/** Description lines before the change. */
|
|
2398
2412
|
interface DescriptionLinesBeforeChange {
|
|
2399
2413
|
/**
|
|
2400
|
-
*
|
|
2414
|
+
* Description lines. Empty when the line item had no description lines.
|
|
2401
2415
|
* @maxSize 20
|
|
2402
2416
|
*/
|
|
2403
2417
|
descriptionLines?: DescriptionLine[];
|
|
2404
2418
|
}
|
|
2405
|
-
/**
|
|
2419
|
+
/** Image before the change. */
|
|
2406
2420
|
interface ImageBeforeChange {
|
|
2407
|
-
/**
|
|
2421
|
+
/** Image. Absent when the line item had no image. */
|
|
2408
2422
|
image?: string;
|
|
2409
2423
|
}
|
|
2410
|
-
/**
|
|
2424
|
+
/** Physical properties before the change. */
|
|
2411
2425
|
interface PhysicalPropertiesBeforeChange {
|
|
2412
|
-
/**
|
|
2426
|
+
/** Physical properties. Absent when the line item had no physical properties. */
|
|
2413
2427
|
physicalProperties?: PhysicalProperties;
|
|
2414
2428
|
}
|
|
2415
|
-
/**
|
|
2429
|
+
/** Item type before the change. */
|
|
2416
2430
|
interface ItemTypeBeforeChange {
|
|
2417
|
-
/**
|
|
2431
|
+
/** Item type. Absent when the line item had no item type. */
|
|
2418
2432
|
itemType?: ItemType;
|
|
2419
2433
|
}
|
|
2420
|
-
/**
|
|
2434
|
+
/** Fulfiller ID before the change. */
|
|
2421
2435
|
interface FulfillerIdBeforeChange {
|
|
2422
2436
|
/**
|
|
2423
|
-
*
|
|
2437
|
+
* Fulfiller ID. Absent when the line item had no fulfiller.
|
|
2424
2438
|
* @format GUID
|
|
2425
2439
|
*/
|
|
2426
2440
|
fulfillerId?: string | null;
|
|
2427
2441
|
}
|
|
2428
|
-
/**
|
|
2442
|
+
/** Digital file before the change. */
|
|
2429
2443
|
interface DigitalFileBeforeChange {
|
|
2430
|
-
/**
|
|
2444
|
+
/** Digital file. Absent when the line item had no digital file. */
|
|
2431
2445
|
digitalFile?: DigitalFile;
|
|
2432
2446
|
}
|
|
2433
|
-
/**
|
|
2447
|
+
/** Price description before the change. */
|
|
2434
2448
|
interface PriceDescriptionBeforeChange {
|
|
2435
|
-
/**
|
|
2449
|
+
/** Price description. Absent when the line item had no price description. */
|
|
2436
2450
|
priceDescription?: PriceDescription;
|
|
2437
2451
|
}
|
|
2438
|
-
/**
|
|
2452
|
+
/** Delivery profile ID before the change. */
|
|
2439
2453
|
interface DeliveryProfileIdBeforeChange {
|
|
2440
2454
|
/**
|
|
2441
|
-
*
|
|
2455
|
+
* Delivery profile ID. Absent when the line item had no delivery profile.
|
|
2442
2456
|
* @format GUID
|
|
2443
2457
|
*/
|
|
2444
2458
|
deliveryProfileId?: string | null;
|
|
2445
2459
|
}
|
|
2446
|
-
/**
|
|
2460
|
+
/** Shipping group ID before the change. */
|
|
2447
2461
|
interface ShippingGroupIdBeforeChange {
|
|
2448
2462
|
/**
|
|
2449
|
-
*
|
|
2463
|
+
* Shipping group ID. Absent when the line item had no shipping group.
|
|
2450
2464
|
* @format GUID
|
|
2451
2465
|
*/
|
|
2452
2466
|
shippingGroupId?: string | null;
|
|
2453
2467
|
}
|
|
2454
|
-
/**
|
|
2468
|
+
/** Tax info before the change. */
|
|
2455
2469
|
interface TaxInfoBeforeChange {
|
|
2456
|
-
/**
|
|
2470
|
+
/** Tax info. Absent when the line item had no tax info. */
|
|
2457
2471
|
taxInfo?: LineItemTaxInfo;
|
|
2458
2472
|
}
|
|
2459
|
-
/**
|
|
2473
|
+
/** Inventory app ID before the change. */
|
|
2460
2474
|
interface InventoryAppIdBeforeChange {
|
|
2461
2475
|
/**
|
|
2462
|
-
*
|
|
2476
|
+
* Inventory app ID. Absent when the line item had no inventory app.
|
|
2463
2477
|
* @format GUID
|
|
2464
2478
|
*/
|
|
2465
2479
|
inventoryAppId?: string | null;
|
|
2466
2480
|
}
|
|
2467
|
-
/**
|
|
2481
|
+
/** Root catalog item ID before the change. */
|
|
2468
2482
|
interface RootCatalogItemIdBeforeChange {
|
|
2469
2483
|
/**
|
|
2470
|
-
*
|
|
2484
|
+
* Root catalog item ID. Absent when the line item had no root catalog item.
|
|
2471
2485
|
* @minLength 1
|
|
2472
2486
|
* @maxLength 36
|
|
2473
2487
|
*/
|
|
2474
2488
|
rootCatalogItemId?: string | null;
|
|
2475
2489
|
}
|
|
2476
|
-
/**
|
|
2490
|
+
/** Modifier groups before the change. */
|
|
2477
2491
|
interface ModifierGroupsBeforeChange {
|
|
2478
2492
|
/**
|
|
2479
|
-
*
|
|
2493
|
+
* Modifier groups. Empty when the line item had no modifier groups.
|
|
2480
2494
|
* @maxSize 10
|
|
2481
2495
|
*/
|
|
2482
2496
|
modifierGroups?: ModifierGroup[];
|
|
2483
2497
|
}
|
|
2484
|
-
/**
|
|
2498
|
+
/** Price undetermined flag before the change. */
|
|
2485
2499
|
interface PriceUndeterminedBeforeChange {
|
|
2486
2500
|
/** Whether the price of the line item was undetermined. */
|
|
2487
2501
|
priceUndetermined?: boolean;
|
|
@@ -2501,36 +2515,36 @@ declare enum ChangeType {
|
|
|
2501
2515
|
type ChangeTypeWithLiterals = ChangeType | 'UNKNOWN_CHANGE_TYPE' | 'ADDED' | 'CHANGED' | 'REMOVED';
|
|
2502
2516
|
interface ItemChangedDetails {
|
|
2503
2517
|
/**
|
|
2504
|
-
*
|
|
2518
|
+
* Quantity before the change. Set only when the quantity changed.
|
|
2505
2519
|
* @min 1
|
|
2506
2520
|
* @max 1000000
|
|
2507
2521
|
*/
|
|
2508
2522
|
quantityBeforeChange?: number | null;
|
|
2509
|
-
/**
|
|
2523
|
+
/** Price before the change. Set only when the price changed. */
|
|
2510
2524
|
priceBeforeChange?: Price;
|
|
2511
|
-
/**
|
|
2525
|
+
/** Catalog reference options before the change. Set only when the catalog reference options changed. */
|
|
2512
2526
|
catalogReferenceOptionsBeforeChange?: CatalogReferenceOptionsBeforeChange;
|
|
2513
|
-
/**
|
|
2527
|
+
/** Product name before the change. Set only when the product name changed. */
|
|
2514
2528
|
productNameBeforeChange?: ProductNameBeforeChange;
|
|
2515
|
-
/**
|
|
2529
|
+
/** Description lines before the change. Set only when the description lines changed. */
|
|
2516
2530
|
descriptionLinesBeforeChange?: DescriptionLinesBeforeChange;
|
|
2517
|
-
/**
|
|
2531
|
+
/** Image before the change. Set only when the image changed. */
|
|
2518
2532
|
imageBeforeChange?: ImageBeforeChange;
|
|
2519
|
-
/**
|
|
2533
|
+
/** Physical properties before the change. Set only when the physical properties changed. */
|
|
2520
2534
|
physicalPropertiesBeforeChange?: PhysicalPropertiesBeforeChange;
|
|
2521
|
-
/**
|
|
2535
|
+
/** Item type before the change. Set only when the item type changed. */
|
|
2522
2536
|
itemTypeBeforeChange?: ItemTypeBeforeChange;
|
|
2523
|
-
/**
|
|
2537
|
+
/** Fulfiller ID before the change. Set only when the fulfiller ID changed. */
|
|
2524
2538
|
fulfillerIdBeforeChange?: FulfillerIdBeforeChange;
|
|
2525
|
-
/**
|
|
2539
|
+
/** Digital file before the change. Set only when the digital file changed. */
|
|
2526
2540
|
digitalFileBeforeChange?: DigitalFileBeforeChange;
|
|
2527
|
-
/**
|
|
2541
|
+
/** Price description before the change. Set only when the price description changed. */
|
|
2528
2542
|
priceDescriptionBeforeChange?: PriceDescriptionBeforeChange;
|
|
2529
|
-
/**
|
|
2543
|
+
/** Tax info before the change. Set only when the line item's tax group changed. */
|
|
2530
2544
|
taxInfoBeforeChange?: TaxInfoBeforeChange;
|
|
2531
|
-
/**
|
|
2545
|
+
/** Modifier groups before the change. Set only when the modifier groups changed. */
|
|
2532
2546
|
modifierGroupsBeforeChange?: ModifierGroupsBeforeChange;
|
|
2533
|
-
/**
|
|
2547
|
+
/** Price undetermined flag before the change. Set only when the price undetermined flag changed. */
|
|
2534
2548
|
priceUndeterminedBeforeChange?: PriceUndeterminedBeforeChange;
|
|
2535
2549
|
}
|
|
2536
2550
|
interface AppliedDiscountDelta extends AppliedDiscountDeltaDeltaDetailsOneOf {
|
|
@@ -116,6 +116,14 @@ function resolveWixEcomSubscriptionContractsV1SubscriptionContractsUrl(opts) {
|
|
|
116
116
|
{
|
|
117
117
|
srcPath: "/ecom/subscription-contracts/v1/bulk/subscription-contracts",
|
|
118
118
|
destPath: "/v1/bulk/subscription-contracts"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
srcPath: "/ecom/v1/subscription-contracts",
|
|
122
|
+
destPath: "/v1/subscription-contracts"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
srcPath: "/ecom/v1/bulk/subscription-contracts",
|
|
126
|
+
destPath: "/v1/bulk/subscription-contracts"
|
|
119
127
|
}
|
|
120
128
|
],
|
|
121
129
|
"*.dev.wix-code.com": [
|
|
@@ -126,6 +134,14 @@ function resolveWixEcomSubscriptionContractsV1SubscriptionContractsUrl(opts) {
|
|
|
126
134
|
{
|
|
127
135
|
srcPath: "/ecom/subscription-contracts/v1/bulk/subscription-contracts",
|
|
128
136
|
destPath: "/v1/bulk/subscription-contracts"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
srcPath: "/_api/ecom/v1/subscription-contracts",
|
|
140
|
+
destPath: "/v1/subscription-contracts"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
srcPath: "/_api/ecom/v1/bulk/subscription-contracts",
|
|
144
|
+
destPath: "/v1/bulk/subscription-contracts"
|
|
129
145
|
}
|
|
130
146
|
],
|
|
131
147
|
_: [
|
|
@@ -136,6 +152,14 @@ function resolveWixEcomSubscriptionContractsV1SubscriptionContractsUrl(opts) {
|
|
|
136
152
|
{
|
|
137
153
|
srcPath: "/ecom/subscription-contracts/v1/bulk/subscription-contracts",
|
|
138
154
|
destPath: "/v1/bulk/subscription-contracts"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
srcPath: "/_api/ecom/v1/subscription-contracts",
|
|
158
|
+
destPath: "/v1/subscription-contracts"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
srcPath: "/_api/ecom/v1/bulk/subscription-contracts",
|
|
162
|
+
destPath: "/v1/bulk/subscription-contracts"
|
|
139
163
|
}
|
|
140
164
|
],
|
|
141
165
|
"manage._base_domain_": [
|
|
@@ -146,6 +170,14 @@ function resolveWixEcomSubscriptionContractsV1SubscriptionContractsUrl(opts) {
|
|
|
146
170
|
{
|
|
147
171
|
srcPath: "/ecom/subscription-contracts/v1/bulk/subscription-contracts",
|
|
148
172
|
destPath: "/v1/bulk/subscription-contracts"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
srcPath: "/_api/ecom/v1/subscription-contracts",
|
|
176
|
+
destPath: "/v1/subscription-contracts"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
srcPath: "/_api/ecom/v1/bulk/subscription-contracts",
|
|
180
|
+
destPath: "/v1/bulk/subscription-contracts"
|
|
149
181
|
}
|
|
150
182
|
]
|
|
151
183
|
};
|