{"version":3,"sources":["../src/billing-v1-tax-group-tax-groups.public.ts","../src/billing-v1-tax-group-tax-groups.universal.ts","../src/billing-v1-tax-group-tax-groups.http.ts","../src/billing-v1-tax-group-tax-groups.context.ts"],"sourcesContent":["import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient } from '@wix/sdk-types';\nimport {\n  ListDefaultTaxGroupsByAppIdsResponse,\n  ListDefaultTaxGroupsByAppIdsResponseNonNullableFields,\n  ListDefaultTaxGroupsResponse,\n  ListDefaultTaxGroupsResponseNonNullableFields,\n  TaxGroup,\n  TaxGroupCreatedEnvelope,\n  TaxGroupDeletedEnvelope,\n  TaxGroupNonNullableFields,\n  TaxGroupUpdatedEnvelope,\n  TaxGroupsQueryBuilder,\n  UpdateTaxGroup,\n  createTaxGroup as universalCreateTaxGroup,\n  deleteTaxGroup as universalDeleteTaxGroup,\n  getTaxGroup as universalGetTaxGroup,\n  listDefaultTaxGroups as universalListDefaultTaxGroups,\n  listDefaultTaxGroupsByAppIds as universalListDefaultTaxGroupsByAppIds,\n  queryTaxGroups as universalQueryTaxGroups,\n  updateTaxGroup as universalUpdateTaxGroup,\n} from './billing-v1-tax-group-tax-groups.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/ecom' };\n\nexport function createTaxGroup(\n  httpClient: HttpClient\n): CreateTaxGroupSignature {\n  return (taxGroup: TaxGroup) =>\n    universalCreateTaxGroup(\n      taxGroup,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface CreateTaxGroupSignature {\n  /**\n   * Creates a tax group.\n   *\n   * Call Stores Update Product to add the `taxGroupId` to specific products to categorize as a group based on distinct tax treatment.\n   * Wix uses tax groups to calculate tax.\n   *\n   * In addition to tax groups you create, default tax groups are already included in all Wix catalogs.\n   * Call List Default Tax Groups to retrieve them. You can also use the Tax Groups Integration service plugin (REST only)\n   * to create new default tax groups that can be applied directly to an entire catalog of products.\n   * @param - Tax group to create.\n   * @returns Created tax group.\n   */\n  (taxGroup: TaxGroup): Promise<TaxGroup & TaxGroupNonNullableFields>;\n}\n\nexport function getTaxGroup(httpClient: HttpClient): GetTaxGroupSignature {\n  return (taxGroupId: string) =>\n    universalGetTaxGroup(\n      taxGroupId,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface GetTaxGroupSignature {\n  /**\n   * Retrieves a tax group.\n   * @param - ID of the tax group to retrieve.\n   * @returns Retrieved tax group.\n   */\n  (taxGroupId: string): Promise<TaxGroup & TaxGroupNonNullableFields>;\n}\n\nexport function updateTaxGroup(\n  httpClient: HttpClient\n): UpdateTaxGroupSignature {\n  return (_id: string | null, taxGroup: UpdateTaxGroup) =>\n    universalUpdateTaxGroup(\n      _id,\n      taxGroup,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface UpdateTaxGroupSignature {\n  /**\n   * Updates a tax group.\n   *\n   * Each time the tax group is updated, `revision` increments by 1.\n   * The current `revision` must be passed when updating the tax group.\n   * This ensures you're working with the latest tax group and prevents\n   * unintended overwrites.\n   * @param - Tax group ID.\n   * @param - Tax group info.\n   * @returns Updated tax group.\n   */\n  (_id: string | null, taxGroup: UpdateTaxGroup): Promise<\n    TaxGroup & TaxGroupNonNullableFields\n  >;\n}\n\nexport function deleteTaxGroup(\n  httpClient: HttpClient\n): DeleteTaxGroupSignature {\n  return (taxGroupId: string) =>\n    universalDeleteTaxGroup(\n      taxGroupId,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface DeleteTaxGroupSignature {\n  /**\n   * Deletes a tax group.\n   *\n   * If a tax group is deleted but the `taxGroupId` is still assigned to a product (see Stores Products API) then the default tax group is used to calculate tax.\n   * @param - ID of the tax group to delete.\n   */\n  (taxGroupId: string): Promise<void>;\n}\n\nexport function queryTaxGroups(\n  httpClient: HttpClient\n): QueryTaxGroupsSignature {\n  return () =>\n    universalQueryTaxGroups(\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface QueryTaxGroupsSignature {\n  /**\n   * Creates a query to retrieve a list of tax groups.\n   *\n   * The `queryTaxGroups()` function builds a query to retrieve a list of tax groups and returns a `TaxGroupsQueryBuilder` object.\n   *\n   * The returned object contains the query definition, which is typically used to run the query using the `find()` function.\n   *\n   * You can refine the query by chaining `TaxGroupsQueryBuilder` functions onto the query. `TaxGroupsQueryBuilder` functions enable you to sort, filter, and control the results that `queryTaxGroups()` returns.\n   *\n   * `queryTaxGroups()` runs with the following `TaxGroupsQueryBuilder` default that you can override:\n   * + `ascending(\"_id\")`\n   *\n   * The functions that are chained to `queryTaxGroups()` are applied in the order they are called. For example, if you apply `ascending(\"name\")` and then `ascending(\"_createdDate\")`, the results are sorted first by the `\"name\"`, and then, if there are multiple results with the same `\"name\"`, the items are sorted by `\"_createdDate\"`.\n   *\n   * The following `TaxGroupsQueryBuilder` functions are supported for the `queryTaxGroups()` function. For a full description of the tax group object, see the object returned for the `items` property in `TaxGroupsQueryResult`.\n   */\n  (): TaxGroupsQueryBuilder;\n}\n\nexport function listDefaultTaxGroups(\n  httpClient: HttpClient\n): ListDefaultTaxGroupsSignature {\n  return () =>\n    universalListDefaultTaxGroups(\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface ListDefaultTaxGroupsSignature {\n  /**\n   * Retrieves a list of default tax groups.\n   *\n   * The default tax groups for a site are inherited by the apps installed on the site.\n   * For example, the Wix Stores app includes a `\"Products\"` tax group by default.\n   *\n   * Add additional default tax groups with the Tax Groups Integration service plugin (REST only).\n   */\n  (): Promise<\n    ListDefaultTaxGroupsResponse & ListDefaultTaxGroupsResponseNonNullableFields\n  >;\n}\n\nexport function listDefaultTaxGroupsByAppIds(\n  httpClient: HttpClient\n): ListDefaultTaxGroupsByAppIdsSignature {\n  return (appIds: string[]) =>\n    universalListDefaultTaxGroupsByAppIds(\n      appIds,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface ListDefaultTaxGroupsByAppIdsSignature {\n  /**\n   * Retrieves default tax groups for specific apps.\n   * @param - App IDs to retrieve default tax groups for.\n   */\n  (appIds: string[]): Promise<\n    ListDefaultTaxGroupsByAppIdsResponse &\n      ListDefaultTaxGroupsByAppIdsResponseNonNullableFields\n  >;\n}\n\nexport const onTaxGroupCreated = EventDefinition(\n  'wix.billing.v1.tax_group_created',\n  true,\n  (event: TaxGroupCreatedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'entity.createdDate' },\n            { path: 'entity.updatedDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<TaxGroupCreatedEnvelope>();\nexport const onTaxGroupDeleted = EventDefinition(\n  'wix.billing.v1.tax_group_deleted',\n  true,\n  (event: TaxGroupDeletedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'undefined.createdDate' },\n            { path: 'undefined.updatedDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<TaxGroupDeletedEnvelope>();\nexport const onTaxGroupUpdated = EventDefinition(\n  'wix.billing.v1.tax_group_updated',\n  true,\n  (event: TaxGroupUpdatedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'entity.createdDate' },\n            { path: 'entity.updatedDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<TaxGroupUpdatedEnvelope>();\n\nexport {\n  ActionEvent,\n  ApplicationError,\n  BaseEventMetadata,\n  BulkActionMetadata,\n  CreateTaxGroupRequest,\n  CreateTaxGroupResponse,\n  CreateTaxGroupResponseNonNullableFields,\n  CursorPaging,\n  CursorPagingMetadata,\n  Cursors,\n  DeleteTaxGroupRequest,\n  DeleteTaxGroupResponse,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  EntityCreatedEvent,\n  EntityDeletedEvent,\n  EntityUpdatedEvent,\n  EventMetadata,\n  GetTaxGroupRequest,\n  GetTaxGroupResponse,\n  GetTaxGroupResponseNonNullableFields,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  ItemMetadata,\n  ListDefaultTaxGroupsByAppIdsRequest,\n  ListDefaultTaxGroupsByAppIdsResponse,\n  ListDefaultTaxGroupsByAppIdsResponseNonNullableFields,\n  ListDefaultTaxGroupsByAppIdsResult,\n  ListDefaultTaxGroupsRequest,\n  ListDefaultTaxGroupsResponse,\n  ListDefaultTaxGroupsResponseNonNullableFields,\n  MessageEnvelope,\n  Paging,\n  QueryTaxGroupsRequest,\n  QueryTaxGroupsResponse,\n  QueryTaxGroupsResponseNonNullableFields,\n  QueryV2,\n  QueryV2PagingMethodOneOf,\n  RestoreInfo,\n  SortOrder,\n  Sorting,\n  TaxGroup,\n  TaxGroupCreatedEnvelope,\n  TaxGroupDeletedEnvelope,\n  TaxGroupNonNullableFields,\n  TaxGroupUpdatedEnvelope,\n  TaxGroupsQueryBuilder,\n  TaxGroupsQueryResult,\n  UpdateTaxGroup,\n  UpdateTaxGroupRequest,\n  UpdateTaxGroupResponse,\n  UpdateTaxGroupResponseNonNullableFields,\n  WebhookIdentityType,\n} from './billing-v1-tax-group-tax-groups.universal.js';\n","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 { HttpClient, HttpResponse } from '@wix/sdk-types';\nimport * as ambassadorWixBillingV1TaxGroup from './billing-v1-tax-group-tax-groups.http.js';\n// @ts-ignore\n\n/**\n * A tax group is a category of specific line items grouped together based on their tax treatment.\n * You can create new tax groups to apply distinct tax rates and rules.\n */\nexport interface TaxGroup {\n  /**\n   * Tax group ID.\n   * @readonly\n   */\n  _id?: string | null;\n  /** Tax group name. */\n  name?: string;\n  /**\n   * Revision number, which increments by 1 each time the tax group is updated. To prevent conflicting changes,\n   * the current revision must be passed when updating the tax group.\n   *\n   * Ignored when creating a tax group.\n   */\n  revision?: string | null;\n  /**\n   * Date and time the tax group was created.\n   * @readonly\n   */\n  _createdDate?: Date | null;\n  /**\n   * Date and time the tax group was last updated.\n   * @readonly\n   */\n  _updatedDate?: Date | null;\n}\n\nexport interface CreateTaxGroupRequest {\n  /** Tax group to create. */\n  taxGroup: TaxGroup;\n}\n\nexport interface CreateTaxGroupResponse {\n  /** Created tax group. */\n  taxGroup?: TaxGroup;\n}\n\nexport interface GetTaxGroupRequest {\n  /** ID of the tax group to retrieve. */\n  taxGroupId: string;\n}\n\nexport interface GetTaxGroupResponse {\n  /** Retrieved tax group. */\n  taxGroup?: TaxGroup;\n}\n\nexport interface UpdateTaxGroupRequest {\n  /** Tax group info to update. */\n  taxGroup: TaxGroup;\n}\n\nexport interface UpdateTaxGroupResponse {\n  /** Updated tax group. */\n  taxGroup?: TaxGroup;\n}\n\nexport interface DeleteTaxGroupRequest {\n  /** ID of the tax group to delete. */\n  taxGroupId: string;\n}\n\nexport interface DeleteTaxGroupResponse {}\n\nexport interface QueryTaxGroupsRequest {\n  /** Query options. */\n  query: QueryV2;\n}\n\nexport interface QueryV2 extends QueryV2PagingMethodOneOf {\n  /** Paging options to limit and skip 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 the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n   */\n  filter?: Record<string, any> | null;\n  /**\n   * Sort object.\n   *\n   * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\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 skip 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  /** Name of the field to sort by. */\n  fieldName?: string;\n  /** Sort order. */\n  order?: SortOrder;\n}\n\nexport enum SortOrder {\n  ASC = 'ASC',\n  DESC = 'DESC',\n}\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  /** Maximum number of items to return in the results. */\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   */\n  cursor?: string | null;\n}\n\nexport interface QueryTaxGroupsResponse {\n  /** Retrieved default tax groups. */\n  taxGroups?: TaxGroup[];\n  /** Paging metadata. */\n  pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n  /** Number of items returned in current page. */\n  count?: number | null;\n  /** Cursor strings that point to the next page, previous page, or both. */\n  cursors?: Cursors;\n  /**\n   * Whether there are more pages to retrieve following the current page.\n   *\n   * + `true`: Another page of results can be retrieved.\n   * + `false`: This is the last page.\n   */\n  hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n  /** Cursor string pointing to the next page in the list of results. */\n  next?: string | null;\n  /** Cursor pointing to the previous page in the list of results. */\n  prev?: string | null;\n}\n\nexport interface ListDefaultTaxGroupsRequest {}\n\nexport interface ListDefaultTaxGroupsResponse {\n  /** Retrieved default tax groups. */\n  taxGroups?: TaxGroup[];\n}\n\nexport interface ListDefaultTaxGroupsByAppIdsRequest {\n  /** App IDs to retrieve default tax groups for. */\n  appIds: string[];\n}\n\nexport interface ListDefaultTaxGroupsByAppIdsResponse {\n  /** Retrieved default tax groups. */\n  results?: ListDefaultTaxGroupsByAppIdsResult[];\n  /** Bulk action metadata. */\n  bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface ListDefaultTaxGroupsByAppIdsResult {\n  /** Information about success or failure to retrieve default tax groups. */\n  taxGroupMetadata?: ItemMetadata;\n  /** Retrieved default tax groups. */\n  taxGroup?: TaxGroup;\n}\n\nexport interface ItemMetadata {\n  /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */\n  _id?: string | null;\n  /** Index of the item within the request array. Allows for correlation between request and response items. */\n  originalIndex?: number;\n  /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n  success?: boolean;\n  /** Details about the error in case of failure. */\n  error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n  /** Error code. */\n  code?: string;\n  /** Description of the error. */\n  description?: string;\n  /** Data related to the error. */\n  data?: Record<string, any> | null;\n}\n\nexport interface BulkActionMetadata {\n  /** Number of items that were successfully processed. */\n  totalSuccesses?: number;\n  /** Number of items that couldn't be processed. */\n  totalFailures?: number;\n  /** Number of failures without details because detailed failure threshold was exceeded. */\n  undetailedFailures?: number;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n  createdEvent?: EntityCreatedEvent;\n  updatedEvent?: EntityUpdatedEvent;\n  deletedEvent?: EntityDeletedEvent;\n  actionEvent?: ActionEvent;\n  /**\n   * Unique event ID.\n   * Allows clients to ignore duplicate webhooks.\n   */\n  _id?: string;\n  /**\n   * Assumes actions are also always typed to an entity_type\n   * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction\n   */\n  entityFqdn?: string;\n  /**\n   * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\n   * This is although the created/updated/deleted notion is duplication of the oneof types\n   * 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 defining the order of updates to the underlying entity.\n   * For example, given that some entity was updated at 16:00 and than again at 16:01,\n   * it is guaranteed that the sequence number of the second update is strictly higher than the first.\n   * As the consumer, you can use this value to ensure that you handle messages in the correct order.\n   * To do so, you will need to persist this number on your end, and compare the sequence number from the\n   * message against the one you have stored. Given that the stored number is higher, you should ignore the message.\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  /** App instance ID. */\n  instanceId?: string | null;\n  /** Event type. */\n  eventType?: string;\n  /** The identification type and identity data. */\n  identity?: IdentificationData;\n  /** Stringify payload. */\n  data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n  /** ID of a site visitor that has not logged in to the site. */\n  anonymousVisitorId?: string;\n  /** ID of a site visitor that has logged in to the site. */\n  memberId?: string;\n  /** ID of a Wix user (site owner, contributor, etc.). */\n  wixUserId?: string;\n  /** ID of an app. */\n  appId?: string;\n  /** @readonly */\n  identityType?: WebhookIdentityType;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n  /** ID of a site visitor that has not logged in to the site. */\n  anonymousVisitorId?: string;\n  /** ID of a site visitor that has logged in to the site. */\n  memberId?: string;\n  /** ID of a Wix user (site owner, contributor, etc.). */\n  wixUserId?: string;\n  /** ID of an app. */\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\nexport interface TaxGroupNonNullableFields {\n  name: string;\n}\n\nexport interface CreateTaxGroupResponseNonNullableFields {\n  taxGroup?: TaxGroupNonNullableFields;\n}\n\nexport interface GetTaxGroupResponseNonNullableFields {\n  taxGroup?: TaxGroupNonNullableFields;\n}\n\nexport interface UpdateTaxGroupResponseNonNullableFields {\n  taxGroup?: TaxGroupNonNullableFields;\n}\n\nexport interface QueryTaxGroupsResponseNonNullableFields {\n  taxGroups: TaxGroupNonNullableFields[];\n}\n\nexport interface ListDefaultTaxGroupsResponseNonNullableFields {\n  taxGroups: TaxGroupNonNullableFields[];\n}\n\ninterface ApplicationErrorNonNullableFields {\n  code: string;\n  description: string;\n}\n\ninterface ItemMetadataNonNullableFields {\n  originalIndex: number;\n  success: boolean;\n  error?: ApplicationErrorNonNullableFields;\n}\n\ninterface ListDefaultTaxGroupsByAppIdsResultNonNullableFields {\n  taxGroupMetadata?: ItemMetadataNonNullableFields;\n  taxGroup?: TaxGroupNonNullableFields;\n}\n\ninterface BulkActionMetadataNonNullableFields {\n  totalSuccesses: number;\n  totalFailures: number;\n  undetailedFailures: number;\n}\n\nexport interface ListDefaultTaxGroupsByAppIdsResponseNonNullableFields {\n  results: ListDefaultTaxGroupsByAppIdsResultNonNullableFields[];\n  bulkActionMetadata?: BulkActionMetadataNonNullableFields;\n}\n\nexport interface BaseEventMetadata {\n  /** App instance ID. */\n  instanceId?: string | null;\n  /** Event type. */\n  eventType?: string;\n  /** The identification type and identity data. */\n  identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n  /**\n   * Unique event ID.\n   * Allows clients to ignore duplicate webhooks.\n   */\n  _id?: string;\n  /**\n   * Assumes actions are also always typed to an entity_type\n   * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction\n   */\n  entityFqdn?: string;\n  /**\n   * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\n   * This is although the created/updated/deleted notion is duplication of the oneof types\n   * 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 defining the order of updates to the underlying entity.\n   * For example, given that some entity was updated at 16:00 and than again at 16:01,\n   * it is guaranteed that the sequence number of the second update is strictly higher than the first.\n   * As the consumer, you can use this value to ensure that you handle messages in the correct order.\n   * To do so, you will need to persist this number on your end, and compare the sequence number from the\n   * message against the one you have stored. Given that the stored number is higher, you should ignore the message.\n   */\n  entityEventSequence?: string | null;\n}\n\nexport interface TaxGroupCreatedEnvelope {\n  entity: TaxGroup;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when a tax group is created.\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @permissionId BILLING.TAX_GROUP_READ\n * @webhook\n * @eventType wix.billing.v1.tax_group_created\n * @documentationMaturity preview\n */\nexport declare function onTaxGroupCreated(\n  handler: (event: TaxGroupCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface TaxGroupDeletedEnvelope {\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when a tax group is deleted.\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @permissionId BILLING.TAX_GROUP_READ\n * @webhook\n * @eventType wix.billing.v1.tax_group_deleted\n * @documentationMaturity preview\n */\nexport declare function onTaxGroupDeleted(\n  handler: (event: TaxGroupDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface TaxGroupUpdatedEnvelope {\n  entity: TaxGroup;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when a tax group is updated.\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @permissionId BILLING.TAX_GROUP_READ\n * @webhook\n * @eventType wix.billing.v1.tax_group_updated\n * @documentationMaturity preview\n */\nexport declare function onTaxGroupUpdated(\n  handler: (event: TaxGroupUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a tax group.\n *\n * Call Stores Update Product to add the `taxGroupId` to specific products to categorize as a group based on distinct tax treatment.\n * Wix uses tax groups to calculate tax.\n *\n * In addition to tax groups you create, default tax groups are already included in all Wix catalogs.\n * Call List Default Tax Groups to retrieve them. You can also use the Tax Groups Integration service plugin (REST only)\n * to create new default tax groups that can be applied directly to an entire catalog of products.\n * @param taxGroup - Tax group to create.\n * @public\n * @documentationMaturity preview\n * @requiredField taxGroup\n * @requiredField taxGroup.name\n * @permissionId BILLING.TAX_GROUP_CREATE\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @applicableIdentity APP\n * @returns Created tax group.\n * @fqn wix.billing.v1.TaxGroups.CreateTaxGroup\n */\nexport async function createTaxGroup(\n  taxGroup: TaxGroup\n): Promise<TaxGroup & TaxGroupNonNullableFields> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ taxGroup: taxGroup });\n\n  const reqOpts = ambassadorWixBillingV1TaxGroup.createTaxGroup(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)?.taxGroup!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { taxGroup: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['taxGroup']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Retrieves a tax group.\n * @param taxGroupId - ID of the tax group to retrieve.\n * @public\n * @documentationMaturity preview\n * @requiredField taxGroupId\n * @permissionId BILLING.TAX_GROUP_READ\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @returns Retrieved tax group.\n * @fqn wix.billing.v1.TaxGroups.GetTaxGroup\n */\nexport async function getTaxGroup(\n  taxGroupId: string\n): Promise<TaxGroup & TaxGroupNonNullableFields> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    taxGroupId: taxGroupId,\n  });\n\n  const reqOpts = ambassadorWixBillingV1TaxGroup.getTaxGroup(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)?.taxGroup!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { taxGroupId: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['taxGroupId']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Updates a tax group.\n *\n * Each time the tax group is updated, `revision` increments by 1.\n * The current `revision` must be passed when updating the tax group.\n * This ensures you're working with the latest tax group and prevents\n * unintended overwrites.\n * @param _id - Tax group ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField taxGroup\n * @requiredField taxGroup.name\n * @requiredField taxGroup.revision\n * @param taxGroup - Tax group info.\n * @permissionId BILLING.TAX_GROUP_UPDATE\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @applicableIdentity APP\n * @returns Updated tax group.\n * @fqn wix.billing.v1.TaxGroups.UpdateTaxGroup\n */\nexport async function updateTaxGroup(\n  _id: string | null,\n  taxGroup: UpdateTaxGroup\n): Promise<TaxGroup & TaxGroupNonNullableFields> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    taxGroup: { ...taxGroup, id: _id },\n  });\n\n  const reqOpts = ambassadorWixBillingV1TaxGroup.updateTaxGroup(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)?.taxGroup!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: { taxGroup: '$[1]' },\n        explicitPathsToArguments: { 'taxGroup.id': '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id', 'taxGroup']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface UpdateTaxGroup {\n  /**\n   * Tax group ID.\n   * @readonly\n   */\n  _id?: string | null;\n  /** Tax group name. */\n  name?: string;\n  /**\n   * Revision number, which increments by 1 each time the tax group is updated. To prevent conflicting changes,\n   * the current revision must be passed when updating the tax group.\n   *\n   * Ignored when creating a tax group.\n   */\n  revision?: string | null;\n  /**\n   * Date and time the tax group was created.\n   * @readonly\n   */\n  _createdDate?: Date | null;\n  /**\n   * Date and time the tax group was last updated.\n   * @readonly\n   */\n  _updatedDate?: Date | null;\n}\n\n/**\n * Deletes a tax group.\n *\n * If a tax group is deleted but the `taxGroupId` is still assigned to a product (see Stores Products API) then the default tax group is used to calculate tax.\n * @param taxGroupId - ID of the tax group to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField taxGroupId\n * @permissionId BILLING.TAX_GROUP_DELETE\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @applicableIdentity APP\n * @fqn wix.billing.v1.TaxGroups.DeleteTaxGroup\n */\nexport async function deleteTaxGroup(taxGroupId: string): Promise<void> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    taxGroupId: taxGroupId,\n  });\n\n  const reqOpts = ambassadorWixBillingV1TaxGroup.deleteTaxGroup(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { taxGroupId: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['taxGroupId']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Creates a query to retrieve a list of tax groups.\n *\n * The `queryTaxGroups()` function builds a query to retrieve a list of tax groups and returns a `TaxGroupsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the `find()` function.\n *\n * You can refine the query by chaining `TaxGroupsQueryBuilder` functions onto the query. `TaxGroupsQueryBuilder` functions enable you to sort, filter, and control the results that `queryTaxGroups()` returns.\n *\n * `queryTaxGroups()` runs with the following `TaxGroupsQueryBuilder` default that you can override:\n * + `ascending(\"_id\")`\n *\n * The functions that are chained to `queryTaxGroups()` are applied in the order they are called. For example, if you apply `ascending(\"name\")` and then `ascending(\"_createdDate\")`, the results are sorted first by the `\"name\"`, and then, if there are multiple results with the same `\"name\"`, the items are sorted by `\"_createdDate\"`.\n *\n * The following `TaxGroupsQueryBuilder` functions are supported for the `queryTaxGroups()` function. For a full description of the tax group object, see the object returned for the `items` property in `TaxGroupsQueryResult`.\n * @public\n * @documentationMaturity preview\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @permissionId BILLING.TAX_GROUP_READ\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn wix.billing.v1.TaxGroups.QueryTaxGroups\n */\nexport function queryTaxGroups(): TaxGroupsQueryBuilder {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[0] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  return queryBuilder<\n    TaxGroup,\n    'CURSOR',\n    QueryTaxGroupsRequest,\n    QueryTaxGroupsResponse\n  >({\n    func: async (payload: QueryTaxGroupsRequest) => {\n      const reqOpts = ambassadorWixBillingV1TaxGroup.queryTaxGroups(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: QueryTaxGroupsRequest['query']) => {\n      const args = [query, {}] as [QueryTaxGroupsRequest['query'], {}];\n      return renameKeysFromSDKRequestToRESTRequest({\n        ...args?.[1],\n        query: args?.[0],\n      });\n    },\n    responseTransformer: ({ data }: HttpResponse<QueryTaxGroupsResponse>) => {\n      const transformedData = renameKeysFromRESTResponseToSDKResponse(data);\n\n      return {\n        items: transformedData?.taxGroups,\n        pagingMetadata: transformedData?.pagingMetadata,\n      };\n    },\n    errorTransformer: (err: unknown) => {\n      const transformedError = sdkTransformError(err, {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { query: '$[0]' },\n        singleArgumentUnchanged: false,\n      });\n\n      throw transformedError;\n    },\n    pagingMethod: 'CURSOR',\n    transformationPaths: {},\n  });\n}\n\ninterface QueryCursorResult {\n  cursors: Cursors;\n  hasNext: () => boolean;\n  hasPrev: () => boolean;\n  length: number;\n  pageSize: number;\n}\n\nexport interface TaxGroupsQueryResult extends QueryCursorResult {\n  items: TaxGroup[];\n  query: TaxGroupsQueryBuilder;\n  next: () => Promise<TaxGroupsQueryResult>;\n  prev: () => Promise<TaxGroupsQueryResult>;\n}\n\nexport interface TaxGroupsQueryBuilder {\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   * @documentationMaturity preview\n   */\n  eq: (\n    propertyName: '_id' | 'name' | '_createdDate' | '_updatedDate',\n    value: any\n  ) => TaxGroupsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   * @documentationMaturity preview\n   */\n  ne: (\n    propertyName: '_id' | 'name' | '_createdDate' | '_updatedDate',\n    value: any\n  ) => TaxGroupsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   * @documentationMaturity preview\n   */\n  ge: (\n    propertyName: '_createdDate' | '_updatedDate',\n    value: any\n  ) => TaxGroupsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   * @documentationMaturity preview\n   */\n  gt: (\n    propertyName: '_createdDate' | '_updatedDate',\n    value: any\n  ) => TaxGroupsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   * @documentationMaturity preview\n   */\n  le: (\n    propertyName: '_createdDate' | '_updatedDate',\n    value: any\n  ) => TaxGroupsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   * @documentationMaturity preview\n   */\n  lt: (\n    propertyName: '_createdDate' | '_updatedDate',\n    value: any\n  ) => TaxGroupsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `values`.\n   * @param values - List of values to compare against.\n   * @documentationMaturity preview\n   */\n  hasSome: (\n    propertyName: '_createdDate' | '_updatedDate',\n    value: any[]\n  ) => TaxGroupsQueryBuilder;\n  /** @documentationMaturity preview */\n  in: (\n    propertyName: '_id' | 'name' | '_createdDate' | '_updatedDate',\n    value: any\n  ) => TaxGroupsQueryBuilder;\n  /** @documentationMaturity preview */\n  exists: (\n    propertyName: '_createdDate' | '_updatedDate',\n    value: boolean\n  ) => TaxGroupsQueryBuilder;\n  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n   * @documentationMaturity preview\n   */\n  ascending: (\n    ...propertyNames: Array<'_id' | 'name' | '_createdDate' | '_updatedDate'>\n  ) => TaxGroupsQueryBuilder;\n  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n   * @documentationMaturity preview\n   */\n  descending: (\n    ...propertyNames: Array<'_id' | 'name' | '_createdDate' | '_updatedDate'>\n  ) => TaxGroupsQueryBuilder;\n  /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n   * @documentationMaturity preview\n   */\n  limit: (limit: number) => TaxGroupsQueryBuilder;\n  /** @param cursor - A pointer to specific record\n   * @documentationMaturity preview\n   */\n  skipTo: (cursor: string) => TaxGroupsQueryBuilder;\n  /** @documentationMaturity preview */\n  find: () => Promise<TaxGroupsQueryResult>;\n}\n\n/**\n * Retrieves a list of default tax groups.\n *\n * The default tax groups for a site are inherited by the apps installed on the site.\n * For example, the Wix Stores app includes a `\"Products\"` tax group by default.\n *\n * Add additional default tax groups with the Tax Groups Integration service plugin (REST only).\n * @public\n * @documentationMaturity preview\n * @permissionId BILLING.TAX_GROUP_READ\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn wix.billing.v1.TaxGroups.ListDefaultTaxGroups\n */\nexport async function listDefaultTaxGroups(): Promise<\n  ListDefaultTaxGroupsResponse & ListDefaultTaxGroupsResponseNonNullableFields\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[0] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n  const reqOpts = ambassadorWixBillingV1TaxGroup.listDefaultTaxGroups(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        singleArgumentUnchanged: false,\n      },\n      []\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Retrieves default tax groups for specific apps.\n * @param appIds - App IDs to retrieve default tax groups for.\n * @public\n * @documentationMaturity preview\n * @requiredField appIds\n * @permissionId BILLING.TAX_GROUP_READ\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn wix.billing.v1.TaxGroups.ListDefaultTaxGroupsByAppIds\n */\nexport async function listDefaultTaxGroupsByAppIds(\n  appIds: string[]\n): Promise<\n  ListDefaultTaxGroupsByAppIdsResponse &\n    ListDefaultTaxGroupsByAppIdsResponseNonNullableFields\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ appIds: appIds });\n\n  const reqOpts =\n    ambassadorWixBillingV1TaxGroup.listDefaultTaxGroupsByAppIds(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: { appIds: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['appIds']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\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 { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBillingV1TaxGroupsUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'www.wixapis.com': [\n      {\n        srcPath: '/billing/v1/tax-groups',\n        destPath: '/v1/tax-groups',\n      },\n    ],\n    'manage._base_domain_': [\n      {\n        srcPath: '/billing/v1/tax-groups',\n        destPath: '/v1/tax-groups',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_tax-groups';\n\n/**\n * Creates a tax group.\n *\n * Call Stores Update Product to add the `taxGroupId` to specific products to categorize as a group based on distinct tax treatment.\n * Wix uses tax groups to calculate tax.\n *\n * In addition to tax groups you create, default tax groups are already included in all Wix catalogs.\n * Call List Default Tax Groups to retrieve them. You can also use the Tax Groups Integration service plugin (REST only)\n * to create new default tax groups that can be applied directly to an entire catalog of products.\n */\nexport function createTaxGroup(payload: object): RequestOptionsFactory<any> {\n  function __createTaxGroup({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [\n          { path: 'taxGroup.createdDate' },\n          { path: 'taxGroup.updatedDate' },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.billing.v1.tax_group',\n      method: 'POST' as any,\n      methodFqn: 'wix.billing.v1.TaxGroups.CreateTaxGroup',\n      packageName: PACKAGE_NAME,\n      url: resolveWixBillingV1TaxGroupsUrl({\n        protoPath: '/v1/tax-groups',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'taxGroup.createdDate' },\n              { path: 'taxGroup.updatedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __createTaxGroup;\n}\n\n/** Retrieves a tax group. */\nexport function getTaxGroup(payload: object): RequestOptionsFactory<any> {\n  function __getTaxGroup({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.billing.v1.tax_group',\n      method: 'GET' as any,\n      methodFqn: 'wix.billing.v1.TaxGroups.GetTaxGroup',\n      packageName: PACKAGE_NAME,\n      url: resolveWixBillingV1TaxGroupsUrl({\n        protoPath: '/v1/tax-groups/{taxGroupId}',\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: 'taxGroup.createdDate' },\n              { path: 'taxGroup.updatedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __getTaxGroup;\n}\n\n/**\n * Updates a tax group.\n *\n * Each time the tax group is updated, `revision` increments by 1.\n * The current `revision` must be passed when updating the tax group.\n * This ensures you're working with the latest tax group and prevents\n * unintended overwrites.\n */\nexport function updateTaxGroup(payload: object): RequestOptionsFactory<any> {\n  function __updateTaxGroup({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFieldMaskToRESTFieldMask,\n        paths: [{ path: 'fieldMask' }],\n      },\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [\n          { path: 'taxGroup.createdDate' },\n          { path: 'taxGroup.updatedDate' },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.billing.v1.tax_group',\n      method: 'PATCH' as any,\n      methodFqn: 'wix.billing.v1.TaxGroups.UpdateTaxGroup',\n      packageName: PACKAGE_NAME,\n      url: resolveWixBillingV1TaxGroupsUrl({\n        protoPath: '/v1/tax-groups/{taxGroup.id}',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'taxGroup.createdDate' },\n              { path: 'taxGroup.updatedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __updateTaxGroup;\n}\n\n/**\n * Deletes a tax group.\n *\n * If a tax group is deleted but the `taxGroupId` is still assigned to a product (see Stores Products API) then the default tax group is used to calculate tax.\n */\nexport function deleteTaxGroup(payload: object): RequestOptionsFactory<any> {\n  function __deleteTaxGroup({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.billing.v1.tax_group',\n      method: 'DELETE' as any,\n      methodFqn: 'wix.billing.v1.TaxGroups.DeleteTaxGroup',\n      packageName: PACKAGE_NAME,\n      url: resolveWixBillingV1TaxGroupsUrl({\n        protoPath: '/v1/tax-groups/{taxGroupId}',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload),\n    };\n\n    return metadata;\n  }\n\n  return __deleteTaxGroup;\n}\n\n/**\n * Creates a query to retrieve a list of tax groups.\n *\n * The `queryTaxGroups()` function builds a query to retrieve a list of tax groups and returns a `TaxGroupsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the `find()` function.\n *\n * You can refine the query by chaining `TaxGroupsQueryBuilder` functions onto the query. `TaxGroupsQueryBuilder` functions enable you to sort, filter, and control the results that `queryTaxGroups()` returns.\n *\n * `queryTaxGroups()` runs with the following `TaxGroupsQueryBuilder` default that you can override:\n * + `ascending(\"_id\")`\n *\n * The functions that are chained to `queryTaxGroups()` are applied in the order they are called. For example, if you apply `ascending(\"name\")` and then `ascending(\"_createdDate\")`, the results are sorted first by the `\"name\"`, and then, if there are multiple results with the same `\"name\"`, the items are sorted by `\"_createdDate\"`.\n *\n * The following `TaxGroupsQueryBuilder` functions are supported for the `queryTaxGroups()` function. For a full description of the tax group object, see the object returned for the `items` property in `TaxGroupsQueryResult`.\n */\nexport function queryTaxGroups(payload: object): RequestOptionsFactory<any> {\n  function __queryTaxGroups({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.billing.v1.tax_group',\n      method: 'POST' as any,\n      methodFqn: 'wix.billing.v1.TaxGroups.QueryTaxGroups',\n      packageName: PACKAGE_NAME,\n      url: resolveWixBillingV1TaxGroupsUrl({\n        protoPath: '/v1/tax-groups/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: 'taxGroups.createdDate' },\n              { path: 'taxGroups.updatedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __queryTaxGroups;\n}\n\n/**\n * Retrieves a list of default tax groups.\n *\n * The default tax groups for a site are inherited by the apps installed on the site.\n * For example, the Wix Stores app includes a `\"Products\"` tax group by default.\n *\n * Add additional default tax groups with the Tax Groups Integration service plugin (REST only).\n */\nexport function listDefaultTaxGroups(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __listDefaultTaxGroups({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.billing.v1.tax_group',\n      method: 'GET' as any,\n      methodFqn: 'wix.billing.v1.TaxGroups.ListDefaultTaxGroups',\n      packageName: PACKAGE_NAME,\n      url: resolveWixBillingV1TaxGroupsUrl({\n        protoPath: '/v1/tax-groups/default-tax-groups',\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: 'taxGroups.createdDate' },\n              { path: 'taxGroups.updatedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __listDefaultTaxGroups;\n}\n\n/** Retrieves default tax groups for specific apps. */\nexport function listDefaultTaxGroupsByAppIds(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __listDefaultTaxGroupsByAppIds({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.billing.v1.tax_group',\n      method: 'POST' as any,\n      methodFqn: 'wix.billing.v1.TaxGroups.ListDefaultTaxGroupsByAppIds',\n      packageName: PACKAGE_NAME,\n      url: resolveWixBillingV1TaxGroupsUrl({\n        protoPath: '/v1/tax-groups/list-default-tax-groups-by-app-ids',\n        data: payload,\n        host,\n      }),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'results.taxGroup.createdDate' },\n              { path: 'results.taxGroup.updatedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __listDefaultTaxGroupsByAppIds;\n}\n","import {\n  createTaxGroup as publicCreateTaxGroup,\n  getTaxGroup as publicGetTaxGroup,\n  updateTaxGroup as publicUpdateTaxGroup,\n  deleteTaxGroup as publicDeleteTaxGroup,\n  queryTaxGroups as publicQueryTaxGroups,\n  listDefaultTaxGroups as publicListDefaultTaxGroups,\n  listDefaultTaxGroupsByAppIds as publicListDefaultTaxGroupsByAppIds,\n} from './billing-v1-tax-group-tax-groups.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\nimport { onTaxGroupCreated as publicOnTaxGroupCreated } from './billing-v1-tax-group-tax-groups.public.js';\nimport { onTaxGroupDeleted as publicOnTaxGroupDeleted } from './billing-v1-tax-group-tax-groups.public.js';\nimport { onTaxGroupUpdated as publicOnTaxGroupUpdated } from './billing-v1-tax-group-tax-groups.public.js';\n\nexport const createTaxGroup: MaybeContext<\n  BuildRESTFunction<typeof publicCreateTaxGroup> & typeof publicCreateTaxGroup\n> = /*#__PURE__*/ createRESTModule(publicCreateTaxGroup);\nexport const getTaxGroup: MaybeContext<\n  BuildRESTFunction<typeof publicGetTaxGroup> & typeof publicGetTaxGroup\n> = /*#__PURE__*/ createRESTModule(publicGetTaxGroup);\nexport const updateTaxGroup: MaybeContext<\n  BuildRESTFunction<typeof publicUpdateTaxGroup> & typeof publicUpdateTaxGroup\n> = /*#__PURE__*/ createRESTModule(publicUpdateTaxGroup);\nexport const deleteTaxGroup: MaybeContext<\n  BuildRESTFunction<typeof publicDeleteTaxGroup> & typeof publicDeleteTaxGroup\n> = /*#__PURE__*/ createRESTModule(publicDeleteTaxGroup);\nexport const queryTaxGroups: MaybeContext<\n  BuildRESTFunction<typeof publicQueryTaxGroups> & typeof publicQueryTaxGroups\n> = /*#__PURE__*/ createRESTModule(publicQueryTaxGroups);\nexport const listDefaultTaxGroups: MaybeContext<\n  BuildRESTFunction<typeof publicListDefaultTaxGroups> &\n    typeof publicListDefaultTaxGroups\n> = /*#__PURE__*/ createRESTModule(publicListDefaultTaxGroups);\nexport const listDefaultTaxGroupsByAppIds: MaybeContext<\n  BuildRESTFunction<typeof publicListDefaultTaxGroupsByAppIds> &\n    typeof publicListDefaultTaxGroupsByAppIds\n> = /*#__PURE__*/ createRESTModule(publicListDefaultTaxGroupsByAppIds);\n/**\n * Triggered when a tax group is created.\n */\nexport const onTaxGroupCreated: ReturnType<\n  typeof createEventModule<typeof publicOnTaxGroupCreated>\n> = createEventModule(publicOnTaxGroupCreated);\n/**\n * Triggered when a tax group is deleted.\n */\nexport const onTaxGroupDeleted: ReturnType<\n  typeof createEventModule<typeof publicOnTaxGroupDeleted>\n> = createEventModule(publicOnTaxGroupDeleted);\n/**\n * Triggered when a tax group is updated.\n */\nexport const onTaxGroupUpdated: ReturnType<\n  typeof createEventModule<typeof publicOnTaxGroupUpdated>\n> = createEventModule(publicOnTaxGroupUpdated);\n\nexport {\n  SortOrder,\n  WebhookIdentityType,\n} from './billing-v1-tax-group-tax-groups.universal.js';\nexport {\n  TaxGroup,\n  CreateTaxGroupRequest,\n  CreateTaxGroupResponse,\n  GetTaxGroupRequest,\n  GetTaxGroupResponse,\n  UpdateTaxGroupRequest,\n  UpdateTaxGroupResponse,\n  DeleteTaxGroupRequest,\n  DeleteTaxGroupResponse,\n  QueryTaxGroupsRequest,\n  QueryV2,\n  QueryV2PagingMethodOneOf,\n  Sorting,\n  Paging,\n  CursorPaging,\n  QueryTaxGroupsResponse,\n  CursorPagingMetadata,\n  Cursors,\n  ListDefaultTaxGroupsRequest,\n  ListDefaultTaxGroupsResponse,\n  ListDefaultTaxGroupsByAppIdsRequest,\n  ListDefaultTaxGroupsByAppIdsResponse,\n  ListDefaultTaxGroupsByAppIdsResult,\n  ItemMetadata,\n  ApplicationError,\n  BulkActionMetadata,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  EntityCreatedEvent,\n  RestoreInfo,\n  EntityUpdatedEvent,\n  EntityDeletedEvent,\n  ActionEvent,\n  MessageEnvelope,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  TaxGroupNonNullableFields,\n  CreateTaxGroupResponseNonNullableFields,\n  GetTaxGroupResponseNonNullableFields,\n  UpdateTaxGroupResponseNonNullableFields,\n  QueryTaxGroupsResponseNonNullableFields,\n  ListDefaultTaxGroupsResponseNonNullableFields,\n  ListDefaultTaxGroupsByAppIdsResponseNonNullableFields,\n  BaseEventMetadata,\n  EventMetadata,\n  TaxGroupCreatedEnvelope,\n  TaxGroupDeletedEnvelope,\n  TaxGroupUpdatedEnvelope,\n  UpdateTaxGroup,\n  TaxGroupsQueryResult,\n  TaxGroupsQueryBuilder,\n} from './billing-v1-tax-group-tax-groups.universal.js';\n"],"mappings":";AAAA,SAAS,2CAAAA,gDAA+C;AACxD,SAAS,wCAAAC,6CAA4C;AACrD,SAAS,kBAAAC,uBAAsB;AAC/B,SAAS,uBAAmC;;;ACH5C,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;A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AAE,MAAM,qBAAqB;AAAA,QAC/B;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAA2B;AACpB,IAAM,oBAAoB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA,CAAC,UACCF;AAAA,IACEC,gBAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAaC;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,wBAAwB;AAAA,UAChC,EAAE,MAAM,wBAAwB;AAAA,UAChC,EAAE,MAAM,qBAAqB;AAAA,QAC/B;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAA2B;AACpB,IAAM,oBAAoB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA,CAAC,UACCF;AAAA,IACEC,gBAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAaC;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,QAC/B;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAA2B;;;AG/O3B,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAM3B,IAAMC,kBAEK,iCAAiBA,eAAoB;AAChD,IAAMC,eAEK,iCAAiBA,YAAiB;AAC7C,IAAMC,kBAEK,iCAAiBA,eAAoB;AAChD,IAAMC,kBAEK,iCAAiBA,eAAoB;AAChD,IAAMC,kBAEK,iCAAiBA,eAAoB;AAChD,IAAMC,wBAGK,iCAAiBA,qBAA0B;AACtD,IAAMC,gCAGK,iCAAiBA,6BAAkC;AAI9D,IAAMC,qBAET,kBAAkB,iBAAuB;AAItC,IAAMC,qBAET,kBAAkB,iBAAuB;AAItC,IAAMC,qBAET,kBAAkB,iBAAuB;","names":["renameKeysFromRESTResponseToSDKResponse","transformRESTTimestampToSDKTimestamp","transformPaths","payload","SortOrder","WebhookIdentityType","createTaxGroup","getTaxGroup","updateTaxGroup","deleteTaxGroup","queryTaxGroups","listDefaultTaxGroups","listDefaultTaxGroupsByAppIds","createTaxGroup","getTaxGroup","updateTaxGroup","deleteTaxGroup","queryTaxGroups","listDefaultTaxGroups","listDefaultTaxGroupsByAppIds","renameKeysFromRESTResponseToSDKResponse","transformPaths","transformRESTTimestampToSDKTimestamp","createTaxGroup","getTaxGroup","updateTaxGroup","deleteTaxGroup","queryTaxGroups","listDefaultTaxGroups","listDefaultTaxGroupsByAppIds","onTaxGroupCreated","onTaxGroupDeleted","onTaxGroupUpdated"]}