@wix/auto_sdk_ecom_cart 1.0.13 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/build/{cjs/src/ecom-v1-cart-cart.types.d.ts → ecom-v1-cart-cart.universal-BIIZxJYL.d.mts} +504 -269
  2. package/build/{internal/cjs/src/ecom-v1-cart-cart.types.d.ts → ecom-v1-cart-cart.universal-BIIZxJYL.d.ts} +504 -269
  3. package/build/index.d.mts +149 -0
  4. package/build/index.d.ts +149 -0
  5. package/build/index.js +1938 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +1875 -0
  8. package/build/index.mjs.map +1 -0
  9. package/build/internal/{es/src/ecom-v1-cart-cart.types.d.ts → ecom-v1-cart-cart.universal-CJdmyIWv.d.mts} +668 -269
  10. package/build/{es/src/ecom-v1-cart-cart.types.d.ts → internal/ecom-v1-cart-cart.universal-CJdmyIWv.d.ts} +668 -269
  11. package/build/internal/index.d.mts +160 -0
  12. package/build/internal/index.d.ts +160 -0
  13. package/build/internal/index.js +1938 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +1875 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/internal/meta.d.mts +2050 -0
  18. package/build/internal/meta.d.ts +2050 -0
  19. package/build/internal/meta.js +1027 -0
  20. package/build/internal/meta.js.map +1 -0
  21. package/build/internal/meta.mjs +989 -0
  22. package/build/internal/meta.mjs.map +1 -0
  23. package/build/meta.d.mts +2050 -0
  24. package/build/meta.d.ts +2050 -0
  25. package/build/meta.js +1027 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +989 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +13 -12
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/ecom-v1-cart-cart.context.d.ts +0 -29
  40. package/build/cjs/src/ecom-v1-cart-cart.context.js +0 -59
  41. package/build/cjs/src/ecom-v1-cart-cart.context.js.map +0 -1
  42. package/build/cjs/src/ecom-v1-cart-cart.http.d.ts +0 -60
  43. package/build/cjs/src/ecom-v1-cart-cart.http.js +0 -818
  44. package/build/cjs/src/ecom-v1-cart-cart.http.js.map +0 -1
  45. package/build/cjs/src/ecom-v1-cart-cart.meta.d.ts +0 -46
  46. package/build/cjs/src/ecom-v1-cart-cart.meta.js +0 -256
  47. package/build/cjs/src/ecom-v1-cart-cart.meta.js.map +0 -1
  48. package/build/cjs/src/ecom-v1-cart-cart.public.d.ts +0 -129
  49. package/build/cjs/src/ecom-v1-cart-cart.public.js +0 -227
  50. package/build/cjs/src/ecom-v1-cart-cart.public.js.map +0 -1
  51. package/build/cjs/src/ecom-v1-cart-cart.types.js +0 -255
  52. package/build/cjs/src/ecom-v1-cart-cart.types.js.map +0 -1
  53. package/build/cjs/src/ecom-v1-cart-cart.universal.d.ts +0 -3263
  54. package/build/cjs/src/ecom-v1-cart-cart.universal.js +0 -1192
  55. package/build/cjs/src/ecom-v1-cart-cart.universal.js.map +0 -1
  56. package/build/es/index.d.ts +0 -1
  57. package/build/es/index.js +0 -2
  58. package/build/es/index.js.map +0 -1
  59. package/build/es/index.typings.d.ts +0 -1
  60. package/build/es/index.typings.js +0 -2
  61. package/build/es/index.typings.js.map +0 -1
  62. package/build/es/meta.d.ts +0 -1
  63. package/build/es/meta.js +0 -2
  64. package/build/es/meta.js.map +0 -1
  65. package/build/es/package.json +0 -3
  66. package/build/es/src/ecom-v1-cart-cart.context.d.ts +0 -29
  67. package/build/es/src/ecom-v1-cart-cart.context.js +0 -31
  68. package/build/es/src/ecom-v1-cart-cart.context.js.map +0 -1
  69. package/build/es/src/ecom-v1-cart-cart.http.d.ts +0 -60
  70. package/build/es/src/ecom-v1-cart-cart.http.js +0 -803
  71. package/build/es/src/ecom-v1-cart-cart.http.js.map +0 -1
  72. package/build/es/src/ecom-v1-cart-cart.meta.d.ts +0 -46
  73. package/build/es/src/ecom-v1-cart-cart.meta.js +0 -218
  74. package/build/es/src/ecom-v1-cart-cart.meta.js.map +0 -1
  75. package/build/es/src/ecom-v1-cart-cart.public.d.ts +0 -129
  76. package/build/es/src/ecom-v1-cart-cart.public.js +0 -187
  77. package/build/es/src/ecom-v1-cart-cart.public.js.map +0 -1
  78. package/build/es/src/ecom-v1-cart-cart.types.js +0 -252
  79. package/build/es/src/ecom-v1-cart-cart.types.js.map +0 -1
  80. package/build/es/src/ecom-v1-cart-cart.universal.d.ts +0 -3263
  81. package/build/es/src/ecom-v1-cart-cart.universal.js +0 -1154
  82. package/build/es/src/ecom-v1-cart-cart.universal.js.map +0 -1
  83. package/build/internal/cjs/index.d.ts +0 -1
  84. package/build/internal/cjs/index.js +0 -18
  85. package/build/internal/cjs/index.js.map +0 -1
  86. package/build/internal/cjs/index.typings.d.ts +0 -1
  87. package/build/internal/cjs/index.typings.js +0 -18
  88. package/build/internal/cjs/index.typings.js.map +0 -1
  89. package/build/internal/cjs/meta.d.ts +0 -1
  90. package/build/internal/cjs/meta.js +0 -18
  91. package/build/internal/cjs/meta.js.map +0 -1
  92. package/build/internal/cjs/src/ecom-v1-cart-cart.context.d.ts +0 -31
  93. package/build/internal/cjs/src/ecom-v1-cart-cart.context.js +0 -59
  94. package/build/internal/cjs/src/ecom-v1-cart-cart.context.js.map +0 -1
  95. package/build/internal/cjs/src/ecom-v1-cart-cart.http.d.ts +0 -60
  96. package/build/internal/cjs/src/ecom-v1-cart-cart.http.js +0 -818
  97. package/build/internal/cjs/src/ecom-v1-cart-cart.http.js.map +0 -1
  98. package/build/internal/cjs/src/ecom-v1-cart-cart.meta.d.ts +0 -46
  99. package/build/internal/cjs/src/ecom-v1-cart-cart.meta.js +0 -256
  100. package/build/internal/cjs/src/ecom-v1-cart-cart.meta.js.map +0 -1
  101. package/build/internal/cjs/src/ecom-v1-cart-cart.public.d.ts +0 -138
  102. package/build/internal/cjs/src/ecom-v1-cart-cart.public.js +0 -227
  103. package/build/internal/cjs/src/ecom-v1-cart-cart.public.js.map +0 -1
  104. package/build/internal/cjs/src/ecom-v1-cart-cart.types.js +0 -255
  105. package/build/internal/cjs/src/ecom-v1-cart-cart.types.js.map +0 -1
  106. package/build/internal/cjs/src/ecom-v1-cart-cart.universal.d.ts +0 -3457
  107. package/build/internal/cjs/src/ecom-v1-cart-cart.universal.js +0 -1192
  108. package/build/internal/cjs/src/ecom-v1-cart-cart.universal.js.map +0 -1
  109. package/build/internal/es/index.d.ts +0 -1
  110. package/build/internal/es/index.js +0 -2
  111. package/build/internal/es/index.js.map +0 -1
  112. package/build/internal/es/index.typings.d.ts +0 -1
  113. package/build/internal/es/index.typings.js +0 -2
  114. package/build/internal/es/index.typings.js.map +0 -1
  115. package/build/internal/es/meta.d.ts +0 -1
  116. package/build/internal/es/meta.js +0 -2
  117. package/build/internal/es/meta.js.map +0 -1
  118. package/build/internal/es/src/ecom-v1-cart-cart.context.d.ts +0 -31
  119. package/build/internal/es/src/ecom-v1-cart-cart.context.js +0 -31
  120. package/build/internal/es/src/ecom-v1-cart-cart.context.js.map +0 -1
  121. package/build/internal/es/src/ecom-v1-cart-cart.http.d.ts +0 -60
  122. package/build/internal/es/src/ecom-v1-cart-cart.http.js +0 -803
  123. package/build/internal/es/src/ecom-v1-cart-cart.http.js.map +0 -1
  124. package/build/internal/es/src/ecom-v1-cart-cart.meta.d.ts +0 -46
  125. package/build/internal/es/src/ecom-v1-cart-cart.meta.js +0 -218
  126. package/build/internal/es/src/ecom-v1-cart-cart.meta.js.map +0 -1
  127. package/build/internal/es/src/ecom-v1-cart-cart.public.d.ts +0 -138
  128. package/build/internal/es/src/ecom-v1-cart-cart.public.js +0 -187
  129. package/build/internal/es/src/ecom-v1-cart-cart.public.js.map +0 -1
  130. package/build/internal/es/src/ecom-v1-cart-cart.types.js +0 -252
  131. package/build/internal/es/src/ecom-v1-cart-cart.types.js.map +0 -1
  132. package/build/internal/es/src/ecom-v1-cart-cart.universal.d.ts +0 -3457
  133. package/build/internal/es/src/ecom-v1-cart-cart.universal.js +0 -1154
  134. package/build/internal/es/src/ecom-v1-cart-cart.universal.js.map +0 -1
package/build/index.js ADDED
@@ -0,0 +1,1938 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ AdditionalFeeSource: () => AdditionalFeeSource,
24
+ AppliedDiscountDiscountType: () => AppliedDiscountDiscountType,
25
+ ChannelType: () => ChannelType,
26
+ ChargeType: () => ChargeType,
27
+ DescriptionLineType: () => DescriptionLineType,
28
+ DiscountType: () => DiscountType,
29
+ FallbackReason: () => FallbackReason,
30
+ FileType: () => FileType,
31
+ ItemAvailabilityStatus: () => ItemAvailabilityStatus,
32
+ ItemTypeItemType: () => ItemTypeItemType,
33
+ JurisdictionType: () => JurisdictionType,
34
+ ManualCalculationReason: () => ManualCalculationReason,
35
+ NameInLineItem: () => NameInLineItem,
36
+ NameInOther: () => NameInOther,
37
+ PaymentOptionType: () => PaymentOptionType,
38
+ PickupMethod: () => PickupMethod,
39
+ RateType: () => RateType,
40
+ RuleType: () => RuleType,
41
+ Severity: () => Severity,
42
+ SubscriptionFrequency: () => SubscriptionFrequency,
43
+ SuggestedFix: () => SuggestedFix,
44
+ TaxableAddressType: () => TaxableAddressType,
45
+ VatType: () => VatType,
46
+ WebhookIdentityType: () => WebhookIdentityType,
47
+ WeightUnit: () => WeightUnit,
48
+ addToCart: () => addToCart4,
49
+ createCart: () => createCart4,
50
+ createCheckout: () => createCheckout4,
51
+ deleteCart: () => deleteCart4,
52
+ estimateTotals: () => estimateTotals4,
53
+ getCart: () => getCart4,
54
+ getCartByCheckoutId: () => getCartByCheckoutId4,
55
+ onCartCreated: () => onCartCreated2,
56
+ onCartDeleted: () => onCartDeleted2,
57
+ onCartUpdated: () => onCartUpdated2,
58
+ removeBusinessLocation: () => removeBusinessLocation4,
59
+ removeCoupon: () => removeCoupon4,
60
+ removeLineItems: () => removeLineItems4,
61
+ updateCart: () => updateCart4,
62
+ updateLineItemsQuantity: () => updateLineItemsQuantity4
63
+ });
64
+ module.exports = __toCommonJS(index_exports);
65
+
66
+ // src/ecom-v1-cart-cart.public.ts
67
+ var import_rename_all_nested_keys2 = require("@wix/sdk-runtime/rename-all-nested-keys");
68
+ var import_address3 = require("@wix/sdk-runtime/transformations/address");
69
+ var import_float3 = require("@wix/sdk-runtime/transformations/float");
70
+ var import_image3 = require("@wix/sdk-runtime/transformations/image");
71
+ var import_page_url_v23 = require("@wix/sdk-runtime/transformations/page-url-v2");
72
+ var import_timestamp3 = require("@wix/sdk-runtime/transformations/timestamp");
73
+ var import_transform_paths3 = require("@wix/sdk-runtime/transformations/transform-paths");
74
+ var import_sdk_types = require("@wix/sdk-types");
75
+
76
+ // src/ecom-v1-cart-cart.universal.ts
77
+ var import_transform_error = require("@wix/sdk-runtime/transform-error");
78
+ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
79
+
80
+ // src/ecom-v1-cart-cart.http.ts
81
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
82
+ var import_float = require("@wix/sdk-runtime/transformations/float");
83
+ var import_float2 = require("@wix/sdk-runtime/transformations/float");
84
+ var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
85
+ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
86
+ var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
87
+ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
88
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
89
+ function resolveComWixEcomCartApiV1CartServiceUrl(opts) {
90
+ const domainToMappings = {
91
+ "api._api_base_domain_": [
92
+ {
93
+ srcPath: "/cart",
94
+ destPath: ""
95
+ }
96
+ ],
97
+ "www.wixapis.com": [
98
+ {
99
+ srcPath: "/ecom/v1/carts",
100
+ destPath: "/v1/carts"
101
+ }
102
+ ],
103
+ "www.wixgateway.com": [
104
+ {
105
+ srcPath: "/ecom/v1/carts",
106
+ destPath: "/v1/carts"
107
+ }
108
+ ],
109
+ _: [
110
+ {
111
+ srcPath: "/_api/ecom-cart",
112
+ destPath: ""
113
+ },
114
+ {
115
+ srcPath: "/_api/cart",
116
+ destPath: ""
117
+ },
118
+ {
119
+ srcPath: "/ecom/v1/carts",
120
+ destPath: "/v1/carts"
121
+ }
122
+ ],
123
+ "manage._base_domain_": [
124
+ {
125
+ srcPath: "/ecom/v1/carts",
126
+ destPath: "/v1/carts"
127
+ }
128
+ ],
129
+ "editor._base_domain_": [
130
+ {
131
+ srcPath: "/_api/ecom-cart",
132
+ destPath: ""
133
+ }
134
+ ],
135
+ "blocks._base_domain_": [
136
+ {
137
+ srcPath: "/_api/ecom-cart",
138
+ destPath: ""
139
+ }
140
+ ],
141
+ "create.editorx": [
142
+ {
143
+ srcPath: "/_api/ecom-cart",
144
+ destPath: ""
145
+ }
146
+ ],
147
+ "*.dev.wix-code.com": [
148
+ {
149
+ srcPath: "/_api/ecom-cart",
150
+ destPath: ""
151
+ }
152
+ ],
153
+ "www._base_domain_": [
154
+ {
155
+ srcPath: "/_api/ecom-cart",
156
+ destPath: ""
157
+ }
158
+ ],
159
+ "bo._base_domain_": [
160
+ {
161
+ srcPath: "/ecom/v1/carts",
162
+ destPath: "/v1/carts"
163
+ }
164
+ ],
165
+ "wixbo.ai": [
166
+ {
167
+ srcPath: "/ecom/v1/carts",
168
+ destPath: "/v1/carts"
169
+ }
170
+ ],
171
+ "wix-bo.com": [
172
+ {
173
+ srcPath: "/ecom/v1/carts",
174
+ destPath: "/v1/carts"
175
+ }
176
+ ],
177
+ "editor.wixapps.net": [
178
+ {
179
+ srcPath: "/_api/ecom-cart",
180
+ destPath: ""
181
+ }
182
+ ]
183
+ };
184
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
185
+ }
186
+ var PACKAGE_NAME = "@wix/auto_sdk_ecom_cart";
187
+ function createCart(payload) {
188
+ function __createCart({ host }) {
189
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
190
+ {
191
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
192
+ paths: [
193
+ { path: "cartInfo.createdDate" },
194
+ { path: "cartInfo.updatedDate" },
195
+ { path: "cartInfo.lineItems.image.urlExpirationDate" },
196
+ {
197
+ path: "cartInfo.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
198
+ },
199
+ { path: "cartInfo.lineItems.serviceProperties.scheduledDate" },
200
+ { path: "lineItems.image.urlExpirationDate" },
201
+ {
202
+ path: "lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
203
+ },
204
+ { path: "lineItems.serviceProperties.scheduledDate" },
205
+ {
206
+ path: "customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
207
+ },
208
+ { path: "customLineItems.serviceProperties.scheduledDate" }
209
+ ]
210
+ },
211
+ {
212
+ transformFn: import_float.transformSDKFloatToRESTFloat,
213
+ paths: [
214
+ { path: "cartInfo.lineItems.image.focalPoint.x" },
215
+ { path: "cartInfo.lineItems.image.focalPoint.y" },
216
+ { path: "lineItems.image.focalPoint.x" },
217
+ { path: "lineItems.image.focalPoint.y" },
218
+ { path: "cartInfo.lineItems.physicalProperties.weight" },
219
+ {
220
+ path: "cartInfo.lineItems.catalogOverrideFields.physicalProperties.weight"
221
+ },
222
+ { path: "cartInfo.contactInfo.address.geocode.latitude" },
223
+ { path: "cartInfo.contactInfo.address.geocode.longitude" },
224
+ { path: "lineItems.physicalProperties.weight" },
225
+ { path: "lineItems.catalogOverrideFields.physicalProperties.weight" },
226
+ { path: "customLineItems.physicalProperties.weight" }
227
+ ]
228
+ }
229
+ ]);
230
+ const metadata = {
231
+ entityFqdn: "wix.ecom.v1.cart",
232
+ method: "POST",
233
+ methodFqn: "com.wix.ecom.cart.api.v1.CartService.CreateCart",
234
+ packageName: PACKAGE_NAME,
235
+ url: resolveComWixEcomCartApiV1CartServiceUrl({
236
+ protoPath: "/v1/carts",
237
+ data: serializedData,
238
+ host
239
+ }),
240
+ data: serializedData,
241
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
242
+ {
243
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
244
+ paths: [
245
+ { path: "cart.createdDate" },
246
+ { path: "cart.updatedDate" },
247
+ { path: "cart.lineItems.image.urlExpirationDate" },
248
+ {
249
+ path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
250
+ },
251
+ { path: "cart.lineItems.serviceProperties.scheduledDate" }
252
+ ]
253
+ },
254
+ {
255
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
256
+ paths: [
257
+ { path: "cart.lineItems.image.focalPoint.x" },
258
+ { path: "cart.lineItems.image.focalPoint.y" },
259
+ { path: "cart.lineItems.physicalProperties.weight" },
260
+ {
261
+ path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
262
+ },
263
+ { path: "cart.contactInfo.address.geocode.latitude" },
264
+ { path: "cart.contactInfo.address.geocode.longitude" }
265
+ ]
266
+ }
267
+ ])
268
+ };
269
+ return metadata;
270
+ }
271
+ return __createCart;
272
+ }
273
+ function updateCart(payload) {
274
+ function __updateCart({ host }) {
275
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
276
+ {
277
+ transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
278
+ paths: [{ path: "cartFieldmask" }]
279
+ },
280
+ {
281
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
282
+ paths: [
283
+ { path: "cartInfo.createdDate" },
284
+ { path: "cartInfo.updatedDate" },
285
+ { path: "cartInfo.lineItems.image.urlExpirationDate" },
286
+ {
287
+ path: "cartInfo.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
288
+ },
289
+ { path: "cartInfo.lineItems.serviceProperties.scheduledDate" },
290
+ { path: "lineItems.image.urlExpirationDate" },
291
+ {
292
+ path: "lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
293
+ },
294
+ { path: "lineItems.serviceProperties.scheduledDate" },
295
+ {
296
+ path: "customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
297
+ },
298
+ { path: "customLineItems.serviceProperties.scheduledDate" }
299
+ ]
300
+ },
301
+ {
302
+ transformFn: import_float.transformSDKFloatToRESTFloat,
303
+ paths: [
304
+ { path: "cartInfo.lineItems.image.focalPoint.x" },
305
+ { path: "cartInfo.lineItems.image.focalPoint.y" },
306
+ { path: "lineItems.image.focalPoint.x" },
307
+ { path: "lineItems.image.focalPoint.y" },
308
+ { path: "cartInfo.lineItems.physicalProperties.weight" },
309
+ {
310
+ path: "cartInfo.lineItems.catalogOverrideFields.physicalProperties.weight"
311
+ },
312
+ { path: "cartInfo.contactInfo.address.geocode.latitude" },
313
+ { path: "cartInfo.contactInfo.address.geocode.longitude" },
314
+ { path: "lineItems.physicalProperties.weight" },
315
+ { path: "lineItems.catalogOverrideFields.physicalProperties.weight" },
316
+ { path: "customLineItems.physicalProperties.weight" }
317
+ ]
318
+ }
319
+ ]);
320
+ const metadata = {
321
+ entityFqdn: "wix.ecom.v1.cart",
322
+ method: "PATCH",
323
+ methodFqn: "com.wix.ecom.cart.api.v1.CartService.UpdateCart",
324
+ packageName: PACKAGE_NAME,
325
+ url: resolveComWixEcomCartApiV1CartServiceUrl({
326
+ protoPath: "/v1/carts/{cartInfo.id}",
327
+ data: serializedData,
328
+ host
329
+ }),
330
+ data: serializedData,
331
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
332
+ {
333
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
334
+ paths: [
335
+ { path: "cart.createdDate" },
336
+ { path: "cart.updatedDate" },
337
+ { path: "cart.lineItems.image.urlExpirationDate" },
338
+ {
339
+ path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
340
+ },
341
+ { path: "cart.lineItems.serviceProperties.scheduledDate" }
342
+ ]
343
+ },
344
+ {
345
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
346
+ paths: [
347
+ { path: "cart.lineItems.image.focalPoint.x" },
348
+ { path: "cart.lineItems.image.focalPoint.y" },
349
+ { path: "cart.lineItems.physicalProperties.weight" },
350
+ {
351
+ path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
352
+ },
353
+ { path: "cart.contactInfo.address.geocode.latitude" },
354
+ { path: "cart.contactInfo.address.geocode.longitude" }
355
+ ]
356
+ }
357
+ ])
358
+ };
359
+ return metadata;
360
+ }
361
+ return __updateCart;
362
+ }
363
+ function getCart(payload) {
364
+ function __getCart({ host }) {
365
+ const metadata = {
366
+ entityFqdn: "wix.ecom.v1.cart",
367
+ method: "GET",
368
+ methodFqn: "com.wix.ecom.cart.api.v1.CartService.GetCart",
369
+ packageName: PACKAGE_NAME,
370
+ url: resolveComWixEcomCartApiV1CartServiceUrl({
371
+ protoPath: "/v1/carts/{id}",
372
+ data: payload,
373
+ host
374
+ }),
375
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
376
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
377
+ {
378
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
379
+ paths: [
380
+ { path: "cart.createdDate" },
381
+ { path: "cart.updatedDate" },
382
+ { path: "cart.lineItems.image.urlExpirationDate" },
383
+ {
384
+ path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
385
+ },
386
+ { path: "cart.lineItems.serviceProperties.scheduledDate" }
387
+ ]
388
+ },
389
+ {
390
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
391
+ paths: [
392
+ { path: "cart.lineItems.image.focalPoint.x" },
393
+ { path: "cart.lineItems.image.focalPoint.y" },
394
+ { path: "cart.lineItems.physicalProperties.weight" },
395
+ {
396
+ path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
397
+ },
398
+ { path: "cart.contactInfo.address.geocode.latitude" },
399
+ { path: "cart.contactInfo.address.geocode.longitude" }
400
+ ]
401
+ }
402
+ ])
403
+ };
404
+ return metadata;
405
+ }
406
+ return __getCart;
407
+ }
408
+ function getCartByCheckoutId(payload) {
409
+ function __getCartByCheckoutId({ host }) {
410
+ const metadata = {
411
+ entityFqdn: "wix.ecom.v1.cart",
412
+ method: "GET",
413
+ methodFqn: "com.wix.ecom.cart.api.v1.CartService.GetCartByCheckoutId",
414
+ packageName: PACKAGE_NAME,
415
+ url: resolveComWixEcomCartApiV1CartServiceUrl({
416
+ protoPath: "/v1/carts/by-checkout-id/{id}",
417
+ data: payload,
418
+ host
419
+ }),
420
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
421
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
422
+ {
423
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
424
+ paths: [
425
+ { path: "cart.createdDate" },
426
+ { path: "cart.updatedDate" },
427
+ { path: "cart.lineItems.image.urlExpirationDate" },
428
+ {
429
+ path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
430
+ },
431
+ { path: "cart.lineItems.serviceProperties.scheduledDate" }
432
+ ]
433
+ },
434
+ {
435
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
436
+ paths: [
437
+ { path: "cart.lineItems.image.focalPoint.x" },
438
+ { path: "cart.lineItems.image.focalPoint.y" },
439
+ { path: "cart.lineItems.physicalProperties.weight" },
440
+ {
441
+ path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
442
+ },
443
+ { path: "cart.contactInfo.address.geocode.latitude" },
444
+ { path: "cart.contactInfo.address.geocode.longitude" }
445
+ ]
446
+ }
447
+ ])
448
+ };
449
+ return metadata;
450
+ }
451
+ return __getCartByCheckoutId;
452
+ }
453
+ function addToCart(payload) {
454
+ function __addToCart({ host }) {
455
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
456
+ {
457
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
458
+ paths: [
459
+ { path: "lineItems.image.urlExpirationDate" },
460
+ {
461
+ path: "lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
462
+ },
463
+ { path: "lineItems.serviceProperties.scheduledDate" },
464
+ {
465
+ path: "customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
466
+ },
467
+ { path: "customLineItems.serviceProperties.scheduledDate" }
468
+ ]
469
+ },
470
+ {
471
+ transformFn: import_float.transformSDKFloatToRESTFloat,
472
+ paths: [
473
+ { path: "lineItems.image.focalPoint.x" },
474
+ { path: "lineItems.image.focalPoint.y" },
475
+ { path: "lineItems.physicalProperties.weight" },
476
+ { path: "lineItems.catalogOverrideFields.physicalProperties.weight" },
477
+ { path: "customLineItems.physicalProperties.weight" }
478
+ ]
479
+ }
480
+ ]);
481
+ const metadata = {
482
+ entityFqdn: "wix.ecom.v1.cart",
483
+ method: "POST",
484
+ methodFqn: "com.wix.ecom.cart.api.v1.CartService.AddToCart",
485
+ packageName: PACKAGE_NAME,
486
+ url: resolveComWixEcomCartApiV1CartServiceUrl({
487
+ protoPath: "/v1/carts/{id}/add-to-cart",
488
+ data: serializedData,
489
+ host
490
+ }),
491
+ data: serializedData,
492
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
493
+ {
494
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
495
+ paths: [
496
+ { path: "cart.createdDate" },
497
+ { path: "cart.updatedDate" },
498
+ { path: "cart.lineItems.image.urlExpirationDate" },
499
+ {
500
+ path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
501
+ },
502
+ { path: "cart.lineItems.serviceProperties.scheduledDate" }
503
+ ]
504
+ },
505
+ {
506
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
507
+ paths: [
508
+ { path: "cart.lineItems.image.focalPoint.x" },
509
+ { path: "cart.lineItems.image.focalPoint.y" },
510
+ { path: "cart.lineItems.physicalProperties.weight" },
511
+ {
512
+ path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
513
+ },
514
+ { path: "cart.contactInfo.address.geocode.latitude" },
515
+ { path: "cart.contactInfo.address.geocode.longitude" }
516
+ ]
517
+ }
518
+ ])
519
+ };
520
+ return metadata;
521
+ }
522
+ return __addToCart;
523
+ }
524
+ function removeLineItems(payload) {
525
+ function __removeLineItems({ host }) {
526
+ const metadata = {
527
+ entityFqdn: "wix.ecom.v1.cart",
528
+ method: "POST",
529
+ methodFqn: "com.wix.ecom.cart.api.v1.CartService.RemoveLineItems",
530
+ packageName: PACKAGE_NAME,
531
+ url: resolveComWixEcomCartApiV1CartServiceUrl({
532
+ protoPath: "/v1/carts/{id}/remove-line-items",
533
+ data: payload,
534
+ host
535
+ }),
536
+ data: payload,
537
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
538
+ {
539
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
540
+ paths: [
541
+ { path: "cart.createdDate" },
542
+ { path: "cart.updatedDate" },
543
+ { path: "cart.lineItems.image.urlExpirationDate" },
544
+ {
545
+ path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
546
+ },
547
+ { path: "cart.lineItems.serviceProperties.scheduledDate" }
548
+ ]
549
+ },
550
+ {
551
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
552
+ paths: [
553
+ { path: "cart.lineItems.image.focalPoint.x" },
554
+ { path: "cart.lineItems.image.focalPoint.y" },
555
+ { path: "cart.lineItems.physicalProperties.weight" },
556
+ {
557
+ path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
558
+ },
559
+ { path: "cart.contactInfo.address.geocode.latitude" },
560
+ { path: "cart.contactInfo.address.geocode.longitude" }
561
+ ]
562
+ }
563
+ ])
564
+ };
565
+ return metadata;
566
+ }
567
+ return __removeLineItems;
568
+ }
569
+ function createCheckout(payload) {
570
+ function __createCheckout({ host }) {
571
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
572
+ {
573
+ transformFn: import_float.transformSDKFloatToRESTFloat,
574
+ paths: [
575
+ { path: "shippingAddress.geocode.latitude" },
576
+ { path: "shippingAddress.geocode.longitude" },
577
+ { path: "billingAddress.geocode.latitude" },
578
+ { path: "billingAddress.geocode.longitude" }
579
+ ]
580
+ }
581
+ ]);
582
+ const metadata = {
583
+ entityFqdn: "wix.ecom.v1.cart",
584
+ method: "POST",
585
+ methodFqn: "com.wix.ecom.cart.api.v1.CartService.CreateCheckout",
586
+ packageName: PACKAGE_NAME,
587
+ url: resolveComWixEcomCartApiV1CartServiceUrl({
588
+ protoPath: "/v1/carts/{id}/create-checkout",
589
+ data: serializedData,
590
+ host
591
+ }),
592
+ data: serializedData
593
+ };
594
+ return metadata;
595
+ }
596
+ return __createCheckout;
597
+ }
598
+ function removeCoupon(payload) {
599
+ function __removeCoupon({ host }) {
600
+ const metadata = {
601
+ entityFqdn: "wix.ecom.v1.cart",
602
+ method: "POST",
603
+ methodFqn: "com.wix.ecom.cart.api.v1.CartService.RemoveCoupon",
604
+ packageName: PACKAGE_NAME,
605
+ url: resolveComWixEcomCartApiV1CartServiceUrl({
606
+ protoPath: "/v1/carts/{id}/remove-coupon",
607
+ data: payload,
608
+ host
609
+ }),
610
+ data: payload,
611
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
612
+ {
613
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
614
+ paths: [
615
+ { path: "cart.createdDate" },
616
+ { path: "cart.updatedDate" },
617
+ { path: "cart.lineItems.image.urlExpirationDate" },
618
+ {
619
+ path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
620
+ },
621
+ { path: "cart.lineItems.serviceProperties.scheduledDate" }
622
+ ]
623
+ },
624
+ {
625
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
626
+ paths: [
627
+ { path: "cart.lineItems.image.focalPoint.x" },
628
+ { path: "cart.lineItems.image.focalPoint.y" },
629
+ { path: "cart.lineItems.physicalProperties.weight" },
630
+ {
631
+ path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
632
+ },
633
+ { path: "cart.contactInfo.address.geocode.latitude" },
634
+ { path: "cart.contactInfo.address.geocode.longitude" }
635
+ ]
636
+ }
637
+ ])
638
+ };
639
+ return metadata;
640
+ }
641
+ return __removeCoupon;
642
+ }
643
+ function updateLineItemsQuantity(payload) {
644
+ function __updateLineItemsQuantity({ host }) {
645
+ const metadata = {
646
+ entityFqdn: "wix.ecom.v1.cart",
647
+ method: "POST",
648
+ methodFqn: "com.wix.ecom.cart.api.v1.CartService.UpdateLineItemsQuantity",
649
+ packageName: PACKAGE_NAME,
650
+ url: resolveComWixEcomCartApiV1CartServiceUrl({
651
+ protoPath: "/v1/carts/{id}/update-line-items-quantity",
652
+ data: payload,
653
+ host
654
+ }),
655
+ data: payload,
656
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
657
+ {
658
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
659
+ paths: [
660
+ { path: "cart.createdDate" },
661
+ { path: "cart.updatedDate" },
662
+ { path: "cart.lineItems.image.urlExpirationDate" },
663
+ {
664
+ path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
665
+ },
666
+ { path: "cart.lineItems.serviceProperties.scheduledDate" }
667
+ ]
668
+ },
669
+ {
670
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
671
+ paths: [
672
+ { path: "cart.lineItems.image.focalPoint.x" },
673
+ { path: "cart.lineItems.image.focalPoint.y" },
674
+ { path: "cart.lineItems.physicalProperties.weight" },
675
+ {
676
+ path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
677
+ },
678
+ { path: "cart.contactInfo.address.geocode.latitude" },
679
+ { path: "cart.contactInfo.address.geocode.longitude" }
680
+ ]
681
+ }
682
+ ])
683
+ };
684
+ return metadata;
685
+ }
686
+ return __updateLineItemsQuantity;
687
+ }
688
+ function estimateTotals(payload) {
689
+ function __estimateTotals({ host }) {
690
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
691
+ {
692
+ transformFn: import_float.transformSDKFloatToRESTFloat,
693
+ paths: [
694
+ { path: "shippingAddress.geocode.latitude" },
695
+ { path: "shippingAddress.geocode.longitude" },
696
+ { path: "billingAddress.geocode.latitude" },
697
+ { path: "billingAddress.geocode.longitude" }
698
+ ]
699
+ }
700
+ ]);
701
+ const metadata = {
702
+ entityFqdn: "wix.ecom.v1.cart",
703
+ method: "POST",
704
+ methodFqn: "com.wix.ecom.cart.api.v1.CartService.EstimateTotals",
705
+ packageName: PACKAGE_NAME,
706
+ url: resolveComWixEcomCartApiV1CartServiceUrl({
707
+ protoPath: "/v1/carts/{id}/estimate-totals",
708
+ data: serializedData,
709
+ host
710
+ }),
711
+ data: serializedData,
712
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
713
+ {
714
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
715
+ paths: [
716
+ { path: "cart.createdDate" },
717
+ { path: "cart.updatedDate" },
718
+ { path: "cart.lineItems.image.urlExpirationDate" },
719
+ {
720
+ path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
721
+ },
722
+ { path: "cart.lineItems.serviceProperties.scheduledDate" },
723
+ {
724
+ path: "shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.from"
725
+ },
726
+ {
727
+ path: "shippingInfo.selectedCarrierServiceOption.logistics.deliveryTimeSlot.to"
728
+ },
729
+ {
730
+ path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.from"
731
+ },
732
+ {
733
+ path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.deliveryTimeSlot.to"
734
+ },
735
+ { path: "membershipOptions.eligibleMemberships.expirationDate" },
736
+ {
737
+ path: "membershipOptions.invalidMemberships.membership.expirationDate"
738
+ }
739
+ ]
740
+ },
741
+ {
742
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
743
+ paths: [
744
+ { path: "cart.lineItems.image.focalPoint.x" },
745
+ { path: "cart.lineItems.image.focalPoint.y" },
746
+ { path: "cart.lineItems.physicalProperties.weight" },
747
+ {
748
+ path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
749
+ },
750
+ { path: "cart.contactInfo.address.geocode.latitude" },
751
+ { path: "cart.contactInfo.address.geocode.longitude" },
752
+ {
753
+ path: "shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.latitude"
754
+ },
755
+ {
756
+ path: "shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address.geocode.longitude"
757
+ },
758
+ {
759
+ path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.latitude"
760
+ },
761
+ {
762
+ path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address.geocode.longitude"
763
+ },
764
+ { path: "appliedDiscounts.merchantDiscount.percentage" }
765
+ ]
766
+ }
767
+ ])
768
+ };
769
+ return metadata;
770
+ }
771
+ return __estimateTotals;
772
+ }
773
+ function deleteCart(payload) {
774
+ function __deleteCart({ host }) {
775
+ const metadata = {
776
+ entityFqdn: "wix.ecom.v1.cart",
777
+ method: "DELETE",
778
+ methodFqn: "com.wix.ecom.cart.api.v1.CartService.DeleteCart",
779
+ packageName: PACKAGE_NAME,
780
+ url: resolveComWixEcomCartApiV1CartServiceUrl({
781
+ protoPath: "/v1/carts/{id}",
782
+ data: payload,
783
+ host
784
+ }),
785
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
786
+ };
787
+ return metadata;
788
+ }
789
+ return __deleteCart;
790
+ }
791
+ function removeBusinessLocation(payload) {
792
+ function __removeBusinessLocation({ host }) {
793
+ const metadata = {
794
+ entityFqdn: "wix.ecom.v1.cart",
795
+ method: "POST",
796
+ methodFqn: "com.wix.ecom.cart.api.v1.CartService.RemoveBusinessLocation",
797
+ packageName: PACKAGE_NAME,
798
+ url: resolveComWixEcomCartApiV1CartServiceUrl({
799
+ protoPath: "/v1/carts/{id}/remove-business-location",
800
+ data: payload,
801
+ host
802
+ }),
803
+ data: payload,
804
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
805
+ {
806
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
807
+ paths: [
808
+ { path: "cart.createdDate" },
809
+ { path: "cart.updatedDate" },
810
+ { path: "cart.lineItems.image.urlExpirationDate" },
811
+ {
812
+ path: "cart.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
813
+ },
814
+ { path: "cart.lineItems.serviceProperties.scheduledDate" }
815
+ ]
816
+ },
817
+ {
818
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
819
+ paths: [
820
+ { path: "cart.lineItems.image.focalPoint.x" },
821
+ { path: "cart.lineItems.image.focalPoint.y" },
822
+ { path: "cart.lineItems.physicalProperties.weight" },
823
+ {
824
+ path: "cart.lineItems.catalogOverrideFields.physicalProperties.weight"
825
+ },
826
+ { path: "cart.contactInfo.address.geocode.latitude" },
827
+ { path: "cart.contactInfo.address.geocode.longitude" }
828
+ ]
829
+ }
830
+ ])
831
+ };
832
+ return metadata;
833
+ }
834
+ return __removeBusinessLocation;
835
+ }
836
+
837
+ // src/ecom-v1-cart-cart.universal.ts
838
+ var import_address = require("@wix/sdk-runtime/transformations/address");
839
+ var import_address2 = require("@wix/sdk-runtime/transformations/address");
840
+ var import_image = require("@wix/sdk-runtime/transformations/image");
841
+ var import_image2 = require("@wix/sdk-runtime/transformations/image");
842
+ var import_page_url_v2 = require("@wix/sdk-runtime/transformations/page-url-v2");
843
+ var import_page_url_v22 = require("@wix/sdk-runtime/transformations/page-url-v2");
844
+ var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
845
+ var DescriptionLineType = /* @__PURE__ */ ((DescriptionLineType2) => {
846
+ DescriptionLineType2["UNRECOGNISED"] = "UNRECOGNISED";
847
+ DescriptionLineType2["PLAIN_TEXT"] = "PLAIN_TEXT";
848
+ DescriptionLineType2["COLOR"] = "COLOR";
849
+ return DescriptionLineType2;
850
+ })(DescriptionLineType || {});
851
+ var ItemAvailabilityStatus = /* @__PURE__ */ ((ItemAvailabilityStatus2) => {
852
+ ItemAvailabilityStatus2["AVAILABLE"] = "AVAILABLE";
853
+ ItemAvailabilityStatus2["NOT_FOUND"] = "NOT_FOUND";
854
+ ItemAvailabilityStatus2["NOT_AVAILABLE"] = "NOT_AVAILABLE";
855
+ ItemAvailabilityStatus2["PARTIALLY_AVAILABLE"] = "PARTIALLY_AVAILABLE";
856
+ return ItemAvailabilityStatus2;
857
+ })(ItemAvailabilityStatus || {});
858
+ var ItemTypeItemType = /* @__PURE__ */ ((ItemTypeItemType2) => {
859
+ ItemTypeItemType2["UNRECOGNISED"] = "UNRECOGNISED";
860
+ ItemTypeItemType2["PHYSICAL"] = "PHYSICAL";
861
+ ItemTypeItemType2["DIGITAL"] = "DIGITAL";
862
+ ItemTypeItemType2["GIFT_CARD"] = "GIFT_CARD";
863
+ ItemTypeItemType2["SERVICE"] = "SERVICE";
864
+ return ItemTypeItemType2;
865
+ })(ItemTypeItemType || {});
866
+ var SubscriptionFrequency = /* @__PURE__ */ ((SubscriptionFrequency2) => {
867
+ SubscriptionFrequency2["UNDEFINED"] = "UNDEFINED";
868
+ SubscriptionFrequency2["DAY"] = "DAY";
869
+ SubscriptionFrequency2["WEEK"] = "WEEK";
870
+ SubscriptionFrequency2["MONTH"] = "MONTH";
871
+ SubscriptionFrequency2["YEAR"] = "YEAR";
872
+ return SubscriptionFrequency2;
873
+ })(SubscriptionFrequency || {});
874
+ var FileType = /* @__PURE__ */ ((FileType2) => {
875
+ FileType2["UNSPECIFIED"] = "UNSPECIFIED";
876
+ FileType2["SECURE_PICTURE"] = "SECURE_PICTURE";
877
+ FileType2["SECURE_VIDEO"] = "SECURE_VIDEO";
878
+ FileType2["SECURE_DOCUMENT"] = "SECURE_DOCUMENT";
879
+ FileType2["SECURE_MUSIC"] = "SECURE_MUSIC";
880
+ FileType2["SECURE_ARCHIVE"] = "SECURE_ARCHIVE";
881
+ return FileType2;
882
+ })(FileType || {});
883
+ var PaymentOptionType = /* @__PURE__ */ ((PaymentOptionType2) => {
884
+ PaymentOptionType2["FULL_PAYMENT_ONLINE"] = "FULL_PAYMENT_ONLINE";
885
+ PaymentOptionType2["FULL_PAYMENT_OFFLINE"] = "FULL_PAYMENT_OFFLINE";
886
+ PaymentOptionType2["MEMBERSHIP"] = "MEMBERSHIP";
887
+ PaymentOptionType2["DEPOSIT_ONLINE"] = "DEPOSIT_ONLINE";
888
+ PaymentOptionType2["MEMBERSHIP_OFFLINE"] = "MEMBERSHIP_OFFLINE";
889
+ return PaymentOptionType2;
890
+ })(PaymentOptionType || {});
891
+ var TaxableAddressType = /* @__PURE__ */ ((TaxableAddressType2) => {
892
+ TaxableAddressType2["UNKNOWN_TAXABLE_ADDRESS"] = "UNKNOWN_TAXABLE_ADDRESS";
893
+ TaxableAddressType2["BUSINESS"] = "BUSINESS";
894
+ TaxableAddressType2["BILLING"] = "BILLING";
895
+ TaxableAddressType2["SHIPPING"] = "SHIPPING";
896
+ return TaxableAddressType2;
897
+ })(TaxableAddressType || {});
898
+ var WeightUnit = /* @__PURE__ */ ((WeightUnit2) => {
899
+ WeightUnit2["UNSPECIFIED_WEIGHT_UNIT"] = "UNSPECIFIED_WEIGHT_UNIT";
900
+ WeightUnit2["KG"] = "KG";
901
+ WeightUnit2["LB"] = "LB";
902
+ return WeightUnit2;
903
+ })(WeightUnit || {});
904
+ var DiscountType = /* @__PURE__ */ ((DiscountType2) => {
905
+ DiscountType2["GLOBAL"] = "GLOBAL";
906
+ DiscountType2["SPECIFIC_ITEMS"] = "SPECIFIC_ITEMS";
907
+ DiscountType2["SHIPPING"] = "SHIPPING";
908
+ return DiscountType2;
909
+ })(DiscountType || {});
910
+ var VatType = /* @__PURE__ */ ((VatType2) => {
911
+ VatType2["UNSPECIFIED"] = "UNSPECIFIED";
912
+ VatType2["CPF"] = "CPF";
913
+ VatType2["CNPJ"] = "CNPJ";
914
+ return VatType2;
915
+ })(VatType || {});
916
+ var JurisdictionType = /* @__PURE__ */ ((JurisdictionType2) => {
917
+ JurisdictionType2["UNDEFINED"] = "UNDEFINED";
918
+ JurisdictionType2["COUNTRY"] = "COUNTRY";
919
+ JurisdictionType2["STATE"] = "STATE";
920
+ JurisdictionType2["COUNTY"] = "COUNTY";
921
+ JurisdictionType2["CITY"] = "CITY";
922
+ JurisdictionType2["SPECIAL"] = "SPECIAL";
923
+ return JurisdictionType2;
924
+ })(JurisdictionType || {});
925
+ var RateType = /* @__PURE__ */ ((RateType2) => {
926
+ RateType2["NO_TAX_COLLECTED"] = "NO_TAX_COLLECTED";
927
+ RateType2["MANUAL_RATE"] = "MANUAL_RATE";
928
+ RateType2["AUTO_RATE"] = "AUTO_RATE";
929
+ RateType2["FALLBACK_RATE"] = "FALLBACK_RATE";
930
+ return RateType2;
931
+ })(RateType || {});
932
+ var ManualCalculationReason = /* @__PURE__ */ ((ManualCalculationReason2) => {
933
+ ManualCalculationReason2["GLOBAL_SETTING_TO_MANUAL"] = "GLOBAL_SETTING_TO_MANUAL";
934
+ ManualCalculationReason2["REGION_SETTING_TO_MANUAL"] = "REGION_SETTING_TO_MANUAL";
935
+ return ManualCalculationReason2;
936
+ })(ManualCalculationReason || {});
937
+ var FallbackReason = /* @__PURE__ */ ((FallbackReason2) => {
938
+ FallbackReason2["AUTO_TAX_FAILED"] = "AUTO_TAX_FAILED";
939
+ FallbackReason2["AUTO_TAX_DEACTIVATED"] = "AUTO_TAX_DEACTIVATED";
940
+ return FallbackReason2;
941
+ })(FallbackReason || {});
942
+ var PickupMethod = /* @__PURE__ */ ((PickupMethod2) => {
943
+ PickupMethod2["UNKNOWN_METHOD"] = "UNKNOWN_METHOD";
944
+ PickupMethod2["STORE_PICKUP"] = "STORE_PICKUP";
945
+ PickupMethod2["PICKUP_POINT"] = "PICKUP_POINT";
946
+ return PickupMethod2;
947
+ })(PickupMethod || {});
948
+ var ChargeType = /* @__PURE__ */ ((ChargeType2) => {
949
+ ChargeType2["HANDLING_FEE"] = "HANDLING_FEE";
950
+ ChargeType2["INSURANCE"] = "INSURANCE";
951
+ return ChargeType2;
952
+ })(ChargeType || {});
953
+ var AppliedDiscountDiscountType = /* @__PURE__ */ ((AppliedDiscountDiscountType2) => {
954
+ AppliedDiscountDiscountType2["GLOBAL"] = "GLOBAL";
955
+ AppliedDiscountDiscountType2["SPECIFIC_ITEMS"] = "SPECIFIC_ITEMS";
956
+ AppliedDiscountDiscountType2["SHIPPING"] = "SHIPPING";
957
+ return AppliedDiscountDiscountType2;
958
+ })(AppliedDiscountDiscountType || {});
959
+ var RuleType = /* @__PURE__ */ ((RuleType2) => {
960
+ RuleType2["VALIDATION"] = "VALIDATION";
961
+ RuleType2["OTHER"] = "OTHER";
962
+ RuleType2["MAX"] = "MAX";
963
+ RuleType2["MIN"] = "MIN";
964
+ RuleType2["MAX_LENGTH"] = "MAX_LENGTH";
965
+ RuleType2["MIN_LENGTH"] = "MIN_LENGTH";
966
+ RuleType2["MAX_SIZE"] = "MAX_SIZE";
967
+ RuleType2["MIN_SIZE"] = "MIN_SIZE";
968
+ RuleType2["FORMAT"] = "FORMAT";
969
+ RuleType2["DECIMAL_LTE"] = "DECIMAL_LTE";
970
+ RuleType2["DECIMAL_GTE"] = "DECIMAL_GTE";
971
+ RuleType2["DECIMAL_LT"] = "DECIMAL_LT";
972
+ RuleType2["DECIMAL_GT"] = "DECIMAL_GT";
973
+ RuleType2["DECIMAL_MAX_SCALE"] = "DECIMAL_MAX_SCALE";
974
+ RuleType2["INVALID_ENUM_VALUE"] = "INVALID_ENUM_VALUE";
975
+ RuleType2["REQUIRED_FIELD"] = "REQUIRED_FIELD";
976
+ RuleType2["FIELD_NOT_ALLOWED"] = "FIELD_NOT_ALLOWED";
977
+ RuleType2["ONE_OF_ALIGNMENT"] = "ONE_OF_ALIGNMENT";
978
+ RuleType2["EXACT_LENGTH"] = "EXACT_LENGTH";
979
+ RuleType2["EXACT_SIZE"] = "EXACT_SIZE";
980
+ RuleType2["REQUIRED_ONE_OF_FIELD"] = "REQUIRED_ONE_OF_FIELD";
981
+ return RuleType2;
982
+ })(RuleType || {});
983
+ var AdditionalFeeSource = /* @__PURE__ */ ((AdditionalFeeSource2) => {
984
+ AdditionalFeeSource2["UNKNOWN_ADDITIONAL_FEE_SOURCE"] = "UNKNOWN_ADDITIONAL_FEE_SOURCE";
985
+ AdditionalFeeSource2["SERVICE_PLUGIN"] = "SERVICE_PLUGIN";
986
+ AdditionalFeeSource2["ITEM"] = "ITEM";
987
+ AdditionalFeeSource2["MANUAL"] = "MANUAL";
988
+ return AdditionalFeeSource2;
989
+ })(AdditionalFeeSource || {});
990
+ var Severity = /* @__PURE__ */ ((Severity2) => {
991
+ Severity2["WARNING"] = "WARNING";
992
+ Severity2["ERROR"] = "ERROR";
993
+ return Severity2;
994
+ })(Severity || {});
995
+ var NameInOther = /* @__PURE__ */ ((NameInOther2) => {
996
+ NameInOther2["OTHER_DEFAULT"] = "OTHER_DEFAULT";
997
+ return NameInOther2;
998
+ })(NameInOther || {});
999
+ var NameInLineItem = /* @__PURE__ */ ((NameInLineItem2) => {
1000
+ NameInLineItem2["LINE_ITEM_DEFAULT"] = "LINE_ITEM_DEFAULT";
1001
+ return NameInLineItem2;
1002
+ })(NameInLineItem || {});
1003
+ var SuggestedFix = /* @__PURE__ */ ((SuggestedFix2) => {
1004
+ SuggestedFix2["UNKNOWN_SUGGESTED_FIX"] = "UNKNOWN_SUGGESTED_FIX";
1005
+ SuggestedFix2["REMOVE_LINE_ITEM"] = "REMOVE_LINE_ITEM";
1006
+ return SuggestedFix2;
1007
+ })(SuggestedFix || {});
1008
+ var ChannelType = /* @__PURE__ */ ((ChannelType2) => {
1009
+ ChannelType2["UNSPECIFIED"] = "UNSPECIFIED";
1010
+ ChannelType2["WEB"] = "WEB";
1011
+ ChannelType2["POS"] = "POS";
1012
+ ChannelType2["EBAY"] = "EBAY";
1013
+ ChannelType2["AMAZON"] = "AMAZON";
1014
+ ChannelType2["OTHER_PLATFORM"] = "OTHER_PLATFORM";
1015
+ ChannelType2["WIX_APP_STORE"] = "WIX_APP_STORE";
1016
+ ChannelType2["WIX_INVOICES"] = "WIX_INVOICES";
1017
+ ChannelType2["BACKOFFICE_MERCHANT"] = "BACKOFFICE_MERCHANT";
1018
+ ChannelType2["WISH"] = "WISH";
1019
+ ChannelType2["CLASS_PASS"] = "CLASS_PASS";
1020
+ ChannelType2["GLOBAL_E"] = "GLOBAL_E";
1021
+ ChannelType2["FACEBOOK"] = "FACEBOOK";
1022
+ ChannelType2["ETSY"] = "ETSY";
1023
+ ChannelType2["TIKTOK"] = "TIKTOK";
1024
+ ChannelType2["FAIRE_COM"] = "FAIRE_COM";
1025
+ return ChannelType2;
1026
+ })(ChannelType || {});
1027
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
1028
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
1029
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
1030
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
1031
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
1032
+ WebhookIdentityType2["APP"] = "APP";
1033
+ return WebhookIdentityType2;
1034
+ })(WebhookIdentityType || {});
1035
+ async function createCart2(options) {
1036
+ const { httpClient, sideEffects } = arguments[1];
1037
+ const payload = (0, import_transform_paths2.transformPaths)(
1038
+ (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1039
+ cartInfo: options?.cartInfo,
1040
+ couponCode: options?.couponCode,
1041
+ merchantDiscounts: options?.merchantDiscounts,
1042
+ lineItems: options?.lineItems,
1043
+ customLineItems: options?.customLineItems
1044
+ }),
1045
+ [
1046
+ {
1047
+ transformFn: import_page_url_v2.transformSDKPageURLV2ToRESTPageURLV2,
1048
+ paths: [
1049
+ { path: "cartInfo.lineItems.url" },
1050
+ { path: "lineItems.url" },
1051
+ { path: "customLineItems.url" }
1052
+ ]
1053
+ },
1054
+ {
1055
+ transformFn: import_image.transformSDKImageToRESTImage,
1056
+ paths: [
1057
+ { path: "cartInfo.lineItems.image" },
1058
+ { path: "cartInfo.lineItems.catalogOverrideFields.image" },
1059
+ { path: "lineItems.image" },
1060
+ { path: "lineItems.catalogOverrideFields.image" },
1061
+ { path: "customLineItems.media" }
1062
+ ]
1063
+ },
1064
+ {
1065
+ transformFn: import_address.transformSDKAddressToRESTAddress,
1066
+ paths: [{ path: "cartInfo.contactInfo.address" }]
1067
+ }
1068
+ ]
1069
+ );
1070
+ const reqOpts = createCart(payload);
1071
+ sideEffects?.onSiteCall?.();
1072
+ try {
1073
+ const result = await httpClient.request(reqOpts);
1074
+ sideEffects?.onSuccess?.(result);
1075
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1076
+ (0, import_transform_paths2.transformPaths)(result.data, [
1077
+ {
1078
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1079
+ paths: [{ path: "cart.lineItems.url" }]
1080
+ },
1081
+ {
1082
+ transformFn: import_image2.transformRESTImageToSDKImage,
1083
+ paths: [
1084
+ { path: "cart.lineItems.image" },
1085
+ { path: "cart.lineItems.catalogOverrideFields.image" }
1086
+ ]
1087
+ },
1088
+ {
1089
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
1090
+ paths: [{ path: "cart.contactInfo.address" }]
1091
+ }
1092
+ ])
1093
+ )?.cart;
1094
+ } catch (err) {
1095
+ const transformedError = (0, import_transform_error.transformError)(
1096
+ err,
1097
+ {
1098
+ spreadPathsToArguments: {},
1099
+ explicitPathsToArguments: {
1100
+ cartInfo: "$[0].cartInfo",
1101
+ couponCode: "$[0].couponCode",
1102
+ merchantDiscounts: "$[0].merchantDiscounts",
1103
+ lineItems: "$[0].lineItems",
1104
+ customLineItems: "$[0].customLineItems"
1105
+ },
1106
+ singleArgumentUnchanged: false
1107
+ },
1108
+ ["options"]
1109
+ );
1110
+ sideEffects?.onError?.(err);
1111
+ throw transformedError;
1112
+ }
1113
+ }
1114
+ async function updateCart2(_id, options) {
1115
+ const { httpClient, sideEffects } = arguments[2];
1116
+ const payload = (0, import_transform_paths2.transformPaths)(
1117
+ (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1118
+ cartInfo: { ...options?.cartInfo, id: _id },
1119
+ couponCode: options?.couponCode,
1120
+ merchantDiscounts: options?.merchantDiscounts,
1121
+ lineItems: options?.lineItems,
1122
+ customLineItems: options?.customLineItems
1123
+ }),
1124
+ [
1125
+ {
1126
+ transformFn: import_page_url_v2.transformSDKPageURLV2ToRESTPageURLV2,
1127
+ paths: [
1128
+ { path: "cartInfo.lineItems.url" },
1129
+ { path: "lineItems.url" },
1130
+ { path: "customLineItems.url" }
1131
+ ]
1132
+ },
1133
+ {
1134
+ transformFn: import_image.transformSDKImageToRESTImage,
1135
+ paths: [
1136
+ { path: "cartInfo.lineItems.image" },
1137
+ { path: "cartInfo.lineItems.catalogOverrideFields.image" },
1138
+ { path: "lineItems.image" },
1139
+ { path: "lineItems.catalogOverrideFields.image" },
1140
+ { path: "customLineItems.media" }
1141
+ ]
1142
+ },
1143
+ {
1144
+ transformFn: import_address.transformSDKAddressToRESTAddress,
1145
+ paths: [{ path: "cartInfo.contactInfo.address" }]
1146
+ }
1147
+ ]
1148
+ );
1149
+ const reqOpts = updateCart(payload);
1150
+ sideEffects?.onSiteCall?.();
1151
+ try {
1152
+ const result = await httpClient.request(reqOpts);
1153
+ sideEffects?.onSuccess?.(result);
1154
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1155
+ (0, import_transform_paths2.transformPaths)(result.data, [
1156
+ {
1157
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1158
+ paths: [{ path: "cart.lineItems.url" }]
1159
+ },
1160
+ {
1161
+ transformFn: import_image2.transformRESTImageToSDKImage,
1162
+ paths: [
1163
+ { path: "cart.lineItems.image" },
1164
+ { path: "cart.lineItems.catalogOverrideFields.image" }
1165
+ ]
1166
+ },
1167
+ {
1168
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
1169
+ paths: [{ path: "cart.contactInfo.address" }]
1170
+ }
1171
+ ])
1172
+ )?.cart;
1173
+ } catch (err) {
1174
+ const transformedError = (0, import_transform_error.transformError)(
1175
+ err,
1176
+ {
1177
+ spreadPathsToArguments: { cartInfo: "$[1].cartInfo" },
1178
+ explicitPathsToArguments: {
1179
+ "cartInfo.id": "$[0]",
1180
+ couponCode: "$[1].couponCode",
1181
+ merchantDiscounts: "$[1].merchantDiscounts",
1182
+ lineItems: "$[1].lineItems",
1183
+ customLineItems: "$[1].customLineItems"
1184
+ },
1185
+ singleArgumentUnchanged: false
1186
+ },
1187
+ ["_id", "options"]
1188
+ );
1189
+ sideEffects?.onError?.(err);
1190
+ throw transformedError;
1191
+ }
1192
+ }
1193
+ async function getCart2(_id) {
1194
+ const { httpClient, sideEffects } = arguments[1];
1195
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
1196
+ const reqOpts = getCart(payload);
1197
+ sideEffects?.onSiteCall?.();
1198
+ try {
1199
+ const result = await httpClient.request(reqOpts);
1200
+ sideEffects?.onSuccess?.(result);
1201
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1202
+ (0, import_transform_paths2.transformPaths)(result.data, [
1203
+ {
1204
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1205
+ paths: [{ path: "cart.lineItems.url" }]
1206
+ },
1207
+ {
1208
+ transformFn: import_image2.transformRESTImageToSDKImage,
1209
+ paths: [
1210
+ { path: "cart.lineItems.image" },
1211
+ { path: "cart.lineItems.catalogOverrideFields.image" }
1212
+ ]
1213
+ },
1214
+ {
1215
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
1216
+ paths: [{ path: "cart.contactInfo.address" }]
1217
+ }
1218
+ ])
1219
+ )?.cart;
1220
+ } catch (err) {
1221
+ const transformedError = (0, import_transform_error.transformError)(
1222
+ err,
1223
+ {
1224
+ spreadPathsToArguments: {},
1225
+ explicitPathsToArguments: { id: "$[0]" },
1226
+ singleArgumentUnchanged: false
1227
+ },
1228
+ ["_id"]
1229
+ );
1230
+ sideEffects?.onError?.(err);
1231
+ throw transformedError;
1232
+ }
1233
+ }
1234
+ async function getCartByCheckoutId2(_id) {
1235
+ const { httpClient, sideEffects } = arguments[1];
1236
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
1237
+ const reqOpts = getCartByCheckoutId(payload);
1238
+ sideEffects?.onSiteCall?.();
1239
+ try {
1240
+ const result = await httpClient.request(reqOpts);
1241
+ sideEffects?.onSuccess?.(result);
1242
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1243
+ (0, import_transform_paths2.transformPaths)(result.data, [
1244
+ {
1245
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1246
+ paths: [{ path: "cart.lineItems.url" }]
1247
+ },
1248
+ {
1249
+ transformFn: import_image2.transformRESTImageToSDKImage,
1250
+ paths: [
1251
+ { path: "cart.lineItems.image" },
1252
+ { path: "cart.lineItems.catalogOverrideFields.image" }
1253
+ ]
1254
+ },
1255
+ {
1256
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
1257
+ paths: [{ path: "cart.contactInfo.address" }]
1258
+ }
1259
+ ])
1260
+ );
1261
+ } catch (err) {
1262
+ const transformedError = (0, import_transform_error.transformError)(
1263
+ err,
1264
+ {
1265
+ spreadPathsToArguments: {},
1266
+ explicitPathsToArguments: { id: "$[0]" },
1267
+ singleArgumentUnchanged: false
1268
+ },
1269
+ ["_id"]
1270
+ );
1271
+ sideEffects?.onError?.(err);
1272
+ throw transformedError;
1273
+ }
1274
+ }
1275
+ async function addToCart2(_id, options) {
1276
+ const { httpClient, sideEffects } = arguments[2];
1277
+ const payload = (0, import_transform_paths2.transformPaths)(
1278
+ (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1279
+ id: _id,
1280
+ lineItems: options?.lineItems,
1281
+ customLineItems: options?.customLineItems,
1282
+ businessLocationId: options?.businessLocationId
1283
+ }),
1284
+ [
1285
+ {
1286
+ transformFn: import_page_url_v2.transformSDKPageURLV2ToRESTPageURLV2,
1287
+ paths: [{ path: "lineItems.url" }, { path: "customLineItems.url" }]
1288
+ },
1289
+ {
1290
+ transformFn: import_image.transformSDKImageToRESTImage,
1291
+ paths: [
1292
+ { path: "lineItems.image" },
1293
+ { path: "lineItems.catalogOverrideFields.image" },
1294
+ { path: "customLineItems.media" }
1295
+ ]
1296
+ }
1297
+ ]
1298
+ );
1299
+ const reqOpts = addToCart(payload);
1300
+ sideEffects?.onSiteCall?.();
1301
+ try {
1302
+ const result = await httpClient.request(reqOpts);
1303
+ sideEffects?.onSuccess?.(result);
1304
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1305
+ (0, import_transform_paths2.transformPaths)(result.data, [
1306
+ {
1307
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1308
+ paths: [{ path: "cart.lineItems.url" }]
1309
+ },
1310
+ {
1311
+ transformFn: import_image2.transformRESTImageToSDKImage,
1312
+ paths: [
1313
+ { path: "cart.lineItems.image" },
1314
+ { path: "cart.lineItems.catalogOverrideFields.image" }
1315
+ ]
1316
+ },
1317
+ {
1318
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
1319
+ paths: [{ path: "cart.contactInfo.address" }]
1320
+ }
1321
+ ])
1322
+ );
1323
+ } catch (err) {
1324
+ const transformedError = (0, import_transform_error.transformError)(
1325
+ err,
1326
+ {
1327
+ spreadPathsToArguments: {},
1328
+ explicitPathsToArguments: {
1329
+ id: "$[0]",
1330
+ lineItems: "$[1].lineItems",
1331
+ customLineItems: "$[1].customLineItems",
1332
+ businessLocationId: "$[1].businessLocationId"
1333
+ },
1334
+ singleArgumentUnchanged: false
1335
+ },
1336
+ ["_id", "options"]
1337
+ );
1338
+ sideEffects?.onError?.(err);
1339
+ throw transformedError;
1340
+ }
1341
+ }
1342
+ async function removeLineItems2(_id, lineItemIds) {
1343
+ const { httpClient, sideEffects } = arguments[2];
1344
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1345
+ id: _id,
1346
+ lineItemIds
1347
+ });
1348
+ const reqOpts = removeLineItems(payload);
1349
+ sideEffects?.onSiteCall?.();
1350
+ try {
1351
+ const result = await httpClient.request(reqOpts);
1352
+ sideEffects?.onSuccess?.(result);
1353
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1354
+ (0, import_transform_paths2.transformPaths)(result.data, [
1355
+ {
1356
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1357
+ paths: [{ path: "cart.lineItems.url" }]
1358
+ },
1359
+ {
1360
+ transformFn: import_image2.transformRESTImageToSDKImage,
1361
+ paths: [
1362
+ { path: "cart.lineItems.image" },
1363
+ { path: "cart.lineItems.catalogOverrideFields.image" }
1364
+ ]
1365
+ },
1366
+ {
1367
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
1368
+ paths: [{ path: "cart.contactInfo.address" }]
1369
+ }
1370
+ ])
1371
+ );
1372
+ } catch (err) {
1373
+ const transformedError = (0, import_transform_error.transformError)(
1374
+ err,
1375
+ {
1376
+ spreadPathsToArguments: {},
1377
+ explicitPathsToArguments: { id: "$[0]", lineItemIds: "$[1]" },
1378
+ singleArgumentUnchanged: false
1379
+ },
1380
+ ["_id", "lineItemIds"]
1381
+ );
1382
+ sideEffects?.onError?.(err);
1383
+ throw transformedError;
1384
+ }
1385
+ }
1386
+ async function createCheckout2(_id, options) {
1387
+ const { httpClient, sideEffects } = arguments[2];
1388
+ const payload = (0, import_transform_paths2.transformPaths)(
1389
+ (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1390
+ id: _id,
1391
+ channelType: options?.channelType,
1392
+ shippingAddress: options?.shippingAddress,
1393
+ billingAddress: options?.billingAddress,
1394
+ selectedShippingOption: options?.selectedShippingOption,
1395
+ email: options?.email
1396
+ }),
1397
+ [
1398
+ {
1399
+ transformFn: import_address.transformSDKAddressToRESTAddress,
1400
+ paths: [{ path: "shippingAddress" }, { path: "billingAddress" }]
1401
+ }
1402
+ ]
1403
+ );
1404
+ const reqOpts = createCheckout(payload);
1405
+ sideEffects?.onSiteCall?.();
1406
+ try {
1407
+ const result = await httpClient.request(reqOpts);
1408
+ sideEffects?.onSuccess?.(result);
1409
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1410
+ } catch (err) {
1411
+ const transformedError = (0, import_transform_error.transformError)(
1412
+ err,
1413
+ {
1414
+ spreadPathsToArguments: {},
1415
+ explicitPathsToArguments: {
1416
+ id: "$[0]",
1417
+ channelType: "$[1].channelType",
1418
+ shippingAddress: "$[1].shippingAddress",
1419
+ billingAddress: "$[1].billingAddress",
1420
+ selectedShippingOption: "$[1].selectedShippingOption",
1421
+ email: "$[1].email"
1422
+ },
1423
+ singleArgumentUnchanged: false
1424
+ },
1425
+ ["_id", "options"]
1426
+ );
1427
+ sideEffects?.onError?.(err);
1428
+ throw transformedError;
1429
+ }
1430
+ }
1431
+ async function removeCoupon2(_id) {
1432
+ const { httpClient, sideEffects } = arguments[1];
1433
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
1434
+ const reqOpts = removeCoupon(payload);
1435
+ sideEffects?.onSiteCall?.();
1436
+ try {
1437
+ const result = await httpClient.request(reqOpts);
1438
+ sideEffects?.onSuccess?.(result);
1439
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1440
+ (0, import_transform_paths2.transformPaths)(result.data, [
1441
+ {
1442
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1443
+ paths: [{ path: "cart.lineItems.url" }]
1444
+ },
1445
+ {
1446
+ transformFn: import_image2.transformRESTImageToSDKImage,
1447
+ paths: [
1448
+ { path: "cart.lineItems.image" },
1449
+ { path: "cart.lineItems.catalogOverrideFields.image" }
1450
+ ]
1451
+ },
1452
+ {
1453
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
1454
+ paths: [{ path: "cart.contactInfo.address" }]
1455
+ }
1456
+ ])
1457
+ );
1458
+ } catch (err) {
1459
+ const transformedError = (0, import_transform_error.transformError)(
1460
+ err,
1461
+ {
1462
+ spreadPathsToArguments: {},
1463
+ explicitPathsToArguments: { id: "$[0]" },
1464
+ singleArgumentUnchanged: false
1465
+ },
1466
+ ["_id"]
1467
+ );
1468
+ sideEffects?.onError?.(err);
1469
+ throw transformedError;
1470
+ }
1471
+ }
1472
+ async function updateLineItemsQuantity2(_id, lineItems) {
1473
+ const { httpClient, sideEffects } = arguments[2];
1474
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1475
+ id: _id,
1476
+ lineItems
1477
+ });
1478
+ const reqOpts = updateLineItemsQuantity(payload);
1479
+ sideEffects?.onSiteCall?.();
1480
+ try {
1481
+ const result = await httpClient.request(reqOpts);
1482
+ sideEffects?.onSuccess?.(result);
1483
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1484
+ (0, import_transform_paths2.transformPaths)(result.data, [
1485
+ {
1486
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1487
+ paths: [{ path: "cart.lineItems.url" }]
1488
+ },
1489
+ {
1490
+ transformFn: import_image2.transformRESTImageToSDKImage,
1491
+ paths: [
1492
+ { path: "cart.lineItems.image" },
1493
+ { path: "cart.lineItems.catalogOverrideFields.image" }
1494
+ ]
1495
+ },
1496
+ {
1497
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
1498
+ paths: [{ path: "cart.contactInfo.address" }]
1499
+ }
1500
+ ])
1501
+ );
1502
+ } catch (err) {
1503
+ const transformedError = (0, import_transform_error.transformError)(
1504
+ err,
1505
+ {
1506
+ spreadPathsToArguments: {},
1507
+ explicitPathsToArguments: { id: "$[0]", lineItems: "$[1]" },
1508
+ singleArgumentUnchanged: false
1509
+ },
1510
+ ["_id", "lineItems"]
1511
+ );
1512
+ sideEffects?.onError?.(err);
1513
+ throw transformedError;
1514
+ }
1515
+ }
1516
+ async function estimateTotals2(_id, options) {
1517
+ const { httpClient, sideEffects } = arguments[2];
1518
+ const payload = (0, import_transform_paths2.transformPaths)(
1519
+ (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1520
+ id: _id,
1521
+ selectedShippingOption: options?.selectedShippingOption,
1522
+ shippingAddress: options?.shippingAddress,
1523
+ billingAddress: options?.billingAddress,
1524
+ selectedMemberships: options?.selectedMemberships,
1525
+ calculateTax: options?.calculateTax,
1526
+ calculateShipping: options?.calculateShipping
1527
+ }),
1528
+ [
1529
+ {
1530
+ transformFn: import_address.transformSDKAddressToRESTAddress,
1531
+ paths: [{ path: "shippingAddress" }, { path: "billingAddress" }]
1532
+ }
1533
+ ]
1534
+ );
1535
+ const reqOpts = estimateTotals(payload);
1536
+ sideEffects?.onSiteCall?.();
1537
+ try {
1538
+ const result = await httpClient.request(reqOpts);
1539
+ sideEffects?.onSuccess?.(result);
1540
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1541
+ (0, import_transform_paths2.transformPaths)(result.data, [
1542
+ {
1543
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1544
+ paths: [{ path: "cart.lineItems.url" }]
1545
+ },
1546
+ {
1547
+ transformFn: import_image2.transformRESTImageToSDKImage,
1548
+ paths: [
1549
+ { path: "cart.lineItems.image" },
1550
+ { path: "cart.lineItems.catalogOverrideFields.image" }
1551
+ ]
1552
+ },
1553
+ {
1554
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
1555
+ paths: [
1556
+ { path: "cart.contactInfo.address" },
1557
+ {
1558
+ path: "shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.address"
1559
+ },
1560
+ {
1561
+ path: "shippingInfo.carrierServiceOptions.shippingOptions.logistics.pickupDetails.address"
1562
+ }
1563
+ ]
1564
+ }
1565
+ ])
1566
+ );
1567
+ } catch (err) {
1568
+ const transformedError = (0, import_transform_error.transformError)(
1569
+ err,
1570
+ {
1571
+ spreadPathsToArguments: {},
1572
+ explicitPathsToArguments: {
1573
+ id: "$[0]",
1574
+ selectedShippingOption: "$[1].selectedShippingOption",
1575
+ shippingAddress: "$[1].shippingAddress",
1576
+ billingAddress: "$[1].billingAddress",
1577
+ selectedMemberships: "$[1].selectedMemberships",
1578
+ calculateTax: "$[1].calculateTax",
1579
+ calculateShipping: "$[1].calculateShipping"
1580
+ },
1581
+ singleArgumentUnchanged: false
1582
+ },
1583
+ ["_id", "options"]
1584
+ );
1585
+ sideEffects?.onError?.(err);
1586
+ throw transformedError;
1587
+ }
1588
+ }
1589
+ async function deleteCart2(_id) {
1590
+ const { httpClient, sideEffects } = arguments[1];
1591
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
1592
+ const reqOpts = deleteCart(payload);
1593
+ sideEffects?.onSiteCall?.();
1594
+ try {
1595
+ const result = await httpClient.request(reqOpts);
1596
+ sideEffects?.onSuccess?.(result);
1597
+ } catch (err) {
1598
+ const transformedError = (0, import_transform_error.transformError)(
1599
+ err,
1600
+ {
1601
+ spreadPathsToArguments: {},
1602
+ explicitPathsToArguments: { id: "$[0]" },
1603
+ singleArgumentUnchanged: false
1604
+ },
1605
+ ["_id"]
1606
+ );
1607
+ sideEffects?.onError?.(err);
1608
+ throw transformedError;
1609
+ }
1610
+ }
1611
+ async function removeBusinessLocation2(_id) {
1612
+ const { httpClient, sideEffects } = arguments[1];
1613
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
1614
+ const reqOpts = removeBusinessLocation(payload);
1615
+ sideEffects?.onSiteCall?.();
1616
+ try {
1617
+ const result = await httpClient.request(reqOpts);
1618
+ sideEffects?.onSuccess?.(result);
1619
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1620
+ (0, import_transform_paths2.transformPaths)(result.data, [
1621
+ {
1622
+ transformFn: import_page_url_v22.transformRESTPageURLV2ToSDKPageURLV2,
1623
+ paths: [{ path: "cart.lineItems.url" }]
1624
+ },
1625
+ {
1626
+ transformFn: import_image2.transformRESTImageToSDKImage,
1627
+ paths: [
1628
+ { path: "cart.lineItems.image" },
1629
+ { path: "cart.lineItems.catalogOverrideFields.image" }
1630
+ ]
1631
+ },
1632
+ {
1633
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
1634
+ paths: [{ path: "cart.contactInfo.address" }]
1635
+ }
1636
+ ])
1637
+ );
1638
+ } catch (err) {
1639
+ const transformedError = (0, import_transform_error.transformError)(
1640
+ err,
1641
+ {
1642
+ spreadPathsToArguments: {},
1643
+ explicitPathsToArguments: { id: "$[0]" },
1644
+ singleArgumentUnchanged: false
1645
+ },
1646
+ ["_id"]
1647
+ );
1648
+ sideEffects?.onError?.(err);
1649
+ throw transformedError;
1650
+ }
1651
+ }
1652
+
1653
+ // src/ecom-v1-cart-cart.public.ts
1654
+ function createCart3(httpClient) {
1655
+ return (options) => createCart2(
1656
+ options,
1657
+ // @ts-ignore
1658
+ { httpClient }
1659
+ );
1660
+ }
1661
+ function updateCart3(httpClient) {
1662
+ return (_id, options) => updateCart2(
1663
+ _id,
1664
+ options,
1665
+ // @ts-ignore
1666
+ { httpClient }
1667
+ );
1668
+ }
1669
+ function getCart3(httpClient) {
1670
+ return (_id) => getCart2(
1671
+ _id,
1672
+ // @ts-ignore
1673
+ { httpClient }
1674
+ );
1675
+ }
1676
+ function getCartByCheckoutId3(httpClient) {
1677
+ return (_id) => getCartByCheckoutId2(
1678
+ _id,
1679
+ // @ts-ignore
1680
+ { httpClient }
1681
+ );
1682
+ }
1683
+ function addToCart3(httpClient) {
1684
+ return (_id, options) => addToCart2(
1685
+ _id,
1686
+ options,
1687
+ // @ts-ignore
1688
+ { httpClient }
1689
+ );
1690
+ }
1691
+ function removeLineItems3(httpClient) {
1692
+ return (_id, lineItemIds) => removeLineItems2(
1693
+ _id,
1694
+ lineItemIds,
1695
+ // @ts-ignore
1696
+ { httpClient }
1697
+ );
1698
+ }
1699
+ function createCheckout3(httpClient) {
1700
+ return (_id, options) => createCheckout2(
1701
+ _id,
1702
+ options,
1703
+ // @ts-ignore
1704
+ { httpClient }
1705
+ );
1706
+ }
1707
+ function removeCoupon3(httpClient) {
1708
+ return (_id) => removeCoupon2(
1709
+ _id,
1710
+ // @ts-ignore
1711
+ { httpClient }
1712
+ );
1713
+ }
1714
+ function updateLineItemsQuantity3(httpClient) {
1715
+ return (_id, lineItems) => updateLineItemsQuantity2(
1716
+ _id,
1717
+ lineItems,
1718
+ // @ts-ignore
1719
+ { httpClient }
1720
+ );
1721
+ }
1722
+ function estimateTotals3(httpClient) {
1723
+ return (_id, options) => estimateTotals2(
1724
+ _id,
1725
+ options,
1726
+ // @ts-ignore
1727
+ { httpClient }
1728
+ );
1729
+ }
1730
+ function deleteCart3(httpClient) {
1731
+ return (_id) => deleteCart2(
1732
+ _id,
1733
+ // @ts-ignore
1734
+ { httpClient }
1735
+ );
1736
+ }
1737
+ function removeBusinessLocation3(httpClient) {
1738
+ return (_id) => removeBusinessLocation2(
1739
+ _id,
1740
+ // @ts-ignore
1741
+ { httpClient }
1742
+ );
1743
+ }
1744
+ var onCartDeleted = (0, import_sdk_types.EventDefinition)(
1745
+ "wix.ecom.v1.cart_deleted",
1746
+ true,
1747
+ (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
1748
+ (0, import_transform_paths3.transformPaths)(event, [
1749
+ {
1750
+ transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
1751
+ paths: [
1752
+ { path: "undefined.createdDate" },
1753
+ { path: "undefined.updatedDate" },
1754
+ {
1755
+ path: "undefined.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
1756
+ },
1757
+ { path: "undefined.lineItems.serviceProperties.scheduledDate" },
1758
+ { path: "metadata.eventTime" }
1759
+ ]
1760
+ },
1761
+ {
1762
+ transformFn: import_page_url_v23.transformRESTPageURLV2ToSDKPageURLV2,
1763
+ paths: [{ path: "undefined.lineItems.url" }]
1764
+ },
1765
+ {
1766
+ transformFn: import_image3.transformRESTImageToSDKImage,
1767
+ paths: [
1768
+ { path: "undefined.lineItems.image" },
1769
+ { path: "undefined.lineItems.catalogOverrideFields.image" }
1770
+ ]
1771
+ },
1772
+ {
1773
+ transformFn: import_float3.transformRESTFloatToSDKFloat,
1774
+ paths: [
1775
+ { path: "undefined.lineItems.physicalProperties.weight" },
1776
+ {
1777
+ path: "undefined.lineItems.catalogOverrideFields.physicalProperties.weight"
1778
+ }
1779
+ ]
1780
+ },
1781
+ {
1782
+ transformFn: import_address3.transformRESTAddressToSDKAddress,
1783
+ paths: [{ path: "undefined.contactInfo.address" }]
1784
+ }
1785
+ ])
1786
+ )
1787
+ )();
1788
+ var onCartUpdated = (0, import_sdk_types.EventDefinition)(
1789
+ "wix.ecom.v1.cart_updated",
1790
+ true,
1791
+ (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
1792
+ (0, import_transform_paths3.transformPaths)(event, [
1793
+ {
1794
+ transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
1795
+ paths: [
1796
+ { path: "entity.createdDate" },
1797
+ { path: "entity.updatedDate" },
1798
+ {
1799
+ path: "entity.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
1800
+ },
1801
+ { path: "entity.lineItems.serviceProperties.scheduledDate" },
1802
+ { path: "metadata.eventTime" }
1803
+ ]
1804
+ },
1805
+ {
1806
+ transformFn: import_page_url_v23.transformRESTPageURLV2ToSDKPageURLV2,
1807
+ paths: [{ path: "entity.lineItems.url" }]
1808
+ },
1809
+ {
1810
+ transformFn: import_image3.transformRESTImageToSDKImage,
1811
+ paths: [
1812
+ { path: "entity.lineItems.image" },
1813
+ { path: "entity.lineItems.catalogOverrideFields.image" }
1814
+ ]
1815
+ },
1816
+ {
1817
+ transformFn: import_float3.transformRESTFloatToSDKFloat,
1818
+ paths: [
1819
+ { path: "entity.lineItems.physicalProperties.weight" },
1820
+ {
1821
+ path: "entity.lineItems.catalogOverrideFields.physicalProperties.weight"
1822
+ }
1823
+ ]
1824
+ },
1825
+ {
1826
+ transformFn: import_address3.transformRESTAddressToSDKAddress,
1827
+ paths: [{ path: "entity.contactInfo.address" }]
1828
+ }
1829
+ ])
1830
+ )
1831
+ )();
1832
+ var onCartCreated = (0, import_sdk_types.EventDefinition)(
1833
+ "wix.ecom.v1.cart_created",
1834
+ true,
1835
+ (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
1836
+ (0, import_transform_paths3.transformPaths)(event, [
1837
+ {
1838
+ transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
1839
+ paths: [
1840
+ { path: "entity.createdDate" },
1841
+ { path: "entity.updatedDate" },
1842
+ {
1843
+ path: "entity.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate"
1844
+ },
1845
+ { path: "entity.lineItems.serviceProperties.scheduledDate" },
1846
+ { path: "metadata.eventTime" }
1847
+ ]
1848
+ },
1849
+ {
1850
+ transformFn: import_page_url_v23.transformRESTPageURLV2ToSDKPageURLV2,
1851
+ paths: [{ path: "entity.lineItems.url" }]
1852
+ },
1853
+ {
1854
+ transformFn: import_image3.transformRESTImageToSDKImage,
1855
+ paths: [
1856
+ { path: "entity.lineItems.image" },
1857
+ { path: "entity.lineItems.catalogOverrideFields.image" }
1858
+ ]
1859
+ },
1860
+ {
1861
+ transformFn: import_float3.transformRESTFloatToSDKFloat,
1862
+ paths: [
1863
+ { path: "entity.lineItems.physicalProperties.weight" },
1864
+ {
1865
+ path: "entity.lineItems.catalogOverrideFields.physicalProperties.weight"
1866
+ }
1867
+ ]
1868
+ },
1869
+ {
1870
+ transformFn: import_address3.transformRESTAddressToSDKAddress,
1871
+ paths: [{ path: "entity.contactInfo.address" }]
1872
+ }
1873
+ ])
1874
+ )
1875
+ )();
1876
+
1877
+ // src/ecom-v1-cart-cart.context.ts
1878
+ var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
1879
+ var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
1880
+ var createCart4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createCart3);
1881
+ var updateCart4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateCart3);
1882
+ var getCart4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getCart3);
1883
+ var getCartByCheckoutId4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getCartByCheckoutId3);
1884
+ var addToCart4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(addToCart3);
1885
+ var removeLineItems4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(removeLineItems3);
1886
+ var createCheckout4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createCheckout3);
1887
+ var removeCoupon4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(removeCoupon3);
1888
+ var updateLineItemsQuantity4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateLineItemsQuantity3);
1889
+ var estimateTotals4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(estimateTotals3);
1890
+ var deleteCart4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteCart3);
1891
+ var removeBusinessLocation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(removeBusinessLocation3);
1892
+ var onCartDeleted2 = (0, import_event_definition_modules.createEventModule)(onCartDeleted);
1893
+ var onCartUpdated2 = (0, import_event_definition_modules.createEventModule)(onCartUpdated);
1894
+ var onCartCreated2 = (0, import_event_definition_modules.createEventModule)(onCartCreated);
1895
+ // Annotate the CommonJS export names for ESM import in node:
1896
+ 0 && (module.exports = {
1897
+ AdditionalFeeSource,
1898
+ AppliedDiscountDiscountType,
1899
+ ChannelType,
1900
+ ChargeType,
1901
+ DescriptionLineType,
1902
+ DiscountType,
1903
+ FallbackReason,
1904
+ FileType,
1905
+ ItemAvailabilityStatus,
1906
+ ItemTypeItemType,
1907
+ JurisdictionType,
1908
+ ManualCalculationReason,
1909
+ NameInLineItem,
1910
+ NameInOther,
1911
+ PaymentOptionType,
1912
+ PickupMethod,
1913
+ RateType,
1914
+ RuleType,
1915
+ Severity,
1916
+ SubscriptionFrequency,
1917
+ SuggestedFix,
1918
+ TaxableAddressType,
1919
+ VatType,
1920
+ WebhookIdentityType,
1921
+ WeightUnit,
1922
+ addToCart,
1923
+ createCart,
1924
+ createCheckout,
1925
+ deleteCart,
1926
+ estimateTotals,
1927
+ getCart,
1928
+ getCartByCheckoutId,
1929
+ onCartCreated,
1930
+ onCartDeleted,
1931
+ onCartUpdated,
1932
+ removeBusinessLocation,
1933
+ removeCoupon,
1934
+ removeLineItems,
1935
+ updateCart,
1936
+ updateLineItemsQuantity
1937
+ });
1938
+ //# sourceMappingURL=index.js.map