{"version":3,"sources":["../../src/pricing-plans-plan-subscriptions-v1-plan-subscription-plan-subscriptions.universal.ts","../../src/pricing-plans-plan-subscriptions-v1-plan-subscription-plan-subscriptions.http.ts","../../src/pricing-plans-plan-subscriptions-v1-plan-subscription-plan-subscriptions.public.ts","../../src/pricing-plans-plan-subscriptions-v1-plan-subscription-plan-subscriptions.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n  renameKeysFromSDKRequestToRESTRequest,\n  renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n  HttpClient,\n  HttpResponse,\n  NonNullablePaths,\n  QuerySpec,\n  Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixPricingPlansPlanSubscriptionsV1PlanSubscription from './pricing-plans-plan-subscriptions-v1-plan-subscription-plan-subscriptions.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\n\n/**\n * A plan subscription is created when a buyer purchases a Pricing Plans plan through eCommerce.\n * It links the purchase to the plan and the buyer.\n * Plan subscriptions are read-only.\n */\nexport interface PlanSubscription {\n  /**\n   * Plan subscription ID.\n   * @format GUID\n   * @readonly\n   */\n  _id?: string;\n  /**\n   * Billing subscription this plan subscription projects.\n   * @internal\n   * @readonly\n   */\n  billingSubscription?: BillingSubscription;\n  /**\n   * ID of the member who holds the plan subscription.\n   * @format GUID\n   * @readonly\n   */\n  memberId?: string;\n  /**\n   * The id of the payment provider order to pay for this subscription. Only filled in on upserted plan subscriptions\n   * where it's filled in explicitly.\n   * @internal\n   * @format GUID\n   * @readonly\n   */\n  paymentProviderOrderId?: string | null;\n  /**\n   * Form submission the buyer made when purchasing the plan.\n   * @readonly\n   */\n  formSubmission?: FormSubmission;\n  /**\n   * ID of the eCommerce subscription contract behind the plan subscription.\n   *\n   * Available in the eCommerce order as `lineItems.subscriptionInfo.id`.\n   * @format GUID\n   * @readonly\n   */\n  subscriptionContractId?: string | null;\n  /**\n   * The data about the v2 Order Pricing details. It is required for Price mapping and will be filled only for migrated entities.\n   * @internal\n   * @readonly\n   */\n  orderPricingDetails?: OrderPricingDetails;\n  /**\n   * Coupon the buyer applied at checkout.\n   * @internal\n   * @readonly\n   */\n  coupon?: Coupon;\n  /**\n   * Benefit cycle details. The plan's benefits are distributed per cycle, according to `settings`.\n   * @readonly\n   */\n  benefitDistribution?: BenefitDistribution;\n  /**\n   * ID of the plan the subscription is for.\n   *\n   * Changes when the subscription moves to another plan. The plan at purchase time isn't available.\n   * @format GUID\n   * @readonly\n   */\n  planId?: string;\n  /**\n   * ID of the plan's pricing variant the subscription is for.\n   *\n   * Empty for some older plan subscriptions. Changes when the subscription moves to another pricing variant.\n   * @format GUID\n   * @readonly\n   */\n  pricingVariantId?: string | null;\n  /**\n   * Why the plan subscription ended.\n   *\n   * Set only while `billingSubscription.status` is `ENDED`. Empty when the reason isn't known, including for plan subscriptions that ended before this field was added.\n   * @internal\n   * @readonly\n   */\n  endReason?: EndReasonWithLiterals;\n}\n\n/** Billing subscription is a read only subset of data exposed by BASS subscriptions */\nexport interface BillingSubscription {\n  /**\n   * Subscription's unique id. Automatically generated and read-only.\n   * @format GUID\n   */\n  _id?: string;\n  /** Date when subscription was created */\n  _createdDate?: Date | null;\n  /** Date when subscription was updated */\n  _updatedDate?: Date | null;\n  /** Revision of subscription. Increments upon changes */\n  revision?: string | null;\n  /** Status of subscription */\n  status?: SubscriptionStatusEnumSubscriptionStatusWithLiterals;\n  /** Information related to cancellation for already canceled subscription or scheduled for cancel */\n  cancellationInfo?: BillingSubscriptionCancellationInfo;\n  /** Billing details parameters including schedule, currency, etc. */\n  billingSettings?: BillingSubscriptionBillingSettings;\n  /**\n   * If start_date is set in the future: custom_billing_schedule.cycles_to_pay_on_creation should be set to 1\n   * in order to pay on creation for first cycle, Subscription will be then activated in the future.\n   * Future start_date is not supported for `SEND_INVOICE` CollectionMethod\n   * If start_date is set in past, it means subscription was already started.\n   */\n  startDate?: Date | null;\n  /**\n   * Represents when the subscription will end, relevant for subscriptions with a termed period.\n   * If not provided, will be calculated based on billing schedule. Should be empty for evergreen subscription.\n   * Note: A 13-hour tolerance is applied when validating the end date to handle for time zone differences and minor discrepancies.\n   */\n  endDate?: Date | null;\n  /** Information related to either paused subscription or scheduled for future pause */\n  pauseInfo?: BillingSubscriptionPauseInfo;\n  /** The plan line item in the subscription. This is a subset of the line items on the subscription. */\n  planLineItem?: PlanLineItem;\n  /** Includes many attributes about billing status of the subscription */\n  billingStatus?: BillingSubscriptionBillingStatus;\n  /**\n   * ChangesCounter of subscription. Increments upon every change to the domain\n   * @readonly\n   */\n  changesCounter?: string | null;\n  /** Platform origin subscription is coming from */\n  platformOrigin?: BillingSubscriptionPlatformOrigin;\n  /**\n   * Pending update for the next billing cycle.\n   * @readonly\n   */\n  pendingUpdateData?: BillingSubscriptionSubscriptionUpdateData;\n  /**\n   * Pending update for a specific date.\n   * @readonly\n   */\n  specificDatePendingUpdateData?: BillingSubscriptionSpecificDateSubscriptionUpdateData;\n}\n\nexport interface BillingSubscriptionPaymentData {\n  /**\n   * See BASS documentation\n   * @format GUID\n   */\n  invoiceId?: string;\n  /** See BASS documentation */\n  paymentStatus?: PaymentDataPaymentStatusWithLiterals;\n  /** See BASS documentation */\n  totals?: BillingSubscriptionTotals;\n  /** See BASS documentation */\n  initialFailedPaymentDate?: Date | null;\n}\n\nexport enum PaymentDataPaymentStatus {\n  /** Payment status unknown */\n  UNKNOWN = 'UNKNOWN',\n  /** Payment has not been paid */\n  UNPAID = 'UNPAID',\n  /** Payment has been paid */\n  PAID = 'PAID',\n  /** Payment failed */\n  FAILED = 'FAILED',\n}\n\n/** @enumType */\nexport type PaymentDataPaymentStatusWithLiterals =\n  | PaymentDataPaymentStatus\n  | 'UNKNOWN'\n  | 'UNPAID'\n  | 'PAID'\n  | 'FAILED';\n\nexport interface BillingSubscriptionTotals {\n  /**\n   * Total price of the subscription that the customer must pay per billing\n   * cycle. Calculated as: `subtotal + tax + shippingFee + applicationFee + extraCharge - discount - credit`\n   * @format DECIMAL_VALUE\n   * @readonly\n   */\n  totalPrice?: string;\n  /**\n   * Subtotal of all line items that belong to the subscription.\n   * Calculated as: `sum_{i=1}^{n} (itemPrice[i] * quantity[i])`\n   * @format DECIMAL_VALUE\n   * @readonly\n   */\n  subtotal?: string;\n  /**\n   * Total tax.\n   * @format DECIMAL_VALUE\n   * @readonly\n   */\n  tax?: string | null;\n  /**\n   * Total discount.\n   * @format DECIMAL_VALUE\n   * @readonly\n   */\n  discount?: string | null;\n  /**\n   * Total application fee.\n   * @format DECIMAL_VALUE\n   * @readonly\n   */\n  applicationFee?: string | null;\n  /**\n   * Total shipping fee.\n   * @format DECIMAL_VALUE\n   * @readonly\n   */\n  shippingFee?: string | null;\n  /**\n   * Total charges.\n   * @format DECIMAL_VALUE\n   * @readonly\n   */\n  extraCharge?: string | null;\n  /**\n   * Total credits.\n   * @format DECIMAL_VALUE\n   * @readonly\n   */\n  credit?: string | null;\n  /**\n   * The tax amount of the proration.\n   * @format DECIMAL_VALUE\n   * @readonly\n   */\n  prorationTax?: string | null;\n}\n\nexport interface BillingSubscriptionDuration {\n  /** Duration unit: DAY, WEEK, MONTH, YEAR */\n  unit?: DurationDurationUnitWithLiterals;\n  /**\n   * Amount of units. For example,  1 MONTH, 1 YEAR, 2 WEEKS, etc. Optional. Default is 1.\n   * @min 1\n   */\n  count?: number | null;\n}\n\nexport enum DurationDurationUnit {\n  UNKNOWN = 'UNKNOWN',\n  DAY = 'DAY',\n  WEEK = 'WEEK',\n  MONTH = 'MONTH',\n  YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type DurationDurationUnitWithLiterals =\n  | DurationDurationUnit\n  | 'UNKNOWN'\n  | 'DAY'\n  | 'WEEK'\n  | 'MONTH'\n  | 'YEAR';\n\nexport enum CollectionMethodEnumCollectionMethod {\n  UNKNOWN = 'UNKNOWN',\n  /** Subscriber automatically charged */\n  AUTO_CHARGE = 'AUTO_CHARGE',\n  /** Payments manually collected and managed by owner */\n  OFFLINE = 'OFFLINE',\n  /** Payment will be collected somehow. Billing only issues invoice per cycle. */\n  SEND_INVOICE = 'SEND_INVOICE',\n  /** Payment will be collected externally */\n  EXTERNAL = 'EXTERNAL',\n  /** Subscription is free */\n  FREE = 'FREE',\n}\n\n/** @enumType */\nexport type CollectionMethodEnumCollectionMethodWithLiterals =\n  | CollectionMethodEnumCollectionMethod\n  | 'UNKNOWN'\n  | 'AUTO_CHARGE'\n  | 'OFFLINE'\n  | 'SEND_INVOICE'\n  | 'EXTERNAL'\n  | 'FREE';\n\nexport interface BillingSubscriptionTaxSettings {\n  /** If true then taxes are included in given prices */\n  inclusive?: boolean;\n}\n\nexport interface BillingSubscriptionAdditionalFee {\n  /**\n   * Name of the conditional fee.\n   *\n   * Max: 500 characters\n   * @maxLength 500\n   */\n  name?: string;\n  /**\n   * Amount of the conditional fee.\n   *\n   * Min: `0.01`\n   * @decimalValue options { gt:0.00, maxScale:4 }\n   */\n  amount?: string;\n  /**\n   * Specifies the cycles during which the fee will be applied. If this field is provided,\n   * it determines the exact range of cycles the fee applies to. The logic is as follows:\n   *\n   * - `cycle_from`: The first cycle the fee will be added to. Must be greater than 0.\n   * - `number_of_cycles`: The number of consecutive cycles the fee will be applied to,\n   * starting from `cycle_from`. If not specified, the fee applies to all cycles starting\n   * from `cycle_from`.\n   *\n   * Example:\n   * - `cycle_from = 1, number_of_cycles = 3`: Fee applies to cycles 1, 2, and 3.\n   * - `cycle_from = 2, number_of_cycles = None`: Fee applies to cycles 2 and onward indefinitely.\n   *\n   * If `cycles` is not specified (`None`), the fee will be applied on all cycles.\n   */\n  cycles?: BillingSubscriptionCycles;\n}\n\nexport interface BillingSubscriptionCycles {\n  /**\n   * The cycle will start. Minimum cycle number is 1\n   * @min 1\n   */\n  cycleFrom?: number;\n  /**\n   * Number of cycles to be applied on. In order to apply a on all cycles until the end of the subscription, this field should be empty.\n   * @min 1\n   */\n  numberOfCycles?: number | null;\n}\n\n/** A subset of BASS's `Discount`. Presence indicates the subscription is discounted. */\nexport interface BillingSubscriptionDiscount\n  extends BillingSubscriptionDiscountValueOneOf {\n  /**\n   * Discount amount.\n   * Available when the discount is an amount.\n   *\n   * Min: `0.01`\n   * @decimalValue options { gt:0.00, maxScale:4 }\n   */\n  amount?: string;\n  /**\n   * Discount percentage.\n   * Available when the discount is a percentage value.\n   *\n   * Min: `0.01`\n   * Max: `100`\n   * @decimalValue options { gt:0.00, lte:100, maxScale:4 }\n   */\n  percentage?: string;\n  /** The cycles the discount is applied on. Empty means all cycles. */\n  cycles?: BillingSubscriptionDiscountCycles;\n  /** Origin the discount is coming from */\n  origin?: BillingSubscriptionDiscountOrigin;\n}\n\n/** @oneof */\nexport interface BillingSubscriptionDiscountValueOneOf {\n  /**\n   * Discount amount.\n   * Available when the discount is an amount.\n   *\n   * Min: `0.01`\n   * @decimalValue options { gt:0.00, maxScale:4 }\n   */\n  amount?: string;\n  /**\n   * Discount percentage.\n   * Available when the discount is a percentage value.\n   *\n   * Min: `0.01`\n   * Max: `100`\n   * @decimalValue options { gt:0.00, lte:100, maxScale:4 }\n   */\n  percentage?: string;\n}\n\nexport interface BillingSubscriptionDiscountCycles {\n  /**\n   * The cycle from which the discount will start. Minimum cycle number is 1\n   * @min 1\n   */\n  cycleFrom?: number;\n  /**\n   * Number of cycles the discount is applied on. Empty means all cycles until the end of the subscription.\n   * @min 1\n   */\n  numberOfCycles?: number | null;\n}\n\nexport interface BillingSubscriptionDiscountOrigin {\n  /**\n   * ID of the app the discount is coming from\n   * @format GUID\n   */\n  appId?: string;\n  /**\n   * ID of the entity the discount is coming from\n   * @format GUID\n   */\n  entityId?: string;\n}\n\nexport interface BillingSubscriptionPricingModel\n  extends BillingSubscriptionPricingModelModelOneOf {\n  /** Details about the fixed item price. */\n  fixedPrice?: PricingModelFixedPrice;\n}\n\n/** @oneof */\nexport interface BillingSubscriptionPricingModelModelOneOf {\n  /** Details about the fixed item price. */\n  fixedPrice?: PricingModelFixedPrice;\n}\n\nexport interface PricingModelFixedPrice {\n  /**\n   * Fixed item price with a period as a decimal separator. For example, `3.99`.\n   * Price doesn't include tax, discounts, or application fee.\n   *\n   * Min: `0.01`\n   * @decimalValue options { gte:0.00, maxScale:4 }\n   */\n  itemPrice?: string;\n}\n\n/** A subset of BASS's `ItemChange`. A pending change to a single subscription item. */\nexport interface BillingSubscriptionItemChange {\n  /**\n   * ID of the subscription item the change applies to\n   * @format GUID\n   */\n  _id?: string;\n  /** The new pricing model of the item */\n  pricingModel?: BillingSubscriptionPricingModel;\n}\n\n/** A subset of BASS's `SubscriptionUpdateData`. Pending changes to subscription items. */\nexport interface BillingSubscriptionSubscriptionUpdateData {\n  /**\n   * Pending item changes\n   * @maxSize 100\n   */\n  itemsToUpdate?: BillingSubscriptionItemChange[];\n}\n\nexport enum CancellationInfoHistoryActionInitiator {\n  UNDEFINED = 'UNDEFINED',\n  BUSINESS = 'BUSINESS',\n  CUSTOMER = 'CUSTOMER',\n  SYSTEM = 'SYSTEM',\n  PAYMENT_FAILURE = 'PAYMENT_FAILURE',\n}\n\n/** @enumType */\nexport type CancellationInfoHistoryActionInitiatorWithLiterals =\n  | CancellationInfoHistoryActionInitiator\n  | 'UNDEFINED'\n  | 'BUSINESS'\n  | 'CUSTOMER'\n  | 'SYSTEM'\n  | 'PAYMENT_FAILURE';\n\nexport enum PausePolicyEnumPausePolicy {\n  NONE = 'NONE',\n  /** Pause the payment and the service. When resuming, the subscription end date is extended by the number of cycles postponed, and if the pause happened in a middle of a cycle, the payment date is postponed by the amount of days that already paid. */\n  SERVICE_AND_PAYMENTS = 'SERVICE_AND_PAYMENTS',\n  /** Pause the service and continue the billing. When resuming, extend the service by the time that was paused */\n  SERVICE_ONLY = 'SERVICE_ONLY',\n}\n\n/** @enumType */\nexport type PausePolicyEnumPausePolicyWithLiterals =\n  | PausePolicyEnumPausePolicy\n  | 'NONE'\n  | 'SERVICE_AND_PAYMENTS'\n  | 'SERVICE_ONLY';\n\nexport enum PauseAtEnumPauseAt {\n  /** Cancel scheduled pause */\n  NONE = 'NONE',\n  /** Pause the subscription now */\n  IMMEDIATELY = 'IMMEDIATELY',\n  /** Pause the subscription at the next billing date */\n  NEXT_BILLING_DATE = 'NEXT_BILLING_DATE',\n  /** A specific date must be defined in Schedule.specific_date */\n  SPECIFIC_DATE = 'SPECIFIC_DATE',\n  /** The number of cycles must be defined in Schedule.number_of_cycles */\n  NUMBER_OF_CYCLES_FROM_TODAY = 'NUMBER_OF_CYCLES_FROM_TODAY',\n  /** NEW: Clearer semantics for skip-cycle - counts from next billing cycle */\n  NUMBER_OF_CYCLES_FROM_NEXT_BILLING_DATE = 'NUMBER_OF_CYCLES_FROM_NEXT_BILLING_DATE',\n}\n\n/** @enumType */\nexport type PauseAtEnumPauseAtWithLiterals =\n  | PauseAtEnumPauseAt\n  | 'NONE'\n  | 'IMMEDIATELY'\n  | 'NEXT_BILLING_DATE'\n  | 'SPECIFIC_DATE'\n  | 'NUMBER_OF_CYCLES_FROM_TODAY'\n  | 'NUMBER_OF_CYCLES_FROM_NEXT_BILLING_DATE';\n\nexport enum ResumeAtEnumResumeAt {\n  /** Cancel scheduled resume */\n  NONE = 'NONE',\n  /** Resume the subscription now */\n  IMMEDIATELY = 'IMMEDIATELY',\n  /** Resume the subscription at the next billing date */\n  NEXT_BILLING_DATE = 'NEXT_BILLING_DATE',\n  /** A specific date must be defined in Schedule.specific_date */\n  SPECIFIC_DATE = 'SPECIFIC_DATE',\n  /** NEW: For cycle-based auto-resume - counts cycles to skip from pause start */\n  NUMBER_OF_CYCLES_FROM_PAUSE_START = 'NUMBER_OF_CYCLES_FROM_PAUSE_START',\n}\n\n/** @enumType */\nexport type ResumeAtEnumResumeAtWithLiterals =\n  | ResumeAtEnumResumeAt\n  | 'NONE'\n  | 'IMMEDIATELY'\n  | 'NEXT_BILLING_DATE'\n  | 'SPECIFIC_DATE'\n  | 'NUMBER_OF_CYCLES_FROM_PAUSE_START';\n\nexport enum SubscriptionStatusEnumSubscriptionStatus {\n  UNKNOWN = 'UNKNOWN',\n  /** Subscription created in this status, but hasn't been paid for yet. Filtered out from subscriptions querying. */\n  DRAFT = 'DRAFT',\n  /** Subscription that will be active in future. */\n  PENDING = 'PENDING',\n  /** Subscription is active */\n  ACTIVE = 'ACTIVE',\n  /** Subscription is paused */\n  PAUSED = 'PAUSED',\n  /** Subscription was ended */\n  ENDED = 'ENDED',\n  /** Subscription was canceled or auto-renew off. Ended before its time. */\n  CANCELED = 'CANCELED',\n}\n\n/** @enumType */\nexport type SubscriptionStatusEnumSubscriptionStatusWithLiterals =\n  | SubscriptionStatusEnumSubscriptionStatus\n  | 'UNKNOWN'\n  | 'DRAFT'\n  | 'PENDING'\n  | 'ACTIVE'\n  | 'PAUSED'\n  | 'ENDED'\n  | 'CANCELED';\n\nexport interface BillingSubscriptionCancellationInfo {\n  /** Subscription cancel date. Can contain a future or past date */\n  cancellationDate?: Date | null;\n  /** Initiator for cancellation */\n  initiator?: CancellationInfoHistoryActionInitiatorWithLiterals;\n  /**\n   * Reason for cancellation. Optional.\n   * NOTE: the max length is not defined on BASS, so this is just a guess\n   * @maxLength 1000\n   */\n  reason?: string | null;\n}\n\nexport interface BillingSubscriptionBillingSettings {\n  /**\n   * Duration of cycle. For example, 1 MONTH, 2 WEEKS, 7 DAYS, 1 YEAR etc.\n   * Shortest supported cycle duration is 7 days.\n   */\n  cycleDuration?: BillingSubscriptionDuration;\n  /**\n   * Number of billing cycles. If not set subscription auto-renewed until cycle-auto-renew will be disabled.\n   * @min 1\n   */\n  totalCycles?: number | null;\n  /** If set to false, subscription will be canceled at the next billing cycle. */\n  cycleAutoRenew?: boolean;\n  /** Instructs how payments will be collected. */\n  collectionMethod?: CollectionMethodEnumCollectionMethodWithLiterals;\n  /** Definition of trial period */\n  freeTrialDuration?: BillingSubscriptionDuration;\n  /**\n   * Currency of all subscription items prices. Three letter ISO currency code. https://en.wikipedia.org/wiki/ISO_4217\n   * @format CURRENCY\n   */\n  currency?: string;\n  /** Tax settings information for the given prices */\n  taxSettings?: BillingSubscriptionTaxSettings;\n  /**\n   * Fees that are only added to an invoice when a specific condition is met.\n   * For example, a setup fee that only applies to the very first invoice of a\n   * subscription.\n   *\n   * Max: 5 additional fees\n   * @maxSize 5\n   */\n  additionalFees?: BillingSubscriptionAdditionalFee[];\n  /**\n   * General discounts applied to all subscription items.\n   * @maxSize 5\n   * @readonly\n   */\n  discounts?: BillingSubscriptionDiscount[];\n}\n\nexport interface BillingSubscriptionPauseInfo {\n  /** See BASS documentation */\n  pausePolicy?: PausePolicyEnumPausePolicyWithLiterals;\n  /** See BASS documentation */\n  pauseAt?: PauseAtEnumPauseAtWithLiterals;\n  /** See BASS documentation */\n  startDate?: Date | null;\n  /** See BASS documentation */\n  startCycle?: number | null;\n  /** See BASS documentation */\n  resumeAt?: ResumeAtEnumResumeAtWithLiterals;\n  /** See BASS documentation */\n  resumeDate?: Date | null;\n  /** See BASS documentation */\n  resumeCycle?: number | null;\n}\n\nexport interface PlanLineItem {\n  /**\n   * The id of the plan\n   * @format GUID\n   */\n  planId?: string;\n  /** The billing pricing model for the plan */\n  pricingModel?: BillingSubscriptionPricingModel;\n  /**\n   * The name of the plan at the time of purchase\n   * @minLength 1\n   * @maxLength 200\n   */\n  name?: string;\n  /**\n   * The description of the plan at the time of purchase\n   * @maxLength 500\n   */\n  description?: string | null;\n  /**\n   * The id of the pricing variant selected at the time of purchase\n   * @format GUID\n   */\n  pricingVariantId?: string | null;\n  /**\n   * Discounts applied to the plan line item.\n   * @maxSize 5\n   * @readonly\n   */\n  discounts?: BillingSubscriptionDiscount[];\n  /**\n   * ID of the corresponding subscription item in BASS.\n   * @format GUID\n   * @readonly\n   */\n  _id?: string | null;\n}\n\nexport interface BillingSubscriptionBillingStatus {\n  /**\n   * Current cycle of subscription billing schedule. When billing schedule starts cycles start from 1\n   * and incremented each next billing cycle.\n   * In case billing schedule not started (free trial, pay later start later) then current_cycle will remain 0\n   */\n  currentCycle?: number;\n  /** Date when charge will be for next billing cycle */\n  nextBillingDate?: Date | null;\n  /** Previous Date charged for previous billing cycle */\n  previousBillingDate?: Date | null;\n  /** last payment details */\n  latestPaymentData?: BillingSubscriptionPaymentData;\n}\n\nexport interface BillingSubscriptionPlatformOrigin {\n  /**\n   * The application that created the subscription.\n   * @format GUID\n   */\n  appId?: string | null;\n}\n\n/** A subset of BASS's `SpecificDateSubscriptionUpdateData`. */\nexport interface BillingSubscriptionSpecificDateSubscriptionUpdateData {\n  /** The pending update data */\n  updateData?: BillingSubscriptionSubscriptionUpdateData;\n  /** Date at which the pending update will be applied */\n  executionDate?: Date | null;\n}\n\n/** Form the buyer filled in when purchasing the plan. */\nexport interface FormSubmission {\n  /**\n   * ID of the form the submission belongs to. Empty if the form couldn't be found when the plan subscription was created.\n   * @format GUID\n   */\n  formId?: string | null;\n  /**\n   * ID of the form submission.\n   * @format GUID\n   */\n  submissionId?: string;\n}\n\nexport interface OrderPricingDetails {\n  /** Type of payment schedule and its details. */\n  pricingModel?: V1PricingModel;\n}\n\nexport interface V1PricingModel extends V1PricingModelPricingModelOneOf {\n  /** Pricing model for an order with recurring payment cycles. */\n  subscription?: Recurrence;\n  /** Pricing model for an order with a one-time payment and the order is valid for a specific amount of time. */\n  singlePaymentForDuration?: V1Duration;\n  /** Pricing model for an order with a one-time payment and the order is valid until canceled. */\n  singlePaymentUnlimited?: boolean | null;\n}\n\n/** @oneof */\nexport interface V1PricingModelPricingModelOneOf {\n  /** Pricing model for an order with recurring payment cycles. */\n  subscription?: Recurrence;\n  /** Pricing model for an order with a one-time payment and the order is valid for a specific amount of time. */\n  singlePaymentForDuration?: V1Duration;\n  /** Pricing model for an order with a one-time payment and the order is valid until canceled. */\n  singlePaymentUnlimited?: boolean | null;\n}\n\n/** An object specifying how often and for how long payments recur (may be forever). */\nexport interface Recurrence {\n  /**\n   * Number of payment cycles the subscription is valid for.\n   * `0` for unlimited plans or for plans that are valid until canceled.\n   */\n  cycleDuration?: V1Duration;\n  /**\n   * Length of a payment cycle. For example, 1 month to have monthly payments.\n   * Multiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration.\n   * Currently, only a value of `1` is supported.\n   * @max 2000\n   */\n  cycleCount?: number | null;\n}\n\n/** A duration expressed in number of time units. */\nexport interface V1Duration {\n  /**\n   * Number of days, months, weeks, or years in a single payment cycle. Currently limited to support only `1`.\n   * @min 1\n   */\n  count?: number | null;\n  /** Unit of time for the cycle duration. */\n  unit?: PeriodUnitWithLiterals;\n}\n\nexport enum PeriodUnit {\n  /** Not defined. */\n  UNDEFINED = 'UNDEFINED',\n  /** Time unit is a day. */\n  DAY = 'DAY',\n  /** Time unit is a week. */\n  WEEK = 'WEEK',\n  /** Time unit is a month. */\n  MONTH = 'MONTH',\n  /** Time unit is a year. */\n  YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type PeriodUnitWithLiterals =\n  | PeriodUnit\n  | 'UNDEFINED'\n  | 'DAY'\n  | 'WEEK'\n  | 'MONTH'\n  | 'YEAR';\n\n/** Coupon applied to the purchase. */\nexport interface Coupon {\n  /**\n   * Code of the applied coupon.\n   * @minLength 1\n   * @maxLength 20\n   * @readonly\n   */\n  code?: string;\n  /**\n   * Coupon ID.\n   * @format GUID\n   * @readonly\n   */\n  _id?: string;\n}\n\n/** Benefit cycle of a plan subscription. */\nexport interface BenefitDistribution {\n  /** The plan's benefit distribution settings. Updated when the plan's settings change. */\n  settings?: BenefitDistributionSettings;\n  /**\n   * Current benefit cycle number. The first benefit cycle is `0`, and the number increases by 1 at the start of each cycle. Pausing and resuming the plan subscription doesn't change it.\n   * @readonly\n   */\n  currentCycle?: number;\n  /**\n   * Date and time the current benefit cycle started.\n   * @readonly\n   */\n  currentCycleStartDate?: Date | null;\n  /**\n   * Date and time the current benefit cycle ends.\n   * @readonly\n   */\n  currentCycleEndDate?: Date | null;\n  /**\n   * Date and time the current benefit cycle was suspended, because the plan subscription was paused or a payment is overdue.\n   * Empty while the cycle runs.\n   * @readonly\n   */\n  currentCyclePauseDate?: Date | null;\n}\n\nexport interface BenefitDistributionSettings\n  extends BenefitDistributionSettingsDistributionStrategyOneOf {\n  /** Custom schedule */\n  customScheduleOptions?: CustomScheduleOptions;\n  /** The distribution strategy of the benefits for this subscription, which is used to determine how the benefits are distributed in each cycle. */\n  distributionStrategyType?: DistributionStrategyTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface BenefitDistributionSettingsDistributionStrategyOneOf {\n  /** Custom schedule */\n  customScheduleOptions?: CustomScheduleOptions;\n}\n\nexport enum CustomScheduleOptionsDurationDurationUnit {\n  UNKNOWN = 'UNKNOWN',\n  DAY = 'DAY',\n  WEEK = 'WEEK',\n  MONTH = 'MONTH',\n  YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type CustomScheduleOptionsDurationDurationUnitWithLiterals =\n  | CustomScheduleOptionsDurationDurationUnit\n  | 'UNKNOWN'\n  | 'DAY'\n  | 'WEEK'\n  | 'MONTH'\n  | 'YEAR';\n\nexport interface CustomScheduleOptionsDuration {\n  /** Duration unit: DAY, WEEK, MONTH, YEAR */\n  unit?: CustomScheduleOptionsDurationDurationUnitWithLiterals;\n  /**\n   * Amount of units. For example,  1 MONTH, 1 YEAR, 2 WEEKS, etc. Optional. Default is 1.\n   * @min 1\n   */\n  count?: number | null;\n}\n\nexport enum DistributionStrategyType {\n  UNKNOWN_DISTRIBUTION_STRATEGY_TYPE = 'UNKNOWN_DISTRIBUTION_STRATEGY_TYPE',\n  PER_BILLING_CYCLE = 'PER_BILLING_CYCLE',\n  CUSTOM_SCHEDULE = 'CUSTOM_SCHEDULE',\n}\n\n/** @enumType */\nexport type DistributionStrategyTypeWithLiterals =\n  | DistributionStrategyType\n  | 'UNKNOWN_DISTRIBUTION_STRATEGY_TYPE'\n  | 'PER_BILLING_CYCLE'\n  | 'CUSTOM_SCHEDULE';\n\nexport interface CustomScheduleOptions {\n  /** Cycle duration */\n  cycleDuration?: CustomScheduleOptionsDuration;\n}\n\nexport enum EndReason {\n  /** The plan subscription reached its end date. */\n  END_DATE_REACHED = 'END_DATE_REACHED',\n  /** The plan subscription ended early because the buyer used up all of the plan's benefits. */\n  BENEFITS_USED_UP = 'BENEFITS_USED_UP',\n}\n\n/** @enumType */\nexport type EndReasonWithLiterals =\n  | EndReason\n  | 'END_DATE_REACHED'\n  | 'BENEFITS_USED_UP';\n\n/**\n * Triggers Billing Subscription's metadata update with pricingVariantId.\n * This update can't be done in migration itself to prevent race condition between order-plan-subscription-migration and membership-api when updating the BASS subscription.\n *\n * TODO: PPNP-5144 Cleanup PlanSubscription migration messaging\n */\nexport interface OrderPlanSubscriptionMigrated {\n  /**\n   * Id of the migrated plan subscription (== order id).\n   * @format GUID\n   */\n  planSubscriptionId?: string;\n  /**\n   * Plan Id.\n   * @format GUID\n   */\n  planId?: string;\n  /**\n   * Billing subscription Id.\n   * @format GUID\n   */\n  billingSubscriptionId?: string;\n  /**\n   * Pricing variant Id.\n   * @format GUID\n   */\n  pricingVariantId?: string;\n}\n\n/** TODO: review docs */\nexport interface PlanSubscriptionPurchased {\n  /** Plan subscription that was paid for. If a free or an offline order, the order that was created. */\n  planSubscription?: PlanSubscription;\n}\n\n/**\n * Triggered at the start of a new payment cycle for an existing order.\n *\n * This webhook does not trigger at the initial start of an offline order.\n */\nexport interface PlanSubscriptionCycleStarted {\n  /** Plan subscription whose new cycle started. */\n  planSubscription?: PlanSubscription;\n  /** Number of the payment cycle will be 0 when the order is in the free trial period. In other cases, the cycle number starts from 1. */\n  cycleNumber?: number;\n}\n\nexport interface PlanSubscriptionPaused {\n  /** Paused plan subscription. */\n  planSubscription?: PlanSubscription;\n}\n\nexport interface PlanSubscriptionResumed {\n  /** Resumed plan subscription. */\n  planSubscription?: PlanSubscription;\n}\n\nexport interface PlanSubscriptionEnded {\n  /** Plan subscription that ended. */\n  planSubscription?: PlanSubscription;\n}\n\nexport interface PlanSubscriptionStarted {\n  /** Plan subscription that reached its `startDate`. */\n  planSubscription?: PlanSubscription;\n}\n\nexport interface PlanSubscriptionMarkedAsPaid {\n  /** Plan subscription that was marked as paid. */\n  planSubscription?: PlanSubscription;\n}\n\n/** Emitted when a recurring plan subscription is canceled for the next payment cycle */\nexport interface PlanSubscriptionAutoRenewCanceled {\n  /** Plan subscription that is canceled, effective at the end of the current payment cycle. */\n  planSubscription?: PlanSubscription;\n}\n\n/** Emitted when a recurring plan subscription has its auto renewal turned on again from the next payment cycle */\nexport interface PlanSubscriptionAutoRenewTurnedOn {\n  /** Plan subscription that is active */\n  planSubscription?: PlanSubscription;\n}\n\n/**\n * Emitted when a plan subscription is canceled immediately or when cycle ends for a plan subscription with canceled auto renewal\n *\n * To determine the specific reason of the cancellation check `plan_subscription.billingSubscription.cancellationInfo` field.\n */\nexport interface PlanSubscriptionCanceled {\n  /** Canceled plan subscription. */\n  planSubscription?: PlanSubscription;\n}\n\nexport interface PlanSubscriptionEndDatePostponed {\n  /** Plan subscription whose `endDate` was postponed. */\n  planSubscription?: PlanSubscription;\n}\n\nexport interface PlanSubscriptionRevived {\n  /** Plan subscription that was revived. */\n  planSubscription?: PlanSubscription;\n}\n\nexport interface PlanSubscriptionStartDateChanged {\n  /** Plan subscription whose `startDate` changed. */\n  planSubscription?: PlanSubscription;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n  createdEvent?: EntityCreatedEvent;\n  updatedEvent?: EntityUpdatedEvent;\n  deletedEvent?: EntityDeletedEvent;\n  actionEvent?: ActionEvent;\n  /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n  _id?: string;\n  /**\n   * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n   * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n   */\n  entityFqdn?: string;\n  /**\n   * Event action name, placed at the top level to make it easier for users to dispatch messages.\n   * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n   */\n  slug?: string;\n  /** ID of the entity associated with the event. */\n  entityId?: string;\n  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n  eventTime?: Date | null;\n  /**\n   * Whether the event was triggered as a result of a privacy regulation application\n   * (for example, GDPR).\n   */\n  triggeredByAnonymizeRequest?: boolean | null;\n  /** If present, indicates the action that triggered the event. */\n  originatedFrom?: string | null;\n  /**\n   * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n   * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n   */\n  entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n  createdEvent?: EntityCreatedEvent;\n  updatedEvent?: EntityUpdatedEvent;\n  deletedEvent?: EntityDeletedEvent;\n  actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n  entity?: string;\n}\n\nexport interface RestoreInfo {\n  deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n  /**\n   * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n   * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n   * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n   */\n  currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n  /** Entity that was deleted. */\n  deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n  body?: string;\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  /** Details related to the account */\n  accountInfo?: AccountInfo;\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\nexport interface GetPlanSubscriptionRequest {\n  /**\n   * Plan subscription ID.\n   * @format GUID\n   */\n  subscriptionId: string;\n}\n\nexport interface GetPlanSubscriptionResponse {\n  /** Retrieved plan subscription. */\n  planSubscription?: PlanSubscription;\n}\n\nexport interface UpsertPlanSubscriptionRequest {\n  /** The BASS subscription for a plan that we want to get the projection for. */\n  subscription?: Subscription;\n  /**\n   * The payment provider order id that corresponds to this subscription.\n   * @format GUID\n   */\n  paymentProviderOrderId?: string | null;\n  /**\n   * The form submission associated with this subscription. This value will be used instead of resolving\n   * the submission id through related entities.\n   */\n  formSubmission?: FormSubmission;\n}\n\nexport interface Subscription {\n  /**\n   * Subscription's unique id. Automatically generated and read-only.\n   * @format GUID\n   * @readonly\n   */\n  _id?: string | null;\n  /**\n   * Date when subscription was created\n   * @readonly\n   */\n  _createdDate?: Date | null;\n  /**\n   * Date when subscription was updated\n   * @readonly\n   */\n  _updatedDate?: Date | null;\n  /**\n   * Revision of subscription. Increments upon changes\n   * @readonly\n   */\n  revision?: string | null;\n  /**\n   * Subscription name: minLength is 1, maxLength is 150\n   * @maxLength 150\n   */\n  name?: string;\n  /**\n   * Subscription description. Optional.\n   * @maxLength 500\n   */\n  description?: string | null;\n  /**\n   * 3. No Start Date:\n   * - If the start_date is not provided, this field will default to \"now\",\n   * meaning the subscription will start immediately.\n   */\n  startDate?: Date | null;\n  /**\n   * Represents when the subscription will end, relevant for subscriptions with a termed period.\n   * If not provided, will be calculated based on billing schedule. Should be empty for evergreen subscription.\n   * Note: A 13-hour tolerance is applied when validating the end date to handle for time zone differences and minor discrepancies.\n   */\n  endDate?: Date | null;\n  /** Business origin subscription is coming from. In site-level subscription it will be vertical app_id and entity_id */\n  origin?: BusinessOrigin;\n  /** Customer information like id and identity type (member or contact) */\n  customer?: Customer;\n  /**\n   * Status of subscription\n   * @readonly\n   */\n  status?: SubscriptionStatusWithLiterals;\n  /** Billing details parameters including schedule, currency, etc. */\n  billingSettings?: BillingSettings;\n  /**\n   * Includes many attributes about billing status of the subscription\n   * @readonly\n   */\n  billingStatus?: BillingStatus;\n  /** Shipping address associated with subscription. At the moment used only for payments. Optional. */\n  shippingAddress?: FullAddressDetails;\n  /** Restrictions on possible subscription actions. If not provided, default policies are all restrictions enabled. */\n  policies?: SubscriptionPolicies;\n  /**\n   * Information related to either paused subscription or scheduled for future pause\n   * @readonly\n   */\n  pauseInfo?: PauseInfo;\n  /**\n   * Information related to cancellation for already canceled subscription or scheduled for cancel\n   * @readonly\n   */\n  cancellationInfo?: CancellationInfo;\n  /**\n   * Pending update for the next billing cycle\n   * @readonly\n   */\n  pendingUpdateData?: SubscriptionUpdateData;\n  /**\n   * Indicator whether subscription is managed by BASS or external system, like SAPI, for example.\n   * @internal\n   * @readonly\n   */\n  bassManaged?: boolean;\n  /**\n   * Key / Value store to keep up to 10 additional values related to the subscription.\n   * Key max length = 50, Value max length = 200. Value can not be empty.\n   * Should not include any sensitive or PII information.\n   * @maxSize 10\n   */\n  metadata?: Record<string, string>;\n  /**\n   * Pending update for a specific date\n   * @readonly\n   */\n  specificDatePendingUpdateData?: SpecificDateSubscriptionUpdateData;\n  /**\n   * ChangesCounter of subscription. Increments upon every change to the domain\n   * @readonly\n   */\n  changesCounter?: string | null;\n  /**\n   * Billing order id. Optional.\n   * @format GUID\n   */\n  orderId?: string | null;\n  /** Platform origin subscription is coming from. */\n  platformOrigin?: PlatformOrigin;\n  /**\n   * The Business Location ID represents a business location in an external service, which includes the business address.\n   * @format GUID\n   */\n  businessLocationId?: string | null;\n  /**\n   * Indicates BASS needs an operator choice for billing start when resuming this subscription.\n   * @internal\n   * @readonly\n   */\n  requiresResumeBillingStartChoice?: boolean;\n  /**\n   * items, minSize is 1, maxSize is 100\n   * @maxSize 100\n   */\n  items?: Item[];\n  /**\n   * Indicates that a contract change is scheduled to take effect at the next renewal.\n   * Present only when a ChangeSubscription with effective_time AT_NEXT_RENEWAL was accepted.\n   * @readonly\n   */\n  scheduledContractChange?: ScheduledContractChange;\n}\n\nexport interface BusinessOrigin {\n  /** @format GUID */\n  appId?: string | null;\n  /** @format GUID */\n  entityId?: string | null;\n}\n\nexport interface Customer extends CustomerIdOneOf {\n  /**\n   * Visitor ID of the customer. Available when the customer is an anonymous\n   * site visitor.\n   * @format GUID\n   */\n  visitorId?: string;\n  /**\n   * Contact ID of the customer. Available when the customer is a\n   * [contact](https://dev.wix.com/docs/rest/api-reference/people-communications/contacts/contacts/contact-v-4#contact-object).\n   * @format GUID\n   */\n  contactId?: string;\n  /**\n   * Member ID of the customer. Available when the customer is a\n   * [member](https://dev.wix.com/docs/rest/api-reference/people-communications/members/members#member-object).\n   * @format GUID\n   */\n  memberId?: string;\n  /**\n   * Wix account ID\n   * @format GUID\n   */\n  accountId?: string;\n}\n\n/** @oneof */\nexport interface CustomerIdOneOf {\n  /**\n   * Visitor ID of the customer. Available when the customer is an anonymous\n   * site visitor.\n   * @format GUID\n   */\n  visitorId?: string;\n  /**\n   * Contact ID of the customer. Available when the customer is a\n   * [contact](https://dev.wix.com/docs/rest/api-reference/people-communications/contacts/contacts/contact-v-4#contact-object).\n   * @format GUID\n   */\n  contactId?: string;\n  /**\n   * Member ID of the customer. Available when the customer is a\n   * [member](https://dev.wix.com/docs/rest/api-reference/people-communications/members/members#member-object).\n   * @format GUID\n   */\n  memberId?: string;\n  /**\n   * Wix account ID\n   * @format GUID\n   */\n  accountId?: string;\n}\n\nexport enum SubscriptionStatus {\n  UNKNOWN = 'UNKNOWN',\n  /** Subscription created in this status, but hasn't been paid for yet. Filtered out from subscriptions querying. */\n  DRAFT = 'DRAFT',\n  /** Subscription that will be active in future. */\n  PENDING = 'PENDING',\n  /** Subscription is active */\n  ACTIVE = 'ACTIVE',\n  /** Subscription is paused */\n  PAUSED = 'PAUSED',\n  /** Subscription was ended */\n  ENDED = 'ENDED',\n  /** Subscription was canceled or auto-renew off. Ended before its time. */\n  CANCELED = 'CANCELED',\n}\n\n/** @enumType */\nexport type SubscriptionStatusWithLiterals =\n  | SubscriptionStatus\n  | 'UNKNOWN'\n  | 'DRAFT'\n  | 'PENDING'\n  | 'ACTIVE'\n  | 'PAUSED'\n  | 'ENDED'\n  | 'CANCELED';\n\nexport interface BillingSettings {\n  /**\n   * Currency of all subscription items prices. Three letter ISO currency code. https://en.wikipedia.org/wiki/ISO_4217\n   * @format CURRENCY\n   */\n  currency?: string;\n  /** customer payment source to make recurring payments with */\n  paymentMethod?: PaymentMethod;\n  /** Instructs how payments will be collected. */\n  collectionMethod?: CollectionMethodWithLiterals;\n  /**\n   * Duration of cycle. For example, 1 MONTH, 2 WEEKS, 7 DAYS, 1 YEAR etc.\n   * Shortest supported cycle duration is 7 days.\n   */\n  cycleDuration?: Duration;\n  /**\n   * Number of billing cycles. If not set subscription auto-renewed until cycle-auto-renew will be disabled.\n   * @min 1\n   */\n  totalCycles?: number | null;\n  /** If set to false, subscription will be canceled at the next billing cycle. */\n  cycleAutoRenew?: boolean;\n  /** Billing Schedule to be defined in order to override default billing schedule */\n  customBillingSchedule?: CustomBillingSchedule;\n  /** Definition of trial period */\n  freeTrialDuration?: Duration;\n  /**\n   * Shipping costs collected each cycle\n   * @format DECIMAL_VALUE\n   * @deprecated\n   * @replacedBy shipping_charges\n   * @targetRemovalDate 2024-10-31\n   */\n  shippingFee?: string | null;\n  /** Billing address associated with subscription to be used for payments. */\n  billingAddress?: FullAddressDetails;\n  taxSettings?: TaxSettings;\n  /**\n   * Fees that are only added to an invoice when a specific condition is met.\n   * For example, a setup fee that only applies to the very first invoice of a\n   * subscription.\n   *\n   * Max: 5 additional fees\n   * @maxSize 5\n   */\n  additionalFees?: AdditionalFee[];\n  /** Shipping fee charges */\n  shippingCharges?: ShippingCharges;\n  /**\n   * General discount that applied to all items in the subscription\n   * @maxSize 5\n   */\n  discounts?: Discount[];\n  /**\n   * Details about the external collection service.\n   * Only set when the collection_method is EXTERNAL.\n   */\n  externalCollectionDetails?: ExternalCollectionDetails;\n  /**\n   * Day of month (1-28) on which the first recurring billing date is anchored.\n   * Applies to monthly subscriptions only. Subsequent billing dates may shift\n   * if the subscription is modified (e.g. payment date update, pause/resume).\n   * @internal\n   * @min 1\n   * @max 28\n   */\n  billingAnchorDay?: number | null;\n}\n\nexport interface PaymentMethod {\n  /**\n   * reference to payment source id stored in payments system\n   * @format GUID\n   */\n  _id?: string;\n}\n\nexport enum CollectionMethod {\n  UNKNOWN = 'UNKNOWN',\n  /** Subscriber automatically charged */\n  AUTO_CHARGE = 'AUTO_CHARGE',\n  /** Payments manually collected and managed by owner */\n  OFFLINE = 'OFFLINE',\n  /** Payment will be collected somehow. Billing only issues invoice per cycle. */\n  SEND_INVOICE = 'SEND_INVOICE',\n  /** Payment will be collected externally */\n  EXTERNAL = 'EXTERNAL',\n  /** Indicates the product has a zero amount, meaning its free with no payment required. */\n  FREE = 'FREE',\n}\n\n/** @enumType */\nexport type CollectionMethodWithLiterals =\n  | CollectionMethod\n  | 'UNKNOWN'\n  | 'AUTO_CHARGE'\n  | 'OFFLINE'\n  | 'SEND_INVOICE'\n  | 'EXTERNAL'\n  | 'FREE';\n\nexport interface Duration {\n  /** Duration unit: DAY, WEEK, MONTH, YEAR */\n  unit?: DurationUnitWithLiterals;\n  /**\n   * Amount of units. For example,  1 MONTH, 1 YEAR, 2 WEEKS, etc. Optional. Default is 1.\n   * @min 1\n   */\n  count?: number | null;\n}\n\nexport enum DurationUnit {\n  UNKNOWN = 'UNKNOWN',\n  DAY = 'DAY',\n  WEEK = 'WEEK',\n  MONTH = 'MONTH',\n  YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type DurationUnitWithLiterals =\n  | DurationUnit\n  | 'UNKNOWN'\n  | 'DAY'\n  | 'WEEK'\n  | 'MONTH'\n  | 'YEAR';\n\nexport interface CustomBillingSchedule {\n  /**\n   * Amount of cycles to be paid on Subscription creation, currently only cycles_to_pay_on_creation equals to 1 is supported\n   * When used with Subscription.start_date, Subscription cycles will be paid on creation but Subscription will be activated in the future\n   * @min 1\n   * @max 1\n   */\n  cyclesToPayOnCreation?: number | null;\n}\n\nexport interface FullAddressDetails {\n  /** Details about the person associated with the address. */\n  contactDetails?: FullAddressContactDetails;\n  /** Information about the address. */\n  address?: Address;\n}\n\nexport interface FullAddressContactDetails {\n  /** First name of the contact. */\n  firstName?: string | null;\n  /** Last name of the contact. */\n  lastName?: string | null;\n  /**\n   * Phone number of the contact.\n   * @format PHONE\n   */\n  phone?: string | null;\n  /** Company associated with the contact. */\n  company?: string | null;\n  /**\n   * Email address of the contact.\n   * @format EMAIL\n   */\n  email?: string | null;\n}\n\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   * 2-letter country code in\n   * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\n   * format.\n   * @format COUNTRY\n   */\n  country?: string | null;\n  /**\n   * Subdivision. Usually a state, region, prefecture, or province code,\n   * according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2).\n   */\n  subdivision?: string | null;\n  /** City name. */\n  city?: string | null;\n  /** Zip/postal code. */\n  postalCode?: 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 TaxSettings {\n  /** If true then taxes are included in given prices */\n  inclusive?: boolean;\n}\n\nexport interface AdditionalFee {\n  /**\n   * Name of the conditional fee.\n   *\n   * Max: 500 characters\n   * @maxLength 500\n   */\n  name?: string;\n  /**\n   * Amount of the conditional fee.\n   *\n   * Min: `0.01`\n   * @decimalValue options { gt:0.00 }\n   */\n  amount?: string;\n  /**\n   * When the fee is added to the invoice.\n   *\n   * + `UNKNOWN_FEE_TRIGGER`: There is no information about when the fee is added to an invoice.\n   * + `FIRST_PAYMENT`: The fee is only added to the very first invoice of a subscription.\n   * @deprecated When the fee is added to the invoice.\n   *\n   * + `UNKNOWN_FEE_TRIGGER`: There is no information about when the fee is added to an invoice.\n   * + `FIRST_PAYMENT`: The fee is only added to the very first invoice of a subscription.\n   * @replacedBy cycles\n   * @targetRemovalDate 2025-12-31\n   */\n  trigger?: AdditionalFeeTriggerWithLiterals;\n  /** Information about the tax of the conditional fee. */\n  tax?: Tax;\n  /**\n   * Specifies the cycles during which the fee will be applied. If this field is provided,\n   * it determines the exact range of cycles the fee applies to. The logic is as follows:\n   *\n   * - `cycle_from`: The first cycle the fee will be added to. Must be greater than 0.\n   * - `number_of_cycles`: The number of consecutive cycles the fee will be applied to,\n   * starting from `cycle_from`. If not specified, the fee applies to all cycles starting\n   * from `cycle_from`.\n   *\n   * Example:\n   * - `cycle_from = 1, number_of_cycles = 3`: Fee applies to cycles 1, 2, and 3.\n   * - `cycle_from = 2, number_of_cycles = None`: Fee applies to cycles 2 and onward indefinitely.\n   *\n   * If `cycles` is not specified (`None`), the fee will be applied on all cycles.\n   */\n  cycles?: Cycles;\n  /** Indicates the source of the fee, Contains app_id and entity_id */\n  origin?: Origin;\n}\n\nexport enum AdditionalFeeTrigger {\n  UNKNOWN = 'UNKNOWN',\n  /** Charge upon subscription first payment */\n  FIRST_PAYMENT = 'FIRST_PAYMENT',\n}\n\n/** @enumType */\nexport type AdditionalFeeTriggerWithLiterals =\n  | AdditionalFeeTrigger\n  | 'UNKNOWN'\n  | 'FIRST_PAYMENT';\n\nexport interface Tax extends TaxValueOneOf {\n  /**\n   * Tax amount for the invoice's line item. Available when the tax is an\n   * amount and not a precentage.\n   *\n   * Min: `0.01`\n   * @decimalValue options { gt:0.00 }\n   */\n  amount?: string;\n  /**\n   * Tax amount for the invoice's line item price and application fee.\n   * Can't be combined with `invoiceItems.priceDetails.discount`.\n   * Available when the tax is a precentage and not an amount.\n   *\n   * Min: `0.01`\n   * Max: `100`\n   * @decimalValue options { gt:0.00, lte:100 }\n   */\n  percentage?: string;\n  /** Dynamic tax calculation */\n  dynamic?: DynamicTax;\n}\n\n/** @oneof */\nexport interface TaxValueOneOf {\n  /**\n   * Tax amount for the invoice's line item. Available when the tax is an\n   * amount and not a precentage.\n   *\n   * Min: `0.01`\n   * @decimalValue options { gt:0.00 }\n   */\n  amount?: string;\n  /**\n   * Tax amount for the invoice's line item price and application fee.\n   * Can't be combined with `invoiceItems.priceDetails.discount`.\n   * Available when the tax is a precentage and not an amount.\n   *\n   * Min: `0.01`\n   * Max: `100`\n   * @decimalValue options { gt:0.00, lte:100 }\n   */\n  percentage?: string;\n  /** Dynamic tax calculation */\n  dynamic?: DynamicTax;\n}\n\nexport interface DynamicTax {\n  /**\n   * Tax group ID used to calculate tax, default will be used if not available\n   * @format GUID\n   */\n  taxGroupId?: string | null;\n  /** Taxable address used to calculate tax */\n  taxableAddressType?: TaxableAddressTypeWithLiterals;\n}\n\nexport enum TaxableAddressType {\n  UNKNOWN = 'UNKNOWN',\n  /** Tax will be calculated using a single address */\n  BUSINESS = 'BUSINESS',\n  /** Tax will be calculated using multiple address (from BUSINESS to BILLING) */\n  BILLING = 'BILLING',\n  /** Tax will be calculated using multiple address (from BUSINESS to SHIPPING) */\n  SHIPPING = 'SHIPPING',\n}\n\n/** @enumType */\nexport type TaxableAddressTypeWithLiterals =\n  | TaxableAddressType\n  | 'UNKNOWN'\n  | 'BUSINESS'\n  | 'BILLING'\n  | 'SHIPPING';\n\nexport interface Cycles {\n  /**\n   * The cycle will start. Minimum cycle number is 1\n   * @min 1\n   */\n  cycleFrom?: number;\n  /**\n   * Number of cycles to be applied on. In order to apply a on all cycles until the end of the subscription, this field should be empty.\n   * @min 1\n   */\n  numberOfCycles?: number | null;\n}\n\nexport interface Origin {\n  /** @format GUID */\n  appId?: string;\n  /** @format GUID */\n  entityId?: string;\n}\n\nexport interface ShippingCharges {\n  /**\n   * Amount of the shipping fee in `0.00` format.\n   *\n   * Min: `0.01`\n   * @decimalValue options { gte:0.00, maxScale:4 }\n   */\n  amount?: string;\n  /** Tax of the shipping fee */\n  tax?: Tax;\n  /** @maxSize 5 */\n  discounts?: Discount[];\n}\n\nexport interface Discount extends DiscountValueOneOf {\n  /**\n   * Discount amount.\n   * Available when the discount is an amount.\n   *\n   * Min: `0.01`\n   * @decimalValue options { gt:0.00 }\n   */\n  amount?: string;\n  /**\n   * Discount percentage.\n   * Available when the discount is a parcentage value.\n   *\n   * Min: `0.01`\n   * Max: `100`\n   * @decimalValue options { gt:0.00, lte:100 }\n   */\n  percentage?: string;\n  cycles?: DiscountCycles;\n  /** Discount origin is coming from. Contains app_id and entity_id */\n  origin?: DiscountOrigin;\n  /**\n   * Discount display name, for example the coupon name.\n   * For display only. Not used for validation, pricing or matching.\n   *\n   * Max: 500 characters\n   * @maxLength 500\n   */\n  name?: string | null;\n}\n\n/** @oneof */\nexport interface DiscountValueOneOf {\n  /**\n   * Discount amount.\n   * Available when the discount is an amount.\n   *\n   * Min: `0.01`\n   * @decimalValue options { gt:0.00 }\n   */\n  amount?: string;\n  /**\n   * Discount percentage.\n   * Available when the discount is a parcentage value.\n   *\n   * Min: `0.01`\n   * Max: `100`\n   * @decimalValue options { gt:0.00, lte:100 }\n   */\n  percentage?: string;\n}\n\nexport interface DiscountCycles {\n  /**\n   * The cycle from which the discount will start. Minimum cycle number is 1\n   * @min 1\n   */\n  cycleFrom?: number;\n  /**\n   * Number of cycles to be applied on them discount. In order to apply a discount on all cycles until the end of the subscription, this field should be empty.\n   * @min 1\n   */\n  numberOfCycles?: number | null;\n}\n\nexport interface DiscountOrigin {\n  /** @format GUID */\n  appId?: string;\n  /** @format GUID */\n  entityId?: string;\n}\n\nexport interface ExternalCollectionDetails {\n  /** The name of the external collector. */\n  collectorName?: string;\n}\n\nexport interface BillingStatus {\n  /**\n   * Current cycle of subscription billing schedule. When billing schedule starts cycles start from 1\n   * and incremented each next billing cycle.\n   * In case billing schedule not started (free trial, pay later start later) then current_cycle will remain 0\n   */\n  currentCycle?: number;\n  /** how many cycled are remaining, For auto-renew subscriptions is not set. */\n  remainingCycles?: number | null;\n  /** Date when charge will be for next billing cycle */\n  nextBillingDate?: Date | null;\n  /** Previous Date charged for previous billing cycle */\n  previousBillingDate?: Date | null;\n  /** last payment details */\n  latestPaymentData?: PaymentData;\n  /** Free trial data */\n  freeTrialData?: FreeTrialData;\n  /**\n   * Update billing date operation data\n   * @internal\n   */\n  updateBillingDateData?: UpdateBillingDateData;\n  /**\n   * Grace period information during grace period after payment failure\n   * @readonly\n   */\n  gracePeriodData?: GracePeriodData;\n  /**\n   * Lifetime cycle number at which the current contract started. Current cycle remains\n   * the lifetime billing cycle number. Absent for subscriptions using legacy cycle semantics.\n   * @readonly\n   * @min 1\n   */\n  contractStartCycle?: number | null;\n  /**\n   * Number of new_contract changes activated on this subscription over its lifetime.\n   * Absent until the first contract change completes.\n   * @readonly\n   * @min 1\n   */\n  contractChangeCount?: number | null;\n}\n\nexport interface PaymentData {\n  /**\n   * Latest payment's invoice ID\n   * @format GUID\n   */\n  invoiceId?: string;\n  /** Latest payment's status: UNPAID/PAID/FAILED */\n  paymentStatus?: PaymentStatusWithLiterals;\n  /** Latest payment's totals. */\n  totals?: Totals;\n  initialFailedPaymentDate?: Date | null;\n  /** Tax-related data for the latest payment */\n  taxData?: PaymentTaxData;\n  /**\n   * Currency used when this payment was made. Three letter ISO currency code.\n   * @format CURRENCY\n   */\n  currency?: string | null;\n}\n\nexport enum PaymentStatus {\n  /** Payment status unknown */\n  UNKNOWN = 'UNKNOWN',\n  /** Payment has not been paid */\n  UNPAID = 'UNPAID',\n  /** Payment has been paid // TODO: p13n review: we are not sending event when in SEND_INVOICE mode cycle was paid. should we and which event? */\n  PAID = 'PAID',\n  /** Payment failed */\n  FAILED = 'FAILED',\n}\n\n/** @enumType */\nexport type PaymentStatusWithLiterals =\n  | PaymentStatus\n  | 'UNKNOWN'\n  | 'UNPAID'\n  | 'PAID'\n  | 'FAILED';\n\nexport interface Totals {\n  /**\n   * Total price of the subscription that the customer must pay per billing\n   * cycle. Calculated as: `subtotal + tax + shippingFee + applicationFee + extraCharge - discount - credit`\n   * Note: platformFee is NOT included in this calculation as it is absorbed by the merchant and does not affect the customer's total.\n   * @format DECIMAL_VALUE\n   * @readonly\n   */\n  totalPrice?: string;\n  /**\n   * Subtotal of all line items that belong to the subscription.\n   * Calculated as: `sum_{i=1}^{n} (itemPrice[i] * quantity[i])`\n   * @format DECIMAL_VALUE\n   * @readonly\n   */\n  subtotal?: string;\n  /**\n   * Total tax.\n   * @format DECIMAL_VALUE\n   * @readonly\n   */\n  tax?: string | null;\n  /**\n   * Tax-exempt amount.\n   * @format DECIMAL_VALUE\n   * @decimalValue options { gte:0.00, maxScale:4 }\n   * @readonly\n   */\n  exempt?: string | null;\n  /**\n   * Total discount.\n   * @format DECIMAL_VALUE\n   * @readonly\n   */\n  discount?: string | null;\n  /**\n   * Total application fee.\n   * @format DECIMAL_VALUE\n   * @readonly\n   */\n  applicationFee?: string | null;\n  /**\n   * Total shipping fee.\n   * @format DECIMAL_VALUE\n   * @readonly\n   */\n  shippingFee?: string | null;\n  /**\n   * Total extra charges without tax.\n   * @format DECIMAL_VALUE\n   * @readonly\n   */\n  extraCharge?: string | null;\n  /**\n   * Total credits without tax.\n   * @format DECIMAL_VALUE\n   * @readonly\n   */\n  credit?: string | null;\n  /**\n   * The tax amount for the proration, which is also included in the total tax.\n   * @format DECIMAL_VALUE\n   * @readonly\n   */\n  prorationTax?: string | null;\n  /**\n   * Platform fee calculated based on vertical-specific billing settings configuration.\n   * @format DECIMAL_VALUE\n   * @decimalValue options { gte:0.00, maxScale:4 }\n   * @readonly\n   */\n  platformFee?: string | null;\n}\n\nexport interface PaymentTaxData {\n  /**\n   * A detailed breakdown of the tax authorities for all subscription items from the latest payment\n   * @minSize 1\n   * @maxSize 100\n   */\n  taxBreakdowns?: TaxBreakdown[];\n  /**\n   * Tax amount for all subscription items\n   * @format DECIMAL_VALUE\n   * @decimalValue options { gte:0.00, maxScale:4 }\n   */\n  taxAmount?: string | null;\n}\n\nexport interface TaxBreakdown {\n  taxType?: string;\n  /** @decimalValue options { maxScale:6 } */\n  taxRate?: string;\n  /** @format DECIMAL_VALUE */\n  taxAmount?: string | null;\n  /** @format DECIMAL_VALUE */\n  taxableAmount?: string | null;\n  /** @format DECIMAL_VALUE */\n  nonTaxableAmount?: string | null;\n  /**\n   * Name of the tax that was calculated. For example, \"NY State Sales Tax\", \"Quebec GST\", etc.\n   * @maxLength 200\n   */\n  taxName?: string | null;\n  /**\n   * Jurisdiction that taxes were calculated for.\n   * @maxLength 200\n   */\n  jurisdiction?: string | null;\n  /** Type of jurisdiction that taxes were calculated for. */\n  jurisdictionType?: string;\n  /**\n   * Provider-specific metadata (e.g., Avalara trans/svc codes for financial reporting)\n   * @maxSize 20\n   */\n  metadata?: Record<string, string>;\n}\n\nexport interface FreeTrialData {\n  /**\n   * Date when free trial starts\n   * @readonly\n   */\n  startDate?: Date | null;\n  /**\n   * Date when free trial ends\n   * @readonly\n   */\n  endDate?: Date | null;\n}\n\nexport interface UpdateBillingDateData {\n  /**\n   * Date until the subscription is paid for.\n   * Different from `nextBillingDate` only when the next billing date is updated without immediately issuing a new invoice.\n   */\n  paidUntil?: Date | null;\n  /** Information about how to adjust the item's payment due to the update of the billing date */\n  proration?: Proration;\n}\n\nexport interface Proration extends ProrationTypeOneOf {\n  /**\n   * BASS automatically calculates the proration amount based on the number\n   * of days added to or removed from the current billing cycle. BASS uses\n   * this formula to calculate the charge or credit amount:\n   * `(Subscription total for the current billing cycle) * (number of days added to or removed from the current billing cycle) / (total number of days for the current billing cycle before the adjustment)`.\n   * For example, the customer has paid 100 UDS for the current\n   * billing cycle that last 31 days, and you want to extend the cycle by 8\n   * days. Then, BASS calculates the proration amount like this:\n   * `100 USD * 8 days / 31 days`, which equals `25.81 USD`.\n   */\n  timeBased?: TimeBasedProration;\n  /** Proration amount that's based on your custom calculation. */\n  custom?: CustomProration;\n}\n\n/** @oneof */\nexport interface ProrationTypeOneOf {\n  /**\n   * BASS automatically calculates the proration amount based on the number\n   * of days added to or removed from the current billing cycle. BASS uses\n   * this formula to calculate the charge or credit amount:\n   * `(Subscription total for the current billing cycle) * (number of days added to or removed from the current billing cycle) / (total number of days for the current billing cycle before the adjustment)`.\n   * For example, the customer has paid 100 UDS for the current\n   * billing cycle that last 31 days, and you want to extend the cycle by 8\n   * days. Then, BASS calculates the proration amount like this:\n   * `100 USD * 8 days / 31 days`, which equals `25.81 USD`.\n   */\n  timeBased?: TimeBasedProration;\n  /** Proration amount that's based on your custom calculation. */\n  custom?: CustomProration;\n}\n\nexport interface TimeBasedProration {}\n\nexport interface CustomProration extends CustomProrationAmountOneOf {\n  /**\n   * Proration charge amount that's based on your custom calculation.\n   * Increases the total that the customer must pay with the next invoice.\n   *\n   * Min: `0.01`\n   * @decimalValue options { gt:0.00 }\n   */\n  charge?: string;\n  /**\n   * Proration credit amount that's based on your custom calculation.\n   * Lowers the total that the customer must pay with the next invoice.\n   *\n   * Min: `0.01`\n   * @decimalValue options { gt:0.00 }\n   */\n  credit?: string;\n}\n\n/** @oneof */\nexport interface CustomProrationAmountOneOf {\n  /**\n   * Proration charge amount that's based on your custom calculation.\n   * Increases the total that the customer must pay with the next invoice.\n   *\n   * Min: `0.01`\n   * @decimalValue options { gt:0.00 }\n   */\n  charge?: string;\n  /**\n   * Proration credit amount that's based on your custom calculation.\n   * Lowers the total that the customer must pay with the next invoice.\n   *\n   * Min: `0.01`\n   * @decimalValue options { gt:0.00 }\n   */\n  credit?: string;\n}\n\nexport interface GracePeriodData {\n  /**\n   * Grace period start date\n   * @readonly\n   */\n  startDate?: Date | null;\n  /**\n   * Grace period end date\n   * @readonly\n   */\n  endDate?: Date | null;\n  /** Automatic retry data during grade period, if have any. Optional. */\n  automaticRetryData?: AutomaticRetryData;\n}\n\nexport interface AutomaticRetryData {\n  enabled?: boolean;\n}\n\nexport interface SubscriptionPolicies {\n  /** Subscription can be canceled by the customer who bought it */\n  customerCanCancel?: boolean;\n  /** Subscription end date can be updated by business */\n  businessCanExtend?: boolean;\n  /** Subscription can be canceled not only immediately, but also at end of billing cycle by turning off auto-renew */\n  allowEndOfCycleCancellation?: boolean;\n  /**\n   * Deprecated. Never in production. BASS does not read or write this field; UoU gates use\n   * `CustomerSettingsResolver` → BBS `customer_settings_by_app_def_id` or Legacy booleans above.\n   * @deprecated\n   */\n  customerActionSettings?: CustomerActionSettings;\n  /**\n   * Number of self-service actions already used on this subscription.\n   * @readonly\n   */\n  customerActionCounters?: CustomerActionCounters;\n}\n\n/**\n * Per-action merchant configuration for customer self-service actions.\n * All booleans use BoolValue (optional) so verticals can selectively override defaults.\n */\nexport interface CustomerActionSettings {\n  /** Skip cycle action settings */\n  skip?: SkipActionSettings;\n  /** Pause/resume action settings */\n  pauseResume?: PauseResumeActionSettings;\n  /** Cancel action settings */\n  cancel?: CancelActionSettings;\n  /** Update payment method action settings */\n  upm?: UpmActionSettings;\n  /** Update billing date action settings */\n  updateBillingDate?: UpdateBillingDateActionSettings;\n}\n\n/** Controls skip cycle functionality — lets a customer skip one or more billing cycles. */\nexport interface SkipActionSettings {\n  /** Whether the skip action is enabled */\n  enabled?: boolean | null;\n  /** Skip action configuration */\n  configuration?: SkipActionConfiguration;\n}\n\n/** Configuration for the skip cycle action. */\nexport interface SkipActionConfiguration {\n  /** Maximum number of billing cycles a customer can skip */\n  maxSkipCycles?: number | null;\n  /** Minimum days before billing date to allow skip */\n  daysBeforeSkipAllowed?: number | null;\n  /** Minimum days before billing date to allow resume from skip */\n  daysBeforeResumeAllowed?: number | null;\n  /** Minimum days before billing date to cancel a scheduled skip */\n  daysBeforeCancelSkipAllowed?: number | null;\n  /** Maximum number of times a customer can perform skip action */\n  maxSkipUserActions?: number | null;\n  /** Allow skipping the next billing cycle */\n  skipNextCycle?: boolean | null;\n  /** Allow skipping future billing cycles */\n  skipFutureCycles?: boolean | null;\n  /** Allow reversing a pending skip */\n  unskip?: boolean | null;\n  /** Allow cancelling a scheduled skip-pause */\n  cancelScheduledPause?: boolean | null;\n  /** Allow immediate resume from skip */\n  resumeImmediately?: boolean | null;\n  /** Allow resume at the next billing date */\n  resumeAtNextBillingDate?: boolean | null;\n  /** Allow resume at a specific date */\n  resumeAtSpecificDate?: boolean | null;\n  /** Allow setting auto-resume after N cycles */\n  autoResumeCycles?: boolean | null;\n}\n\n/**\n * Subscription pause/resume settings — full pause of billing, not skip.\n * Skip action (temporary pause for N cycles) is configured via SkipActionSettings.\n */\nexport interface PauseResumeActionSettings {\n  /** Whether the pause/resume action is enabled */\n  enabled?: boolean | null;\n  /** Pause/resume action configuration */\n  configuration?: PauseResumeActionConfiguration;\n}\n\n/**\n * Configuration for the subscription pause/resume action.\n * Skip action (temporary pause for N cycles) is configured via SkipActionConfiguration.\n */\nexport interface PauseResumeActionConfiguration {\n  /** Minimum days before billing date to allow pause */\n  daysBeforePauseAllowed?: number | null;\n  /** Maximum cycles for auto-resume after pause */\n  maxAutoResumeCycles?: number | null;\n  /** Minimum days before billing date to allow resume */\n  daysBeforeResumeAllowed?: number | null;\n  /** Minimum days before billing to cancel scheduled pause */\n  daysBeforeCancelScheduledPauseAllowed?: number | null;\n  /** Maximum number of times a customer can perform pause action */\n  maxPauseUserActions?: number | null;\n}\n\n/** Cancel subscription action settings. */\nexport interface CancelActionSettings {\n  /** Whether the cancel action is enabled */\n  enabled?: boolean | null;\n  /** Cancel action configuration */\n  configuration?: CancelActionConfiguration;\n}\n\n/** Configuration for the cancel subscription action. */\nexport interface CancelActionConfiguration {\n  /** Minimum days before period end to allow cancellation */\n  minDaysBeforePeriodEnd?: number | null;\n}\n\n/** Update Payment Method action settings — toggle only, no additional configuration. */\nexport interface UpmActionSettings {\n  /** Whether the update payment method action is enabled */\n  enabled?: boolean | null;\n}\n\n/** Update billing date action settings. */\nexport interface UpdateBillingDateActionSettings {\n  /** Whether the update billing date action is enabled */\n  enabled?: boolean | null;\n  /** Update billing date configuration */\n  configuration?: UpdateBillingDateActionConfiguration;\n}\n\n/** Configuration for the update billing date action. */\nexport interface UpdateBillingDateActionConfiguration {\n  /** Whether to adjust price when billing date changes */\n  priceAdjustmentEnabled?: boolean | null;\n  /** Maximum days the billing date can be moved forward */\n  maxDaysAdvance?: number | null;\n  /** Maximum days the billing date can be postponed */\n  maxDaysPostpone?: number | null;\n  /** Minimum days from today for the new billing date */\n  minDaysFromToday?: number | null;\n  /** Whether to allow advancing billing date for weekly subscriptions */\n  allowAdvanceForWeekly?: boolean | null;\n}\n\nexport interface CustomerActionCounters {\n  /**\n   * Number of self-service skips already used. Unset means zero.\n   * @readonly\n   */\n  skipCount?: number | null;\n  /**\n   * Number of self-service pauses already used. Unset means zero.\n   * @readonly\n   */\n  pauseCount?: number | null;\n}\n\nexport interface PauseInfo {\n  pausePolicy?: PausePolicyWithLiterals;\n  pauseAt?: PauseAtWithLiterals;\n  startDate?: Date | null;\n  startCycle?: number | null;\n  resumeAt?: ResumeAtWithLiterals;\n  resumeDate?: Date | null;\n  resumeCycle?: number | null;\n}\n\nexport enum PausePolicy {\n  NONE = 'NONE',\n  /** Pause the payment and the service. When resuming, the subscription end date is extended by the number of cycles postponed, and if the pause happened in a middle of a cycle, the payment date is postponed by the amount of days that already paid. */\n  SERVICE_AND_PAYMENTS = 'SERVICE_AND_PAYMENTS',\n  /** Pause the service and continue the billing. When resuming, extend the service by the time that was paused */\n  SERVICE_ONLY = 'SERVICE_ONLY',\n}\n\n/** @enumType */\nexport type PausePolicyWithLiterals =\n  | PausePolicy\n  | 'NONE'\n  | 'SERVICE_AND_PAYMENTS'\n  | 'SERVICE_ONLY';\n\nexport enum PauseAt {\n  /** Cancel scheduled pause */\n  NONE = 'NONE',\n  /** Pause the subscription now */\n  IMMEDIATELY = 'IMMEDIATELY',\n  /** Pause the subscription at the next billing date */\n  NEXT_BILLING_DATE = 'NEXT_BILLING_DATE',\n  /** A specific date must be defined in Schedule.specific_date */\n  SPECIFIC_DATE = 'SPECIFIC_DATE',\n  /** The number of cycles must be defined in Schedule.number_of_cycles */\n  NUMBER_OF_CYCLES_FROM_TODAY = 'NUMBER_OF_CYCLES_FROM_TODAY',\n  /** Pause subscription after N billing cycles from the next billing date. Used for skip-cycle feature where customers skip future billing cycles. Requires Schedule.number_of_cycles to specify how many cycles to wait before pausing. */\n  NUMBER_OF_CYCLES_FROM_NEXT_BILLING_DATE = 'NUMBER_OF_CYCLES_FROM_NEXT_BILLING_DATE',\n}\n\n/** @enumType */\nexport type PauseAtWithLiterals =\n  | PauseAt\n  | 'NONE'\n  | 'IMMEDIATELY'\n  | 'NEXT_BILLING_DATE'\n  | 'SPECIFIC_DATE'\n  | 'NUMBER_OF_CYCLES_FROM_TODAY'\n  | 'NUMBER_OF_CYCLES_FROM_NEXT_BILLING_DATE';\n\nexport enum ResumeAt {\n  /** Cancel scheduled resume */\n  NONE = 'NONE',\n  /** Resume the subscription now */\n  IMMEDIATELY = 'IMMEDIATELY',\n  /** Resume the subscription at the next billing date */\n  NEXT_BILLING_DATE = 'NEXT_BILLING_DATE',\n  /** A specific date must be defined in Schedule.specific_date */\n  SPECIFIC_DATE = 'SPECIFIC_DATE',\n  /** Resume subscription after N billing cycles from when the pause starts. Automatically resumes subscription after skipping the specified number of cycles. Requires Schedule.number_of_cycles to specify how many cycles to skip before resuming. */\n  NUMBER_OF_CYCLES_FROM_PAUSE_START = 'NUMBER_OF_CYCLES_FROM_PAUSE_START',\n}\n\n/** @enumType */\nexport type ResumeAtWithLiterals =\n  | ResumeAt\n  | 'NONE'\n  | 'IMMEDIATELY'\n  | 'NEXT_BILLING_DATE'\n  | 'SPECIFIC_DATE'\n  | 'NUMBER_OF_CYCLES_FROM_PAUSE_START';\n\nexport interface CancellationInfo {\n  /** Subscription cancel date. Can contain a future or past date */\n  cancellationDate?: Date | null;\n  /** Initiator for cancellation */\n  initiator?: HistoryActionInitiatorWithLiterals;\n  /** Reason for cancellation. Optional. */\n  reason?: string | null;\n}\n\nexport enum HistoryActionInitiator {\n  UNDEFINED = 'UNDEFINED',\n  BUSINESS = 'BUSINESS',\n  CUSTOMER = 'CUSTOMER',\n  SYSTEM = 'SYSTEM',\n  PAYMENT_FAILURE = 'PAYMENT_FAILURE',\n}\n\n/** @enumType */\nexport type HistoryActionInitiatorWithLiterals =\n  | HistoryActionInitiator\n  | 'UNDEFINED'\n  | 'BUSINESS'\n  | 'CUSTOMER'\n  | 'SYSTEM'\n  | 'PAYMENT_FAILURE';\n\nexport interface SubscriptionUpdateData {\n  /** @maxSize 100 */\n  itemsToUpdate?: ItemChange[];\n  /** @maxSize 99 */\n  itemsToAdd?: Item[];\n  /**\n   * @format GUID\n   * @maxSize 99\n   */\n  itemsToDelete?: string[] | null;\n  /** @readonly */\n  numberOfRequests?: number;\n}\n\nexport interface ItemChange {\n  /**\n   * Item ID\n   * @format GUID\n   */\n  _id?: string;\n  pricingModel?: PricingModel;\n  /** @min 1 */\n  quantity?: number | null;\n  tax?: Tax;\n}\n\nexport interface PricingModel extends PricingModelModelOneOf {\n  /** Fixed item price. */\n  fixedPrice?: FixedPrice;\n  /** External/metered pricing (see ExternalPrice comment for details). */\n  externalPrice?: ExternalPrice;\n}\n\n/** @oneof */\nexport interface PricingModelModelOneOf {\n  /** Fixed item price. */\n  fixedPrice?: FixedPrice;\n  /** External/metered pricing (see ExternalPrice comment for details). */\n  externalPrice?: ExternalPrice;\n}\n\nexport interface FixedPrice {\n  /**\n   * Fixed item price with a period as a decimal separator. For example, `3.99`.\n   * Price doesn't include tax, discounts, or application fee.\n   *\n   * Min: `0.01`\n   * @decimalValue options { gte:0.00, maxScale:4 }\n   */\n  itemPrice?: string;\n}\n\n/**\n * External/metered pricing where price comes from an external provider at billing time.\n *\n * The external pricing provider is determined by the Subscription's PlatformOrigin.app_id.\n * BASS maintains a hardcoded mapping from app_id to the service client (e.g., CustomChargesService).\n * To add support for other platforms (e.g., eCom), add the mapping in BASS code.\n */\nexport interface ExternalPrice {\n  /**\n   * Optional fixed base amount (added to external charges)\n   * @decimalValue options { gte:0.00, maxScale:4 }\n   */\n  baseAmount?: string | null;\n}\n\nexport interface Item {\n  /**\n   * Unique identifier of subscription item. Automatically generated and read-only.\n   * @readonly\n   * @format GUID\n   */\n  _id?: string | null;\n  /**\n   * Name of the item. Typically product name.\n   * @minLength 1\n   * @maxLength 200\n   */\n  name?: string;\n  /**\n   * Description of the item.\n   * @maxLength 500\n   */\n  description?: string | null;\n  /** References to external product catalog data known to client. */\n  catalogReference?: CatalogReference;\n  /** Category of item. Whether it is digital or physical one. */\n  category?: ItemCategoryWithLiterals;\n  /**\n   * Amount of products\n   * @min 1\n   */\n  quantity?: number;\n  /** Pricing model of the item. Whether fixed price or dynamic price models. */\n  pricingModel?: PricingModel;\n  /** Tax, positive value, optional */\n  tax?: Tax;\n  /**\n   * Discounts applied on item price\n   * @maxSize 5\n   */\n  discounts?: Discount[];\n  /** Application specific fee, positive value, optional (if application_fee == 0, don't include it to request). Only positive values. */\n  applicationFee?: ApplicationFee;\n  /**\n   * External reference identifier for mapping item in consumer's system.\n   * This allows the consumer to correlate the item in their system with the item in this API.\n   * @format GUID\n   */\n  externalId?: string | null;\n  /**\n   * Unit base-price overrides for specific lifetime subscription cycles. Each entry replaces\n   * pricing_model.fixed_price for the cycles it covers; unlisted cycles bill the fixed price.\n   * Quantity, discounts, tax and application fee apply on top as usual. Fixed-price items only.\n   * At most 5 entries, ranges must not overlap. Accepted only where the route supports it.\n   * @maxSize 5\n   */\n  cyclePriceOverrides?: CyclePriceOverride[];\n  /**\n   * Key / Value store to keep up to 10 additional values related to the subscription item.\n   * Key max length = 50, Value max length = 200. Value can not be empty.\n   * Should not include any sensitive or PII information.\n   * @maxSize 10\n   */\n  metadata?: Record<string, string>;\n}\n\nexport interface CatalogReference {\n  /**\n   * Product ID from the external catalog.\n   * @minLength 1\n   * @maxLength 50\n   */\n  catalogItemId?: string;\n  /**\n   * ID of the app that the product catalog belongs to.\n   * When omitted, BASS assumes that the product belongs to the subscription's\n   * `origin.appId`.\n   *\n   * Min: 1 character\n   * Max: 50 characters\n   * @minLength 1\n   * @maxLength 50\n   */\n  appId?: string | null;\n}\n\nexport enum ItemCategory {\n  UNKNOWN = 'UNKNOWN',\n  PHYSICAL = 'PHYSICAL',\n  DIGITAL = 'DIGITAL',\n}\n\n/** @enumType */\nexport type ItemCategoryWithLiterals =\n  | ItemCategory\n  | 'UNKNOWN'\n  | 'PHYSICAL'\n  | 'DIGITAL';\n\nexport interface ApplicationFee extends ApplicationFeeValueOneOf {\n  /**\n   * Amount of the application fee in `0.00` format.\n   * @format DECIMAL_VALUE\n   */\n  amount?: string;\n  /**\n   * Discounts for the application fee.\n   *\n   * Max: 5 discounts\n   * @maxSize 5\n   */\n  discounts?: Discount[];\n}\n\n/** @oneof */\nexport interface ApplicationFeeValueOneOf {\n  /**\n   * Amount of the application fee in `0.00` format.\n   * @format DECIMAL_VALUE\n   */\n  amount?: string;\n}\n\nexport interface CyclePriceOverride {\n  /**\n   * Lifetime subscription cycles the price applies to. Required.\n   * Same shape and meaning as item discount cycles; empty number_of_cycles means until the end.\n   */\n  cycles?: DiscountCycles;\n  /**\n   * Unit base price for these cycles, with a period as a decimal separator. For example, `35.00`.\n   * Can be higher, lower or equal to the fixed price. `0` is valid; an empty value is rejected.\n   * Price doesn't include tax, discounts, or application fee.\n   * @decimalValue options { gte:0.00, maxScale:4 }\n   */\n  itemPrice?: string;\n}\n\nexport interface SpecificDateSubscriptionUpdateData {\n  updateData?: SubscriptionUpdateData;\n  executionDate?: Date | null;\n}\n\nexport interface PlatformOrigin {\n  /** @format GUID */\n  appId?: string | null;\n  /** @format GUID */\n  entityId?: string | null;\n}\n\n/** A contract change that has been accepted and will take effect at the next renewal date. */\nexport interface ScheduledContractChange {\n  /**\n   * The idempotency key from the original ChangeSubscription request.\n   * @format GUID\n   * @readonly\n   */\n  idempotencyKey?: string;\n  /**\n   * The new billing settings that will apply after the renewal.\n   * @readonly\n   */\n  newBillingSettings?: BillingSettings;\n  /**\n   * The new items that will apply after the renewal.\n   * @readonly\n   * @maxSize 100\n   */\n  newItems?: Item[];\n}\n\nexport interface UpsertPlanSubscriptionResponse {\n  /** The Created subscription */\n  planSubscription?: PlanSubscription;\n}\n\nexport interface GetBySubscriptionContractIdRequest {\n  /**\n   * ID of the eCommerce subscription contract.\n   * @format GUID\n   */\n  subscriptionContractId: string;\n}\n\nexport interface GetBySubscriptionContractIdResponse {\n  /** Retrieved plan subscription. */\n  planSubscription?: PlanSubscription;\n}\n\nexport interface GetByBillingSubscriptionIdRequest {\n  /**\n   * Billing subscription id\n   * @format GUID\n   */\n  billingSubscriptionId?: string;\n}\n\nexport interface GetByBillingSubscriptionIdResponse {\n  /** The retrieved subscription for the plan */\n  planSubscription?: PlanSubscription;\n}\n\nexport interface QueryPlanSubscriptionsRequest {\n  /** Query to filter, sort, and page the plan subscriptions. */\n  query?: QueryV2;\n}\n\nexport interface QueryV2 extends QueryV2PagingMethodOneOf {\n  /**\n   * Paging options to limit and skip the number of items.\n   * @internal\n   */\n  paging?: Paging;\n  /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n  cursorPaging?: CursorPaging;\n  /**\n   * Filter object in the following format:\n   * `\"filter\" : {\n   * \"fieldName1\": \"value1\",\n   * \"fieldName2\":{\"$operator\":\"value2\"}\n   * }`\n   * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n   */\n  filter?: Record<string, any> | null;\n  /**\n   * Sort object in the following format:\n   * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n   * @maxSize 5\n   */\n  sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface QueryV2PagingMethodOneOf {\n  /**\n   * Paging options to limit and skip the number of items.\n   * @internal\n   */\n  paging?: Paging;\n  /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n  cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n  /**\n   * Name of the field to sort by.\n   * @maxLength 512\n   */\n  fieldName?: string;\n  /** Sort order. */\n  order?: SortOrderWithLiterals;\n  /**\n   * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by\n   * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.\n   *\n   * If multiple filters are provided, they are combined with AND operator.\n   *\n   * Example:\n   * Given we have document like {\"id\": \"1\", \"nestedField\": [{\"price\": 10, \"region\": \"EU\"}, {\"price\": 20, \"region\": \"US\"}]}\n   * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be\n   * { fieldName: \"nestedField.price\", \"select_items_by\": [{\"nestedField.region\": \"US\"}] }\n   * @internal\n   * @maxSize 10\n   */\n  selectItemsBy?: Record<string, any>[] | null;\n}\n\nexport enum SortOrder {\n  ASC = 'ASC',\n  DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface Paging {\n  /** Number of items to load. */\n  limit?: number | null;\n  /** Number of items to skip in the current sort order. */\n  offset?: number | null;\n}\n\nexport interface CursorPaging {\n  /**\n   * Maximum number of items to return in the results.\n   * @max 100\n   */\n  limit?: number | null;\n  /**\n   * Pointer to the next or previous page in the list of results.\n   *\n   * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n   * Not relevant for the first request.\n   * @maxLength 16000\n   */\n  cursor?: string | null;\n}\n\nexport interface QueryPlanSubscriptionsResponse {\n  /** Retrieved plan subscriptions. */\n  planSubscriptions?: PlanSubscription[];\n  /** Paging metadata. */\n  pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n  /** Number of items returned in the response. */\n  count?: number | null;\n  /** Offset that was requested. */\n  offset?: number | null;\n  /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n  total?: number | null;\n  /** Flag that indicates the server failed to calculate the `total` field. */\n  tooManyToCount?: boolean | null;\n  /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n  cursors?: Cursors;\n  /**\n   * Indicates if there are more results after the current page.\n   * If `true`, another page of results can be retrieved.\n   * If `false`, this is the last page.\n   * @internal\n   */\n  hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n  /**\n   * Cursor string pointing to the next page in the list of results.\n   * @maxLength 16000\n   */\n  next?: string | null;\n  /**\n   * Cursor pointing to the previous page in the list of results.\n   * @maxLength 16000\n   */\n  prev?: string | null;\n}\n\nexport interface MatchPriceRequest\n  extends MatchPriceRequestRunModeOptionsOneOf {\n  /** If the match price type is DRY_RUN, this field must contain the dry run options. */\n  dryRunOptions?: DryRunOptions;\n  /**\n   * ID of the plan to change.\n   * @format GUID\n   */\n  planId?: string;\n  /**\n   * ID of the pricing variant to change.\n   * @format GUID\n   */\n  pricingVariantId?: string;\n  /** To prevent conflicting changes, the current plan revision must be passed when updating the price. */\n  planRevision?: string | null;\n  /** The type of match price action to perform. */\n  runMode?: RunModeWithLiterals;\n}\n\n/** @oneof */\nexport interface MatchPriceRequestRunModeOptionsOneOf {\n  /** If the match price type is DRY_RUN, this field must contain the dry run options. */\n  dryRunOptions?: DryRunOptions;\n}\n\nexport interface PricingStrategy extends PricingStrategyStrategyOneOf {\n  /** Single fixed cost charged regardless of usage. */\n  flatRate?: FlatRate;\n  /**\n   * Varied cost charged based on how much customers want to spend.\n   * @internal\n   */\n  customerChosenPrice?: CustomerChosenPrice;\n}\n\n/** @oneof */\nexport interface PricingStrategyStrategyOneOf {\n  /** Single fixed cost charged regardless of usage. */\n  flatRate?: FlatRate;\n  /**\n   * Varied cost charged based on how much customers want to spend.\n   * @internal\n   */\n  customerChosenPrice?: CustomerChosenPrice;\n}\n\nexport interface FlatRate {\n  /**\n   * Fixed monetary amount.\n   * @decimalValue options { gte:0, maxScale:4 }\n   */\n  amount?: string;\n}\n\n/** At least one of custom_amount or predefined_amounts must be set. They can both be active simultaneously. */\nexport interface CustomerChosenPrice {\n  /** Option for customers to write the price they want themselves. */\n  customAmount?: CustomAmount;\n  /** Option for customers to choose the price they want from predefined values. */\n  predefinedAmounts?: PredefinedAmounts;\n}\n\nexport interface CustomAmount {\n  /**\n   * The min value a customer can enter.\n   * @decimalValue options { gt:0, maxScale:4 }\n   * @minLength 1\n   */\n  minAmount?: string;\n  /**\n   * The max value a customer can enter. Setting this value is optional.\n   * @decimalValue options { gt:0, maxScale:4 }\n   */\n  maxAmount?: string | null;\n}\n\nexport interface PredefinedAmounts {\n  /**\n   * The predefined monetary amount that is chosen by default. Must be one of the values in amounts. Cannot be empty.\n   * @decimalValue options { gt:0, maxScale:4 }\n   * @minLength 1\n   */\n  defaultAmount?: string;\n  /**\n   * The predefined monetary amount values that customers can choose from. Cannot be empty.\n   * @decimalValue options { gt:0, maxScale:4 }\n   * @minSize 1\n   * @maxSize 10\n   */\n  amounts?: string[];\n}\n\nexport enum RunMode {\n  /** Live run - prices of existing subscriptions will be changed. */\n  LIVE_RUN = 'LIVE_RUN',\n  /** Dry run - preview affected subscription count with updating prices. */\n  DRY_RUN = 'DRY_RUN',\n}\n\n/** @enumType */\nexport type RunModeWithLiterals = RunMode | 'LIVE_RUN' | 'DRY_RUN';\n\nexport interface DryRunOptions {\n  /** The pricing strategy to use for the dry run. This pricing strategy should later be used for the live run. */\n  pricingStrategy?: PricingStrategy;\n}\n\nexport interface MatchPriceResponse\n  extends MatchPriceResponseResponseDetailsOneOf {\n  /** If the match price type is LIVE_RUN, this field will contain the live run response details. */\n  liveRunDetails?: LiveRunDetails;\n  /** If the match price type is DRY_RUN, this field will contain the dry run response details. */\n  dryRunDetails?: DryRunDetails;\n}\n\n/** @oneof */\nexport interface MatchPriceResponseResponseDetailsOneOf {\n  /** If the match price type is LIVE_RUN, this field will contain the live run response details. */\n  liveRunDetails?: LiveRunDetails;\n  /** If the match price type is DRY_RUN, this field will contain the dry run response details. */\n  dryRunDetails?: DryRunDetails;\n}\n\nexport interface LiveRunDetails {\n  /**\n   * A reference to the price change job.\n   * @format GUID\n   */\n  jobId?: string | null;\n}\n\nexport interface DryRunDetails {\n  /** How many subscriptions would be updated. */\n  affectedSubscriptionsCount?: number | null;\n}\n\nexport interface PlanRevisionMismatchErrorDetails {\n  /** The provided plan revision. */\n  providedPlanRevision?: string | null;\n  /** The expected plan revision. */\n  expectedPlanRevision?: string | null;\n}\n\nexport interface PlanVariantIsNotRecurringErrorDetails {\n  /**\n   * The plan ID.\n   * @format GUID\n   */\n  planId?: string;\n  /**\n   * The pricing variant ID.\n   * @format GUID\n   */\n  pricingVariantId?: string;\n}\n\nexport interface PricingVariantNotFoundErrorDetails {\n  /**\n   * The plan ID.\n   * @format GUID\n   */\n  planId?: string;\n  /**\n   * The pricing variant ID.\n   * @format GUID\n   */\n  pricingVariantId?: string;\n}\n\nexport interface CustomerChosenPriceNotSupportedErrorDetails {\n  /**\n   * The plan ID.\n   * @format GUID\n   */\n  planId?: string;\n  /**\n   * The pricing variant ID.\n   * @format GUID\n   */\n  pricingVariantId?: string;\n}\n\nexport interface CountPlanSubscriptionsRequest {\n  /**\n   * Filter object in WQL format.\n   * Supported fields:\n   * `id`,\n   * `member_id`,\n   * `billing_subscription.plan_line_item.plan_id`,\n   * `billing_subscription.plan_line_item.pricing_variant_id`,\n   * `billing_subscription.status`.\n   */\n  filter?: Record<string, any> | null;\n  /**\n   * Stop counting at this number. When set, the returned count is at most `max_count`.\n   * @min 1\n   * @max 10000\n   */\n  maxCount?: number | null;\n}\n\nexport interface CountPlanSubscriptionsResponse {\n  /** Number of plan subscriptions matching the filter. */\n  count?: number;\n}\n\nexport interface EndPlanSubscriptionRequest {\n  /**\n   * Plan subscription ID.\n   * @format GUID\n   */\n  planSubscriptionId?: string;\n}\n\nexport interface EndPlanSubscriptionResponse {}\n\nexport interface Empty {}\n\n/**\n * Retrieves a plan subscription.\n *\n * Fails with `NOT_FOUND` if the plan subscription doesn't exist.\n * @param subscriptionId - Plan subscription ID.\n * @public\n * @documentationMaturity preview\n * @requiredField subscriptionId\n * @permissionId PRICING_PLANS.PLAN_SUBSCRIPTION_READ\n * @applicableIdentity APP\n * @returns Retrieved plan subscription.\n * @fqn wix.pricing_plans.plan_subscriptions.v1.PlanSubscriptionsService.GetPlanSubscription\n */\nexport async function getPlanSubscription(\n  subscriptionId: string\n): Promise<\n  NonNullablePaths<\n    PlanSubscription,\n    | `_id`\n    | `memberId`\n    | `formSubmission.submissionId`\n    | `benefitDistribution.settings.customScheduleOptions.cycleDuration.unit`\n    | `benefitDistribution.settings.distributionStrategyType`\n    | `benefitDistribution.currentCycle`\n    | `planId`,\n    4\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    subscriptionId: subscriptionId,\n  });\n\n  const reqOpts =\n    ambassadorWixPricingPlansPlanSubscriptionsV1PlanSubscription.getPlanSubscription(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)\n      ?.planSubscription!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { subscriptionId: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['subscriptionId']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Retrieves the plan subscription behind an eCommerce subscription contract.\n *\n * The subscription contract ID is available in the eCommerce order as `lineItems.subscriptionInfo.id`.\n *\n * Fails with `NOT_FOUND` if no plan subscription exists for the subscription contract.\n * @param subscriptionContractId - ID of the eCommerce subscription contract.\n * @public\n * @documentationMaturity preview\n * @requiredField subscriptionContractId\n * @permissionId PRICING_PLANS.PLAN_SUBSCRIPTION_READ\n * @applicableIdentity APP\n * @fqn wix.pricing_plans.plan_subscriptions.v1.PlanSubscriptionsService.GetBySubscriptionContractId\n */\nexport async function getBySubscriptionContractId(\n  subscriptionContractId: string\n): Promise<\n  NonNullablePaths<\n    GetBySubscriptionContractIdResponse,\n    | `planSubscription._id`\n    | `planSubscription.memberId`\n    | `planSubscription.formSubmission.submissionId`\n    | `planSubscription.benefitDistribution.settings.customScheduleOptions.cycleDuration.unit`\n    | `planSubscription.benefitDistribution.settings.distributionStrategyType`\n    | `planSubscription.benefitDistribution.currentCycle`\n    | `planSubscription.planId`,\n    5\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    subscriptionContractId: subscriptionContractId,\n  });\n\n  const reqOpts =\n    ambassadorWixPricingPlansPlanSubscriptionsV1PlanSubscription.getBySubscriptionContractId(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { subscriptionContractId: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['subscriptionContractId']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Retrieves a list of plan subscriptions, given the provided paging, filtering, and sorting.\n * Returns up to 50 plan subscriptions per page by default.\n *\n * Supported fields for filtering and sorting:\n * `id`, `memberId`, `subscriptionContractId`, `planId`, `pricingVariantId`.\n *\n * To get a member's plan subscriptions, filter by `memberId`. To get the plan subscriptions of a plan, filter by `planId`.\n * @public\n * @documentationMaturity preview\n * @permissionId PRICING_PLANS.PLAN_SUBSCRIPTION_READ\n * @applicableIdentity APP\n * @fqn wix.pricing_plans.plan_subscriptions.v1.PlanSubscriptionsService.QueryPlanSubscriptions\n */\nexport function queryPlanSubscriptions(): PlanSubscriptionsQueryBuilder {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[0] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  return queryBuilder<\n    PlanSubscription,\n    'CURSOR',\n    QueryPlanSubscriptionsRequest,\n    QueryPlanSubscriptionsResponse\n  >({\n    func: async (payload: QueryPlanSubscriptionsRequest) => {\n      const reqOpts =\n        ambassadorWixPricingPlansPlanSubscriptionsV1PlanSubscription.queryPlanSubscriptions(\n          payload\n        );\n\n      sideEffects?.onSiteCall?.();\n      try {\n        const result = await httpClient.request(reqOpts);\n        sideEffects?.onSuccess?.(result);\n        return result;\n      } catch (err) {\n        sideEffects?.onError?.(err);\n        throw err;\n      }\n    },\n    requestTransformer: (query: QueryPlanSubscriptionsRequest['query']) => {\n      const args = [query, {}] as [QueryPlanSubscriptionsRequest['query'], {}];\n      return renameKeysFromSDKRequestToRESTRequest({\n        ...args?.[1],\n        query: args?.[0],\n      });\n    },\n    responseTransformer: ({\n      data,\n    }: HttpResponse<QueryPlanSubscriptionsResponse>) => {\n      const transformedData = renameKeysFromRESTResponseToSDKResponse(\n        transformPaths(data, [])\n      );\n\n      return {\n        items: transformedData?.planSubscriptions,\n        pagingMetadata: transformedData?.pagingMetadata,\n      };\n    },\n    errorTransformer: (err: unknown) => {\n      const transformedError = sdkTransformError(err, {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { query: '$[0]' },\n        singleArgumentUnchanged: false,\n      });\n\n      throw transformedError;\n    },\n    pagingMethod: 'CURSOR',\n    transformationPaths: {},\n  });\n}\n\ninterface QueryCursorResult {\n  cursors: Cursors;\n  hasNext: () => boolean;\n  hasPrev: () => boolean;\n  length: number;\n  pageSize: number;\n}\n\nexport interface PlanSubscriptionsQueryResult extends QueryCursorResult {\n  items: PlanSubscription[];\n  query: PlanSubscriptionsQueryBuilder;\n  next: () => Promise<PlanSubscriptionsQueryResult>;\n  prev: () => Promise<PlanSubscriptionsQueryResult>;\n}\n\nexport interface PlanSubscriptionsQueryBuilder {\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   * @documentationMaturity preview\n   */\n  eq: (\n    propertyName:\n      | '_id'\n      | 'billingSubscription.id'\n      | 'billingSubscription.createdDate'\n      | 'billingSubscription.status'\n      | 'billingSubscription.billingSettings.cycleAutoRenew'\n      | 'billingSubscription.billingSettings.freeTrialDuration.count'\n      | 'billingSubscription.startDate'\n      | 'billingSubscription.endDate'\n      | 'billingSubscription.planLineItem.planId'\n      | 'billingSubscription.planLineItem.pricingVariantId'\n      | 'billingSubscription.billingStatus.latestPaymentData.paymentStatus'\n      | 'memberId'\n      | 'subscriptionContractId'\n      | 'planId'\n      | 'pricingVariantId',\n    value: any\n  ) => PlanSubscriptionsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   * @documentationMaturity preview\n   */\n  ne: (\n    propertyName:\n      | '_id'\n      | 'billingSubscription.id'\n      | 'billingSubscription.createdDate'\n      | 'billingSubscription.status'\n      | 'billingSubscription.billingSettings.cycleAutoRenew'\n      | 'billingSubscription.billingSettings.freeTrialDuration.count'\n      | 'billingSubscription.startDate'\n      | 'billingSubscription.endDate'\n      | 'billingSubscription.planLineItem.planId'\n      | 'billingSubscription.planLineItem.pricingVariantId'\n      | 'billingSubscription.billingStatus.latestPaymentData.paymentStatus'\n      | 'memberId'\n      | 'subscriptionContractId'\n      | 'planId'\n      | 'pricingVariantId',\n    value: any\n  ) => PlanSubscriptionsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   * @documentationMaturity preview\n   */\n  ge: (\n    propertyName:\n      | '_id'\n      | 'billingSubscription.id'\n      | 'billingSubscription.createdDate'\n      | 'billingSubscription.billingSettings.freeTrialDuration.count'\n      | 'billingSubscription.startDate'\n      | 'billingSubscription.endDate'\n      | 'billingSubscription.planLineItem.planId'\n      | 'billingSubscription.planLineItem.pricingVariantId'\n      | 'memberId'\n      | 'subscriptionContractId'\n      | 'planId'\n      | 'pricingVariantId',\n    value: any\n  ) => PlanSubscriptionsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   * @documentationMaturity preview\n   */\n  gt: (\n    propertyName:\n      | '_id'\n      | 'billingSubscription.id'\n      | 'billingSubscription.createdDate'\n      | 'billingSubscription.billingSettings.freeTrialDuration.count'\n      | 'billingSubscription.startDate'\n      | 'billingSubscription.endDate'\n      | 'billingSubscription.planLineItem.planId'\n      | 'billingSubscription.planLineItem.pricingVariantId'\n      | 'memberId'\n      | 'subscriptionContractId'\n      | 'planId'\n      | 'pricingVariantId',\n    value: any\n  ) => PlanSubscriptionsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   * @documentationMaturity preview\n   */\n  le: (\n    propertyName:\n      | '_id'\n      | 'billingSubscription.id'\n      | 'billingSubscription.createdDate'\n      | 'billingSubscription.billingSettings.freeTrialDuration.count'\n      | 'billingSubscription.startDate'\n      | 'billingSubscription.endDate'\n      | 'billingSubscription.planLineItem.planId'\n      | 'billingSubscription.planLineItem.pricingVariantId'\n      | 'memberId'\n      | 'subscriptionContractId'\n      | 'planId'\n      | 'pricingVariantId',\n    value: any\n  ) => PlanSubscriptionsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   * @documentationMaturity preview\n   */\n  lt: (\n    propertyName:\n      | '_id'\n      | 'billingSubscription.id'\n      | 'billingSubscription.createdDate'\n      | 'billingSubscription.billingSettings.freeTrialDuration.count'\n      | 'billingSubscription.startDate'\n      | 'billingSubscription.endDate'\n      | 'billingSubscription.planLineItem.planId'\n      | 'billingSubscription.planLineItem.pricingVariantId'\n      | 'memberId'\n      | 'subscriptionContractId'\n      | 'planId'\n      | 'pricingVariantId',\n    value: any\n  ) => PlanSubscriptionsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `string`.\n   * @param string - String to compare against. Case-insensitive.\n   * @documentationMaturity preview\n   */\n  startsWith: (\n    propertyName:\n      | '_id'\n      | 'billingSubscription.id'\n      | 'billingSubscription.planLineItem.planId'\n      | 'billingSubscription.planLineItem.pricingVariantId'\n      | 'memberId'\n      | 'subscriptionContractId'\n      | 'planId'\n      | 'pricingVariantId',\n    value: string\n  ) => PlanSubscriptionsQueryBuilder;\n  /** @documentationMaturity preview */\n  in: (\n    propertyName:\n      | '_id'\n      | 'billingSubscription.id'\n      | 'billingSubscription.createdDate'\n      | 'billingSubscription.status'\n      | 'billingSubscription.billingSettings.cycleAutoRenew'\n      | 'billingSubscription.billingSettings.freeTrialDuration.count'\n      | 'billingSubscription.startDate'\n      | 'billingSubscription.endDate'\n      | 'billingSubscription.planLineItem.planId'\n      | 'billingSubscription.planLineItem.pricingVariantId'\n      | 'billingSubscription.billingStatus.latestPaymentData.paymentStatus'\n      | 'memberId'\n      | 'subscriptionContractId'\n      | 'planId'\n      | 'pricingVariantId',\n    value: any\n  ) => PlanSubscriptionsQueryBuilder;\n  /** @documentationMaturity preview */\n  exists: (\n    propertyName:\n      | '_id'\n      | 'billingSubscription.id'\n      | 'billingSubscription.createdDate'\n      | 'billingSubscription.status'\n      | 'billingSubscription.billingSettings.cycleAutoRenew'\n      | 'billingSubscription.billingSettings.freeTrialDuration.count'\n      | 'billingSubscription.startDate'\n      | 'billingSubscription.endDate'\n      | 'billingSubscription.planLineItem.planId'\n      | 'billingSubscription.planLineItem.pricingVariantId'\n      | 'billingSubscription.billingStatus.latestPaymentData.paymentStatus'\n      | 'memberId'\n      | 'subscriptionContractId'\n      | 'planId'\n      | 'pricingVariantId',\n    value: boolean\n  ) => PlanSubscriptionsQueryBuilder;\n  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n   * @documentationMaturity preview\n   */\n  ascending: (\n    ...propertyNames: Array<\n      | '_id'\n      | 'billingSubscription.id'\n      | 'billingSubscription.createdDate'\n      | 'billingSubscription.status'\n      | 'billingSubscription.billingSettings.cycleAutoRenew'\n      | 'billingSubscription.billingSettings.freeTrialDuration.count'\n      | 'billingSubscription.startDate'\n      | 'billingSubscription.endDate'\n      | 'billingSubscription.planLineItem.planId'\n      | 'billingSubscription.planLineItem.pricingVariantId'\n      | 'billingSubscription.billingStatus.latestPaymentData.paymentStatus'\n      | 'memberId'\n      | 'subscriptionContractId'\n      | 'planId'\n      | 'pricingVariantId'\n    >\n  ) => PlanSubscriptionsQueryBuilder;\n  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n   * @documentationMaturity preview\n   */\n  descending: (\n    ...propertyNames: Array<\n      | '_id'\n      | 'billingSubscription.id'\n      | 'billingSubscription.createdDate'\n      | 'billingSubscription.status'\n      | 'billingSubscription.billingSettings.cycleAutoRenew'\n      | 'billingSubscription.billingSettings.freeTrialDuration.count'\n      | 'billingSubscription.startDate'\n      | 'billingSubscription.endDate'\n      | 'billingSubscription.planLineItem.planId'\n      | 'billingSubscription.planLineItem.pricingVariantId'\n      | 'billingSubscription.billingStatus.latestPaymentData.paymentStatus'\n      | 'memberId'\n      | 'subscriptionContractId'\n      | 'planId'\n      | 'pricingVariantId'\n    >\n  ) => PlanSubscriptionsQueryBuilder;\n  /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n   * @documentationMaturity preview\n   */\n  limit: (limit: number) => PlanSubscriptionsQueryBuilder;\n  /** @param cursor - A pointer to specific record\n   * @documentationMaturity preview\n   */\n  skipTo: (cursor: string) => PlanSubscriptionsQueryBuilder;\n  /** @documentationMaturity preview */\n  find: () => Promise<PlanSubscriptionsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.pricing_plans.plan_subscriptions.v1.PlanSubscriptionsService.QueryPlanSubscriptions\n * @requiredField query\n */\nexport async function typedQueryPlanSubscriptions(\n  query: PlanSubscriptionQuery\n): Promise<\n  NonNullablePaths<\n    QueryPlanSubscriptionsResponse,\n    | `planSubscriptions`\n    | `planSubscriptions.${number}._id`\n    | `planSubscriptions.${number}.memberId`\n    | `planSubscriptions.${number}.formSubmission.submissionId`\n    | `planSubscriptions.${number}.benefitDistribution.settings.distributionStrategyType`\n    | `planSubscriptions.${number}.benefitDistribution.currentCycle`\n    | `planSubscriptions.${number}.planId`,\n    4\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n  const reqOpts =\n    ambassadorWixPricingPlansPlanSubscriptionsV1PlanSubscription.queryPlanSubscriptions(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { query: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['query']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface PlanSubscriptionQuerySpec extends QuerySpec {\n  paging: 'cursor';\n  wql: [\n    {\n      fields: [\n        '_id',\n        'billingSubscription._createdDate',\n        'billingSubscription._id',\n        'billingSubscription.billingSettings.cycleAutoRenew',\n        'billingSubscription.billingSettings.freeTrialDuration.count',\n        'billingSubscription.billingStatus.latestPaymentData.paymentStatus',\n        'billingSubscription.endDate',\n        'billingSubscription.planLineItem.planId',\n        'billingSubscription.planLineItem.pricingVariantId',\n        'billingSubscription.startDate',\n        'billingSubscription.status',\n        'memberId',\n        'planId',\n        'pricingVariantId',\n        'subscriptionContractId'\n      ];\n      operators: '*';\n      sort: 'BOTH';\n    }\n  ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n  PlanSubscription,\n  PlanSubscriptionQuerySpec\n>;\nexport type PlanSubscriptionQuery = {\n  /** \n  Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`.  \n  */\n  cursorPaging?: {\n    /** \n  Maximum number of items to return in the results. \n  @max: 100 \n  */\n    limit?:\n      | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n      | null;\n    /** \n  Pointer to the next or previous page in the list of results.\n\n  Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n  Not relevant for the first request. \n  @maxLength: 16000 \n  */\n    cursor?:\n      | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n      | null;\n  };\n  /** \n  Filter object in the following format:\n  `\"filter\" : {\n  \"fieldName1\": \"value1\",\n  \"fieldName2\":{\"$operator\":\"value2\"}\n  }`\n  Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`  \n  */\n  filter?: CommonQueryWithEntityContext['filter'] | null;\n  /** \n  Sort object in the following format:\n  `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]` \n  @maxSize: 5 \n  */\n  sort?: {\n    /** \n  Name of the field to sort by. \n  @maxLength: 512 \n  */\n    fieldName?: NonNullable<\n      CommonQueryWithEntityContext['sort']\n    >[number]['fieldName'];\n    /** \n  Sort order.  \n  */\n    order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n    /** \n  When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by\n  a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.\n\n  If multiple filters are provided, they are combined with AND operator.\n\n  Example:\n  Given we have document like {\"id\": \"1\", \"nestedField\": [{\"price\": 10, \"region\": \"EU\"}, {\"price\": 20, \"region\": \"US\"}]}\n  and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be\n  { fieldName: \"nestedField.price\", \"select_items_by\": [{\"nestedField.region\": \"US\"}] } \n  @internal: undefined,\n  @maxSize: 10 \n  */\n    selectItemsBy?:\n      | NonNullable<\n          CommonQueryWithEntityContext['sort']\n        >[number]['selectItemsBy']\n      | null;\n  }[];\n};\n\nexport const utils = {\n  query: /*#__PURE__*/ createQueryUtils<\n    PlanSubscription,\n    PlanSubscriptionQuerySpec,\n    PlanSubscriptionQuery\n  >(),\n};\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\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\nconst TRANSFORM_PATHS_0 = [\n  { path: 'planSubscription.billingSubscription.createdDate' },\n  { path: 'planSubscription.billingSubscription.updatedDate' },\n  { path: 'planSubscription.billingSubscription.startDate' },\n  { path: 'planSubscription.billingSubscription.endDate' },\n  {\n    path: 'planSubscription.billingSubscription.cancellationInfo.cancellationDate',\n  },\n  { path: 'planSubscription.billingSubscription.pauseInfo.startDate' },\n  { path: 'planSubscription.billingSubscription.pauseInfo.resumeDate' },\n  {\n    path: 'planSubscription.billingSubscription.billingStatus.nextBillingDate',\n  },\n  {\n    path: 'planSubscription.billingSubscription.billingStatus.previousBillingDate',\n  },\n  {\n    path: 'planSubscription.billingSubscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n  },\n  {\n    path: 'planSubscription.billingSubscription.specificDatePendingUpdateData.executionDate',\n  },\n  { path: 'planSubscription.benefitDistribution.currentCycleStartDate' },\n  { path: 'planSubscription.benefitDistribution.currentCycleEndDate' },\n  { path: 'planSubscription.benefitDistribution.currentCyclePauseDate' },\n];\nconst TRANSFORM_PATHS_1 = [\n  { path: 'planSubscriptions.billingSubscription.createdDate' },\n  { path: 'planSubscriptions.billingSubscription.updatedDate' },\n  { path: 'planSubscriptions.billingSubscription.startDate' },\n  { path: 'planSubscriptions.billingSubscription.endDate' },\n  {\n    path: 'planSubscriptions.billingSubscription.cancellationInfo.cancellationDate',\n  },\n  { path: 'planSubscriptions.billingSubscription.pauseInfo.startDate' },\n  { path: 'planSubscriptions.billingSubscription.pauseInfo.resumeDate' },\n  {\n    path: 'planSubscriptions.billingSubscription.billingStatus.nextBillingDate',\n  },\n  {\n    path: 'planSubscriptions.billingSubscription.billingStatus.previousBillingDate',\n  },\n  {\n    path: 'planSubscriptions.billingSubscription.billingStatus.latestPaymentData.initialFailedPaymentDate',\n  },\n  {\n    path: 'planSubscriptions.billingSubscription.specificDatePendingUpdateData.executionDate',\n  },\n  { path: 'planSubscriptions.benefitDistribution.currentCycleStartDate' },\n  { path: 'planSubscriptions.benefitDistribution.currentCycleEndDate' },\n  { path: 'planSubscriptions.benefitDistribution.currentCyclePauseDate' },\n];\n\nfunction resolveWixPricingPlansPlanSubscriptionsV1PlanSubscriptionsServiceUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'manage._base_domain_': [\n      {\n        srcPath: '/_api/plan-subscriptions',\n        destPath: '',\n      },\n    ],\n    'www.wixapis.com': [\n      {\n        srcPath: '/pricing-plans/v1/plan-subscriptions',\n        destPath: '/v1/plan-subscriptions',\n      },\n    ],\n    _: [\n      {\n        srcPath: '/_api/plan-subscriptions',\n        destPath: '',\n      },\n    ],\n    'www._base_domain_': [\n      {\n        srcPath: '/_api/plan-subscriptions',\n        destPath: '',\n      },\n    ],\n    'editor._base_domain_': [\n      {\n        srcPath: '/_api/plan-subscriptions',\n        destPath: '',\n      },\n    ],\n    'blocks._base_domain_': [\n      {\n        srcPath: '/_api/plan-subscriptions',\n        destPath: '',\n      },\n    ],\n    'create.editorx': [\n      {\n        srcPath: '/_api/plan-subscriptions',\n        destPath: '',\n      },\n    ],\n    '*.dev.wix-code.com': [\n      {\n        srcPath: '/_api/plan-subscriptions',\n        destPath: '',\n      },\n    ],\n    'editor.wixapps.net': [\n      {\n        srcPath: '/_api/plan-subscriptions',\n        destPath: '',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_pricing-plans_plan-subscriptions';\n\n/**\n * Retrieves a plan subscription.\n *\n * Fails with `NOT_FOUND` if the plan subscription doesn't exist.\n */\nexport function getPlanSubscription(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __getPlanSubscription({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.plan_subscriptions.v1.plan_subscription',\n      method: 'GET' as any,\n      methodFqn:\n        'wix.pricing_plans.plan_subscriptions.v1.PlanSubscriptionsService.GetPlanSubscription',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixPricingPlansPlanSubscriptionsV1PlanSubscriptionsServiceUrl(\n        {\n          protoPath: '/v1/plan-subscriptions/{subscriptionId}',\n          data: payload,\n          host,\n        }\n      ),\n      params: toURLSearchParams(payload),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: TRANSFORM_PATHS_0,\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __getPlanSubscription;\n}\n\n/**\n * Retrieves the plan subscription behind an eCommerce subscription contract.\n *\n * The subscription contract ID is available in the eCommerce order as `lineItems.subscriptionInfo.id`.\n *\n * Fails with `NOT_FOUND` if no plan subscription exists for the subscription contract.\n */\nexport function getBySubscriptionContractId(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __getBySubscriptionContractId({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.plan_subscriptions.v1.plan_subscription',\n      method: 'GET' as any,\n      methodFqn:\n        'wix.pricing_plans.plan_subscriptions.v1.PlanSubscriptionsService.GetBySubscriptionContractId',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixPricingPlansPlanSubscriptionsV1PlanSubscriptionsServiceUrl(\n        {\n          protoPath:\n            '/v1/plan-subscriptions/contract-id/{subscriptionContractId}',\n          data: payload,\n          host,\n        }\n      ),\n      params: toURLSearchParams(payload),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: TRANSFORM_PATHS_0,\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __getBySubscriptionContractId;\n}\n\n/**\n * Retrieves a list of plan subscriptions, given the provided paging, filtering, and sorting.\n * Returns up to 50 plan subscriptions per page by default.\n *\n * Supported fields for filtering and sorting:\n * `id`, `memberId`, `subscriptionContractId`, `planId`, `pricingVariantId`.\n *\n * To get a member's plan subscriptions, filter by `memberId`. To get the plan subscriptions of a plan, filter by `planId`.\n */\nexport function queryPlanSubscriptions(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __queryPlanSubscriptions({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.plan_subscriptions.v1.plan_subscription',\n      method: 'POST' as any,\n      methodFqn:\n        'wix.pricing_plans.plan_subscriptions.v1.PlanSubscriptionsService.QueryPlanSubscriptions',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixPricingPlansPlanSubscriptionsV1PlanSubscriptionsServiceUrl(\n        { protoPath: '/v1/plan-subscriptions/query', data: payload, host }\n      ),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: TRANSFORM_PATHS_1,\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __queryPlanSubscriptions;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n  GetBySubscriptionContractIdResponse,\n  PlanSubscription,\n  PlanSubscriptionQuery,\n  PlanSubscriptionsQueryBuilder,\n  QueryPlanSubscriptionsResponse,\n  getBySubscriptionContractId as universalGetBySubscriptionContractId,\n  getPlanSubscription as universalGetPlanSubscription,\n  queryPlanSubscriptions as universalQueryPlanSubscriptions,\n  typedQueryPlanSubscriptions as universalTypedQueryPlanSubscriptions,\n} from './pricing-plans-plan-subscriptions-v1-plan-subscription-plan-subscriptions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/pricing-plans' };\n\nexport function getPlanSubscription(\n  httpClient: HttpClient\n): GetPlanSubscriptionSignature {\n  return (subscriptionId: string) =>\n    universalGetPlanSubscription(\n      subscriptionId,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface GetPlanSubscriptionSignature {\n  /**\n   * Retrieves a plan subscription.\n   *\n   * Fails with `NOT_FOUND` if the plan subscription doesn't exist.\n   * @param - Plan subscription ID.\n   * @returns Retrieved plan subscription.\n   */\n  (subscriptionId: string): Promise<\n    NonNullablePaths<\n      PlanSubscription,\n      | `_id`\n      | `memberId`\n      | `formSubmission.submissionId`\n      | `benefitDistribution.settings.customScheduleOptions.cycleDuration.unit`\n      | `benefitDistribution.settings.distributionStrategyType`\n      | `benefitDistribution.currentCycle`\n      | `planId`,\n      4\n    >\n  >;\n}\n\nexport function getBySubscriptionContractId(\n  httpClient: HttpClient\n): GetBySubscriptionContractIdSignature {\n  return (subscriptionContractId: string) =>\n    universalGetBySubscriptionContractId(\n      subscriptionContractId,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface GetBySubscriptionContractIdSignature {\n  /**\n   * Retrieves the plan subscription behind an eCommerce subscription contract.\n   *\n   * The subscription contract ID is available in the eCommerce order as `lineItems.subscriptionInfo.id`.\n   *\n   * Fails with `NOT_FOUND` if no plan subscription exists for the subscription contract.\n   * @param - ID of the eCommerce subscription contract.\n   */\n  (subscriptionContractId: string): Promise<\n    NonNullablePaths<\n      GetBySubscriptionContractIdResponse,\n      | `planSubscription._id`\n      | `planSubscription.memberId`\n      | `planSubscription.formSubmission.submissionId`\n      | `planSubscription.benefitDistribution.settings.customScheduleOptions.cycleDuration.unit`\n      | `planSubscription.benefitDistribution.settings.distributionStrategyType`\n      | `planSubscription.benefitDistribution.currentCycle`\n      | `planSubscription.planId`,\n      5\n    >\n  >;\n}\n\nexport function queryPlanSubscriptions(\n  httpClient: HttpClient\n): QueryPlanSubscriptionsSignature {\n  return () =>\n    universalQueryPlanSubscriptions(\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface QueryPlanSubscriptionsSignature {\n  /**\n   * Retrieves a list of plan subscriptions, given the provided paging, filtering, and sorting.\n   * Returns up to 50 plan subscriptions per page by default.\n   *\n   * Supported fields for filtering and sorting:\n   * `id`, `memberId`, `subscriptionContractId`, `planId`, `pricingVariantId`.\n   *\n   * To get a member's plan subscriptions, filter by `memberId`. To get the plan subscriptions of a plan, filter by `planId`.\n   */\n  (): PlanSubscriptionsQueryBuilder;\n}\n\nexport function typedQueryPlanSubscriptions(\n  httpClient: HttpClient\n): TypedQueryPlanSubscriptionsSignature {\n  return (query: PlanSubscriptionQuery) =>\n    universalTypedQueryPlanSubscriptions(\n      query,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface TypedQueryPlanSubscriptionsSignature {\n  /** */\n  (query: PlanSubscriptionQuery): Promise<\n    NonNullablePaths<\n      QueryPlanSubscriptionsResponse,\n      | `planSubscriptions`\n      | `planSubscriptions.${number}._id`\n      | `planSubscriptions.${number}.memberId`\n      | `planSubscriptions.${number}.formSubmission.submissionId`\n      | `planSubscriptions.${number}.benefitDistribution.settings.distributionStrategyType`\n      | `planSubscriptions.${number}.benefitDistribution.currentCycle`\n      | `planSubscriptions.${number}.planId`,\n      4\n    >\n  >;\n}\n\nexport {\n  AccountInfo,\n  ActionEvent,\n  AdditionalFee,\n  AdditionalFeeTrigger,\n  Address,\n  AddressStreetOneOf,\n  ApplicationFee,\n  ApplicationFeeValueOneOf,\n  AutomaticRetryData,\n  BenefitDistribution,\n  BenefitDistributionSettings,\n  BenefitDistributionSettingsDistributionStrategyOneOf,\n  BillingSettings,\n  BillingStatus,\n  BillingSubscription,\n  BillingSubscriptionAdditionalFee,\n  BillingSubscriptionBillingSettings,\n  BillingSubscriptionBillingStatus,\n  BillingSubscriptionCancellationInfo,\n  BillingSubscriptionCycles,\n  BillingSubscriptionDiscount,\n  BillingSubscriptionDiscountCycles,\n  BillingSubscriptionDiscountOrigin,\n  BillingSubscriptionDiscountValueOneOf,\n  BillingSubscriptionDuration,\n  BillingSubscriptionItemChange,\n  BillingSubscriptionPauseInfo,\n  BillingSubscriptionPaymentData,\n  BillingSubscriptionPlatformOrigin,\n  BillingSubscriptionPricingModel,\n  BillingSubscriptionPricingModelModelOneOf,\n  BillingSubscriptionSpecificDateSubscriptionUpdateData,\n  BillingSubscriptionSubscriptionUpdateData,\n  BillingSubscriptionTaxSettings,\n  BillingSubscriptionTotals,\n  BusinessOrigin,\n  CancelActionConfiguration,\n  CancelActionSettings,\n  CancellationInfo,\n  CancellationInfoHistoryActionInitiator,\n  CatalogReference,\n  CollectionMethod,\n  CollectionMethodEnumCollectionMethod,\n  CountPlanSubscriptionsRequest,\n  CountPlanSubscriptionsResponse,\n  Coupon,\n  CursorPaging,\n  Cursors,\n  CustomAmount,\n  CustomBillingSchedule,\n  CustomProration,\n  CustomProrationAmountOneOf,\n  CustomScheduleOptions,\n  CustomScheduleOptionsDuration,\n  CustomScheduleOptionsDurationDurationUnit,\n  Customer,\n  CustomerActionCounters,\n  CustomerActionSettings,\n  CustomerChosenPrice,\n  CustomerChosenPriceNotSupportedErrorDetails,\n  CustomerIdOneOf,\n  CyclePriceOverride,\n  Cycles,\n  Discount,\n  DiscountCycles,\n  DiscountOrigin,\n  DiscountValueOneOf,\n  DistributionStrategyType,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  DryRunDetails,\n  DryRunOptions,\n  Duration,\n  DurationDurationUnit,\n  DurationUnit,\n  DynamicTax,\n  Empty,\n  EndPlanSubscriptionRequest,\n  EndPlanSubscriptionResponse,\n  EndReason,\n  EntityCreatedEvent,\n  EntityDeletedEvent,\n  EntityUpdatedEvent,\n  ExternalCollectionDetails,\n  ExternalPrice,\n  FixedPrice,\n  FlatRate,\n  FormSubmission,\n  FreeTrialData,\n  FullAddressContactDetails,\n  FullAddressDetails,\n  GetByBillingSubscriptionIdRequest,\n  GetByBillingSubscriptionIdResponse,\n  GetBySubscriptionContractIdRequest,\n  GetBySubscriptionContractIdResponse,\n  GetPlanSubscriptionRequest,\n  GetPlanSubscriptionResponse,\n  GracePeriodData,\n  HistoryActionInitiator,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  Item,\n  ItemCategory,\n  ItemChange,\n  LiveRunDetails,\n  MatchPriceRequest,\n  MatchPriceRequestRunModeOptionsOneOf,\n  MatchPriceResponse,\n  MatchPriceResponseResponseDetailsOneOf,\n  MessageEnvelope,\n  OrderPlanSubscriptionMigrated,\n  OrderPricingDetails,\n  Origin,\n  Paging,\n  PagingMetadataV2,\n  PauseAt,\n  PauseAtEnumPauseAt,\n  PauseInfo,\n  PausePolicy,\n  PausePolicyEnumPausePolicy,\n  PauseResumeActionConfiguration,\n  PauseResumeActionSettings,\n  PaymentData,\n  PaymentDataPaymentStatus,\n  PaymentMethod,\n  PaymentStatus,\n  PaymentTaxData,\n  PeriodUnit,\n  PlanLineItem,\n  PlanRevisionMismatchErrorDetails,\n  PlanSubscription,\n  PlanSubscriptionAutoRenewCanceled,\n  PlanSubscriptionAutoRenewTurnedOn,\n  PlanSubscriptionCanceled,\n  PlanSubscriptionCycleStarted,\n  PlanSubscriptionEndDatePostponed,\n  PlanSubscriptionEnded,\n  PlanSubscriptionMarkedAsPaid,\n  PlanSubscriptionPaused,\n  PlanSubscriptionPurchased,\n  PlanSubscriptionQuerySpec,\n  PlanSubscriptionResumed,\n  PlanSubscriptionRevived,\n  PlanSubscriptionStartDateChanged,\n  PlanSubscriptionStarted,\n  PlanSubscriptionsQueryBuilder,\n  PlanSubscriptionsQueryResult,\n  PlanVariantIsNotRecurringErrorDetails,\n  PlatformOrigin,\n  PredefinedAmounts,\n  PricingModel,\n  PricingModelFixedPrice,\n  PricingModelModelOneOf,\n  PricingStrategy,\n  PricingStrategyStrategyOneOf,\n  PricingVariantNotFoundErrorDetails,\n  Proration,\n  ProrationTypeOneOf,\n  QueryPlanSubscriptionsRequest,\n  QueryPlanSubscriptionsResponse,\n  QueryV2,\n  QueryV2PagingMethodOneOf,\n  Recurrence,\n  RestoreInfo,\n  ResumeAt,\n  ResumeAtEnumResumeAt,\n  RunMode,\n  ScheduledContractChange,\n  ShippingCharges,\n  SkipActionConfiguration,\n  SkipActionSettings,\n  SortOrder,\n  Sorting,\n  SpecificDateSubscriptionUpdateData,\n  StreetAddress,\n  Subscription,\n  SubscriptionPolicies,\n  SubscriptionStatus,\n  SubscriptionStatusEnumSubscriptionStatus,\n  SubscriptionUpdateData,\n  Tax,\n  TaxBreakdown,\n  TaxSettings,\n  TaxValueOneOf,\n  TaxableAddressType,\n  TimeBasedProration,\n  Totals,\n  UpdateBillingDateActionConfiguration,\n  UpdateBillingDateActionSettings,\n  UpdateBillingDateData,\n  UpmActionSettings,\n  UpsertPlanSubscriptionRequest,\n  UpsertPlanSubscriptionResponse,\n  V1Duration,\n  V1PricingModel,\n  V1PricingModelPricingModelOneOf,\n  WebhookIdentityType,\n  utils,\n} from './pricing-plans-plan-subscriptions-v1-plan-subscription-plan-subscriptions.universal.js';\n","import {\n  getPlanSubscription as publicGetPlanSubscription,\n  getBySubscriptionContractId as publicGetBySubscriptionContractId,\n  queryPlanSubscriptions as publicQueryPlanSubscriptions,\n  typedQueryPlanSubscriptions as publicTypedQueryPlanSubscriptions,\n} from './pricing-plans-plan-subscriptions-v1-plan-subscription-plan-subscriptions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n  PlanSubscriptionQuery,\n  PlanSubscriptionsQueryBuilder,\n  typedQueryPlanSubscriptions as universalTypedQueryPlanSubscriptions,\n} from './pricing-plans-plan-subscriptions-v1-plan-subscription-plan-subscriptions.universal.js';\n\nfunction customQueryPlanSubscriptions(httpClient: HttpClient) {\n  const router = /*#__PURE__*/ createQueryOverloadRouter({\n    builderQueryFunction: () => publicQueryPlanSubscriptions(httpClient)(),\n    typedQueryFunction: (query: PlanSubscriptionQuery) =>\n      publicTypedQueryPlanSubscriptions(httpClient)(query),\n    hasOptionsParameter: false,\n  });\n\n  function overloadedQuery(): PlanSubscriptionsQueryBuilder;\n  function overloadedQuery(\n    query: PlanSubscriptionQuery\n  ): ReturnType<typeof universalTypedQueryPlanSubscriptions>;\n  function overloadedQuery(query?: PlanSubscriptionQuery): any {\n    return router(...arguments);\n  }\n\n  return overloadedQuery;\n}\n\nexport const getPlanSubscription: MaybeContext<\n  BuildRESTFunction<typeof publicGetPlanSubscription> &\n    typeof publicGetPlanSubscription\n> = /*#__PURE__*/ createRESTModule(publicGetPlanSubscription);\nexport const getBySubscriptionContractId: MaybeContext<\n  BuildRESTFunction<typeof publicGetBySubscriptionContractId> &\n    typeof publicGetBySubscriptionContractId\n> = /*#__PURE__*/ createRESTModule(publicGetBySubscriptionContractId);\nexport const queryPlanSubscriptions: MaybeContext<\n  BuildRESTFunction<typeof customQueryPlanSubscriptions> &\n    typeof customQueryPlanSubscriptions\n> = /*#__PURE__*/ createRESTModule(customQueryPlanSubscriptions);\n\nexport {\n  PaymentDataPaymentStatus,\n  DurationDurationUnit,\n  CollectionMethodEnumCollectionMethod,\n  CancellationInfoHistoryActionInitiator,\n  PausePolicyEnumPausePolicy,\n  PauseAtEnumPauseAt,\n  ResumeAtEnumResumeAt,\n  SubscriptionStatusEnumSubscriptionStatus,\n  PeriodUnit,\n  CustomScheduleOptionsDurationDurationUnit,\n  DistributionStrategyType,\n  EndReason,\n  WebhookIdentityType,\n  SubscriptionStatus,\n  CollectionMethod,\n  DurationUnit,\n  AdditionalFeeTrigger,\n  TaxableAddressType,\n  PaymentStatus,\n  PausePolicy,\n  PauseAt,\n  ResumeAt,\n  HistoryActionInitiator,\n  ItemCategory,\n  SortOrder,\n  RunMode,\n} from './pricing-plans-plan-subscriptions-v1-plan-subscription-plan-subscriptions.universal.js';\nexport {\n  PlanSubscription,\n  BillingSubscription,\n  BillingSubscriptionPaymentData,\n  BillingSubscriptionTotals,\n  BillingSubscriptionDuration,\n  BillingSubscriptionTaxSettings,\n  BillingSubscriptionAdditionalFee,\n  BillingSubscriptionCycles,\n  BillingSubscriptionDiscount,\n  BillingSubscriptionDiscountValueOneOf,\n  BillingSubscriptionDiscountCycles,\n  BillingSubscriptionDiscountOrigin,\n  BillingSubscriptionPricingModel,\n  BillingSubscriptionPricingModelModelOneOf,\n  PricingModelFixedPrice,\n  BillingSubscriptionItemChange,\n  BillingSubscriptionSubscriptionUpdateData,\n  BillingSubscriptionCancellationInfo,\n  BillingSubscriptionBillingSettings,\n  BillingSubscriptionPauseInfo,\n  PlanLineItem,\n  BillingSubscriptionBillingStatus,\n  BillingSubscriptionPlatformOrigin,\n  BillingSubscriptionSpecificDateSubscriptionUpdateData,\n  FormSubmission,\n  OrderPricingDetails,\n  V1PricingModel,\n  V1PricingModelPricingModelOneOf,\n  Recurrence,\n  V1Duration,\n  Coupon,\n  BenefitDistribution,\n  BenefitDistributionSettings,\n  BenefitDistributionSettingsDistributionStrategyOneOf,\n  CustomScheduleOptionsDuration,\n  CustomScheduleOptions,\n  OrderPlanSubscriptionMigrated,\n  PlanSubscriptionPurchased,\n  PlanSubscriptionCycleStarted,\n  PlanSubscriptionPaused,\n  PlanSubscriptionResumed,\n  PlanSubscriptionEnded,\n  PlanSubscriptionStarted,\n  PlanSubscriptionMarkedAsPaid,\n  PlanSubscriptionAutoRenewCanceled,\n  PlanSubscriptionAutoRenewTurnedOn,\n  PlanSubscriptionCanceled,\n  PlanSubscriptionEndDatePostponed,\n  PlanSubscriptionRevived,\n  PlanSubscriptionStartDateChanged,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  EntityCreatedEvent,\n  RestoreInfo,\n  EntityUpdatedEvent,\n  EntityDeletedEvent,\n  ActionEvent,\n  MessageEnvelope,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  AccountInfo,\n  GetPlanSubscriptionRequest,\n  GetPlanSubscriptionResponse,\n  UpsertPlanSubscriptionRequest,\n  Subscription,\n  BusinessOrigin,\n  Customer,\n  CustomerIdOneOf,\n  BillingSettings,\n  PaymentMethod,\n  Duration,\n  CustomBillingSchedule,\n  FullAddressDetails,\n  FullAddressContactDetails,\n  Address,\n  AddressStreetOneOf,\n  StreetAddress,\n  TaxSettings,\n  AdditionalFee,\n  Tax,\n  TaxValueOneOf,\n  DynamicTax,\n  Cycles,\n  Origin,\n  ShippingCharges,\n  Discount,\n  DiscountValueOneOf,\n  DiscountCycles,\n  DiscountOrigin,\n  ExternalCollectionDetails,\n  BillingStatus,\n  PaymentData,\n  Totals,\n  PaymentTaxData,\n  TaxBreakdown,\n  FreeTrialData,\n  UpdateBillingDateData,\n  Proration,\n  ProrationTypeOneOf,\n  TimeBasedProration,\n  CustomProration,\n  CustomProrationAmountOneOf,\n  GracePeriodData,\n  AutomaticRetryData,\n  SubscriptionPolicies,\n  CustomerActionSettings,\n  SkipActionSettings,\n  SkipActionConfiguration,\n  PauseResumeActionSettings,\n  PauseResumeActionConfiguration,\n  CancelActionSettings,\n  CancelActionConfiguration,\n  UpmActionSettings,\n  UpdateBillingDateActionSettings,\n  UpdateBillingDateActionConfiguration,\n  CustomerActionCounters,\n  PauseInfo,\n  CancellationInfo,\n  SubscriptionUpdateData,\n  ItemChange,\n  PricingModel,\n  PricingModelModelOneOf,\n  FixedPrice,\n  ExternalPrice,\n  Item,\n  CatalogReference,\n  ApplicationFee,\n  ApplicationFeeValueOneOf,\n  CyclePriceOverride,\n  SpecificDateSubscriptionUpdateData,\n  PlatformOrigin,\n  ScheduledContractChange,\n  UpsertPlanSubscriptionResponse,\n  GetBySubscriptionContractIdRequest,\n  GetBySubscriptionContractIdResponse,\n  GetByBillingSubscriptionIdRequest,\n  GetByBillingSubscriptionIdResponse,\n  QueryPlanSubscriptionsRequest,\n  QueryV2,\n  QueryV2PagingMethodOneOf,\n  Sorting,\n  Paging,\n  CursorPaging,\n  QueryPlanSubscriptionsResponse,\n  PagingMetadataV2,\n  Cursors,\n  MatchPriceRequest,\n  MatchPriceRequestRunModeOptionsOneOf,\n  PricingStrategy,\n  PricingStrategyStrategyOneOf,\n  FlatRate,\n  CustomerChosenPrice,\n  CustomAmount,\n  PredefinedAmounts,\n  DryRunOptions,\n  MatchPriceResponse,\n  MatchPriceResponseResponseDetailsOneOf,\n  LiveRunDetails,\n  DryRunDetails,\n  PlanRevisionMismatchErrorDetails,\n  PlanVariantIsNotRecurringErrorDetails,\n  PricingVariantNotFoundErrorDetails,\n  CustomerChosenPriceNotSupportedErrorDetails,\n  CountPlanSubscriptionsRequest,\n  CountPlanSubscriptionsResponse,\n  EndPlanSubscriptionRequest,\n  EndPlanSubscriptionResponse,\n  Empty,\n  PlanSubscriptionsQueryResult,\n  PlanSubscriptionsQueryBuilder,\n  PlanSubscriptionQuerySpec,\n} from './pricing-plans-plan-subscriptions-v1-plan-subscription-plan-subscriptions.universal.js';\nexport { utils } from './pricing-plans-plan-subscriptions-v1-plan-subscription-plan-subscriptions.universal.js';\nexport {\n  PaymentDataPaymentStatusWithLiterals,\n  DurationDurationUnitWithLiterals,\n  CollectionMethodEnumCollectionMethodWithLiterals,\n  CancellationInfoHistoryActionInitiatorWithLiterals,\n  PausePolicyEnumPausePolicyWithLiterals,\n  PauseAtEnumPauseAtWithLiterals,\n  ResumeAtEnumResumeAtWithLiterals,\n  SubscriptionStatusEnumSubscriptionStatusWithLiterals,\n  PeriodUnitWithLiterals,\n  CustomScheduleOptionsDurationDurationUnitWithLiterals,\n  DistributionStrategyTypeWithLiterals,\n  EndReasonWithLiterals,\n  WebhookIdentityTypeWithLiterals,\n  SubscriptionStatusWithLiterals,\n  CollectionMethodWithLiterals,\n  DurationUnitWithLiterals,\n  AdditionalFeeTriggerWithLiterals,\n  TaxableAddressTypeWithLiterals,\n  PaymentStatusWithLiterals,\n  PausePolicyWithLiterals,\n  PauseAtWithLiterals,\n  ResumeAtWithLiterals,\n  HistoryActionInitiatorWithLiterals,\n  ItemCategoryWithLiterals,\n  SortOrderWithLiterals,\n  RunModeWithLiterals,\n  CommonQueryWithEntityContext,\n  PlanSubscriptionQuery,\n} from './pricing-plans-plan-subscriptions-v1-plan-subscription-plan-subscriptions.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,yBAAyB;AAClC,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,mDAAmD;AAAA,EAC3D,EAAE,MAAM,mDAAmD;AAAA,EAC3D,EAAE,MAAM,iDAAiD;AAAA,EACzD,EAAE,MAAM,+CAA+C;AAAA,EACvD;AAAA,IACE,MAAM;AAAA,EACR;AAAA,EACA,EAAE,MAAM,2DAA2D;AAAA,EACnE,EAAE,MAAM,4DAA4D;AAAA,EACpE;AAAA,IACE,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,MAAM;AAAA,EACR;AAAA,EACA,EAAE,MAAM,6DAA6D;AAAA,EACrE,EAAE,MAAM,2DAA2D;AAAA,EACnE,EAAE,MAAM,6DAA6D;AACvE;AACA,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,oDAAoD;AAAA,EAC5D,EAAE,MAAM,oDAAoD;AAAA,EAC5D,EAAE,MAAM,kDAAkD;AAAA,EAC1D,EAAE,MAAM,gDAAgD;AAAA,EACxD;AAAA,IACE,MAAM;AAAA,EACR;AAAA,EACA,EAAE,MAAM,4DAA4D;AAAA,EACpE,EAAE,MAAM,6DAA6D;AAAA,EACrE;AAAA,IACE,MAAM;AAAA,EACR;AAAA,E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AO,OAAO;AAAA,QAC1C,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,OAAO;AAAA,IACV;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAuGO,IAAM,QAAQ;AAAA,EACnB,OAAqB,iCAInB;AACJ;;;AE1nHO,SAAS8B,qBACd,YAC8B;AAC9B,SAAO,CAAC,mBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAyBO,SAASC,6BACd,YACsC;AACtC,SAAO,CAAC,2BACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA0BO,SAASC,wBACd,YACiC;AACjC,SAAO,MACLA;AAAA;AAAA,IAEE,EAAE,WAAW;AAAA,EACf;AACJ;AAeO,SAASC,6BACd,YACsC;AACtC,SAAO,CAAC,UACN;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC9GA,SAAS,wBAAwB;AAGjC,SAAS,iCAAiC;AAO1C,SAAS,6BAA6B,YAAwB;AAC5D,QAAM,SAAuB,0CAA0B;AAAA,IACrD,sBAAsB,MAAMC,wBAA6B,UAAU,EAAE;AAAA,IACrE,oBAAoB,CAAC,UACnBC,6BAAkC,UAAU,EAAE,KAAK;AAAA,IACrD,qBAAqB;AAAA,EACvB,CAAC;AAMD,WAAS,gBAAgB,OAAoC;AAC3D,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,uBAGK,iCAAiBA,oBAAyB;AACrD,IAAMC,+BAGK,iCAAiBA,4BAAiC;AAC7D,IAAMH,0BAGK,iCAAiB,4BAA4B;","names":["payload","transformPaths","PaymentDataPaymentStatus","DurationDurationUnit","CollectionMethodEnumCollectionMethod","CancellationInfoHistoryActionInitiator","PausePolicyEnumPausePolicy","PauseAtEnumPauseAt","ResumeAtEnumResumeAt","SubscriptionStatusEnumSubscriptionStatus","PeriodUnit","CustomScheduleOptionsDurationDurationUnit","DistributionStrategyType","EndReason","WebhookIdentityType","SubscriptionStatus","CollectionMethod","DurationUnit","AdditionalFeeTrigger","TaxableAddressType","PaymentStatus","PausePolicy","PauseAt","ResumeAt","HistoryActionInitiator","ItemCategory","SortOrder","RunMode","getPlanSubscription","getBySubscriptionContractId","queryPlanSubscriptions","getPlanSubscription","getBySubscriptionContractId","queryPlanSubscriptions","typedQueryPlanSubscriptions","queryPlanSubscriptions","typedQueryPlanSubscriptions","getPlanSubscription","getBySubscriptionContractId"]}