@wix/auto_sdk_ecom_cart 1.0.174 → 1.0.176

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.
@@ -1,1322 +0,0 @@
1
- // src/ecom-v1-cart-cart.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 resolveComWixEcomCartApiV1CartServiceUrl(opts) {
11
- const domainToMappings = {
12
- "www.wixapis.com": [
13
- {
14
- srcPath: "/ecom/v1/carts",
15
- destPath: "/v1/carts"
16
- }
17
- ],
18
- "www.wixgateway.com": [
19
- {
20
- srcPath: "/ecom/v1/carts",
21
- destPath: "/v1/carts"
22
- }
23
- ],
24
- _: [
25
- {
26
- srcPath: "/_api/ecom-cart",
27
- destPath: ""
28
- },
29
- {
30
- srcPath: "/_api/cart",
31
- destPath: ""
32
- },
33
- {
34
- srcPath: "/ecom/v1/carts",
35
- destPath: "/v1/carts"
36
- }
37
- ],
38
- "manage._base_domain_": [
39
- {
40
- srcPath: "/ecom/v1/carts",
41
- destPath: "/v1/carts"
42
- }
43
- ],
44
- "editor._base_domain_": [
45
- {
46
- srcPath: "/_api/ecom-cart",
47
- destPath: ""
48
- }
49
- ],
50
- "blocks._base_domain_": [
51
- {
52
- srcPath: "/_api/ecom-cart",
53
- destPath: ""
54
- }
55
- ],
56
- "create.editorx": [
57
- {
58
- srcPath: "/_api/ecom-cart",
59
- destPath: ""
60
- }
61
- ],
62
- "*.dev.wix-code.com": [
63
- {
64
- srcPath: "/_api/ecom-cart",
65
- destPath: ""
66
- }
67
- ],
68
- "www._base_domain_": [
69
- {
70
- srcPath: "/_api/ecom-cart",
71
- destPath: ""
72
- }
73
- ],
74
- "bo._base_domain_": [
75
- {
76
- srcPath: "/ecom/v1/carts",
77
- destPath: "/v1/carts"
78
- }
79
- ],
80
- "wixbo.ai": [
81
- {
82
- srcPath: "/ecom/v1/carts",
83
- destPath: "/v1/carts"
84
- }
85
- ],
86
- "wix-bo.com": [
87
- {
88
- srcPath: "/ecom/v1/carts",
89
- destPath: "/v1/carts"
90
- }
91
- ],
92
- "editor.wixapps.net": [
93
- {
94
- srcPath: "/_api/ecom-cart",
95
- destPath: ""
96
- }
97
- ],
98
- "apps._base_domain_": [
99
- {
100
- srcPath: "/ecom/v1/carts",
101
- destPath: "/v1/carts"
102
- }
103
- ],
104
- "api._api_base_domain_": [
105
- {
106
- srcPath: "/cart-v1-proxy",
107
- destPath: ""
108
- }
109
- ],
110
- "ecom.wixapps.net": [
111
- {
112
- srcPath: "/_api/ecom-cart",
113
- destPath: ""
114
- }
115
- ]
116
- };
117
- return resolveUrl(Object.assign(opts, { domainToMappings }));
118
- }
119
- var PACKAGE_NAME = "@wix/auto_sdk_ecom_cart";
120
- function createCart(payload) {
121
- function __createCart({ host }) {
122
- const serializedData = transformPaths(payload, [
123
- {
124
- transformFn: transformSDKTimestampToRESTTimestamp,
125
- paths: [
126
- { path: "cartInfo.createdDate" },
127
- { path: "cartInfo.updatedDate" },
128
- { path: "cartInfo.lineItems.image.urlExpirationDate" },
129
- {
130
- path: "cartInfo.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
131
- },
132
- { path: "cartInfo.lineItems.serviceProperties.scheduledDate" },
133
- { path: "cartInfo.lineItems.serviceProperties.endDate" },
134
- { path: "lineItems.image.urlExpirationDate" },
135
- {
136
- path: "lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
137
- },
138
- { path: "lineItems.serviceProperties.scheduledDate" },
139
- { path: "lineItems.serviceProperties.endDate" },
140
- {
141
- path: "customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
142
- },
143
- { path: "customLineItems.serviceProperties.scheduledDate" },
144
- { path: "customLineItems.serviceProperties.endDate" }
145
- ]
146
- },
147
- {
148
- transformFn: transformSDKFloatToRESTFloat,
149
- paths: [
150
- { path: "cartInfo.lineItems.image.focalPoint.x" },
151
- { path: "cartInfo.lineItems.image.focalPoint.y" },
152
- { path: "lineItems.image.focalPoint.x" },
153
- { path: "lineItems.image.focalPoint.y" },
154
- { path: "cartInfo.lineItems.physicalProperties.weight" },
155
- {
156
- path: "cartInfo.lineItems.catalogOverrideFields.physicalProperties.weight"
157
- },
158
- { path: "cartInfo.contactInfo.address.geocode.latitude" },
159
- { path: "cartInfo.contactInfo.address.geocode.longitude" },
160
- { path: "lineItems.physicalProperties.weight" },
161
- { path: "lineItems.catalogOverrideFields.physicalProperties.weight" },
162
- { path: "customLineItems.physicalProperties.weight" }
163
- ]
164
- }
165
- ]);
166
- const metadata = {
167
- entityFqdn: "wix.ecom.v1.cart",
168
- method: "POST",
169
- methodFqn: "com.wix.ecom.cart.api.v1.CartService.CreateCart",
170
- packageName: PACKAGE_NAME,
171
- migrationOptions: {
172
- optInTransformResponse: true
173
- },
174
- url: resolveComWixEcomCartApiV1CartServiceUrl({
175
- protoPath: "/v1/carts",
176
- data: serializedData,
177
- host
178
- }),
179
- data: serializedData,
180
- transformResponse: (payload2) => transformPaths(payload2, [
181
- {
182
- transformFn: transformRESTTimestampToSDKTimestamp,
183
- paths: [
184
- { path: "cart.createdDate" },
185
- { path: "cart.updatedDate" },
186
- { path: "cart.lineItems.image.urlExpirationDate" },
187
- {
188
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
189
- },
190
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
191
- { path: "cart.lineItems.serviceProperties.endDate" }
192
- ]
193
- },
194
- {
195
- transformFn: transformRESTFloatToSDKFloat,
196
- paths: [
197
- { path: "cart.lineItems.image.focalPoint.x" },
198
- { path: "cart.lineItems.image.focalPoint.y" },
199
- { path: "cart.lineItems.physicalProperties.weight" },
200
- {
201
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
202
- },
203
- { path: "cart.contactInfo.address.geocode.latitude" },
204
- { path: "cart.contactInfo.address.geocode.longitude" }
205
- ]
206
- }
207
- ])
208
- };
209
- return metadata;
210
- }
211
- return __createCart;
212
- }
213
- function updateCart(payload) {
214
- function __updateCart({ host }) {
215
- const serializedData = transformPaths(payload, [
216
- {
217
- transformFn: transformSDKFieldMaskToRESTFieldMask,
218
- paths: [{ path: "cartFieldmask" }]
219
- },
220
- {
221
- transformFn: transformSDKTimestampToRESTTimestamp,
222
- paths: [
223
- { path: "cartInfo.createdDate" },
224
- { path: "cartInfo.updatedDate" },
225
- { path: "cartInfo.lineItems.image.urlExpirationDate" },
226
- {
227
- path: "cartInfo.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
228
- },
229
- { path: "cartInfo.lineItems.serviceProperties.scheduledDate" },
230
- { path: "cartInfo.lineItems.serviceProperties.endDate" },
231
- { path: "lineItems.image.urlExpirationDate" },
232
- {
233
- path: "lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
234
- },
235
- { path: "lineItems.serviceProperties.scheduledDate" },
236
- { path: "lineItems.serviceProperties.endDate" },
237
- {
238
- path: "customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
239
- },
240
- { path: "customLineItems.serviceProperties.scheduledDate" },
241
- { path: "customLineItems.serviceProperties.endDate" }
242
- ]
243
- },
244
- {
245
- transformFn: transformSDKFloatToRESTFloat,
246
- paths: [
247
- { path: "cartInfo.lineItems.image.focalPoint.x" },
248
- { path: "cartInfo.lineItems.image.focalPoint.y" },
249
- { path: "lineItems.image.focalPoint.x" },
250
- { path: "lineItems.image.focalPoint.y" },
251
- { path: "cartInfo.lineItems.physicalProperties.weight" },
252
- {
253
- path: "cartInfo.lineItems.catalogOverrideFields.physicalProperties.weight"
254
- },
255
- { path: "cartInfo.contactInfo.address.geocode.latitude" },
256
- { path: "cartInfo.contactInfo.address.geocode.longitude" },
257
- { path: "lineItems.physicalProperties.weight" },
258
- { path: "lineItems.catalogOverrideFields.physicalProperties.weight" },
259
- { path: "customLineItems.physicalProperties.weight" }
260
- ]
261
- }
262
- ]);
263
- const metadata = {
264
- entityFqdn: "wix.ecom.v1.cart",
265
- method: "PATCH",
266
- methodFqn: "com.wix.ecom.cart.api.v1.CartService.UpdateCart",
267
- packageName: PACKAGE_NAME,
268
- migrationOptions: {
269
- optInTransformResponse: true
270
- },
271
- url: resolveComWixEcomCartApiV1CartServiceUrl({
272
- protoPath: "/v1/carts/{cartInfo.id}",
273
- data: serializedData,
274
- host
275
- }),
276
- data: serializedData,
277
- transformResponse: (payload2) => transformPaths(payload2, [
278
- {
279
- transformFn: transformRESTTimestampToSDKTimestamp,
280
- paths: [
281
- { path: "cart.createdDate" },
282
- { path: "cart.updatedDate" },
283
- { path: "cart.lineItems.image.urlExpirationDate" },
284
- {
285
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
286
- },
287
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
288
- { path: "cart.lineItems.serviceProperties.endDate" }
289
- ]
290
- },
291
- {
292
- transformFn: transformRESTFloatToSDKFloat,
293
- paths: [
294
- { path: "cart.lineItems.image.focalPoint.x" },
295
- { path: "cart.lineItems.image.focalPoint.y" },
296
- { path: "cart.lineItems.physicalProperties.weight" },
297
- {
298
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
299
- },
300
- { path: "cart.contactInfo.address.geocode.latitude" },
301
- { path: "cart.contactInfo.address.geocode.longitude" }
302
- ]
303
- }
304
- ])
305
- };
306
- return metadata;
307
- }
308
- return __updateCart;
309
- }
310
- function getCart(payload) {
311
- function __getCart({ host }) {
312
- const metadata = {
313
- entityFqdn: "wix.ecom.v1.cart",
314
- method: "GET",
315
- methodFqn: "com.wix.ecom.cart.api.v1.CartService.GetCart",
316
- packageName: PACKAGE_NAME,
317
- migrationOptions: {
318
- optInTransformResponse: true
319
- },
320
- url: resolveComWixEcomCartApiV1CartServiceUrl({
321
- protoPath: "/v1/carts/{id}",
322
- data: payload,
323
- host
324
- }),
325
- params: toURLSearchParams(payload),
326
- transformResponse: (payload2) => transformPaths(payload2, [
327
- {
328
- transformFn: transformRESTTimestampToSDKTimestamp,
329
- paths: [
330
- { path: "cart.createdDate" },
331
- { path: "cart.updatedDate" },
332
- { path: "cart.lineItems.image.urlExpirationDate" },
333
- {
334
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
335
- },
336
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
337
- { path: "cart.lineItems.serviceProperties.endDate" }
338
- ]
339
- },
340
- {
341
- transformFn: transformRESTFloatToSDKFloat,
342
- paths: [
343
- { path: "cart.lineItems.image.focalPoint.x" },
344
- { path: "cart.lineItems.image.focalPoint.y" },
345
- { path: "cart.lineItems.physicalProperties.weight" },
346
- {
347
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
348
- },
349
- { path: "cart.contactInfo.address.geocode.latitude" },
350
- { path: "cart.contactInfo.address.geocode.longitude" }
351
- ]
352
- }
353
- ])
354
- };
355
- return metadata;
356
- }
357
- return __getCart;
358
- }
359
- function getCartByCheckoutId(payload) {
360
- function __getCartByCheckoutId({ host }) {
361
- const metadata = {
362
- entityFqdn: "wix.ecom.v1.cart",
363
- method: "GET",
364
- methodFqn: "com.wix.ecom.cart.api.v1.CartService.GetCartByCheckoutId",
365
- packageName: PACKAGE_NAME,
366
- migrationOptions: {
367
- optInTransformResponse: true
368
- },
369
- url: resolveComWixEcomCartApiV1CartServiceUrl({
370
- protoPath: "/v1/carts/by-checkout-id/{id}",
371
- data: payload,
372
- host
373
- }),
374
- params: toURLSearchParams(payload),
375
- transformResponse: (payload2) => transformPaths(payload2, [
376
- {
377
- transformFn: transformRESTTimestampToSDKTimestamp,
378
- paths: [
379
- { path: "cart.createdDate" },
380
- { path: "cart.updatedDate" },
381
- { path: "cart.lineItems.image.urlExpirationDate" },
382
- {
383
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
384
- },
385
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
386
- { path: "cart.lineItems.serviceProperties.endDate" }
387
- ]
388
- },
389
- {
390
- transformFn: transformRESTFloatToSDKFloat,
391
- paths: [
392
- { path: "cart.lineItems.image.focalPoint.x" },
393
- { path: "cart.lineItems.image.focalPoint.y" },
394
- { path: "cart.lineItems.physicalProperties.weight" },
395
- {
396
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
397
- },
398
- { path: "cart.contactInfo.address.geocode.latitude" },
399
- { path: "cart.contactInfo.address.geocode.longitude" }
400
- ]
401
- }
402
- ])
403
- };
404
- return metadata;
405
- }
406
- return __getCartByCheckoutId;
407
- }
408
- function addToCart(payload) {
409
- function __addToCart({ host }) {
410
- const serializedData = transformPaths(payload, [
411
- {
412
- transformFn: transformSDKTimestampToRESTTimestamp,
413
- paths: [
414
- { path: "lineItems.image.urlExpirationDate" },
415
- {
416
- path: "lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
417
- },
418
- { path: "lineItems.serviceProperties.scheduledDate" },
419
- { path: "lineItems.serviceProperties.endDate" },
420
- {
421
- path: "customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
422
- },
423
- { path: "customLineItems.serviceProperties.scheduledDate" },
424
- { path: "customLineItems.serviceProperties.endDate" }
425
- ]
426
- },
427
- {
428
- transformFn: transformSDKFloatToRESTFloat,
429
- paths: [
430
- { path: "lineItems.image.focalPoint.x" },
431
- { path: "lineItems.image.focalPoint.y" },
432
- { path: "lineItems.physicalProperties.weight" },
433
- { path: "lineItems.catalogOverrideFields.physicalProperties.weight" },
434
- { path: "customLineItems.physicalProperties.weight" }
435
- ]
436
- }
437
- ]);
438
- const metadata = {
439
- entityFqdn: "wix.ecom.v1.cart",
440
- method: "POST",
441
- methodFqn: "com.wix.ecom.cart.api.v1.CartService.AddToCart",
442
- packageName: PACKAGE_NAME,
443
- migrationOptions: {
444
- optInTransformResponse: true
445
- },
446
- url: resolveComWixEcomCartApiV1CartServiceUrl({
447
- protoPath: "/v1/carts/{id}/add-to-cart",
448
- data: serializedData,
449
- host
450
- }),
451
- data: serializedData,
452
- transformResponse: (payload2) => transformPaths(payload2, [
453
- {
454
- transformFn: transformRESTTimestampToSDKTimestamp,
455
- paths: [
456
- { path: "cart.createdDate" },
457
- { path: "cart.updatedDate" },
458
- { path: "cart.lineItems.image.urlExpirationDate" },
459
- {
460
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
461
- },
462
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
463
- { path: "cart.lineItems.serviceProperties.endDate" }
464
- ]
465
- },
466
- {
467
- transformFn: transformRESTFloatToSDKFloat,
468
- paths: [
469
- { path: "cart.lineItems.image.focalPoint.x" },
470
- { path: "cart.lineItems.image.focalPoint.y" },
471
- { path: "cart.lineItems.physicalProperties.weight" },
472
- {
473
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
474
- },
475
- { path: "cart.contactInfo.address.geocode.latitude" },
476
- { path: "cart.contactInfo.address.geocode.longitude" }
477
- ]
478
- }
479
- ])
480
- };
481
- return metadata;
482
- }
483
- return __addToCart;
484
- }
485
- function removeLineItems(payload) {
486
- function __removeLineItems({ host }) {
487
- const metadata = {
488
- entityFqdn: "wix.ecom.v1.cart",
489
- method: "POST",
490
- methodFqn: "com.wix.ecom.cart.api.v1.CartService.RemoveLineItems",
491
- packageName: PACKAGE_NAME,
492
- migrationOptions: {
493
- optInTransformResponse: true
494
- },
495
- url: resolveComWixEcomCartApiV1CartServiceUrl({
496
- protoPath: "/v1/carts/{id}/remove-line-items",
497
- data: payload,
498
- host
499
- }),
500
- data: payload,
501
- transformResponse: (payload2) => transformPaths(payload2, [
502
- {
503
- transformFn: transformRESTTimestampToSDKTimestamp,
504
- paths: [
505
- { path: "cart.createdDate" },
506
- { path: "cart.updatedDate" },
507
- { path: "cart.lineItems.image.urlExpirationDate" },
508
- {
509
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
510
- },
511
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
512
- { path: "cart.lineItems.serviceProperties.endDate" }
513
- ]
514
- },
515
- {
516
- transformFn: transformRESTFloatToSDKFloat,
517
- paths: [
518
- { path: "cart.lineItems.image.focalPoint.x" },
519
- { path: "cart.lineItems.image.focalPoint.y" },
520
- { path: "cart.lineItems.physicalProperties.weight" },
521
- {
522
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
523
- },
524
- { path: "cart.contactInfo.address.geocode.latitude" },
525
- { path: "cart.contactInfo.address.geocode.longitude" }
526
- ]
527
- }
528
- ])
529
- };
530
- return metadata;
531
- }
532
- return __removeLineItems;
533
- }
534
- function createCheckout(payload) {
535
- function __createCheckout({ host }) {
536
- const serializedData = transformPaths(payload, [
537
- {
538
- transformFn: transformSDKFloatToRESTFloat,
539
- paths: [
540
- { path: "shippingAddress.geocode.latitude" },
541
- { path: "shippingAddress.geocode.longitude" },
542
- { path: "billingAddress.geocode.latitude" },
543
- { path: "billingAddress.geocode.longitude" }
544
- ]
545
- }
546
- ]);
547
- const metadata = {
548
- entityFqdn: "wix.ecom.v1.cart",
549
- method: "POST",
550
- methodFqn: "com.wix.ecom.cart.api.v1.CartService.CreateCheckout",
551
- packageName: PACKAGE_NAME,
552
- migrationOptions: {
553
- optInTransformResponse: true
554
- },
555
- url: resolveComWixEcomCartApiV1CartServiceUrl({
556
- protoPath: "/v1/carts/{id}/create-checkout",
557
- data: serializedData,
558
- host
559
- }),
560
- data: serializedData
561
- };
562
- return metadata;
563
- }
564
- return __createCheckout;
565
- }
566
- function removeCoupon(payload) {
567
- function __removeCoupon({ host }) {
568
- const metadata = {
569
- entityFqdn: "wix.ecom.v1.cart",
570
- method: "POST",
571
- methodFqn: "com.wix.ecom.cart.api.v1.CartService.RemoveCoupon",
572
- packageName: PACKAGE_NAME,
573
- migrationOptions: {
574
- optInTransformResponse: true
575
- },
576
- url: resolveComWixEcomCartApiV1CartServiceUrl({
577
- protoPath: "/v1/carts/{id}/remove-coupon",
578
- data: payload,
579
- host
580
- }),
581
- data: payload,
582
- transformResponse: (payload2) => transformPaths(payload2, [
583
- {
584
- transformFn: transformRESTTimestampToSDKTimestamp,
585
- paths: [
586
- { path: "cart.createdDate" },
587
- { path: "cart.updatedDate" },
588
- { path: "cart.lineItems.image.urlExpirationDate" },
589
- {
590
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
591
- },
592
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
593
- { path: "cart.lineItems.serviceProperties.endDate" }
594
- ]
595
- },
596
- {
597
- transformFn: transformRESTFloatToSDKFloat,
598
- paths: [
599
- { path: "cart.lineItems.image.focalPoint.x" },
600
- { path: "cart.lineItems.image.focalPoint.y" },
601
- { path: "cart.lineItems.physicalProperties.weight" },
602
- {
603
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
604
- },
605
- { path: "cart.contactInfo.address.geocode.latitude" },
606
- { path: "cart.contactInfo.address.geocode.longitude" }
607
- ]
608
- }
609
- ])
610
- };
611
- return metadata;
612
- }
613
- return __removeCoupon;
614
- }
615
- function updateLineItemsQuantity(payload) {
616
- function __updateLineItemsQuantity({ host }) {
617
- const metadata = {
618
- entityFqdn: "wix.ecom.v1.cart",
619
- method: "POST",
620
- methodFqn: "com.wix.ecom.cart.api.v1.CartService.UpdateLineItemsQuantity",
621
- packageName: PACKAGE_NAME,
622
- migrationOptions: {
623
- optInTransformResponse: true
624
- },
625
- url: resolveComWixEcomCartApiV1CartServiceUrl({
626
- protoPath: "/v1/carts/{id}/update-line-items-quantity",
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
- { path: "cart.lineItems.image.urlExpirationDate" },
638
- {
639
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
640
- },
641
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
642
- { path: "cart.lineItems.serviceProperties.endDate" }
643
- ]
644
- },
645
- {
646
- transformFn: transformRESTFloatToSDKFloat,
647
- paths: [
648
- { path: "cart.lineItems.image.focalPoint.x" },
649
- { path: "cart.lineItems.image.focalPoint.y" },
650
- { path: "cart.lineItems.physicalProperties.weight" },
651
- {
652
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
653
- },
654
- { path: "cart.contactInfo.address.geocode.latitude" },
655
- { path: "cart.contactInfo.address.geocode.longitude" }
656
- ]
657
- }
658
- ])
659
- };
660
- return metadata;
661
- }
662
- return __updateLineItemsQuantity;
663
- }
664
- function estimateTotals(payload) {
665
- function __estimateTotals({ host }) {
666
- const serializedData = transformPaths(payload, [
667
- {
668
- transformFn: transformSDKFloatToRESTFloat,
669
- paths: [
670
- { path: "shippingAddress.geocode.latitude" },
671
- { path: "shippingAddress.geocode.longitude" },
672
- { path: "billingAddress.geocode.latitude" },
673
- { path: "billingAddress.geocode.longitude" }
674
- ]
675
- }
676
- ]);
677
- const metadata = {
678
- entityFqdn: "wix.ecom.v1.cart",
679
- method: "POST",
680
- methodFqn: "com.wix.ecom.cart.api.v1.CartService.EstimateTotals",
681
- packageName: PACKAGE_NAME,
682
- migrationOptions: {
683
- optInTransformResponse: true
684
- },
685
- url: resolveComWixEcomCartApiV1CartServiceUrl({
686
- protoPath: "/v1/carts/{id}/estimate-totals",
687
- data: serializedData,
688
- host
689
- }),
690
- data: serializedData,
691
- transformResponse: (payload2) => transformPaths(payload2, [
692
- {
693
- transformFn: transformRESTTimestampToSDKTimestamp,
694
- paths: [
695
- { path: "cart.createdDate" },
696
- { path: "cart.updatedDate" },
697
- { path: "cart.lineItems.image.urlExpirationDate" },
698
- {
699
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
700
- },
701
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
702
- { path: "cart.lineItems.serviceProperties.endDate" },
703
- {
704
- path: "shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from"
705
- },
706
- {
707
- path: "shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to"
708
- },
709
- {
710
- path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from"
711
- },
712
- {
713
- path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to"
714
- },
715
- { path: "membershipOptions.eligibleMemberships.expirationDate" },
716
- {
717
- path: "membershipOptions.invalidMemberships.membership.expirationDate"
718
- },
719
- {
720
- path: "membershipOptions.validatedExistingMemberships.memberships.membership.expirationDate"
721
- }
722
- ]
723
- },
724
- {
725
- transformFn: transformRESTFloatToSDKFloat,
726
- paths: [
727
- { path: "cart.lineItems.image.focalPoint.x" },
728
- { path: "cart.lineItems.image.focalPoint.y" },
729
- { path: "cart.lineItems.physicalProperties.weight" },
730
- {
731
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
732
- },
733
- { path: "cart.contactInfo.address.geocode.latitude" },
734
- { path: "cart.contactInfo.address.geocode.longitude" },
735
- {
736
- path: "shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude"
737
- },
738
- {
739
- path: "shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude"
740
- },
741
- {
742
- path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude"
743
- },
744
- {
745
- path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude"
746
- },
747
- { path: "appliedDiscounts.merchantDiscount.percentage" }
748
- ]
749
- }
750
- ])
751
- };
752
- return metadata;
753
- }
754
- return __estimateTotals;
755
- }
756
- function deleteCart(payload) {
757
- function __deleteCart({ host }) {
758
- const metadata = {
759
- entityFqdn: "wix.ecom.v1.cart",
760
- method: "DELETE",
761
- methodFqn: "com.wix.ecom.cart.api.v1.CartService.DeleteCart",
762
- packageName: PACKAGE_NAME,
763
- migrationOptions: {
764
- optInTransformResponse: true
765
- },
766
- url: resolveComWixEcomCartApiV1CartServiceUrl({
767
- protoPath: "/v1/carts/{id}",
768
- data: payload,
769
- host
770
- }),
771
- params: toURLSearchParams(payload)
772
- };
773
- return metadata;
774
- }
775
- return __deleteCart;
776
- }
777
- function removeBusinessLocation(payload) {
778
- function __removeBusinessLocation({ host }) {
779
- const metadata = {
780
- entityFqdn: "wix.ecom.v1.cart",
781
- method: "POST",
782
- methodFqn: "com.wix.ecom.cart.api.v1.CartService.RemoveBusinessLocation",
783
- packageName: PACKAGE_NAME,
784
- migrationOptions: {
785
- optInTransformResponse: true
786
- },
787
- url: resolveComWixEcomCartApiV1CartServiceUrl({
788
- protoPath: "/v1/carts/{id}/remove-business-location",
789
- data: payload,
790
- host
791
- }),
792
- data: payload,
793
- transformResponse: (payload2) => transformPaths(payload2, [
794
- {
795
- transformFn: transformRESTTimestampToSDKTimestamp,
796
- paths: [
797
- { path: "cart.createdDate" },
798
- { path: "cart.updatedDate" },
799
- { path: "cart.lineItems.image.urlExpirationDate" },
800
- {
801
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
802
- },
803
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
804
- { path: "cart.lineItems.serviceProperties.endDate" }
805
- ]
806
- },
807
- {
808
- transformFn: transformRESTFloatToSDKFloat,
809
- paths: [
810
- { path: "cart.lineItems.image.focalPoint.x" },
811
- { path: "cart.lineItems.image.focalPoint.y" },
812
- { path: "cart.lineItems.physicalProperties.weight" },
813
- {
814
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
815
- },
816
- { path: "cart.contactInfo.address.geocode.latitude" },
817
- { path: "cart.contactInfo.address.geocode.longitude" }
818
- ]
819
- }
820
- ])
821
- };
822
- return metadata;
823
- }
824
- return __removeBusinessLocation;
825
- }
826
-
827
- // src/ecom-v1-cart-cart.types.ts
828
- var DescriptionLineType = /* @__PURE__ */ ((DescriptionLineType2) => {
829
- DescriptionLineType2["UNRECOGNISED"] = "UNRECOGNISED";
830
- DescriptionLineType2["PLAIN_TEXT"] = "PLAIN_TEXT";
831
- DescriptionLineType2["COLOR"] = "COLOR";
832
- return DescriptionLineType2;
833
- })(DescriptionLineType || {});
834
- var ItemAvailabilityStatus = /* @__PURE__ */ ((ItemAvailabilityStatus2) => {
835
- ItemAvailabilityStatus2["AVAILABLE"] = "AVAILABLE";
836
- ItemAvailabilityStatus2["NOT_FOUND"] = "NOT_FOUND";
837
- ItemAvailabilityStatus2["NOT_AVAILABLE"] = "NOT_AVAILABLE";
838
- ItemAvailabilityStatus2["PARTIALLY_AVAILABLE"] = "PARTIALLY_AVAILABLE";
839
- return ItemAvailabilityStatus2;
840
- })(ItemAvailabilityStatus || {});
841
- var DimensionsUnit = /* @__PURE__ */ ((DimensionsUnit2) => {
842
- DimensionsUnit2["UNKNOWN_DIMENSIONS_UNIT"] = "UNKNOWN_DIMENSIONS_UNIT";
843
- DimensionsUnit2["MM"] = "MM";
844
- DimensionsUnit2["CM"] = "CM";
845
- DimensionsUnit2["M"] = "M";
846
- DimensionsUnit2["IN"] = "IN";
847
- DimensionsUnit2["FT"] = "FT";
848
- DimensionsUnit2["YD"] = "YD";
849
- return DimensionsUnit2;
850
- })(DimensionsUnit || {});
851
- var ItemTypePreset = /* @__PURE__ */ ((ItemTypePreset2) => {
852
- ItemTypePreset2["UNRECOGNISED"] = "UNRECOGNISED";
853
- ItemTypePreset2["PHYSICAL"] = "PHYSICAL";
854
- ItemTypePreset2["DIGITAL"] = "DIGITAL";
855
- ItemTypePreset2["GIFT_CARD"] = "GIFT_CARD";
856
- ItemTypePreset2["SERVICE"] = "SERVICE";
857
- return ItemTypePreset2;
858
- })(ItemTypePreset || {});
859
- var SubscriptionFrequency = /* @__PURE__ */ ((SubscriptionFrequency2) => {
860
- SubscriptionFrequency2["UNDEFINED"] = "UNDEFINED";
861
- SubscriptionFrequency2["DAY"] = "DAY";
862
- SubscriptionFrequency2["WEEK"] = "WEEK";
863
- SubscriptionFrequency2["MONTH"] = "MONTH";
864
- SubscriptionFrequency2["YEAR"] = "YEAR";
865
- return SubscriptionFrequency2;
866
- })(SubscriptionFrequency || {});
867
- var ProductPeriodAlignment = /* @__PURE__ */ ((ProductPeriodAlignment2) => {
868
- ProductPeriodAlignment2["ALIGNED_WITH_BILLING_PERIOD"] = "ALIGNED_WITH_BILLING_PERIOD";
869
- ProductPeriodAlignment2["NOT_ALIGNED_WITH_BILLING_PERIOD"] = "NOT_ALIGNED_WITH_BILLING_PERIOD";
870
- return ProductPeriodAlignment2;
871
- })(ProductPeriodAlignment || {});
872
- var FileType = /* @__PURE__ */ ((FileType2) => {
873
- FileType2["UNSPECIFIED"] = "UNSPECIFIED";
874
- FileType2["SECURE_PICTURE"] = "SECURE_PICTURE";
875
- FileType2["SECURE_VIDEO"] = "SECURE_VIDEO";
876
- FileType2["SECURE_DOCUMENT"] = "SECURE_DOCUMENT";
877
- FileType2["SECURE_MUSIC"] = "SECURE_MUSIC";
878
- FileType2["SECURE_ARCHIVE"] = "SECURE_ARCHIVE";
879
- FileType2["SECURE_RAW"] = "SECURE_RAW";
880
- return FileType2;
881
- })(FileType || {});
882
- var PaymentOptionType = /* @__PURE__ */ ((PaymentOptionType2) => {
883
- PaymentOptionType2["FULL_PAYMENT_ONLINE"] = "FULL_PAYMENT_ONLINE";
884
- PaymentOptionType2["FULL_PAYMENT_OFFLINE"] = "FULL_PAYMENT_OFFLINE";
885
- PaymentOptionType2["MEMBERSHIP"] = "MEMBERSHIP";
886
- PaymentOptionType2["DEPOSIT_ONLINE"] = "DEPOSIT_ONLINE";
887
- PaymentOptionType2["MEMBERSHIP_OFFLINE"] = "MEMBERSHIP_OFFLINE";
888
- PaymentOptionType2["MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER"] = "MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER";
889
- return PaymentOptionType2;
890
- })(PaymentOptionType || {});
891
- var TaxableAddressType = /* @__PURE__ */ ((TaxableAddressType2) => {
892
- TaxableAddressType2["BUSINESS"] = "BUSINESS";
893
- TaxableAddressType2["BILLING"] = "BILLING";
894
- TaxableAddressType2["SHIPPING"] = "SHIPPING";
895
- return TaxableAddressType2;
896
- })(TaxableAddressType || {});
897
- var PlatformFeeChargeType = /* @__PURE__ */ ((PlatformFeeChargeType2) => {
898
- PlatformFeeChargeType2["PASS_ON"] = "PASS_ON";
899
- PlatformFeeChargeType2["ABSORBED"] = "ABSORBED";
900
- return PlatformFeeChargeType2;
901
- })(PlatformFeeChargeType || {});
902
- var WeightUnit = /* @__PURE__ */ ((WeightUnit2) => {
903
- WeightUnit2["UNSPECIFIED_WEIGHT_UNIT"] = "UNSPECIFIED_WEIGHT_UNIT";
904
- WeightUnit2["KG"] = "KG";
905
- WeightUnit2["LB"] = "LB";
906
- return WeightUnit2;
907
- })(WeightUnit || {});
908
- var DiscountType = /* @__PURE__ */ ((DiscountType2) => {
909
- DiscountType2["GLOBAL"] = "GLOBAL";
910
- DiscountType2["SPECIFIC_ITEMS"] = "SPECIFIC_ITEMS";
911
- DiscountType2["SHIPPING"] = "SHIPPING";
912
- return DiscountType2;
913
- })(DiscountType || {});
914
- var VatType = /* @__PURE__ */ ((VatType2) => {
915
- VatType2["UNSPECIFIED"] = "UNSPECIFIED";
916
- VatType2["CPF"] = "CPF";
917
- VatType2["CNPJ"] = "CNPJ";
918
- return VatType2;
919
- })(VatType || {});
920
- var JurisdictionType = /* @__PURE__ */ ((JurisdictionType2) => {
921
- JurisdictionType2["UNDEFINED"] = "UNDEFINED";
922
- JurisdictionType2["COUNTRY"] = "COUNTRY";
923
- JurisdictionType2["STATE"] = "STATE";
924
- JurisdictionType2["COUNTY"] = "COUNTY";
925
- JurisdictionType2["CITY"] = "CITY";
926
- JurisdictionType2["SPECIAL"] = "SPECIAL";
927
- return JurisdictionType2;
928
- })(JurisdictionType || {});
929
- var RateType = /* @__PURE__ */ ((RateType2) => {
930
- RateType2["NO_TAX_COLLECTED"] = "NO_TAX_COLLECTED";
931
- RateType2["MANUAL_RATE"] = "MANUAL_RATE";
932
- RateType2["AUTO_RATE"] = "AUTO_RATE";
933
- RateType2["FALLBACK_RATE"] = "FALLBACK_RATE";
934
- return RateType2;
935
- })(RateType || {});
936
- var ManualCalculationReason = /* @__PURE__ */ ((ManualCalculationReason2) => {
937
- ManualCalculationReason2["GLOBAL_SETTING_TO_MANUAL"] = "GLOBAL_SETTING_TO_MANUAL";
938
- ManualCalculationReason2["REGION_SETTING_TO_MANUAL"] = "REGION_SETTING_TO_MANUAL";
939
- return ManualCalculationReason2;
940
- })(ManualCalculationReason || {});
941
- var FallbackReason = /* @__PURE__ */ ((FallbackReason2) => {
942
- FallbackReason2["AUTO_TAX_FAILED"] = "AUTO_TAX_FAILED";
943
- FallbackReason2["AUTO_TAX_DEACTIVATED"] = "AUTO_TAX_DEACTIVATED";
944
- return FallbackReason2;
945
- })(FallbackReason || {});
946
- var PickupMethod = /* @__PURE__ */ ((PickupMethod2) => {
947
- PickupMethod2["STORE_PICKUP"] = "STORE_PICKUP";
948
- PickupMethod2["PICKUP_POINT"] = "PICKUP_POINT";
949
- return PickupMethod2;
950
- })(PickupMethod || {});
951
- var ChargeType = /* @__PURE__ */ ((ChargeType2) => {
952
- ChargeType2["HANDLING_FEE"] = "HANDLING_FEE";
953
- ChargeType2["INSURANCE"] = "INSURANCE";
954
- return ChargeType2;
955
- })(ChargeType || {});
956
- var AppliedDiscountDiscountType = /* @__PURE__ */ ((AppliedDiscountDiscountType2) => {
957
- AppliedDiscountDiscountType2["GLOBAL"] = "GLOBAL";
958
- AppliedDiscountDiscountType2["SPECIFIC_ITEMS"] = "SPECIFIC_ITEMS";
959
- AppliedDiscountDiscountType2["SHIPPING"] = "SHIPPING";
960
- return AppliedDiscountDiscountType2;
961
- })(AppliedDiscountDiscountType || {});
962
- var RuleType = /* @__PURE__ */ ((RuleType2) => {
963
- RuleType2["VALIDATION"] = "VALIDATION";
964
- RuleType2["OTHER"] = "OTHER";
965
- RuleType2["MAX"] = "MAX";
966
- RuleType2["MIN"] = "MIN";
967
- RuleType2["MAX_LENGTH"] = "MAX_LENGTH";
968
- RuleType2["MIN_LENGTH"] = "MIN_LENGTH";
969
- RuleType2["MAX_SIZE"] = "MAX_SIZE";
970
- RuleType2["MIN_SIZE"] = "MIN_SIZE";
971
- RuleType2["FORMAT"] = "FORMAT";
972
- RuleType2["DECIMAL_LTE"] = "DECIMAL_LTE";
973
- RuleType2["DECIMAL_GTE"] = "DECIMAL_GTE";
974
- RuleType2["DECIMAL_LT"] = "DECIMAL_LT";
975
- RuleType2["DECIMAL_GT"] = "DECIMAL_GT";
976
- RuleType2["DECIMAL_MAX_SCALE"] = "DECIMAL_MAX_SCALE";
977
- RuleType2["INVALID_ENUM_VALUE"] = "INVALID_ENUM_VALUE";
978
- RuleType2["REQUIRED_FIELD"] = "REQUIRED_FIELD";
979
- RuleType2["FIELD_NOT_ALLOWED"] = "FIELD_NOT_ALLOWED";
980
- RuleType2["ONE_OF_ALIGNMENT"] = "ONE_OF_ALIGNMENT";
981
- RuleType2["EXACT_LENGTH"] = "EXACT_LENGTH";
982
- RuleType2["EXACT_SIZE"] = "EXACT_SIZE";
983
- RuleType2["REQUIRED_ONE_OF_FIELD"] = "REQUIRED_ONE_OF_FIELD";
984
- return RuleType2;
985
- })(RuleType || {});
986
- var BalanceType = /* @__PURE__ */ ((BalanceType2) => {
987
- BalanceType2["PUNCH_CARD"] = "PUNCH_CARD";
988
- BalanceType2["CREDIT"] = "CREDIT";
989
- return BalanceType2;
990
- })(BalanceType || {});
991
- var QuotaType = /* @__PURE__ */ ((QuotaType2) => {
992
- QuotaType2["LIMITED"] = "LIMITED";
993
- QuotaType2["UNLIMITED"] = "UNLIMITED";
994
- return QuotaType2;
995
- })(QuotaType || {});
996
- var LimitedQuotaType = /* @__PURE__ */ ((LimitedQuotaType2) => {
997
- LimitedQuotaType2["PUNCH_CARD"] = "PUNCH_CARD";
998
- LimitedQuotaType2["CREDIT"] = "CREDIT";
999
- return LimitedQuotaType2;
1000
- })(LimitedQuotaType || {});
1001
- var AdditionalFeeSource = /* @__PURE__ */ ((AdditionalFeeSource2) => {
1002
- AdditionalFeeSource2["UNKNOWN_ADDITIONAL_FEE_SOURCE"] = "UNKNOWN_ADDITIONAL_FEE_SOURCE";
1003
- AdditionalFeeSource2["SERVICE_PLUGIN"] = "SERVICE_PLUGIN";
1004
- AdditionalFeeSource2["ITEM"] = "ITEM";
1005
- AdditionalFeeSource2["MANUAL"] = "MANUAL";
1006
- AdditionalFeeSource2["SHIPPING"] = "SHIPPING";
1007
- AdditionalFeeSource2["PLATFORM"] = "PLATFORM";
1008
- return AdditionalFeeSource2;
1009
- })(AdditionalFeeSource || {});
1010
- var Severity = /* @__PURE__ */ ((Severity2) => {
1011
- Severity2["WARNING"] = "WARNING";
1012
- Severity2["ERROR"] = "ERROR";
1013
- return Severity2;
1014
- })(Severity || {});
1015
- var NameInOther = /* @__PURE__ */ ((NameInOther2) => {
1016
- NameInOther2["OTHER_DEFAULT"] = "OTHER_DEFAULT";
1017
- return NameInOther2;
1018
- })(NameInOther || {});
1019
- var NameInLineItem = /* @__PURE__ */ ((NameInLineItem2) => {
1020
- NameInLineItem2["LINE_ITEM_DEFAULT"] = "LINE_ITEM_DEFAULT";
1021
- return NameInLineItem2;
1022
- })(NameInLineItem || {});
1023
- var SuggestedFix = /* @__PURE__ */ ((SuggestedFix2) => {
1024
- SuggestedFix2["UNKNOWN_SUGGESTED_FIX"] = "UNKNOWN_SUGGESTED_FIX";
1025
- SuggestedFix2["REMOVE_LINE_ITEM"] = "REMOVE_LINE_ITEM";
1026
- return SuggestedFix2;
1027
- })(SuggestedFix || {});
1028
- var ChannelType = /* @__PURE__ */ ((ChannelType2) => {
1029
- ChannelType2["UNSPECIFIED"] = "UNSPECIFIED";
1030
- ChannelType2["WEB"] = "WEB";
1031
- ChannelType2["POS"] = "POS";
1032
- ChannelType2["EBAY"] = "EBAY";
1033
- ChannelType2["AMAZON"] = "AMAZON";
1034
- ChannelType2["OTHER_PLATFORM"] = "OTHER_PLATFORM";
1035
- ChannelType2["WIX_APP_STORE"] = "WIX_APP_STORE";
1036
- ChannelType2["WIX_INVOICES"] = "WIX_INVOICES";
1037
- ChannelType2["BACKOFFICE_MERCHANT"] = "BACKOFFICE_MERCHANT";
1038
- ChannelType2["WISH"] = "WISH";
1039
- ChannelType2["CLASS_PASS"] = "CLASS_PASS";
1040
- ChannelType2["GLOBAL_E"] = "GLOBAL_E";
1041
- ChannelType2["FACEBOOK"] = "FACEBOOK";
1042
- ChannelType2["ETSY"] = "ETSY";
1043
- ChannelType2["TIKTOK"] = "TIKTOK";
1044
- ChannelType2["FAIRE_COM"] = "FAIRE_COM";
1045
- ChannelType2["PAYPAL_AGENTIC_CHECKOUT"] = "PAYPAL_AGENTIC_CHECKOUT";
1046
- ChannelType2["STRIPE_AGENTIC_CHECKOUT"] = "STRIPE_AGENTIC_CHECKOUT";
1047
- ChannelType2["WIX_INVOICES_PLATFORM"] = "WIX_INVOICES_PLATFORM";
1048
- ChannelType2["UCP_AGENTIC_CHECKOUT"] = "UCP_AGENTIC_CHECKOUT";
1049
- return ChannelType2;
1050
- })(ChannelType || {});
1051
- var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
1052
- WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
1053
- WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
1054
- WebhookIdentityType2["MEMBER"] = "MEMBER";
1055
- WebhookIdentityType2["WIX_USER"] = "WIX_USER";
1056
- WebhookIdentityType2["APP"] = "APP";
1057
- return WebhookIdentityType2;
1058
- })(WebhookIdentityType || {});
1059
-
1060
- // src/ecom-v1-cart-cart.meta.ts
1061
- function createCart2() {
1062
- const payload = {};
1063
- const getRequestOptions = createCart(payload);
1064
- const getUrl = (context) => {
1065
- const { url } = getRequestOptions(context);
1066
- return url;
1067
- };
1068
- return {
1069
- getUrl,
1070
- httpMethod: "POST",
1071
- path: "/v1/carts",
1072
- pathParams: {},
1073
- __requestType: null,
1074
- __originalRequestType: null,
1075
- __responseType: null,
1076
- __originalResponseType: null
1077
- };
1078
- }
1079
- function updateCart2() {
1080
- const payload = { cartInfo: { id: ":cartInfoId" } };
1081
- const getRequestOptions = updateCart(payload);
1082
- const getUrl = (context) => {
1083
- const { url } = getRequestOptions(context);
1084
- return url;
1085
- };
1086
- return {
1087
- getUrl,
1088
- httpMethod: "PATCH",
1089
- path: "/v1/carts/{cartInfo.id}",
1090
- pathParams: { cartInfoId: "cartInfoId" },
1091
- __requestType: null,
1092
- __originalRequestType: null,
1093
- __responseType: null,
1094
- __originalResponseType: null
1095
- };
1096
- }
1097
- function getCart2() {
1098
- const payload = { id: ":id" };
1099
- const getRequestOptions = getCart(payload);
1100
- const getUrl = (context) => {
1101
- const { url } = getRequestOptions(context);
1102
- return url;
1103
- };
1104
- return {
1105
- getUrl,
1106
- httpMethod: "GET",
1107
- path: "/v1/carts/{id}",
1108
- pathParams: { id: "id" },
1109
- __requestType: null,
1110
- __originalRequestType: null,
1111
- __responseType: null,
1112
- __originalResponseType: null
1113
- };
1114
- }
1115
- function getCartByCheckoutId2() {
1116
- const payload = { id: ":id" };
1117
- const getRequestOptions = getCartByCheckoutId(payload);
1118
- const getUrl = (context) => {
1119
- const { url } = getRequestOptions(context);
1120
- return url;
1121
- };
1122
- return {
1123
- getUrl,
1124
- httpMethod: "GET",
1125
- path: "/v1/carts/by-checkout-id/{id}",
1126
- pathParams: { id: "id" },
1127
- __requestType: null,
1128
- __originalRequestType: null,
1129
- __responseType: null,
1130
- __originalResponseType: null
1131
- };
1132
- }
1133
- function addToCart2() {
1134
- const payload = { id: ":id" };
1135
- const getRequestOptions = addToCart(payload);
1136
- const getUrl = (context) => {
1137
- const { url } = getRequestOptions(context);
1138
- return url;
1139
- };
1140
- return {
1141
- getUrl,
1142
- httpMethod: "POST",
1143
- path: "/v1/carts/{id}/add-to-cart",
1144
- pathParams: { id: "id" },
1145
- __requestType: null,
1146
- __originalRequestType: null,
1147
- __responseType: null,
1148
- __originalResponseType: null
1149
- };
1150
- }
1151
- function removeLineItems2() {
1152
- const payload = { id: ":id" };
1153
- const getRequestOptions = removeLineItems(payload);
1154
- const getUrl = (context) => {
1155
- const { url } = getRequestOptions(context);
1156
- return url;
1157
- };
1158
- return {
1159
- getUrl,
1160
- httpMethod: "POST",
1161
- path: "/v1/carts/{id}/remove-line-items",
1162
- pathParams: { id: "id" },
1163
- __requestType: null,
1164
- __originalRequestType: null,
1165
- __responseType: null,
1166
- __originalResponseType: null
1167
- };
1168
- }
1169
- function createCheckout2() {
1170
- const payload = { id: ":id" };
1171
- const getRequestOptions = createCheckout(payload);
1172
- const getUrl = (context) => {
1173
- const { url } = getRequestOptions(context);
1174
- return url;
1175
- };
1176
- return {
1177
- getUrl,
1178
- httpMethod: "POST",
1179
- path: "/v1/carts/{id}/create-checkout",
1180
- pathParams: { id: "id" },
1181
- __requestType: null,
1182
- __originalRequestType: null,
1183
- __responseType: null,
1184
- __originalResponseType: null
1185
- };
1186
- }
1187
- function removeCoupon2() {
1188
- const payload = { id: ":id" };
1189
- const getRequestOptions = removeCoupon(payload);
1190
- const getUrl = (context) => {
1191
- const { url } = getRequestOptions(context);
1192
- return url;
1193
- };
1194
- return {
1195
- getUrl,
1196
- httpMethod: "POST",
1197
- path: "/v1/carts/{id}/remove-coupon",
1198
- pathParams: { id: "id" },
1199
- __requestType: null,
1200
- __originalRequestType: null,
1201
- __responseType: null,
1202
- __originalResponseType: null
1203
- };
1204
- }
1205
- function updateLineItemsQuantity2() {
1206
- const payload = { id: ":id" };
1207
- const getRequestOptions = updateLineItemsQuantity(payload);
1208
- const getUrl = (context) => {
1209
- const { url } = getRequestOptions(context);
1210
- return url;
1211
- };
1212
- return {
1213
- getUrl,
1214
- httpMethod: "POST",
1215
- path: "/v1/carts/{id}/update-line-items-quantity",
1216
- pathParams: { id: "id" },
1217
- __requestType: null,
1218
- __originalRequestType: null,
1219
- __responseType: null,
1220
- __originalResponseType: null
1221
- };
1222
- }
1223
- function estimateTotals2() {
1224
- const payload = { id: ":id" };
1225
- const getRequestOptions = estimateTotals(payload);
1226
- const getUrl = (context) => {
1227
- const { url } = getRequestOptions(context);
1228
- return url;
1229
- };
1230
- return {
1231
- getUrl,
1232
- httpMethod: "POST",
1233
- path: "/v1/carts/{id}/estimate-totals",
1234
- pathParams: { id: "id" },
1235
- __requestType: null,
1236
- __originalRequestType: null,
1237
- __responseType: null,
1238
- __originalResponseType: null
1239
- };
1240
- }
1241
- function deleteCart2() {
1242
- const payload = { id: ":id" };
1243
- const getRequestOptions = deleteCart(payload);
1244
- const getUrl = (context) => {
1245
- const { url } = getRequestOptions(context);
1246
- return url;
1247
- };
1248
- return {
1249
- getUrl,
1250
- httpMethod: "DELETE",
1251
- path: "/v1/carts/{id}",
1252
- pathParams: { id: "id" },
1253
- __requestType: null,
1254
- __originalRequestType: null,
1255
- __responseType: null,
1256
- __originalResponseType: null
1257
- };
1258
- }
1259
- function removeBusinessLocation2() {
1260
- const payload = { id: ":id" };
1261
- const getRequestOptions = removeBusinessLocation(payload);
1262
- const getUrl = (context) => {
1263
- const { url } = getRequestOptions(context);
1264
- return url;
1265
- };
1266
- return {
1267
- getUrl,
1268
- httpMethod: "POST",
1269
- path: "/v1/carts/{id}/remove-business-location",
1270
- pathParams: { id: "id" },
1271
- __requestType: null,
1272
- __originalRequestType: null,
1273
- __responseType: null,
1274
- __originalResponseType: null
1275
- };
1276
- }
1277
- export {
1278
- AdditionalFeeSource as AdditionalFeeSourceOriginal,
1279
- AppliedDiscountDiscountType as AppliedDiscountDiscountTypeOriginal,
1280
- BalanceType as BalanceTypeOriginal,
1281
- ChannelType as ChannelTypeOriginal,
1282
- ChargeType as ChargeTypeOriginal,
1283
- DescriptionLineType as DescriptionLineTypeOriginal,
1284
- DimensionsUnit as DimensionsUnitOriginal,
1285
- DiscountType as DiscountTypeOriginal,
1286
- FallbackReason as FallbackReasonOriginal,
1287
- FileType as FileTypeOriginal,
1288
- ItemAvailabilityStatus as ItemAvailabilityStatusOriginal,
1289
- ItemTypePreset as ItemTypePresetOriginal,
1290
- JurisdictionType as JurisdictionTypeOriginal,
1291
- LimitedQuotaType as LimitedQuotaTypeOriginal,
1292
- ManualCalculationReason as ManualCalculationReasonOriginal,
1293
- NameInLineItem as NameInLineItemOriginal,
1294
- NameInOther as NameInOtherOriginal,
1295
- PaymentOptionType as PaymentOptionTypeOriginal,
1296
- PickupMethod as PickupMethodOriginal,
1297
- PlatformFeeChargeType as PlatformFeeChargeTypeOriginal,
1298
- ProductPeriodAlignment as ProductPeriodAlignmentOriginal,
1299
- QuotaType as QuotaTypeOriginal,
1300
- RateType as RateTypeOriginal,
1301
- RuleType as RuleTypeOriginal,
1302
- Severity as SeverityOriginal,
1303
- SubscriptionFrequency as SubscriptionFrequencyOriginal,
1304
- SuggestedFix as SuggestedFixOriginal,
1305
- TaxableAddressType as TaxableAddressTypeOriginal,
1306
- VatType as VatTypeOriginal,
1307
- WebhookIdentityType as WebhookIdentityTypeOriginal,
1308
- WeightUnit as WeightUnitOriginal,
1309
- addToCart2 as addToCart,
1310
- createCart2 as createCart,
1311
- createCheckout2 as createCheckout,
1312
- deleteCart2 as deleteCart,
1313
- estimateTotals2 as estimateTotals,
1314
- getCart2 as getCart,
1315
- getCartByCheckoutId2 as getCartByCheckoutId,
1316
- removeBusinessLocation2 as removeBusinessLocation,
1317
- removeCoupon2 as removeCoupon,
1318
- removeLineItems2 as removeLineItems,
1319
- updateCart2 as updateCart,
1320
- updateLineItemsQuantity2 as updateLineItemsQuantity
1321
- };
1322
- //# sourceMappingURL=meta.mjs.map