{"version":3,"sources":["../../../src/premium-reseller-v1-packages-packages.universal.ts","../../../src/premium-reseller-v1-packages-packages.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n  renameKeysFromSDKRequestToRESTRequest,\n  renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n  HttpClient,\n  HttpResponse,\n  NonNullablePaths,\n  QuerySpec,\n  Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixPremiumResellerV1Packages from './premium-reseller-v1-packages-packages.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\n\n/**\n * A package is group of instances of Wix services that a reseller offers to a\n * customer as part of a single transaction.\n */\nexport interface Package {\n  /**\n   * Package ID.\n   * @readonly\n   * @format GUID\n   */\n  _id?: string;\n  /**\n   * Wix account ID. See\n   * [Account Level APIs](https://dev.wix.com/docs/rest/account-level/about-account-level-apis)\n   * for more details.\n   * @readonly\n   * @format GUID\n   */\n  accountId?: string;\n  /**\n   * External reference. For example, an external subscription ID.\n   * This field isn't validated by Wix.\n   *\n   * Max: 100 characters\n   * @maxLength 100\n   */\n  externalId?: string | null;\n  /**\n   * Product instances that are included in the package.\n   *\n   * Min: 1 product instance\n   * Max: 1000 product instances\n   * @maxSize 1000\n   * @minSize 1\n   */\n  productInstances?: ProductInstance[];\n  /**\n   * Date and time the package was created.\n   * @readonly\n   */\n  _createdDate?: Date | null;\n  /**\n   * Date and time the package was last updated.\n   * @readonly\n   */\n  _updatedDate?: Date | null;\n}\n\n/**\n * A product instance is a specific instance of a Wix service that a reseller\n * offers to one of their customers.\n */\nexport interface ProductInstance extends ProductInstanceContractDetailsOneOf {\n  /** Billing information for the contract between the reseller and Wix. */\n  billingInfo?: ProductInstanceCycle;\n  /**\n   * ID of the instance of the resold Wix service. **Note:** Differs from the\n   * `catalogProductId`. Allows you to identify different instances of the same\n   * product in a package.\n   * @readonly\n   * @format GUID\n   */\n  instanceId?: string;\n  /**\n   * ID of the Wix site that the product instance is assigned to.\n   * See the [Query Sites API](https://dev.wix.com/api/rest/account-level-apis/sites/query-sites)\n   * for more information.\n   * @format GUID\n   */\n  siteId?: string | null;\n  /**\n   * Product ID, as defined in the Wix Premium Product Catalog.\n   * Contact the [Wix B2B sales team](mailto:bizdev@wix.com)\n   * for more details about available Wix services.\n   * @format GUID\n   */\n  catalogProductId?: string;\n  /**\n   * Status of the product instance.\n   * @readonly\n   */\n  status?: StatusWithLiterals;\n  /**\n   * Failure object. Only present for status `FAILED`. Describes why the product instance `FAILED`.\n   * @readonly\n   */\n  failure?: FailureReason;\n  /**\n   * Date and time the product instance was created.\n   * @readonly\n   */\n  _createdDate?: Date | null;\n  /**\n   * Date and time the product instance was last updated.\n   * @readonly\n   */\n  _updatedDate?: Date | null;\n  /**\n   * Two-letter country code in\n   * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\n   * format. Specifies where customers can claim vouchers that may come with the\n   * product. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) to get more\n   * information about vouchers and supported locations.\n   * @format COUNTRY\n   */\n  countryCode?: string | null;\n  /**\n   * Date and time the product instance expires in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n   * Used only for instances that don't auto renew at the end of the current billing cycle.\n   * @readonly\n   */\n  expirationDate?: Date | null;\n  /**\n   * Discount code indicating that the reseller provisioned the product instance\n   * during a sale. Wix doesn't guarantee that a discount code reduces the\n   * price between Wix and the reseller, even when it's valid. Contact the\n   * [Wix B2B sales team](mailto:bizdev@wix.com) for more information.\n   *\n   * Max: 25 characters\n   * @maxLength 25\n   */\n  discountCode?: string | null;\n  /**\n   * ID of a different product instance that you can use to offer your customers\n   * time-limited free access to an additional product or service. For example,\n   * Wix offers a 1-year free domain registration to all customers who purchase a\n   * Premium plan. The referenced product instance must have either status `\"PENDING\"` or\n   * `\"ACTIVE\"`. You can use each product instance only a single time as reference\n   * instance.\n   * @format GUID\n   */\n  referenceProductInstanceId?: string | null;\n}\n\n/** @oneof */\nexport interface ProductInstanceContractDetailsOneOf {\n  /** Billing information for the contract between the reseller and Wix. */\n  billingInfo?: ProductInstanceCycle;\n}\n\nexport enum FailureReasonCode {\n  UNKNOWN = 'UNKNOWN',\n  /** The product instance couldn't be created because the Resellers API timed out. */\n  DELIVERY_TIMEOUT = 'DELIVERY_TIMEOUT',\n  /** The product instance couldn't be created because an external process failed. */\n  EXTERNAL_FAILURE = 'EXTERNAL_FAILURE',\n}\n\n/** @enumType */\nexport type FailureReasonCodeWithLiterals =\n  | FailureReasonCode\n  | 'UNKNOWN'\n  | 'DELIVERY_TIMEOUT'\n  | 'EXTERNAL_FAILURE';\n\nexport enum IntervalIntervalUnit {\n  /** unknown interval unit */\n  UNKNOWN = 'UNKNOWN',\n  /** Day */\n  DAY = 'DAY',\n  /** Week */\n  WEEK = 'WEEK',\n  /** Month */\n  MONTH = 'MONTH',\n  /** Year */\n  YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type IntervalIntervalUnitWithLiterals =\n  | IntervalIntervalUnit\n  | 'UNKNOWN'\n  | 'DAY'\n  | 'WEEK'\n  | 'MONTH'\n  | 'YEAR';\n\nexport enum CycleDescriptorType {\n  /** The payment type hasn't been set. */\n  UNKNOWN = 'UNKNOWN',\n  /** The reseller pays Wix in a single payment. */\n  ONE_TIME = 'ONE_TIME',\n  /** The reseller pays Wix on a recurring schedule. */\n  RECURRING = 'RECURRING',\n}\n\n/** @enumType */\nexport type CycleDescriptorTypeWithLiterals =\n  | CycleDescriptorType\n  | 'UNKNOWN'\n  | 'ONE_TIME'\n  | 'RECURRING';\n\nexport interface CycleInterval {\n  /** Unit of the billing cycle. */\n  unit?: IntervalIntervalUnitWithLiterals;\n  /**\n   * Count of units that make up the billing cycle.\n   * @min 1\n   */\n  count?: number;\n}\n\nexport enum Status {\n  /** The product instance isn't yet available to the customer. */\n  PENDING = 'PENDING',\n  /** The customer can use the product instance. */\n  ENABLED = 'ENABLED',\n  /** The product instance isn't any longer available to the customer. */\n  CANCELED = 'CANCELED',\n  /** The product instance couldn't be delivered successfully and has never been available to the customer. */\n  FAILED = 'FAILED',\n  /** The product instance isn't yet available to the customer, because an external provider or the customer must take an action. */\n  AWAITING_ACTION = 'AWAITING_ACTION',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n  | Status\n  | 'PENDING'\n  | 'ENABLED'\n  | 'CANCELED'\n  | 'FAILED'\n  | 'AWAITING_ACTION';\n\nexport interface FailureReason {\n  /** Failure code. */\n  code?: FailureReasonCodeWithLiterals;\n  /** Failure message. */\n  message?: string;\n}\n\nexport interface ProductInstanceCycle {\n  /** Payment type. */\n  type?: CycleDescriptorTypeWithLiterals;\n  /** Duration of the billing cycle. Available only for `RECURRING` payments. */\n  cycleDuration?: CycleInterval;\n}\n\nexport interface CreatePackageRequest {\n  /**\n   * Idempotency key.\n   * @maxLength 100\n   */\n  idempotencyKey?: string | null;\n  /**\n   * External reference. For example, an external subscription ID. **Note:** This field is not validated by Wix.\n   * @maxLength 100\n   */\n  externalId?: string | null;\n  /**\n   * Wix services that are resold.\n   * @maxSize 1000\n   * @minSize 1\n   */\n  products: ProductInstance[];\n}\n\nexport interface CreatePackageResponse {\n  /**\n   * Idempotency key.\n   * @maxLength 100\n   */\n  idempotencyKey?: string | null;\n  /** Created package. */\n  package?: Package;\n}\n\nexport interface CancelPackageRequest {\n  /**\n   * Idempotency key.\n   * @maxLength 100\n   */\n  idempotencyKey?: string | null;\n  /**\n   * ID of the package to cancel.\n   * @format GUID\n   */\n  _id: string;\n}\n\nexport interface CancelPackageResponse {\n  /**\n   * Idempotency key.\n   * @maxLength 100\n   */\n  idempotencyKey?: string | null;\n  /** Canceled package. */\n  package?: Package;\n}\n\nexport interface PackageCanceled {\n  /** Canceled package. */\n  package?: Package;\n}\n\nexport interface GetPackageRequest {\n  /**\n   * Package ID.\n   * @format GUID\n   */\n  _id: string;\n}\n\nexport interface GetPackageResponse {\n  /** Retrieved package. */\n  package?: Package;\n}\n\nexport interface QueryPackagesRequest {\n  /** Query options. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more details. */\n  query: QueryV2;\n}\n\nexport interface QueryV2 extends QueryV2PagingMethodOneOf {\n  /** Paging options to limit and offset the number of items. */\n  paging?: Paging;\n  /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n  cursorPaging?: CursorPaging;\n  /**\n   * Filter object.\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   */\n  sort?: Sorting[];\n  /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */\n  fields?: string[];\n  /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */\n  fieldsets?: string[];\n}\n\n/** @oneof */\nexport interface QueryV2PagingMethodOneOf {\n  /** Paging options to limit and offset the number of items. */\n  paging?: Paging;\n  /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n  cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n  /**\n   * Name of the field to sort by.\n   * @maxLength 512\n   */\n  fieldName?: string;\n  /** Sort order. */\n  order?: SortOrderWithLiterals;\n}\n\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 QueryPackagesResponse {\n  /** Paging metadata. */\n  metadata?: PagingMetadataV2;\n  /**\n   * Retrieved packages.\n   *\n   * Max: 1000 packages\n   * @maxSize 1000\n   */\n  packages?: Package[];\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 AssignProductInstanceToSiteRequest {\n  /**\n   * Idempotency key.\n   * @maxLength 100\n   */\n  idempotencyKey?: string | null;\n  /**\n   * ID of the product instance to assign to a site.\n   * @format GUID\n   */\n  instanceId: string;\n  /**\n   * ID of the site to which the product instance is assigned.\n   * @format GUID\n   */\n  siteId: string;\n}\n\nexport interface AssignProductInstanceToSiteResponse {\n  /**\n   * Idempotency key.\n   * @maxLength 100\n   */\n  idempotencyKey?: string | null;\n  /** Updated package that includes the assigned product instance. */\n  package?: Package;\n}\n\nexport interface AssignedProductInstanceToSite {\n  /** Updated package. */\n  package?: Package;\n  /**\n   * ID of the product instance that was assigned to the site.\n   * @readonly\n   * @format GUID\n   */\n  productInstanceId?: string;\n  /**\n   * ID of the site the product instance was assigned to.\n   * @readonly\n   * @format GUID\n   */\n  siteId?: string;\n}\n\nexport interface UnassignProductInstanceFromSiteRequest {\n  /**\n   * Idempotency key.\n   * @maxLength 100\n   */\n  idempotencyKey?: string | null;\n  /**\n   * ID of the product instance to unassign from a site.\n   * @format GUID\n   */\n  instanceId: string;\n}\n\nexport interface UnassignProductInstanceFromSiteResponse {\n  /**\n   * Idempotency key.\n   * @maxLength 100\n   */\n  idempotencyKey?: string | null;\n  /** Updated package that includes the unassigned product instance. */\n  package?: Package;\n}\n\nexport interface UnassignedProductInstanceFromSite {\n  /** Updated package. */\n  package?: Package;\n  /**\n   * ID of the product instance that was unassigned from the site.\n   * @readonly\n   * @format GUID\n   */\n  productInstanceId?: string;\n  /**\n   * MetasiteId of the site the product instance was unassigned from.\n   * @readonly\n   * @format GUID\n   */\n  metaSiteId?: string;\n}\n\nexport interface CancelProductInstanceRequest {\n  /**\n   * Idempotency key.\n   * @maxLength 100\n   */\n  idempotencyKey?: string | null;\n  /**\n   * ID of the product instance to cancel.\n   * @format GUID\n   */\n  instanceId: string;\n}\n\nexport interface CancelProductInstanceResponse {\n  /**\n   * Idempotency key.\n   * @maxLength 100\n   */\n  idempotencyKey?: string | null;\n  /** Updated package that includes the previously included the canceled product instance. */\n  package?: Package;\n}\n\nexport interface ProductInstanceCanceled {\n  /** Updated package. */\n  package?: Package;\n  /**\n   * ID of the product instance that was canceled.\n   * @readonly\n   * @format GUID\n   */\n  productInstanceId?: string;\n}\n\nexport interface AdjustProductInstanceSpecificationsRequest {\n  /**\n   * Idempotency key.\n   * @maxLength 100\n   */\n  idempotencyKey?: string | null;\n  /**\n   * ID of the product instance to adjust.\n   * @format GUID\n   */\n  instanceId: string;\n  /**\n   * ID of the product to replace the original instance. Required in case you don't\n   * provide a new `billingInfo` object.\n   * @format GUID\n   */\n  catalogProductId?: string | null;\n  /**\n   * Information about the billing cycle. Required in case you don't provide a new\n   * `catalogProductId`. The new billing cycle must be supported for the service.\n   * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for\n   * information about a service's supported billing cycles. If\n   * you adjust the billing cycle for a product instance with `RECURRING`\n   * payments, you must also provide `billingInfo.cycleDuration.unit`.\n   */\n  billingInfo?: ProductInstanceCycle;\n  /**\n   * Discount code indicating that the reseller provisioned the product instance\n   * during a sale. In case you pass a code that isn't valid, the call succeeds and\n   * no discount is applied to the product instance. Wix doesn't guarantee that a\n   * discount code reduces the price between Wix and the reseller, even when it's\n   * valid. You can't add a discount code after you've created the\n   * product instance. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for\n   * more information about supported codes.\n   *\n   * Max: 25 characters\n   * @maxLength 25\n   */\n  discountCode?: string | null;\n}\n\nexport interface AdjustProductInstanceSpecificationsResponse {\n  /**\n   * Idempotency key.\n   * @maxLength 100\n   */\n  idempotencyKey?: string | null;\n  /** Updated package that includes the adjusted product instance. */\n  package?: Package;\n}\n\nexport interface AdjustedProductInstanceSpecifications {\n  /** Updated package. */\n  package?: Package;\n  /**\n   * ID of the product instance to adjust.\n   * @readonly\n   * @format GUID\n   */\n  productInstanceId?: string;\n}\n\nexport interface SubscriptionEvent extends SubscriptionEventEventOneOf {\n  /** Triggered when a subscription is created. */\n  created?: SubscriptionCreated;\n  /**\n   * Triggered when a subscription is assigned to a Wix site, including the initial\n   * assignment of a floating subscription or a re-assignement from a different site.\n   */\n  assigned?: SubscriptionAssigned;\n  /** Triggered when a subscription is canceled. */\n  cancelled?: SubscriptionCancelled;\n  /** Triggered when the subscription's auto renew is turned on. */\n  autoRenewTurnedOn?: SubscriptionAutoRenewTurnedOn;\n  /** Triggered when the subscription's auto renew is turned off. */\n  autoRenewTurnedOff?: SubscriptionAutoRenewTurnedOff;\n  /**\n   * Triggered when a subscription is unassigned from a Wix site and becomes\n   * floating.\n   */\n  unassigned?: SubscriptionUnassigned;\n  /**\n   * Triggered when a subscription is transferred from one Wix account to another.\n   * A transfer includes cancelling the original subscription and creating a new\n   * subscription for the target account. The event returns both the original\n   * and the new subscription.\n   */\n  transferred?: SubscriptionTransferred;\n  /** Triggered when a recurring charge succeeds for a subscription. */\n  recurringChargeSucceeded?: RecurringChargeSucceeded;\n  /**\n   * Triggered when a subscription was updated including when its product has been\n   * up- or downgraded or the billing cycle is changed.\n   */\n  contractSwitched?: ContractSwitched;\n  /**\n   * Triggered when a subscription gets close to the end of its billing cycle.\n   * The exact number of days is defined in the billing system.\n   */\n  nearEndOfPeriod?: SubscriptionNearEndOfPeriod;\n  /**\n   * Triggered when a subscription is updated and the change doesn't happen\n   * immediately but at the end of the current billing cycle.\n   */\n  pendingChange?: SubscriptionPendingChange;\n  /** Triggered when a recurring charge attempt fails for a subscription. */\n  recurringChargeAttemptFailed?: RecurringChargeAttemptFailed;\n  /**\n   * ID of the subscription's event.\n   * @format GUID\n   */\n  eventId?: string | null;\n  /**\n   * Date and time of the event in\n   * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)\n   * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n   */\n  eventDate?: Date | null;\n}\n\n/** @oneof */\nexport interface SubscriptionEventEventOneOf {\n  /** Triggered when a subscription is created. */\n  created?: SubscriptionCreated;\n  /**\n   * Triggered when a subscription is assigned to a Wix site, including the initial\n   * assignment of a floating subscription or a re-assignement from a different site.\n   */\n  assigned?: SubscriptionAssigned;\n  /** Triggered when a subscription is canceled. */\n  cancelled?: SubscriptionCancelled;\n  /** Triggered when the subscription's auto renew is turned on. */\n  autoRenewTurnedOn?: SubscriptionAutoRenewTurnedOn;\n  /** Triggered when the subscription's auto renew is turned off. */\n  autoRenewTurnedOff?: SubscriptionAutoRenewTurnedOff;\n  /**\n   * Triggered when a subscription is unassigned from a Wix site and becomes\n   * floating.\n   */\n  unassigned?: SubscriptionUnassigned;\n  /**\n   * Triggered when a subscription is transferred from one Wix account to another.\n   * A transfer includes cancelling the original subscription and creating a new\n   * subscription for the target account. The event returns both the original\n   * and the new subscription.\n   */\n  transferred?: SubscriptionTransferred;\n  /** Triggered when a recurring charge succeeds for a subscription. */\n  recurringChargeSucceeded?: RecurringChargeSucceeded;\n  /**\n   * Triggered when a subscription was updated including when its product has been\n   * up- or downgraded or the billing cycle is changed.\n   */\n  contractSwitched?: ContractSwitched;\n  /**\n   * Triggered when a subscription gets close to the end of its billing cycle.\n   * The exact number of days is defined in the billing system.\n   */\n  nearEndOfPeriod?: SubscriptionNearEndOfPeriod;\n  /**\n   * Triggered when a subscription is updated and the change doesn't happen\n   * immediately but at the end of the current billing cycle.\n   */\n  pendingChange?: SubscriptionPendingChange;\n  /** Triggered when a recurring charge attempt fails for a subscription. */\n  recurringChargeAttemptFailed?: RecurringChargeAttemptFailed;\n}\n\n/** Triggered when a subscription is created. */\nexport interface SubscriptionCreated {\n  /** Created subscription. */\n  subscription?: Subscription;\n  /** Metadata for the `created` event. */\n  metadata?: Record<string, string>;\n  /**\n   * Subscription reactivation data.\n   * A subscription can be reactivated for example if it was incorrectly canceled because of fraud and then reactivated\n   * by the billing system\n   */\n  reactivationData?: ReactivationData;\n}\n\n/**\n * A subscription holds information about a Premium product that a Wix account\n * owner has purchased including details about the billing.\n */\nexport interface Subscription {\n  /**\n   * ID of the subscription.\n   * @format GUID\n   */\n  _id?: string;\n  /**\n   * ID of the Wix account that purchased the subscription.\n   * @format GUID\n   */\n  userId?: string;\n  /**\n   * ID of the [product](https://bo.wix.com/wix-docs/rest/premium/premium-product-catalog-v2/products/product-object)\n   * for which the subscription was purchased.\n   * @format GUID\n   */\n  productId?: string;\n  /**\n   * Date and time the subscription was created in\n   * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)\n   * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n   */\n  createdAt?: Date | null;\n  /**\n   * Date and time the subscription was last updated in\n   * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)\n   * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n   */\n  updatedAt?: Date | null;\n  /**\n   * ID of the metasite that the subscription is assigned to.\n   * Available only when the subscription is assigned to a Wix site.\n   * Subscriptions for account level products can't be assigned to a Wix site.\n   * @format GUID\n   */\n  metaSiteId?: string | null;\n  /** Information about the system that manages the subscription's billing. */\n  billingReference?: BillingReference;\n  /** Information about the billing cycle of the subscription. */\n  cycle?: Cycle;\n  /**\n   * Subscription status.\n   *\n   * + `UNKNOWN`: Default status.\n   * + `AUTO_RENEW_ON`: Subscription is active and automatically renews at the end of the current billing cycle.\n   * + `AUTO_RENEW_OFF`: Subscription is active but expires at the end of the current billing cycle.\n   * + `MANUAL_RECURRING`: Subscription is active and renews at the end of the current billing cycle, in case the customer takes an action related to the payment.\n   * + `CANCELLED`: Subscription isn't active because it has been canceled.\n   * + `TRANSFERRED`: Subscription isn't active because it has been transferred to a different account. A different active subscription was created for the target account.\n   */\n  status?: SubscriptionStatusWithLiterals;\n  /**\n   * Date and time the subscription was last transferred from one Wix account to\n   * another in\n   * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)\n   * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n   */\n  transferredAt?: Date | null;\n  /**\n   * ID of the [product type](https://bo.wix.com/wix-docs/rest/premium/premium-product-catalog-v2/product-types/product-type-object)\n   * that the product, for which the subscription was purchased, belongs to.\n   * @format GUID\n   */\n  productTypeId?: string;\n  /** Version number, which increments by 1 each time the subscription is updated. */\n  version?: number;\n  /**\n   * Whether the subscription is active. Includes the statuses\n   * `\"AUTO_RENEW_ON\"`, `\"AUTO_RENEW_OFF\"`, and `\"MANUAL_RECURRING\"`.\n   */\n  active?: boolean;\n  /**\n   * Date and time the subscription was originally created in\n   * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)\n   * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n   * Differs from `createdAt` in case the subscription was originally created for a different Wix account and has been transferred.\n   */\n  originalCreationDate?: Date | null;\n  /** Custom metadata about the subscription. */\n  metadata?: Record<string, string>;\n  /**\n   * 2-letter country code in\n   * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\n   * format.\n   */\n  countryCode?: string | null;\n  /**\n   * Seats of the product that the subscription was purchased for.\n   * Will be Null for products that don't support seats.\n   * @min 1\n   * @max 500\n   */\n  seats?: number | null;\n}\n\nexport interface BillingReference {\n  /**\n   * Name of the billing system that manages the subscription.\n   *\n   * + `\"UNKNOWN\"`: Default value.\n   * + `\"SBS\"`: [Wix Billing](https://github.com/wix-p/premium-billing/tree/master/sbs).\n   * + `\"LICENSER\"`:\n   * + `\"BASS\"`: [Billing and Subscriptions System](https://dev.wix.com/docs/rest/internal-only/premium/subscriptions-by-billing-by-wix/introduction).\n   * + `\"RESELLER\"`: [External Reseller](https://dev.wix.com/api/rest/account-level-apis/resellers/introduction).\n   */\n  providerName?: ProviderNameWithLiterals;\n  /** Current provider reference ID. */\n  providerReferenceId?: string | null;\n  /** Previous provider reference IDs. Used for when a subscription is extended, specifically for domains. */\n  previousProviderReferenceIds?: string[];\n}\n\nexport enum ProviderName {\n  UNKNOWN = 'UNKNOWN',\n  SBS = 'SBS',\n  LICENSER = 'LICENSER',\n  BASS = 'BASS',\n  RESELLER = 'RESELLER',\n  RECURRING_INVOICES = 'RECURRING_INVOICES',\n}\n\n/** @enumType */\nexport type ProviderNameWithLiterals =\n  | ProviderName\n  | 'UNKNOWN'\n  | 'SBS'\n  | 'LICENSER'\n  | 'BASS'\n  | 'RESELLER'\n  | 'RECURRING_INVOICES';\n\nexport interface Cycle extends CycleCycleSelectorOneOf {\n  /** repetitive interval */\n  interval?: Interval;\n  /** one time */\n  oneTime?: OneTime;\n}\n\n/** @oneof */\nexport interface CycleCycleSelectorOneOf {\n  /** repetitive interval */\n  interval?: Interval;\n  /** one time */\n  oneTime?: OneTime;\n}\n\nexport interface Interval {\n  /** interval unit of measure */\n  unit?: IntervalUnitWithLiterals;\n  /** number of interval */\n  count?: number;\n}\n\nexport enum IntervalUnit {\n  /** unknown interval unit */\n  UNKNOWN = 'UNKNOWN',\n  /** day */\n  DAY = 'DAY',\n  /** week */\n  WEEK = 'WEEK',\n  /** month */\n  MONTH = 'MONTH',\n  /** year */\n  YEAR = 'YEAR',\n}\n\n/** @enumType */\nexport type IntervalUnitWithLiterals =\n  | IntervalUnit\n  | 'UNKNOWN'\n  | 'DAY'\n  | 'WEEK'\n  | 'MONTH'\n  | 'YEAR';\n\nexport interface OneTime {}\n\nexport enum SubscriptionStatus {\n  UNKNOWN = 'UNKNOWN',\n  AUTO_RENEW_ON = 'AUTO_RENEW_ON',\n  AUTO_RENEW_OFF = 'AUTO_RENEW_OFF',\n  MANUAL_RECURRING = 'MANUAL_RECURRING',\n  CANCELLED = 'CANCELLED',\n  TRANSFERRED = 'TRANSFERRED',\n}\n\n/** @enumType */\nexport type SubscriptionStatusWithLiterals =\n  | SubscriptionStatus\n  | 'UNKNOWN'\n  | 'AUTO_RENEW_ON'\n  | 'AUTO_RENEW_OFF'\n  | 'MANUAL_RECURRING'\n  | 'CANCELLED'\n  | 'TRANSFERRED';\n\n/** Triggered when a subscription is reactivated. */\nexport interface ReactivationData {\n  reactivationReason?: ReactivationReasonEnumWithLiterals;\n  /**\n   * In the event of reactivation after chargeback dispute, the subscription may be extended according to the\n   * number of days it was inactive during the time of resolving the dispute\n   */\n  newEndOfPeriod?: Date | null;\n  /** The original end date, before the inactive period. */\n  oldEndOfPeriod?: Date | null;\n  /** The difference in days between the new new_end_of_period and old_end_of_period */\n  differenceInDays?: number | null;\n}\n\n/** Reason for subscription reactivation */\nexport enum ReactivationReasonEnum {\n  UNKNOWN = 'UNKNOWN',\n  /**\n   * Subscription was reactivated due to billing status change from CANCELED to ACTIVE, for example if it was incorrectly\n   * canceled because of suspicion of fraud\n   */\n  BILLING_STATUS_CHANGE = 'BILLING_STATUS_CHANGE',\n  /** Subscription was reactivated after a chargeback dispute */\n  REACTIVATED_AFTER_CHARGEBACK = 'REACTIVATED_AFTER_CHARGEBACK',\n}\n\n/** @enumType */\nexport type ReactivationReasonEnumWithLiterals =\n  | ReactivationReasonEnum\n  | 'UNKNOWN'\n  | 'BILLING_STATUS_CHANGE'\n  | 'REACTIVATED_AFTER_CHARGEBACK';\n\n/**\n * Triggered when a subscription is assigned to a Wix site, including the initial\n * assignment of a floating subscription or a re-assignement from a different site.\n */\nexport interface SubscriptionAssigned {\n  /** Assigned subscription. */\n  subscription?: Subscription;\n  /**\n   * ID of the metasite that the subscription has been assigned to before the update.\n   * @format GUID\n   */\n  previousMetaSiteId?: string | null;\n}\n\n/** Triggered when a subscription is canceled. */\nexport interface SubscriptionCancelled {\n  /** Canceled subscription. */\n  subscription?: Subscription;\n  /** Details about the cancellation including who canceled the subscription and why. */\n  cancellationDetails?: CancellationDetails;\n  /**\n   * Whether the subscription is canceled immediately or expires at the end of the current billing cycle.\n   *\n   * Default: `false`\n   */\n  immediateCancel?: boolean;\n  /** Whether the subscription was canceled during the free trial period. */\n  canceledInFreeTrial?: boolean;\n  /** The type of refund applied to the cancellation. */\n  refundType?: RefundTypeWithLiterals;\n}\n\n/** Information about the cancellation flow including who canceled the subscription and why it was canceled. */\nexport interface CancellationDetails {\n  /**\n   * Cancellation code.\n   *\n   * Values supported for cancellations on behalf of the billing system: `-1`, `-2`, `-3`, `-4`, `-5`, `-6`, `-7`, `-8`.\n   * For cancellations on behalf of the site owner or the service provider `cancellationCode`\n   * is taken from the request of\n   * [Cancel Immediately Offline](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/cancel-immediately-offline).\n   *\n   * + `-1`: The subscription has been cancelled by the billing system but none of the listed cancellation reasons applies.\n   * + `-2`: There were payment problems.\n   * + `-3`: There was a chargeback.\n   * + `-4`: Customer support has canceled the subscription and issued a refund.\n   * + `-5`: The site owner has changed their existing subscription.\n   * + `-6`: The subscription has been transferred to a different Wix account.\n   * + `-7`: The subscription has been canceled because the site owner hasn't manually authenticated the recurring payment during the subscription's grace period. For example, site owners must manually confirm recurring payments within 40 days when paying with boleto.\n   * + `-8`: The Wix account that the subscription belonged to has been deleted.\n   */\n  cancellationCode?: number | null;\n  /**\n   * Cancellation reason. For cancellations on behalf of the site owner or the service provider `cancellationReason`\n   * is taken from the request of\n   * [Cancel Immediately Offline](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/cancel-immediately-offline).\n   * For cancellations on behalf of the billing system `cancellationReason` is `null` or an empty string.\n   */\n  cancellationReason?: string | null;\n  /**\n   * Initiator of the cancellation. For `\"USER_REQUESTED\"` and `\"APP_MANAGED\"`,\n   * `cancellationCode` and `cancellationReason` are taken from the request of\n   * [Cancel Immediately](https://dev.wix.com/docs/rest/account-level/premium/premium-subscriptions-manager/subscription-v1/cancel-immediately)\n   * or [Cancel Immediately Offline](https://dev.wix.com/docs/rest/account-level/premium/premium-subscriptions-manager/subscription-v1/cancel-immediately-offline).\n   * For `\"PASSIVE\"`, cancellations `cancellationCode` is automatically calculated and `cancellationReason`\n   * is `null` or an empty string.\n   *\n   * + `\"UNKNOWN`: Default value.\n   * + `\"USER_REQUESTED\"`:  The Wix account owner has canceled the subscription.\n   * + `\"APP_MANAGED\"`: The service provider has canceled the subscription.\n   * + `\"PASSIVE\"`: The billing system has canceled the subscription. For example, in case of payment failure or fraud.\n   */\n  initiator?: InitiatorWithLiterals;\n}\n\nexport enum Initiator {\n  UNKNOWN = 'UNKNOWN',\n  USER_REQUESTED = 'USER_REQUESTED',\n  APP_MANAGED = 'APP_MANAGED',\n  PASSIVE = 'PASSIVE',\n}\n\n/** @enumType */\nexport type InitiatorWithLiterals =\n  | Initiator\n  | 'UNKNOWN'\n  | 'USER_REQUESTED'\n  | 'APP_MANAGED'\n  | 'PASSIVE';\n\nexport enum RefundType {\n  UNKNOWN = 'UNKNOWN',\n  NO_REFUND = 'NO_REFUND',\n  FULL_REFUND = 'FULL_REFUND',\n  PRORATED_REFUND = 'PRORATED_REFUND',\n}\n\n/** @enumType */\nexport type RefundTypeWithLiterals =\n  | RefundType\n  | 'UNKNOWN'\n  | 'NO_REFUND'\n  | 'FULL_REFUND'\n  | 'PRORATED_REFUND';\n\n/** Triggered when the subscription's auto renew is turned on. */\nexport interface SubscriptionAutoRenewTurnedOn {\n  /** Subscription for which auto renew is turned on. */\n  subscription?: Subscription;\n  /**\n   * Supported values: `USER`, `APP`.\n   *\n   * Information about who turned auto renew on.\n   * + `\"USER\"`: The site owner who purchased the subscription has turned auto renew on.\n   * + `\"APP\"`: The service provider has turned auto renew on.\n   */\n  initiator?: string | null;\n}\n\n/** Triggered when the subscription's auto renew is turned off. */\nexport interface SubscriptionAutoRenewTurnedOff {\n  /** Subscription for which auto renew is turned off. */\n  subscription?: Subscription;\n  /** Details about the cancellation including who canceled the subscription and why. */\n  cancellationDetails?: CancellationDetails;\n  /**\n   * Whether the subscription is immediately canceled or expires at the end of the current billing cycle.\n   *\n   * Default: `false`\n   */\n  immediateCancel?: boolean;\n}\n\n/**\n * Triggered when a subscription is unassigned from a Wix site and becomes\n * floating.\n */\nexport interface SubscriptionUnassigned {\n  /** Unassigned subscription. */\n  subscription?: Subscription;\n  /**\n   * ID of the metasite that the subscription has been assigned to before the event.\n   * @format GUID\n   */\n  previousMetaSiteId?: string;\n  /**\n   * Reason why the subscription is unassigned.\n   *\n   * + `\"UNKNOWN\"`: Default value.\n   * + `\"USER_REQUESTED\"`: The Wix account owner has unassigned the subscription.\n   * + `\"REPLACED_BY_ANOTHER_SUBSCRIPTION\"`: A different subscription that replaces this subscription is assigned to the site.\n   */\n  unassignReason?: UnassignReasonWithLiterals;\n}\n\nexport enum UnassignReason {\n  UNKNOWN = 'UNKNOWN',\n  USER_REQUESTED = 'USER_REQUESTED',\n  REPLACED_BY_ANOTHER_SUBSCRIPTION = 'REPLACED_BY_ANOTHER_SUBSCRIPTION',\n}\n\n/** @enumType */\nexport type UnassignReasonWithLiterals =\n  | UnassignReason\n  | 'UNKNOWN'\n  | 'USER_REQUESTED'\n  | 'REPLACED_BY_ANOTHER_SUBSCRIPTION';\n\n/**\n * Triggered when a subscription is transferred from one Wix account to another.\n * A transfer includes cancelling the original subscription and creating a new\n * subscription for the target account. The event returns both the original\n * and the new subscription.\n */\nexport interface SubscriptionTransferred {\n  /** Original subscription that was canceled for the transfer. */\n  originSubscription?: Subscription;\n  /** Newly created subscription for the target account. */\n  targetSubscription?: Subscription;\n}\n\n/** Triggered when a recurring charge succeeds for a subscription. */\nexport interface RecurringChargeSucceeded {\n  /** Subscription for which the recurring charge has succeeded. */\n  subscription?: Subscription;\n  /** Indication that there was a successful charge at the end of the free trial period */\n  freeTrialPeriodEnd?: boolean;\n}\n\n/**\n * Triggered when a subscription was updated including when its product has been\n * up- or downgraded or the billing cycle is changed.\n */\nexport interface ContractSwitched {\n  /** Updated subscription. */\n  subscription?: Subscription;\n  /** Billing cycle before the update. */\n  previousCycle?: Cycle;\n  /**\n   * ID of the product belonging to the subscription before the update.\n   * @format GUID\n   */\n  previousProductId?: string;\n  /**\n   * ID of the product type that the subscription's original product belonged to before the update.\n   * @format GUID\n   */\n  previousProductTypeId?: string;\n  /**\n   * Update type. __Note__: Doesn't include information about a product adjustment.\n   * For that purpose, see `productAdjustment`.\n   *\n   * + `\"NOT_APPLICABLE\"`: Default value.\n   * + `\"ADDITIONAL_QUANTITY\"`: An increased usage quota is added to the subscription. For example, a second mailbox is added to a subscription that previously included a single mailbox.\n   * + `\"CREDIT_UNUSED_PERIOD\"`: The subscription is upgraded and the new price is less than the regular price. The new price applies to every billing cycle, not just the first cycle.\n   * + `\"REFUND_PRICE_DIFF\"`: Not implemented.\n   * + `\"ADJUST_PERIOD_END\"`: Not implemented.\n   * + `\"DOWNGRADE_GRACE_PERIOD\"`: For downgrades during the grace period. In this situation, the site owner hasn’t paid yet and must immediately pay for the downgraded subscription.\n   * + `\"FULL_AMOUNT_PERIOD\"`: For upgrades in which the site owner retains unused benefits. For example, site owners upgrading a Facebook Ads subscription retain their unused FB Ads credit. The unused credit is added to the new credit.\n   * + `\"END_OF_PERIOD\"`: The subscription's billing current cycle is extended because of a downgrade.\n   * + `\"PENDING_CHANGES\"`: The subscription's billing is updated, but the change doesn't apply immediately. Instead, the update becomes effective at the end of current billing cycle.\n   * + `\"DOWNGRADE_RENEWAL\"`: The subscription is downgraded because of a declined payment. This prevents subscriptions from churning.\n   */\n  contractSwitchType?: ContractSwitchTypeWithLiterals;\n  /**\n   * ID of the metasite the subscription has been assigned to previously.\n   * Available only in case the subscription is assigned to a different site.\n   * @format GUID\n   */\n  previousMetaSiteId?: string | null;\n  /**\n   * Update reason.\n   *\n   * + `\"PRICE_INCREASE\"`: The subscription's price has been increased.\n   * + `\"EXTERNAL_PROVIDER_TRIGGER\"`: Any reason other than a price increase.\n   */\n  contractSwitchReason?: ContractSwitchReasonWithLiterals;\n  /** Information about the price update. Available only for updates with a price increase. */\n  productPriceIncreaseData?: ProductPriceIncreaseData;\n  /**\n   * Information about a product adjustment. For example, a downgrade.\n   * __Note__: This isn't the same as `contractSwitchType`.\n   *\n   * + `NOT_APPLICABLE`: There is no information about whether the product has been up- or downgraded.\n   * + `DOWNGRADE`: The product has been downgraded.\n   */\n  productAdjustment?: ProductAdjustmentWithLiterals;\n  /**\n   * Number of seats before the contract switch.\n   * @min 1\n   * @max 500\n   */\n  previousSeats?: number | null;\n}\n\n/** Copied from SBS */\nexport enum ContractSwitchType {\n  NOT_APPLICABLE = 'NOT_APPLICABLE',\n  ADDITIONAL_QUANTITY = 'ADDITIONAL_QUANTITY',\n  CREDIT_UNUSED_PERIOD = 'CREDIT_UNUSED_PERIOD',\n  REFUND_PRICE_DIFF = 'REFUND_PRICE_DIFF',\n  ADJUST_PERIOD_END = 'ADJUST_PERIOD_END',\n  DOWNGRADE_GRACE_PERIOD = 'DOWNGRADE_GRACE_PERIOD',\n  FULL_AMOUNT_PERIOD = 'FULL_AMOUNT_PERIOD',\n  END_OF_PERIOD = 'END_OF_PERIOD',\n  PENDING_CHANGES = 'PENDING_CHANGES',\n  DOWNGRADE_RENEWAL = 'DOWNGRADE_RENEWAL',\n  FIXED_BILLING_DATE_PRORATION = 'FIXED_BILLING_DATE_PRORATION',\n  IMMEDIATE_SWITCH = 'IMMEDIATE_SWITCH',\n}\n\n/** @enumType */\nexport type ContractSwitchTypeWithLiterals =\n  | ContractSwitchType\n  | 'NOT_APPLICABLE'\n  | 'ADDITIONAL_QUANTITY'\n  | 'CREDIT_UNUSED_PERIOD'\n  | 'REFUND_PRICE_DIFF'\n  | 'ADJUST_PERIOD_END'\n  | 'DOWNGRADE_GRACE_PERIOD'\n  | 'FULL_AMOUNT_PERIOD'\n  | 'END_OF_PERIOD'\n  | 'PENDING_CHANGES'\n  | 'DOWNGRADE_RENEWAL'\n  | 'FIXED_BILLING_DATE_PRORATION'\n  | 'IMMEDIATE_SWITCH';\n\nexport enum ContractSwitchReason {\n  EXTERNAL_PROVIDER_TRIGGER = 'EXTERNAL_PROVIDER_TRIGGER',\n  PRICE_INCREASE = 'PRICE_INCREASE',\n}\n\n/** @enumType */\nexport type ContractSwitchReasonWithLiterals =\n  | ContractSwitchReason\n  | 'EXTERNAL_PROVIDER_TRIGGER'\n  | 'PRICE_INCREASE';\n\n/** Triggered when a subscription's price is increased. */\nexport interface ProductPriceIncreaseData {\n  /**\n   * Price of the subscription before the update.\n   * @format DECIMAL_VALUE\n   */\n  previousPrice?: string | null;\n  /** A value that is used in order to select the correct email template to send the user regarding the price increase. */\n  emailTemplateSelector?: string | null;\n  /** Used to differentiate between migration segments. Does not have to be unique per segment. */\n  segmentName?: string | null;\n  /** Used to determine how the price increase was triggered. */\n  priceIncreaseTrigger?: PriceIncreaseTriggerWithLiterals;\n}\n\n/** Reason for Price Increase Trigger */\nexport enum PriceIncreaseTrigger {\n  NEAR_RENEWAL = 'NEAR_RENEWAL',\n  RECURRING_SUCCESS = 'RECURRING_SUCCESS',\n  MANUAL = 'MANUAL',\n}\n\n/** @enumType */\nexport type PriceIncreaseTriggerWithLiterals =\n  | PriceIncreaseTrigger\n  | 'NEAR_RENEWAL'\n  | 'RECURRING_SUCCESS'\n  | 'MANUAL';\n\n/** Triggered when a subscription's product is adusted. */\nexport enum ProductAdjustment {\n  /** flag to show that the ContractSwitchedEvent is not applicable / needed */\n  NOT_APPLICABLE = 'NOT_APPLICABLE',\n  /** flag to show that the ContractSwitchedEvent is a Downgrade */\n  DOWNGRADE = 'DOWNGRADE',\n}\n\n/** @enumType */\nexport type ProductAdjustmentWithLiterals =\n  | ProductAdjustment\n  | 'NOT_APPLICABLE'\n  | 'DOWNGRADE';\n\n/**\n * Triggered when a subscription gets close to the end of its billing cycle.\n * The exact number of days is defined in the billing system.\n */\nexport interface SubscriptionNearEndOfPeriod {\n  /** Subscription that got close to the end of its billing cycle. */\n  subscription?: Subscription;\n  /** Whether the subscription is within the free trial period. */\n  inFreeTrial?: boolean;\n}\n\n/**\n * Triggered when a subscription is updated and the change doesn't happen\n * immediately but at the end of the current billing cycle.\n */\nexport interface SubscriptionPendingChange {\n  /** Subscription for which a pending update is triggered. */\n  subscription?: Subscription;\n}\n\n/** Triggered when a recurring charge attempt failed for a subscription. */\nexport interface RecurringChargeAttemptFailed {\n  /** Subscription for which the recurring charge attempt has failed. */\n  subscription?: Subscription;\n}\n\nexport interface Empty {}\n\nexport interface ProductInstanceUpdated {\n  /** Updated package. */\n  package?: Package;\n  /**\n   * ID of the product instance that was adjusted.\n   * @readonly\n   * @format GUID\n   */\n  productInstanceId?: string;\n}\n\nexport interface FailureReportRequest {\n  /**\n   * ID of the product instance that failed.\n   * @format GUID\n   */\n  instanceId?: string;\n  /** Failure reason. */\n  reason?: FailureReason;\n}\n\nexport interface ProductInstanceFailed {\n  /** Updated package. */\n  package?: Package;\n  /**\n   * ID of the product instance that `FAILED`.\n   * @readonly\n   * @format GUID\n   */\n  productInstanceId?: string;\n  /** Failure reason. */\n  reason?: FailureReason;\n}\n\nexport interface Task {\n  key?: TaskKey;\n  executeAt?: Date | null;\n  payload?: string | null;\n}\n\nexport interface TaskKey {\n  appId?: string;\n  instanceId?: string;\n  subjectId?: string | null;\n}\n\nexport interface TaskAction extends TaskActionActionOneOf {\n  complete?: Complete;\n  cancel?: Cancel;\n  reschedule?: Reschedule;\n}\n\n/** @oneof */\nexport interface TaskActionActionOneOf {\n  complete?: Complete;\n  cancel?: Cancel;\n  reschedule?: Reschedule;\n}\n\nexport interface Complete {}\n\nexport interface Cancel {}\n\nexport interface Reschedule {\n  executeAt?: Date | null;\n  payload?: string | null;\n}\n\nexport interface UpdateProductInstanceRequest {\n  /**\n   * ID of the product instance to update.\n   * @format GUID\n   */\n  instanceId?: string;\n  status?: StatusWithLiterals;\n  /** @format COUNTRY */\n  countryCode?: string | null;\n  /** Which field to update, currently only status and countryCode are supported. */\n  fieldToUpdate?: FieldToUpdateWithLiterals;\n}\n\nexport enum FieldToUpdate {\n  STATUS = 'STATUS',\n  COUNTRY_CODE = 'COUNTRY_CODE',\n}\n\n/** @enumType */\nexport type FieldToUpdateWithLiterals =\n  | FieldToUpdate\n  | 'STATUS'\n  | 'COUNTRY_CODE';\n\nexport interface UpdateProductInstanceResponse {\n  /** Updated Product Instance */\n  productInstance?: ProductInstance;\n}\n\nexport interface UpdatePackageExternalIdRequest {\n  /**\n   * ID of the package to update.\n   * @format GUID\n   */\n  packageId: string;\n  /**\n   * External ID that will be assigned to the package.\n   * @maxLength 100\n   */\n  externalId: string;\n}\n\nexport interface UpdatePackageExternalIdResponse {\n  /** Updated package. */\n  updatedPackage?: Package;\n}\n\nexport interface CountPackagesRequest {\n  /** Filter on what packages to count */\n  filter?: Record<string, any> | null;\n}\n\nexport interface CountPackagesResponse {\n  /** Number of packages */\n  count?: number;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n  createdEvent?: EntityCreatedEvent;\n  updatedEvent?: EntityUpdatedEvent;\n  deletedEvent?: EntityDeletedEvent;\n  actionEvent?: ActionEvent;\n  /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n  _id?: string;\n  /**\n   * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n   * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n   */\n  entityFqdn?: string;\n  /**\n   * Event action name, placed at the top level to make it easier for users to dispatch messages.\n   * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n   */\n  slug?: string;\n  /** ID of the entity associated with the event. */\n  entityId?: string;\n  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n  eventTime?: Date | null;\n  /**\n   * Whether the event was triggered as a result of a privacy regulation application\n   * (for example, GDPR).\n   */\n  triggeredByAnonymizeRequest?: boolean | null;\n  /** If present, indicates the action that triggered the event. */\n  originatedFrom?: string | null;\n  /**\n   * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n   * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n   */\n  entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n  createdEvent?: EntityCreatedEvent;\n  updatedEvent?: EntityUpdatedEvent;\n  deletedEvent?: EntityDeletedEvent;\n  actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n  entity?: string;\n}\n\nexport interface RestoreInfo {\n  deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n  /**\n   * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n   * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n   * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n   */\n  currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n  /** Entity that was deleted. */\n  deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n  body?: string;\n}\n\nexport interface MessageEnvelope {\n  /**\n   * App instance ID.\n   * @format GUID\n   */\n  instanceId?: string | null;\n  /**\n   * Event type.\n   * @maxLength 150\n   */\n  eventType?: string;\n  /** The identification type and identity data. */\n  identity?: IdentificationData;\n  /** Stringify payload. */\n  data?: string;\n  /** Details related to the account */\n  accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n  /**\n   * ID of a site visitor that has not logged in to the site.\n   * @format GUID\n   */\n  anonymousVisitorId?: string;\n  /**\n   * ID of a site visitor that has logged in to the site.\n   * @format GUID\n   */\n  memberId?: string;\n  /**\n   * ID of a Wix user (site owner, contributor, etc.).\n   * @format GUID\n   */\n  wixUserId?: string;\n  /**\n   * ID of an app.\n   * @format GUID\n   */\n  appId?: string;\n  /** @readonly */\n  identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n  /**\n   * ID of a site visitor that has not logged in to the site.\n   * @format GUID\n   */\n  anonymousVisitorId?: string;\n  /**\n   * ID of a site visitor that has logged in to the site.\n   * @format GUID\n   */\n  memberId?: string;\n  /**\n   * ID of a Wix user (site owner, contributor, etc.).\n   * @format GUID\n   */\n  wixUserId?: string;\n  /**\n   * ID of an app.\n   * @format GUID\n   */\n  appId?: string;\n}\n\nexport enum WebhookIdentityType {\n  UNKNOWN = 'UNKNOWN',\n  ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n  MEMBER = 'MEMBER',\n  WIX_USER = 'WIX_USER',\n  APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n  | WebhookIdentityType\n  | 'UNKNOWN'\n  | 'ANONYMOUS_VISITOR'\n  | 'MEMBER'\n  | 'WIX_USER'\n  | 'APP';\n\nexport interface AccountInfo {\n  /**\n   * ID of the Wix account associated with the event.\n   * @format GUID\n   */\n  accountId?: string | null;\n  /**\n   * ID of the parent Wix account. Only included when accountId belongs to a child account.\n   * @format GUID\n   */\n  parentAccountId?: string | null;\n  /**\n   * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n   * @format GUID\n   */\n  siteId?: string | null;\n}\n\nexport interface MigrateSubscriptionToPackagesRequest {\n  /** Created package. */\n  productInstance?: ProductInstance;\n  /**\n   * Existing subscriptionId to migrate\n   * @format GUID\n   */\n  subscriptionId?: string | null;\n  /**\n   * User id of the migration - only for Immigrator\n   * @format GUID\n   */\n  userId?: string | null;\n}\n\nexport interface MigrateSubscriptionToPackagesResponse {\n  package?: Package;\n}\n\nexport interface FixBrokenMigrationRequest {\n  /**\n   * Subscription id of the broken subscription\n   * @format GUID\n   */\n  subscriptionId?: string;\n  /**\n   * SBS service id that points to the broken subscription\n   * @format GUID\n   */\n  sbsServiceId?: string;\n  /**\n   * Owner of the broken subscription\n   * @format GUID\n   */\n  userId?: string;\n}\n\nexport interface FixBrokenMigrationResponse {}\n\n/**\n * Creates a new package.\n *\n * Deprecated: This method is deprecated and will be removed by 2024-12-31.\n * Use com.wixpress.premium.reseller.packages.v1.Packages.CreatePackageV2 instead.\n *\n * HTTP Request:\n * POST /v1/packages\n *\n * Permissions:\n * Requires the \"premium.reseller-package.manage\" permission with MANUAL type.\n *\n * Event:\n * A PRIVATE callback will be triggered when the package is successfully created.\n *\n * Required Fields:\n * - CreatePackageRequest.products\n *\n * Maturity: GA\n * Exposure: PUBLIC\n * @public\n * @requiredField options.products\n * @permissionId premium.reseller-package.manage\n * @fqn com.wixpress.premium.reseller.packages.v1.Packages.CreatePackage\n * @deprecated\n * @replacedBy com.wixpress.premium.reseller.packages.v1.Packages.CreatePackageV2\n * @targetRemovalDate 2024-12-31\n */\nexport async function createPackage(\n  options?: NonNullablePaths<CreatePackageOptions, `products`, 2>\n): Promise<\n  NonNullablePaths<\n    CreatePackageResponse,\n    | `package._id`\n    | `package.accountId`\n    | `package.productInstances`\n    | `package.productInstances.${number}.billingInfo.type`\n    | `package.productInstances.${number}.billingInfo.cycleDuration.unit`\n    | `package.productInstances.${number}.billingInfo.cycleDuration.count`\n    | `package.productInstances.${number}.instanceId`\n    | `package.productInstances.${number}.catalogProductId`\n    | `package.productInstances.${number}.status`\n    | `package.productInstances.${number}.failure.code`\n    | `package.productInstances.${number}.failure.message`,\n    7\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    idempotencyKey: options?.idempotencyKey,\n    externalId: options?.externalId,\n    products: options?.products,\n  });\n\n  const reqOpts = ambassadorWixPremiumResellerV1Packages.createPackage(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          idempotencyKey: '$[0].idempotencyKey',\n          externalId: '$[0].externalId',\n          products: '$[0].products',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface CreatePackageOptions {\n  /**\n   * Idempotency key.\n   * @maxLength 100\n   */\n  idempotencyKey?: string | null;\n  /**\n   * External reference. For example, an external subscription ID. **Note:** This field is not validated by Wix.\n   * @maxLength 100\n   */\n  externalId?: string | null;\n  /**\n   * Wix services that are resold.\n   * @maxSize 1000\n   * @minSize 1\n   */\n  products: ProductInstance[];\n}\n\n/**\n * Creates a package of product instances.\n *\n *\n * You must pass the relevant Wix account ID in the header of the call. In\n * the DIY flow, we recommend to pass the customer's sub-account ID instead\n * of your main reseller account ID.\n *\n * You may also pass a Wix site ID for each product in the body of the call.\n * If you omit the site ID, a floating product instance is created.\n *\n * When Wix customers purchase a specific paid service or product, Wix may offer\n * them time-limited free access to a different product. For example, customers\n * get a voucher for a free 1-year domain registration when purchasing any Wix\n * Premium plan. If you want to offer your customers the same benefit, create a\n * package containing the original product first. Then, create a second package\n * with the additional product. In the second Create Package call, pass the\n * instance ID of the original product as `referenceProductInstanceId`. This way,\n * Wix doesn't charge you for the additional product. Make sure that the status\n * of the referenced product is either `\"PENDING\"` or `\"ACTIVE\"`. Note that you\n * can use each product instance only a single time as reference instance.\n *\n * You need to pass a `countryCode` to specify where customers can claim\n * vouchers that may come with a product. Contact the\n * [Wix B2B sales team](mailto:bizdev@wix.com) to get information about\n * vouchers and supported locations.\n *\n * > **Important**: This call requires an account level API key and cannot be\n * > authenticated with the standard authorization header.\n * @public\n * @requiredField options.products\n * @requiredField options.products.countryCode\n * @permissionId premium.reseller-package.manage\n * @fqn com.wixpress.premium.reseller.packages.v1.Packages.CreatePackageV2\n */\nexport async function createPackageV2(\n  options?: NonNullablePaths<\n    CreatePackageV2Options,\n    `products` | `products.${number}.countryCode`,\n    4\n  >\n): Promise<\n  NonNullablePaths<\n    CreatePackageResponse,\n    | `package._id`\n    | `package.accountId`\n    | `package.productInstances`\n    | `package.productInstances.${number}.billingInfo.type`\n    | `package.productInstances.${number}.billingInfo.cycleDuration.unit`\n    | `package.productInstances.${number}.billingInfo.cycleDuration.count`\n    | `package.productInstances.${number}.instanceId`\n    | `package.productInstances.${number}.catalogProductId`\n    | `package.productInstances.${number}.status`\n    | `package.productInstances.${number}.failure.code`\n    | `package.productInstances.${number}.failure.message`,\n    7\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    idempotencyKey: options?.idempotencyKey,\n    externalId: options?.externalId,\n    products: options?.products,\n  });\n\n  const reqOpts =\n    ambassadorWixPremiumResellerV1Packages.createPackageV2(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          idempotencyKey: '$[0].idempotencyKey',\n          externalId: '$[0].externalId',\n          products: '$[0].products',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface CreatePackageV2Options {\n  /**\n   * Idempotency key.\n   * @maxLength 100\n   */\n  idempotencyKey?: string | null;\n  /**\n   * External reference. For example, an external subscription ID. **Note:** This field is not validated by Wix.\n   * @maxLength 100\n   */\n  externalId?: string | null;\n  /**\n   * Wix services that are resold.\n   * @maxSize 1000\n   * @minSize 1\n   */\n  products: ProductInstance[];\n}\n\n/**\n * Cancels all product instances included in the package and the customer\n * immediately loses access to the canceled functionality.\n *\n *\n * You must pass the ID of the Wix account that the package belongs to in the\n * header of the call. The call fails, if the package and Wix account don't\n * match.\n *\n * If a canceled product instance is a requirement for another Wix service, that\n * functionality is also no longer available to the customer. For example, if\n * you cancel a Premium plan, a previously connected domain is automatically\n * disconnected from the site.\n *\n * > **Important**: This call requires an account level API key and cannot be\n * > authenticated with the standard authorization header.\n * @param _id - ID of the package to cancel.\n * @public\n * @requiredField _id\n * @permissionId premium.reseller-package.manage\n * @fqn com.wixpress.premium.reseller.packages.v1.Packages.CancelPackage\n */\nexport async function cancelPackage(\n  _id: string,\n  options?: CancelPackageOptions\n): Promise<\n  NonNullablePaths<\n    CancelPackageResponse,\n    | `package._id`\n    | `package.accountId`\n    | `package.productInstances`\n    | `package.productInstances.${number}.billingInfo.type`\n    | `package.productInstances.${number}.billingInfo.cycleDuration.unit`\n    | `package.productInstances.${number}.billingInfo.cycleDuration.count`\n    | `package.productInstances.${number}.instanceId`\n    | `package.productInstances.${number}.catalogProductId`\n    | `package.productInstances.${number}.status`\n    | `package.productInstances.${number}.failure.code`\n    | `package.productInstances.${number}.failure.message`,\n    7\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    id: _id,\n    idempotencyKey: options?.idempotencyKey,\n  });\n\n  const reqOpts = ambassadorWixPremiumResellerV1Packages.cancelPackage(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          id: '$[0]',\n          idempotencyKey: '$[1].idempotencyKey',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface CancelPackageOptions {\n  /**\n   * Idempotency key.\n   * @maxLength 100\n   */\n  idempotencyKey?: string | null;\n}\n\n/**\n * Retrieves a package.\n *\n *\n * You must pass the ID of the Wix account that the package belongs to in the\n * header of the call. The call fails, if the package and Wix account don't\n * match.\n *\n * > **Important**: This call requires an account level API key and cannot be\n * > authenticated with the standard authorization header.\n * @param _id - Package ID.\n * @public\n * @requiredField _id\n * @permissionId premium.reseller-package.read\n * @returns Retrieved package.\n * @fqn com.wixpress.premium.reseller.packages.v1.Packages.GetPackage\n */\nexport async function getPackage(\n  _id: string\n): Promise<\n  NonNullablePaths<\n    Package,\n    | `_id`\n    | `accountId`\n    | `productInstances`\n    | `productInstances.${number}.billingInfo.type`\n    | `productInstances.${number}.billingInfo.cycleDuration.unit`\n    | `productInstances.${number}.billingInfo.cycleDuration.count`\n    | `productInstances.${number}.instanceId`\n    | `productInstances.${number}.catalogProductId`\n    | `productInstances.${number}.status`\n    | `productInstances.${number}.failure.code`\n    | `productInstances.${number}.failure.message`,\n    6\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n  const reqOpts = ambassadorWixPremiumResellerV1Packages.getPackage(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)?.package!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Retrieves a list of packages, given the provided paging, filtering, and sorting.\n *\n *\n * You must pass the ID of the Wix account that the packages belong to in the\n * header of the call. The call returns packages that belong to the parent\n * account, regardless if you pass the ID of a parent or sub-account. In case\n * you want to retrieve only packages that belong to a sub-account, you must\n * pass the sub-account ID as `filter` in the `query` object like this:\n *\n * ```json\n * {\n * \"query\": {\n * \"filter\": {\n * \"accountId\": {\n * \"$eq\": \"<SUB_ACCOUNT_ID>\"\n * }\n * }\n * }\n * }\n * ```\n *\n * Query Packages runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order\n * - `cursorPaging.limit` is `100`\n *\n * By default `pagingMetadata.cursors` are returned, unless you specifically pass\n * `query.paging`.\n *\n * The maximum for `cursorPaging.limit` is `100`.\n *\n * If you pass a cursor token that you have received in a previous Query Package response,\n * passing additional sort or filter information results in an invalid cursor\n * error. Since the received cursor token already holds all the needed information\n * for sort and filter. Changing the sort and filter properties during the span of\n * a cursor query isn't supported. But you can provide a different limit.\n *\n * To learn about working with _Query_ endpoints, see\n * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),\n * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),\n * and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).\n *\n * > **Important**: This call requires an account level API key and cannot be\n * > authenticated with the standard authorization header.\n * @public\n * @permissionId premium.reseller-package.read\n * @fqn com.wixpress.premium.reseller.packages.v1.Packages.QueryPackages\n */\nexport function queryPackages(): PackagesQueryBuilder {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[0] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  return queryBuilder<\n    Package,\n    'CURSOR',\n    QueryPackagesRequest,\n    QueryPackagesResponse\n  >({\n    func: async (payload: QueryPackagesRequest) => {\n      const reqOpts =\n        ambassadorWixPremiumResellerV1Packages.queryPackages(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: QueryPackagesRequest['query']) => {\n      const args = [query, {}] as [QueryPackagesRequest['query'], {}];\n      return renameKeysFromSDKRequestToRESTRequest({\n        ...args?.[1],\n        query: args?.[0],\n      });\n    },\n    responseTransformer: ({ data }: HttpResponse<QueryPackagesResponse>) => {\n      const transformedData = renameKeysFromRESTResponseToSDKResponse(\n        transformPaths(data, [])\n      );\n\n      return {\n        items: transformedData?.packages,\n        pagingMetadata: transformedData?.metadata,\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 PackagesQueryResult extends QueryCursorResult {\n  items: Package[];\n  query: PackagesQueryBuilder;\n  next: () => Promise<PackagesQueryResult>;\n  prev: () => Promise<PackagesQueryResult>;\n}\n\nexport interface PackagesQueryBuilder {\n  /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n  limit: (limit: number) => PackagesQueryBuilder;\n  /** @param cursor - A pointer to specific record */\n  skipTo: (cursor: string) => PackagesQueryBuilder;\n  find: () => Promise<PackagesQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn com.wixpress.premium.reseller.packages.v1.Packages.QueryPackages\n * @requiredField query\n */\nexport async function typedQueryPackages(\n  query: PackageQuery\n): Promise<\n  NonNullablePaths<\n    QueryPackagesResponse,\n    `packages` | `packages.${number}._id` | `packages.${number}.accountId`,\n    4\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n  const reqOpts = ambassadorWixPremiumResellerV1Packages.queryPackages(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: { query: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['query']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface PackageQuerySpec extends QuerySpec {\n  paging: 'cursor';\n  wql: [];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n  Package,\n  PackageQuerySpec\n>;\nexport type PackageQuery = {\n  /** \n  Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`.  \n  */\n  cursorPaging?: {\n    /** \n  Maximum number of items to return in the results. \n  @max: 100 \n  */\n    limit?:\n      | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n      | null;\n    /** \n  Pointer to the next or previous page in the list of results.\n\n  Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n  Not relevant for the first request. \n  @maxLength: 16000 \n  */\n    cursor?:\n      | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n      | null;\n  };\n  /** \n  Filter object.\n\n  Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).  \n  */\n  filter?: CommonQueryWithEntityContext['filter'] | 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  */\n  sort?: {\n    /** \n  Name of the field to sort by. \n  @maxLength: 512 \n  */\n    fieldName?: NonNullable<\n      CommonQueryWithEntityContext['sort']\n    >[number]['fieldName'];\n    /** \n  Sort order.  \n  */\n    order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n  }[];\n};\n\nexport const utils = {\n  query: {\n    ...createQueryUtils<Package, PackageQuerySpec, PackageQuery>(),\n  },\n};\n\n/**\n * Assigns a product instance to a site.\n *\n *  You must pass the ID of the Wix account that the product instance belongs to in the header of the call.\n *\n *  The customer immediately gains access to features included in the assigned service. It's up to the reseller to decide whether assigning a product instance affects the customer’s payment.\n *\n *  It's possible to assign a product instance that's already assigned to a site, to a different site without [unassigning](/packages/unassign-product-instance-from-site) it first. But if the call fails in such a situation, the product instance may either remain assigned to the original site or become unassigned. You can confirm the instance's status by [retrieving the relevant package](/packages/get-package).\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @public\n * @requiredField identifiers\n * @requiredField identifiers.instanceId\n * @requiredField identifiers.siteId\n * @permissionId premium.reseller-package.manage\n * @fqn com.wixpress.premium.reseller.packages.v1.Packages.AssignProductInstanceToSite\n */\nexport async function assignProductInstanceToSite(\n  identifiers: NonNullablePaths<\n    AssignProductInstanceToSiteIdentifiers,\n    `instanceId` | `siteId`,\n    2\n  >,\n  options?: AssignProductInstanceToSiteOptions\n): Promise<\n  NonNullablePaths<\n    AssignProductInstanceToSiteResponse,\n    | `package._id`\n    | `package.accountId`\n    | `package.productInstances`\n    | `package.productInstances.${number}.billingInfo.type`\n    | `package.productInstances.${number}.billingInfo.cycleDuration.unit`\n    | `package.productInstances.${number}.billingInfo.cycleDuration.count`\n    | `package.productInstances.${number}.instanceId`\n    | `package.productInstances.${number}.catalogProductId`\n    | `package.productInstances.${number}.status`\n    | `package.productInstances.${number}.failure.code`\n    | `package.productInstances.${number}.failure.message`,\n    7\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    instanceId: identifiers?.instanceId,\n    siteId: identifiers?.siteId,\n    idempotencyKey: options?.idempotencyKey,\n  });\n\n  const reqOpts =\n    ambassadorWixPremiumResellerV1Packages.assignProductInstanceToSite(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          instanceId: '$[0].instanceId',\n          siteId: '$[0].siteId',\n          idempotencyKey: '$[1].idempotencyKey',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['identifiers', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface AssignProductInstanceToSiteIdentifiers {\n  /**\n   * ID of the product instance to assign to a site.\n   * @format GUID\n   */\n  instanceId: string;\n  /**\n   * ID of the site to which the product instance is assigned.\n   * @format GUID\n   */\n  siteId: string;\n}\n\nexport interface AssignProductInstanceToSiteOptions {\n  /**\n   * Idempotency key.\n   * @maxLength 100\n   */\n  idempotencyKey?: string | null;\n}\n\n/**\n * Unassigns a product instance from a site.\n *\n *  You must pass the ID of the Wix account that the product instance belongs to in the header of the call.\n *\n *  The product instance becomes floating and the customer immediately looses access to features included in the unassigned service. It's up to the reseller to decide whether unassigning a product instance affects the customer’s payment.\n *\n *  If an unassigned product instance is a requirement for another service, that service may not be available to the customer any longer. For example, if you unassign a `Combo Plan` plan from a site, a previously connected domain is disconnected.\n *\n *  You can assign floating product instances to sites using the [Assign Product Instance to Site](/packages/assign-product-instance-to-site) method.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param instanceId - ID of the product instance to unassign from a site.\n * @public\n * @requiredField instanceId\n * @permissionId premium.reseller-package.manage\n * @fqn com.wixpress.premium.reseller.packages.v1.Packages.UnassignProductInstanceFromSite\n */\nexport async function unassignProductInstanceFromSite(\n  instanceId: string,\n  options?: UnassignProductInstanceFromSiteOptions\n): Promise<\n  NonNullablePaths<\n    UnassignProductInstanceFromSiteResponse,\n    | `package._id`\n    | `package.accountId`\n    | `package.productInstances`\n    | `package.productInstances.${number}.billingInfo.type`\n    | `package.productInstances.${number}.billingInfo.cycleDuration.unit`\n    | `package.productInstances.${number}.billingInfo.cycleDuration.count`\n    | `package.productInstances.${number}.instanceId`\n    | `package.productInstances.${number}.catalogProductId`\n    | `package.productInstances.${number}.status`\n    | `package.productInstances.${number}.failure.code`\n    | `package.productInstances.${number}.failure.message`,\n    7\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    instanceId: instanceId,\n    idempotencyKey: options?.idempotencyKey,\n  });\n\n  const reqOpts =\n    ambassadorWixPremiumResellerV1Packages.unassignProductInstanceFromSite(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          instanceId: '$[0]',\n          idempotencyKey: '$[1].idempotencyKey',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['instanceId', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface UnassignProductInstanceFromSiteOptions {\n  /**\n   * Idempotency key.\n   * @maxLength 100\n   */\n  idempotencyKey?: string | null;\n}\n\n/**\n * Cancels a product instance.\n *\n *\n * You must pass the ID of the Wix account that the product instance belongs\n * to in the header of the call. The call fails, if the product instance and\n * Wix account don't match.\n *\n * The customer immediately loses access to features included in the\n * canceled service. It's up to the reseller to decide whether the adjustment\n * affects the customer’s payment.\n *\n * If a canceled service is a requirement for another service, that service\n * may not be available to the customer any longer. For example, if you cancel\n * a `Combo Plan` plan, a previously connected domain is disconnected\n * from the site.\n *\n *\n * > **Important**: This call requires an account level API key and cannot be\n * > authenticated with the standard authorization header.\n * @param instanceId - ID of the product instance to cancel.\n * @public\n * @requiredField instanceId\n * @permissionId premium.reseller-package.manage\n * @fqn com.wixpress.premium.reseller.packages.v1.Packages.CancelProductInstance\n */\nexport async function cancelProductInstance(\n  instanceId: string,\n  options?: CancelProductInstanceOptions\n): Promise<\n  NonNullablePaths<\n    CancelProductInstanceResponse,\n    | `package._id`\n    | `package.accountId`\n    | `package.productInstances`\n    | `package.productInstances.${number}.billingInfo.type`\n    | `package.productInstances.${number}.billingInfo.cycleDuration.unit`\n    | `package.productInstances.${number}.billingInfo.cycleDuration.count`\n    | `package.productInstances.${number}.instanceId`\n    | `package.productInstances.${number}.catalogProductId`\n    | `package.productInstances.${number}.status`\n    | `package.productInstances.${number}.failure.code`\n    | `package.productInstances.${number}.failure.message`,\n    7\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    instanceId: instanceId,\n    idempotencyKey: options?.idempotencyKey,\n  });\n\n  const reqOpts =\n    ambassadorWixPremiumResellerV1Packages.cancelProductInstance(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          instanceId: '$[0]',\n          idempotencyKey: '$[1].idempotencyKey',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['instanceId', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface CancelProductInstanceOptions {\n  /**\n   * Idempotency key.\n   * @maxLength 100\n   */\n  idempotencyKey?: string | null;\n}\n\n/**\n * Upgrades or downgrades a product instance. For example, you can upgrade a\n * customer's `Business Unlimited Premium` plan to `Business VIP` using this\n * endpoint.\n *\n *\n * You must pass the ID of the Wix account that the product instance belongs\n * to in the header of the call. The call fails, if the product instance and\n * Wix account don't match.\n *\n * The customer has immediate access to new features, while losing access to\n * features not included in the new service. It's up to the reseller to\n * decide whether the adjustment affects the customer’s payment.\n *\n * You can only exchange a product instance with a service of the same type.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for details about\n * which services belong to the same type.\n *\n * You must provide either a new `catalogProductId` or a new `billingInfo`\n * object. The new billing cycle must be supported for the product. Contact the\n * [Wix B2B sales team](mailto:bizdev@wix.com) for information\n * about which billing cycles are supported for each product. If you adjust the\n * billing cycle for a product instance with `RECURRING` payments, you must\n * also provide `billingInfo.cycleDuration.unit`.\n *\n * If a removed feature is a requirement for another service, that service\n * may not be available to the customer any longer. For example, if you downgrade a\n * `Business Unlimited` plan to `Business Basic`, the site owners won’t be\n * able to use `Pro eCommerce Features` any longer.\n *\n * > **Important**: This call requires an account level API key and cannot be\n * > authenticated with the standard authorization header.\n * @param instanceId - ID of the product instance to adjust.\n * @public\n * @requiredField instanceId\n * @permissionId premium.reseller-package.manage\n * @fqn com.wixpress.premium.reseller.packages.v1.Packages.AdjustProductInstanceSpecifications\n */\nexport async function adjustProductInstanceSpecifications(\n  instanceId: string,\n  options?: AdjustProductInstanceSpecificationsOptions\n): Promise<\n  NonNullablePaths<\n    AdjustProductInstanceSpecificationsResponse,\n    | `package._id`\n    | `package.accountId`\n    | `package.productInstances`\n    | `package.productInstances.${number}.billingInfo.type`\n    | `package.productInstances.${number}.billingInfo.cycleDuration.unit`\n    | `package.productInstances.${number}.billingInfo.cycleDuration.count`\n    | `package.productInstances.${number}.instanceId`\n    | `package.productInstances.${number}.catalogProductId`\n    | `package.productInstances.${number}.status`\n    | `package.productInstances.${number}.failure.code`\n    | `package.productInstances.${number}.failure.message`,\n    7\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    instanceId: instanceId,\n    idempotencyKey: options?.idempotencyKey,\n    catalogProductId: options?.catalogProductId,\n    billingInfo: options?.billingInfo,\n    discountCode: options?.discountCode,\n  });\n\n  const reqOpts =\n    ambassadorWixPremiumResellerV1Packages.adjustProductInstanceSpecifications(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          instanceId: '$[0]',\n          idempotencyKey: '$[1].idempotencyKey',\n          catalogProductId: '$[1].catalogProductId',\n          billingInfo: '$[1].billingInfo',\n          discountCode: '$[1].discountCode',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['instanceId', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface AdjustProductInstanceSpecificationsOptions {\n  /**\n   * Idempotency key.\n   * @maxLength 100\n   */\n  idempotencyKey?: string | null;\n  /**\n   * ID of the product to replace the original instance. Required in case you don't\n   * provide a new `billingInfo` object.\n   * @format GUID\n   */\n  catalogProductId?: string | null;\n  /**\n   * Information about the billing cycle. Required in case you don't provide a new\n   * `catalogProductId`. The new billing cycle must be supported for the service.\n   * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for\n   * information about a service's supported billing cycles. If\n   * you adjust the billing cycle for a product instance with `RECURRING`\n   * payments, you must also provide `billingInfo.cycleDuration.unit`.\n   */\n  billingInfo?: ProductInstanceCycle;\n  /**\n   * Discount code indicating that the reseller provisioned the product instance\n   * during a sale. In case you pass a code that isn't valid, the call succeeds and\n   * no discount is applied to the product instance. Wix doesn't guarantee that a\n   * discount code reduces the price between Wix and the reseller, even when it's\n   * valid. You can't add a discount code after you've created the\n   * product instance. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for\n   * more information about supported codes.\n   *\n   * Max: 25 characters\n   * @maxLength 25\n   */\n  discountCode?: string | null;\n}\n\n/**\n * Updates a package's external ID field.\n * @public\n * @requiredField identifiers\n * @requiredField identifiers.externalId\n * @requiredField identifiers.packageId\n * @permissionId PREMIUM.PACKAGE_UPDATE_EXTERNAL_ID\n * @fqn com.wixpress.premium.reseller.packages.v1.Packages.UpdatePackageExternalId\n */\nexport async function updatePackageExternalId(\n  identifiers: NonNullablePaths<\n    UpdatePackageExternalIdIdentifiers,\n    `externalId` | `packageId`,\n    2\n  >\n): Promise<\n  NonNullablePaths<\n    UpdatePackageExternalIdResponse,\n    | `updatedPackage._id`\n    | `updatedPackage.accountId`\n    | `updatedPackage.productInstances`\n    | `updatedPackage.productInstances.${number}.billingInfo.type`\n    | `updatedPackage.productInstances.${number}.billingInfo.cycleDuration.unit`\n    | `updatedPackage.productInstances.${number}.billingInfo.cycleDuration.count`\n    | `updatedPackage.productInstances.${number}.instanceId`\n    | `updatedPackage.productInstances.${number}.catalogProductId`\n    | `updatedPackage.productInstances.${number}.status`\n    | `updatedPackage.productInstances.${number}.failure.code`\n    | `updatedPackage.productInstances.${number}.failure.message`,\n    7\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    packageId: identifiers?.packageId,\n    externalId: identifiers?.externalId,\n  });\n\n  const reqOpts =\n    ambassadorWixPremiumResellerV1Packages.updatePackageExternalId(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          packageId: '$[0].packageId',\n          externalId: '$[0].externalId',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['identifiers']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface UpdatePackageExternalIdIdentifiers {\n  /**\n   * ID of the package to update.\n   * @format GUID\n   */\n  packageId: string;\n  /**\n   * External ID that will be assigned to the package.\n   * @maxLength 100\n   */\n  externalId: string;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressPremiumResellerPackagesV1PackagesUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'www.wixapis.com': [\n      {\n        srcPath: '/resellers/v1/packages',\n        destPath: '/v1/packages',\n      },\n      {\n        srcPath: '/resellers/v2/packages',\n        destPath: '/v2/packages',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_packages_packages';\n\n/**\n * Creates a new package.\n *\n * Deprecated: This method is deprecated and will be removed by 2024-12-31.\n * Use com.wixpress.premium.reseller.packages.v1.Packages.CreatePackageV2 instead.\n *\n * HTTP Request:\n * POST /v1/packages\n *\n * Permissions:\n * Requires the \"premium.reseller-package.manage\" permission with MANUAL type.\n *\n * Event:\n * A PRIVATE callback will be triggered when the package is successfully created.\n *\n * Required Fields:\n * - CreatePackageRequest.products\n *\n * Maturity: GA\n * Exposure: PUBLIC\n * @deprecated It has been replaced with com.wixpress.premium.reseller.packages.v1.Packages.CreatePackageV2(), and will be removed on 2024-12-31.\n */\nexport function createPackage(payload: object): RequestOptionsFactory<any> {\n  function __createPackage({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [\n          { path: 'products.createdDate' },\n          { path: 'products.updatedDate' },\n          { path: 'products.expirationDate' },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.premium.reseller.v1.packages',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.premium.reseller.packages.v1.Packages.CreatePackage',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressPremiumResellerPackagesV1PackagesUrl({\n        protoPath: '/v1/packages',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'package.createdDate' },\n              { path: 'package.updatedDate' },\n              { path: 'package.productInstances.createdDate' },\n              { path: 'package.productInstances.updatedDate' },\n              { path: 'package.productInstances.expirationDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __createPackage;\n}\n\n/**\n * Creates a package of product instances.\n *\n *\n * You must pass the relevant Wix account ID in the header of the call. In\n * the DIY flow, we recommend to pass the customer's sub-account ID instead\n * of your main reseller account ID.\n *\n * You may also pass a Wix site ID for each product in the body of the call.\n * If you omit the site ID, a floating product instance is created.\n *\n * When Wix customers purchase a specific paid service or product, Wix may offer\n * them time-limited free access to a different product. For example, customers\n * get a voucher for a free 1-year domain registration when purchasing any Wix\n * Premium plan. If you want to offer your customers the same benefit, create a\n * package containing the original product first. Then, create a second package\n * with the additional product. In the second Create Package call, pass the\n * instance ID of the original product as `referenceProductInstanceId`. This way,\n * Wix doesn't charge you for the additional product. Make sure that the status\n * of the referenced product is either `\"PENDING\"` or `\"ACTIVE\"`. Note that you\n * can use each product instance only a single time as reference instance.\n *\n * You need to pass a `countryCode` to specify where customers can claim\n * vouchers that may come with a product. Contact the\n * [Wix B2B sales team](mailto:bizdev@wix.com) to get information about\n * vouchers and supported locations.\n *\n * > **Important**: This call requires an account level API key and cannot be\n * > authenticated with the standard authorization header.\n */\nexport function createPackageV2(payload: object): RequestOptionsFactory<any> {\n  function __createPackageV2({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [\n          { path: 'products.createdDate' },\n          { path: 'products.updatedDate' },\n          { path: 'products.expirationDate' },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.premium.reseller.v1.packages',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.premium.reseller.packages.v1.Packages.CreatePackageV2',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressPremiumResellerPackagesV1PackagesUrl({\n        protoPath: '/v2/packages',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'package.createdDate' },\n              { path: 'package.updatedDate' },\n              { path: 'package.productInstances.createdDate' },\n              { path: 'package.productInstances.updatedDate' },\n              { path: 'package.productInstances.expirationDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __createPackageV2;\n}\n\n/**\n * Cancels all product instances included in the package and the customer\n * immediately loses access to the canceled functionality.\n *\n *\n * You must pass the ID of the Wix account that the package belongs to in the\n * header of the call. The call fails, if the package and Wix account don't\n * match.\n *\n * If a canceled product instance is a requirement for another Wix service, that\n * functionality is also no longer available to the customer. For example, if\n * you cancel a Premium plan, a previously connected domain is automatically\n * disconnected from the site.\n *\n * > **Important**: This call requires an account level API key and cannot be\n * > authenticated with the standard authorization header.\n */\nexport function cancelPackage(payload: object): RequestOptionsFactory<any> {\n  function __cancelPackage({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.premium.reseller.v1.packages',\n      method: 'DELETE' as any,\n      methodFqn:\n        'com.wixpress.premium.reseller.packages.v1.Packages.CancelPackage',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressPremiumResellerPackagesV1PackagesUrl({\n        protoPath: '/v1/packages/{id}',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'package.createdDate' },\n              { path: 'package.updatedDate' },\n              { path: 'package.productInstances.createdDate' },\n              { path: 'package.productInstances.updatedDate' },\n              { path: 'package.productInstances.expirationDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __cancelPackage;\n}\n\n/**\n * Retrieves a package.\n *\n *\n * You must pass the ID of the Wix account that the package belongs to in the\n * header of the call. The call fails, if the package and Wix account don't\n * match.\n *\n * > **Important**: This call requires an account level API key and cannot be\n * > authenticated with the standard authorization header.\n */\nexport function getPackage(payload: object): RequestOptionsFactory<any> {\n  function __getPackage({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.premium.reseller.v1.packages',\n      method: 'GET' as any,\n      methodFqn:\n        'com.wixpress.premium.reseller.packages.v1.Packages.GetPackage',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressPremiumResellerPackagesV1PackagesUrl({\n        protoPath: '/v1/packages/{id}',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'package.createdDate' },\n              { path: 'package.updatedDate' },\n              { path: 'package.productInstances.createdDate' },\n              { path: 'package.productInstances.updatedDate' },\n              { path: 'package.productInstances.expirationDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __getPackage;\n}\n\n/**\n * Retrieves a list of packages, given the provided paging, filtering, and sorting.\n *\n *\n * You must pass the ID of the Wix account that the packages belong to in the\n * header of the call. The call returns packages that belong to the parent\n * account, regardless if you pass the ID of a parent or sub-account. In case\n * you want to retrieve only packages that belong to a sub-account, you must\n * pass the sub-account ID as `filter` in the `query` object like this:\n *\n * ```json\n * {\n * \"query\": {\n * \"filter\": {\n * \"accountId\": {\n * \"$eq\": \"<SUB_ACCOUNT_ID>\"\n * }\n * }\n * }\n * }\n * ```\n *\n * Query Packages runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order\n * - `cursorPaging.limit` is `100`\n *\n * By default `pagingMetadata.cursors` are returned, unless you specifically pass\n * `query.paging`.\n *\n * The maximum for `cursorPaging.limit` is `100`.\n *\n * If you pass a cursor token that you have received in a previous Query Package response,\n * passing additional sort or filter information results in an invalid cursor\n * error. Since the received cursor token already holds all the needed information\n * for sort and filter. Changing the sort and filter properties during the span of\n * a cursor query isn't supported. But you can provide a different limit.\n *\n * To learn about working with _Query_ endpoints, see\n * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),\n * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),\n * and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).\n *\n * > **Important**: This call requires an account level API key and cannot be\n * > authenticated with the standard authorization header.\n */\nexport function queryPackages(payload: object): RequestOptionsFactory<any> {\n  function __queryPackages({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.premium.reseller.v1.packages',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.premium.reseller.packages.v1.Packages.QueryPackages',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressPremiumResellerPackagesV1PackagesUrl({\n        protoPath: '/v1/packages/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: 'packages.createdDate' },\n              { path: 'packages.updatedDate' },\n              { path: 'packages.productInstances.createdDate' },\n              { path: 'packages.productInstances.updatedDate' },\n              { path: 'packages.productInstances.expirationDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __queryPackages;\n}\n\n/**\n * Assigns a product instance to a site.\n *\n *  You must pass the ID of the Wix account that the product instance belongs to in the header of the call.\n *\n *  The customer immediately gains access to features included in the assigned service. It's up to the reseller to decide whether assigning a product instance affects the customer’s payment.\n *\n *  It's possible to assign a product instance that's already assigned to a site, to a different site without [unassigning](/packages/unassign-product-instance-from-site) it first. But if the call fails in such a situation, the product instance may either remain assigned to the original site or become unassigned. You can confirm the instance's status by [retrieving the relevant package](/packages/get-package).\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function assignProductInstanceToSite(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __assignProductInstanceToSite({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.premium.reseller.v1.packages',\n      method: 'PATCH' as any,\n      methodFqn:\n        'com.wixpress.premium.reseller.packages.v1.Packages.AssignProductInstanceToSite',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressPremiumResellerPackagesV1PackagesUrl({\n        protoPath: '/v1/packages/product-instances/{instanceId}/{siteId}',\n        data: payload,\n        host,\n      }),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'package.createdDate' },\n              { path: 'package.updatedDate' },\n              { path: 'package.productInstances.createdDate' },\n              { path: 'package.productInstances.updatedDate' },\n              { path: 'package.productInstances.expirationDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __assignProductInstanceToSite;\n}\n\n/**\n * Unassigns a product instance from a site.\n *\n *  You must pass the ID of the Wix account that the product instance belongs to in the header of the call.\n *\n *  The product instance becomes floating and the customer immediately looses access to features included in the unassigned service. It's up to the reseller to decide whether unassigning a product instance affects the customer’s payment.\n *\n *  If an unassigned product instance is a requirement for another service, that service may not be available to the customer any longer. For example, if you unassign a `Combo Plan` plan from a site, a previously connected domain is disconnected.\n *\n *  You can assign floating product instances to sites using the [Assign Product Instance to Site](/packages/assign-product-instance-to-site) method.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function unassignProductInstanceFromSite(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __unassignProductInstanceFromSite({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.premium.reseller.v1.packages',\n      method: 'PATCH' as any,\n      methodFqn:\n        'com.wixpress.premium.reseller.packages.v1.Packages.UnassignProductInstanceFromSite',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressPremiumResellerPackagesV1PackagesUrl({\n        protoPath: '/v1/packages/product-instances/{instanceId}/unassign',\n        data: payload,\n        host,\n      }),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'package.createdDate' },\n              { path: 'package.updatedDate' },\n              { path: 'package.productInstances.createdDate' },\n              { path: 'package.productInstances.updatedDate' },\n              { path: 'package.productInstances.expirationDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __unassignProductInstanceFromSite;\n}\n\n/**\n * Cancels a product instance.\n *\n *\n * You must pass the ID of the Wix account that the product instance belongs\n * to in the header of the call. The call fails, if the product instance and\n * Wix account don't match.\n *\n * The customer immediately loses access to features included in the\n * canceled service. It's up to the reseller to decide whether the adjustment\n * affects the customer’s payment.\n *\n * If a canceled service is a requirement for another service, that service\n * may not be available to the customer any longer. For example, if you cancel\n * a `Combo Plan` plan, a previously connected domain is disconnected\n * from the site.\n *\n *\n * > **Important**: This call requires an account level API key and cannot be\n * > authenticated with the standard authorization header.\n */\nexport function cancelProductInstance(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __cancelProductInstance({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.premium.reseller.v1.packages',\n      method: 'DELETE' as any,\n      methodFqn:\n        'com.wixpress.premium.reseller.packages.v1.Packages.CancelProductInstance',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressPremiumResellerPackagesV1PackagesUrl({\n        protoPath: '/v1/packages/product-instances/{instanceId}',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'package.createdDate' },\n              { path: 'package.updatedDate' },\n              { path: 'package.productInstances.createdDate' },\n              { path: 'package.productInstances.updatedDate' },\n              { path: 'package.productInstances.expirationDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __cancelProductInstance;\n}\n\n/**\n * Upgrades or downgrades a product instance. For example, you can upgrade a\n * customer's `Business Unlimited Premium` plan to `Business VIP` using this\n * endpoint.\n *\n *\n * You must pass the ID of the Wix account that the product instance belongs\n * to in the header of the call. The call fails, if the product instance and\n * Wix account don't match.\n *\n * The customer has immediate access to new features, while losing access to\n * features not included in the new service. It's up to the reseller to\n * decide whether the adjustment affects the customer’s payment.\n *\n * You can only exchange a product instance with a service of the same type.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for details about\n * which services belong to the same type.\n *\n * You must provide either a new `catalogProductId` or a new `billingInfo`\n * object. The new billing cycle must be supported for the product. Contact the\n * [Wix B2B sales team](mailto:bizdev@wix.com) for information\n * about which billing cycles are supported for each product. If you adjust the\n * billing cycle for a product instance with `RECURRING` payments, you must\n * also provide `billingInfo.cycleDuration.unit`.\n *\n * If a removed feature is a requirement for another service, that service\n * may not be available to the customer any longer. For example, if you downgrade a\n * `Business Unlimited` plan to `Business Basic`, the site owners won’t be\n * able to use `Pro eCommerce Features` any longer.\n *\n * > **Important**: This call requires an account level API key and cannot be\n * > authenticated with the standard authorization header.\n */\nexport function adjustProductInstanceSpecifications(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __adjustProductInstanceSpecifications({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.premium.reseller.v1.packages',\n      method: 'PATCH' as any,\n      methodFqn:\n        'com.wixpress.premium.reseller.packages.v1.Packages.AdjustProductInstanceSpecifications',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressPremiumResellerPackagesV1PackagesUrl({\n        protoPath: '/v1/packages/product-instances/{instanceId}',\n        data: payload,\n        host,\n      }),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'package.createdDate' },\n              { path: 'package.updatedDate' },\n              { path: 'package.productInstances.createdDate' },\n              { path: 'package.productInstances.updatedDate' },\n              { path: 'package.productInstances.expirationDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __adjustProductInstanceSpecifications;\n}\n\n/** Updates a package's external ID field. */\nexport function updatePackageExternalId(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __updatePackageExternalId({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.premium.reseller.v1.packages',\n      method: 'PATCH' as any,\n      methodFqn:\n        'com.wixpress.premium.reseller.packages.v1.Packages.UpdatePackageExternalId',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressPremiumResellerPackagesV1PackagesUrl({\n        protoPath: '/v1/packages/update/{packageId}/{externalId}',\n        data: payload,\n        host,\n      }),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'updatedPackage.createdDate' },\n              { path: 'updatedPackage.updatedDate' },\n              { path: 'updatedPackage.productInstances.createdDate' },\n              { path: 'updatedPackage.productInstances.updatedDate' },\n              { path: 'updatedPackage.productInstances.expirationDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __updatePackageExternalId;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,yBAAyB;AAClC,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,uDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAwBd,SAAS,cAAc,SAA6C;AACzE,WAAS,gBAAgB,EAAE,KAAK,GAAQ;AACtC,UAAM,iBAAiB,eAAe,SAAS;AAAA,MAC7C;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,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AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,WAAW;AAAA,UACX,YAAY;AAAA,QACd;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,aAAa;AAAA,IAChB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["payload","transformPaths","FailureReasonCode","IntervalIntervalUnit","CycleDescriptorType","Status","SortOrder","ProviderName","IntervalUnit","SubscriptionStatus","ReactivationReasonEnum","Initiator","RefundType","UnassignReason","ContractSwitchType","ContractSwitchReason","PriceIncreaseTrigger","ProductAdjustment","FieldToUpdate","WebhookIdentityType","createPackage","createPackageV2","cancelPackage","getPackage","queryPackages","assignProductInstanceToSite","unassignProductInstanceFromSite","cancelProductInstance","adjustProductInstanceSpecifications","updatePackageExternalId"]}