{"version":3,"sources":["../../src/service-plugins-types.ts","../../src/interfaces-ecommerce-v1-validations-provider.public.ts","../../src/interfaces-ecommerce-v1-validations-provider.context.ts"],"sourcesContent":["export interface GetValidationViolationsRequest {\n  /** Information about the source of the request. */\n  sourceInfo?: SourceInfo;\n  /** Information to validate. */\n  validationInfo?: ValidationInfo;\n  /**\n   * Custom field data to validate.\n   * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls.\n   */\n  extendedFields?: ExtendedFields;\n}\n\nexport interface SourceInfo {\n  /** Source of the request. */\n  source?: Source;\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   * The stage at which the service plugin is called.\n   * @deprecated The stage at which the service plugin is called.\n   * @targetRemovalDate 2026-02-01\n   */\n  stage?: Stage;\n}\n\nexport enum Source {\n  /** Context cannot be recognized */\n  OTHER = 'OTHER',\n  /** Called from Ecom's Cart service */\n  CART = 'CART',\n  /** Called from Ecom's Checkout service */\n  CHECKOUT = 'CHECKOUT',\n}\n\nexport interface Stage extends StageStagesOneOf {\n  /**\n   * Deprecated. Will be removed on 2026-01-07.\n   * @deprecated Deprecated. Will be removed on 2026-01-07.\n   * @targetRemovalDate 2026-01-07\n   */\n  checkoutStage?: CheckoutStage;\n}\n\n/** @oneof */\nexport interface StageStagesOneOf {\n  /**\n   * Deprecated. Will be removed on 2026-01-07.\n   * @deprecated Deprecated. Will be removed on 2026-01-07.\n   * @targetRemovalDate 2026-01-07\n   */\n  checkoutStage?: CheckoutStage;\n}\n\nexport enum CheckoutStage {\n  /**\n   * Deprecated. Will be removed on 2026-01-07.\n   * Used during the initialization of the checkout (Create Checkout).\n   */\n  INITIALIZATION = 'INITIALIZATION',\n  /**\n   * Deprecated. Will be removed on 2026-01-07.\n   * Used during the checkout process, such as updating or retrieving the checkout.\n   */\n  IN_PROGRESS = 'IN_PROGRESS',\n  /**\n   * Deprecated. Will be removed on 2026-01-07.\n   * Used during the creation of an order from the checkout.\n   */\n  ORDER_CREATION = 'ORDER_CREATION',\n}\n\n/** ValidationsData is the main entity of ValidationsSPI, which contains all the data required for validations */\nexport interface ValidationInfo {\n  /** Buyer details. */\n  buyerDetails?: BuyerDetails;\n  /**\n   * Line items. Max: 300 line items\n   * @maxSize 300\n   */\n  lineItems?: LineItem[];\n  /**\n   * Applied gift card details.\n   *\n   * >**Note:** Gift cards are supported through the Wix UI, though the service plugin is not currently available. Learn more about [Wix Gift Cards](https://support.wix.com/en/article/wix-stores-setting-up-wix-gift-cards).\n   */\n  giftCard?: GiftCard;\n  /**\n   * Weight measurement unit.\n   * Default: Site's weight unit\n   */\n  weightUnit?: WeightUnit;\n  /** Price summary. */\n  priceSummary?: PriceSummary;\n  /** Billing information. */\n  billingInfo?: AddressWithContact;\n  /** Shipping address and contact details. */\n  shippingAddress?: AddressWithContact;\n  /** Shipping information. */\n  shippingInfo?: ShippingInfo;\n  /** Custom fields. */\n  customFields?: CustomFields;\n  /**\n   * Applied discounts.\n   * @maxSize 320\n   */\n  appliedDiscounts?: AppliedDiscount[];\n  /**\n   * References to an external app and resource associated with this checkout.\n   * Used for integration and tracking across different platforms.\n   */\n  externalReference?: ExternalReference;\n  /**\n   * The site’s default currency, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. This represents the base currency configured for the site and remains constant regardless of the customer’s currency selection.\n   * @format CURRENCY\n   * @readonly\n   */\n  currency?: string | null;\n  /**\n   * The currency [selected by the customer](https://support.wix.com/en/article/multicurrency-an-overview) during the purchase flow, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n   *\n   * This reflects the customer’s preferred display currency and may differ from the site’s default currency.\n   * When no specific currency is selected by the customer, this matches the `currency` property.\n   * @readonly\n   * @format CURRENCY\n   */\n  conversionCurrency?: string | null;\n  /**\n   * The currency used for payment, in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n   *\n   * This is determined by the [customer's selected currency](https://support.wix.com/en/article/multicurrency-an-overview) and the site’s supported payment currencies.\n   * If the customer’s selected currency is supported for payment, this matches the `conversionCurrency` property. If not supported, this falls back to the `currency` property.\n   * @readonly\n   * @format CURRENCY\n   */\n  paymentCurrency?: string | null;\n}\n\nexport interface BuyerDetails {\n  /**\n   * Buyer's email address.\n   * @format EMAIL\n   */\n  email?: string | null;\n  /**\n   * Contact ID if one exists.\n   * @format GUID\n   */\n  contactId?: string | null;\n}\n\nexport interface LineItem {\n  /**\n   * Line item ID.\n   * @format GUID\n   */\n  _id?: string | null;\n  /**\n   * Item quantity.\n   * Min: `0`\n   * Max: `100000`\n   * @max 100000\n   */\n  quantity?: number;\n  /** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. */\n  catalogReference?: CatalogReference;\n  /**\n   * Product name. For example,\n   * + Stores: `product.name`\n   * + Bookings: `service.info.name`\n   * + Events: `ticket.name`\n   */\n  productName?: ProductName;\n  /** Price of the item **after** catalog-defined discount and line item discounts. */\n  price?: MultiCurrencyPrice;\n  /** Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability. */\n  physicalProperties?: PhysicalProperties;\n  /** Item type. */\n  itemType?: ItemType;\n  /** [Subscription option](https://dev.wix.com/api/rest/wix-stores/subscription-options/introduction) information. A subscription is a product that is sold on a recurring basis. */\n  subscriptionOptionInfo?: SubscriptionOptionInfo;\n  /** Price breakdown for this line item. */\n  pricesBreakdown?: LineItemPricesData;\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.\n   *\n   * Use this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items.\n   *\n   * For Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)\n   * or [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction).\n   */\n  options?: Record<string, any> | null;\n}\n\nexport interface ProductName {\n  /**\n   * __Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n   *\n   * Min: 1 character.\n   * Max: 200 characters.\n   * @minLength 1\n   * @maxLength 200\n   */\n  original?: string;\n  /**\n   * Item name translated into the buyer's language.\n   *\n   * Min: 1 character.\n   * Max: 400 characters.\n   * Default: Same as `original`.\n   * @minLength 1\n   * @maxLength 400\n   */\n  translated?: string | null;\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 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 Dimensions {\n  /**\n   * Length. Measurement unit is handled at the system level (metric/imperial).\n   * @decimalValue options { gte:0, lte:999999999, maxScale:6 }\n   */\n  length?: string | null;\n  /**\n   * Width. Measurement unit is handled at the system level (metric/imperial).\n   * @decimalValue options { gte:0, lte:999999999, maxScale:6 }\n   */\n  width?: string | null;\n  /**\n   * Height. Measurement unit is handled at the system level (metric/imperial).\n   * @decimalValue options { gte:0, lte:999999999, maxScale:6 }\n   */\n  height?: string | null;\n  /** Unit of measurement for dimensions (length, width, height). */\n  unit?: DimensionsUnit;\n}\n\nexport enum DimensionsUnit {\n  UNKNOWN_DIMENSIONS_UNIT = 'UNKNOWN_DIMENSIONS_UNIT',\n  /** Millimeters. */\n  MM = 'MM',\n  /** Centimeters. */\n  CM = 'CM',\n  /** Meters. */\n  M = 'M',\n  /** Inches. */\n  IN = 'IN',\n  /** Feet. */\n  FT = 'FT',\n  /** Yards. */\n  YD = 'YD',\n}\n\nexport interface ItemType extends ItemTypeItemTypeDataOneOf {\n  /** Preset item type. */\n  preset?: ItemTypePreset;\n  /** Custom item type. When none of the preset types are suitable, specifies the custom type. */\n  custom?: string;\n}\n\n/** @oneof */\nexport interface ItemTypeItemTypeDataOneOf {\n  /** Preset item type. */\n  preset?: ItemTypePreset;\n  /** Custom item type. When none of the preset types are suitable, specifies the custom type. */\n  custom?: string;\n}\n\nexport enum ItemTypePreset {\n  UNRECOGNISED = 'UNRECOGNISED',\n  PHYSICAL = 'PHYSICAL',\n  DIGITAL = 'DIGITAL',\n  GIFT_CARD = 'GIFT_CARD',\n  SERVICE = 'SERVICE',\n}\n\nexport interface SubscriptionOptionInfo {\n  /** Subscription option settings. */\n  subscriptionSettings?: SubscriptionSettings;\n  /** Subscription option title. */\n  title?: Title;\n  /** Subscription option description. */\n  description?: Description;\n}\n\nexport interface SubscriptionSettings {\n  /** Frequency of recurring payment. */\n  frequency?: SubscriptionFrequency;\n  /**\n   * Interval of recurring payment.\n   *\n   * Default: `1`.\n   * If SubscriptionFrequency is Day the minimum interval is 7\n   * @min 1\n   * @max 3650\n   */\n  interval?: number | null;\n  /** Whether subscription is renewed automatically at the end of each period. */\n  autoRenewal?: boolean;\n  /**\n   * Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`.\n   * @min 1\n   */\n  billingCycles?: number | null;\n  /** Whether to allow the customer to cancel the subscription.. */\n  enableCustomerCancellation?: boolean;\n  /**\n   * Period until first cycle starts. If applied payNow will be 0\n   * If None => no free trial\n   */\n  freeTrialPeriod?: FreeTrialPeriod;\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\nexport interface FreeTrialPeriod {\n  /** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */\n  frequency?: SubscriptionFrequency;\n  /**\n   * Number of frequency units in the free trial period. For example, frequency `MONTH` with interval `3` means a 3-month free trial.\n   * @min 1\n   * @max 999\n   */\n  interval?: number;\n}\n\nexport interface BillingSettings {\n  /**\n   * Day of month (1-28) to anchor recurring billing to. When set, billing recurs on this day each cycle. Does not apply to weekly subscriptions.\n   * @min 1\n   * @max 28\n   */\n  anchorDay?: number | null;\n}\n\nexport enum ProductPeriodAlignment {\n  /** Billing period equals the product/service/subscription access period. */\n  ALIGNED_WITH_BILLING_PERIOD = 'ALIGNED_WITH_BILLING_PERIOD',\n  /** Billing period is independent of the product/service/subscription access period. */\n  NOT_ALIGNED_WITH_BILLING_PERIOD = 'NOT_ALIGNED_WITH_BILLING_PERIOD',\n}\n\nexport interface Title {\n  /**\n   * Subscription option name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).\n   * @minLength 1\n   * @maxLength 150\n   */\n  original?: string;\n  /**\n   * Subscription option name translated into the buyer's language.\n   *\n   * Default: Same as `original`.\n   * @minLength 1\n   * @maxLength 150\n   */\n  translated?: string | null;\n}\n\nexport interface Description {\n  /**\n   * Subscription option description.\n   * @maxLength 500\n   */\n  original?: string;\n  /**\n   * Translated subscription option description.\n   * @maxLength 500\n   */\n  translated?: string | null;\n}\n\nexport interface LineItemPricesData {\n  /** Total price after discounts and after tax. */\n  totalPriceAfterTax?: MultiCurrencyPrice;\n  /** Total price after discounts, and before tax. */\n  totalPriceBeforeTax?: MultiCurrencyPrice;\n  /** Tax details. */\n  taxDetails?: ItemTaxFullDetails;\n  /** Total discount applied for the line item. */\n  totalDiscount?: MultiCurrencyPrice;\n  /** Catalog price **after** catalog-defined discount and automatic discounts. */\n  price?: MultiCurrencyPrice;\n  /** Item price **before** automatic discounts, coupons, and global discounts, **after** catalog-defined discount. Defaults to `price` when not provided. */\n  priceBeforeDiscounts?: MultiCurrencyPrice;\n  /** Total price **after** catalog-defined discount and automatic discounts, taking line item's quantity into account. */\n  lineItemPrice?: MultiCurrencyPrice;\n  /** Item price **before** all discounts. Defaults to `price` when not provided. */\n  fullPrice?: MultiCurrencyPrice;\n}\n\nexport interface ItemTaxFullDetails {\n  /** The portion of the total amount of this estimate that was taxable. */\n  taxableAmount?: MultiCurrencyPrice;\n  /** Calculated tax, based on `taxable_amount`. */\n  totalTax?: MultiCurrencyPrice;\n  /** Indicates whether the price already includes tax. */\n  isTaxIncluded?: boolean | null;\n  /**\n   * A detailed description of all the tax authorities applied on this item.\n   * @maxSize 1000\n   */\n  taxBreakdown?: TaxBreakdown[];\n}\n\nexport interface TaxBreakdown {\n  /**\n   * The name of the jurisdiction to which this tax detail applies. For example, \"New York\" or \"Quebec\".\n   * @maxLength 200\n   */\n  jurisdiction?: string | null;\n  /** The amount of this line item price that was considered nontaxable. (Decimal value) */\n  nonTaxableAmount?: MultiCurrencyPrice;\n  /**\n   * The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value)\n   * @decimalValue options { maxScale:6 }\n   */\n  rate?: string | null;\n  /** The amount of tax estimated for this line item. (Decimal value) */\n  taxAmount?: MultiCurrencyPrice;\n  /** The taxable amount of this line item. */\n  taxableAmount?: MultiCurrencyPrice;\n  /**\n   * The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, \"Sales Tax\", \"Income Tax\", \"Value Added Tax\", etc.\n   * @maxLength 200\n   */\n  taxType?: string | null;\n  /**\n   * The name of the tax against which this tax amount was calculated. For example, \"NY State Sales Tax\", \"Quebec GST\", etc.\n   * This name should be explicit enough to allow the merchant to understand what tax was calculated.\n   * @maxLength 200\n   */\n  taxName?: string | null;\n  /** The type of the jurisdiction in which this tax detail applies. */\n  jurisdictionType?: JurisdictionType;\n}\n\n/** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */\nexport enum JurisdictionType {\n  /** Undefined jurisdiction type. */\n  UNDEFINED = 'UNDEFINED',\n  /** Country jurisdiction. */\n  COUNTRY = 'COUNTRY',\n  /** State jurisdiction. */\n  STATE = 'STATE',\n  /** County jurisdiction. */\n  COUNTY = 'COUNTY',\n  /** City jurisdiction. */\n  CITY = 'CITY',\n  /** Special jurisdiction. */\n  SPECIAL = 'SPECIAL',\n}\n\nexport interface GiftCard {\n  /**\n   * Gift card ID.\n   * @deprecated\n   */\n  _id?: string;\n  /** Gift card obfuscated code. */\n  obfuscatedCode?: string;\n  /** Gift card value. */\n  amount?: MultiCurrencyPrice;\n  /**\n   * App ID of the gift card provider.\n   * @format GUID\n   */\n  appId?: string;\n}\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\nexport interface PriceSummary {\n  /** Subtotal of all line items, before discounts and before tax. */\n  subtotal?: MultiCurrencyPrice;\n  /** Total shipping price, before discounts and before tax. */\n  shipping?: MultiCurrencyPrice;\n  /** Total tax. */\n  tax?: MultiCurrencyPrice;\n  /** Total calculated discount value. */\n  discount?: MultiCurrencyPrice;\n  /** Total price **after** discounts, gift cards, and tax. */\n  total?: MultiCurrencyPrice;\n  /** Total additional fees price **before** tax. */\n  additionalFees?: MultiCurrencyPrice;\n}\n\n/** Billing Info and shipping details */\nexport interface AddressWithContact {\n  /** Address. */\n  address?: Address;\n  /** Contact details. */\n  contactDetails?: FullAddressContactDetails;\n}\n\n/** Physical address */\nexport interface Address {\n  /**\n   * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.\n   * @format COUNTRY\n   */\n  country?: string | null;\n  /**\n   * Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.\n   * @maxLength 50\n   */\n  subdivision?: string | null;\n  /**\n   * City name.\n   * @maxLength 50\n   */\n  city?: string | null;\n  /**\n   * Postal or zip code.\n   * @maxLength 50\n   */\n  postalCode?: string | null;\n  /** Street address. */\n  streetAddress?: StreetAddress;\n  /**\n   * Main address line (usually street name and number).\n   * @maxLength 150\n   */\n  addressLine1?: string | null;\n  /**\n   * Free text providing more detailed address info. Usually contains apt, suite, floor.\n   * @maxLength 100\n   */\n  addressLine2?: string | null;\n  /** Geocode object containing latitude and longitude coordinates. */\n  location?: AddressLocation;\n  /**\n   * Country's full name.\n   * @readonly\n   */\n  countryFullname?: string | null;\n  /**\n   * Subdivision full-name.\n   * @readonly\n   */\n  subdivisionFullname?: 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\n/** Full contact details for an address */\nexport interface FullAddressContactDetails {\n  /**\n   * First name.\n   * @maxLength 100\n   */\n  firstName?: string | null;\n  /**\n   * Last name.\n   * @maxLength 100\n   */\n  lastName?: string | null;\n  /**\n   * Phone number.\n   * @format PHONE\n   */\n  phone?: string | null;\n  /**\n   * Company name.\n   * @maxLength 1000\n   */\n  company?: string | null;\n  /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */\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?: VatType;\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\nexport interface ShippingInfo {\n  /** Selected option out of the options allowed for the `region`. */\n  selectedCarrierServiceOption?: SelectedCarrierServiceOption;\n}\n\nexport interface SelectedCarrierServiceOption {\n  /**\n   * Unique identifier of selected option. For example, `usps_std_overnight`.\n   * @maxLength 100\n   */\n  code?: string;\n  /**\n   * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).\n   * For example, \"Standard\" or \"First-Class Package International\".\n   * @maxLength 250\n   */\n  title?: string;\n  /** Shipping costs. */\n  cost?: SelectedCarrierServiceOptionPrices;\n  /**\n   * Delivery solution allocations to different delivery carriers and delivery regions\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  /** Expected delivery time slot. */\n  deliveryTimeSlot?: DeliveryTimeSlot;\n}\n\nexport interface SelectedCarrierServiceOptionPrices {\n  /** Total shipping price, after discount and after tax. */\n  totalPriceAfterTax?: MultiCurrencyPrice;\n  /** Total price of shipping after discounts (when relevant), and before tax. */\n  totalPriceBeforeTax?: MultiCurrencyPrice;\n  /** Tax details. */\n  taxDetails?: ItemTaxFullDetails;\n  /** Shipping discount before tax. */\n  totalDiscount?: MultiCurrencyPrice;\n  /** Shipping price before discount and before tax. */\n  price?: 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 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\nexport interface CustomFields {\n  /**\n   * List of custom fields\n   * @maxSize 50\n   */\n  fields?: CustomField[];\n}\n\nexport interface CustomField {\n  /** Custom field value. */\n  value?: any;\n  /**\n   * Custom field title.\n   * @minLength 1\n   * @maxLength 500\n   */\n  title?: string;\n  /**\n   * Translated custom field title.\n   * @minLength 1\n   * @maxLength 500\n   */\n  translatedTitle?: string | null;\n}\n\nexport interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {\n  /** Coupon details. */\n  coupon?: Coupon;\n  /** Merchant discount. */\n  merchantDiscount?: MerchantDiscount;\n  /** Discount rule. */\n  discountRule?: DiscountRule;\n  /** Discount type. */\n  discountType?: DiscountType;\n  /**\n   * IDs of the line items the discount applies to.\n   * @format GUID\n   */\n  lineItemIds?: string[];\n}\n\n/** @oneof */\nexport interface AppliedDiscountDiscountSourceOneOf {\n  /** Coupon details. */\n  coupon?: Coupon;\n  /** Merchant discount. */\n  merchantDiscount?: MerchantDiscount;\n  /** Discount rule. */\n  discountRule?: DiscountRule;\n}\n\nexport enum DiscountType {\n  /** Global discount. */\n  GLOBAL = 'GLOBAL',\n  /** Discount for specific items. */\n  SPECIFIC_ITEMS = 'SPECIFIC_ITEMS',\n  /** Shipping discount. */\n  SHIPPING = 'SHIPPING',\n}\n\n/** Coupon */\nexport interface Coupon {\n  /** Coupon ID. */\n  _id?: string;\n  /** Coupon code. */\n  code?: string;\n  /** Coupon name. */\n  name?: string;\n  /** @decimalValue options { gte:0, lte:1000000000000000 } */\n  amount?: string;\n}\n\nexport interface MerchantDiscount {\n  /** @decimalValue options { gte:0, lte:1000000000000000 } */\n  amount?: string;\n}\n\nexport interface DiscountRule {\n  /**\n   * Discount rule ID.\n   * @format GUID\n   */\n  _id?: string;\n  /** Discount rule name. */\n  name?: DiscountRuleName;\n  /** @decimalValue options { gte:0, lte:1000000000000000 } */\n  amount?: string;\n}\n\nexport interface DiscountRuleName {\n  /**\n   * Original discount rule name (in site's default language).\n   * @minLength 1\n   * @maxLength 256\n   */\n  original?: string;\n  /**\n   * Translated discount rule name according to buyer language. Defaults to `original` when not provided.\n   * @minLength 1\n   * @maxLength 500\n   */\n  translated?: string | null;\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\nexport interface GetValidationViolationsResponse {\n  /** List of validation violations. */\n  violations?: Violation[];\n}\n\nexport interface Violation {\n  /** Severity of the violation. The violations are shown on the cart and checkout pages. A warning is displayed as yellow, and allows a site visitor to proceed with caution. An error is displayed as red, and doesn't allow a site visitor to proceed with the eCommerce flow. */\n  severity?: Severity;\n  /** Target location on a checkout or cart page where the violation will be displayed. */\n  target?: Target;\n  /**\n   * Violation description. Can include rich text. Only HTTP or HTTPS links in the following format are allowed: `<a href=\"https://www.wix.com\">Click me</a>`.\n   * @minLength 1\n   * @maxLength 1000\n   */\n  description?: string | null;\n}\n\nexport enum Severity {\n  /** The user is allowed to move forward in the flow. */\n  WARNING = 'WARNING',\n  /**\n   * The user is blocked from moving forward in the flow.\n   * For example, if callerContext is CART - moving to checkout is blocked. if callerContext is CHECKOUT, placing an order is blocked.\n   */\n  ERROR = 'ERROR',\n}\n\nexport interface Target extends TargetTargetTypeOneOf {\n  /** General (other) violation. */\n  other?: Other;\n  /** Specific line item violation. */\n  lineItem?: TargetLineItem;\n}\n\n/** @oneof */\nexport interface TargetTargetTypeOneOf {\n  /** General (other) violation. */\n  other?: Other;\n  /** Specific line item violation. */\n  lineItem?: TargetLineItem;\n}\n\n/** Available locations on the webpage */\nexport enum NameInOther {\n  /** Default location, in case no specific location is specified. */\n  OTHER_DEFAULT = 'OTHER_DEFAULT',\n}\n\n/** Available locations on the line item */\nexport enum NameInLineItem {\n  /** Default location, in case no specific location is specified. */\n  LINE_ITEM_DEFAULT = 'LINE_ITEM_DEFAULT',\n}\n\nexport enum SuggestedFix {\n  /** No suggested fix is specified. The user should refer to the violation description to resolve the issue. */\n  UNKNOWN_SUGGESTED_FIX = 'UNKNOWN_SUGGESTED_FIX',\n  /** The line item should be removed from the cart or checkout to resolve the violation. */\n  REMOVE_LINE_ITEM = 'REMOVE_LINE_ITEM',\n}\n\n/** General (other) violation. */\nexport interface Other {\n  /** Location on a checkout or a cart page where a general (other) violation will be displayed. */\n  name?: NameInOther;\n}\n\n/** Specific line item violation. */\nexport interface TargetLineItem {\n  /** Location on a checkout or a cart page where the specific line item violation will be displayed. */\n  name?: NameInLineItem;\n  /** ID of the line item containing the violation. */\n  _id?: string | null;\n}\n\nexport interface ValidationsSPIConfig {\n  /** Whether to validate the cart page in addition to the checkout page. Default: `false` */\n  validateInCart?: boolean;\n  /**\n   * Required. Base URI where the endpoints are called. Wix appends the endpoint path to the base URI.\n   * For example, to call the Get Validation Violations endpoint at `https://my-validations.com/v1/get-violations`, the base URI you provide here is `https://my-validations.com`.\n   * @minLength 1\n   */\n  deploymentUri?: string;\n}\n\n/**\n * this message is not directly used by any service,\n * it exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.\n * e.g. SPIs, event-handlers, etc..\n * NOTE: this context object MUST be provided as the last argument in each Velo method signature.\n *\n * Example:\n * ```typescript\n * export function wixStores_onOrderCanceled({ event, metadata }: OrderCanceledEvent) {\n * ...\n * }\n * ```\n */\nexport interface Context {\n  /** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */\n  requestId?: string | null;\n  /**\n   * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code.\n   * @format CURRENCY\n   */\n  currency?: string | null;\n  /** An object that describes the identity that triggered this request. */\n  identity?: IdentificationData;\n  /** A string representing a language and region in the format of `\"xx-XX\"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash \"-\", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `\"en-US\"`. */\n  languages?: string[];\n  /**\n   * The service provider app's instance ID.\n   * @format GUID\n   */\n  instanceId?: string | null;\n}\n\nexport enum IdentityType {\n  UNKNOWN = 'UNKNOWN',\n  ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n  MEMBER = 'MEMBER',\n  WIX_USER = 'WIX_USER',\n  APP = 'APP',\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?: IdentityType;\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","import { ServicePluginDefinition } from '@wix/sdk-types';\nimport {\n  Context,\n  GetValidationViolationsRequest,\n  GetValidationViolationsResponse,\n} from './service-plugins-types.js';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\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 {\n  renameKeysFromSDKRequestToRESTRequest,\n  renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\n\nexport interface GetValidationViolationsEnvelope {\n  request: GetValidationViolationsRequest;\n  metadata: Context;\n}\n\nexport const provideHandlers = ServicePluginDefinition<{\n  /**\n   *\n   * This method retrieves validation violations from your app.\n   *\n   * Wix calls this method when certain actions are performed on a visitor's cart and checkout. For example, when an item is added to the cart, or when a coupon is added to a checkout.\n   * This method validates a visitor's cart and checkout, and returns any validation violations (using the structure provided by Wix eCommerce). Site visitors can see the validation violations in their cart and checkout pages. If there aren't any validation violations, the method returns an object containing an empty list.\n   *\n   * > __Notes:__\n   * > + Do not call the Estimate Cart Totals, Estimate Current Cart Totals or Get Checkout methods from your implementation code for Get Validation Violations. Doing so will result in an error.\n   * > + By default, this method only retrieves validation violations from a visitor's checkout. If you want to also retrieve validation violations from a visitor's cart, set the `validateInCart` parameter to `true` in the Ecom Validations Integration's config file. */\n  getValidationViolations(\n    payload: GetValidationViolationsEnvelope\n  ): GetValidationViolationsResponse | Promise<GetValidationViolationsResponse>;\n}>('ECOM_VALIDATIONS', [\n  {\n    name: 'getValidationViolations',\n    primaryHttpMappingPath: '/v1/get-violations',\n    transformations: {\n      toREST: (payload: any) => {\n        const toRestResponse = payload;\n\n        return renameKeysFromSDKRequestToRESTRequest(toRestResponse);\n      },\n      fromREST: (payload: any) => {\n        const fromRestRequest = transformPaths(payload, [\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              {\n                path: 'request.validationInfo.lineItems.physicalProperties.weight',\n              },\n            ],\n          },\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              {\n                path: 'request.validationInfo.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate',\n              },\n              {\n                path: 'request.validationInfo.shippingInfo.selectedCarrierServiceOption.deliveryTimeSlot.from',\n              },\n              {\n                path: 'request.validationInfo.shippingInfo.selectedCarrierServiceOption.deliveryTimeSlot.to',\n              },\n            ],\n          },\n          {\n            transformFn: transformRESTAddressToSDKAddress,\n            paths: [\n              { path: 'request.validationInfo.billingInfo.address' },\n              { path: 'request.validationInfo.shippingAddress.address' },\n            ],\n          },\n        ]);\n\n        return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);\n      },\n    },\n  },\n]);\n","import './interfaces-ecommerce-v1-validations-provider.public.js';\nimport { createServicePluginModule } from '@wix/sdk-runtime/service-plugin-modules';\nimport { BuildServicePluginDefinition } from '@wix/sdk-types';\nimport { provideHandlers as publicProvideHandlers } from './interfaces-ecommerce-v1-validations-provider.public.js';\n\nexport { publicProvideHandlers };\n\nexport const provideHandlers: BuildServicePluginDefinition<\n  typeof publicProvideHandlers\n> &\n  typeof publicProvideHandlers = createServicePluginModule(\n  publicProvideHandlers\n);\n"],"mappings":"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","names":["Source","CheckoutStage","DimensionsUnit","ItemTypePreset","SubscriptionFrequency","ProductPeriodAlignment","JurisdictionType","WeightUnit","VatType","DiscountType","Severity","NameInOther","NameInLineItem","SuggestedFix","IdentityType","provideHandlers"]}