@wix/auto_sdk_ecom_tax-regions 1.0.3 → 1.0.4
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.
- package/build/{internal/cjs/src/billing-v1-tax-region-tax-regions.universal.d.ts → billing-v1-tax-region-tax-regions.universal-0Nssv7EX.d.mts} +53 -245
- package/build/{cjs/src/billing-v1-tax-region-tax-regions.universal.d.ts → billing-v1-tax-region-tax-regions.universal-0Nssv7EX.d.ts} +53 -245
- package/build/index.d.mts +91 -0
- package/build/index.d.ts +91 -0
- package/build/index.js +493 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +460 -0
- package/build/index.mjs.map +1 -0
- package/build/{es/src/billing-v1-tax-region-tax-regions.universal.d.ts → internal/billing-v1-tax-region-tax-regions.universal-0Nssv7EX.d.mts} +53 -245
- package/build/internal/{es/src/billing-v1-tax-region-tax-regions.universal.d.ts → billing-v1-tax-region-tax-regions.universal-0Nssv7EX.d.ts} +53 -245
- package/build/internal/index.d.mts +91 -0
- package/build/internal/index.d.ts +91 -0
- package/build/internal/index.js +493 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +460 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/internal/meta.d.mts +206 -0
- package/build/internal/meta.d.ts +206 -0
- package/build/internal/meta.js +312 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +281 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/meta.d.mts +206 -0
- package/build/meta.d.ts +206 -0
- package/build/meta.js +312 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +281 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +13 -12
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/billing-v1-tax-region-tax-regions.context.d.ts +0 -23
- package/build/cjs/src/billing-v1-tax-region-tax-regions.context.js +0 -28
- package/build/cjs/src/billing-v1-tax-region-tax-regions.context.js.map +0 -1
- package/build/cjs/src/billing-v1-tax-region-tax-regions.http.d.ts +0 -44
- package/build/cjs/src/billing-v1-tax-region-tax-regions.http.js +0 -227
- package/build/cjs/src/billing-v1-tax-region-tax-regions.http.js.map +0 -1
- package/build/cjs/src/billing-v1-tax-region-tax-regions.meta.d.ts +0 -23
- package/build/cjs/src/billing-v1-tax-region-tax-regions.meta.js +0 -123
- package/build/cjs/src/billing-v1-tax-region-tax-regions.meta.js.map +0 -1
- package/build/cjs/src/billing-v1-tax-region-tax-regions.public.d.ts +0 -77
- package/build/cjs/src/billing-v1-tax-region-tax-regions.public.js +0 -73
- package/build/cjs/src/billing-v1-tax-region-tax-regions.public.js.map +0 -1
- package/build/cjs/src/billing-v1-tax-region-tax-regions.types.d.ts +0 -427
- package/build/cjs/src/billing-v1-tax-region-tax-regions.types.js +0 -17
- package/build/cjs/src/billing-v1-tax-region-tax-regions.types.js.map +0 -1
- package/build/cjs/src/billing-v1-tax-region-tax-regions.universal.js +0 -311
- package/build/cjs/src/billing-v1-tax-region-tax-regions.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/package.json +0 -3
- package/build/es/src/billing-v1-tax-region-tax-regions.context.d.ts +0 -23
- package/build/es/src/billing-v1-tax-region-tax-regions.context.js +0 -23
- package/build/es/src/billing-v1-tax-region-tax-regions.context.js.map +0 -1
- package/build/es/src/billing-v1-tax-region-tax-regions.http.d.ts +0 -44
- package/build/es/src/billing-v1-tax-region-tax-regions.http.js +0 -219
- package/build/es/src/billing-v1-tax-region-tax-regions.http.js.map +0 -1
- package/build/es/src/billing-v1-tax-region-tax-regions.meta.d.ts +0 -23
- package/build/es/src/billing-v1-tax-region-tax-regions.meta.js +0 -92
- package/build/es/src/billing-v1-tax-region-tax-regions.meta.js.map +0 -1
- package/build/es/src/billing-v1-tax-region-tax-regions.public.d.ts +0 -77
- package/build/es/src/billing-v1-tax-region-tax-regions.public.js +0 -63
- package/build/es/src/billing-v1-tax-region-tax-regions.public.js.map +0 -1
- package/build/es/src/billing-v1-tax-region-tax-regions.types.d.ts +0 -427
- package/build/es/src/billing-v1-tax-region-tax-regions.types.js +0 -14
- package/build/es/src/billing-v1-tax-region-tax-regions.types.js.map +0 -1
- package/build/es/src/billing-v1-tax-region-tax-regions.universal.js +0 -280
- package/build/es/src/billing-v1-tax-region-tax-regions.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.context.d.ts +0 -23
- package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.context.js +0 -28
- package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.context.js.map +0 -1
- package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.http.d.ts +0 -44
- package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.http.js +0 -227
- package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.http.js.map +0 -1
- package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.meta.d.ts +0 -23
- package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.meta.js +0 -123
- package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.meta.js.map +0 -1
- package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.public.d.ts +0 -77
- package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.public.js +0 -73
- package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.public.js.map +0 -1
- package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.types.d.ts +0 -427
- package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.types.js +0 -17
- package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.types.js.map +0 -1
- package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.universal.js +0 -311
- package/build/internal/cjs/src/billing-v1-tax-region-tax-regions.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/billing-v1-tax-region-tax-regions.context.d.ts +0 -23
- package/build/internal/es/src/billing-v1-tax-region-tax-regions.context.js +0 -23
- package/build/internal/es/src/billing-v1-tax-region-tax-regions.context.js.map +0 -1
- package/build/internal/es/src/billing-v1-tax-region-tax-regions.http.d.ts +0 -44
- package/build/internal/es/src/billing-v1-tax-region-tax-regions.http.js +0 -219
- package/build/internal/es/src/billing-v1-tax-region-tax-regions.http.js.map +0 -1
- package/build/internal/es/src/billing-v1-tax-region-tax-regions.meta.d.ts +0 -23
- package/build/internal/es/src/billing-v1-tax-region-tax-regions.meta.js +0 -92
- package/build/internal/es/src/billing-v1-tax-region-tax-regions.meta.js.map +0 -1
- package/build/internal/es/src/billing-v1-tax-region-tax-regions.public.d.ts +0 -77
- package/build/internal/es/src/billing-v1-tax-region-tax-regions.public.js +0 -63
- package/build/internal/es/src/billing-v1-tax-region-tax-regions.public.js.map +0 -1
- package/build/internal/es/src/billing-v1-tax-region-tax-regions.types.d.ts +0 -427
- package/build/internal/es/src/billing-v1-tax-region-tax-regions.types.js +0 -14
- package/build/internal/es/src/billing-v1-tax-region-tax-regions.types.js.map +0 -1
- package/build/internal/es/src/billing-v1-tax-region-tax-regions.universal.js +0 -280
- package/build/internal/es/src/billing-v1-tax-region-tax-regions.universal.js.map +0 -1
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
+
import { T as TaxRegion, U as UpdateTaxRegion, a as TaxRegionsQueryBuilder } from './billing-v1-tax-region-tax-regions.universal-0Nssv7EX.js';
|
|
3
|
+
export { J as ActionEvent, A as ApplicationError, N as BaseEventMetadata, f as BulkActionMetadata, B as BulkCreateTaxRegionRequest, d as BulkCreateTaxRegionResponse, e as BulkCreateTaxRegionResult, v as BulkRestoreTaxRegionsRequest, w as BulkRestoreTaxRegionsResponse, x as BulkRestoreTaxRegionsResult, c as ConflictErrorDetails, r as CreateOrGetTaxRegionWithoutValidationRequest, s as CreateOrGetTaxRegionWithoutValidationResponse, C as CreateTaxRegionRequest, b as CreateTaxRegionResponse, n as CursorPaging, p as CursorPagingMetadata, k as CursorQuery, l as CursorQueryPagingMethodOneOf, q as Cursors, D as DeleteTaxRegionRequest, j as DeleteTaxRegionResponse, t as DeleteTaxRegionWithoutDomainEventsRequest, u as DeleteTaxRegionWithoutDomainEventsResponse, y as DomainEvent, z as DomainEventBodyOneOf, E as EntityCreatedEvent, H as EntityDeletedEvent, F as EntityUpdatedEvent, O as EventMetadata, G as GetTaxRegionRequest, g as GetTaxRegionResponse, K as IdentificationData, L as IdentificationDataIdOneOf, I as ItemMetadata, M as MessageEnvelope, Q as QueryTaxRegionsRequest, o as QueryTaxRegionsResponse, R as RestoreInfo, S as SortOrder, m as Sorting, P as TaxRegionCreatedEnvelope, V as TaxRegionDeletedEnvelope, X as TaxRegionUpdatedEnvelope, Y as TaxRegionsQueryResult, h as UpdateTaxRegionRequest, i as UpdateTaxRegionResponse, W as WebhookIdentityType } from './billing-v1-tax-region-tax-regions.universal-0Nssv7EX.js';
|
|
4
|
+
import { createEventModule } from '@wix/sdk-runtime/event-definition-modules';
|
|
5
|
+
|
|
6
|
+
declare function createTaxRegion$1(httpClient: HttpClient): CreateTaxRegionSignature;
|
|
7
|
+
interface CreateTaxRegionSignature {
|
|
8
|
+
/**
|
|
9
|
+
* Creates a tax region.
|
|
10
|
+
*
|
|
11
|
+
* Tax regions require a tax calculator `appId`. Call List Tax Calculators to retrieve a list of available calculators for a site.
|
|
12
|
+
*
|
|
13
|
+
* Wix uses tax regions to calculate tax.
|
|
14
|
+
* <!-- Subdivisions are supported for the following countries: `AU`, `BR`, `CA`, `FR`, `DE`, `IN`, `IT`, `MX`, `NL`, `ES`, `AE`, `GB`, `US` -->
|
|
15
|
+
* @param - Tax region to create.
|
|
16
|
+
* @returns Created tax region.
|
|
17
|
+
*/
|
|
18
|
+
(taxRegion: TaxRegion): Promise<TaxRegion>;
|
|
19
|
+
}
|
|
20
|
+
declare function getTaxRegion$1(httpClient: HttpClient): GetTaxRegionSignature;
|
|
21
|
+
interface GetTaxRegionSignature {
|
|
22
|
+
/**
|
|
23
|
+
* Retrieves a tax region.
|
|
24
|
+
* @param - ID of the tax region to retrieve.
|
|
25
|
+
* @returns Retrieved tax region.
|
|
26
|
+
*/
|
|
27
|
+
(taxRegionId: string): Promise<TaxRegion>;
|
|
28
|
+
}
|
|
29
|
+
declare function updateTaxRegion$1(httpClient: HttpClient): UpdateTaxRegionSignature;
|
|
30
|
+
interface UpdateTaxRegionSignature {
|
|
31
|
+
/**
|
|
32
|
+
* Updates a tax region.
|
|
33
|
+
*
|
|
34
|
+
* Each time the tax region is updated, `revision` increments by 1.
|
|
35
|
+
* The current `revision` must be passed when updating the tax region.
|
|
36
|
+
* This ensures you're working with the latest tax region and prevents
|
|
37
|
+
* unintended overwrites.
|
|
38
|
+
* @param - Tax region ID.
|
|
39
|
+
* @param - Tax region info.
|
|
40
|
+
* @returns Updated tax region.
|
|
41
|
+
*/
|
|
42
|
+
(_id: string, taxRegion: UpdateTaxRegion): Promise<TaxRegion>;
|
|
43
|
+
}
|
|
44
|
+
declare function deleteTaxRegion$1(httpClient: HttpClient): DeleteTaxRegionSignature;
|
|
45
|
+
interface DeleteTaxRegionSignature {
|
|
46
|
+
/**
|
|
47
|
+
* Deletes a tax region.
|
|
48
|
+
*
|
|
49
|
+
* When a tax region is deleted, tax is not calculated and zero tax will be returned for addresses in this region.
|
|
50
|
+
* @param - ID of the tax region to delete.
|
|
51
|
+
*/
|
|
52
|
+
(taxRegionId: string): Promise<void>;
|
|
53
|
+
}
|
|
54
|
+
declare function queryTaxRegions$1(httpClient: HttpClient): QueryTaxRegionsSignature;
|
|
55
|
+
interface QueryTaxRegionsSignature {
|
|
56
|
+
/**
|
|
57
|
+
* Creates a query to retrieve a list of tax regions.
|
|
58
|
+
*
|
|
59
|
+
* The `queryTaxRegions()` function builds a query to retrieve a list of tax regions and returns a `TaxRegionsQueryBuilder` object.
|
|
60
|
+
*
|
|
61
|
+
* The returned object contains the query definition, which is typically used to run the query using the `find()` function.
|
|
62
|
+
*
|
|
63
|
+
* 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.
|
|
64
|
+
*
|
|
65
|
+
* `queryTaxRegions()` runs with the following `TaxRegionsQueryBuilder` default that you can override:
|
|
66
|
+
* + `ascending("_id")`
|
|
67
|
+
*
|
|
68
|
+
* 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"`.
|
|
69
|
+
*
|
|
70
|
+
* 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`.
|
|
71
|
+
*/
|
|
72
|
+
(): TaxRegionsQueryBuilder;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
declare const createTaxRegion: MaybeContext<BuildRESTFunction<typeof createTaxRegion$1> & typeof createTaxRegion$1>;
|
|
76
|
+
declare const getTaxRegion: MaybeContext<BuildRESTFunction<typeof getTaxRegion$1> & typeof getTaxRegion$1>;
|
|
77
|
+
declare const updateTaxRegion: MaybeContext<BuildRESTFunction<typeof updateTaxRegion$1> & typeof updateTaxRegion$1>;
|
|
78
|
+
declare const deleteTaxRegion: MaybeContext<BuildRESTFunction<typeof deleteTaxRegion$1> & typeof deleteTaxRegion$1>;
|
|
79
|
+
declare const queryTaxRegions: MaybeContext<BuildRESTFunction<typeof queryTaxRegions$1> & typeof queryTaxRegions$1>;
|
|
80
|
+
/** */
|
|
81
|
+
declare const onTaxRegionCreated: ReturnType<typeof createEventModule<typeof publicOnTaxRegionCreated>>;
|
|
82
|
+
/**
|
|
83
|
+
* Triggered when a tax region is deleted.
|
|
84
|
+
*/
|
|
85
|
+
declare const onTaxRegionDeleted: ReturnType<typeof createEventModule<typeof publicOnTaxRegionDeleted>>;
|
|
86
|
+
/**
|
|
87
|
+
* Triggered when a tax region is updated.
|
|
88
|
+
*/
|
|
89
|
+
declare const onTaxRegionUpdated: ReturnType<typeof createEventModule<typeof publicOnTaxRegionUpdated>>;
|
|
90
|
+
|
|
91
|
+
export { TaxRegion, TaxRegionsQueryBuilder, UpdateTaxRegion, createTaxRegion, deleteTaxRegion, getTaxRegion, onTaxRegionCreated, onTaxRegionDeleted, onTaxRegionUpdated, queryTaxRegions, updateTaxRegion };
|
|
@@ -0,0 +1,493 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
SortOrder: () => SortOrder,
|
|
24
|
+
WebhookIdentityType: () => WebhookIdentityType,
|
|
25
|
+
createTaxRegion: () => createTaxRegion4,
|
|
26
|
+
deleteTaxRegion: () => deleteTaxRegion4,
|
|
27
|
+
getTaxRegion: () => getTaxRegion4,
|
|
28
|
+
onTaxRegionCreated: () => onTaxRegionCreated2,
|
|
29
|
+
onTaxRegionDeleted: () => onTaxRegionDeleted2,
|
|
30
|
+
onTaxRegionUpdated: () => onTaxRegionUpdated2,
|
|
31
|
+
queryTaxRegions: () => queryTaxRegions4,
|
|
32
|
+
updateTaxRegion: () => updateTaxRegion4
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(index_exports);
|
|
35
|
+
|
|
36
|
+
// src/billing-v1-tax-region-tax-regions.public.ts
|
|
37
|
+
var import_rename_all_nested_keys2 = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
38
|
+
var import_timestamp3 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
39
|
+
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
40
|
+
var import_sdk_types = require("@wix/sdk-types");
|
|
41
|
+
|
|
42
|
+
// src/billing-v1-tax-region-tax-regions.universal.ts
|
|
43
|
+
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
44
|
+
var import_query_builder = require("@wix/sdk-runtime/query-builder");
|
|
45
|
+
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
46
|
+
|
|
47
|
+
// src/billing-v1-tax-region-tax-regions.http.ts
|
|
48
|
+
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
49
|
+
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
50
|
+
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
51
|
+
var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
|
|
52
|
+
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
53
|
+
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
54
|
+
function resolveWixBillingV1TaxRegionsServiceUrl(opts) {
|
|
55
|
+
const domainToMappings = {
|
|
56
|
+
"www.wixapis.com": [
|
|
57
|
+
{
|
|
58
|
+
srcPath: "/billing/v1/tax-regions",
|
|
59
|
+
destPath: "/v1/tax-regions"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
srcPath: "/billing/v1/bulk/tax-regions",
|
|
63
|
+
destPath: "/v1/bulk/tax-regions"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"manage._base_domain_": [
|
|
67
|
+
{
|
|
68
|
+
srcPath: "/billing/v1/tax-regions",
|
|
69
|
+
destPath: "/v1/tax-regions"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
srcPath: "/billing/v1/bulk/tax-regions",
|
|
73
|
+
destPath: "/v1/bulk/tax-regions"
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
};
|
|
77
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
78
|
+
}
|
|
79
|
+
var PACKAGE_NAME = "@wix/auto_sdk_ecom_tax-regions";
|
|
80
|
+
function createTaxRegion(payload) {
|
|
81
|
+
function __createTaxRegion({ host }) {
|
|
82
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
83
|
+
{
|
|
84
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
85
|
+
paths: [
|
|
86
|
+
{ path: "taxRegion.createdDate" },
|
|
87
|
+
{ path: "taxRegion.updatedDate" }
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
]);
|
|
91
|
+
const metadata = {
|
|
92
|
+
entityFqdn: "wix.billing.v1.tax_region",
|
|
93
|
+
method: "POST",
|
|
94
|
+
methodFqn: "wix.billing.v1.TaxRegionsService.CreateTaxRegion",
|
|
95
|
+
packageName: PACKAGE_NAME,
|
|
96
|
+
url: resolveWixBillingV1TaxRegionsServiceUrl({
|
|
97
|
+
protoPath: "/v1/tax-regions",
|
|
98
|
+
data: serializedData,
|
|
99
|
+
host
|
|
100
|
+
}),
|
|
101
|
+
data: serializedData,
|
|
102
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
103
|
+
{
|
|
104
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
105
|
+
paths: [
|
|
106
|
+
{ path: "taxRegion.createdDate" },
|
|
107
|
+
{ path: "taxRegion.updatedDate" }
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
])
|
|
111
|
+
};
|
|
112
|
+
return metadata;
|
|
113
|
+
}
|
|
114
|
+
return __createTaxRegion;
|
|
115
|
+
}
|
|
116
|
+
function getTaxRegion(payload) {
|
|
117
|
+
function __getTaxRegion({ host }) {
|
|
118
|
+
const metadata = {
|
|
119
|
+
entityFqdn: "wix.billing.v1.tax_region",
|
|
120
|
+
method: "GET",
|
|
121
|
+
methodFqn: "wix.billing.v1.TaxRegionsService.GetTaxRegion",
|
|
122
|
+
packageName: PACKAGE_NAME,
|
|
123
|
+
url: resolveWixBillingV1TaxRegionsServiceUrl({
|
|
124
|
+
protoPath: "/v1/tax-regions/{taxRegionId}",
|
|
125
|
+
data: payload,
|
|
126
|
+
host
|
|
127
|
+
}),
|
|
128
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
129
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
130
|
+
{
|
|
131
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
132
|
+
paths: [
|
|
133
|
+
{ path: "taxRegion.createdDate" },
|
|
134
|
+
{ path: "taxRegion.updatedDate" }
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
])
|
|
138
|
+
};
|
|
139
|
+
return metadata;
|
|
140
|
+
}
|
|
141
|
+
return __getTaxRegion;
|
|
142
|
+
}
|
|
143
|
+
function updateTaxRegion(payload) {
|
|
144
|
+
function __updateTaxRegion({ host }) {
|
|
145
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
146
|
+
{
|
|
147
|
+
transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
|
|
148
|
+
paths: [{ path: "fieldMask" }]
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
152
|
+
paths: [
|
|
153
|
+
{ path: "taxRegion.createdDate" },
|
|
154
|
+
{ path: "taxRegion.updatedDate" }
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
]);
|
|
158
|
+
const metadata = {
|
|
159
|
+
entityFqdn: "wix.billing.v1.tax_region",
|
|
160
|
+
method: "PATCH",
|
|
161
|
+
methodFqn: "wix.billing.v1.TaxRegionsService.UpdateTaxRegion",
|
|
162
|
+
packageName: PACKAGE_NAME,
|
|
163
|
+
url: resolveWixBillingV1TaxRegionsServiceUrl({
|
|
164
|
+
protoPath: "/v1/tax-regions/{taxRegion.id}",
|
|
165
|
+
data: serializedData,
|
|
166
|
+
host
|
|
167
|
+
}),
|
|
168
|
+
data: serializedData,
|
|
169
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
170
|
+
{
|
|
171
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
172
|
+
paths: [
|
|
173
|
+
{ path: "taxRegion.createdDate" },
|
|
174
|
+
{ path: "taxRegion.updatedDate" }
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
])
|
|
178
|
+
};
|
|
179
|
+
return metadata;
|
|
180
|
+
}
|
|
181
|
+
return __updateTaxRegion;
|
|
182
|
+
}
|
|
183
|
+
function deleteTaxRegion(payload) {
|
|
184
|
+
function __deleteTaxRegion({ host }) {
|
|
185
|
+
const metadata = {
|
|
186
|
+
entityFqdn: "wix.billing.v1.tax_region",
|
|
187
|
+
method: "DELETE",
|
|
188
|
+
methodFqn: "wix.billing.v1.TaxRegionsService.DeleteTaxRegion",
|
|
189
|
+
packageName: PACKAGE_NAME,
|
|
190
|
+
url: resolveWixBillingV1TaxRegionsServiceUrl({
|
|
191
|
+
protoPath: "/v1/tax-regions/{taxRegionId}",
|
|
192
|
+
data: payload,
|
|
193
|
+
host
|
|
194
|
+
}),
|
|
195
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
196
|
+
};
|
|
197
|
+
return metadata;
|
|
198
|
+
}
|
|
199
|
+
return __deleteTaxRegion;
|
|
200
|
+
}
|
|
201
|
+
function queryTaxRegions(payload) {
|
|
202
|
+
function __queryTaxRegions({ host }) {
|
|
203
|
+
const metadata = {
|
|
204
|
+
entityFqdn: "wix.billing.v1.tax_region",
|
|
205
|
+
method: "POST",
|
|
206
|
+
methodFqn: "wix.billing.v1.TaxRegionsService.QueryTaxRegions",
|
|
207
|
+
packageName: PACKAGE_NAME,
|
|
208
|
+
url: resolveWixBillingV1TaxRegionsServiceUrl({
|
|
209
|
+
protoPath: "/v1/tax-regions/query",
|
|
210
|
+
data: payload,
|
|
211
|
+
host
|
|
212
|
+
}),
|
|
213
|
+
data: payload,
|
|
214
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
215
|
+
{
|
|
216
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
217
|
+
paths: [
|
|
218
|
+
{ path: "taxRegions.createdDate" },
|
|
219
|
+
{ path: "taxRegions.updatedDate" }
|
|
220
|
+
]
|
|
221
|
+
}
|
|
222
|
+
])
|
|
223
|
+
};
|
|
224
|
+
return metadata;
|
|
225
|
+
}
|
|
226
|
+
return __queryTaxRegions;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// src/billing-v1-tax-region-tax-regions.universal.ts
|
|
230
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
231
|
+
SortOrder2["ASC"] = "ASC";
|
|
232
|
+
SortOrder2["DESC"] = "DESC";
|
|
233
|
+
return SortOrder2;
|
|
234
|
+
})(SortOrder || {});
|
|
235
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
236
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
237
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
238
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
239
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
240
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
241
|
+
return WebhookIdentityType2;
|
|
242
|
+
})(WebhookIdentityType || {});
|
|
243
|
+
async function createTaxRegion2(taxRegion) {
|
|
244
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
245
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
246
|
+
taxRegion
|
|
247
|
+
});
|
|
248
|
+
const reqOpts = createTaxRegion(payload);
|
|
249
|
+
sideEffects?.onSiteCall?.();
|
|
250
|
+
try {
|
|
251
|
+
const result = await httpClient.request(reqOpts);
|
|
252
|
+
sideEffects?.onSuccess?.(result);
|
|
253
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.taxRegion;
|
|
254
|
+
} catch (err) {
|
|
255
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
256
|
+
err,
|
|
257
|
+
{
|
|
258
|
+
spreadPathsToArguments: {},
|
|
259
|
+
explicitPathsToArguments: { taxRegion: "$[0]" },
|
|
260
|
+
singleArgumentUnchanged: false
|
|
261
|
+
},
|
|
262
|
+
["taxRegion"]
|
|
263
|
+
);
|
|
264
|
+
sideEffects?.onError?.(err);
|
|
265
|
+
throw transformedError;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
async function getTaxRegion2(taxRegionId) {
|
|
269
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
270
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
271
|
+
taxRegionId
|
|
272
|
+
});
|
|
273
|
+
const reqOpts = getTaxRegion(payload);
|
|
274
|
+
sideEffects?.onSiteCall?.();
|
|
275
|
+
try {
|
|
276
|
+
const result = await httpClient.request(reqOpts);
|
|
277
|
+
sideEffects?.onSuccess?.(result);
|
|
278
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.taxRegion;
|
|
279
|
+
} catch (err) {
|
|
280
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
281
|
+
err,
|
|
282
|
+
{
|
|
283
|
+
spreadPathsToArguments: {},
|
|
284
|
+
explicitPathsToArguments: { taxRegionId: "$[0]" },
|
|
285
|
+
singleArgumentUnchanged: false
|
|
286
|
+
},
|
|
287
|
+
["taxRegionId"]
|
|
288
|
+
);
|
|
289
|
+
sideEffects?.onError?.(err);
|
|
290
|
+
throw transformedError;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
async function updateTaxRegion2(_id, taxRegion) {
|
|
294
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
295
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
296
|
+
taxRegion: { ...taxRegion, id: _id }
|
|
297
|
+
});
|
|
298
|
+
const reqOpts = updateTaxRegion(payload);
|
|
299
|
+
sideEffects?.onSiteCall?.();
|
|
300
|
+
try {
|
|
301
|
+
const result = await httpClient.request(reqOpts);
|
|
302
|
+
sideEffects?.onSuccess?.(result);
|
|
303
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.taxRegion;
|
|
304
|
+
} catch (err) {
|
|
305
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
306
|
+
err,
|
|
307
|
+
{
|
|
308
|
+
spreadPathsToArguments: { taxRegion: "$[1]" },
|
|
309
|
+
explicitPathsToArguments: { "taxRegion.id": "$[0]" },
|
|
310
|
+
singleArgumentUnchanged: false
|
|
311
|
+
},
|
|
312
|
+
["_id", "taxRegion"]
|
|
313
|
+
);
|
|
314
|
+
sideEffects?.onError?.(err);
|
|
315
|
+
throw transformedError;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
async function deleteTaxRegion2(taxRegionId) {
|
|
319
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
320
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
321
|
+
taxRegionId
|
|
322
|
+
});
|
|
323
|
+
const reqOpts = deleteTaxRegion(payload);
|
|
324
|
+
sideEffects?.onSiteCall?.();
|
|
325
|
+
try {
|
|
326
|
+
const result = await httpClient.request(reqOpts);
|
|
327
|
+
sideEffects?.onSuccess?.(result);
|
|
328
|
+
} catch (err) {
|
|
329
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
330
|
+
err,
|
|
331
|
+
{
|
|
332
|
+
spreadPathsToArguments: {},
|
|
333
|
+
explicitPathsToArguments: { taxRegionId: "$[0]" },
|
|
334
|
+
singleArgumentUnchanged: false
|
|
335
|
+
},
|
|
336
|
+
["taxRegionId"]
|
|
337
|
+
);
|
|
338
|
+
sideEffects?.onError?.(err);
|
|
339
|
+
throw transformedError;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
function queryTaxRegions2() {
|
|
343
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
344
|
+
return (0, import_query_builder.queryBuilder)({
|
|
345
|
+
func: async (payload) => {
|
|
346
|
+
const reqOpts = queryTaxRegions(payload);
|
|
347
|
+
sideEffects?.onSiteCall?.();
|
|
348
|
+
try {
|
|
349
|
+
const result = await httpClient.request(reqOpts);
|
|
350
|
+
sideEffects?.onSuccess?.(result);
|
|
351
|
+
return result;
|
|
352
|
+
} catch (err) {
|
|
353
|
+
sideEffects?.onError?.(err);
|
|
354
|
+
throw err;
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
requestTransformer: (query) => {
|
|
358
|
+
const args = [query, {}];
|
|
359
|
+
return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
360
|
+
...args?.[1],
|
|
361
|
+
query: args?.[0]
|
|
362
|
+
});
|
|
363
|
+
},
|
|
364
|
+
responseTransformer: ({ data }) => {
|
|
365
|
+
const transformedData = (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(data);
|
|
366
|
+
return {
|
|
367
|
+
items: transformedData?.taxRegions,
|
|
368
|
+
pagingMetadata: transformedData?.pagingMetadata
|
|
369
|
+
};
|
|
370
|
+
},
|
|
371
|
+
errorTransformer: (err) => {
|
|
372
|
+
const transformedError = (0, import_transform_error.transformError)(err, {
|
|
373
|
+
spreadPathsToArguments: {},
|
|
374
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
375
|
+
singleArgumentUnchanged: false
|
|
376
|
+
});
|
|
377
|
+
throw transformedError;
|
|
378
|
+
},
|
|
379
|
+
pagingMethod: "CURSOR",
|
|
380
|
+
transformationPaths: {}
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
// src/billing-v1-tax-region-tax-regions.public.ts
|
|
385
|
+
function createTaxRegion3(httpClient) {
|
|
386
|
+
return (taxRegion) => createTaxRegion2(
|
|
387
|
+
taxRegion,
|
|
388
|
+
// @ts-ignore
|
|
389
|
+
{ httpClient }
|
|
390
|
+
);
|
|
391
|
+
}
|
|
392
|
+
function getTaxRegion3(httpClient) {
|
|
393
|
+
return (taxRegionId) => getTaxRegion2(
|
|
394
|
+
taxRegionId,
|
|
395
|
+
// @ts-ignore
|
|
396
|
+
{ httpClient }
|
|
397
|
+
);
|
|
398
|
+
}
|
|
399
|
+
function updateTaxRegion3(httpClient) {
|
|
400
|
+
return (_id, taxRegion) => updateTaxRegion2(
|
|
401
|
+
_id,
|
|
402
|
+
taxRegion,
|
|
403
|
+
// @ts-ignore
|
|
404
|
+
{ httpClient }
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
function deleteTaxRegion3(httpClient) {
|
|
408
|
+
return (taxRegionId) => deleteTaxRegion2(
|
|
409
|
+
taxRegionId,
|
|
410
|
+
// @ts-ignore
|
|
411
|
+
{ httpClient }
|
|
412
|
+
);
|
|
413
|
+
}
|
|
414
|
+
function queryTaxRegions3(httpClient) {
|
|
415
|
+
return () => queryTaxRegions2(
|
|
416
|
+
// @ts-ignore
|
|
417
|
+
{ httpClient }
|
|
418
|
+
);
|
|
419
|
+
}
|
|
420
|
+
var onTaxRegionCreated = (0, import_sdk_types.EventDefinition)(
|
|
421
|
+
"wix.billing.v1.tax_region_created",
|
|
422
|
+
true,
|
|
423
|
+
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
424
|
+
(0, import_transform_paths2.transformPaths)(event, [
|
|
425
|
+
{
|
|
426
|
+
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
427
|
+
paths: [
|
|
428
|
+
{ path: "entity.createdDate" },
|
|
429
|
+
{ path: "entity.updatedDate" },
|
|
430
|
+
{ path: "metadata.eventTime" }
|
|
431
|
+
]
|
|
432
|
+
}
|
|
433
|
+
])
|
|
434
|
+
)
|
|
435
|
+
)();
|
|
436
|
+
var onTaxRegionDeleted = (0, import_sdk_types.EventDefinition)(
|
|
437
|
+
"wix.billing.v1.tax_region_deleted",
|
|
438
|
+
true,
|
|
439
|
+
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
440
|
+
(0, import_transform_paths2.transformPaths)(event, [
|
|
441
|
+
{
|
|
442
|
+
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
443
|
+
paths: [
|
|
444
|
+
{ path: "undefined.createdDate" },
|
|
445
|
+
{ path: "undefined.updatedDate" },
|
|
446
|
+
{ path: "metadata.eventTime" }
|
|
447
|
+
]
|
|
448
|
+
}
|
|
449
|
+
])
|
|
450
|
+
)
|
|
451
|
+
)();
|
|
452
|
+
var onTaxRegionUpdated = (0, import_sdk_types.EventDefinition)(
|
|
453
|
+
"wix.billing.v1.tax_region_updated",
|
|
454
|
+
true,
|
|
455
|
+
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
456
|
+
(0, import_transform_paths2.transformPaths)(event, [
|
|
457
|
+
{
|
|
458
|
+
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
459
|
+
paths: [
|
|
460
|
+
{ path: "entity.createdDate" },
|
|
461
|
+
{ path: "entity.updatedDate" },
|
|
462
|
+
{ path: "metadata.eventTime" }
|
|
463
|
+
]
|
|
464
|
+
}
|
|
465
|
+
])
|
|
466
|
+
)
|
|
467
|
+
)();
|
|
468
|
+
|
|
469
|
+
// src/billing-v1-tax-region-tax-regions.context.ts
|
|
470
|
+
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
471
|
+
var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
|
|
472
|
+
var createTaxRegion4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createTaxRegion3);
|
|
473
|
+
var getTaxRegion4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getTaxRegion3);
|
|
474
|
+
var updateTaxRegion4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateTaxRegion3);
|
|
475
|
+
var deleteTaxRegion4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteTaxRegion3);
|
|
476
|
+
var queryTaxRegions4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryTaxRegions3);
|
|
477
|
+
var onTaxRegionCreated2 = (0, import_event_definition_modules.createEventModule)(onTaxRegionCreated);
|
|
478
|
+
var onTaxRegionDeleted2 = (0, import_event_definition_modules.createEventModule)(onTaxRegionDeleted);
|
|
479
|
+
var onTaxRegionUpdated2 = (0, import_event_definition_modules.createEventModule)(onTaxRegionUpdated);
|
|
480
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
481
|
+
0 && (module.exports = {
|
|
482
|
+
SortOrder,
|
|
483
|
+
WebhookIdentityType,
|
|
484
|
+
createTaxRegion,
|
|
485
|
+
deleteTaxRegion,
|
|
486
|
+
getTaxRegion,
|
|
487
|
+
onTaxRegionCreated,
|
|
488
|
+
onTaxRegionDeleted,
|
|
489
|
+
onTaxRegionUpdated,
|
|
490
|
+
queryTaxRegions,
|
|
491
|
+
updateTaxRegion
|
|
492
|
+
});
|
|
493
|
+
//# sourceMappingURL=index.js.map
|