@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.
Files changed (41) hide show
  1. package/build/cjs/{ecom-v1-order-orders.universal-C3ADe9Sb.d.ts → ecom-v1-order-orders.universal-C83tlr2q.d.ts} +48 -70
  2. package/build/cjs/index.d.ts +2 -2
  3. package/build/cjs/index.js +33 -194
  4. package/build/cjs/index.js.map +1 -1
  5. package/build/cjs/index.typings.d.ts +2 -2
  6. package/build/cjs/index.typings.js +0 -181
  7. package/build/cjs/index.typings.js.map +1 -1
  8. package/build/cjs/meta.d.ts +48 -57
  9. package/build/cjs/meta.js +0 -125
  10. package/build/cjs/meta.js.map +1 -1
  11. package/build/es/{ecom-v1-order-orders.universal-C3ADe9Sb.d.mts → ecom-v1-order-orders.universal-C83tlr2q.d.mts} +48 -70
  12. package/build/es/index.d.mts +2 -2
  13. package/build/es/index.mjs +33 -193
  14. package/build/es/index.mjs.map +1 -1
  15. package/build/es/index.typings.d.mts +2 -2
  16. package/build/es/index.typings.mjs +0 -180
  17. package/build/es/index.typings.mjs.map +1 -1
  18. package/build/es/meta.d.mts +48 -57
  19. package/build/es/meta.mjs +0 -124
  20. package/build/es/meta.mjs.map +1 -1
  21. package/build/internal/cjs/{ecom-v1-order-orders.universal-_nmG8kso.d.ts → ecom-v1-order-orders.universal-sK3jbGGi.d.ts} +48 -85
  22. package/build/internal/cjs/index.d.ts +3 -13
  23. package/build/internal/cjs/index.js +33 -194
  24. package/build/internal/cjs/index.js.map +1 -1
  25. package/build/internal/cjs/index.typings.d.ts +2 -2
  26. package/build/internal/cjs/index.typings.js +0 -181
  27. package/build/internal/cjs/index.typings.js.map +1 -1
  28. package/build/internal/cjs/meta.d.ts +48 -57
  29. package/build/internal/cjs/meta.js +0 -125
  30. package/build/internal/cjs/meta.js.map +1 -1
  31. package/build/internal/es/{ecom-v1-order-orders.universal-_nmG8kso.d.mts → ecom-v1-order-orders.universal-sK3jbGGi.d.mts} +48 -85
  32. package/build/internal/es/index.d.mts +3 -13
  33. package/build/internal/es/index.mjs +33 -193
  34. package/build/internal/es/index.mjs.map +1 -1
  35. package/build/internal/es/index.typings.d.mts +2 -2
  36. package/build/internal/es/index.typings.mjs +0 -180
  37. package/build/internal/es/index.typings.mjs.map +1 -1
  38. package/build/internal/es/meta.d.mts +48 -57
  39. package/build/internal/es/meta.mjs +0 -124
  40. package/build/internal/es/meta.mjs.map +1 -1
  41. package/package.json +2 -2
@@ -1145,111 +1145,6 @@ function bulkUpdateOrders(payload) {
1145
1145
  }
1146
1146
  return __bulkUpdateOrders;
1147
1147
  }
1148
- function commitDeltas(payload) {
1149
- function __commitDeltas({ host }) {
1150
- const serializedData = transformPaths(payload, [
1151
- {
1152
- transformFn: transformSDKTimestampToRESTTimestamp,
1153
- paths: [
1154
- { path: "changes.changedShippingInfo.logistics.deliverByDate" },
1155
- {
1156
- path: "changes.changedShippingInfo.logistics.deliveryTimeSlot.from"
1157
- },
1158
- { path: "changes.changedShippingInfo.logistics.deliveryTimeSlot.to" },
1159
- { path: "changes.lineItems.lineItem.image.urlExpirationDate" },
1160
- { path: "changes.lineItems.lineItem.digitalFile.expirationDate" },
1161
- {
1162
- path: "changes.lineItems.lineItem.subscriptionInfo.subscriptionSettings.startDate"
1163
- }
1164
- ]
1165
- },
1166
- {
1167
- transformFn: transformSDKFloatToRESTFloat,
1168
- paths: [
1169
- {
1170
- path: "changes.changedShippingInfo.logistics.shippingDestination.address.geocode.latitude"
1171
- },
1172
- {
1173
- path: "changes.changedShippingInfo.logistics.shippingDestination.address.geocode.longitude"
1174
- },
1175
- {
1176
- path: "changes.changedShippingInfo.logistics.pickupDetails.address.geocode.latitude"
1177
- },
1178
- {
1179
- path: "changes.changedShippingInfo.logistics.pickupDetails.address.geocode.longitude"
1180
- },
1181
- { path: "changes.changedBillingInfo.address.geocode.latitude" },
1182
- { path: "changes.changedBillingInfo.address.geocode.longitude" },
1183
- { path: "changes.changedRecipientInfo.address.geocode.latitude" },
1184
- { path: "changes.changedRecipientInfo.address.geocode.longitude" },
1185
- { path: "changes.lineItems.lineItem.physicalProperties.weight" },
1186
- { path: "changes.lineItems.lineItem.image.focalPoint.x" },
1187
- { path: "changes.lineItems.lineItem.image.focalPoint.y" }
1188
- ]
1189
- }
1190
- ]);
1191
- const metadata = {
1192
- entityFqdn: "wix.ecom.v1.order",
1193
- method: "POST",
1194
- methodFqn: "com.wix.ecom.orders.v1.Orders.CommitDeltas",
1195
- packageName: PACKAGE_NAME,
1196
- migrationOptions: {
1197
- optInTransformResponse: true
1198
- },
1199
- url: resolveComWixEcomOrdersV1OrdersUrl({
1200
- protoPath: "/v1/orders/{id}/commit-deltas",
1201
- data: serializedData,
1202
- host
1203
- }),
1204
- data: serializedData,
1205
- transformResponse: (payload2) => transformPaths(payload2, [
1206
- {
1207
- transformFn: transformRESTTimestampToSDKTimestamp,
1208
- paths: [
1209
- { path: "order.createdDate" },
1210
- { path: "order.updatedDate" },
1211
- { path: "order.purchasedDate" },
1212
- { path: "order.lineItems.image.urlExpirationDate" },
1213
- { path: "order.lineItems.digitalFile.expirationDate" },
1214
- {
1215
- path: "order.lineItems.subscriptionInfo.subscriptionSettings.startDate"
1216
- },
1217
- { path: "order.shippingInfo.logistics.deliverByDate" },
1218
- { path: "order.shippingInfo.logistics.deliveryTimeSlot.from" },
1219
- { path: "order.shippingInfo.logistics.deliveryTimeSlot.to" },
1220
- { path: "order.activities.createdDate" }
1221
- ]
1222
- },
1223
- {
1224
- transformFn: transformRESTFloatToSDKFloat,
1225
- paths: [
1226
- { path: "order.lineItems.image.focalPoint.x" },
1227
- { path: "order.lineItems.image.focalPoint.y" },
1228
- { path: "order.lineItems.physicalProperties.weight" },
1229
- { path: "order.billingInfo.address.geocode.latitude" },
1230
- { path: "order.billingInfo.address.geocode.longitude" },
1231
- {
1232
- path: "order.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
1233
- },
1234
- {
1235
- path: "order.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
1236
- },
1237
- {
1238
- path: "order.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
1239
- },
1240
- {
1241
- path: "order.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
1242
- },
1243
- { path: "order.recipientInfo.address.geocode.latitude" },
1244
- { path: "order.recipientInfo.address.geocode.longitude" }
1245
- ]
1246
- }
1247
- ])
1248
- };
1249
- return metadata;
1250
- }
1251
- return __commitDeltas;
1252
- }
1253
1148
  function updateOrderLineItem(payload) {
1254
1149
  function __updateOrderLineItem({ host }) {
1255
1150
  const serializedData = transformPaths(payload, [
@@ -2973,80 +2868,6 @@ async function bulkUpdateOrders2(orders, options) {
2973
2868
  throw transformedError;
2974
2869
  }
2975
2870
  }
2976
- async function commitDeltas2(_id, options) {
2977
- const { httpClient, sideEffects } = arguments[2];
2978
- const payload = transformPaths2(
2979
- renameKeysFromSDKRequestToRESTRequest({
2980
- id: _id,
2981
- draftOrderId: options?.draftOrderId,
2982
- changes: options?.changes,
2983
- commitSettings: options?.commitSettings,
2984
- reason: options?.reason
2985
- }),
2986
- [
2987
- {
2988
- transformFn: transformSDKAddressToRESTAddress,
2989
- paths: [
2990
- {
2991
- path: "changes.changedShippingInfo.logistics.shippingDestination.address"
2992
- },
2993
- {
2994
- path: "changes.changedShippingInfo.logistics.pickupDetails.address"
2995
- },
2996
- { path: "changes.changedBillingInfo.address" },
2997
- { path: "changes.changedRecipientInfo.address" }
2998
- ]
2999
- },
3000
- {
3001
- transformFn: transformSDKImageToRESTImage,
3002
- paths: [{ path: "changes.lineItems.lineItem.image" }]
3003
- }
3004
- ]
3005
- );
3006
- const reqOpts = commitDeltas(payload);
3007
- sideEffects?.onSiteCall?.();
3008
- try {
3009
- const result = await httpClient.request(reqOpts);
3010
- sideEffects?.onSuccess?.(result);
3011
- return renameKeysFromRESTResponseToSDKResponse(
3012
- transformPaths2(result.data, [
3013
- {
3014
- transformFn: transformRESTImageToSDKImage,
3015
- paths: [{ path: "order.lineItems.image" }]
3016
- },
3017
- {
3018
- transformFn: transformRESTAddressToSDKAddress,
3019
- paths: [
3020
- { path: "order.billingInfo.address" },
3021
- {
3022
- path: "order.shippingInfo.logistics.shippingDestination.address"
3023
- },
3024
- { path: "order.shippingInfo.logistics.pickupDetails.address" },
3025
- { path: "order.recipientInfo.address" }
3026
- ]
3027
- }
3028
- ])
3029
- );
3030
- } catch (err) {
3031
- const transformedError = sdkTransformError(
3032
- err,
3033
- {
3034
- spreadPathsToArguments: {},
3035
- explicitPathsToArguments: {
3036
- id: "$[0]",
3037
- draftOrderId: "$[1].draftOrderId",
3038
- changes: "$[1].changes",
3039
- commitSettings: "$[1].commitSettings",
3040
- reason: "$[1].reason"
3041
- },
3042
- singleArgumentUnchanged: false
3043
- },
3044
- ["_id", "options"]
3045
- );
3046
- sideEffects?.onError?.(err);
3047
- throw transformedError;
3048
- }
3049
- }
3050
2871
  async function updateOrderLineItem2(identifiers, lineItem) {
3051
2872
  const { httpClient, sideEffects } = arguments[2];
3052
2873
  const payload = transformPaths2(
@@ -3595,14 +3416,6 @@ function bulkUpdateOrders3(httpClient) {
3595
3416
  { httpClient }
3596
3417
  );
3597
3418
  }
3598
- function commitDeltas3(httpClient) {
3599
- return (_id, options) => commitDeltas2(
3600
- _id,
3601
- options,
3602
- // @ts-ignore
3603
- { httpClient }
3604
- );
3605
- }
3606
3419
  function updateOrderLineItem3(httpClient) {
3607
3420
  return (identifiers, lineItem) => updateOrderLineItem2(
3608
3421
  identifiers,
@@ -3736,16 +3549,37 @@ var onOrderUpdated = EventDefinition(
3736
3549
  { path: "entity.shippingInfo.logistics.deliveryTimeSlot.from" },
3737
3550
  { path: "entity.shippingInfo.logistics.deliveryTimeSlot.to" },
3738
3551
  { path: "entity.activities.createdDate" },
3739
- { path: "metadata.eventTime" }
3552
+ { path: "metadata.eventTime" },
3553
+ { path: "modifiedFields.createdDate" },
3554
+ { path: "modifiedFields.updatedDate" },
3555
+ { path: "modifiedFields.purchasedDate" },
3556
+ { path: "modifiedFields.lineItems.digitalFile.expirationDate" },
3557
+ {
3558
+ path: "modifiedFields.lineItems.subscriptionInfo.subscriptionSettings.startDate"
3559
+ },
3560
+ { path: "modifiedFields.shippingInfo.logistics.deliverByDate" },
3561
+ {
3562
+ path: "modifiedFields.shippingInfo.logistics.deliveryTimeSlot.from"
3563
+ },
3564
+ {
3565
+ path: "modifiedFields.shippingInfo.logistics.deliveryTimeSlot.to"
3566
+ },
3567
+ { path: "modifiedFields.activities.createdDate" }
3740
3568
  ]
3741
3569
  },
3742
3570
  {
3743
3571
  transformFn: transformRESTImageToSDKImage2,
3744
- paths: [{ path: "entity.lineItems.image" }]
3572
+ paths: [
3573
+ { path: "entity.lineItems.image" },
3574
+ { path: "modifiedFields.lineItems.image" }
3575
+ ]
3745
3576
  },
3746
3577
  {
3747
3578
  transformFn: transformRESTFloatToSDKFloat2,
3748
- paths: [{ path: "entity.lineItems.physicalProperties.weight" }]
3579
+ paths: [
3580
+ { path: "entity.lineItems.physicalProperties.weight" },
3581
+ { path: "modifiedFields.lineItems.physicalProperties.weight" }
3582
+ ]
3749
3583
  },
3750
3584
  {
3751
3585
  transformFn: transformRESTAddressToSDKAddress2,
@@ -3755,7 +3589,15 @@ var onOrderUpdated = EventDefinition(
3755
3589
  path: "entity.shippingInfo.logistics.shippingDestination.address"
3756
3590
  },
3757
3591
  { path: "entity.shippingInfo.logistics.pickupDetails.address" },
3758
- { path: "entity.recipientInfo.address" }
3592
+ { path: "entity.recipientInfo.address" },
3593
+ { path: "modifiedFields.billingInfo.address" },
3594
+ {
3595
+ path: "modifiedFields.shippingInfo.logistics.shippingDestination.address"
3596
+ },
3597
+ {
3598
+ path: "modifiedFields.shippingInfo.logistics.pickupDetails.address"
3599
+ },
3600
+ { path: "modifiedFields.recipientInfo.address" }
3759
3601
  ]
3760
3602
  }
3761
3603
  ])
@@ -3918,7 +3760,6 @@ var searchOrders4 = /* @__PURE__ */ createRESTModule(searchOrders3);
3918
3760
  var createOrder4 = /* @__PURE__ */ createRESTModule(createOrder3);
3919
3761
  var updateOrder4 = /* @__PURE__ */ createRESTModule(updateOrder3);
3920
3762
  var bulkUpdateOrders4 = /* @__PURE__ */ createRESTModule(bulkUpdateOrders3);
3921
- var commitDeltas4 = /* @__PURE__ */ createRESTModule(commitDeltas3);
3922
3763
  var updateOrderLineItem4 = /* @__PURE__ */ createRESTModule(updateOrderLineItem3);
3923
3764
  var addActivity4 = /* @__PURE__ */ createRESTModule(addActivity3);
3924
3765
  var addActivities4 = /* @__PURE__ */ createRESTModule(addActivities3);
@@ -3995,7 +3836,6 @@ export {
3995
3836
  cancelOrder4 as cancelOrder,
3996
3837
  captureAuthorizedPayments4 as captureAuthorizedPayments,
3997
3838
  chargeMemberships4 as chargeMemberships,
3998
- commitDeltas4 as commitDeltas,
3999
3839
  createOrder4 as createOrder,
4000
3840
  deleteActivity4 as deleteActivity,
4001
3841
  getOrder4 as getOrder,