@wix/auto_sdk_ecom_delivery-solutions 1.0.46 → 1.0.48

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 (37) hide show
  1. package/build/cjs/index.d.ts +1 -1
  2. package/build/cjs/index.js +0 -6
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +5 -32
  5. package/build/cjs/index.typings.js +0 -6
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +5 -32
  8. package/build/cjs/meta.js +0 -6
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +1 -1
  11. package/build/es/index.mjs +0 -5
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +5 -32
  14. package/build/es/index.typings.mjs +0 -5
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +5 -32
  17. package/build/es/meta.mjs +0 -5
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +1 -1
  20. package/build/internal/cjs/index.js +0 -6
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +5 -32
  23. package/build/internal/cjs/index.typings.js +0 -6
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +5 -32
  26. package/build/internal/cjs/meta.js +0 -6
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +1 -1
  29. package/build/internal/es/index.mjs +0 -5
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +5 -32
  32. package/build/internal/es/index.typings.mjs +0 -5
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +5 -32
  35. package/build/internal/es/meta.mjs +0 -5
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -447,13 +447,6 @@ interface DeliveryCost {
447
447
  * @targetRemovalDate 2025-12-01
448
448
  */
449
449
  currency?: string;
450
- /**
451
- * Additional costs. For example, a handling fee for packaging fragile items.
452
- * @maxSize 100
453
- * @deprecated Additional costs. For example, a handling fee for packaging fragile items.
454
- * @targetRemovalDate 2025-12-01
455
- */
456
- additionalCharges?: AdditionalCharge[];
457
450
  /** The shipping rate's price. Must align with the [currency's decimal separator] */
458
451
  deliveryPrice?: MultiCurrencyPrice;
459
452
  /**
@@ -462,26 +455,6 @@ interface DeliveryCost {
462
455
  */
463
456
  additionalCosts?: AdditionalCost[];
464
457
  }
465
- interface AdditionalCharge {
466
- /** Additional charge type. */
467
- type?: ChargeTypeWithLiterals;
468
- /**
469
- * Description of the additional charge. For example, `"Handling fee of $5 applied for gift wrapping"`.
470
- * @maxLength 250
471
- */
472
- description?: string | null;
473
- /**
474
- * Cost of additional charge. For example, `12.5`.
475
- * @format DECIMAL_VALUE
476
- * @decimalValue options { gte:0, lte:1000000000000000 }
477
- */
478
- price?: string;
479
- }
480
- declare enum ChargeType {
481
- HANDLING_FEE = "HANDLING_FEE"
482
- }
483
- /** @enumType */
484
- type ChargeTypeWithLiterals = ChargeType | 'HANDLING_FEE';
485
458
  interface MultiCurrencyPrice {
486
459
  /**
487
460
  * Amount.
@@ -732,19 +705,19 @@ declare enum WebhookIdentityType {
732
705
  }
733
706
  /** @enumType */
734
707
  type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
735
- interface AccountDetails {
708
+ interface AccountInfo {
736
709
  /**
737
- * ID of the account.
710
+ * ID of the Wix account associated with the event.
738
711
  * @format GUID
739
712
  */
740
713
  accountId?: string | null;
741
714
  /**
742
- * ID of the parent account.
715
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
743
716
  * @format GUID
744
717
  */
745
718
  parentAccountId?: string | null;
746
719
  /**
747
- * ID of the site, if applicable.
720
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
748
721
  * @format GUID
749
722
  */
750
723
  siteId?: string | null;
@@ -776,4 +749,4 @@ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q
776
749
  };
777
750
  declare function getDeliverySolutions(): __PublicMethodMetaInfo<'POST', {}, GetDeliverySolutionsRequest$1, GetDeliverySolutionsRequest, GetDeliverySolutionsResponse$1, GetDeliverySolutionsResponse>;
778
751
 
779
- export { type AccountDetails as AccountDetailsOriginal, type AdditionalCharge as AdditionalChargeOriginal, type AdditionalCost as AdditionalCostOriginal, type AddressLocation as AddressLocationOriginal, type Address as AddressOriginal, type AddressStreetOneOf as AddressStreetOneOfOriginal, type ApplicableLineItems as ApplicableLineItemsOriginal, type ApplicationError as ApplicationErrorOriginal, type Carrier as CarrierOriginal, type CatalogReference as CatalogReferenceOriginal, ChargeType as ChargeTypeOriginal, type ChargeTypeWithLiterals as ChargeTypeWithLiteralsOriginal, type DeliverableItem as DeliverableItemOriginal, type DeliveryAllocation as DeliveryAllocationOriginal, type DeliveryCarrierError as DeliveryCarrierErrorOriginal, type DeliveryCost as DeliveryCostOriginal, type DeliveryLogistics as DeliveryLogisticsOriginal, type DeliveryRatesGateway as DeliveryRatesGatewayOriginal, type DeliveryReference as DeliveryReferenceOriginal, type DeliverySolution as DeliverySolutionOriginal, type DeliveryTimeSlot as DeliveryTimeSlotOriginal, type DetailsKindOneOf as DetailsKindOneOfOriginal, type Details as DetailsOriginal, type ExtendedFields as ExtendedFieldsOriginal, type ExternalReference as ExternalReferenceOriginal, type FieldViolation as FieldViolationOriginal, type FullAddressContactDetails as FullAddressContactDetailsOriginal, type GetDeliverySolutionsApplicationErrors as GetDeliverySolutionsApplicationErrorsOriginal, type GetDeliverySolutionsRequest as GetDeliverySolutionsRequestOriginal, type GetDeliverySolutionsResponse as GetDeliverySolutionsResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type MissingDefaultDeliveryProfileEvent as MissingDefaultDeliveryProfileEventOriginal, type MultiCurrencyPrice as MultiCurrencyPriceOriginal, type PhysicalProperties as PhysicalPropertiesOriginal, type PickupDetails as PickupDetailsOriginal, PickupMethod as PickupMethodOriginal, type PickupMethodWithLiterals as PickupMethodWithLiteralsOriginal, type Region as RegionOriginal, RuleType as RuleTypeOriginal, type RuleTypeWithLiterals as RuleTypeWithLiteralsOriginal, type StreetAddress as StreetAddressOriginal, type Subdivision as SubdivisionOriginal, SubdivisionType as SubdivisionTypeOriginal, type SubdivisionTypeWithLiterals as SubdivisionTypeWithLiteralsOriginal, SubscriptionFrequency as SubscriptionFrequencyOriginal, type SubscriptionFrequencyWithLiterals as SubscriptionFrequencyWithLiteralsOriginal, type SubscriptionSettings as SubscriptionSettingsOriginal, type SystemError as SystemErrorOriginal, type UserPreference as UserPreferenceOriginal, type ValidationError as ValidationErrorOriginal, type VatId as VatIdOriginal, VatType as VatTypeOriginal, type VatTypeWithLiterals as VatTypeWithLiteralsOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, WeightUnit as WeightUnitOriginal, type WeightUnitWithLiterals as WeightUnitWithLiteralsOriginal, type __PublicMethodMetaInfo, getDeliverySolutions };
752
+ export { type AccountInfo as AccountInfoOriginal, type AdditionalCost as AdditionalCostOriginal, type AddressLocation as AddressLocationOriginal, type Address as AddressOriginal, type AddressStreetOneOf as AddressStreetOneOfOriginal, type ApplicableLineItems as ApplicableLineItemsOriginal, type ApplicationError as ApplicationErrorOriginal, type Carrier as CarrierOriginal, type CatalogReference as CatalogReferenceOriginal, type DeliverableItem as DeliverableItemOriginal, type DeliveryAllocation as DeliveryAllocationOriginal, type DeliveryCarrierError as DeliveryCarrierErrorOriginal, type DeliveryCost as DeliveryCostOriginal, type DeliveryLogistics as DeliveryLogisticsOriginal, type DeliveryRatesGateway as DeliveryRatesGatewayOriginal, type DeliveryReference as DeliveryReferenceOriginal, type DeliverySolution as DeliverySolutionOriginal, type DeliveryTimeSlot as DeliveryTimeSlotOriginal, type DetailsKindOneOf as DetailsKindOneOfOriginal, type Details as DetailsOriginal, type ExtendedFields as ExtendedFieldsOriginal, type ExternalReference as ExternalReferenceOriginal, type FieldViolation as FieldViolationOriginal, type FullAddressContactDetails as FullAddressContactDetailsOriginal, type GetDeliverySolutionsApplicationErrors as GetDeliverySolutionsApplicationErrorsOriginal, type GetDeliverySolutionsRequest as GetDeliverySolutionsRequestOriginal, type GetDeliverySolutionsResponse as GetDeliverySolutionsResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type MissingDefaultDeliveryProfileEvent as MissingDefaultDeliveryProfileEventOriginal, type MultiCurrencyPrice as MultiCurrencyPriceOriginal, type PhysicalProperties as PhysicalPropertiesOriginal, type PickupDetails as PickupDetailsOriginal, PickupMethod as PickupMethodOriginal, type PickupMethodWithLiterals as PickupMethodWithLiteralsOriginal, type Region as RegionOriginal, RuleType as RuleTypeOriginal, type RuleTypeWithLiterals as RuleTypeWithLiteralsOriginal, type StreetAddress as StreetAddressOriginal, type Subdivision as SubdivisionOriginal, SubdivisionType as SubdivisionTypeOriginal, type SubdivisionTypeWithLiterals as SubdivisionTypeWithLiteralsOriginal, SubscriptionFrequency as SubscriptionFrequencyOriginal, type SubscriptionFrequencyWithLiterals as SubscriptionFrequencyWithLiteralsOriginal, type SubscriptionSettings as SubscriptionSettingsOriginal, type SystemError as SystemErrorOriginal, type UserPreference as UserPreferenceOriginal, type ValidationError as ValidationErrorOriginal, type VatId as VatIdOriginal, VatType as VatTypeOriginal, type VatTypeWithLiterals as VatTypeWithLiteralsOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, WeightUnit as WeightUnitOriginal, type WeightUnitWithLiterals as WeightUnitWithLiteralsOriginal, type __PublicMethodMetaInfo, getDeliverySolutions };
@@ -20,7 +20,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // meta.ts
21
21
  var meta_exports = {};
22
22
  __export(meta_exports, {
23
- ChargeTypeOriginal: () => ChargeType,
24
23
  PickupMethodOriginal: () => PickupMethod,
25
24
  RuleTypeOriginal: () => RuleType,
26
25
  SubdivisionTypeOriginal: () => SubdivisionType,
@@ -189,10 +188,6 @@ var PickupMethod = /* @__PURE__ */ ((PickupMethod2) => {
189
188
  PickupMethod2["PICKUP_POINT"] = "PICKUP_POINT";
190
189
  return PickupMethod2;
191
190
  })(PickupMethod || {});
192
- var ChargeType = /* @__PURE__ */ ((ChargeType2) => {
193
- ChargeType2["HANDLING_FEE"] = "HANDLING_FEE";
194
- return ChargeType2;
195
- })(ChargeType || {});
196
191
  var RuleType = /* @__PURE__ */ ((RuleType2) => {
197
192
  RuleType2["VALIDATION"] = "VALIDATION";
198
193
  RuleType2["OTHER"] = "OTHER";
@@ -249,7 +244,6 @@ function getDeliverySolutions2() {
249
244
  }
250
245
  // Annotate the CommonJS export names for ESM import in node:
251
246
  0 && (module.exports = {
252
- ChargeTypeOriginal,
253
247
  PickupMethodOriginal,
254
248
  RuleTypeOriginal,
255
249
  SubdivisionTypeOriginal,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../meta.ts","../../../src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.ts","../../../src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.ts","../../../src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.ts"],"sourcesContent":["export * from './src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js';\n","import { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixEcomDeliveryprofileV1DeliveryRatesUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/delivery-rates',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_delivery-solutions';\n\n/** Get Delivery Solutions for the given line items from all relevant delivery carriers */\nexport function getDeliverySolutions(\n payload: object\n): RequestOptionsFactory<any> {\n function __getDeliverySolutions({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'lineItems.physicalProperties.weight' },\n { path: 'destination.geocode.latitude' },\n { path: 'destination.geocode.longitude' },\n { path: 'origin.geocode.latitude' },\n { path: 'origin.geocode.longitude' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.gateways.ecom.v1.delivery_rates_gateway',\n method: 'POST' as any,\n methodFqn:\n 'wix.ecom.deliveryprofile.v1.DeliveryRates.GetDeliverySolutions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomDeliveryprofileV1DeliveryRatesUrl({\n protoPath: '/v1/get-delivery-solutions',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'deliverySolutions.logistics.pickupDetails.address.geocode.latitude',\n },\n {\n path: 'deliverySolutions.logistics.pickupDetails.address.geocode.longitude',\n },\n ],\n },\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'deliverySolutions.logistics.deliveryTimeSlot.from' },\n { path: 'deliverySolutions.logistics.deliveryTimeSlot.to' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getDeliverySolutions;\n}\n","export interface DeliveryRatesGateway {\n /**\n * @format GUID\n * @readonly\n */\n id?: string | null;\n}\n\nexport interface MissingDefaultDeliveryProfileEvent {\n /**\n * The meta site ID where the missing default delivery profile error occurred\n * @format GUID\n */\n metaSiteId?: string;\n /** Timestamp when the error occurred */\n occurredAt?: Date | null;\n}\n\nexport interface GetDeliverySolutionsRequest {\n /**\n * list of items to delivery that each of them points to delivery profile and delivery rule.\n * @minSize 1\n * @maxSize 300\n */\n lineItems: DeliverableItem[];\n /** Destination the items should deliver to */\n destination: Address;\n /**\n * Origin the items should deliver from\n * @deprecated Origin the items should deliver from\n * @targetRemovalDate 2025-04-01\n */\n origin?: Address;\n /**\n * Currency - Defaults to site's currency\n * @format CURRENCY\n */\n currency: string | null;\n /** Contact details */\n contactDetails?: FullAddressContactDetails;\n /** Measure unit - defaults to site's weight unit */\n weightUnit?: WeightUnitWithLiterals;\n /**\n * list of user preferences which are delivery options codes combined with delivery carrier app id\n * @maxSize 5\n */\n userPreferences?: UserPreference[];\n /**\n * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.\n * @format GUID\n */\n purchaseFlowId?: string | null;\n /**\n * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.\n * For example, a Wix Pay Link ID.\n * @maxSize 20\n */\n externalReferences?: ExternalReference[];\n /** [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */\n extendedFields?: ExtendedFields;\n}\n\nexport interface DeliverableItem {\n /**\n * The ID of the line item.\n * @minLength 1\n * @maxLength 100\n */\n id?: string;\n /**\n * Item name.\n * @maxLength 400\n */\n name?: string;\n /**\n * The number of items ordered.\n * @min 1\n * @max 999999999\n */\n quantity?: number;\n /** Reference to the item's origin catalog. */\n catalogReference?: CatalogReference;\n /** Physical properties of the item. */\n physicalProperties?: PhysicalProperties;\n /**\n * Price of a single item after discounts.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, maxScale:36 }\n * @deprecated Price of a single item after discounts.\n * @targetRemovalDate 2026-04-04\n */\n price?: string;\n /**\n * Total line item price before discounts.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, maxScale:36 }\n */\n totalPriceBeforeDiscount?: string | null;\n /**\n * Price of a single item before discounts.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, maxScale:36 }\n */\n priceBeforeDiscount?: string | null;\n /**\n * Total line item price after discounts. This is equal to `price` multiplied by `quantity`.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, maxScale:36 }\n */\n totalPrice?: string | null;\n /**\n * For delivery rates by delivery profile id\n * @format GUID\n */\n deliveryProfileId?: string | null;\n /** whether tax is included in line item price */\n taxIncludedInPrice?: boolean | null;\n /** Subscription settings for the item */\n subscriptionSettings?: SubscriptionSettings;\n}\n\n/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */\nexport interface CatalogReference {\n /**\n * ID of the item within the catalog it belongs to.\n * @minLength 1\n * @maxLength 36\n */\n catalogItemId?: string;\n /**\n * ID of the app providing the catalog.\n *\n * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n *\n * For items from Wix catalogs, the following values always apply:\n * + Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n * + Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n * + Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n * @minLength 1\n */\n appId?: string;\n /**\n * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.\n *\n * For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration).\n */\n options?: Record<string, any> | null;\n}\n\nexport interface PhysicalProperties {\n /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */\n weight?: number | null;\n /**\n * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).\n * @maxLength 40\n */\n sku?: string | null;\n /** Whether this line item is shippable. */\n shippable?: boolean;\n}\n\nexport interface SubscriptionSettings {\n /** Frequency of recurring payment. Every day/week/month/year. */\n frequency?: SubscriptionFrequencyWithLiterals;\n}\n\n/** Frequency unit of recurring payment */\nexport enum SubscriptionFrequency {\n UNDEFINED = 'UNDEFINED',\n DAY = 'DAY',\n WEEK = 'WEEK',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type SubscriptionFrequencyWithLiterals =\n | SubscriptionFrequency\n | 'UNDEFINED'\n | 'DAY'\n | 'WEEK'\n | 'MONTH'\n | 'YEAR';\n\n/** Physical address */\nexport interface Address extends AddressStreetOneOf {\n /** Street name and number. */\n streetAddress?: StreetAddress;\n /** Main address line, usually street and number as free text. */\n addressLine?: string | null;\n /**\n * Country code.\n * @format COUNTRY\n */\n country?: string | null;\n /** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */\n subdivision?: string | null;\n /** City name. */\n city?: string | null;\n /** Zip/postal code. */\n postalCode?: string | null;\n /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */\n addressLine2?: string | null;\n}\n\n/** @oneof */\nexport interface AddressStreetOneOf {\n /** Street name and number. */\n streetAddress?: StreetAddress;\n /** Main address line, usually street and number as free text. */\n addressLine?: string | null;\n}\n\nexport interface StreetAddress {\n /** Street number. */\n number?: string;\n /** Street name. */\n name?: string;\n}\n\nexport interface AddressLocation {\n /** Address latitude. */\n latitude?: number | null;\n /** Address longitude. */\n longitude?: number | null;\n}\n\nexport interface Subdivision {\n /** Short subdivision code. */\n code?: string;\n /** Subdivision full name. */\n name?: string;\n}\n\nexport enum SubdivisionType {\n UNKNOWN_SUBDIVISION_TYPE = 'UNKNOWN_SUBDIVISION_TYPE',\n /** State */\n ADMINISTRATIVE_AREA_LEVEL_1 = 'ADMINISTRATIVE_AREA_LEVEL_1',\n /** County */\n ADMINISTRATIVE_AREA_LEVEL_2 = 'ADMINISTRATIVE_AREA_LEVEL_2',\n /** City/town */\n ADMINISTRATIVE_AREA_LEVEL_3 = 'ADMINISTRATIVE_AREA_LEVEL_3',\n /** Neighborhood/quarter */\n ADMINISTRATIVE_AREA_LEVEL_4 = 'ADMINISTRATIVE_AREA_LEVEL_4',\n /** Street/block */\n ADMINISTRATIVE_AREA_LEVEL_5 = 'ADMINISTRATIVE_AREA_LEVEL_5',\n /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */\n COUNTRY = 'COUNTRY',\n}\n\n/** @enumType */\nexport type SubdivisionTypeWithLiterals =\n | SubdivisionType\n | 'UNKNOWN_SUBDIVISION_TYPE'\n | 'ADMINISTRATIVE_AREA_LEVEL_1'\n | 'ADMINISTRATIVE_AREA_LEVEL_2'\n | 'ADMINISTRATIVE_AREA_LEVEL_3'\n | 'ADMINISTRATIVE_AREA_LEVEL_4'\n | 'ADMINISTRATIVE_AREA_LEVEL_5'\n | 'COUNTRY';\n\n/** Full contact details for an address */\nexport interface FullAddressContactDetails {\n /** Contact's first name. */\n firstName?: string | null;\n /** Contact's last name. */\n lastName?: string | null;\n /**\n * Contact's phone number.\n * @format PHONE\n */\n phone?: string | null;\n /** Contact's company name. */\n company?: string | null;\n /**\n * Email associated with the address.\n * @format EMAIL\n */\n email?: string | null;\n /** Tax info. Currently usable only in Brazil. */\n vatId?: VatId;\n}\n\nexport interface VatId {\n /** Customer's tax ID. */\n id?: string;\n /**\n * Tax type.\n *\n * Supported values:\n * + `CPF`: for individual tax payers\n * + `CNPJ`: for corporations\n */\n type?: VatTypeWithLiterals;\n}\n\n/** tax info types */\nexport enum VatType {\n UNSPECIFIED = 'UNSPECIFIED',\n /** CPF - for individual tax payers. */\n CPF = 'CPF',\n /** CNPJ - for corporations */\n CNPJ = 'CNPJ',\n}\n\n/** @enumType */\nexport type VatTypeWithLiterals = VatType | 'UNSPECIFIED' | 'CPF' | 'CNPJ';\n\nexport enum WeightUnit {\n /** Weight unit can't be classified due to an error. */\n UNSPECIFIED_WEIGHT_UNIT = 'UNSPECIFIED_WEIGHT_UNIT',\n /** Kilograms. */\n KG = 'KG',\n /** Pounds. */\n LB = 'LB',\n}\n\n/** @enumType */\nexport type WeightUnitWithLiterals =\n | WeightUnit\n | 'UNSPECIFIED_WEIGHT_UNIT'\n | 'KG'\n | 'LB';\n\nexport interface UserPreference {\n /**\n * The delivery carrier app id\n * @format GUID\n */\n appId?: string | null;\n /**\n * The delivery option code\n * @maxLength 250\n */\n code?: string;\n}\n\nexport interface ExternalReference {\n /**\n * ID of the app associated with the purchase flow.\n * For example, the Wix Pay Links app ID.\n * @format GUID\n * @immutable\n */\n appId?: string;\n /**\n * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.\n * For example, a Wix Pay Link ID.\n * @minLength 1\n * @maxLength 100\n * @immutable\n */\n resourceId?: string | null;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\n/**\n * Each delivery option has a list of items that can be delivered by it - the chosen one\n * on Errors throw a business error from TC to catch and trigger destination completion\n */\nexport interface GetDeliverySolutionsResponse {\n /**\n * Delivery Options with their associated items\n * @maxSize 300\n */\n deliverySolutions?: DeliverySolution[];\n /**\n * If a delivery carrier could not calculate rates, the error will be detailed here\n * @maxSize 50\n */\n errors?: DeliveryCarrierError[];\n}\n\nexport interface DeliverySolution {\n /**\n * Unique code that acts as an ID for a shipping rate. For example, `\"usps_std_overnight\"`.\n * DEPRECATED: Use delivery_reference.code instead\n * @maxLength 250\n * @deprecated Unique code that acts as an ID for a shipping rate. For example, `\"usps_std_overnight\"`.\n * DEPRECATED: Use delivery_reference.code instead\n * @replacedBy delivery_reference\n * @targetRemovalDate 2026-01-01\n */\n code?: string;\n /** Represents a reference to a specific delivery solution. Combines both the carrier's code and its application identifier. */\n deliveryReference?: DeliveryReference;\n /**\n * Delivery rate title. For example, `\"USPS Standard Overnight Delivery\"`, `\"Standard\"`, or `\"First-Class Package International\"`.\n * @maxLength 250\n */\n title?: string;\n /** Delivery logistics. */\n logistics?: DeliveryLogistics;\n /** Delivery cost. */\n cost?: DeliveryCost;\n /**\n * Delivery solution allocations to different delivery carriers and delivery regions\n * @minSize 1\n * @maxSize 300\n */\n deliveryAllocations?: DeliveryAllocation[];\n /** If the delivery solution is a partial and doesn't apply to all items. */\n partial?: boolean | null;\n}\n\nexport interface DeliveryReference {\n /**\n * The delivery solution code provided by the carrier\n * @maxLength 250\n */\n code?: string | null;\n /**\n * The carrier app id\n * @format GUID\n */\n appId?: string | null;\n}\n\nexport interface DeliveryLogistics {\n /**\n * When the item is expected to be delivered in free text. For example, `\"3-5 business days\"`.\n * @maxLength 1000\n */\n deliveryTime?: string | null;\n /**\n * Instructions for delivery. For example, for pickup: `\"Ensure to come during business hours, and please don't park in the disabled spot\"`.\n * @maxLength 1000\n */\n instructions?: string | null;\n /** Pickup details. Should be returned only if order is for pickup. */\n pickupDetails?: PickupDetails;\n /** Date and Time of the delivery option */\n deliveryTimeSlot?: DeliveryTimeSlot;\n}\n\nexport interface PickupDetails {\n /** Pickup address. */\n address?: Address;\n /**\n * Pickup method.\n *\n * Supported values:\n * + `\"STORE_PICKUP\"`: When pickup is from the merchant's brick and mortar store.\n * + `\"PICKUP_POINT\"`: When item is shipped to a specified pickup point.\n */\n pickupMethod?: PickupMethodWithLiterals;\n}\n\nexport enum PickupMethod {\n UNKNOWN_METHOD = 'UNKNOWN_METHOD',\n STORE_PICKUP = 'STORE_PICKUP',\n PICKUP_POINT = 'PICKUP_POINT',\n}\n\n/** @enumType */\nexport type PickupMethodWithLiterals =\n | PickupMethod\n | 'UNKNOWN_METHOD'\n | 'STORE_PICKUP'\n | 'PICKUP_POINT';\n\nexport interface DeliveryTimeSlot {\n /** starting time of the delivery time slot */\n from?: Date | null;\n /** ending time of the delivery time slot */\n to?: Date | null;\n /**\n * Time zone in IANA format (e.g \"America/New_York\")\n * If not provided, the cart/checkout will format the time slot based on the site's business location\n * @maxLength 64\n */\n timeZone?: string | null;\n}\n\nexport interface DeliveryCost {\n /**\n * The shipping rate's price. Must align with the [currency's decimal separator](https://en.wikipedia.org/wiki/ISO_4217#Active_codes).\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, lte:1000000000000000 }\n * @deprecated\n * @targetRemovalDate 2025-12-01\n */\n price?: string;\n /**\n * Currency of the shipping rate price as a 3-letter [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217). Must align with the `currency` passed to the function under the `metadata` field.\n * @format CURRENCY\n * @deprecated Currency of the shipping rate price as a 3-letter [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217). Must align with the `currency` passed to the function under the `metadata` field.\n * @targetRemovalDate 2025-12-01\n */\n currency?: string;\n /**\n * Additional costs. For example, a handling fee for packaging fragile items.\n * @maxSize 100\n * @deprecated Additional costs. For example, a handling fee for packaging fragile items.\n * @targetRemovalDate 2025-12-01\n */\n additionalCharges?: AdditionalCharge[];\n /** The shipping rate's price. Must align with the [currency's decimal separator] */\n deliveryPrice?: MultiCurrencyPrice;\n /**\n * Additional costs. For example, a handling fee for packaging fragile items.\n * @maxSize 100\n */\n additionalCosts?: AdditionalCost[];\n}\n\nexport interface AdditionalCharge {\n /** Additional charge type. */\n type?: ChargeTypeWithLiterals;\n /**\n * Description of the additional charge. For example, `\"Handling fee of $5 applied for gift wrapping\"`.\n * @maxLength 250\n */\n description?: string | null;\n /**\n * Cost of additional charge. For example, `12.5`.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n price?: string;\n}\n\nexport enum ChargeType {\n HANDLING_FEE = 'HANDLING_FEE',\n}\n\n/** @enumType */\nexport type ChargeTypeWithLiterals = ChargeType | 'HANDLING_FEE';\n\nexport interface MultiCurrencyPrice {\n /**\n * Amount.\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n amount?: string;\n /**\n * Converted amount.\n * @readonly\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n convertedAmount?: string;\n /**\n * Amount formatted with currency symbol.\n * @readonly\n */\n formattedAmount?: string;\n /**\n * Converted amount formatted with currency symbol.\n * @readonly\n */\n formattedConvertedAmount?: string;\n}\n\nexport interface AdditionalCost {\n /**\n * Description of the additional charge. For example, `\"Handling fee of $5 applied for gift wrapping\"`.\n * @maxLength 250\n */\n description?: string | null;\n /** Delivery price of additional charge. For example, `12.5`. */\n deliveryPrice?: MultiCurrencyPrice;\n}\n\nexport interface DeliveryAllocation {\n /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */\n deliveryCarrier?: Carrier;\n /** The delivery region that are relevant for this delivery solution. */\n deliveryRegion?: Region;\n /** Populated if the delivery solution is a partially supplied by this carrier. */\n applicableLineItems?: ApplicableLineItems;\n}\n\nexport interface Carrier {\n /**\n * The carrier app id\n * @format GUID\n */\n appId?: string | null;\n /**\n * Unique code that acts as an ID for a shipping rate. For example, `\"usps_std_overnight\"`.\n * @maxLength 250\n */\n code?: string;\n}\n\nexport interface Region {\n /**\n * The delivery region id.\n * @format GUID\n */\n id?: string | null;\n /**\n * The delivery region name.\n * @maxLength 100\n */\n name?: string | null;\n}\n\nexport interface ApplicableLineItems {\n /**\n * Line items that the delivery solution is for.\n * @maxSize 300\n * @minLength 1\n * @maxLength 100\n */\n lineItemIds?: string[];\n}\n\nexport interface DeliveryCarrierError {\n /**\n * The carrier app id\n * @format GUID\n */\n appId?: string | null;\n /** The error details */\n errorDetails?: Details;\n}\n\nexport interface Details extends DetailsKindOneOf {\n applicationError?: ApplicationError;\n validationError?: ValidationError;\n systemError?: SystemError;\n /**\n * deprecated in API's - to enable migration from rendering arbitrary tracing to rest response\n * @deprecated\n */\n tracing?: Record<string, string>;\n}\n\n/** @oneof */\nexport interface DetailsKindOneOf {\n applicationError?: ApplicationError;\n validationError?: ValidationError;\n systemError?: SystemError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\n/**\n * example result:\n * {\n * \"fieldViolations\": [\n * {\n * \"field\": \"fieldA\",\n * \"description\": \"invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]\",\n * \"violatedRule\": \"OTHER\",\n * \"ruleName\": \"INVALID_NOTE\",\n * \"data\": {\n * \"value\": \"FI\"\n * }\n * },\n * {\n * \"field\": \"fieldB\",\n * \"description\": \"field value out of range. supported range: [0-20]\",\n * \"violatedRule\": \"MAX\",\n * \"data\": {\n * \"threshold\": 20\n * }\n * },\n * {\n * \"field\": \"fieldC\",\n * \"description\": \"invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]\",\n * \"violatedRule\": \"FORMAT\",\n * \"data\": {\n * \"type\": \"PHONE\"\n * }\n * }\n * ]\n * }\n */\nexport interface ValidationError {\n fieldViolations?: FieldViolation[];\n}\n\nexport enum RuleType {\n VALIDATION = 'VALIDATION',\n OTHER = 'OTHER',\n MAX = 'MAX',\n MIN = 'MIN',\n MAX_LENGTH = 'MAX_LENGTH',\n MIN_LENGTH = 'MIN_LENGTH',\n MAX_SIZE = 'MAX_SIZE',\n MIN_SIZE = 'MIN_SIZE',\n FORMAT = 'FORMAT',\n DECIMAL_LTE = 'DECIMAL_LTE',\n DECIMAL_GTE = 'DECIMAL_GTE',\n DECIMAL_LT = 'DECIMAL_LT',\n DECIMAL_GT = 'DECIMAL_GT',\n DECIMAL_MAX_SCALE = 'DECIMAL_MAX_SCALE',\n INVALID_ENUM_VALUE = 'INVALID_ENUM_VALUE',\n REQUIRED_FIELD = 'REQUIRED_FIELD',\n FIELD_NOT_ALLOWED = 'FIELD_NOT_ALLOWED',\n ONE_OF_ALIGNMENT = 'ONE_OF_ALIGNMENT',\n EXACT_LENGTH = 'EXACT_LENGTH',\n EXACT_SIZE = 'EXACT_SIZE',\n REQUIRED_ONE_OF_FIELD = 'REQUIRED_ONE_OF_FIELD',\n}\n\n/** @enumType */\nexport type RuleTypeWithLiterals =\n | RuleType\n | 'VALIDATION'\n | 'OTHER'\n | 'MAX'\n | 'MIN'\n | 'MAX_LENGTH'\n | 'MIN_LENGTH'\n | 'MAX_SIZE'\n | 'MIN_SIZE'\n | 'FORMAT'\n | 'DECIMAL_LTE'\n | 'DECIMAL_GTE'\n | 'DECIMAL_LT'\n | 'DECIMAL_GT'\n | 'DECIMAL_MAX_SCALE'\n | 'INVALID_ENUM_VALUE'\n | 'REQUIRED_FIELD'\n | 'FIELD_NOT_ALLOWED'\n | 'ONE_OF_ALIGNMENT'\n | 'EXACT_LENGTH'\n | 'EXACT_SIZE'\n | 'REQUIRED_ONE_OF_FIELD';\n\nexport interface FieldViolation {\n field?: string;\n description?: string;\n violatedRule?: RuleTypeWithLiterals;\n /** applicable when violated_rule=OTHER */\n ruleName?: string | null;\n data?: Record<string, any> | null;\n}\n\nexport interface SystemError {\n /** Error code. */\n errorCode?: string | null;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountDetails {\n /**\n * ID of the account.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the site, if applicable.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type GetDeliverySolutionsApplicationErrors =\n | {\n code?: 'MISSING_CURRENCY_IN_THE_REQUEST_HEADERS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MISSING_DEFAULT_DELIVERY_PROFILE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'NO_DELIVERY_REGION_FOUND';\n description?: string;\n data?: Record<string, any>;\n };\n","import * as ambassadorWixGatewaysEcomV1DeliveryRatesGateway from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js';\nimport * as ambassadorWixGatewaysEcomV1DeliveryRatesGatewayTypes from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js';\nimport * as ambassadorWixGatewaysEcomV1DeliveryRatesGatewayUniversalTypes from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function getDeliverySolutions(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixGatewaysEcomV1DeliveryRatesGatewayUniversalTypes.GetDeliverySolutionsRequest,\n ambassadorWixGatewaysEcomV1DeliveryRatesGatewayTypes.GetDeliverySolutionsRequest,\n ambassadorWixGatewaysEcomV1DeliveryRatesGatewayUniversalTypes.GetDeliverySolutionsResponse,\n ambassadorWixGatewaysEcomV1DeliveryRatesGatewayTypes.GetDeliverySolutionsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixGatewaysEcomV1DeliveryRatesGateway.getDeliverySolutions(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/get-delivery-solutions',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n DeliveryRatesGateway as DeliveryRatesGatewayOriginal,\n MissingDefaultDeliveryProfileEvent as MissingDefaultDeliveryProfileEventOriginal,\n GetDeliverySolutionsRequest as GetDeliverySolutionsRequestOriginal,\n DeliverableItem as DeliverableItemOriginal,\n CatalogReference as CatalogReferenceOriginal,\n PhysicalProperties as PhysicalPropertiesOriginal,\n SubscriptionSettings as SubscriptionSettingsOriginal,\n SubscriptionFrequency as SubscriptionFrequencyOriginal,\n SubscriptionFrequencyWithLiterals as SubscriptionFrequencyWithLiteralsOriginal,\n Address as AddressOriginal,\n AddressStreetOneOf as AddressStreetOneOfOriginal,\n StreetAddress as StreetAddressOriginal,\n AddressLocation as AddressLocationOriginal,\n Subdivision as SubdivisionOriginal,\n SubdivisionType as SubdivisionTypeOriginal,\n SubdivisionTypeWithLiterals as SubdivisionTypeWithLiteralsOriginal,\n FullAddressContactDetails as FullAddressContactDetailsOriginal,\n VatId as VatIdOriginal,\n VatType as VatTypeOriginal,\n VatTypeWithLiterals as VatTypeWithLiteralsOriginal,\n WeightUnit as WeightUnitOriginal,\n WeightUnitWithLiterals as WeightUnitWithLiteralsOriginal,\n UserPreference as UserPreferenceOriginal,\n ExternalReference as ExternalReferenceOriginal,\n ExtendedFields as ExtendedFieldsOriginal,\n GetDeliverySolutionsResponse as GetDeliverySolutionsResponseOriginal,\n DeliverySolution as DeliverySolutionOriginal,\n DeliveryReference as DeliveryReferenceOriginal,\n DeliveryLogistics as DeliveryLogisticsOriginal,\n PickupDetails as PickupDetailsOriginal,\n PickupMethod as PickupMethodOriginal,\n PickupMethodWithLiterals as PickupMethodWithLiteralsOriginal,\n DeliveryTimeSlot as DeliveryTimeSlotOriginal,\n DeliveryCost as DeliveryCostOriginal,\n AdditionalCharge as AdditionalChargeOriginal,\n ChargeType as ChargeTypeOriginal,\n ChargeTypeWithLiterals as ChargeTypeWithLiteralsOriginal,\n MultiCurrencyPrice as MultiCurrencyPriceOriginal,\n AdditionalCost as AdditionalCostOriginal,\n DeliveryAllocation as DeliveryAllocationOriginal,\n Carrier as CarrierOriginal,\n Region as RegionOriginal,\n ApplicableLineItems as ApplicableLineItemsOriginal,\n DeliveryCarrierError as DeliveryCarrierErrorOriginal,\n Details as DetailsOriginal,\n DetailsKindOneOf as DetailsKindOneOfOriginal,\n ApplicationError as ApplicationErrorOriginal,\n ValidationError as ValidationErrorOriginal,\n RuleType as RuleTypeOriginal,\n RuleTypeWithLiterals as RuleTypeWithLiteralsOriginal,\n FieldViolation as FieldViolationOriginal,\n SystemError as SystemErrorOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n AccountDetails as AccountDetailsOriginal,\n GetDeliverySolutionsApplicationErrors as GetDeliverySolutionsApplicationErrorsOriginal,\n} from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAAAA;AAAA;AAAA;;;ACAA,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,uBAAqD;AACrD,6BAA+B;AAC/B,0BAA2B;AAI3B,SAAS,gDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AA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gB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["getDeliverySolutions","import_float","payload","SubscriptionFrequency","SubdivisionType","VatType","WeightUnit","PickupMethod","ChargeType","RuleType","WebhookIdentityType","getDeliverySolutions"]}
1
+ {"version":3,"sources":["../../../meta.ts","../../../src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.ts","../../../src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.ts","../../../src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.ts"],"sourcesContent":["export * from './src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.meta.js';\n","import { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixEcomDeliveryprofileV1DeliveryRatesUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/delivery-rates',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_delivery-solutions';\n\n/** Get Delivery Solutions for the given line items from all relevant delivery carriers */\nexport function getDeliverySolutions(\n payload: object\n): RequestOptionsFactory<any> {\n function __getDeliverySolutions({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'lineItems.physicalProperties.weight' },\n { path: 'destination.geocode.latitude' },\n { path: 'destination.geocode.longitude' },\n { path: 'origin.geocode.latitude' },\n { path: 'origin.geocode.longitude' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.gateways.ecom.v1.delivery_rates_gateway',\n method: 'POST' as any,\n methodFqn:\n 'wix.ecom.deliveryprofile.v1.DeliveryRates.GetDeliverySolutions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomDeliveryprofileV1DeliveryRatesUrl({\n protoPath: '/v1/get-delivery-solutions',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'deliverySolutions.logistics.pickupDetails.address.geocode.latitude',\n },\n {\n path: 'deliverySolutions.logistics.pickupDetails.address.geocode.longitude',\n },\n ],\n },\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'deliverySolutions.logistics.deliveryTimeSlot.from' },\n { path: 'deliverySolutions.logistics.deliveryTimeSlot.to' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getDeliverySolutions;\n}\n","export interface DeliveryRatesGateway {\n /**\n * @format GUID\n * @readonly\n */\n id?: string | null;\n}\n\nexport interface MissingDefaultDeliveryProfileEvent {\n /**\n * The meta site ID where the missing default delivery profile error occurred\n * @format GUID\n */\n metaSiteId?: string;\n /** Timestamp when the error occurred */\n occurredAt?: Date | null;\n}\n\nexport interface GetDeliverySolutionsRequest {\n /**\n * list of items to delivery that each of them points to delivery profile and delivery rule.\n * @minSize 1\n * @maxSize 300\n */\n lineItems: DeliverableItem[];\n /** Destination the items should deliver to */\n destination: Address;\n /**\n * Origin the items should deliver from\n * @deprecated Origin the items should deliver from\n * @targetRemovalDate 2025-04-01\n */\n origin?: Address;\n /**\n * Currency - Defaults to site's currency\n * @format CURRENCY\n */\n currency: string | null;\n /** Contact details */\n contactDetails?: FullAddressContactDetails;\n /** Measure unit - defaults to site's weight unit */\n weightUnit?: WeightUnitWithLiterals;\n /**\n * list of user preferences which are delivery options codes combined with delivery carrier app id\n * @maxSize 5\n */\n userPreferences?: UserPreference[];\n /**\n * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.\n * @format GUID\n */\n purchaseFlowId?: string | null;\n /**\n * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.\n * For example, a Wix Pay Link ID.\n * @maxSize 20\n */\n externalReferences?: ExternalReference[];\n /** [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */\n extendedFields?: ExtendedFields;\n}\n\nexport interface DeliverableItem {\n /**\n * The ID of the line item.\n * @minLength 1\n * @maxLength 100\n */\n id?: string;\n /**\n * Item name.\n * @maxLength 400\n */\n name?: string;\n /**\n * The number of items ordered.\n * @min 1\n * @max 999999999\n */\n quantity?: number;\n /** Reference to the item's origin catalog. */\n catalogReference?: CatalogReference;\n /** Physical properties of the item. */\n physicalProperties?: PhysicalProperties;\n /**\n * Price of a single item after discounts.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, maxScale:36 }\n * @deprecated Price of a single item after discounts.\n * @targetRemovalDate 2026-04-04\n */\n price?: string;\n /**\n * Total line item price before discounts.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, maxScale:36 }\n */\n totalPriceBeforeDiscount?: string | null;\n /**\n * Price of a single item before discounts.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, maxScale:36 }\n */\n priceBeforeDiscount?: string | null;\n /**\n * Total line item price after discounts. This is equal to `price` multiplied by `quantity`.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, maxScale:36 }\n */\n totalPrice?: string | null;\n /**\n * For delivery rates by delivery profile id\n * @format GUID\n */\n deliveryProfileId?: string | null;\n /** whether tax is included in line item price */\n taxIncludedInPrice?: boolean | null;\n /** Subscription settings for the item */\n subscriptionSettings?: SubscriptionSettings;\n}\n\n/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */\nexport interface CatalogReference {\n /**\n * ID of the item within the catalog it belongs to.\n * @minLength 1\n * @maxLength 36\n */\n catalogItemId?: string;\n /**\n * ID of the app providing the catalog.\n *\n * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n *\n * For items from Wix catalogs, the following values always apply:\n * + Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n * + Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n * + Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n * @minLength 1\n */\n appId?: string;\n /**\n * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.\n *\n * For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration).\n */\n options?: Record<string, any> | null;\n}\n\nexport interface PhysicalProperties {\n /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */\n weight?: number | null;\n /**\n * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).\n * @maxLength 40\n */\n sku?: string | null;\n /** Whether this line item is shippable. */\n shippable?: boolean;\n}\n\nexport interface SubscriptionSettings {\n /** Frequency of recurring payment. Every day/week/month/year. */\n frequency?: SubscriptionFrequencyWithLiterals;\n}\n\n/** Frequency unit of recurring payment */\nexport enum SubscriptionFrequency {\n UNDEFINED = 'UNDEFINED',\n DAY = 'DAY',\n WEEK = 'WEEK',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type SubscriptionFrequencyWithLiterals =\n | SubscriptionFrequency\n | 'UNDEFINED'\n | 'DAY'\n | 'WEEK'\n | 'MONTH'\n | 'YEAR';\n\n/** Physical address */\nexport interface Address extends AddressStreetOneOf {\n /** Street name and number. */\n streetAddress?: StreetAddress;\n /** Main address line, usually street and number as free text. */\n addressLine?: string | null;\n /**\n * Country code.\n * @format COUNTRY\n */\n country?: string | null;\n /** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */\n subdivision?: string | null;\n /** City name. */\n city?: string | null;\n /** Zip/postal code. */\n postalCode?: string | null;\n /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */\n addressLine2?: string | null;\n}\n\n/** @oneof */\nexport interface AddressStreetOneOf {\n /** Street name and number. */\n streetAddress?: StreetAddress;\n /** Main address line, usually street and number as free text. */\n addressLine?: string | null;\n}\n\nexport interface StreetAddress {\n /** Street number. */\n number?: string;\n /** Street name. */\n name?: string;\n}\n\nexport interface AddressLocation {\n /** Address latitude. */\n latitude?: number | null;\n /** Address longitude. */\n longitude?: number | null;\n}\n\nexport interface Subdivision {\n /** Short subdivision code. */\n code?: string;\n /** Subdivision full name. */\n name?: string;\n}\n\nexport enum SubdivisionType {\n UNKNOWN_SUBDIVISION_TYPE = 'UNKNOWN_SUBDIVISION_TYPE',\n /** State */\n ADMINISTRATIVE_AREA_LEVEL_1 = 'ADMINISTRATIVE_AREA_LEVEL_1',\n /** County */\n ADMINISTRATIVE_AREA_LEVEL_2 = 'ADMINISTRATIVE_AREA_LEVEL_2',\n /** City/town */\n ADMINISTRATIVE_AREA_LEVEL_3 = 'ADMINISTRATIVE_AREA_LEVEL_3',\n /** Neighborhood/quarter */\n ADMINISTRATIVE_AREA_LEVEL_4 = 'ADMINISTRATIVE_AREA_LEVEL_4',\n /** Street/block */\n ADMINISTRATIVE_AREA_LEVEL_5 = 'ADMINISTRATIVE_AREA_LEVEL_5',\n /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */\n COUNTRY = 'COUNTRY',\n}\n\n/** @enumType */\nexport type SubdivisionTypeWithLiterals =\n | SubdivisionType\n | 'UNKNOWN_SUBDIVISION_TYPE'\n | 'ADMINISTRATIVE_AREA_LEVEL_1'\n | 'ADMINISTRATIVE_AREA_LEVEL_2'\n | 'ADMINISTRATIVE_AREA_LEVEL_3'\n | 'ADMINISTRATIVE_AREA_LEVEL_4'\n | 'ADMINISTRATIVE_AREA_LEVEL_5'\n | 'COUNTRY';\n\n/** Full contact details for an address */\nexport interface FullAddressContactDetails {\n /** Contact's first name. */\n firstName?: string | null;\n /** Contact's last name. */\n lastName?: string | null;\n /**\n * Contact's phone number.\n * @format PHONE\n */\n phone?: string | null;\n /** Contact's company name. */\n company?: string | null;\n /**\n * Email associated with the address.\n * @format EMAIL\n */\n email?: string | null;\n /** Tax info. Currently usable only in Brazil. */\n vatId?: VatId;\n}\n\nexport interface VatId {\n /** Customer's tax ID. */\n id?: string;\n /**\n * Tax type.\n *\n * Supported values:\n * + `CPF`: for individual tax payers\n * + `CNPJ`: for corporations\n */\n type?: VatTypeWithLiterals;\n}\n\n/** tax info types */\nexport enum VatType {\n UNSPECIFIED = 'UNSPECIFIED',\n /** CPF - for individual tax payers. */\n CPF = 'CPF',\n /** CNPJ - for corporations */\n CNPJ = 'CNPJ',\n}\n\n/** @enumType */\nexport type VatTypeWithLiterals = VatType | 'UNSPECIFIED' | 'CPF' | 'CNPJ';\n\nexport enum WeightUnit {\n /** Weight unit can't be classified due to an error. */\n UNSPECIFIED_WEIGHT_UNIT = 'UNSPECIFIED_WEIGHT_UNIT',\n /** Kilograms. */\n KG = 'KG',\n /** Pounds. */\n LB = 'LB',\n}\n\n/** @enumType */\nexport type WeightUnitWithLiterals =\n | WeightUnit\n | 'UNSPECIFIED_WEIGHT_UNIT'\n | 'KG'\n | 'LB';\n\nexport interface UserPreference {\n /**\n * The delivery carrier app id\n * @format GUID\n */\n appId?: string | null;\n /**\n * The delivery option code\n * @maxLength 250\n */\n code?: string;\n}\n\nexport interface ExternalReference {\n /**\n * ID of the app associated with the purchase flow.\n * For example, the Wix Pay Links app ID.\n * @format GUID\n * @immutable\n */\n appId?: string;\n /**\n * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.\n * For example, a Wix Pay Link ID.\n * @minLength 1\n * @maxLength 100\n * @immutable\n */\n resourceId?: string | null;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\n/**\n * Each delivery option has a list of items that can be delivered by it - the chosen one\n * on Errors throw a business error from TC to catch and trigger destination completion\n */\nexport interface GetDeliverySolutionsResponse {\n /**\n * Delivery Options with their associated items\n * @maxSize 300\n */\n deliverySolutions?: DeliverySolution[];\n /**\n * If a delivery carrier could not calculate rates, the error will be detailed here\n * @maxSize 50\n */\n errors?: DeliveryCarrierError[];\n}\n\nexport interface DeliverySolution {\n /**\n * Unique code that acts as an ID for a shipping rate. For example, `\"usps_std_overnight\"`.\n * DEPRECATED: Use delivery_reference.code instead\n * @maxLength 250\n * @deprecated Unique code that acts as an ID for a shipping rate. For example, `\"usps_std_overnight\"`.\n * DEPRECATED: Use delivery_reference.code instead\n * @replacedBy delivery_reference\n * @targetRemovalDate 2026-01-01\n */\n code?: string;\n /** Represents a reference to a specific delivery solution. Combines both the carrier's code and its application identifier. */\n deliveryReference?: DeliveryReference;\n /**\n * Delivery rate title. For example, `\"USPS Standard Overnight Delivery\"`, `\"Standard\"`, or `\"First-Class Package International\"`.\n * @maxLength 250\n */\n title?: string;\n /** Delivery logistics. */\n logistics?: DeliveryLogistics;\n /** Delivery cost. */\n cost?: DeliveryCost;\n /**\n * Delivery solution allocations to different delivery carriers and delivery regions\n * @minSize 1\n * @maxSize 300\n */\n deliveryAllocations?: DeliveryAllocation[];\n /** If the delivery solution is a partial and doesn't apply to all items. */\n partial?: boolean | null;\n}\n\nexport interface DeliveryReference {\n /**\n * The delivery solution code provided by the carrier\n * @maxLength 250\n */\n code?: string | null;\n /**\n * The carrier app id\n * @format GUID\n */\n appId?: string | null;\n}\n\nexport interface DeliveryLogistics {\n /**\n * When the item is expected to be delivered in free text. For example, `\"3-5 business days\"`.\n * @maxLength 1000\n */\n deliveryTime?: string | null;\n /**\n * Instructions for delivery. For example, for pickup: `\"Ensure to come during business hours, and please don't park in the disabled spot\"`.\n * @maxLength 1000\n */\n instructions?: string | null;\n /** Pickup details. Should be returned only if order is for pickup. */\n pickupDetails?: PickupDetails;\n /** Date and Time of the delivery option */\n deliveryTimeSlot?: DeliveryTimeSlot;\n}\n\nexport interface PickupDetails {\n /** Pickup address. */\n address?: Address;\n /**\n * Pickup method.\n *\n * Supported values:\n * + `\"STORE_PICKUP\"`: When pickup is from the merchant's brick and mortar store.\n * + `\"PICKUP_POINT\"`: When item is shipped to a specified pickup point.\n */\n pickupMethod?: PickupMethodWithLiterals;\n}\n\nexport enum PickupMethod {\n UNKNOWN_METHOD = 'UNKNOWN_METHOD',\n STORE_PICKUP = 'STORE_PICKUP',\n PICKUP_POINT = 'PICKUP_POINT',\n}\n\n/** @enumType */\nexport type PickupMethodWithLiterals =\n | PickupMethod\n | 'UNKNOWN_METHOD'\n | 'STORE_PICKUP'\n | 'PICKUP_POINT';\n\nexport interface DeliveryTimeSlot {\n /** starting time of the delivery time slot */\n from?: Date | null;\n /** ending time of the delivery time slot */\n to?: Date | null;\n /**\n * Time zone in IANA format (e.g \"America/New_York\")\n * If not provided, the cart/checkout will format the time slot based on the site's business location\n * @maxLength 64\n */\n timeZone?: string | null;\n}\n\nexport interface DeliveryCost {\n /**\n * The shipping rate's price. Must align with the [currency's decimal separator](https://en.wikipedia.org/wiki/ISO_4217#Active_codes).\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, lte:1000000000000000 }\n * @deprecated\n * @targetRemovalDate 2025-12-01\n */\n price?: string;\n /**\n * Currency of the shipping rate price as a 3-letter [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217). Must align with the `currency` passed to the function under the `metadata` field.\n * @format CURRENCY\n * @deprecated Currency of the shipping rate price as a 3-letter [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217). Must align with the `currency` passed to the function under the `metadata` field.\n * @targetRemovalDate 2025-12-01\n */\n currency?: string;\n /** The shipping rate's price. Must align with the [currency's decimal separator] */\n deliveryPrice?: MultiCurrencyPrice;\n /**\n * Additional costs. For example, a handling fee for packaging fragile items.\n * @maxSize 100\n */\n additionalCosts?: AdditionalCost[];\n}\n\nexport interface MultiCurrencyPrice {\n /**\n * Amount.\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n amount?: string;\n /**\n * Converted amount.\n * @readonly\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n convertedAmount?: string;\n /**\n * Amount formatted with currency symbol.\n * @readonly\n */\n formattedAmount?: string;\n /**\n * Converted amount formatted with currency symbol.\n * @readonly\n */\n formattedConvertedAmount?: string;\n}\n\nexport interface AdditionalCost {\n /**\n * Description of the additional charge. For example, `\"Handling fee of $5 applied for gift wrapping\"`.\n * @maxLength 250\n */\n description?: string | null;\n /** Delivery price of additional charge. For example, `12.5`. */\n deliveryPrice?: MultiCurrencyPrice;\n}\n\nexport interface DeliveryAllocation {\n /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */\n deliveryCarrier?: Carrier;\n /** The delivery region that are relevant for this delivery solution. */\n deliveryRegion?: Region;\n /** Populated if the delivery solution is a partially supplied by this carrier. */\n applicableLineItems?: ApplicableLineItems;\n}\n\nexport interface Carrier {\n /**\n * The carrier app id\n * @format GUID\n */\n appId?: string | null;\n /**\n * Unique code that acts as an ID for a shipping rate. For example, `\"usps_std_overnight\"`.\n * @maxLength 250\n */\n code?: string;\n}\n\nexport interface Region {\n /**\n * The delivery region id.\n * @format GUID\n */\n id?: string | null;\n /**\n * The delivery region name.\n * @maxLength 100\n */\n name?: string | null;\n}\n\nexport interface ApplicableLineItems {\n /**\n * Line items that the delivery solution is for.\n * @maxSize 300\n * @minLength 1\n * @maxLength 100\n */\n lineItemIds?: string[];\n}\n\nexport interface DeliveryCarrierError {\n /**\n * The carrier app id\n * @format GUID\n */\n appId?: string | null;\n /** The error details */\n errorDetails?: Details;\n}\n\nexport interface Details extends DetailsKindOneOf {\n applicationError?: ApplicationError;\n validationError?: ValidationError;\n systemError?: SystemError;\n /**\n * deprecated in API's - to enable migration from rendering arbitrary tracing to rest response\n * @deprecated\n */\n tracing?: Record<string, string>;\n}\n\n/** @oneof */\nexport interface DetailsKindOneOf {\n applicationError?: ApplicationError;\n validationError?: ValidationError;\n systemError?: SystemError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\n/**\n * example result:\n * {\n * \"fieldViolations\": [\n * {\n * \"field\": \"fieldA\",\n * \"description\": \"invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]\",\n * \"violatedRule\": \"OTHER\",\n * \"ruleName\": \"INVALID_NOTE\",\n * \"data\": {\n * \"value\": \"FI\"\n * }\n * },\n * {\n * \"field\": \"fieldB\",\n * \"description\": \"field value out of range. supported range: [0-20]\",\n * \"violatedRule\": \"MAX\",\n * \"data\": {\n * \"threshold\": 20\n * }\n * },\n * {\n * \"field\": \"fieldC\",\n * \"description\": \"invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]\",\n * \"violatedRule\": \"FORMAT\",\n * \"data\": {\n * \"type\": \"PHONE\"\n * }\n * }\n * ]\n * }\n */\nexport interface ValidationError {\n fieldViolations?: FieldViolation[];\n}\n\nexport enum RuleType {\n VALIDATION = 'VALIDATION',\n OTHER = 'OTHER',\n MAX = 'MAX',\n MIN = 'MIN',\n MAX_LENGTH = 'MAX_LENGTH',\n MIN_LENGTH = 'MIN_LENGTH',\n MAX_SIZE = 'MAX_SIZE',\n MIN_SIZE = 'MIN_SIZE',\n FORMAT = 'FORMAT',\n DECIMAL_LTE = 'DECIMAL_LTE',\n DECIMAL_GTE = 'DECIMAL_GTE',\n DECIMAL_LT = 'DECIMAL_LT',\n DECIMAL_GT = 'DECIMAL_GT',\n DECIMAL_MAX_SCALE = 'DECIMAL_MAX_SCALE',\n INVALID_ENUM_VALUE = 'INVALID_ENUM_VALUE',\n REQUIRED_FIELD = 'REQUIRED_FIELD',\n FIELD_NOT_ALLOWED = 'FIELD_NOT_ALLOWED',\n ONE_OF_ALIGNMENT = 'ONE_OF_ALIGNMENT',\n EXACT_LENGTH = 'EXACT_LENGTH',\n EXACT_SIZE = 'EXACT_SIZE',\n REQUIRED_ONE_OF_FIELD = 'REQUIRED_ONE_OF_FIELD',\n}\n\n/** @enumType */\nexport type RuleTypeWithLiterals =\n | RuleType\n | 'VALIDATION'\n | 'OTHER'\n | 'MAX'\n | 'MIN'\n | 'MAX_LENGTH'\n | 'MIN_LENGTH'\n | 'MAX_SIZE'\n | 'MIN_SIZE'\n | 'FORMAT'\n | 'DECIMAL_LTE'\n | 'DECIMAL_GTE'\n | 'DECIMAL_LT'\n | 'DECIMAL_GT'\n | 'DECIMAL_MAX_SCALE'\n | 'INVALID_ENUM_VALUE'\n | 'REQUIRED_FIELD'\n | 'FIELD_NOT_ALLOWED'\n | 'ONE_OF_ALIGNMENT'\n | 'EXACT_LENGTH'\n | 'EXACT_SIZE'\n | 'REQUIRED_ONE_OF_FIELD';\n\nexport interface FieldViolation {\n field?: string;\n description?: string;\n violatedRule?: RuleTypeWithLiterals;\n /** applicable when violated_rule=OTHER */\n ruleName?: string | null;\n data?: Record<string, any> | null;\n}\n\nexport interface SystemError {\n /** Error code. */\n errorCode?: string | null;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type GetDeliverySolutionsApplicationErrors =\n | {\n code?: 'MISSING_CURRENCY_IN_THE_REQUEST_HEADERS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MISSING_DEFAULT_DELIVERY_PROFILE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'NO_DELIVERY_REGION_FOUND';\n description?: string;\n data?: Record<string, any>;\n };\n","import * as ambassadorWixGatewaysEcomV1DeliveryRatesGateway from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js';\nimport * as ambassadorWixGatewaysEcomV1DeliveryRatesGatewayTypes from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js';\nimport * as ambassadorWixGatewaysEcomV1DeliveryRatesGatewayUniversalTypes from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function getDeliverySolutions(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixGatewaysEcomV1DeliveryRatesGatewayUniversalTypes.GetDeliverySolutionsRequest,\n ambassadorWixGatewaysEcomV1DeliveryRatesGatewayTypes.GetDeliverySolutionsRequest,\n ambassadorWixGatewaysEcomV1DeliveryRatesGatewayUniversalTypes.GetDeliverySolutionsResponse,\n ambassadorWixGatewaysEcomV1DeliveryRatesGatewayTypes.GetDeliverySolutionsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixGatewaysEcomV1DeliveryRatesGateway.getDeliverySolutions(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/get-delivery-solutions',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n DeliveryRatesGateway as DeliveryRatesGatewayOriginal,\n MissingDefaultDeliveryProfileEvent as MissingDefaultDeliveryProfileEventOriginal,\n GetDeliverySolutionsRequest as GetDeliverySolutionsRequestOriginal,\n DeliverableItem as DeliverableItemOriginal,\n CatalogReference as CatalogReferenceOriginal,\n PhysicalProperties as PhysicalPropertiesOriginal,\n SubscriptionSettings as SubscriptionSettingsOriginal,\n SubscriptionFrequency as SubscriptionFrequencyOriginal,\n SubscriptionFrequencyWithLiterals as SubscriptionFrequencyWithLiteralsOriginal,\n Address as AddressOriginal,\n AddressStreetOneOf as AddressStreetOneOfOriginal,\n StreetAddress as StreetAddressOriginal,\n AddressLocation as AddressLocationOriginal,\n Subdivision as SubdivisionOriginal,\n SubdivisionType as SubdivisionTypeOriginal,\n SubdivisionTypeWithLiterals as SubdivisionTypeWithLiteralsOriginal,\n FullAddressContactDetails as FullAddressContactDetailsOriginal,\n VatId as VatIdOriginal,\n VatType as VatTypeOriginal,\n VatTypeWithLiterals as VatTypeWithLiteralsOriginal,\n WeightUnit as WeightUnitOriginal,\n WeightUnitWithLiterals as WeightUnitWithLiteralsOriginal,\n UserPreference as UserPreferenceOriginal,\n ExternalReference as ExternalReferenceOriginal,\n ExtendedFields as ExtendedFieldsOriginal,\n GetDeliverySolutionsResponse as GetDeliverySolutionsResponseOriginal,\n DeliverySolution as DeliverySolutionOriginal,\n DeliveryReference as DeliveryReferenceOriginal,\n DeliveryLogistics as DeliveryLogisticsOriginal,\n PickupDetails as PickupDetailsOriginal,\n PickupMethod as PickupMethodOriginal,\n PickupMethodWithLiterals as PickupMethodWithLiteralsOriginal,\n DeliveryTimeSlot as DeliveryTimeSlotOriginal,\n DeliveryCost as DeliveryCostOriginal,\n MultiCurrencyPrice as MultiCurrencyPriceOriginal,\n AdditionalCost as AdditionalCostOriginal,\n DeliveryAllocation as DeliveryAllocationOriginal,\n Carrier as CarrierOriginal,\n Region as RegionOriginal,\n ApplicableLineItems as ApplicableLineItemsOriginal,\n DeliveryCarrierError as DeliveryCarrierErrorOriginal,\n Details as DetailsOriginal,\n DetailsKindOneOf as DetailsKindOneOfOriginal,\n ApplicationError as ApplicationErrorOriginal,\n ValidationError as ValidationErrorOriginal,\n RuleType as RuleTypeOriginal,\n RuleTypeWithLiterals as RuleTypeWithLiteralsOriginal,\n FieldViolation as FieldViolationOriginal,\n SystemError as SystemErrorOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n AccountInfo as AccountInfoOriginal,\n GetDeliverySolutionsApplicationErrors as GetDeliverySolutionsApplicationErrorsOriginal,\n} from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAAAA;AAAA;AAAA;;;ACAA,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,uBAAqD;AACrD,6BAA+B;AAC/B,0BAA2B;AAI3B,SAAS,gDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;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ubdivisionType","VatType","WeightUnit","PickupMethod","RuleType","WebhookIdentityType","getDeliverySolutions"]}
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
2
  import { DeliverableItem, GetDeliverySolutionsOptions, GetDeliverySolutionsResponse, GetDeliverySolutionsApplicationErrors } from './index.typings.mjs';
3
- export { AccountDetails, AdditionalCharge, AdditionalCost, Address, AddressLocation, AddressStreetOneOf, ApplicableLineItems, ApplicationError, Carrier, CatalogReference, ChargeType, ChargeTypeWithLiterals, DeliveryAllocation, DeliveryCarrierError, DeliveryCost, DeliveryLogistics, DeliveryRatesGateway, DeliveryReference, DeliverySolution, DeliveryTimeSlot, Details, DetailsKindOneOf, ExtendedFields, ExternalReference, FieldViolation, FullAddressContactDetails, GetDeliverySolutionsRequest, IdentificationData, IdentificationDataIdOneOf, MessageEnvelope, MissingDefaultDeliveryProfileEvent, MultiCurrencyPrice, PhysicalProperties, PickupDetails, PickupMethod, PickupMethodWithLiterals, Region, RuleType, RuleTypeWithLiterals, StreetAddress, Subdivision, SubdivisionType, SubdivisionTypeWithLiterals, SubscriptionFrequency, SubscriptionFrequencyWithLiterals, SubscriptionSettings, SystemError, UserPreference, ValidationError, VatId, VatType, VatTypeWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WeightUnit, WeightUnitWithLiterals } from './index.typings.mjs';
3
+ export { AccountInfo, AdditionalCost, Address, AddressLocation, AddressStreetOneOf, ApplicableLineItems, ApplicationError, Carrier, CatalogReference, DeliveryAllocation, DeliveryCarrierError, DeliveryCost, DeliveryLogistics, DeliveryRatesGateway, DeliveryReference, DeliverySolution, DeliveryTimeSlot, Details, DetailsKindOneOf, ExtendedFields, ExternalReference, FieldViolation, FullAddressContactDetails, GetDeliverySolutionsRequest, IdentificationData, IdentificationDataIdOneOf, MessageEnvelope, MissingDefaultDeliveryProfileEvent, MultiCurrencyPrice, PhysicalProperties, PickupDetails, PickupMethod, PickupMethodWithLiterals, Region, RuleType, RuleTypeWithLiterals, StreetAddress, Subdivision, SubdivisionType, SubdivisionTypeWithLiterals, SubscriptionFrequency, SubscriptionFrequencyWithLiterals, SubscriptionSettings, SystemError, UserPreference, ValidationError, VatId, VatType, VatTypeWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WeightUnit, WeightUnitWithLiterals } from './index.typings.mjs';
4
4
 
5
5
  declare function getDeliverySolutions$1(httpClient: HttpClient): GetDeliverySolutionsSignature;
6
6
  interface GetDeliverySolutionsSignature {
@@ -165,10 +165,6 @@ var PickupMethod = /* @__PURE__ */ ((PickupMethod2) => {
165
165
  PickupMethod2["PICKUP_POINT"] = "PICKUP_POINT";
166
166
  return PickupMethod2;
167
167
  })(PickupMethod || {});
168
- var ChargeType = /* @__PURE__ */ ((ChargeType2) => {
169
- ChargeType2["HANDLING_FEE"] = "HANDLING_FEE";
170
- return ChargeType2;
171
- })(ChargeType || {});
172
168
  var RuleType = /* @__PURE__ */ ((RuleType2) => {
173
169
  RuleType2["VALIDATION"] = "VALIDATION";
174
170
  RuleType2["OTHER"] = "OTHER";
@@ -280,7 +276,6 @@ function getDeliverySolutions3(httpClient) {
280
276
  import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
281
277
  var getDeliverySolutions4 = /* @__PURE__ */ createRESTModule(getDeliverySolutions3);
282
278
  export {
283
- ChargeType,
284
279
  PickupMethod,
285
280
  RuleType,
286
281
  SubdivisionType,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.ts","../../../src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.ts","../../../src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.ts","../../../src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixGatewaysEcomV1DeliveryRatesGateway from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js';\nimport { transformSDKAddressToRESTAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface DeliveryRatesGateway {\n /**\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n}\n\nexport interface MissingDefaultDeliveryProfileEvent {\n /**\n * The meta site ID where the missing default delivery profile error occurred\n * @format GUID\n */\n metaSiteId?: string;\n /** Timestamp when the error occurred */\n occurredAt?: Date | null;\n}\n\nexport interface GetDeliverySolutionsRequest {\n /**\n * list of items to delivery that each of them points to delivery profile and delivery rule.\n * @minSize 1\n * @maxSize 300\n */\n lineItems: DeliverableItem[];\n /** Destination the items should deliver to */\n destination: Address;\n /**\n * Origin the items should deliver from\n * @deprecated Origin the items should deliver from\n * @targetRemovalDate 2025-04-01\n */\n origin?: Address;\n /**\n * Currency - Defaults to site's currency\n * @format CURRENCY\n */\n currency: string | null;\n /** Contact details */\n contactDetails?: FullAddressContactDetails;\n /** Measure unit - defaults to site's weight unit */\n weightUnit?: WeightUnitWithLiterals;\n /**\n * list of user preferences which are delivery options codes combined with delivery carrier app id\n * @maxSize 5\n */\n userPreferences?: UserPreference[];\n /**\n * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.\n * @format GUID\n */\n purchaseFlowId?: string | null;\n /**\n * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.\n * For example, a Wix Pay Link ID.\n * @maxSize 20\n */\n externalReferences?: ExternalReference[];\n /** [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */\n extendedFields?: ExtendedFields;\n}\n\nexport interface DeliverableItem {\n /**\n * The ID of the line item.\n * @minLength 1\n * @maxLength 100\n */\n _id?: string;\n /**\n * Item name.\n * @maxLength 400\n */\n name?: string;\n /**\n * The number of items ordered.\n * @min 1\n * @max 999999999\n */\n quantity?: number;\n /** Reference to the item's origin catalog. */\n catalogReference?: CatalogReference;\n /** Physical properties of the item. */\n physicalProperties?: PhysicalProperties;\n /**\n * Price of a single item after discounts.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, maxScale:36 }\n * @deprecated Price of a single item after discounts.\n * @targetRemovalDate 2026-04-04\n */\n price?: string;\n /**\n * Total line item price before discounts.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, maxScale:36 }\n */\n totalPriceBeforeDiscount?: string | null;\n /**\n * Price of a single item before discounts.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, maxScale:36 }\n */\n priceBeforeDiscount?: string | null;\n /**\n * Total line item price after discounts. This is equal to `price` multiplied by `quantity`.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, maxScale:36 }\n */\n totalPrice?: string | null;\n /**\n * For delivery rates by delivery profile id\n * @format GUID\n */\n deliveryProfileId?: string | null;\n /** whether tax is included in line item price */\n taxIncludedInPrice?: boolean | null;\n /** Subscription settings for the item */\n subscriptionSettings?: SubscriptionSettings;\n}\n\n/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */\nexport interface CatalogReference {\n /**\n * ID of the item within the catalog it belongs to.\n * @minLength 1\n * @maxLength 36\n */\n catalogItemId?: string;\n /**\n * ID of the app providing the catalog.\n *\n * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n *\n * For items from Wix catalogs, the following values always apply:\n * + Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n * + Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n * + Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n * @minLength 1\n */\n appId?: string;\n /**\n * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.\n *\n * For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration).\n */\n options?: Record<string, any> | null;\n}\n\nexport interface PhysicalProperties {\n /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */\n weight?: number | null;\n /**\n * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).\n * @maxLength 40\n */\n sku?: string | null;\n /** Whether this line item is shippable. */\n shippable?: boolean;\n}\n\nexport interface SubscriptionSettings {\n /** Frequency of recurring payment. Every day/week/month/year. */\n frequency?: SubscriptionFrequencyWithLiterals;\n}\n\n/** Frequency unit of recurring payment */\nexport enum SubscriptionFrequency {\n UNDEFINED = 'UNDEFINED',\n DAY = 'DAY',\n WEEK = 'WEEK',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type SubscriptionFrequencyWithLiterals =\n | SubscriptionFrequency\n | 'UNDEFINED'\n | 'DAY'\n | 'WEEK'\n | 'MONTH'\n | 'YEAR';\n\n/** Physical address */\nexport interface Address extends AddressStreetOneOf {\n /** Street name and number. */\n streetAddress?: StreetAddress;\n /** Main address line, usually street and number as free text. */\n addressLine1?: string | null;\n /**\n * Country code.\n * @format COUNTRY\n */\n country?: string | null;\n /** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */\n subdivision?: string | null;\n /** City name. */\n city?: string | null;\n /** Zip/postal code. */\n postalCode?: string | null;\n /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */\n addressLine2?: string | null;\n}\n\n/** @oneof */\nexport interface AddressStreetOneOf {\n /** Street name and number. */\n streetAddress?: StreetAddress;\n /** Main address line, usually street and number as free text. */\n addressLine?: string | null;\n}\n\nexport interface StreetAddress {\n /** Street number. */\n number?: string;\n /** Street name. */\n name?: string;\n}\n\nexport interface AddressLocation {\n /** Address latitude. */\n latitude?: number | null;\n /** Address longitude. */\n longitude?: number | null;\n}\n\nexport interface Subdivision {\n /** Short subdivision code. */\n code?: string;\n /** Subdivision full name. */\n name?: string;\n}\n\nexport enum SubdivisionType {\n UNKNOWN_SUBDIVISION_TYPE = 'UNKNOWN_SUBDIVISION_TYPE',\n /** State */\n ADMINISTRATIVE_AREA_LEVEL_1 = 'ADMINISTRATIVE_AREA_LEVEL_1',\n /** County */\n ADMINISTRATIVE_AREA_LEVEL_2 = 'ADMINISTRATIVE_AREA_LEVEL_2',\n /** City/town */\n ADMINISTRATIVE_AREA_LEVEL_3 = 'ADMINISTRATIVE_AREA_LEVEL_3',\n /** Neighborhood/quarter */\n ADMINISTRATIVE_AREA_LEVEL_4 = 'ADMINISTRATIVE_AREA_LEVEL_4',\n /** Street/block */\n ADMINISTRATIVE_AREA_LEVEL_5 = 'ADMINISTRATIVE_AREA_LEVEL_5',\n /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */\n COUNTRY = 'COUNTRY',\n}\n\n/** @enumType */\nexport type SubdivisionTypeWithLiterals =\n | SubdivisionType\n | 'UNKNOWN_SUBDIVISION_TYPE'\n | 'ADMINISTRATIVE_AREA_LEVEL_1'\n | 'ADMINISTRATIVE_AREA_LEVEL_2'\n | 'ADMINISTRATIVE_AREA_LEVEL_3'\n | 'ADMINISTRATIVE_AREA_LEVEL_4'\n | 'ADMINISTRATIVE_AREA_LEVEL_5'\n | 'COUNTRY';\n\n/** Full contact details for an address */\nexport interface FullAddressContactDetails {\n /** Contact's first name. */\n firstName?: string | null;\n /** Contact's last name. */\n lastName?: string | null;\n /**\n * Contact's phone number.\n * @format PHONE\n */\n phone?: string | null;\n /** Contact's company name. */\n company?: string | null;\n /**\n * Email associated with the address.\n * @format EMAIL\n */\n email?: string | null;\n /** Tax info. Currently usable only in Brazil. */\n vatId?: VatId;\n}\n\nexport interface VatId {\n /** Customer's tax ID. */\n _id?: string;\n /**\n * Tax type.\n *\n * Supported values:\n * + `CPF`: for individual tax payers\n * + `CNPJ`: for corporations\n */\n type?: VatTypeWithLiterals;\n}\n\n/** tax info types */\nexport enum VatType {\n UNSPECIFIED = 'UNSPECIFIED',\n /** CPF - for individual tax payers. */\n CPF = 'CPF',\n /** CNPJ - for corporations */\n CNPJ = 'CNPJ',\n}\n\n/** @enumType */\nexport type VatTypeWithLiterals = VatType | 'UNSPECIFIED' | 'CPF' | 'CNPJ';\n\nexport enum WeightUnit {\n /** Weight unit can't be classified due to an error. */\n UNSPECIFIED_WEIGHT_UNIT = 'UNSPECIFIED_WEIGHT_UNIT',\n /** Kilograms. */\n KG = 'KG',\n /** Pounds. */\n LB = 'LB',\n}\n\n/** @enumType */\nexport type WeightUnitWithLiterals =\n | WeightUnit\n | 'UNSPECIFIED_WEIGHT_UNIT'\n | 'KG'\n | 'LB';\n\nexport interface UserPreference {\n /**\n * The delivery carrier app id\n * @format GUID\n */\n appId?: string | null;\n /**\n * The delivery option code\n * @maxLength 250\n */\n code?: string;\n}\n\nexport interface ExternalReference {\n /**\n * ID of the app associated with the purchase flow.\n * For example, the Wix Pay Links app ID.\n * @format GUID\n * @immutable\n */\n appId?: string;\n /**\n * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.\n * For example, a Wix Pay Link ID.\n * @minLength 1\n * @maxLength 100\n * @immutable\n */\n resourceId?: string | null;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\n/**\n * Each delivery option has a list of items that can be delivered by it - the chosen one\n * on Errors throw a business error from TC to catch and trigger destination completion\n */\nexport interface GetDeliverySolutionsResponse {\n /**\n * Delivery Options with their associated items\n * @maxSize 300\n */\n deliverySolutions?: DeliverySolution[];\n /**\n * If a delivery carrier could not calculate rates, the error will be detailed here\n * @maxSize 50\n */\n errors?: DeliveryCarrierError[];\n}\n\nexport interface DeliverySolution {\n /**\n * Unique code that acts as an ID for a shipping rate. For example, `\"usps_std_overnight\"`.\n * DEPRECATED: Use delivery_reference.code instead\n * @maxLength 250\n * @deprecated Unique code that acts as an ID for a shipping rate. For example, `\"usps_std_overnight\"`.\n * DEPRECATED: Use delivery_reference.code instead\n * @replacedBy delivery_reference\n * @targetRemovalDate 2026-01-01\n */\n code?: string;\n /** Represents a reference to a specific delivery solution. Combines both the carrier's code and its application identifier. */\n deliveryReference?: DeliveryReference;\n /**\n * Delivery rate title. For example, `\"USPS Standard Overnight Delivery\"`, `\"Standard\"`, or `\"First-Class Package International\"`.\n * @maxLength 250\n */\n title?: string;\n /** Delivery logistics. */\n logistics?: DeliveryLogistics;\n /** Delivery cost. */\n cost?: DeliveryCost;\n /**\n * Delivery solution allocations to different delivery carriers and delivery regions\n * @minSize 1\n * @maxSize 300\n */\n deliveryAllocations?: DeliveryAllocation[];\n /** If the delivery solution is a partial and doesn't apply to all items. */\n partial?: boolean | null;\n}\n\nexport interface DeliveryReference {\n /**\n * The delivery solution code provided by the carrier\n * @maxLength 250\n */\n code?: string | null;\n /**\n * The carrier app id\n * @format GUID\n */\n appId?: string | null;\n}\n\nexport interface DeliveryLogistics {\n /**\n * When the item is expected to be delivered in free text. For example, `\"3-5 business days\"`.\n * @maxLength 1000\n */\n deliveryTime?: string | null;\n /**\n * Instructions for delivery. For example, for pickup: `\"Ensure to come during business hours, and please don't park in the disabled spot\"`.\n * @maxLength 1000\n */\n instructions?: string | null;\n /** Pickup details. Should be returned only if order is for pickup. */\n pickupDetails?: PickupDetails;\n /** Date and Time of the delivery option */\n deliveryTimeSlot?: DeliveryTimeSlot;\n}\n\nexport interface PickupDetails {\n /** Pickup address. */\n address?: Address;\n /**\n * Pickup method.\n *\n * Supported values:\n * + `\"STORE_PICKUP\"`: When pickup is from the merchant's brick and mortar store.\n * + `\"PICKUP_POINT\"`: When item is shipped to a specified pickup point.\n */\n pickupMethod?: PickupMethodWithLiterals;\n}\n\nexport enum PickupMethod {\n UNKNOWN_METHOD = 'UNKNOWN_METHOD',\n STORE_PICKUP = 'STORE_PICKUP',\n PICKUP_POINT = 'PICKUP_POINT',\n}\n\n/** @enumType */\nexport type PickupMethodWithLiterals =\n | PickupMethod\n | 'UNKNOWN_METHOD'\n | 'STORE_PICKUP'\n | 'PICKUP_POINT';\n\nexport interface DeliveryTimeSlot {\n /** starting time of the delivery time slot */\n from?: Date | null;\n /** ending time of the delivery time slot */\n to?: Date | null;\n /**\n * Time zone in IANA format (e.g \"America/New_York\")\n * If not provided, the cart/checkout will format the time slot based on the site's business location\n * @maxLength 64\n */\n timeZone?: string | null;\n}\n\nexport interface DeliveryCost {\n /**\n * The shipping rate's price. Must align with the [currency's decimal separator](https://en.wikipedia.org/wiki/ISO_4217#Active_codes).\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, lte:1000000000000000 }\n * @deprecated\n * @targetRemovalDate 2025-12-01\n */\n price?: string;\n /**\n * Currency of the shipping rate price as a 3-letter [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217). Must align with the `currency` passed to the function under the `metadata` field.\n * @format CURRENCY\n * @deprecated Currency of the shipping rate price as a 3-letter [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217). Must align with the `currency` passed to the function under the `metadata` field.\n * @targetRemovalDate 2025-12-01\n */\n currency?: string;\n /**\n * Additional costs. For example, a handling fee for packaging fragile items.\n * @maxSize 100\n * @deprecated Additional costs. For example, a handling fee for packaging fragile items.\n * @targetRemovalDate 2025-12-01\n */\n additionalCharges?: AdditionalCharge[];\n /** The shipping rate's price. Must align with the [currency's decimal separator] */\n deliveryPrice?: MultiCurrencyPrice;\n /**\n * Additional costs. For example, a handling fee for packaging fragile items.\n * @maxSize 100\n */\n additionalCosts?: AdditionalCost[];\n}\n\nexport interface AdditionalCharge {\n /** Additional charge type. */\n type?: ChargeTypeWithLiterals;\n /**\n * Description of the additional charge. For example, `\"Handling fee of $5 applied for gift wrapping\"`.\n * @maxLength 250\n */\n description?: string | null;\n /**\n * Cost of additional charge. For example, `12.5`.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n price?: string;\n}\n\nexport enum ChargeType {\n HANDLING_FEE = 'HANDLING_FEE',\n}\n\n/** @enumType */\nexport type ChargeTypeWithLiterals = ChargeType | 'HANDLING_FEE';\n\nexport interface MultiCurrencyPrice {\n /**\n * Amount.\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n amount?: string;\n /**\n * Converted amount.\n * @readonly\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n convertedAmount?: string;\n /**\n * Amount formatted with currency symbol.\n * @readonly\n */\n formattedAmount?: string;\n /**\n * Converted amount formatted with currency symbol.\n * @readonly\n */\n formattedConvertedAmount?: string;\n}\n\nexport interface AdditionalCost {\n /**\n * Description of the additional charge. For example, `\"Handling fee of $5 applied for gift wrapping\"`.\n * @maxLength 250\n */\n description?: string | null;\n /** Delivery price of additional charge. For example, `12.5`. */\n deliveryPrice?: MultiCurrencyPrice;\n}\n\nexport interface DeliveryAllocation {\n /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */\n deliveryCarrier?: Carrier;\n /** The delivery region that are relevant for this delivery solution. */\n deliveryRegion?: Region;\n /** Populated if the delivery solution is a partially supplied by this carrier. */\n applicableLineItems?: ApplicableLineItems;\n}\n\nexport interface Carrier {\n /**\n * The carrier app id\n * @format GUID\n */\n appId?: string | null;\n /**\n * Unique code that acts as an ID for a shipping rate. For example, `\"usps_std_overnight\"`.\n * @maxLength 250\n */\n code?: string;\n}\n\nexport interface Region {\n /**\n * The delivery region id.\n * @format GUID\n */\n _id?: string | null;\n /**\n * The delivery region name.\n * @maxLength 100\n */\n name?: string | null;\n}\n\nexport interface ApplicableLineItems {\n /**\n * Line items that the delivery solution is for.\n * @maxSize 300\n * @minLength 1\n * @maxLength 100\n */\n lineItemIds?: string[];\n}\n\nexport interface DeliveryCarrierError {\n /**\n * The carrier app id\n * @format GUID\n */\n appId?: string | null;\n /** The error details */\n errorDetails?: Details;\n}\n\nexport interface Details extends DetailsKindOneOf {\n applicationError?: ApplicationError;\n validationError?: ValidationError;\n systemError?: SystemError;\n /**\n * deprecated in API's - to enable migration from rendering arbitrary tracing to rest response\n * @deprecated\n */\n tracing?: Record<string, string>;\n}\n\n/** @oneof */\nexport interface DetailsKindOneOf {\n applicationError?: ApplicationError;\n validationError?: ValidationError;\n systemError?: SystemError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\n/**\n * example result:\n * {\n * \"fieldViolations\": [\n * {\n * \"field\": \"fieldA\",\n * \"description\": \"invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]\",\n * \"violatedRule\": \"OTHER\",\n * \"ruleName\": \"INVALID_NOTE\",\n * \"data\": {\n * \"value\": \"FI\"\n * }\n * },\n * {\n * \"field\": \"fieldB\",\n * \"description\": \"field value out of range. supported range: [0-20]\",\n * \"violatedRule\": \"MAX\",\n * \"data\": {\n * \"threshold\": 20\n * }\n * },\n * {\n * \"field\": \"fieldC\",\n * \"description\": \"invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]\",\n * \"violatedRule\": \"FORMAT\",\n * \"data\": {\n * \"type\": \"PHONE\"\n * }\n * }\n * ]\n * }\n */\nexport interface ValidationError {\n fieldViolations?: FieldViolation[];\n}\n\nexport enum RuleType {\n VALIDATION = 'VALIDATION',\n OTHER = 'OTHER',\n MAX = 'MAX',\n MIN = 'MIN',\n MAX_LENGTH = 'MAX_LENGTH',\n MIN_LENGTH = 'MIN_LENGTH',\n MAX_SIZE = 'MAX_SIZE',\n MIN_SIZE = 'MIN_SIZE',\n FORMAT = 'FORMAT',\n DECIMAL_LTE = 'DECIMAL_LTE',\n DECIMAL_GTE = 'DECIMAL_GTE',\n DECIMAL_LT = 'DECIMAL_LT',\n DECIMAL_GT = 'DECIMAL_GT',\n DECIMAL_MAX_SCALE = 'DECIMAL_MAX_SCALE',\n INVALID_ENUM_VALUE = 'INVALID_ENUM_VALUE',\n REQUIRED_FIELD = 'REQUIRED_FIELD',\n FIELD_NOT_ALLOWED = 'FIELD_NOT_ALLOWED',\n ONE_OF_ALIGNMENT = 'ONE_OF_ALIGNMENT',\n EXACT_LENGTH = 'EXACT_LENGTH',\n EXACT_SIZE = 'EXACT_SIZE',\n REQUIRED_ONE_OF_FIELD = 'REQUIRED_ONE_OF_FIELD',\n}\n\n/** @enumType */\nexport type RuleTypeWithLiterals =\n | RuleType\n | 'VALIDATION'\n | 'OTHER'\n | 'MAX'\n | 'MIN'\n | 'MAX_LENGTH'\n | 'MIN_LENGTH'\n | 'MAX_SIZE'\n | 'MIN_SIZE'\n | 'FORMAT'\n | 'DECIMAL_LTE'\n | 'DECIMAL_GTE'\n | 'DECIMAL_LT'\n | 'DECIMAL_GT'\n | 'DECIMAL_MAX_SCALE'\n | 'INVALID_ENUM_VALUE'\n | 'REQUIRED_FIELD'\n | 'FIELD_NOT_ALLOWED'\n | 'ONE_OF_ALIGNMENT'\n | 'EXACT_LENGTH'\n | 'EXACT_SIZE'\n | 'REQUIRED_ONE_OF_FIELD';\n\nexport interface FieldViolation {\n field?: string;\n description?: string;\n violatedRule?: RuleTypeWithLiterals;\n /** applicable when violated_rule=OTHER */\n ruleName?: string | null;\n data?: Record<string, any> | null;\n}\n\nexport interface SystemError {\n /** Error code. */\n errorCode?: string | null;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountDetails {\n /**\n * ID of the account.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the site, if applicable.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type GetDeliverySolutionsApplicationErrors =\n | {\n code?: 'MISSING_CURRENCY_IN_THE_REQUEST_HEADERS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MISSING_DEFAULT_DELIVERY_PROFILE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'NO_DELIVERY_REGION_FOUND';\n description?: string;\n data?: Record<string, any>;\n };\n\n/**\n * Get Delivery Solutions for the given line items from all relevant delivery carriers\n * @param lineItems - list of items to delivery that each of them points to delivery profile and delivery rule.\n * @public\n * @documentationMaturity preview\n * @requiredField lineItems\n * @requiredField options.currency\n * @requiredField options.destination\n * @requiredField options.destination.country\n * @permissionId ECOM.DELIVERY_SOLUTION_READ\n * @applicableIdentity APP\n * @returns Each delivery option has a list of items that can be delivered by it - the chosen one\n * on Errors throw a business error from TC to catch and trigger destination completion\n * @fqn wix.ecom.deliveryprofile.v1.DeliveryRates.GetDeliverySolutions\n */\nexport async function getDeliverySolutions(\n lineItems: DeliverableItem[],\n options?: NonNullablePaths<\n GetDeliverySolutionsOptions,\n `currency` | `destination` | `destination.country`,\n 3\n >\n): Promise<\n NonNullablePaths<\n GetDeliverySolutionsResponse,\n | `deliverySolutions`\n | `deliverySolutions.${number}.code`\n | `deliverySolutions.${number}.title`\n | `deliverySolutions.${number}.logistics.pickupDetails.pickupMethod`\n | `deliverySolutions.${number}.cost.price`\n | `deliverySolutions.${number}.cost.currency`\n | `deliverySolutions.${number}.cost.deliveryPrice.amount`\n | `deliverySolutions.${number}.cost.deliveryPrice.convertedAmount`\n | `deliverySolutions.${number}.cost.deliveryPrice.formattedAmount`\n | `deliverySolutions.${number}.cost.deliveryPrice.formattedConvertedAmount`\n | `errors`\n | `errors.${number}.errorDetails.applicationError.code`\n | `errors.${number}.errorDetails.applicationError.description`,\n 6\n > & {\n __applicationErrorsType?: GetDeliverySolutionsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n lineItems: lineItems,\n destination: options?.destination,\n origin: options?.origin,\n currency: options?.currency,\n contactDetails: options?.contactDetails,\n weightUnit: options?.weightUnit,\n userPreferences: options?.userPreferences,\n purchaseFlowId: options?.purchaseFlowId,\n externalReferences: options?.externalReferences,\n extendedFields: options?.extendedFields,\n }),\n [\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [{ path: 'destination' }, { path: 'origin' }],\n },\n ]\n );\n\n const reqOpts =\n ambassadorWixGatewaysEcomV1DeliveryRatesGateway.getDeliverySolutions(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'deliverySolutions.logistics.pickupDetails.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n lineItems: '$[0]',\n destination: '$[1].destination',\n origin: '$[1].origin',\n currency: '$[1].currency',\n contactDetails: '$[1].contactDetails',\n weightUnit: '$[1].weightUnit',\n userPreferences: '$[1].userPreferences',\n purchaseFlowId: '$[1].purchaseFlowId',\n externalReferences: '$[1].externalReferences',\n extendedFields: '$[1].extendedFields',\n },\n singleArgumentUnchanged: false,\n },\n ['lineItems', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetDeliverySolutionsOptions {\n /** Destination the items should deliver to */\n destination: Address;\n /**\n * Origin the items should deliver from\n * @deprecated Origin the items should deliver from\n * @targetRemovalDate 2025-04-01\n */\n origin?: Address;\n /**\n * Currency - Defaults to site's currency\n * @format CURRENCY\n */\n currency: string | null;\n /** Contact details */\n contactDetails?: FullAddressContactDetails;\n /** Measure unit - defaults to site's weight unit */\n weightUnit?: WeightUnitWithLiterals;\n /**\n * list of user preferences which are delivery options codes combined with delivery carrier app id\n * @maxSize 5\n */\n userPreferences?: UserPreference[];\n /**\n * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.\n * @format GUID\n */\n purchaseFlowId?: string | null;\n /**\n * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.\n * For example, a Wix Pay Link ID.\n * @maxSize 20\n */\n externalReferences?: ExternalReference[];\n /** [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */\n extendedFields?: ExtendedFields;\n}\n","import { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixEcomDeliveryprofileV1DeliveryRatesUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/delivery-rates',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_delivery-solutions';\n\n/** Get Delivery Solutions for the given line items from all relevant delivery carriers */\nexport function getDeliverySolutions(\n payload: object\n): RequestOptionsFactory<any> {\n function __getDeliverySolutions({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'lineItems.physicalProperties.weight' },\n { path: 'destination.geocode.latitude' },\n { path: 'destination.geocode.longitude' },\n { path: 'origin.geocode.latitude' },\n { path: 'origin.geocode.longitude' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.gateways.ecom.v1.delivery_rates_gateway',\n method: 'POST' as any,\n methodFqn:\n 'wix.ecom.deliveryprofile.v1.DeliveryRates.GetDeliverySolutions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomDeliveryprofileV1DeliveryRatesUrl({\n protoPath: '/v1/get-delivery-solutions',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'deliverySolutions.logistics.pickupDetails.address.geocode.latitude',\n },\n {\n path: 'deliverySolutions.logistics.pickupDetails.address.geocode.longitude',\n },\n ],\n },\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'deliverySolutions.logistics.deliveryTimeSlot.from' },\n { path: 'deliverySolutions.logistics.deliveryTimeSlot.to' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getDeliverySolutions;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n DeliverableItem,\n GetDeliverySolutionsApplicationErrors,\n GetDeliverySolutionsOptions,\n GetDeliverySolutionsResponse,\n getDeliverySolutions as universalGetDeliverySolutions,\n} from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/ecom' };\n\nexport function getDeliverySolutions(\n httpClient: HttpClient\n): GetDeliverySolutionsSignature {\n return (\n lineItems: DeliverableItem[],\n options?: NonNullablePaths<\n GetDeliverySolutionsOptions,\n `currency` | `destination` | `destination.country`,\n 3\n >\n ) =>\n universalGetDeliverySolutions(\n lineItems,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetDeliverySolutionsSignature {\n /**\n * Get Delivery Solutions for the given line items from all relevant delivery carriers\n * @param - list of items to delivery that each of them points to delivery profile and delivery rule.\n * @returns Each delivery option has a list of items that can be delivered by it - the chosen one\n * on Errors throw a business error from TC to catch and trigger destination completion\n */\n (\n lineItems: DeliverableItem[],\n options?: NonNullablePaths<\n GetDeliverySolutionsOptions,\n `currency` | `destination` | `destination.country`,\n 3\n >\n ): Promise<\n NonNullablePaths<\n GetDeliverySolutionsResponse,\n | `deliverySolutions`\n | `deliverySolutions.${number}.code`\n | `deliverySolutions.${number}.title`\n | `deliverySolutions.${number}.logistics.pickupDetails.pickupMethod`\n | `deliverySolutions.${number}.cost.price`\n | `deliverySolutions.${number}.cost.currency`\n | `deliverySolutions.${number}.cost.deliveryPrice.amount`\n | `deliverySolutions.${number}.cost.deliveryPrice.convertedAmount`\n | `deliverySolutions.${number}.cost.deliveryPrice.formattedAmount`\n | `deliverySolutions.${number}.cost.deliveryPrice.formattedConvertedAmount`\n | `errors`\n | `errors.${number}.errorDetails.applicationError.code`\n | `errors.${number}.errorDetails.applicationError.description`,\n 6\n > & {\n __applicationErrorsType?: GetDeliverySolutionsApplicationErrors;\n }\n >;\n}\n\nexport {\n AccountDetails,\n AdditionalCharge,\n AdditionalCost,\n Address,\n AddressLocation,\n AddressStreetOneOf,\n ApplicableLineItems,\n ApplicationError,\n Carrier,\n CatalogReference,\n ChargeType,\n DeliverableItem,\n DeliveryAllocation,\n DeliveryCarrierError,\n DeliveryCost,\n DeliveryLogistics,\n DeliveryRatesGateway,\n DeliveryReference,\n DeliverySolution,\n DeliveryTimeSlot,\n Details,\n DetailsKindOneOf,\n ExtendedFields,\n ExternalReference,\n FieldViolation,\n FullAddressContactDetails,\n GetDeliverySolutionsOptions,\n GetDeliverySolutionsRequest,\n GetDeliverySolutionsResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n MessageEnvelope,\n MissingDefaultDeliveryProfileEvent,\n MultiCurrencyPrice,\n PhysicalProperties,\n PickupDetails,\n PickupMethod,\n Region,\n RuleType,\n StreetAddress,\n Subdivision,\n SubdivisionType,\n SubscriptionFrequency,\n SubscriptionSettings,\n SystemError,\n UserPreference,\n ValidationError,\n VatId,\n VatType,\n WebhookIdentityType,\n WeightUnit,\n} from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js';\n","import { getDeliverySolutions as publicGetDeliverySolutions } from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getDeliverySolutions: MaybeContext<\n BuildRESTFunction<typeof publicGetDeliverySolutions> &\n typeof publicGetDeliverySolutions\n> = /*#__PURE__*/ createRESTModule(publicGetDeliverySolutions);\n\nexport {\n SubscriptionFrequency,\n SubdivisionType,\n VatType,\n WeightUnit,\n PickupMethod,\n ChargeType,\n RuleType,\n WebhookIdentityType,\n} from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js';\nexport {\n DeliveryRatesGateway,\n MissingDefaultDeliveryProfileEvent,\n GetDeliverySolutionsRequest,\n DeliverableItem,\n CatalogReference,\n PhysicalProperties,\n SubscriptionSettings,\n Address,\n AddressStreetOneOf,\n StreetAddress,\n AddressLocation,\n Subdivision,\n FullAddressContactDetails,\n VatId,\n UserPreference,\n ExternalReference,\n ExtendedFields,\n GetDeliverySolutionsResponse,\n DeliverySolution,\n DeliveryReference,\n DeliveryLogistics,\n PickupDetails,\n DeliveryTimeSlot,\n DeliveryCost,\n AdditionalCharge,\n MultiCurrencyPrice,\n AdditionalCost,\n DeliveryAllocation,\n Carrier,\n Region,\n ApplicableLineItems,\n DeliveryCarrierError,\n Details,\n DetailsKindOneOf,\n ApplicationError,\n ValidationError,\n FieldViolation,\n SystemError,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountDetails,\n GetDeliverySolutionsOptions,\n} from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js';\nexport {\n SubscriptionFrequencyWithLiterals,\n SubdivisionTypeWithLiterals,\n VatTypeWithLiterals,\n WeightUnitWithLiterals,\n PickupMethodWithLiterals,\n ChargeTypeWithLiterals,\n RuleTypeWithLiterals,\n WebhookIdentityTypeWithLiterals,\n GetDeliverySolutionsApplicationErrors,\n} from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,gDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QAC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AM;AAE/B,WAAO;AAAA,MACLA,gBAAe,OAAO,MAAM;AAAA,QAC1B;AAAA,UACE,aAAa;AAAA,UACb,OAAO;AAAA,YACL,EAAE,MAAM,oDAAoD;AAAA,UAC9D;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,WAAW;AAAA,UACX,aAAa;AAAA,UACb,QAAQ;AAAA,UACR,UAAU;AAAA,UACV,gBAAgB;AAAA,UAChB,YAAY;AAAA,UACZ,iBAAiB;AAAA,UACjB,gBAAgB;AAAA,UAChB,oBAAoB;AAAA,UACpB,gBAAgB;AAAA,QAClB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,aAAa,SAAS;AAAA,IACzB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE79BO,SAASU,sBACd,YAC+B;AAC/B,SAAO,CACL,WACA,YAMAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC3BA,SAAS,wBAAwB;AAG1B,IAAMC,wBAGK,iCAAiBA,qBAA0B;","names":["payload","transformPaths","SubscriptionFrequency","SubdivisionType","VatType","WeightUnit","PickupMethod","ChargeType","RuleType","WebhookIdentityType","getDeliverySolutions","getDeliverySolutions","getDeliverySolutions"]}
1
+ {"version":3,"sources":["../../../src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.ts","../../../src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.ts","../../../src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.ts","../../../src/gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixGatewaysEcomV1DeliveryRatesGateway from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.http.js';\nimport { transformSDKAddressToRESTAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface DeliveryRatesGateway {\n /**\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n}\n\nexport interface MissingDefaultDeliveryProfileEvent {\n /**\n * The meta site ID where the missing default delivery profile error occurred\n * @format GUID\n */\n metaSiteId?: string;\n /** Timestamp when the error occurred */\n occurredAt?: Date | null;\n}\n\nexport interface GetDeliverySolutionsRequest {\n /**\n * list of items to delivery that each of them points to delivery profile and delivery rule.\n * @minSize 1\n * @maxSize 300\n */\n lineItems: DeliverableItem[];\n /** Destination the items should deliver to */\n destination: Address;\n /**\n * Origin the items should deliver from\n * @deprecated Origin the items should deliver from\n * @targetRemovalDate 2025-04-01\n */\n origin?: Address;\n /**\n * Currency - Defaults to site's currency\n * @format CURRENCY\n */\n currency: string | null;\n /** Contact details */\n contactDetails?: FullAddressContactDetails;\n /** Measure unit - defaults to site's weight unit */\n weightUnit?: WeightUnitWithLiterals;\n /**\n * list of user preferences which are delivery options codes combined with delivery carrier app id\n * @maxSize 5\n */\n userPreferences?: UserPreference[];\n /**\n * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.\n * @format GUID\n */\n purchaseFlowId?: string | null;\n /**\n * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.\n * For example, a Wix Pay Link ID.\n * @maxSize 20\n */\n externalReferences?: ExternalReference[];\n /** [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */\n extendedFields?: ExtendedFields;\n}\n\nexport interface DeliverableItem {\n /**\n * The ID of the line item.\n * @minLength 1\n * @maxLength 100\n */\n _id?: string;\n /**\n * Item name.\n * @maxLength 400\n */\n name?: string;\n /**\n * The number of items ordered.\n * @min 1\n * @max 999999999\n */\n quantity?: number;\n /** Reference to the item's origin catalog. */\n catalogReference?: CatalogReference;\n /** Physical properties of the item. */\n physicalProperties?: PhysicalProperties;\n /**\n * Price of a single item after discounts.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, maxScale:36 }\n * @deprecated Price of a single item after discounts.\n * @targetRemovalDate 2026-04-04\n */\n price?: string;\n /**\n * Total line item price before discounts.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, maxScale:36 }\n */\n totalPriceBeforeDiscount?: string | null;\n /**\n * Price of a single item before discounts.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, maxScale:36 }\n */\n priceBeforeDiscount?: string | null;\n /**\n * Total line item price after discounts. This is equal to `price` multiplied by `quantity`.\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, maxScale:36 }\n */\n totalPrice?: string | null;\n /**\n * For delivery rates by delivery profile id\n * @format GUID\n */\n deliveryProfileId?: string | null;\n /** whether tax is included in line item price */\n taxIncludedInPrice?: boolean | null;\n /** Subscription settings for the item */\n subscriptionSettings?: SubscriptionSettings;\n}\n\n/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */\nexport interface CatalogReference {\n /**\n * ID of the item within the catalog it belongs to.\n * @minLength 1\n * @maxLength 36\n */\n catalogItemId?: string;\n /**\n * ID of the app providing the catalog.\n *\n * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n *\n * For items from Wix catalogs, the following values always apply:\n * + Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n * + Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n * + Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n * @minLength 1\n */\n appId?: string;\n /**\n * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.\n *\n * For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration).\n */\n options?: Record<string, any> | null;\n}\n\nexport interface PhysicalProperties {\n /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */\n weight?: number | null;\n /**\n * Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).\n * @maxLength 40\n */\n sku?: string | null;\n /** Whether this line item is shippable. */\n shippable?: boolean;\n}\n\nexport interface SubscriptionSettings {\n /** Frequency of recurring payment. Every day/week/month/year. */\n frequency?: SubscriptionFrequencyWithLiterals;\n}\n\n/** Frequency unit of recurring payment */\nexport enum SubscriptionFrequency {\n UNDEFINED = 'UNDEFINED',\n DAY = 'DAY',\n WEEK = 'WEEK',\n MONTH = 'MONTH',\n YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type SubscriptionFrequencyWithLiterals =\n | SubscriptionFrequency\n | 'UNDEFINED'\n | 'DAY'\n | 'WEEK'\n | 'MONTH'\n | 'YEAR';\n\n/** Physical address */\nexport interface Address extends AddressStreetOneOf {\n /** Street name and number. */\n streetAddress?: StreetAddress;\n /** Main address line, usually street and number as free text. */\n addressLine1?: string | null;\n /**\n * Country code.\n * @format COUNTRY\n */\n country?: string | null;\n /** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */\n subdivision?: string | null;\n /** City name. */\n city?: string | null;\n /** Zip/postal code. */\n postalCode?: string | null;\n /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */\n addressLine2?: string | null;\n}\n\n/** @oneof */\nexport interface AddressStreetOneOf {\n /** Street name and number. */\n streetAddress?: StreetAddress;\n /** Main address line, usually street and number as free text. */\n addressLine?: string | null;\n}\n\nexport interface StreetAddress {\n /** Street number. */\n number?: string;\n /** Street name. */\n name?: string;\n}\n\nexport interface AddressLocation {\n /** Address latitude. */\n latitude?: number | null;\n /** Address longitude. */\n longitude?: number | null;\n}\n\nexport interface Subdivision {\n /** Short subdivision code. */\n code?: string;\n /** Subdivision full name. */\n name?: string;\n}\n\nexport enum SubdivisionType {\n UNKNOWN_SUBDIVISION_TYPE = 'UNKNOWN_SUBDIVISION_TYPE',\n /** State */\n ADMINISTRATIVE_AREA_LEVEL_1 = 'ADMINISTRATIVE_AREA_LEVEL_1',\n /** County */\n ADMINISTRATIVE_AREA_LEVEL_2 = 'ADMINISTRATIVE_AREA_LEVEL_2',\n /** City/town */\n ADMINISTRATIVE_AREA_LEVEL_3 = 'ADMINISTRATIVE_AREA_LEVEL_3',\n /** Neighborhood/quarter */\n ADMINISTRATIVE_AREA_LEVEL_4 = 'ADMINISTRATIVE_AREA_LEVEL_4',\n /** Street/block */\n ADMINISTRATIVE_AREA_LEVEL_5 = 'ADMINISTRATIVE_AREA_LEVEL_5',\n /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */\n COUNTRY = 'COUNTRY',\n}\n\n/** @enumType */\nexport type SubdivisionTypeWithLiterals =\n | SubdivisionType\n | 'UNKNOWN_SUBDIVISION_TYPE'\n | 'ADMINISTRATIVE_AREA_LEVEL_1'\n | 'ADMINISTRATIVE_AREA_LEVEL_2'\n | 'ADMINISTRATIVE_AREA_LEVEL_3'\n | 'ADMINISTRATIVE_AREA_LEVEL_4'\n | 'ADMINISTRATIVE_AREA_LEVEL_5'\n | 'COUNTRY';\n\n/** Full contact details for an address */\nexport interface FullAddressContactDetails {\n /** Contact's first name. */\n firstName?: string | null;\n /** Contact's last name. */\n lastName?: string | null;\n /**\n * Contact's phone number.\n * @format PHONE\n */\n phone?: string | null;\n /** Contact's company name. */\n company?: string | null;\n /**\n * Email associated with the address.\n * @format EMAIL\n */\n email?: string | null;\n /** Tax info. Currently usable only in Brazil. */\n vatId?: VatId;\n}\n\nexport interface VatId {\n /** Customer's tax ID. */\n _id?: string;\n /**\n * Tax type.\n *\n * Supported values:\n * + `CPF`: for individual tax payers\n * + `CNPJ`: for corporations\n */\n type?: VatTypeWithLiterals;\n}\n\n/** tax info types */\nexport enum VatType {\n UNSPECIFIED = 'UNSPECIFIED',\n /** CPF - for individual tax payers. */\n CPF = 'CPF',\n /** CNPJ - for corporations */\n CNPJ = 'CNPJ',\n}\n\n/** @enumType */\nexport type VatTypeWithLiterals = VatType | 'UNSPECIFIED' | 'CPF' | 'CNPJ';\n\nexport enum WeightUnit {\n /** Weight unit can't be classified due to an error. */\n UNSPECIFIED_WEIGHT_UNIT = 'UNSPECIFIED_WEIGHT_UNIT',\n /** Kilograms. */\n KG = 'KG',\n /** Pounds. */\n LB = 'LB',\n}\n\n/** @enumType */\nexport type WeightUnitWithLiterals =\n | WeightUnit\n | 'UNSPECIFIED_WEIGHT_UNIT'\n | 'KG'\n | 'LB';\n\nexport interface UserPreference {\n /**\n * The delivery carrier app id\n * @format GUID\n */\n appId?: string | null;\n /**\n * The delivery option code\n * @maxLength 250\n */\n code?: string;\n}\n\nexport interface ExternalReference {\n /**\n * ID of the app associated with the purchase flow.\n * For example, the Wix Pay Links app ID.\n * @format GUID\n * @immutable\n */\n appId?: string;\n /**\n * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.\n * For example, a Wix Pay Link ID.\n * @minLength 1\n * @maxLength 100\n * @immutable\n */\n resourceId?: string | null;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\n/**\n * Each delivery option has a list of items that can be delivered by it - the chosen one\n * on Errors throw a business error from TC to catch and trigger destination completion\n */\nexport interface GetDeliverySolutionsResponse {\n /**\n * Delivery Options with their associated items\n * @maxSize 300\n */\n deliverySolutions?: DeliverySolution[];\n /**\n * If a delivery carrier could not calculate rates, the error will be detailed here\n * @maxSize 50\n */\n errors?: DeliveryCarrierError[];\n}\n\nexport interface DeliverySolution {\n /**\n * Unique code that acts as an ID for a shipping rate. For example, `\"usps_std_overnight\"`.\n * DEPRECATED: Use delivery_reference.code instead\n * @maxLength 250\n * @deprecated Unique code that acts as an ID for a shipping rate. For example, `\"usps_std_overnight\"`.\n * DEPRECATED: Use delivery_reference.code instead\n * @replacedBy delivery_reference\n * @targetRemovalDate 2026-01-01\n */\n code?: string;\n /** Represents a reference to a specific delivery solution. Combines both the carrier's code and its application identifier. */\n deliveryReference?: DeliveryReference;\n /**\n * Delivery rate title. For example, `\"USPS Standard Overnight Delivery\"`, `\"Standard\"`, or `\"First-Class Package International\"`.\n * @maxLength 250\n */\n title?: string;\n /** Delivery logistics. */\n logistics?: DeliveryLogistics;\n /** Delivery cost. */\n cost?: DeliveryCost;\n /**\n * Delivery solution allocations to different delivery carriers and delivery regions\n * @minSize 1\n * @maxSize 300\n */\n deliveryAllocations?: DeliveryAllocation[];\n /** If the delivery solution is a partial and doesn't apply to all items. */\n partial?: boolean | null;\n}\n\nexport interface DeliveryReference {\n /**\n * The delivery solution code provided by the carrier\n * @maxLength 250\n */\n code?: string | null;\n /**\n * The carrier app id\n * @format GUID\n */\n appId?: string | null;\n}\n\nexport interface DeliveryLogistics {\n /**\n * When the item is expected to be delivered in free text. For example, `\"3-5 business days\"`.\n * @maxLength 1000\n */\n deliveryTime?: string | null;\n /**\n * Instructions for delivery. For example, for pickup: `\"Ensure to come during business hours, and please don't park in the disabled spot\"`.\n * @maxLength 1000\n */\n instructions?: string | null;\n /** Pickup details. Should be returned only if order is for pickup. */\n pickupDetails?: PickupDetails;\n /** Date and Time of the delivery option */\n deliveryTimeSlot?: DeliveryTimeSlot;\n}\n\nexport interface PickupDetails {\n /** Pickup address. */\n address?: Address;\n /**\n * Pickup method.\n *\n * Supported values:\n * + `\"STORE_PICKUP\"`: When pickup is from the merchant's brick and mortar store.\n * + `\"PICKUP_POINT\"`: When item is shipped to a specified pickup point.\n */\n pickupMethod?: PickupMethodWithLiterals;\n}\n\nexport enum PickupMethod {\n UNKNOWN_METHOD = 'UNKNOWN_METHOD',\n STORE_PICKUP = 'STORE_PICKUP',\n PICKUP_POINT = 'PICKUP_POINT',\n}\n\n/** @enumType */\nexport type PickupMethodWithLiterals =\n | PickupMethod\n | 'UNKNOWN_METHOD'\n | 'STORE_PICKUP'\n | 'PICKUP_POINT';\n\nexport interface DeliveryTimeSlot {\n /** starting time of the delivery time slot */\n from?: Date | null;\n /** ending time of the delivery time slot */\n to?: Date | null;\n /**\n * Time zone in IANA format (e.g \"America/New_York\")\n * If not provided, the cart/checkout will format the time slot based on the site's business location\n * @maxLength 64\n */\n timeZone?: string | null;\n}\n\nexport interface DeliveryCost {\n /**\n * The shipping rate's price. Must align with the [currency's decimal separator](https://en.wikipedia.org/wiki/ISO_4217#Active_codes).\n * @format DECIMAL_VALUE\n * @decimalValue options { gte:0, lte:1000000000000000 }\n * @deprecated\n * @targetRemovalDate 2025-12-01\n */\n price?: string;\n /**\n * Currency of the shipping rate price as a 3-letter [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217). Must align with the `currency` passed to the function under the `metadata` field.\n * @format CURRENCY\n * @deprecated Currency of the shipping rate price as a 3-letter [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217). Must align with the `currency` passed to the function under the `metadata` field.\n * @targetRemovalDate 2025-12-01\n */\n currency?: string;\n /** The shipping rate's price. Must align with the [currency's decimal separator] */\n deliveryPrice?: MultiCurrencyPrice;\n /**\n * Additional costs. For example, a handling fee for packaging fragile items.\n * @maxSize 100\n */\n additionalCosts?: AdditionalCost[];\n}\n\nexport interface MultiCurrencyPrice {\n /**\n * Amount.\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n amount?: string;\n /**\n * Converted amount.\n * @readonly\n * @decimalValue options { gte:0, lte:1000000000000000 }\n */\n convertedAmount?: string;\n /**\n * Amount formatted with currency symbol.\n * @readonly\n */\n formattedAmount?: string;\n /**\n * Converted amount formatted with currency symbol.\n * @readonly\n */\n formattedConvertedAmount?: string;\n}\n\nexport interface AdditionalCost {\n /**\n * Description of the additional charge. For example, `\"Handling fee of $5 applied for gift wrapping\"`.\n * @maxLength 250\n */\n description?: string | null;\n /** Delivery price of additional charge. For example, `12.5`. */\n deliveryPrice?: MultiCurrencyPrice;\n}\n\nexport interface DeliveryAllocation {\n /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */\n deliveryCarrier?: Carrier;\n /** The delivery region that are relevant for this delivery solution. */\n deliveryRegion?: Region;\n /** Populated if the delivery solution is a partially supplied by this carrier. */\n applicableLineItems?: ApplicableLineItems;\n}\n\nexport interface Carrier {\n /**\n * The carrier app id\n * @format GUID\n */\n appId?: string | null;\n /**\n * Unique code that acts as an ID for a shipping rate. For example, `\"usps_std_overnight\"`.\n * @maxLength 250\n */\n code?: string;\n}\n\nexport interface Region {\n /**\n * The delivery region id.\n * @format GUID\n */\n _id?: string | null;\n /**\n * The delivery region name.\n * @maxLength 100\n */\n name?: string | null;\n}\n\nexport interface ApplicableLineItems {\n /**\n * Line items that the delivery solution is for.\n * @maxSize 300\n * @minLength 1\n * @maxLength 100\n */\n lineItemIds?: string[];\n}\n\nexport interface DeliveryCarrierError {\n /**\n * The carrier app id\n * @format GUID\n */\n appId?: string | null;\n /** The error details */\n errorDetails?: Details;\n}\n\nexport interface Details extends DetailsKindOneOf {\n applicationError?: ApplicationError;\n validationError?: ValidationError;\n systemError?: SystemError;\n /**\n * deprecated in API's - to enable migration from rendering arbitrary tracing to rest response\n * @deprecated\n */\n tracing?: Record<string, string>;\n}\n\n/** @oneof */\nexport interface DetailsKindOneOf {\n applicationError?: ApplicationError;\n validationError?: ValidationError;\n systemError?: SystemError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\n/**\n * example result:\n * {\n * \"fieldViolations\": [\n * {\n * \"field\": \"fieldA\",\n * \"description\": \"invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]\",\n * \"violatedRule\": \"OTHER\",\n * \"ruleName\": \"INVALID_NOTE\",\n * \"data\": {\n * \"value\": \"FI\"\n * }\n * },\n * {\n * \"field\": \"fieldB\",\n * \"description\": \"field value out of range. supported range: [0-20]\",\n * \"violatedRule\": \"MAX\",\n * \"data\": {\n * \"threshold\": 20\n * }\n * },\n * {\n * \"field\": \"fieldC\",\n * \"description\": \"invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]\",\n * \"violatedRule\": \"FORMAT\",\n * \"data\": {\n * \"type\": \"PHONE\"\n * }\n * }\n * ]\n * }\n */\nexport interface ValidationError {\n fieldViolations?: FieldViolation[];\n}\n\nexport enum RuleType {\n VALIDATION = 'VALIDATION',\n OTHER = 'OTHER',\n MAX = 'MAX',\n MIN = 'MIN',\n MAX_LENGTH = 'MAX_LENGTH',\n MIN_LENGTH = 'MIN_LENGTH',\n MAX_SIZE = 'MAX_SIZE',\n MIN_SIZE = 'MIN_SIZE',\n FORMAT = 'FORMAT',\n DECIMAL_LTE = 'DECIMAL_LTE',\n DECIMAL_GTE = 'DECIMAL_GTE',\n DECIMAL_LT = 'DECIMAL_LT',\n DECIMAL_GT = 'DECIMAL_GT',\n DECIMAL_MAX_SCALE = 'DECIMAL_MAX_SCALE',\n INVALID_ENUM_VALUE = 'INVALID_ENUM_VALUE',\n REQUIRED_FIELD = 'REQUIRED_FIELD',\n FIELD_NOT_ALLOWED = 'FIELD_NOT_ALLOWED',\n ONE_OF_ALIGNMENT = 'ONE_OF_ALIGNMENT',\n EXACT_LENGTH = 'EXACT_LENGTH',\n EXACT_SIZE = 'EXACT_SIZE',\n REQUIRED_ONE_OF_FIELD = 'REQUIRED_ONE_OF_FIELD',\n}\n\n/** @enumType */\nexport type RuleTypeWithLiterals =\n | RuleType\n | 'VALIDATION'\n | 'OTHER'\n | 'MAX'\n | 'MIN'\n | 'MAX_LENGTH'\n | 'MIN_LENGTH'\n | 'MAX_SIZE'\n | 'MIN_SIZE'\n | 'FORMAT'\n | 'DECIMAL_LTE'\n | 'DECIMAL_GTE'\n | 'DECIMAL_LT'\n | 'DECIMAL_GT'\n | 'DECIMAL_MAX_SCALE'\n | 'INVALID_ENUM_VALUE'\n | 'REQUIRED_FIELD'\n | 'FIELD_NOT_ALLOWED'\n | 'ONE_OF_ALIGNMENT'\n | 'EXACT_LENGTH'\n | 'EXACT_SIZE'\n | 'REQUIRED_ONE_OF_FIELD';\n\nexport interface FieldViolation {\n field?: string;\n description?: string;\n violatedRule?: RuleTypeWithLiterals;\n /** applicable when violated_rule=OTHER */\n ruleName?: string | null;\n data?: Record<string, any> | null;\n}\n\nexport interface SystemError {\n /** Error code. */\n errorCode?: string | null;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type GetDeliverySolutionsApplicationErrors =\n | {\n code?: 'MISSING_CURRENCY_IN_THE_REQUEST_HEADERS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MISSING_DEFAULT_DELIVERY_PROFILE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'NO_DELIVERY_REGION_FOUND';\n description?: string;\n data?: Record<string, any>;\n };\n\n/**\n * Get Delivery Solutions for the given line items from all relevant delivery carriers\n * @param lineItems - list of items to delivery that each of them points to delivery profile and delivery rule.\n * @public\n * @documentationMaturity preview\n * @requiredField lineItems\n * @requiredField options.currency\n * @requiredField options.destination\n * @requiredField options.destination.country\n * @permissionId ECOM.DELIVERY_SOLUTION_READ\n * @applicableIdentity APP\n * @returns Each delivery option has a list of items that can be delivered by it - the chosen one\n * on Errors throw a business error from TC to catch and trigger destination completion\n * @fqn wix.ecom.deliveryprofile.v1.DeliveryRates.GetDeliverySolutions\n */\nexport async function getDeliverySolutions(\n lineItems: DeliverableItem[],\n options?: NonNullablePaths<\n GetDeliverySolutionsOptions,\n `currency` | `destination` | `destination.country`,\n 3\n >\n): Promise<\n NonNullablePaths<\n GetDeliverySolutionsResponse,\n | `deliverySolutions`\n | `deliverySolutions.${number}.code`\n | `deliverySolutions.${number}.title`\n | `deliverySolutions.${number}.logistics.pickupDetails.pickupMethod`\n | `deliverySolutions.${number}.cost.price`\n | `deliverySolutions.${number}.cost.currency`\n | `deliverySolutions.${number}.cost.deliveryPrice.amount`\n | `deliverySolutions.${number}.cost.deliveryPrice.convertedAmount`\n | `deliverySolutions.${number}.cost.deliveryPrice.formattedAmount`\n | `deliverySolutions.${number}.cost.deliveryPrice.formattedConvertedAmount`\n | `errors`\n | `errors.${number}.errorDetails.applicationError.code`\n | `errors.${number}.errorDetails.applicationError.description`,\n 6\n > & {\n __applicationErrorsType?: GetDeliverySolutionsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n lineItems: lineItems,\n destination: options?.destination,\n origin: options?.origin,\n currency: options?.currency,\n contactDetails: options?.contactDetails,\n weightUnit: options?.weightUnit,\n userPreferences: options?.userPreferences,\n purchaseFlowId: options?.purchaseFlowId,\n externalReferences: options?.externalReferences,\n extendedFields: options?.extendedFields,\n }),\n [\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [{ path: 'destination' }, { path: 'origin' }],\n },\n ]\n );\n\n const reqOpts =\n ambassadorWixGatewaysEcomV1DeliveryRatesGateway.getDeliverySolutions(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [\n { path: 'deliverySolutions.logistics.pickupDetails.address' },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n lineItems: '$[0]',\n destination: '$[1].destination',\n origin: '$[1].origin',\n currency: '$[1].currency',\n contactDetails: '$[1].contactDetails',\n weightUnit: '$[1].weightUnit',\n userPreferences: '$[1].userPreferences',\n purchaseFlowId: '$[1].purchaseFlowId',\n externalReferences: '$[1].externalReferences',\n extendedFields: '$[1].extendedFields',\n },\n singleArgumentUnchanged: false,\n },\n ['lineItems', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetDeliverySolutionsOptions {\n /** Destination the items should deliver to */\n destination: Address;\n /**\n * Origin the items should deliver from\n * @deprecated Origin the items should deliver from\n * @targetRemovalDate 2025-04-01\n */\n origin?: Address;\n /**\n * Currency - Defaults to site's currency\n * @format CURRENCY\n */\n currency: string | null;\n /** Contact details */\n contactDetails?: FullAddressContactDetails;\n /** Measure unit - defaults to site's weight unit */\n weightUnit?: WeightUnitWithLiterals;\n /**\n * list of user preferences which are delivery options codes combined with delivery carrier app id\n * @maxSize 5\n */\n userPreferences?: UserPreference[];\n /**\n * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.\n * @format GUID\n */\n purchaseFlowId?: string | null;\n /**\n * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.\n * For example, a Wix Pay Link ID.\n * @maxSize 20\n */\n externalReferences?: ExternalReference[];\n /** [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */\n extendedFields?: ExtendedFields;\n}\n","import { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixEcomDeliveryprofileV1DeliveryRatesUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/delivery-rates',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/delivery-rates',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_delivery-solutions';\n\n/** Get Delivery Solutions for the given line items from all relevant delivery carriers */\nexport function getDeliverySolutions(\n payload: object\n): RequestOptionsFactory<any> {\n function __getDeliverySolutions({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'lineItems.physicalProperties.weight' },\n { path: 'destination.geocode.latitude' },\n { path: 'destination.geocode.longitude' },\n { path: 'origin.geocode.latitude' },\n { path: 'origin.geocode.longitude' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.gateways.ecom.v1.delivery_rates_gateway',\n method: 'POST' as any,\n methodFqn:\n 'wix.ecom.deliveryprofile.v1.DeliveryRates.GetDeliverySolutions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomDeliveryprofileV1DeliveryRatesUrl({\n protoPath: '/v1/get-delivery-solutions',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'deliverySolutions.logistics.pickupDetails.address.geocode.latitude',\n },\n {\n path: 'deliverySolutions.logistics.pickupDetails.address.geocode.longitude',\n },\n ],\n },\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'deliverySolutions.logistics.deliveryTimeSlot.from' },\n { path: 'deliverySolutions.logistics.deliveryTimeSlot.to' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getDeliverySolutions;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n DeliverableItem,\n GetDeliverySolutionsApplicationErrors,\n GetDeliverySolutionsOptions,\n GetDeliverySolutionsResponse,\n getDeliverySolutions as universalGetDeliverySolutions,\n} from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/ecom' };\n\nexport function getDeliverySolutions(\n httpClient: HttpClient\n): GetDeliverySolutionsSignature {\n return (\n lineItems: DeliverableItem[],\n options?: NonNullablePaths<\n GetDeliverySolutionsOptions,\n `currency` | `destination` | `destination.country`,\n 3\n >\n ) =>\n universalGetDeliverySolutions(\n lineItems,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetDeliverySolutionsSignature {\n /**\n * Get Delivery Solutions for the given line items from all relevant delivery carriers\n * @param - list of items to delivery that each of them points to delivery profile and delivery rule.\n * @returns Each delivery option has a list of items that can be delivered by it - the chosen one\n * on Errors throw a business error from TC to catch and trigger destination completion\n */\n (\n lineItems: DeliverableItem[],\n options?: NonNullablePaths<\n GetDeliverySolutionsOptions,\n `currency` | `destination` | `destination.country`,\n 3\n >\n ): Promise<\n NonNullablePaths<\n GetDeliverySolutionsResponse,\n | `deliverySolutions`\n | `deliverySolutions.${number}.code`\n | `deliverySolutions.${number}.title`\n | `deliverySolutions.${number}.logistics.pickupDetails.pickupMethod`\n | `deliverySolutions.${number}.cost.price`\n | `deliverySolutions.${number}.cost.currency`\n | `deliverySolutions.${number}.cost.deliveryPrice.amount`\n | `deliverySolutions.${number}.cost.deliveryPrice.convertedAmount`\n | `deliverySolutions.${number}.cost.deliveryPrice.formattedAmount`\n | `deliverySolutions.${number}.cost.deliveryPrice.formattedConvertedAmount`\n | `errors`\n | `errors.${number}.errorDetails.applicationError.code`\n | `errors.${number}.errorDetails.applicationError.description`,\n 6\n > & {\n __applicationErrorsType?: GetDeliverySolutionsApplicationErrors;\n }\n >;\n}\n\nexport {\n AccountInfo,\n AdditionalCost,\n Address,\n AddressLocation,\n AddressStreetOneOf,\n ApplicableLineItems,\n ApplicationError,\n Carrier,\n CatalogReference,\n DeliverableItem,\n DeliveryAllocation,\n DeliveryCarrierError,\n DeliveryCost,\n DeliveryLogistics,\n DeliveryRatesGateway,\n DeliveryReference,\n DeliverySolution,\n DeliveryTimeSlot,\n Details,\n DetailsKindOneOf,\n ExtendedFields,\n ExternalReference,\n FieldViolation,\n FullAddressContactDetails,\n GetDeliverySolutionsOptions,\n GetDeliverySolutionsRequest,\n GetDeliverySolutionsResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n MessageEnvelope,\n MissingDefaultDeliveryProfileEvent,\n MultiCurrencyPrice,\n PhysicalProperties,\n PickupDetails,\n PickupMethod,\n Region,\n RuleType,\n StreetAddress,\n Subdivision,\n SubdivisionType,\n SubscriptionFrequency,\n SubscriptionSettings,\n SystemError,\n UserPreference,\n ValidationError,\n VatId,\n VatType,\n WebhookIdentityType,\n WeightUnit,\n} from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js';\n","import { getDeliverySolutions as publicGetDeliverySolutions } from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getDeliverySolutions: MaybeContext<\n BuildRESTFunction<typeof publicGetDeliverySolutions> &\n typeof publicGetDeliverySolutions\n> = /*#__PURE__*/ createRESTModule(publicGetDeliverySolutions);\n\nexport {\n SubscriptionFrequency,\n SubdivisionType,\n VatType,\n WeightUnit,\n PickupMethod,\n RuleType,\n WebhookIdentityType,\n} from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js';\nexport {\n DeliveryRatesGateway,\n MissingDefaultDeliveryProfileEvent,\n GetDeliverySolutionsRequest,\n DeliverableItem,\n CatalogReference,\n PhysicalProperties,\n SubscriptionSettings,\n Address,\n AddressStreetOneOf,\n StreetAddress,\n AddressLocation,\n Subdivision,\n FullAddressContactDetails,\n VatId,\n UserPreference,\n ExternalReference,\n ExtendedFields,\n GetDeliverySolutionsResponse,\n DeliverySolution,\n DeliveryReference,\n DeliveryLogistics,\n PickupDetails,\n DeliveryTimeSlot,\n DeliveryCost,\n MultiCurrencyPrice,\n AdditionalCost,\n DeliveryAllocation,\n Carrier,\n Region,\n ApplicableLineItems,\n DeliveryCarrierError,\n Details,\n DetailsKindOneOf,\n ApplicationError,\n ValidationError,\n FieldViolation,\n SystemError,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n GetDeliverySolutionsOptions,\n} from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js';\nexport {\n SubscriptionFrequencyWithLiterals,\n SubdivisionTypeWithLiterals,\n VatTypeWithLiterals,\n WeightUnitWithLiterals,\n PickupMethodWithLiterals,\n RuleTypeWithLiterals,\n WebhookIdentityTypeWithLiterals,\n GetDeliverySolutionsApplicationErrors,\n} from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAC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zB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE/7BO,SAASS,sBACd,YAC+B;AAC/B,SAAO,CACL,WACA,YAMAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC3BA,SAAS,wBAAwB;AAG1B,IAAMC,wBAGK,iCAAiBA,qBAA0B;","names":["payload","transformPaths","SubscriptionFrequency","SubdivisionType","VatType","WeightUnit","PickupMethod","RuleType","WebhookIdentityType","getDeliverySolutions","getDeliverySolutions","getDeliverySolutions"]}