@keystrokehq/taxjar 0.1.0
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/README.md +17 -0
- package/dist/action.cjs +21 -0
- package/dist/action.cjs.map +1 -0
- package/dist/action.mjs +21 -0
- package/dist/action.mjs.map +1 -0
- package/dist/actions/calculate-sales-tax-for-an-order.cjs +119 -0
- package/dist/actions/calculate-sales-tax-for-an-order.cjs.map +1 -0
- package/dist/actions/calculate-sales-tax-for-an-order.d.cts +9 -0
- package/dist/actions/calculate-sales-tax-for-an-order.d.cts.map +1 -0
- package/dist/actions/calculate-sales-tax-for-an-order.d.mts +9 -0
- package/dist/actions/calculate-sales-tax-for-an-order.d.mts.map +1 -0
- package/dist/actions/calculate-sales-tax-for-an-order.mjs +118 -0
- package/dist/actions/calculate-sales-tax-for-an-order.mjs.map +1 -0
- package/dist/actions/create-customer.cjs +45 -0
- package/dist/actions/create-customer.cjs.map +1 -0
- package/dist/actions/create-customer.d.cts +9 -0
- package/dist/actions/create-customer.d.cts.map +1 -0
- package/dist/actions/create-customer.d.mts +9 -0
- package/dist/actions/create-customer.d.mts.map +1 -0
- package/dist/actions/create-customer.mjs +44 -0
- package/dist/actions/create-customer.mjs.map +1 -0
- package/dist/actions/create-order-transaction.cjs +104 -0
- package/dist/actions/create-order-transaction.cjs.map +1 -0
- package/dist/actions/create-order-transaction.d.cts +9 -0
- package/dist/actions/create-order-transaction.d.cts.map +1 -0
- package/dist/actions/create-order-transaction.d.mts +9 -0
- package/dist/actions/create-order-transaction.d.mts.map +1 -0
- package/dist/actions/create-order-transaction.mjs +103 -0
- package/dist/actions/create-order-transaction.mjs.map +1 -0
- package/dist/actions/create-refund-transaction.cjs +70 -0
- package/dist/actions/create-refund-transaction.cjs.map +1 -0
- package/dist/actions/create-refund-transaction.d.cts +9 -0
- package/dist/actions/create-refund-transaction.d.cts.map +1 -0
- package/dist/actions/create-refund-transaction.d.mts +9 -0
- package/dist/actions/create-refund-transaction.d.mts.map +1 -0
- package/dist/actions/create-refund-transaction.mjs +69 -0
- package/dist/actions/create-refund-transaction.mjs.map +1 -0
- package/dist/actions/delete-customer.cjs +16 -0
- package/dist/actions/delete-customer.cjs.map +1 -0
- package/dist/actions/delete-customer.d.cts +9 -0
- package/dist/actions/delete-customer.d.cts.map +1 -0
- package/dist/actions/delete-customer.d.mts +9 -0
- package/dist/actions/delete-customer.d.mts.map +1 -0
- package/dist/actions/delete-customer.mjs +13 -0
- package/dist/actions/delete-customer.mjs.map +1 -0
- package/dist/actions/delete-order-transaction.cjs +16 -0
- package/dist/actions/delete-order-transaction.cjs.map +1 -0
- package/dist/actions/delete-order-transaction.d.cts +9 -0
- package/dist/actions/delete-order-transaction.d.cts.map +1 -0
- package/dist/actions/delete-order-transaction.d.mts +9 -0
- package/dist/actions/delete-order-transaction.d.mts.map +1 -0
- package/dist/actions/delete-order-transaction.mjs +13 -0
- package/dist/actions/delete-order-transaction.mjs.map +1 -0
- package/dist/actions/delete-refund-transaction.cjs +16 -0
- package/dist/actions/delete-refund-transaction.cjs.map +1 -0
- package/dist/actions/delete-refund-transaction.d.cts +9 -0
- package/dist/actions/delete-refund-transaction.d.cts.map +1 -0
- package/dist/actions/delete-refund-transaction.d.mts +9 -0
- package/dist/actions/delete-refund-transaction.d.mts.map +1 -0
- package/dist/actions/delete-refund-transaction.mjs +13 -0
- package/dist/actions/delete-refund-transaction.mjs.map +1 -0
- package/dist/actions/index.cjs +43 -0
- package/dist/actions/index.d.cts +22 -0
- package/dist/actions/index.d.mts +22 -0
- package/dist/actions/index.mjs +22 -0
- package/dist/actions/list-customers.cjs +19 -0
- package/dist/actions/list-customers.cjs.map +1 -0
- package/dist/actions/list-customers.d.cts +9 -0
- package/dist/actions/list-customers.d.cts.map +1 -0
- package/dist/actions/list-customers.d.mts +9 -0
- package/dist/actions/list-customers.d.mts.map +1 -0
- package/dist/actions/list-customers.mjs +16 -0
- package/dist/actions/list-customers.mjs.map +1 -0
- package/dist/actions/list-nexus-regions.cjs +23 -0
- package/dist/actions/list-nexus-regions.cjs.map +1 -0
- package/dist/actions/list-nexus-regions.d.cts +9 -0
- package/dist/actions/list-nexus-regions.d.cts.map +1 -0
- package/dist/actions/list-nexus-regions.d.mts +9 -0
- package/dist/actions/list-nexus-regions.d.mts.map +1 -0
- package/dist/actions/list-nexus-regions.mjs +22 -0
- package/dist/actions/list-nexus-regions.mjs.map +1 -0
- package/dist/actions/list-order-transactions.cjs +20 -0
- package/dist/actions/list-order-transactions.cjs.map +1 -0
- package/dist/actions/list-order-transactions.d.cts +9 -0
- package/dist/actions/list-order-transactions.d.cts.map +1 -0
- package/dist/actions/list-order-transactions.d.mts +9 -0
- package/dist/actions/list-order-transactions.d.mts.map +1 -0
- package/dist/actions/list-order-transactions.mjs +17 -0
- package/dist/actions/list-order-transactions.mjs.map +1 -0
- package/dist/actions/list-refund-transactions.cjs +20 -0
- package/dist/actions/list-refund-transactions.cjs.map +1 -0
- package/dist/actions/list-refund-transactions.d.cts +9 -0
- package/dist/actions/list-refund-transactions.d.cts.map +1 -0
- package/dist/actions/list-refund-transactions.d.mts +9 -0
- package/dist/actions/list-refund-transactions.d.mts.map +1 -0
- package/dist/actions/list-refund-transactions.mjs +17 -0
- package/dist/actions/list-refund-transactions.mjs.map +1 -0
- package/dist/actions/list-tax-categories.cjs +21 -0
- package/dist/actions/list-tax-categories.cjs.map +1 -0
- package/dist/actions/list-tax-categories.d.cts +9 -0
- package/dist/actions/list-tax-categories.d.cts.map +1 -0
- package/dist/actions/list-tax-categories.d.mts +9 -0
- package/dist/actions/list-tax-categories.d.mts.map +1 -0
- package/dist/actions/list-tax-categories.mjs +20 -0
- package/dist/actions/list-tax-categories.mjs.map +1 -0
- package/dist/actions/show-customer.cjs +27 -0
- package/dist/actions/show-customer.cjs.map +1 -0
- package/dist/actions/show-customer.d.cts +9 -0
- package/dist/actions/show-customer.d.cts.map +1 -0
- package/dist/actions/show-customer.d.mts +9 -0
- package/dist/actions/show-customer.d.mts.map +1 -0
- package/dist/actions/show-customer.mjs +26 -0
- package/dist/actions/show-customer.mjs.map +1 -0
- package/dist/actions/show-order-transaction.cjs +49 -0
- package/dist/actions/show-order-transaction.cjs.map +1 -0
- package/dist/actions/show-order-transaction.d.cts +9 -0
- package/dist/actions/show-order-transaction.d.cts.map +1 -0
- package/dist/actions/show-order-transaction.d.mts +9 -0
- package/dist/actions/show-order-transaction.d.mts.map +1 -0
- package/dist/actions/show-order-transaction.mjs +48 -0
- package/dist/actions/show-order-transaction.mjs.map +1 -0
- package/dist/actions/show-refund-transaction.cjs +49 -0
- package/dist/actions/show-refund-transaction.cjs.map +1 -0
- package/dist/actions/show-refund-transaction.d.cts +9 -0
- package/dist/actions/show-refund-transaction.d.cts.map +1 -0
- package/dist/actions/show-refund-transaction.d.mts +9 -0
- package/dist/actions/show-refund-transaction.d.mts.map +1 -0
- package/dist/actions/show-refund-transaction.mjs +48 -0
- package/dist/actions/show-refund-transaction.mjs.map +1 -0
- package/dist/actions/show-tax-rates-for-a-location.cjs +41 -0
- package/dist/actions/show-tax-rates-for-a-location.cjs.map +1 -0
- package/dist/actions/show-tax-rates-for-a-location.d.cts +9 -0
- package/dist/actions/show-tax-rates-for-a-location.d.cts.map +1 -0
- package/dist/actions/show-tax-rates-for-a-location.d.mts +9 -0
- package/dist/actions/show-tax-rates-for-a-location.d.mts.map +1 -0
- package/dist/actions/show-tax-rates-for-a-location.mjs +40 -0
- package/dist/actions/show-tax-rates-for-a-location.mjs.map +1 -0
- package/dist/actions/summarize-tax-rates-for-all-regions.cjs +28 -0
- package/dist/actions/summarize-tax-rates-for-all-regions.cjs.map +1 -0
- package/dist/actions/summarize-tax-rates-for-all-regions.d.cts +9 -0
- package/dist/actions/summarize-tax-rates-for-all-regions.d.cts.map +1 -0
- package/dist/actions/summarize-tax-rates-for-all-regions.d.mts +9 -0
- package/dist/actions/summarize-tax-rates-for-all-regions.d.mts.map +1 -0
- package/dist/actions/summarize-tax-rates-for-all-regions.mjs +27 -0
- package/dist/actions/summarize-tax-rates-for-all-regions.mjs.map +1 -0
- package/dist/actions/update-customer.cjs +46 -0
- package/dist/actions/update-customer.cjs.map +1 -0
- package/dist/actions/update-customer.d.cts +9 -0
- package/dist/actions/update-customer.d.cts.map +1 -0
- package/dist/actions/update-customer.d.mts +9 -0
- package/dist/actions/update-customer.d.mts.map +1 -0
- package/dist/actions/update-customer.mjs +45 -0
- package/dist/actions/update-customer.mjs.map +1 -0
- package/dist/actions/update-order-transaction.cjs +61 -0
- package/dist/actions/update-order-transaction.cjs.map +1 -0
- package/dist/actions/update-order-transaction.d.cts +9 -0
- package/dist/actions/update-order-transaction.d.cts.map +1 -0
- package/dist/actions/update-order-transaction.d.mts +9 -0
- package/dist/actions/update-order-transaction.d.mts.map +1 -0
- package/dist/actions/update-order-transaction.mjs +60 -0
- package/dist/actions/update-order-transaction.mjs.map +1 -0
- package/dist/actions/update-refund-transaction.cjs +83 -0
- package/dist/actions/update-refund-transaction.cjs.map +1 -0
- package/dist/actions/update-refund-transaction.d.cts +9 -0
- package/dist/actions/update-refund-transaction.d.cts.map +1 -0
- package/dist/actions/update-refund-transaction.d.mts +9 -0
- package/dist/actions/update-refund-transaction.d.mts.map +1 -0
- package/dist/actions/update-refund-transaction.mjs +82 -0
- package/dist/actions/update-refund-transaction.mjs.map +1 -0
- package/dist/actions/validate-vat-number.cjs +36 -0
- package/dist/actions/validate-vat-number.cjs.map +1 -0
- package/dist/actions/validate-vat-number.d.cts +9 -0
- package/dist/actions/validate-vat-number.d.cts.map +1 -0
- package/dist/actions/validate-vat-number.d.mts +9 -0
- package/dist/actions/validate-vat-number.d.mts.map +1 -0
- package/dist/actions/validate-vat-number.mjs +35 -0
- package/dist/actions/validate-vat-number.mjs.map +1 -0
- package/dist/app.cjs +9 -0
- package/dist/app.cjs.map +1 -0
- package/dist/app.d.cts +5 -0
- package/dist/app.d.cts.map +1 -0
- package/dist/app.d.mts +5 -0
- package/dist/app.d.mts.map +1 -0
- package/dist/app.mjs +10 -0
- package/dist/app.mjs.map +1 -0
- package/dist/catalog.cjs +15 -0
- package/dist/catalog.cjs.map +1 -0
- package/dist/catalog.d.cts +14 -0
- package/dist/catalog.d.cts.map +1 -0
- package/dist/catalog.d.mts +14 -0
- package/dist/catalog.d.mts.map +1 -0
- package/dist/catalog.mjs +15 -0
- package/dist/catalog.mjs.map +1 -0
- package/dist/execute.cjs +18 -0
- package/dist/execute.cjs.map +1 -0
- package/dist/execute.mjs +18 -0
- package/dist/execute.mjs.map +1 -0
- package/dist/index.cjs +48 -0
- package/dist/index.d.cts +24 -0
- package/dist/index.d.mts +24 -0
- package/dist/index.mjs +25 -0
- package/package.json +49 -0
package/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# @keystrokehq/taxjar
|
|
2
|
+
|
|
3
|
+
Keystroke-managed integration.
|
|
4
|
+
|
|
5
|
+
**App:** `taxjar`
|
|
6
|
+
**Version:** `20260615_00`
|
|
7
|
+
**Actions:** 21
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { defineAgent } from "@keystrokehq/keystroke/agent";
|
|
11
|
+
import { taxjarCalculateSalesTaxForAnOrder } from "@keystrokehq/taxjar/actions";
|
|
12
|
+
|
|
13
|
+
export default defineAgent({
|
|
14
|
+
key: "taxjar-agent",
|
|
15
|
+
tools: [taxjarCalculateSalesTaxForAnOrder],
|
|
16
|
+
});
|
|
17
|
+
```
|
package/dist/action.cjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const require_app = require("./app.cjs");
|
|
2
|
+
const require_execute = require("./execute.cjs");
|
|
3
|
+
require("zod");
|
|
4
|
+
//#region src/action.ts
|
|
5
|
+
/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */
|
|
6
|
+
function action(tool, def) {
|
|
7
|
+
return require_app.taxjar.action({
|
|
8
|
+
slug: def.slug,
|
|
9
|
+
name: def.name,
|
|
10
|
+
description: def.description,
|
|
11
|
+
input: def.input,
|
|
12
|
+
output: def.output,
|
|
13
|
+
async run(input) {
|
|
14
|
+
return def.output.parse(await require_execute.executeTaxjarTool(tool, input));
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
exports.action = action;
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=action.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action.cjs","names":["taxjar","executeTaxjarTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { taxjar } from \"./app\";\nimport { executeTaxjarTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: z.ZodTypeAny;\n output: z.ZodTypeAny;\n },\n) {\n return taxjar.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeTaxjarTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAOA,YAAAA,OAAO,OAAO;EACnB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAMC,gBAAAA,kBAAkB,MAAM,KAAgC,CAAC;EACzF;CACF,CAAC;AACH"}
|
package/dist/action.mjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { taxjar } from "./app.mjs";
|
|
2
|
+
import { executeTaxjarTool } from "./execute.mjs";
|
|
3
|
+
import "zod";
|
|
4
|
+
//#region src/action.ts
|
|
5
|
+
/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */
|
|
6
|
+
function action(tool, def) {
|
|
7
|
+
return taxjar.action({
|
|
8
|
+
slug: def.slug,
|
|
9
|
+
name: def.name,
|
|
10
|
+
description: def.description,
|
|
11
|
+
input: def.input,
|
|
12
|
+
output: def.output,
|
|
13
|
+
async run(input) {
|
|
14
|
+
return def.output.parse(await executeTaxjarTool(tool, input));
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { action };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=action.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { taxjar } from \"./app\";\nimport { executeTaxjarTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: z.ZodTypeAny;\n output: z.ZodTypeAny;\n },\n) {\n return taxjar.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeTaxjarTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAO,OAAO,OAAO;EACnB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAM,kBAAkB,MAAM,KAAgC,CAAC;EACzF;CACF,CAAC;AACH"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/calculate-sales-tax-for-an-order.ts
|
|
4
|
+
const TaxjarCalculateSalesTaxForAnOrderInput = zod.z.object({
|
|
5
|
+
amount: zod.z.number().describe("Order amount (excluding shipping)"),
|
|
6
|
+
to_zip: zod.z.string().describe("Destination ZIP or postal code"),
|
|
7
|
+
to_city: zod.z.string().describe("Destination city").optional(),
|
|
8
|
+
from_zip: zod.z.string().describe("Origin ZIP or postal code"),
|
|
9
|
+
shipping: zod.z.number().describe("Shipping cost for the order"),
|
|
10
|
+
to_state: zod.z.string().describe("Destination state or province"),
|
|
11
|
+
from_city: zod.z.string().describe("Origin city").optional(),
|
|
12
|
+
to_street: zod.z.string().describe("Destination street address").optional(),
|
|
13
|
+
from_state: zod.z.string().describe("Origin state or province"),
|
|
14
|
+
line_items: zod.z.array(zod.z.object({
|
|
15
|
+
id: zod.z.string().describe("Line item identifier").optional(),
|
|
16
|
+
discount: zod.z.number().describe("Discount amount applied to this line item").optional(),
|
|
17
|
+
quantity: zod.z.number().int().describe("Number of units for this line item"),
|
|
18
|
+
unit_price: zod.z.number().describe("Price per unit for this line item"),
|
|
19
|
+
product_tax_code: zod.z.string().describe("Product tax code (category) for this item").optional()
|
|
20
|
+
}).describe("A line item in the order to calculate tax on.")).describe("List of line items in the order").optional(),
|
|
21
|
+
to_country: zod.z.string().describe("Destination country code (ISO 3166-1 alpha-2)"),
|
|
22
|
+
customer_id: zod.z.string().describe("Identifier for the customer, if known").optional(),
|
|
23
|
+
from_street: zod.z.string().describe("Origin street address").optional(),
|
|
24
|
+
from_country: zod.z.string().describe("Origin country code (ISO 3166-1 alpha-2)"),
|
|
25
|
+
exemption_type: zod.z.string().describe("Type of exemption for the order (e.g., wholesale, government, non_profit, other)").optional(),
|
|
26
|
+
nexus_addresses: zod.z.array(zod.z.object({
|
|
27
|
+
id: zod.z.string().describe("Unique identifier for this nexus address"),
|
|
28
|
+
zip: zod.z.string().describe("ZIP or postal code for nexus address"),
|
|
29
|
+
city: zod.z.string().describe("City for nexus address").optional(),
|
|
30
|
+
state: zod.z.string().describe("State or province for nexus address"),
|
|
31
|
+
street: zod.z.string().describe("Street for nexus address").optional(),
|
|
32
|
+
country: zod.z.string().describe("Country code (ISO 3166-1 alpha-2)")
|
|
33
|
+
}).describe("A seller's nexus (tax jurisdiction) address.")).describe("List of seller nexus addresses to consider for tax calculations").optional()
|
|
34
|
+
}).describe("Request parameters for calculating sales tax on an order.");
|
|
35
|
+
const TaxjarCalculateSalesTaxForAnOrder_ShippingBreakdownSchema = zod.z.object({
|
|
36
|
+
city_amount: zod.z.number().describe("City tax amount to collect on shipping").nullable().optional(),
|
|
37
|
+
state_amount: zod.z.number().describe("State tax amount to collect on shipping").nullable().optional(),
|
|
38
|
+
city_tax_rate: zod.z.number().describe("City tax rate applied to shipping"),
|
|
39
|
+
county_amount: zod.z.number().describe("County tax amount to collect on shipping").nullable().optional(),
|
|
40
|
+
taxable_amount: zod.z.number().describe("Taxable shipping amount"),
|
|
41
|
+
county_tax_rate: zod.z.number().describe("County tax rate applied to shipping"),
|
|
42
|
+
tax_collectable: zod.z.number().describe("Tax amount to collect on shipping"),
|
|
43
|
+
special_tax_rate: zod.z.number().describe("Special district tax rate applied to shipping").nullable().optional(),
|
|
44
|
+
combined_tax_rate: zod.z.number().describe("Combined tax rate applied to shipping"),
|
|
45
|
+
city_taxable_amount: zod.z.number().describe("City taxable shipping amount"),
|
|
46
|
+
state_sales_tax_rate: zod.z.number().describe("State tax rate applied to shipping").nullable().optional(),
|
|
47
|
+
state_taxable_amount: zod.z.number().describe("State taxable shipping amount"),
|
|
48
|
+
county_taxable_amount: zod.z.number().describe("County taxable shipping amount"),
|
|
49
|
+
special_taxable_amount: zod.z.number().describe("Special district taxable shipping amount"),
|
|
50
|
+
special_district_amount: zod.z.number().describe("Special district tax amount to collect on shipping").nullable().optional()
|
|
51
|
+
}).describe("Tax breakdown details for shipping.");
|
|
52
|
+
const TaxjarCalculateSalesTaxForAnOrder_LineItemBreakdownSchema = zod.z.object({
|
|
53
|
+
id: zod.z.string().describe("Line item identifier").nullable().optional(),
|
|
54
|
+
city_amount: zod.z.number().describe("City tax amount to collect").nullable().optional(),
|
|
55
|
+
state_amount: zod.z.number().describe("State tax amount to collect").nullable().optional(),
|
|
56
|
+
city_tax_rate: zod.z.number().describe("City tax rate applied"),
|
|
57
|
+
county_amount: zod.z.number().describe("County tax amount to collect").nullable().optional(),
|
|
58
|
+
taxable_amount: zod.z.number().describe("Taxable amount for this line item"),
|
|
59
|
+
county_tax_rate: zod.z.number().describe("County tax rate applied"),
|
|
60
|
+
tax_collectable: zod.z.number().describe("Tax amount to collect for this line item"),
|
|
61
|
+
special_tax_rate: zod.z.number().describe("Special district tax rate applied").nullable().optional(),
|
|
62
|
+
combined_tax_rate: zod.z.number().describe("Combined tax rate applied"),
|
|
63
|
+
city_taxable_amount: zod.z.number().describe("City taxable amount for this line item"),
|
|
64
|
+
state_sales_tax_rate: zod.z.number().describe("State tax rate applied").nullable().optional(),
|
|
65
|
+
state_taxable_amount: zod.z.number().describe("State taxable amount for this line item"),
|
|
66
|
+
county_taxable_amount: zod.z.number().describe("County taxable amount for this line item"),
|
|
67
|
+
special_district_amount: zod.z.number().describe("Special district tax amount to collect").nullable().optional(),
|
|
68
|
+
special_district_taxable_amount: zod.z.number().describe("Special district taxable amount for this line item")
|
|
69
|
+
}).describe("Tax breakdown details for a single line item.");
|
|
70
|
+
const TaxjarCalculateSalesTaxForAnOrder_BreakdownSchema = zod.z.object({
|
|
71
|
+
shipping: TaxjarCalculateSalesTaxForAnOrder_ShippingBreakdownSchema.nullable().optional(),
|
|
72
|
+
line_items: zod.z.array(TaxjarCalculateSalesTaxForAnOrder_LineItemBreakdownSchema).describe("Breakdown details per line item").nullable().optional(),
|
|
73
|
+
city_tax_rate: zod.z.number().describe("City tax rate applied to order"),
|
|
74
|
+
state_tax_rate: zod.z.number().describe("State tax rate applied to order"),
|
|
75
|
+
taxable_amount: zod.z.number().describe("Total taxable amount for the order"),
|
|
76
|
+
county_tax_rate: zod.z.number().describe("County tax rate applied to order"),
|
|
77
|
+
tax_collectable: zod.z.number().describe("Total tax amount to collect for the order"),
|
|
78
|
+
special_tax_rate: zod.z.number().describe("Special district tax rate applied to order").nullable().optional(),
|
|
79
|
+
combined_tax_rate: zod.z.number().describe("Overall combined tax rate"),
|
|
80
|
+
city_taxable_amount: zod.z.number().describe("Total city taxable amount"),
|
|
81
|
+
city_tax_collectable: zod.z.number().describe("City tax amount to collect"),
|
|
82
|
+
state_taxable_amount: zod.z.number().describe("Total state taxable amount"),
|
|
83
|
+
county_taxable_amount: zod.z.number().describe("Total county taxable amount"),
|
|
84
|
+
state_tax_collectable: zod.z.number().describe("State tax amount to collect"),
|
|
85
|
+
county_tax_collectable: zod.z.number().describe("County tax amount to collect"),
|
|
86
|
+
special_district_taxable_amount: zod.z.number().describe("Total special district taxable amount"),
|
|
87
|
+
special_district_tax_collectable: zod.z.number().describe("Special district tax amount to collect")
|
|
88
|
+
}).describe("Detailed tax breakdown for the order.");
|
|
89
|
+
const TaxjarCalculateSalesTaxForAnOrder_JurisdictionsSchema = zod.z.object({
|
|
90
|
+
city: zod.z.string().describe("City level jurisdiction").nullable().optional(),
|
|
91
|
+
state: zod.z.string().describe("State level jurisdiction"),
|
|
92
|
+
county: zod.z.string().describe("County level jurisdiction").nullable().optional(),
|
|
93
|
+
country: zod.z.string().describe("Country level jurisdiction")
|
|
94
|
+
}).describe("Tax jurisdiction details for the order.");
|
|
95
|
+
const TaxjarCalculateSalesTaxForAnOrder_TaxSchema = zod.z.object({
|
|
96
|
+
rate: zod.z.number().describe("Overall tax rate applied to order"),
|
|
97
|
+
shipping: zod.z.number().describe("Shipping cost included in the order"),
|
|
98
|
+
breakdown: TaxjarCalculateSalesTaxForAnOrder_BreakdownSchema.nullable().optional(),
|
|
99
|
+
has_nexus: zod.z.boolean().describe("Whether the seller has nexus in the destination"),
|
|
100
|
+
tax_source: zod.z.string().describe("Tax sourcing (origin or destination), null when no nexus").nullable().optional(),
|
|
101
|
+
jurisdictions: TaxjarCalculateSalesTaxForAnOrder_JurisdictionsSchema.nullable().optional(),
|
|
102
|
+
exemption_type: zod.z.string().describe("Exemption type if applicable").nullable().optional(),
|
|
103
|
+
taxable_amount: zod.z.number().describe("Total taxable amount of the order"),
|
|
104
|
+
freight_taxable: zod.z.boolean().describe("Whether shipping is taxable"),
|
|
105
|
+
amount_to_collect: zod.z.number().describe("Total tax amount to collect"),
|
|
106
|
+
order_total_amount: zod.z.number().describe("Total order amount including shipping")
|
|
107
|
+
}).describe("Tax calculation result for the order.");
|
|
108
|
+
const TaxjarCalculateSalesTaxForAnOrderOutput = zod.z.object({ tax: TaxjarCalculateSalesTaxForAnOrder_TaxSchema.nullable() }).describe("Response model for sales tax calculation on an order.");
|
|
109
|
+
const taxjarCalculateSalesTaxForAnOrder = require_action.action("TAXJAR_CALCULATE_SALES_TAX_FOR_AN_ORDER", {
|
|
110
|
+
slug: "taxjar-calculate-sales-tax-for-an-order",
|
|
111
|
+
name: "Calculate Sales Tax For An Order",
|
|
112
|
+
description: "Tool to calculate sales tax for an order. Use when you need an accurate tax calculation including nexus addresses, line items, shipping, and exemptions.",
|
|
113
|
+
input: TaxjarCalculateSalesTaxForAnOrderInput,
|
|
114
|
+
output: TaxjarCalculateSalesTaxForAnOrderOutput
|
|
115
|
+
});
|
|
116
|
+
//#endregion
|
|
117
|
+
exports.taxjarCalculateSalesTaxForAnOrder = taxjarCalculateSalesTaxForAnOrder;
|
|
118
|
+
|
|
119
|
+
//# sourceMappingURL=calculate-sales-tax-for-an-order.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calculate-sales-tax-for-an-order.cjs","names":["z","action"],"sources":["../../src/actions/calculate-sales-tax-for-an-order.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const TaxjarCalculateSalesTaxForAnOrderInput: z.ZodTypeAny = z.object({\n amount: z.number().describe(\"Order amount (excluding shipping)\"),\n to_zip: z.string().describe(\"Destination ZIP or postal code\"),\n to_city: z.string().describe(\"Destination city\").optional(),\n from_zip: z.string().describe(\"Origin ZIP or postal code\"),\n shipping: z.number().describe(\"Shipping cost for the order\"),\n to_state: z.string().describe(\"Destination state or province\"),\n from_city: z.string().describe(\"Origin city\").optional(),\n to_street: z.string().describe(\"Destination street address\").optional(),\n from_state: z.string().describe(\"Origin state or province\"),\n line_items: z.array(z.object({\n id: z.string().describe(\"Line item identifier\").optional(),\n discount: z.number().describe(\"Discount amount applied to this line item\").optional(),\n quantity: z.number().int().describe(\"Number of units for this line item\"),\n unit_price: z.number().describe(\"Price per unit for this line item\"),\n product_tax_code: z.string().describe(\"Product tax code (category) for this item\").optional(),\n}).describe(\"A line item in the order to calculate tax on.\")).describe(\"List of line items in the order\").optional(),\n to_country: z.string().describe(\"Destination country code (ISO 3166-1 alpha-2)\"),\n customer_id: z.string().describe(\"Identifier for the customer, if known\").optional(),\n from_street: z.string().describe(\"Origin street address\").optional(),\n from_country: z.string().describe(\"Origin country code (ISO 3166-1 alpha-2)\"),\n exemption_type: z.string().describe(\"Type of exemption for the order (e.g., wholesale, government, non_profit, other)\").optional(),\n nexus_addresses: z.array(z.object({\n id: z.string().describe(\"Unique identifier for this nexus address\"),\n zip: z.string().describe(\"ZIP or postal code for nexus address\"),\n city: z.string().describe(\"City for nexus address\").optional(),\n state: z.string().describe(\"State or province for nexus address\"),\n street: z.string().describe(\"Street for nexus address\").optional(),\n country: z.string().describe(\"Country code (ISO 3166-1 alpha-2)\"),\n}).describe(\"A seller's nexus (tax jurisdiction) address.\")).describe(\"List of seller nexus addresses to consider for tax calculations\").optional(),\n}).describe(\"Request parameters for calculating sales tax on an order.\");\nconst TaxjarCalculateSalesTaxForAnOrder_ShippingBreakdownSchema: z.ZodTypeAny = z.object({\n city_amount: z.number().describe(\"City tax amount to collect on shipping\").nullable().optional(),\n state_amount: z.number().describe(\"State tax amount to collect on shipping\").nullable().optional(),\n city_tax_rate: z.number().describe(\"City tax rate applied to shipping\"),\n county_amount: z.number().describe(\"County tax amount to collect on shipping\").nullable().optional(),\n taxable_amount: z.number().describe(\"Taxable shipping amount\"),\n county_tax_rate: z.number().describe(\"County tax rate applied to shipping\"),\n tax_collectable: z.number().describe(\"Tax amount to collect on shipping\"),\n special_tax_rate: z.number().describe(\"Special district tax rate applied to shipping\").nullable().optional(),\n combined_tax_rate: z.number().describe(\"Combined tax rate applied to shipping\"),\n city_taxable_amount: z.number().describe(\"City taxable shipping amount\"),\n state_sales_tax_rate: z.number().describe(\"State tax rate applied to shipping\").nullable().optional(),\n state_taxable_amount: z.number().describe(\"State taxable shipping amount\"),\n county_taxable_amount: z.number().describe(\"County taxable shipping amount\"),\n special_taxable_amount: z.number().describe(\"Special district taxable shipping amount\"),\n special_district_amount: z.number().describe(\"Special district tax amount to collect on shipping\").nullable().optional(),\n}).describe(\"Tax breakdown details for shipping.\");\nconst TaxjarCalculateSalesTaxForAnOrder_LineItemBreakdownSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Line item identifier\").nullable().optional(),\n city_amount: z.number().describe(\"City tax amount to collect\").nullable().optional(),\n state_amount: z.number().describe(\"State tax amount to collect\").nullable().optional(),\n city_tax_rate: z.number().describe(\"City tax rate applied\"),\n county_amount: z.number().describe(\"County tax amount to collect\").nullable().optional(),\n taxable_amount: z.number().describe(\"Taxable amount for this line item\"),\n county_tax_rate: z.number().describe(\"County tax rate applied\"),\n tax_collectable: z.number().describe(\"Tax amount to collect for this line item\"),\n special_tax_rate: z.number().describe(\"Special district tax rate applied\").nullable().optional(),\n combined_tax_rate: z.number().describe(\"Combined tax rate applied\"),\n city_taxable_amount: z.number().describe(\"City taxable amount for this line item\"),\n state_sales_tax_rate: z.number().describe(\"State tax rate applied\").nullable().optional(),\n state_taxable_amount: z.number().describe(\"State taxable amount for this line item\"),\n county_taxable_amount: z.number().describe(\"County taxable amount for this line item\"),\n special_district_amount: z.number().describe(\"Special district tax amount to collect\").nullable().optional(),\n special_district_taxable_amount: z.number().describe(\"Special district taxable amount for this line item\"),\n}).describe(\"Tax breakdown details for a single line item.\");\nconst TaxjarCalculateSalesTaxForAnOrder_BreakdownSchema: z.ZodTypeAny = z.object({\n shipping: TaxjarCalculateSalesTaxForAnOrder_ShippingBreakdownSchema.nullable().optional(),\n line_items: z.array(TaxjarCalculateSalesTaxForAnOrder_LineItemBreakdownSchema).describe(\"Breakdown details per line item\").nullable().optional(),\n city_tax_rate: z.number().describe(\"City tax rate applied to order\"),\n state_tax_rate: z.number().describe(\"State tax rate applied to order\"),\n taxable_amount: z.number().describe(\"Total taxable amount for the order\"),\n county_tax_rate: z.number().describe(\"County tax rate applied to order\"),\n tax_collectable: z.number().describe(\"Total tax amount to collect for the order\"),\n special_tax_rate: z.number().describe(\"Special district tax rate applied to order\").nullable().optional(),\n combined_tax_rate: z.number().describe(\"Overall combined tax rate\"),\n city_taxable_amount: z.number().describe(\"Total city taxable amount\"),\n city_tax_collectable: z.number().describe(\"City tax amount to collect\"),\n state_taxable_amount: z.number().describe(\"Total state taxable amount\"),\n county_taxable_amount: z.number().describe(\"Total county taxable amount\"),\n state_tax_collectable: z.number().describe(\"State tax amount to collect\"),\n county_tax_collectable: z.number().describe(\"County tax amount to collect\"),\n special_district_taxable_amount: z.number().describe(\"Total special district taxable amount\"),\n special_district_tax_collectable: z.number().describe(\"Special district tax amount to collect\"),\n}).describe(\"Detailed tax breakdown for the order.\");\nconst TaxjarCalculateSalesTaxForAnOrder_JurisdictionsSchema: z.ZodTypeAny = z.object({\n city: z.string().describe(\"City level jurisdiction\").nullable().optional(),\n state: z.string().describe(\"State level jurisdiction\"),\n county: z.string().describe(\"County level jurisdiction\").nullable().optional(),\n country: z.string().describe(\"Country level jurisdiction\"),\n}).describe(\"Tax jurisdiction details for the order.\");\nconst TaxjarCalculateSalesTaxForAnOrder_TaxSchema: z.ZodTypeAny = z.object({\n rate: z.number().describe(\"Overall tax rate applied to order\"),\n shipping: z.number().describe(\"Shipping cost included in the order\"),\n breakdown: TaxjarCalculateSalesTaxForAnOrder_BreakdownSchema.nullable().optional(),\n has_nexus: z.boolean().describe(\"Whether the seller has nexus in the destination\"),\n tax_source: z.string().describe(\"Tax sourcing (origin or destination), null when no nexus\").nullable().optional(),\n jurisdictions: TaxjarCalculateSalesTaxForAnOrder_JurisdictionsSchema.nullable().optional(),\n exemption_type: z.string().describe(\"Exemption type if applicable\").nullable().optional(),\n taxable_amount: z.number().describe(\"Total taxable amount of the order\"),\n freight_taxable: z.boolean().describe(\"Whether shipping is taxable\"),\n amount_to_collect: z.number().describe(\"Total tax amount to collect\"),\n order_total_amount: z.number().describe(\"Total order amount including shipping\"),\n}).describe(\"Tax calculation result for the order.\");\nexport const TaxjarCalculateSalesTaxForAnOrderOutput: z.ZodTypeAny = z.object({\n tax: TaxjarCalculateSalesTaxForAnOrder_TaxSchema.nullable(),\n}).describe(\"Response model for sales tax calculation on an order.\");\n\nexport const taxjarCalculateSalesTaxForAnOrder = action(\"TAXJAR_CALCULATE_SALES_TAX_FOR_AN_ORDER\", {\n slug: \"taxjar-calculate-sales-tax-for-an-order\",\n name: \"Calculate Sales Tax For An Order\",\n description: \"Tool to calculate sales tax for an order. Use when you need an accurate tax calculation including nexus addresses, line items, shipping, and exemptions.\",\n input: TaxjarCalculateSalesTaxForAnOrderInput,\n output: TaxjarCalculateSalesTaxForAnOrderOutput,\n});\n"],"mappings":";;;AAIA,MAAa,yCAAuDA,IAAAA,EAAE,OAAO;CAC3E,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC;CAC/D,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC;CAC5D,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kBAAkB,CAAC,CAAC,SAAS;CAC1D,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B;CACzD,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B;CAC3D,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B;CAC7D,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,aAAa,CAAC,CAAC,SAAS;CACvD,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4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AAC,CAAC,SAAS,mCAAmC;CACvE,iBAAiBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,6BAA6B;CACnE,mBAAmBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B;CACpE,oBAAoBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC;AACjF,CAAC,CAAC,CAAC,SAAS,uCAAuC;AACnD,MAAa,0CAAwDA,IAAAA,EAAE,OAAO,EAC5E,KAAK,4CAA4C,SAAS,EAC5D,CAAC,CAAC,CAAC,SAAS,uDAAuD;AAEnE,MAAa,oCAAoCC,eAAAA,OAAO,2CAA2C;CACjG,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/calculate-sales-tax-for-an-order.d.ts
|
|
4
|
+
declare const TaxjarCalculateSalesTaxForAnOrderInput: z.ZodTypeAny;
|
|
5
|
+
declare const TaxjarCalculateSalesTaxForAnOrderOutput: z.ZodTypeAny;
|
|
6
|
+
declare const taxjarCalculateSalesTaxForAnOrder: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { taxjarCalculateSalesTaxForAnOrder };
|
|
9
|
+
//# sourceMappingURL=calculate-sales-tax-for-an-order.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calculate-sales-tax-for-an-order.d.cts","names":[],"sources":["../../src/actions/calculate-sales-tax-for-an-order.ts"],"mappings":";;;cAIa,sCAAA,EAAwC,CAAA,CAAE,UA8BiB;AAAA,cA0E3D,uCAAA,EAAyC,CAAA,CAAE,UAEY;AAAA,cAEvD,iCAAA,gCAAiC,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/calculate-sales-tax-for-an-order.d.ts
|
|
4
|
+
declare const TaxjarCalculateSalesTaxForAnOrderInput: z.ZodTypeAny;
|
|
5
|
+
declare const TaxjarCalculateSalesTaxForAnOrderOutput: z.ZodTypeAny;
|
|
6
|
+
declare const taxjarCalculateSalesTaxForAnOrder: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { taxjarCalculateSalesTaxForAnOrder };
|
|
9
|
+
//# sourceMappingURL=calculate-sales-tax-for-an-order.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calculate-sales-tax-for-an-order.d.mts","names":[],"sources":["../../src/actions/calculate-sales-tax-for-an-order.ts"],"mappings":";;;cAIa,sCAAA,EAAwC,CAAA,CAAE,UA8BiB;AAAA,cA0E3D,uCAAA,EAAyC,CAAA,CAAE,UAEY;AAAA,cAEvD,iCAAA,gCAAiC,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/actions/calculate-sales-tax-for-an-order.ts
|
|
4
|
+
const TaxjarCalculateSalesTaxForAnOrderInput = z.object({
|
|
5
|
+
amount: z.number().describe("Order amount (excluding shipping)"),
|
|
6
|
+
to_zip: z.string().describe("Destination ZIP or postal code"),
|
|
7
|
+
to_city: z.string().describe("Destination city").optional(),
|
|
8
|
+
from_zip: z.string().describe("Origin ZIP or postal code"),
|
|
9
|
+
shipping: z.number().describe("Shipping cost for the order"),
|
|
10
|
+
to_state: z.string().describe("Destination state or province"),
|
|
11
|
+
from_city: z.string().describe("Origin city").optional(),
|
|
12
|
+
to_street: z.string().describe("Destination street address").optional(),
|
|
13
|
+
from_state: z.string().describe("Origin state or province"),
|
|
14
|
+
line_items: z.array(z.object({
|
|
15
|
+
id: z.string().describe("Line item identifier").optional(),
|
|
16
|
+
discount: z.number().describe("Discount amount applied to this line item").optional(),
|
|
17
|
+
quantity: z.number().int().describe("Number of units for this line item"),
|
|
18
|
+
unit_price: z.number().describe("Price per unit for this line item"),
|
|
19
|
+
product_tax_code: z.string().describe("Product tax code (category) for this item").optional()
|
|
20
|
+
}).describe("A line item in the order to calculate tax on.")).describe("List of line items in the order").optional(),
|
|
21
|
+
to_country: z.string().describe("Destination country code (ISO 3166-1 alpha-2)"),
|
|
22
|
+
customer_id: z.string().describe("Identifier for the customer, if known").optional(),
|
|
23
|
+
from_street: z.string().describe("Origin street address").optional(),
|
|
24
|
+
from_country: z.string().describe("Origin country code (ISO 3166-1 alpha-2)"),
|
|
25
|
+
exemption_type: z.string().describe("Type of exemption for the order (e.g., wholesale, government, non_profit, other)").optional(),
|
|
26
|
+
nexus_addresses: z.array(z.object({
|
|
27
|
+
id: z.string().describe("Unique identifier for this nexus address"),
|
|
28
|
+
zip: z.string().describe("ZIP or postal code for nexus address"),
|
|
29
|
+
city: z.string().describe("City for nexus address").optional(),
|
|
30
|
+
state: z.string().describe("State or province for nexus address"),
|
|
31
|
+
street: z.string().describe("Street for nexus address").optional(),
|
|
32
|
+
country: z.string().describe("Country code (ISO 3166-1 alpha-2)")
|
|
33
|
+
}).describe("A seller's nexus (tax jurisdiction) address.")).describe("List of seller nexus addresses to consider for tax calculations").optional()
|
|
34
|
+
}).describe("Request parameters for calculating sales tax on an order.");
|
|
35
|
+
const TaxjarCalculateSalesTaxForAnOrder_ShippingBreakdownSchema = z.object({
|
|
36
|
+
city_amount: z.number().describe("City tax amount to collect on shipping").nullable().optional(),
|
|
37
|
+
state_amount: z.number().describe("State tax amount to collect on shipping").nullable().optional(),
|
|
38
|
+
city_tax_rate: z.number().describe("City tax rate applied to shipping"),
|
|
39
|
+
county_amount: z.number().describe("County tax amount to collect on shipping").nullable().optional(),
|
|
40
|
+
taxable_amount: z.number().describe("Taxable shipping amount"),
|
|
41
|
+
county_tax_rate: z.number().describe("County tax rate applied to shipping"),
|
|
42
|
+
tax_collectable: z.number().describe("Tax amount to collect on shipping"),
|
|
43
|
+
special_tax_rate: z.number().describe("Special district tax rate applied to shipping").nullable().optional(),
|
|
44
|
+
combined_tax_rate: z.number().describe("Combined tax rate applied to shipping"),
|
|
45
|
+
city_taxable_amount: z.number().describe("City taxable shipping amount"),
|
|
46
|
+
state_sales_tax_rate: z.number().describe("State tax rate applied to shipping").nullable().optional(),
|
|
47
|
+
state_taxable_amount: z.number().describe("State taxable shipping amount"),
|
|
48
|
+
county_taxable_amount: z.number().describe("County taxable shipping amount"),
|
|
49
|
+
special_taxable_amount: z.number().describe("Special district taxable shipping amount"),
|
|
50
|
+
special_district_amount: z.number().describe("Special district tax amount to collect on shipping").nullable().optional()
|
|
51
|
+
}).describe("Tax breakdown details for shipping.");
|
|
52
|
+
const TaxjarCalculateSalesTaxForAnOrder_LineItemBreakdownSchema = z.object({
|
|
53
|
+
id: z.string().describe("Line item identifier").nullable().optional(),
|
|
54
|
+
city_amount: z.number().describe("City tax amount to collect").nullable().optional(),
|
|
55
|
+
state_amount: z.number().describe("State tax amount to collect").nullable().optional(),
|
|
56
|
+
city_tax_rate: z.number().describe("City tax rate applied"),
|
|
57
|
+
county_amount: z.number().describe("County tax amount to collect").nullable().optional(),
|
|
58
|
+
taxable_amount: z.number().describe("Taxable amount for this line item"),
|
|
59
|
+
county_tax_rate: z.number().describe("County tax rate applied"),
|
|
60
|
+
tax_collectable: z.number().describe("Tax amount to collect for this line item"),
|
|
61
|
+
special_tax_rate: z.number().describe("Special district tax rate applied").nullable().optional(),
|
|
62
|
+
combined_tax_rate: z.number().describe("Combined tax rate applied"),
|
|
63
|
+
city_taxable_amount: z.number().describe("City taxable amount for this line item"),
|
|
64
|
+
state_sales_tax_rate: z.number().describe("State tax rate applied").nullable().optional(),
|
|
65
|
+
state_taxable_amount: z.number().describe("State taxable amount for this line item"),
|
|
66
|
+
county_taxable_amount: z.number().describe("County taxable amount for this line item"),
|
|
67
|
+
special_district_amount: z.number().describe("Special district tax amount to collect").nullable().optional(),
|
|
68
|
+
special_district_taxable_amount: z.number().describe("Special district taxable amount for this line item")
|
|
69
|
+
}).describe("Tax breakdown details for a single line item.");
|
|
70
|
+
const TaxjarCalculateSalesTaxForAnOrder_BreakdownSchema = z.object({
|
|
71
|
+
shipping: TaxjarCalculateSalesTaxForAnOrder_ShippingBreakdownSchema.nullable().optional(),
|
|
72
|
+
line_items: z.array(TaxjarCalculateSalesTaxForAnOrder_LineItemBreakdownSchema).describe("Breakdown details per line item").nullable().optional(),
|
|
73
|
+
city_tax_rate: z.number().describe("City tax rate applied to order"),
|
|
74
|
+
state_tax_rate: z.number().describe("State tax rate applied to order"),
|
|
75
|
+
taxable_amount: z.number().describe("Total taxable amount for the order"),
|
|
76
|
+
county_tax_rate: z.number().describe("County tax rate applied to order"),
|
|
77
|
+
tax_collectable: z.number().describe("Total tax amount to collect for the order"),
|
|
78
|
+
special_tax_rate: z.number().describe("Special district tax rate applied to order").nullable().optional(),
|
|
79
|
+
combined_tax_rate: z.number().describe("Overall combined tax rate"),
|
|
80
|
+
city_taxable_amount: z.number().describe("Total city taxable amount"),
|
|
81
|
+
city_tax_collectable: z.number().describe("City tax amount to collect"),
|
|
82
|
+
state_taxable_amount: z.number().describe("Total state taxable amount"),
|
|
83
|
+
county_taxable_amount: z.number().describe("Total county taxable amount"),
|
|
84
|
+
state_tax_collectable: z.number().describe("State tax amount to collect"),
|
|
85
|
+
county_tax_collectable: z.number().describe("County tax amount to collect"),
|
|
86
|
+
special_district_taxable_amount: z.number().describe("Total special district taxable amount"),
|
|
87
|
+
special_district_tax_collectable: z.number().describe("Special district tax amount to collect")
|
|
88
|
+
}).describe("Detailed tax breakdown for the order.");
|
|
89
|
+
const TaxjarCalculateSalesTaxForAnOrder_JurisdictionsSchema = z.object({
|
|
90
|
+
city: z.string().describe("City level jurisdiction").nullable().optional(),
|
|
91
|
+
state: z.string().describe("State level jurisdiction"),
|
|
92
|
+
county: z.string().describe("County level jurisdiction").nullable().optional(),
|
|
93
|
+
country: z.string().describe("Country level jurisdiction")
|
|
94
|
+
}).describe("Tax jurisdiction details for the order.");
|
|
95
|
+
const TaxjarCalculateSalesTaxForAnOrder_TaxSchema = z.object({
|
|
96
|
+
rate: z.number().describe("Overall tax rate applied to order"),
|
|
97
|
+
shipping: z.number().describe("Shipping cost included in the order"),
|
|
98
|
+
breakdown: TaxjarCalculateSalesTaxForAnOrder_BreakdownSchema.nullable().optional(),
|
|
99
|
+
has_nexus: z.boolean().describe("Whether the seller has nexus in the destination"),
|
|
100
|
+
tax_source: z.string().describe("Tax sourcing (origin or destination), null when no nexus").nullable().optional(),
|
|
101
|
+
jurisdictions: TaxjarCalculateSalesTaxForAnOrder_JurisdictionsSchema.nullable().optional(),
|
|
102
|
+
exemption_type: z.string().describe("Exemption type if applicable").nullable().optional(),
|
|
103
|
+
taxable_amount: z.number().describe("Total taxable amount of the order"),
|
|
104
|
+
freight_taxable: z.boolean().describe("Whether shipping is taxable"),
|
|
105
|
+
amount_to_collect: z.number().describe("Total tax amount to collect"),
|
|
106
|
+
order_total_amount: z.number().describe("Total order amount including shipping")
|
|
107
|
+
}).describe("Tax calculation result for the order.");
|
|
108
|
+
const taxjarCalculateSalesTaxForAnOrder = action("TAXJAR_CALCULATE_SALES_TAX_FOR_AN_ORDER", {
|
|
109
|
+
slug: "taxjar-calculate-sales-tax-for-an-order",
|
|
110
|
+
name: "Calculate Sales Tax For An Order",
|
|
111
|
+
description: "Tool to calculate sales tax for an order. Use when you need an accurate tax calculation including nexus addresses, line items, shipping, and exemptions.",
|
|
112
|
+
input: TaxjarCalculateSalesTaxForAnOrderInput,
|
|
113
|
+
output: z.object({ tax: TaxjarCalculateSalesTaxForAnOrder_TaxSchema.nullable() }).describe("Response model for sales tax calculation on an order.")
|
|
114
|
+
});
|
|
115
|
+
//#endregion
|
|
116
|
+
export { taxjarCalculateSalesTaxForAnOrder };
|
|
117
|
+
|
|
118
|
+
//# sourceMappingURL=calculate-sales-tax-for-an-order.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calculate-sales-tax-for-an-order.mjs","names":[],"sources":["../../src/actions/calculate-sales-tax-for-an-order.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const TaxjarCalculateSalesTaxForAnOrderInput: z.ZodTypeAny = z.object({\n amount: z.number().describe(\"Order amount (excluding shipping)\"),\n to_zip: z.string().describe(\"Destination ZIP or postal code\"),\n to_city: z.string().describe(\"Destination city\").optional(),\n from_zip: z.string().describe(\"Origin ZIP or postal code\"),\n shipping: z.number().describe(\"Shipping cost for the order\"),\n to_state: z.string().describe(\"Destination state or province\"),\n from_city: z.string().describe(\"Origin city\").optional(),\n to_street: z.string().describe(\"Destination street address\").optional(),\n from_state: z.string().describe(\"Origin state or province\"),\n line_items: z.array(z.object({\n id: z.string().describe(\"Line item identifier\").optional(),\n discount: z.number().describe(\"Discount amount applied to this line item\").optional(),\n quantity: z.number().int().describe(\"Number of units for this line item\"),\n unit_price: z.number().describe(\"Price per unit for this line item\"),\n product_tax_code: z.string().describe(\"Product tax code (category) for this item\").optional(),\n}).describe(\"A line item in the order to calculate tax on.\")).describe(\"List of line items in the order\").optional(),\n to_country: z.string().describe(\"Destination country code (ISO 3166-1 alpha-2)\"),\n customer_id: z.string().describe(\"Identifier for the customer, if known\").optional(),\n from_street: z.string().describe(\"Origin street address\").optional(),\n from_country: z.string().describe(\"Origin country code (ISO 3166-1 alpha-2)\"),\n exemption_type: z.string().describe(\"Type of exemption for the order (e.g., wholesale, government, non_profit, other)\").optional(),\n nexus_addresses: z.array(z.object({\n id: z.string().describe(\"Unique identifier for this nexus address\"),\n zip: z.string().describe(\"ZIP or postal code for nexus address\"),\n city: z.string().describe(\"City for nexus address\").optional(),\n state: z.string().describe(\"State or province for nexus address\"),\n street: z.string().describe(\"Street for nexus address\").optional(),\n country: z.string().describe(\"Country code (ISO 3166-1 alpha-2)\"),\n}).describe(\"A seller's nexus (tax jurisdiction) address.\")).describe(\"List of seller nexus addresses to consider for tax calculations\").optional(),\n}).describe(\"Request parameters for calculating sales tax on an order.\");\nconst TaxjarCalculateSalesTaxForAnOrder_ShippingBreakdownSchema: z.ZodTypeAny = z.object({\n city_amount: z.number().describe(\"City tax amount to collect on shipping\").nullable().optional(),\n state_amount: z.number().describe(\"State tax amount to collect on shipping\").nullable().optional(),\n city_tax_rate: z.number().describe(\"City tax rate applied to shipping\"),\n county_amount: z.number().describe(\"County tax amount to collect on shipping\").nullable().optional(),\n taxable_amount: z.number().describe(\"Taxable shipping amount\"),\n county_tax_rate: z.number().describe(\"County tax rate applied to shipping\"),\n tax_collectable: z.number().describe(\"Tax amount to collect on shipping\"),\n special_tax_rate: z.number().describe(\"Special district tax rate applied to shipping\").nullable().optional(),\n combined_tax_rate: z.number().describe(\"Combined tax rate applied to shipping\"),\n city_taxable_amount: z.number().describe(\"City taxable shipping amount\"),\n state_sales_tax_rate: z.number().describe(\"State tax rate applied to shipping\").nullable().optional(),\n state_taxable_amount: z.number().describe(\"State taxable shipping amount\"),\n county_taxable_amount: z.number().describe(\"County taxable shipping amount\"),\n special_taxable_amount: z.number().describe(\"Special district taxable shipping amount\"),\n special_district_amount: z.number().describe(\"Special district tax amount to collect on shipping\").nullable().optional(),\n}).describe(\"Tax breakdown details for shipping.\");\nconst TaxjarCalculateSalesTaxForAnOrder_LineItemBreakdownSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Line item identifier\").nullable().optional(),\n city_amount: z.number().describe(\"City tax amount to collect\").nullable().optional(),\n state_amount: z.number().describe(\"State tax amount to collect\").nullable().optional(),\n city_tax_rate: z.number().describe(\"City tax rate applied\"),\n county_amount: z.number().describe(\"County tax amount to collect\").nullable().optional(),\n taxable_amount: z.number().describe(\"Taxable amount for this line item\"),\n county_tax_rate: z.number().describe(\"County tax rate applied\"),\n tax_collectable: z.number().describe(\"Tax amount to collect for this line item\"),\n special_tax_rate: z.number().describe(\"Special district tax rate applied\").nullable().optional(),\n combined_tax_rate: z.number().describe(\"Combined tax rate applied\"),\n city_taxable_amount: z.number().describe(\"City taxable amount for this line item\"),\n state_sales_tax_rate: z.number().describe(\"State tax rate applied\").nullable().optional(),\n state_taxable_amount: z.number().describe(\"State taxable amount for this line item\"),\n county_taxable_amount: z.number().describe(\"County taxable amount for this line item\"),\n special_district_amount: z.number().describe(\"Special district tax amount to collect\").nullable().optional(),\n special_district_taxable_amount: z.number().describe(\"Special district taxable amount for this line item\"),\n}).describe(\"Tax breakdown details for a single line item.\");\nconst TaxjarCalculateSalesTaxForAnOrder_BreakdownSchema: z.ZodTypeAny = z.object({\n shipping: TaxjarCalculateSalesTaxForAnOrder_ShippingBreakdownSchema.nullable().optional(),\n line_items: z.array(TaxjarCalculateSalesTaxForAnOrder_LineItemBreakdownSchema).describe(\"Breakdown details per line item\").nullable().optional(),\n city_tax_rate: z.number().describe(\"City tax rate applied to order\"),\n state_tax_rate: z.number().describe(\"State tax rate applied to order\"),\n taxable_amount: z.number().describe(\"Total taxable amount for the order\"),\n county_tax_rate: z.number().describe(\"County tax rate applied to order\"),\n tax_collectable: z.number().describe(\"Total tax amount to collect for the order\"),\n special_tax_rate: z.number().describe(\"Special district tax rate applied to order\").nullable().optional(),\n combined_tax_rate: z.number().describe(\"Overall combined tax rate\"),\n city_taxable_amount: z.number().describe(\"Total city taxable amount\"),\n city_tax_collectable: z.number().describe(\"City tax amount to collect\"),\n state_taxable_amount: z.number().describe(\"Total state taxable amount\"),\n county_taxable_amount: z.number().describe(\"Total county taxable amount\"),\n state_tax_collectable: z.number().describe(\"State tax amount to collect\"),\n county_tax_collectable: z.number().describe(\"County tax amount to collect\"),\n special_district_taxable_amount: z.number().describe(\"Total special district taxable amount\"),\n special_district_tax_collectable: z.number().describe(\"Special district tax amount to collect\"),\n}).describe(\"Detailed tax breakdown for the order.\");\nconst TaxjarCalculateSalesTaxForAnOrder_JurisdictionsSchema: z.ZodTypeAny = z.object({\n city: z.string().describe(\"City level jurisdiction\").nullable().optional(),\n state: z.string().describe(\"State level jurisdiction\"),\n county: z.string().describe(\"County level jurisdiction\").nullable().optional(),\n country: z.string().describe(\"Country level jurisdiction\"),\n}).describe(\"Tax jurisdiction details for the order.\");\nconst TaxjarCalculateSalesTaxForAnOrder_TaxSchema: z.ZodTypeAny = z.object({\n rate: z.number().describe(\"Overall tax rate applied to order\"),\n shipping: z.number().describe(\"Shipping cost included in the order\"),\n breakdown: TaxjarCalculateSalesTaxForAnOrder_BreakdownSchema.nullable().optional(),\n has_nexus: z.boolean().describe(\"Whether the seller has nexus in the destination\"),\n tax_source: z.string().describe(\"Tax sourcing (origin or destination), null when no nexus\").nullable().optional(),\n jurisdictions: TaxjarCalculateSalesTaxForAnOrder_JurisdictionsSchema.nullable().optional(),\n exemption_type: z.string().describe(\"Exemption type if applicable\").nullable().optional(),\n taxable_amount: z.number().describe(\"Total taxable amount of the order\"),\n freight_taxable: z.boolean().describe(\"Whether shipping is taxable\"),\n amount_to_collect: z.number().describe(\"Total tax amount to collect\"),\n order_total_amount: z.number().describe(\"Total order amount including shipping\"),\n}).describe(\"Tax calculation result for the order.\");\nexport const TaxjarCalculateSalesTaxForAnOrderOutput: z.ZodTypeAny = z.object({\n tax: TaxjarCalculateSalesTaxForAnOrder_TaxSchema.nullable(),\n}).describe(\"Response model for sales tax calculation on an order.\");\n\nexport const taxjarCalculateSalesTaxForAnOrder = action(\"TAXJAR_CALCULATE_SALES_TAX_FOR_AN_ORDER\", {\n slug: \"taxjar-calculate-sales-tax-for-an-order\",\n name: \"Calculate Sales Tax For An Order\",\n description: \"Tool to calculate sales tax for an order. Use when you need an accurate tax calculation including nexus addresses, line items, shipping, and exemptions.\",\n input: TaxjarCalculateSalesTaxForAnOrderInput,\n output: TaxjarCalculateSalesTaxForAnOrderOutput,\n});\n"],"mappings":";;;AAIA,MAAa,yCAAuD,EAAE,OAAO;CAC3E,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC;CAC/D,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC;CAC5D,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,kBAAkB,CAAC,CAAC,SAAS;CAC1D,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B;CACzD,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B;CAC3D,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B;CAC7D,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,aAAa,CAAC,CAAC,SAAS;CACvD,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B,CAAC,CAAC,SAAS;CACtE,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B;CAC1D,YAAY,EAAE,MAAM,EAAE,OAAO;EAC7B,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,sBAAsB,CAAC,CAAC,SAAS;EACzD,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;EACpF,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oCAAoC;EACxE,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC;EACnE,kBAAkB,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;CAC9F,CAAC,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,CAAC,SAAS,iCAAiC,CAAC,CAAC,SAAS;CACjH,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C;CAC/E,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC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AO,CAAC,CAAC,SAAS,6BAA6B;CACpE,oBAAoB,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC;AACjF,CAAC,CAAC,CAAC,SAAS,uCAAuC;AAKnD,MAAa,oCAAoC,OAAO,2CAA2C;CACjG,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QATmE,EAAE,OAAO,EAC5E,KAAK,4CAA4C,SAAS,EAC5D,CAAC,CAAC,CAAC,SAAS,uDAOF;AACV,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/create-customer.ts
|
|
4
|
+
const TaxjarCreateCustomerInput = zod.z.object({
|
|
5
|
+
zip: zod.z.string().describe("Postal code for the customer's primary address").optional(),
|
|
6
|
+
city: zod.z.string().describe("City for the customer's primary address").optional(),
|
|
7
|
+
name: zod.z.string().describe("Full name of the customer or organization"),
|
|
8
|
+
state: zod.z.string().describe("Two-letter ISO state code for the customer's primary address (e.g., 'CA', 'NY')").optional(),
|
|
9
|
+
street: zod.z.string().describe("Street address for the customer's primary address").optional(),
|
|
10
|
+
country: zod.z.string().describe("Two-letter ISO country code for the customer's primary address (e.g., 'US', 'CA')").optional(),
|
|
11
|
+
customer_id: zod.z.string().describe("Unique identifier for the customer. This ID will be used to reference the customer in future API calls."),
|
|
12
|
+
exempt_regions: zod.z.array(zod.z.object({
|
|
13
|
+
state: zod.z.string().describe("Two-letter ISO state code for the exempt region"),
|
|
14
|
+
country: zod.z.string().describe("Two-letter ISO country code for the exempt region")
|
|
15
|
+
}).describe("A region where the customer is exempt from taxes.")).describe("List of regions where the customer is exempt from taxes. Each region must specify both country and state.").optional(),
|
|
16
|
+
exemption_type: zod.z.enum([
|
|
17
|
+
"wholesale",
|
|
18
|
+
"government",
|
|
19
|
+
"other",
|
|
20
|
+
"non_exempt"
|
|
21
|
+
]).describe("Type of tax exemption for the customer. Determines how tax calculations will be applied.")
|
|
22
|
+
}).describe("Request model for creating a new customer in TaxJar.");
|
|
23
|
+
const TaxjarCreateCustomer_CustomerResponseSchema = zod.z.object({
|
|
24
|
+
zip: zod.z.string().describe("Postal code").nullable().optional(),
|
|
25
|
+
city: zod.z.string().describe("City").nullable().optional(),
|
|
26
|
+
name: zod.z.string().describe("Customer's name"),
|
|
27
|
+
state: zod.z.string().describe("Two-letter ISO state code").nullable().optional(),
|
|
28
|
+
street: zod.z.string().describe("Street address").nullable().optional(),
|
|
29
|
+
country: zod.z.string().describe("Two-letter ISO country code").nullable().optional(),
|
|
30
|
+
customer_id: zod.z.string().describe("Unique identifier for the customer"),
|
|
31
|
+
exempt_regions: zod.z.array(zod.z.object({})).describe("List of regions where the customer is exempt from taxes").nullable().optional(),
|
|
32
|
+
exemption_type: zod.z.string().describe("Type of tax exemption for the customer")
|
|
33
|
+
}).describe("Customer object returned by TaxJar after creation.");
|
|
34
|
+
const TaxjarCreateCustomerOutput = zod.z.object({ customer: TaxjarCreateCustomer_CustomerResponseSchema.nullable() }).describe("Response model for creating a customer.");
|
|
35
|
+
const taxjarCreateCustomer = require_action.action("TAXJAR_CREATE_CUSTOMER", {
|
|
36
|
+
slug: "taxjar-create-customer",
|
|
37
|
+
name: "Create Customer",
|
|
38
|
+
description: "Tool to create a new customer with exemption information. Use when you need to add a customer to your TaxJar account for tax exemption management.",
|
|
39
|
+
input: TaxjarCreateCustomerInput,
|
|
40
|
+
output: TaxjarCreateCustomerOutput
|
|
41
|
+
});
|
|
42
|
+
//#endregion
|
|
43
|
+
exports.taxjarCreateCustomer = taxjarCreateCustomer;
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=create-customer.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-customer.cjs","names":["z","action"],"sources":["../../src/actions/create-customer.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const TaxjarCreateCustomerInput: z.ZodTypeAny = z.object({\n zip: z.string().describe(\"Postal code for the customer's primary address\").optional(),\n city: z.string().describe(\"City for the customer's primary address\").optional(),\n name: z.string().describe(\"Full name of the customer or organization\"),\n state: z.string().describe(\"Two-letter ISO state code for the customer's primary address (e.g., 'CA', 'NY')\").optional(),\n street: z.string().describe(\"Street address for the customer's primary address\").optional(),\n country: z.string().describe(\"Two-letter ISO country code for the customer's primary address (e.g., 'US', 'CA')\").optional(),\n customer_id: z.string().describe(\"Unique identifier for the customer. This ID will be used to reference the customer in future API calls.\"),\n exempt_regions: z.array(z.object({\n state: z.string().describe(\"Two-letter ISO state code for the exempt region\"),\n country: z.string().describe(\"Two-letter ISO country code for the exempt region\"),\n}).describe(\"A region where the customer is exempt from taxes.\")).describe(\"List of regions where the customer is exempt from taxes. Each region must specify both country and state.\").optional(),\n exemption_type: z.enum([\"wholesale\", \"government\", \"other\", \"non_exempt\"]).describe(\"Type of tax exemption for the customer. Determines how tax calculations will be applied.\"),\n}).describe(\"Request model for creating a new customer in TaxJar.\");\nconst TaxjarCreateCustomer_CustomerResponseSchema: z.ZodTypeAny = z.object({\n zip: z.string().describe(\"Postal code\").nullable().optional(),\n city: z.string().describe(\"City\").nullable().optional(),\n name: z.string().describe(\"Customer's name\"),\n state: z.string().describe(\"Two-letter ISO state code\").nullable().optional(),\n street: z.string().describe(\"Street address\").nullable().optional(),\n country: z.string().describe(\"Two-letter ISO country code\").nullable().optional(),\n customer_id: z.string().describe(\"Unique identifier for the customer\"),\n exempt_regions: z.array(z.object({})).describe(\"List of regions where the customer is exempt from taxes\").nullable().optional(),\n exemption_type: z.string().describe(\"Type of tax exemption for the customer\"),\n}).describe(\"Customer object returned by TaxJar after creation.\");\nexport const TaxjarCreateCustomerOutput: z.ZodTypeAny = z.object({\n customer: TaxjarCreateCustomer_CustomerResponseSchema.nullable(),\n}).describe(\"Response model for creating a customer.\");\n\nexport const taxjarCreateCustomer = action(\"TAXJAR_CREATE_CUSTOMER\", {\n slug: \"taxjar-create-customer\",\n name: \"Create Customer\",\n description: \"Tool to create a new customer with exemption information. Use when you need to add a customer to your TaxJar account for tax exemption management.\",\n input: TaxjarCreateCustomerInput,\n output: TaxjarCreateCustomerOutput,\n});\n"],"mappings":";;;AAIA,MAAa,4BAA0CA,IAAAA,EAAE,OAAO;CAC9D,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CACpF,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;CAC9E,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C;CACrE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS;CACvH,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS;CAC1F,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF,CAAC,CAAC,SAAS;CAC3H,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yGAAyG;CAC1I,gBAAgBA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EACjC,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD;EAC5E,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mDAAmD;CAClF,CAAC,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,CAAC,SAAS,2GAA2G,CAAC,CAAC,SAAS;CAC/L,gBAAgBA,IAAAA,EAAE,KAAK;EAAC;EAAa;EAAc;EAAS;CAAY,CAAC,CAAC,CAAC,SAAS,0FAA0F;AAChL,CAAC,CAAC,CAAC,SAAS,sDAAsD;AAClE,MAAM,8CAA4DA,IAAAA,EAAE,OAAO;CACzE,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,aAAa,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC5D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iBAAiB;CAC3C,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC5E,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gBAAgB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClE,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChF,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC;CACrE,gBAAgBA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC9H,gBAAgBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC;AAC9E,CAAC,CAAC,CAAC,SAAS,oDAAoD;AAChE,MAAa,6BAA2CA,IAAAA,EAAE,OAAO,EAC/D,UAAU,4CAA4C,SAAS,EACjE,CAAC,CAAC,CAAC,SAAS,yCAAyC;AAErD,MAAa,uBAAuBC,eAAAA,OAAO,0BAA0B;CACnE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-customer.d.ts
|
|
4
|
+
declare const TaxjarCreateCustomerInput: z.ZodTypeAny;
|
|
5
|
+
declare const TaxjarCreateCustomerOutput: z.ZodTypeAny;
|
|
6
|
+
declare const taxjarCreateCustomer: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { taxjarCreateCustomer };
|
|
9
|
+
//# sourceMappingURL=create-customer.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-customer.d.cts","names":[],"sources":["../../src/actions/create-customer.ts"],"mappings":";;;cAIa,yBAAA,EAA2B,CAAA,CAAE,UAayB;AAAA,cAYtD,0BAAA,EAA4B,CAAA,CAAE,UAEW;AAAA,cAEzC,oBAAA,gCAAoB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-customer.d.ts
|
|
4
|
+
declare const TaxjarCreateCustomerInput: z.ZodTypeAny;
|
|
5
|
+
declare const TaxjarCreateCustomerOutput: z.ZodTypeAny;
|
|
6
|
+
declare const taxjarCreateCustomer: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { taxjarCreateCustomer };
|
|
9
|
+
//# sourceMappingURL=create-customer.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-customer.d.mts","names":[],"sources":["../../src/actions/create-customer.ts"],"mappings":";;;cAIa,yBAAA,EAA2B,CAAA,CAAE,UAayB;AAAA,cAYtD,0BAAA,EAA4B,CAAA,CAAE,UAEW;AAAA,cAEzC,oBAAA,gCAAoB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/actions/create-customer.ts
|
|
4
|
+
const TaxjarCreateCustomerInput = z.object({
|
|
5
|
+
zip: z.string().describe("Postal code for the customer's primary address").optional(),
|
|
6
|
+
city: z.string().describe("City for the customer's primary address").optional(),
|
|
7
|
+
name: z.string().describe("Full name of the customer or organization"),
|
|
8
|
+
state: z.string().describe("Two-letter ISO state code for the customer's primary address (e.g., 'CA', 'NY')").optional(),
|
|
9
|
+
street: z.string().describe("Street address for the customer's primary address").optional(),
|
|
10
|
+
country: z.string().describe("Two-letter ISO country code for the customer's primary address (e.g., 'US', 'CA')").optional(),
|
|
11
|
+
customer_id: z.string().describe("Unique identifier for the customer. This ID will be used to reference the customer in future API calls."),
|
|
12
|
+
exempt_regions: z.array(z.object({
|
|
13
|
+
state: z.string().describe("Two-letter ISO state code for the exempt region"),
|
|
14
|
+
country: z.string().describe("Two-letter ISO country code for the exempt region")
|
|
15
|
+
}).describe("A region where the customer is exempt from taxes.")).describe("List of regions where the customer is exempt from taxes. Each region must specify both country and state.").optional(),
|
|
16
|
+
exemption_type: z.enum([
|
|
17
|
+
"wholesale",
|
|
18
|
+
"government",
|
|
19
|
+
"other",
|
|
20
|
+
"non_exempt"
|
|
21
|
+
]).describe("Type of tax exemption for the customer. Determines how tax calculations will be applied.")
|
|
22
|
+
}).describe("Request model for creating a new customer in TaxJar.");
|
|
23
|
+
const TaxjarCreateCustomer_CustomerResponseSchema = z.object({
|
|
24
|
+
zip: z.string().describe("Postal code").nullable().optional(),
|
|
25
|
+
city: z.string().describe("City").nullable().optional(),
|
|
26
|
+
name: z.string().describe("Customer's name"),
|
|
27
|
+
state: z.string().describe("Two-letter ISO state code").nullable().optional(),
|
|
28
|
+
street: z.string().describe("Street address").nullable().optional(),
|
|
29
|
+
country: z.string().describe("Two-letter ISO country code").nullable().optional(),
|
|
30
|
+
customer_id: z.string().describe("Unique identifier for the customer"),
|
|
31
|
+
exempt_regions: z.array(z.object({})).describe("List of regions where the customer is exempt from taxes").nullable().optional(),
|
|
32
|
+
exemption_type: z.string().describe("Type of tax exemption for the customer")
|
|
33
|
+
}).describe("Customer object returned by TaxJar after creation.");
|
|
34
|
+
const taxjarCreateCustomer = action("TAXJAR_CREATE_CUSTOMER", {
|
|
35
|
+
slug: "taxjar-create-customer",
|
|
36
|
+
name: "Create Customer",
|
|
37
|
+
description: "Tool to create a new customer with exemption information. Use when you need to add a customer to your TaxJar account for tax exemption management.",
|
|
38
|
+
input: TaxjarCreateCustomerInput,
|
|
39
|
+
output: z.object({ customer: TaxjarCreateCustomer_CustomerResponseSchema.nullable() }).describe("Response model for creating a customer.")
|
|
40
|
+
});
|
|
41
|
+
//#endregion
|
|
42
|
+
export { taxjarCreateCustomer };
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=create-customer.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-customer.mjs","names":[],"sources":["../../src/actions/create-customer.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const TaxjarCreateCustomerInput: z.ZodTypeAny = z.object({\n zip: z.string().describe(\"Postal code for the customer's primary address\").optional(),\n city: z.string().describe(\"City for the customer's primary address\").optional(),\n name: z.string().describe(\"Full name of the customer or organization\"),\n state: z.string().describe(\"Two-letter ISO state code for the customer's primary address (e.g., 'CA', 'NY')\").optional(),\n street: z.string().describe(\"Street address for the customer's primary address\").optional(),\n country: z.string().describe(\"Two-letter ISO country code for the customer's primary address (e.g., 'US', 'CA')\").optional(),\n customer_id: z.string().describe(\"Unique identifier for the customer. This ID will be used to reference the customer in future API calls.\"),\n exempt_regions: z.array(z.object({\n state: z.string().describe(\"Two-letter ISO state code for the exempt region\"),\n country: z.string().describe(\"Two-letter ISO country code for the exempt region\"),\n}).describe(\"A region where the customer is exempt from taxes.\")).describe(\"List of regions where the customer is exempt from taxes. Each region must specify both country and state.\").optional(),\n exemption_type: z.enum([\"wholesale\", \"government\", \"other\", \"non_exempt\"]).describe(\"Type of tax exemption for the customer. Determines how tax calculations will be applied.\"),\n}).describe(\"Request model for creating a new customer in TaxJar.\");\nconst TaxjarCreateCustomer_CustomerResponseSchema: z.ZodTypeAny = z.object({\n zip: z.string().describe(\"Postal code\").nullable().optional(),\n city: z.string().describe(\"City\").nullable().optional(),\n name: z.string().describe(\"Customer's name\"),\n state: z.string().describe(\"Two-letter ISO state code\").nullable().optional(),\n street: z.string().describe(\"Street address\").nullable().optional(),\n country: z.string().describe(\"Two-letter ISO country code\").nullable().optional(),\n customer_id: z.string().describe(\"Unique identifier for the customer\"),\n exempt_regions: z.array(z.object({})).describe(\"List of regions where the customer is exempt from taxes\").nullable().optional(),\n exemption_type: z.string().describe(\"Type of tax exemption for the customer\"),\n}).describe(\"Customer object returned by TaxJar after creation.\");\nexport const TaxjarCreateCustomerOutput: z.ZodTypeAny = z.object({\n customer: TaxjarCreateCustomer_CustomerResponseSchema.nullable(),\n}).describe(\"Response model for creating a customer.\");\n\nexport const taxjarCreateCustomer = action(\"TAXJAR_CREATE_CUSTOMER\", {\n slug: \"taxjar-create-customer\",\n name: \"Create Customer\",\n description: \"Tool to create a new customer with exemption information. Use when you need to add a customer to your TaxJar account for tax exemption management.\",\n input: TaxjarCreateCustomerInput,\n output: TaxjarCreateCustomerOutput,\n});\n"],"mappings":";;;AAIA,MAAa,4BAA0C,EAAE,OAAO;CAC9D,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CACpF,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;CAC9E,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C;CACrE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS;CACvH,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS;CAC1F,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF,CAAC,CAAC,SAAS;CAC3H,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,yGAAy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