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