@wix/auto_sdk_ecom_checkout 1.0.168 → 1.0.170

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,2887 +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
- BalanceType: () => BalanceType,
25
- ChannelType: () => ChannelType,
26
- ChargeType: () => ChargeType,
27
- DescriptionLineType: () => DescriptionLineType,
28
- DimensionsUnit: () => DimensionsUnit,
29
- DiscountType: () => DiscountType,
30
- FallbackReason: () => FallbackReason,
31
- FileType: () => FileType,
32
- ItemAvailabilityStatus: () => ItemAvailabilityStatus,
33
- ItemTypePreset: () => ItemTypePreset,
34
- JurisdictionType: () => JurisdictionType,
35
- ManualCalculationReason: () => ManualCalculationReason,
36
- NameInLineItem: () => NameInLineItem,
37
- NameInOther: () => NameInOther,
38
- PaymentOptionType: () => PaymentOptionType,
39
- PickupMethod: () => PickupMethod,
40
- PlatformFeeChargeType: () => PlatformFeeChargeType,
41
- ProductPeriodAlignment: () => ProductPeriodAlignment,
42
- RateType: () => RateType,
43
- RuleType: () => RuleType,
44
- Severity: () => Severity,
45
- SubscriptionFrequency: () => SubscriptionFrequency,
46
- SuggestedFix: () => SuggestedFix,
47
- TaxableAddressType: () => TaxableAddressType,
48
- VatType: () => VatType,
49
- WebhookIdentityType: () => WebhookIdentityType,
50
- WeightUnit: () => WeightUnit,
51
- addToCheckout: () => addToCheckout4,
52
- createCheckout: () => createCheckout4,
53
- createOrder: () => createOrder4,
54
- createOrderAndCharge: () => createOrderAndCharge4,
55
- getCheckout: () => getCheckout4,
56
- getCheckoutByCartId: () => getCheckoutByCartId4,
57
- getCheckoutUrl: () => getCheckoutUrl4,
58
- getWixCheckoutUrl: () => getWixCheckoutUrl4,
59
- markCheckoutAsCompleted: () => markCheckoutAsCompleted4,
60
- markCheckoutAsCompletedAndRedirectToUrl: () => markCheckoutAsCompletedAndRedirectToUrl4,
61
- onCheckoutCompleted: () => onCheckoutCompleted2,
62
- onCheckoutCreated: () => onCheckoutCreated2,
63
- onCheckoutDeleted: () => onCheckoutDeleted2,
64
- onCheckoutUpdated: () => onCheckoutUpdated2,
65
- removeCoupon: () => removeCoupon4,
66
- removeGiftCard: () => removeGiftCard4,
67
- removeLineItems: () => removeLineItems4,
68
- removeOverrideCheckoutUrl: () => removeOverrideCheckoutUrl4,
69
- updateCheckout: () => updateCheckout4,
70
- updateLineItemsQuantity: () => updateLineItemsQuantity4
71
- });
72
- module.exports = __toCommonJS(index_exports);
73
-
74
- // src/ecom-v1-checkout-checkout.public.ts
75
- var import_rename_all_nested_keys2 = require("@wix/sdk-runtime/rename-all-nested-keys");
76
- var import_address3 = require("@wix/sdk-runtime/transformations/address");
77
- var import_float3 = require("@wix/sdk-runtime/transformations/float");
78
- var import_image3 = require("@wix/sdk-runtime/transformations/image");
79
- var import_page_url_v23 = require("@wix/sdk-runtime/transformations/page-url-v2");
80
- var import_timestamp3 = require("@wix/sdk-runtime/transformations/timestamp");
81
- var import_transform_paths3 = require("@wix/sdk-runtime/transformations/transform-paths");
82
- var import_sdk_types = require("@wix/sdk-types");
83
-
84
- // src/ecom-v1-checkout-checkout.universal.ts
85
- var import_transform_error = require("@wix/sdk-runtime/transform-error");
86
- var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
87
-
88
- // src/ecom-v1-checkout-checkout.http.ts
89
- var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
90
- var import_float = require("@wix/sdk-runtime/transformations/float");
91
- var import_float2 = require("@wix/sdk-runtime/transformations/float");
92
- var import_bytes = require("@wix/sdk-runtime/transformations/bytes");
93
- var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
94
- var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
95
- var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
96
- var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
97
- var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
98
- function resolveComWixEcomCheckoutApiV1CheckoutServiceUrl(opts) {
99
- const domainToMappings = {
100
- "api._api_base_domain_": [
101
- {
102
- srcPath: "/checkout",
103
- destPath: ""
104
- }
105
- ]
106
- };
107
- return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
108
- }
109
- var PACKAGE_NAME = "@wix/auto_sdk_ecom_checkout";
110
- function createCheckout(payload) {
111
- function __createCheckout({ host }) {
112
- const serializedData = (0, import_transform_paths.transformPaths)(payload, [
113
- {
114
- transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
115
- paths: [
116
- { path: "checkoutInfo.createdDate" },
117
- { path: "checkoutInfo.updatedDate" },
118
- { path: "checkoutInfo.lineItems.media.urlExpirationDate" },
119
- {
120
- path: "checkoutInfo.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
121
- },
122
- { path: "checkoutInfo.lineItems.serviceProperties.scheduledDate" },
123
- { path: "checkoutInfo.lineItems.serviceProperties.endDate" },
124
- {
125
- path: "checkoutInfo.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from"
126
- },
127
- {
128
- path: "checkoutInfo.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to"
129
- },
130
- {
131
- path: "checkoutInfo.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from"
132
- },
133
- {
134
- path: "checkoutInfo.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to"
135
- },
136
- {
137
- path: "checkoutInfo.membershipOptions.eligibleMemberships.expirationDate"
138
- },
139
- {
140
- path: "checkoutInfo.membershipOptions.invalidMemberships.membership.expirationDate"
141
- },
142
- { path: "checkoutInfo.subscriptionCharges.charges.cycleBillingDate" },
143
- { path: "lineItems.media.urlExpirationDate" },
144
- {
145
- path: "lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
146
- },
147
- { path: "lineItems.serviceProperties.scheduledDate" },
148
- { path: "lineItems.serviceProperties.endDate" },
149
- {
150
- path: "customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
151
- },
152
- { path: "customLineItems.serviceProperties.scheduledDate" },
153
- { path: "customLineItems.serviceProperties.endDate" }
154
- ]
155
- },
156
- {
157
- transformFn: import_float.transformSDKFloatToRESTFloat,
158
- paths: [
159
- { path: "checkoutInfo.lineItems.media.focalPoint.x" },
160
- { path: "checkoutInfo.lineItems.media.focalPoint.y" },
161
- { path: "lineItems.media.focalPoint.x" },
162
- { path: "lineItems.media.focalPoint.y" },
163
- { path: "checkoutInfo.lineItems.physicalProperties.weight" },
164
- {
165
- path: "checkoutInfo.lineItems.catalogOverrideFields.physicalProperties.weight"
166
- },
167
- { path: "checkoutInfo.billingInfo.address.geocode.latitude" },
168
- { path: "checkoutInfo.billingInfo.address.geocode.longitude" },
169
- {
170
- path: "checkoutInfo.shippingInfo.shippingDestination.address.geocode.latitude"
171
- },
172
- {
173
- path: "checkoutInfo.shippingInfo.shippingDestination.address.geocode.longitude"
174
- },
175
- {
176
- path: "checkoutInfo.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude"
177
- },
178
- {
179
- path: "checkoutInfo.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude"
180
- },
181
- {
182
- path: "checkoutInfo.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude"
183
- },
184
- {
185
- path: "checkoutInfo.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude"
186
- },
187
- { path: "checkoutInfo.appliedDiscounts.merchantDiscount.percentage" },
188
- { path: "lineItems.physicalProperties.weight" },
189
- { path: "lineItems.catalogOverrideFields.physicalProperties.weight" },
190
- { path: "customLineItems.physicalProperties.weight" }
191
- ]
192
- }
193
- ]);
194
- const metadata = {
195
- entityFqdn: "wix.ecom.v1.checkout",
196
- method: "POST",
197
- methodFqn: "com.wix.ecom.checkout.api.v1.CheckoutService.CreateCheckout",
198
- packageName: PACKAGE_NAME,
199
- migrationOptions: {
200
- optInTransformResponse: true
201
- },
202
- url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({
203
- protoPath: "/v1/checkouts",
204
- data: serializedData,
205
- host
206
- }),
207
- data: serializedData,
208
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
209
- {
210
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
211
- paths: [
212
- { path: "checkout.createdDate" },
213
- { path: "checkout.updatedDate" },
214
- { path: "checkout.lineItems.media.urlExpirationDate" },
215
- {
216
- path: "checkout.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
217
- },
218
- { path: "checkout.lineItems.serviceProperties.scheduledDate" },
219
- { path: "checkout.lineItems.serviceProperties.endDate" },
220
- {
221
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from"
222
- },
223
- {
224
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to"
225
- },
226
- {
227
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from"
228
- },
229
- {
230
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to"
231
- },
232
- {
233
- path: "checkout.membershipOptions.eligibleMemberships.expirationDate"
234
- },
235
- {
236
- path: "checkout.membershipOptions.invalidMemberships.membership.expirationDate"
237
- },
238
- { path: "checkout.subscriptionCharges.charges.cycleBillingDate" }
239
- ]
240
- },
241
- {
242
- transformFn: import_float2.transformRESTFloatToSDKFloat,
243
- paths: [
244
- { path: "checkout.lineItems.media.focalPoint.x" },
245
- { path: "checkout.lineItems.media.focalPoint.y" },
246
- { path: "checkout.lineItems.physicalProperties.weight" },
247
- {
248
- path: "checkout.lineItems.catalogOverrideFields.physicalProperties.weight"
249
- },
250
- { path: "checkout.billingInfo.address.geocode.latitude" },
251
- { path: "checkout.billingInfo.address.geocode.longitude" },
252
- {
253
- path: "checkout.shippingInfo.shippingDestination.address.geocode.latitude"
254
- },
255
- {
256
- path: "checkout.shippingInfo.shippingDestination.address.geocode.longitude"
257
- },
258
- {
259
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude"
260
- },
261
- {
262
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude"
263
- },
264
- {
265
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude"
266
- },
267
- {
268
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude"
269
- },
270
- { path: "checkout.appliedDiscounts.merchantDiscount.percentage" }
271
- ]
272
- }
273
- ])
274
- };
275
- return metadata;
276
- }
277
- return __createCheckout;
278
- }
279
- function getCheckout(payload) {
280
- function __getCheckout({ host }) {
281
- const metadata = {
282
- entityFqdn: "wix.ecom.v1.checkout",
283
- method: "GET",
284
- methodFqn: "com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckout",
285
- packageName: PACKAGE_NAME,
286
- migrationOptions: {
287
- optInTransformResponse: true
288
- },
289
- url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({
290
- protoPath: "/v1/checkouts/{id}",
291
- data: payload,
292
- host
293
- }),
294
- params: (0, import_rest_modules.toURLSearchParams)(payload),
295
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
296
- {
297
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
298
- paths: [
299
- { path: "checkout.createdDate" },
300
- { path: "checkout.updatedDate" },
301
- { path: "checkout.lineItems.media.urlExpirationDate" },
302
- {
303
- path: "checkout.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
304
- },
305
- { path: "checkout.lineItems.serviceProperties.scheduledDate" },
306
- { path: "checkout.lineItems.serviceProperties.endDate" },
307
- {
308
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from"
309
- },
310
- {
311
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to"
312
- },
313
- {
314
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from"
315
- },
316
- {
317
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to"
318
- },
319
- {
320
- path: "checkout.membershipOptions.eligibleMemberships.expirationDate"
321
- },
322
- {
323
- path: "checkout.membershipOptions.invalidMemberships.membership.expirationDate"
324
- },
325
- { path: "checkout.subscriptionCharges.charges.cycleBillingDate" }
326
- ]
327
- },
328
- {
329
- transformFn: import_float2.transformRESTFloatToSDKFloat,
330
- paths: [
331
- { path: "checkout.lineItems.media.focalPoint.x" },
332
- { path: "checkout.lineItems.media.focalPoint.y" },
333
- { path: "checkout.lineItems.physicalProperties.weight" },
334
- {
335
- path: "checkout.lineItems.catalogOverrideFields.physicalProperties.weight"
336
- },
337
- { path: "checkout.billingInfo.address.geocode.latitude" },
338
- { path: "checkout.billingInfo.address.geocode.longitude" },
339
- {
340
- path: "checkout.shippingInfo.shippingDestination.address.geocode.latitude"
341
- },
342
- {
343
- path: "checkout.shippingInfo.shippingDestination.address.geocode.longitude"
344
- },
345
- {
346
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude"
347
- },
348
- {
349
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude"
350
- },
351
- {
352
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude"
353
- },
354
- {
355
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude"
356
- },
357
- { path: "checkout.appliedDiscounts.merchantDiscount.percentage" }
358
- ]
359
- }
360
- ])
361
- };
362
- return metadata;
363
- }
364
- return __getCheckout;
365
- }
366
- function getCheckoutByCartId(payload) {
367
- function __getCheckoutByCartId({ host }) {
368
- const metadata = {
369
- entityFqdn: "wix.ecom.v1.checkout",
370
- method: "GET",
371
- methodFqn: "com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckoutByCartId",
372
- packageName: PACKAGE_NAME,
373
- migrationOptions: {
374
- optInTransformResponse: true
375
- },
376
- url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({
377
- protoPath: "/v1/checkouts/by-cart-id/{id}",
378
- data: payload,
379
- host
380
- }),
381
- params: (0, import_rest_modules.toURLSearchParams)(payload),
382
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
383
- {
384
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
385
- paths: [
386
- { path: "checkout.createdDate" },
387
- { path: "checkout.updatedDate" },
388
- { path: "checkout.lineItems.media.urlExpirationDate" },
389
- {
390
- path: "checkout.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
391
- },
392
- { path: "checkout.lineItems.serviceProperties.scheduledDate" },
393
- { path: "checkout.lineItems.serviceProperties.endDate" },
394
- {
395
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from"
396
- },
397
- {
398
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to"
399
- },
400
- {
401
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from"
402
- },
403
- {
404
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to"
405
- },
406
- {
407
- path: "checkout.membershipOptions.eligibleMemberships.expirationDate"
408
- },
409
- {
410
- path: "checkout.membershipOptions.invalidMemberships.membership.expirationDate"
411
- },
412
- { path: "checkout.subscriptionCharges.charges.cycleBillingDate" }
413
- ]
414
- },
415
- {
416
- transformFn: import_float2.transformRESTFloatToSDKFloat,
417
- paths: [
418
- { path: "checkout.lineItems.media.focalPoint.x" },
419
- { path: "checkout.lineItems.media.focalPoint.y" },
420
- { path: "checkout.lineItems.physicalProperties.weight" },
421
- {
422
- path: "checkout.lineItems.catalogOverrideFields.physicalProperties.weight"
423
- },
424
- { path: "checkout.billingInfo.address.geocode.latitude" },
425
- { path: "checkout.billingInfo.address.geocode.longitude" },
426
- {
427
- path: "checkout.shippingInfo.shippingDestination.address.geocode.latitude"
428
- },
429
- {
430
- path: "checkout.shippingInfo.shippingDestination.address.geocode.longitude"
431
- },
432
- {
433
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude"
434
- },
435
- {
436
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude"
437
- },
438
- {
439
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude"
440
- },
441
- {
442
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude"
443
- },
444
- { path: "checkout.appliedDiscounts.merchantDiscount.percentage" }
445
- ]
446
- }
447
- ])
448
- };
449
- return metadata;
450
- }
451
- return __getCheckoutByCartId;
452
- }
453
- function getWixCheckoutUrl(payload) {
454
- function __getWixCheckoutUrl({ host }) {
455
- const metadata = {
456
- entityFqdn: "wix.ecom.v1.checkout",
457
- method: "GET",
458
- methodFqn: "com.wix.ecom.checkout.api.v1.CheckoutService.GetWixCheckoutURL",
459
- packageName: PACKAGE_NAME,
460
- migrationOptions: {
461
- optInTransformResponse: true
462
- },
463
- url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({
464
- protoPath: "/v1/checkouts/{id}/wix-checkout-url",
465
- data: payload,
466
- host
467
- }),
468
- params: (0, import_rest_modules.toURLSearchParams)(payload)
469
- };
470
- return metadata;
471
- }
472
- return __getWixCheckoutUrl;
473
- }
474
- function getCheckoutUrl(payload) {
475
- function __getCheckoutUrl({ host }) {
476
- const metadata = {
477
- entityFqdn: "wix.ecom.v1.checkout",
478
- method: "GET",
479
- methodFqn: "com.wix.ecom.checkout.api.v1.CheckoutService.GetCheckoutURL",
480
- packageName: PACKAGE_NAME,
481
- migrationOptions: {
482
- optInTransformResponse: true
483
- },
484
- url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({
485
- protoPath: "/v1/checkouts/{id}/checkout-url",
486
- data: payload,
487
- host
488
- }),
489
- params: (0, import_rest_modules.toURLSearchParams)(payload)
490
- };
491
- return metadata;
492
- }
493
- return __getCheckoutUrl;
494
- }
495
- function updateCheckout(payload) {
496
- function __updateCheckout({ host }) {
497
- const serializedData = (0, import_transform_paths.transformPaths)(payload, [
498
- {
499
- transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
500
- paths: [{ path: "fieldMask" }]
501
- },
502
- {
503
- transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
504
- paths: [
505
- { path: "checkout.createdDate" },
506
- { path: "checkout.updatedDate" },
507
- { path: "checkout.lineItems.media.urlExpirationDate" },
508
- {
509
- path: "checkout.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
510
- },
511
- { path: "checkout.lineItems.serviceProperties.scheduledDate" },
512
- { path: "checkout.lineItems.serviceProperties.endDate" },
513
- {
514
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from"
515
- },
516
- {
517
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to"
518
- },
519
- {
520
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from"
521
- },
522
- {
523
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to"
524
- },
525
- {
526
- path: "checkout.membershipOptions.eligibleMemberships.expirationDate"
527
- },
528
- {
529
- path: "checkout.membershipOptions.invalidMemberships.membership.expirationDate"
530
- },
531
- { path: "checkout.subscriptionCharges.charges.cycleBillingDate" },
532
- { path: "lineItems.media.urlExpirationDate" },
533
- {
534
- path: "lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
535
- },
536
- { path: "lineItems.serviceProperties.scheduledDate" },
537
- { path: "lineItems.serviceProperties.endDate" },
538
- {
539
- path: "customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
540
- },
541
- { path: "customLineItems.serviceProperties.scheduledDate" },
542
- { path: "customLineItems.serviceProperties.endDate" }
543
- ]
544
- },
545
- {
546
- transformFn: import_float.transformSDKFloatToRESTFloat,
547
- paths: [
548
- { path: "checkout.lineItems.media.focalPoint.x" },
549
- { path: "checkout.lineItems.media.focalPoint.y" },
550
- { path: "lineItems.media.focalPoint.x" },
551
- { path: "lineItems.media.focalPoint.y" },
552
- { path: "checkout.lineItems.physicalProperties.weight" },
553
- {
554
- path: "checkout.lineItems.catalogOverrideFields.physicalProperties.weight"
555
- },
556
- { path: "checkout.billingInfo.address.geocode.latitude" },
557
- { path: "checkout.billingInfo.address.geocode.longitude" },
558
- {
559
- path: "checkout.shippingInfo.shippingDestination.address.geocode.latitude"
560
- },
561
- {
562
- path: "checkout.shippingInfo.shippingDestination.address.geocode.longitude"
563
- },
564
- {
565
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude"
566
- },
567
- {
568
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude"
569
- },
570
- {
571
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude"
572
- },
573
- {
574
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude"
575
- },
576
- { path: "checkout.appliedDiscounts.merchantDiscount.percentage" },
577
- { path: "lineItems.physicalProperties.weight" },
578
- { path: "lineItems.catalogOverrideFields.physicalProperties.weight" },
579
- { path: "customLineItems.physicalProperties.weight" }
580
- ]
581
- }
582
- ]);
583
- const metadata = {
584
- entityFqdn: "wix.ecom.v1.checkout",
585
- method: "PATCH",
586
- methodFqn: "com.wix.ecom.checkout.api.v1.CheckoutService.UpdateCheckout",
587
- packageName: PACKAGE_NAME,
588
- migrationOptions: {
589
- optInTransformResponse: true
590
- },
591
- url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({
592
- protoPath: "/v1/checkouts/{checkout.id}",
593
- data: serializedData,
594
- host
595
- }),
596
- data: serializedData,
597
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
598
- {
599
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
600
- paths: [
601
- { path: "checkout.createdDate" },
602
- { path: "checkout.updatedDate" },
603
- { path: "checkout.lineItems.media.urlExpirationDate" },
604
- {
605
- path: "checkout.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
606
- },
607
- { path: "checkout.lineItems.serviceProperties.scheduledDate" },
608
- { path: "checkout.lineItems.serviceProperties.endDate" },
609
- {
610
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from"
611
- },
612
- {
613
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to"
614
- },
615
- {
616
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from"
617
- },
618
- {
619
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to"
620
- },
621
- {
622
- path: "checkout.membershipOptions.eligibleMemberships.expirationDate"
623
- },
624
- {
625
- path: "checkout.membershipOptions.invalidMemberships.membership.expirationDate"
626
- },
627
- { path: "checkout.subscriptionCharges.charges.cycleBillingDate" }
628
- ]
629
- },
630
- {
631
- transformFn: import_float2.transformRESTFloatToSDKFloat,
632
- paths: [
633
- { path: "checkout.lineItems.media.focalPoint.x" },
634
- { path: "checkout.lineItems.media.focalPoint.y" },
635
- { path: "checkout.lineItems.physicalProperties.weight" },
636
- {
637
- path: "checkout.lineItems.catalogOverrideFields.physicalProperties.weight"
638
- },
639
- { path: "checkout.billingInfo.address.geocode.latitude" },
640
- { path: "checkout.billingInfo.address.geocode.longitude" },
641
- {
642
- path: "checkout.shippingInfo.shippingDestination.address.geocode.latitude"
643
- },
644
- {
645
- path: "checkout.shippingInfo.shippingDestination.address.geocode.longitude"
646
- },
647
- {
648
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude"
649
- },
650
- {
651
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude"
652
- },
653
- {
654
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude"
655
- },
656
- {
657
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude"
658
- },
659
- { path: "checkout.appliedDiscounts.merchantDiscount.percentage" }
660
- ]
661
- }
662
- ])
663
- };
664
- return metadata;
665
- }
666
- return __updateCheckout;
667
- }
668
- function removeCoupon(payload) {
669
- function __removeCoupon({ host }) {
670
- const metadata = {
671
- entityFqdn: "wix.ecom.v1.checkout",
672
- method: "POST",
673
- methodFqn: "com.wix.ecom.checkout.api.v1.CheckoutService.RemoveCoupon",
674
- packageName: PACKAGE_NAME,
675
- migrationOptions: {
676
- optInTransformResponse: true
677
- },
678
- url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({
679
- protoPath: "/v1/checkouts/{id}/remove-coupon",
680
- data: payload,
681
- host
682
- }),
683
- data: payload,
684
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
685
- {
686
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
687
- paths: [
688
- { path: "checkout.createdDate" },
689
- { path: "checkout.updatedDate" },
690
- { path: "checkout.lineItems.media.urlExpirationDate" },
691
- {
692
- path: "checkout.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
693
- },
694
- { path: "checkout.lineItems.serviceProperties.scheduledDate" },
695
- { path: "checkout.lineItems.serviceProperties.endDate" },
696
- {
697
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from"
698
- },
699
- {
700
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to"
701
- },
702
- {
703
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from"
704
- },
705
- {
706
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to"
707
- },
708
- {
709
- path: "checkout.membershipOptions.eligibleMemberships.expirationDate"
710
- },
711
- {
712
- path: "checkout.membershipOptions.invalidMemberships.membership.expirationDate"
713
- },
714
- { path: "checkout.subscriptionCharges.charges.cycleBillingDate" }
715
- ]
716
- },
717
- {
718
- transformFn: import_float2.transformRESTFloatToSDKFloat,
719
- paths: [
720
- { path: "checkout.lineItems.media.focalPoint.x" },
721
- { path: "checkout.lineItems.media.focalPoint.y" },
722
- { path: "checkout.lineItems.physicalProperties.weight" },
723
- {
724
- path: "checkout.lineItems.catalogOverrideFields.physicalProperties.weight"
725
- },
726
- { path: "checkout.billingInfo.address.geocode.latitude" },
727
- { path: "checkout.billingInfo.address.geocode.longitude" },
728
- {
729
- path: "checkout.shippingInfo.shippingDestination.address.geocode.latitude"
730
- },
731
- {
732
- path: "checkout.shippingInfo.shippingDestination.address.geocode.longitude"
733
- },
734
- {
735
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude"
736
- },
737
- {
738
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude"
739
- },
740
- {
741
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude"
742
- },
743
- {
744
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude"
745
- },
746
- { path: "checkout.appliedDiscounts.merchantDiscount.percentage" }
747
- ]
748
- }
749
- ])
750
- };
751
- return metadata;
752
- }
753
- return __removeCoupon;
754
- }
755
- function removeGiftCard(payload) {
756
- function __removeGiftCard({ host }) {
757
- const metadata = {
758
- entityFqdn: "wix.ecom.v1.checkout",
759
- method: "POST",
760
- methodFqn: "com.wix.ecom.checkout.api.v1.CheckoutService.RemoveGiftCard",
761
- packageName: PACKAGE_NAME,
762
- migrationOptions: {
763
- optInTransformResponse: true
764
- },
765
- url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({
766
- protoPath: "/v1/checkouts/{id}/remove-gift-card",
767
- data: payload,
768
- host
769
- }),
770
- data: payload,
771
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
772
- {
773
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
774
- paths: [
775
- { path: "checkout.createdDate" },
776
- { path: "checkout.updatedDate" },
777
- { path: "checkout.lineItems.media.urlExpirationDate" },
778
- {
779
- path: "checkout.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
780
- },
781
- { path: "checkout.lineItems.serviceProperties.scheduledDate" },
782
- { path: "checkout.lineItems.serviceProperties.endDate" },
783
- {
784
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from"
785
- },
786
- {
787
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to"
788
- },
789
- {
790
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from"
791
- },
792
- {
793
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to"
794
- },
795
- {
796
- path: "checkout.membershipOptions.eligibleMemberships.expirationDate"
797
- },
798
- {
799
- path: "checkout.membershipOptions.invalidMemberships.membership.expirationDate"
800
- },
801
- { path: "checkout.subscriptionCharges.charges.cycleBillingDate" }
802
- ]
803
- },
804
- {
805
- transformFn: import_float2.transformRESTFloatToSDKFloat,
806
- paths: [
807
- { path: "checkout.lineItems.media.focalPoint.x" },
808
- { path: "checkout.lineItems.media.focalPoint.y" },
809
- { path: "checkout.lineItems.physicalProperties.weight" },
810
- {
811
- path: "checkout.lineItems.catalogOverrideFields.physicalProperties.weight"
812
- },
813
- { path: "checkout.billingInfo.address.geocode.latitude" },
814
- { path: "checkout.billingInfo.address.geocode.longitude" },
815
- {
816
- path: "checkout.shippingInfo.shippingDestination.address.geocode.latitude"
817
- },
818
- {
819
- path: "checkout.shippingInfo.shippingDestination.address.geocode.longitude"
820
- },
821
- {
822
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude"
823
- },
824
- {
825
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude"
826
- },
827
- {
828
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude"
829
- },
830
- {
831
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude"
832
- },
833
- { path: "checkout.appliedDiscounts.merchantDiscount.percentage" }
834
- ]
835
- }
836
- ])
837
- };
838
- return metadata;
839
- }
840
- return __removeGiftCard;
841
- }
842
- function removeOverrideCheckoutUrl(payload) {
843
- function __removeOverrideCheckoutUrl({ host }) {
844
- const metadata = {
845
- entityFqdn: "wix.ecom.v1.checkout",
846
- method: "POST",
847
- methodFqn: "com.wix.ecom.checkout.api.v1.CheckoutService.RemoveOverrideCheckoutUrl",
848
- packageName: PACKAGE_NAME,
849
- migrationOptions: {
850
- optInTransformResponse: true
851
- },
852
- url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({
853
- protoPath: "/v1/checkouts/{id}/remove-override-checkout-url",
854
- data: payload,
855
- host
856
- }),
857
- data: payload,
858
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
859
- {
860
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
861
- paths: [
862
- { path: "checkout.createdDate" },
863
- { path: "checkout.updatedDate" },
864
- { path: "checkout.lineItems.media.urlExpirationDate" },
865
- {
866
- path: "checkout.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
867
- },
868
- { path: "checkout.lineItems.serviceProperties.scheduledDate" },
869
- { path: "checkout.lineItems.serviceProperties.endDate" },
870
- {
871
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from"
872
- },
873
- {
874
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to"
875
- },
876
- {
877
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from"
878
- },
879
- {
880
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to"
881
- },
882
- {
883
- path: "checkout.membershipOptions.eligibleMemberships.expirationDate"
884
- },
885
- {
886
- path: "checkout.membershipOptions.invalidMemberships.membership.expirationDate"
887
- },
888
- { path: "checkout.subscriptionCharges.charges.cycleBillingDate" }
889
- ]
890
- },
891
- {
892
- transformFn: import_float2.transformRESTFloatToSDKFloat,
893
- paths: [
894
- { path: "checkout.lineItems.media.focalPoint.x" },
895
- { path: "checkout.lineItems.media.focalPoint.y" },
896
- { path: "checkout.lineItems.physicalProperties.weight" },
897
- {
898
- path: "checkout.lineItems.catalogOverrideFields.physicalProperties.weight"
899
- },
900
- { path: "checkout.billingInfo.address.geocode.latitude" },
901
- { path: "checkout.billingInfo.address.geocode.longitude" },
902
- {
903
- path: "checkout.shippingInfo.shippingDestination.address.geocode.latitude"
904
- },
905
- {
906
- path: "checkout.shippingInfo.shippingDestination.address.geocode.longitude"
907
- },
908
- {
909
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude"
910
- },
911
- {
912
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude"
913
- },
914
- {
915
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude"
916
- },
917
- {
918
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude"
919
- },
920
- { path: "checkout.appliedDiscounts.merchantDiscount.percentage" }
921
- ]
922
- }
923
- ])
924
- };
925
- return metadata;
926
- }
927
- return __removeOverrideCheckoutUrl;
928
- }
929
- function addToCheckout(payload) {
930
- function __addToCheckout({ host }) {
931
- const serializedData = (0, import_transform_paths.transformPaths)(payload, [
932
- {
933
- transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
934
- paths: [
935
- { path: "lineItems.media.urlExpirationDate" },
936
- {
937
- path: "lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
938
- },
939
- { path: "lineItems.serviceProperties.scheduledDate" },
940
- { path: "lineItems.serviceProperties.endDate" },
941
- {
942
- path: "customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
943
- },
944
- { path: "customLineItems.serviceProperties.scheduledDate" },
945
- { path: "customLineItems.serviceProperties.endDate" }
946
- ]
947
- },
948
- {
949
- transformFn: import_float.transformSDKFloatToRESTFloat,
950
- paths: [
951
- { path: "lineItems.media.focalPoint.x" },
952
- { path: "lineItems.media.focalPoint.y" },
953
- { path: "lineItems.physicalProperties.weight" },
954
- { path: "lineItems.catalogOverrideFields.physicalProperties.weight" },
955
- { path: "customLineItems.physicalProperties.weight" }
956
- ]
957
- }
958
- ]);
959
- const metadata = {
960
- entityFqdn: "wix.ecom.v1.checkout",
961
- method: "POST",
962
- methodFqn: "com.wix.ecom.checkout.api.v1.CheckoutService.AddToCheckout",
963
- packageName: PACKAGE_NAME,
964
- migrationOptions: {
965
- optInTransformResponse: true
966
- },
967
- url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({
968
- protoPath: "/v1/checkouts/{id}/add-to-checkout",
969
- data: serializedData,
970
- host
971
- }),
972
- data: serializedData,
973
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
974
- {
975
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
976
- paths: [
977
- { path: "checkout.createdDate" },
978
- { path: "checkout.updatedDate" },
979
- { path: "checkout.lineItems.media.urlExpirationDate" },
980
- {
981
- path: "checkout.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
982
- },
983
- { path: "checkout.lineItems.serviceProperties.scheduledDate" },
984
- { path: "checkout.lineItems.serviceProperties.endDate" },
985
- {
986
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from"
987
- },
988
- {
989
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to"
990
- },
991
- {
992
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from"
993
- },
994
- {
995
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to"
996
- },
997
- {
998
- path: "checkout.membershipOptions.eligibleMemberships.expirationDate"
999
- },
1000
- {
1001
- path: "checkout.membershipOptions.invalidMemberships.membership.expirationDate"
1002
- },
1003
- { path: "checkout.subscriptionCharges.charges.cycleBillingDate" }
1004
- ]
1005
- },
1006
- {
1007
- transformFn: import_float2.transformRESTFloatToSDKFloat,
1008
- paths: [
1009
- { path: "checkout.lineItems.media.focalPoint.x" },
1010
- { path: "checkout.lineItems.media.focalPoint.y" },
1011
- { path: "checkout.lineItems.physicalProperties.weight" },
1012
- {
1013
- path: "checkout.lineItems.catalogOverrideFields.physicalProperties.weight"
1014
- },
1015
- { path: "checkout.billingInfo.address.geocode.latitude" },
1016
- { path: "checkout.billingInfo.address.geocode.longitude" },
1017
- {
1018
- path: "checkout.shippingInfo.shippingDestination.address.geocode.latitude"
1019
- },
1020
- {
1021
- path: "checkout.shippingInfo.shippingDestination.address.geocode.longitude"
1022
- },
1023
- {
1024
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude"
1025
- },
1026
- {
1027
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude"
1028
- },
1029
- {
1030
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude"
1031
- },
1032
- {
1033
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude"
1034
- },
1035
- { path: "checkout.appliedDiscounts.merchantDiscount.percentage" }
1036
- ]
1037
- }
1038
- ])
1039
- };
1040
- return metadata;
1041
- }
1042
- return __addToCheckout;
1043
- }
1044
- function removeLineItems(payload) {
1045
- function __removeLineItems({ host }) {
1046
- const metadata = {
1047
- entityFqdn: "wix.ecom.v1.checkout",
1048
- method: "POST",
1049
- methodFqn: "com.wix.ecom.checkout.api.v1.CheckoutService.RemoveLineItems",
1050
- packageName: PACKAGE_NAME,
1051
- migrationOptions: {
1052
- optInTransformResponse: true
1053
- },
1054
- url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({
1055
- protoPath: "/v1/checkouts/{id}/remove-line-items",
1056
- data: payload,
1057
- host
1058
- }),
1059
- data: payload,
1060
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
1061
- {
1062
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
1063
- paths: [
1064
- { path: "checkout.createdDate" },
1065
- { path: "checkout.updatedDate" },
1066
- { path: "checkout.lineItems.media.urlExpirationDate" },
1067
- {
1068
- path: "checkout.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
1069
- },
1070
- { path: "checkout.lineItems.serviceProperties.scheduledDate" },
1071
- { path: "checkout.lineItems.serviceProperties.endDate" },
1072
- {
1073
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from"
1074
- },
1075
- {
1076
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to"
1077
- },
1078
- {
1079
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from"
1080
- },
1081
- {
1082
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to"
1083
- },
1084
- {
1085
- path: "checkout.membershipOptions.eligibleMemberships.expirationDate"
1086
- },
1087
- {
1088
- path: "checkout.membershipOptions.invalidMemberships.membership.expirationDate"
1089
- },
1090
- { path: "checkout.subscriptionCharges.charges.cycleBillingDate" }
1091
- ]
1092
- },
1093
- {
1094
- transformFn: import_float2.transformRESTFloatToSDKFloat,
1095
- paths: [
1096
- { path: "checkout.lineItems.media.focalPoint.x" },
1097
- { path: "checkout.lineItems.media.focalPoint.y" },
1098
- { path: "checkout.lineItems.physicalProperties.weight" },
1099
- {
1100
- path: "checkout.lineItems.catalogOverrideFields.physicalProperties.weight"
1101
- },
1102
- { path: "checkout.billingInfo.address.geocode.latitude" },
1103
- { path: "checkout.billingInfo.address.geocode.longitude" },
1104
- {
1105
- path: "checkout.shippingInfo.shippingDestination.address.geocode.latitude"
1106
- },
1107
- {
1108
- path: "checkout.shippingInfo.shippingDestination.address.geocode.longitude"
1109
- },
1110
- {
1111
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude"
1112
- },
1113
- {
1114
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude"
1115
- },
1116
- {
1117
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude"
1118
- },
1119
- {
1120
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude"
1121
- },
1122
- { path: "checkout.appliedDiscounts.merchantDiscount.percentage" }
1123
- ]
1124
- }
1125
- ])
1126
- };
1127
- return metadata;
1128
- }
1129
- return __removeLineItems;
1130
- }
1131
- function createOrder(payload) {
1132
- function __createOrder({ host }) {
1133
- const metadata = {
1134
- entityFqdn: "wix.ecom.v1.checkout",
1135
- method: "POST",
1136
- methodFqn: "com.wix.ecom.checkout.api.v1.CheckoutService.CreateOrder",
1137
- packageName: PACKAGE_NAME,
1138
- migrationOptions: {
1139
- optInTransformResponse: true
1140
- },
1141
- url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({
1142
- protoPath: "/v1/checkouts/{id}/create-order",
1143
- data: payload,
1144
- host
1145
- }),
1146
- data: payload
1147
- };
1148
- return metadata;
1149
- }
1150
- return __createOrder;
1151
- }
1152
- function createOrderAndCharge(payload) {
1153
- function __createOrderAndCharge({ host }) {
1154
- const metadata = {
1155
- entityFqdn: "wix.ecom.v1.checkout",
1156
- method: "POST",
1157
- methodFqn: "com.wix.ecom.checkout.api.v1.CheckoutService.CreateOrderAndCharge",
1158
- packageName: PACKAGE_NAME,
1159
- migrationOptions: {
1160
- optInTransformResponse: true
1161
- },
1162
- url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({
1163
- protoPath: "/v1/checkouts/{id}/create-order-and-charge",
1164
- data: payload,
1165
- host
1166
- }),
1167
- data: payload
1168
- };
1169
- return metadata;
1170
- }
1171
- return __createOrderAndCharge;
1172
- }
1173
- function markCheckoutAsCompletedAndRedirectToUrl(payload) {
1174
- function __markCheckoutAsCompletedAndRedirectToUrl({ host }) {
1175
- const metadata = {
1176
- entityFqdn: "wix.ecom.v1.checkout",
1177
- method: "GET",
1178
- methodFqn: "com.wix.ecom.checkout.api.v1.CheckoutService.MarkCheckoutAsCompletedAndRedirectToUrl",
1179
- packageName: PACKAGE_NAME,
1180
- migrationOptions: {
1181
- optInTransformResponse: true
1182
- },
1183
- url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({
1184
- protoPath: "/v1/checkouts/mark-checkout-as-completed-and-redirect-to-url",
1185
- data: payload,
1186
- host
1187
- }),
1188
- params: (0, import_rest_modules.toURLSearchParams)(payload),
1189
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
1190
- {
1191
- transformFn: import_bytes.transformRESTBytesToSDKBytes,
1192
- paths: [{ path: "body" }]
1193
- }
1194
- ])
1195
- };
1196
- return metadata;
1197
- }
1198
- return __markCheckoutAsCompletedAndRedirectToUrl;
1199
- }
1200
- function markCheckoutAsCompleted(payload) {
1201
- function __markCheckoutAsCompleted({ host }) {
1202
- const metadata = {
1203
- entityFqdn: "wix.ecom.v1.checkout",
1204
- method: "POST",
1205
- methodFqn: "com.wix.ecom.checkout.api.v1.CheckoutService.MarkCheckoutAsCompleted",
1206
- packageName: PACKAGE_NAME,
1207
- migrationOptions: {
1208
- optInTransformResponse: true
1209
- },
1210
- url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({
1211
- protoPath: "/v1/checkouts/{id}/mark-as-completed",
1212
- data: payload,
1213
- host
1214
- }),
1215
- data: payload
1216
- };
1217
- return metadata;
1218
- }
1219
- return __markCheckoutAsCompleted;
1220
- }
1221
- function updateLineItemsQuantity(payload) {
1222
- function __updateLineItemsQuantity({ host }) {
1223
- const metadata = {
1224
- entityFqdn: "wix.ecom.v1.checkout",
1225
- method: "POST",
1226
- methodFqn: "com.wix.ecom.checkout.api.v1.CheckoutService.UpdateLineItemsQuantity",
1227
- packageName: PACKAGE_NAME,
1228
- migrationOptions: {
1229
- optInTransformResponse: true
1230
- },
1231
- url: resolveComWixEcomCheckoutApiV1CheckoutServiceUrl({
1232
- protoPath: "/v1/checkouts/{id}/update-line-items-quantity",
1233
- data: payload,
1234
- host
1235
- }),
1236
- data: payload,
1237
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
1238
- {
1239
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
1240
- paths: [
1241
- { path: "checkout.createdDate" },
1242
- { path: "checkout.updatedDate" },
1243
- { path: "checkout.lineItems.media.urlExpirationDate" },
1244
- {
1245
- path: "checkout.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
1246
- },
1247
- { path: "checkout.lineItems.serviceProperties.scheduledDate" },
1248
- { path: "checkout.lineItems.serviceProperties.endDate" },
1249
- {
1250
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from"
1251
- },
1252
- {
1253
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to"
1254
- },
1255
- {
1256
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from"
1257
- },
1258
- {
1259
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to"
1260
- },
1261
- {
1262
- path: "checkout.membershipOptions.eligibleMemberships.expirationDate"
1263
- },
1264
- {
1265
- path: "checkout.membershipOptions.invalidMemberships.membership.expirationDate"
1266
- },
1267
- { path: "checkout.subscriptionCharges.charges.cycleBillingDate" }
1268
- ]
1269
- },
1270
- {
1271
- transformFn: import_float2.transformRESTFloatToSDKFloat,
1272
- paths: [
1273
- { path: "checkout.lineItems.media.focalPoint.x" },
1274
- { path: "checkout.lineItems.media.focalPoint.y" },
1275
- { path: "checkout.lineItems.physicalProperties.weight" },
1276
- {
1277
- path: "checkout.lineItems.catalogOverrideFields.physicalProperties.weight"
1278
- },
1279
- { path: "checkout.billingInfo.address.geocode.latitude" },
1280
- { path: "checkout.billingInfo.address.geocode.longitude" },
1281
- {
1282
- path: "checkout.shippingInfo.shippingDestination.address.geocode.latitude"
1283
- },
1284
- {
1285
- path: "checkout.shippingInfo.shippingDestination.address.geocode.longitude"
1286
- },
1287
- {
1288
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude"
1289
- },
1290
- {
1291
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude"
1292
- },
1293
- {
1294
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude"
1295
- },
1296
- {
1297
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude"
1298
- },
1299
- { path: "checkout.appliedDiscounts.merchantDiscount.percentage" }
1300
- ]
1301
- }
1302
- ])
1303
- };
1304
- return metadata;
1305
- }
1306
- return __updateLineItemsQuantity;
1307
- }
1308
-
1309
- // src/ecom-v1-checkout-checkout.universal.ts
1310
- var import_address = require("@wix/sdk-runtime/transformations/address");
1311
- var import_address2 = require("@wix/sdk-runtime/transformations/address");
1312
- var import_image = require("@wix/sdk-runtime/transformations/image");
1313
- var import_image2 = require("@wix/sdk-runtime/transformations/image");
1314
- var import_page_url_v2 = require("@wix/sdk-runtime/transformations/page-url-v2");
1315
- var import_page_url_v22 = require("@wix/sdk-runtime/transformations/page-url-v2");
1316
- var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
1317
- var JurisdictionType = /* @__PURE__ */ ((JurisdictionType2) => {
1318
- JurisdictionType2["UNDEFINED"] = "UNDEFINED";
1319
- JurisdictionType2["COUNTRY"] = "COUNTRY";
1320
- JurisdictionType2["STATE"] = "STATE";
1321
- JurisdictionType2["COUNTY"] = "COUNTY";
1322
- JurisdictionType2["CITY"] = "CITY";
1323
- JurisdictionType2["SPECIAL"] = "SPECIAL";
1324
- return JurisdictionType2;
1325
- })(JurisdictionType || {});
1326
- var DescriptionLineType = /* @__PURE__ */ ((DescriptionLineType2) => {
1327
- DescriptionLineType2["UNRECOGNISED"] = "UNRECOGNISED";
1328
- DescriptionLineType2["PLAIN_TEXT"] = "PLAIN_TEXT";
1329
- DescriptionLineType2["COLOR"] = "COLOR";
1330
- return DescriptionLineType2;
1331
- })(DescriptionLineType || {});
1332
- var ItemAvailabilityStatus = /* @__PURE__ */ ((ItemAvailabilityStatus2) => {
1333
- ItemAvailabilityStatus2["AVAILABLE"] = "AVAILABLE";
1334
- ItemAvailabilityStatus2["NOT_FOUND"] = "NOT_FOUND";
1335
- ItemAvailabilityStatus2["NOT_AVAILABLE"] = "NOT_AVAILABLE";
1336
- ItemAvailabilityStatus2["PARTIALLY_AVAILABLE"] = "PARTIALLY_AVAILABLE";
1337
- return ItemAvailabilityStatus2;
1338
- })(ItemAvailabilityStatus || {});
1339
- var DimensionsUnit = /* @__PURE__ */ ((DimensionsUnit2) => {
1340
- DimensionsUnit2["UNKNOWN_DIMENSIONS_UNIT"] = "UNKNOWN_DIMENSIONS_UNIT";
1341
- DimensionsUnit2["MM"] = "MM";
1342
- DimensionsUnit2["CM"] = "CM";
1343
- DimensionsUnit2["M"] = "M";
1344
- DimensionsUnit2["IN"] = "IN";
1345
- DimensionsUnit2["FT"] = "FT";
1346
- DimensionsUnit2["YD"] = "YD";
1347
- return DimensionsUnit2;
1348
- })(DimensionsUnit || {});
1349
- var ItemTypePreset = /* @__PURE__ */ ((ItemTypePreset2) => {
1350
- ItemTypePreset2["UNRECOGNISED"] = "UNRECOGNISED";
1351
- ItemTypePreset2["PHYSICAL"] = "PHYSICAL";
1352
- ItemTypePreset2["DIGITAL"] = "DIGITAL";
1353
- ItemTypePreset2["GIFT_CARD"] = "GIFT_CARD";
1354
- ItemTypePreset2["SERVICE"] = "SERVICE";
1355
- return ItemTypePreset2;
1356
- })(ItemTypePreset || {});
1357
- var SubscriptionFrequency = /* @__PURE__ */ ((SubscriptionFrequency2) => {
1358
- SubscriptionFrequency2["UNDEFINED"] = "UNDEFINED";
1359
- SubscriptionFrequency2["DAY"] = "DAY";
1360
- SubscriptionFrequency2["WEEK"] = "WEEK";
1361
- SubscriptionFrequency2["MONTH"] = "MONTH";
1362
- SubscriptionFrequency2["YEAR"] = "YEAR";
1363
- return SubscriptionFrequency2;
1364
- })(SubscriptionFrequency || {});
1365
- var ProductPeriodAlignment = /* @__PURE__ */ ((ProductPeriodAlignment2) => {
1366
- ProductPeriodAlignment2["ALIGNED_WITH_BILLING_PERIOD"] = "ALIGNED_WITH_BILLING_PERIOD";
1367
- ProductPeriodAlignment2["NOT_ALIGNED_WITH_BILLING_PERIOD"] = "NOT_ALIGNED_WITH_BILLING_PERIOD";
1368
- return ProductPeriodAlignment2;
1369
- })(ProductPeriodAlignment || {});
1370
- var FileType = /* @__PURE__ */ ((FileType2) => {
1371
- FileType2["UNSPECIFIED"] = "UNSPECIFIED";
1372
- FileType2["SECURE_PICTURE"] = "SECURE_PICTURE";
1373
- FileType2["SECURE_VIDEO"] = "SECURE_VIDEO";
1374
- FileType2["SECURE_DOCUMENT"] = "SECURE_DOCUMENT";
1375
- FileType2["SECURE_MUSIC"] = "SECURE_MUSIC";
1376
- FileType2["SECURE_ARCHIVE"] = "SECURE_ARCHIVE";
1377
- FileType2["SECURE_RAW"] = "SECURE_RAW";
1378
- return FileType2;
1379
- })(FileType || {});
1380
- var PaymentOptionType = /* @__PURE__ */ ((PaymentOptionType2) => {
1381
- PaymentOptionType2["FULL_PAYMENT_ONLINE"] = "FULL_PAYMENT_ONLINE";
1382
- PaymentOptionType2["FULL_PAYMENT_OFFLINE"] = "FULL_PAYMENT_OFFLINE";
1383
- PaymentOptionType2["MEMBERSHIP"] = "MEMBERSHIP";
1384
- PaymentOptionType2["DEPOSIT_ONLINE"] = "DEPOSIT_ONLINE";
1385
- PaymentOptionType2["MEMBERSHIP_OFFLINE"] = "MEMBERSHIP_OFFLINE";
1386
- PaymentOptionType2["MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER"] = "MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER";
1387
- return PaymentOptionType2;
1388
- })(PaymentOptionType || {});
1389
- var TaxableAddressType = /* @__PURE__ */ ((TaxableAddressType2) => {
1390
- TaxableAddressType2["BUSINESS"] = "BUSINESS";
1391
- TaxableAddressType2["BILLING"] = "BILLING";
1392
- TaxableAddressType2["SHIPPING"] = "SHIPPING";
1393
- return TaxableAddressType2;
1394
- })(TaxableAddressType || {});
1395
- var PlatformFeeChargeType = /* @__PURE__ */ ((PlatformFeeChargeType2) => {
1396
- PlatformFeeChargeType2["PASS_ON"] = "PASS_ON";
1397
- PlatformFeeChargeType2["ABSORBED"] = "ABSORBED";
1398
- return PlatformFeeChargeType2;
1399
- })(PlatformFeeChargeType || {});
1400
- var VatType = /* @__PURE__ */ ((VatType2) => {
1401
- VatType2["UNSPECIFIED"] = "UNSPECIFIED";
1402
- VatType2["CPF"] = "CPF";
1403
- VatType2["CNPJ"] = "CNPJ";
1404
- return VatType2;
1405
- })(VatType || {});
1406
- var PickupMethod = /* @__PURE__ */ ((PickupMethod2) => {
1407
- PickupMethod2["STORE_PICKUP"] = "STORE_PICKUP";
1408
- PickupMethod2["PICKUP_POINT"] = "PICKUP_POINT";
1409
- return PickupMethod2;
1410
- })(PickupMethod || {});
1411
- var ChargeType = /* @__PURE__ */ ((ChargeType2) => {
1412
- ChargeType2["HANDLING_FEE"] = "HANDLING_FEE";
1413
- ChargeType2["INSURANCE"] = "INSURANCE";
1414
- return ChargeType2;
1415
- })(ChargeType || {});
1416
- var RuleType = /* @__PURE__ */ ((RuleType2) => {
1417
- RuleType2["VALIDATION"] = "VALIDATION";
1418
- RuleType2["OTHER"] = "OTHER";
1419
- RuleType2["MAX"] = "MAX";
1420
- RuleType2["MIN"] = "MIN";
1421
- RuleType2["MAX_LENGTH"] = "MAX_LENGTH";
1422
- RuleType2["MIN_LENGTH"] = "MIN_LENGTH";
1423
- RuleType2["MAX_SIZE"] = "MAX_SIZE";
1424
- RuleType2["MIN_SIZE"] = "MIN_SIZE";
1425
- RuleType2["FORMAT"] = "FORMAT";
1426
- RuleType2["DECIMAL_LTE"] = "DECIMAL_LTE";
1427
- RuleType2["DECIMAL_GTE"] = "DECIMAL_GTE";
1428
- RuleType2["DECIMAL_LT"] = "DECIMAL_LT";
1429
- RuleType2["DECIMAL_GT"] = "DECIMAL_GT";
1430
- RuleType2["DECIMAL_MAX_SCALE"] = "DECIMAL_MAX_SCALE";
1431
- RuleType2["INVALID_ENUM_VALUE"] = "INVALID_ENUM_VALUE";
1432
- RuleType2["REQUIRED_FIELD"] = "REQUIRED_FIELD";
1433
- RuleType2["FIELD_NOT_ALLOWED"] = "FIELD_NOT_ALLOWED";
1434
- RuleType2["ONE_OF_ALIGNMENT"] = "ONE_OF_ALIGNMENT";
1435
- RuleType2["EXACT_LENGTH"] = "EXACT_LENGTH";
1436
- RuleType2["EXACT_SIZE"] = "EXACT_SIZE";
1437
- RuleType2["REQUIRED_ONE_OF_FIELD"] = "REQUIRED_ONE_OF_FIELD";
1438
- return RuleType2;
1439
- })(RuleType || {});
1440
- var DiscountType = /* @__PURE__ */ ((DiscountType2) => {
1441
- DiscountType2["GLOBAL"] = "GLOBAL";
1442
- DiscountType2["SPECIFIC_ITEMS"] = "SPECIFIC_ITEMS";
1443
- DiscountType2["SHIPPING"] = "SHIPPING";
1444
- return DiscountType2;
1445
- })(DiscountType || {});
1446
- var WeightUnit = /* @__PURE__ */ ((WeightUnit2) => {
1447
- WeightUnit2["UNSPECIFIED_WEIGHT_UNIT"] = "UNSPECIFIED_WEIGHT_UNIT";
1448
- WeightUnit2["KG"] = "KG";
1449
- WeightUnit2["LB"] = "LB";
1450
- return WeightUnit2;
1451
- })(WeightUnit || {});
1452
- var RateType = /* @__PURE__ */ ((RateType2) => {
1453
- RateType2["NO_TAX_COLLECTED"] = "NO_TAX_COLLECTED";
1454
- RateType2["MANUAL_RATE"] = "MANUAL_RATE";
1455
- RateType2["AUTO_RATE"] = "AUTO_RATE";
1456
- RateType2["FALLBACK_RATE"] = "FALLBACK_RATE";
1457
- return RateType2;
1458
- })(RateType || {});
1459
- var ManualCalculationReason = /* @__PURE__ */ ((ManualCalculationReason2) => {
1460
- ManualCalculationReason2["GLOBAL_SETTING_TO_MANUAL"] = "GLOBAL_SETTING_TO_MANUAL";
1461
- ManualCalculationReason2["REGION_SETTING_TO_MANUAL"] = "REGION_SETTING_TO_MANUAL";
1462
- return ManualCalculationReason2;
1463
- })(ManualCalculationReason || {});
1464
- var FallbackReason = /* @__PURE__ */ ((FallbackReason2) => {
1465
- FallbackReason2["AUTO_TAX_FAILED"] = "AUTO_TAX_FAILED";
1466
- FallbackReason2["AUTO_TAX_DEACTIVATED"] = "AUTO_TAX_DEACTIVATED";
1467
- return FallbackReason2;
1468
- })(FallbackReason || {});
1469
- var ChannelType = /* @__PURE__ */ ((ChannelType2) => {
1470
- ChannelType2["UNSPECIFIED"] = "UNSPECIFIED";
1471
- ChannelType2["WEB"] = "WEB";
1472
- ChannelType2["POS"] = "POS";
1473
- ChannelType2["EBAY"] = "EBAY";
1474
- ChannelType2["AMAZON"] = "AMAZON";
1475
- ChannelType2["OTHER_PLATFORM"] = "OTHER_PLATFORM";
1476
- ChannelType2["WIX_APP_STORE"] = "WIX_APP_STORE";
1477
- ChannelType2["WIX_INVOICES"] = "WIX_INVOICES";
1478
- ChannelType2["BACKOFFICE_MERCHANT"] = "BACKOFFICE_MERCHANT";
1479
- ChannelType2["WISH"] = "WISH";
1480
- ChannelType2["CLASS_PASS"] = "CLASS_PASS";
1481
- ChannelType2["GLOBAL_E"] = "GLOBAL_E";
1482
- ChannelType2["FACEBOOK"] = "FACEBOOK";
1483
- ChannelType2["ETSY"] = "ETSY";
1484
- ChannelType2["TIKTOK"] = "TIKTOK";
1485
- ChannelType2["FAIRE_COM"] = "FAIRE_COM";
1486
- ChannelType2["PAYPAL_AGENTIC_CHECKOUT"] = "PAYPAL_AGENTIC_CHECKOUT";
1487
- ChannelType2["STRIPE_AGENTIC_CHECKOUT"] = "STRIPE_AGENTIC_CHECKOUT";
1488
- ChannelType2["WIX_INVOICES_PLATFORM"] = "WIX_INVOICES_PLATFORM";
1489
- ChannelType2["UCP_AGENTIC_CHECKOUT"] = "UCP_AGENTIC_CHECKOUT";
1490
- return ChannelType2;
1491
- })(ChannelType || {});
1492
- var BalanceType = /* @__PURE__ */ ((BalanceType2) => {
1493
- BalanceType2["PUNCH_CARD"] = "PUNCH_CARD";
1494
- BalanceType2["CREDIT"] = "CREDIT";
1495
- return BalanceType2;
1496
- })(BalanceType || {});
1497
- var AdditionalFeeSource = /* @__PURE__ */ ((AdditionalFeeSource2) => {
1498
- AdditionalFeeSource2["UNKNOWN_ADDITIONAL_FEE_SOURCE"] = "UNKNOWN_ADDITIONAL_FEE_SOURCE";
1499
- AdditionalFeeSource2["SERVICE_PLUGIN"] = "SERVICE_PLUGIN";
1500
- AdditionalFeeSource2["ITEM"] = "ITEM";
1501
- AdditionalFeeSource2["MANUAL"] = "MANUAL";
1502
- AdditionalFeeSource2["SHIPPING"] = "SHIPPING";
1503
- AdditionalFeeSource2["PLATFORM"] = "PLATFORM";
1504
- return AdditionalFeeSource2;
1505
- })(AdditionalFeeSource || {});
1506
- var Severity = /* @__PURE__ */ ((Severity2) => {
1507
- Severity2["WARNING"] = "WARNING";
1508
- Severity2["ERROR"] = "ERROR";
1509
- return Severity2;
1510
- })(Severity || {});
1511
- var NameInOther = /* @__PURE__ */ ((NameInOther2) => {
1512
- NameInOther2["OTHER_DEFAULT"] = "OTHER_DEFAULT";
1513
- return NameInOther2;
1514
- })(NameInOther || {});
1515
- var NameInLineItem = /* @__PURE__ */ ((NameInLineItem2) => {
1516
- NameInLineItem2["LINE_ITEM_DEFAULT"] = "LINE_ITEM_DEFAULT";
1517
- return NameInLineItem2;
1518
- })(NameInLineItem || {});
1519
- var SuggestedFix = /* @__PURE__ */ ((SuggestedFix2) => {
1520
- SuggestedFix2["UNKNOWN_SUGGESTED_FIX"] = "UNKNOWN_SUGGESTED_FIX";
1521
- SuggestedFix2["REMOVE_LINE_ITEM"] = "REMOVE_LINE_ITEM";
1522
- return SuggestedFix2;
1523
- })(SuggestedFix || {});
1524
- var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
1525
- WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
1526
- WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
1527
- WebhookIdentityType2["MEMBER"] = "MEMBER";
1528
- WebhookIdentityType2["WIX_USER"] = "WIX_USER";
1529
- WebhookIdentityType2["APP"] = "APP";
1530
- return WebhookIdentityType2;
1531
- })(WebhookIdentityType || {});
1532
- async function createCheckout2(options) {
1533
- const { httpClient, sideEffects } = arguments[1];
1534
- const payload = (0, import_transform_paths2.transformPaths)(
1535
- (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1536
- checkoutInfo: options?.checkoutInfo,
1537
- couponCode: options?.couponCode,
1538
- lineItems: options?.lineItems,
1539
- customLineItems: options?.customLineItems,
1540
- channelType: options?.channelType,
1541
- giftCardCode: options?.giftCardCode,
1542
- overrideCheckoutUrl: options?.overrideCheckoutUrl,
1543
- giftCardRedeemAmount: options?.giftCardRedeemAmount
1544
- }),
1545
- [
1546
- {
1547
- transformFn: import_page_url_v2.transformSDKPageURLV2ToRESTPageURLV2,
1548
- paths: [
1549
- { path: "checkoutInfo.lineItems.url" },
1550
- { path: "lineItems.url" },
1551
- { path: "customLineItems.url" }
1552
- ]
1553
- },
1554
- {
1555
- transformFn: import_image.transformSDKImageToRESTImage,
1556
- paths: [
1557
- { path: "checkoutInfo.lineItems.media" },
1558
- { path: "checkoutInfo.lineItems.catalogOverrideFields.image" },
1559
- { path: "lineItems.media" },
1560
- { path: "lineItems.catalogOverrideFields.image" },
1561
- { path: "customLineItems.media" }
1562
- ]
1563
- },
1564
- {
1565
- transformFn: import_address.transformSDKAddressToRESTAddress,
1566
- paths: [
1567
- { path: "checkoutInfo.billingInfo.address" },
1568
- { path: "checkoutInfo.shippingInfo.shippingDestination.address" },
1569
- {
1570
- path: "checkoutInfo.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address"
1571
- },
1572
- {
1573
- path: "checkoutInfo.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address"
1574
- }
1575
- ]
1576
- }
1577
- ]
1578
- );
1579
- const reqOpts = createCheckout(payload);
1580
- sideEffects?.onSiteCall?.();
1581
- try {
1582
- const result = await httpClient.request(reqOpts);
1583
- sideEffects?.onSuccess?.(result);
1584
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1585
- (0, import_transform_paths2.transformPaths)(result.data, [
1586
- {
1587
- transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1588
- paths: [{ path: "checkout.lineItems.url" }]
1589
- },
1590
- {
1591
- transformFn: import_image2.transformRESTImageToSDKImage,
1592
- paths: [
1593
- { path: "checkout.lineItems.media" },
1594
- { path: "checkout.lineItems.catalogOverrideFields.image" }
1595
- ]
1596
- },
1597
- {
1598
- transformFn: import_address2.transformRESTAddressToSDKAddress,
1599
- paths: [
1600
- { path: "checkout.billingInfo.address" },
1601
- { path: "checkout.shippingInfo.shippingDestination.address" },
1602
- {
1603
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address"
1604
- },
1605
- {
1606
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address"
1607
- }
1608
- ]
1609
- }
1610
- ])
1611
- )?.checkout;
1612
- } catch (err) {
1613
- const transformedError = (0, import_transform_error.transformError)(
1614
- err,
1615
- {
1616
- spreadPathsToArguments: {},
1617
- explicitPathsToArguments: {
1618
- checkoutInfo: "$[0].checkoutInfo",
1619
- couponCode: "$[0].couponCode",
1620
- lineItems: "$[0].lineItems",
1621
- customLineItems: "$[0].customLineItems",
1622
- channelType: "$[0].channelType",
1623
- giftCardCode: "$[0].giftCardCode",
1624
- overrideCheckoutUrl: "$[0].overrideCheckoutUrl",
1625
- giftCardRedeemAmount: "$[0].giftCardRedeemAmount"
1626
- },
1627
- singleArgumentUnchanged: false
1628
- },
1629
- ["options"]
1630
- );
1631
- sideEffects?.onError?.(err);
1632
- throw transformedError;
1633
- }
1634
- }
1635
- async function getCheckout2(_id) {
1636
- const { httpClient, sideEffects } = arguments[1];
1637
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
1638
- const reqOpts = getCheckout(payload);
1639
- sideEffects?.onSiteCall?.();
1640
- try {
1641
- const result = await httpClient.request(reqOpts);
1642
- sideEffects?.onSuccess?.(result);
1643
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1644
- (0, import_transform_paths2.transformPaths)(result.data, [
1645
- {
1646
- transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1647
- paths: [{ path: "checkout.lineItems.url" }]
1648
- },
1649
- {
1650
- transformFn: import_image2.transformRESTImageToSDKImage,
1651
- paths: [
1652
- { path: "checkout.lineItems.media" },
1653
- { path: "checkout.lineItems.catalogOverrideFields.image" }
1654
- ]
1655
- },
1656
- {
1657
- transformFn: import_address2.transformRESTAddressToSDKAddress,
1658
- paths: [
1659
- { path: "checkout.billingInfo.address" },
1660
- { path: "checkout.shippingInfo.shippingDestination.address" },
1661
- {
1662
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address"
1663
- },
1664
- {
1665
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address"
1666
- }
1667
- ]
1668
- }
1669
- ])
1670
- )?.checkout;
1671
- } catch (err) {
1672
- const transformedError = (0, import_transform_error.transformError)(
1673
- err,
1674
- {
1675
- spreadPathsToArguments: {},
1676
- explicitPathsToArguments: { id: "$[0]" },
1677
- singleArgumentUnchanged: false
1678
- },
1679
- ["_id"]
1680
- );
1681
- sideEffects?.onError?.(err);
1682
- throw transformedError;
1683
- }
1684
- }
1685
- async function getCheckoutByCartId2(_id) {
1686
- const { httpClient, sideEffects } = arguments[1];
1687
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
1688
- const reqOpts = getCheckoutByCartId(payload);
1689
- sideEffects?.onSiteCall?.();
1690
- try {
1691
- const result = await httpClient.request(reqOpts);
1692
- sideEffects?.onSuccess?.(result);
1693
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1694
- (0, import_transform_paths2.transformPaths)(result.data, [
1695
- {
1696
- transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1697
- paths: [{ path: "checkout.lineItems.url" }]
1698
- },
1699
- {
1700
- transformFn: import_image2.transformRESTImageToSDKImage,
1701
- paths: [
1702
- { path: "checkout.lineItems.media" },
1703
- { path: "checkout.lineItems.catalogOverrideFields.image" }
1704
- ]
1705
- },
1706
- {
1707
- transformFn: import_address2.transformRESTAddressToSDKAddress,
1708
- paths: [
1709
- { path: "checkout.billingInfo.address" },
1710
- { path: "checkout.shippingInfo.shippingDestination.address" },
1711
- {
1712
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address"
1713
- },
1714
- {
1715
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address"
1716
- }
1717
- ]
1718
- }
1719
- ])
1720
- );
1721
- } catch (err) {
1722
- const transformedError = (0, import_transform_error.transformError)(
1723
- err,
1724
- {
1725
- spreadPathsToArguments: {},
1726
- explicitPathsToArguments: { id: "$[0]" },
1727
- singleArgumentUnchanged: false
1728
- },
1729
- ["_id"]
1730
- );
1731
- sideEffects?.onError?.(err);
1732
- throw transformedError;
1733
- }
1734
- }
1735
- async function getWixCheckoutUrl2(_id) {
1736
- const { httpClient, sideEffects } = arguments[1];
1737
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
1738
- const reqOpts = getWixCheckoutUrl(payload);
1739
- sideEffects?.onSiteCall?.();
1740
- try {
1741
- const result = await httpClient.request(reqOpts);
1742
- sideEffects?.onSuccess?.(result);
1743
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1744
- } catch (err) {
1745
- const transformedError = (0, import_transform_error.transformError)(
1746
- err,
1747
- {
1748
- spreadPathsToArguments: {},
1749
- explicitPathsToArguments: { id: "$[0]" },
1750
- singleArgumentUnchanged: false
1751
- },
1752
- ["_id"]
1753
- );
1754
- sideEffects?.onError?.(err);
1755
- throw transformedError;
1756
- }
1757
- }
1758
- async function getCheckoutUrl2(_id) {
1759
- const { httpClient, sideEffects } = arguments[1];
1760
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
1761
- const reqOpts = getCheckoutUrl(payload);
1762
- sideEffects?.onSiteCall?.();
1763
- try {
1764
- const result = await httpClient.request(reqOpts);
1765
- sideEffects?.onSuccess?.(result);
1766
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1767
- } catch (err) {
1768
- const transformedError = (0, import_transform_error.transformError)(
1769
- err,
1770
- {
1771
- spreadPathsToArguments: {},
1772
- explicitPathsToArguments: { id: "$[0]" },
1773
- singleArgumentUnchanged: false
1774
- },
1775
- ["_id"]
1776
- );
1777
- sideEffects?.onError?.(err);
1778
- throw transformedError;
1779
- }
1780
- }
1781
- async function updateCheckout2(_id, checkout, options) {
1782
- const { httpClient, sideEffects } = arguments[3];
1783
- const payload = (0, import_transform_paths2.transformPaths)(
1784
- (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1785
- checkout: { ...checkout, id: _id },
1786
- couponCode: options?.couponCode,
1787
- giftCardCode: options?.giftCardCode,
1788
- overrideCheckoutUrl: options?.overrideCheckoutUrl,
1789
- lineItems: options?.lineItems,
1790
- customLineItems: options?.customLineItems,
1791
- giftCardRedeemAmount: options?.giftCardRedeemAmount
1792
- }),
1793
- [
1794
- {
1795
- transformFn: import_page_url_v2.transformSDKPageURLV2ToRESTPageURLV2,
1796
- paths: [
1797
- { path: "checkout.lineItems.url" },
1798
- { path: "lineItems.url" },
1799
- { path: "customLineItems.url" }
1800
- ]
1801
- },
1802
- {
1803
- transformFn: import_image.transformSDKImageToRESTImage,
1804
- paths: [
1805
- { path: "checkout.lineItems.media" },
1806
- { path: "checkout.lineItems.catalogOverrideFields.image" },
1807
- { path: "lineItems.media" },
1808
- { path: "lineItems.catalogOverrideFields.image" },
1809
- { path: "customLineItems.media" }
1810
- ]
1811
- },
1812
- {
1813
- transformFn: import_address.transformSDKAddressToRESTAddress,
1814
- paths: [
1815
- { path: "checkout.billingInfo.address" },
1816
- { path: "checkout.shippingInfo.shippingDestination.address" },
1817
- {
1818
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address"
1819
- },
1820
- {
1821
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address"
1822
- }
1823
- ]
1824
- }
1825
- ]
1826
- );
1827
- const reqOpts = updateCheckout(payload);
1828
- sideEffects?.onSiteCall?.();
1829
- try {
1830
- const result = await httpClient.request(reqOpts);
1831
- sideEffects?.onSuccess?.(result);
1832
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1833
- (0, import_transform_paths2.transformPaths)(result.data, [
1834
- {
1835
- transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1836
- paths: [{ path: "checkout.lineItems.url" }]
1837
- },
1838
- {
1839
- transformFn: import_image2.transformRESTImageToSDKImage,
1840
- paths: [
1841
- { path: "checkout.lineItems.media" },
1842
- { path: "checkout.lineItems.catalogOverrideFields.image" }
1843
- ]
1844
- },
1845
- {
1846
- transformFn: import_address2.transformRESTAddressToSDKAddress,
1847
- paths: [
1848
- { path: "checkout.billingInfo.address" },
1849
- { path: "checkout.shippingInfo.shippingDestination.address" },
1850
- {
1851
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address"
1852
- },
1853
- {
1854
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address"
1855
- }
1856
- ]
1857
- }
1858
- ])
1859
- )?.checkout;
1860
- } catch (err) {
1861
- const transformedError = (0, import_transform_error.transformError)(
1862
- err,
1863
- {
1864
- spreadPathsToArguments: { checkout: "$[1]" },
1865
- explicitPathsToArguments: {
1866
- "checkout.id": "$[0]",
1867
- couponCode: "$[2].couponCode",
1868
- giftCardCode: "$[2].giftCardCode",
1869
- overrideCheckoutUrl: "$[2].overrideCheckoutUrl",
1870
- lineItems: "$[2].lineItems",
1871
- customLineItems: "$[2].customLineItems",
1872
- giftCardRedeemAmount: "$[2].giftCardRedeemAmount"
1873
- },
1874
- singleArgumentUnchanged: false
1875
- },
1876
- ["_id", "checkout", "options"]
1877
- );
1878
- sideEffects?.onError?.(err);
1879
- throw transformedError;
1880
- }
1881
- }
1882
- async function removeCoupon2(_id) {
1883
- const { httpClient, sideEffects } = arguments[1];
1884
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
1885
- const reqOpts = removeCoupon(payload);
1886
- sideEffects?.onSiteCall?.();
1887
- try {
1888
- const result = await httpClient.request(reqOpts);
1889
- sideEffects?.onSuccess?.(result);
1890
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1891
- (0, import_transform_paths2.transformPaths)(result.data, [
1892
- {
1893
- transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1894
- paths: [{ path: "checkout.lineItems.url" }]
1895
- },
1896
- {
1897
- transformFn: import_image2.transformRESTImageToSDKImage,
1898
- paths: [
1899
- { path: "checkout.lineItems.media" },
1900
- { path: "checkout.lineItems.catalogOverrideFields.image" }
1901
- ]
1902
- },
1903
- {
1904
- transformFn: import_address2.transformRESTAddressToSDKAddress,
1905
- paths: [
1906
- { path: "checkout.billingInfo.address" },
1907
- { path: "checkout.shippingInfo.shippingDestination.address" },
1908
- {
1909
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address"
1910
- },
1911
- {
1912
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address"
1913
- }
1914
- ]
1915
- }
1916
- ])
1917
- );
1918
- } catch (err) {
1919
- const transformedError = (0, import_transform_error.transformError)(
1920
- err,
1921
- {
1922
- spreadPathsToArguments: {},
1923
- explicitPathsToArguments: { id: "$[0]" },
1924
- singleArgumentUnchanged: false
1925
- },
1926
- ["_id"]
1927
- );
1928
- sideEffects?.onError?.(err);
1929
- throw transformedError;
1930
- }
1931
- }
1932
- async function removeGiftCard2(_id) {
1933
- const { httpClient, sideEffects } = arguments[1];
1934
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
1935
- const reqOpts = removeGiftCard(payload);
1936
- sideEffects?.onSiteCall?.();
1937
- try {
1938
- const result = await httpClient.request(reqOpts);
1939
- sideEffects?.onSuccess?.(result);
1940
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1941
- (0, import_transform_paths2.transformPaths)(result.data, [
1942
- {
1943
- transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1944
- paths: [{ path: "checkout.lineItems.url" }]
1945
- },
1946
- {
1947
- transformFn: import_image2.transformRESTImageToSDKImage,
1948
- paths: [
1949
- { path: "checkout.lineItems.media" },
1950
- { path: "checkout.lineItems.catalogOverrideFields.image" }
1951
- ]
1952
- },
1953
- {
1954
- transformFn: import_address2.transformRESTAddressToSDKAddress,
1955
- paths: [
1956
- { path: "checkout.billingInfo.address" },
1957
- { path: "checkout.shippingInfo.shippingDestination.address" },
1958
- {
1959
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address"
1960
- },
1961
- {
1962
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address"
1963
- }
1964
- ]
1965
- }
1966
- ])
1967
- );
1968
- } catch (err) {
1969
- const transformedError = (0, import_transform_error.transformError)(
1970
- err,
1971
- {
1972
- spreadPathsToArguments: {},
1973
- explicitPathsToArguments: { id: "$[0]" },
1974
- singleArgumentUnchanged: false
1975
- },
1976
- ["_id"]
1977
- );
1978
- sideEffects?.onError?.(err);
1979
- throw transformedError;
1980
- }
1981
- }
1982
- async function removeOverrideCheckoutUrl2(_id) {
1983
- const { httpClient, sideEffects } = arguments[1];
1984
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
1985
- const reqOpts = removeOverrideCheckoutUrl(payload);
1986
- sideEffects?.onSiteCall?.();
1987
- try {
1988
- const result = await httpClient.request(reqOpts);
1989
- sideEffects?.onSuccess?.(result);
1990
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1991
- (0, import_transform_paths2.transformPaths)(result.data, [
1992
- {
1993
- transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1994
- paths: [{ path: "checkout.lineItems.url" }]
1995
- },
1996
- {
1997
- transformFn: import_image2.transformRESTImageToSDKImage,
1998
- paths: [
1999
- { path: "checkout.lineItems.media" },
2000
- { path: "checkout.lineItems.catalogOverrideFields.image" }
2001
- ]
2002
- },
2003
- {
2004
- transformFn: import_address2.transformRESTAddressToSDKAddress,
2005
- paths: [
2006
- { path: "checkout.billingInfo.address" },
2007
- { path: "checkout.shippingInfo.shippingDestination.address" },
2008
- {
2009
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address"
2010
- },
2011
- {
2012
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address"
2013
- }
2014
- ]
2015
- }
2016
- ])
2017
- );
2018
- } catch (err) {
2019
- const transformedError = (0, import_transform_error.transformError)(
2020
- err,
2021
- {
2022
- spreadPathsToArguments: {},
2023
- explicitPathsToArguments: { id: "$[0]" },
2024
- singleArgumentUnchanged: false
2025
- },
2026
- ["_id"]
2027
- );
2028
- sideEffects?.onError?.(err);
2029
- throw transformedError;
2030
- }
2031
- }
2032
- async function addToCheckout2(_id, options) {
2033
- const { httpClient, sideEffects } = arguments[2];
2034
- const payload = (0, import_transform_paths2.transformPaths)(
2035
- (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2036
- id: _id,
2037
- lineItems: options?.lineItems,
2038
- customLineItems: options?.customLineItems
2039
- }),
2040
- [
2041
- {
2042
- transformFn: import_page_url_v2.transformSDKPageURLV2ToRESTPageURLV2,
2043
- paths: [{ path: "lineItems.url" }, { path: "customLineItems.url" }]
2044
- },
2045
- {
2046
- transformFn: import_image.transformSDKImageToRESTImage,
2047
- paths: [
2048
- { path: "lineItems.media" },
2049
- { path: "lineItems.catalogOverrideFields.image" },
2050
- { path: "customLineItems.media" }
2051
- ]
2052
- }
2053
- ]
2054
- );
2055
- const reqOpts = addToCheckout(payload);
2056
- sideEffects?.onSiteCall?.();
2057
- try {
2058
- const result = await httpClient.request(reqOpts);
2059
- sideEffects?.onSuccess?.(result);
2060
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
2061
- (0, import_transform_paths2.transformPaths)(result.data, [
2062
- {
2063
- transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
2064
- paths: [{ path: "checkout.lineItems.url" }]
2065
- },
2066
- {
2067
- transformFn: import_image2.transformRESTImageToSDKImage,
2068
- paths: [
2069
- { path: "checkout.lineItems.media" },
2070
- { path: "checkout.lineItems.catalogOverrideFields.image" }
2071
- ]
2072
- },
2073
- {
2074
- transformFn: import_address2.transformRESTAddressToSDKAddress,
2075
- paths: [
2076
- { path: "checkout.billingInfo.address" },
2077
- { path: "checkout.shippingInfo.shippingDestination.address" },
2078
- {
2079
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address"
2080
- },
2081
- {
2082
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address"
2083
- }
2084
- ]
2085
- }
2086
- ])
2087
- );
2088
- } catch (err) {
2089
- const transformedError = (0, import_transform_error.transformError)(
2090
- err,
2091
- {
2092
- spreadPathsToArguments: {},
2093
- explicitPathsToArguments: {
2094
- id: "$[0]",
2095
- lineItems: "$[1].lineItems",
2096
- customLineItems: "$[1].customLineItems"
2097
- },
2098
- singleArgumentUnchanged: false
2099
- },
2100
- ["_id", "options"]
2101
- );
2102
- sideEffects?.onError?.(err);
2103
- throw transformedError;
2104
- }
2105
- }
2106
- async function removeLineItems2(_id, lineItemIds) {
2107
- const { httpClient, sideEffects } = arguments[2];
2108
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2109
- id: _id,
2110
- lineItemIds
2111
- });
2112
- const reqOpts = removeLineItems(payload);
2113
- sideEffects?.onSiteCall?.();
2114
- try {
2115
- const result = await httpClient.request(reqOpts);
2116
- sideEffects?.onSuccess?.(result);
2117
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
2118
- (0, import_transform_paths2.transformPaths)(result.data, [
2119
- {
2120
- transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
2121
- paths: [{ path: "checkout.lineItems.url" }]
2122
- },
2123
- {
2124
- transformFn: import_image2.transformRESTImageToSDKImage,
2125
- paths: [
2126
- { path: "checkout.lineItems.media" },
2127
- { path: "checkout.lineItems.catalogOverrideFields.image" }
2128
- ]
2129
- },
2130
- {
2131
- transformFn: import_address2.transformRESTAddressToSDKAddress,
2132
- paths: [
2133
- { path: "checkout.billingInfo.address" },
2134
- { path: "checkout.shippingInfo.shippingDestination.address" },
2135
- {
2136
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address"
2137
- },
2138
- {
2139
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address"
2140
- }
2141
- ]
2142
- }
2143
- ])
2144
- );
2145
- } catch (err) {
2146
- const transformedError = (0, import_transform_error.transformError)(
2147
- err,
2148
- {
2149
- spreadPathsToArguments: {},
2150
- explicitPathsToArguments: { id: "$[0]", lineItemIds: "$[1]" },
2151
- singleArgumentUnchanged: false
2152
- },
2153
- ["_id", "lineItemIds"]
2154
- );
2155
- sideEffects?.onError?.(err);
2156
- throw transformedError;
2157
- }
2158
- }
2159
- async function createOrder2(_id, options) {
2160
- const { httpClient, sideEffects } = arguments[2];
2161
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2162
- id: _id,
2163
- savePaymentMethod: options?.savePaymentMethod,
2164
- delayCapture: options?.delayCapture,
2165
- inAppPurchase: options?.inAppPurchase
2166
- });
2167
- const reqOpts = createOrder(payload);
2168
- sideEffects?.onSiteCall?.();
2169
- try {
2170
- const result = await httpClient.request(reqOpts);
2171
- sideEffects?.onSuccess?.(result);
2172
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
2173
- } catch (err) {
2174
- const transformedError = (0, import_transform_error.transformError)(
2175
- err,
2176
- {
2177
- spreadPathsToArguments: {},
2178
- explicitPathsToArguments: {
2179
- id: "$[0]",
2180
- savePaymentMethod: "$[1].savePaymentMethod",
2181
- delayCapture: "$[1].delayCapture",
2182
- inAppPurchase: "$[1].inAppPurchase"
2183
- },
2184
- singleArgumentUnchanged: false
2185
- },
2186
- ["_id", "options"]
2187
- );
2188
- sideEffects?.onError?.(err);
2189
- throw transformedError;
2190
- }
2191
- }
2192
- async function createOrderAndCharge2(_id, options) {
2193
- const { httpClient, sideEffects } = arguments[2];
2194
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2195
- id: _id,
2196
- paymentToken: options?.paymentToken,
2197
- savePaymentMethod: options?.savePaymentMethod,
2198
- delayCapture: options?.delayCapture,
2199
- inAppPurchase: options?.inAppPurchase
2200
- });
2201
- const reqOpts = createOrderAndCharge(payload);
2202
- sideEffects?.onSiteCall?.();
2203
- try {
2204
- const result = await httpClient.request(reqOpts);
2205
- sideEffects?.onSuccess?.(result);
2206
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
2207
- } catch (err) {
2208
- const transformedError = (0, import_transform_error.transformError)(
2209
- err,
2210
- {
2211
- spreadPathsToArguments: {},
2212
- explicitPathsToArguments: {
2213
- id: "$[0]",
2214
- paymentToken: "$[1].paymentToken",
2215
- savePaymentMethod: "$[1].savePaymentMethod",
2216
- delayCapture: "$[1].delayCapture",
2217
- inAppPurchase: "$[1].inAppPurchase"
2218
- },
2219
- singleArgumentUnchanged: false
2220
- },
2221
- ["_id", "options"]
2222
- );
2223
- sideEffects?.onError?.(err);
2224
- throw transformedError;
2225
- }
2226
- }
2227
- async function markCheckoutAsCompletedAndRedirectToUrl2(token) {
2228
- const { httpClient, sideEffects } = arguments[1];
2229
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ token });
2230
- const reqOpts = markCheckoutAsCompletedAndRedirectToUrl(
2231
- payload
2232
- );
2233
- sideEffects?.onSiteCall?.();
2234
- try {
2235
- const result = await httpClient.request(reqOpts);
2236
- sideEffects?.onSuccess?.(result);
2237
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
2238
- } catch (err) {
2239
- const transformedError = (0, import_transform_error.transformError)(
2240
- err,
2241
- {
2242
- spreadPathsToArguments: {},
2243
- explicitPathsToArguments: { token: "$[0]" },
2244
- singleArgumentUnchanged: false
2245
- },
2246
- ["token"]
2247
- );
2248
- sideEffects?.onError?.(err);
2249
- throw transformedError;
2250
- }
2251
- }
2252
- async function markCheckoutAsCompleted2(_id, options) {
2253
- const { httpClient, sideEffects } = arguments[2];
2254
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2255
- id: _id,
2256
- orderId: options?.orderId
2257
- });
2258
- const reqOpts = markCheckoutAsCompleted(payload);
2259
- sideEffects?.onSiteCall?.();
2260
- try {
2261
- const result = await httpClient.request(reqOpts);
2262
- sideEffects?.onSuccess?.(result);
2263
- } catch (err) {
2264
- const transformedError = (0, import_transform_error.transformError)(
2265
- err,
2266
- {
2267
- spreadPathsToArguments: {},
2268
- explicitPathsToArguments: { id: "$[0]", orderId: "$[1].orderId" },
2269
- singleArgumentUnchanged: false
2270
- },
2271
- ["_id", "options"]
2272
- );
2273
- sideEffects?.onError?.(err);
2274
- throw transformedError;
2275
- }
2276
- }
2277
- async function updateLineItemsQuantity2(_id, lineItems) {
2278
- const { httpClient, sideEffects } = arguments[2];
2279
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
2280
- id: _id,
2281
- lineItems
2282
- });
2283
- const reqOpts = updateLineItemsQuantity(payload);
2284
- sideEffects?.onSiteCall?.();
2285
- try {
2286
- const result = await httpClient.request(reqOpts);
2287
- sideEffects?.onSuccess?.(result);
2288
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
2289
- (0, import_transform_paths2.transformPaths)(result.data, [
2290
- {
2291
- transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
2292
- paths: [{ path: "checkout.lineItems.url" }]
2293
- },
2294
- {
2295
- transformFn: import_image2.transformRESTImageToSDKImage,
2296
- paths: [
2297
- { path: "checkout.lineItems.media" },
2298
- { path: "checkout.lineItems.catalogOverrideFields.image" }
2299
- ]
2300
- },
2301
- {
2302
- transformFn: import_address2.transformRESTAddressToSDKAddress,
2303
- paths: [
2304
- { path: "checkout.billingInfo.address" },
2305
- { path: "checkout.shippingInfo.shippingDestination.address" },
2306
- {
2307
- path: "checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address"
2308
- },
2309
- {
2310
- path: "checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address"
2311
- }
2312
- ]
2313
- }
2314
- ])
2315
- );
2316
- } catch (err) {
2317
- const transformedError = (0, import_transform_error.transformError)(
2318
- err,
2319
- {
2320
- spreadPathsToArguments: {},
2321
- explicitPathsToArguments: { id: "$[0]", lineItems: "$[1]" },
2322
- singleArgumentUnchanged: false
2323
- },
2324
- ["_id", "lineItems"]
2325
- );
2326
- sideEffects?.onError?.(err);
2327
- throw transformedError;
2328
- }
2329
- }
2330
-
2331
- // src/ecom-v1-checkout-checkout.public.ts
2332
- function createCheckout3(httpClient) {
2333
- return (options) => createCheckout2(
2334
- options,
2335
- // @ts-ignore
2336
- { httpClient }
2337
- );
2338
- }
2339
- function getCheckout3(httpClient) {
2340
- return (_id) => getCheckout2(
2341
- _id,
2342
- // @ts-ignore
2343
- { httpClient }
2344
- );
2345
- }
2346
- function getCheckoutByCartId3(httpClient) {
2347
- return (_id) => getCheckoutByCartId2(
2348
- _id,
2349
- // @ts-ignore
2350
- { httpClient }
2351
- );
2352
- }
2353
- function getWixCheckoutUrl3(httpClient) {
2354
- return (_id) => getWixCheckoutUrl2(
2355
- _id,
2356
- // @ts-ignore
2357
- { httpClient }
2358
- );
2359
- }
2360
- function getCheckoutUrl3(httpClient) {
2361
- return (_id) => getCheckoutUrl2(
2362
- _id,
2363
- // @ts-ignore
2364
- { httpClient }
2365
- );
2366
- }
2367
- function updateCheckout3(httpClient) {
2368
- return (_id, checkout, options) => updateCheckout2(
2369
- _id,
2370
- checkout,
2371
- options,
2372
- // @ts-ignore
2373
- { httpClient }
2374
- );
2375
- }
2376
- function removeCoupon3(httpClient) {
2377
- return (_id) => removeCoupon2(
2378
- _id,
2379
- // @ts-ignore
2380
- { httpClient }
2381
- );
2382
- }
2383
- function removeGiftCard3(httpClient) {
2384
- return (_id) => removeGiftCard2(
2385
- _id,
2386
- // @ts-ignore
2387
- { httpClient }
2388
- );
2389
- }
2390
- function removeOverrideCheckoutUrl3(httpClient) {
2391
- return (_id) => removeOverrideCheckoutUrl2(
2392
- _id,
2393
- // @ts-ignore
2394
- { httpClient }
2395
- );
2396
- }
2397
- function addToCheckout3(httpClient) {
2398
- return (_id, options) => addToCheckout2(
2399
- _id,
2400
- options,
2401
- // @ts-ignore
2402
- { httpClient }
2403
- );
2404
- }
2405
- function removeLineItems3(httpClient) {
2406
- return (_id, lineItemIds) => removeLineItems2(
2407
- _id,
2408
- lineItemIds,
2409
- // @ts-ignore
2410
- { httpClient }
2411
- );
2412
- }
2413
- function createOrder3(httpClient) {
2414
- return (_id, options) => createOrder2(
2415
- _id,
2416
- options,
2417
- // @ts-ignore
2418
- { httpClient }
2419
- );
2420
- }
2421
- function createOrderAndCharge3(httpClient) {
2422
- return (_id, options) => createOrderAndCharge2(
2423
- _id,
2424
- options,
2425
- // @ts-ignore
2426
- { httpClient }
2427
- );
2428
- }
2429
- function markCheckoutAsCompletedAndRedirectToUrl3(httpClient) {
2430
- return (token) => markCheckoutAsCompletedAndRedirectToUrl2(
2431
- token,
2432
- // @ts-ignore
2433
- { httpClient }
2434
- );
2435
- }
2436
- function markCheckoutAsCompleted3(httpClient) {
2437
- return (_id, options) => markCheckoutAsCompleted2(
2438
- _id,
2439
- options,
2440
- // @ts-ignore
2441
- { httpClient }
2442
- );
2443
- }
2444
- function updateLineItemsQuantity3(httpClient) {
2445
- return (_id, lineItems) => updateLineItemsQuantity2(
2446
- _id,
2447
- lineItems,
2448
- // @ts-ignore
2449
- { httpClient }
2450
- );
2451
- }
2452
- var onCheckoutCompleted = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
2453
- "wix.ecom.v1.checkout_completed",
2454
- true,
2455
- (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
2456
- (0, import_transform_paths3.transformPaths)(event, [
2457
- {
2458
- transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
2459
- paths: [
2460
- { path: "data.checkout.createdDate" },
2461
- { path: "data.checkout.updatedDate" },
2462
- {
2463
- path: "data.checkout.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
2464
- },
2465
- { path: "data.checkout.lineItems.serviceProperties.scheduledDate" },
2466
- { path: "data.checkout.lineItems.serviceProperties.endDate" },
2467
- {
2468
- path: "data.checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from"
2469
- },
2470
- {
2471
- path: "data.checkout.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to"
2472
- },
2473
- {
2474
- path: "data.checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from"
2475
- },
2476
- {
2477
- path: "data.checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to"
2478
- },
2479
- {
2480
- path: "data.checkout.membershipOptions.eligibleMemberships.expirationDate"
2481
- },
2482
- {
2483
- path: "data.checkout.membershipOptions.invalidMemberships.membership.expirationDate"
2484
- },
2485
- {
2486
- path: "data.checkout.subscriptionCharges.charges.cycleBillingDate"
2487
- },
2488
- { path: "metadata.eventTime" }
2489
- ]
2490
- },
2491
- {
2492
- transformFn: import_page_url_v23.transformRESTPageURLV2ToSDKPageURLV2,
2493
- paths: [{ path: "data.checkout.lineItems.url" }]
2494
- },
2495
- {
2496
- transformFn: import_image3.transformRESTImageToSDKImage,
2497
- paths: [
2498
- { path: "data.checkout.lineItems.media" },
2499
- { path: "data.checkout.lineItems.catalogOverrideFields.image" }
2500
- ]
2501
- },
2502
- {
2503
- transformFn: import_float3.transformRESTFloatToSDKFloat,
2504
- paths: [
2505
- { path: "data.checkout.lineItems.physicalProperties.weight" },
2506
- {
2507
- path: "data.checkout.lineItems.catalogOverrideFields.physicalProperties.weight"
2508
- },
2509
- {
2510
- path: "data.checkout.appliedDiscounts.merchantDiscount.percentage"
2511
- }
2512
- ]
2513
- },
2514
- {
2515
- transformFn: import_address3.transformRESTAddressToSDKAddress,
2516
- paths: [
2517
- { path: "data.checkout.billingInfo.address" },
2518
- { path: "data.checkout.shippingInfo.shippingDestination.address" },
2519
- {
2520
- path: "data.checkout.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address"
2521
- },
2522
- {
2523
- path: "data.checkout.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address"
2524
- }
2525
- ]
2526
- }
2527
- ])
2528
- )
2529
- )();
2530
- var onCheckoutCreated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
2531
- "wix.ecom.v1.checkout_created",
2532
- true,
2533
- (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
2534
- (0, import_transform_paths3.transformPaths)(event, [
2535
- {
2536
- transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
2537
- paths: [
2538
- { path: "entity.createdDate" },
2539
- { path: "entity.updatedDate" },
2540
- {
2541
- path: "entity.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
2542
- },
2543
- { path: "entity.lineItems.serviceProperties.scheduledDate" },
2544
- { path: "entity.lineItems.serviceProperties.endDate" },
2545
- {
2546
- path: "entity.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from"
2547
- },
2548
- {
2549
- path: "entity.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to"
2550
- },
2551
- {
2552
- path: "entity.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from"
2553
- },
2554
- {
2555
- path: "entity.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to"
2556
- },
2557
- {
2558
- path: "entity.membershipOptions.eligibleMemberships.expirationDate"
2559
- },
2560
- {
2561
- path: "entity.membershipOptions.invalidMemberships.membership.expirationDate"
2562
- },
2563
- { path: "entity.subscriptionCharges.charges.cycleBillingDate" },
2564
- { path: "metadata.eventTime" }
2565
- ]
2566
- },
2567
- {
2568
- transformFn: import_page_url_v23.transformRESTPageURLV2ToSDKPageURLV2,
2569
- paths: [{ path: "entity.lineItems.url" }]
2570
- },
2571
- {
2572
- transformFn: import_image3.transformRESTImageToSDKImage,
2573
- paths: [
2574
- { path: "entity.lineItems.media" },
2575
- { path: "entity.lineItems.catalogOverrideFields.image" }
2576
- ]
2577
- },
2578
- {
2579
- transformFn: import_float3.transformRESTFloatToSDKFloat,
2580
- paths: [
2581
- { path: "entity.lineItems.physicalProperties.weight" },
2582
- {
2583
- path: "entity.lineItems.catalogOverrideFields.physicalProperties.weight"
2584
- },
2585
- { path: "entity.appliedDiscounts.merchantDiscount.percentage" }
2586
- ]
2587
- },
2588
- {
2589
- transformFn: import_address3.transformRESTAddressToSDKAddress,
2590
- paths: [
2591
- { path: "entity.billingInfo.address" },
2592
- { path: "entity.shippingInfo.shippingDestination.address" },
2593
- {
2594
- path: "entity.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address"
2595
- },
2596
- {
2597
- path: "entity.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address"
2598
- }
2599
- ]
2600
- }
2601
- ])
2602
- )
2603
- )();
2604
- var onCheckoutDeleted = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
2605
- "wix.ecom.v1.checkout_deleted",
2606
- true,
2607
- (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
2608
- (0, import_transform_paths3.transformPaths)(event, [
2609
- {
2610
- transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
2611
- paths: [
2612
- { path: "undefined.createdDate" },
2613
- { path: "undefined.updatedDate" },
2614
- {
2615
- path: "undefined.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
2616
- },
2617
- { path: "undefined.lineItems.serviceProperties.scheduledDate" },
2618
- { path: "undefined.lineItems.serviceProperties.endDate" },
2619
- {
2620
- path: "undefined.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from"
2621
- },
2622
- {
2623
- path: "undefined.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to"
2624
- },
2625
- {
2626
- path: "undefined.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from"
2627
- },
2628
- {
2629
- path: "undefined.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to"
2630
- },
2631
- {
2632
- path: "undefined.membershipOptions.eligibleMemberships.expirationDate"
2633
- },
2634
- {
2635
- path: "undefined.membershipOptions.invalidMemberships.membership.expirationDate"
2636
- },
2637
- { path: "undefined.subscriptionCharges.charges.cycleBillingDate" },
2638
- { path: "metadata.eventTime" }
2639
- ]
2640
- },
2641
- {
2642
- transformFn: import_page_url_v23.transformRESTPageURLV2ToSDKPageURLV2,
2643
- paths: [{ path: "undefined.lineItems.url" }]
2644
- },
2645
- {
2646
- transformFn: import_image3.transformRESTImageToSDKImage,
2647
- paths: [
2648
- { path: "undefined.lineItems.media" },
2649
- { path: "undefined.lineItems.catalogOverrideFields.image" }
2650
- ]
2651
- },
2652
- {
2653
- transformFn: import_float3.transformRESTFloatToSDKFloat,
2654
- paths: [
2655
- { path: "undefined.lineItems.physicalProperties.weight" },
2656
- {
2657
- path: "undefined.lineItems.catalogOverrideFields.physicalProperties.weight"
2658
- },
2659
- { path: "undefined.appliedDiscounts.merchantDiscount.percentage" }
2660
- ]
2661
- },
2662
- {
2663
- transformFn: import_address3.transformRESTAddressToSDKAddress,
2664
- paths: [
2665
- { path: "undefined.billingInfo.address" },
2666
- { path: "undefined.shippingInfo.shippingDestination.address" },
2667
- {
2668
- path: "undefined.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address"
2669
- },
2670
- {
2671
- path: "undefined.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address"
2672
- }
2673
- ]
2674
- }
2675
- ])
2676
- )
2677
- )();
2678
- var onCheckoutUpdated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
2679
- "wix.ecom.v1.checkout_updated",
2680
- true,
2681
- (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
2682
- (0, import_transform_paths3.transformPaths)(event, [
2683
- {
2684
- transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
2685
- paths: [
2686
- { path: "entity.createdDate" },
2687
- { path: "entity.updatedDate" },
2688
- {
2689
- path: "entity.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
2690
- },
2691
- { path: "entity.lineItems.serviceProperties.scheduledDate" },
2692
- { path: "entity.lineItems.serviceProperties.endDate" },
2693
- {
2694
- path: "entity.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from"
2695
- },
2696
- {
2697
- path: "entity.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to"
2698
- },
2699
- {
2700
- path: "entity.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from"
2701
- },
2702
- {
2703
- path: "entity.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to"
2704
- },
2705
- {
2706
- path: "entity.membershipOptions.eligibleMemberships.expirationDate"
2707
- },
2708
- {
2709
- path: "entity.membershipOptions.invalidMemberships.membership.expirationDate"
2710
- },
2711
- { path: "entity.subscriptionCharges.charges.cycleBillingDate" },
2712
- { path: "metadata.eventTime" },
2713
- { path: "modifiedFields.createdDate" },
2714
- { path: "modifiedFields.updatedDate" },
2715
- {
2716
- path: "modifiedFields.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
2717
- },
2718
- {
2719
- path: "modifiedFields.lineItems.serviceProperties.scheduledDate"
2720
- },
2721
- { path: "modifiedFields.lineItems.serviceProperties.endDate" },
2722
- {
2723
- path: "modifiedFields.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from"
2724
- },
2725
- {
2726
- path: "modifiedFields.shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to"
2727
- },
2728
- {
2729
- path: "modifiedFields.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from"
2730
- },
2731
- {
2732
- path: "modifiedFields.shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to"
2733
- },
2734
- {
2735
- path: "modifiedFields.membershipOptions.eligibleMemberships.expirationDate"
2736
- },
2737
- {
2738
- path: "modifiedFields.membershipOptions.invalidMemberships.membership.expirationDate"
2739
- },
2740
- {
2741
- path: "modifiedFields.subscriptionCharges.charges.cycleBillingDate"
2742
- }
2743
- ]
2744
- },
2745
- {
2746
- transformFn: import_page_url_v23.transformRESTPageURLV2ToSDKPageURLV2,
2747
- paths: [
2748
- { path: "entity.lineItems.url" },
2749
- { path: "modifiedFields.lineItems.url" }
2750
- ]
2751
- },
2752
- {
2753
- transformFn: import_image3.transformRESTImageToSDKImage,
2754
- paths: [
2755
- { path: "entity.lineItems.media" },
2756
- { path: "entity.lineItems.catalogOverrideFields.image" },
2757
- { path: "modifiedFields.lineItems.media" },
2758
- { path: "modifiedFields.lineItems.catalogOverrideFields.image" }
2759
- ]
2760
- },
2761
- {
2762
- transformFn: import_float3.transformRESTFloatToSDKFloat,
2763
- paths: [
2764
- { path: "entity.lineItems.physicalProperties.weight" },
2765
- {
2766
- path: "entity.lineItems.catalogOverrideFields.physicalProperties.weight"
2767
- },
2768
- { path: "entity.appliedDiscounts.merchantDiscount.percentage" },
2769
- { path: "modifiedFields.lineItems.physicalProperties.weight" },
2770
- {
2771
- path: "modifiedFields.lineItems.catalogOverrideFields.physicalProperties.weight"
2772
- },
2773
- {
2774
- path: "modifiedFields.appliedDiscounts.merchantDiscount.percentage"
2775
- }
2776
- ]
2777
- },
2778
- {
2779
- transformFn: import_address3.transformRESTAddressToSDKAddress,
2780
- paths: [
2781
- { path: "entity.billingInfo.address" },
2782
- { path: "entity.shippingInfo.shippingDestination.address" },
2783
- {
2784
- path: "entity.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address"
2785
- },
2786
- {
2787
- path: "entity.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address"
2788
- },
2789
- { path: "modifiedFields.billingInfo.address" },
2790
- { path: "modifiedFields.shippingInfo.shippingDestination.address" },
2791
- {
2792
- path: "modifiedFields.shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address"
2793
- },
2794
- {
2795
- path: "modifiedFields.shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address"
2796
- }
2797
- ]
2798
- }
2799
- ])
2800
- )
2801
- )();
2802
-
2803
- // src/ecom-v1-checkout-checkout.context.ts
2804
- var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
2805
- var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
2806
- var createCheckout4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createCheckout3);
2807
- var getCheckout4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getCheckout3);
2808
- var getCheckoutByCartId4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getCheckoutByCartId3);
2809
- var getWixCheckoutUrl4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getWixCheckoutUrl3);
2810
- var getCheckoutUrl4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getCheckoutUrl3);
2811
- var updateCheckout4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateCheckout3);
2812
- var removeCoupon4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(removeCoupon3);
2813
- var removeGiftCard4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(removeGiftCard3);
2814
- var removeOverrideCheckoutUrl4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(removeOverrideCheckoutUrl3);
2815
- var addToCheckout4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(addToCheckout3);
2816
- var removeLineItems4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(removeLineItems3);
2817
- var createOrder4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createOrder3);
2818
- var createOrderAndCharge4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createOrderAndCharge3);
2819
- var markCheckoutAsCompletedAndRedirectToUrl4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(
2820
- markCheckoutAsCompletedAndRedirectToUrl3
2821
- );
2822
- var markCheckoutAsCompleted4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(markCheckoutAsCompleted3);
2823
- var updateLineItemsQuantity4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateLineItemsQuantity3);
2824
- var onCheckoutCompleted2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
2825
- onCheckoutCompleted
2826
- );
2827
- var onCheckoutCreated2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
2828
- onCheckoutCreated
2829
- );
2830
- var onCheckoutDeleted2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
2831
- onCheckoutDeleted
2832
- );
2833
- var onCheckoutUpdated2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
2834
- onCheckoutUpdated
2835
- );
2836
- // Annotate the CommonJS export names for ESM import in node:
2837
- 0 && (module.exports = {
2838
- AdditionalFeeSource,
2839
- BalanceType,
2840
- ChannelType,
2841
- ChargeType,
2842
- DescriptionLineType,
2843
- DimensionsUnit,
2844
- DiscountType,
2845
- FallbackReason,
2846
- FileType,
2847
- ItemAvailabilityStatus,
2848
- ItemTypePreset,
2849
- JurisdictionType,
2850
- ManualCalculationReason,
2851
- NameInLineItem,
2852
- NameInOther,
2853
- PaymentOptionType,
2854
- PickupMethod,
2855
- PlatformFeeChargeType,
2856
- ProductPeriodAlignment,
2857
- RateType,
2858
- RuleType,
2859
- Severity,
2860
- SubscriptionFrequency,
2861
- SuggestedFix,
2862
- TaxableAddressType,
2863
- VatType,
2864
- WebhookIdentityType,
2865
- WeightUnit,
2866
- addToCheckout,
2867
- createCheckout,
2868
- createOrder,
2869
- createOrderAndCharge,
2870
- getCheckout,
2871
- getCheckoutByCartId,
2872
- getCheckoutUrl,
2873
- getWixCheckoutUrl,
2874
- markCheckoutAsCompleted,
2875
- markCheckoutAsCompletedAndRedirectToUrl,
2876
- onCheckoutCompleted,
2877
- onCheckoutCreated,
2878
- onCheckoutDeleted,
2879
- onCheckoutUpdated,
2880
- removeCoupon,
2881
- removeGiftCard,
2882
- removeLineItems,
2883
- removeOverrideCheckoutUrl,
2884
- updateCheckout,
2885
- updateLineItemsQuantity
2886
- });
2887
- //# sourceMappingURL=index.js.map