@wix/auto_sdk_ecom_cart 1.0.180 → 1.0.182

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.
@@ -14,6 +14,131 @@ import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transform
14
14
  import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
15
15
  import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
16
16
  import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
17
+ var TRANSFORM_PATHS_0 = [
18
+ { path: "cartInfo.createdDate" },
19
+ { path: "cartInfo.updatedDate" },
20
+ { path: "cartInfo.lineItems.image.urlExpirationDate" },
21
+ {
22
+ path: "cartInfo.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
23
+ },
24
+ { path: "cartInfo.lineItems.serviceProperties.scheduledDate" },
25
+ { path: "cartInfo.lineItems.serviceProperties.endDate" },
26
+ { path: "lineItems.image.urlExpirationDate" },
27
+ { path: "lineItems.subscriptionOptionInfo.subscriptionSettings.startDate" },
28
+ { path: "lineItems.serviceProperties.scheduledDate" },
29
+ { path: "lineItems.serviceProperties.endDate" },
30
+ {
31
+ path: "customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
32
+ },
33
+ { path: "customLineItems.serviceProperties.scheduledDate" },
34
+ { path: "customLineItems.serviceProperties.endDate" }
35
+ ];
36
+ var TRANSFORM_PATHS_1 = [
37
+ { path: "cartInfo.lineItems.image.focalPoint.x" },
38
+ { path: "cartInfo.lineItems.image.focalPoint.y" },
39
+ { path: "lineItems.image.focalPoint.x" },
40
+ { path: "lineItems.image.focalPoint.y" },
41
+ { path: "cartInfo.lineItems.physicalProperties.weight" },
42
+ {
43
+ path: "cartInfo.lineItems.catalogOverrideFields.physicalProperties.weight"
44
+ },
45
+ { path: "cartInfo.contactInfo.address.geocode.latitude" },
46
+ { path: "cartInfo.contactInfo.address.geocode.longitude" },
47
+ { path: "lineItems.physicalProperties.weight" },
48
+ { path: "lineItems.catalogOverrideFields.physicalProperties.weight" },
49
+ { path: "customLineItems.physicalProperties.weight" }
50
+ ];
51
+ var TRANSFORM_PATHS_2 = [
52
+ { path: "cart.createdDate" },
53
+ { path: "cart.updatedDate" },
54
+ { path: "cart.lineItems.image.urlExpirationDate" },
55
+ {
56
+ path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
57
+ },
58
+ { path: "cart.lineItems.serviceProperties.scheduledDate" },
59
+ { path: "cart.lineItems.serviceProperties.endDate" }
60
+ ];
61
+ var TRANSFORM_PATHS_3 = [
62
+ { path: "cart.lineItems.image.focalPoint.x" },
63
+ { path: "cart.lineItems.image.focalPoint.y" },
64
+ { path: "cart.lineItems.physicalProperties.weight" },
65
+ { path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight" },
66
+ { path: "cart.contactInfo.address.geocode.latitude" },
67
+ { path: "cart.contactInfo.address.geocode.longitude" }
68
+ ];
69
+ var TRANSFORM_PATHS_4 = [{ path: "cartFieldmask" }];
70
+ var TRANSFORM_PATHS_5 = [
71
+ { path: "lineItems.image.urlExpirationDate" },
72
+ { path: "lineItems.subscriptionOptionInfo.subscriptionSettings.startDate" },
73
+ { path: "lineItems.serviceProperties.scheduledDate" },
74
+ { path: "lineItems.serviceProperties.endDate" },
75
+ {
76
+ path: "customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
77
+ },
78
+ { path: "customLineItems.serviceProperties.scheduledDate" },
79
+ { path: "customLineItems.serviceProperties.endDate" }
80
+ ];
81
+ var TRANSFORM_PATHS_6 = [
82
+ { path: "lineItems.image.focalPoint.x" },
83
+ { path: "lineItems.image.focalPoint.y" },
84
+ { path: "lineItems.physicalProperties.weight" },
85
+ { path: "lineItems.catalogOverrideFields.physicalProperties.weight" },
86
+ { path: "customLineItems.physicalProperties.weight" }
87
+ ];
88
+ var TRANSFORM_PATHS_7 = [
89
+ { path: "shippingAddress.geocode.latitude" },
90
+ { path: "shippingAddress.geocode.longitude" },
91
+ { path: "billingAddress.geocode.latitude" },
92
+ { path: "billingAddress.geocode.longitude" }
93
+ ];
94
+ var TRANSFORM_PATHS_8 = [
95
+ { path: "cart.createdDate" },
96
+ { path: "cart.updatedDate" },
97
+ { path: "cart.lineItems.image.urlExpirationDate" },
98
+ {
99
+ path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
100
+ },
101
+ { path: "cart.lineItems.serviceProperties.scheduledDate" },
102
+ { path: "cart.lineItems.serviceProperties.endDate" },
103
+ {
104
+ path: "shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from"
105
+ },
106
+ {
107
+ path: "shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to"
108
+ },
109
+ {
110
+ path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from"
111
+ },
112
+ {
113
+ path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to"
114
+ },
115
+ { path: "membershipOptions.eligibleMemberships.expirationDate" },
116
+ { path: "membershipOptions.invalidMemberships.membership.expirationDate" },
117
+ {
118
+ path: "membershipOptions.validatedExistingMemberships.memberships.membership.expirationDate"
119
+ }
120
+ ];
121
+ var TRANSFORM_PATHS_9 = [
122
+ { path: "cart.lineItems.image.focalPoint.x" },
123
+ { path: "cart.lineItems.image.focalPoint.y" },
124
+ { path: "cart.lineItems.physicalProperties.weight" },
125
+ { path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight" },
126
+ { path: "cart.contactInfo.address.geocode.latitude" },
127
+ { path: "cart.contactInfo.address.geocode.longitude" },
128
+ {
129
+ path: "shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude"
130
+ },
131
+ {
132
+ path: "shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude"
133
+ },
134
+ {
135
+ path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude"
136
+ },
137
+ {
138
+ path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude"
139
+ },
140
+ { path: "appliedDiscounts.merchantDiscount.percentage" }
141
+ ];
17
142
  function resolveComWixEcomCartApiV1CartServiceUrl(opts) {
18
143
  const domainToMappings = {
19
144
  "www.wixapis.com": [
@@ -129,45 +254,11 @@ function createCart(payload) {
129
254
  const serializedData = transformPaths(payload, [
130
255
  {
131
256
  transformFn: transformSDKTimestampToRESTTimestamp,
132
- paths: [
133
- { path: "cartInfo.createdDate" },
134
- { path: "cartInfo.updatedDate" },
135
- { path: "cartInfo.lineItems.image.urlExpirationDate" },
136
- {
137
- path: "cartInfo.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
138
- },
139
- { path: "cartInfo.lineItems.serviceProperties.scheduledDate" },
140
- { path: "cartInfo.lineItems.serviceProperties.endDate" },
141
- { path: "lineItems.image.urlExpirationDate" },
142
- {
143
- path: "lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
144
- },
145
- { path: "lineItems.serviceProperties.scheduledDate" },
146
- { path: "lineItems.serviceProperties.endDate" },
147
- {
148
- path: "customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
149
- },
150
- { path: "customLineItems.serviceProperties.scheduledDate" },
151
- { path: "customLineItems.serviceProperties.endDate" }
152
- ]
257
+ paths: TRANSFORM_PATHS_0
153
258
  },
154
259
  {
155
260
  transformFn: transformSDKFloatToRESTFloat,
156
- paths: [
157
- { path: "cartInfo.lineItems.image.focalPoint.x" },
158
- { path: "cartInfo.lineItems.image.focalPoint.y" },
159
- { path: "lineItems.image.focalPoint.x" },
160
- { path: "lineItems.image.focalPoint.y" },
161
- { path: "cartInfo.lineItems.physicalProperties.weight" },
162
- {
163
- path: "cartInfo.lineItems.catalogOverrideFields.physicalProperties.weight"
164
- },
165
- { path: "cartInfo.contactInfo.address.geocode.latitude" },
166
- { path: "cartInfo.contactInfo.address.geocode.longitude" },
167
- { path: "lineItems.physicalProperties.weight" },
168
- { path: "lineItems.catalogOverrideFields.physicalProperties.weight" },
169
- { path: "customLineItems.physicalProperties.weight" }
170
- ]
261
+ paths: TRANSFORM_PATHS_1
171
262
  }
172
263
  ]);
173
264
  const metadata = {
@@ -187,29 +278,11 @@ function createCart(payload) {
187
278
  transformResponse: (payload2) => transformPaths(payload2, [
188
279
  {
189
280
  transformFn: transformRESTTimestampToSDKTimestamp,
190
- paths: [
191
- { path: "cart.createdDate" },
192
- { path: "cart.updatedDate" },
193
- { path: "cart.lineItems.image.urlExpirationDate" },
194
- {
195
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
196
- },
197
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
198
- { path: "cart.lineItems.serviceProperties.endDate" }
199
- ]
281
+ paths: TRANSFORM_PATHS_2
200
282
  },
201
283
  {
202
284
  transformFn: transformRESTFloatToSDKFloat,
203
- paths: [
204
- { path: "cart.lineItems.image.focalPoint.x" },
205
- { path: "cart.lineItems.image.focalPoint.y" },
206
- { path: "cart.lineItems.physicalProperties.weight" },
207
- {
208
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
209
- },
210
- { path: "cart.contactInfo.address.geocode.latitude" },
211
- { path: "cart.contactInfo.address.geocode.longitude" }
212
- ]
285
+ paths: TRANSFORM_PATHS_3
213
286
  }
214
287
  ])
215
288
  };
@@ -222,49 +295,15 @@ function updateCart(payload) {
222
295
  const serializedData = transformPaths(payload, [
223
296
  {
224
297
  transformFn: transformSDKFieldMaskToRESTFieldMask,
225
- paths: [{ path: "cartFieldmask" }]
298
+ paths: TRANSFORM_PATHS_4
226
299
  },
227
300
  {
228
301
  transformFn: transformSDKTimestampToRESTTimestamp,
229
- paths: [
230
- { path: "cartInfo.createdDate" },
231
- { path: "cartInfo.updatedDate" },
232
- { path: "cartInfo.lineItems.image.urlExpirationDate" },
233
- {
234
- path: "cartInfo.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
235
- },
236
- { path: "cartInfo.lineItems.serviceProperties.scheduledDate" },
237
- { path: "cartInfo.lineItems.serviceProperties.endDate" },
238
- { path: "lineItems.image.urlExpirationDate" },
239
- {
240
- path: "lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
241
- },
242
- { path: "lineItems.serviceProperties.scheduledDate" },
243
- { path: "lineItems.serviceProperties.endDate" },
244
- {
245
- path: "customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
246
- },
247
- { path: "customLineItems.serviceProperties.scheduledDate" },
248
- { path: "customLineItems.serviceProperties.endDate" }
249
- ]
302
+ paths: TRANSFORM_PATHS_0
250
303
  },
251
304
  {
252
305
  transformFn: transformSDKFloatToRESTFloat,
253
- paths: [
254
- { path: "cartInfo.lineItems.image.focalPoint.x" },
255
- { path: "cartInfo.lineItems.image.focalPoint.y" },
256
- { path: "lineItems.image.focalPoint.x" },
257
- { path: "lineItems.image.focalPoint.y" },
258
- { path: "cartInfo.lineItems.physicalProperties.weight" },
259
- {
260
- path: "cartInfo.lineItems.catalogOverrideFields.physicalProperties.weight"
261
- },
262
- { path: "cartInfo.contactInfo.address.geocode.latitude" },
263
- { path: "cartInfo.contactInfo.address.geocode.longitude" },
264
- { path: "lineItems.physicalProperties.weight" },
265
- { path: "lineItems.catalogOverrideFields.physicalProperties.weight" },
266
- { path: "customLineItems.physicalProperties.weight" }
267
- ]
306
+ paths: TRANSFORM_PATHS_1
268
307
  }
269
308
  ]);
270
309
  const metadata = {
@@ -284,29 +323,11 @@ function updateCart(payload) {
284
323
  transformResponse: (payload2) => transformPaths(payload2, [
285
324
  {
286
325
  transformFn: transformRESTTimestampToSDKTimestamp,
287
- paths: [
288
- { path: "cart.createdDate" },
289
- { path: "cart.updatedDate" },
290
- { path: "cart.lineItems.image.urlExpirationDate" },
291
- {
292
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
293
- },
294
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
295
- { path: "cart.lineItems.serviceProperties.endDate" }
296
- ]
326
+ paths: TRANSFORM_PATHS_2
297
327
  },
298
328
  {
299
329
  transformFn: transformRESTFloatToSDKFloat,
300
- paths: [
301
- { path: "cart.lineItems.image.focalPoint.x" },
302
- { path: "cart.lineItems.image.focalPoint.y" },
303
- { path: "cart.lineItems.physicalProperties.weight" },
304
- {
305
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
306
- },
307
- { path: "cart.contactInfo.address.geocode.latitude" },
308
- { path: "cart.contactInfo.address.geocode.longitude" }
309
- ]
330
+ paths: TRANSFORM_PATHS_3
310
331
  }
311
332
  ])
312
333
  };
@@ -333,29 +354,11 @@ function getCart(payload) {
333
354
  transformResponse: (payload2) => transformPaths(payload2, [
334
355
  {
335
356
  transformFn: transformRESTTimestampToSDKTimestamp,
336
- paths: [
337
- { path: "cart.createdDate" },
338
- { path: "cart.updatedDate" },
339
- { path: "cart.lineItems.image.urlExpirationDate" },
340
- {
341
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
342
- },
343
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
344
- { path: "cart.lineItems.serviceProperties.endDate" }
345
- ]
357
+ paths: TRANSFORM_PATHS_2
346
358
  },
347
359
  {
348
360
  transformFn: transformRESTFloatToSDKFloat,
349
- paths: [
350
- { path: "cart.lineItems.image.focalPoint.x" },
351
- { path: "cart.lineItems.image.focalPoint.y" },
352
- { path: "cart.lineItems.physicalProperties.weight" },
353
- {
354
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
355
- },
356
- { path: "cart.contactInfo.address.geocode.latitude" },
357
- { path: "cart.contactInfo.address.geocode.longitude" }
358
- ]
361
+ paths: TRANSFORM_PATHS_3
359
362
  }
360
363
  ])
361
364
  };
@@ -382,29 +385,11 @@ function getCartByCheckoutId(payload) {
382
385
  transformResponse: (payload2) => transformPaths(payload2, [
383
386
  {
384
387
  transformFn: transformRESTTimestampToSDKTimestamp,
385
- paths: [
386
- { path: "cart.createdDate" },
387
- { path: "cart.updatedDate" },
388
- { path: "cart.lineItems.image.urlExpirationDate" },
389
- {
390
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
391
- },
392
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
393
- { path: "cart.lineItems.serviceProperties.endDate" }
394
- ]
388
+ paths: TRANSFORM_PATHS_2
395
389
  },
396
390
  {
397
391
  transformFn: transformRESTFloatToSDKFloat,
398
- paths: [
399
- { path: "cart.lineItems.image.focalPoint.x" },
400
- { path: "cart.lineItems.image.focalPoint.y" },
401
- { path: "cart.lineItems.physicalProperties.weight" },
402
- {
403
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
404
- },
405
- { path: "cart.contactInfo.address.geocode.latitude" },
406
- { path: "cart.contactInfo.address.geocode.longitude" }
407
- ]
392
+ paths: TRANSFORM_PATHS_3
408
393
  }
409
394
  ])
410
395
  };
@@ -417,29 +402,11 @@ function addToCart(payload) {
417
402
  const serializedData = transformPaths(payload, [
418
403
  {
419
404
  transformFn: transformSDKTimestampToRESTTimestamp,
420
- paths: [
421
- { path: "lineItems.image.urlExpirationDate" },
422
- {
423
- path: "lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
424
- },
425
- { path: "lineItems.serviceProperties.scheduledDate" },
426
- { path: "lineItems.serviceProperties.endDate" },
427
- {
428
- path: "customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
429
- },
430
- { path: "customLineItems.serviceProperties.scheduledDate" },
431
- { path: "customLineItems.serviceProperties.endDate" }
432
- ]
405
+ paths: TRANSFORM_PATHS_5
433
406
  },
434
407
  {
435
408
  transformFn: transformSDKFloatToRESTFloat,
436
- paths: [
437
- { path: "lineItems.image.focalPoint.x" },
438
- { path: "lineItems.image.focalPoint.y" },
439
- { path: "lineItems.physicalProperties.weight" },
440
- { path: "lineItems.catalogOverrideFields.physicalProperties.weight" },
441
- { path: "customLineItems.physicalProperties.weight" }
442
- ]
409
+ paths: TRANSFORM_PATHS_6
443
410
  }
444
411
  ]);
445
412
  const metadata = {
@@ -459,29 +426,11 @@ function addToCart(payload) {
459
426
  transformResponse: (payload2) => transformPaths(payload2, [
460
427
  {
461
428
  transformFn: transformRESTTimestampToSDKTimestamp,
462
- paths: [
463
- { path: "cart.createdDate" },
464
- { path: "cart.updatedDate" },
465
- { path: "cart.lineItems.image.urlExpirationDate" },
466
- {
467
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
468
- },
469
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
470
- { path: "cart.lineItems.serviceProperties.endDate" }
471
- ]
429
+ paths: TRANSFORM_PATHS_2
472
430
  },
473
431
  {
474
432
  transformFn: transformRESTFloatToSDKFloat,
475
- paths: [
476
- { path: "cart.lineItems.image.focalPoint.x" },
477
- { path: "cart.lineItems.image.focalPoint.y" },
478
- { path: "cart.lineItems.physicalProperties.weight" },
479
- {
480
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
481
- },
482
- { path: "cart.contactInfo.address.geocode.latitude" },
483
- { path: "cart.contactInfo.address.geocode.longitude" }
484
- ]
433
+ paths: TRANSFORM_PATHS_3
485
434
  }
486
435
  ])
487
436
  };
@@ -508,29 +457,11 @@ function removeLineItems(payload) {
508
457
  transformResponse: (payload2) => transformPaths(payload2, [
509
458
  {
510
459
  transformFn: transformRESTTimestampToSDKTimestamp,
511
- paths: [
512
- { path: "cart.createdDate" },
513
- { path: "cart.updatedDate" },
514
- { path: "cart.lineItems.image.urlExpirationDate" },
515
- {
516
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
517
- },
518
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
519
- { path: "cart.lineItems.serviceProperties.endDate" }
520
- ]
460
+ paths: TRANSFORM_PATHS_2
521
461
  },
522
462
  {
523
463
  transformFn: transformRESTFloatToSDKFloat,
524
- paths: [
525
- { path: "cart.lineItems.image.focalPoint.x" },
526
- { path: "cart.lineItems.image.focalPoint.y" },
527
- { path: "cart.lineItems.physicalProperties.weight" },
528
- {
529
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
530
- },
531
- { path: "cart.contactInfo.address.geocode.latitude" },
532
- { path: "cart.contactInfo.address.geocode.longitude" }
533
- ]
464
+ paths: TRANSFORM_PATHS_3
534
465
  }
535
466
  ])
536
467
  };
@@ -543,12 +474,7 @@ function createCheckout(payload) {
543
474
  const serializedData = transformPaths(payload, [
544
475
  {
545
476
  transformFn: transformSDKFloatToRESTFloat,
546
- paths: [
547
- { path: "shippingAddress.geocode.latitude" },
548
- { path: "shippingAddress.geocode.longitude" },
549
- { path: "billingAddress.geocode.latitude" },
550
- { path: "billingAddress.geocode.longitude" }
551
- ]
477
+ paths: TRANSFORM_PATHS_7
552
478
  }
553
479
  ]);
554
480
  const metadata = {
@@ -589,29 +515,11 @@ function removeCoupon(payload) {
589
515
  transformResponse: (payload2) => transformPaths(payload2, [
590
516
  {
591
517
  transformFn: transformRESTTimestampToSDKTimestamp,
592
- paths: [
593
- { path: "cart.createdDate" },
594
- { path: "cart.updatedDate" },
595
- { path: "cart.lineItems.image.urlExpirationDate" },
596
- {
597
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
598
- },
599
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
600
- { path: "cart.lineItems.serviceProperties.endDate" }
601
- ]
518
+ paths: TRANSFORM_PATHS_2
602
519
  },
603
520
  {
604
521
  transformFn: transformRESTFloatToSDKFloat,
605
- paths: [
606
- { path: "cart.lineItems.image.focalPoint.x" },
607
- { path: "cart.lineItems.image.focalPoint.y" },
608
- { path: "cart.lineItems.physicalProperties.weight" },
609
- {
610
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
611
- },
612
- { path: "cart.contactInfo.address.geocode.latitude" },
613
- { path: "cart.contactInfo.address.geocode.longitude" }
614
- ]
522
+ paths: TRANSFORM_PATHS_3
615
523
  }
616
524
  ])
617
525
  };
@@ -638,29 +546,11 @@ function updateLineItemsQuantity(payload) {
638
546
  transformResponse: (payload2) => transformPaths(payload2, [
639
547
  {
640
548
  transformFn: transformRESTTimestampToSDKTimestamp,
641
- paths: [
642
- { path: "cart.createdDate" },
643
- { path: "cart.updatedDate" },
644
- { path: "cart.lineItems.image.urlExpirationDate" },
645
- {
646
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
647
- },
648
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
649
- { path: "cart.lineItems.serviceProperties.endDate" }
650
- ]
549
+ paths: TRANSFORM_PATHS_2
651
550
  },
652
551
  {
653
552
  transformFn: transformRESTFloatToSDKFloat,
654
- paths: [
655
- { path: "cart.lineItems.image.focalPoint.x" },
656
- { path: "cart.lineItems.image.focalPoint.y" },
657
- { path: "cart.lineItems.physicalProperties.weight" },
658
- {
659
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
660
- },
661
- { path: "cart.contactInfo.address.geocode.latitude" },
662
- { path: "cart.contactInfo.address.geocode.longitude" }
663
- ]
553
+ paths: TRANSFORM_PATHS_3
664
554
  }
665
555
  ])
666
556
  };
@@ -673,12 +563,7 @@ function estimateTotals(payload) {
673
563
  const serializedData = transformPaths(payload, [
674
564
  {
675
565
  transformFn: transformSDKFloatToRESTFloat,
676
- paths: [
677
- { path: "shippingAddress.geocode.latitude" },
678
- { path: "shippingAddress.geocode.longitude" },
679
- { path: "billingAddress.geocode.latitude" },
680
- { path: "billingAddress.geocode.longitude" }
681
- ]
566
+ paths: TRANSFORM_PATHS_7
682
567
  }
683
568
  ]);
684
569
  const metadata = {
@@ -698,61 +583,11 @@ function estimateTotals(payload) {
698
583
  transformResponse: (payload2) => transformPaths(payload2, [
699
584
  {
700
585
  transformFn: transformRESTTimestampToSDKTimestamp,
701
- paths: [
702
- { path: "cart.createdDate" },
703
- { path: "cart.updatedDate" },
704
- { path: "cart.lineItems.image.urlExpirationDate" },
705
- {
706
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
707
- },
708
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
709
- { path: "cart.lineItems.serviceProperties.endDate" },
710
- {
711
- path: "shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from"
712
- },
713
- {
714
- path: "shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to"
715
- },
716
- {
717
- path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from"
718
- },
719
- {
720
- path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to"
721
- },
722
- { path: "membershipOptions.eligibleMemberships.expirationDate" },
723
- {
724
- path: "membershipOptions.invalidMemberships.membership.expirationDate"
725
- },
726
- {
727
- path: "membershipOptions.validatedExistingMemberships.memberships.membership.expirationDate"
728
- }
729
- ]
586
+ paths: TRANSFORM_PATHS_8
730
587
  },
731
588
  {
732
589
  transformFn: transformRESTFloatToSDKFloat,
733
- paths: [
734
- { path: "cart.lineItems.image.focalPoint.x" },
735
- { path: "cart.lineItems.image.focalPoint.y" },
736
- { path: "cart.lineItems.physicalProperties.weight" },
737
- {
738
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
739
- },
740
- { path: "cart.contactInfo.address.geocode.latitude" },
741
- { path: "cart.contactInfo.address.geocode.longitude" },
742
- {
743
- path: "shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude"
744
- },
745
- {
746
- path: "shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude"
747
- },
748
- {
749
- path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude"
750
- },
751
- {
752
- path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude"
753
- },
754
- { path: "appliedDiscounts.merchantDiscount.percentage" }
755
- ]
590
+ paths: TRANSFORM_PATHS_9
756
591
  }
757
592
  ])
758
593
  };
@@ -800,29 +635,11 @@ function removeBusinessLocation(payload) {
800
635
  transformResponse: (payload2) => transformPaths(payload2, [
801
636
  {
802
637
  transformFn: transformRESTTimestampToSDKTimestamp,
803
- paths: [
804
- { path: "cart.createdDate" },
805
- { path: "cart.updatedDate" },
806
- { path: "cart.lineItems.image.urlExpirationDate" },
807
- {
808
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
809
- },
810
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
811
- { path: "cart.lineItems.serviceProperties.endDate" }
812
- ]
638
+ paths: TRANSFORM_PATHS_2
813
639
  },
814
640
  {
815
641
  transformFn: transformRESTFloatToSDKFloat,
816
- paths: [
817
- { path: "cart.lineItems.image.focalPoint.x" },
818
- { path: "cart.lineItems.image.focalPoint.y" },
819
- { path: "cart.lineItems.physicalProperties.weight" },
820
- {
821
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
822
- },
823
- { path: "cart.contactInfo.address.geocode.latitude" },
824
- { path: "cart.contactInfo.address.geocode.longitude" }
825
- ]
642
+ paths: TRANSFORM_PATHS_3
826
643
  }
827
644
  ])
828
645
  };
@@ -839,6 +656,47 @@ import { transformRESTImageToSDKImage } from "@wix/sdk-runtime/transformations/i
839
656
  import { transformSDKPageURLV2ToRESTPageURLV2 } from "@wix/sdk-runtime/transformations/page-url-v2";
840
657
  import { transformRESTPageURLV2ToSDKPageURLV2 } from "@wix/sdk-runtime/transformations/page-url-v2";
841
658
  import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
659
+ var TRANSFORM_PATHS_02 = [
660
+ { path: "cartInfo.lineItems.url" },
661
+ { path: "lineItems.url" },
662
+ { path: "customLineItems.url" }
663
+ ];
664
+ var TRANSFORM_PATHS_12 = [
665
+ { path: "cartInfo.lineItems.image" },
666
+ { path: "cartInfo.lineItems.catalogOverrideFields.image" },
667
+ { path: "lineItems.image" },
668
+ { path: "lineItems.catalogOverrideFields.image" },
669
+ { path: "customLineItems.media" }
670
+ ];
671
+ var TRANSFORM_PATHS_22 = [{ path: "cartInfo.contactInfo.address" }];
672
+ var TRANSFORM_PATHS_32 = [{ path: "cart.lineItems.url" }];
673
+ var TRANSFORM_PATHS_42 = [
674
+ { path: "cart.lineItems.image" },
675
+ { path: "cart.lineItems.catalogOverrideFields.image" }
676
+ ];
677
+ var TRANSFORM_PATHS_52 = [{ path: "cart.contactInfo.address" }];
678
+ var TRANSFORM_PATHS_62 = [
679
+ { path: "lineItems.url" },
680
+ { path: "customLineItems.url" }
681
+ ];
682
+ var TRANSFORM_PATHS_72 = [
683
+ { path: "lineItems.image" },
684
+ { path: "lineItems.catalogOverrideFields.image" },
685
+ { path: "customLineItems.media" }
686
+ ];
687
+ var TRANSFORM_PATHS_82 = [
688
+ { path: "shippingAddress" },
689
+ { path: "billingAddress" }
690
+ ];
691
+ var TRANSFORM_PATHS_92 = [
692
+ { path: "cart.contactInfo.address" },
693
+ {
694
+ path: "shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address"
695
+ },
696
+ {
697
+ path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address"
698
+ }
699
+ ];
842
700
  var DescriptionLineType = /* @__PURE__ */ ((DescriptionLineType2) => {
843
701
  DescriptionLineType2["UNRECOGNISED"] = "UNRECOGNISED";
844
702
  DescriptionLineType2["PLAIN_TEXT"] = "PLAIN_TEXT";
@@ -1082,25 +940,15 @@ async function createCart2(options) {
1082
940
  [
1083
941
  {
1084
942
  transformFn: transformSDKPageURLV2ToRESTPageURLV2,
1085
- paths: [
1086
- { path: "cartInfo.lineItems.url" },
1087
- { path: "lineItems.url" },
1088
- { path: "customLineItems.url" }
1089
- ]
943
+ paths: TRANSFORM_PATHS_02
1090
944
  },
1091
945
  {
1092
946
  transformFn: transformSDKImageToRESTImage,
1093
- paths: [
1094
- { path: "cartInfo.lineItems.image" },
1095
- { path: "cartInfo.lineItems.catalogOverrideFields.image" },
1096
- { path: "lineItems.image" },
1097
- { path: "lineItems.catalogOverrideFields.image" },
1098
- { path: "customLineItems.media" }
1099
- ]
947
+ paths: TRANSFORM_PATHS_12
1100
948
  },
1101
949
  {
1102
950
  transformFn: transformSDKAddressToRESTAddress,
1103
- paths: [{ path: "cartInfo.contactInfo.address" }]
951
+ paths: TRANSFORM_PATHS_22
1104
952
  }
1105
953
  ]
1106
954
  );
@@ -1113,18 +961,15 @@ async function createCart2(options) {
1113
961
  transformPaths2(result.data, [
1114
962
  {
1115
963
  transformFn: transformRESTPageURLV2ToSDKPageURLV2,
1116
- paths: [{ path: "cart.lineItems.url" }]
964
+ paths: TRANSFORM_PATHS_32
1117
965
  },
1118
966
  {
1119
967
  transformFn: transformRESTImageToSDKImage,
1120
- paths: [
1121
- { path: "cart.lineItems.image" },
1122
- { path: "cart.lineItems.catalogOverrideFields.image" }
1123
- ]
968
+ paths: TRANSFORM_PATHS_42
1124
969
  },
1125
970
  {
1126
971
  transformFn: transformRESTAddressToSDKAddress,
1127
- paths: [{ path: "cart.contactInfo.address" }]
972
+ paths: TRANSFORM_PATHS_52
1128
973
  }
1129
974
  ])
1130
975
  )?.cart;
@@ -1159,25 +1004,15 @@ async function updateCart2(_id, options) {
1159
1004
  [
1160
1005
  {
1161
1006
  transformFn: transformSDKPageURLV2ToRESTPageURLV2,
1162
- paths: [
1163
- { path: "cartInfo.lineItems.url" },
1164
- { path: "lineItems.url" },
1165
- { path: "customLineItems.url" }
1166
- ]
1007
+ paths: TRANSFORM_PATHS_02
1167
1008
  },
1168
1009
  {
1169
1010
  transformFn: transformSDKImageToRESTImage,
1170
- paths: [
1171
- { path: "cartInfo.lineItems.image" },
1172
- { path: "cartInfo.lineItems.catalogOverrideFields.image" },
1173
- { path: "lineItems.image" },
1174
- { path: "lineItems.catalogOverrideFields.image" },
1175
- { path: "customLineItems.media" }
1176
- ]
1011
+ paths: TRANSFORM_PATHS_12
1177
1012
  },
1178
1013
  {
1179
1014
  transformFn: transformSDKAddressToRESTAddress,
1180
- paths: [{ path: "cartInfo.contactInfo.address" }]
1015
+ paths: TRANSFORM_PATHS_22
1181
1016
  }
1182
1017
  ]
1183
1018
  );
@@ -1190,18 +1025,15 @@ async function updateCart2(_id, options) {
1190
1025
  transformPaths2(result.data, [
1191
1026
  {
1192
1027
  transformFn: transformRESTPageURLV2ToSDKPageURLV2,
1193
- paths: [{ path: "cart.lineItems.url" }]
1028
+ paths: TRANSFORM_PATHS_32
1194
1029
  },
1195
1030
  {
1196
1031
  transformFn: transformRESTImageToSDKImage,
1197
- paths: [
1198
- { path: "cart.lineItems.image" },
1199
- { path: "cart.lineItems.catalogOverrideFields.image" }
1200
- ]
1032
+ paths: TRANSFORM_PATHS_42
1201
1033
  },
1202
1034
  {
1203
1035
  transformFn: transformRESTAddressToSDKAddress,
1204
- paths: [{ path: "cart.contactInfo.address" }]
1036
+ paths: TRANSFORM_PATHS_52
1205
1037
  }
1206
1038
  ])
1207
1039
  )?.cart;
@@ -1236,18 +1068,15 @@ async function getCart2(_id) {
1236
1068
  transformPaths2(result.data, [
1237
1069
  {
1238
1070
  transformFn: transformRESTPageURLV2ToSDKPageURLV2,
1239
- paths: [{ path: "cart.lineItems.url" }]
1071
+ paths: TRANSFORM_PATHS_32
1240
1072
  },
1241
1073
  {
1242
1074
  transformFn: transformRESTImageToSDKImage,
1243
- paths: [
1244
- { path: "cart.lineItems.image" },
1245
- { path: "cart.lineItems.catalogOverrideFields.image" }
1246
- ]
1075
+ paths: TRANSFORM_PATHS_42
1247
1076
  },
1248
1077
  {
1249
1078
  transformFn: transformRESTAddressToSDKAddress,
1250
- paths: [{ path: "cart.contactInfo.address" }]
1079
+ paths: TRANSFORM_PATHS_52
1251
1080
  }
1252
1081
  ])
1253
1082
  )?.cart;
@@ -1277,18 +1106,15 @@ async function getCartByCheckoutId2(_id) {
1277
1106
  transformPaths2(result.data, [
1278
1107
  {
1279
1108
  transformFn: transformRESTPageURLV2ToSDKPageURLV2,
1280
- paths: [{ path: "cart.lineItems.url" }]
1109
+ paths: TRANSFORM_PATHS_32
1281
1110
  },
1282
1111
  {
1283
1112
  transformFn: transformRESTImageToSDKImage,
1284
- paths: [
1285
- { path: "cart.lineItems.image" },
1286
- { path: "cart.lineItems.catalogOverrideFields.image" }
1287
- ]
1113
+ paths: TRANSFORM_PATHS_42
1288
1114
  },
1289
1115
  {
1290
1116
  transformFn: transformRESTAddressToSDKAddress,
1291
- paths: [{ path: "cart.contactInfo.address" }]
1117
+ paths: TRANSFORM_PATHS_52
1292
1118
  }
1293
1119
  ])
1294
1120
  );
@@ -1318,15 +1144,11 @@ async function addToCart2(_id, options) {
1318
1144
  [
1319
1145
  {
1320
1146
  transformFn: transformSDKPageURLV2ToRESTPageURLV2,
1321
- paths: [{ path: "lineItems.url" }, { path: "customLineItems.url" }]
1147
+ paths: TRANSFORM_PATHS_62
1322
1148
  },
1323
1149
  {
1324
1150
  transformFn: transformSDKImageToRESTImage,
1325
- paths: [
1326
- { path: "lineItems.image" },
1327
- { path: "lineItems.catalogOverrideFields.image" },
1328
- { path: "customLineItems.media" }
1329
- ]
1151
+ paths: TRANSFORM_PATHS_72
1330
1152
  }
1331
1153
  ]
1332
1154
  );
@@ -1339,18 +1161,15 @@ async function addToCart2(_id, options) {
1339
1161
  transformPaths2(result.data, [
1340
1162
  {
1341
1163
  transformFn: transformRESTPageURLV2ToSDKPageURLV2,
1342
- paths: [{ path: "cart.lineItems.url" }]
1164
+ paths: TRANSFORM_PATHS_32
1343
1165
  },
1344
1166
  {
1345
1167
  transformFn: transformRESTImageToSDKImage,
1346
- paths: [
1347
- { path: "cart.lineItems.image" },
1348
- { path: "cart.lineItems.catalogOverrideFields.image" }
1349
- ]
1168
+ paths: TRANSFORM_PATHS_42
1350
1169
  },
1351
1170
  {
1352
1171
  transformFn: transformRESTAddressToSDKAddress,
1353
- paths: [{ path: "cart.contactInfo.address" }]
1172
+ paths: TRANSFORM_PATHS_52
1354
1173
  }
1355
1174
  ])
1356
1175
  );
@@ -1388,18 +1207,15 @@ async function removeLineItems2(_id, lineItemIds) {
1388
1207
  transformPaths2(result.data, [
1389
1208
  {
1390
1209
  transformFn: transformRESTPageURLV2ToSDKPageURLV2,
1391
- paths: [{ path: "cart.lineItems.url" }]
1210
+ paths: TRANSFORM_PATHS_32
1392
1211
  },
1393
1212
  {
1394
1213
  transformFn: transformRESTImageToSDKImage,
1395
- paths: [
1396
- { path: "cart.lineItems.image" },
1397
- { path: "cart.lineItems.catalogOverrideFields.image" }
1398
- ]
1214
+ paths: TRANSFORM_PATHS_42
1399
1215
  },
1400
1216
  {
1401
1217
  transformFn: transformRESTAddressToSDKAddress,
1402
- paths: [{ path: "cart.contactInfo.address" }]
1218
+ paths: TRANSFORM_PATHS_52
1403
1219
  }
1404
1220
  ])
1405
1221
  );
@@ -1431,7 +1247,7 @@ async function createCheckout2(_id, options) {
1431
1247
  [
1432
1248
  {
1433
1249
  transformFn: transformSDKAddressToRESTAddress,
1434
- paths: [{ path: "shippingAddress" }, { path: "billingAddress" }]
1250
+ paths: TRANSFORM_PATHS_82
1435
1251
  }
1436
1252
  ]
1437
1253
  );
@@ -1474,18 +1290,15 @@ async function removeCoupon2(_id) {
1474
1290
  transformPaths2(result.data, [
1475
1291
  {
1476
1292
  transformFn: transformRESTPageURLV2ToSDKPageURLV2,
1477
- paths: [{ path: "cart.lineItems.url" }]
1293
+ paths: TRANSFORM_PATHS_32
1478
1294
  },
1479
1295
  {
1480
1296
  transformFn: transformRESTImageToSDKImage,
1481
- paths: [
1482
- { path: "cart.lineItems.image" },
1483
- { path: "cart.lineItems.catalogOverrideFields.image" }
1484
- ]
1297
+ paths: TRANSFORM_PATHS_42
1485
1298
  },
1486
1299
  {
1487
1300
  transformFn: transformRESTAddressToSDKAddress,
1488
- paths: [{ path: "cart.contactInfo.address" }]
1301
+ paths: TRANSFORM_PATHS_52
1489
1302
  }
1490
1303
  ])
1491
1304
  );
@@ -1518,18 +1331,15 @@ async function updateLineItemsQuantity2(_id, lineItems) {
1518
1331
  transformPaths2(result.data, [
1519
1332
  {
1520
1333
  transformFn: transformRESTPageURLV2ToSDKPageURLV2,
1521
- paths: [{ path: "cart.lineItems.url" }]
1334
+ paths: TRANSFORM_PATHS_32
1522
1335
  },
1523
1336
  {
1524
1337
  transformFn: transformRESTImageToSDKImage,
1525
- paths: [
1526
- { path: "cart.lineItems.image" },
1527
- { path: "cart.lineItems.catalogOverrideFields.image" }
1528
- ]
1338
+ paths: TRANSFORM_PATHS_42
1529
1339
  },
1530
1340
  {
1531
1341
  transformFn: transformRESTAddressToSDKAddress,
1532
- paths: [{ path: "cart.contactInfo.address" }]
1342
+ paths: TRANSFORM_PATHS_52
1533
1343
  }
1534
1344
  ])
1535
1345
  );
@@ -1563,7 +1373,7 @@ async function estimateTotals2(_id, options) {
1563
1373
  [
1564
1374
  {
1565
1375
  transformFn: transformSDKAddressToRESTAddress,
1566
- paths: [{ path: "shippingAddress" }, { path: "billingAddress" }]
1376
+ paths: TRANSFORM_PATHS_82
1567
1377
  }
1568
1378
  ]
1569
1379
  );
@@ -1576,26 +1386,15 @@ async function estimateTotals2(_id, options) {
1576
1386
  transformPaths2(result.data, [
1577
1387
  {
1578
1388
  transformFn: transformRESTPageURLV2ToSDKPageURLV2,
1579
- paths: [{ path: "cart.lineItems.url" }]
1389
+ paths: TRANSFORM_PATHS_32
1580
1390
  },
1581
1391
  {
1582
1392
  transformFn: transformRESTImageToSDKImage,
1583
- paths: [
1584
- { path: "cart.lineItems.image" },
1585
- { path: "cart.lineItems.catalogOverrideFields.image" }
1586
- ]
1393
+ paths: TRANSFORM_PATHS_42
1587
1394
  },
1588
1395
  {
1589
1396
  transformFn: transformRESTAddressToSDKAddress,
1590
- paths: [
1591
- { path: "cart.contactInfo.address" },
1592
- {
1593
- path: "shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address"
1594
- },
1595
- {
1596
- path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address"
1597
- }
1598
- ]
1397
+ paths: TRANSFORM_PATHS_92
1599
1398
  }
1600
1399
  ])
1601
1400
  );
@@ -1656,18 +1455,15 @@ async function removeBusinessLocation2(_id) {
1656
1455
  transformPaths2(result.data, [
1657
1456
  {
1658
1457
  transformFn: transformRESTPageURLV2ToSDKPageURLV2,
1659
- paths: [{ path: "cart.lineItems.url" }]
1458
+ paths: TRANSFORM_PATHS_32
1660
1459
  },
1661
1460
  {
1662
1461
  transformFn: transformRESTImageToSDKImage,
1663
- paths: [
1664
- { path: "cart.lineItems.image" },
1665
- { path: "cart.lineItems.catalogOverrideFields.image" }
1666
- ]
1462
+ paths: TRANSFORM_PATHS_42
1667
1463
  },
1668
1464
  {
1669
1465
  transformFn: transformRESTAddressToSDKAddress,
1670
- paths: [{ path: "cart.contactInfo.address" }]
1466
+ paths: TRANSFORM_PATHS_52
1671
1467
  }
1672
1468
  ])
1673
1469
  );