@keystrokehq/finmei 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/create-expense.cjs +35 -0
- package/dist/actions/create-expense.cjs.map +1 -0
- package/dist/actions/create-expense.d.cts +9 -0
- package/dist/actions/create-expense.d.cts.map +1 -0
- package/dist/actions/create-expense.d.mts +9 -0
- package/dist/actions/create-expense.d.mts.map +1 -0
- package/dist/actions/create-expense.mjs +34 -0
- package/dist/actions/create-expense.mjs.map +1 -0
- package/dist/actions/create-invoice.cjs +139 -0
- package/dist/actions/create-invoice.cjs.map +1 -0
- package/dist/actions/create-invoice.d.cts +9 -0
- package/dist/actions/create-invoice.d.cts.map +1 -0
- package/dist/actions/create-invoice.d.mts +9 -0
- package/dist/actions/create-invoice.d.mts.map +1 -0
- package/dist/actions/create-invoice.mjs +138 -0
- package/dist/actions/create-invoice.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-invoice.cjs +19 -0
- package/dist/actions/delete-invoice.cjs.map +1 -0
- package/dist/actions/delete-invoice.d.cts +9 -0
- package/dist/actions/delete-invoice.d.cts.map +1 -0
- package/dist/actions/delete-invoice.d.mts +9 -0
- package/dist/actions/delete-invoice.d.mts.map +1 -0
- package/dist/actions/delete-invoice.mjs +16 -0
- package/dist/actions/delete-invoice.mjs.map +1 -0
- package/dist/actions/delete-payment.cjs +16 -0
- package/dist/actions/delete-payment.cjs.map +1 -0
- package/dist/actions/delete-payment.d.cts +9 -0
- package/dist/actions/delete-payment.d.cts.map +1 -0
- package/dist/actions/delete-payment.d.mts +9 -0
- package/dist/actions/delete-payment.d.mts.map +1 -0
- package/dist/actions/delete-payment.mjs +13 -0
- package/dist/actions/delete-payment.mjs.map +1 -0
- package/dist/actions/delete-product.cjs +19 -0
- package/dist/actions/delete-product.cjs.map +1 -0
- package/dist/actions/delete-product.d.cts +9 -0
- package/dist/actions/delete-product.d.cts.map +1 -0
- package/dist/actions/delete-product.d.mts +9 -0
- package/dist/actions/delete-product.d.mts.map +1 -0
- package/dist/actions/delete-product.mjs +16 -0
- package/dist/actions/delete-product.mjs.map +1 -0
- package/dist/actions/download-expense-file.cjs +21 -0
- package/dist/actions/download-expense-file.cjs.map +1 -0
- package/dist/actions/download-expense-file.d.cts +9 -0
- package/dist/actions/download-expense-file.d.cts.map +1 -0
- package/dist/actions/download-expense-file.d.mts +9 -0
- package/dist/actions/download-expense-file.d.mts.map +1 -0
- package/dist/actions/download-expense-file.mjs +20 -0
- package/dist/actions/download-expense-file.mjs.map +1 -0
- package/dist/actions/download-invoice-pdf.cjs +21 -0
- package/dist/actions/download-invoice-pdf.cjs.map +1 -0
- package/dist/actions/download-invoice-pdf.d.cts +9 -0
- package/dist/actions/download-invoice-pdf.d.cts.map +1 -0
- package/dist/actions/download-invoice-pdf.d.mts +9 -0
- package/dist/actions/download-invoice-pdf.d.mts.map +1 -0
- package/dist/actions/download-invoice-pdf.mjs +20 -0
- package/dist/actions/download-invoice-pdf.mjs.map +1 -0
- package/dist/actions/get-expense.cjs +25 -0
- package/dist/actions/get-expense.cjs.map +1 -0
- package/dist/actions/get-expense.d.cts +9 -0
- package/dist/actions/get-expense.d.cts.map +1 -0
- package/dist/actions/get-expense.d.mts +9 -0
- package/dist/actions/get-expense.d.mts.map +1 -0
- package/dist/actions/get-expense.mjs +24 -0
- package/dist/actions/get-expense.mjs.map +1 -0
- package/dist/actions/get-invoice.cjs +70 -0
- package/dist/actions/get-invoice.cjs.map +1 -0
- package/dist/actions/get-invoice.d.cts +9 -0
- package/dist/actions/get-invoice.d.cts.map +1 -0
- package/dist/actions/get-invoice.d.mts +9 -0
- package/dist/actions/get-invoice.d.mts.map +1 -0
- package/dist/actions/get-invoice.mjs +69 -0
- package/dist/actions/get-invoice.mjs.map +1 -0
- package/dist/actions/get-payment.cjs +26 -0
- package/dist/actions/get-payment.cjs.map +1 -0
- package/dist/actions/get-payment.d.cts +9 -0
- package/dist/actions/get-payment.d.cts.map +1 -0
- package/dist/actions/get-payment.d.mts +9 -0
- package/dist/actions/get-payment.d.mts.map +1 -0
- package/dist/actions/get-payment.mjs +23 -0
- package/dist/actions/get-payment.mjs.map +1 -0
- package/dist/actions/get-product.cjs +24 -0
- package/dist/actions/get-product.cjs.map +1 -0
- package/dist/actions/get-product.d.cts +9 -0
- package/dist/actions/get-product.d.cts.map +1 -0
- package/dist/actions/get-product.d.mts +9 -0
- package/dist/actions/get-product.d.mts.map +1 -0
- package/dist/actions/get-product.mjs +21 -0
- package/dist/actions/get-product.mjs.map +1 -0
- package/dist/actions/get-profile.cjs +25 -0
- package/dist/actions/get-profile.cjs.map +1 -0
- package/dist/actions/get-profile.d.cts +9 -0
- package/dist/actions/get-profile.d.cts.map +1 -0
- package/dist/actions/get-profile.d.mts +9 -0
- package/dist/actions/get-profile.d.mts.map +1 -0
- package/dist/actions/get-profile.mjs +24 -0
- package/dist/actions/get-profile.mjs.map +1 -0
- package/dist/actions/index.cjs +49 -0
- package/dist/actions/index.d.cts +25 -0
- package/dist/actions/index.d.mts +25 -0
- package/dist/actions/index.mjs +25 -0
- package/dist/actions/list-currencies.cjs +21 -0
- package/dist/actions/list-currencies.cjs.map +1 -0
- package/dist/actions/list-currencies.d.cts +9 -0
- package/dist/actions/list-currencies.d.cts.map +1 -0
- package/dist/actions/list-currencies.d.mts +9 -0
- package/dist/actions/list-currencies.d.mts.map +1 -0
- package/dist/actions/list-currencies.mjs +20 -0
- package/dist/actions/list-currencies.mjs.map +1 -0
- package/dist/actions/list-customers.cjs +39 -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 +38 -0
- package/dist/actions/list-customers.mjs.map +1 -0
- package/dist/actions/list-expenses.cjs +40 -0
- package/dist/actions/list-expenses.cjs.map +1 -0
- package/dist/actions/list-expenses.d.cts +9 -0
- package/dist/actions/list-expenses.d.cts.map +1 -0
- package/dist/actions/list-expenses.d.mts +9 -0
- package/dist/actions/list-expenses.d.mts.map +1 -0
- package/dist/actions/list-expenses.mjs +39 -0
- package/dist/actions/list-expenses.mjs.map +1 -0
- package/dist/actions/list-invoices.cjs +86 -0
- package/dist/actions/list-invoices.cjs.map +1 -0
- package/dist/actions/list-invoices.d.cts +9 -0
- package/dist/actions/list-invoices.d.cts.map +1 -0
- package/dist/actions/list-invoices.d.mts +9 -0
- package/dist/actions/list-invoices.d.mts.map +1 -0
- package/dist/actions/list-invoices.mjs +85 -0
- package/dist/actions/list-invoices.mjs.map +1 -0
- package/dist/actions/list-payments.cjs +42 -0
- package/dist/actions/list-payments.cjs.map +1 -0
- package/dist/actions/list-payments.d.cts +9 -0
- package/dist/actions/list-payments.d.cts.map +1 -0
- package/dist/actions/list-payments.d.mts +9 -0
- package/dist/actions/list-payments.d.mts.map +1 -0
- package/dist/actions/list-payments.mjs +41 -0
- package/dist/actions/list-payments.mjs.map +1 -0
- package/dist/actions/list-products.cjs +39 -0
- package/dist/actions/list-products.cjs.map +1 -0
- package/dist/actions/list-products.d.cts +9 -0
- package/dist/actions/list-products.d.cts.map +1 -0
- package/dist/actions/list-products.d.mts +9 -0
- package/dist/actions/list-products.d.mts.map +1 -0
- package/dist/actions/list-products.mjs +38 -0
- package/dist/actions/list-products.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-expense-file.cjs +29 -0
- package/dist/actions/update-expense-file.cjs.map +1 -0
- package/dist/actions/update-expense-file.d.cts +9 -0
- package/dist/actions/update-expense-file.d.cts.map +1 -0
- package/dist/actions/update-expense-file.d.mts +9 -0
- package/dist/actions/update-expense-file.d.mts.map +1 -0
- package/dist/actions/update-expense-file.mjs +26 -0
- package/dist/actions/update-expense-file.mjs.map +1 -0
- package/dist/actions/update-expense.cjs +30 -0
- package/dist/actions/update-expense.cjs.map +1 -0
- package/dist/actions/update-expense.d.cts +9 -0
- package/dist/actions/update-expense.d.cts.map +1 -0
- package/dist/actions/update-expense.d.mts +9 -0
- package/dist/actions/update-expense.d.mts.map +1 -0
- package/dist/actions/update-expense.mjs +27 -0
- package/dist/actions/update-expense.mjs.map +1 -0
- package/dist/actions/update-invoice.cjs +121 -0
- package/dist/actions/update-invoice.cjs.map +1 -0
- package/dist/actions/update-invoice.d.cts +9 -0
- package/dist/actions/update-invoice.d.cts.map +1 -0
- package/dist/actions/update-invoice.d.mts +9 -0
- package/dist/actions/update-invoice.d.mts.map +1 -0
- package/dist/actions/update-invoice.mjs +120 -0
- package/dist/actions/update-invoice.mjs.map +1 -0
- package/dist/actions/update-product.cjs +30 -0
- package/dist/actions/update-product.cjs.map +1 -0
- package/dist/actions/update-product.d.cts +9 -0
- package/dist/actions/update-product.d.cts.map +1 -0
- package/dist/actions/update-product.d.mts +9 -0
- package/dist/actions/update-product.d.mts.map +1 -0
- package/dist/actions/update-product.mjs +27 -0
- package/dist/actions/update-product.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 +54 -0
- package/dist/index.d.cts +27 -0
- package/dist/index.d.mts +27 -0
- package/dist/index.mjs +28 -0
- package/package.json +49 -0
package/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# @keystrokehq/finmei
|
|
2
|
+
|
|
3
|
+
Keystroke-managed integration.
|
|
4
|
+
|
|
5
|
+
**App:** `finmei`
|
|
6
|
+
**Version:** `20260615_00`
|
|
7
|
+
**Actions:** 24
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { defineAgent } from "@keystrokehq/keystroke/agent";
|
|
11
|
+
import { finmeiCreateExpense } from "@keystrokehq/finmei/actions";
|
|
12
|
+
|
|
13
|
+
export default defineAgent({
|
|
14
|
+
key: "finmei-agent",
|
|
15
|
+
tools: [finmeiCreateExpense],
|
|
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.finmei.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.executeFinmeiTool(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":["finmei","executeFinmeiTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { finmei } from \"./app\";\nimport { executeFinmeiTool } 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 finmei.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 executeFinmeiTool(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 { finmei } from "./app.mjs";
|
|
2
|
+
import { executeFinmeiTool } 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 finmei.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 executeFinmeiTool(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 { finmei } from \"./app\";\nimport { executeFinmeiTool } 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 finmei.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 executeFinmeiTool(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,35 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/create-expense.ts
|
|
4
|
+
const FinmeiCreateExpenseInput = zod.z.object({
|
|
5
|
+
date: zod.z.string().describe("Date of the expense in YYYY-MM-DD format"),
|
|
6
|
+
file: zod.z.object({
|
|
7
|
+
name: zod.z.string().describe("The filename that will be used when uploading the file to the destination service"),
|
|
8
|
+
s3key: zod.z.string().describe("The S3 key of a publicly accessible file, typically returned from a previous download action that stored the file in S3. This key references an existing file that can be uploaded to another service."),
|
|
9
|
+
mimetype: zod.z.string().describe("The MIME type of the file")
|
|
10
|
+
}).describe("Receipt file (PDF or image)."),
|
|
11
|
+
total: zod.z.number().describe("Total amount of the expense, must be non-negative"),
|
|
12
|
+
seller: zod.z.string().describe("Name of the seller/vendor from the invoice or receipt"),
|
|
13
|
+
currency: zod.z.string().describe("Uppercase three-letter ISO 4217 currency code")
|
|
14
|
+
}).describe("Request model for creating a new expense with file upload");
|
|
15
|
+
const FinmeiCreateExpense_ExpenseDataSchema = zod.z.object({
|
|
16
|
+
id: zod.z.string().describe("Unique identifier of the created expense"),
|
|
17
|
+
date: zod.z.string().describe("Date of the expense"),
|
|
18
|
+
total: zod.z.number().describe("Total amount of the expense"),
|
|
19
|
+
seller: zod.z.string().describe("Name of the seller"),
|
|
20
|
+
currency: zod.z.string().describe("Currency code of the expense"),
|
|
21
|
+
created_at: zod.z.number().int().describe("Unix timestamp when the expense was created"),
|
|
22
|
+
updated_at: zod.z.number().int().describe("Unix timestamp when the expense was last updated")
|
|
23
|
+
}).describe("Nested data object in the expense response");
|
|
24
|
+
const FinmeiCreateExpenseOutput = zod.z.object({ data: FinmeiCreateExpense_ExpenseDataSchema.nullable() }).describe("Response model for created expense");
|
|
25
|
+
const finmeiCreateExpense = require_action.action("FINMEI_CREATE_EXPENSE", {
|
|
26
|
+
slug: "finmei-create-expense",
|
|
27
|
+
name: "Create Expense",
|
|
28
|
+
description: "Tool to create a new expense with file upload (receipt or invoice). Use when you need to record an expense with supporting documentation. Requires multipart/form-data submission with file, date, total, currency, and seller information.",
|
|
29
|
+
input: FinmeiCreateExpenseInput,
|
|
30
|
+
output: FinmeiCreateExpenseOutput
|
|
31
|
+
});
|
|
32
|
+
//#endregion
|
|
33
|
+
exports.finmeiCreateExpense = finmeiCreateExpense;
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=create-expense.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-expense.cjs","names":["z","action"],"sources":["../../src/actions/create-expense.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const FinmeiCreateExpenseInput: z.ZodTypeAny = z.object({\n date: z.string().describe(\"Date of the expense in YYYY-MM-DD format\"),\n file: z.object({\n name: z.string().describe(\"The filename that will be used when uploading the file to the destination service\"),\n s3key: z.string().describe(\"The S3 key of a publicly accessible file, typically returned from a previous download action that stored the file in S3. This key references an existing file that can be uploaded to another service.\"),\n mimetype: z.string().describe(\"The MIME type of the file\"),\n}).describe(\"Receipt file (PDF or image).\"),\n total: z.number().describe(\"Total amount of the expense, must be non-negative\"),\n seller: z.string().describe(\"Name of the seller/vendor from the invoice or receipt\"),\n currency: z.string().describe(\"Uppercase three-letter ISO 4217 currency code\"),\n}).describe(\"Request model for creating a new expense with file upload\");\nconst FinmeiCreateExpense_ExpenseDataSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the created expense\"),\n date: z.string().describe(\"Date of the expense\"),\n total: z.number().describe(\"Total amount of the expense\"),\n seller: z.string().describe(\"Name of the seller\"),\n currency: z.string().describe(\"Currency code of the expense\"),\n created_at: z.number().int().describe(\"Unix timestamp when the expense was created\"),\n updated_at: z.number().int().describe(\"Unix timestamp when the expense was last updated\"),\n}).describe(\"Nested data object in the expense response\");\nexport const FinmeiCreateExpenseOutput: z.ZodTypeAny = z.object({\n data: FinmeiCreateExpense_ExpenseDataSchema.nullable(),\n}).describe(\"Response model for created expense\");\n\nexport const finmeiCreateExpense = action(\"FINMEI_CREATE_EXPENSE\", {\n slug: \"finmei-create-expense\",\n name: \"Create Expense\",\n description: \"Tool to create a new expense with file upload (receipt or invoice). Use when you need to record an expense with supporting documentation. Requires multipart/form-data submission with file, date, total, currency, and seller information.\",\n input: Finme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AC,CAAC,CAAC,SAAS,oCAAoC;AAEhD,MAAa,sBAAsBC,eAAAA,OAAO,yBAAyB;CACjE,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-expense.d.ts
|
|
4
|
+
declare const FinmeiCreateExpenseInput: z.ZodTypeAny;
|
|
5
|
+
declare const FinmeiCreateExpenseOutput: z.ZodTypeAny;
|
|
6
|
+
declare const finmeiCreateExpense: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { finmeiCreateExpense };
|
|
9
|
+
//# sourceMappingURL=create-expense.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-expense.d.cts","names":[],"sources":["../../src/actions/create-expense.ts"],"mappings":";;;cAIa,wBAAA,EAA0B,CAAA,CAAE,UAU+B;AAAA,cAU3D,yBAAA,EAA2B,CAAA,CAAE,UAEO;AAAA,cAEpC,mBAAA,gCAAmB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-expense.d.ts
|
|
4
|
+
declare const FinmeiCreateExpenseInput: z.ZodTypeAny;
|
|
5
|
+
declare const FinmeiCreateExpenseOutput: z.ZodTypeAny;
|
|
6
|
+
declare const finmeiCreateExpense: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { finmeiCreateExpense };
|
|
9
|
+
//# sourceMappingURL=create-expense.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-expense.d.mts","names":[],"sources":["../../src/actions/create-expense.ts"],"mappings":";;;cAIa,wBAAA,EAA0B,CAAA,CAAE,UAU+B;AAAA,cAU3D,yBAAA,EAA2B,CAAA,CAAE,UAEO;AAAA,cAEpC,mBAAA,gCAAmB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/actions/create-expense.ts
|
|
4
|
+
const FinmeiCreateExpenseInput = z.object({
|
|
5
|
+
date: z.string().describe("Date of the expense in YYYY-MM-DD format"),
|
|
6
|
+
file: z.object({
|
|
7
|
+
name: z.string().describe("The filename that will be used when uploading the file to the destination service"),
|
|
8
|
+
s3key: z.string().describe("The S3 key of a publicly accessible file, typically returned from a previous download action that stored the file in S3. This key references an existing file that can be uploaded to another service."),
|
|
9
|
+
mimetype: z.string().describe("The MIME type of the file")
|
|
10
|
+
}).describe("Receipt file (PDF or image)."),
|
|
11
|
+
total: z.number().describe("Total amount of the expense, must be non-negative"),
|
|
12
|
+
seller: z.string().describe("Name of the seller/vendor from the invoice or receipt"),
|
|
13
|
+
currency: z.string().describe("Uppercase three-letter ISO 4217 currency code")
|
|
14
|
+
}).describe("Request model for creating a new expense with file upload");
|
|
15
|
+
const FinmeiCreateExpense_ExpenseDataSchema = z.object({
|
|
16
|
+
id: z.string().describe("Unique identifier of the created expense"),
|
|
17
|
+
date: z.string().describe("Date of the expense"),
|
|
18
|
+
total: z.number().describe("Total amount of the expense"),
|
|
19
|
+
seller: z.string().describe("Name of the seller"),
|
|
20
|
+
currency: z.string().describe("Currency code of the expense"),
|
|
21
|
+
created_at: z.number().int().describe("Unix timestamp when the expense was created"),
|
|
22
|
+
updated_at: z.number().int().describe("Unix timestamp when the expense was last updated")
|
|
23
|
+
}).describe("Nested data object in the expense response");
|
|
24
|
+
const finmeiCreateExpense = action("FINMEI_CREATE_EXPENSE", {
|
|
25
|
+
slug: "finmei-create-expense",
|
|
26
|
+
name: "Create Expense",
|
|
27
|
+
description: "Tool to create a new expense with file upload (receipt or invoice). Use when you need to record an expense with supporting documentation. Requires multipart/form-data submission with file, date, total, currency, and seller information.",
|
|
28
|
+
input: FinmeiCreateExpenseInput,
|
|
29
|
+
output: z.object({ data: FinmeiCreateExpense_ExpenseDataSchema.nullable() }).describe("Response model for created expense")
|
|
30
|
+
});
|
|
31
|
+
//#endregion
|
|
32
|
+
export { finmeiCreateExpense };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=create-expense.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-expense.mjs","names":[],"sources":["../../src/actions/create-expense.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const FinmeiCreateExpenseInput: z.ZodTypeAny = z.object({\n date: z.string().describe(\"Date of the expense in YYYY-MM-DD format\"),\n file: z.object({\n name: z.string().describe(\"The filename that will be used when uploading the file to the destination service\"),\n s3key: z.string().describe(\"The S3 key of a publicly accessible file, typically returned from a previous download action that stored the file in S3. This key references an existing file that can be uploaded to another service.\"),\n mimetype: z.string().describe(\"The MIME type of the file\"),\n}).describe(\"Receipt file (PDF or image).\"),\n total: z.number().describe(\"Total amount of the expense, must be non-negative\"),\n seller: z.string().describe(\"Name of the seller/vendor from the invoice or receipt\"),\n currency: z.string().describe(\"Uppercase three-letter ISO 4217 currency code\"),\n}).describe(\"Request model for creating a new expense with file upload\");\nconst FinmeiCreateExpense_ExpenseDataSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the created expense\"),\n date: z.string().describe(\"Date of the expense\"),\n total: z.number().describe(\"Total amount of the expense\"),\n seller: z.string().describe(\"Name of the seller\"),\n currency: z.string().describe(\"Currency code of the expense\"),\n created_at: z.number().int().describe(\"Unix timestamp when the expense was created\"),\n updated_at: z.number().int().describe(\"Unix timestamp when the expense was last updated\"),\n}).describe(\"Nested data object in the expense response\");\nexport const FinmeiCreateExpenseOutput: z.ZodTypeAny = z.object({\n data: FinmeiCreateExpense_ExpenseDataSchema.nullable(),\n}).describe(\"Response model for created expense\");\n\nexport const finmeiCreateExpense = action(\"FINMEI_CREATE_EXPENSE\", {\n slug: \"finmei-create-expense\",\n name: \"Create Expense\",\n description: \"Tool to create a new expense with file upload (receipt or invoice). Use when you need to record an expense with supporting documentation. Requires multipart/form-data submission with file, date, total, currency, and seller information.\",\n input: FinmeiCreateExpenseInput,\n output: FinmeiCreateExpenseOutput,\n});\n"],"mappings":";;;AAIA,MAAa,2BAAyC,EAAE,OAAO;CAC7D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C;CACpE,MAAM,EAAE,OAAO;EACf,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF;EAC7G,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,wMAAwM;EACnO,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B;CAC3D,CAAC,CAAC,CAAC,SAAS,8BAA8B;CACxC,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,mDAAmD;CAC9E,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD;CACnF,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C;AAC/E,CAAC,CAAC,CAAC,SAAS,2DAA2D;AACvE,MAAM,wCAAsD,EAAE,OAAO;CACnE,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C;CAClE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,qBAAqB;CAC/C,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B;CACxD,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB;CAChD,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B;CAC5D,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,6CAA6C;CACnF,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kDAAkD;AAC1F,CAAC,CAAC,CAAC,SAAS,4CAA4C;AAKxD,MAAa,sBAAsB,OAAO,yBAAyB;CACjE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QATqD,EAAE,OAAO,EAC9D,MAAM,sCAAsC,SAAS,EACvD,CAAC,CAAC,CAAC,SAAS,oCAOF;AACV,CAAC"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/create-invoice.ts
|
|
4
|
+
const FinmeiCreateInvoiceInput = zod.z.object({
|
|
5
|
+
code: zod.z.string().describe("Optional custom invoice code or reference").optional(),
|
|
6
|
+
type: zod.z.enum([
|
|
7
|
+
"regular_invoice",
|
|
8
|
+
"vat_invoice",
|
|
9
|
+
"preliminary_invoice",
|
|
10
|
+
"preliminary_vat_invoice",
|
|
11
|
+
"credit_invoice",
|
|
12
|
+
"credit_vat_invoice"
|
|
13
|
+
]).describe("Invoice type required by API. Valid values: 'regular_invoice', 'vat_invoice', 'preliminary_invoice', 'preliminary_vat_invoice', 'credit_invoice', 'credit_vat_invoice'").optional(),
|
|
14
|
+
buyer: zod.z.object({
|
|
15
|
+
name: zod.z.string().describe("Generic name (legacy/compat)").optional(),
|
|
16
|
+
type: zod.z.enum(["person", "company"]).describe("Buyer type as required by the API"),
|
|
17
|
+
email: zod.z.string().describe("Buyer email").optional(),
|
|
18
|
+
address: zod.z.string().describe("Buyer address").optional(),
|
|
19
|
+
last_name: zod.z.string().describe("Buyer last name (person)").optional(),
|
|
20
|
+
first_name: zod.z.string().describe("Buyer first name (person)").optional(),
|
|
21
|
+
company_name: zod.z.string().describe("Company name (company)").optional()
|
|
22
|
+
}).describe("Buyer object; required by API when not using customer_id").optional(),
|
|
23
|
+
notes: zod.z.string().describe("Optional notes to appear on the invoice").optional(),
|
|
24
|
+
seller: zod.z.object({
|
|
25
|
+
email: zod.z.string().describe("Seller email").optional(),
|
|
26
|
+
address: zod.z.string().describe("Seller address").optional(),
|
|
27
|
+
company_name: zod.z.string().describe("Seller company name")
|
|
28
|
+
}).describe("Seller object if not using default").optional(),
|
|
29
|
+
series: zod.z.string().describe("Series code/prefix for the invoice").optional(),
|
|
30
|
+
currency: zod.z.string().describe("ISO 4217 three-letter currency code").optional(),
|
|
31
|
+
customer: zod.z.object({
|
|
32
|
+
name: zod.z.string().describe("Full name of the customer"),
|
|
33
|
+
email: zod.z.string().describe("Email address of the customer"),
|
|
34
|
+
address: zod.z.string().describe("Postal address of the customer").optional()
|
|
35
|
+
}).describe("Inline customer details; mutually exclusive with `customer_id`").optional(),
|
|
36
|
+
due_date: zod.z.string().describe("Payment due date (YYYY-MM-DD)").optional(),
|
|
37
|
+
products: zod.z.array(zod.z.object({
|
|
38
|
+
name: zod.z.string().describe("Product or service name"),
|
|
39
|
+
price: zod.z.number().describe("Unit price for this product"),
|
|
40
|
+
units: zod.z.string().describe("Units for the product (e.g., pcs, hours)").optional(),
|
|
41
|
+
quantity: zod.z.number().describe("Quantity for this product"),
|
|
42
|
+
vat_percentage: zod.z.number().describe("VAT percentage to apply (0-100)").optional()
|
|
43
|
+
})).describe("Products array as required by API").optional(),
|
|
44
|
+
issue_date: zod.z.string().describe("Date the invoice was issued (YYYY-MM-DD)").optional(),
|
|
45
|
+
line_items: zod.z.array(zod.z.object({
|
|
46
|
+
quantity: zod.z.number().describe("Quantity of the item, must be non-negative"),
|
|
47
|
+
unit_price: zod.z.number().describe("Unit price of the item in decimal, must be non-negative"),
|
|
48
|
+
description: zod.z.string().describe("Description of the line item")
|
|
49
|
+
})).describe("List of line items for the invoice").optional(),
|
|
50
|
+
customer_id: zod.z.string().describe("ID of an existing customer; mutually exclusive with `customer`").optional(),
|
|
51
|
+
invoice_date: zod.z.string().describe("Invoice date as expected by the API (YYYY-MM-DD)").optional(),
|
|
52
|
+
use_default_seller_info: zod.z.boolean().default(true).describe("If true, API will use default seller info instead of requiring seller object").optional()
|
|
53
|
+
});
|
|
54
|
+
const FinmeiCreateInvoice_BuyerResponseSchema = zod.z.object({
|
|
55
|
+
type: zod.z.string().describe("Buyer type (individual, company)").nullable().optional(),
|
|
56
|
+
email: zod.z.string().describe("Contact email").nullable().optional(),
|
|
57
|
+
phone: zod.z.string().describe("Contact phone").nullable().optional(),
|
|
58
|
+
address: zod.z.string().describe("Buyer address").nullable().optional(),
|
|
59
|
+
vat_code: zod.z.string().describe("VAT code").nullable().optional(),
|
|
60
|
+
last_name: zod.z.string().describe("Last name (for individuals)").nullable().optional(),
|
|
61
|
+
first_name: zod.z.string().describe("First name (for individuals)").nullable().optional(),
|
|
62
|
+
company_code: zod.z.string().describe("Company registration code").nullable().optional(),
|
|
63
|
+
company_name: zod.z.string().describe("Company name (for companies)").nullable().optional(),
|
|
64
|
+
individual_tax_id: zod.z.string().describe("Individual tax ID").nullable().optional()
|
|
65
|
+
});
|
|
66
|
+
const FinmeiCreateInvoice_InvoiceItemResponseSchema = zod.z.object({
|
|
67
|
+
id: zod.z.string().describe("Item unique identifier").nullable().optional(),
|
|
68
|
+
name: zod.z.string().describe("Product or service name").nullable().optional(),
|
|
69
|
+
price: zod.z.number().describe("Unit price").nullable().optional(),
|
|
70
|
+
units: zod.z.string().describe("Units (e.g., pcs, hours)").nullable().optional(),
|
|
71
|
+
quantity: zod.z.number().describe("Quantity").nullable().optional(),
|
|
72
|
+
vat_percentage: zod.z.number().describe("VAT percentage applied").nullable().optional()
|
|
73
|
+
});
|
|
74
|
+
const FinmeiCreateInvoice_SellerResponseSchema = zod.z.object({
|
|
75
|
+
email: zod.z.string().describe("Contact email").nullable().optional(),
|
|
76
|
+
phone: zod.z.string().describe("Contact phone").nullable().optional(),
|
|
77
|
+
address: zod.z.string().describe("Business address").nullable().optional(),
|
|
78
|
+
vat_code: zod.z.string().describe("VAT code").nullable().optional(),
|
|
79
|
+
last_name: zod.z.string().describe("Last name (for individuals)").nullable().optional(),
|
|
80
|
+
first_name: zod.z.string().describe("First name (for individuals)").nullable().optional(),
|
|
81
|
+
company_code: zod.z.string().describe("Company registration code").nullable().optional(),
|
|
82
|
+
company_name: zod.z.string().describe("Company name (for companies)").nullable().optional(),
|
|
83
|
+
business_type: zod.z.string().describe("Type of business (company, individual)").nullable().optional(),
|
|
84
|
+
custom_fields: zod.z.array(zod.z.record(zod.z.string(), zod.z.unknown())).describe("Custom fields").nullable().optional(),
|
|
85
|
+
individual_tax_id: zod.z.string().describe("Individual tax ID").nullable().optional()
|
|
86
|
+
});
|
|
87
|
+
const FinmeiCreateInvoice_CustomerResponseSchema = zod.z.object({
|
|
88
|
+
id: zod.z.string().describe("Unique identifier of the customer").nullable().optional(),
|
|
89
|
+
name: zod.z.string().describe("Full name of the customer").nullable().optional(),
|
|
90
|
+
email: zod.z.string().describe("Email address of the customer").nullable().optional(),
|
|
91
|
+
address: zod.z.string().describe("Postal address of the customer").nullable().optional()
|
|
92
|
+
});
|
|
93
|
+
const FinmeiCreateInvoice_LineItemResponseSchema = zod.z.object({
|
|
94
|
+
quantity: zod.z.number().describe("Quantity of the item").nullable().optional(),
|
|
95
|
+
unit_price: zod.z.number().describe("Unit price of the item").nullable().optional(),
|
|
96
|
+
description: zod.z.string().describe("Description of the line item").nullable().optional()
|
|
97
|
+
});
|
|
98
|
+
const FinmeiCreateInvoiceOutput = zod.z.object({
|
|
99
|
+
id: zod.z.string().describe("Unique identifier of the created invoice").nullable().optional(),
|
|
100
|
+
vat: zod.z.number().describe("Total VAT amount").nullable().optional(),
|
|
101
|
+
code: zod.z.string().describe("Invoice code or reference (legacy)").nullable().optional(),
|
|
102
|
+
buyer: FinmeiCreateInvoice_BuyerResponseSchema.nullable().optional(),
|
|
103
|
+
items: zod.z.array(FinmeiCreateInvoice_InvoiceItemResponseSchema).describe("Line items on the invoice").nullable().optional(),
|
|
104
|
+
notes: zod.z.string().describe("Notes included on the invoice").nullable().optional(),
|
|
105
|
+
seller: FinmeiCreateInvoice_SellerResponseSchema.nullable().optional(),
|
|
106
|
+
series: zod.z.string().describe("Invoice series/prefix").nullable().optional(),
|
|
107
|
+
status: zod.z.string().describe("Status of the invoice (legacy)").nullable().optional(),
|
|
108
|
+
currency: zod.z.string().describe("Currency code of the invoice").nullable().optional(),
|
|
109
|
+
customer: FinmeiCreateInvoice_CustomerResponseSchema.nullable().optional(),
|
|
110
|
+
due_date: zod.z.string().describe("Payment due date (legacy)").nullable().optional(),
|
|
111
|
+
language: zod.z.string().describe("Invoice language").nullable().optional(),
|
|
112
|
+
subtotal: zod.z.number().describe("Subtotal amount before VAT").nullable().optional(),
|
|
113
|
+
amount_due: zod.z.number().describe("Total amount due on the invoice (legacy)").nullable().optional(),
|
|
114
|
+
created_at: zod.z.union([zod.z.string(), zod.z.number().int()]).nullable().optional(),
|
|
115
|
+
issue_date: zod.z.string().describe("Date the invoice was issued (legacy)").nullable().optional(),
|
|
116
|
+
line_items: zod.z.array(FinmeiCreateInvoice_LineItemResponseSchema).describe("Line items (legacy)").nullable().optional(),
|
|
117
|
+
share_link: zod.z.string().describe("Public link to share the invoice").nullable().optional(),
|
|
118
|
+
updated_at: zod.z.union([zod.z.string(), zod.z.number().int()]).nullable().optional(),
|
|
119
|
+
amount_paid: zod.z.number().describe("Total amount paid on the invoice (legacy)").nullable().optional(),
|
|
120
|
+
business_id: zod.z.string().describe("Business identifier").nullable().optional(),
|
|
121
|
+
invoice_date: zod.z.string().describe("Date the invoice was issued").nullable().optional(),
|
|
122
|
+
invoice_type: zod.z.string().describe("Type of the invoice").nullable().optional(),
|
|
123
|
+
invoice_number: zod.z.string().describe("Invoice number").nullable().optional(),
|
|
124
|
+
pay_until_date: zod.z.string().describe("Payment due date").nullable().optional(),
|
|
125
|
+
payment_status: zod.z.string().describe("Payment status of the invoice").nullable().optional(),
|
|
126
|
+
total_incl_vat: zod.z.number().describe("Total amount including VAT").nullable().optional(),
|
|
127
|
+
payment_options: zod.z.array(zod.z.record(zod.z.string(), zod.z.unknown())).describe("Available payment options").nullable().optional()
|
|
128
|
+
});
|
|
129
|
+
const finmeiCreateInvoice = require_action.action("FINMEI_CREATE_INVOICE", {
|
|
130
|
+
slug: "finmei-create-invoice",
|
|
131
|
+
name: "Create Invoice",
|
|
132
|
+
description: "Creates a new invoice in Finmei with buyer information and line items. Use this when you need to generate an invoice for a customer. You can specify: - Buyer details (person or company) - Products/services with quantities and prices - Invoice type (regular, VAT, preliminary, credit) - Currency, dates, and custom notes Example: \"Create an invoice for Tech Solutions Inc with 3 months of support services at $99.99/month\"",
|
|
133
|
+
input: FinmeiCreateInvoiceInput,
|
|
134
|
+
output: FinmeiCreateInvoiceOutput
|
|
135
|
+
});
|
|
136
|
+
//#endregion
|
|
137
|
+
exports.finmeiCreateInvoice = finmeiCreateInvoice;
|
|
138
|
+
|
|
139
|
+
//# sourceMappingURL=create-invoice.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-invoice.cjs","names":["z","action"],"sources":["../../src/actions/create-invoice.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const FinmeiCreateInvoiceInput: z.ZodTypeAny = z.object({\n code: z.string().describe(\"Optional custom invoice code or reference\").optional(),\n type: z.enum([\"regular_invoice\", \"vat_invoice\", \"preliminary_invoice\", \"preliminary_vat_invoice\", \"credit_invoice\", \"credit_vat_invoice\"]).describe(\"Invoice type required by API. Valid values: 'regular_invoice', 'vat_invoice', 'preliminary_invoice', 'preliminary_vat_invoice', 'credit_invoice', 'credit_vat_invoice'\").optional(),\n buyer: z.object({\n name: z.string().describe(\"Generic name (legacy/compat)\").optional(),\n type: z.enum([\"person\", \"company\"]).describe(\"Buyer type as required by the API\"),\n email: z.string().describe(\"Buyer email\").optional(),\n address: z.string().describe(\"Buyer address\").optional(),\n last_name: z.string().describe(\"Buyer last name (person)\").optional(),\n first_name: z.string().describe(\"Buyer first name (person)\").optional(),\n company_name: z.string().describe(\"Company name (company)\").optional(),\n}).describe(\"Buyer object; required by API when not using customer_id\").optional(),\n notes: z.string().describe(\"Optional notes to appear on the invoice\").optional(),\n seller: z.object({\n email: z.string().describe(\"Seller email\").optional(),\n address: z.string().describe(\"Seller address\").optional(),\n company_name: z.string().describe(\"Seller company name\"),\n}).describe(\"Seller object if not using default\").optional(),\n series: z.string().describe(\"Series code/prefix for the invoice\").optional(),\n currency: z.string().describe(\"ISO 4217 three-letter currency code\").optional(),\n customer: z.object({\n name: z.string().describe(\"Full name of the customer\"),\n email: z.string().describe(\"Email address of the customer\"),\n address: z.string().describe(\"Postal address of the customer\").optional(),\n}).describe(\"Inline customer details; mutually exclusive with `customer_id`\").optional(),\n due_date: z.string().describe(\"Payment due date (YYYY-MM-DD)\").optional(),\n products: z.array(z.object({\n name: z.string().describe(\"Product or service name\"),\n price: z.number().describe(\"Unit price for this product\"),\n units: z.string().describe(\"Units for the product (e.g., pcs, hours)\").optional(),\n quantity: z.number().describe(\"Quantity for this product\"),\n vat_percentage: z.number().describe(\"VAT percentage to apply (0-100)\").optional(),\n})).describe(\"Products array as required by API\").optional(),\n issue_date: z.string().describe(\"Date the invoice was issued (YYYY-MM-DD)\").optional(),\n line_items: z.array(z.object({\n quantity: z.number().describe(\"Quantity of the item, must be non-negative\"),\n unit_price: z.number().describe(\"Unit price of the item in decimal, must be non-negative\"),\n description: z.string().describe(\"Description of the line item\"),\n})).describe(\"List of line items for the invoice\").optional(),\n customer_id: z.string().describe(\"ID of an existing customer; mutually exclusive with `customer`\").optional(),\n invoice_date: z.string().describe(\"Invoice date as expected by the API (YYYY-MM-DD)\").optional(),\n use_default_seller_info: z.boolean().default(true).describe(\"If true, API will use default seller info instead of requiring seller object\").optional(),\n});\nconst FinmeiCreateInvoice_BuyerResponseSchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Buyer type (individual, company)\").nullable().optional(),\n email: z.string().describe(\"Contact email\").nullable().optional(),\n phone: z.string().describe(\"Contact phone\").nullable().optional(),\n address: z.string().describe(\"Buyer address\").nullable().optional(),\n vat_code: z.string().describe(\"VAT code\").nullable().optional(),\n last_name: z.string().describe(\"Last name (for individuals)\").nullable().optional(),\n first_name: z.string().describe(\"First name (for individuals)\").nullable().optional(),\n company_code: z.string().describe(\"Company registration code\").nullable().optional(),\n company_name: z.string().describe(\"Company name (for companies)\").nullable().optional(),\n individual_tax_id: z.string().describe(\"Individual tax ID\").nullable().optional(),\n});\nconst FinmeiCreateInvoice_InvoiceItemResponseSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Item unique identifier\").nullable().optional(),\n name: z.string().describe(\"Product or service name\").nullable().optional(),\n price: z.number().describe(\"Unit price\").nullable().optional(),\n units: z.string().describe(\"Units (e.g., pcs, hours)\").nullable().optional(),\n quantity: z.number().describe(\"Quantity\").nullable().optional(),\n vat_percentage: z.number().describe(\"VAT percentage applied\").nullable().optional(),\n});\nconst FinmeiCreateInvoice_SellerResponseSchema: z.ZodTypeAny = z.object({\n email: z.string().describe(\"Contact email\").nullable().optional(),\n phone: z.string().describe(\"Contact phone\").nullable().optional(),\n address: z.string().describe(\"Business address\").nullable().optional(),\n vat_code: z.string().describe(\"VAT code\").nullable().optional(),\n last_name: z.string().describe(\"Last name (for individuals)\").nullable().optional(),\n first_name: z.string().describe(\"First name (for individuals)\").nullable().optional(),\n company_code: z.string().describe(\"Company registration code\").nullable().optional(),\n company_name: z.string().describe(\"Company name (for companies)\").nullable().optional(),\n business_type: z.string().describe(\"Type of business (company, individual)\").nullable().optional(),\n custom_fields: z.array(z.record(z.string(), z.unknown())).describe(\"Custom fields\").nullable().optional(),\n individual_tax_id: z.string().describe(\"Individual tax ID\").nullable().optional(),\n});\nconst FinmeiCreateInvoice_CustomerResponseSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the customer\").nullable().optional(),\n name: z.string().describe(\"Full name of the customer\").nullable().optional(),\n email: z.string().describe(\"Email address of the customer\").nullable().optional(),\n address: z.string().describe(\"Postal address of the customer\").nullable().optional(),\n});\nconst FinmeiCreateInvoice_LineItemResponseSchema: z.ZodTypeAny = z.object({\n quantity: z.number().describe(\"Quantity of the item\").nullable().optional(),\n unit_price: z.number().describe(\"Unit price of the item\").nullable().optional(),\n description: z.string().describe(\"Description of the line item\").nullable().optional(),\n});\nexport const FinmeiCreateInvoiceOutput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the created invoice\").nullable().optional(),\n vat: z.number().describe(\"Total VAT amount\").nullable().optional(),\n code: z.string().describe(\"Invoice code or reference (legacy)\").nullable().optional(),\n buyer: FinmeiCreateInvoice_BuyerResponseSchema.nullable().optional(),\n items: z.array(FinmeiCreateInvoice_InvoiceItemResponseSchema).describe(\"Line items on the invoice\").nullable().optional(),\n notes: z.string().describe(\"Notes included on the invoice\").nullable().optional(),\n seller: FinmeiCreateInvoice_SellerResponseSchema.nullable().optional(),\n series: z.string().describe(\"Invoice series/prefix\").nullable().optional(),\n status: z.string().describe(\"Status of the invoice (legacy)\").nullable().optional(),\n currency: z.string().describe(\"Currency code of the invoice\").nullable().optional(),\n customer: FinmeiCreateInvoice_CustomerResponseSchema.nullable().optional(),\n due_date: z.string().describe(\"Payment due date (legacy)\").nullable().optional(),\n language: z.string().describe(\"Invoice language\").nullable().optional(),\n subtotal: z.number().describe(\"Subtotal amount before VAT\").nullable().optional(),\n amount_due: z.number().describe(\"Total amount due on the invoice (legacy)\").nullable().optional(),\n created_at: z.union([z.string(), z.number().int()]).nullable().optional(),\n issue_date: z.string().describe(\"Date the invoice was issued (legacy)\").nullable().optional(),\n line_items: z.array(FinmeiCreateInvoice_LineItemResponseSchema).describe(\"Line items (legacy)\").nullable().optional(),\n share_link: z.string().describe(\"Public link to share the invoice\").nullable().optional(),\n updated_at: z.union([z.string(), z.number().int()]).nullable().optional(),\n amount_paid: z.number().describe(\"Total amount paid on the invoice (legacy)\").nullable().optional(),\n business_id: z.string().describe(\"Business identifier\").nullable().optional(),\n invoice_date: z.string().describe(\"Date the invoice was issued\").nullable().optional(),\n invoice_type: z.string().describe(\"Type of the invoice\").nullable().optional(),\n invoice_number: z.string().describe(\"Invoice number\").nullable().optional(),\n pay_until_date: z.string().describe(\"Payment due date\").nullable().optional(),\n payment_status: z.string().describe(\"Payment status of the invoice\").nullable().optional(),\n total_incl_vat: z.number().describe(\"Total amount including VAT\").nullable().optional(),\n payment_options: z.array(z.record(z.string(), z.unknown())).describe(\"Available payment options\").nullable().optional(),\n});\n\nexport const finmeiCreateInvoice = action(\"FINMEI_CREATE_INVOICE\", {\n slug: \"finmei-create-invoice\",\n name: \"Create Invoice\",\n description: \"Creates a new invoice in Finmei with buyer information and line items. Use this when you need to generate an invoice for a customer. You can specify: - Buyer details (person or company) - Products/services with quantities and prices - Invoice type (regular, VAT, preliminary, credit) - Currency, dates, and custom notes Example: \\\"Create an invoice for Tech Solutions Inc with 3 months of support services at $99.99/month\\\"\",\n input: FinmeiCreateInvoiceInput,\n output: FinmeiCreateInvoiceOutput,\n});\n"],"mappings":";;;AAIA,MAAa,2BAAyCA,IAAAA,EAAE,OAAO;CAC7D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;CAChF,MAAMA,IAAAA,EAAE,KAAK;EAAC;EAAmB;EAAe;EAAuB;EAA2B;EAAkB;CAAoB,CAAC,CAAC,CAAC,SAAS,wKAAwK,CAAC,CAAC,SAAS;CACvU,OAAOA,IAAAA,EAAE,OAAO;EAChB,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS;EACnE,MAAMA,IAAAA,EAAE,KAAK,CAAC,UAAU,SAAS,CAAC,CAAC,CAAC,SAAS,mCAAmC;EAChF,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,aAAa,CAAC,CAAC,SAAS;EACnD,SAASA,I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AAE,MAAMA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACxH,CAAC;AAED,MAAa,sBAAsBC,eAAAA,OAAO,yBAAyB;CACjE,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-invoice.d.ts
|
|
4
|
+
declare const FinmeiCreateInvoiceInput: z.ZodTypeAny;
|
|
5
|
+
declare const FinmeiCreateInvoiceOutput: z.ZodTypeAny;
|
|
6
|
+
declare const finmeiCreateInvoice: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { finmeiCreateInvoice };
|
|
9
|
+
//# sourceMappingURL=create-invoice.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-invoice.d.cts","names":[],"sources":["../../src/actions/create-invoice.ts"],"mappings":";;;cAIa,wBAAA,EAA0B,CAAA,CAAE,UA0CvC;AAAA,cA6CW,yBAAA,EAA2B,CAAA,CAAE,UA8BxC;AAAA,cAEW,mBAAA,gCAAmB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-invoice.d.ts
|
|
4
|
+
declare const FinmeiCreateInvoiceInput: z.ZodTypeAny;
|
|
5
|
+
declare const FinmeiCreateInvoiceOutput: z.ZodTypeAny;
|
|
6
|
+
declare const finmeiCreateInvoice: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { finmeiCreateInvoice };
|
|
9
|
+
//# sourceMappingURL=create-invoice.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-invoice.d.mts","names":[],"sources":["../../src/actions/create-invoice.ts"],"mappings":";;;cAIa,wBAAA,EAA0B,CAAA,CAAE,UA0CvC;AAAA,cA6CW,yBAAA,EAA2B,CAAA,CAAE,UA8BxC;AAAA,cAEW,mBAAA,gCAAmB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/actions/create-invoice.ts
|
|
4
|
+
const FinmeiCreateInvoiceInput = z.object({
|
|
5
|
+
code: z.string().describe("Optional custom invoice code or reference").optional(),
|
|
6
|
+
type: z.enum([
|
|
7
|
+
"regular_invoice",
|
|
8
|
+
"vat_invoice",
|
|
9
|
+
"preliminary_invoice",
|
|
10
|
+
"preliminary_vat_invoice",
|
|
11
|
+
"credit_invoice",
|
|
12
|
+
"credit_vat_invoice"
|
|
13
|
+
]).describe("Invoice type required by API. Valid values: 'regular_invoice', 'vat_invoice', 'preliminary_invoice', 'preliminary_vat_invoice', 'credit_invoice', 'credit_vat_invoice'").optional(),
|
|
14
|
+
buyer: z.object({
|
|
15
|
+
name: z.string().describe("Generic name (legacy/compat)").optional(),
|
|
16
|
+
type: z.enum(["person", "company"]).describe("Buyer type as required by the API"),
|
|
17
|
+
email: z.string().describe("Buyer email").optional(),
|
|
18
|
+
address: z.string().describe("Buyer address").optional(),
|
|
19
|
+
last_name: z.string().describe("Buyer last name (person)").optional(),
|
|
20
|
+
first_name: z.string().describe("Buyer first name (person)").optional(),
|
|
21
|
+
company_name: z.string().describe("Company name (company)").optional()
|
|
22
|
+
}).describe("Buyer object; required by API when not using customer_id").optional(),
|
|
23
|
+
notes: z.string().describe("Optional notes to appear on the invoice").optional(),
|
|
24
|
+
seller: z.object({
|
|
25
|
+
email: z.string().describe("Seller email").optional(),
|
|
26
|
+
address: z.string().describe("Seller address").optional(),
|
|
27
|
+
company_name: z.string().describe("Seller company name")
|
|
28
|
+
}).describe("Seller object if not using default").optional(),
|
|
29
|
+
series: z.string().describe("Series code/prefix for the invoice").optional(),
|
|
30
|
+
currency: z.string().describe("ISO 4217 three-letter currency code").optional(),
|
|
31
|
+
customer: z.object({
|
|
32
|
+
name: z.string().describe("Full name of the customer"),
|
|
33
|
+
email: z.string().describe("Email address of the customer"),
|
|
34
|
+
address: z.string().describe("Postal address of the customer").optional()
|
|
35
|
+
}).describe("Inline customer details; mutually exclusive with `customer_id`").optional(),
|
|
36
|
+
due_date: z.string().describe("Payment due date (YYYY-MM-DD)").optional(),
|
|
37
|
+
products: z.array(z.object({
|
|
38
|
+
name: z.string().describe("Product or service name"),
|
|
39
|
+
price: z.number().describe("Unit price for this product"),
|
|
40
|
+
units: z.string().describe("Units for the product (e.g., pcs, hours)").optional(),
|
|
41
|
+
quantity: z.number().describe("Quantity for this product"),
|
|
42
|
+
vat_percentage: z.number().describe("VAT percentage to apply (0-100)").optional()
|
|
43
|
+
})).describe("Products array as required by API").optional(),
|
|
44
|
+
issue_date: z.string().describe("Date the invoice was issued (YYYY-MM-DD)").optional(),
|
|
45
|
+
line_items: z.array(z.object({
|
|
46
|
+
quantity: z.number().describe("Quantity of the item, must be non-negative"),
|
|
47
|
+
unit_price: z.number().describe("Unit price of the item in decimal, must be non-negative"),
|
|
48
|
+
description: z.string().describe("Description of the line item")
|
|
49
|
+
})).describe("List of line items for the invoice").optional(),
|
|
50
|
+
customer_id: z.string().describe("ID of an existing customer; mutually exclusive with `customer`").optional(),
|
|
51
|
+
invoice_date: z.string().describe("Invoice date as expected by the API (YYYY-MM-DD)").optional(),
|
|
52
|
+
use_default_seller_info: z.boolean().default(true).describe("If true, API will use default seller info instead of requiring seller object").optional()
|
|
53
|
+
});
|
|
54
|
+
const FinmeiCreateInvoice_BuyerResponseSchema = z.object({
|
|
55
|
+
type: z.string().describe("Buyer type (individual, company)").nullable().optional(),
|
|
56
|
+
email: z.string().describe("Contact email").nullable().optional(),
|
|
57
|
+
phone: z.string().describe("Contact phone").nullable().optional(),
|
|
58
|
+
address: z.string().describe("Buyer address").nullable().optional(),
|
|
59
|
+
vat_code: z.string().describe("VAT code").nullable().optional(),
|
|
60
|
+
last_name: z.string().describe("Last name (for individuals)").nullable().optional(),
|
|
61
|
+
first_name: z.string().describe("First name (for individuals)").nullable().optional(),
|
|
62
|
+
company_code: z.string().describe("Company registration code").nullable().optional(),
|
|
63
|
+
company_name: z.string().describe("Company name (for companies)").nullable().optional(),
|
|
64
|
+
individual_tax_id: z.string().describe("Individual tax ID").nullable().optional()
|
|
65
|
+
});
|
|
66
|
+
const FinmeiCreateInvoice_InvoiceItemResponseSchema = z.object({
|
|
67
|
+
id: z.string().describe("Item unique identifier").nullable().optional(),
|
|
68
|
+
name: z.string().describe("Product or service name").nullable().optional(),
|
|
69
|
+
price: z.number().describe("Unit price").nullable().optional(),
|
|
70
|
+
units: z.string().describe("Units (e.g., pcs, hours)").nullable().optional(),
|
|
71
|
+
quantity: z.number().describe("Quantity").nullable().optional(),
|
|
72
|
+
vat_percentage: z.number().describe("VAT percentage applied").nullable().optional()
|
|
73
|
+
});
|
|
74
|
+
const FinmeiCreateInvoice_SellerResponseSchema = z.object({
|
|
75
|
+
email: z.string().describe("Contact email").nullable().optional(),
|
|
76
|
+
phone: z.string().describe("Contact phone").nullable().optional(),
|
|
77
|
+
address: z.string().describe("Business address").nullable().optional(),
|
|
78
|
+
vat_code: z.string().describe("VAT code").nullable().optional(),
|
|
79
|
+
last_name: z.string().describe("Last name (for individuals)").nullable().optional(),
|
|
80
|
+
first_name: z.string().describe("First name (for individuals)").nullable().optional(),
|
|
81
|
+
company_code: z.string().describe("Company registration code").nullable().optional(),
|
|
82
|
+
company_name: z.string().describe("Company name (for companies)").nullable().optional(),
|
|
83
|
+
business_type: z.string().describe("Type of business (company, individual)").nullable().optional(),
|
|
84
|
+
custom_fields: z.array(z.record(z.string(), z.unknown())).describe("Custom fields").nullable().optional(),
|
|
85
|
+
individual_tax_id: z.string().describe("Individual tax ID").nullable().optional()
|
|
86
|
+
});
|
|
87
|
+
const FinmeiCreateInvoice_CustomerResponseSchema = z.object({
|
|
88
|
+
id: z.string().describe("Unique identifier of the customer").nullable().optional(),
|
|
89
|
+
name: z.string().describe("Full name of the customer").nullable().optional(),
|
|
90
|
+
email: z.string().describe("Email address of the customer").nullable().optional(),
|
|
91
|
+
address: z.string().describe("Postal address of the customer").nullable().optional()
|
|
92
|
+
});
|
|
93
|
+
const FinmeiCreateInvoice_LineItemResponseSchema = z.object({
|
|
94
|
+
quantity: z.number().describe("Quantity of the item").nullable().optional(),
|
|
95
|
+
unit_price: z.number().describe("Unit price of the item").nullable().optional(),
|
|
96
|
+
description: z.string().describe("Description of the line item").nullable().optional()
|
|
97
|
+
});
|
|
98
|
+
const finmeiCreateInvoice = action("FINMEI_CREATE_INVOICE", {
|
|
99
|
+
slug: "finmei-create-invoice",
|
|
100
|
+
name: "Create Invoice",
|
|
101
|
+
description: "Creates a new invoice in Finmei with buyer information and line items. Use this when you need to generate an invoice for a customer. You can specify: - Buyer details (person or company) - Products/services with quantities and prices - Invoice type (regular, VAT, preliminary, credit) - Currency, dates, and custom notes Example: \"Create an invoice for Tech Solutions Inc with 3 months of support services at $99.99/month\"",
|
|
102
|
+
input: FinmeiCreateInvoiceInput,
|
|
103
|
+
output: z.object({
|
|
104
|
+
id: z.string().describe("Unique identifier of the created invoice").nullable().optional(),
|
|
105
|
+
vat: z.number().describe("Total VAT amount").nullable().optional(),
|
|
106
|
+
code: z.string().describe("Invoice code or reference (legacy)").nullable().optional(),
|
|
107
|
+
buyer: FinmeiCreateInvoice_BuyerResponseSchema.nullable().optional(),
|
|
108
|
+
items: z.array(FinmeiCreateInvoice_InvoiceItemResponseSchema).describe("Line items on the invoice").nullable().optional(),
|
|
109
|
+
notes: z.string().describe("Notes included on the invoice").nullable().optional(),
|
|
110
|
+
seller: FinmeiCreateInvoice_SellerResponseSchema.nullable().optional(),
|
|
111
|
+
series: z.string().describe("Invoice series/prefix").nullable().optional(),
|
|
112
|
+
status: z.string().describe("Status of the invoice (legacy)").nullable().optional(),
|
|
113
|
+
currency: z.string().describe("Currency code of the invoice").nullable().optional(),
|
|
114
|
+
customer: FinmeiCreateInvoice_CustomerResponseSchema.nullable().optional(),
|
|
115
|
+
due_date: z.string().describe("Payment due date (legacy)").nullable().optional(),
|
|
116
|
+
language: z.string().describe("Invoice language").nullable().optional(),
|
|
117
|
+
subtotal: z.number().describe("Subtotal amount before VAT").nullable().optional(),
|
|
118
|
+
amount_due: z.number().describe("Total amount due on the invoice (legacy)").nullable().optional(),
|
|
119
|
+
created_at: z.union([z.string(), z.number().int()]).nullable().optional(),
|
|
120
|
+
issue_date: z.string().describe("Date the invoice was issued (legacy)").nullable().optional(),
|
|
121
|
+
line_items: z.array(FinmeiCreateInvoice_LineItemResponseSchema).describe("Line items (legacy)").nullable().optional(),
|
|
122
|
+
share_link: z.string().describe("Public link to share the invoice").nullable().optional(),
|
|
123
|
+
updated_at: z.union([z.string(), z.number().int()]).nullable().optional(),
|
|
124
|
+
amount_paid: z.number().describe("Total amount paid on the invoice (legacy)").nullable().optional(),
|
|
125
|
+
business_id: z.string().describe("Business identifier").nullable().optional(),
|
|
126
|
+
invoice_date: z.string().describe("Date the invoice was issued").nullable().optional(),
|
|
127
|
+
invoice_type: z.string().describe("Type of the invoice").nullable().optional(),
|
|
128
|
+
invoice_number: z.string().describe("Invoice number").nullable().optional(),
|
|
129
|
+
pay_until_date: z.string().describe("Payment due date").nullable().optional(),
|
|
130
|
+
payment_status: z.string().describe("Payment status of the invoice").nullable().optional(),
|
|
131
|
+
total_incl_vat: z.number().describe("Total amount including VAT").nullable().optional(),
|
|
132
|
+
payment_options: z.array(z.record(z.string(), z.unknown())).describe("Available payment options").nullable().optional()
|
|
133
|
+
})
|
|
134
|
+
});
|
|
135
|
+
//#endregion
|
|
136
|
+
export { finmeiCreateInvoice };
|
|
137
|
+
|
|
138
|
+
//# sourceMappingURL=create-invoice.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-invoice.mjs","names":[],"sources":["../../src/actions/create-invoice.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const FinmeiCreateInvoiceInput: z.ZodTypeAny = z.object({\n code: z.string().describe(\"Optional custom invoice code or reference\").optional(),\n type: z.enum([\"regular_invoice\", \"vat_invoice\", \"preliminary_invoice\", \"preliminary_vat_invoice\", \"credit_invoice\", \"credit_vat_invoice\"]).describe(\"Invoice type required by API. Valid values: 'regular_invoice', 'vat_invoice', 'preliminary_invoice', 'preliminary_vat_invoice', 'credit_invoice', 'credit_vat_invoice'\").optional(),\n buyer: z.object({\n name: z.string().describe(\"Generic name (legacy/compat)\").optional(),\n type: z.enum([\"person\", \"company\"]).describe(\"Buyer type as required by the API\"),\n email: z.string().describe(\"Buyer email\").optional(),\n address: z.string().describe(\"Buyer address\").optional(),\n last_name: z.string().describe(\"Buyer last name (person)\").optional(),\n first_name: z.string().describe(\"Buyer first name (person)\").optional(),\n company_name: z.string().describe(\"Company name (company)\").optional(),\n}).describe(\"Buyer object; required by API when not using customer_id\").optional(),\n notes: z.string().describe(\"Optional notes to appear on the invoice\").optional(),\n seller: z.object({\n email: z.string().describe(\"Seller email\").optional(),\n address: z.string().describe(\"Seller address\").optional(),\n company_name: z.string().describe(\"Seller company name\"),\n}).describe(\"Seller object if not using default\").optional(),\n series: z.string().describe(\"Series code/prefix for the invoice\").optional(),\n currency: z.string().describe(\"ISO 4217 three-letter currency code\").optional(),\n customer: z.object({\n name: z.string().describe(\"Full name of the customer\"),\n email: z.string().describe(\"Email address of the customer\"),\n address: z.string().describe(\"Postal address of the customer\").optional(),\n}).describe(\"Inline customer details; mutually exclusive with `customer_id`\").optional(),\n due_date: z.string().describe(\"Payment due date (YYYY-MM-DD)\").optional(),\n products: z.array(z.object({\n name: z.string().describe(\"Product or service name\"),\n price: z.number().describe(\"Unit price for this product\"),\n units: z.string().describe(\"Units for the product (e.g., pcs, hours)\").optional(),\n quantity: z.number().describe(\"Quantity for this product\"),\n vat_percentage: z.number().describe(\"VAT percentage to apply (0-100)\").optional(),\n})).describe(\"Products array as required by API\").optional(),\n issue_date: z.string().describe(\"Date the invoice was issued (YYYY-MM-DD)\").optional(),\n line_items: z.array(z.object({\n quantity: z.number().describe(\"Quantity of the item, must be non-negative\"),\n unit_price: z.number().describe(\"Unit price of the item in decimal, must be non-negative\"),\n description: z.string().describe(\"Description of the line item\"),\n})).describe(\"List of line items for the invoice\").optional(),\n customer_id: z.string().describe(\"ID of an existing customer; mutually exclusive with `customer`\").optional(),\n invoice_date: z.string().describe(\"Invoice date as expected by the API (YYYY-MM-DD)\").optional(),\n use_default_seller_info: z.boolean().default(true).describe(\"If true, API will use default seller info instead of requiring seller object\").optional(),\n});\nconst FinmeiCreateInvoice_BuyerResponseSchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Buyer type (individual, company)\").nullable().optional(),\n email: z.string().describe(\"Contact email\").nullable().optional(),\n phone: z.string().describe(\"Contact phone\").nullable().optional(),\n address: z.string().describe(\"Buyer address\").nullable().optional(),\n vat_code: z.string().describe(\"VAT code\").nullable().optional(),\n last_name: z.string().describe(\"Last name (for individuals)\").nullable().optional(),\n first_name: z.string().describe(\"First name (for individuals)\").nullable().optional(),\n company_code: z.string().describe(\"Company registration code\").nullable().optional(),\n company_name: z.string().describe(\"Company name (for companies)\").nullable().optional(),\n individual_tax_id: z.string().describe(\"Individual tax ID\").nullable().optional(),\n});\nconst FinmeiCreateInvoice_InvoiceItemResponseSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Item unique identifier\").nullable().optional(),\n name: z.string().describe(\"Product or service name\").nullable().optional(),\n price: z.number().describe(\"Unit price\").nullable().optional(),\n units: z.string().describe(\"Units (e.g., pcs, hours)\").nullable().optional(),\n quantity: z.number().describe(\"Quantity\").nullable().optional(),\n vat_percentage: z.number().describe(\"VAT percentage applied\").nullable().optional(),\n});\nconst FinmeiCreateInvoice_SellerResponseSchema: z.ZodTypeAny = z.object({\n email: z.string().describe(\"Contact email\").nullable().optional(),\n phone: z.string().describe(\"Contact phone\").nullable().optional(),\n address: z.string().describe(\"Business address\").nullable().optional(),\n vat_code: z.string().describe(\"VAT code\").nullable().optional(),\n last_name: z.string().describe(\"Last name (for individuals)\").nullable().optional(),\n first_name: z.string().describe(\"First name (for individuals)\").nullable().optional(),\n company_code: z.string().describe(\"Company registration code\").nullable().optional(),\n company_name: z.string().describe(\"Company name (for companies)\").nullable().optional(),\n business_type: z.string().describe(\"Type of business (company, individual)\").nullable().optional(),\n custom_fields: z.array(z.record(z.string(), z.unknown())).describe(\"Custom fields\").nullable().optional(),\n individual_tax_id: z.string().describe(\"Individual tax ID\").nullable().optional(),\n});\nconst FinmeiCreateInvoice_CustomerResponseSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the customer\").nullable().optional(),\n name: z.string().describe(\"Full name of the customer\").nullable().optional(),\n email: z.string().describe(\"Email address of the customer\").nullable().optional(),\n address: z.string().describe(\"Postal address of the customer\").nullable().optional(),\n});\nconst FinmeiCreateInvoice_LineItemResponseSchema: z.ZodTypeAny = z.object({\n quantity: z.number().describe(\"Quantity of the item\").nullable().optional(),\n unit_price: z.number().describe(\"Unit price of the item\").nullable().optional(),\n description: z.string().describe(\"Description of the line item\").nullable().optional(),\n});\nexport const FinmeiCreateInvoiceOutput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the created invoice\").nullable().optional(),\n vat: z.number().describe(\"Total VAT amount\").nullable().optional(),\n code: z.string().describe(\"Invoice code or reference (legacy)\").nullable().optional(),\n buyer: FinmeiCreateInvoice_BuyerResponseSchema.nullable().optional(),\n items: z.array(FinmeiCreateInvoice_InvoiceItemResponseSchema).describe(\"Line items on the invoice\").nullable().optional(),\n notes: z.string().describe(\"Notes included on the invoice\").nullable().optional(),\n seller: FinmeiCreateInvoice_SellerResponseSchema.nullable().optional(),\n series: z.string().describe(\"Invoice series/prefix\").nullable().optional(),\n status: z.string().describe(\"Status of the invoice (legacy)\").nullable().optional(),\n currency: z.string().describe(\"Currency code of the invoice\").nullable().optional(),\n customer: FinmeiCreateInvoice_CustomerResponseSchema.nullable().optional(),\n due_date: z.string().describe(\"Payment due date (legacy)\").nullable().optional(),\n language: z.string().describe(\"Invoice language\").nullable().optional(),\n subtotal: z.number().describe(\"Subtotal amount before VAT\").nullable().optional(),\n amount_due: z.number().describe(\"Total amount due on the invoice (legacy)\").nullable().optional(),\n created_at: z.union([z.string(), z.number().int()]).nullable().optional(),\n issue_date: z.string().describe(\"Date the invoice was issued (legacy)\").nullable().optional(),\n line_items: z.array(FinmeiCreateInvoice_LineItemResponseSchema).describe(\"Line items (legacy)\").nullable().optional(),\n share_link: z.string().describe(\"Public link to share the invoice\").nullable().optional(),\n updated_at: z.union([z.string(), z.number().int()]).nullable().optional(),\n amount_paid: z.number().describe(\"Total amount paid on the invoice (legacy)\").nullable().optional(),\n business_id: z.string().describe(\"Business identifier\").nullable().optional(),\n invoice_date: z.string().describe(\"Date the invoice was issued\").nullable().optional(),\n invoice_type: z.string().describe(\"Type of the invoice\").nullable().optional(),\n invoice_number: z.string().describe(\"Invoice number\").nullable().optional(),\n pay_until_date: z.string().describe(\"Payment due date\").nullable().optional(),\n payment_status: z.string().describe(\"Payment status of the invoice\").nullable().optional(),\n total_incl_vat: z.number().describe(\"Total amount including VAT\").nullable().optional(),\n payment_options: z.array(z.record(z.string(), z.unknown())).describe(\"Available payment options\").nullable().optional(),\n});\n\nexport const finmeiCreateInvoice = action(\"FINMEI_CREATE_INVOICE\", {\n slug: \"finmei-create-invoice\",\n name: \"Create Invoice\",\n description: \"Creates a new invoice in Finmei with buyer information and line items. Use this when you need to generate an invoice for a customer. You can specify: - Buyer details (person or company) - Products/services with quantities and prices - Invoice type (regular, VAT, preliminary, credit) - Currency, dates, and custom notes Example: \\\"Create an invoice for Tech Solutions Inc with 3 months of support services at $99.99/month\\\"\",\n input: FinmeiCreateInvoiceInput,\n output: FinmeiCreateInvoiceOutput,\n});\n"],"mappings":";;;AAIA,MAAa,2BAAyC,EAAE,OAAO;CAC7D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;CAChF,MAAM,EAAE,KAAK;EAAC;EAAmB;EAAe;EAAuB;EAA2B;EAAkB;CAAoB,CAAC,CAAC,CAAC,SAAS,wKAAwK,CAAC,CAAC,SAAS;CACvU,OAAO,EAAE,OAAO;EAChB,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS;EACnE,MAAM,EAAE,KAAK,CAAC,UAAU,SAAS,CAAC,CAAC,CAAC,SAAS,mCAAmC;EAChF,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,aAAa,CAAC,CAAC,SAAS;EACnD,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,eAAe,CAAC,CAAC,SAAS;EACvD,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS;EACpE,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS;EACtE,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS;CACvE,CAAC,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,SAAS;CAC/E,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;CAC/E,QAAQ,EAAE,OAAO;EACjB,OAAO,EAAE,OAAO,CAAC,CAAC,SAA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,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxH,CAOU;AACV,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/delete-customer.ts
|
|
4
|
+
const FinmeiDeleteCustomerInput = zod.z.object({ customer_id: zod.z.string().describe("Unique identifier of the customer to delete") }).describe("Request schema for deleting a customer.");
|
|
5
|
+
const FinmeiDeleteCustomerOutput = zod.z.object({}).describe("Response schema for deleting a customer. Empty if successful.");
|
|
6
|
+
const finmeiDeleteCustomer = require_action.action("FINMEI_DELETE_CUSTOMER", {
|
|
7
|
+
slug: "finmei-delete-customer",
|
|
8
|
+
name: "Delete Customer",
|
|
9
|
+
description: "Tool to delete a specific customer by their ID. Use after confirming the correct customer_id to remove the record.",
|
|
10
|
+
input: FinmeiDeleteCustomerInput,
|
|
11
|
+
output: FinmeiDeleteCustomerOutput
|
|
12
|
+
});
|
|
13
|
+
//#endregion
|
|
14
|
+
exports.finmeiDeleteCustomer = finmeiDeleteCustomer;
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=delete-customer.cjs.map
|