{"version":3,"sources":["../../src/pricing-plans-v3-plan-plansv-3.universal.ts","../../src/pricing-plans-v3-plan-plansv-3.http.ts","../../src/pricing-plans-v3-plan-plansv-3.public.ts","../../src/pricing-plans-v3-plan-plansv-3.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  Search as SearchSdkType,\n  NonNullablePaths,\n  SearchSpec,\n} from '@wix/sdk-types';\nimport * as ambassadorWixPricingPlansV3Plan from './pricing-plans-v3-plan-plansv-3.http.js';\n// @ts-ignore\nimport { transformSDKImageToRESTImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface Plan {\n  /**\n   * Plan ID.\n   * @format GUID\n   * @readonly\n   */\n  _id?: string | null;\n  /**\n   * Revision number, which increments by 1 each time the plan is updated.\n   * @readonly\n   */\n  revision?: string | null;\n  /**\n   * Date and time the plan was created.\n   * @readonly\n   */\n  _createdDate?: Date | null;\n  /**\n   * Date and time the plan was last updated.\n   * @readonly\n   */\n  _updatedDate?: Date | null;\n  /**\n   * Plan name displayed to customers.\n   * @minLength 1\n   * @maxLength 50\n   */\n  name?: string;\n  /**\n   * Plan description that explains what customers get with this plan.\n   * @maxLength 450\n   */\n  description?: string | null;\n  /** Visual information representing the plan. */\n  image?: string;\n  /**\n   * Unique identifier for this plan within the Wix site. If not provided, generated automatically from the plan name.\n   * @format URL_SLUG\n   * @maxLength 255\n   */\n  slug?: string | null;\n  /**\n   * Terms and conditions text that customers must agree to when purchasing this plan.\n   * @maxLength 3000\n   */\n  termsAndConditions?: string | null;\n  /**\n   * Maximum number of times the same customer can purchase this plan. Use `0` for unlimited purchases or `1` to limit to one purchase per customer.\n   * @max 10\n   */\n  maxPurchasesPerBuyer?: number;\n  /**\n   * Pricing variants that define different billing and pricing options for this plan. Currently limited to 1 variant per plan.\n   * @minSize 1\n   * @maxSize 1\n   */\n  pricingVariants?: PricingVariant[];\n  /**\n   * List of benefits or features included with this plan.\n   * @maxSize 500\n   */\n  perks?: Perk[];\n  /** Plan visibility. */\n  visibility?: VisibilityWithLiterals;\n  /** Whether customers can currently purchase this plan. */\n  buyable?: boolean;\n  /**\n   * ID of the form associated with the plan at checkout.\n   * @format GUID\n   */\n  formId?: string | null;\n  /** Whether the customer is allowed to cancel their plan. */\n  buyerCanCancel?: boolean;\n  /**\n   * Payment currency.\n   * @readonly\n   * @format CURRENCY\n   */\n  currency?: string;\n  /** Data extensions. */\n  extendedFields?: ExtendedFields;\n}\n\nexport interface PricingVariant {\n  /**\n   * Pricing variant ID.\n   * @format GUID\n   */\n  _id?: string;\n  /**\n   * Name for this pricing variant, such as \"Monthly\" or \"Yearly\".\n   * @minLength 1\n   * @maxLength 255\n   */\n  name?: string;\n  /**\n   * Number of days customers can use the plan for free before the first charge. Set to `0` for no free trial.\n   * @max 999\n   */\n  freeTrialDays?: number;\n  /**\n   * Additional fees applied to this pricing variant.\n   * @maxSize 10\n   */\n  fees?: Fee[];\n  /** Billing configuration that defines when and how often customers are charged. */\n  billingTerms?: BillingTerms;\n  /**\n   * Promotional message displayed with this pricing variant.\n   * @maxLength 255\n   */\n  promotion?: string | null;\n  /**\n   * Pricing strategies that determine how much customers pay. Currently limited to 1 strategy per variant.\n   * @minSize 1\n   * @maxSize 1\n   */\n  pricingStrategies?: PricingStrategy[];\n}\n\nexport interface FlatRate {\n  /**\n   * Fixed monetary amount.\n   * @decimalValue options { gte:0, maxScale:4 }\n   */\n  amount?: string;\n}\n\nexport interface Fee extends FeePriceOptionOneOf {\n  /** Fixed monetary amount for the fee. */\n  fixedAmountOptions?: FixedAmountOption;\n  /** @format GUID */\n  _id?: string;\n  /** Pricing type used for this fee. */\n  priceType?: PriceTypeWithLiterals;\n  /**\n   * Fee name displayed to customers, such as \"Setup Fee\" or \"Processing Fee\".\n   * @minLength 1\n   * @maxLength 40\n   */\n  name?: string;\n  /** When this fee is charged during the customer's plan lifecycle. */\n  appliedAt?: AppliedAtWithLiterals;\n}\n\n/** @oneof */\nexport interface FeePriceOptionOneOf {\n  /** Fixed monetary amount for the fee. */\n  fixedAmountOptions?: FixedAmountOption;\n}\n\nexport enum PriceType {\n  /** Unknown price type. This value isn't used. */\n  UNKNOWN_PRICE_TYPE = 'UNKNOWN_PRICE_TYPE',\n  /** Fee is charged as a fixed monetary amount. */\n  FIXED_AMOUNT = 'FIXED_AMOUNT',\n}\n\n/** @enumType */\nexport type PriceTypeWithLiterals =\n  | PriceType\n  | 'UNKNOWN_PRICE_TYPE'\n  | 'FIXED_AMOUNT';\n\nexport interface FixedAmountOption {\n  /**\n   * Fixed monetary amount.\n   * @decimalValue options { gt:0, maxScale:4 }\n   */\n  amount?: string;\n}\n\nexport enum AppliedAt {\n  UNKNOWN_APPLIED_AT = 'UNKNOWN_APPLIED_AT',\n  /** Fee is added to the first payment. */\n  FIRST_PAYMENT = 'FIRST_PAYMENT',\n}\n\n/** @enumType */\nexport type AppliedAtWithLiterals =\n  | AppliedAt\n  | 'UNKNOWN_APPLIED_AT'\n  | 'FIRST_PAYMENT';\n\nexport interface BillingTerms extends BillingTermsEndOptionOneOf {\n  /** How many billing cycles the plan lasts. */\n  cyclesCompletedDetails?: CyclesCompletedDetails;\n  /** Duration of each billing cycle, such as 1 month or 2 weeks. Can't be less than 7 days. Only applicable for recurring plans. */\n  billingCycle?: Duration;\n  /** When the billing starts. */\n  startType?: StartTypeWithLiterals;\n  /** How long the plan remains active. Plans can run until cancelled or for a specific number of billing cycles. Plan duration can't exceed 10 years. */\n  endType?: EndTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface BillingTermsEndOptionOneOf {\n  /** How many billing cycles the plan lasts. */\n  cyclesCompletedDetails?: CyclesCompletedDetails;\n}\n\nexport interface Duration {\n  /** Duration of period. */\n  period?: PeriodWithLiterals;\n  /**\n   * Number of periods.\n   * @min 1\n   */\n  count?: string;\n}\n\nexport enum Period {\n  /** Unknown period. This value isn't used. */\n  UNKNOWN_PERIOD = 'UNKNOWN_PERIOD',\n  DAY = 'DAY',\n  WEEK = 'WEEK',\n  MONTH = 'MONTH',\n  YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type PeriodWithLiterals =\n  | Period\n  | 'UNKNOWN_PERIOD'\n  | 'DAY'\n  | 'WEEK'\n  | 'MONTH'\n  | 'YEAR';\n\nexport enum StartType {\n  /** Unknown start type. This value isn't used. */\n  UNKNOWN_START_TYPE = 'UNKNOWN_START_TYPE',\n  /** Billing starts immediately after purchase. */\n  ON_PURCHASE = 'ON_PURCHASE',\n  /** Customer can choose when billing starts. */\n  CUSTOM = 'CUSTOM',\n}\n\n/** @enumType */\nexport type StartTypeWithLiterals =\n  | StartType\n  | 'UNKNOWN_START_TYPE'\n  | 'ON_PURCHASE'\n  | 'CUSTOM';\n\nexport enum EndType {\n  /** Unknown end type. This value isn't used. */\n  UNKNOWN_END_TYPE = 'UNKNOWN_END_TYPE',\n  /** Plan continues until customer cancels. */\n  UNTIL_CANCELLED = 'UNTIL_CANCELLED',\n  /** Plan ends after a specified number of billing cycles. */\n  CYCLES_COMPLETED = 'CYCLES_COMPLETED',\n}\n\n/** @enumType */\nexport type EndTypeWithLiterals =\n  | EndType\n  | 'UNKNOWN_END_TYPE'\n  | 'UNTIL_CANCELLED'\n  | 'CYCLES_COMPLETED';\n\nexport interface CyclesCompletedDetails {\n  /**\n   * Number of billing cycles before the plan automatically ends. For example, if `billingCycle` is 3 months and `billingCycleCount` is 4, the customer will be charged 4 times over 12 months before the plan expires. Only applicable if `endType` is `CYCLES_COMPLETED`.\n   * @min 1\n   * @max 2000\n   */\n  billingCycleCount?: string;\n}\n\nexport interface PricingStrategy extends PricingStrategyStrategyOneOf {\n  /** Single fixed cost charged regardless of usage. */\n  flatRate?: FlatRate;\n}\n\n/** @oneof */\nexport interface PricingStrategyStrategyOneOf {\n  /** Single fixed cost charged regardless of usage. */\n  flatRate?: FlatRate;\n}\n\nexport interface Perk {\n  /**\n   * Perk ID.\n   * @format GUID\n   */\n  _id?: string;\n  /**\n   * Perk description.\n   * @minLength 1\n   * @maxLength 1400\n   */\n  description?: string;\n}\n\nexport enum Visibility {\n  /** Unknown visibility. This value isn't used. */\n  UNKNOWN_VISIBILITY = 'UNKNOWN_VISIBILITY',\n  /** Plan is visible and available for purchase by all customers. */\n  PUBLIC = 'PUBLIC',\n  /** Plan is not visible to new customers, unles they get a specific link to the plan. Existing subscribers can continue using it. */\n  PRIVATE = 'PRIVATE',\n}\n\n/** @enumType */\nexport type VisibilityWithLiterals =\n  | Visibility\n  | 'UNKNOWN_VISIBILITY'\n  | 'PUBLIC'\n  | 'PRIVATE';\n\nexport enum Status {\n  UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n  ACTIVE = 'ACTIVE',\n}\n\n/** @enumType */\nexport type StatusWithLiterals = Status | 'UNKNOWN_STATUS' | 'ACTIVE';\n\nexport interface TermsAndConditionsSettings {\n  /** Whether customers must accept terms and conditions before purchasing. */\n  acceptRequired?: boolean;\n  /** Whether the terms and conditions checkbox is checked by default. */\n  acceptedByDefault?: boolean;\n}\n\nexport interface ThankYouPageSettings {\n  /**\n   * Thank you page title\n   * @maxLength 100\n   */\n  title?: string;\n  /**\n   * Thank you page message\n   * @maxLength 100000\n   */\n  message?: string;\n  /**\n   * Thank you page button text\n   * @maxLength 40\n   */\n  buttonText?: string;\n  /**\n   * Thank you page button link\n   * @maxLength 200\n   */\n  buttonLink?: string | null;\n}\n\nexport interface ExtendedFields {\n  /**\n   * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n   * The value of each key is structured according to the schema defined when the extended fields were configured.\n   *\n   * You can only access fields for which you have the appropriate permissions.\n   *\n   * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n   */\n  namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface ValidateOptionsRequest {\n  /**\n   * The plan id, which corresponds to catalogItemId in catalog item reference\n   * @format GUID\n   */\n  planId?: string;\n  /** The specific options selected for this plan */\n  options?: Options;\n  /**\n   * The id of the member buying the plan\n   * @format GUID\n   */\n  memberId?: string;\n}\n\nexport interface Options extends OptionsOptionsOneOf {\n  /** The options applicable to a plan */\n  planOptions?: PlanOptions;\n  /** The type of plan product the options refer to. */\n  type?: TypeWithLiterals;\n}\n\n/** @oneof */\nexport interface OptionsOptionsOneOf {\n  /** The options applicable to a plan */\n  planOptions?: PlanOptions;\n}\n\nexport enum Type {\n  UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n  PLAN = 'PLAN',\n  ADD_ON = 'ADD_ON',\n}\n\n/** @enumType */\nexport type TypeWithLiterals = Type | 'UNKNOWN_TYPE' | 'PLAN' | 'ADD_ON';\n\nexport interface PlanOptions {\n  /**\n   * The selected pricing variant for the plan\n   * @format GUID\n   */\n  pricingVariantId?: string;\n  /** Start date for the ordered plan */\n  startDate?: Date | null;\n  /**\n   * Form submission id that was submitted together with the order\n   * @format GUID\n   */\n  submissionId?: string | null;\n  /** Indication whether plan purchase requires login */\n  membersOnly?: boolean;\n  /** The type of Taxable address */\n  taxableAddress?: TaxableAddressWithLiterals;\n  /** The strategy used to validate the plan */\n  validationStrategy?: ValidationStrategyWithLiterals;\n}\n\nexport enum TaxableAddress {\n  UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n  BILLING = 'BILLING',\n  BUSINESS = 'BUSINESS',\n}\n\n/** @enumType */\nexport type TaxableAddressWithLiterals =\n  | TaxableAddress\n  | 'UNKNOWN_TYPE'\n  | 'BILLING'\n  | 'BUSINESS';\n\nexport enum ValidationStrategy {\n  UNKNOWN_VALIDATION_STRATEGY = 'UNKNOWN_VALIDATION_STRATEGY',\n  ON_BEHALF = 'ON_BEHALF',\n  PREVIEW = 'PREVIEW',\n}\n\n/** @enumType */\nexport type ValidationStrategyWithLiterals =\n  | ValidationStrategy\n  | 'UNKNOWN_VALIDATION_STRATEGY'\n  | 'ON_BEHALF'\n  | 'PREVIEW';\n\nexport interface ValidateOptionsResponse {\n  /** Description of value */\n  violations?: Violation[];\n}\n\nexport interface Violation {\n  /**\n   * The code of the violation. The possible values are:\n   * plan-not-active\n   * plan-not-buyable\n   * max-purchases-exceeded\n   * start-date-not-applicable\n   * start-date-in-past\n   * pricing-variant-not-found\n   * start-date-not-in-permitted-range\n   * @minLength 1\n   * @maxLength 50\n   */\n  code?: string;\n  /**\n   * User facing message describing the violation\n   * @minLength 1\n   * @maxLength 255\n   */\n  message?: string;\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}\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\n/**\n * Message for reindexing search data to a given search schema. Support both upsert and delete flows as well as\n * performs context manipulation with adding tenant, provided in message to callscope.\n */\nexport interface ReindexMessage extends ReindexMessageActionOneOf {\n  upsert?: Upsert;\n  delete?: Delete;\n  entityFqdn?: string;\n  tenantId?: string;\n  eventTime?: Date | null;\n  entityEventSequence?: string | null;\n  schema?: Schema;\n}\n\n/** @oneof */\nexport interface ReindexMessageActionOneOf {\n  upsert?: Upsert;\n  delete?: Delete;\n}\n\nexport interface Upsert {\n  entityId?: string;\n  entityAsJson?: string;\n}\n\nexport interface Delete {\n  entityId?: string;\n}\n\nexport interface Schema {\n  label?: string;\n  clusterName?: string;\n}\n\nexport interface CreatePlanRequest {\n  /** plan to create. */\n  plan: Plan;\n  /**\n   * Unique key to prevent duplicate plan creation. If the same key is used within a short time period, the original plan will be returned instead of creating a duplicate.\n   * @format GUID\n   */\n  idempotencyKey?: string | null;\n}\n\nexport interface CreatePlanResponse {\n  /** Created plan. */\n  plan?: Plan;\n}\n\nexport interface GetPlanRequest {\n  /**\n   * ID of the plan to retrieve.\n   * @format GUID\n   */\n  planId: string;\n}\n\nexport interface GetPlanResponse {\n  /** Requested plan. */\n  plan?: Plan;\n}\n\nexport interface UpdatePlanRequest {\n  /** plan to update. */\n  plan: Plan;\n}\n\nexport interface UpdatePlanResponse {\n  /** Updated plan. */\n  plan?: Plan;\n}\n\nexport interface BulkUpdatePlansRequest {\n  /**\n   * Plans to update.\n   * @minSize 1\n   * @maxSize 100\n   */\n  plans: MaskedPlan[];\n  /** Set the value to `true` to receive details of the updated plans. */\n  returnEntity?: boolean;\n}\n\nexport interface MaskedPlan {\n  /** Plan to update. */\n  plan?: Plan;\n}\n\nexport interface BulkUpdatePlansResponse {\n  /**\n   * Updated plans.\n   * @minSize 1\n   * @maxSize 100\n   */\n  results?: BulkPlanResult[];\n  /** Action metadata. */\n  bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface ItemMetadata {\n  /**\n   * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\n   * @format GUID\n   */\n  _id?: string | null;\n  /** Index of the item within the request array. Allows for correlation between request and response items. */\n  originalIndex?: number;\n  /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n  success?: boolean;\n  /** Details about the error in case of failure. */\n  error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n  /** Error code. */\n  code?: string;\n  /** Description of the error. */\n  description?: string;\n  /** Data related to the error. */\n  data?: Record<string, any> | null;\n}\n\nexport interface BulkPlanResult {\n  /** Metadata for a specific updated item. */\n  itemMetadata?: ItemMetadata;\n  /** Updated plan details. Only returned if the `returnEntity` field was set to `true`. */\n  item?: Plan;\n}\n\nexport interface BulkActionMetadata {\n  /** Number of items that were successfully processed. */\n  totalSuccesses?: number;\n  /** Number of items that couldn't be processed. */\n  totalFailures?: number;\n  /** Number of failures without details because detailed failure threshold was exceeded. */\n  undetailedFailures?: number;\n}\n\nexport interface DeletePlanRequest {\n  /**\n   * ID of the plan to delete.\n   * @format GUID\n   */\n  planId: string;\n}\n\nexport interface DeletePlanResponse {}\n\nexport interface QueryPlansRequest {\n  /** Query options. See [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language) for more details. */\n  query?: QueryV2;\n}\n\nexport interface QueryV2 extends QueryV2PagingMethodOneOf {\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.\n   *\n   * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).\n   */\n  filter?: Record<string, any> | null;\n  /**\n   * Sort object.\n   *\n   * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).\n   * @maxSize 5\n   */\n  sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface QueryV2PagingMethodOneOf {\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\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 QueryPlansResponse {\n  /** List of plans. */\n  plans?: Plan[];\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\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 SearchPlansRequest {\n  /** Search options. See [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language) for more details. */\n  search?: CursorSearch;\n}\n\nexport interface CursorSearch extends CursorSearchPagingMethodOneOf {\n  /**\n   * Cursor pointing to page of results.\n   * When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.\n   */\n  cursorPaging?: CursorPaging;\n  /** A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf) */\n  filter?: Record<string, any> | null;\n  /**\n   * Sort object in the form [{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}]\n   * @maxSize 10\n   */\n  sort?: Sorting[];\n  /**\n   * Aggregations | Faceted search: refers to a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition.\n   * @maxSize 10\n   */\n  aggregations?: Aggregation[];\n  /** Free text to match in searchable fields */\n  search?: SearchDetails;\n  /**\n   * UTC offset or IANA time zone. Valid values are\n   * ISO 8601 UTC offsets, such as +02:00 or -06:00,\n   * and IANA time zone IDs, such as Europe/Rome\n   *\n   * Affects all filters and aggregations returned values.\n   * You may override this behavior in a specific filter by providing\n   * timestamps including time zone. e.g. `\"2023-12-20T10:52:34.795Z\"`\n   * @maxLength 50\n   */\n  timeZone?: string | null;\n}\n\n/** @oneof */\nexport interface CursorSearchPagingMethodOneOf {\n  /**\n   * Cursor pointing to page of results.\n   * When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.\n   */\n  cursorPaging?: CursorPaging;\n}\n\nexport interface Aggregation extends AggregationKindOneOf {\n  /** Value aggregation */\n  value?: ValueAggregation;\n  /** Range aggregation */\n  range?: RangeAggregation;\n  /** Scalar aggregation */\n  scalar?: ScalarAggregation;\n  /** Date histogram aggregation */\n  dateHistogram?: DateHistogramAggregation;\n  /** Nested aggregation */\n  nested?: NestedAggregation;\n  /**\n   * User-defined name of aggregation, should be unique, will appear in aggregation results\n   * @maxLength 100\n   */\n  name?: string | null;\n  /** Type of aggregation, client must provide matching aggregation field below */\n  type?: AggregationTypeWithLiterals;\n  /**\n   * Field to aggregate by, use dot notation to specify json path\n   * @maxLength 200\n   */\n  fieldPath?: string;\n}\n\n/** @oneof */\nexport interface AggregationKindOneOf {\n  /** Value aggregation */\n  value?: ValueAggregation;\n  /** Range aggregation */\n  range?: RangeAggregation;\n  /** Scalar aggregation */\n  scalar?: ScalarAggregation;\n  /** Date histogram aggregation */\n  dateHistogram?: DateHistogramAggregation;\n  /** Nested aggregation */\n  nested?: NestedAggregation;\n}\n\nexport interface RangeBucket {\n  /** Inclusive lower bound of the range. Required if to is not given */\n  from?: number | null;\n  /** Exclusive upper bound of the range. Required if from is not given */\n  to?: number | null;\n}\n\nexport enum SortType {\n  /** Should sort by number of matches */\n  COUNT = 'COUNT',\n  /** Should sort by value of the field alphabetically */\n  VALUE = 'VALUE',\n}\n\n/** @enumType */\nexport type SortTypeWithLiterals = SortType | 'COUNT' | 'VALUE';\n\nexport enum SortDirection {\n  /** Should sort in descending order */\n  DESC = 'DESC',\n  /** Should sort in ascending order */\n  ASC = 'ASC',\n}\n\n/** @enumType */\nexport type SortDirectionWithLiterals = SortDirection | 'DESC' | 'ASC';\n\nexport enum MissingValues {\n  /** Should missing values be excluded from the aggregation results */\n  EXCLUDE = 'EXCLUDE',\n  /** Should missing values be included in the aggregation results */\n  INCLUDE = 'INCLUDE',\n}\n\n/** @enumType */\nexport type MissingValuesWithLiterals = MissingValues | 'EXCLUDE' | 'INCLUDE';\n\nexport interface IncludeMissingValuesOptions {\n  /**\n   * Can specify custom bucket name. Defaults are [string -> \"N/A\"], [int -> \"0\"], [bool -> \"false\"] ...\n   * @maxLength 20\n   */\n  addToBucket?: string;\n}\n\nexport enum ScalarType {\n  UNKNOWN_SCALAR_TYPE = 'UNKNOWN_SCALAR_TYPE',\n  /** Count of distinct values */\n  COUNT_DISTINCT = 'COUNT_DISTINCT',\n  /** Minimum value */\n  MIN = 'MIN',\n  /** Maximum value */\n  MAX = 'MAX',\n}\n\n/** @enumType */\nexport type ScalarTypeWithLiterals =\n  | ScalarType\n  | 'UNKNOWN_SCALAR_TYPE'\n  | 'COUNT_DISTINCT'\n  | 'MIN'\n  | 'MAX';\n\nexport interface ValueAggregation extends ValueAggregationOptionsOneOf {\n  /** Options for including missing values */\n  includeOptions?: IncludeMissingValuesOptions;\n  /** Should sort by number of matches or value of the field */\n  sortType?: SortTypeWithLiterals;\n  /** Should sort in ascending or descending order */\n  sortDirection?: SortDirectionWithLiterals;\n  /** How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. */\n  limit?: number | null;\n  /** Should missing values be included or excluded from the aggregation results. Default is EXCLUDE */\n  missingValues?: MissingValuesWithLiterals;\n}\n\n/** @oneof */\nexport interface ValueAggregationOptionsOneOf {\n  /** Options for including missing values */\n  includeOptions?: IncludeMissingValuesOptions;\n}\n\nexport enum NestedAggregationType {\n  UNKNOWN_AGGREGATION_TYPE = 'UNKNOWN_AGGREGATION_TYPE',\n  /** An aggregation where result buckets are dynamically built - one per unique value */\n  VALUE = 'VALUE',\n  /** An aggregation, where user can define set of ranges - each representing a bucket */\n  RANGE = 'RANGE',\n  /** A single-value metric aggregation - e.g. min, max, sum, avg */\n  SCALAR = 'SCALAR',\n  /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */\n  DATE_HISTOGRAM = 'DATE_HISTOGRAM',\n}\n\n/** @enumType */\nexport type NestedAggregationTypeWithLiterals =\n  | NestedAggregationType\n  | 'UNKNOWN_AGGREGATION_TYPE'\n  | 'VALUE'\n  | 'RANGE'\n  | 'SCALAR'\n  | 'DATE_HISTOGRAM';\n\nexport interface RangeAggregation {\n  /**\n   * List of range buckets, where during aggregation each entity will be placed in the first bucket where its value falls into based on provided range bounds\n   * @maxSize 50\n   */\n  buckets?: RangeBucket[];\n}\n\nexport interface ScalarAggregation {\n  /** Define the operator for the scalar aggregation */\n  type?: ScalarTypeWithLiterals;\n}\n\nexport interface DateHistogramAggregation {\n  /** Interval for date histogram aggregation */\n  interval?: IntervalWithLiterals;\n}\n\nexport enum Interval {\n  UNKNOWN_INTERVAL = 'UNKNOWN_INTERVAL',\n  /** Yearly interval */\n  YEAR = 'YEAR',\n  /** Monthly interval */\n  MONTH = 'MONTH',\n  /** Weekly interval */\n  WEEK = 'WEEK',\n  /** Daily interval */\n  DAY = 'DAY',\n  /** Hourly interval */\n  HOUR = 'HOUR',\n  /** Minute interval */\n  MINUTE = 'MINUTE',\n  /** Second interval */\n  SECOND = 'SECOND',\n}\n\n/** @enumType */\nexport type IntervalWithLiterals =\n  | Interval\n  | 'UNKNOWN_INTERVAL'\n  | 'YEAR'\n  | 'MONTH'\n  | 'WEEK'\n  | 'DAY'\n  | 'HOUR'\n  | 'MINUTE'\n  | 'SECOND';\n\nexport interface NestedAggregationItem extends NestedAggregationItemKindOneOf {\n  /** Value aggregation */\n  value?: ValueAggregation;\n  /** Range aggregation */\n  range?: RangeAggregation;\n  /** Scalar aggregation */\n  scalar?: ScalarAggregation;\n  /** Date histogram aggregation */\n  dateHistogram?: DateHistogramAggregation;\n  /**\n   * User-defined name of aggregation, should be unique, will appear in aggregation results\n   * @maxLength 100\n   */\n  name?: string | null;\n  /** Type of aggregation, client must provide matching aggregation field below */\n  type?: NestedAggregationTypeWithLiterals;\n  /**\n   * Field to aggregate by, use dont notation to specify json path\n   * @maxLength 200\n   */\n  fieldPath?: string;\n}\n\n/** @oneof */\nexport interface NestedAggregationItemKindOneOf {\n  /** Value aggregation */\n  value?: ValueAggregation;\n  /** Range aggregation */\n  range?: RangeAggregation;\n  /** Scalar aggregation */\n  scalar?: ScalarAggregation;\n  /** Date histogram aggregation */\n  dateHistogram?: DateHistogramAggregation;\n}\n\nexport enum AggregationType {\n  UNKNOWN_AGGREGATION_TYPE = 'UNKNOWN_AGGREGATION_TYPE',\n  /** An aggregation where result buckets are dynamically built - one per unique value */\n  VALUE = 'VALUE',\n  /** An aggregation, where user can define set of ranges - each representing a bucket */\n  RANGE = 'RANGE',\n  /** A single-value metric aggregation - e.g. min, max, sum, avg */\n  SCALAR = 'SCALAR',\n  /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */\n  DATE_HISTOGRAM = 'DATE_HISTOGRAM',\n  /** Multi-level aggregation, where each next aggregation is nested within previous one */\n  NESTED = 'NESTED',\n}\n\n/** @enumType */\nexport type AggregationTypeWithLiterals =\n  | AggregationType\n  | 'UNKNOWN_AGGREGATION_TYPE'\n  | 'VALUE'\n  | 'RANGE'\n  | 'SCALAR'\n  | 'DATE_HISTOGRAM'\n  | 'NESTED';\n\n/** Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one */\nexport interface NestedAggregation {\n  /**\n   * Flattened list of aggregations, where each next aggregation is nested within previous one\n   * @minSize 2\n   * @maxSize 3\n   */\n  nestedAggregations?: NestedAggregationItem[];\n}\n\nexport interface SearchDetails {\n  /** Defines how separate search terms in `expression` are combined */\n  mode?: ModeWithLiterals;\n  /**\n   * Search term or expression\n   * @maxLength 100\n   */\n  expression?: string | null;\n  /**\n   * Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path\n   * @maxLength 200\n   * @maxSize 20\n   */\n  fields?: string[];\n  /** Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */\n  fuzzy?: boolean;\n}\n\nexport enum Mode {\n  /** Any of the search terms must be present */\n  OR = 'OR',\n  /** All search terms must be present */\n  AND = 'AND',\n}\n\n/** @enumType */\nexport type ModeWithLiterals = Mode | 'OR' | 'AND';\n\nexport interface SearchPlansResponse {\n  /** List of plans. */\n  plans?: Plan[];\n  /** Paging metadata. */\n  pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n  /** Number of items returned in the response. */\n  count?: number | null;\n  /** Cursor strings that point to the next page, previous page, or both. */\n  cursors?: Cursors;\n  /**\n   * Whether there are more pages to retrieve following the current page.\n   *\n   * + `true`: Another page of results can be retrieved.\n   * + `false`: This is the last page.\n   */\n  hasNext?: boolean | null;\n}\n\nexport interface CountPlansRequest {\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  /** Free text to match in searchable fields. When specified, the method uses search instead of filter, and may be less consistent. */\n  search?: SearchDetails;\n}\n\nexport interface CountPlansResponse {\n  /** The number of plans. */\n  count?: number;\n}\n\nexport interface UpdateExtendedFieldsRequest {\n  /** ID of the entity to update. */\n  _id: string;\n  /** Identifier for the app whose extended fields are being updated. */\n  namespace: string;\n  /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */\n  namespaceData: Record<string, any> | null;\n}\n\nexport interface UpdateExtendedFieldsResponse {\n  /** Updated Plan. */\n  plan?: Plan;\n}\n\ntype PlanNonNullablePaths =\n  | `name`\n  | `maxPurchasesPerBuyer`\n  | `pricingVariants`\n  | `pricingVariants.${number}._id`\n  | `pricingVariants.${number}.name`\n  | `pricingVariants.${number}.freeTrialDays`\n  | `pricingVariants.${number}.billingTerms.cyclesCompletedDetails.billingCycleCount`\n  | `pricingVariants.${number}.billingTerms.billingCycle.period`\n  | `pricingVariants.${number}.billingTerms.billingCycle.count`\n  | `pricingVariants.${number}.billingTerms.startType`\n  | `pricingVariants.${number}.billingTerms.endType`\n  | `perks`\n  | `perks.${number}._id`\n  | `perks.${number}.description`\n  | `visibility`\n  | `buyable`\n  | `buyerCanCancel`\n  | `currency`;\n\n/**\n * Creates a plan with specified billing terms and a pricing strategy.\n * @param plan - plan to create.\n * @public\n * @documentationMaturity preview\n * @requiredField plan\n * @requiredField plan.pricingVariants._id\n * @requiredField plan.pricingVariants.name\n * @requiredField plan.status\n * @requiredField plan.visibility\n * @permissionId PRICING_PLANS.PLAN_CREATE\n * @applicableIdentity APP\n * @returns Created plan.\n * @fqn wix.pricing_plans.plans.v3.PlanService.CreatePlan\n */\nexport async function createPlan(\n  plan: NonNullablePaths<\n    Plan,\n    | `pricingVariants.${number}._id`\n    | `pricingVariants.${number}.billingTerms`\n    | `pricingVariants.${number}.billingTerms.billingCycle.period`\n    | `pricingVariants.${number}.billingTerms.endType`\n    | `pricingVariants.${number}.billingTerms.startType`\n    | `pricingVariants.${number}.fees.${number}.appliedAt`\n    | `pricingVariants.${number}.fees.${number}.priceType`\n    | `pricingVariants.${number}.name`\n    | `visibility`\n  >,\n  options?: CreatePlanOptions\n): Promise<NonNullablePaths<Plan, PlanNonNullablePaths>> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = transformPaths(\n    renameKeysFromSDKRequestToRESTRequest({\n      plan: plan,\n      idempotencyKey: options?.idempotencyKey,\n    }),\n    [\n      {\n        transformFn: transformSDKImageToRESTImage,\n        paths: [{ path: 'plan.image' }],\n      },\n    ]\n  );\n\n  const reqOpts = ambassadorWixPricingPlansV3Plan.createPlan(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [{ path: 'plan.image' }],\n        },\n      ])\n    )?.plan!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          plan: '$[0]',\n          idempotencyKey: '$[1].idempotencyKey',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['plan', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface CreatePlanOptions {\n  /**\n   * Unique key to prevent duplicate plan creation. If the same key is used within a short time period, the original plan will be returned instead of creating a duplicate.\n   * @format GUID\n   */\n  idempotencyKey?: string | null;\n}\n\n/**\n * Retrieves a plan by ID.\n * @param planId - ID of the plan to retrieve.\n * @public\n * @documentationMaturity preview\n * @requiredField planId\n * @permissionId PRICING_PLANS.PLAN_READ\n * @applicableIdentity APP\n * @returns Requested plan.\n * @fqn wix.pricing_plans.plans.v3.PlanService.GetPlan\n */\nexport async function getPlan(\n  planId: string\n): Promise<NonNullablePaths<Plan, PlanNonNullablePaths>> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ planId: planId });\n\n  const reqOpts = ambassadorWixPricingPlansV3Plan.getPlan(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [{ path: 'plan.image' }],\n        },\n      ])\n    )?.plan!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { planId: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['planId']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Updates a single plan.\n *\n * To update multiple plans at once, call [Bulk Update Plans](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/pricing-plans/plans-v3/bulk-update-plans).\n * @param _id - Plan ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField plan\n * @requiredField plan.pricingVariants._id\n * @requiredField plan.pricingVariants.name\n * @requiredField plan.revision\n * @permissionId PRICING_PLANS.PLAN_UPDATE\n * @applicableIdentity APP\n * @returns Updated plan.\n * @fqn wix.pricing_plans.plans.v3.PlanService.UpdatePlan\n */\nexport async function updatePlan(\n  _id: string,\n  plan: NonNullablePaths<\n    UpdatePlan,\n    | `pricingVariants.${number}._id`\n    | `pricingVariants.${number}.billingTerms`\n    | `pricingVariants.${number}.billingTerms.billingCycle.period`\n    | `pricingVariants.${number}.billingTerms.endType`\n    | `pricingVariants.${number}.billingTerms.startType`\n    | `pricingVariants.${number}.fees.${number}.appliedAt`\n    | `pricingVariants.${number}.fees.${number}.priceType`\n    | `pricingVariants.${number}.name`\n    | `revision`\n  >\n): Promise<NonNullablePaths<Plan, PlanNonNullablePaths>> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = transformPaths(\n    renameKeysFromSDKRequestToRESTRequest({ plan: { ...plan, id: _id } }),\n    [\n      {\n        transformFn: transformSDKImageToRESTImage,\n        paths: [{ path: 'plan.image' }],\n      },\n    ]\n  );\n\n  const reqOpts = ambassadorWixPricingPlansV3Plan.updatePlan(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [{ path: 'plan.image' }],\n        },\n      ])\n    )?.plan!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: { plan: '$[1]' },\n        explicitPathsToArguments: { 'plan.id': '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'plan']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface UpdatePlan {\n  /**\n   * Plan ID.\n   * @format GUID\n   * @readonly\n   */\n  _id?: string | null;\n  /**\n   * Revision number, which increments by 1 each time the plan is updated.\n   * @readonly\n   */\n  revision?: string | null;\n  /**\n   * Date and time the plan was created.\n   * @readonly\n   */\n  _createdDate?: Date | null;\n  /**\n   * Date and time the plan was last updated.\n   * @readonly\n   */\n  _updatedDate?: Date | null;\n  /**\n   * Plan name displayed to customers.\n   * @minLength 1\n   * @maxLength 50\n   */\n  name?: string;\n  /**\n   * Plan description that explains what customers get with this plan.\n   * @maxLength 450\n   */\n  description?: string | null;\n  /** Visual information representing the plan. */\n  image?: string;\n  /**\n   * Unique identifier for this plan within the Wix site. If not provided, generated automatically from the plan name.\n   * @format URL_SLUG\n   * @maxLength 255\n   */\n  slug?: string | null;\n  /**\n   * Terms and conditions text that customers must agree to when purchasing this plan.\n   * @maxLength 3000\n   */\n  termsAndConditions?: string | null;\n  /**\n   * Maximum number of times the same customer can purchase this plan. Use `0` for unlimited purchases or `1` to limit to one purchase per customer.\n   * @max 10\n   */\n  maxPurchasesPerBuyer?: number;\n  /**\n   * Pricing variants that define different billing and pricing options for this plan. Currently limited to 1 variant per plan.\n   * @minSize 1\n   * @maxSize 1\n   */\n  pricingVariants?: PricingVariant[];\n  /**\n   * List of benefits or features included with this plan.\n   * @maxSize 500\n   */\n  perks?: Perk[];\n  /** Plan visibility. */\n  visibility?: VisibilityWithLiterals;\n  /** Whether customers can currently purchase this plan. */\n  buyable?: boolean;\n  /**\n   * ID of the form associated with the plan at checkout.\n   * @format GUID\n   */\n  formId?: string | null;\n  /** Whether the customer is allowed to cancel their plan. */\n  buyerCanCancel?: boolean;\n  /**\n   * Payment currency.\n   * @readonly\n   * @format CURRENCY\n   */\n  currency?: string;\n  /** Data extensions. */\n  extendedFields?: ExtendedFields;\n}\n\n/**\n * Updates multiple plans at once.\n *\n * You can't change plan names with this method.\n *\n * To update a single plan, call [Update Plan](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/pricing-plans/plans-v3/update-plan).\n * @param plans - Plans to update.\n * @public\n * @documentationMaturity preview\n * @requiredField plans\n * @requiredField plans.plan._id\n * @requiredField plans.plan.pricingVariants._id\n * @requiredField plans.plan.pricingVariants.name\n * @requiredField plans.plan.revision\n * @permissionId PRICING_PLANS.PLAN_UPDATE\n * @applicableIdentity APP\n * @fqn wix.pricing_plans.plans.v3.PlanService.BulkUpdatePlans\n */\nexport async function bulkUpdatePlans(\n  plans: NonNullablePaths<\n    MaskedPlan,\n    | `plan._id`\n    | `plan.pricingVariants.${number}._id`\n    | `plan.pricingVariants.${number}.billingTerms`\n    | `plan.pricingVariants.${number}.billingTerms.billingCycle.period`\n    | `plan.pricingVariants.${number}.billingTerms.endType`\n    | `plan.pricingVariants.${number}.billingTerms.startType`\n    | `plan.pricingVariants.${number}.fees.${number}.appliedAt`\n    | `plan.pricingVariants.${number}.fees.${number}.priceType`\n    | `plan.pricingVariants.${number}.name`\n    | `plan.revision`\n  >[],\n  options?: BulkUpdatePlansOptions\n): Promise<\n  NonNullablePaths<\n    BulkUpdatePlansResponse,\n    | `results`\n    | `results.${number}.itemMetadata.originalIndex`\n    | `results.${number}.itemMetadata.success`\n    | `results.${number}.itemMetadata.error.code`\n    | `results.${number}.itemMetadata.error.description`\n    | {\n        [P in PlanNonNullablePaths]: `results.${number}.item.${P}`;\n      }[PlanNonNullablePaths]\n    | `bulkActionMetadata.totalSuccesses`\n    | `bulkActionMetadata.totalFailures`\n    | `bulkActionMetadata.undetailedFailures`\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = transformPaths(\n    renameKeysFromSDKRequestToRESTRequest({\n      plans: plans,\n      returnEntity: options?.returnEntity,\n    }),\n    [\n      {\n        transformFn: transformSDKImageToRESTImage,\n        paths: [{ path: 'plans.plan.image' }],\n      },\n    ]\n  );\n\n  const reqOpts = ambassadorWixPricingPlansV3Plan.bulkUpdatePlans(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [{ path: 'results.item.image' }],\n        },\n      ])\n    )!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          plans: '$[0]',\n          returnEntity: '$[1].returnEntity',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['plans', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface BulkUpdatePlansOptions {\n  /** Set the value to `true` to receive details of the updated plans. */\n  returnEntity?: boolean;\n}\n\n/**\n * Deletes a plan.\n * @param planId - ID of the plan to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField planId\n * @permissionId PRICING_PLANS.PLAN_DELETE\n * @applicableIdentity APP\n * @fqn wix.pricing_plans.plans.v3.PlanService.DeletePlan\n */\nexport async function deletePlan(planId: string): Promise<void> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ planId: planId });\n\n  const reqOpts = ambassadorWixPricingPlansV3Plan.deletePlan(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { planId: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['planId']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Retrieves a list of plans, given the provided paging, filtering, and sorting.\n * Query plans runs with these defaults, which you can override:\n * - `createdDate` is sorted in `ASC` order\n * - `paging.limit` is `100`\n * - `paging.offset` is `0`\n * <br>\n * For field support for filters and sorting, see [plans: Supported Filters and Sorting](https://dev.wix.com/docs/rest/business-solutions/events/ticket-definition-v3/filter-and-sort).\n * To learn about working with queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).\n * @public\n * @documentationMaturity preview\n * @permissionId PRICING_PLANS.PLAN_READ_PUBLIC\n * @permissionId PRICING_PLANS.PLAN_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn wix.pricing_plans.plans.v3.PlanService.QueryPlans\n */\nexport function queryPlans(): PlansQueryBuilder {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[0] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  return queryBuilder<Plan, 'CURSOR', QueryPlansRequest, QueryPlansResponse>({\n    func: async (payload: QueryPlansRequest) => {\n      const reqOpts = ambassadorWixPricingPlansV3Plan.queryPlans(payload);\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: QueryPlansRequest['query']) => {\n      const args = [query, {}] as [QueryPlansRequest['query'], {}];\n      return renameKeysFromSDKRequestToRESTRequest({\n        ...args?.[1],\n        query: args?.[0],\n      });\n    },\n    responseTransformer: ({ data }: HttpResponse<QueryPlansResponse>) => {\n      const transformedData = renameKeysFromRESTResponseToSDKResponse(\n        transformPaths(data, [\n          {\n            transformFn: transformRESTImageToSDKImage,\n            paths: [{ path: 'plans.image' }],\n          },\n        ])\n      );\n\n      return {\n        items: transformedData?.plans,\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 PlansQueryResult extends QueryCursorResult {\n  items: Plan[];\n  query: PlansQueryBuilder;\n  next: () => Promise<PlansQueryResult>;\n  prev: () => Promise<PlansQueryResult>;\n}\n\nexport interface PlansQueryBuilder {\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      | '_createdDate'\n      | '_updatedDate'\n      | 'name'\n      | 'slug'\n      | 'pricingVariants.id'\n      | 'pricingVariants.name'\n      | 'visibility'\n      | 'formId',\n    value: any\n  ) => PlansQueryBuilder;\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      | '_createdDate'\n      | '_updatedDate'\n      | 'name'\n      | 'slug'\n      | 'pricingVariants.id'\n      | 'pricingVariants.name'\n      | 'visibility'\n      | 'formId',\n    value: any\n  ) => PlansQueryBuilder;\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      | '_createdDate'\n      | '_updatedDate'\n      | 'name'\n      | 'slug'\n      | 'pricingVariants.id'\n      | 'pricingVariants.name'\n      | 'formId',\n    value: any\n  ) => PlansQueryBuilder;\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      | '_createdDate'\n      | '_updatedDate'\n      | 'name'\n      | 'slug'\n      | 'pricingVariants.id'\n      | 'pricingVariants.name'\n      | 'formId',\n    value: any\n  ) => PlansQueryBuilder;\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      | '_createdDate'\n      | '_updatedDate'\n      | 'name'\n      | 'slug'\n      | 'pricingVariants.id'\n      | 'pricingVariants.name'\n      | 'formId',\n    value: any\n  ) => PlansQueryBuilder;\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      | '_createdDate'\n      | '_updatedDate'\n      | 'name'\n      | 'slug'\n      | 'pricingVariants.id'\n      | 'pricingVariants.name'\n      | 'formId',\n    value: any\n  ) => PlansQueryBuilder;\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      | 'name'\n      | 'slug'\n      | 'pricingVariants.id'\n      | 'pricingVariants.name'\n      | 'formId',\n    value: string\n  ) => PlansQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `values`.\n   * @param values - List of values to compare against.\n   * @documentationMaturity preview\n   */\n  hasSome: (\n    propertyName:\n      | '_id'\n      | '_createdDate'\n      | '_updatedDate'\n      | 'name'\n      | 'slug'\n      | 'pricingVariants.id'\n      | 'pricingVariants.name'\n      | 'visibility'\n      | 'formId',\n    value: any[]\n  ) => PlansQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `values`.\n   * @param values - List of values to compare against.\n   * @documentationMaturity preview\n   */\n  hasAll: (propertyName: string, value: any[]) => PlansQueryBuilder;\n  /** @documentationMaturity preview */\n  in: (\n    propertyName:\n      | '_id'\n      | '_createdDate'\n      | '_updatedDate'\n      | 'name'\n      | 'slug'\n      | 'pricingVariants.id'\n      | 'pricingVariants.name'\n      | 'visibility'\n      | 'formId',\n    value: any\n  ) => PlansQueryBuilder;\n  /** @documentationMaturity preview */\n  exists: (\n    propertyName:\n      | '_id'\n      | '_createdDate'\n      | '_updatedDate'\n      | 'name'\n      | 'slug'\n      | 'pricingVariants.id'\n      | 'pricingVariants.name'\n      | 'visibility'\n      | 'formId',\n    value: boolean\n  ) => PlansQueryBuilder;\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      | '_createdDate'\n      | '_updatedDate'\n      | 'name'\n      | 'slug'\n      | 'pricingVariants.id'\n      | 'pricingVariants.name'\n      | 'visibility'\n      | 'status'\n      | 'formId'\n      | 'archived'\n      | 'primary'\n      | 'displayIndex'\n    >\n  ) => PlansQueryBuilder;\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      | '_createdDate'\n      | '_updatedDate'\n      | 'name'\n      | 'slug'\n      | 'pricingVariants.id'\n      | 'pricingVariants.name'\n      | 'visibility'\n      | 'status'\n      | 'formId'\n      | 'archived'\n      | 'primary'\n      | 'displayIndex'\n    >\n  ) => PlansQueryBuilder;\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) => PlansQueryBuilder;\n  /** @param cursor - A pointer to specific record\n   * @documentationMaturity preview\n   */\n  skipTo: (cursor: string) => PlansQueryBuilder;\n  /** @documentationMaturity preview */\n  find: () => Promise<PlansQueryResult>;\n}\n\n/**\n * Retrieves a list of plans that match the provided search query and optionally performs aggregations on the data queried.\n *\n * To learn about working with queries, see [Search, Query and List Methods](https://dev.wix.com/docs/rest/articles/get-started/search-query-and-list-methods).\n * @param search - Search options. See [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language) for more details.\n * @public\n * @documentationMaturity preview\n * @requiredField search\n * @permissionId PRICING_PLANS.PLAN_READ_PUBLIC\n * @permissionId PRICING_PLANS.PLAN_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn wix.pricing_plans.plans.v3.PlanService.SearchPlans\n */\nexport async function searchPlans(\n  search: PlanSearch\n): Promise<\n  NonNullablePaths<\n    SearchPlansResponse,\n    {\n      [P in PlanNonNullablePaths]: `plans.${number}.${P}`;\n    }[PlanNonNullablePaths]\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ search: search });\n\n  const reqOpts = ambassadorWixPricingPlansV3Plan.searchPlans(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [{ path: 'plans.image' }],\n        },\n      ])\n    )!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { search: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['search']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface PlanSearchSpec extends SearchSpec {\n  aggregatable: [\n    '_createdDate',\n    '_id',\n    '_updatedDate',\n    'archived',\n    'displayIndex',\n    'formId',\n    'name',\n    'pricingVariants._id',\n    'pricingVariants.name',\n    'pricingVariants.pricingStrategies.flatRate.amount',\n    'primary',\n    'slug',\n    'status',\n    'visibility'\n  ];\n  paging: 'cursor';\n  wql: [\n    {\n      operators: ['$hasAll', '$hasSome'];\n      fields: ['pricingVariants.pricingStrategies.flatRate.amount'];\n      sort: 'NONE';\n    },\n    {\n      operators: ['$hasAll', '$hasSome'];\n      fields: ['pricingVariants._id', 'pricingVariants.name'];\n      sort: 'BOTH';\n    },\n    {\n      operators: '*';\n      fields: [\n        '_createdDate',\n        '_id',\n        '_updatedDate',\n        'archived',\n        'displayIndex',\n        'formId',\n        'name',\n        'primary',\n        'slug',\n        'status',\n        'visibility'\n      ];\n      sort: 'BOTH';\n    }\n  ];\n}\n\nexport type CommonSearchWithEntityContext = SearchSdkType<Plan, PlanSearchSpec>;\nexport type PlanSearch = {\n  /** \n  Cursor pointing to page of results.\n  When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.  \n  */\n  cursorPaging?: {\n    /** \n  Maximum number of items to return in the results. \n  @max: 100 \n  */\n    limit?:\n      | NonNullable<CommonSearchWithEntityContext['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<CommonSearchWithEntityContext['cursorPaging']>['cursor']\n      | null;\n  };\n  /** \n  A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf)  \n  */\n  filter?: CommonSearchWithEntityContext['filter'] | null;\n  /** \n  Sort object in the form [{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}] \n  @maxSize: 10 \n  */\n  sort?: {\n    /** \n  Name of the field to sort by. \n  @maxLength: 512 \n  */\n    fieldName?: NonNullable<\n      CommonSearchWithEntityContext['sort']\n    >[number]['fieldName'];\n    /** \n  Sort order.  \n  */\n    order?: NonNullable<CommonSearchWithEntityContext['sort']>[number]['order'];\n  }[];\n  /** \n  Aggregations | Faceted search: refers to a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition. \n  @maxSize: 10 \n  */\n  aggregations?: {\n    /** \n  Value aggregation  \n  */\n    value?: NonNullable<\n      CommonSearchWithEntityContext['aggregations']\n    >[number]['value'];\n    /** \n  Range aggregation  \n  */\n    range?: NonNullable<\n      CommonSearchWithEntityContext['aggregations']\n    >[number]['range'];\n    /** \n  Scalar aggregation  \n  */\n    scalar?: NonNullable<\n      CommonSearchWithEntityContext['aggregations']\n    >[number]['scalar'];\n    /** \n  Date histogram aggregation  \n  */\n    dateHistogram?: NonNullable<\n      CommonSearchWithEntityContext['aggregations']\n    >[number]['dateHistogram'];\n    /** \n  Nested aggregation  \n  */\n    nested?: NonNullable<\n      CommonSearchWithEntityContext['aggregations']\n    >[number]['nested'];\n    /** \n  User-defined name of aggregation, should be unique, will appear in aggregation results \n  @maxLength: 100 \n  */\n    name?:\n      | NonNullable<\n          CommonSearchWithEntityContext['aggregations']\n        >[number]['name']\n      | null;\n    /** \n  Type of aggregation, client must provide matching aggregation field below  \n  */\n    type?: NonNullable<\n      CommonSearchWithEntityContext['aggregations']\n    >[number]['type'];\n    /** \n  Field to aggregate by, use dot notation to specify json path \n  @maxLength: 200 \n  */\n    fieldPath?: NonNullable<\n      CommonSearchWithEntityContext['aggregations']\n    >[number]['fieldPath'];\n  }[];\n  /** \n  Free text to match in searchable fields  \n  */\n  search?: {\n    /** \n  Defines how separate search terms in `expression` are combined  \n  */\n    mode?: NonNullable<CommonSearchWithEntityContext['search']>['mode'];\n    /** \n  Search term or expression \n  @maxLength: 100 \n  */\n    expression?:\n      | NonNullable<CommonSearchWithEntityContext['search']>['expression']\n      | null;\n    /** \n  Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path \n  @maxLength: 200,\n  @maxSize: 20 \n  */\n    fields?: NonNullable<CommonSearchWithEntityContext['search']>['fields'];\n    /** \n  Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm)  \n  */\n    fuzzy?: NonNullable<CommonSearchWithEntityContext['search']>['fuzzy'];\n  };\n  /** \n  UTC offset or IANA time zone. Valid values are\n  ISO 8601 UTC offsets, such as +02:00 or -06:00,\n  and IANA time zone IDs, such as Europe/Rome\n\n  Affects all filters and aggregations returned values.\n  You may override this behavior in a specific filter by providing\n  timestamps including time zone. e.g. `\"2023-12-20T10:52:34.795Z\"` \n  @maxLength: 50 \n  */\n  timeZone?: CommonSearchWithEntityContext['timeZone'] | null;\n};\n\n/**\n * Counts plans by the provided filter.\n *\n * To learn about working with queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).\n * @public\n * @documentationMaturity preview\n * @permissionId PRICING_PLANS.PLAN_READ\n * @applicableIdentity APP\n * @fqn wix.pricing_plans.plans.v3.PlanService.CountPlans\n */\nexport async function countPlans(\n  options?: CountPlansOptions\n): Promise<NonNullablePaths<CountPlansResponse, `count`>> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    filter: options?.filter,\n    search: options?.search,\n  });\n\n  const reqOpts = ambassadorWixPricingPlansV3Plan.countPlans(payload);\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: {\n          filter: '$[0].filter',\n          search: '$[0].search',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface CountPlansOptions {\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  /** Free text to match in searchable fields. When specified, the method uses search instead of filter, and may be less consistent. */\n  search?: SearchDetails;\n}\n\n/**\n * Updates extended fields of a Plan without incrementing revision\n * @param _id - ID of the entity to update.\n * @param namespace - Identifier for the app whose extended fields are being updated.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField namespace\n * @requiredField options\n * @requiredField options.namespaceData\n * @permissionId PRICING_PLANS.PLAN_UPDATE\n * @applicableIdentity APP\n * @fqn wix.pricing_plans.plans.v3.PlanService.UpdateExtendedFields\n */\nexport async function updateExtendedFields(\n  _id: string,\n  namespace: string,\n  options: NonNullablePaths<UpdateExtendedFieldsOptions, `namespaceData`>\n): Promise<\n  NonNullablePaths<\n    UpdateExtendedFieldsResponse,\n    { [P in PlanNonNullablePaths]: `plan.${P}` }[PlanNonNullablePaths]\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[3] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    id: _id,\n    namespace: namespace,\n    namespaceData: options?.namespaceData,\n  });\n\n  const reqOpts = ambassadorWixPricingPlansV3Plan.updateExtendedFields(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(result.data, [\n        {\n          transformFn: transformRESTImageToSDKImage,\n          paths: [{ path: 'plan.image' }],\n        },\n      ])\n    )!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          id: '$[0]',\n          namespace: '$[1]',\n          namespaceData: '$[2].namespaceData',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'namespace', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface UpdateExtendedFieldsOptions {\n  /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */\n  namespaceData: Record<string, any> | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixPricingPlansPlansV3PlanServiceUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'manage._base_domain_': [\n      {\n        srcPath: '/_api/pricing-plans/v3',\n        destPath: '/v3',\n      },\n    ],\n    'www.wixapis.com': [\n      {\n        srcPath: '/pricing-plans/v3',\n        destPath: '/v3',\n      },\n    ],\n    _: [\n      {\n        srcPath: '/_api/pricing-plans/v3',\n        destPath: '/v3',\n      },\n    ],\n    'www._base_domain_': [\n      {\n        srcPath: '/_api/pricing-plans/v3',\n        destPath: '/v3',\n      },\n    ],\n    '*.dev.wix-code.com': [\n      {\n        srcPath: '/_api/pricing-plans',\n        destPath: '/v3',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_pricing-plans_plansv-3';\n\n/** Creates a plan with specified billing terms and a pricing strategy. */\nexport function createPlan(payload: object): RequestOptionsFactory<any> {\n  function __createPlan({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [{ path: 'plan.createdDate' }, { path: 'plan.updatedDate' }],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.v3.plan',\n      method: 'POST' as any,\n      methodFqn: 'wix.pricing_plans.plans.v3.PlanService.CreatePlan',\n      packageName: PACKAGE_NAME,\n      url: resolveWixPricingPlansPlansV3PlanServiceUrl({\n        protoPath: '/v3/plans',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [{ path: 'plan.createdDate' }, { path: 'plan.updatedDate' }],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __createPlan;\n}\n\n/** Retrieves a plan by ID. */\nexport function getPlan(payload: object): RequestOptionsFactory<any> {\n  function __getPlan({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.v3.plan',\n      method: 'GET' as any,\n      methodFqn: 'wix.pricing_plans.plans.v3.PlanService.GetPlan',\n      packageName: PACKAGE_NAME,\n      url: resolveWixPricingPlansPlansV3PlanServiceUrl({\n        protoPath: '/v3/plans/{planId}',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [{ path: 'plan.createdDate' }, { path: 'plan.updatedDate' }],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __getPlan;\n}\n\n/**\n * Updates a single plan.\n *\n * To update multiple plans at once, call [Bulk Update Plans](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/pricing-plans/plans-v3/bulk-update-plans).\n */\nexport function updatePlan(payload: object): RequestOptionsFactory<any> {\n  function __updatePlan({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFieldMaskToRESTFieldMask,\n        paths: [{ path: 'fieldMask' }],\n      },\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [{ path: 'plan.createdDate' }, { path: 'plan.updatedDate' }],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.v3.plan',\n      method: 'PATCH' as any,\n      methodFqn: 'wix.pricing_plans.plans.v3.PlanService.UpdatePlan',\n      packageName: PACKAGE_NAME,\n      url: resolveWixPricingPlansPlansV3PlanServiceUrl({\n        protoPath: '/v3/plans/{plan.id}',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [{ path: 'plan.createdDate' }, { path: 'plan.updatedDate' }],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __updatePlan;\n}\n\n/**\n * Updates multiple plans at once.\n *\n * You can't change plan names with this method.\n *\n * To update a single plan, call [Update Plan](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/pricing-plans/plans-v3/update-plan).\n */\nexport function bulkUpdatePlans(payload: object): RequestOptionsFactory<any> {\n  function __bulkUpdatePlans({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFieldMaskToRESTFieldMask,\n        paths: [{ path: 'plans.fieldMask' }],\n      },\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [\n          { path: 'plans.plan.createdDate' },\n          { path: 'plans.plan.updatedDate' },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.v3.plan',\n      method: 'POST' as any,\n      methodFqn: 'wix.pricing_plans.plans.v3.PlanService.BulkUpdatePlans',\n      packageName: PACKAGE_NAME,\n      url: resolveWixPricingPlansPlansV3PlanServiceUrl({\n        protoPath: '/v3/bulk/plans/update',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'results.item.createdDate' },\n              { path: 'results.item.updatedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __bulkUpdatePlans;\n}\n\n/** Deletes a plan. */\nexport function deletePlan(payload: object): RequestOptionsFactory<any> {\n  function __deletePlan({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.v3.plan',\n      method: 'DELETE' as any,\n      methodFqn: 'wix.pricing_plans.plans.v3.PlanService.DeletePlan',\n      packageName: PACKAGE_NAME,\n      url: resolveWixPricingPlansPlansV3PlanServiceUrl({\n        protoPath: '/v3/plans/{planId}',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload),\n    };\n\n    return metadata;\n  }\n\n  return __deletePlan;\n}\n\n/**\n * Retrieves a list of plans, given the provided paging, filtering, and sorting.\n * Query plans runs with these defaults, which you can override:\n * - `createdDate` is sorted in `ASC` order\n * - `paging.limit` is `100`\n * - `paging.offset` is `0`\n * <br>\n * For field support for filters and sorting, see [plans: Supported Filters and Sorting](https://dev.wix.com/docs/rest/business-solutions/events/ticket-definition-v3/filter-and-sort).\n * To learn about working with queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).\n */\nexport function queryPlans(payload: object): RequestOptionsFactory<any> {\n  function __queryPlans({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.v3.plan',\n      method: 'POST' as any,\n      methodFqn: 'wix.pricing_plans.plans.v3.PlanService.QueryPlans',\n      packageName: PACKAGE_NAME,\n      url: resolveWixPricingPlansPlansV3PlanServiceUrl({\n        protoPath: '/v3/plans/query',\n        data: payload,\n        host,\n      }),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'plans.createdDate' },\n              { path: 'plans.updatedDate' },\n            ],\n          },\n        ]),\n      fallback: [\n        {\n          method: 'POST' as any,\n          url: resolveWixPricingPlansPlansV3PlanServiceUrl({\n            protoPath: '/v3/plans/query',\n            data: payload,\n            host,\n          }),\n          data: payload,\n        },\n      ],\n    };\n\n    return metadata;\n  }\n\n  return __queryPlans;\n}\n\n/**\n * Retrieves a list of plans that match the provided search query and optionally performs aggregations on the data queried.\n *\n * To learn about working with queries, see [Search, Query and List Methods](https://dev.wix.com/docs/rest/articles/get-started/search-query-and-list-methods).\n */\nexport function searchPlans(payload: object): RequestOptionsFactory<any> {\n  function __searchPlans({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFloatToRESTFloat,\n        paths: [\n          { path: 'search.aggregations.range.buckets.from' },\n          { path: 'search.aggregations.range.buckets.to' },\n          {\n            path: 'search.aggregations.nested.nestedAggregations.range.buckets.from',\n          },\n          {\n            path: 'search.aggregations.nested.nestedAggregations.range.buckets.to',\n          },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.v3.plan',\n      method: 'POST' as any,\n      methodFqn: 'wix.pricing_plans.plans.v3.PlanService.SearchPlans',\n      packageName: PACKAGE_NAME,\n      url: resolveWixPricingPlansPlansV3PlanServiceUrl({\n        protoPath: '/v3/plans/search',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'plans.createdDate' },\n              { path: 'plans.updatedDate' },\n            ],\n          },\n        ]),\n      fallback: [\n        {\n          method: 'POST' as any,\n          url: resolveWixPricingPlansPlansV3PlanServiceUrl({\n            protoPath: '/v3/plans/search',\n            data: serializedData,\n            host,\n          }),\n          data: serializedData,\n        },\n      ],\n    };\n\n    return metadata;\n  }\n\n  return __searchPlans;\n}\n\n/**\n * Counts plans by the provided filter.\n *\n * To learn about working with queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).\n */\nexport function countPlans(payload: object): RequestOptionsFactory<any> {\n  function __countPlans({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.v3.plan',\n      method: 'POST' as any,\n      methodFqn: 'wix.pricing_plans.plans.v3.PlanService.CountPlans',\n      packageName: PACKAGE_NAME,\n      url: resolveWixPricingPlansPlansV3PlanServiceUrl({\n        protoPath: '/v3/plans/count',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __countPlans;\n}\n\n/** Updates extended fields of a Plan without incrementing revision */\nexport function updateExtendedFields(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __updateExtendedFields({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.pricing_plans.v3.plan',\n      method: 'POST' as any,\n      methodFqn: 'wix.pricing_plans.plans.v3.PlanService.UpdateExtendedFields',\n      packageName: PACKAGE_NAME,\n      url: resolveWixPricingPlansPlansV3PlanServiceUrl({\n        protoPath: '/v3/plans/{id}/update-extended-fields',\n        data: payload,\n        host,\n      }),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [{ path: 'plan.createdDate' }, { path: 'plan.updatedDate' }],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __updateExtendedFields;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n  BulkUpdatePlansOptions,\n  BulkUpdatePlansResponse,\n  CountPlansOptions,\n  CountPlansResponse,\n  CreatePlanOptions,\n  MaskedPlan,\n  Plan,\n  PlanSearch,\n  PlansQueryBuilder,\n  SearchPlansResponse,\n  UpdateExtendedFieldsOptions,\n  UpdateExtendedFieldsResponse,\n  UpdatePlan,\n  bulkUpdatePlans as universalBulkUpdatePlans,\n  countPlans as universalCountPlans,\n  createPlan as universalCreatePlan,\n  deletePlan as universalDeletePlan,\n  getPlan as universalGetPlan,\n  queryPlans as universalQueryPlans,\n  searchPlans as universalSearchPlans,\n  updateExtendedFields as universalUpdateExtendedFields,\n  updatePlan as universalUpdatePlan,\n} from './pricing-plans-v3-plan-plansv-3.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/pricing-plans' };\n\nexport function createPlan(httpClient: HttpClient): CreatePlanSignature {\n  return (\n    plan: NonNullablePaths<\n      Plan,\n      | `pricingVariants.${number}._id`\n      | `pricingVariants.${number}.billingTerms`\n      | `pricingVariants.${number}.billingTerms.billingCycle.period`\n      | `pricingVariants.${number}.billingTerms.endType`\n      | `pricingVariants.${number}.billingTerms.startType`\n      | `pricingVariants.${number}.fees.${number}.appliedAt`\n      | `pricingVariants.${number}.fees.${number}.priceType`\n      | `pricingVariants.${number}.name`\n      | `visibility`\n    >,\n    options?: CreatePlanOptions\n  ) =>\n    universalCreatePlan(\n      plan,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface CreatePlanSignature {\n  /**\n   * Creates a plan with specified billing terms and a pricing strategy.\n   * @param - plan to create.\n   * @returns Created plan.\n   */\n  (plan: Plan, options?: CreatePlanOptions | undefined): Promise<Plan>;\n}\n\nexport function getPlan(httpClient: HttpClient): GetPlanSignature {\n  return (planId: string) =>\n    universalGetPlan(\n      planId,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface GetPlanSignature {\n  /**\n   * Retrieves a plan by ID.\n   * @param - ID of the plan to retrieve.\n   * @returns Requested plan.\n   */\n  (planId: string): Promise<Plan>;\n}\n\nexport function updatePlan(httpClient: HttpClient): UpdatePlanSignature {\n  return (\n    _id: string,\n    plan: NonNullablePaths<\n      UpdatePlan,\n      | `pricingVariants.${number}._id`\n      | `pricingVariants.${number}.billingTerms`\n      | `pricingVariants.${number}.billingTerms.billingCycle.period`\n      | `pricingVariants.${number}.billingTerms.endType`\n      | `pricingVariants.${number}.billingTerms.startType`\n      | `pricingVariants.${number}.fees.${number}.appliedAt`\n      | `pricingVariants.${number}.fees.${number}.priceType`\n      | `pricingVariants.${number}.name`\n      | `revision`\n    >\n  ) =>\n    universalUpdatePlan(\n      _id,\n      plan,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface UpdatePlanSignature {\n  /**\n   * Updates a single plan.\n   *\n   * To update multiple plans at once, call [Bulk Update Plans](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/pricing-plans/plans-v3/bulk-update-plans).\n   * @param - Plan ID.\n   * @returns Updated plan.\n   */\n  (_id: string, plan: UpdatePlan): Promise<Plan>;\n}\n\nexport function bulkUpdatePlans(\n  httpClient: HttpClient\n): BulkUpdatePlansSignature {\n  return (\n    plans: NonNullablePaths<\n      MaskedPlan,\n      | `plan._id`\n      | `plan.pricingVariants.${number}._id`\n      | `plan.pricingVariants.${number}.billingTerms`\n      | `plan.pricingVariants.${number}.billingTerms.billingCycle.period`\n      | `plan.pricingVariants.${number}.billingTerms.endType`\n      | `plan.pricingVariants.${number}.billingTerms.startType`\n      | `plan.pricingVariants.${number}.fees.${number}.appliedAt`\n      | `plan.pricingVariants.${number}.fees.${number}.priceType`\n      | `plan.pricingVariants.${number}.name`\n      | `plan.revision`\n    >[],\n    options?: BulkUpdatePlansOptions\n  ) =>\n    universalBulkUpdatePlans(\n      plans,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface BulkUpdatePlansSignature {\n  /**\n   * Updates multiple plans at once.\n   *\n   * You can't change plan names with this method.\n   *\n   * To update a single plan, call [Update Plan](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/pricing-plans/plans-v3/update-plan).\n   * @param - Plans to update.\n   */\n  (\n    plans: MaskedPlan[],\n    options?: BulkUpdatePlansOptions | undefined\n  ): Promise<BulkUpdatePlansResponse>;\n}\n\nexport function deletePlan(httpClient: HttpClient): DeletePlanSignature {\n  return (planId: string) =>\n    universalDeletePlan(\n      planId,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface DeletePlanSignature {\n  /**\n   * Deletes a plan.\n   * @param - ID of the plan to delete.\n   */\n  (planId: string): Promise<void>;\n}\n\nexport function queryPlans(httpClient: HttpClient): QueryPlansSignature {\n  return () =>\n    universalQueryPlans(\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface QueryPlansSignature {\n  /**\n   * Retrieves a list of plans, given the provided paging, filtering, and sorting.\n   * Query plans runs with these defaults, which you can override:\n   * - `createdDate` is sorted in `ASC` order\n   * - `paging.limit` is `100`\n   * - `paging.offset` is `0`\n   * <br>\n   * For field support for filters and sorting, see [plans: Supported Filters and Sorting](https://dev.wix.com/docs/rest/business-solutions/events/ticket-definition-v3/filter-and-sort).\n   * To learn about working with queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).\n   */\n  (): PlansQueryBuilder;\n}\n\nexport function searchPlans(httpClient: HttpClient): SearchPlansSignature {\n  return (search: PlanSearch) =>\n    universalSearchPlans(\n      search,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface SearchPlansSignature {\n  /**\n   * Retrieves a list of plans that match the provided search query and optionally performs aggregations on the data queried.\n   *\n   * To learn about working with queries, see [Search, Query and List Methods](https://dev.wix.com/docs/rest/articles/get-started/search-query-and-list-methods).\n   * @param - Search options. See [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language) for more details.\n   */\n  (search: PlanSearch): Promise<SearchPlansResponse>;\n}\n\nexport function countPlans(httpClient: HttpClient): CountPlansSignature {\n  return (options?: CountPlansOptions) =>\n    universalCountPlans(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface CountPlansSignature {\n  /**\n   * Counts plans by the provided filter.\n   *\n   * To learn about working with queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).\n   */\n  (options?: CountPlansOptions | undefined): Promise<CountPlansResponse>;\n}\n\nexport function updateExtendedFields(\n  httpClient: HttpClient\n): UpdateExtendedFieldsSignature {\n  return (\n    _id: string,\n    namespace: string,\n    options: NonNullablePaths<UpdateExtendedFieldsOptions, `namespaceData`>\n  ) =>\n    universalUpdateExtendedFields(\n      _id,\n      namespace,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface UpdateExtendedFieldsSignature {\n  /**\n   * Updates extended fields of a Plan without incrementing revision\n   * @param - ID of the entity to update.\n   * @param - Identifier for the app whose extended fields are being updated.\n   */\n  (\n    _id: string,\n    namespace: string,\n    options: UpdateExtendedFieldsOptions\n  ): Promise<UpdateExtendedFieldsResponse>;\n}\n\nexport {\n  ActionEvent,\n  Aggregation,\n  AggregationKindOneOf,\n  AggregationType,\n  ApplicationError,\n  AppliedAt,\n  BillingTerms,\n  BillingTermsEndOptionOneOf,\n  BulkActionMetadata,\n  BulkPlanResult,\n  BulkUpdatePlansOptions,\n  BulkUpdatePlansRequest,\n  BulkUpdatePlansResponse,\n  CountPlansOptions,\n  CountPlansRequest,\n  CountPlansResponse,\n  CreatePlanOptions,\n  CreatePlanRequest,\n  CreatePlanResponse,\n  CursorPaging,\n  CursorPagingMetadata,\n  CursorSearch,\n  CursorSearchPagingMethodOneOf,\n  Cursors,\n  CyclesCompletedDetails,\n  DateHistogramAggregation,\n  Delete,\n  DeletePlanRequest,\n  DeletePlanResponse,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  Duration,\n  EndType,\n  EntityCreatedEvent,\n  EntityDeletedEvent,\n  EntityUpdatedEvent,\n  ExtendedFields,\n  Fee,\n  FeePriceOptionOneOf,\n  FixedAmountOption,\n  FlatRate,\n  GetPlanRequest,\n  GetPlanResponse,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  IncludeMissingValuesOptions,\n  Interval,\n  ItemMetadata,\n  MaskedPlan,\n  MessageEnvelope,\n  MissingValues,\n  Mode,\n  NestedAggregation,\n  NestedAggregationItem,\n  NestedAggregationItemKindOneOf,\n  NestedAggregationType,\n  Options,\n  OptionsOptionsOneOf,\n  Paging,\n  PagingMetadataV2,\n  Period,\n  Perk,\n  Plan,\n  PlanOptions,\n  PlanSearchSpec,\n  PlansQueryBuilder,\n  PlansQueryResult,\n  PriceType,\n  PricingStrategy,\n  PricingStrategyStrategyOneOf,\n  PricingVariant,\n  QueryPlansRequest,\n  QueryPlansResponse,\n  QueryV2,\n  QueryV2PagingMethodOneOf,\n  RangeAggregation,\n  RangeBucket,\n  ReindexMessage,\n  ReindexMessageActionOneOf,\n  RestoreInfo,\n  ScalarAggregation,\n  ScalarType,\n  Schema,\n  SearchDetails,\n  SearchPlansRequest,\n  SearchPlansResponse,\n  SortDirection,\n  SortOrder,\n  SortType,\n  Sorting,\n  StartType,\n  Status,\n  TaxableAddress,\n  TermsAndConditionsSettings,\n  ThankYouPageSettings,\n  Type,\n  UpdateExtendedFieldsOptions,\n  UpdateExtendedFieldsRequest,\n  UpdateExtendedFieldsResponse,\n  UpdatePlan,\n  UpdatePlanRequest,\n  UpdatePlanResponse,\n  Upsert,\n  ValidateOptionsRequest,\n  ValidateOptionsResponse,\n  ValidationStrategy,\n  ValueAggregation,\n  ValueAggregationOptionsOneOf,\n  Violation,\n  Visibility,\n  WebhookIdentityType,\n} from './pricing-plans-v3-plan-plansv-3.universal.js';\n","import {\n  createPlan as publicCreatePlan,\n  getPlan as publicGetPlan,\n  updatePlan as publicUpdatePlan,\n  bulkUpdatePlans as publicBulkUpdatePlans,\n  deletePlan as publicDeletePlan,\n  queryPlans as publicQueryPlans,\n  searchPlans as publicSearchPlans,\n  countPlans as publicCountPlans,\n  updateExtendedFields as publicUpdateExtendedFields,\n} from './pricing-plans-v3-plan-plansv-3.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const createPlan: MaybeContext<\n  BuildRESTFunction<typeof publicCreatePlan> & typeof publicCreatePlan\n> = /*#__PURE__*/ createRESTModule(publicCreatePlan);\nexport const getPlan: MaybeContext<\n  BuildRESTFunction<typeof publicGetPlan> & typeof publicGetPlan\n> = /*#__PURE__*/ createRESTModule(publicGetPlan);\nexport const updatePlan: MaybeContext<\n  BuildRESTFunction<typeof publicUpdatePlan> & typeof publicUpdatePlan\n> = /*#__PURE__*/ createRESTModule(publicUpdatePlan);\nexport const bulkUpdatePlans: MaybeContext<\n  BuildRESTFunction<typeof publicBulkUpdatePlans> & typeof publicBulkUpdatePlans\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdatePlans);\nexport const deletePlan: MaybeContext<\n  BuildRESTFunction<typeof publicDeletePlan> & typeof publicDeletePlan\n> = /*#__PURE__*/ createRESTModule(publicDeletePlan);\nexport const queryPlans: MaybeContext<\n  BuildRESTFunction<typeof publicQueryPlans> & typeof publicQueryPlans\n> = /*#__PURE__*/ createRESTModule(publicQueryPlans);\nexport const searchPlans: MaybeContext<\n  BuildRESTFunction<typeof publicSearchPlans> & typeof publicSearchPlans\n> = /*#__PURE__*/ createRESTModule(publicSearchPlans);\nexport const countPlans: MaybeContext<\n  BuildRESTFunction<typeof publicCountPlans> & typeof publicCountPlans\n> = /*#__PURE__*/ createRESTModule(publicCountPlans);\nexport const updateExtendedFields: MaybeContext<\n  BuildRESTFunction<typeof publicUpdateExtendedFields> &\n    typeof publicUpdateExtendedFields\n> = /*#__PURE__*/ createRESTModule(publicUpdateExtendedFields);\n\nexport {\n  PriceType,\n  AppliedAt,\n  Period,\n  StartType,\n  EndType,\n  Visibility,\n  Status,\n  Type,\n  TaxableAddress,\n  ValidationStrategy,\n  WebhookIdentityType,\n  SortOrder,\n  SortType,\n  SortDirection,\n  MissingValues,\n  ScalarType,\n  NestedAggregationType,\n  Interval,\n  AggregationType,\n  Mode,\n} from './pricing-plans-v3-plan-plansv-3.universal.js';\nexport {\n  Plan,\n  PricingVariant,\n  FlatRate,\n  Fee,\n  FeePriceOptionOneOf,\n  FixedAmountOption,\n  BillingTerms,\n  BillingTermsEndOptionOneOf,\n  Duration,\n  CyclesCompletedDetails,\n  PricingStrategy,\n  PricingStrategyStrategyOneOf,\n  Perk,\n  TermsAndConditionsSettings,\n  ThankYouPageSettings,\n  ExtendedFields,\n  ValidateOptionsRequest,\n  Options,\n  OptionsOptionsOneOf,\n  PlanOptions,\n  ValidateOptionsResponse,\n  Violation,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  EntityCreatedEvent,\n  RestoreInfo,\n  EntityUpdatedEvent,\n  EntityDeletedEvent,\n  ActionEvent,\n  MessageEnvelope,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  ReindexMessage,\n  ReindexMessageActionOneOf,\n  Upsert,\n  Delete,\n  Schema,\n  CreatePlanRequest,\n  CreatePlanResponse,\n  GetPlanRequest,\n  GetPlanResponse,\n  UpdatePlanRequest,\n  UpdatePlanResponse,\n  BulkUpdatePlansRequest,\n  MaskedPlan,\n  BulkUpdatePlansResponse,\n  ItemMetadata,\n  ApplicationError,\n  BulkPlanResult,\n  BulkActionMetadata,\n  DeletePlanRequest,\n  DeletePlanResponse,\n  QueryPlansRequest,\n  QueryV2,\n  QueryV2PagingMethodOneOf,\n  Sorting,\n  Paging,\n  CursorPaging,\n  QueryPlansResponse,\n  PagingMetadataV2,\n  Cursors,\n  SearchPlansRequest,\n  CursorSearch,\n  CursorSearchPagingMethodOneOf,\n  Aggregation,\n  AggregationKindOneOf,\n  RangeBucket,\n  IncludeMissingValuesOptions,\n  ValueAggregation,\n  ValueAggregationOptionsOneOf,\n  RangeAggregation,\n  ScalarAggregation,\n  DateHistogramAggregation,\n  NestedAggregationItem,\n  NestedAggregationItemKindOneOf,\n  NestedAggregation,\n  SearchDetails,\n  SearchPlansResponse,\n  CursorPagingMetadata,\n  CountPlansRequest,\n  CountPlansResponse,\n  UpdateExtendedFieldsRequest,\n  UpdateExtendedFieldsResponse,\n  CreatePlanOptions,\n  UpdatePlan,\n  BulkUpdatePlansOptions,\n  PlansQueryResult,\n  PlansQueryBuilder,\n  PlanSearchSpec,\n  CountPlansOptions,\n  UpdateExtendedFieldsOptions,\n} from './pricing-plans-v3-plan-plansv-3.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,4CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;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AGK,iCAAiBA,qBAA0B;","names":["payload","transformPaths","PriceType","AppliedAt","Period","StartType","EndType","Visibility","Status","Type","TaxableAddress","ValidationStrategy","WebhookIdentityType","SortOrder","SortType","SortDirection","MissingValues","ScalarType","NestedAggregationType","Interval","AggregationType","Mode","createPlan","getPlan","updatePlan","bulkUpdatePlans","deletePlan","queryPlans","searchPlans","countPlans","updateExtendedFields","createPlan","getPlan","updatePlan","bulkUpdatePlans","deletePlan","queryPlans","searchPlans","countPlans","updateExtendedFields","createPlan","getPlan","updatePlan","bulkUpdatePlans","deletePlan","queryPlans","searchPlans","countPlans","updateExtendedFields"]}