import { d as GetDeliverySolutionsRequest$1, a as GetDeliverySolutionsResponse$1, b as GetDeliverySolutionsResponseNonNullableFields$1 } from './gateways-ecom-v1-delivery-rates-gateway-delivery-solutions.universal-CfGDt61Z.js'; interface GetDeliverySolutionsRequest { /** list of items to delivery that each of them points to delivery profile and delivery rule. */ lineItems: DeliverableItem[]; /** Destination the items should deliver to */ destination: Address; /** * Origin the items should deliver from * @deprecated Origin the items should deliver from * @targetRemovalDate 2025-04-01 */ origin?: Address; /** Currency - Defaults to site's currency */ currency: string | null; /** Contact details */ contactDetails?: FullAddressContactDetails; /** Measure unit - defaults to site's weight unit */ weightUnit?: WeightUnit; /** list of user preferences which are delivery options codes combined with delivery carrier app id */ userPreferences?: UserPreference[]; /** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */ purchaseFlowId?: string | null; } interface DeliverableItem { /** The ID of the line item. */ id?: string; /** Item name. */ name?: string; /** The number of items ordered. */ quantity?: number; /** Reference to the item's origin catalog. */ catalogReference?: CatalogReference; /** Physical properties of the item. */ physicalProperties?: PhysicalProperties; /** Price of a single item after discounts. */ price?: string; /** Total line item price before discounts. */ totalPriceBeforeDiscount?: string | null; /** Price of a single item before discounts. */ priceBeforeDiscount?: string | null; /** Total line item price after discounts. This is equal to `price` multiplied by `quantity`. */ totalPrice?: string | null; /** For delivery rates by delivery profile id */ deliveryProfileId?: string | null; /** whether tax is included in line item price */ taxIncludedInPrice?: boolean | null; } /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */ interface CatalogReference { /** ID of the item within the catalog it belongs to. */ catalogItemId?: string; /** * ID of the app providing the catalog. * * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). * * For items from Wix catalogs, the following values always apply: * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"` */ appId?: string; /** * 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. * * 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). */ options?: Record | null; } interface PhysicalProperties { /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */ weight?: number | null; /** Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */ sku?: string | null; /** Whether this line item is shippable. */ shippable?: boolean; } /** Physical address */ interface Address extends AddressStreetOneOf { /** Street name and number. */ streetAddress?: StreetAddress; /** Main address line, usually street and number as free text. */ addressLine?: string | null; /** Country code. */ country?: string | null; /** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */ subdivision?: string | null; /** City name. */ city?: string | null; /** Zip/postal code. */ postalCode?: string | null; /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */ addressLine2?: string | null; } /** @oneof */ interface AddressStreetOneOf { /** Street name and number. */ streetAddress?: StreetAddress; /** Main address line, usually street and number as free text. */ addressLine?: string | null; } interface StreetAddress { /** Street number. */ number?: string; /** Street name. */ name?: string; } declare enum SubdivisionType { UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE", /** State */ ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1", /** County */ ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2", /** City/town */ ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3", /** Neighborhood/quarter */ ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4", /** Street/block */ ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5", /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */ COUNTRY = "COUNTRY" } /** Full contact details for an address */ interface FullAddressContactDetails { /** Contact's first name. */ firstName?: string | null; /** Contact's last name. */ lastName?: string | null; /** Contact's phone number. */ phone?: string | null; /** Contact's company name. */ company?: string | null; /** Email associated with the address. */ email?: string | null; /** Tax info. Currently usable only in Brazil. */ vatId?: VatId; } interface VatId { /** Customer's tax ID. */ id?: string; /** * Tax type. * * Supported values: * + `CPF`: for individual tax payers * + `CNPJ`: for corporations */ type?: VatType; } /** tax info types */ declare enum VatType { UNSPECIFIED = "UNSPECIFIED", /** CPF - for individual tax payers. */ CPF = "CPF", /** CNPJ - for corporations */ CNPJ = "CNPJ" } declare enum WeightUnit { /** Weight unit can't be classified, due to an error */ UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT", /** Kilograms */ KG = "KG", /** Pounds */ LB = "LB" } interface UserPreference { /** The delivery carrier app id */ appId?: string | null; /** The delivery option code */ code?: string; } /** * Each delivery option has a list of items that can be delivered by it - the chosen one * on Errors throw a business error from TC to catch and trigger destination completion */ interface GetDeliverySolutionsResponse { /** Delivery Options with their associated items */ deliverySolutions?: DeliverySolution[]; /** If a delivery carrier could not calculate rates, the error will be detailed here */ errors?: DeliveryCarrierError[]; } interface DeliverySolution { /** Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`. */ code?: string; /** Delivery rate title. For example, `"USPS Standard Overnight Delivery"`, `"Standard"`, or `"First-Class Package International"`. */ title?: string; /** Delivery logistics. */ logistics?: DeliveryLogistics; /** Delivery cost. */ cost?: DeliveryCost; /** Delivery solution allocations to different delivery carriers and delivery regions */ deliveryAllocations?: DeliveryAllocation[]; /** If the delivery solution is a partial and doesn't apply to all items. */ partial?: boolean | null; } interface DeliveryLogistics { /** When the item is expected to be delivered in free text. For example, `"3-5 business days"`. */ deliveryTime?: string | null; /** Instructions for delivery. For example, for pickup: `"Ensure to come during business hours, and please don't park in the disabled spot"`. */ instructions?: string | null; /** Pickup details. Should be returned only if order is for pickup. */ pickupDetails?: PickupDetails; /** Date and Time of the delivery option */ deliveryTimeSlot?: DeliveryTimeSlot; } interface PickupDetails { /** Pickup address. */ address?: Address; /** * Pickup method. * * Supported values: * + `"STORE_PICKUP"`: When pickup is from the merchant's brick and mortar store. * + `"PICKUP_POINT"`: When item is shipped to a specified pickup point. */ pickupMethod?: PickupMethod; } declare enum PickupMethod { UNKNOWN_METHOD = "UNKNOWN_METHOD", STORE_PICKUP = "STORE_PICKUP", PICKUP_POINT = "PICKUP_POINT" } interface DeliveryTimeSlot { /** starting time of the delivery time slot */ from?: Date | null; /** ending time of the delivery time slot */ to?: Date | null; } interface DeliveryCost { /** The shipping rate's price. Must align with the [currency's decimal separator](https://en.wikipedia.org/wiki/ISO_4217#Active_codes). */ price?: string; /** 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. */ currency?: string; /** Additional costs. For example, a handling fee for packaging fragile items. */ additionalCharges?: AdditionalCharge[]; } interface AdditionalCharge { /** Additional charge type. */ type?: ChargeType; /** Description of the additional charge. For example, `"Handling fee of $5 applied for gift wrapping"`. */ description?: string | null; /** Cost of additional charge. For example, `12.5`. */ price?: string; } declare enum ChargeType { HANDLING_FEE = "HANDLING_FEE" } interface DeliveryAllocation { /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */ deliveryCarrier?: Carrier; /** The delivery region that are relevant for this delivery solution. */ deliveryRegion?: Region; /** Populated if the delivery solution is a partially supplied by this carrier. */ applicableLineItems?: ApplicableLineItems; } interface Carrier { /** The carrier app id */ appId?: string | null; /** Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`. */ code?: string; } interface Region { /** The delivery region id. */ id?: string | null; /** The delivery region name. */ name?: string | null; } interface ApplicableLineItems { /** Line items that the delivery solution is for. */ lineItemIds?: string[]; } interface DeliveryCarrierError { /** The carrier app id */ appId?: string | null; /** The error details */ errorDetails?: Details; } interface Details extends DetailsKindOneOf { applicationError?: ApplicationError; validationError?: ValidationError; systemError?: SystemError; /** * deprecated in API's - to enable migration from rendering arbitrary tracing to rest response * @deprecated */ tracing?: Record; } /** @oneof */ interface DetailsKindOneOf { applicationError?: ApplicationError; validationError?: ValidationError; systemError?: SystemError; } interface ApplicationError { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } /** * example result: * { * "fieldViolations": [ * { * "field": "fieldA", * "description": "invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]", * "violatedRule": "OTHER", * "ruleName": "INVALID_NOTE", * "data": { * "value": "FI" * } * }, * { * "field": "fieldB", * "description": "field value out of range. supported range: [0-20]", * "violatedRule": "MAX", * "data": { * "threshold": 20 * } * }, * { * "field": "fieldC", * "description": "invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]", * "violatedRule": "FORMAT", * "data": { * "type": "PHONE" * } * } * ] * } */ interface ValidationError { fieldViolations?: FieldViolation[]; } declare enum RuleType { VALIDATION = "VALIDATION", OTHER = "OTHER", MAX = "MAX", MIN = "MIN", MAX_LENGTH = "MAX_LENGTH", MIN_LENGTH = "MIN_LENGTH", MAX_SIZE = "MAX_SIZE", MIN_SIZE = "MIN_SIZE", FORMAT = "FORMAT", DECIMAL_LTE = "DECIMAL_LTE", DECIMAL_GTE = "DECIMAL_GTE", DECIMAL_LT = "DECIMAL_LT", DECIMAL_GT = "DECIMAL_GT", DECIMAL_MAX_SCALE = "DECIMAL_MAX_SCALE", INVALID_ENUM_VALUE = "INVALID_ENUM_VALUE", REQUIRED_FIELD = "REQUIRED_FIELD", FIELD_NOT_ALLOWED = "FIELD_NOT_ALLOWED", ONE_OF_ALIGNMENT = "ONE_OF_ALIGNMENT", EXACT_LENGTH = "EXACT_LENGTH", EXACT_SIZE = "EXACT_SIZE", REQUIRED_ONE_OF_FIELD = "REQUIRED_ONE_OF_FIELD" } interface FieldViolation { field?: string; description?: string; violatedRule?: RuleType; /** applicable when violated_rule=OTHER */ ruleName?: string | null; data?: Record | null; } interface SystemError { /** Error code. */ errorCode?: string | null; } interface StreetAddressNonNullableFields { number: string; name: string; apt: string; } interface SubdivisionNonNullableFields { code: string; name: string; type: SubdivisionType; } interface AddressNonNullableFields { streetAddress?: StreetAddressNonNullableFields; subdivisions: SubdivisionNonNullableFields[]; } interface PickupDetailsNonNullableFields { address?: AddressNonNullableFields; pickupMethod: PickupMethod; } interface DeliveryLogisticsNonNullableFields { pickupDetails?: PickupDetailsNonNullableFields; } interface AdditionalChargeNonNullableFields { type: ChargeType; price: string; } interface DeliveryCostNonNullableFields { price: string; currency: string; additionalCharges: AdditionalChargeNonNullableFields[]; } interface CarrierNonNullableFields { code: string; } interface ApplicableLineItemsNonNullableFields { lineItemIds: string[]; } interface DeliveryAllocationNonNullableFields { deliveryCarrier?: CarrierNonNullableFields; applicableLineItems?: ApplicableLineItemsNonNullableFields; } interface DeliverySolutionNonNullableFields { code: string; title: string; logistics?: DeliveryLogisticsNonNullableFields; cost?: DeliveryCostNonNullableFields; deliveryAllocations: DeliveryAllocationNonNullableFields[]; } interface ApplicationErrorNonNullableFields { code: string; description: string; } interface FieldViolationNonNullableFields { field: string; description: string; violatedRule: RuleType; } interface ValidationErrorNonNullableFields { fieldViolations: FieldViolationNonNullableFields[]; } interface DetailsNonNullableFields { applicationError?: ApplicationErrorNonNullableFields; validationError?: ValidationErrorNonNullableFields; } interface DeliveryCarrierErrorNonNullableFields { errorDetails?: DetailsNonNullableFields; } interface GetDeliverySolutionsResponseNonNullableFields { deliverySolutions: DeliverySolutionNonNullableFields[]; errors: DeliveryCarrierErrorNonNullableFields[]; } type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function getDeliverySolutions(): __PublicMethodMetaInfo<'POST', {}, GetDeliverySolutionsRequest$1, GetDeliverySolutionsRequest, GetDeliverySolutionsResponse$1 & GetDeliverySolutionsResponseNonNullableFields$1, GetDeliverySolutionsResponse & GetDeliverySolutionsResponseNonNullableFields>; export { type __PublicMethodMetaInfo, getDeliverySolutions };