@wix/auto_sdk_ecom_tax-calculation 1.0.48 → 1.0.49
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/cjs/schemas.d.ts +128 -0
- package/build/cjs/schemas.js +272 -0
- package/build/cjs/schemas.js.map +1 -0
- package/build/es/schemas.d.mts +128 -0
- package/build/es/schemas.mjs +232 -0
- package/build/es/schemas.mjs.map +1 -0
- package/build/internal/cjs/schemas.d.ts +128 -0
- package/build/internal/cjs/schemas.js +272 -0
- package/build/internal/cjs/schemas.js.map +1 -0
- package/build/internal/es/schemas.d.mts +128 -0
- package/build/internal/es/schemas.mjs +232 -0
- package/build/internal/es/schemas.mjs.map +1 -0
- package/package.json +11 -4
- package/schemas/package.json +3 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const CalculateTaxRequest: z.ZodObject<{
|
|
4
|
+
options: z.ZodObject<{
|
|
5
|
+
externalId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
6
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
7
|
+
addresses: z.ZodArray<z.ZodObject<{
|
|
8
|
+
country: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
9
|
+
subdivision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
10
|
+
city: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
11
|
+
postalCode: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
12
|
+
addressLine: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
13
|
+
addressLine2: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
14
|
+
}, z.core.$strip>>;
|
|
15
|
+
lineItems: z.ZodArray<z.ZodObject<{
|
|
16
|
+
_id: z.ZodString;
|
|
17
|
+
itemName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
18
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
price: z.ZodString;
|
|
20
|
+
itemCode: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
21
|
+
taxGroupId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
22
|
+
appId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
23
|
+
taxIncludedInPrice: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
24
|
+
addressIndex: z.ZodIntersection<z.ZodObject<{}, z.core.$strip>, z.ZodXor<readonly [z.ZodObject<{
|
|
25
|
+
singleAddress: z.ZodOptional<z.ZodNever>;
|
|
26
|
+
multipleAddresses: z.ZodOptional<z.ZodNever>;
|
|
27
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
28
|
+
multipleAddresses: z.ZodOptional<z.ZodNever>;
|
|
29
|
+
singleAddress: z.ZodNumber;
|
|
30
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
31
|
+
singleAddress: z.ZodOptional<z.ZodNever>;
|
|
32
|
+
multipleAddresses: z.ZodObject<{
|
|
33
|
+
origin: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
destination: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
}, z.core.$strip>]>>;
|
|
37
|
+
}, z.core.$strip>>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
declare const CalculateTaxResponse: z.ZodObject<{
|
|
41
|
+
externalId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
42
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
43
|
+
addresses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
44
|
+
city: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
45
|
+
subdivision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
46
|
+
country: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
47
|
+
postalCode: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
48
|
+
addressLine2: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
49
|
+
}, z.core.$strip>>>;
|
|
50
|
+
taxSummary: z.ZodOptional<z.ZodObject<{
|
|
51
|
+
totalAmount: z.ZodOptional<z.ZodString>;
|
|
52
|
+
totalTax: z.ZodOptional<z.ZodString>;
|
|
53
|
+
totalTaxableAmount: z.ZodOptional<z.ZodString>;
|
|
54
|
+
totalTaxIncludedInPrice: z.ZodOptional<z.ZodString>;
|
|
55
|
+
aggregatedTaxBreakdown: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
56
|
+
taxName: z.ZodOptional<z.ZodString>;
|
|
57
|
+
taxType: z.ZodOptional<z.ZodString>;
|
|
58
|
+
jurisdiction: z.ZodOptional<z.ZodString>;
|
|
59
|
+
jurisdictionType: z.ZodOptional<z.ZodEnum<{
|
|
60
|
+
UNDEFINED: "UNDEFINED";
|
|
61
|
+
COUNTRY: "COUNTRY";
|
|
62
|
+
STATE: "STATE";
|
|
63
|
+
COUNTY: "COUNTY";
|
|
64
|
+
CITY: "CITY";
|
|
65
|
+
SPECIAL: "SPECIAL";
|
|
66
|
+
}>>;
|
|
67
|
+
rate: z.ZodOptional<z.ZodString>;
|
|
68
|
+
aggregatedTaxAmount: z.ZodOptional<z.ZodString>;
|
|
69
|
+
}, z.core.$strip>>>;
|
|
70
|
+
}, z.core.$strip>>;
|
|
71
|
+
lineItemTaxDetails: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
72
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
73
|
+
itemName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
74
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
taxBreakdown: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
76
|
+
jurisdiction: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
77
|
+
nonTaxableAmount: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
78
|
+
rate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
79
|
+
taxAmount: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
80
|
+
taxableAmount: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
81
|
+
taxType: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
82
|
+
taxName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
83
|
+
jurisdictionType: z.ZodOptional<z.ZodEnum<{
|
|
84
|
+
UNDEFINED: "UNDEFINED";
|
|
85
|
+
COUNTRY: "COUNTRY";
|
|
86
|
+
STATE: "STATE";
|
|
87
|
+
COUNTY: "COUNTY";
|
|
88
|
+
CITY: "CITY";
|
|
89
|
+
SPECIAL: "SPECIAL";
|
|
90
|
+
}>>;
|
|
91
|
+
}, z.core.$strip>>>;
|
|
92
|
+
taxSummary: z.ZodOptional<z.ZodObject<{
|
|
93
|
+
fullPrice: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
94
|
+
taxAmount: z.ZodOptional<z.ZodString>;
|
|
95
|
+
taxableAmount: z.ZodOptional<z.ZodString>;
|
|
96
|
+
appId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
97
|
+
}, z.core.$strip>>;
|
|
98
|
+
addressIndex: z.ZodOptional<z.ZodIntersection<z.ZodObject<{}, z.core.$strip>, z.ZodXor<readonly [z.ZodObject<{
|
|
99
|
+
singleAddress: z.ZodOptional<z.ZodNever>;
|
|
100
|
+
multipleAddresses: z.ZodOptional<z.ZodNever>;
|
|
101
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
102
|
+
multipleAddresses: z.ZodOptional<z.ZodNever>;
|
|
103
|
+
singleAddress: z.ZodNumber;
|
|
104
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
105
|
+
singleAddress: z.ZodOptional<z.ZodNever>;
|
|
106
|
+
multipleAddresses: z.ZodObject<{
|
|
107
|
+
origin: z.ZodOptional<z.ZodNumber>;
|
|
108
|
+
destination: z.ZodOptional<z.ZodNumber>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
}, z.core.$strip>]>>>;
|
|
111
|
+
taxIncludedInPrice: z.ZodOptional<z.ZodBoolean>;
|
|
112
|
+
}, z.core.$strip>>>;
|
|
113
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
114
|
+
code: z.ZodOptional<z.ZodString>;
|
|
115
|
+
description: z.ZodOptional<z.ZodString>;
|
|
116
|
+
data: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
117
|
+
}, z.core.$strip>>>;
|
|
118
|
+
}, z.core.$strip>;
|
|
119
|
+
declare const ListTaxCalculatorsRequest: z.ZodObject<{}, z.core.$strip>;
|
|
120
|
+
declare const ListTaxCalculatorsResponse: z.ZodObject<{
|
|
121
|
+
taxCalculatorDetails: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
122
|
+
appId: z.ZodOptional<z.ZodString>;
|
|
123
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
124
|
+
unsupportedCountries: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
125
|
+
}, z.core.$strip>>>;
|
|
126
|
+
}, z.core.$strip>;
|
|
127
|
+
|
|
128
|
+
export { CalculateTaxRequest, CalculateTaxResponse, ListTaxCalculatorsRequest, ListTaxCalculatorsResponse };
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// schemas.ts
|
|
31
|
+
var schemas_exports = {};
|
|
32
|
+
__export(schemas_exports, {
|
|
33
|
+
CalculateTaxRequest: () => CalculateTaxRequest,
|
|
34
|
+
CalculateTaxResponse: () => CalculateTaxResponse,
|
|
35
|
+
ListTaxCalculatorsRequest: () => ListTaxCalculatorsRequest,
|
|
36
|
+
ListTaxCalculatorsResponse: () => ListTaxCalculatorsResponse
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(schemas_exports);
|
|
39
|
+
|
|
40
|
+
// src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.schemas.ts
|
|
41
|
+
var z = __toESM(require("zod"));
|
|
42
|
+
var CalculateTaxRequest = z.object({
|
|
43
|
+
options: z.object({
|
|
44
|
+
externalId: z.string().describe(
|
|
45
|
+
"Optional ID of the entity that tax is being calculated for. For example, a cart ID."
|
|
46
|
+
).regex(
|
|
47
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
48
|
+
"Must be a valid GUID"
|
|
49
|
+
).optional().nullable(),
|
|
50
|
+
currency: z.string().describe(
|
|
51
|
+
"3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
|
|
52
|
+
).optional(),
|
|
53
|
+
addresses: z.array(
|
|
54
|
+
z.object({
|
|
55
|
+
country: z.string().describe(
|
|
56
|
+
"2-letter country code in [ISO-3166 alpha-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format."
|
|
57
|
+
).optional().nullable(),
|
|
58
|
+
subdivision: z.string().describe(
|
|
59
|
+
"Subdivision (such as state, prefecture, or province) in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-2) format."
|
|
60
|
+
).max(50).optional().nullable(),
|
|
61
|
+
city: z.string().describe("City name.").max(100).optional().nullable(),
|
|
62
|
+
postalCode: z.string().describe("Postal or zip code.").max(50).optional().nullable(),
|
|
63
|
+
addressLine: z.string().describe(
|
|
64
|
+
"Main address line, usually street and number as free text."
|
|
65
|
+
).max(200).optional().nullable(),
|
|
66
|
+
addressLine2: z.string().describe(
|
|
67
|
+
"Free text providing more detailed address information, such as apartment, suite, or floor."
|
|
68
|
+
).max(200).optional().nullable()
|
|
69
|
+
})
|
|
70
|
+
).min(1).max(3),
|
|
71
|
+
lineItems: z.array(
|
|
72
|
+
z.object({
|
|
73
|
+
_id: z.string().describe("Line item ID.").min(1).max(100),
|
|
74
|
+
itemName: z.string().describe("Line item name to display.").min(0).max(250).optional().nullable(),
|
|
75
|
+
quantity: z.number().int().describe("Line item quantity.").min(1).max(1e5).optional(),
|
|
76
|
+
price: z.string().describe("Line item price."),
|
|
77
|
+
itemCode: z.string().describe(
|
|
78
|
+
"Stock keeping unit for this line item. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku)."
|
|
79
|
+
).max(40).optional().nullable(),
|
|
80
|
+
taxGroupId: z.string().describe(
|
|
81
|
+
"Tax group ID for this line item. If not provided, the default tax group applies."
|
|
82
|
+
).regex(
|
|
83
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
84
|
+
"Must be a valid GUID"
|
|
85
|
+
).optional().nullable(),
|
|
86
|
+
appId: z.string().describe(
|
|
87
|
+
'ID of the app providing the catalog for this line item.\n\nYou can get your app\'s ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n\nFor items from Wix catalogs, the following values always apply:\n+ Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`\n+ Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`\n+ Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`'
|
|
88
|
+
).regex(
|
|
89
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
90
|
+
"Must be a valid GUID"
|
|
91
|
+
).optional().nullable(),
|
|
92
|
+
taxIncludedInPrice: z.boolean().describe("Whether tax is included in the price.").optional().nullable(),
|
|
93
|
+
addressIndex: z.intersection(
|
|
94
|
+
z.object({}),
|
|
95
|
+
z.xor([
|
|
96
|
+
z.object({
|
|
97
|
+
singleAddress: z.never().optional(),
|
|
98
|
+
multipleAddresses: z.never().optional()
|
|
99
|
+
}),
|
|
100
|
+
z.object({
|
|
101
|
+
multipleAddresses: z.never().optional(),
|
|
102
|
+
singleAddress: z.number().int().describe(
|
|
103
|
+
"Single address to use for a sale location when only one address is required for tax calculations. The index is zero-based."
|
|
104
|
+
)
|
|
105
|
+
}),
|
|
106
|
+
z.object({
|
|
107
|
+
singleAddress: z.never().optional(),
|
|
108
|
+
multipleAddresses: z.object({
|
|
109
|
+
origin: z.number().int().describe("Index of the origin address.").optional(),
|
|
110
|
+
destination: z.number().int().describe("Index of the destination address.").optional()
|
|
111
|
+
}).describe(
|
|
112
|
+
"Multiple addresses to use for a sale. For example, some tax calculations may require both the address where an item is shipped from,\nas well as the address the item is shipped to."
|
|
113
|
+
)
|
|
114
|
+
})
|
|
115
|
+
])
|
|
116
|
+
).describe(
|
|
117
|
+
"Index of the address from `addresses` to use to calculate tax for this specific line item. The index is zero-based."
|
|
118
|
+
)
|
|
119
|
+
})
|
|
120
|
+
).min(1).max(300)
|
|
121
|
+
}).describe("Calculate tax options.")
|
|
122
|
+
});
|
|
123
|
+
var CalculateTaxResponse = z.object({
|
|
124
|
+
externalId: z.string().describe(
|
|
125
|
+
"Optional ID of the entity that tax is being calculated for. For example, a cart ID."
|
|
126
|
+
).regex(
|
|
127
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
128
|
+
"Must be a valid GUID"
|
|
129
|
+
).optional().nullable(),
|
|
130
|
+
currency: z.string().describe(
|
|
131
|
+
"3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format."
|
|
132
|
+
).optional(),
|
|
133
|
+
addresses: z.array(
|
|
134
|
+
z.object({
|
|
135
|
+
city: z.string().optional().nullable(),
|
|
136
|
+
subdivision: z.string().optional().nullable(),
|
|
137
|
+
country: z.string().optional().nullable(),
|
|
138
|
+
postalCode: z.string().optional().nullable(),
|
|
139
|
+
addressLine2: z.string().optional().nullable()
|
|
140
|
+
})
|
|
141
|
+
).min(1).max(3).optional(),
|
|
142
|
+
taxSummary: z.object({
|
|
143
|
+
totalAmount: z.string().describe("Total price for all line items.").optional(),
|
|
144
|
+
totalTax: z.string().describe(
|
|
145
|
+
"Total amount of tax calculated for all line items.\nNote that due to rounding, `totalTax` may not equal the sum of `lineItemTaxDetails.taxSummary.taxAmount`."
|
|
146
|
+
).optional(),
|
|
147
|
+
totalTaxableAmount: z.string().describe("Total taxable amount for all line items.").optional(),
|
|
148
|
+
totalTaxIncludedInPrice: z.string().describe(
|
|
149
|
+
"Total amount of `totalTax` that is included in price. Applies to line items with `taxIncludedInPrice` set to `true`."
|
|
150
|
+
).optional(),
|
|
151
|
+
aggregatedTaxBreakdown: z.array(
|
|
152
|
+
z.object({
|
|
153
|
+
taxName: z.string().describe("Name of the tax that was calculated.").max(200).optional(),
|
|
154
|
+
taxType: z.string().describe("Type of tax that was calculated.").max(200).optional(),
|
|
155
|
+
jurisdiction: z.string().describe("Jurisdiction that taxes were calculated for.").max(200).optional(),
|
|
156
|
+
jurisdictionType: z.enum([
|
|
157
|
+
"UNDEFINED",
|
|
158
|
+
"COUNTRY",
|
|
159
|
+
"STATE",
|
|
160
|
+
"COUNTY",
|
|
161
|
+
"CITY",
|
|
162
|
+
"SPECIAL"
|
|
163
|
+
]).describe("Type of jurisdiction that taxes were calculated for.").optional(),
|
|
164
|
+
rate: z.string().describe(
|
|
165
|
+
'Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is `"0.1000"` and 200% tax is `"2.0000"`.'
|
|
166
|
+
).optional(),
|
|
167
|
+
aggregatedTaxAmount: z.string().describe("Total amount of this tax for this jurisdiction.").optional()
|
|
168
|
+
})
|
|
169
|
+
).min(0).max(50).optional()
|
|
170
|
+
}).describe("Summary of the tax calculated.").optional(),
|
|
171
|
+
lineItemTaxDetails: z.array(
|
|
172
|
+
z.object({
|
|
173
|
+
_id: z.string().describe("Line item ID.").min(1).max(100).optional(),
|
|
174
|
+
itemName: z.string().describe("Line item name to display.").min(0).max(250).optional().nullable(),
|
|
175
|
+
quantity: z.number().int().describe("Line item quantity.").min(1).max(1e5).optional(),
|
|
176
|
+
taxBreakdown: z.array(
|
|
177
|
+
z.object({
|
|
178
|
+
jurisdiction: z.string().describe("Jurisdiction that taxes were calculated for.").max(200).optional().nullable(),
|
|
179
|
+
nonTaxableAmount: z.string().describe("Non-taxable amount of the price.").optional().nullable(),
|
|
180
|
+
rate: z.string().describe(
|
|
181
|
+
'Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is `"0.1000"` and 200% tax is `"2.0000"`.'
|
|
182
|
+
).optional().nullable(),
|
|
183
|
+
taxAmount: z.string().describe(
|
|
184
|
+
"Amount of this tax calculated for this jurisdiction."
|
|
185
|
+
).optional().nullable(),
|
|
186
|
+
taxableAmount: z.string().describe("Taxable amount of the price.").optional().nullable(),
|
|
187
|
+
taxType: z.string().describe(
|
|
188
|
+
'Type of tax that was calculated. For example, `"Sales Tax"`, `"Income Tax"`, `"Value Added Tax"`, etc.'
|
|
189
|
+
).max(200).optional().nullable(),
|
|
190
|
+
taxName: z.string().describe(
|
|
191
|
+
'Name of the tax that was calculated. For example, `"NY State Sales Tax"`, `"Quebec GST"`, etc.'
|
|
192
|
+
).max(200).optional().nullable(),
|
|
193
|
+
jurisdictionType: z.enum([
|
|
194
|
+
"UNDEFINED",
|
|
195
|
+
"COUNTRY",
|
|
196
|
+
"STATE",
|
|
197
|
+
"COUNTY",
|
|
198
|
+
"CITY",
|
|
199
|
+
"SPECIAL"
|
|
200
|
+
]).describe(
|
|
201
|
+
'Type of jurisdiction that taxes were calculated for. For example, `"State"`, `"\xC7ounty"`, `"City"`, `"Special"`, etc.'
|
|
202
|
+
).optional()
|
|
203
|
+
})
|
|
204
|
+
).max(7).optional(),
|
|
205
|
+
taxSummary: z.object({
|
|
206
|
+
fullPrice: z.string().describe(
|
|
207
|
+
"Total price for this line item.\nTo determine the price for each individual unit of this line item, divide by `quantity`."
|
|
208
|
+
).optional().nullable(),
|
|
209
|
+
taxAmount: z.string().describe("Total amount of tax calculated for this line item.").optional(),
|
|
210
|
+
taxableAmount: z.string().describe("Total taxable amount for this line item.").optional(),
|
|
211
|
+
appId: z.string().describe(
|
|
212
|
+
"ID of the calculator app that calculated tax for this line item."
|
|
213
|
+
).max(50).optional().nullable()
|
|
214
|
+
}).describe("Summary of this line item's total price and tax.").optional(),
|
|
215
|
+
addressIndex: z.intersection(
|
|
216
|
+
z.object({}),
|
|
217
|
+
z.xor([
|
|
218
|
+
z.object({
|
|
219
|
+
singleAddress: z.never().optional(),
|
|
220
|
+
multipleAddresses: z.never().optional()
|
|
221
|
+
}),
|
|
222
|
+
z.object({
|
|
223
|
+
multipleAddresses: z.never().optional(),
|
|
224
|
+
singleAddress: z.number().int().describe(
|
|
225
|
+
"Single address to use for a sale location when only one address is required for tax calculations. The index is zero-based."
|
|
226
|
+
)
|
|
227
|
+
}),
|
|
228
|
+
z.object({
|
|
229
|
+
singleAddress: z.never().optional(),
|
|
230
|
+
multipleAddresses: z.object({
|
|
231
|
+
origin: z.number().int().describe("Index of the origin address.").optional(),
|
|
232
|
+
destination: z.number().int().describe("Index of the destination address.").optional()
|
|
233
|
+
}).describe(
|
|
234
|
+
"Multiple addresses to use for a sale. For example, some tax calculations may require both the address where an item is shipped from,\nas well as the address the item is shipped to."
|
|
235
|
+
)
|
|
236
|
+
})
|
|
237
|
+
])
|
|
238
|
+
).describe(
|
|
239
|
+
"Index of the address from `addresses` to use to calculate tax for this specific line item. The index is zero-based."
|
|
240
|
+
).optional(),
|
|
241
|
+
taxIncludedInPrice: z.boolean().describe("Whether tax is included in the price.").optional()
|
|
242
|
+
})
|
|
243
|
+
).min(1).max(300).optional(),
|
|
244
|
+
errors: z.array(
|
|
245
|
+
z.object({
|
|
246
|
+
code: z.string().describe("Error code.").optional(),
|
|
247
|
+
description: z.string().describe("Description of the error.").optional(),
|
|
248
|
+
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
249
|
+
})
|
|
250
|
+
).min(0).max(100).optional()
|
|
251
|
+
});
|
|
252
|
+
var ListTaxCalculatorsRequest = z.object({});
|
|
253
|
+
var ListTaxCalculatorsResponse = z.object({
|
|
254
|
+
taxCalculatorDetails: z.array(
|
|
255
|
+
z.object({
|
|
256
|
+
appId: z.string().describe("ID of the tax calculator.").regex(
|
|
257
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
258
|
+
"Must be a valid GUID"
|
|
259
|
+
).optional(),
|
|
260
|
+
displayName: z.string().describe("Display name of the tax calculator.").min(1).max(200).optional(),
|
|
261
|
+
unsupportedCountries: z.array(z.string()).max(195).optional()
|
|
262
|
+
})
|
|
263
|
+
).max(10).optional()
|
|
264
|
+
});
|
|
265
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
266
|
+
0 && (module.exports = {
|
|
267
|
+
CalculateTaxRequest,
|
|
268
|
+
CalculateTaxResponse,
|
|
269
|
+
ListTaxCalculatorsRequest,
|
|
270
|
+
ListTaxCalculatorsResponse
|
|
271
|
+
});
|
|
272
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../schemas.ts","../../src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.schemas.ts"],"sourcesContent":["export * from './src/gateways-billing-v1-tax-calculation-gateway-tax-calculation.schemas.js';\n","import * as z from 'zod';\n\nexport const CalculateTaxRequest = z.object({\n options: z\n .object({\n externalId: z\n .string()\n .describe(\n 'Optional ID of the entity that tax is being calculated for. For example, a cart ID.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n currency: z\n .string()\n .describe(\n '3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.'\n )\n .optional(),\n addresses: z\n .array(\n z.object({\n country: z\n .string()\n .describe(\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 )\n .optional()\n .nullable(),\n subdivision: z\n .string()\n .describe(\n 'Subdivision (such as state, prefecture, or province) in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.'\n )\n .max(50)\n .optional()\n .nullable(),\n city: z\n .string()\n .describe('City name.')\n .max(100)\n .optional()\n .nullable(),\n postalCode: z\n .string()\n .describe('Postal or zip code.')\n .max(50)\n .optional()\n .nullable(),\n addressLine: z\n .string()\n .describe(\n 'Main address line, usually street and number as free text.'\n )\n .max(200)\n .optional()\n .nullable(),\n addressLine2: z\n .string()\n .describe(\n 'Free text providing more detailed address information, such as apartment, suite, or floor.'\n )\n .max(200)\n .optional()\n .nullable(),\n })\n )\n .min(1)\n .max(3),\n lineItems: z\n .array(\n z.object({\n _id: z.string().describe('Line item ID.').min(1).max(100),\n itemName: z\n .string()\n .describe('Line item name to display.')\n .min(0)\n .max(250)\n .optional()\n .nullable(),\n quantity: z\n .number()\n .int()\n .describe('Line item quantity.')\n .min(1)\n .max(100000)\n .optional(),\n price: z.string().describe('Line item price.'),\n itemCode: z\n .string()\n .describe(\n 'Stock keeping unit for this line item. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).'\n )\n .max(40)\n .optional()\n .nullable(),\n taxGroupId: z\n .string()\n .describe(\n 'Tax group ID for this line item. If not provided, the default tax group applies.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n appId: z\n .string()\n .describe(\n 'ID of the app providing the catalog for this line item.\\n\\nYou can get your app\\'s ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\\n\\nFor items from Wix catalogs, the following values always apply:\\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\\n+ Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n taxIncludedInPrice: z\n .boolean()\n .describe('Whether tax is included in the price.')\n .optional()\n .nullable(),\n addressIndex: z\n .intersection(\n z.object({}),\n z.xor([\n z.object({\n singleAddress: z.never().optional(),\n multipleAddresses: z.never().optional(),\n }),\n z.object({\n multipleAddresses: z.never().optional(),\n singleAddress: z\n .number()\n .int()\n .describe(\n 'Single address to use for a sale location when only one address is required for tax calculations. The index is zero-based.'\n ),\n }),\n z.object({\n singleAddress: z.never().optional(),\n multipleAddresses: z\n .object({\n origin: z\n .number()\n .int()\n .describe('Index of the origin address.')\n .optional(),\n destination: z\n .number()\n .int()\n .describe('Index of the destination address.')\n .optional(),\n })\n .describe(\n 'Multiple addresses to use for a sale. For example, some tax calculations may require both the address where an item is shipped from,\\nas well as the address the item is shipped to.'\n ),\n }),\n ])\n )\n .describe(\n 'Index of the address from `addresses` to use to calculate tax for this specific line item. The index is zero-based.'\n ),\n })\n )\n .min(1)\n .max(300),\n })\n .describe('Calculate tax options.'),\n});\nexport const CalculateTaxResponse = z.object({\n externalId: z\n .string()\n .describe(\n 'Optional ID of the entity that tax is being calculated for. For example, a cart ID.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n currency: z\n .string()\n .describe(\n '3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.'\n )\n .optional(),\n addresses: z\n .array(\n z.object({\n city: z.string().optional().nullable(),\n subdivision: z.string().optional().nullable(),\n country: z.string().optional().nullable(),\n postalCode: z.string().optional().nullable(),\n addressLine2: z.string().optional().nullable(),\n })\n )\n .min(1)\n .max(3)\n .optional(),\n taxSummary: z\n .object({\n totalAmount: z\n .string()\n .describe('Total price for all line items.')\n .optional(),\n totalTax: z\n .string()\n .describe(\n 'Total amount of tax calculated for all line items.\\nNote that due to rounding, `totalTax` may not equal the sum of `lineItemTaxDetails.taxSummary.taxAmount`.'\n )\n .optional(),\n totalTaxableAmount: z\n .string()\n .describe('Total taxable amount for all line items.')\n .optional(),\n totalTaxIncludedInPrice: z\n .string()\n .describe(\n 'Total amount of `totalTax` that is included in price. Applies to line items with `taxIncludedInPrice` set to `true`.'\n )\n .optional(),\n aggregatedTaxBreakdown: z\n .array(\n z.object({\n taxName: z\n .string()\n .describe('Name of the tax that was calculated.')\n .max(200)\n .optional(),\n taxType: z\n .string()\n .describe('Type of tax that was calculated.')\n .max(200)\n .optional(),\n jurisdiction: z\n .string()\n .describe('Jurisdiction that taxes were calculated for.')\n .max(200)\n .optional(),\n jurisdictionType: z\n .enum([\n 'UNDEFINED',\n 'COUNTRY',\n 'STATE',\n 'COUNTY',\n 'CITY',\n 'SPECIAL',\n ])\n .describe('Type of jurisdiction that taxes were calculated for.')\n .optional(),\n rate: z\n .string()\n .describe(\n 'Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is `\"0.1000\"` and 200% tax is `\"2.0000\"`.'\n )\n .optional(),\n aggregatedTaxAmount: z\n .string()\n .describe('Total amount of this tax for this jurisdiction.')\n .optional(),\n })\n )\n .min(0)\n .max(50)\n .optional(),\n })\n .describe('Summary of the tax calculated.')\n .optional(),\n lineItemTaxDetails: z\n .array(\n z.object({\n _id: z.string().describe('Line item ID.').min(1).max(100).optional(),\n itemName: z\n .string()\n .describe('Line item name to display.')\n .min(0)\n .max(250)\n .optional()\n .nullable(),\n quantity: z\n .number()\n .int()\n .describe('Line item quantity.')\n .min(1)\n .max(100000)\n .optional(),\n taxBreakdown: z\n .array(\n z.object({\n jurisdiction: z\n .string()\n .describe('Jurisdiction that taxes were calculated for.')\n .max(200)\n .optional()\n .nullable(),\n nonTaxableAmount: z\n .string()\n .describe('Non-taxable amount of the price.')\n .optional()\n .nullable(),\n rate: z\n .string()\n .describe(\n 'Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is `\"0.1000\"` and 200% tax is `\"2.0000\"`.'\n )\n .optional()\n .nullable(),\n taxAmount: z\n .string()\n .describe(\n 'Amount of this tax calculated for this jurisdiction.'\n )\n .optional()\n .nullable(),\n taxableAmount: z\n .string()\n .describe('Taxable amount of the price.')\n .optional()\n .nullable(),\n taxType: z\n .string()\n .describe(\n 'Type of tax that was calculated. For example, `\"Sales Tax\"`, `\"Income Tax\"`, `\"Value Added Tax\"`, etc.'\n )\n .max(200)\n .optional()\n .nullable(),\n taxName: z\n .string()\n .describe(\n 'Name of the tax that was calculated. For example, `\"NY State Sales Tax\"`, `\"Quebec GST\"`, etc.'\n )\n .max(200)\n .optional()\n .nullable(),\n jurisdictionType: z\n .enum([\n 'UNDEFINED',\n 'COUNTRY',\n 'STATE',\n 'COUNTY',\n 'CITY',\n 'SPECIAL',\n ])\n .describe(\n 'Type of jurisdiction that taxes were calculated for. For example, `\"State\"`, `\"Çounty\"`, `\"City\"`, `\"Special\"`, etc.'\n )\n .optional(),\n })\n )\n .max(7)\n .optional(),\n taxSummary: z\n .object({\n fullPrice: z\n .string()\n .describe(\n 'Total price for this line item.\\nTo determine the price for each individual unit of this line item, divide by `quantity`.'\n )\n .optional()\n .nullable(),\n taxAmount: z\n .string()\n .describe('Total amount of tax calculated for this line item.')\n .optional(),\n taxableAmount: z\n .string()\n .describe('Total taxable amount for this line item.')\n .optional(),\n appId: z\n .string()\n .describe(\n 'ID of the calculator app that calculated tax for this line item.'\n )\n .max(50)\n .optional()\n .nullable(),\n })\n .describe(\"Summary of this line item's total price and tax.\")\n .optional(),\n addressIndex: z\n .intersection(\n z.object({}),\n z.xor([\n z.object({\n singleAddress: z.never().optional(),\n multipleAddresses: z.never().optional(),\n }),\n z.object({\n multipleAddresses: z.never().optional(),\n singleAddress: z\n .number()\n .int()\n .describe(\n 'Single address to use for a sale location when only one address is required for tax calculations. The index is zero-based.'\n ),\n }),\n z.object({\n singleAddress: z.never().optional(),\n multipleAddresses: z\n .object({\n origin: z\n .number()\n .int()\n .describe('Index of the origin address.')\n .optional(),\n destination: z\n .number()\n .int()\n .describe('Index of the destination address.')\n .optional(),\n })\n .describe(\n 'Multiple addresses to use for a sale. For example, some tax calculations may require both the address where an item is shipped from,\\nas well as the address the item is shipped to.'\n ),\n }),\n ])\n )\n .describe(\n 'Index of the address from `addresses` to use to calculate tax for this specific line item. The index is zero-based.'\n )\n .optional(),\n taxIncludedInPrice: z\n .boolean()\n .describe('Whether tax is included in the price.')\n .optional(),\n })\n )\n .min(1)\n .max(300)\n .optional(),\n errors: z\n .array(\n z.object({\n code: z.string().describe('Error code.').optional(),\n description: z\n .string()\n .describe('Description of the error.')\n .optional(),\n data: z\n .record(z.string(), z.any())\n .describe('Data related to the error.')\n .optional()\n .nullable(),\n })\n )\n .min(0)\n .max(100)\n .optional(),\n});\nexport const ListTaxCalculatorsRequest = z.object({});\nexport const ListTaxCalculatorsResponse = z.object({\n taxCalculatorDetails: z\n .array(\n z.object({\n appId: z\n .string()\n .describe('ID of the tax calculator.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n displayName: z\n .string()\n .describe('Display name of the tax calculator.')\n .min(1)\n .max(200)\n .optional(),\n unsupportedCountries: z.array(z.string()).max(195).optional(),\n })\n )\n .max(10)\n .optional(),\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,QAAmB;AAEZ,IAAM,sBAAwB,SAAO;AAAA,EAC1C,SACG,SAAO;AAAA,IACN,YACG,SAAO,EACP;AAAA,MACC;AA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AC,CAAC;AAC7C,IAAM,6BAA+B,SAAO;AAAA,EACjD,sBACG;AAAA,IACG,SAAO;AAAA,MACP,OACG,SAAO,EACP,SAAS,2BAA2B,EACpC;AAAA,QACC;AAAA,QACA;AAAA,MACF,EACC,SAAS;AAAA,MACZ,aACG,SAAO,EACP,SAAS,qCAAqC,EAC9C,IAAI,CAAC,EACL,IAAI,GAAG,EACP,SAAS;AAAA,MACZ,sBAAwB,QAAQ,SAAO,CAAC,EAAE,IAAI,GAAG,EAAE,SAAS;AAAA,IAC9D,CAAC;AAAA,EACH,EACC,IAAI,EAAE,EACN,SAAS;AACd,CAAC;","names":[]}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const CalculateTaxRequest: z.ZodObject<{
|
|
4
|
+
options: z.ZodObject<{
|
|
5
|
+
externalId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
6
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
7
|
+
addresses: z.ZodArray<z.ZodObject<{
|
|
8
|
+
country: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
9
|
+
subdivision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
10
|
+
city: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
11
|
+
postalCode: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
12
|
+
addressLine: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
13
|
+
addressLine2: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
14
|
+
}, z.core.$strip>>;
|
|
15
|
+
lineItems: z.ZodArray<z.ZodObject<{
|
|
16
|
+
_id: z.ZodString;
|
|
17
|
+
itemName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
18
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
price: z.ZodString;
|
|
20
|
+
itemCode: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
21
|
+
taxGroupId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
22
|
+
appId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
23
|
+
taxIncludedInPrice: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
24
|
+
addressIndex: z.ZodIntersection<z.ZodObject<{}, z.core.$strip>, z.ZodXor<readonly [z.ZodObject<{
|
|
25
|
+
singleAddress: z.ZodOptional<z.ZodNever>;
|
|
26
|
+
multipleAddresses: z.ZodOptional<z.ZodNever>;
|
|
27
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
28
|
+
multipleAddresses: z.ZodOptional<z.ZodNever>;
|
|
29
|
+
singleAddress: z.ZodNumber;
|
|
30
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
31
|
+
singleAddress: z.ZodOptional<z.ZodNever>;
|
|
32
|
+
multipleAddresses: z.ZodObject<{
|
|
33
|
+
origin: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
destination: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
}, z.core.$strip>]>>;
|
|
37
|
+
}, z.core.$strip>>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
declare const CalculateTaxResponse: z.ZodObject<{
|
|
41
|
+
externalId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
42
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
43
|
+
addresses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
44
|
+
city: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
45
|
+
subdivision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
46
|
+
country: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
47
|
+
postalCode: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
48
|
+
addressLine2: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
49
|
+
}, z.core.$strip>>>;
|
|
50
|
+
taxSummary: z.ZodOptional<z.ZodObject<{
|
|
51
|
+
totalAmount: z.ZodOptional<z.ZodString>;
|
|
52
|
+
totalTax: z.ZodOptional<z.ZodString>;
|
|
53
|
+
totalTaxableAmount: z.ZodOptional<z.ZodString>;
|
|
54
|
+
totalTaxIncludedInPrice: z.ZodOptional<z.ZodString>;
|
|
55
|
+
aggregatedTaxBreakdown: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
56
|
+
taxName: z.ZodOptional<z.ZodString>;
|
|
57
|
+
taxType: z.ZodOptional<z.ZodString>;
|
|
58
|
+
jurisdiction: z.ZodOptional<z.ZodString>;
|
|
59
|
+
jurisdictionType: z.ZodOptional<z.ZodEnum<{
|
|
60
|
+
UNDEFINED: "UNDEFINED";
|
|
61
|
+
COUNTRY: "COUNTRY";
|
|
62
|
+
STATE: "STATE";
|
|
63
|
+
COUNTY: "COUNTY";
|
|
64
|
+
CITY: "CITY";
|
|
65
|
+
SPECIAL: "SPECIAL";
|
|
66
|
+
}>>;
|
|
67
|
+
rate: z.ZodOptional<z.ZodString>;
|
|
68
|
+
aggregatedTaxAmount: z.ZodOptional<z.ZodString>;
|
|
69
|
+
}, z.core.$strip>>>;
|
|
70
|
+
}, z.core.$strip>>;
|
|
71
|
+
lineItemTaxDetails: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
72
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
73
|
+
itemName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
74
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
taxBreakdown: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
76
|
+
jurisdiction: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
77
|
+
nonTaxableAmount: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
78
|
+
rate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
79
|
+
taxAmount: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
80
|
+
taxableAmount: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
81
|
+
taxType: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
82
|
+
taxName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
83
|
+
jurisdictionType: z.ZodOptional<z.ZodEnum<{
|
|
84
|
+
UNDEFINED: "UNDEFINED";
|
|
85
|
+
COUNTRY: "COUNTRY";
|
|
86
|
+
STATE: "STATE";
|
|
87
|
+
COUNTY: "COUNTY";
|
|
88
|
+
CITY: "CITY";
|
|
89
|
+
SPECIAL: "SPECIAL";
|
|
90
|
+
}>>;
|
|
91
|
+
}, z.core.$strip>>>;
|
|
92
|
+
taxSummary: z.ZodOptional<z.ZodObject<{
|
|
93
|
+
fullPrice: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
94
|
+
taxAmount: z.ZodOptional<z.ZodString>;
|
|
95
|
+
taxableAmount: z.ZodOptional<z.ZodString>;
|
|
96
|
+
appId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
97
|
+
}, z.core.$strip>>;
|
|
98
|
+
addressIndex: z.ZodOptional<z.ZodIntersection<z.ZodObject<{}, z.core.$strip>, z.ZodXor<readonly [z.ZodObject<{
|
|
99
|
+
singleAddress: z.ZodOptional<z.ZodNever>;
|
|
100
|
+
multipleAddresses: z.ZodOptional<z.ZodNever>;
|
|
101
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
102
|
+
multipleAddresses: z.ZodOptional<z.ZodNever>;
|
|
103
|
+
singleAddress: z.ZodNumber;
|
|
104
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
105
|
+
singleAddress: z.ZodOptional<z.ZodNever>;
|
|
106
|
+
multipleAddresses: z.ZodObject<{
|
|
107
|
+
origin: z.ZodOptional<z.ZodNumber>;
|
|
108
|
+
destination: z.ZodOptional<z.ZodNumber>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
}, z.core.$strip>]>>>;
|
|
111
|
+
taxIncludedInPrice: z.ZodOptional<z.ZodBoolean>;
|
|
112
|
+
}, z.core.$strip>>>;
|
|
113
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
114
|
+
code: z.ZodOptional<z.ZodString>;
|
|
115
|
+
description: z.ZodOptional<z.ZodString>;
|
|
116
|
+
data: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
117
|
+
}, z.core.$strip>>>;
|
|
118
|
+
}, z.core.$strip>;
|
|
119
|
+
declare const ListTaxCalculatorsRequest: z.ZodObject<{}, z.core.$strip>;
|
|
120
|
+
declare const ListTaxCalculatorsResponse: z.ZodObject<{
|
|
121
|
+
taxCalculatorDetails: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
122
|
+
appId: z.ZodOptional<z.ZodString>;
|
|
123
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
124
|
+
unsupportedCountries: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
125
|
+
}, z.core.$strip>>>;
|
|
126
|
+
}, z.core.$strip>;
|
|
127
|
+
|
|
128
|
+
export { CalculateTaxRequest, CalculateTaxResponse, ListTaxCalculatorsRequest, ListTaxCalculatorsResponse };
|