@wix/auto_sdk_ecom_subscription-contracts 1.0.124 → 1.0.126

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 (39) hide show
  1. package/build/cjs/index.d.ts +1 -1
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/cjs/index.typings.d.ts +17 -2
  4. package/build/cjs/index.typings.js.map +1 -1
  5. package/build/cjs/meta.d.ts +17 -2
  6. package/build/cjs/meta.js.map +1 -1
  7. package/build/cjs/schemas.js +1446 -1400
  8. package/build/cjs/schemas.js.map +1 -1
  9. package/build/es/index.d.mts +1 -1
  10. package/build/es/index.mjs.map +1 -1
  11. package/build/es/index.typings.d.mts +17 -2
  12. package/build/es/index.typings.mjs.map +1 -1
  13. package/build/es/meta.d.mts +17 -2
  14. package/build/es/meta.mjs.map +1 -1
  15. package/build/es/schemas.mjs +1446 -1400
  16. package/build/es/schemas.mjs.map +1 -1
  17. package/build/internal/cjs/index.d.ts +1 -1
  18. package/build/internal/cjs/index.typings.d.ts +17 -2
  19. package/build/internal/cjs/meta.d.ts +17 -2
  20. package/build/internal/es/index.d.mts +1 -1
  21. package/build/internal/es/index.typings.d.mts +17 -2
  22. package/build/internal/es/meta.d.mts +17 -2
  23. package/package.json +2 -2
  24. package/build/internal/cjs/index.js +0 -950
  25. package/build/internal/cjs/index.js.map +0 -1
  26. package/build/internal/cjs/index.typings.js +0 -717
  27. package/build/internal/cjs/index.typings.js.map +0 -1
  28. package/build/internal/cjs/meta.js +0 -586
  29. package/build/internal/cjs/meta.js.map +0 -1
  30. package/build/internal/cjs/schemas.js +0 -3041
  31. package/build/internal/cjs/schemas.js.map +0 -1
  32. package/build/internal/es/index.mjs +0 -894
  33. package/build/internal/es/index.mjs.map +0 -1
  34. package/build/internal/es/index.typings.mjs +0 -663
  35. package/build/internal/es/index.typings.mjs.map +0 -1
  36. package/build/internal/es/meta.mjs +0 -531
  37. package/build/internal/es/meta.mjs.map +0 -1
  38. package/build/internal/es/schemas.mjs +0 -3001
  39. package/build/internal/es/schemas.mjs.map +0 -1
@@ -1,663 +0,0 @@
1
- // src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.ts
2
- import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
3
- import { queryBuilder } from "@wix/sdk-runtime/query-builder";
4
- import {
5
- renameKeysFromSDKRequestToRESTRequest,
6
- renameKeysFromRESTResponseToSDKResponse
7
- } from "@wix/sdk-runtime/rename-all-nested-keys";
8
-
9
- // src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.http.ts
10
- import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
11
- import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
12
- import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
13
- import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
14
- import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
15
- function resolveWixEcomSubscriptionContractsV1SubscriptionContractsUrl(opts) {
16
- const domainToMappings = {
17
- "www.wixapis.com": [
18
- {
19
- srcPath: "/ecom/subscription-contracts/v1/subscription-contracts",
20
- destPath: "/v1/subscription-contracts"
21
- },
22
- {
23
- srcPath: "/ecom/subscription-contracts/v1/bulk/subscription-contracts",
24
- destPath: "/v1/bulk/subscription-contracts"
25
- }
26
- ],
27
- "*.dev.wix-code.com": [
28
- {
29
- srcPath: "/ecom/subscription-contracts/v1/subscription-contracts",
30
- destPath: "/v1/subscription-contracts"
31
- },
32
- {
33
- srcPath: "/ecom/subscription-contracts/v1/bulk/subscription-contracts",
34
- destPath: "/v1/bulk/subscription-contracts"
35
- }
36
- ],
37
- _: [
38
- {
39
- srcPath: "/ecom/subscription-contracts/v1/subscription-contracts",
40
- destPath: "/v1/subscription-contracts"
41
- },
42
- {
43
- srcPath: "/ecom/subscription-contracts/v1/bulk/subscription-contracts",
44
- destPath: "/v1/bulk/subscription-contracts"
45
- }
46
- ],
47
- "manage._base_domain_": [
48
- {
49
- srcPath: "/ecom/subscription-contracts/v1/subscription-contracts",
50
- destPath: "/v1/subscription-contracts"
51
- },
52
- {
53
- srcPath: "/ecom/subscription-contracts/v1/bulk/subscription-contracts",
54
- destPath: "/v1/bulk/subscription-contracts"
55
- }
56
- ]
57
- };
58
- return resolveUrl(Object.assign(opts, { domainToMappings }));
59
- }
60
- var PACKAGE_NAME = "@wix/auto_sdk_ecom_subscription-contracts";
61
- function getSubscriptionContract(payload) {
62
- function __getSubscriptionContract({ host }) {
63
- const metadata = {
64
- entityFqdn: "wix.ecom.subscription_contracts.v1.subscription_contract",
65
- method: "GET",
66
- methodFqn: "wix.ecom.subscription_contracts.v1.SubscriptionContracts.GetSubscriptionContract",
67
- packageName: PACKAGE_NAME,
68
- migrationOptions: {
69
- optInTransformResponse: true
70
- },
71
- url: resolveWixEcomSubscriptionContractsV1SubscriptionContractsUrl({
72
- protoPath: "/v1/subscription-contracts/{subscriptionContractId}",
73
- data: payload,
74
- host
75
- }),
76
- params: toURLSearchParams(payload),
77
- transformResponse: (payload2) => transformPaths(payload2, [
78
- {
79
- transformFn: transformRESTTimestampToSDKTimestamp,
80
- paths: [
81
- { path: "subscriptionContract.createdDate" },
82
- { path: "subscriptionContract.updatedDate" },
83
- { path: "subscriptionContract.subscriptionSettings.startDate" },
84
- {
85
- path: "subscriptionContract.lineItems.image.urlExpirationDate"
86
- },
87
- {
88
- path: "subscriptionContract.lineItems.digitalFile.expirationDate"
89
- },
90
- {
91
- path: "subscriptionContract.lineItems.subscriptionInfo.subscriptionSettings.startDate"
92
- },
93
- {
94
- path: "subscriptionContract.lineItems.serviceProperties.scheduledDate"
95
- },
96
- {
97
- path: "subscriptionContract.lineItems.serviceProperties.endDate"
98
- },
99
- {
100
- path: "subscriptionContract.shippingInfo.logistics.deliverByDate"
101
- },
102
- {
103
- path: "subscriptionContract.shippingInfo.logistics.deliveryTimeSlot.from"
104
- },
105
- {
106
- path: "subscriptionContract.shippingInfo.logistics.deliveryTimeSlot.to"
107
- },
108
- { path: "subscriptionContract.activities.createdDate" }
109
- ]
110
- },
111
- {
112
- transformFn: transformRESTFloatToSDKFloat,
113
- paths: [
114
- { path: "subscriptionContract.lineItems.image.focalPoint.x" },
115
- { path: "subscriptionContract.lineItems.image.focalPoint.y" },
116
- {
117
- path: "subscriptionContract.lineItems.physicalProperties.weight"
118
- },
119
- {
120
- path: "subscriptionContract.billingInfo.address.geocode.latitude"
121
- },
122
- {
123
- path: "subscriptionContract.billingInfo.address.geocode.longitude"
124
- },
125
- {
126
- path: "subscriptionContract.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
127
- },
128
- {
129
- path: "subscriptionContract.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
130
- },
131
- {
132
- path: "subscriptionContract.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
133
- },
134
- {
135
- path: "subscriptionContract.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
136
- },
137
- {
138
- path: "subscriptionContract.recipientInfo.address.geocode.latitude"
139
- },
140
- {
141
- path: "subscriptionContract.recipientInfo.address.geocode.longitude"
142
- }
143
- ]
144
- }
145
- ])
146
- };
147
- return metadata;
148
- }
149
- return __getSubscriptionContract;
150
- }
151
- function querySubscriptionContracts(payload) {
152
- function __querySubscriptionContracts({ host }) {
153
- const metadata = {
154
- entityFqdn: "wix.ecom.subscription_contracts.v1.subscription_contract",
155
- method: "GET",
156
- methodFqn: "wix.ecom.subscription_contracts.v1.SubscriptionContracts.QuerySubscriptionContracts",
157
- packageName: PACKAGE_NAME,
158
- migrationOptions: {
159
- optInTransformResponse: true
160
- },
161
- url: resolveWixEcomSubscriptionContractsV1SubscriptionContractsUrl({
162
- protoPath: "/v1/subscription-contracts/query",
163
- data: payload,
164
- host
165
- }),
166
- params: toURLSearchParams(payload, true),
167
- transformResponse: (payload2) => transformPaths(payload2, [
168
- {
169
- transformFn: transformRESTTimestampToSDKTimestamp,
170
- paths: [
171
- { path: "subscriptionContracts.createdDate" },
172
- { path: "subscriptionContracts.updatedDate" },
173
- { path: "subscriptionContracts.subscriptionSettings.startDate" },
174
- {
175
- path: "subscriptionContracts.lineItems.image.urlExpirationDate"
176
- },
177
- {
178
- path: "subscriptionContracts.lineItems.digitalFile.expirationDate"
179
- },
180
- {
181
- path: "subscriptionContracts.lineItems.subscriptionInfo.subscriptionSettings.startDate"
182
- },
183
- {
184
- path: "subscriptionContracts.lineItems.serviceProperties.scheduledDate"
185
- },
186
- {
187
- path: "subscriptionContracts.lineItems.serviceProperties.endDate"
188
- },
189
- {
190
- path: "subscriptionContracts.shippingInfo.logistics.deliverByDate"
191
- },
192
- {
193
- path: "subscriptionContracts.shippingInfo.logistics.deliveryTimeSlot.from"
194
- },
195
- {
196
- path: "subscriptionContracts.shippingInfo.logistics.deliveryTimeSlot.to"
197
- },
198
- { path: "subscriptionContracts.activities.createdDate" }
199
- ]
200
- },
201
- {
202
- transformFn: transformRESTFloatToSDKFloat,
203
- paths: [
204
- { path: "subscriptionContracts.lineItems.image.focalPoint.x" },
205
- { path: "subscriptionContracts.lineItems.image.focalPoint.y" },
206
- {
207
- path: "subscriptionContracts.lineItems.physicalProperties.weight"
208
- },
209
- {
210
- path: "subscriptionContracts.billingInfo.address.geocode.latitude"
211
- },
212
- {
213
- path: "subscriptionContracts.billingInfo.address.geocode.longitude"
214
- },
215
- {
216
- path: "subscriptionContracts.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
217
- },
218
- {
219
- path: "subscriptionContracts.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
220
- },
221
- {
222
- path: "subscriptionContracts.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
223
- },
224
- {
225
- path: "subscriptionContracts.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
226
- },
227
- {
228
- path: "subscriptionContracts.recipientInfo.address.geocode.latitude"
229
- },
230
- {
231
- path: "subscriptionContracts.recipientInfo.address.geocode.longitude"
232
- }
233
- ]
234
- }
235
- ]),
236
- fallback: [
237
- {
238
- method: "POST",
239
- url: resolveWixEcomSubscriptionContractsV1SubscriptionContractsUrl({
240
- protoPath: "/v1/subscription-contracts/query",
241
- data: payload,
242
- host
243
- }),
244
- data: payload
245
- }
246
- ]
247
- };
248
- return metadata;
249
- }
250
- return __querySubscriptionContracts;
251
- }
252
-
253
- // src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.ts
254
- import { transformRESTAddressToSDKAddress } from "@wix/sdk-runtime/transformations/address";
255
- import { transformRESTImageToSDKImage } from "@wix/sdk-runtime/transformations/image";
256
- import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
257
- import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
258
- var SubscriptionFrequency = /* @__PURE__ */ ((SubscriptionFrequency2) => {
259
- SubscriptionFrequency2["UNDEFINED"] = "UNDEFINED";
260
- SubscriptionFrequency2["DAY"] = "DAY";
261
- SubscriptionFrequency2["WEEK"] = "WEEK";
262
- SubscriptionFrequency2["MONTH"] = "MONTH";
263
- SubscriptionFrequency2["YEAR"] = "YEAR";
264
- return SubscriptionFrequency2;
265
- })(SubscriptionFrequency || {});
266
- var SubscriptionSettingsProductPeriodAlignment = /* @__PURE__ */ ((SubscriptionSettingsProductPeriodAlignment2) => {
267
- SubscriptionSettingsProductPeriodAlignment2["ALIGNED_WITH_BILLING_PERIOD"] = "ALIGNED_WITH_BILLING_PERIOD";
268
- SubscriptionSettingsProductPeriodAlignment2["NOT_ALIGNED_WITH_BILLING_PERIOD"] = "NOT_ALIGNED_WITH_BILLING_PERIOD";
269
- return SubscriptionSettingsProductPeriodAlignment2;
270
- })(SubscriptionSettingsProductPeriodAlignment || {});
271
- var DescriptionLineType = /* @__PURE__ */ ((DescriptionLineType2) => {
272
- DescriptionLineType2["UNRECOGNISED"] = "UNRECOGNISED";
273
- DescriptionLineType2["PLAIN_TEXT"] = "PLAIN_TEXT";
274
- DescriptionLineType2["COLOR"] = "COLOR";
275
- return DescriptionLineType2;
276
- })(DescriptionLineType || {});
277
- var DimensionsUnit = /* @__PURE__ */ ((DimensionsUnit2) => {
278
- DimensionsUnit2["UNKNOWN_DIMENSIONS_UNIT"] = "UNKNOWN_DIMENSIONS_UNIT";
279
- DimensionsUnit2["MM"] = "MM";
280
- DimensionsUnit2["CM"] = "CM";
281
- DimensionsUnit2["M"] = "M";
282
- DimensionsUnit2["IN"] = "IN";
283
- DimensionsUnit2["FT"] = "FT";
284
- DimensionsUnit2["YD"] = "YD";
285
- return DimensionsUnit2;
286
- })(DimensionsUnit || {});
287
- var ItemTypePreset = /* @__PURE__ */ ((ItemTypePreset2) => {
288
- ItemTypePreset2["UNRECOGNISED"] = "UNRECOGNISED";
289
- ItemTypePreset2["PHYSICAL"] = "PHYSICAL";
290
- ItemTypePreset2["DIGITAL"] = "DIGITAL";
291
- ItemTypePreset2["GIFT_CARD"] = "GIFT_CARD";
292
- ItemTypePreset2["SERVICE"] = "SERVICE";
293
- return ItemTypePreset2;
294
- })(ItemTypePreset || {});
295
- var PaymentOptionType = /* @__PURE__ */ ((PaymentOptionType2) => {
296
- PaymentOptionType2["FULL_PAYMENT_ONLINE"] = "FULL_PAYMENT_ONLINE";
297
- PaymentOptionType2["FULL_PAYMENT_OFFLINE"] = "FULL_PAYMENT_OFFLINE";
298
- PaymentOptionType2["MEMBERSHIP"] = "MEMBERSHIP";
299
- PaymentOptionType2["DEPOSIT_ONLINE"] = "DEPOSIT_ONLINE";
300
- PaymentOptionType2["MEMBERSHIP_OFFLINE"] = "MEMBERSHIP_OFFLINE";
301
- PaymentOptionType2["MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER"] = "MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER";
302
- return PaymentOptionType2;
303
- })(PaymentOptionType || {});
304
- var JurisdictionType = /* @__PURE__ */ ((JurisdictionType2) => {
305
- JurisdictionType2["UNDEFINED"] = "UNDEFINED";
306
- JurisdictionType2["COUNTRY"] = "COUNTRY";
307
- JurisdictionType2["STATE"] = "STATE";
308
- JurisdictionType2["COUNTY"] = "COUNTY";
309
- JurisdictionType2["CITY"] = "CITY";
310
- JurisdictionType2["SPECIAL"] = "SPECIAL";
311
- return JurisdictionType2;
312
- })(JurisdictionType || {});
313
- var V2SubscriptionFrequency = /* @__PURE__ */ ((V2SubscriptionFrequency2) => {
314
- V2SubscriptionFrequency2["UNDEFINED"] = "UNDEFINED";
315
- V2SubscriptionFrequency2["DAY"] = "DAY";
316
- V2SubscriptionFrequency2["WEEK"] = "WEEK";
317
- V2SubscriptionFrequency2["MONTH"] = "MONTH";
318
- V2SubscriptionFrequency2["YEAR"] = "YEAR";
319
- return V2SubscriptionFrequency2;
320
- })(V2SubscriptionFrequency || {});
321
- var ProductPeriodAlignment = /* @__PURE__ */ ((ProductPeriodAlignment2) => {
322
- ProductPeriodAlignment2["ALIGNED_WITH_BILLING_PERIOD"] = "ALIGNED_WITH_BILLING_PERIOD";
323
- ProductPeriodAlignment2["NOT_ALIGNED_WITH_BILLING_PERIOD"] = "NOT_ALIGNED_WITH_BILLING_PERIOD";
324
- return ProductPeriodAlignment2;
325
- })(ProductPeriodAlignment || {});
326
- var AdjustmentType = /* @__PURE__ */ ((AdjustmentType2) => {
327
- AdjustmentType2["EXTRA_CHARGE"] = "EXTRA_CHARGE";
328
- AdjustmentType2["CREDIT"] = "CREDIT";
329
- return AdjustmentType2;
330
- })(AdjustmentType || {});
331
- var TaxableAddressType = /* @__PURE__ */ ((TaxableAddressType2) => {
332
- TaxableAddressType2["BUSINESS"] = "BUSINESS";
333
- TaxableAddressType2["BILLING"] = "BILLING";
334
- TaxableAddressType2["SHIPPING"] = "SHIPPING";
335
- return TaxableAddressType2;
336
- })(TaxableAddressType || {});
337
- var MeasurementUnit = /* @__PURE__ */ ((MeasurementUnit2) => {
338
- MeasurementUnit2["UNSPECIFIED"] = "UNSPECIFIED";
339
- MeasurementUnit2["ML"] = "ML";
340
- MeasurementUnit2["CL"] = "CL";
341
- MeasurementUnit2["L"] = "L";
342
- MeasurementUnit2["CBM"] = "CBM";
343
- MeasurementUnit2["MG"] = "MG";
344
- MeasurementUnit2["G"] = "G";
345
- MeasurementUnit2["KG"] = "KG";
346
- MeasurementUnit2["MM"] = "MM";
347
- MeasurementUnit2["CM"] = "CM";
348
- MeasurementUnit2["M"] = "M";
349
- MeasurementUnit2["SQM"] = "SQM";
350
- MeasurementUnit2["OZ"] = "OZ";
351
- MeasurementUnit2["LB"] = "LB";
352
- MeasurementUnit2["FLOZ"] = "FLOZ";
353
- MeasurementUnit2["PT"] = "PT";
354
- MeasurementUnit2["QT"] = "QT";
355
- MeasurementUnit2["GAL"] = "GAL";
356
- MeasurementUnit2["IN"] = "IN";
357
- MeasurementUnit2["FT"] = "FT";
358
- MeasurementUnit2["YD"] = "YD";
359
- MeasurementUnit2["SQFT"] = "SQFT";
360
- return MeasurementUnit2;
361
- })(MeasurementUnit || {});
362
- var WeightUnit = /* @__PURE__ */ ((WeightUnit2) => {
363
- WeightUnit2["UNSPECIFIED_WEIGHT_UNIT"] = "UNSPECIFIED_WEIGHT_UNIT";
364
- WeightUnit2["KG"] = "KG";
365
- WeightUnit2["LB"] = "LB";
366
- return WeightUnit2;
367
- })(WeightUnit || {});
368
- var ChargeType = /* @__PURE__ */ ((ChargeType2) => {
369
- ChargeType2["PASS_ON"] = "PASS_ON";
370
- ChargeType2["ABSORBED"] = "ABSORBED";
371
- return ChargeType2;
372
- })(ChargeType || {});
373
- var VatType = /* @__PURE__ */ ((VatType2) => {
374
- VatType2["UNSPECIFIED"] = "UNSPECIFIED";
375
- VatType2["CPF"] = "CPF";
376
- VatType2["CNPJ"] = "CNPJ";
377
- return VatType2;
378
- })(VatType || {});
379
- var PickupMethod = /* @__PURE__ */ ((PickupMethod2) => {
380
- PickupMethod2["STORE_PICKUP"] = "STORE_PICKUP";
381
- PickupMethod2["PICKUP_POINT"] = "PICKUP_POINT";
382
- return PickupMethod2;
383
- })(PickupMethod || {});
384
- var DiscountType = /* @__PURE__ */ ((DiscountType2) => {
385
- DiscountType2["GLOBAL"] = "GLOBAL";
386
- DiscountType2["SPECIFIC_ITEMS"] = "SPECIFIC_ITEMS";
387
- DiscountType2["SHIPPING"] = "SHIPPING";
388
- return DiscountType2;
389
- })(DiscountType || {});
390
- var DiscountReason = /* @__PURE__ */ ((DiscountReason2) => {
391
- DiscountReason2["UNSPECIFIED"] = "UNSPECIFIED";
392
- DiscountReason2["EXCHANGED_ITEMS"] = "EXCHANGED_ITEMS";
393
- DiscountReason2["BILLING_ADJUSTMENT"] = "BILLING_ADJUSTMENT";
394
- return DiscountReason2;
395
- })(DiscountReason || {});
396
- var ChannelType = /* @__PURE__ */ ((ChannelType2) => {
397
- ChannelType2["UNSPECIFIED"] = "UNSPECIFIED";
398
- ChannelType2["WEB"] = "WEB";
399
- ChannelType2["POS"] = "POS";
400
- ChannelType2["EBAY"] = "EBAY";
401
- ChannelType2["AMAZON"] = "AMAZON";
402
- ChannelType2["OTHER_PLATFORM"] = "OTHER_PLATFORM";
403
- ChannelType2["WIX_APP_STORE"] = "WIX_APP_STORE";
404
- ChannelType2["WIX_INVOICES"] = "WIX_INVOICES";
405
- ChannelType2["BACKOFFICE_MERCHANT"] = "BACKOFFICE_MERCHANT";
406
- ChannelType2["WISH"] = "WISH";
407
- ChannelType2["CLASS_PASS"] = "CLASS_PASS";
408
- ChannelType2["GLOBAL_E"] = "GLOBAL_E";
409
- ChannelType2["FACEBOOK"] = "FACEBOOK";
410
- ChannelType2["ETSY"] = "ETSY";
411
- ChannelType2["TIKTOK"] = "TIKTOK";
412
- ChannelType2["FAIRE_COM"] = "FAIRE_COM";
413
- ChannelType2["PAYPAL_AGENTIC_CHECKOUT"] = "PAYPAL_AGENTIC_CHECKOUT";
414
- ChannelType2["STRIPE_AGENTIC_CHECKOUT"] = "STRIPE_AGENTIC_CHECKOUT";
415
- ChannelType2["WIX_INVOICES_PLATFORM"] = "WIX_INVOICES_PLATFORM";
416
- ChannelType2["UCP_AGENTIC_CHECKOUT"] = "UCP_AGENTIC_CHECKOUT";
417
- return ChannelType2;
418
- })(ChannelType || {});
419
- var AdditionalFeeSource = /* @__PURE__ */ ((AdditionalFeeSource2) => {
420
- AdditionalFeeSource2["SERVICE_PLUGIN"] = "SERVICE_PLUGIN";
421
- AdditionalFeeSource2["ITEM"] = "ITEM";
422
- AdditionalFeeSource2["MANUAL"] = "MANUAL";
423
- AdditionalFeeSource2["SHIPPING"] = "SHIPPING";
424
- AdditionalFeeSource2["PLATFORM"] = "PLATFORM";
425
- return AdditionalFeeSource2;
426
- })(AdditionalFeeSource || {});
427
- var SpecificItemsCouponBehavior = /* @__PURE__ */ ((SpecificItemsCouponBehavior2) => {
428
- SpecificItemsCouponBehavior2["UNDEFINED_COUPON_BEHAVIOR"] = "UNDEFINED_COUPON_BEHAVIOR";
429
- SpecificItemsCouponBehavior2["ITEM_SUBTOTAL_INCLUDES_DISCOUNT"] = "ITEM_SUBTOTAL_INCLUDES_DISCOUNT";
430
- SpecificItemsCouponBehavior2["LEGACY_ITEM_SUBTOTAL_DOES_NOT_INCLUDE_DISCOUNT"] = "LEGACY_ITEM_SUBTOTAL_DOES_NOT_INCLUDE_DISCOUNT";
431
- return SpecificItemsCouponBehavior2;
432
- })(SpecificItemsCouponBehavior || {});
433
- var LineItemQuantityChangeType = /* @__PURE__ */ ((LineItemQuantityChangeType2) => {
434
- LineItemQuantityChangeType2["QUANTITY_INCREASED"] = "QUANTITY_INCREASED";
435
- LineItemQuantityChangeType2["QUANTITY_DECREASED"] = "QUANTITY_DECREASED";
436
- return LineItemQuantityChangeType2;
437
- })(LineItemQuantityChangeType || {});
438
- var ActivityType = /* @__PURE__ */ ((ActivityType2) => {
439
- ActivityType2["UNKNOWN_ACTIVITY_TYPE"] = "UNKNOWN_ACTIVITY_TYPE";
440
- ActivityType2["CHANGES_APPLIED"] = "CHANGES_APPLIED";
441
- return ActivityType2;
442
- })(ActivityType || {});
443
- var ActionInitiator = /* @__PURE__ */ ((ActionInitiator2) => {
444
- ActionInitiator2["UNKNOWN_ACTION_INITIATOR"] = "UNKNOWN_ACTION_INITIATOR";
445
- ActionInitiator2["BUSINESS"] = "BUSINESS";
446
- ActionInitiator2["CUSTOMER"] = "CUSTOMER";
447
- ActionInitiator2["SYSTEM"] = "SYSTEM";
448
- ActionInitiator2["PAYMENT_FAILURE"] = "PAYMENT_FAILURE";
449
- return ActionInitiator2;
450
- })(ActionInitiator || {});
451
- var ChangeType = /* @__PURE__ */ ((ChangeType2) => {
452
- ChangeType2["ADDED"] = "ADDED";
453
- ChangeType2["CHANGED"] = "CHANGED";
454
- ChangeType2["REMOVED"] = "REMOVED";
455
- return ChangeType2;
456
- })(ChangeType || {});
457
- var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
458
- SortOrder2["ASC"] = "ASC";
459
- SortOrder2["DESC"] = "DESC";
460
- return SortOrder2;
461
- })(SortOrder || {});
462
- var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
463
- WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
464
- WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
465
- WebhookIdentityType2["MEMBER"] = "MEMBER";
466
- WebhookIdentityType2["WIX_USER"] = "WIX_USER";
467
- WebhookIdentityType2["APP"] = "APP";
468
- return WebhookIdentityType2;
469
- })(WebhookIdentityType || {});
470
- async function getSubscriptionContract2(subscriptionContractId) {
471
- const { httpClient, sideEffects } = arguments[1];
472
- const payload = renameKeysFromSDKRequestToRESTRequest({
473
- subscriptionContractId
474
- });
475
- const reqOpts = getSubscriptionContract(
476
- payload
477
- );
478
- sideEffects?.onSiteCall?.();
479
- try {
480
- const result = await httpClient.request(reqOpts);
481
- sideEffects?.onSuccess?.(result);
482
- return renameKeysFromRESTResponseToSDKResponse(
483
- transformPaths2(result.data, [
484
- {
485
- transformFn: transformRESTImageToSDKImage,
486
- paths: [{ path: "subscriptionContract.lineItems.image" }]
487
- },
488
- {
489
- transformFn: transformRESTAddressToSDKAddress,
490
- paths: [
491
- { path: "subscriptionContract.billingInfo.address" },
492
- {
493
- path: "subscriptionContract.shippingInfo.logistics.shippingDestination.address"
494
- },
495
- {
496
- path: "subscriptionContract.shippingInfo.logistics.pickupDetails.address"
497
- },
498
- { path: "subscriptionContract.recipientInfo.address" }
499
- ]
500
- }
501
- ])
502
- )?.subscriptionContract;
503
- } catch (err) {
504
- const transformedError = sdkTransformError(
505
- err,
506
- {
507
- spreadPathsToArguments: {},
508
- explicitPathsToArguments: { subscriptionContractId: "$[0]" },
509
- singleArgumentUnchanged: false
510
- },
511
- ["subscriptionContractId"]
512
- );
513
- sideEffects?.onError?.(err);
514
- throw transformedError;
515
- }
516
- }
517
- function querySubscriptionContracts2() {
518
- const { httpClient, sideEffects } = arguments[0];
519
- return queryBuilder({
520
- func: async (payload) => {
521
- const reqOpts = querySubscriptionContracts(
522
- payload
523
- );
524
- sideEffects?.onSiteCall?.();
525
- try {
526
- const result = await httpClient.request(reqOpts);
527
- sideEffects?.onSuccess?.(result);
528
- return result;
529
- } catch (err) {
530
- sideEffects?.onError?.(err);
531
- throw err;
532
- }
533
- },
534
- requestTransformer: (query) => {
535
- const args = [query, {}];
536
- return renameKeysFromSDKRequestToRESTRequest({
537
- ...args?.[1],
538
- query: args?.[0]
539
- });
540
- },
541
- responseTransformer: ({
542
- data
543
- }) => {
544
- const transformedData = renameKeysFromRESTResponseToSDKResponse(
545
- transformPaths2(data, [
546
- {
547
- transformFn: transformRESTImageToSDKImage,
548
- paths: [{ path: "subscriptionContracts.lineItems.image" }]
549
- },
550
- {
551
- transformFn: transformRESTAddressToSDKAddress,
552
- paths: [
553
- { path: "subscriptionContracts.billingInfo.address" },
554
- {
555
- path: "subscriptionContracts.shippingInfo.logistics.shippingDestination.address"
556
- },
557
- {
558
- path: "subscriptionContracts.shippingInfo.logistics.pickupDetails.address"
559
- },
560
- { path: "subscriptionContracts.recipientInfo.address" }
561
- ]
562
- }
563
- ])
564
- );
565
- return {
566
- items: transformedData?.subscriptionContracts,
567
- pagingMetadata: transformedData?.pagingMetadata
568
- };
569
- },
570
- errorTransformer: (err) => {
571
- const transformedError = sdkTransformError(err, {
572
- spreadPathsToArguments: {},
573
- explicitPathsToArguments: { query: "$[0]" },
574
- singleArgumentUnchanged: false
575
- });
576
- throw transformedError;
577
- },
578
- pagingMethod: "CURSOR",
579
- transformationPaths: {}
580
- });
581
- }
582
- async function typedQuerySubscriptionContracts(query) {
583
- const { httpClient, sideEffects } = arguments[1];
584
- const payload = renameKeysFromSDKRequestToRESTRequest({ query });
585
- const reqOpts = querySubscriptionContracts(
586
- payload
587
- );
588
- sideEffects?.onSiteCall?.();
589
- try {
590
- const result = await httpClient.request(reqOpts);
591
- sideEffects?.onSuccess?.(result);
592
- return renameKeysFromRESTResponseToSDKResponse(
593
- transformPaths2(result.data, [
594
- {
595
- transformFn: transformRESTImageToSDKImage,
596
- paths: [{ path: "subscriptionContracts.lineItems.image" }]
597
- },
598
- {
599
- transformFn: transformRESTAddressToSDKAddress,
600
- paths: [
601
- { path: "subscriptionContracts.billingInfo.address" },
602
- {
603
- path: "subscriptionContracts.shippingInfo.logistics.shippingDestination.address"
604
- },
605
- {
606
- path: "subscriptionContracts.shippingInfo.logistics.pickupDetails.address"
607
- },
608
- { path: "subscriptionContracts.recipientInfo.address" }
609
- ]
610
- }
611
- ])
612
- );
613
- } catch (err) {
614
- const transformedError = sdkTransformError(
615
- err,
616
- {
617
- spreadPathsToArguments: {},
618
- explicitPathsToArguments: { query: "$[0]" },
619
- singleArgumentUnchanged: false
620
- },
621
- ["query"]
622
- );
623
- sideEffects?.onError?.(err);
624
- throw transformedError;
625
- }
626
- }
627
- var utils = {
628
- query: /* @__PURE__ */ createQueryUtils()
629
- };
630
- export {
631
- ActionInitiator,
632
- ActivityType,
633
- AdditionalFeeSource,
634
- AdjustmentType,
635
- ChangeType,
636
- ChannelType,
637
- ChargeType,
638
- DescriptionLineType,
639
- DimensionsUnit,
640
- DiscountReason,
641
- DiscountType,
642
- ItemTypePreset,
643
- JurisdictionType,
644
- LineItemQuantityChangeType,
645
- MeasurementUnit,
646
- PaymentOptionType,
647
- PickupMethod,
648
- ProductPeriodAlignment,
649
- SortOrder,
650
- SpecificItemsCouponBehavior,
651
- SubscriptionFrequency,
652
- SubscriptionSettingsProductPeriodAlignment,
653
- TaxableAddressType,
654
- V2SubscriptionFrequency,
655
- VatType,
656
- WebhookIdentityType,
657
- WeightUnit,
658
- getSubscriptionContract2 as getSubscriptionContract,
659
- querySubscriptionContracts2 as querySubscriptionContracts,
660
- typedQuerySubscriptionContracts,
661
- utils
662
- };
663
- //# sourceMappingURL=index.typings.mjs.map