@wix/auto_sdk_ecom_current-cart 1.0.184 → 1.0.185

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,1685 +0,0 @@
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
- // index.ts
21
- var index_exports = {};
22
- __export(index_exports, {
23
- AdditionalFeeSource: () => AdditionalFeeSource,
24
- AppliedDiscountDiscountType: () => AppliedDiscountDiscountType,
25
- BalanceType: () => BalanceType,
26
- ChannelType: () => ChannelType,
27
- ChargeType: () => ChargeType,
28
- DescriptionLineType: () => DescriptionLineType,
29
- DimensionsUnit: () => DimensionsUnit,
30
- DiscountType: () => DiscountType,
31
- FallbackReason: () => FallbackReason,
32
- FileType: () => FileType,
33
- ItemAvailabilityStatus: () => ItemAvailabilityStatus,
34
- ItemTypePreset: () => ItemTypePreset,
35
- JurisdictionType: () => JurisdictionType,
36
- LimitedQuotaType: () => LimitedQuotaType,
37
- ManualCalculationReason: () => ManualCalculationReason,
38
- NameInLineItem: () => NameInLineItem,
39
- NameInOther: () => NameInOther,
40
- PaymentOptionType: () => PaymentOptionType,
41
- PickupMethod: () => PickupMethod,
42
- PlatformFeeChargeType: () => PlatformFeeChargeType,
43
- ProductPeriodAlignment: () => ProductPeriodAlignment,
44
- QuotaType: () => QuotaType,
45
- RateType: () => RateType,
46
- RuleType: () => RuleType,
47
- Severity: () => Severity,
48
- SubscriptionFrequency: () => SubscriptionFrequency,
49
- SuggestedFix: () => SuggestedFix,
50
- TaxableAddressType: () => TaxableAddressType,
51
- VatType: () => VatType,
52
- WebhookIdentityType: () => WebhookIdentityType,
53
- WeightUnit: () => WeightUnit,
54
- addToCurrentCart: () => addToCurrentCart4,
55
- createCheckoutFromCurrentCart: () => createCheckoutFromCurrentCart4,
56
- deleteCurrentCart: () => deleteCurrentCart4,
57
- estimateCurrentCartTotals: () => estimateCurrentCartTotals4,
58
- getCurrentCart: () => getCurrentCart3,
59
- onCartCreated: () => onCartCreated2,
60
- onCartDeleted: () => onCartDeleted2,
61
- onCartUpdated: () => onCartUpdated2,
62
- removeCouponFromCurrentCart: () => removeCouponFromCurrentCart4,
63
- removeLineItemsFromCurrentCart: () => removeLineItemsFromCurrentCart4,
64
- updateCurrentCart: () => updateCurrentCart4,
65
- updateCurrentCartLineItemQuantity: () => updateCurrentCartLineItemQuantity4
66
- });
67
- module.exports = __toCommonJS(index_exports);
68
-
69
- // src/ecom-v1-cart-current-cart.public.ts
70
- var import_rename_all_nested_keys2 = require("@wix/sdk-runtime/rename-all-nested-keys");
71
- var import_address3 = require("@wix/sdk-runtime/transformations/address");
72
- var import_float3 = require("@wix/sdk-runtime/transformations/float");
73
- var import_image3 = require("@wix/sdk-runtime/transformations/image");
74
- var import_page_url_v23 = require("@wix/sdk-runtime/transformations/page-url-v2");
75
- var import_timestamp3 = require("@wix/sdk-runtime/transformations/timestamp");
76
- var import_transform_paths3 = require("@wix/sdk-runtime/transformations/transform-paths");
77
- var import_sdk_types = require("@wix/sdk-types");
78
-
79
- // src/ecom-v1-cart-current-cart.universal.ts
80
- var import_transform_error = require("@wix/sdk-runtime/transform-error");
81
- var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
82
-
83
- // src/ecom-v1-cart-current-cart.http.ts
84
- var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
85
- var import_float = require("@wix/sdk-runtime/transformations/float");
86
- var import_float2 = require("@wix/sdk-runtime/transformations/float");
87
- var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
88
- var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
89
- var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
90
- var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
91
- var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
92
- function resolveComWixEcomCartApiV1CurrentCartServiceUrl(opts) {
93
- const domainToMappings = {
94
- "www.wixapis.com": [
95
- {
96
- srcPath: "/ecom/v1/carts",
97
- destPath: "/v1/carts"
98
- }
99
- ],
100
- "www.wixgateway.com": [
101
- {
102
- srcPath: "/ecom/v1/carts",
103
- destPath: "/v1/carts"
104
- }
105
- ],
106
- _: [
107
- {
108
- srcPath: "/_api/ecom-cart",
109
- destPath: ""
110
- },
111
- {
112
- srcPath: "/_api/cart",
113
- destPath: ""
114
- },
115
- {
116
- srcPath: "/ecom/v1/carts",
117
- destPath: "/v1/carts"
118
- }
119
- ],
120
- "manage._base_domain_": [
121
- {
122
- srcPath: "/ecom/v1/carts",
123
- destPath: "/v1/carts"
124
- }
125
- ],
126
- "editor._base_domain_": [
127
- {
128
- srcPath: "/_api/ecom-cart",
129
- destPath: ""
130
- }
131
- ],
132
- "blocks._base_domain_": [
133
- {
134
- srcPath: "/_api/ecom-cart",
135
- destPath: ""
136
- }
137
- ],
138
- "create.editorx": [
139
- {
140
- srcPath: "/_api/ecom-cart",
141
- destPath: ""
142
- }
143
- ],
144
- "*.dev.wix-code.com": [
145
- {
146
- srcPath: "/_api/ecom-cart",
147
- destPath: ""
148
- }
149
- ],
150
- "www._base_domain_": [
151
- {
152
- srcPath: "/_api/ecom-cart",
153
- destPath: ""
154
- }
155
- ],
156
- "bo._base_domain_": [
157
- {
158
- srcPath: "/ecom/v1/carts",
159
- destPath: "/v1/carts"
160
- }
161
- ],
162
- "wixbo.ai": [
163
- {
164
- srcPath: "/ecom/v1/carts",
165
- destPath: "/v1/carts"
166
- }
167
- ],
168
- "wix-bo.com": [
169
- {
170
- srcPath: "/ecom/v1/carts",
171
- destPath: "/v1/carts"
172
- }
173
- ],
174
- "editor.wixapps.net": [
175
- {
176
- srcPath: "/_api/ecom-cart",
177
- destPath: ""
178
- }
179
- ],
180
- "apps._base_domain_": [
181
- {
182
- srcPath: "/ecom/v1/carts",
183
- destPath: "/v1/carts"
184
- }
185
- ],
186
- "api._api_base_domain_": [
187
- {
188
- srcPath: "/cart-v1-proxy",
189
- destPath: ""
190
- }
191
- ],
192
- "ecom.wixapps.net": [
193
- {
194
- srcPath: "/_api/ecom-cart",
195
- destPath: ""
196
- }
197
- ]
198
- };
199
- return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
200
- }
201
- var PACKAGE_NAME = "@wix/auto_sdk_ecom_current-cart";
202
- function currentCartGetCurrentCart(payload) {
203
- function __currentCartGetCurrentCart({ host }) {
204
- const metadata = {
205
- entityFqdn: "wix.ecom.v1.cart",
206
- method: "GET",
207
- methodFqn: "com.wix.ecom.cart.api.v1.CurrentCartService.GetCurrentCart",
208
- packageName: PACKAGE_NAME,
209
- migrationOptions: {
210
- optInTransformResponse: true
211
- },
212
- url: resolveComWixEcomCartApiV1CurrentCartServiceUrl({
213
- protoPath: "/v1/carts/current",
214
- data: payload,
215
- host
216
- }),
217
- params: (0, import_rest_modules.toURLSearchParams)(payload),
218
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
219
- {
220
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
221
- paths: [
222
- { path: "cart.createdDate" },
223
- { path: "cart.updatedDate" },
224
- { path: "cart.lineItems.image.urlExpirationDate" },
225
- {
226
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
227
- },
228
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
229
- { path: "cart.lineItems.serviceProperties.endDate" }
230
- ]
231
- },
232
- {
233
- transformFn: import_float2.transformRESTFloatToSDKFloat,
234
- paths: [
235
- { path: "cart.lineItems.image.focalPoint.x" },
236
- { path: "cart.lineItems.image.focalPoint.y" },
237
- { path: "cart.lineItems.physicalProperties.weight" },
238
- {
239
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
240
- },
241
- { path: "cart.contactInfo.address.geocode.latitude" },
242
- { path: "cart.contactInfo.address.geocode.longitude" }
243
- ]
244
- }
245
- ])
246
- };
247
- return metadata;
248
- }
249
- return __currentCartGetCurrentCart;
250
- }
251
- function updateCurrentCart(payload) {
252
- function __updateCurrentCart({ host }) {
253
- const serializedData = (0, import_transform_paths.transformPaths)(payload, [
254
- {
255
- transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
256
- paths: [{ path: "cartFieldmask" }]
257
- },
258
- {
259
- transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
260
- paths: [
261
- { path: "cartInfo.createdDate" },
262
- { path: "cartInfo.updatedDate" },
263
- { path: "cartInfo.lineItems.image.urlExpirationDate" },
264
- {
265
- path: "cartInfo.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
266
- },
267
- { path: "cartInfo.lineItems.serviceProperties.scheduledDate" },
268
- { path: "cartInfo.lineItems.serviceProperties.endDate" },
269
- { path: "lineItems.image.urlExpirationDate" },
270
- {
271
- path: "lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
272
- },
273
- { path: "lineItems.serviceProperties.scheduledDate" },
274
- { path: "lineItems.serviceProperties.endDate" },
275
- {
276
- path: "customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
277
- },
278
- { path: "customLineItems.serviceProperties.scheduledDate" },
279
- { path: "customLineItems.serviceProperties.endDate" }
280
- ]
281
- },
282
- {
283
- transformFn: import_float.transformSDKFloatToRESTFloat,
284
- paths: [
285
- { path: "cartInfo.lineItems.image.focalPoint.x" },
286
- { path: "cartInfo.lineItems.image.focalPoint.y" },
287
- { path: "lineItems.image.focalPoint.x" },
288
- { path: "lineItems.image.focalPoint.y" },
289
- { path: "cartInfo.lineItems.physicalProperties.weight" },
290
- {
291
- path: "cartInfo.lineItems.catalogOverrideFields.physicalProperties.weight"
292
- },
293
- { path: "cartInfo.contactInfo.address.geocode.latitude" },
294
- { path: "cartInfo.contactInfo.address.geocode.longitude" },
295
- { path: "lineItems.physicalProperties.weight" },
296
- { path: "lineItems.catalogOverrideFields.physicalProperties.weight" },
297
- { path: "customLineItems.physicalProperties.weight" }
298
- ]
299
- }
300
- ]);
301
- const metadata = {
302
- entityFqdn: "wix.ecom.v1.cart",
303
- method: "PATCH",
304
- methodFqn: "com.wix.ecom.cart.api.v1.CurrentCartService.UpdateCurrentCart",
305
- packageName: PACKAGE_NAME,
306
- migrationOptions: {
307
- optInTransformResponse: true
308
- },
309
- url: resolveComWixEcomCartApiV1CurrentCartServiceUrl({
310
- protoPath: "/v1/carts/current",
311
- data: serializedData,
312
- host
313
- }),
314
- data: serializedData,
315
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
316
- {
317
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
318
- paths: [
319
- { path: "cart.createdDate" },
320
- { path: "cart.updatedDate" },
321
- { path: "cart.lineItems.image.urlExpirationDate" },
322
- {
323
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
324
- },
325
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
326
- { path: "cart.lineItems.serviceProperties.endDate" }
327
- ]
328
- },
329
- {
330
- transformFn: import_float2.transformRESTFloatToSDKFloat,
331
- paths: [
332
- { path: "cart.lineItems.image.focalPoint.x" },
333
- { path: "cart.lineItems.image.focalPoint.y" },
334
- { path: "cart.lineItems.physicalProperties.weight" },
335
- {
336
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
337
- },
338
- { path: "cart.contactInfo.address.geocode.latitude" },
339
- { path: "cart.contactInfo.address.geocode.longitude" }
340
- ]
341
- }
342
- ])
343
- };
344
- return metadata;
345
- }
346
- return __updateCurrentCart;
347
- }
348
- function addToCurrentCart(payload) {
349
- function __addToCurrentCart({ host }) {
350
- const serializedData = (0, import_transform_paths.transformPaths)(payload, [
351
- {
352
- transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
353
- paths: [
354
- { path: "lineItems.image.urlExpirationDate" },
355
- {
356
- path: "lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
357
- },
358
- { path: "lineItems.serviceProperties.scheduledDate" },
359
- { path: "lineItems.serviceProperties.endDate" },
360
- {
361
- path: "customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
362
- },
363
- { path: "customLineItems.serviceProperties.scheduledDate" },
364
- { path: "customLineItems.serviceProperties.endDate" }
365
- ]
366
- },
367
- {
368
- transformFn: import_float.transformSDKFloatToRESTFloat,
369
- paths: [
370
- { path: "lineItems.image.focalPoint.x" },
371
- { path: "lineItems.image.focalPoint.y" },
372
- { path: "lineItems.physicalProperties.weight" },
373
- { path: "lineItems.catalogOverrideFields.physicalProperties.weight" },
374
- { path: "customLineItems.physicalProperties.weight" }
375
- ]
376
- }
377
- ]);
378
- const metadata = {
379
- entityFqdn: "wix.ecom.v1.cart",
380
- method: "POST",
381
- methodFqn: "com.wix.ecom.cart.api.v1.CurrentCartService.AddToCurrentCart",
382
- packageName: PACKAGE_NAME,
383
- migrationOptions: {
384
- optInTransformResponse: true
385
- },
386
- url: resolveComWixEcomCartApiV1CurrentCartServiceUrl({
387
- protoPath: "/v1/carts/current/add-to-cart",
388
- data: serializedData,
389
- host
390
- }),
391
- data: serializedData,
392
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
393
- {
394
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
395
- paths: [
396
- { path: "cart.createdDate" },
397
- { path: "cart.updatedDate" },
398
- { path: "cart.lineItems.image.urlExpirationDate" },
399
- {
400
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
401
- },
402
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
403
- { path: "cart.lineItems.serviceProperties.endDate" }
404
- ]
405
- },
406
- {
407
- transformFn: import_float2.transformRESTFloatToSDKFloat,
408
- paths: [
409
- { path: "cart.lineItems.image.focalPoint.x" },
410
- { path: "cart.lineItems.image.focalPoint.y" },
411
- { path: "cart.lineItems.physicalProperties.weight" },
412
- {
413
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
414
- },
415
- { path: "cart.contactInfo.address.geocode.latitude" },
416
- { path: "cart.contactInfo.address.geocode.longitude" }
417
- ]
418
- }
419
- ])
420
- };
421
- return metadata;
422
- }
423
- return __addToCurrentCart;
424
- }
425
- function removeLineItemsFromCurrentCart(payload) {
426
- function __removeLineItemsFromCurrentCart({ host }) {
427
- const metadata = {
428
- entityFqdn: "wix.ecom.v1.cart",
429
- method: "POST",
430
- methodFqn: "com.wix.ecom.cart.api.v1.CurrentCartService.RemoveLineItemsFromCurrentCart",
431
- packageName: PACKAGE_NAME,
432
- migrationOptions: {
433
- optInTransformResponse: true
434
- },
435
- url: resolveComWixEcomCartApiV1CurrentCartServiceUrl({
436
- protoPath: "/v1/carts/current/remove-line-items",
437
- data: payload,
438
- host
439
- }),
440
- data: payload,
441
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
442
- {
443
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
444
- paths: [
445
- { path: "cart.createdDate" },
446
- { path: "cart.updatedDate" },
447
- { path: "cart.lineItems.image.urlExpirationDate" },
448
- {
449
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
450
- },
451
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
452
- { path: "cart.lineItems.serviceProperties.endDate" }
453
- ]
454
- },
455
- {
456
- transformFn: import_float2.transformRESTFloatToSDKFloat,
457
- paths: [
458
- { path: "cart.lineItems.image.focalPoint.x" },
459
- { path: "cart.lineItems.image.focalPoint.y" },
460
- { path: "cart.lineItems.physicalProperties.weight" },
461
- {
462
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
463
- },
464
- { path: "cart.contactInfo.address.geocode.latitude" },
465
- { path: "cart.contactInfo.address.geocode.longitude" }
466
- ]
467
- }
468
- ])
469
- };
470
- return metadata;
471
- }
472
- return __removeLineItemsFromCurrentCart;
473
- }
474
- function createCheckoutFromCurrentCart(payload) {
475
- function __createCheckoutFromCurrentCart({ host }) {
476
- const serializedData = (0, import_transform_paths.transformPaths)(payload, [
477
- {
478
- transformFn: import_float.transformSDKFloatToRESTFloat,
479
- paths: [
480
- { path: "shippingAddress.geocode.latitude" },
481
- { path: "shippingAddress.geocode.longitude" },
482
- { path: "billingAddress.geocode.latitude" },
483
- { path: "billingAddress.geocode.longitude" }
484
- ]
485
- }
486
- ]);
487
- const metadata = {
488
- entityFqdn: "wix.ecom.v1.cart",
489
- method: "POST",
490
- methodFqn: "com.wix.ecom.cart.api.v1.CurrentCartService.CreateCheckoutFromCurrentCart",
491
- packageName: PACKAGE_NAME,
492
- migrationOptions: {
493
- optInTransformResponse: true
494
- },
495
- url: resolveComWixEcomCartApiV1CurrentCartServiceUrl({
496
- protoPath: "/v1/carts/current/create-checkout",
497
- data: serializedData,
498
- host
499
- }),
500
- data: serializedData
501
- };
502
- return metadata;
503
- }
504
- return __createCheckoutFromCurrentCart;
505
- }
506
- function removeCouponFromCurrentCart(payload) {
507
- function __removeCouponFromCurrentCart({ host }) {
508
- const metadata = {
509
- entityFqdn: "wix.ecom.v1.cart",
510
- method: "POST",
511
- methodFqn: "com.wix.ecom.cart.api.v1.CurrentCartService.RemoveCouponFromCurrentCart",
512
- packageName: PACKAGE_NAME,
513
- migrationOptions: {
514
- optInTransformResponse: true
515
- },
516
- url: resolveComWixEcomCartApiV1CurrentCartServiceUrl({
517
- protoPath: "/v1/carts/current/remove-coupon",
518
- data: payload,
519
- host
520
- }),
521
- data: payload,
522
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
523
- {
524
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
525
- paths: [
526
- { path: "cart.createdDate" },
527
- { path: "cart.updatedDate" },
528
- { path: "cart.lineItems.image.urlExpirationDate" },
529
- {
530
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
531
- },
532
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
533
- { path: "cart.lineItems.serviceProperties.endDate" }
534
- ]
535
- },
536
- {
537
- transformFn: import_float2.transformRESTFloatToSDKFloat,
538
- paths: [
539
- { path: "cart.lineItems.image.focalPoint.x" },
540
- { path: "cart.lineItems.image.focalPoint.y" },
541
- { path: "cart.lineItems.physicalProperties.weight" },
542
- {
543
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
544
- },
545
- { path: "cart.contactInfo.address.geocode.latitude" },
546
- { path: "cart.contactInfo.address.geocode.longitude" }
547
- ]
548
- }
549
- ])
550
- };
551
- return metadata;
552
- }
553
- return __removeCouponFromCurrentCart;
554
- }
555
- function updateCurrentCartLineItemQuantity(payload) {
556
- function __updateCurrentCartLineItemQuantity({ host }) {
557
- const metadata = {
558
- entityFqdn: "wix.ecom.v1.cart",
559
- method: "POST",
560
- methodFqn: "com.wix.ecom.cart.api.v1.CurrentCartService.UpdateCurrentCartLineItemQuantity",
561
- packageName: PACKAGE_NAME,
562
- migrationOptions: {
563
- optInTransformResponse: true
564
- },
565
- url: resolveComWixEcomCartApiV1CurrentCartServiceUrl({
566
- protoPath: "/v1/carts/current/update-line-items-quantity",
567
- data: payload,
568
- host
569
- }),
570
- data: payload,
571
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
572
- {
573
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
574
- paths: [
575
- { path: "cart.createdDate" },
576
- { path: "cart.updatedDate" },
577
- { path: "cart.lineItems.image.urlExpirationDate" },
578
- {
579
- path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
580
- },
581
- { path: "cart.lineItems.serviceProperties.scheduledDate" },
582
- { path: "cart.lineItems.serviceProperties.endDate" }
583
- ]
584
- },
585
- {
586
- transformFn: import_float2.transformRESTFloatToSDKFloat,
587
- paths: [
588
- { path: "cart.lineItems.image.focalPoint.x" },
589
- { path: "cart.lineItems.image.focalPoint.y" },
590
- { path: "cart.lineItems.physicalProperties.weight" },
591
- {
592
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
593
- },
594
- { path: "cart.contactInfo.address.geocode.latitude" },
595
- { path: "cart.contactInfo.address.geocode.longitude" }
596
- ]
597
- }
598
- ])
599
- };
600
- return metadata;
601
- }
602
- return __updateCurrentCartLineItemQuantity;
603
- }
604
- function estimateCurrentCartTotals(payload) {
605
- function __estimateCurrentCartTotals({ host }) {
606
- const serializedData = (0, import_transform_paths.transformPaths)(payload, [
607
- {
608
- transformFn: import_float.transformSDKFloatToRESTFloat,
609
- paths: [
610
- { path: "shippingAddress.geocode.latitude" },
611
- { path: "shippingAddress.geocode.longitude" },
612
- { path: "billingAddress.geocode.latitude" },
613
- { path: "billingAddress.geocode.longitude" }
614
- ]
615
- }
616
- ]);
617
- const metadata = {
618
- entityFqdn: "wix.ecom.v1.cart",
619
- method: "POST",
620
- methodFqn: "com.wix.ecom.cart.api.v1.CurrentCartService.EstimateCurrentCartTotals",
621
- packageName: PACKAGE_NAME,
622
- migrationOptions: {
623
- optInTransformResponse: true
624
- },
625
- url: resolveComWixEcomCartApiV1CurrentCartServiceUrl({
626
- protoPath: "/v1/carts/current/estimate-totals",
627
- data: serializedData,
628
- host
629
- }),
630
- data: serializedData,
631
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
632
- {
633
- transformFn: import_timestamp2.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
- path: "shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from"
645
- },
646
- {
647
- path: "shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to"
648
- },
649
- {
650
- path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from"
651
- },
652
- {
653
- path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to"
654
- },
655
- { path: "membershipOptions.eligibleMemberships.expirationDate" },
656
- {
657
- path: "membershipOptions.invalidMemberships.membership.expirationDate"
658
- },
659
- {
660
- path: "membershipOptions.validatedExistingMemberships.memberships.membership.expirationDate"
661
- }
662
- ]
663
- },
664
- {
665
- transformFn: import_float2.transformRESTFloatToSDKFloat,
666
- paths: [
667
- { path: "cart.lineItems.image.focalPoint.x" },
668
- { path: "cart.lineItems.image.focalPoint.y" },
669
- { path: "cart.lineItems.physicalProperties.weight" },
670
- {
671
- path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
672
- },
673
- { path: "cart.contactInfo.address.geocode.latitude" },
674
- { path: "cart.contactInfo.address.geocode.longitude" },
675
- {
676
- path: "shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude"
677
- },
678
- {
679
- path: "shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude"
680
- },
681
- {
682
- path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude"
683
- },
684
- {
685
- path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude"
686
- },
687
- { path: "appliedDiscounts.merchantDiscount.percentage" }
688
- ]
689
- }
690
- ])
691
- };
692
- return metadata;
693
- }
694
- return __estimateCurrentCartTotals;
695
- }
696
- function deleteCurrentCart(payload) {
697
- function __deleteCurrentCart({ host }) {
698
- const metadata = {
699
- entityFqdn: "wix.ecom.v1.cart",
700
- method: "DELETE",
701
- methodFqn: "com.wix.ecom.cart.api.v1.CurrentCartService.DeleteCurrentCart",
702
- packageName: PACKAGE_NAME,
703
- migrationOptions: {
704
- optInTransformResponse: true
705
- },
706
- url: resolveComWixEcomCartApiV1CurrentCartServiceUrl({
707
- protoPath: "/v1/carts/current",
708
- data: payload,
709
- host
710
- }),
711
- params: (0, import_rest_modules.toURLSearchParams)(payload)
712
- };
713
- return metadata;
714
- }
715
- return __deleteCurrentCart;
716
- }
717
-
718
- // src/ecom-v1-cart-current-cart.universal.ts
719
- var import_address = require("@wix/sdk-runtime/transformations/address");
720
- var import_address2 = require("@wix/sdk-runtime/transformations/address");
721
- var import_image = require("@wix/sdk-runtime/transformations/image");
722
- var import_image2 = require("@wix/sdk-runtime/transformations/image");
723
- var import_page_url_v2 = require("@wix/sdk-runtime/transformations/page-url-v2");
724
- var import_page_url_v22 = require("@wix/sdk-runtime/transformations/page-url-v2");
725
- var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
726
- var DescriptionLineType = /* @__PURE__ */ ((DescriptionLineType2) => {
727
- DescriptionLineType2["UNRECOGNISED"] = "UNRECOGNISED";
728
- DescriptionLineType2["PLAIN_TEXT"] = "PLAIN_TEXT";
729
- DescriptionLineType2["COLOR"] = "COLOR";
730
- return DescriptionLineType2;
731
- })(DescriptionLineType || {});
732
- var ItemAvailabilityStatus = /* @__PURE__ */ ((ItemAvailabilityStatus2) => {
733
- ItemAvailabilityStatus2["AVAILABLE"] = "AVAILABLE";
734
- ItemAvailabilityStatus2["NOT_FOUND"] = "NOT_FOUND";
735
- ItemAvailabilityStatus2["NOT_AVAILABLE"] = "NOT_AVAILABLE";
736
- ItemAvailabilityStatus2["PARTIALLY_AVAILABLE"] = "PARTIALLY_AVAILABLE";
737
- return ItemAvailabilityStatus2;
738
- })(ItemAvailabilityStatus || {});
739
- var DimensionsUnit = /* @__PURE__ */ ((DimensionsUnit2) => {
740
- DimensionsUnit2["UNKNOWN_DIMENSIONS_UNIT"] = "UNKNOWN_DIMENSIONS_UNIT";
741
- DimensionsUnit2["MM"] = "MM";
742
- DimensionsUnit2["CM"] = "CM";
743
- DimensionsUnit2["M"] = "M";
744
- DimensionsUnit2["IN"] = "IN";
745
- DimensionsUnit2["FT"] = "FT";
746
- DimensionsUnit2["YD"] = "YD";
747
- return DimensionsUnit2;
748
- })(DimensionsUnit || {});
749
- var ItemTypePreset = /* @__PURE__ */ ((ItemTypePreset2) => {
750
- ItemTypePreset2["UNRECOGNISED"] = "UNRECOGNISED";
751
- ItemTypePreset2["PHYSICAL"] = "PHYSICAL";
752
- ItemTypePreset2["DIGITAL"] = "DIGITAL";
753
- ItemTypePreset2["GIFT_CARD"] = "GIFT_CARD";
754
- ItemTypePreset2["SERVICE"] = "SERVICE";
755
- return ItemTypePreset2;
756
- })(ItemTypePreset || {});
757
- var SubscriptionFrequency = /* @__PURE__ */ ((SubscriptionFrequency2) => {
758
- SubscriptionFrequency2["UNDEFINED"] = "UNDEFINED";
759
- SubscriptionFrequency2["DAY"] = "DAY";
760
- SubscriptionFrequency2["WEEK"] = "WEEK";
761
- SubscriptionFrequency2["MONTH"] = "MONTH";
762
- SubscriptionFrequency2["YEAR"] = "YEAR";
763
- return SubscriptionFrequency2;
764
- })(SubscriptionFrequency || {});
765
- var ProductPeriodAlignment = /* @__PURE__ */ ((ProductPeriodAlignment2) => {
766
- ProductPeriodAlignment2["ALIGNED_WITH_BILLING_PERIOD"] = "ALIGNED_WITH_BILLING_PERIOD";
767
- ProductPeriodAlignment2["NOT_ALIGNED_WITH_BILLING_PERIOD"] = "NOT_ALIGNED_WITH_BILLING_PERIOD";
768
- return ProductPeriodAlignment2;
769
- })(ProductPeriodAlignment || {});
770
- var FileType = /* @__PURE__ */ ((FileType2) => {
771
- FileType2["UNSPECIFIED"] = "UNSPECIFIED";
772
- FileType2["SECURE_PICTURE"] = "SECURE_PICTURE";
773
- FileType2["SECURE_VIDEO"] = "SECURE_VIDEO";
774
- FileType2["SECURE_DOCUMENT"] = "SECURE_DOCUMENT";
775
- FileType2["SECURE_MUSIC"] = "SECURE_MUSIC";
776
- FileType2["SECURE_ARCHIVE"] = "SECURE_ARCHIVE";
777
- FileType2["SECURE_RAW"] = "SECURE_RAW";
778
- return FileType2;
779
- })(FileType || {});
780
- var PaymentOptionType = /* @__PURE__ */ ((PaymentOptionType2) => {
781
- PaymentOptionType2["FULL_PAYMENT_ONLINE"] = "FULL_PAYMENT_ONLINE";
782
- PaymentOptionType2["FULL_PAYMENT_OFFLINE"] = "FULL_PAYMENT_OFFLINE";
783
- PaymentOptionType2["MEMBERSHIP"] = "MEMBERSHIP";
784
- PaymentOptionType2["DEPOSIT_ONLINE"] = "DEPOSIT_ONLINE";
785
- PaymentOptionType2["MEMBERSHIP_OFFLINE"] = "MEMBERSHIP_OFFLINE";
786
- PaymentOptionType2["MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER"] = "MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER";
787
- return PaymentOptionType2;
788
- })(PaymentOptionType || {});
789
- var TaxableAddressType = /* @__PURE__ */ ((TaxableAddressType2) => {
790
- TaxableAddressType2["BUSINESS"] = "BUSINESS";
791
- TaxableAddressType2["BILLING"] = "BILLING";
792
- TaxableAddressType2["SHIPPING"] = "SHIPPING";
793
- return TaxableAddressType2;
794
- })(TaxableAddressType || {});
795
- var PlatformFeeChargeType = /* @__PURE__ */ ((PlatformFeeChargeType2) => {
796
- PlatformFeeChargeType2["PASS_ON"] = "PASS_ON";
797
- PlatformFeeChargeType2["ABSORBED"] = "ABSORBED";
798
- return PlatformFeeChargeType2;
799
- })(PlatformFeeChargeType || {});
800
- var WeightUnit = /* @__PURE__ */ ((WeightUnit2) => {
801
- WeightUnit2["UNSPECIFIED_WEIGHT_UNIT"] = "UNSPECIFIED_WEIGHT_UNIT";
802
- WeightUnit2["KG"] = "KG";
803
- WeightUnit2["LB"] = "LB";
804
- return WeightUnit2;
805
- })(WeightUnit || {});
806
- var DiscountType = /* @__PURE__ */ ((DiscountType2) => {
807
- DiscountType2["GLOBAL"] = "GLOBAL";
808
- DiscountType2["SPECIFIC_ITEMS"] = "SPECIFIC_ITEMS";
809
- DiscountType2["SHIPPING"] = "SHIPPING";
810
- return DiscountType2;
811
- })(DiscountType || {});
812
- var VatType = /* @__PURE__ */ ((VatType2) => {
813
- VatType2["UNSPECIFIED"] = "UNSPECIFIED";
814
- VatType2["CPF"] = "CPF";
815
- VatType2["CNPJ"] = "CNPJ";
816
- return VatType2;
817
- })(VatType || {});
818
- var JurisdictionType = /* @__PURE__ */ ((JurisdictionType2) => {
819
- JurisdictionType2["UNDEFINED"] = "UNDEFINED";
820
- JurisdictionType2["COUNTRY"] = "COUNTRY";
821
- JurisdictionType2["STATE"] = "STATE";
822
- JurisdictionType2["COUNTY"] = "COUNTY";
823
- JurisdictionType2["CITY"] = "CITY";
824
- JurisdictionType2["SPECIAL"] = "SPECIAL";
825
- return JurisdictionType2;
826
- })(JurisdictionType || {});
827
- var RateType = /* @__PURE__ */ ((RateType2) => {
828
- RateType2["NO_TAX_COLLECTED"] = "NO_TAX_COLLECTED";
829
- RateType2["MANUAL_RATE"] = "MANUAL_RATE";
830
- RateType2["AUTO_RATE"] = "AUTO_RATE";
831
- RateType2["FALLBACK_RATE"] = "FALLBACK_RATE";
832
- return RateType2;
833
- })(RateType || {});
834
- var ManualCalculationReason = /* @__PURE__ */ ((ManualCalculationReason2) => {
835
- ManualCalculationReason2["GLOBAL_SETTING_TO_MANUAL"] = "GLOBAL_SETTING_TO_MANUAL";
836
- ManualCalculationReason2["REGION_SETTING_TO_MANUAL"] = "REGION_SETTING_TO_MANUAL";
837
- return ManualCalculationReason2;
838
- })(ManualCalculationReason || {});
839
- var FallbackReason = /* @__PURE__ */ ((FallbackReason2) => {
840
- FallbackReason2["AUTO_TAX_FAILED"] = "AUTO_TAX_FAILED";
841
- FallbackReason2["AUTO_TAX_DEACTIVATED"] = "AUTO_TAX_DEACTIVATED";
842
- return FallbackReason2;
843
- })(FallbackReason || {});
844
- var PickupMethod = /* @__PURE__ */ ((PickupMethod2) => {
845
- PickupMethod2["STORE_PICKUP"] = "STORE_PICKUP";
846
- PickupMethod2["PICKUP_POINT"] = "PICKUP_POINT";
847
- return PickupMethod2;
848
- })(PickupMethod || {});
849
- var ChargeType = /* @__PURE__ */ ((ChargeType2) => {
850
- ChargeType2["HANDLING_FEE"] = "HANDLING_FEE";
851
- ChargeType2["INSURANCE"] = "INSURANCE";
852
- return ChargeType2;
853
- })(ChargeType || {});
854
- var AppliedDiscountDiscountType = /* @__PURE__ */ ((AppliedDiscountDiscountType2) => {
855
- AppliedDiscountDiscountType2["GLOBAL"] = "GLOBAL";
856
- AppliedDiscountDiscountType2["SPECIFIC_ITEMS"] = "SPECIFIC_ITEMS";
857
- AppliedDiscountDiscountType2["SHIPPING"] = "SHIPPING";
858
- return AppliedDiscountDiscountType2;
859
- })(AppliedDiscountDiscountType || {});
860
- var RuleType = /* @__PURE__ */ ((RuleType2) => {
861
- RuleType2["VALIDATION"] = "VALIDATION";
862
- RuleType2["OTHER"] = "OTHER";
863
- RuleType2["MAX"] = "MAX";
864
- RuleType2["MIN"] = "MIN";
865
- RuleType2["MAX_LENGTH"] = "MAX_LENGTH";
866
- RuleType2["MIN_LENGTH"] = "MIN_LENGTH";
867
- RuleType2["MAX_SIZE"] = "MAX_SIZE";
868
- RuleType2["MIN_SIZE"] = "MIN_SIZE";
869
- RuleType2["FORMAT"] = "FORMAT";
870
- RuleType2["DECIMAL_LTE"] = "DECIMAL_LTE";
871
- RuleType2["DECIMAL_GTE"] = "DECIMAL_GTE";
872
- RuleType2["DECIMAL_LT"] = "DECIMAL_LT";
873
- RuleType2["DECIMAL_GT"] = "DECIMAL_GT";
874
- RuleType2["DECIMAL_MAX_SCALE"] = "DECIMAL_MAX_SCALE";
875
- RuleType2["INVALID_ENUM_VALUE"] = "INVALID_ENUM_VALUE";
876
- RuleType2["REQUIRED_FIELD"] = "REQUIRED_FIELD";
877
- RuleType2["FIELD_NOT_ALLOWED"] = "FIELD_NOT_ALLOWED";
878
- RuleType2["ONE_OF_ALIGNMENT"] = "ONE_OF_ALIGNMENT";
879
- RuleType2["EXACT_LENGTH"] = "EXACT_LENGTH";
880
- RuleType2["EXACT_SIZE"] = "EXACT_SIZE";
881
- RuleType2["REQUIRED_ONE_OF_FIELD"] = "REQUIRED_ONE_OF_FIELD";
882
- return RuleType2;
883
- })(RuleType || {});
884
- var BalanceType = /* @__PURE__ */ ((BalanceType2) => {
885
- BalanceType2["PUNCH_CARD"] = "PUNCH_CARD";
886
- BalanceType2["CREDIT"] = "CREDIT";
887
- return BalanceType2;
888
- })(BalanceType || {});
889
- var QuotaType = /* @__PURE__ */ ((QuotaType2) => {
890
- QuotaType2["LIMITED"] = "LIMITED";
891
- QuotaType2["UNLIMITED"] = "UNLIMITED";
892
- return QuotaType2;
893
- })(QuotaType || {});
894
- var LimitedQuotaType = /* @__PURE__ */ ((LimitedQuotaType2) => {
895
- LimitedQuotaType2["PUNCH_CARD"] = "PUNCH_CARD";
896
- LimitedQuotaType2["CREDIT"] = "CREDIT";
897
- return LimitedQuotaType2;
898
- })(LimitedQuotaType || {});
899
- var AdditionalFeeSource = /* @__PURE__ */ ((AdditionalFeeSource2) => {
900
- AdditionalFeeSource2["UNKNOWN_ADDITIONAL_FEE_SOURCE"] = "UNKNOWN_ADDITIONAL_FEE_SOURCE";
901
- AdditionalFeeSource2["SERVICE_PLUGIN"] = "SERVICE_PLUGIN";
902
- AdditionalFeeSource2["ITEM"] = "ITEM";
903
- AdditionalFeeSource2["MANUAL"] = "MANUAL";
904
- AdditionalFeeSource2["SHIPPING"] = "SHIPPING";
905
- AdditionalFeeSource2["PLATFORM"] = "PLATFORM";
906
- return AdditionalFeeSource2;
907
- })(AdditionalFeeSource || {});
908
- var Severity = /* @__PURE__ */ ((Severity2) => {
909
- Severity2["WARNING"] = "WARNING";
910
- Severity2["ERROR"] = "ERROR";
911
- return Severity2;
912
- })(Severity || {});
913
- var NameInOther = /* @__PURE__ */ ((NameInOther2) => {
914
- NameInOther2["OTHER_DEFAULT"] = "OTHER_DEFAULT";
915
- return NameInOther2;
916
- })(NameInOther || {});
917
- var NameInLineItem = /* @__PURE__ */ ((NameInLineItem2) => {
918
- NameInLineItem2["LINE_ITEM_DEFAULT"] = "LINE_ITEM_DEFAULT";
919
- return NameInLineItem2;
920
- })(NameInLineItem || {});
921
- var SuggestedFix = /* @__PURE__ */ ((SuggestedFix2) => {
922
- SuggestedFix2["UNKNOWN_SUGGESTED_FIX"] = "UNKNOWN_SUGGESTED_FIX";
923
- SuggestedFix2["REMOVE_LINE_ITEM"] = "REMOVE_LINE_ITEM";
924
- return SuggestedFix2;
925
- })(SuggestedFix || {});
926
- var ChannelType = /* @__PURE__ */ ((ChannelType2) => {
927
- ChannelType2["UNSPECIFIED"] = "UNSPECIFIED";
928
- ChannelType2["WEB"] = "WEB";
929
- ChannelType2["POS"] = "POS";
930
- ChannelType2["EBAY"] = "EBAY";
931
- ChannelType2["AMAZON"] = "AMAZON";
932
- ChannelType2["OTHER_PLATFORM"] = "OTHER_PLATFORM";
933
- ChannelType2["WIX_APP_STORE"] = "WIX_APP_STORE";
934
- ChannelType2["WIX_INVOICES"] = "WIX_INVOICES";
935
- ChannelType2["BACKOFFICE_MERCHANT"] = "BACKOFFICE_MERCHANT";
936
- ChannelType2["WISH"] = "WISH";
937
- ChannelType2["CLASS_PASS"] = "CLASS_PASS";
938
- ChannelType2["GLOBAL_E"] = "GLOBAL_E";
939
- ChannelType2["FACEBOOK"] = "FACEBOOK";
940
- ChannelType2["ETSY"] = "ETSY";
941
- ChannelType2["TIKTOK"] = "TIKTOK";
942
- ChannelType2["FAIRE_COM"] = "FAIRE_COM";
943
- ChannelType2["PAYPAL_AGENTIC_CHECKOUT"] = "PAYPAL_AGENTIC_CHECKOUT";
944
- ChannelType2["STRIPE_AGENTIC_CHECKOUT"] = "STRIPE_AGENTIC_CHECKOUT";
945
- ChannelType2["WIX_INVOICES_PLATFORM"] = "WIX_INVOICES_PLATFORM";
946
- ChannelType2["UCP_AGENTIC_CHECKOUT"] = "UCP_AGENTIC_CHECKOUT";
947
- return ChannelType2;
948
- })(ChannelType || {});
949
- var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
950
- WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
951
- WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
952
- WebhookIdentityType2["MEMBER"] = "MEMBER";
953
- WebhookIdentityType2["WIX_USER"] = "WIX_USER";
954
- WebhookIdentityType2["APP"] = "APP";
955
- return WebhookIdentityType2;
956
- })(WebhookIdentityType || {});
957
- async function getCurrentCart() {
958
- const { httpClient, sideEffects } = arguments[0];
959
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
960
- const reqOpts = currentCartGetCurrentCart(payload);
961
- sideEffects?.onSiteCall?.();
962
- try {
963
- const result = await httpClient.request(reqOpts);
964
- sideEffects?.onSuccess?.(result);
965
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
966
- (0, import_transform_paths2.transformPaths)(result.data, [
967
- {
968
- transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
969
- paths: [{ path: "cart.lineItems.url" }]
970
- },
971
- {
972
- transformFn: import_image2.transformRESTImageToSDKImage,
973
- paths: [
974
- { path: "cart.lineItems.image" },
975
- { path: "cart.lineItems.catalogOverrideFields.image" }
976
- ]
977
- },
978
- {
979
- transformFn: import_address2.transformRESTAddressToSDKAddress,
980
- paths: [{ path: "cart.contactInfo.address" }]
981
- }
982
- ])
983
- )?.cart;
984
- } catch (err) {
985
- const transformedError = (0, import_transform_error.transformError)(
986
- err,
987
- {
988
- spreadPathsToArguments: {},
989
- explicitPathsToArguments: {},
990
- singleArgumentUnchanged: false
991
- },
992
- []
993
- );
994
- sideEffects?.onError?.(err);
995
- throw transformedError;
996
- }
997
- }
998
- async function updateCurrentCart2(options) {
999
- const { httpClient, sideEffects } = arguments[1];
1000
- const payload = (0, import_transform_paths2.transformPaths)(
1001
- (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1002
- cartInfo: options?.cartInfo,
1003
- couponCode: options?.couponCode,
1004
- lineItems: options?.lineItems,
1005
- customLineItems: options?.customLineItems
1006
- }),
1007
- [
1008
- {
1009
- transformFn: import_page_url_v2.transformSDKPageURLV2ToRESTPageURLV2,
1010
- paths: [
1011
- { path: "cartInfo.lineItems.url" },
1012
- { path: "lineItems.url" },
1013
- { path: "customLineItems.url" }
1014
- ]
1015
- },
1016
- {
1017
- transformFn: import_image.transformSDKImageToRESTImage,
1018
- paths: [
1019
- { path: "cartInfo.lineItems.image" },
1020
- { path: "cartInfo.lineItems.catalogOverrideFields.image" },
1021
- { path: "lineItems.image" },
1022
- { path: "lineItems.catalogOverrideFields.image" },
1023
- { path: "customLineItems.media" }
1024
- ]
1025
- },
1026
- {
1027
- transformFn: import_address.transformSDKAddressToRESTAddress,
1028
- paths: [{ path: "cartInfo.contactInfo.address" }]
1029
- }
1030
- ]
1031
- );
1032
- const reqOpts = updateCurrentCart(payload);
1033
- sideEffects?.onSiteCall?.();
1034
- try {
1035
- const result = await httpClient.request(reqOpts);
1036
- sideEffects?.onSuccess?.(result);
1037
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1038
- (0, import_transform_paths2.transformPaths)(result.data, [
1039
- {
1040
- transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1041
- paths: [{ path: "cart.lineItems.url" }]
1042
- },
1043
- {
1044
- transformFn: import_image2.transformRESTImageToSDKImage,
1045
- paths: [
1046
- { path: "cart.lineItems.image" },
1047
- { path: "cart.lineItems.catalogOverrideFields.image" }
1048
- ]
1049
- },
1050
- {
1051
- transformFn: import_address2.transformRESTAddressToSDKAddress,
1052
- paths: [{ path: "cart.contactInfo.address" }]
1053
- }
1054
- ])
1055
- )?.cart;
1056
- } catch (err) {
1057
- const transformedError = (0, import_transform_error.transformError)(
1058
- err,
1059
- {
1060
- spreadPathsToArguments: {},
1061
- explicitPathsToArguments: {
1062
- cartInfo: "$[0].cartInfo",
1063
- couponCode: "$[0].couponCode",
1064
- lineItems: "$[0].lineItems",
1065
- customLineItems: "$[0].customLineItems"
1066
- },
1067
- singleArgumentUnchanged: false
1068
- },
1069
- ["options"]
1070
- );
1071
- sideEffects?.onError?.(err);
1072
- throw transformedError;
1073
- }
1074
- }
1075
- async function addToCurrentCart2(options) {
1076
- const { httpClient, sideEffects } = arguments[1];
1077
- const payload = (0, import_transform_paths2.transformPaths)(
1078
- (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1079
- lineItems: options?.lineItems,
1080
- customLineItems: options?.customLineItems,
1081
- businessLocationId: options?.businessLocationId
1082
- }),
1083
- [
1084
- {
1085
- transformFn: import_page_url_v2.transformSDKPageURLV2ToRESTPageURLV2,
1086
- paths: [{ path: "lineItems.url" }, { path: "customLineItems.url" }]
1087
- },
1088
- {
1089
- transformFn: import_image.transformSDKImageToRESTImage,
1090
- paths: [
1091
- { path: "lineItems.image" },
1092
- { path: "lineItems.catalogOverrideFields.image" },
1093
- { path: "customLineItems.media" }
1094
- ]
1095
- }
1096
- ]
1097
- );
1098
- const reqOpts = addToCurrentCart(payload);
1099
- sideEffects?.onSiteCall?.();
1100
- try {
1101
- const result = await httpClient.request(reqOpts);
1102
- sideEffects?.onSuccess?.(result);
1103
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1104
- (0, import_transform_paths2.transformPaths)(result.data, [
1105
- {
1106
- transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1107
- paths: [{ path: "cart.lineItems.url" }]
1108
- },
1109
- {
1110
- transformFn: import_image2.transformRESTImageToSDKImage,
1111
- paths: [
1112
- { path: "cart.lineItems.image" },
1113
- { path: "cart.lineItems.catalogOverrideFields.image" }
1114
- ]
1115
- },
1116
- {
1117
- transformFn: import_address2.transformRESTAddressToSDKAddress,
1118
- paths: [{ path: "cart.contactInfo.address" }]
1119
- }
1120
- ])
1121
- );
1122
- } catch (err) {
1123
- const transformedError = (0, import_transform_error.transformError)(
1124
- err,
1125
- {
1126
- spreadPathsToArguments: {},
1127
- explicitPathsToArguments: {
1128
- lineItems: "$[0].lineItems",
1129
- customLineItems: "$[0].customLineItems",
1130
- businessLocationId: "$[0].businessLocationId"
1131
- },
1132
- singleArgumentUnchanged: false
1133
- },
1134
- ["options"]
1135
- );
1136
- sideEffects?.onError?.(err);
1137
- throw transformedError;
1138
- }
1139
- }
1140
- async function removeLineItemsFromCurrentCart2(lineItemIds) {
1141
- const { httpClient, sideEffects } = arguments[1];
1142
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1143
- lineItemIds
1144
- });
1145
- const reqOpts = removeLineItemsFromCurrentCart(payload);
1146
- sideEffects?.onSiteCall?.();
1147
- try {
1148
- const result = await httpClient.request(reqOpts);
1149
- sideEffects?.onSuccess?.(result);
1150
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1151
- (0, import_transform_paths2.transformPaths)(result.data, [
1152
- {
1153
- transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1154
- paths: [{ path: "cart.lineItems.url" }]
1155
- },
1156
- {
1157
- transformFn: import_image2.transformRESTImageToSDKImage,
1158
- paths: [
1159
- { path: "cart.lineItems.image" },
1160
- { path: "cart.lineItems.catalogOverrideFields.image" }
1161
- ]
1162
- },
1163
- {
1164
- transformFn: import_address2.transformRESTAddressToSDKAddress,
1165
- paths: [{ path: "cart.contactInfo.address" }]
1166
- }
1167
- ])
1168
- );
1169
- } catch (err) {
1170
- const transformedError = (0, import_transform_error.transformError)(
1171
- err,
1172
- {
1173
- spreadPathsToArguments: {},
1174
- explicitPathsToArguments: { lineItemIds: "$[0]" },
1175
- singleArgumentUnchanged: false
1176
- },
1177
- ["lineItemIds"]
1178
- );
1179
- sideEffects?.onError?.(err);
1180
- throw transformedError;
1181
- }
1182
- }
1183
- async function createCheckoutFromCurrentCart2(options) {
1184
- const { httpClient, sideEffects } = arguments[1];
1185
- const payload = (0, import_transform_paths2.transformPaths)(
1186
- (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1187
- channelType: options?.channelType,
1188
- shippingAddress: options?.shippingAddress,
1189
- billingAddress: options?.billingAddress,
1190
- selectedShippingOption: options?.selectedShippingOption,
1191
- email: options?.email
1192
- }),
1193
- [
1194
- {
1195
- transformFn: import_address.transformSDKAddressToRESTAddress,
1196
- paths: [{ path: "shippingAddress" }, { path: "billingAddress" }]
1197
- }
1198
- ]
1199
- );
1200
- const reqOpts = createCheckoutFromCurrentCart(payload);
1201
- sideEffects?.onSiteCall?.();
1202
- try {
1203
- const result = await httpClient.request(reqOpts);
1204
- sideEffects?.onSuccess?.(result);
1205
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1206
- } catch (err) {
1207
- const transformedError = (0, import_transform_error.transformError)(
1208
- err,
1209
- {
1210
- spreadPathsToArguments: {},
1211
- explicitPathsToArguments: {
1212
- channelType: "$[0].channelType",
1213
- shippingAddress: "$[0].shippingAddress",
1214
- billingAddress: "$[0].billingAddress",
1215
- selectedShippingOption: "$[0].selectedShippingOption",
1216
- email: "$[0].email"
1217
- },
1218
- singleArgumentUnchanged: false
1219
- },
1220
- ["options"]
1221
- );
1222
- sideEffects?.onError?.(err);
1223
- throw transformedError;
1224
- }
1225
- }
1226
- async function removeCouponFromCurrentCart2() {
1227
- const { httpClient, sideEffects } = arguments[0];
1228
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
1229
- const reqOpts = removeCouponFromCurrentCart(payload);
1230
- sideEffects?.onSiteCall?.();
1231
- try {
1232
- const result = await httpClient.request(reqOpts);
1233
- sideEffects?.onSuccess?.(result);
1234
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1235
- (0, import_transform_paths2.transformPaths)(result.data, [
1236
- {
1237
- transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1238
- paths: [{ path: "cart.lineItems.url" }]
1239
- },
1240
- {
1241
- transformFn: import_image2.transformRESTImageToSDKImage,
1242
- paths: [
1243
- { path: "cart.lineItems.image" },
1244
- { path: "cart.lineItems.catalogOverrideFields.image" }
1245
- ]
1246
- },
1247
- {
1248
- transformFn: import_address2.transformRESTAddressToSDKAddress,
1249
- paths: [{ path: "cart.contactInfo.address" }]
1250
- }
1251
- ])
1252
- );
1253
- } catch (err) {
1254
- const transformedError = (0, import_transform_error.transformError)(
1255
- err,
1256
- {
1257
- spreadPathsToArguments: {},
1258
- explicitPathsToArguments: {},
1259
- singleArgumentUnchanged: false
1260
- },
1261
- []
1262
- );
1263
- sideEffects?.onError?.(err);
1264
- throw transformedError;
1265
- }
1266
- }
1267
- async function updateCurrentCartLineItemQuantity2(lineItems) {
1268
- const { httpClient, sideEffects } = arguments[1];
1269
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1270
- lineItems
1271
- });
1272
- const reqOpts = updateCurrentCartLineItemQuantity(payload);
1273
- sideEffects?.onSiteCall?.();
1274
- try {
1275
- const result = await httpClient.request(reqOpts);
1276
- sideEffects?.onSuccess?.(result);
1277
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1278
- (0, import_transform_paths2.transformPaths)(result.data, [
1279
- {
1280
- transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1281
- paths: [{ path: "cart.lineItems.url" }]
1282
- },
1283
- {
1284
- transformFn: import_image2.transformRESTImageToSDKImage,
1285
- paths: [
1286
- { path: "cart.lineItems.image" },
1287
- { path: "cart.lineItems.catalogOverrideFields.image" }
1288
- ]
1289
- },
1290
- {
1291
- transformFn: import_address2.transformRESTAddressToSDKAddress,
1292
- paths: [{ path: "cart.contactInfo.address" }]
1293
- }
1294
- ])
1295
- );
1296
- } catch (err) {
1297
- const transformedError = (0, import_transform_error.transformError)(
1298
- err,
1299
- {
1300
- spreadPathsToArguments: {},
1301
- explicitPathsToArguments: { lineItems: "$[0]" },
1302
- singleArgumentUnchanged: false
1303
- },
1304
- ["lineItems"]
1305
- );
1306
- sideEffects?.onError?.(err);
1307
- throw transformedError;
1308
- }
1309
- }
1310
- async function estimateCurrentCartTotals2(options) {
1311
- const { httpClient, sideEffects } = arguments[1];
1312
- const payload = (0, import_transform_paths2.transformPaths)(
1313
- (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1314
- selectedShippingOption: options?.selectedShippingOption,
1315
- shippingAddress: options?.shippingAddress,
1316
- billingAddress: options?.billingAddress,
1317
- selectedMemberships: options?.selectedMemberships,
1318
- calculateTax: options?.calculateTax,
1319
- calculateShipping: options?.calculateShipping,
1320
- calculateAdditionalFees: options?.calculateAdditionalFees
1321
- }),
1322
- [
1323
- {
1324
- transformFn: import_address.transformSDKAddressToRESTAddress,
1325
- paths: [{ path: "shippingAddress" }, { path: "billingAddress" }]
1326
- }
1327
- ]
1328
- );
1329
- const reqOpts = estimateCurrentCartTotals(payload);
1330
- sideEffects?.onSiteCall?.();
1331
- try {
1332
- const result = await httpClient.request(reqOpts);
1333
- sideEffects?.onSuccess?.(result);
1334
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1335
- (0, import_transform_paths2.transformPaths)(result.data, [
1336
- {
1337
- transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1338
- paths: [{ path: "cart.lineItems.url" }]
1339
- },
1340
- {
1341
- transformFn: import_image2.transformRESTImageToSDKImage,
1342
- paths: [
1343
- { path: "cart.lineItems.image" },
1344
- { path: "cart.lineItems.catalogOverrideFields.image" }
1345
- ]
1346
- },
1347
- {
1348
- transformFn: import_address2.transformRESTAddressToSDKAddress,
1349
- paths: [
1350
- { path: "cart.contactInfo.address" },
1351
- {
1352
- path: "shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address"
1353
- },
1354
- {
1355
- path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address"
1356
- }
1357
- ]
1358
- }
1359
- ])
1360
- );
1361
- } catch (err) {
1362
- const transformedError = (0, import_transform_error.transformError)(
1363
- err,
1364
- {
1365
- spreadPathsToArguments: {},
1366
- explicitPathsToArguments: {
1367
- selectedShippingOption: "$[0].selectedShippingOption",
1368
- shippingAddress: "$[0].shippingAddress",
1369
- billingAddress: "$[0].billingAddress",
1370
- selectedMemberships: "$[0].selectedMemberships",
1371
- calculateTax: "$[0].calculateTax",
1372
- calculateShipping: "$[0].calculateShipping",
1373
- calculateAdditionalFees: "$[0].calculateAdditionalFees"
1374
- },
1375
- singleArgumentUnchanged: false
1376
- },
1377
- ["options"]
1378
- );
1379
- sideEffects?.onError?.(err);
1380
- throw transformedError;
1381
- }
1382
- }
1383
- async function deleteCurrentCart2() {
1384
- const { httpClient, sideEffects } = arguments[0];
1385
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
1386
- const reqOpts = deleteCurrentCart(payload);
1387
- sideEffects?.onSiteCall?.();
1388
- try {
1389
- const result = await httpClient.request(reqOpts);
1390
- sideEffects?.onSuccess?.(result);
1391
- } catch (err) {
1392
- const transformedError = (0, import_transform_error.transformError)(
1393
- err,
1394
- {
1395
- spreadPathsToArguments: {},
1396
- explicitPathsToArguments: {},
1397
- singleArgumentUnchanged: false
1398
- },
1399
- []
1400
- );
1401
- sideEffects?.onError?.(err);
1402
- throw transformedError;
1403
- }
1404
- }
1405
-
1406
- // src/ecom-v1-cart-current-cart.public.ts
1407
- function getCurrentCart2(httpClient) {
1408
- return () => getCurrentCart(
1409
- // @ts-ignore
1410
- { httpClient }
1411
- );
1412
- }
1413
- function updateCurrentCart3(httpClient) {
1414
- return (options) => updateCurrentCart2(
1415
- options,
1416
- // @ts-ignore
1417
- { httpClient }
1418
- );
1419
- }
1420
- function addToCurrentCart3(httpClient) {
1421
- return (options) => addToCurrentCart2(
1422
- options,
1423
- // @ts-ignore
1424
- { httpClient }
1425
- );
1426
- }
1427
- function removeLineItemsFromCurrentCart3(httpClient) {
1428
- return (lineItemIds) => removeLineItemsFromCurrentCart2(
1429
- lineItemIds,
1430
- // @ts-ignore
1431
- { httpClient }
1432
- );
1433
- }
1434
- function createCheckoutFromCurrentCart3(httpClient) {
1435
- return (options) => createCheckoutFromCurrentCart2(
1436
- options,
1437
- // @ts-ignore
1438
- { httpClient }
1439
- );
1440
- }
1441
- function removeCouponFromCurrentCart3(httpClient) {
1442
- return () => removeCouponFromCurrentCart2(
1443
- // @ts-ignore
1444
- { httpClient }
1445
- );
1446
- }
1447
- function updateCurrentCartLineItemQuantity3(httpClient) {
1448
- return (lineItems) => updateCurrentCartLineItemQuantity2(
1449
- lineItems,
1450
- // @ts-ignore
1451
- { httpClient }
1452
- );
1453
- }
1454
- function estimateCurrentCartTotals3(httpClient) {
1455
- return (options) => estimateCurrentCartTotals2(
1456
- options,
1457
- // @ts-ignore
1458
- { httpClient }
1459
- );
1460
- }
1461
- function deleteCurrentCart3(httpClient) {
1462
- return () => deleteCurrentCart2(
1463
- // @ts-ignore
1464
- { httpClient }
1465
- );
1466
- }
1467
- var onCartDeleted = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
1468
- "wix.ecom.v1.cart_deleted",
1469
- true,
1470
- (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
1471
- (0, import_transform_paths3.transformPaths)(event, [
1472
- {
1473
- transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
1474
- paths: [
1475
- { path: "undefined.createdDate" },
1476
- { path: "undefined.updatedDate" },
1477
- {
1478
- path: "undefined.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
1479
- },
1480
- { path: "undefined.lineItems.serviceProperties.scheduledDate" },
1481
- { path: "undefined.lineItems.serviceProperties.endDate" },
1482
- { path: "metadata.eventTime" }
1483
- ]
1484
- },
1485
- {
1486
- transformFn: import_page_url_v23.transformRESTPageURLV2ToSDKPageURLV2,
1487
- paths: [{ path: "undefined.lineItems.url" }]
1488
- },
1489
- {
1490
- transformFn: import_image3.transformRESTImageToSDKImage,
1491
- paths: [
1492
- { path: "undefined.lineItems.image" },
1493
- { path: "undefined.lineItems.catalogOverrideFields.image" }
1494
- ]
1495
- },
1496
- {
1497
- transformFn: import_float3.transformRESTFloatToSDKFloat,
1498
- paths: [
1499
- { path: "undefined.lineItems.physicalProperties.weight" },
1500
- {
1501
- path: "undefined.lineItems.catalogOverrideFields.physicalProperties.weight"
1502
- }
1503
- ]
1504
- },
1505
- {
1506
- transformFn: import_address3.transformRESTAddressToSDKAddress,
1507
- paths: [{ path: "undefined.contactInfo.address" }]
1508
- }
1509
- ])
1510
- )
1511
- )();
1512
- var onCartUpdated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
1513
- "wix.ecom.v1.cart_updated",
1514
- true,
1515
- (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
1516
- (0, import_transform_paths3.transformPaths)(event, [
1517
- {
1518
- transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
1519
- paths: [
1520
- { path: "entity.createdDate" },
1521
- { path: "entity.updatedDate" },
1522
- {
1523
- path: "entity.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
1524
- },
1525
- { path: "entity.lineItems.serviceProperties.scheduledDate" },
1526
- { path: "entity.lineItems.serviceProperties.endDate" },
1527
- { path: "metadata.eventTime" },
1528
- { path: "modifiedFields.createdDate" },
1529
- { path: "modifiedFields.updatedDate" },
1530
- {
1531
- path: "modifiedFields.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
1532
- },
1533
- {
1534
- path: "modifiedFields.lineItems.serviceProperties.scheduledDate"
1535
- },
1536
- { path: "modifiedFields.lineItems.serviceProperties.endDate" }
1537
- ]
1538
- },
1539
- {
1540
- transformFn: import_page_url_v23.transformRESTPageURLV2ToSDKPageURLV2,
1541
- paths: [
1542
- { path: "entity.lineItems.url" },
1543
- { path: "modifiedFields.lineItems.url" }
1544
- ]
1545
- },
1546
- {
1547
- transformFn: import_image3.transformRESTImageToSDKImage,
1548
- paths: [
1549
- { path: "entity.lineItems.image" },
1550
- { path: "entity.lineItems.catalogOverrideFields.image" },
1551
- { path: "modifiedFields.lineItems.image" },
1552
- { path: "modifiedFields.lineItems.catalogOverrideFields.image" }
1553
- ]
1554
- },
1555
- {
1556
- transformFn: import_float3.transformRESTFloatToSDKFloat,
1557
- paths: [
1558
- { path: "entity.lineItems.physicalProperties.weight" },
1559
- {
1560
- path: "entity.lineItems.catalogOverrideFields.physicalProperties.weight"
1561
- },
1562
- { path: "modifiedFields.lineItems.physicalProperties.weight" },
1563
- {
1564
- path: "modifiedFields.lineItems.catalogOverrideFields.physicalProperties.weight"
1565
- }
1566
- ]
1567
- },
1568
- {
1569
- transformFn: import_address3.transformRESTAddressToSDKAddress,
1570
- paths: [
1571
- { path: "entity.contactInfo.address" },
1572
- { path: "modifiedFields.contactInfo.address" }
1573
- ]
1574
- }
1575
- ])
1576
- )
1577
- )();
1578
- var onCartCreated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
1579
- "wix.ecom.v1.cart_created",
1580
- true,
1581
- (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
1582
- (0, import_transform_paths3.transformPaths)(event, [
1583
- {
1584
- transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
1585
- paths: [
1586
- { path: "entity.createdDate" },
1587
- { path: "entity.updatedDate" },
1588
- {
1589
- path: "entity.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
1590
- },
1591
- { path: "entity.lineItems.serviceProperties.scheduledDate" },
1592
- { path: "entity.lineItems.serviceProperties.endDate" },
1593
- { path: "metadata.eventTime" }
1594
- ]
1595
- },
1596
- {
1597
- transformFn: import_page_url_v23.transformRESTPageURLV2ToSDKPageURLV2,
1598
- paths: [{ path: "entity.lineItems.url" }]
1599
- },
1600
- {
1601
- transformFn: import_image3.transformRESTImageToSDKImage,
1602
- paths: [
1603
- { path: "entity.lineItems.image" },
1604
- { path: "entity.lineItems.catalogOverrideFields.image" }
1605
- ]
1606
- },
1607
- {
1608
- transformFn: import_float3.transformRESTFloatToSDKFloat,
1609
- paths: [
1610
- { path: "entity.lineItems.physicalProperties.weight" },
1611
- {
1612
- path: "entity.lineItems.catalogOverrideFields.physicalProperties.weight"
1613
- }
1614
- ]
1615
- },
1616
- {
1617
- transformFn: import_address3.transformRESTAddressToSDKAddress,
1618
- paths: [{ path: "entity.contactInfo.address" }]
1619
- }
1620
- ])
1621
- )
1622
- )();
1623
-
1624
- // src/ecom-v1-cart-current-cart.context.ts
1625
- var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
1626
- var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
1627
- var getCurrentCart3 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getCurrentCart2);
1628
- var updateCurrentCart4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateCurrentCart3);
1629
- var addToCurrentCart4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(addToCurrentCart3);
1630
- var removeLineItemsFromCurrentCart4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(removeLineItemsFromCurrentCart3);
1631
- var createCheckoutFromCurrentCart4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createCheckoutFromCurrentCart3);
1632
- var removeCouponFromCurrentCart4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(removeCouponFromCurrentCart3);
1633
- var updateCurrentCartLineItemQuantity4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateCurrentCartLineItemQuantity3);
1634
- var estimateCurrentCartTotals4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(estimateCurrentCartTotals3);
1635
- var deleteCurrentCart4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteCurrentCart3);
1636
- var onCartDeleted2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(onCartDeleted);
1637
- var onCartUpdated2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(onCartUpdated);
1638
- var onCartCreated2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(onCartCreated);
1639
- // Annotate the CommonJS export names for ESM import in node:
1640
- 0 && (module.exports = {
1641
- AdditionalFeeSource,
1642
- AppliedDiscountDiscountType,
1643
- BalanceType,
1644
- ChannelType,
1645
- ChargeType,
1646
- DescriptionLineType,
1647
- DimensionsUnit,
1648
- DiscountType,
1649
- FallbackReason,
1650
- FileType,
1651
- ItemAvailabilityStatus,
1652
- ItemTypePreset,
1653
- JurisdictionType,
1654
- LimitedQuotaType,
1655
- ManualCalculationReason,
1656
- NameInLineItem,
1657
- NameInOther,
1658
- PaymentOptionType,
1659
- PickupMethod,
1660
- PlatformFeeChargeType,
1661
- ProductPeriodAlignment,
1662
- QuotaType,
1663
- RateType,
1664
- RuleType,
1665
- Severity,
1666
- SubscriptionFrequency,
1667
- SuggestedFix,
1668
- TaxableAddressType,
1669
- VatType,
1670
- WebhookIdentityType,
1671
- WeightUnit,
1672
- addToCurrentCart,
1673
- createCheckoutFromCurrentCart,
1674
- deleteCurrentCart,
1675
- estimateCurrentCartTotals,
1676
- getCurrentCart,
1677
- onCartCreated,
1678
- onCartDeleted,
1679
- onCartUpdated,
1680
- removeCouponFromCurrentCart,
1681
- removeLineItemsFromCurrentCart,
1682
- updateCurrentCart,
1683
- updateCurrentCartLineItemQuantity
1684
- });
1685
- //# sourceMappingURL=index.js.map