import { CreateTaxRegionRequest as CreateTaxRegionRequest$1, CreateTaxRegionResponse as CreateTaxRegionResponse$1, GetTaxRegionRequest as GetTaxRegionRequest$1, GetTaxRegionResponse as GetTaxRegionResponse$1, UpdateTaxRegionRequest as UpdateTaxRegionRequest$1, UpdateTaxRegionResponse as UpdateTaxRegionResponse$1, DeleteTaxRegionRequest as DeleteTaxRegionRequest$1, DeleteTaxRegionResponse as DeleteTaxRegionResponse$1, QueryTaxRegionsRequest as QueryTaxRegionsRequest$1, QueryTaxRegionsResponse as QueryTaxRegionsResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; /** * A tax region uses a location to define a specific tax treatment. * A location is defined by `country` and `subdivision`. The tax region also * dictates whether or not tax is included in the displayed price. */ interface TaxRegion { /** * Tax region ID. * @format GUID * @readonly */ id?: string | null; /** * 2-letter country code in [ISO-3166 alpha-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format. * @format COUNTRY * @minLength 2 */ country?: string; /** * Subdivision (such as state, prefecture, or province) in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-2) format. * @maxLength 50 */ subdivision?: string; /** * The tax calculator ID to use to calculate tax for this region. * * Call List Tax Calculators to retrieve a list of available calculators for a site. * @format GUID */ appId?: string; /** Whether tax is included in the price. */ taxIncludedInPrice?: boolean; /** * Revision number, which increments by 1 each time the tax region is updated. * To prevent conflicting changes, the current revision must be passed when updating the tax region. * * Ignored when creating a tax region. * @readonly */ revision?: string | null; /** * Date and time the tax region was created. * @readonly */ createdDate?: Date | null; /** * Date and time the tax region was last updated. * @readonly */ updatedDate?: Date | null; } interface CreateTaxRegionRequest { /** Tax region to create. */ taxRegion: TaxRegion; } interface CreateTaxRegionResponse { /** Created tax region. */ taxRegion?: TaxRegion; } interface ConflictErrorDetails { /** * Conflict details. * @maxLength 1000 */ reasonForConflict?: string; } interface BulkCreateTaxRegionRequest { /** * Tax regions to create. * @minSize 1 * @maxSize 100 */ taxRegions?: TaxRegion[]; /** * Whether to return the full tax region objects in the response. * * Default: `true` */ returnEntity?: boolean; } interface BulkCreateTaxRegionResponse { /** * Tax regions created by bulk action. * @minSize 1 * @maxSize 100 */ results?: BulkCreateTaxRegionResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkCreateTaxRegionResult { /** Item metadata. */ itemMetadata?: ItemMetadata; /** * Tax region. * * This field is returned if the operation was successful and * `returnEntity` is set to `true`. */ item?: TaxRegion; } interface ItemMetadata { /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */ id?: string | null; /** Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; /** Details about the error in case of failure. */ error?: ApplicationError; } interface ApplicationError { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } interface BulkActionMetadata { /** Number of items that were successfully processed. */ totalSuccesses?: number; /** Number of items that couldn't be processed. */ totalFailures?: number; /** Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; } interface GetTaxRegionRequest { /** * ID of the tax region to retrieve. * @format GUID */ taxRegionId: string; } interface GetTaxRegionResponse { /** Retrieved tax region. */ taxRegion?: TaxRegion; } interface UpdateTaxRegionRequest { /** Tax region info to update. */ taxRegion: TaxRegion; } interface UpdateTaxRegionResponse { /** Updated tax region. */ taxRegion?: TaxRegion; } interface DeleteTaxRegionRequest { /** * ID of the tax region to delete. * @format GUID */ taxRegionId: string; } interface DeleteTaxRegionResponse { } interface QueryTaxRegionsRequest { /** Query options. */ query?: CursorQuery; } interface CursorQuery extends CursorQueryPagingMethodOneOf { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging; /** * Filter object. * * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters). */ filter?: Record | null; /** * Sort object. * * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting). * @maxSize 5 */ sort?: Sorting[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging; } interface Sorting { /** * Name of the field to sort by. * @maxLength 512 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface CursorPaging { /** * Maximum number of items to return in the results. * @max 100 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. * @maxLength 16000 */ cursor?: string | null; } interface QueryTaxRegionsResponse { /** Retrieved tax regions. */ taxRegions?: TaxRegion[]; /** Paging metadata. */ pagingMetadata?: CursorPagingMetadata; } interface CursorPagingMetadata { /** Number of items returned in current page. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; } interface Cursors { /** * Cursor string pointing to the next page in the list of results. * @maxLength 16000 */ next?: string | null; /** * Cursor pointing to the previous page in the list of results. * @maxLength 16000 */ prev?: string | null; } interface CreateOrGetTaxRegionWithoutValidationRequest { /** Tax region to create. */ taxRegion?: TaxRegion; } interface CreateOrGetTaxRegionWithoutValidationResponse { /** Created tax region. */ taxRegion?: TaxRegion; } interface DeleteTaxRegionWithoutDomainEventsRequest { /** * ID of the tax region to delete. * @format GUID */ taxRegionId?: string; } interface DeleteTaxRegionWithoutDomainEventsResponse { } interface BulkRestoreTaxRegionsRequest { /** * Tax region IDs to restore. * @format GUID * @minSize 1 * @maxSize 200 */ taxRegionIds?: string[]; } interface BulkRestoreTaxRegionsResponse { /** * Restored tax regions result * @minSize 1 * @maxSize 200 */ results?: BulkRestoreTaxRegionsResult[]; } interface BulkRestoreTaxRegionsResult { itemMetadata?: ItemMetadata; } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * 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. * 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. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entityAsJson?: string; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntityAsJson?: string | null; } interface ActionEvent { bodyAsJson?: string; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountDetails { /** * ID of the account. * @format GUID */ accountId?: string | null; /** * ID of the parent account. * @format GUID */ parentAccountId?: string | null; /** * ID of the site, if applicable. * @format GUID */ siteId?: string | null; } /** @docsIgnore */ type CreateTaxRegionApplicationErrors = { code?: 'ALREADY_EXISTS'; description?: string; data?: ConflictErrorDetails; } | { code?: 'CALCULATOR_ID_NOT_FOUND'; description?: string; data?: Record; } | { code?: 'CALCULATOR_IS_NOT_SUPPORTED_FOR_THIS_TAX_REGION'; description?: string; data?: Record; } | { code?: 'INVALID_SUBDIVISION_FORMAT'; description?: string; data?: Record; } | { code?: 'SUBDIVISIONS_NOT_SUPPORTED_FOR_COUNTRY'; description?: string; data?: Record; }; /** @docsIgnore */ type UpdateTaxRegionApplicationErrors = { code?: 'CALCULATOR_ID_NOT_FOUND'; description?: string; data?: Record; } | { code?: 'CALCULATOR_IS_NOT_SUPPORTED_FOR_THIS_TAX_REGION'; description?: string; data?: Record; } | { code?: 'INVALID_SUBDIVISION_FORMAT'; description?: string; data?: Record; } | { code?: 'SUBDIVISIONS_NOT_SUPPORTED_FOR_COUNTRY'; description?: string; data?: Record; }; type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function createTaxRegion(): __PublicMethodMetaInfo<'POST', {}, CreateTaxRegionRequest$1, CreateTaxRegionRequest, CreateTaxRegionResponse$1, CreateTaxRegionResponse>; declare function getTaxRegion(): __PublicMethodMetaInfo<'GET', { taxRegionId: string; }, GetTaxRegionRequest$1, GetTaxRegionRequest, GetTaxRegionResponse$1, GetTaxRegionResponse>; declare function updateTaxRegion(): __PublicMethodMetaInfo<'PATCH', { taxRegionId: string; }, UpdateTaxRegionRequest$1, UpdateTaxRegionRequest, UpdateTaxRegionResponse$1, UpdateTaxRegionResponse>; declare function deleteTaxRegion(): __PublicMethodMetaInfo<'DELETE', { taxRegionId: string; }, DeleteTaxRegionRequest$1, DeleteTaxRegionRequest, DeleteTaxRegionResponse$1, DeleteTaxRegionResponse>; declare function queryTaxRegions(): __PublicMethodMetaInfo<'POST', {}, QueryTaxRegionsRequest$1, QueryTaxRegionsRequest, QueryTaxRegionsResponse$1, QueryTaxRegionsResponse>; export { type AccountDetails as AccountDetailsOriginal, type ActionEvent as ActionEventOriginal, type ApplicationError as ApplicationErrorOriginal, type BulkActionMetadata as BulkActionMetadataOriginal, type BulkCreateTaxRegionRequest as BulkCreateTaxRegionRequestOriginal, type BulkCreateTaxRegionResponse as BulkCreateTaxRegionResponseOriginal, type BulkCreateTaxRegionResult as BulkCreateTaxRegionResultOriginal, type BulkRestoreTaxRegionsRequest as BulkRestoreTaxRegionsRequestOriginal, type BulkRestoreTaxRegionsResponse as BulkRestoreTaxRegionsResponseOriginal, type BulkRestoreTaxRegionsResult as BulkRestoreTaxRegionsResultOriginal, type ConflictErrorDetails as ConflictErrorDetailsOriginal, type CreateOrGetTaxRegionWithoutValidationRequest as CreateOrGetTaxRegionWithoutValidationRequestOriginal, type CreateOrGetTaxRegionWithoutValidationResponse as CreateOrGetTaxRegionWithoutValidationResponseOriginal, type CreateTaxRegionApplicationErrors as CreateTaxRegionApplicationErrorsOriginal, type CreateTaxRegionRequest as CreateTaxRegionRequestOriginal, type CreateTaxRegionResponse as CreateTaxRegionResponseOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type DeleteTaxRegionRequest as DeleteTaxRegionRequestOriginal, type DeleteTaxRegionResponse as DeleteTaxRegionResponseOriginal, type DeleteTaxRegionWithoutDomainEventsRequest as DeleteTaxRegionWithoutDomainEventsRequestOriginal, type DeleteTaxRegionWithoutDomainEventsResponse as DeleteTaxRegionWithoutDomainEventsResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type GetTaxRegionRequest as GetTaxRegionRequestOriginal, type GetTaxRegionResponse as GetTaxRegionResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type ItemMetadata as ItemMetadataOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type QueryTaxRegionsRequest as QueryTaxRegionsRequestOriginal, type QueryTaxRegionsResponse as QueryTaxRegionsResponseOriginal, type RestoreInfo as RestoreInfoOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, type TaxRegion as TaxRegionOriginal, type UpdateTaxRegionApplicationErrors as UpdateTaxRegionApplicationErrorsOriginal, type UpdateTaxRegionRequest as UpdateTaxRegionRequestOriginal, type UpdateTaxRegionResponse as UpdateTaxRegionResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, createTaxRegion, deleteTaxRegion, getTaxRegion, queryTaxRegions, updateTaxRegion };