@wix/auto_sdk_ecom_tax-regions 1.0.37 → 1.0.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
- import { TaxRegion, CreateTaxRegionApplicationErrors, UpdateTaxRegion, UpdateTaxRegionApplicationErrors, TaxRegionCreatedEnvelope, TaxRegionDeletedEnvelope, TaxRegionUpdatedEnvelope, TaxRegionsQueryBuilder, CursorQuery, typedQueryTaxRegions } from './index.typings.js';
3
- export { ActionEvent, ApplicationError, BaseEventMetadata, BulkActionMetadata, BulkCreateTaxRegionRequest, BulkCreateTaxRegionResponse, BulkCreateTaxRegionResult, BulkRestoreTaxRegionsRequest, BulkRestoreTaxRegionsResponse, BulkRestoreTaxRegionsResult, ConflictErrorDetails, CreateOrGetTaxRegionWithoutValidationRequest, CreateOrGetTaxRegionWithoutValidationResponse, CreateTaxRegionRequest, CreateTaxRegionResponse, CursorPaging, CursorPagingMetadata, CursorQueryPagingMethodOneOf, Cursors, DeleteTaxRegionRequest, DeleteTaxRegionResponse, DeleteTaxRegionWithoutDomainEventsRequest, DeleteTaxRegionWithoutDomainEventsResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, GetTaxRegionRequest, GetTaxRegionResponse, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, MessageEnvelope, QueryTaxRegionsRequest, QueryTaxRegionsResponse, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, TaxRegionsQueryResult, UpdateTaxRegionRequest, UpdateTaxRegionResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
2
+ import { TaxRegion, CreateTaxRegionApplicationErrors, UpdateTaxRegion, UpdateTaxRegionApplicationErrors, TaxRegionCreatedEnvelope, TaxRegionDeletedEnvelope, TaxRegionUpdatedEnvelope, TaxRegionsQueryBuilder, TaxRegionQuery, typedQueryTaxRegions } from './index.typings.js';
3
+ export { ActionEvent, ApplicationError, BaseEventMetadata, BulkActionMetadata, BulkCreateTaxRegionRequest, BulkCreateTaxRegionResponse, BulkCreateTaxRegionResult, BulkRestoreTaxRegionsRequest, BulkRestoreTaxRegionsResponse, BulkRestoreTaxRegionsResult, CommonQueryWithEntityContext, ConflictErrorDetails, CreateOrGetTaxRegionWithoutValidationRequest, CreateOrGetTaxRegionWithoutValidationResponse, CreateTaxRegionRequest, CreateTaxRegionResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteTaxRegionRequest, DeleteTaxRegionResponse, DeleteTaxRegionWithoutDomainEventsRequest, DeleteTaxRegionWithoutDomainEventsResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, GetTaxRegionRequest, GetTaxRegionResponse, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, MessageEnvelope, QueryTaxRegionsRequest, QueryTaxRegionsResponse, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, TaxRegionQuerySpec, TaxRegionsQueryResult, UpdateTaxRegionRequest, UpdateTaxRegionResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
4
4
 
5
5
  declare function createTaxRegion$1(httpClient: HttpClient): CreateTaxRegionSignature;
6
6
  interface CreateTaxRegionSignature {
@@ -60,7 +60,7 @@ declare const onTaxRegionUpdated$1: EventDefinition<TaxRegionUpdatedEnvelope, "w
60
60
 
61
61
  declare function customQueryTaxRegions(httpClient: HttpClient): {
62
62
  (): TaxRegionsQueryBuilder;
63
- (query: CursorQuery): ReturnType<typeof typedQueryTaxRegions>;
63
+ (query: TaxRegionQuery): ReturnType<typeof typedQueryTaxRegions>;
64
64
  };
65
65
  declare const createTaxRegion: MaybeContext<BuildRESTFunction<typeof createTaxRegion$1> & typeof createTaxRegion$1>;
66
66
  declare const getTaxRegion: MaybeContext<BuildRESTFunction<typeof getTaxRegion$1> & typeof getTaxRegion$1>;
@@ -78,4 +78,4 @@ declare const onTaxRegionDeleted: BuildEventDefinition<typeof onTaxRegionDeleted
78
78
  */
79
79
  declare const onTaxRegionUpdated: BuildEventDefinition<typeof onTaxRegionUpdated$1> & typeof onTaxRegionUpdated$1;
80
80
 
81
- export { CreateTaxRegionApplicationErrors, CursorQuery, TaxRegion, TaxRegionCreatedEnvelope, TaxRegionDeletedEnvelope, TaxRegionUpdatedEnvelope, TaxRegionsQueryBuilder, UpdateTaxRegion, UpdateTaxRegionApplicationErrors, createTaxRegion, deleteTaxRegion, getTaxRegion, onTaxRegionCreated, onTaxRegionDeleted, onTaxRegionUpdated, queryTaxRegions, updateTaxRegion };
81
+ export { CreateTaxRegionApplicationErrors, TaxRegion, TaxRegionCreatedEnvelope, TaxRegionDeletedEnvelope, TaxRegionQuery, TaxRegionUpdatedEnvelope, TaxRegionsQueryBuilder, UpdateTaxRegion, UpdateTaxRegionApplicationErrors, createTaxRegion, deleteTaxRegion, getTaxRegion, onTaxRegionCreated, onTaxRegionDeleted, onTaxRegionUpdated, queryTaxRegions, updateTaxRegion };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/billing-v1-tax-region-tax-regions.public.ts","../../src/billing-v1-tax-region-tax-regions.universal.ts","../../src/billing-v1-tax-region-tax-regions.http.ts","../../src/billing-v1-tax-region-tax-regions.context.ts"],"sourcesContent":["export * from './src/billing-v1-tax-region-tax-regions.context.js';\n","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, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CreateTaxRegionApplicationErrors,\n CursorQuery,\n QueryTaxRegionsResponse,\n TaxRegion,\n TaxRegionCreatedEnvelope,\n TaxRegionDeletedEnvelope,\n TaxRegionUpdatedEnvelope,\n TaxRegionsQueryBuilder,\n UpdateTaxRegion,\n UpdateTaxRegionApplicationErrors,\n createTaxRegion as universalCreateTaxRegion,\n deleteTaxRegion as universalDeleteTaxRegion,\n getTaxRegion as universalGetTaxRegion,\n queryTaxRegions as universalQueryTaxRegions,\n typedQueryTaxRegions as universalTypedQueryTaxRegions,\n updateTaxRegion as universalUpdateTaxRegion,\n} from './billing-v1-tax-region-tax-regions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/ecom' };\n\nexport function createTaxRegion(\n httpClient: HttpClient\n): CreateTaxRegionSignature {\n return (taxRegion: NonNullablePaths<TaxRegion, `appId` | `country`, 2>) =>\n universalCreateTaxRegion(\n taxRegion,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateTaxRegionSignature {\n /**\n * Creates a tax region.\n *\n * Tax regions require a tax calculator `appId`. Call List Tax Calculators to retrieve a list of available calculators for a site.\n *\n * Wix uses tax regions to calculate tax.\n * <!-- Subdivisions are supported for the following countries: `AU`, `BR`, `CA`, `FR`, `DE`, `IN`, `IT`, `MX`, `NL`, `ES`, `AE`, `GB`, `US` -->\n * @param - Tax region to create.\n * @returns Created tax region.\n */\n (taxRegion: NonNullablePaths<TaxRegion, `appId` | `country`, 2>): Promise<\n NonNullablePaths<\n TaxRegion,\n `country` | `subdivision` | `appId` | `taxIncludedInPrice`,\n 2\n > & {\n __applicationErrorsType?: CreateTaxRegionApplicationErrors;\n }\n >;\n}\n\nexport function getTaxRegion(httpClient: HttpClient): GetTaxRegionSignature {\n return (taxRegionId: string) =>\n universalGetTaxRegion(\n taxRegionId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetTaxRegionSignature {\n /**\n * Retrieves a tax region.\n * @param - ID of the tax region to retrieve.\n * @returns Retrieved tax region.\n */\n (taxRegionId: string): Promise<\n NonNullablePaths<\n TaxRegion,\n `country` | `subdivision` | `appId` | `taxIncludedInPrice`,\n 2\n >\n >;\n}\n\nexport function updateTaxRegion(\n httpClient: HttpClient\n): UpdateTaxRegionSignature {\n return (\n _id: string,\n taxRegion: NonNullablePaths<UpdateTaxRegion, `revision`, 2>\n ) =>\n universalUpdateTaxRegion(\n _id,\n taxRegion,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateTaxRegionSignature {\n /**\n * Updates a tax region.\n *\n * Each time the tax region is updated, `revision` increments by 1.\n * The current `revision` must be passed when updating the tax region.\n * This ensures you're working with the latest tax region and prevents\n * unintended overwrites.\n * @param - Tax region ID.\n * @param - Tax region info.\n * @returns Updated tax region.\n */\n (\n _id: string,\n taxRegion: NonNullablePaths<UpdateTaxRegion, `revision`, 2>\n ): Promise<\n NonNullablePaths<\n TaxRegion,\n `country` | `subdivision` | `appId` | `taxIncludedInPrice`,\n 2\n > & {\n __applicationErrorsType?: UpdateTaxRegionApplicationErrors;\n }\n >;\n}\n\nexport function deleteTaxRegion(\n httpClient: HttpClient\n): DeleteTaxRegionSignature {\n return (taxRegionId: string) =>\n universalDeleteTaxRegion(\n taxRegionId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteTaxRegionSignature {\n /**\n * Deletes a tax region.\n *\n * When a tax region is deleted, tax is not calculated and zero tax will be returned for addresses in this region.\n * @param - ID of the tax region to delete.\n */\n (taxRegionId: string): Promise<void>;\n}\n\nexport function queryTaxRegions(\n httpClient: HttpClient\n): QueryTaxRegionsSignature {\n return () =>\n universalQueryTaxRegions(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryTaxRegionsSignature {\n /**\n * Creates a query to retrieve a list of tax regions.\n *\n * The `queryTaxRegions()` function builds a query to retrieve a list of tax regions and returns a `TaxRegionsQueryBuilder` 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 `TaxRegionsQueryBuilder` functions onto the query. `TaxRegionsQueryBuilder` functions enable you to sort, filter, and control the results that `queryTaxRegions()` returns.\n *\n * `queryTaxRegions()` runs with the following `TaxRegionsQueryBuilder` default that you can override:\n * + `ascending(\"_id\")`\n *\n * The functions that are chained to `queryTaxRegions()` are applied in the order they are called. For example, if you apply `ascending(\"country\")` and then `ascending(\"subdivision\")`, the results are sorted first by the `\"country\"`, and then, if there are multiple results with the same `\"country\"`, the items are sorted by `\"subdivision\"`.\n *\n * The following `TaxRegionsQueryBuilder` functions are supported for the `queryTaxRegions()` function. For a full description of the tax region object, see the object returned for the `items` property in `TaxRegionsQueryResult`.\n */\n (): TaxRegionsQueryBuilder;\n}\n\nexport function typedQueryTaxRegions(\n httpClient: HttpClient\n): TypedQueryTaxRegionsSignature {\n return (query: CursorQuery) =>\n universalTypedQueryTaxRegions(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryTaxRegionsSignature {\n /** */\n (query: CursorQuery): Promise<\n NonNullablePaths<\n QueryTaxRegionsResponse,\n | `taxRegions`\n | `taxRegions.${number}.country`\n | `taxRegions.${number}.subdivision`\n | `taxRegions.${number}.appId`\n | `taxRegions.${number}.taxIncludedInPrice`,\n 4\n >\n >;\n}\n\nexport const onTaxRegionCreated = EventDefinition(\n 'wix.billing.v1.tax_region_created',\n true,\n (event: TaxRegionCreatedEnvelope) =>\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)<TaxRegionCreatedEnvelope>();\nexport const onTaxRegionDeleted = EventDefinition(\n 'wix.billing.v1.tax_region_deleted',\n true,\n (event: TaxRegionDeletedEnvelope) =>\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)<TaxRegionDeletedEnvelope>();\nexport const onTaxRegionUpdated = EventDefinition(\n 'wix.billing.v1.tax_region_updated',\n true,\n (event: TaxRegionUpdatedEnvelope) =>\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)<TaxRegionUpdatedEnvelope>();\n\nexport {\n ActionEvent,\n ApplicationError,\n BaseEventMetadata,\n BulkActionMetadata,\n BulkCreateTaxRegionRequest,\n BulkCreateTaxRegionResponse,\n BulkCreateTaxRegionResult,\n BulkRestoreTaxRegionsRequest,\n BulkRestoreTaxRegionsResponse,\n BulkRestoreTaxRegionsResult,\n ConflictErrorDetails,\n CreateOrGetTaxRegionWithoutValidationRequest,\n CreateOrGetTaxRegionWithoutValidationResponse,\n CreateTaxRegionRequest,\n CreateTaxRegionResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeleteTaxRegionRequest,\n DeleteTaxRegionResponse,\n DeleteTaxRegionWithoutDomainEventsRequest,\n DeleteTaxRegionWithoutDomainEventsResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n GetTaxRegionRequest,\n GetTaxRegionResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ItemMetadata,\n MessageEnvelope,\n QueryTaxRegionsRequest,\n QueryTaxRegionsResponse,\n RestoreInfo,\n SortOrder,\n Sorting,\n TaxRegion,\n TaxRegionCreatedEnvelope,\n TaxRegionDeletedEnvelope,\n TaxRegionUpdatedEnvelope,\n TaxRegionsQueryBuilder,\n TaxRegionsQueryResult,\n UpdateTaxRegion,\n UpdateTaxRegionRequest,\n UpdateTaxRegionResponse,\n WebhookIdentityType,\n} from './billing-v1-tax-region-tax-regions.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, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBillingV1TaxRegion from './billing-v1-tax-region-tax-regions.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * A tax region uses a location to define a specific tax treatment.\n * A location is defined by `country` and `subdivision`. The tax region also\n * dictates whether or not tax is included in the displayed price.\n */\nexport interface TaxRegion {\n /**\n * Tax region ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * 2-letter country code in [ISO-3166 alpha-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format.\n * @format COUNTRY\n * @minLength 2\n */\n country?: string;\n /**\n * Subdivision (such as state, prefecture, or province) in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.\n * @maxLength 50\n */\n subdivision?: string;\n /**\n * The tax calculator ID to use to calculate tax for this region.\n *\n * Call List Tax Calculators to retrieve a list of available calculators for a site.\n * @format GUID\n */\n appId?: string;\n /** Whether tax is included in the price. */\n taxIncludedInPrice?: boolean;\n /**\n * Revision number, which increments by 1 each time the tax region is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the tax region.\n *\n * Ignored when creating a tax region.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the tax region was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the tax region was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n}\n\nexport interface CreateTaxRegionRequest {\n /** Tax region to create. */\n taxRegion: TaxRegion;\n}\n\nexport interface CreateTaxRegionResponse {\n /** Created tax region. */\n taxRegion?: TaxRegion;\n}\n\nexport interface ConflictErrorDetails {\n /**\n * Conflict details.\n * @maxLength 1000\n */\n reasonForConflict?: string;\n}\n\nexport interface BulkCreateTaxRegionRequest {\n /**\n * Tax regions to create.\n * @minSize 1\n * @maxSize 100\n */\n taxRegions?: TaxRegion[];\n /**\n * Whether to return the full tax region objects in the response.\n *\n * Default: `true`\n */\n returnEntity?: boolean;\n}\n\nexport interface BulkCreateTaxRegionResponse {\n /**\n * Tax regions created by bulk action.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkCreateTaxRegionResult[];\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkCreateTaxRegionResult {\n /** Item metadata. */\n itemMetadata?: ItemMetadata;\n /**\n * Tax region.\n *\n * This field is returned if the operation was successful and\n * `returnEntity` is set to `true`.\n */\n item?: TaxRegion;\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 GetTaxRegionRequest {\n /**\n * ID of the tax region to retrieve.\n * @format GUID\n */\n taxRegionId: string;\n}\n\nexport interface GetTaxRegionResponse {\n /** Retrieved tax region. */\n taxRegion?: TaxRegion;\n}\n\nexport interface UpdateTaxRegionRequest {\n /** Tax region info to update. */\n taxRegion: TaxRegion;\n}\n\nexport interface UpdateTaxRegionResponse {\n /** Updated tax region. */\n taxRegion?: TaxRegion;\n}\n\nexport interface DeleteTaxRegionRequest {\n /**\n * ID of the tax region to delete.\n * @format GUID\n */\n taxRegionId: string;\n}\n\nexport interface DeleteTaxRegionResponse {}\n\nexport interface QueryTaxRegionsRequest {\n /** Query options. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\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 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 QueryTaxRegionsResponse {\n /** Retrieved tax regions. */\n taxRegions?: TaxRegion[];\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 /**\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 CreateOrGetTaxRegionWithoutValidationRequest {\n /** Tax region to create. */\n taxRegion?: TaxRegion;\n}\n\nexport interface CreateOrGetTaxRegionWithoutValidationResponse {\n /** Created tax region. */\n taxRegion?: TaxRegion;\n}\n\nexport interface DeleteTaxRegionWithoutDomainEventsRequest {\n /**\n * ID of the tax region to delete.\n * @format GUID\n */\n taxRegionId?: string;\n}\n\nexport interface DeleteTaxRegionWithoutDomainEventsResponse {}\n\nexport interface BulkRestoreTaxRegionsRequest {\n /**\n * Tax region IDs to restore.\n * @format GUID\n * @minSize 1\n * @maxSize 200\n */\n taxRegionIds?: string[];\n}\n\nexport interface BulkRestoreTaxRegionsResponse {\n /**\n * Restored tax regions result\n * @minSize 1\n * @maxSize 200\n */\n results?: BulkRestoreTaxRegionsResult[];\n}\n\nexport interface BulkRestoreTaxRegionsResult {\n itemMetadata?: ItemMetadata;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n/** @docsIgnore */\nexport type CreateTaxRegionApplicationErrors =\n | {\n code?: 'ALREADY_EXISTS';\n description?: string;\n data?: ConflictErrorDetails;\n }\n | {\n code?: 'CALCULATOR_ID_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CALCULATOR_IS_NOT_SUPPORTED_FOR_THIS_TAX_REGION';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_SUBDIVISION_FORMAT';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'SUBDIVISIONS_NOT_SUPPORTED_FOR_COUNTRY';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type UpdateTaxRegionApplicationErrors =\n | {\n code?: 'CALCULATOR_ID_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CALCULATOR_IS_NOT_SUPPORTED_FOR_THIS_TAX_REGION';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_SUBDIVISION_FORMAT';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'SUBDIVISIONS_NOT_SUPPORTED_FOR_COUNTRY';\n description?: string;\n data?: Record<string, any>;\n };\n\nexport interface BaseEventMetadata {\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}\n\nexport interface EventMetadata extends BaseEventMetadata {\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\nexport interface TaxRegionCreatedEnvelope {\n entity: TaxRegion;\n metadata: EventMetadata;\n}\n\n/** @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\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_REGION_READ\n * @webhook\n * @eventType wix.billing.v1.tax_region_created\n * @serviceIdentifier wix.billing.v1.TaxRegionsService\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onTaxRegionCreated(\n handler: (event: TaxRegionCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface TaxRegionDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a tax region is deleted.\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\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_REGION_READ\n * @webhook\n * @eventType wix.billing.v1.tax_region_deleted\n * @serviceIdentifier wix.billing.v1.TaxRegionsService\n * @slug deleted\n * @documentationMaturity preview\n */\nexport declare function onTaxRegionDeleted(\n handler: (event: TaxRegionDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface TaxRegionUpdatedEnvelope {\n entity: TaxRegion;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a tax region is updated.\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\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_REGION_READ\n * @webhook\n * @eventType wix.billing.v1.tax_region_updated\n * @serviceIdentifier wix.billing.v1.TaxRegionsService\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onTaxRegionUpdated(\n handler: (event: TaxRegionUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a tax region.\n *\n * Tax regions require a tax calculator `appId`. Call List Tax Calculators to retrieve a list of available calculators for a site.\n *\n * Wix uses tax regions to calculate tax.\n * <!-- Subdivisions are supported for the following countries: `AU`, `BR`, `CA`, `FR`, `DE`, `IN`, `IT`, `MX`, `NL`, `ES`, `AE`, `GB`, `US` -->\n * @param taxRegion - Tax region to create.\n * @public\n * @documentationMaturity preview\n * @requiredField taxRegion\n * @requiredField taxRegion.appId\n * @requiredField taxRegion.country\n * @permissionId BILLING.TAX_REGION_CREATE\n * @applicableIdentity APP\n * @returns Created tax region.\n * @fqn wix.billing.v1.TaxRegionsService.CreateTaxRegion\n */\nexport async function createTaxRegion(\n taxRegion: NonNullablePaths<TaxRegion, `appId` | `country`, 2>\n): Promise<\n NonNullablePaths<\n TaxRegion,\n `country` | `subdivision` | `appId` | `taxIncludedInPrice`,\n 2\n > & {\n __applicationErrorsType?: CreateTaxRegionApplicationErrors;\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 taxRegion: taxRegion,\n });\n\n const reqOpts = ambassadorWixBillingV1TaxRegion.createTaxRegion(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.taxRegion!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { taxRegion: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['taxRegion']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a tax region.\n * @param taxRegionId - ID of the tax region to retrieve.\n * @public\n * @documentationMaturity preview\n * @requiredField taxRegionId\n * @permissionId BILLING.TAX_REGION_READ\n * @applicableIdentity APP\n * @returns Retrieved tax region.\n * @fqn wix.billing.v1.TaxRegionsService.GetTaxRegion\n */\nexport async function getTaxRegion(\n taxRegionId: string\n): Promise<\n NonNullablePaths<\n TaxRegion,\n `country` | `subdivision` | `appId` | `taxIncludedInPrice`,\n 2\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 taxRegionId: taxRegionId,\n });\n\n const reqOpts = ambassadorWixBillingV1TaxRegion.getTaxRegion(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.taxRegion!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { taxRegionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['taxRegionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a tax region.\n *\n * Each time the tax region is updated, `revision` increments by 1.\n * The current `revision` must be passed when updating the tax region.\n * This ensures you're working with the latest tax region and prevents\n * unintended overwrites.\n * @param _id - Tax region ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField taxRegion\n * @requiredField taxRegion.revision\n * @param taxRegion - Tax region info.\n * @permissionId BILLING.TAX_REGION_UPDATE\n * @applicableIdentity APP\n * @returns Updated tax region.\n * @fqn wix.billing.v1.TaxRegionsService.UpdateTaxRegion\n */\nexport async function updateTaxRegion(\n _id: string,\n taxRegion: NonNullablePaths<UpdateTaxRegion, `revision`, 2>\n): Promise<\n NonNullablePaths<\n TaxRegion,\n `country` | `subdivision` | `appId` | `taxIncludedInPrice`,\n 2\n > & {\n __applicationErrorsType?: UpdateTaxRegionApplicationErrors;\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 taxRegion: { ...taxRegion, id: _id },\n });\n\n const reqOpts = ambassadorWixBillingV1TaxRegion.updateTaxRegion(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.taxRegion!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { taxRegion: '$[1]' },\n explicitPathsToArguments: { 'taxRegion.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'taxRegion']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateTaxRegion {\n /**\n * Tax region ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * 2-letter country code in [ISO-3166 alpha-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format.\n * @format COUNTRY\n * @minLength 2\n */\n country?: string;\n /**\n * Subdivision (such as state, prefecture, or province) in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.\n * @maxLength 50\n */\n subdivision?: string;\n /**\n * The tax calculator ID to use to calculate tax for this region.\n *\n * Call List Tax Calculators to retrieve a list of available calculators for a site.\n * @format GUID\n */\n appId?: string;\n /** Whether tax is included in the price. */\n taxIncludedInPrice?: boolean;\n /**\n * Revision number, which increments by 1 each time the tax region is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the tax region.\n *\n * Ignored when creating a tax region.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the tax region was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the tax region was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n}\n\n/**\n * Deletes a tax region.\n *\n * When a tax region is deleted, tax is not calculated and zero tax will be returned for addresses in this region.\n * @param taxRegionId - ID of the tax region to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField taxRegionId\n * @permissionId BILLING.TAX_REGION_DELETE\n * @applicableIdentity APP\n * @fqn wix.billing.v1.TaxRegionsService.DeleteTaxRegion\n */\nexport async function deleteTaxRegion(taxRegionId: 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 taxRegionId: taxRegionId,\n });\n\n const reqOpts = ambassadorWixBillingV1TaxRegion.deleteTaxRegion(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: { taxRegionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['taxRegionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates a query to retrieve a list of tax regions.\n *\n * The `queryTaxRegions()` function builds a query to retrieve a list of tax regions and returns a `TaxRegionsQueryBuilder` 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 `TaxRegionsQueryBuilder` functions onto the query. `TaxRegionsQueryBuilder` functions enable you to sort, filter, and control the results that `queryTaxRegions()` returns.\n *\n * `queryTaxRegions()` runs with the following `TaxRegionsQueryBuilder` default that you can override:\n * + `ascending(\"_id\")`\n *\n * The functions that are chained to `queryTaxRegions()` are applied in the order they are called. For example, if you apply `ascending(\"country\")` and then `ascending(\"subdivision\")`, the results are sorted first by the `\"country\"`, and then, if there are multiple results with the same `\"country\"`, the items are sorted by `\"subdivision\"`.\n *\n * The following `TaxRegionsQueryBuilder` functions are supported for the `queryTaxRegions()` function. For a full description of the tax region object, see the object returned for the `items` property in `TaxRegionsQueryResult`.\n * @public\n * @documentationMaturity preview\n * @permissionId BILLING.TAX_REGION_READ\n * @applicableIdentity APP\n * @fqn wix.billing.v1.TaxRegionsService.QueryTaxRegions\n */\nexport function queryTaxRegions(): TaxRegionsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n TaxRegion,\n 'CURSOR',\n QueryTaxRegionsRequest,\n QueryTaxRegionsResponse\n >({\n func: async (payload: QueryTaxRegionsRequest) => {\n const reqOpts = ambassadorWixBillingV1TaxRegion.queryTaxRegions(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: QueryTaxRegionsRequest['query']) => {\n const args = [query, {}] as [QueryTaxRegionsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryTaxRegionsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.taxRegions,\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 TaxRegionsQueryResult extends QueryCursorResult {\n items: TaxRegion[];\n query: TaxRegionsQueryBuilder;\n next: () => Promise<TaxRegionsQueryResult>;\n prev: () => Promise<TaxRegionsQueryResult>;\n}\n\nexport interface TaxRegionsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName:\n | '_id'\n | 'country'\n | 'subdivision'\n | 'appId'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => TaxRegionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName:\n | '_id'\n | 'country'\n | 'subdivision'\n | 'appId'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => TaxRegionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ge: (\n propertyName:\n | '_id'\n | 'country'\n | 'subdivision'\n | 'appId'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => TaxRegionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n gt: (\n propertyName:\n | '_id'\n | 'country'\n | 'subdivision'\n | 'appId'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => TaxRegionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n le: (\n propertyName:\n | '_id'\n | 'country'\n | 'subdivision'\n | 'appId'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => TaxRegionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n lt: (\n propertyName:\n | '_id'\n | 'country'\n | 'subdivision'\n | 'appId'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => TaxRegionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n * @documentationMaturity preview\n */\n startsWith: (\n propertyName: '_id' | 'country' | 'subdivision' | 'appId',\n value: string\n ) => TaxRegionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n * @documentationMaturity preview\n */\n hasSome: (\n propertyName:\n | '_id'\n | 'country'\n | 'subdivision'\n | 'appId'\n | '_createdDate'\n | '_updatedDate',\n value: any[]\n ) => TaxRegionsQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName:\n | '_id'\n | 'country'\n | 'subdivision'\n | 'appId'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => TaxRegionsQueryBuilder;\n /** @documentationMaturity preview */\n exists: (\n propertyName:\n | '_id'\n | 'country'\n | 'subdivision'\n | 'appId'\n | '_createdDate'\n | '_updatedDate',\n value: boolean\n ) => TaxRegionsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n ascending: (\n ...propertyNames: Array<\n | '_id'\n | 'country'\n | 'subdivision'\n | 'appId'\n | '_createdDate'\n | '_updatedDate'\n >\n ) => TaxRegionsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n descending: (\n ...propertyNames: Array<\n | '_id'\n | 'country'\n | 'subdivision'\n | 'appId'\n | '_createdDate'\n | '_updatedDate'\n >\n ) => TaxRegionsQueryBuilder;\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) => TaxRegionsQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => TaxRegionsQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<TaxRegionsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.billing.v1.TaxRegionsService.QueryTaxRegions\n * @requiredField query\n */\nexport async function typedQueryTaxRegions(\n query: CursorQuery\n): Promise<\n NonNullablePaths<\n QueryTaxRegionsResponse,\n | `taxRegions`\n | `taxRegions.${number}.country`\n | `taxRegions.${number}.subdivision`\n | `taxRegions.${number}.appId`\n | `taxRegions.${number}.taxIncludedInPrice`,\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 = ambassadorWixBillingV1TaxRegion.queryTaxRegions(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","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 resolveWixBillingV1TaxRegionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/billing/v1/tax-regions',\n destPath: '/v1/tax-regions',\n },\n {\n srcPath: '/billing/v1/bulk/tax-regions',\n destPath: '/v1/bulk/tax-regions',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/billing/v1/tax-regions',\n destPath: '/v1/tax-regions',\n },\n {\n srcPath: '/billing/v1/bulk/tax-regions',\n destPath: '/v1/bulk/tax-regions',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_tax-regions';\n\n/**\n * Creates a tax region.\n *\n * Tax regions require a tax calculator `appId`. Call List Tax Calculators to retrieve a list of available calculators for a site.\n *\n * Wix uses tax regions to calculate tax.\n * <!-- Subdivisions are supported for the following countries: `AU`, `BR`, `CA`, `FR`, `DE`, `IN`, `IT`, `MX`, `NL`, `ES`, `AE`, `GB`, `US` -->\n */\nexport function createTaxRegion(payload: object): RequestOptionsFactory<any> {\n function __createTaxRegion({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'taxRegion.createdDate' },\n { path: 'taxRegion.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.billing.v1.tax_region',\n method: 'POST' as any,\n methodFqn: 'wix.billing.v1.TaxRegionsService.CreateTaxRegion',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBillingV1TaxRegionsServiceUrl({\n protoPath: '/v1/tax-regions',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'taxRegion.createdDate' },\n { path: 'taxRegion.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createTaxRegion;\n}\n\n/** Retrieves a tax region. */\nexport function getTaxRegion(payload: object): RequestOptionsFactory<any> {\n function __getTaxRegion({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.tax_region',\n method: 'GET' as any,\n methodFqn: 'wix.billing.v1.TaxRegionsService.GetTaxRegion',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBillingV1TaxRegionsServiceUrl({\n protoPath: '/v1/tax-regions/{taxRegionId}',\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: 'taxRegion.createdDate' },\n { path: 'taxRegion.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getTaxRegion;\n}\n\n/**\n * Updates a tax region.\n *\n * Each time the tax region is updated, `revision` increments by 1.\n * The current `revision` must be passed when updating the tax region.\n * This ensures you're working with the latest tax region and prevents\n * unintended overwrites.\n */\nexport function updateTaxRegion(payload: object): RequestOptionsFactory<any> {\n function __updateTaxRegion({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'taxRegion.createdDate' },\n { path: 'taxRegion.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.billing.v1.tax_region',\n method: 'PATCH' as any,\n methodFqn: 'wix.billing.v1.TaxRegionsService.UpdateTaxRegion',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBillingV1TaxRegionsServiceUrl({\n protoPath: '/v1/tax-regions/{taxRegion.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: 'taxRegion.createdDate' },\n { path: 'taxRegion.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateTaxRegion;\n}\n\n/**\n * Deletes a tax region.\n *\n * When a tax region is deleted, tax is not calculated and zero tax will be returned for addresses in this region.\n */\nexport function deleteTaxRegion(payload: object): RequestOptionsFactory<any> {\n function __deleteTaxRegion({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.tax_region',\n method: 'DELETE' as any,\n methodFqn: 'wix.billing.v1.TaxRegionsService.DeleteTaxRegion',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBillingV1TaxRegionsServiceUrl({\n protoPath: '/v1/tax-regions/{taxRegionId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteTaxRegion;\n}\n\n/**\n * Creates a query to retrieve a list of tax regions.\n *\n * The `queryTaxRegions()` function builds a query to retrieve a list of tax regions and returns a `TaxRegionsQueryBuilder` 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 `TaxRegionsQueryBuilder` functions onto the query. `TaxRegionsQueryBuilder` functions enable you to sort, filter, and control the results that `queryTaxRegions()` returns.\n *\n * `queryTaxRegions()` runs with the following `TaxRegionsQueryBuilder` default that you can override:\n * + `ascending(\"_id\")`\n *\n * The functions that are chained to `queryTaxRegions()` are applied in the order they are called. For example, if you apply `ascending(\"country\")` and then `ascending(\"subdivision\")`, the results are sorted first by the `\"country\"`, and then, if there are multiple results with the same `\"country\"`, the items are sorted by `\"subdivision\"`.\n *\n * The following `TaxRegionsQueryBuilder` functions are supported for the `queryTaxRegions()` function. For a full description of the tax region object, see the object returned for the `items` property in `TaxRegionsQueryResult`.\n */\nexport function queryTaxRegions(payload: object): RequestOptionsFactory<any> {\n function __queryTaxRegions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.tax_region',\n method: 'POST' as any,\n methodFqn: 'wix.billing.v1.TaxRegionsService.QueryTaxRegions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBillingV1TaxRegionsServiceUrl({\n protoPath: '/v1/tax-regions/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: 'taxRegions.createdDate' },\n { path: 'taxRegions.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryTaxRegions;\n}\n","import {\n createTaxRegion as publicCreateTaxRegion,\n getTaxRegion as publicGetTaxRegion,\n updateTaxRegion as publicUpdateTaxRegion,\n deleteTaxRegion as publicDeleteTaxRegion,\n queryTaxRegions as publicQueryTaxRegions,\n typedQueryTaxRegions as publicTypedQueryTaxRegions,\n} from './billing-v1-tax-region-tax-regions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n CursorQuery,\n TaxRegionsQueryBuilder,\n typedQueryTaxRegions as universalTypedQueryTaxRegions,\n} from './billing-v1-tax-region-tax-regions.universal.js';\nimport { onTaxRegionCreated as publicOnTaxRegionCreated } from './billing-v1-tax-region-tax-regions.public.js';\nimport { onTaxRegionDeleted as publicOnTaxRegionDeleted } from './billing-v1-tax-region-tax-regions.public.js';\nimport { onTaxRegionUpdated as publicOnTaxRegionUpdated } from './billing-v1-tax-region-tax-regions.public.js';\n\nfunction customQueryTaxRegions(httpClient: HttpClient) {\n const router = createQueryOverloadRouter({\n builderQueryFunction: () => publicQueryTaxRegions(httpClient)(),\n typedQueryFunction: (query: CursorQuery) =>\n publicTypedQueryTaxRegions(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): TaxRegionsQueryBuilder;\n function overloadedQuery(\n query: CursorQuery\n ): ReturnType<typeof universalTypedQueryTaxRegions>;\n function overloadedQuery(query?: CursorQuery): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const createTaxRegion: MaybeContext<\n BuildRESTFunction<typeof publicCreateTaxRegion> & typeof publicCreateTaxRegion\n> = /*#__PURE__*/ createRESTModule(publicCreateTaxRegion);\nexport const getTaxRegion: MaybeContext<\n BuildRESTFunction<typeof publicGetTaxRegion> & typeof publicGetTaxRegion\n> = /*#__PURE__*/ createRESTModule(publicGetTaxRegion);\nexport const updateTaxRegion: MaybeContext<\n BuildRESTFunction<typeof publicUpdateTaxRegion> & typeof publicUpdateTaxRegion\n> = /*#__PURE__*/ createRESTModule(publicUpdateTaxRegion);\nexport const deleteTaxRegion: MaybeContext<\n BuildRESTFunction<typeof publicDeleteTaxRegion> & typeof publicDeleteTaxRegion\n> = /*#__PURE__*/ createRESTModule(publicDeleteTaxRegion);\nexport const queryTaxRegions: MaybeContext<\n BuildRESTFunction<typeof customQueryTaxRegions> & typeof customQueryTaxRegions\n> = /*#__PURE__*/ createRESTModule(customQueryTaxRegions);\n/** */\nexport const onTaxRegionCreated: BuildEventDefinition<\n typeof publicOnTaxRegionCreated\n> &\n typeof publicOnTaxRegionCreated = createEventModule(publicOnTaxRegionCreated);\n/**\n * Triggered when a tax region is deleted.\n */\nexport const onTaxRegionDeleted: BuildEventDefinition<\n typeof publicOnTaxRegionDeleted\n> &\n typeof publicOnTaxRegionDeleted = createEventModule(publicOnTaxRegionDeleted);\n/**\n * Triggered when a tax region is updated.\n */\nexport const onTaxRegionUpdated: BuildEventDefinition<\n typeof publicOnTaxRegionUpdated\n> &\n typeof publicOnTaxRegionUpdated = createEventModule(publicOnTaxRegionUpdated);\n\nexport {\n SortOrder,\n WebhookIdentityType,\n} from './billing-v1-tax-region-tax-regions.universal.js';\nexport {\n TaxRegion,\n CreateTaxRegionRequest,\n CreateTaxRegionResponse,\n ConflictErrorDetails,\n BulkCreateTaxRegionRequest,\n BulkCreateTaxRegionResponse,\n BulkCreateTaxRegionResult,\n ItemMetadata,\n ApplicationError,\n BulkActionMetadata,\n GetTaxRegionRequest,\n GetTaxRegionResponse,\n UpdateTaxRegionRequest,\n UpdateTaxRegionResponse,\n DeleteTaxRegionRequest,\n DeleteTaxRegionResponse,\n QueryTaxRegionsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryTaxRegionsResponse,\n CursorPagingMetadata,\n Cursors,\n CreateOrGetTaxRegionWithoutValidationRequest,\n CreateOrGetTaxRegionWithoutValidationResponse,\n DeleteTaxRegionWithoutDomainEventsRequest,\n DeleteTaxRegionWithoutDomainEventsResponse,\n BulkRestoreTaxRegionsRequest,\n BulkRestoreTaxRegionsResponse,\n BulkRestoreTaxRegionsResult,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n TaxRegionCreatedEnvelope,\n TaxRegionDeletedEnvelope,\n TaxRegionUpdatedEnvelope,\n UpdateTaxRegion,\n TaxRegionsQueryResult,\n TaxRegionsQueryBuilder,\n} from './billing-v1-tax-region-tax-regions.universal.js';\nexport {\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n CreateTaxRegionApplicationErrors,\n UpdateTaxRegionApplicationErrors,\n} from './billing-v1-tax-region-tax-regions.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,yBAAAA;AAAA,EAAA,uBAAAC;AAAA,EAAA,oBAAAC;AAAA,EAAA,0BAAAC;AAAA,EAAA,0BAAAC;AAAA,EAAA,0BAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,uBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,wCACP,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,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAUd,SAAS,gBAAgB,SAA6C;AAC3E,WAAS,kBAAkB,EAAE,KAAK,GAAQ;AACxC,UAAM,qBAAiB,uCAAe,SAAS;AAAA,MAC7C;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,wBAAwB;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,CAAC;AAAA,EACH;AACJ,EAA4B;;;AGlP5B,IAAAC,uBAAiC;AACjC,sCAAkC;AAOlC,iCAA0C;AAU1C,SAAS,sBAAsB,YAAwB;AACrD,QAAM,aAAS,sDAA0B;AAAA,IACvC,sBAAsB,MAAMC,iBAAsB,UAAU,EAAE;AAAA,IAC9D,oBAAoB,CAAC,UACnBC,sBAA2B,UAAU,EAAE,KAAK;AAAA,IAC9C,qBAAqB;AAAA,EACvB,CAAC;AAMD,WAAS,gBAAgB,OAA0B;AACjD,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,mBAEK,2DAAiBA,gBAAqB;AACjD,IAAMC,gBAEK,2DAAiBA,aAAkB;AAC9C,IAAMC,mBAEK,2DAAiBA,gBAAqB;AACjD,IAAMC,mBAEK,2DAAiBA,gBAAqB;AACjD,IAAML,mBAEK,2DAAiB,qBAAqB;AAEjD,IAAMM,0BAGuB,mDAAkB,kBAAwB;AAIvE,IAAMC,0BAGuB,mDAAkB,kBAAwB;AAIvE,IAAMC,0BAGuB,mDAAkB,kBAAwB;","names":["createTaxRegion","deleteTaxRegion","getTaxRegion","onTaxRegionCreated","onTaxRegionDeleted","onTaxRegionUpdated","queryTaxRegions","updateTaxRegion","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_timestamp","import_rest_modules","payload","import_transform_paths","SortOrder","WebhookIdentityType","createTaxRegion","sdkTransformError","getTaxRegion","updateTaxRegion","deleteTaxRegion","queryTaxRegions","createTaxRegion","getTaxRegion","updateTaxRegion","deleteTaxRegion","queryTaxRegions","typedQueryTaxRegions","import_rest_modules","queryTaxRegions","typedQueryTaxRegions","createTaxRegion","getTaxRegion","updateTaxRegion","deleteTaxRegion","onTaxRegionCreated","onTaxRegionDeleted","onTaxRegionUpdated"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/billing-v1-tax-region-tax-regions.public.ts","../../src/billing-v1-tax-region-tax-regions.universal.ts","../../src/billing-v1-tax-region-tax-regions.http.ts","../../src/billing-v1-tax-region-tax-regions.context.ts"],"sourcesContent":["export * from './src/billing-v1-tax-region-tax-regions.context.js';\n","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, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CreateTaxRegionApplicationErrors,\n QueryTaxRegionsResponse,\n TaxRegion,\n TaxRegionCreatedEnvelope,\n TaxRegionDeletedEnvelope,\n TaxRegionQuery,\n TaxRegionUpdatedEnvelope,\n TaxRegionsQueryBuilder,\n UpdateTaxRegion,\n UpdateTaxRegionApplicationErrors,\n createTaxRegion as universalCreateTaxRegion,\n deleteTaxRegion as universalDeleteTaxRegion,\n getTaxRegion as universalGetTaxRegion,\n queryTaxRegions as universalQueryTaxRegions,\n typedQueryTaxRegions as universalTypedQueryTaxRegions,\n updateTaxRegion as universalUpdateTaxRegion,\n} from './billing-v1-tax-region-tax-regions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/ecom' };\n\nexport function createTaxRegion(\n httpClient: HttpClient\n): CreateTaxRegionSignature {\n return (taxRegion: NonNullablePaths<TaxRegion, `appId` | `country`, 2>) =>\n universalCreateTaxRegion(\n taxRegion,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateTaxRegionSignature {\n /**\n * Creates a tax region.\n *\n * Tax regions require a tax calculator `appId`. Call List Tax Calculators to retrieve a list of available calculators for a site.\n *\n * Wix uses tax regions to calculate tax.\n * <!-- Subdivisions are supported for the following countries: `AU`, `BR`, `CA`, `FR`, `DE`, `IN`, `IT`, `MX`, `NL`, `ES`, `AE`, `GB`, `US` -->\n * @param - Tax region to create.\n * @returns Created tax region.\n */\n (taxRegion: NonNullablePaths<TaxRegion, `appId` | `country`, 2>): Promise<\n NonNullablePaths<\n TaxRegion,\n `country` | `subdivision` | `appId` | `taxIncludedInPrice`,\n 2\n > & {\n __applicationErrorsType?: CreateTaxRegionApplicationErrors;\n }\n >;\n}\n\nexport function getTaxRegion(httpClient: HttpClient): GetTaxRegionSignature {\n return (taxRegionId: string) =>\n universalGetTaxRegion(\n taxRegionId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetTaxRegionSignature {\n /**\n * Retrieves a tax region.\n * @param - ID of the tax region to retrieve.\n * @returns Retrieved tax region.\n */\n (taxRegionId: string): Promise<\n NonNullablePaths<\n TaxRegion,\n `country` | `subdivision` | `appId` | `taxIncludedInPrice`,\n 2\n >\n >;\n}\n\nexport function updateTaxRegion(\n httpClient: HttpClient\n): UpdateTaxRegionSignature {\n return (\n _id: string,\n taxRegion: NonNullablePaths<UpdateTaxRegion, `revision`, 2>\n ) =>\n universalUpdateTaxRegion(\n _id,\n taxRegion,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateTaxRegionSignature {\n /**\n * Updates a tax region.\n *\n * Each time the tax region is updated, `revision` increments by 1.\n * The current `revision` must be passed when updating the tax region.\n * This ensures you're working with the latest tax region and prevents\n * unintended overwrites.\n * @param - Tax region ID.\n * @param - Tax region info.\n * @returns Updated tax region.\n */\n (\n _id: string,\n taxRegion: NonNullablePaths<UpdateTaxRegion, `revision`, 2>\n ): Promise<\n NonNullablePaths<\n TaxRegion,\n `country` | `subdivision` | `appId` | `taxIncludedInPrice`,\n 2\n > & {\n __applicationErrorsType?: UpdateTaxRegionApplicationErrors;\n }\n >;\n}\n\nexport function deleteTaxRegion(\n httpClient: HttpClient\n): DeleteTaxRegionSignature {\n return (taxRegionId: string) =>\n universalDeleteTaxRegion(\n taxRegionId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteTaxRegionSignature {\n /**\n * Deletes a tax region.\n *\n * When a tax region is deleted, tax is not calculated and zero tax will be returned for addresses in this region.\n * @param - ID of the tax region to delete.\n */\n (taxRegionId: string): Promise<void>;\n}\n\nexport function queryTaxRegions(\n httpClient: HttpClient\n): QueryTaxRegionsSignature {\n return () =>\n universalQueryTaxRegions(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryTaxRegionsSignature {\n /**\n * Creates a query to retrieve a list of tax regions.\n *\n * The `queryTaxRegions()` function builds a query to retrieve a list of tax regions and returns a `TaxRegionsQueryBuilder` 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 `TaxRegionsQueryBuilder` functions onto the query. `TaxRegionsQueryBuilder` functions enable you to sort, filter, and control the results that `queryTaxRegions()` returns.\n *\n * `queryTaxRegions()` runs with the following `TaxRegionsQueryBuilder` default that you can override:\n * + `ascending(\"_id\")`\n *\n * The functions that are chained to `queryTaxRegions()` are applied in the order they are called. For example, if you apply `ascending(\"country\")` and then `ascending(\"subdivision\")`, the results are sorted first by the `\"country\"`, and then, if there are multiple results with the same `\"country\"`, the items are sorted by `\"subdivision\"`.\n *\n * The following `TaxRegionsQueryBuilder` functions are supported for the `queryTaxRegions()` function. For a full description of the tax region object, see the object returned for the `items` property in `TaxRegionsQueryResult`.\n */\n (): TaxRegionsQueryBuilder;\n}\n\nexport function typedQueryTaxRegions(\n httpClient: HttpClient\n): TypedQueryTaxRegionsSignature {\n return (query: TaxRegionQuery) =>\n universalTypedQueryTaxRegions(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryTaxRegionsSignature {\n /** */\n (query: TaxRegionQuery): Promise<\n NonNullablePaths<\n QueryTaxRegionsResponse,\n | `taxRegions`\n | `taxRegions.${number}.country`\n | `taxRegions.${number}.subdivision`\n | `taxRegions.${number}.appId`\n | `taxRegions.${number}.taxIncludedInPrice`,\n 4\n >\n >;\n}\n\nexport const onTaxRegionCreated = EventDefinition(\n 'wix.billing.v1.tax_region_created',\n true,\n (event: TaxRegionCreatedEnvelope) =>\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)<TaxRegionCreatedEnvelope>();\nexport const onTaxRegionDeleted = EventDefinition(\n 'wix.billing.v1.tax_region_deleted',\n true,\n (event: TaxRegionDeletedEnvelope) =>\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)<TaxRegionDeletedEnvelope>();\nexport const onTaxRegionUpdated = EventDefinition(\n 'wix.billing.v1.tax_region_updated',\n true,\n (event: TaxRegionUpdatedEnvelope) =>\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)<TaxRegionUpdatedEnvelope>();\n\nexport {\n ActionEvent,\n ApplicationError,\n BaseEventMetadata,\n BulkActionMetadata,\n BulkCreateTaxRegionRequest,\n BulkCreateTaxRegionResponse,\n BulkCreateTaxRegionResult,\n BulkRestoreTaxRegionsRequest,\n BulkRestoreTaxRegionsResponse,\n BulkRestoreTaxRegionsResult,\n ConflictErrorDetails,\n CreateOrGetTaxRegionWithoutValidationRequest,\n CreateOrGetTaxRegionWithoutValidationResponse,\n CreateTaxRegionRequest,\n CreateTaxRegionResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeleteTaxRegionRequest,\n DeleteTaxRegionResponse,\n DeleteTaxRegionWithoutDomainEventsRequest,\n DeleteTaxRegionWithoutDomainEventsResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n GetTaxRegionRequest,\n GetTaxRegionResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ItemMetadata,\n MessageEnvelope,\n QueryTaxRegionsRequest,\n QueryTaxRegionsResponse,\n RestoreInfo,\n SortOrder,\n Sorting,\n TaxRegion,\n TaxRegionCreatedEnvelope,\n TaxRegionDeletedEnvelope,\n TaxRegionQuerySpec,\n TaxRegionUpdatedEnvelope,\n TaxRegionsQueryBuilder,\n TaxRegionsQueryResult,\n UpdateTaxRegion,\n UpdateTaxRegionRequest,\n UpdateTaxRegionResponse,\n WebhookIdentityType,\n} from './billing-v1-tax-region-tax-regions.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 {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixBillingV1TaxRegion from './billing-v1-tax-region-tax-regions.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * A tax region uses a location to define a specific tax treatment.\n * A location is defined by `country` and `subdivision`. The tax region also\n * dictates whether or not tax is included in the displayed price.\n */\nexport interface TaxRegion {\n /**\n * Tax region ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * 2-letter country code in [ISO-3166 alpha-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format.\n * @format COUNTRY\n * @minLength 2\n */\n country?: string;\n /**\n * Subdivision (such as state, prefecture, or province) in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.\n * @maxLength 50\n */\n subdivision?: string;\n /**\n * The tax calculator ID to use to calculate tax for this region.\n *\n * Call List Tax Calculators to retrieve a list of available calculators for a site.\n * @format GUID\n */\n appId?: string;\n /** Whether tax is included in the price. */\n taxIncludedInPrice?: boolean;\n /**\n * Revision number, which increments by 1 each time the tax region is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the tax region.\n *\n * Ignored when creating a tax region.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the tax region was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the tax region was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n}\n\nexport interface CreateTaxRegionRequest {\n /** Tax region to create. */\n taxRegion: TaxRegion;\n}\n\nexport interface CreateTaxRegionResponse {\n /** Created tax region. */\n taxRegion?: TaxRegion;\n}\n\nexport interface ConflictErrorDetails {\n /**\n * Conflict details.\n * @maxLength 1000\n */\n reasonForConflict?: string;\n}\n\nexport interface BulkCreateTaxRegionRequest {\n /**\n * Tax regions to create.\n * @minSize 1\n * @maxSize 100\n */\n taxRegions?: TaxRegion[];\n /**\n * Whether to return the full tax region objects in the response.\n *\n * Default: `true`\n */\n returnEntity?: boolean;\n}\n\nexport interface BulkCreateTaxRegionResponse {\n /**\n * Tax regions created by bulk action.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkCreateTaxRegionResult[];\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkCreateTaxRegionResult {\n /** Item metadata. */\n itemMetadata?: ItemMetadata;\n /**\n * Tax region.\n *\n * This field is returned if the operation was successful and\n * `returnEntity` is set to `true`.\n */\n item?: TaxRegion;\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 GetTaxRegionRequest {\n /**\n * ID of the tax region to retrieve.\n * @format GUID\n */\n taxRegionId: string;\n}\n\nexport interface GetTaxRegionResponse {\n /** Retrieved tax region. */\n taxRegion?: TaxRegion;\n}\n\nexport interface UpdateTaxRegionRequest {\n /** Tax region info to update. */\n taxRegion: TaxRegion;\n}\n\nexport interface UpdateTaxRegionResponse {\n /** Updated tax region. */\n taxRegion?: TaxRegion;\n}\n\nexport interface DeleteTaxRegionRequest {\n /**\n * ID of the tax region to delete.\n * @format GUID\n */\n taxRegionId: string;\n}\n\nexport interface DeleteTaxRegionResponse {}\n\nexport interface QueryTaxRegionsRequest {\n /** Query options. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\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 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 QueryTaxRegionsResponse {\n /** Retrieved tax regions. */\n taxRegions?: TaxRegion[];\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 /**\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 CreateOrGetTaxRegionWithoutValidationRequest {\n /** Tax region to create. */\n taxRegion?: TaxRegion;\n}\n\nexport interface CreateOrGetTaxRegionWithoutValidationResponse {\n /** Created tax region. */\n taxRegion?: TaxRegion;\n}\n\nexport interface DeleteTaxRegionWithoutDomainEventsRequest {\n /**\n * ID of the tax region to delete.\n * @format GUID\n */\n taxRegionId?: string;\n}\n\nexport interface DeleteTaxRegionWithoutDomainEventsResponse {}\n\nexport interface BulkRestoreTaxRegionsRequest {\n /**\n * Tax region IDs to restore.\n * @format GUID\n * @minSize 1\n * @maxSize 200\n */\n taxRegionIds?: string[];\n}\n\nexport interface BulkRestoreTaxRegionsResponse {\n /**\n * Restored tax regions result\n * @minSize 1\n * @maxSize 200\n */\n results?: BulkRestoreTaxRegionsResult[];\n}\n\nexport interface BulkRestoreTaxRegionsResult {\n itemMetadata?: ItemMetadata;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n/** @docsIgnore */\nexport type CreateTaxRegionApplicationErrors =\n | {\n code?: 'ALREADY_EXISTS';\n description?: string;\n data?: ConflictErrorDetails;\n }\n | {\n code?: 'CALCULATOR_ID_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CALCULATOR_IS_NOT_SUPPORTED_FOR_THIS_TAX_REGION';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_SUBDIVISION_FORMAT';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'SUBDIVISIONS_NOT_SUPPORTED_FOR_COUNTRY';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type UpdateTaxRegionApplicationErrors =\n | {\n code?: 'CALCULATOR_ID_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CALCULATOR_IS_NOT_SUPPORTED_FOR_THIS_TAX_REGION';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_SUBDIVISION_FORMAT';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'SUBDIVISIONS_NOT_SUPPORTED_FOR_COUNTRY';\n description?: string;\n data?: Record<string, any>;\n };\n\nexport interface BaseEventMetadata {\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}\n\nexport interface EventMetadata extends BaseEventMetadata {\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\nexport interface TaxRegionCreatedEnvelope {\n entity: TaxRegion;\n metadata: EventMetadata;\n}\n\n/** @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\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_REGION_READ\n * @webhook\n * @eventType wix.billing.v1.tax_region_created\n * @serviceIdentifier wix.billing.v1.TaxRegionsService\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onTaxRegionCreated(\n handler: (event: TaxRegionCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface TaxRegionDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a tax region is deleted.\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\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_REGION_READ\n * @webhook\n * @eventType wix.billing.v1.tax_region_deleted\n * @serviceIdentifier wix.billing.v1.TaxRegionsService\n * @slug deleted\n * @documentationMaturity preview\n */\nexport declare function onTaxRegionDeleted(\n handler: (event: TaxRegionDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface TaxRegionUpdatedEnvelope {\n entity: TaxRegion;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a tax region is updated.\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\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_REGION_READ\n * @webhook\n * @eventType wix.billing.v1.tax_region_updated\n * @serviceIdentifier wix.billing.v1.TaxRegionsService\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onTaxRegionUpdated(\n handler: (event: TaxRegionUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a tax region.\n *\n * Tax regions require a tax calculator `appId`. Call List Tax Calculators to retrieve a list of available calculators for a site.\n *\n * Wix uses tax regions to calculate tax.\n * <!-- Subdivisions are supported for the following countries: `AU`, `BR`, `CA`, `FR`, `DE`, `IN`, `IT`, `MX`, `NL`, `ES`, `AE`, `GB`, `US` -->\n * @param taxRegion - Tax region to create.\n * @public\n * @documentationMaturity preview\n * @requiredField taxRegion\n * @requiredField taxRegion.appId\n * @requiredField taxRegion.country\n * @permissionId BILLING.TAX_REGION_CREATE\n * @applicableIdentity APP\n * @returns Created tax region.\n * @fqn wix.billing.v1.TaxRegionsService.CreateTaxRegion\n */\nexport async function createTaxRegion(\n taxRegion: NonNullablePaths<TaxRegion, `appId` | `country`, 2>\n): Promise<\n NonNullablePaths<\n TaxRegion,\n `country` | `subdivision` | `appId` | `taxIncludedInPrice`,\n 2\n > & {\n __applicationErrorsType?: CreateTaxRegionApplicationErrors;\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 taxRegion: taxRegion,\n });\n\n const reqOpts = ambassadorWixBillingV1TaxRegion.createTaxRegion(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.taxRegion!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { taxRegion: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['taxRegion']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a tax region.\n * @param taxRegionId - ID of the tax region to retrieve.\n * @public\n * @documentationMaturity preview\n * @requiredField taxRegionId\n * @permissionId BILLING.TAX_REGION_READ\n * @applicableIdentity APP\n * @returns Retrieved tax region.\n * @fqn wix.billing.v1.TaxRegionsService.GetTaxRegion\n */\nexport async function getTaxRegion(\n taxRegionId: string\n): Promise<\n NonNullablePaths<\n TaxRegion,\n `country` | `subdivision` | `appId` | `taxIncludedInPrice`,\n 2\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 taxRegionId: taxRegionId,\n });\n\n const reqOpts = ambassadorWixBillingV1TaxRegion.getTaxRegion(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.taxRegion!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { taxRegionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['taxRegionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a tax region.\n *\n * Each time the tax region is updated, `revision` increments by 1.\n * The current `revision` must be passed when updating the tax region.\n * This ensures you're working with the latest tax region and prevents\n * unintended overwrites.\n * @param _id - Tax region ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField taxRegion\n * @requiredField taxRegion.revision\n * @param taxRegion - Tax region info.\n * @permissionId BILLING.TAX_REGION_UPDATE\n * @applicableIdentity APP\n * @returns Updated tax region.\n * @fqn wix.billing.v1.TaxRegionsService.UpdateTaxRegion\n */\nexport async function updateTaxRegion(\n _id: string,\n taxRegion: NonNullablePaths<UpdateTaxRegion, `revision`, 2>\n): Promise<\n NonNullablePaths<\n TaxRegion,\n `country` | `subdivision` | `appId` | `taxIncludedInPrice`,\n 2\n > & {\n __applicationErrorsType?: UpdateTaxRegionApplicationErrors;\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 taxRegion: { ...taxRegion, id: _id },\n });\n\n const reqOpts = ambassadorWixBillingV1TaxRegion.updateTaxRegion(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.taxRegion!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { taxRegion: '$[1]' },\n explicitPathsToArguments: { 'taxRegion.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'taxRegion']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateTaxRegion {\n /**\n * Tax region ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * 2-letter country code in [ISO-3166 alpha-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format.\n * @format COUNTRY\n * @minLength 2\n */\n country?: string;\n /**\n * Subdivision (such as state, prefecture, or province) in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.\n * @maxLength 50\n */\n subdivision?: string;\n /**\n * The tax calculator ID to use to calculate tax for this region.\n *\n * Call List Tax Calculators to retrieve a list of available calculators for a site.\n * @format GUID\n */\n appId?: string;\n /** Whether tax is included in the price. */\n taxIncludedInPrice?: boolean;\n /**\n * Revision number, which increments by 1 each time the tax region is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the tax region.\n *\n * Ignored when creating a tax region.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the tax region was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the tax region was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n}\n\n/**\n * Deletes a tax region.\n *\n * When a tax region is deleted, tax is not calculated and zero tax will be returned for addresses in this region.\n * @param taxRegionId - ID of the tax region to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField taxRegionId\n * @permissionId BILLING.TAX_REGION_DELETE\n * @applicableIdentity APP\n * @fqn wix.billing.v1.TaxRegionsService.DeleteTaxRegion\n */\nexport async function deleteTaxRegion(taxRegionId: 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 taxRegionId: taxRegionId,\n });\n\n const reqOpts = ambassadorWixBillingV1TaxRegion.deleteTaxRegion(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: { taxRegionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['taxRegionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates a query to retrieve a list of tax regions.\n *\n * The `queryTaxRegions()` function builds a query to retrieve a list of tax regions and returns a `TaxRegionsQueryBuilder` 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 `TaxRegionsQueryBuilder` functions onto the query. `TaxRegionsQueryBuilder` functions enable you to sort, filter, and control the results that `queryTaxRegions()` returns.\n *\n * `queryTaxRegions()` runs with the following `TaxRegionsQueryBuilder` default that you can override:\n * + `ascending(\"_id\")`\n *\n * The functions that are chained to `queryTaxRegions()` are applied in the order they are called. For example, if you apply `ascending(\"country\")` and then `ascending(\"subdivision\")`, the results are sorted first by the `\"country\"`, and then, if there are multiple results with the same `\"country\"`, the items are sorted by `\"subdivision\"`.\n *\n * The following `TaxRegionsQueryBuilder` functions are supported for the `queryTaxRegions()` function. For a full description of the tax region object, see the object returned for the `items` property in `TaxRegionsQueryResult`.\n * @public\n * @documentationMaturity preview\n * @permissionId BILLING.TAX_REGION_READ\n * @applicableIdentity APP\n * @fqn wix.billing.v1.TaxRegionsService.QueryTaxRegions\n */\nexport function queryTaxRegions(): TaxRegionsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n TaxRegion,\n 'CURSOR',\n QueryTaxRegionsRequest,\n QueryTaxRegionsResponse\n >({\n func: async (payload: QueryTaxRegionsRequest) => {\n const reqOpts = ambassadorWixBillingV1TaxRegion.queryTaxRegions(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: QueryTaxRegionsRequest['query']) => {\n const args = [query, {}] as [QueryTaxRegionsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryTaxRegionsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.taxRegions,\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 TaxRegionsQueryResult extends QueryCursorResult {\n items: TaxRegion[];\n query: TaxRegionsQueryBuilder;\n next: () => Promise<TaxRegionsQueryResult>;\n prev: () => Promise<TaxRegionsQueryResult>;\n}\n\nexport interface TaxRegionsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName:\n | '_id'\n | 'country'\n | 'subdivision'\n | 'appId'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => TaxRegionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName:\n | '_id'\n | 'country'\n | 'subdivision'\n | 'appId'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => TaxRegionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ge: (\n propertyName:\n | '_id'\n | 'country'\n | 'subdivision'\n | 'appId'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => TaxRegionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n gt: (\n propertyName:\n | '_id'\n | 'country'\n | 'subdivision'\n | 'appId'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => TaxRegionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n le: (\n propertyName:\n | '_id'\n | 'country'\n | 'subdivision'\n | 'appId'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => TaxRegionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n lt: (\n propertyName:\n | '_id'\n | 'country'\n | 'subdivision'\n | 'appId'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => TaxRegionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n * @documentationMaturity preview\n */\n startsWith: (\n propertyName: '_id' | 'country' | 'subdivision' | 'appId',\n value: string\n ) => TaxRegionsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n * @documentationMaturity preview\n */\n hasSome: (\n propertyName:\n | '_id'\n | 'country'\n | 'subdivision'\n | 'appId'\n | '_createdDate'\n | '_updatedDate',\n value: any[]\n ) => TaxRegionsQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName:\n | '_id'\n | 'country'\n | 'subdivision'\n | 'appId'\n | '_createdDate'\n | '_updatedDate',\n value: any\n ) => TaxRegionsQueryBuilder;\n /** @documentationMaturity preview */\n exists: (\n propertyName:\n | '_id'\n | 'country'\n | 'subdivision'\n | 'appId'\n | '_createdDate'\n | '_updatedDate',\n value: boolean\n ) => TaxRegionsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n ascending: (\n ...propertyNames: Array<\n | '_id'\n | 'country'\n | 'subdivision'\n | 'appId'\n | '_createdDate'\n | '_updatedDate'\n >\n ) => TaxRegionsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n descending: (\n ...propertyNames: Array<\n | '_id'\n | 'country'\n | 'subdivision'\n | 'appId'\n | '_createdDate'\n | '_updatedDate'\n >\n ) => TaxRegionsQueryBuilder;\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) => TaxRegionsQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => TaxRegionsQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<TaxRegionsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.billing.v1.TaxRegionsService.QueryTaxRegions\n * @requiredField query\n */\nexport async function typedQueryTaxRegions(\n query: TaxRegionQuery\n): Promise<\n NonNullablePaths<\n QueryTaxRegionsResponse,\n | `taxRegions`\n | `taxRegions.${number}.country`\n | `taxRegions.${number}.subdivision`\n | `taxRegions.${number}.appId`\n | `taxRegions.${number}.taxIncludedInPrice`,\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 = ambassadorWixBillingV1TaxRegion.queryTaxRegions(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 TaxRegionQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: [\n '_createdDate',\n '_id',\n '_updatedDate',\n 'appId',\n 'country',\n 'subdivision'\n ];\n operators: '*';\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n TaxRegion,\n TaxRegionQuerySpec\n>;\nexport type TaxRegionQuery = {\n /** \n Cursor paging options.\n\n Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). \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 @maxSize: 5 \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n};\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 resolveWixBillingV1TaxRegionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/billing/v1/tax-regions',\n destPath: '/v1/tax-regions',\n },\n {\n srcPath: '/billing/v1/bulk/tax-regions',\n destPath: '/v1/bulk/tax-regions',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/billing/v1/tax-regions',\n destPath: '/v1/tax-regions',\n },\n {\n srcPath: '/billing/v1/bulk/tax-regions',\n destPath: '/v1/bulk/tax-regions',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_tax-regions';\n\n/**\n * Creates a tax region.\n *\n * Tax regions require a tax calculator `appId`. Call List Tax Calculators to retrieve a list of available calculators for a site.\n *\n * Wix uses tax regions to calculate tax.\n * <!-- Subdivisions are supported for the following countries: `AU`, `BR`, `CA`, `FR`, `DE`, `IN`, `IT`, `MX`, `NL`, `ES`, `AE`, `GB`, `US` -->\n */\nexport function createTaxRegion(payload: object): RequestOptionsFactory<any> {\n function __createTaxRegion({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'taxRegion.createdDate' },\n { path: 'taxRegion.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.billing.v1.tax_region',\n method: 'POST' as any,\n methodFqn: 'wix.billing.v1.TaxRegionsService.CreateTaxRegion',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBillingV1TaxRegionsServiceUrl({\n protoPath: '/v1/tax-regions',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'taxRegion.createdDate' },\n { path: 'taxRegion.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createTaxRegion;\n}\n\n/** Retrieves a tax region. */\nexport function getTaxRegion(payload: object): RequestOptionsFactory<any> {\n function __getTaxRegion({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.tax_region',\n method: 'GET' as any,\n methodFqn: 'wix.billing.v1.TaxRegionsService.GetTaxRegion',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBillingV1TaxRegionsServiceUrl({\n protoPath: '/v1/tax-regions/{taxRegionId}',\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: 'taxRegion.createdDate' },\n { path: 'taxRegion.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getTaxRegion;\n}\n\n/**\n * Updates a tax region.\n *\n * Each time the tax region is updated, `revision` increments by 1.\n * The current `revision` must be passed when updating the tax region.\n * This ensures you're working with the latest tax region and prevents\n * unintended overwrites.\n */\nexport function updateTaxRegion(payload: object): RequestOptionsFactory<any> {\n function __updateTaxRegion({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'taxRegion.createdDate' },\n { path: 'taxRegion.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.billing.v1.tax_region',\n method: 'PATCH' as any,\n methodFqn: 'wix.billing.v1.TaxRegionsService.UpdateTaxRegion',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBillingV1TaxRegionsServiceUrl({\n protoPath: '/v1/tax-regions/{taxRegion.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: 'taxRegion.createdDate' },\n { path: 'taxRegion.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateTaxRegion;\n}\n\n/**\n * Deletes a tax region.\n *\n * When a tax region is deleted, tax is not calculated and zero tax will be returned for addresses in this region.\n */\nexport function deleteTaxRegion(payload: object): RequestOptionsFactory<any> {\n function __deleteTaxRegion({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.tax_region',\n method: 'DELETE' as any,\n methodFqn: 'wix.billing.v1.TaxRegionsService.DeleteTaxRegion',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBillingV1TaxRegionsServiceUrl({\n protoPath: '/v1/tax-regions/{taxRegionId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteTaxRegion;\n}\n\n/**\n * Creates a query to retrieve a list of tax regions.\n *\n * The `queryTaxRegions()` function builds a query to retrieve a list of tax regions and returns a `TaxRegionsQueryBuilder` 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 `TaxRegionsQueryBuilder` functions onto the query. `TaxRegionsQueryBuilder` functions enable you to sort, filter, and control the results that `queryTaxRegions()` returns.\n *\n * `queryTaxRegions()` runs with the following `TaxRegionsQueryBuilder` default that you can override:\n * + `ascending(\"_id\")`\n *\n * The functions that are chained to `queryTaxRegions()` are applied in the order they are called. For example, if you apply `ascending(\"country\")` and then `ascending(\"subdivision\")`, the results are sorted first by the `\"country\"`, and then, if there are multiple results with the same `\"country\"`, the items are sorted by `\"subdivision\"`.\n *\n * The following `TaxRegionsQueryBuilder` functions are supported for the `queryTaxRegions()` function. For a full description of the tax region object, see the object returned for the `items` property in `TaxRegionsQueryResult`.\n */\nexport function queryTaxRegions(payload: object): RequestOptionsFactory<any> {\n function __queryTaxRegions({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.billing.v1.tax_region',\n method: 'POST' as any,\n methodFqn: 'wix.billing.v1.TaxRegionsService.QueryTaxRegions',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBillingV1TaxRegionsServiceUrl({\n protoPath: '/v1/tax-regions/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: 'taxRegions.createdDate' },\n { path: 'taxRegions.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryTaxRegions;\n}\n","import {\n createTaxRegion as publicCreateTaxRegion,\n getTaxRegion as publicGetTaxRegion,\n updateTaxRegion as publicUpdateTaxRegion,\n deleteTaxRegion as publicDeleteTaxRegion,\n queryTaxRegions as publicQueryTaxRegions,\n typedQueryTaxRegions as publicTypedQueryTaxRegions,\n} from './billing-v1-tax-region-tax-regions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n TaxRegionQuery,\n TaxRegionsQueryBuilder,\n typedQueryTaxRegions as universalTypedQueryTaxRegions,\n} from './billing-v1-tax-region-tax-regions.universal.js';\nimport { onTaxRegionCreated as publicOnTaxRegionCreated } from './billing-v1-tax-region-tax-regions.public.js';\nimport { onTaxRegionDeleted as publicOnTaxRegionDeleted } from './billing-v1-tax-region-tax-regions.public.js';\nimport { onTaxRegionUpdated as publicOnTaxRegionUpdated } from './billing-v1-tax-region-tax-regions.public.js';\n\nfunction customQueryTaxRegions(httpClient: HttpClient) {\n const router = createQueryOverloadRouter({\n builderQueryFunction: () => publicQueryTaxRegions(httpClient)(),\n typedQueryFunction: (query: TaxRegionQuery) =>\n publicTypedQueryTaxRegions(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): TaxRegionsQueryBuilder;\n function overloadedQuery(\n query: TaxRegionQuery\n ): ReturnType<typeof universalTypedQueryTaxRegions>;\n function overloadedQuery(query?: TaxRegionQuery): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const createTaxRegion: MaybeContext<\n BuildRESTFunction<typeof publicCreateTaxRegion> & typeof publicCreateTaxRegion\n> = /*#__PURE__*/ createRESTModule(publicCreateTaxRegion);\nexport const getTaxRegion: MaybeContext<\n BuildRESTFunction<typeof publicGetTaxRegion> & typeof publicGetTaxRegion\n> = /*#__PURE__*/ createRESTModule(publicGetTaxRegion);\nexport const updateTaxRegion: MaybeContext<\n BuildRESTFunction<typeof publicUpdateTaxRegion> & typeof publicUpdateTaxRegion\n> = /*#__PURE__*/ createRESTModule(publicUpdateTaxRegion);\nexport const deleteTaxRegion: MaybeContext<\n BuildRESTFunction<typeof publicDeleteTaxRegion> & typeof publicDeleteTaxRegion\n> = /*#__PURE__*/ createRESTModule(publicDeleteTaxRegion);\nexport const queryTaxRegions: MaybeContext<\n BuildRESTFunction<typeof customQueryTaxRegions> & typeof customQueryTaxRegions\n> = /*#__PURE__*/ createRESTModule(customQueryTaxRegions);\n/** */\nexport const onTaxRegionCreated: BuildEventDefinition<\n typeof publicOnTaxRegionCreated\n> &\n typeof publicOnTaxRegionCreated = createEventModule(publicOnTaxRegionCreated);\n/**\n * Triggered when a tax region is deleted.\n */\nexport const onTaxRegionDeleted: BuildEventDefinition<\n typeof publicOnTaxRegionDeleted\n> &\n typeof publicOnTaxRegionDeleted = createEventModule(publicOnTaxRegionDeleted);\n/**\n * Triggered when a tax region is updated.\n */\nexport const onTaxRegionUpdated: BuildEventDefinition<\n typeof publicOnTaxRegionUpdated\n> &\n typeof publicOnTaxRegionUpdated = createEventModule(publicOnTaxRegionUpdated);\n\nexport {\n SortOrder,\n WebhookIdentityType,\n} from './billing-v1-tax-region-tax-regions.universal.js';\nexport {\n TaxRegion,\n CreateTaxRegionRequest,\n CreateTaxRegionResponse,\n ConflictErrorDetails,\n BulkCreateTaxRegionRequest,\n BulkCreateTaxRegionResponse,\n BulkCreateTaxRegionResult,\n ItemMetadata,\n ApplicationError,\n BulkActionMetadata,\n GetTaxRegionRequest,\n GetTaxRegionResponse,\n UpdateTaxRegionRequest,\n UpdateTaxRegionResponse,\n DeleteTaxRegionRequest,\n DeleteTaxRegionResponse,\n QueryTaxRegionsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryTaxRegionsResponse,\n CursorPagingMetadata,\n Cursors,\n CreateOrGetTaxRegionWithoutValidationRequest,\n CreateOrGetTaxRegionWithoutValidationResponse,\n DeleteTaxRegionWithoutDomainEventsRequest,\n DeleteTaxRegionWithoutDomainEventsResponse,\n BulkRestoreTaxRegionsRequest,\n BulkRestoreTaxRegionsResponse,\n BulkRestoreTaxRegionsResult,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n TaxRegionCreatedEnvelope,\n TaxRegionDeletedEnvelope,\n TaxRegionUpdatedEnvelope,\n UpdateTaxRegion,\n TaxRegionsQueryResult,\n TaxRegionsQueryBuilder,\n TaxRegionQuerySpec,\n} from './billing-v1-tax-region-tax-regions.universal.js';\nexport {\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n CreateTaxRegionApplicationErrors,\n UpdateTaxRegionApplicationErrors,\n CommonQueryWithEntityContext,\n TaxRegionQuery,\n} from './billing-v1-tax-region-tax-regions.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,yBAAAA;AAAA,EAAA,uBAAAC;AAAA,EAAA,oBAAAC;AAAA,EAAA,0BAAAC;AAAA,EAAA,0BAAAC;AAAA,EAAA,0BAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,uBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,wCACP,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,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAA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,CAAC,cACC;AAAA,QACE,wCAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;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,EAA4B;;;AGlP5B,IAAAC,uBAAiC;AACjC,sCAAkC;AAOlC,iCAA0C;AAU1C,SAAS,sBAAsB,YAAwB;AACrD,QAAM,aAAS,sDAA0B;AAAA,IACvC,sBAAsB,MAAMC,iBAAsB,UAAU,EAAE;AAAA,IAC9D,oBAAoB,CAAC,UACnBC,sBAA2B,UAAU,EAAE,KAAK;AAAA,IAC9C,qBAAqB;AAAA,EACvB,CAAC;AAMD,WAAS,gBAAgB,OAA6B;AACpD,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,mBAEK,2DAAiBA,gBAAqB;AACjD,IAAMC,gBAEK,2DAAiBA,aAAkB;AAC9C,IAAMC,mBAEK,2DAAiBA,gBAAqB;AACjD,IAAMC,mBAEK,2DAAiBA,gBAAqB;AACjD,IAAML,mBAEK,2DAAiB,qBAAqB;AAEjD,IAAMM,0BAGuB,mDAAkB,kBAAwB;AAIvE,IAAMC,0BAGuB,mDAAkB,kBAAwB;AAIvE,IAAMC,0BAGuB,mDAAkB,kBAAwB;","names":["createTaxRegion","deleteTaxRegion","getTaxRegion","onTaxRegionCreated","onTaxRegionDeleted","onTaxRegionUpdated","queryTaxRegions","updateTaxRegion","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_timestamp","import_rest_modules","payload","import_transform_paths","SortOrder","WebhookIdentityType","createTaxRegion","sdkTransformError","getTaxRegion","updateTaxRegion","deleteTaxRegion","queryTaxRegions","createTaxRegion","getTaxRegion","updateTaxRegion","deleteTaxRegion","queryTaxRegions","typedQueryTaxRegions","import_rest_modules","queryTaxRegions","typedQueryTaxRegions","createTaxRegion","getTaxRegion","updateTaxRegion","deleteTaxRegion","onTaxRegionCreated","onTaxRegionDeleted","onTaxRegionUpdated"]}
@@ -1,4 +1,4 @@
1
- import { NonNullablePaths } from '@wix/sdk-types';
1
+ import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types';
2
2
 
3
3
  /**
4
4
  * A tax region uses a location to define a specific tax treatment.
@@ -804,6 +804,69 @@ interface TaxRegionsQueryBuilder {
804
804
  * @fqn wix.billing.v1.TaxRegionsService.QueryTaxRegions
805
805
  * @requiredField query
806
806
  */
807
- declare function typedQueryTaxRegions(query: CursorQuery): Promise<NonNullablePaths<QueryTaxRegionsResponse, `taxRegions` | `taxRegions.${number}.country` | `taxRegions.${number}.subdivision` | `taxRegions.${number}.appId` | `taxRegions.${number}.taxIncludedInPrice`, 4>>;
807
+ declare function typedQueryTaxRegions(query: TaxRegionQuery): Promise<NonNullablePaths<QueryTaxRegionsResponse, `taxRegions` | `taxRegions.${number}.country` | `taxRegions.${number}.subdivision` | `taxRegions.${number}.appId` | `taxRegions.${number}.taxIncludedInPrice`, 4>>;
808
+ interface TaxRegionQuerySpec extends QuerySpec {
809
+ paging: 'cursor';
810
+ wql: [
811
+ {
812
+ fields: [
813
+ '_createdDate',
814
+ '_id',
815
+ '_updatedDate',
816
+ 'appId',
817
+ 'country',
818
+ 'subdivision'
819
+ ];
820
+ operators: '*';
821
+ sort: 'BOTH';
822
+ }
823
+ ];
824
+ }
825
+ type CommonQueryWithEntityContext = Query<TaxRegion, TaxRegionQuerySpec>;
826
+ type TaxRegionQuery = {
827
+ /**
828
+ Cursor paging options.
829
+
830
+ Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
831
+ */
832
+ cursorPaging?: {
833
+ /**
834
+ Maximum number of items to return in the results.
835
+ @max: 100
836
+ */
837
+ limit?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit'] | null;
838
+ /**
839
+ Pointer to the next or previous page in the list of results.
840
+
841
+ Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
842
+ Not relevant for the first request.
843
+ @maxLength: 16000
844
+ */
845
+ cursor?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor'] | null;
846
+ };
847
+ /**
848
+ Filter object.
849
+
850
+ Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
851
+ */
852
+ filter?: CommonQueryWithEntityContext['filter'] | null;
853
+ /**
854
+ Sort object.
855
+
856
+ Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
857
+ @maxSize: 5
858
+ */
859
+ sort?: {
860
+ /**
861
+ Name of the field to sort by.
862
+ @maxLength: 512
863
+ */
864
+ fieldName?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['fieldName'];
865
+ /**
866
+ Sort order.
867
+ */
868
+ order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
869
+ }[];
870
+ };
808
871
 
809
- export { type ActionEvent, type ApplicationError, type BaseEventMetadata, type BulkActionMetadata, type BulkCreateTaxRegionRequest, type BulkCreateTaxRegionResponse, type BulkCreateTaxRegionResult, type BulkRestoreTaxRegionsRequest, type BulkRestoreTaxRegionsResponse, type BulkRestoreTaxRegionsResult, type ConflictErrorDetails, type CreateOrGetTaxRegionWithoutValidationRequest, type CreateOrGetTaxRegionWithoutValidationResponse, type CreateTaxRegionApplicationErrors, type CreateTaxRegionRequest, type CreateTaxRegionResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteTaxRegionRequest, type DeleteTaxRegionResponse, type DeleteTaxRegionWithoutDomainEventsRequest, type DeleteTaxRegionWithoutDomainEventsResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type GetTaxRegionRequest, type GetTaxRegionResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type MessageEnvelope, type QueryTaxRegionsRequest, type QueryTaxRegionsResponse, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, type TaxRegion, type TaxRegionCreatedEnvelope, type TaxRegionDeletedEnvelope, type TaxRegionUpdatedEnvelope, type TaxRegionsQueryBuilder, type TaxRegionsQueryResult, type UpdateTaxRegion, type UpdateTaxRegionApplicationErrors, type UpdateTaxRegionRequest, type UpdateTaxRegionResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createTaxRegion, deleteTaxRegion, getTaxRegion, onTaxRegionCreated, onTaxRegionDeleted, onTaxRegionUpdated, queryTaxRegions, typedQueryTaxRegions, updateTaxRegion };
872
+ export { type ActionEvent, type ApplicationError, type BaseEventMetadata, type BulkActionMetadata, type BulkCreateTaxRegionRequest, type BulkCreateTaxRegionResponse, type BulkCreateTaxRegionResult, type BulkRestoreTaxRegionsRequest, type BulkRestoreTaxRegionsResponse, type BulkRestoreTaxRegionsResult, type CommonQueryWithEntityContext, type ConflictErrorDetails, type CreateOrGetTaxRegionWithoutValidationRequest, type CreateOrGetTaxRegionWithoutValidationResponse, type CreateTaxRegionApplicationErrors, type CreateTaxRegionRequest, type CreateTaxRegionResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteTaxRegionRequest, type DeleteTaxRegionResponse, type DeleteTaxRegionWithoutDomainEventsRequest, type DeleteTaxRegionWithoutDomainEventsResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type GetTaxRegionRequest, type GetTaxRegionResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type MessageEnvelope, type QueryTaxRegionsRequest, type QueryTaxRegionsResponse, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, type TaxRegion, type TaxRegionCreatedEnvelope, type TaxRegionDeletedEnvelope, type TaxRegionQuery, type TaxRegionQuerySpec, type TaxRegionUpdatedEnvelope, type TaxRegionsQueryBuilder, type TaxRegionsQueryResult, type UpdateTaxRegion, type UpdateTaxRegionApplicationErrors, type UpdateTaxRegionRequest, type UpdateTaxRegionResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createTaxRegion, deleteTaxRegion, getTaxRegion, onTaxRegionCreated, onTaxRegionDeleted, onTaxRegionUpdated, queryTaxRegions, typedQueryTaxRegions, updateTaxRegion };