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