@wix/auto_sdk_ecom_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 +2950 -0
  2. package/build/cjs/index.js +2183 -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 +2030 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +2396 -0
  8. package/build/cjs/meta.js +1299 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/es/index.d.mts +2950 -0
  11. package/build/es/index.mjs +2120 -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 +1967 -0
  15. package/build/es/index.typings.mjs.map +1 -0
  16. package/build/es/meta.d.mts +2396 -0
  17. package/build/es/meta.mjs +1256 -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 +227 -0
  21. package/build/internal/cjs/index.js +2183 -0
  22. package/build/internal/cjs/index.js.map +1 -0
  23. package/build/internal/cjs/index.typings.d.ts +3207 -0
  24. package/build/internal/cjs/index.typings.js +2030 -0
  25. package/build/internal/cjs/index.typings.js.map +1 -0
  26. package/build/internal/cjs/meta.d.ts +2397 -0
  27. package/build/internal/cjs/meta.js +1299 -0
  28. package/build/internal/cjs/meta.js.map +1 -0
  29. package/build/internal/es/index.d.mts +227 -0
  30. package/build/internal/es/index.mjs +2120 -0
  31. package/build/internal/es/index.mjs.map +1 -0
  32. package/build/internal/es/index.typings.d.mts +3207 -0
  33. package/build/internal/es/index.typings.mjs +1967 -0
  34. package/build/internal/es/index.typings.mjs.map +1 -0
  35. package/build/internal/es/meta.d.mts +2397 -0
  36. package/build/internal/es/meta.mjs +1256 -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,1299 @@
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
+ addDiscount: () => addDiscount2,
24
+ addGiftCard: () => addGiftCard2,
25
+ addLineItems: () => addLineItems2,
26
+ calculateCart: () => calculateCart2,
27
+ completeCheckout: () => completeCheckout2,
28
+ createCart: () => createCart2,
29
+ deleteCart: () => deleteCart2,
30
+ getCart: () => getCart2,
31
+ getCheckoutUrl: () => getCheckoutUrl2,
32
+ handleAsyncCheckoutCompletion: () => handleAsyncCheckoutCompletion2,
33
+ markCartAsCompleted: () => markCartAsCompleted2,
34
+ refreshCart: () => refreshCart2,
35
+ removeDiscount: () => removeDiscount2,
36
+ removeGiftCard: () => removeGiftCard2,
37
+ removeLineItems: () => removeLineItems2,
38
+ updateCart: () => updateCart2,
39
+ updateLineItems: () => updateLineItems2
40
+ });
41
+ module.exports = __toCommonJS(meta_exports);
42
+
43
+ // src/ecom-v2-cart-cart-v-2.http.ts
44
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
45
+ var import_float = require("@wix/sdk-runtime/transformations/float");
46
+ var import_float2 = require("@wix/sdk-runtime/transformations/float");
47
+ var import_bytes = require("@wix/sdk-runtime/transformations/bytes");
48
+ var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
49
+ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
50
+ var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
51
+ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
52
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
53
+ function resolveWixEcomCartV2CartServiceUrl(opts) {
54
+ const domainToMappings = {
55
+ "api._api_base_domain_": [
56
+ {
57
+ srcPath: "/cart-v2",
58
+ destPath: ""
59
+ }
60
+ ],
61
+ _: [
62
+ {
63
+ srcPath: "/_api/cart-v2",
64
+ destPath: ""
65
+ }
66
+ ],
67
+ "*.dev.wix-code.com": [
68
+ {
69
+ srcPath: "/_api/cart-v2",
70
+ destPath: ""
71
+ }
72
+ ],
73
+ "www._base_domain_": [
74
+ {
75
+ srcPath: "/_api/cart-v2",
76
+ destPath: ""
77
+ }
78
+ ],
79
+ "editor._base_domain_": [
80
+ {
81
+ srcPath: "/_api/cart-v2",
82
+ destPath: ""
83
+ }
84
+ ],
85
+ "blocks._base_domain_": [
86
+ {
87
+ srcPath: "/_api/cart-v2",
88
+ destPath: ""
89
+ }
90
+ ],
91
+ "create.editorx": [
92
+ {
93
+ srcPath: "/_api/cart-v2",
94
+ destPath: ""
95
+ }
96
+ ],
97
+ "apps._base_domain_": [
98
+ {
99
+ srcPath: "/_api/cart-v2",
100
+ destPath: ""
101
+ }
102
+ ],
103
+ "manage._base_domain_": [
104
+ {
105
+ srcPath: "/_api/cart-v2",
106
+ destPath: ""
107
+ }
108
+ ],
109
+ "bo._base_domain_": [
110
+ {
111
+ srcPath: "/_api/cart-v2",
112
+ destPath: ""
113
+ }
114
+ ],
115
+ "wixbo.ai": [
116
+ {
117
+ srcPath: "/_api/cart-v2",
118
+ destPath: ""
119
+ }
120
+ ],
121
+ "wix-bo.com": [
122
+ {
123
+ srcPath: "/_api/cart-v2",
124
+ destPath: ""
125
+ }
126
+ ],
127
+ "www.wixapis.com": [
128
+ {
129
+ srcPath: "/ecom/v2/carts",
130
+ destPath: "/v2/carts"
131
+ }
132
+ ],
133
+ "editor.wixapps.net": [
134
+ {
135
+ srcPath: "/_api/cart-v2",
136
+ destPath: ""
137
+ }
138
+ ]
139
+ };
140
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
141
+ }
142
+ var PACKAGE_NAME = "@wix/auto_sdk_ecom_cart-v-2";
143
+ function createCart(payload) {
144
+ function __createCart({ host }) {
145
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
146
+ {
147
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
148
+ paths: [
149
+ { path: "cart.createdDate" },
150
+ { path: "cart.updatedDate" },
151
+ {
152
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
153
+ },
154
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
155
+ {
156
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
157
+ },
158
+ { path: "cart.lineItems.attributes.serviceProperties.scheduledDate" },
159
+ {
160
+ path: "catalogItems.catalogOverrideFields.image.urlExpirationDate"
161
+ },
162
+ { path: "customItems.attributes.image.urlExpirationDate" },
163
+ {
164
+ path: "customItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
165
+ },
166
+ { path: "customItems.attributes.serviceProperties.scheduledDate" }
167
+ ]
168
+ },
169
+ {
170
+ transformFn: import_float.transformSDKFloatToRESTFloat,
171
+ paths: [
172
+ {
173
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
174
+ },
175
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
176
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
177
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
178
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
179
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" },
180
+ {
181
+ path: "catalogItems.catalogOverrideFields.physicalProperties.weight"
182
+ },
183
+ { path: "customItems.attributes.physicalProperties.weight" }
184
+ ]
185
+ }
186
+ ]);
187
+ const metadata = {
188
+ entityFqdn: "wix.ecom.v2.cart",
189
+ method: "POST",
190
+ methodFqn: "wix.ecom.cart.v2.CartService.CreateCart",
191
+ packageName: PACKAGE_NAME,
192
+ url: resolveWixEcomCartV2CartServiceUrl({
193
+ protoPath: "/v2/carts",
194
+ data: serializedData,
195
+ host
196
+ }),
197
+ data: serializedData,
198
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
199
+ {
200
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
201
+ paths: [
202
+ { path: "cart.createdDate" },
203
+ { path: "cart.updatedDate" },
204
+ {
205
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
206
+ },
207
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
208
+ {
209
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
210
+ },
211
+ {
212
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
213
+ }
214
+ ]
215
+ },
216
+ {
217
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
218
+ paths: [
219
+ {
220
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
221
+ },
222
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
223
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
224
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
225
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
226
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
227
+ ]
228
+ }
229
+ ])
230
+ };
231
+ return metadata;
232
+ }
233
+ return __createCart;
234
+ }
235
+ function getCart(payload) {
236
+ function __getCart({ host }) {
237
+ const metadata = {
238
+ entityFqdn: "wix.ecom.v2.cart",
239
+ method: "GET",
240
+ methodFqn: "wix.ecom.cart.v2.CartService.GetCart",
241
+ packageName: PACKAGE_NAME,
242
+ url: resolveWixEcomCartV2CartServiceUrl({
243
+ protoPath: "/v2/carts/{cartId}",
244
+ data: payload,
245
+ host
246
+ }),
247
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
248
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
249
+ {
250
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
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
+ {
262
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
263
+ }
264
+ ]
265
+ },
266
+ {
267
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
268
+ paths: [
269
+ {
270
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
271
+ },
272
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
273
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
274
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
275
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
276
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
277
+ ]
278
+ }
279
+ ])
280
+ };
281
+ return metadata;
282
+ }
283
+ return __getCart;
284
+ }
285
+ function updateCart(payload) {
286
+ function __updateCart({ host }) {
287
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
288
+ {
289
+ transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
290
+ paths: [{ path: "fieldMask" }]
291
+ },
292
+ {
293
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
294
+ paths: [
295
+ { path: "cart.createdDate" },
296
+ { path: "cart.updatedDate" },
297
+ {
298
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
299
+ },
300
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
301
+ {
302
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
303
+ },
304
+ { path: "cart.lineItems.attributes.serviceProperties.scheduledDate" }
305
+ ]
306
+ },
307
+ {
308
+ transformFn: import_float.transformSDKFloatToRESTFloat,
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
+ const metadata = {
322
+ entityFqdn: "wix.ecom.v2.cart",
323
+ method: "PATCH",
324
+ methodFqn: "wix.ecom.cart.v2.CartService.UpdateCart",
325
+ packageName: PACKAGE_NAME,
326
+ url: resolveWixEcomCartV2CartServiceUrl({
327
+ protoPath: "/v2/carts/{cart.id}",
328
+ data: serializedData,
329
+ host
330
+ }),
331
+ data: serializedData,
332
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
333
+ {
334
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
335
+ paths: [
336
+ { path: "cart.createdDate" },
337
+ { path: "cart.updatedDate" },
338
+ {
339
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
340
+ },
341
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
342
+ {
343
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
344
+ },
345
+ {
346
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
347
+ }
348
+ ]
349
+ },
350
+ {
351
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
352
+ paths: [
353
+ {
354
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
355
+ },
356
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
357
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
358
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
359
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
360
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
361
+ ]
362
+ }
363
+ ])
364
+ };
365
+ return metadata;
366
+ }
367
+ return __updateCart;
368
+ }
369
+ function deleteCart(payload) {
370
+ function __deleteCart({ host }) {
371
+ const metadata = {
372
+ entityFqdn: "wix.ecom.v2.cart",
373
+ method: "DELETE",
374
+ methodFqn: "wix.ecom.cart.v2.CartService.DeleteCart",
375
+ packageName: PACKAGE_NAME,
376
+ url: resolveWixEcomCartV2CartServiceUrl({
377
+ protoPath: "/v2/carts/{cartId}",
378
+ data: payload,
379
+ host
380
+ }),
381
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
382
+ };
383
+ return metadata;
384
+ }
385
+ return __deleteCart;
386
+ }
387
+ function refreshCart(payload) {
388
+ function __refreshCart({ host }) {
389
+ const metadata = {
390
+ entityFqdn: "wix.ecom.v2.cart",
391
+ method: "POST",
392
+ methodFqn: "wix.ecom.cart.v2.CartService.RefreshCart",
393
+ packageName: PACKAGE_NAME,
394
+ url: resolveWixEcomCartV2CartServiceUrl({
395
+ protoPath: "/v2/carts/{cartId}/refresh",
396
+ data: payload,
397
+ host
398
+ }),
399
+ data: payload,
400
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
401
+ {
402
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
403
+ paths: [
404
+ { path: "cart.createdDate" },
405
+ { path: "cart.updatedDate" },
406
+ {
407
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
408
+ },
409
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
410
+ {
411
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
412
+ },
413
+ {
414
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
415
+ }
416
+ ]
417
+ },
418
+ {
419
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
420
+ paths: [
421
+ {
422
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
423
+ },
424
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
425
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
426
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
427
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
428
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
429
+ ]
430
+ }
431
+ ])
432
+ };
433
+ return metadata;
434
+ }
435
+ return __refreshCart;
436
+ }
437
+ function calculateCart(payload) {
438
+ function __calculateCart({ host }) {
439
+ const metadata = {
440
+ entityFqdn: "wix.ecom.v2.cart",
441
+ method: "POST",
442
+ methodFqn: "wix.ecom.cart.v2.CartService.CalculateCart",
443
+ packageName: PACKAGE_NAME,
444
+ url: resolveWixEcomCartV2CartServiceUrl({
445
+ protoPath: "/v2/carts/{cartId}/calculate",
446
+ data: payload,
447
+ host
448
+ }),
449
+ data: payload,
450
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
451
+ {
452
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
453
+ paths: [
454
+ { path: "cart.createdDate" },
455
+ { path: "cart.updatedDate" },
456
+ {
457
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
458
+ },
459
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
460
+ {
461
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
462
+ },
463
+ {
464
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
465
+ }
466
+ ]
467
+ },
468
+ {
469
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
470
+ paths: [
471
+ {
472
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
473
+ },
474
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
475
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
476
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
477
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
478
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
479
+ ]
480
+ }
481
+ ])
482
+ };
483
+ return metadata;
484
+ }
485
+ return __calculateCart;
486
+ }
487
+ function getCheckoutUrl(payload) {
488
+ function __getCheckoutUrl({ host }) {
489
+ const metadata = {
490
+ entityFqdn: "wix.ecom.v2.cart",
491
+ method: "POST",
492
+ methodFqn: "wix.ecom.cart.v2.CartService.GetCheckoutURL",
493
+ packageName: PACKAGE_NAME,
494
+ url: resolveWixEcomCartV2CartServiceUrl({
495
+ protoPath: "/v2/carts/{cartId}/get-checkout-url",
496
+ data: payload,
497
+ host
498
+ }),
499
+ data: payload
500
+ };
501
+ return metadata;
502
+ }
503
+ return __getCheckoutUrl;
504
+ }
505
+ function completeCheckout(payload) {
506
+ function __completeCheckout({ host }) {
507
+ const metadata = {
508
+ entityFqdn: "wix.ecom.v2.cart",
509
+ method: "POST",
510
+ methodFqn: "wix.ecom.cart.v2.CartService.CompleteCheckout",
511
+ packageName: PACKAGE_NAME,
512
+ url: resolveWixEcomCartV2CartServiceUrl({
513
+ protoPath: "/v2/carts/{cartId}/complete-checkout",
514
+ data: payload,
515
+ host
516
+ }),
517
+ data: payload
518
+ };
519
+ return metadata;
520
+ }
521
+ return __completeCheckout;
522
+ }
523
+ function addLineItems(payload) {
524
+ function __addLineItems({ host }) {
525
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
526
+ {
527
+ transformFn: import_float.transformSDKFloatToRESTFloat,
528
+ paths: [
529
+ {
530
+ path: "catalogItems.catalogOverrideFields.physicalProperties.weight"
531
+ },
532
+ { path: "customItems.attributes.physicalProperties.weight" }
533
+ ]
534
+ },
535
+ {
536
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
537
+ paths: [
538
+ {
539
+ path: "catalogItems.catalogOverrideFields.image.urlExpirationDate"
540
+ },
541
+ { path: "customItems.attributes.image.urlExpirationDate" },
542
+ {
543
+ path: "customItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
544
+ },
545
+ { path: "customItems.attributes.serviceProperties.scheduledDate" }
546
+ ]
547
+ }
548
+ ]);
549
+ const metadata = {
550
+ entityFqdn: "wix.ecom.v2.cart",
551
+ method: "POST",
552
+ methodFqn: "wix.ecom.cart.v2.CartService.AddLineItems",
553
+ packageName: PACKAGE_NAME,
554
+ url: resolveWixEcomCartV2CartServiceUrl({
555
+ protoPath: "/v2/carts/{cartId}/add-line-items",
556
+ data: serializedData,
557
+ host
558
+ }),
559
+ data: serializedData,
560
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
561
+ {
562
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
563
+ paths: [
564
+ { path: "cart.createdDate" },
565
+ { path: "cart.updatedDate" },
566
+ {
567
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
568
+ },
569
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
570
+ {
571
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
572
+ },
573
+ {
574
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
575
+ }
576
+ ]
577
+ },
578
+ {
579
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
580
+ paths: [
581
+ {
582
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
583
+ },
584
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
585
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
586
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
587
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
588
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
589
+ ]
590
+ }
591
+ ])
592
+ };
593
+ return metadata;
594
+ }
595
+ return __addLineItems;
596
+ }
597
+ function removeLineItems(payload) {
598
+ function __removeLineItems({ host }) {
599
+ const metadata = {
600
+ entityFqdn: "wix.ecom.v2.cart",
601
+ method: "POST",
602
+ methodFqn: "wix.ecom.cart.v2.CartService.RemoveLineItems",
603
+ packageName: PACKAGE_NAME,
604
+ url: resolveWixEcomCartV2CartServiceUrl({
605
+ protoPath: "/v2/carts/{cartId}/remove-line-items",
606
+ data: payload,
607
+ host
608
+ }),
609
+ data: payload,
610
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
611
+ {
612
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
613
+ paths: [
614
+ { path: "cart.createdDate" },
615
+ { path: "cart.updatedDate" },
616
+ {
617
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
618
+ },
619
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
620
+ {
621
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
622
+ },
623
+ {
624
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
625
+ }
626
+ ]
627
+ },
628
+ {
629
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
630
+ paths: [
631
+ {
632
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
633
+ },
634
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
635
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
636
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
637
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
638
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
639
+ ]
640
+ }
641
+ ])
642
+ };
643
+ return metadata;
644
+ }
645
+ return __removeLineItems;
646
+ }
647
+ function addDiscount(payload) {
648
+ function __addDiscount({ host }) {
649
+ const metadata = {
650
+ entityFqdn: "wix.ecom.v2.cart",
651
+ method: "POST",
652
+ methodFqn: "wix.ecom.cart.v2.CartService.AddDiscount",
653
+ packageName: PACKAGE_NAME,
654
+ url: resolveWixEcomCartV2CartServiceUrl({
655
+ protoPath: "/v2/carts/{cartId}/add-discount",
656
+ data: payload,
657
+ host
658
+ }),
659
+ data: payload,
660
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
661
+ {
662
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
663
+ paths: [
664
+ { path: "cart.createdDate" },
665
+ { path: "cart.updatedDate" },
666
+ {
667
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
668
+ },
669
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
670
+ {
671
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
672
+ },
673
+ {
674
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
675
+ }
676
+ ]
677
+ },
678
+ {
679
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
680
+ paths: [
681
+ {
682
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
683
+ },
684
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
685
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
686
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
687
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
688
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
689
+ ]
690
+ }
691
+ ])
692
+ };
693
+ return metadata;
694
+ }
695
+ return __addDiscount;
696
+ }
697
+ function removeDiscount(payload) {
698
+ function __removeDiscount({ host }) {
699
+ const metadata = {
700
+ entityFqdn: "wix.ecom.v2.cart",
701
+ method: "POST",
702
+ methodFqn: "wix.ecom.cart.v2.CartService.RemoveDiscount",
703
+ packageName: PACKAGE_NAME,
704
+ url: resolveWixEcomCartV2CartServiceUrl({
705
+ protoPath: "/v2/carts/{cartId}/remove-discount",
706
+ data: payload,
707
+ host
708
+ }),
709
+ data: payload,
710
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
711
+ {
712
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
713
+ paths: [
714
+ { path: "cart.createdDate" },
715
+ { path: "cart.updatedDate" },
716
+ {
717
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
718
+ },
719
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
720
+ {
721
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
722
+ },
723
+ {
724
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
725
+ }
726
+ ]
727
+ },
728
+ {
729
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
730
+ paths: [
731
+ {
732
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
733
+ },
734
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
735
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
736
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
737
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
738
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
739
+ ]
740
+ }
741
+ ])
742
+ };
743
+ return metadata;
744
+ }
745
+ return __removeDiscount;
746
+ }
747
+ function addGiftCard(payload) {
748
+ function __addGiftCard({ host }) {
749
+ const metadata = {
750
+ entityFqdn: "wix.ecom.v2.cart",
751
+ method: "POST",
752
+ methodFqn: "wix.ecom.cart.v2.CartService.AddGiftCard",
753
+ packageName: PACKAGE_NAME,
754
+ url: resolveWixEcomCartV2CartServiceUrl({
755
+ protoPath: "/v2/carts/{cartId}/add-gift-card",
756
+ data: payload,
757
+ host
758
+ }),
759
+ data: payload,
760
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
761
+ {
762
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
763
+ paths: [
764
+ { path: "cart.createdDate" },
765
+ { path: "cart.updatedDate" },
766
+ {
767
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
768
+ },
769
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
770
+ {
771
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
772
+ },
773
+ {
774
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
775
+ }
776
+ ]
777
+ },
778
+ {
779
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
780
+ paths: [
781
+ {
782
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
783
+ },
784
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
785
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
786
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
787
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
788
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
789
+ ]
790
+ }
791
+ ])
792
+ };
793
+ return metadata;
794
+ }
795
+ return __addGiftCard;
796
+ }
797
+ function removeGiftCard(payload) {
798
+ function __removeGiftCard({ host }) {
799
+ const metadata = {
800
+ entityFqdn: "wix.ecom.v2.cart",
801
+ method: "POST",
802
+ methodFqn: "wix.ecom.cart.v2.CartService.RemoveGiftCard",
803
+ packageName: PACKAGE_NAME,
804
+ url: resolveWixEcomCartV2CartServiceUrl({
805
+ protoPath: "/v2/carts/{cartId}/remove-gift-card",
806
+ data: payload,
807
+ host
808
+ }),
809
+ data: payload,
810
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
811
+ {
812
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
813
+ paths: [
814
+ { path: "cart.createdDate" },
815
+ { path: "cart.updatedDate" },
816
+ {
817
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
818
+ },
819
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
820
+ {
821
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
822
+ },
823
+ {
824
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
825
+ }
826
+ ]
827
+ },
828
+ {
829
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
830
+ paths: [
831
+ {
832
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
833
+ },
834
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
835
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
836
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
837
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
838
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
839
+ ]
840
+ }
841
+ ])
842
+ };
843
+ return metadata;
844
+ }
845
+ return __removeGiftCard;
846
+ }
847
+ function updateLineItems(payload) {
848
+ function __updateLineItems({ host }) {
849
+ const metadata = {
850
+ entityFqdn: "wix.ecom.v2.cart",
851
+ method: "POST",
852
+ methodFqn: "wix.ecom.cart.v2.CartService.UpdateLineItems",
853
+ packageName: PACKAGE_NAME,
854
+ url: resolveWixEcomCartV2CartServiceUrl({
855
+ protoPath: "/v2/carts/{cartId}/update-line-items",
856
+ data: payload,
857
+ host
858
+ }),
859
+ data: payload,
860
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
861
+ {
862
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
863
+ paths: [
864
+ { path: "cart.createdDate" },
865
+ { path: "cart.updatedDate" },
866
+ {
867
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
868
+ },
869
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
870
+ {
871
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
872
+ },
873
+ {
874
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
875
+ }
876
+ ]
877
+ },
878
+ {
879
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
880
+ paths: [
881
+ {
882
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
883
+ },
884
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
885
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
886
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
887
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
888
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
889
+ ]
890
+ }
891
+ ])
892
+ };
893
+ return metadata;
894
+ }
895
+ return __updateLineItems;
896
+ }
897
+ function markCartAsCompleted(payload) {
898
+ function __markCartAsCompleted({ host }) {
899
+ const metadata = {
900
+ entityFqdn: "wix.ecom.v2.cart",
901
+ method: "POST",
902
+ methodFqn: "wix.ecom.cart.v2.CartService.MarkCartAsCompleted",
903
+ packageName: PACKAGE_NAME,
904
+ url: resolveWixEcomCartV2CartServiceUrl({
905
+ protoPath: "/v2/carts/{cartId}/mark-cart-as-completed",
906
+ data: payload,
907
+ host
908
+ }),
909
+ data: payload,
910
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
911
+ {
912
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
913
+ paths: [
914
+ { path: "cart.createdDate" },
915
+ { path: "cart.updatedDate" },
916
+ {
917
+ path: "cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate"
918
+ },
919
+ { path: "cart.lineItems.attributes.image.urlExpirationDate" },
920
+ {
921
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
922
+ },
923
+ {
924
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
925
+ }
926
+ ]
927
+ },
928
+ {
929
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
930
+ paths: [
931
+ {
932
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
933
+ },
934
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
935
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
936
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
937
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
938
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
939
+ ]
940
+ }
941
+ ])
942
+ };
943
+ return metadata;
944
+ }
945
+ return __markCartAsCompleted;
946
+ }
947
+ function handleAsyncCheckoutCompletion(payload) {
948
+ function __handleAsyncCheckoutCompletion({ host }) {
949
+ const metadata = {
950
+ entityFqdn: "wix.ecom.v2.cart",
951
+ method: "POST",
952
+ methodFqn: "wix.ecom.cart.v2.CartService.HandleAsyncCheckoutCompletion",
953
+ packageName: PACKAGE_NAME,
954
+ url: resolveWixEcomCartV2CartServiceUrl({
955
+ protoPath: "/v2/carts/handle-async-checkout-completion",
956
+ data: payload,
957
+ host
958
+ }),
959
+ data: payload,
960
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
961
+ {
962
+ transformFn: import_bytes.transformRESTBytesToSDKBytes,
963
+ paths: [{ path: "body" }]
964
+ }
965
+ ])
966
+ };
967
+ return metadata;
968
+ }
969
+ return __handleAsyncCheckoutCompletion;
970
+ }
971
+
972
+ // src/ecom-v2-cart-cart-v-2.meta.ts
973
+ function createCart2() {
974
+ const payload = {};
975
+ const getRequestOptions = createCart(payload);
976
+ const getUrl = (context) => {
977
+ const { url } = getRequestOptions(context);
978
+ return url;
979
+ };
980
+ return {
981
+ getUrl,
982
+ httpMethod: "POST",
983
+ path: "/v2/carts",
984
+ pathParams: {},
985
+ __requestType: null,
986
+ __originalRequestType: null,
987
+ __responseType: null,
988
+ __originalResponseType: null
989
+ };
990
+ }
991
+ function getCart2() {
992
+ const payload = { cartId: ":cartId" };
993
+ const getRequestOptions = getCart(payload);
994
+ const getUrl = (context) => {
995
+ const { url } = getRequestOptions(context);
996
+ return url;
997
+ };
998
+ return {
999
+ getUrl,
1000
+ httpMethod: "GET",
1001
+ path: "/v2/carts/{cartId}",
1002
+ pathParams: { cartId: "cartId" },
1003
+ __requestType: null,
1004
+ __originalRequestType: null,
1005
+ __responseType: null,
1006
+ __originalResponseType: null
1007
+ };
1008
+ }
1009
+ function updateCart2() {
1010
+ const payload = { cart: { id: ":cartId" } };
1011
+ const getRequestOptions = updateCart(payload);
1012
+ const getUrl = (context) => {
1013
+ const { url } = getRequestOptions(context);
1014
+ return url;
1015
+ };
1016
+ return {
1017
+ getUrl,
1018
+ httpMethod: "PATCH",
1019
+ path: "/v2/carts/{cart.id}",
1020
+ pathParams: { cartId: "cartId" },
1021
+ __requestType: null,
1022
+ __originalRequestType: null,
1023
+ __responseType: null,
1024
+ __originalResponseType: null
1025
+ };
1026
+ }
1027
+ function deleteCart2() {
1028
+ const payload = { cartId: ":cartId" };
1029
+ const getRequestOptions = deleteCart(payload);
1030
+ const getUrl = (context) => {
1031
+ const { url } = getRequestOptions(context);
1032
+ return url;
1033
+ };
1034
+ return {
1035
+ getUrl,
1036
+ httpMethod: "DELETE",
1037
+ path: "/v2/carts/{cartId}",
1038
+ pathParams: { cartId: "cartId" },
1039
+ __requestType: null,
1040
+ __originalRequestType: null,
1041
+ __responseType: null,
1042
+ __originalResponseType: null
1043
+ };
1044
+ }
1045
+ function refreshCart2() {
1046
+ const payload = { cartId: ":cartId" };
1047
+ const getRequestOptions = refreshCart(payload);
1048
+ const getUrl = (context) => {
1049
+ const { url } = getRequestOptions(context);
1050
+ return url;
1051
+ };
1052
+ return {
1053
+ getUrl,
1054
+ httpMethod: "POST",
1055
+ path: "/v2/carts/{cartId}/refresh",
1056
+ pathParams: { cartId: "cartId" },
1057
+ __requestType: null,
1058
+ __originalRequestType: null,
1059
+ __responseType: null,
1060
+ __originalResponseType: null
1061
+ };
1062
+ }
1063
+ function calculateCart2() {
1064
+ const payload = { cartId: ":cartId" };
1065
+ const getRequestOptions = calculateCart(payload);
1066
+ const getUrl = (context) => {
1067
+ const { url } = getRequestOptions(context);
1068
+ return url;
1069
+ };
1070
+ return {
1071
+ getUrl,
1072
+ httpMethod: "POST",
1073
+ path: "/v2/carts/{cartId}/calculate",
1074
+ pathParams: { cartId: "cartId" },
1075
+ __requestType: null,
1076
+ __originalRequestType: null,
1077
+ __responseType: null,
1078
+ __originalResponseType: null
1079
+ };
1080
+ }
1081
+ function getCheckoutUrl2() {
1082
+ const payload = { cartId: ":cartId" };
1083
+ const getRequestOptions = getCheckoutUrl(payload);
1084
+ const getUrl = (context) => {
1085
+ const { url } = getRequestOptions(context);
1086
+ return url;
1087
+ };
1088
+ return {
1089
+ getUrl,
1090
+ httpMethod: "POST",
1091
+ path: "/v2/carts/{cartId}/get-checkout-url",
1092
+ pathParams: { cartId: "cartId" },
1093
+ __requestType: null,
1094
+ __originalRequestType: null,
1095
+ __responseType: null,
1096
+ __originalResponseType: null
1097
+ };
1098
+ }
1099
+ function completeCheckout2() {
1100
+ const payload = { cartId: ":cartId" };
1101
+ const getRequestOptions = completeCheckout(payload);
1102
+ const getUrl = (context) => {
1103
+ const { url } = getRequestOptions(context);
1104
+ return url;
1105
+ };
1106
+ return {
1107
+ getUrl,
1108
+ httpMethod: "POST",
1109
+ path: "/v2/carts/{cartId}/complete-checkout",
1110
+ pathParams: { cartId: "cartId" },
1111
+ __requestType: null,
1112
+ __originalRequestType: null,
1113
+ __responseType: null,
1114
+ __originalResponseType: null
1115
+ };
1116
+ }
1117
+ function addLineItems2() {
1118
+ const payload = { cartId: ":cartId" };
1119
+ const getRequestOptions = addLineItems(payload);
1120
+ const getUrl = (context) => {
1121
+ const { url } = getRequestOptions(context);
1122
+ return url;
1123
+ };
1124
+ return {
1125
+ getUrl,
1126
+ httpMethod: "POST",
1127
+ path: "/v2/carts/{cartId}/add-line-items",
1128
+ pathParams: { cartId: "cartId" },
1129
+ __requestType: null,
1130
+ __originalRequestType: null,
1131
+ __responseType: null,
1132
+ __originalResponseType: null
1133
+ };
1134
+ }
1135
+ function removeLineItems2() {
1136
+ const payload = { cartId: ":cartId" };
1137
+ const getRequestOptions = removeLineItems(payload);
1138
+ const getUrl = (context) => {
1139
+ const { url } = getRequestOptions(context);
1140
+ return url;
1141
+ };
1142
+ return {
1143
+ getUrl,
1144
+ httpMethod: "POST",
1145
+ path: "/v2/carts/{cartId}/remove-line-items",
1146
+ pathParams: { cartId: "cartId" },
1147
+ __requestType: null,
1148
+ __originalRequestType: null,
1149
+ __responseType: null,
1150
+ __originalResponseType: null
1151
+ };
1152
+ }
1153
+ function addDiscount2() {
1154
+ const payload = { cartId: ":cartId" };
1155
+ const getRequestOptions = addDiscount(payload);
1156
+ const getUrl = (context) => {
1157
+ const { url } = getRequestOptions(context);
1158
+ return url;
1159
+ };
1160
+ return {
1161
+ getUrl,
1162
+ httpMethod: "POST",
1163
+ path: "/v2/carts/{cartId}/add-discount",
1164
+ pathParams: { cartId: "cartId" },
1165
+ __requestType: null,
1166
+ __originalRequestType: null,
1167
+ __responseType: null,
1168
+ __originalResponseType: null
1169
+ };
1170
+ }
1171
+ function removeDiscount2() {
1172
+ const payload = { cartId: ":cartId" };
1173
+ const getRequestOptions = removeDiscount(payload);
1174
+ const getUrl = (context) => {
1175
+ const { url } = getRequestOptions(context);
1176
+ return url;
1177
+ };
1178
+ return {
1179
+ getUrl,
1180
+ httpMethod: "POST",
1181
+ path: "/v2/carts/{cartId}/remove-discount",
1182
+ pathParams: { cartId: "cartId" },
1183
+ __requestType: null,
1184
+ __originalRequestType: null,
1185
+ __responseType: null,
1186
+ __originalResponseType: null
1187
+ };
1188
+ }
1189
+ function addGiftCard2() {
1190
+ const payload = { cartId: ":cartId" };
1191
+ const getRequestOptions = addGiftCard(payload);
1192
+ const getUrl = (context) => {
1193
+ const { url } = getRequestOptions(context);
1194
+ return url;
1195
+ };
1196
+ return {
1197
+ getUrl,
1198
+ httpMethod: "POST",
1199
+ path: "/v2/carts/{cartId}/add-gift-card",
1200
+ pathParams: { cartId: "cartId" },
1201
+ __requestType: null,
1202
+ __originalRequestType: null,
1203
+ __responseType: null,
1204
+ __originalResponseType: null
1205
+ };
1206
+ }
1207
+ function removeGiftCard2() {
1208
+ const payload = { cartId: ":cartId" };
1209
+ const getRequestOptions = removeGiftCard(payload);
1210
+ const getUrl = (context) => {
1211
+ const { url } = getRequestOptions(context);
1212
+ return url;
1213
+ };
1214
+ return {
1215
+ getUrl,
1216
+ httpMethod: "POST",
1217
+ path: "/v2/carts/{cartId}/remove-gift-card",
1218
+ pathParams: { cartId: "cartId" },
1219
+ __requestType: null,
1220
+ __originalRequestType: null,
1221
+ __responseType: null,
1222
+ __originalResponseType: null
1223
+ };
1224
+ }
1225
+ function updateLineItems2() {
1226
+ const payload = { cartId: ":cartId" };
1227
+ const getRequestOptions = updateLineItems(payload);
1228
+ const getUrl = (context) => {
1229
+ const { url } = getRequestOptions(context);
1230
+ return url;
1231
+ };
1232
+ return {
1233
+ getUrl,
1234
+ httpMethod: "POST",
1235
+ path: "/v2/carts/{cartId}/update-line-items",
1236
+ pathParams: { cartId: "cartId" },
1237
+ __requestType: null,
1238
+ __originalRequestType: null,
1239
+ __responseType: null,
1240
+ __originalResponseType: null
1241
+ };
1242
+ }
1243
+ function markCartAsCompleted2() {
1244
+ const payload = { cartId: ":cartId" };
1245
+ const getRequestOptions = markCartAsCompleted(payload);
1246
+ const getUrl = (context) => {
1247
+ const { url } = getRequestOptions(context);
1248
+ return url;
1249
+ };
1250
+ return {
1251
+ getUrl,
1252
+ httpMethod: "POST",
1253
+ path: "/v2/carts/{cartId}/mark-cart-as-completed",
1254
+ pathParams: { cartId: "cartId" },
1255
+ __requestType: null,
1256
+ __originalRequestType: null,
1257
+ __responseType: null,
1258
+ __originalResponseType: null
1259
+ };
1260
+ }
1261
+ function handleAsyncCheckoutCompletion2() {
1262
+ const payload = {};
1263
+ const getRequestOptions = handleAsyncCheckoutCompletion(payload);
1264
+ const getUrl = (context) => {
1265
+ const { url } = getRequestOptions(context);
1266
+ return url;
1267
+ };
1268
+ return {
1269
+ getUrl,
1270
+ httpMethod: "POST",
1271
+ path: "/v2/carts/handle-async-checkout-completion",
1272
+ pathParams: {},
1273
+ __requestType: null,
1274
+ __originalRequestType: null,
1275
+ __responseType: null,
1276
+ __originalResponseType: null
1277
+ };
1278
+ }
1279
+ // Annotate the CommonJS export names for ESM import in node:
1280
+ 0 && (module.exports = {
1281
+ addDiscount,
1282
+ addGiftCard,
1283
+ addLineItems,
1284
+ calculateCart,
1285
+ completeCheckout,
1286
+ createCart,
1287
+ deleteCart,
1288
+ getCart,
1289
+ getCheckoutUrl,
1290
+ handleAsyncCheckoutCompletion,
1291
+ markCartAsCompleted,
1292
+ refreshCart,
1293
+ removeDiscount,
1294
+ removeGiftCard,
1295
+ removeLineItems,
1296
+ updateCart,
1297
+ updateLineItems
1298
+ });
1299
+ //# sourceMappingURL=meta.js.map