@wix/auto_sdk_ecom_current-cart 1.0.190 → 1.0.192
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 +311 -399
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +127 -56
- package/build/cjs/index.typings.js +215 -312
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +127 -56
- package/build/cjs/meta.js +146 -241
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs +311 -399
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +127 -56
- package/build/es/index.typings.mjs +215 -312
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +127 -56
- package/build/es/meta.mjs +146 -241
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +135 -60
- package/build/internal/cjs/meta.d.ts +135 -60
- package/build/internal/es/index.typings.d.mts +135 -60
- package/build/internal/es/meta.d.mts +135 -60
- package/package.json +2 -2
package/build/es/meta.mjs
CHANGED
|
@@ -7,6 +7,131 @@ import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transform
|
|
|
7
7
|
import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
|
|
8
8
|
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
9
9
|
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
10
|
+
var TRANSFORM_PATHS_0 = [
|
|
11
|
+
{ path: "cart.createdDate" },
|
|
12
|
+
{ path: "cart.updatedDate" },
|
|
13
|
+
{ path: "cart.lineItems.image.urlExpirationDate" },
|
|
14
|
+
{
|
|
15
|
+
path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
|
|
16
|
+
},
|
|
17
|
+
{ path: "cart.lineItems.serviceProperties.scheduledDate" },
|
|
18
|
+
{ path: "cart.lineItems.serviceProperties.endDate" }
|
|
19
|
+
];
|
|
20
|
+
var TRANSFORM_PATHS_1 = [
|
|
21
|
+
{ path: "cart.lineItems.image.focalPoint.x" },
|
|
22
|
+
{ path: "cart.lineItems.image.focalPoint.y" },
|
|
23
|
+
{ path: "cart.lineItems.physicalProperties.weight" },
|
|
24
|
+
{ path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight" },
|
|
25
|
+
{ path: "cart.contactInfo.address.geocode.latitude" },
|
|
26
|
+
{ path: "cart.contactInfo.address.geocode.longitude" }
|
|
27
|
+
];
|
|
28
|
+
var TRANSFORM_PATHS_2 = [{ path: "cartFieldmask" }];
|
|
29
|
+
var TRANSFORM_PATHS_3 = [
|
|
30
|
+
{ path: "cartInfo.createdDate" },
|
|
31
|
+
{ path: "cartInfo.updatedDate" },
|
|
32
|
+
{ path: "cartInfo.lineItems.image.urlExpirationDate" },
|
|
33
|
+
{
|
|
34
|
+
path: "cartInfo.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
|
|
35
|
+
},
|
|
36
|
+
{ path: "cartInfo.lineItems.serviceProperties.scheduledDate" },
|
|
37
|
+
{ path: "cartInfo.lineItems.serviceProperties.endDate" },
|
|
38
|
+
{ path: "lineItems.image.urlExpirationDate" },
|
|
39
|
+
{ path: "lineItems.subscriptionOptionInfo.subscriptionSettings.startDate" },
|
|
40
|
+
{ path: "lineItems.serviceProperties.scheduledDate" },
|
|
41
|
+
{ path: "lineItems.serviceProperties.endDate" },
|
|
42
|
+
{
|
|
43
|
+
path: "customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
|
|
44
|
+
},
|
|
45
|
+
{ path: "customLineItems.serviceProperties.scheduledDate" },
|
|
46
|
+
{ path: "customLineItems.serviceProperties.endDate" }
|
|
47
|
+
];
|
|
48
|
+
var TRANSFORM_PATHS_4 = [
|
|
49
|
+
{ path: "cartInfo.lineItems.image.focalPoint.x" },
|
|
50
|
+
{ path: "cartInfo.lineItems.image.focalPoint.y" },
|
|
51
|
+
{ path: "lineItems.image.focalPoint.x" },
|
|
52
|
+
{ path: "lineItems.image.focalPoint.y" },
|
|
53
|
+
{ path: "cartInfo.lineItems.physicalProperties.weight" },
|
|
54
|
+
{
|
|
55
|
+
path: "cartInfo.lineItems.catalogOverrideFields.physicalProperties.weight"
|
|
56
|
+
},
|
|
57
|
+
{ path: "cartInfo.contactInfo.address.geocode.latitude" },
|
|
58
|
+
{ path: "cartInfo.contactInfo.address.geocode.longitude" },
|
|
59
|
+
{ path: "lineItems.physicalProperties.weight" },
|
|
60
|
+
{ path: "lineItems.catalogOverrideFields.physicalProperties.weight" },
|
|
61
|
+
{ path: "customLineItems.physicalProperties.weight" }
|
|
62
|
+
];
|
|
63
|
+
var TRANSFORM_PATHS_5 = [
|
|
64
|
+
{ path: "lineItems.image.urlExpirationDate" },
|
|
65
|
+
{ path: "lineItems.subscriptionOptionInfo.subscriptionSettings.startDate" },
|
|
66
|
+
{ path: "lineItems.serviceProperties.scheduledDate" },
|
|
67
|
+
{ path: "lineItems.serviceProperties.endDate" },
|
|
68
|
+
{
|
|
69
|
+
path: "customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
|
|
70
|
+
},
|
|
71
|
+
{ path: "customLineItems.serviceProperties.scheduledDate" },
|
|
72
|
+
{ path: "customLineItems.serviceProperties.endDate" }
|
|
73
|
+
];
|
|
74
|
+
var TRANSFORM_PATHS_6 = [
|
|
75
|
+
{ path: "lineItems.image.focalPoint.x" },
|
|
76
|
+
{ path: "lineItems.image.focalPoint.y" },
|
|
77
|
+
{ path: "lineItems.physicalProperties.weight" },
|
|
78
|
+
{ path: "lineItems.catalogOverrideFields.physicalProperties.weight" },
|
|
79
|
+
{ path: "customLineItems.physicalProperties.weight" }
|
|
80
|
+
];
|
|
81
|
+
var TRANSFORM_PATHS_7 = [
|
|
82
|
+
{ path: "shippingAddress.geocode.latitude" },
|
|
83
|
+
{ path: "shippingAddress.geocode.longitude" },
|
|
84
|
+
{ path: "billingAddress.geocode.latitude" },
|
|
85
|
+
{ path: "billingAddress.geocode.longitude" }
|
|
86
|
+
];
|
|
87
|
+
var TRANSFORM_PATHS_8 = [
|
|
88
|
+
{ path: "cart.createdDate" },
|
|
89
|
+
{ path: "cart.updatedDate" },
|
|
90
|
+
{ path: "cart.lineItems.image.urlExpirationDate" },
|
|
91
|
+
{
|
|
92
|
+
path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
|
|
93
|
+
},
|
|
94
|
+
{ path: "cart.lineItems.serviceProperties.scheduledDate" },
|
|
95
|
+
{ path: "cart.lineItems.serviceProperties.endDate" },
|
|
96
|
+
{
|
|
97
|
+
path: "shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
path: "shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to"
|
|
107
|
+
},
|
|
108
|
+
{ path: "membershipOptions.eligibleMemberships.expirationDate" },
|
|
109
|
+
{ path: "membershipOptions.invalidMemberships.membership.expirationDate" },
|
|
110
|
+
{
|
|
111
|
+
path: "membershipOptions.validatedExistingMemberships.memberships.membership.expirationDate"
|
|
112
|
+
}
|
|
113
|
+
];
|
|
114
|
+
var TRANSFORM_PATHS_9 = [
|
|
115
|
+
{ path: "cart.lineItems.image.focalPoint.x" },
|
|
116
|
+
{ path: "cart.lineItems.image.focalPoint.y" },
|
|
117
|
+
{ path: "cart.lineItems.physicalProperties.weight" },
|
|
118
|
+
{ path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight" },
|
|
119
|
+
{ path: "cart.contactInfo.address.geocode.latitude" },
|
|
120
|
+
{ path: "cart.contactInfo.address.geocode.longitude" },
|
|
121
|
+
{
|
|
122
|
+
path: "shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
path: "shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude"
|
|
132
|
+
},
|
|
133
|
+
{ path: "appliedDiscounts.merchantDiscount.percentage" }
|
|
134
|
+
];
|
|
10
135
|
function resolveComWixEcomCartApiV1CurrentCartServiceUrl(opts) {
|
|
11
136
|
const domainToMappings = {
|
|
12
137
|
"www.wixapis.com": [
|
|
@@ -136,29 +261,11 @@ function currentCartGetCurrentCart(payload) {
|
|
|
136
261
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
137
262
|
{
|
|
138
263
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
139
|
-
paths:
|
|
140
|
-
{ path: "cart.createdDate" },
|
|
141
|
-
{ path: "cart.updatedDate" },
|
|
142
|
-
{ path: "cart.lineItems.image.urlExpirationDate" },
|
|
143
|
-
{
|
|
144
|
-
path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
|
|
145
|
-
},
|
|
146
|
-
{ path: "cart.lineItems.serviceProperties.scheduledDate" },
|
|
147
|
-
{ path: "cart.lineItems.serviceProperties.endDate" }
|
|
148
|
-
]
|
|
264
|
+
paths: TRANSFORM_PATHS_0
|
|
149
265
|
},
|
|
150
266
|
{
|
|
151
267
|
transformFn: transformRESTFloatToSDKFloat,
|
|
152
|
-
paths:
|
|
153
|
-
{ path: "cart.lineItems.image.focalPoint.x" },
|
|
154
|
-
{ path: "cart.lineItems.image.focalPoint.y" },
|
|
155
|
-
{ path: "cart.lineItems.physicalProperties.weight" },
|
|
156
|
-
{
|
|
157
|
-
path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
|
|
158
|
-
},
|
|
159
|
-
{ path: "cart.contactInfo.address.geocode.latitude" },
|
|
160
|
-
{ path: "cart.contactInfo.address.geocode.longitude" }
|
|
161
|
-
]
|
|
268
|
+
paths: TRANSFORM_PATHS_1
|
|
162
269
|
}
|
|
163
270
|
])
|
|
164
271
|
};
|
|
@@ -171,49 +278,15 @@ function updateCurrentCart(payload) {
|
|
|
171
278
|
const serializedData = transformPaths(payload, [
|
|
172
279
|
{
|
|
173
280
|
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
174
|
-
paths:
|
|
281
|
+
paths: TRANSFORM_PATHS_2
|
|
175
282
|
},
|
|
176
283
|
{
|
|
177
284
|
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
178
|
-
paths:
|
|
179
|
-
{ path: "cartInfo.createdDate" },
|
|
180
|
-
{ path: "cartInfo.updatedDate" },
|
|
181
|
-
{ path: "cartInfo.lineItems.image.urlExpirationDate" },
|
|
182
|
-
{
|
|
183
|
-
path: "cartInfo.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
|
|
184
|
-
},
|
|
185
|
-
{ path: "cartInfo.lineItems.serviceProperties.scheduledDate" },
|
|
186
|
-
{ path: "cartInfo.lineItems.serviceProperties.endDate" },
|
|
187
|
-
{ path: "lineItems.image.urlExpirationDate" },
|
|
188
|
-
{
|
|
189
|
-
path: "lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
|
|
190
|
-
},
|
|
191
|
-
{ path: "lineItems.serviceProperties.scheduledDate" },
|
|
192
|
-
{ path: "lineItems.serviceProperties.endDate" },
|
|
193
|
-
{
|
|
194
|
-
path: "customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
|
|
195
|
-
},
|
|
196
|
-
{ path: "customLineItems.serviceProperties.scheduledDate" },
|
|
197
|
-
{ path: "customLineItems.serviceProperties.endDate" }
|
|
198
|
-
]
|
|
285
|
+
paths: TRANSFORM_PATHS_3
|
|
199
286
|
},
|
|
200
287
|
{
|
|
201
288
|
transformFn: transformSDKFloatToRESTFloat,
|
|
202
|
-
paths:
|
|
203
|
-
{ path: "cartInfo.lineItems.image.focalPoint.x" },
|
|
204
|
-
{ path: "cartInfo.lineItems.image.focalPoint.y" },
|
|
205
|
-
{ path: "lineItems.image.focalPoint.x" },
|
|
206
|
-
{ path: "lineItems.image.focalPoint.y" },
|
|
207
|
-
{ path: "cartInfo.lineItems.physicalProperties.weight" },
|
|
208
|
-
{
|
|
209
|
-
path: "cartInfo.lineItems.catalogOverrideFields.physicalProperties.weight"
|
|
210
|
-
},
|
|
211
|
-
{ path: "cartInfo.contactInfo.address.geocode.latitude" },
|
|
212
|
-
{ path: "cartInfo.contactInfo.address.geocode.longitude" },
|
|
213
|
-
{ path: "lineItems.physicalProperties.weight" },
|
|
214
|
-
{ path: "lineItems.catalogOverrideFields.physicalProperties.weight" },
|
|
215
|
-
{ path: "customLineItems.physicalProperties.weight" }
|
|
216
|
-
]
|
|
289
|
+
paths: TRANSFORM_PATHS_4
|
|
217
290
|
}
|
|
218
291
|
]);
|
|
219
292
|
const metadata = {
|
|
@@ -233,29 +306,11 @@ function updateCurrentCart(payload) {
|
|
|
233
306
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
234
307
|
{
|
|
235
308
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
236
|
-
paths:
|
|
237
|
-
{ path: "cart.createdDate" },
|
|
238
|
-
{ path: "cart.updatedDate" },
|
|
239
|
-
{ path: "cart.lineItems.image.urlExpirationDate" },
|
|
240
|
-
{
|
|
241
|
-
path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
|
|
242
|
-
},
|
|
243
|
-
{ path: "cart.lineItems.serviceProperties.scheduledDate" },
|
|
244
|
-
{ path: "cart.lineItems.serviceProperties.endDate" }
|
|
245
|
-
]
|
|
309
|
+
paths: TRANSFORM_PATHS_0
|
|
246
310
|
},
|
|
247
311
|
{
|
|
248
312
|
transformFn: transformRESTFloatToSDKFloat,
|
|
249
|
-
paths:
|
|
250
|
-
{ path: "cart.lineItems.image.focalPoint.x" },
|
|
251
|
-
{ path: "cart.lineItems.image.focalPoint.y" },
|
|
252
|
-
{ path: "cart.lineItems.physicalProperties.weight" },
|
|
253
|
-
{
|
|
254
|
-
path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
|
|
255
|
-
},
|
|
256
|
-
{ path: "cart.contactInfo.address.geocode.latitude" },
|
|
257
|
-
{ path: "cart.contactInfo.address.geocode.longitude" }
|
|
258
|
-
]
|
|
313
|
+
paths: TRANSFORM_PATHS_1
|
|
259
314
|
}
|
|
260
315
|
])
|
|
261
316
|
};
|
|
@@ -268,29 +323,11 @@ function addToCurrentCart(payload) {
|
|
|
268
323
|
const serializedData = transformPaths(payload, [
|
|
269
324
|
{
|
|
270
325
|
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
271
|
-
paths:
|
|
272
|
-
{ path: "lineItems.image.urlExpirationDate" },
|
|
273
|
-
{
|
|
274
|
-
path: "lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
|
|
275
|
-
},
|
|
276
|
-
{ path: "lineItems.serviceProperties.scheduledDate" },
|
|
277
|
-
{ path: "lineItems.serviceProperties.endDate" },
|
|
278
|
-
{
|
|
279
|
-
path: "customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
|
|
280
|
-
},
|
|
281
|
-
{ path: "customLineItems.serviceProperties.scheduledDate" },
|
|
282
|
-
{ path: "customLineItems.serviceProperties.endDate" }
|
|
283
|
-
]
|
|
326
|
+
paths: TRANSFORM_PATHS_5
|
|
284
327
|
},
|
|
285
328
|
{
|
|
286
329
|
transformFn: transformSDKFloatToRESTFloat,
|
|
287
|
-
paths:
|
|
288
|
-
{ path: "lineItems.image.focalPoint.x" },
|
|
289
|
-
{ path: "lineItems.image.focalPoint.y" },
|
|
290
|
-
{ path: "lineItems.physicalProperties.weight" },
|
|
291
|
-
{ path: "lineItems.catalogOverrideFields.physicalProperties.weight" },
|
|
292
|
-
{ path: "customLineItems.physicalProperties.weight" }
|
|
293
|
-
]
|
|
330
|
+
paths: TRANSFORM_PATHS_6
|
|
294
331
|
}
|
|
295
332
|
]);
|
|
296
333
|
const metadata = {
|
|
@@ -310,29 +347,11 @@ function addToCurrentCart(payload) {
|
|
|
310
347
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
311
348
|
{
|
|
312
349
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
313
|
-
paths:
|
|
314
|
-
{ path: "cart.createdDate" },
|
|
315
|
-
{ path: "cart.updatedDate" },
|
|
316
|
-
{ path: "cart.lineItems.image.urlExpirationDate" },
|
|
317
|
-
{
|
|
318
|
-
path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
|
|
319
|
-
},
|
|
320
|
-
{ path: "cart.lineItems.serviceProperties.scheduledDate" },
|
|
321
|
-
{ path: "cart.lineItems.serviceProperties.endDate" }
|
|
322
|
-
]
|
|
350
|
+
paths: TRANSFORM_PATHS_0
|
|
323
351
|
},
|
|
324
352
|
{
|
|
325
353
|
transformFn: transformRESTFloatToSDKFloat,
|
|
326
|
-
paths:
|
|
327
|
-
{ path: "cart.lineItems.image.focalPoint.x" },
|
|
328
|
-
{ path: "cart.lineItems.image.focalPoint.y" },
|
|
329
|
-
{ path: "cart.lineItems.physicalProperties.weight" },
|
|
330
|
-
{
|
|
331
|
-
path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
|
|
332
|
-
},
|
|
333
|
-
{ path: "cart.contactInfo.address.geocode.latitude" },
|
|
334
|
-
{ path: "cart.contactInfo.address.geocode.longitude" }
|
|
335
|
-
]
|
|
354
|
+
paths: TRANSFORM_PATHS_1
|
|
336
355
|
}
|
|
337
356
|
])
|
|
338
357
|
};
|
|
@@ -359,29 +378,11 @@ function removeLineItemsFromCurrentCart(payload) {
|
|
|
359
378
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
360
379
|
{
|
|
361
380
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
362
|
-
paths:
|
|
363
|
-
{ path: "cart.createdDate" },
|
|
364
|
-
{ path: "cart.updatedDate" },
|
|
365
|
-
{ path: "cart.lineItems.image.urlExpirationDate" },
|
|
366
|
-
{
|
|
367
|
-
path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
|
|
368
|
-
},
|
|
369
|
-
{ path: "cart.lineItems.serviceProperties.scheduledDate" },
|
|
370
|
-
{ path: "cart.lineItems.serviceProperties.endDate" }
|
|
371
|
-
]
|
|
381
|
+
paths: TRANSFORM_PATHS_0
|
|
372
382
|
},
|
|
373
383
|
{
|
|
374
384
|
transformFn: transformRESTFloatToSDKFloat,
|
|
375
|
-
paths:
|
|
376
|
-
{ path: "cart.lineItems.image.focalPoint.x" },
|
|
377
|
-
{ path: "cart.lineItems.image.focalPoint.y" },
|
|
378
|
-
{ path: "cart.lineItems.physicalProperties.weight" },
|
|
379
|
-
{
|
|
380
|
-
path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
|
|
381
|
-
},
|
|
382
|
-
{ path: "cart.contactInfo.address.geocode.latitude" },
|
|
383
|
-
{ path: "cart.contactInfo.address.geocode.longitude" }
|
|
384
|
-
]
|
|
385
|
+
paths: TRANSFORM_PATHS_1
|
|
385
386
|
}
|
|
386
387
|
])
|
|
387
388
|
};
|
|
@@ -394,12 +395,7 @@ function createCheckoutFromCurrentCart(payload) {
|
|
|
394
395
|
const serializedData = transformPaths(payload, [
|
|
395
396
|
{
|
|
396
397
|
transformFn: transformSDKFloatToRESTFloat,
|
|
397
|
-
paths:
|
|
398
|
-
{ path: "shippingAddress.geocode.latitude" },
|
|
399
|
-
{ path: "shippingAddress.geocode.longitude" },
|
|
400
|
-
{ path: "billingAddress.geocode.latitude" },
|
|
401
|
-
{ path: "billingAddress.geocode.longitude" }
|
|
402
|
-
]
|
|
398
|
+
paths: TRANSFORM_PATHS_7
|
|
403
399
|
}
|
|
404
400
|
]);
|
|
405
401
|
const metadata = {
|
|
@@ -440,29 +436,11 @@ function removeCouponFromCurrentCart(payload) {
|
|
|
440
436
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
441
437
|
{
|
|
442
438
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
443
|
-
paths:
|
|
444
|
-
{ path: "cart.createdDate" },
|
|
445
|
-
{ path: "cart.updatedDate" },
|
|
446
|
-
{ path: "cart.lineItems.image.urlExpirationDate" },
|
|
447
|
-
{
|
|
448
|
-
path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
|
|
449
|
-
},
|
|
450
|
-
{ path: "cart.lineItems.serviceProperties.scheduledDate" },
|
|
451
|
-
{ path: "cart.lineItems.serviceProperties.endDate" }
|
|
452
|
-
]
|
|
439
|
+
paths: TRANSFORM_PATHS_0
|
|
453
440
|
},
|
|
454
441
|
{
|
|
455
442
|
transformFn: transformRESTFloatToSDKFloat,
|
|
456
|
-
paths:
|
|
457
|
-
{ path: "cart.lineItems.image.focalPoint.x" },
|
|
458
|
-
{ path: "cart.lineItems.image.focalPoint.y" },
|
|
459
|
-
{ path: "cart.lineItems.physicalProperties.weight" },
|
|
460
|
-
{
|
|
461
|
-
path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
|
|
462
|
-
},
|
|
463
|
-
{ path: "cart.contactInfo.address.geocode.latitude" },
|
|
464
|
-
{ path: "cart.contactInfo.address.geocode.longitude" }
|
|
465
|
-
]
|
|
443
|
+
paths: TRANSFORM_PATHS_1
|
|
466
444
|
}
|
|
467
445
|
])
|
|
468
446
|
};
|
|
@@ -489,29 +467,11 @@ function updateCurrentCartLineItemQuantity(payload) {
|
|
|
489
467
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
490
468
|
{
|
|
491
469
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
492
|
-
paths:
|
|
493
|
-
{ path: "cart.createdDate" },
|
|
494
|
-
{ path: "cart.updatedDate" },
|
|
495
|
-
{ path: "cart.lineItems.image.urlExpirationDate" },
|
|
496
|
-
{
|
|
497
|
-
path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
|
|
498
|
-
},
|
|
499
|
-
{ path: "cart.lineItems.serviceProperties.scheduledDate" },
|
|
500
|
-
{ path: "cart.lineItems.serviceProperties.endDate" }
|
|
501
|
-
]
|
|
470
|
+
paths: TRANSFORM_PATHS_0
|
|
502
471
|
},
|
|
503
472
|
{
|
|
504
473
|
transformFn: transformRESTFloatToSDKFloat,
|
|
505
|
-
paths:
|
|
506
|
-
{ path: "cart.lineItems.image.focalPoint.x" },
|
|
507
|
-
{ path: "cart.lineItems.image.focalPoint.y" },
|
|
508
|
-
{ path: "cart.lineItems.physicalProperties.weight" },
|
|
509
|
-
{
|
|
510
|
-
path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
|
|
511
|
-
},
|
|
512
|
-
{ path: "cart.contactInfo.address.geocode.latitude" },
|
|
513
|
-
{ path: "cart.contactInfo.address.geocode.longitude" }
|
|
514
|
-
]
|
|
474
|
+
paths: TRANSFORM_PATHS_1
|
|
515
475
|
}
|
|
516
476
|
])
|
|
517
477
|
};
|
|
@@ -524,12 +484,7 @@ function estimateCurrentCartTotals(payload) {
|
|
|
524
484
|
const serializedData = transformPaths(payload, [
|
|
525
485
|
{
|
|
526
486
|
transformFn: transformSDKFloatToRESTFloat,
|
|
527
|
-
paths:
|
|
528
|
-
{ path: "shippingAddress.geocode.latitude" },
|
|
529
|
-
{ path: "shippingAddress.geocode.longitude" },
|
|
530
|
-
{ path: "billingAddress.geocode.latitude" },
|
|
531
|
-
{ path: "billingAddress.geocode.longitude" }
|
|
532
|
-
]
|
|
487
|
+
paths: TRANSFORM_PATHS_7
|
|
533
488
|
}
|
|
534
489
|
]);
|
|
535
490
|
const metadata = {
|
|
@@ -549,61 +504,11 @@ function estimateCurrentCartTotals(payload) {
|
|
|
549
504
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
550
505
|
{
|
|
551
506
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
552
|
-
paths:
|
|
553
|
-
{ path: "cart.createdDate" },
|
|
554
|
-
{ path: "cart.updatedDate" },
|
|
555
|
-
{ path: "cart.lineItems.image.urlExpirationDate" },
|
|
556
|
-
{
|
|
557
|
-
path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
|
|
558
|
-
},
|
|
559
|
-
{ path: "cart.lineItems.serviceProperties.scheduledDate" },
|
|
560
|
-
{ path: "cart.lineItems.serviceProperties.endDate" },
|
|
561
|
-
{
|
|
562
|
-
path: "shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from"
|
|
563
|
-
},
|
|
564
|
-
{
|
|
565
|
-
path: "shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to"
|
|
566
|
-
},
|
|
567
|
-
{
|
|
568
|
-
path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from"
|
|
569
|
-
},
|
|
570
|
-
{
|
|
571
|
-
path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to"
|
|
572
|
-
},
|
|
573
|
-
{ path: "membershipOptions.eligibleMemberships.expirationDate" },
|
|
574
|
-
{
|
|
575
|
-
path: "membershipOptions.invalidMemberships.membership.expirationDate"
|
|
576
|
-
},
|
|
577
|
-
{
|
|
578
|
-
path: "membershipOptions.validatedExistingMemberships.memberships.membership.expirationDate"
|
|
579
|
-
}
|
|
580
|
-
]
|
|
507
|
+
paths: TRANSFORM_PATHS_8
|
|
581
508
|
},
|
|
582
509
|
{
|
|
583
510
|
transformFn: transformRESTFloatToSDKFloat,
|
|
584
|
-
paths:
|
|
585
|
-
{ path: "cart.lineItems.image.focalPoint.x" },
|
|
586
|
-
{ path: "cart.lineItems.image.focalPoint.y" },
|
|
587
|
-
{ path: "cart.lineItems.physicalProperties.weight" },
|
|
588
|
-
{
|
|
589
|
-
path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
|
|
590
|
-
},
|
|
591
|
-
{ path: "cart.contactInfo.address.geocode.latitude" },
|
|
592
|
-
{ path: "cart.contactInfo.address.geocode.longitude" },
|
|
593
|
-
{
|
|
594
|
-
path: "shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude"
|
|
595
|
-
},
|
|
596
|
-
{
|
|
597
|
-
path: "shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude"
|
|
598
|
-
},
|
|
599
|
-
{
|
|
600
|
-
path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude"
|
|
601
|
-
},
|
|
602
|
-
{
|
|
603
|
-
path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude"
|
|
604
|
-
},
|
|
605
|
-
{ path: "appliedDiscounts.merchantDiscount.percentage" }
|
|
606
|
-
]
|
|
511
|
+
paths: TRANSFORM_PATHS_9
|
|
607
512
|
}
|
|
608
513
|
])
|
|
609
514
|
};
|