@wix/auto_sdk_ecom_current-cart-v-2 1.0.0

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 (39) hide show
  1. package/build/cjs/index.d.ts +2823 -0
  2. package/build/cjs/index.js +1871 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +1764 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +2191 -0
  8. package/build/cjs/meta.js +1108 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/es/index.d.mts +2823 -0
  11. package/build/es/index.mjs +1812 -0
  12. package/build/es/index.mjs.map +1 -0
  13. package/build/es/index.typings.d.mts +1 -0
  14. package/build/es/index.typings.mjs +1705 -0
  15. package/build/es/index.typings.mjs.map +1 -0
  16. package/build/es/meta.d.mts +2191 -0
  17. package/build/es/meta.mjs +1069 -0
  18. package/build/es/meta.mjs.map +1 -0
  19. package/build/es/package.json +3 -0
  20. package/build/internal/cjs/index.d.ts +162 -0
  21. package/build/internal/cjs/index.js +1871 -0
  22. package/build/internal/cjs/index.js.map +1 -0
  23. package/build/internal/cjs/index.typings.d.ts +3008 -0
  24. package/build/internal/cjs/index.typings.js +1764 -0
  25. package/build/internal/cjs/index.typings.js.map +1 -0
  26. package/build/internal/cjs/meta.d.ts +2192 -0
  27. package/build/internal/cjs/meta.js +1108 -0
  28. package/build/internal/cjs/meta.js.map +1 -0
  29. package/build/internal/es/index.d.mts +162 -0
  30. package/build/internal/es/index.mjs +1812 -0
  31. package/build/internal/es/index.mjs.map +1 -0
  32. package/build/internal/es/index.typings.d.mts +3008 -0
  33. package/build/internal/es/index.typings.mjs +1705 -0
  34. package/build/internal/es/index.typings.mjs.map +1 -0
  35. package/build/internal/es/meta.d.mts +2192 -0
  36. package/build/internal/es/meta.mjs +1069 -0
  37. package/build/internal/es/meta.mjs.map +1 -0
  38. package/meta/package.json +3 -0
  39. package/package.json +54 -0
@@ -0,0 +1,1069 @@
1
+ // src/ecom-v2-cart-current-cart-v-2.http.ts
2
+ import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
3
+ import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
4
+ import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
5
+ import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
6
+ import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
7
+ import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
8
+ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
9
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
10
+ function resolveWixEcomCartV2CurrentCartServiceUrl(opts) {
11
+ const domainToMappings = {
12
+ "api._api_base_domain_": [
13
+ {
14
+ srcPath: "/cart-v2",
15
+ destPath: ""
16
+ }
17
+ ],
18
+ _: [
19
+ {
20
+ srcPath: "/_api/cart-v2",
21
+ destPath: ""
22
+ }
23
+ ],
24
+ "*.dev.wix-code.com": [
25
+ {
26
+ srcPath: "/_api/cart-v2",
27
+ destPath: ""
28
+ }
29
+ ],
30
+ "www._base_domain_": [
31
+ {
32
+ srcPath: "/_api/cart-v2",
33
+ destPath: ""
34
+ }
35
+ ],
36
+ "editor._base_domain_": [
37
+ {
38
+ srcPath: "/_api/cart-v2",
39
+ destPath: ""
40
+ }
41
+ ],
42
+ "blocks._base_domain_": [
43
+ {
44
+ srcPath: "/_api/cart-v2",
45
+ destPath: ""
46
+ }
47
+ ],
48
+ "create.editorx": [
49
+ {
50
+ srcPath: "/_api/cart-v2",
51
+ destPath: ""
52
+ }
53
+ ],
54
+ "apps._base_domain_": [
55
+ {
56
+ srcPath: "/_api/cart-v2",
57
+ destPath: ""
58
+ }
59
+ ],
60
+ "manage._base_domain_": [
61
+ {
62
+ srcPath: "/_api/cart-v2",
63
+ destPath: ""
64
+ }
65
+ ],
66
+ "bo._base_domain_": [
67
+ {
68
+ srcPath: "/_api/cart-v2",
69
+ destPath: ""
70
+ }
71
+ ],
72
+ "wixbo.ai": [
73
+ {
74
+ srcPath: "/_api/cart-v2",
75
+ destPath: ""
76
+ }
77
+ ],
78
+ "wix-bo.com": [
79
+ {
80
+ srcPath: "/_api/cart-v2",
81
+ destPath: ""
82
+ }
83
+ ],
84
+ "www.wixapis.com": [
85
+ {
86
+ srcPath: "/ecom/v2/carts",
87
+ destPath: "/v2/carts"
88
+ }
89
+ ],
90
+ "editor.wixapps.net": [
91
+ {
92
+ srcPath: "/_api/cart-v2",
93
+ destPath: ""
94
+ }
95
+ ]
96
+ };
97
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
98
+ }
99
+ var PACKAGE_NAME = "@wix/auto_sdk_ecom_current-cart-v-2";
100
+ function createCurrentCart(payload) {
101
+ function __createCurrentCart({ host }) {
102
+ const serializedData = transformPaths(payload, [
103
+ {
104
+ transformFn: transformSDKTimestampToRESTTimestamp,
105
+ paths: [
106
+ { path: "cart.createdDate" },
107
+ { path: "cart.updatedDate" },
108
+ {
109
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
110
+ },
111
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
112
+ {
113
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
114
+ },
115
+ { path: "cart.lineItems.attributes.serviceProperties.scheduledDate" },
116
+ {
117
+ path: "catalogItems.catalogOverrideFields.image.urlExpirationDate"
118
+ },
119
+ { path: "customItems.attributes.image.urlExpirationDate" },
120
+ {
121
+ path: "customItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
122
+ },
123
+ { path: "customItems.attributes.serviceProperties.scheduledDate" }
124
+ ]
125
+ },
126
+ {
127
+ transformFn: transformSDKFloatToRESTFloat,
128
+ paths: [
129
+ {
130
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
131
+ },
132
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
133
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
134
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
135
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
136
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" },
137
+ {
138
+ path: "catalogItems.catalogOverrideFields.physicalProperties.weight"
139
+ },
140
+ { path: "customItems.attributes.physicalProperties.weight" }
141
+ ]
142
+ }
143
+ ]);
144
+ const metadata = {
145
+ entityFqdn: "wix.ecom.v2.cart",
146
+ method: "POST",
147
+ methodFqn: "wix.ecom.cart.v2.CurrentCartService.CreateCurrentCart",
148
+ packageName: PACKAGE_NAME,
149
+ url: resolveWixEcomCartV2CurrentCartServiceUrl({
150
+ protoPath: "/v2/carts/current",
151
+ data: serializedData,
152
+ host
153
+ }),
154
+ data: serializedData,
155
+ transformResponse: (payload2) => transformPaths(payload2, [
156
+ {
157
+ transformFn: transformRESTTimestampToSDKTimestamp,
158
+ paths: [
159
+ { path: "cart.createdDate" },
160
+ { path: "cart.updatedDate" },
161
+ {
162
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
163
+ },
164
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
165
+ {
166
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
167
+ },
168
+ {
169
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
170
+ }
171
+ ]
172
+ },
173
+ {
174
+ transformFn: transformRESTFloatToSDKFloat,
175
+ paths: [
176
+ {
177
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
178
+ },
179
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
180
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
181
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
182
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
183
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
184
+ ]
185
+ }
186
+ ])
187
+ };
188
+ return metadata;
189
+ }
190
+ return __createCurrentCart;
191
+ }
192
+ function getCurrentCart(payload) {
193
+ function __getCurrentCart({ host }) {
194
+ const metadata = {
195
+ entityFqdn: "wix.ecom.v2.cart",
196
+ method: "GET",
197
+ methodFqn: "wix.ecom.cart.v2.CurrentCartService.GetCurrentCart",
198
+ packageName: PACKAGE_NAME,
199
+ url: resolveWixEcomCartV2CurrentCartServiceUrl({
200
+ protoPath: "/v2/carts/current",
201
+ data: payload,
202
+ host
203
+ }),
204
+ params: toURLSearchParams(payload),
205
+ transformResponse: (payload2) => transformPaths(payload2, [
206
+ {
207
+ transformFn: transformRESTTimestampToSDKTimestamp,
208
+ paths: [
209
+ { path: "cart.createdDate" },
210
+ { path: "cart.updatedDate" },
211
+ {
212
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
213
+ },
214
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
215
+ {
216
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
217
+ },
218
+ {
219
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
220
+ }
221
+ ]
222
+ },
223
+ {
224
+ transformFn: transformRESTFloatToSDKFloat,
225
+ paths: [
226
+ {
227
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
228
+ },
229
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
230
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
231
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
232
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
233
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
234
+ ]
235
+ }
236
+ ])
237
+ };
238
+ return metadata;
239
+ }
240
+ return __getCurrentCart;
241
+ }
242
+ function updateCurrentCart(payload) {
243
+ function __updateCurrentCart({ host }) {
244
+ const serializedData = transformPaths(payload, [
245
+ {
246
+ transformFn: transformSDKFieldMaskToRESTFieldMask,
247
+ paths: [{ path: "fieldMask" }]
248
+ },
249
+ {
250
+ transformFn: transformSDKTimestampToRESTTimestamp,
251
+ paths: [
252
+ { path: "cart.createdDate" },
253
+ { path: "cart.updatedDate" },
254
+ {
255
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
256
+ },
257
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
258
+ {
259
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
260
+ },
261
+ { path: "cart.lineItems.attributes.serviceProperties.scheduledDate" }
262
+ ]
263
+ },
264
+ {
265
+ transformFn: transformSDKFloatToRESTFloat,
266
+ paths: [
267
+ {
268
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
269
+ },
270
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
271
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
272
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
273
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
274
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
275
+ ]
276
+ }
277
+ ]);
278
+ const metadata = {
279
+ entityFqdn: "wix.ecom.v2.cart",
280
+ method: "PATCH",
281
+ methodFqn: "wix.ecom.cart.v2.CurrentCartService.UpdateCurrentCart",
282
+ packageName: PACKAGE_NAME,
283
+ url: resolveWixEcomCartV2CurrentCartServiceUrl({
284
+ protoPath: "/v2/carts/current",
285
+ data: serializedData,
286
+ host
287
+ }),
288
+ data: serializedData,
289
+ transformResponse: (payload2) => transformPaths(payload2, [
290
+ {
291
+ transformFn: transformRESTTimestampToSDKTimestamp,
292
+ paths: [
293
+ { path: "cart.createdDate" },
294
+ { path: "cart.updatedDate" },
295
+ {
296
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
297
+ },
298
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
299
+ {
300
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
301
+ },
302
+ {
303
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
304
+ }
305
+ ]
306
+ },
307
+ {
308
+ transformFn: transformRESTFloatToSDKFloat,
309
+ paths: [
310
+ {
311
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
312
+ },
313
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
314
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
315
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
316
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
317
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
318
+ ]
319
+ }
320
+ ])
321
+ };
322
+ return metadata;
323
+ }
324
+ return __updateCurrentCart;
325
+ }
326
+ function deleteCurrentCart(payload) {
327
+ function __deleteCurrentCart({ host }) {
328
+ const metadata = {
329
+ entityFqdn: "wix.ecom.v2.cart",
330
+ method: "DELETE",
331
+ methodFqn: "wix.ecom.cart.v2.CurrentCartService.DeleteCurrentCart",
332
+ packageName: PACKAGE_NAME,
333
+ url: resolveWixEcomCartV2CurrentCartServiceUrl({
334
+ protoPath: "/v2/carts/current",
335
+ data: payload,
336
+ host
337
+ }),
338
+ params: toURLSearchParams(payload)
339
+ };
340
+ return metadata;
341
+ }
342
+ return __deleteCurrentCart;
343
+ }
344
+ function refreshCurrentCart(payload) {
345
+ function __refreshCurrentCart({ host }) {
346
+ const metadata = {
347
+ entityFqdn: "wix.ecom.v2.cart",
348
+ method: "POST",
349
+ methodFqn: "wix.ecom.cart.v2.CurrentCartService.RefreshCurrentCart",
350
+ packageName: PACKAGE_NAME,
351
+ url: resolveWixEcomCartV2CurrentCartServiceUrl({
352
+ protoPath: "/v2/carts/current/refresh",
353
+ data: payload,
354
+ host
355
+ }),
356
+ data: payload,
357
+ transformResponse: (payload2) => transformPaths(payload2, [
358
+ {
359
+ transformFn: transformRESTTimestampToSDKTimestamp,
360
+ paths: [
361
+ { path: "cart.createdDate" },
362
+ { path: "cart.updatedDate" },
363
+ {
364
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
365
+ },
366
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
367
+ {
368
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
369
+ },
370
+ {
371
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
372
+ }
373
+ ]
374
+ },
375
+ {
376
+ transformFn: transformRESTFloatToSDKFloat,
377
+ paths: [
378
+ {
379
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
380
+ },
381
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
382
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
383
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
384
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
385
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
386
+ ]
387
+ }
388
+ ])
389
+ };
390
+ return metadata;
391
+ }
392
+ return __refreshCurrentCart;
393
+ }
394
+ function calculateCurrentCart(payload) {
395
+ function __calculateCurrentCart({ host }) {
396
+ const metadata = {
397
+ entityFqdn: "wix.ecom.v2.cart",
398
+ method: "POST",
399
+ methodFqn: "wix.ecom.cart.v2.CurrentCartService.CalculateCurrentCart",
400
+ packageName: PACKAGE_NAME,
401
+ url: resolveWixEcomCartV2CurrentCartServiceUrl({
402
+ protoPath: "/v2/carts/current/calculate",
403
+ data: payload,
404
+ host
405
+ }),
406
+ data: payload,
407
+ transformResponse: (payload2) => transformPaths(payload2, [
408
+ {
409
+ transformFn: transformRESTTimestampToSDKTimestamp,
410
+ paths: [
411
+ { path: "cart.createdDate" },
412
+ { path: "cart.updatedDate" },
413
+ {
414
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
415
+ },
416
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
417
+ {
418
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
419
+ },
420
+ {
421
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
422
+ }
423
+ ]
424
+ },
425
+ {
426
+ transformFn: transformRESTFloatToSDKFloat,
427
+ paths: [
428
+ {
429
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
430
+ },
431
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
432
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
433
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
434
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
435
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
436
+ ]
437
+ }
438
+ ])
439
+ };
440
+ return metadata;
441
+ }
442
+ return __calculateCurrentCart;
443
+ }
444
+ function addLineItemsToCurrentCart(payload) {
445
+ function __addLineItemsToCurrentCart({ host }) {
446
+ const serializedData = transformPaths(payload, [
447
+ {
448
+ transformFn: transformSDKFloatToRESTFloat,
449
+ paths: [
450
+ {
451
+ path: "catalogItems.catalogOverrideFields.physicalProperties.weight"
452
+ },
453
+ { path: "customItems.attributes.physicalProperties.weight" }
454
+ ]
455
+ },
456
+ {
457
+ transformFn: transformSDKTimestampToRESTTimestamp,
458
+ paths: [
459
+ {
460
+ path: "catalogItems.catalogOverrideFields.image.urlExpirationDate"
461
+ },
462
+ { path: "customItems.attributes.image.urlExpirationDate" },
463
+ {
464
+ path: "customItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
465
+ },
466
+ { path: "customItems.attributes.serviceProperties.scheduledDate" }
467
+ ]
468
+ }
469
+ ]);
470
+ const metadata = {
471
+ entityFqdn: "wix.ecom.v2.cart",
472
+ method: "POST",
473
+ methodFqn: "wix.ecom.cart.v2.CurrentCartService.AddLineItemsToCurrentCart",
474
+ packageName: PACKAGE_NAME,
475
+ url: resolveWixEcomCartV2CurrentCartServiceUrl({
476
+ protoPath: "/v2/carts/current/add-line-items",
477
+ data: serializedData,
478
+ host
479
+ }),
480
+ data: serializedData,
481
+ transformResponse: (payload2) => transformPaths(payload2, [
482
+ {
483
+ transformFn: transformRESTTimestampToSDKTimestamp,
484
+ paths: [
485
+ { path: "cart.createdDate" },
486
+ { path: "cart.updatedDate" },
487
+ {
488
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
489
+ },
490
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
491
+ {
492
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
493
+ },
494
+ {
495
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
496
+ }
497
+ ]
498
+ },
499
+ {
500
+ transformFn: transformRESTFloatToSDKFloat,
501
+ paths: [
502
+ {
503
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
504
+ },
505
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
506
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
507
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
508
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
509
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
510
+ ]
511
+ }
512
+ ])
513
+ };
514
+ return metadata;
515
+ }
516
+ return __addLineItemsToCurrentCart;
517
+ }
518
+ function removeLineItemsFromCurrentCart(payload) {
519
+ function __removeLineItemsFromCurrentCart({ host }) {
520
+ const metadata = {
521
+ entityFqdn: "wix.ecom.v2.cart",
522
+ method: "POST",
523
+ methodFqn: "wix.ecom.cart.v2.CurrentCartService.RemoveLineItemsFromCurrentCart",
524
+ packageName: PACKAGE_NAME,
525
+ url: resolveWixEcomCartV2CurrentCartServiceUrl({
526
+ protoPath: "/v2/carts/current/remove-line-items",
527
+ data: payload,
528
+ host
529
+ }),
530
+ data: payload,
531
+ transformResponse: (payload2) => transformPaths(payload2, [
532
+ {
533
+ transformFn: transformRESTTimestampToSDKTimestamp,
534
+ paths: [
535
+ { path: "cart.createdDate" },
536
+ { path: "cart.updatedDate" },
537
+ {
538
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
539
+ },
540
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
541
+ {
542
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
543
+ },
544
+ {
545
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
546
+ }
547
+ ]
548
+ },
549
+ {
550
+ transformFn: transformRESTFloatToSDKFloat,
551
+ paths: [
552
+ {
553
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
554
+ },
555
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
556
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
557
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
558
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
559
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
560
+ ]
561
+ }
562
+ ])
563
+ };
564
+ return metadata;
565
+ }
566
+ return __removeLineItemsFromCurrentCart;
567
+ }
568
+ function updateLineItemsInCurrentCart(payload) {
569
+ function __updateLineItemsInCurrentCart({ host }) {
570
+ const metadata = {
571
+ entityFqdn: "wix.ecom.v2.cart",
572
+ method: "POST",
573
+ methodFqn: "wix.ecom.cart.v2.CurrentCartService.UpdateLineItemsInCurrentCart",
574
+ packageName: PACKAGE_NAME,
575
+ url: resolveWixEcomCartV2CurrentCartServiceUrl({
576
+ protoPath: "/v2/carts/current/update-line-items",
577
+ data: payload,
578
+ host
579
+ }),
580
+ data: payload,
581
+ transformResponse: (payload2) => transformPaths(payload2, [
582
+ {
583
+ transformFn: transformRESTTimestampToSDKTimestamp,
584
+ paths: [
585
+ { path: "cart.createdDate" },
586
+ { path: "cart.updatedDate" },
587
+ {
588
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
589
+ },
590
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
591
+ {
592
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
593
+ },
594
+ {
595
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
596
+ }
597
+ ]
598
+ },
599
+ {
600
+ transformFn: transformRESTFloatToSDKFloat,
601
+ paths: [
602
+ {
603
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
604
+ },
605
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
606
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
607
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
608
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
609
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
610
+ ]
611
+ }
612
+ ])
613
+ };
614
+ return metadata;
615
+ }
616
+ return __updateLineItemsInCurrentCart;
617
+ }
618
+ function addDiscountToCurrentCart(payload) {
619
+ function __addDiscountToCurrentCart({ host }) {
620
+ const metadata = {
621
+ entityFqdn: "wix.ecom.v2.cart",
622
+ method: "POST",
623
+ methodFqn: "wix.ecom.cart.v2.CurrentCartService.AddDiscountToCurrentCart",
624
+ packageName: PACKAGE_NAME,
625
+ url: resolveWixEcomCartV2CurrentCartServiceUrl({
626
+ protoPath: "/v2/carts/current/add-discount",
627
+ data: payload,
628
+ host
629
+ }),
630
+ data: payload,
631
+ transformResponse: (payload2) => transformPaths(payload2, [
632
+ {
633
+ transformFn: transformRESTTimestampToSDKTimestamp,
634
+ paths: [
635
+ { path: "cart.createdDate" },
636
+ { path: "cart.updatedDate" },
637
+ {
638
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
639
+ },
640
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
641
+ {
642
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
643
+ },
644
+ {
645
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
646
+ }
647
+ ]
648
+ },
649
+ {
650
+ transformFn: transformRESTFloatToSDKFloat,
651
+ paths: [
652
+ {
653
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
654
+ },
655
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
656
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
657
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
658
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
659
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
660
+ ]
661
+ }
662
+ ])
663
+ };
664
+ return metadata;
665
+ }
666
+ return __addDiscountToCurrentCart;
667
+ }
668
+ function removeDiscountFromCurrentCart(payload) {
669
+ function __removeDiscountFromCurrentCart({ host }) {
670
+ const metadata = {
671
+ entityFqdn: "wix.ecom.v2.cart",
672
+ method: "POST",
673
+ methodFqn: "wix.ecom.cart.v2.CurrentCartService.RemoveDiscountFromCurrentCart",
674
+ packageName: PACKAGE_NAME,
675
+ url: resolveWixEcomCartV2CurrentCartServiceUrl({
676
+ protoPath: "/v2/carts/current/remove-discount",
677
+ data: payload,
678
+ host
679
+ }),
680
+ data: payload,
681
+ transformResponse: (payload2) => transformPaths(payload2, [
682
+ {
683
+ transformFn: transformRESTTimestampToSDKTimestamp,
684
+ paths: [
685
+ { path: "cart.createdDate" },
686
+ { path: "cart.updatedDate" },
687
+ {
688
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
689
+ },
690
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
691
+ {
692
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
693
+ },
694
+ {
695
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
696
+ }
697
+ ]
698
+ },
699
+ {
700
+ transformFn: transformRESTFloatToSDKFloat,
701
+ paths: [
702
+ {
703
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
704
+ },
705
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
706
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
707
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
708
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
709
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
710
+ ]
711
+ }
712
+ ])
713
+ };
714
+ return metadata;
715
+ }
716
+ return __removeDiscountFromCurrentCart;
717
+ }
718
+ function addGiftCardToCurrentCart(payload) {
719
+ function __addGiftCardToCurrentCart({ host }) {
720
+ const metadata = {
721
+ entityFqdn: "wix.ecom.v2.cart",
722
+ method: "POST",
723
+ methodFqn: "wix.ecom.cart.v2.CurrentCartService.AddGiftCardToCurrentCart",
724
+ packageName: PACKAGE_NAME,
725
+ url: resolveWixEcomCartV2CurrentCartServiceUrl({
726
+ protoPath: "/v2/carts/current/add-gift-card",
727
+ data: payload,
728
+ host
729
+ }),
730
+ data: payload,
731
+ transformResponse: (payload2) => transformPaths(payload2, [
732
+ {
733
+ transformFn: transformRESTTimestampToSDKTimestamp,
734
+ paths: [
735
+ { path: "cart.createdDate" },
736
+ { path: "cart.updatedDate" },
737
+ {
738
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
739
+ },
740
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
741
+ {
742
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
743
+ },
744
+ {
745
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
746
+ }
747
+ ]
748
+ },
749
+ {
750
+ transformFn: transformRESTFloatToSDKFloat,
751
+ paths: [
752
+ {
753
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
754
+ },
755
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
756
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
757
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
758
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
759
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
760
+ ]
761
+ }
762
+ ])
763
+ };
764
+ return metadata;
765
+ }
766
+ return __addGiftCardToCurrentCart;
767
+ }
768
+ function removeGiftCardFromCurrentCart(payload) {
769
+ function __removeGiftCardFromCurrentCart({ host }) {
770
+ const metadata = {
771
+ entityFqdn: "wix.ecom.v2.cart",
772
+ method: "POST",
773
+ methodFqn: "wix.ecom.cart.v2.CurrentCartService.RemoveGiftCardFromCurrentCart",
774
+ packageName: PACKAGE_NAME,
775
+ url: resolveWixEcomCartV2CurrentCartServiceUrl({
776
+ protoPath: "/v2/carts/current/remove-gift-card",
777
+ data: payload,
778
+ host
779
+ }),
780
+ data: payload,
781
+ transformResponse: (payload2) => transformPaths(payload2, [
782
+ {
783
+ transformFn: transformRESTTimestampToSDKTimestamp,
784
+ paths: [
785
+ { path: "cart.createdDate" },
786
+ { path: "cart.updatedDate" },
787
+ {
788
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
789
+ },
790
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
791
+ {
792
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
793
+ },
794
+ {
795
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
796
+ }
797
+ ]
798
+ },
799
+ {
800
+ transformFn: transformRESTFloatToSDKFloat,
801
+ paths: [
802
+ {
803
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
804
+ },
805
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
806
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
807
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
808
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
809
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
810
+ ]
811
+ }
812
+ ])
813
+ };
814
+ return metadata;
815
+ }
816
+ return __removeGiftCardFromCurrentCart;
817
+ }
818
+
819
+ // src/ecom-v2-cart-current-cart-v-2.meta.ts
820
+ function createCurrentCart2() {
821
+ const payload = {};
822
+ const getRequestOptions = createCurrentCart(payload);
823
+ const getUrl = (context) => {
824
+ const { url } = getRequestOptions(context);
825
+ return url;
826
+ };
827
+ return {
828
+ getUrl,
829
+ httpMethod: "POST",
830
+ path: "/v2/carts/current",
831
+ pathParams: {},
832
+ __requestType: null,
833
+ __originalRequestType: null,
834
+ __responseType: null,
835
+ __originalResponseType: null
836
+ };
837
+ }
838
+ function getCurrentCart2() {
839
+ const payload = {};
840
+ const getRequestOptions = getCurrentCart(payload);
841
+ const getUrl = (context) => {
842
+ const { url } = getRequestOptions(context);
843
+ return url;
844
+ };
845
+ return {
846
+ getUrl,
847
+ httpMethod: "GET",
848
+ path: "/v2/carts/current",
849
+ pathParams: {},
850
+ __requestType: null,
851
+ __originalRequestType: null,
852
+ __responseType: null,
853
+ __originalResponseType: null
854
+ };
855
+ }
856
+ function updateCurrentCart2() {
857
+ const payload = {};
858
+ const getRequestOptions = updateCurrentCart(payload);
859
+ const getUrl = (context) => {
860
+ const { url } = getRequestOptions(context);
861
+ return url;
862
+ };
863
+ return {
864
+ getUrl,
865
+ httpMethod: "PATCH",
866
+ path: "/v2/carts/current",
867
+ pathParams: {},
868
+ __requestType: null,
869
+ __originalRequestType: null,
870
+ __responseType: null,
871
+ __originalResponseType: null
872
+ };
873
+ }
874
+ function deleteCurrentCart2() {
875
+ const payload = {};
876
+ const getRequestOptions = deleteCurrentCart(payload);
877
+ const getUrl = (context) => {
878
+ const { url } = getRequestOptions(context);
879
+ return url;
880
+ };
881
+ return {
882
+ getUrl,
883
+ httpMethod: "DELETE",
884
+ path: "/v2/carts/current",
885
+ pathParams: {},
886
+ __requestType: null,
887
+ __originalRequestType: null,
888
+ __responseType: null,
889
+ __originalResponseType: null
890
+ };
891
+ }
892
+ function refreshCurrentCart2() {
893
+ const payload = {};
894
+ const getRequestOptions = refreshCurrentCart(payload);
895
+ const getUrl = (context) => {
896
+ const { url } = getRequestOptions(context);
897
+ return url;
898
+ };
899
+ return {
900
+ getUrl,
901
+ httpMethod: "POST",
902
+ path: "/v2/carts/current/refresh",
903
+ pathParams: {},
904
+ __requestType: null,
905
+ __originalRequestType: null,
906
+ __responseType: null,
907
+ __originalResponseType: null
908
+ };
909
+ }
910
+ function calculateCurrentCart2() {
911
+ const payload = {};
912
+ const getRequestOptions = calculateCurrentCart(payload);
913
+ const getUrl = (context) => {
914
+ const { url } = getRequestOptions(context);
915
+ return url;
916
+ };
917
+ return {
918
+ getUrl,
919
+ httpMethod: "POST",
920
+ path: "/v2/carts/current/calculate",
921
+ pathParams: {},
922
+ __requestType: null,
923
+ __originalRequestType: null,
924
+ __responseType: null,
925
+ __originalResponseType: null
926
+ };
927
+ }
928
+ function addLineItemsToCurrentCart2() {
929
+ const payload = {};
930
+ const getRequestOptions = addLineItemsToCurrentCart(payload);
931
+ const getUrl = (context) => {
932
+ const { url } = getRequestOptions(context);
933
+ return url;
934
+ };
935
+ return {
936
+ getUrl,
937
+ httpMethod: "POST",
938
+ path: "/v2/carts/current/add-line-items",
939
+ pathParams: {},
940
+ __requestType: null,
941
+ __originalRequestType: null,
942
+ __responseType: null,
943
+ __originalResponseType: null
944
+ };
945
+ }
946
+ function removeLineItemsFromCurrentCart2() {
947
+ const payload = {};
948
+ const getRequestOptions = removeLineItemsFromCurrentCart(payload);
949
+ const getUrl = (context) => {
950
+ const { url } = getRequestOptions(context);
951
+ return url;
952
+ };
953
+ return {
954
+ getUrl,
955
+ httpMethod: "POST",
956
+ path: "/v2/carts/current/remove-line-items",
957
+ pathParams: {},
958
+ __requestType: null,
959
+ __originalRequestType: null,
960
+ __responseType: null,
961
+ __originalResponseType: null
962
+ };
963
+ }
964
+ function updateLineItemsInCurrentCart2() {
965
+ const payload = {};
966
+ const getRequestOptions = updateLineItemsInCurrentCart(payload);
967
+ const getUrl = (context) => {
968
+ const { url } = getRequestOptions(context);
969
+ return url;
970
+ };
971
+ return {
972
+ getUrl,
973
+ httpMethod: "POST",
974
+ path: "/v2/carts/current/update-line-items",
975
+ pathParams: {},
976
+ __requestType: null,
977
+ __originalRequestType: null,
978
+ __responseType: null,
979
+ __originalResponseType: null
980
+ };
981
+ }
982
+ function addDiscountToCurrentCart2() {
983
+ const payload = {};
984
+ const getRequestOptions = addDiscountToCurrentCart(payload);
985
+ const getUrl = (context) => {
986
+ const { url } = getRequestOptions(context);
987
+ return url;
988
+ };
989
+ return {
990
+ getUrl,
991
+ httpMethod: "POST",
992
+ path: "/v2/carts/current/add-discount",
993
+ pathParams: {},
994
+ __requestType: null,
995
+ __originalRequestType: null,
996
+ __responseType: null,
997
+ __originalResponseType: null
998
+ };
999
+ }
1000
+ function removeDiscountFromCurrentCart2() {
1001
+ const payload = {};
1002
+ const getRequestOptions = removeDiscountFromCurrentCart(payload);
1003
+ const getUrl = (context) => {
1004
+ const { url } = getRequestOptions(context);
1005
+ return url;
1006
+ };
1007
+ return {
1008
+ getUrl,
1009
+ httpMethod: "POST",
1010
+ path: "/v2/carts/current/remove-discount",
1011
+ pathParams: {},
1012
+ __requestType: null,
1013
+ __originalRequestType: null,
1014
+ __responseType: null,
1015
+ __originalResponseType: null
1016
+ };
1017
+ }
1018
+ function addGiftCardToCurrentCart2() {
1019
+ const payload = {};
1020
+ const getRequestOptions = addGiftCardToCurrentCart(payload);
1021
+ const getUrl = (context) => {
1022
+ const { url } = getRequestOptions(context);
1023
+ return url;
1024
+ };
1025
+ return {
1026
+ getUrl,
1027
+ httpMethod: "POST",
1028
+ path: "/v2/carts/current/add-gift-card",
1029
+ pathParams: {},
1030
+ __requestType: null,
1031
+ __originalRequestType: null,
1032
+ __responseType: null,
1033
+ __originalResponseType: null
1034
+ };
1035
+ }
1036
+ function removeGiftCardFromCurrentCart2() {
1037
+ const payload = {};
1038
+ const getRequestOptions = removeGiftCardFromCurrentCart(payload);
1039
+ const getUrl = (context) => {
1040
+ const { url } = getRequestOptions(context);
1041
+ return url;
1042
+ };
1043
+ return {
1044
+ getUrl,
1045
+ httpMethod: "POST",
1046
+ path: "/v2/carts/current/remove-gift-card",
1047
+ pathParams: {},
1048
+ __requestType: null,
1049
+ __originalRequestType: null,
1050
+ __responseType: null,
1051
+ __originalResponseType: null
1052
+ };
1053
+ }
1054
+ export {
1055
+ addDiscountToCurrentCart2 as addDiscountToCurrentCart,
1056
+ addGiftCardToCurrentCart2 as addGiftCardToCurrentCart,
1057
+ addLineItemsToCurrentCart2 as addLineItemsToCurrentCart,
1058
+ calculateCurrentCart2 as calculateCurrentCart,
1059
+ createCurrentCart2 as createCurrentCart,
1060
+ deleteCurrentCart2 as deleteCurrentCart,
1061
+ getCurrentCart2 as getCurrentCart,
1062
+ refreshCurrentCart2 as refreshCurrentCart,
1063
+ removeDiscountFromCurrentCart2 as removeDiscountFromCurrentCart,
1064
+ removeGiftCardFromCurrentCart2 as removeGiftCardFromCurrentCart,
1065
+ removeLineItemsFromCurrentCart2 as removeLineItemsFromCurrentCart,
1066
+ updateCurrentCart2 as updateCurrentCart,
1067
+ updateLineItemsInCurrentCart2 as updateLineItemsInCurrentCart
1068
+ };
1069
+ //# sourceMappingURL=meta.mjs.map