@wix/auto_sdk_ecom_draft-orders 1.0.138 → 1.0.139
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 +17 -3
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +8 -0
- package/build/cjs/index.typings.js +17 -3
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +8 -0
- package/build/cjs/meta.js +17 -3
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs +17 -3
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +8 -0
- package/build/es/index.typings.mjs +17 -3
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +8 -0
- package/build/es/meta.mjs +17 -3
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.js +17 -3
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +39 -0
- package/build/internal/cjs/index.typings.js +17 -3
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +8 -0
- package/build/internal/cjs/meta.js +17 -3
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.mjs +17 -3
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +39 -0
- package/build/internal/es/index.typings.mjs +17 -3
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +8 -0
- package/build/internal/es/meta.mjs +17 -3
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -2222,6 +2222,11 @@ interface CatalogReferenceLineItem {
|
|
|
2222
2222
|
* @format GUID
|
|
2223
2223
|
*/
|
|
2224
2224
|
_id?: string | null;
|
|
2225
|
+
/**
|
|
2226
|
+
* Recurring subscription settings for line item.
|
|
2227
|
+
* @internal
|
|
2228
|
+
*/
|
|
2229
|
+
subscriptionSettings?: SubscriptionSettings;
|
|
2225
2230
|
}
|
|
2226
2231
|
interface DescriptionLinesOverride {
|
|
2227
2232
|
/**
|
|
@@ -2307,6 +2312,11 @@ interface CustomLineItem {
|
|
|
2307
2312
|
* @format GUID
|
|
2308
2313
|
*/
|
|
2309
2314
|
taxGroupId?: string | null;
|
|
2315
|
+
/**
|
|
2316
|
+
* Recurring subscription settings for line item.
|
|
2317
|
+
* @internal
|
|
2318
|
+
*/
|
|
2319
|
+
subscriptionSettings?: SubscriptionSettings;
|
|
2310
2320
|
}
|
|
2311
2321
|
interface SecuredMedia {
|
|
2312
2322
|
/**
|
|
@@ -2716,6 +2726,11 @@ interface LineItemChangeDetails {
|
|
|
2716
2726
|
* @internal
|
|
2717
2727
|
*/
|
|
2718
2728
|
newCatalogReferenceOptions?: Record<string, any> | null;
|
|
2729
|
+
/**
|
|
2730
|
+
* New recurring subscription settings for this line item.
|
|
2731
|
+
* @internal
|
|
2732
|
+
*/
|
|
2733
|
+
newSubscriptionSettings?: SubscriptionSettings;
|
|
2719
2734
|
}
|
|
2720
2735
|
interface ModifiersGroupsOverride {
|
|
2721
2736
|
/**
|
|
@@ -4616,6 +4631,14 @@ interface OrderSettings extends OrderSettingsAllowedActionsOneOf, OrderSettingsE
|
|
|
4616
4631
|
* @internal
|
|
4617
4632
|
*/
|
|
4618
4633
|
specificItemsCouponBehavior?: SpecificItemsCouponBehaviorWithLiterals;
|
|
4634
|
+
/**
|
|
4635
|
+
* Whether to automatically generate an invoice when this order will be PAID.
|
|
4636
|
+
* If `false`, no invoice is auto-generated for this order.
|
|
4637
|
+
*
|
|
4638
|
+
* Default: `true`
|
|
4639
|
+
* @internal
|
|
4640
|
+
*/
|
|
4641
|
+
createInvoice?: boolean | null;
|
|
4619
4642
|
}
|
|
4620
4643
|
/** @oneof */
|
|
4621
4644
|
interface OrderSettingsAllowedActionsOneOf {
|
|
@@ -4785,6 +4808,14 @@ interface OrderCreateSettings extends OrderCreateSettingsEditableByOneOf {
|
|
|
4785
4808
|
editableByOwnerApps?: OwnerApps;
|
|
4786
4809
|
/** Notification settings to be applied on order creation */
|
|
4787
4810
|
notifications?: OrderCreateNotifications;
|
|
4811
|
+
/**
|
|
4812
|
+
* Whether to automatically generate an invoice when this order will be PAID.
|
|
4813
|
+
* If `false`, no invoice is auto-generated for this order.
|
|
4814
|
+
*
|
|
4815
|
+
* Default: `true`
|
|
4816
|
+
* @internal
|
|
4817
|
+
*/
|
|
4818
|
+
createInvoice?: boolean | null;
|
|
4788
4819
|
}
|
|
4789
4820
|
/** @oneof */
|
|
4790
4821
|
interface OrderCreateSettingsEditableByOneOf {
|
|
@@ -5222,6 +5253,10 @@ type AddLineItemsToDraftOrderApplicationErrors = {
|
|
|
5222
5253
|
code?: 'DRAFT_ORDER_ALREADY_COMMITTED';
|
|
5223
5254
|
description?: string;
|
|
5224
5255
|
data?: Record<string, any>;
|
|
5256
|
+
} | {
|
|
5257
|
+
code?: 'SUBSCRIPTION_SINGLE_ITEM_ALLOWED';
|
|
5258
|
+
description?: string;
|
|
5259
|
+
data?: Record<string, any>;
|
|
5225
5260
|
} | {
|
|
5226
5261
|
code?: 'DUPLICATED_LINE_ITEM_IDS';
|
|
5227
5262
|
description?: string;
|
|
@@ -5280,6 +5315,10 @@ type UpdateLineItemsApplicationErrors = {
|
|
|
5280
5315
|
code?: 'LINE_ITEM_HAS_PLATFORM_FEES';
|
|
5281
5316
|
description?: string;
|
|
5282
5317
|
data?: Record<string, any>;
|
|
5318
|
+
} | {
|
|
5319
|
+
code?: 'SUBSCRIPTION_SINGLE_ITEM_ALLOWED';
|
|
5320
|
+
description?: string;
|
|
5321
|
+
data?: Record<string, any>;
|
|
5283
5322
|
};
|
|
5284
5323
|
/** @docsIgnore */
|
|
5285
5324
|
type SetDepositApplicationErrors = {
|
|
@@ -140,7 +140,11 @@ function createDraftOrder(payload) {
|
|
|
140
140
|
{
|
|
141
141
|
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
142
142
|
paths: [
|
|
143
|
+
{
|
|
144
|
+
path: "draftOrder.catalogLineItems.subscriptionSettings.startDate"
|
|
145
|
+
},
|
|
143
146
|
{ path: "draftOrder.customLineItems.media.urlExpirationDate" },
|
|
147
|
+
{ path: "draftOrder.customLineItems.subscriptionSettings.startDate" },
|
|
144
148
|
{ path: "draftOrder.shippingInfo.logistics.deliverByDate" },
|
|
145
149
|
{ path: "draftOrder.shippingInfo.logistics.deliveryTimeSlot.from" },
|
|
146
150
|
{ path: "draftOrder.shippingInfo.logistics.deliveryTimeSlot.to" }
|
|
@@ -448,7 +452,11 @@ function addLineItemsToDraftOrder(payload) {
|
|
|
448
452
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
449
453
|
{
|
|
450
454
|
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
451
|
-
paths: [
|
|
455
|
+
paths: [
|
|
456
|
+
{ path: "catalogLineItems.subscriptionSettings.startDate" },
|
|
457
|
+
{ path: "customLineItems.media.urlExpirationDate" },
|
|
458
|
+
{ path: "customLineItems.subscriptionSettings.startDate" }
|
|
459
|
+
]
|
|
452
460
|
},
|
|
453
461
|
{
|
|
454
462
|
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
@@ -596,6 +604,12 @@ function addLineItemsToDraftOrder(payload) {
|
|
|
596
604
|
}
|
|
597
605
|
function updateLineItems(payload) {
|
|
598
606
|
function __updateLineItems({ host }) {
|
|
607
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
608
|
+
{
|
|
609
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
610
|
+
paths: [{ path: "lineItemChanges.newSubscriptionSettings.startDate" }]
|
|
611
|
+
}
|
|
612
|
+
]);
|
|
599
613
|
const metadata = {
|
|
600
614
|
entityFqdn: "wix.ecom.v1.draft_order",
|
|
601
615
|
method: "POST",
|
|
@@ -606,10 +620,10 @@ function updateLineItems(payload) {
|
|
|
606
620
|
},
|
|
607
621
|
url: resolveComWixEcomOrdersDraftV1DraftOrdersUrl({
|
|
608
622
|
protoPath: "/v1/draft-orders/{draftOrderId}/line-items",
|
|
609
|
-
data:
|
|
623
|
+
data: serializedData,
|
|
610
624
|
host
|
|
611
625
|
}),
|
|
612
|
-
data:
|
|
626
|
+
data: serializedData,
|
|
613
627
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
614
628
|
{
|
|
615
629
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|