@wix/auto_sdk_ecom_orders 1.0.136 → 1.0.138
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/{ecom-v1-order-orders.universal-C3ADe9Sb.d.ts → ecom-v1-order-orders.universal-C83tlr2q.d.ts} +48 -70
- package/build/cjs/index.d.ts +2 -2
- package/build/cjs/index.js +33 -194
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +2 -2
- package/build/cjs/index.typings.js +0 -181
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +48 -57
- package/build/cjs/meta.js +0 -125
- package/build/cjs/meta.js.map +1 -1
- package/build/es/{ecom-v1-order-orders.universal-C3ADe9Sb.d.mts → ecom-v1-order-orders.universal-C83tlr2q.d.mts} +48 -70
- package/build/es/index.d.mts +2 -2
- package/build/es/index.mjs +33 -193
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +2 -2
- package/build/es/index.typings.mjs +0 -180
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +48 -57
- package/build/es/meta.mjs +0 -124
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/{ecom-v1-order-orders.universal-_nmG8kso.d.ts → ecom-v1-order-orders.universal-sK3jbGGi.d.ts} +48 -85
- package/build/internal/cjs/index.d.ts +3 -13
- package/build/internal/cjs/index.js +33 -194
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +2 -2
- package/build/internal/cjs/index.typings.js +0 -181
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +48 -57
- package/build/internal/cjs/meta.js +0 -125
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/{ecom-v1-order-orders.universal-_nmG8kso.d.mts → ecom-v1-order-orders.universal-sK3jbGGi.d.mts} +48 -85
- package/build/internal/es/index.d.mts +3 -13
- package/build/internal/es/index.mjs +33 -193
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +2 -2
- package/build/internal/es/index.typings.mjs +0 -180
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +48 -57
- package/build/internal/es/meta.mjs +0 -124
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -79,7 +79,6 @@ __export(index_exports, {
|
|
|
79
79
|
cancelOrder: () => cancelOrder4,
|
|
80
80
|
captureAuthorizedPayments: () => captureAuthorizedPayments4,
|
|
81
81
|
chargeMemberships: () => chargeMemberships4,
|
|
82
|
-
commitDeltas: () => commitDeltas4,
|
|
83
82
|
createOrder: () => createOrder4,
|
|
84
83
|
deleteActivity: () => deleteActivity4,
|
|
85
84
|
getOrder: () => getOrder4,
|
|
@@ -1251,111 +1250,6 @@ function bulkUpdateOrders(payload) {
|
|
|
1251
1250
|
}
|
|
1252
1251
|
return __bulkUpdateOrders;
|
|
1253
1252
|
}
|
|
1254
|
-
function commitDeltas(payload) {
|
|
1255
|
-
function __commitDeltas({ host }) {
|
|
1256
|
-
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
1257
|
-
{
|
|
1258
|
-
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
1259
|
-
paths: [
|
|
1260
|
-
{ path: "changes.changedShippingInfo.logistics.deliverByDate" },
|
|
1261
|
-
{
|
|
1262
|
-
path: "changes.changedShippingInfo.logistics.deliveryTimeSlot.from"
|
|
1263
|
-
},
|
|
1264
|
-
{ path: "changes.changedShippingInfo.logistics.deliveryTimeSlot.to" },
|
|
1265
|
-
{ path: "changes.lineItems.lineItem.image.urlExpirationDate" },
|
|
1266
|
-
{ path: "changes.lineItems.lineItem.digitalFile.expirationDate" },
|
|
1267
|
-
{
|
|
1268
|
-
path: "changes.lineItems.lineItem.subscriptionInfo.subscriptionSettings.startDate"
|
|
1269
|
-
}
|
|
1270
|
-
]
|
|
1271
|
-
},
|
|
1272
|
-
{
|
|
1273
|
-
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
1274
|
-
paths: [
|
|
1275
|
-
{
|
|
1276
|
-
path: "changes.changedShippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
1277
|
-
},
|
|
1278
|
-
{
|
|
1279
|
-
path: "changes.changedShippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
1280
|
-
},
|
|
1281
|
-
{
|
|
1282
|
-
path: "changes.changedShippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
1283
|
-
},
|
|
1284
|
-
{
|
|
1285
|
-
path: "changes.changedShippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
1286
|
-
},
|
|
1287
|
-
{ path: "changes.changedBillingInfo.address.geocode.latitude" },
|
|
1288
|
-
{ path: "changes.changedBillingInfo.address.geocode.longitude" },
|
|
1289
|
-
{ path: "changes.changedRecipientInfo.address.geocode.latitude" },
|
|
1290
|
-
{ path: "changes.changedRecipientInfo.address.geocode.longitude" },
|
|
1291
|
-
{ path: "changes.lineItems.lineItem.physicalProperties.weight" },
|
|
1292
|
-
{ path: "changes.lineItems.lineItem.image.focalPoint.x" },
|
|
1293
|
-
{ path: "changes.lineItems.lineItem.image.focalPoint.y" }
|
|
1294
|
-
]
|
|
1295
|
-
}
|
|
1296
|
-
]);
|
|
1297
|
-
const metadata = {
|
|
1298
|
-
entityFqdn: "wix.ecom.v1.order",
|
|
1299
|
-
method: "POST",
|
|
1300
|
-
methodFqn: "com.wix.ecom.orders.v1.Orders.CommitDeltas",
|
|
1301
|
-
packageName: PACKAGE_NAME,
|
|
1302
|
-
migrationOptions: {
|
|
1303
|
-
optInTransformResponse: true
|
|
1304
|
-
},
|
|
1305
|
-
url: resolveComWixEcomOrdersV1OrdersUrl({
|
|
1306
|
-
protoPath: "/v1/orders/{id}/commit-deltas",
|
|
1307
|
-
data: serializedData,
|
|
1308
|
-
host
|
|
1309
|
-
}),
|
|
1310
|
-
data: serializedData,
|
|
1311
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
1312
|
-
{
|
|
1313
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
1314
|
-
paths: [
|
|
1315
|
-
{ path: "order.createdDate" },
|
|
1316
|
-
{ path: "order.updatedDate" },
|
|
1317
|
-
{ path: "order.purchasedDate" },
|
|
1318
|
-
{ path: "order.lineItems.image.urlExpirationDate" },
|
|
1319
|
-
{ path: "order.lineItems.digitalFile.expirationDate" },
|
|
1320
|
-
{
|
|
1321
|
-
path: "order.lineItems.subscriptionInfo.subscriptionSettings.startDate"
|
|
1322
|
-
},
|
|
1323
|
-
{ path: "order.shippingInfo.logistics.deliverByDate" },
|
|
1324
|
-
{ path: "order.shippingInfo.logistics.deliveryTimeSlot.from" },
|
|
1325
|
-
{ path: "order.shippingInfo.logistics.deliveryTimeSlot.to" },
|
|
1326
|
-
{ path: "order.activities.createdDate" }
|
|
1327
|
-
]
|
|
1328
|
-
},
|
|
1329
|
-
{
|
|
1330
|
-
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
1331
|
-
paths: [
|
|
1332
|
-
{ path: "order.lineItems.image.focalPoint.x" },
|
|
1333
|
-
{ path: "order.lineItems.image.focalPoint.y" },
|
|
1334
|
-
{ path: "order.lineItems.physicalProperties.weight" },
|
|
1335
|
-
{ path: "order.billingInfo.address.geocode.latitude" },
|
|
1336
|
-
{ path: "order.billingInfo.address.geocode.longitude" },
|
|
1337
|
-
{
|
|
1338
|
-
path: "order.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
1339
|
-
},
|
|
1340
|
-
{
|
|
1341
|
-
path: "order.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
1342
|
-
},
|
|
1343
|
-
{
|
|
1344
|
-
path: "order.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
1345
|
-
},
|
|
1346
|
-
{
|
|
1347
|
-
path: "order.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
1348
|
-
},
|
|
1349
|
-
{ path: "order.recipientInfo.address.geocode.latitude" },
|
|
1350
|
-
{ path: "order.recipientInfo.address.geocode.longitude" }
|
|
1351
|
-
]
|
|
1352
|
-
}
|
|
1353
|
-
])
|
|
1354
|
-
};
|
|
1355
|
-
return metadata;
|
|
1356
|
-
}
|
|
1357
|
-
return __commitDeltas;
|
|
1358
|
-
}
|
|
1359
1253
|
function updateOrderLineItem(payload) {
|
|
1360
1254
|
function __updateOrderLineItem({ host }) {
|
|
1361
1255
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -3079,80 +2973,6 @@ async function bulkUpdateOrders2(orders, options) {
|
|
|
3079
2973
|
throw transformedError;
|
|
3080
2974
|
}
|
|
3081
2975
|
}
|
|
3082
|
-
async function commitDeltas2(_id, options) {
|
|
3083
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
3084
|
-
const payload = (0, import_transform_paths2.transformPaths)(
|
|
3085
|
-
(0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
3086
|
-
id: _id,
|
|
3087
|
-
draftOrderId: options?.draftOrderId,
|
|
3088
|
-
changes: options?.changes,
|
|
3089
|
-
commitSettings: options?.commitSettings,
|
|
3090
|
-
reason: options?.reason
|
|
3091
|
-
}),
|
|
3092
|
-
[
|
|
3093
|
-
{
|
|
3094
|
-
transformFn: import_address.transformSDKAddressToRESTAddress,
|
|
3095
|
-
paths: [
|
|
3096
|
-
{
|
|
3097
|
-
path: "changes.changedShippingInfo.logistics.shippingDestination.address"
|
|
3098
|
-
},
|
|
3099
|
-
{
|
|
3100
|
-
path: "changes.changedShippingInfo.logistics.pickupDetails.address"
|
|
3101
|
-
},
|
|
3102
|
-
{ path: "changes.changedBillingInfo.address" },
|
|
3103
|
-
{ path: "changes.changedRecipientInfo.address" }
|
|
3104
|
-
]
|
|
3105
|
-
},
|
|
3106
|
-
{
|
|
3107
|
-
transformFn: import_image.transformSDKImageToRESTImage,
|
|
3108
|
-
paths: [{ path: "changes.lineItems.lineItem.image" }]
|
|
3109
|
-
}
|
|
3110
|
-
]
|
|
3111
|
-
);
|
|
3112
|
-
const reqOpts = commitDeltas(payload);
|
|
3113
|
-
sideEffects?.onSiteCall?.();
|
|
3114
|
-
try {
|
|
3115
|
-
const result = await httpClient.request(reqOpts);
|
|
3116
|
-
sideEffects?.onSuccess?.(result);
|
|
3117
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
3118
|
-
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
3119
|
-
{
|
|
3120
|
-
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
3121
|
-
paths: [{ path: "order.lineItems.image" }]
|
|
3122
|
-
},
|
|
3123
|
-
{
|
|
3124
|
-
transformFn: import_address2.transformRESTAddressToSDKAddress,
|
|
3125
|
-
paths: [
|
|
3126
|
-
{ path: "order.billingInfo.address" },
|
|
3127
|
-
{
|
|
3128
|
-
path: "order.shippingInfo.logistics.shippingDestination.address"
|
|
3129
|
-
},
|
|
3130
|
-
{ path: "order.shippingInfo.logistics.pickupDetails.address" },
|
|
3131
|
-
{ path: "order.recipientInfo.address" }
|
|
3132
|
-
]
|
|
3133
|
-
}
|
|
3134
|
-
])
|
|
3135
|
-
);
|
|
3136
|
-
} catch (err) {
|
|
3137
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
3138
|
-
err,
|
|
3139
|
-
{
|
|
3140
|
-
spreadPathsToArguments: {},
|
|
3141
|
-
explicitPathsToArguments: {
|
|
3142
|
-
id: "$[0]",
|
|
3143
|
-
draftOrderId: "$[1].draftOrderId",
|
|
3144
|
-
changes: "$[1].changes",
|
|
3145
|
-
commitSettings: "$[1].commitSettings",
|
|
3146
|
-
reason: "$[1].reason"
|
|
3147
|
-
},
|
|
3148
|
-
singleArgumentUnchanged: false
|
|
3149
|
-
},
|
|
3150
|
-
["_id", "options"]
|
|
3151
|
-
);
|
|
3152
|
-
sideEffects?.onError?.(err);
|
|
3153
|
-
throw transformedError;
|
|
3154
|
-
}
|
|
3155
|
-
}
|
|
3156
2976
|
async function updateOrderLineItem2(identifiers, lineItem) {
|
|
3157
2977
|
const { httpClient, sideEffects } = arguments[2];
|
|
3158
2978
|
const payload = (0, import_transform_paths2.transformPaths)(
|
|
@@ -3701,14 +3521,6 @@ function bulkUpdateOrders3(httpClient) {
|
|
|
3701
3521
|
{ httpClient }
|
|
3702
3522
|
);
|
|
3703
3523
|
}
|
|
3704
|
-
function commitDeltas3(httpClient) {
|
|
3705
|
-
return (_id, options) => commitDeltas2(
|
|
3706
|
-
_id,
|
|
3707
|
-
options,
|
|
3708
|
-
// @ts-ignore
|
|
3709
|
-
{ httpClient }
|
|
3710
|
-
);
|
|
3711
|
-
}
|
|
3712
3524
|
function updateOrderLineItem3(httpClient) {
|
|
3713
3525
|
return (identifiers, lineItem) => updateOrderLineItem2(
|
|
3714
3526
|
identifiers,
|
|
@@ -3842,16 +3654,37 @@ var onOrderUpdated = (0, import_sdk_types.EventDefinition)(
|
|
|
3842
3654
|
{ path: "entity.shippingInfo.logistics.deliveryTimeSlot.from" },
|
|
3843
3655
|
{ path: "entity.shippingInfo.logistics.deliveryTimeSlot.to" },
|
|
3844
3656
|
{ path: "entity.activities.createdDate" },
|
|
3845
|
-
{ path: "metadata.eventTime" }
|
|
3657
|
+
{ path: "metadata.eventTime" },
|
|
3658
|
+
{ path: "modifiedFields.createdDate" },
|
|
3659
|
+
{ path: "modifiedFields.updatedDate" },
|
|
3660
|
+
{ path: "modifiedFields.purchasedDate" },
|
|
3661
|
+
{ path: "modifiedFields.lineItems.digitalFile.expirationDate" },
|
|
3662
|
+
{
|
|
3663
|
+
path: "modifiedFields.lineItems.subscriptionInfo.subscriptionSettings.startDate"
|
|
3664
|
+
},
|
|
3665
|
+
{ path: "modifiedFields.shippingInfo.logistics.deliverByDate" },
|
|
3666
|
+
{
|
|
3667
|
+
path: "modifiedFields.shippingInfo.logistics.deliveryTimeSlot.from"
|
|
3668
|
+
},
|
|
3669
|
+
{
|
|
3670
|
+
path: "modifiedFields.shippingInfo.logistics.deliveryTimeSlot.to"
|
|
3671
|
+
},
|
|
3672
|
+
{ path: "modifiedFields.activities.createdDate" }
|
|
3846
3673
|
]
|
|
3847
3674
|
},
|
|
3848
3675
|
{
|
|
3849
3676
|
transformFn: import_image3.transformRESTImageToSDKImage,
|
|
3850
|
-
paths: [
|
|
3677
|
+
paths: [
|
|
3678
|
+
{ path: "entity.lineItems.image" },
|
|
3679
|
+
{ path: "modifiedFields.lineItems.image" }
|
|
3680
|
+
]
|
|
3851
3681
|
},
|
|
3852
3682
|
{
|
|
3853
3683
|
transformFn: import_float3.transformRESTFloatToSDKFloat,
|
|
3854
|
-
paths: [
|
|
3684
|
+
paths: [
|
|
3685
|
+
{ path: "entity.lineItems.physicalProperties.weight" },
|
|
3686
|
+
{ path: "modifiedFields.lineItems.physicalProperties.weight" }
|
|
3687
|
+
]
|
|
3855
3688
|
},
|
|
3856
3689
|
{
|
|
3857
3690
|
transformFn: import_address3.transformRESTAddressToSDKAddress,
|
|
@@ -3861,7 +3694,15 @@ var onOrderUpdated = (0, import_sdk_types.EventDefinition)(
|
|
|
3861
3694
|
path: "entity.shippingInfo.logistics.shippingDestination.address"
|
|
3862
3695
|
},
|
|
3863
3696
|
{ path: "entity.shippingInfo.logistics.pickupDetails.address" },
|
|
3864
|
-
{ path: "entity.recipientInfo.address" }
|
|
3697
|
+
{ path: "entity.recipientInfo.address" },
|
|
3698
|
+
{ path: "modifiedFields.billingInfo.address" },
|
|
3699
|
+
{
|
|
3700
|
+
path: "modifiedFields.shippingInfo.logistics.shippingDestination.address"
|
|
3701
|
+
},
|
|
3702
|
+
{
|
|
3703
|
+
path: "modifiedFields.shippingInfo.logistics.pickupDetails.address"
|
|
3704
|
+
},
|
|
3705
|
+
{ path: "modifiedFields.recipientInfo.address" }
|
|
3865
3706
|
]
|
|
3866
3707
|
}
|
|
3867
3708
|
])
|
|
@@ -4024,7 +3865,6 @@ var searchOrders4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(s
|
|
|
4024
3865
|
var createOrder4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createOrder3);
|
|
4025
3866
|
var updateOrder4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateOrder3);
|
|
4026
3867
|
var bulkUpdateOrders4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkUpdateOrders3);
|
|
4027
|
-
var commitDeltas4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(commitDeltas3);
|
|
4028
3868
|
var updateOrderLineItem4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateOrderLineItem3);
|
|
4029
3869
|
var addActivity4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(addActivity3);
|
|
4030
3870
|
var addActivities4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(addActivities3);
|
|
@@ -4102,7 +3942,6 @@ var onOrderPaymentStatusUpdated2 = (0, import_event_definition_modules.createEve
|
|
|
4102
3942
|
cancelOrder,
|
|
4103
3943
|
captureAuthorizedPayments,
|
|
4104
3944
|
chargeMemberships,
|
|
4105
|
-
commitDeltas,
|
|
4106
3945
|
createOrder,
|
|
4107
3946
|
deleteActivity,
|
|
4108
3947
|
getOrder,
|