@pulses/quickbooks-mcp 1.0.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/dist/client.d.ts +33 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +327 -0
- package/dist/client.js.map +1 -0
- package/dist/constants.d.ts +12 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +12 -0
- package/dist/constants.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +436 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/accounts.d.ts +140 -0
- package/dist/tools/accounts.d.ts.map +1 -0
- package/dist/tools/accounts.js +115 -0
- package/dist/tools/accounts.js.map +1 -0
- package/dist/tools/bills.d.ts +386 -0
- package/dist/tools/bills.d.ts.map +1 -0
- package/dist/tools/bills.js +180 -0
- package/dist/tools/bills.js.map +1 -0
- package/dist/tools/company.d.ts +20 -0
- package/dist/tools/company.d.ts.map +1 -0
- package/dist/tools/company.js +37 -0
- package/dist/tools/company.js.map +1 -0
- package/dist/tools/customers.d.ts +218 -0
- package/dist/tools/customers.d.ts.map +1 -0
- package/dist/tools/customers.js +154 -0
- package/dist/tools/customers.js.map +1 -0
- package/dist/tools/employees.d.ts +182 -0
- package/dist/tools/employees.d.ts.map +1 -0
- package/dist/tools/employees.js +138 -0
- package/dist/tools/employees.js.map +1 -0
- package/dist/tools/estimates.d.ts +200 -0
- package/dist/tools/estimates.d.ts.map +1 -0
- package/dist/tools/estimates.js +131 -0
- package/dist/tools/estimates.js.map +1 -0
- package/dist/tools/invoices.d.ts +402 -0
- package/dist/tools/invoices.d.ts.map +1 -0
- package/dist/tools/invoices.js +203 -0
- package/dist/tools/invoices.js.map +1 -0
- package/dist/tools/items.d.ts +212 -0
- package/dist/tools/items.d.ts.map +1 -0
- package/dist/tools/items.js +153 -0
- package/dist/tools/items.js.map +1 -0
- package/dist/tools/journal-entries.d.ts +198 -0
- package/dist/tools/journal-entries.d.ts.map +1 -0
- package/dist/tools/journal-entries.js +135 -0
- package/dist/tools/journal-entries.js.map +1 -0
- package/dist/tools/payments.d.ts +174 -0
- package/dist/tools/payments.d.ts.map +1 -0
- package/dist/tools/payments.js +120 -0
- package/dist/tools/payments.js.map +1 -0
- package/dist/tools/purchases.d.ts +240 -0
- package/dist/tools/purchases.d.ts.map +1 -0
- package/dist/tools/purchases.js +149 -0
- package/dist/tools/purchases.js.map +1 -0
- package/dist/tools/query.d.ts +26 -0
- package/dist/tools/query.d.ts.map +1 -0
- package/dist/tools/query.js +27 -0
- package/dist/tools/query.js.map +1 -0
- package/dist/tools/reports.d.ts +178 -0
- package/dist/tools/reports.d.ts.map +1 -0
- package/dist/tools/reports.js +117 -0
- package/dist/tools/reports.js.map +1 -0
- package/dist/tools/tax.d.ts +116 -0
- package/dist/tools/tax.d.ts.map +1 -0
- package/dist/tools/tax.js +112 -0
- package/dist/tools/tax.js.map +1 -0
- package/dist/tools/time-activities.d.ts +228 -0
- package/dist/tools/time-activities.d.ts.map +1 -0
- package/dist/tools/time-activities.js +164 -0
- package/dist/tools/time-activities.js.map +1 -0
- package/dist/tools/vendors.d.ts +212 -0
- package/dist/tools/vendors.d.ts.map +1 -0
- package/dist/tools/vendors.js +152 -0
- package/dist/tools/vendors.js.map +1 -0
- package/dist/types.d.ts +295 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +11 -0
- package/dist/types.js.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const JournalLineSchema = z.object({
|
|
3
|
+
posting_type: z.enum(["Debit", "Credit"]).describe("Debit or Credit"),
|
|
4
|
+
account_id: z.string().describe("Account ref ID"),
|
|
5
|
+
amount: z.number().describe("Line amount"),
|
|
6
|
+
description: z.string().optional(),
|
|
7
|
+
entity_id: z.string().optional().describe("Optional entity (customer/vendor) ref ID"),
|
|
8
|
+
entity_type: z.enum(["Customer", "Vendor", "Employee"]).optional(),
|
|
9
|
+
});
|
|
10
|
+
const ListJournalEntriesInputSchema = z.object({
|
|
11
|
+
where: z.string().optional(),
|
|
12
|
+
order_by: z.string().optional(),
|
|
13
|
+
start_position: z.number().optional(),
|
|
14
|
+
max_results: z.number().optional(),
|
|
15
|
+
response_format: z.enum(["json", "markdown"]).default("markdown"),
|
|
16
|
+
}).strict();
|
|
17
|
+
const GetJournalEntryInputSchema = z.object({
|
|
18
|
+
journal_entry_id: z.string().describe("The journal entry ID"),
|
|
19
|
+
response_format: z.enum(["json", "markdown"]).default("markdown"),
|
|
20
|
+
}).strict();
|
|
21
|
+
const CreateJournalEntryInputSchema = z.object({
|
|
22
|
+
lines: z.array(JournalLineSchema).min(2).describe("At minimum one debit and one credit line"),
|
|
23
|
+
txn_date: z.string().optional().describe("Transaction date (YYYY-MM-DD)"),
|
|
24
|
+
doc_number: z.string().optional(),
|
|
25
|
+
adjustment: z.boolean().optional().describe("Whether this is an adjustment entry"),
|
|
26
|
+
response_format: z.enum(["json", "markdown"]).default("markdown"),
|
|
27
|
+
}).strict();
|
|
28
|
+
const DeleteJournalEntryInputSchema = z.object({
|
|
29
|
+
journal_entry_id: z.string(),
|
|
30
|
+
sync_token: z.string(),
|
|
31
|
+
}).strict();
|
|
32
|
+
function formatJournalEntry(je) {
|
|
33
|
+
let result = `## Journal Entry ${je.DocNumber || je.Id || ""}\n`;
|
|
34
|
+
if (je.Id)
|
|
35
|
+
result += `- **ID:** ${je.Id}\n`;
|
|
36
|
+
if (je.SyncToken)
|
|
37
|
+
result += `- **SyncToken:** ${je.SyncToken}\n`;
|
|
38
|
+
if (je.TxnDate)
|
|
39
|
+
result += `- **Date:** ${je.TxnDate}\n`;
|
|
40
|
+
if (je.TotalAmt !== undefined)
|
|
41
|
+
result += `- **Total:** $${je.TotalAmt}\n`;
|
|
42
|
+
if (je.Adjustment !== undefined)
|
|
43
|
+
result += `- **Adjustment:** ${je.Adjustment}\n`;
|
|
44
|
+
if (je.Line && je.Line.length > 0) {
|
|
45
|
+
result += `- **Lines:**\n`;
|
|
46
|
+
for (const line of je.Line) {
|
|
47
|
+
if (!line.JournalEntryLineDetail)
|
|
48
|
+
continue;
|
|
49
|
+
const detail = line.JournalEntryLineDetail;
|
|
50
|
+
result += ` - ${detail.PostingType} ${detail.AccountRef.name || detail.AccountRef.value}: $${line.Amount}`;
|
|
51
|
+
if (line.Description)
|
|
52
|
+
result += ` (${line.Description})`;
|
|
53
|
+
result += `\n`;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if (je.MetaData?.CreateTime)
|
|
57
|
+
result += `- **Created:** ${je.MetaData.CreateTime}\n`;
|
|
58
|
+
return result;
|
|
59
|
+
}
|
|
60
|
+
export async function qbo_list_journal_entries(client, input) {
|
|
61
|
+
let query = "SELECT * FROM JournalEntry";
|
|
62
|
+
if (input.where)
|
|
63
|
+
query += ` WHERE ${input.where}`;
|
|
64
|
+
if (input.order_by)
|
|
65
|
+
query += ` ORDER BY ${input.order_by}`;
|
|
66
|
+
query += ` STARTPOSITION ${input.start_position || 1}`;
|
|
67
|
+
query += ` MAXRESULTS ${input.max_results || 100}`;
|
|
68
|
+
const response = await client.query(query);
|
|
69
|
+
const entries = response.QueryResponse.JournalEntry || [];
|
|
70
|
+
if (input.response_format === "json") {
|
|
71
|
+
return JSON.stringify({ journal_entries: entries, total: response.QueryResponse.totalCount }, null, 2);
|
|
72
|
+
}
|
|
73
|
+
let result = `# Journal Entries (${entries.length} results)\n\n`;
|
|
74
|
+
if (entries.length === 0) {
|
|
75
|
+
result += "No journal entries found.";
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
for (const je of entries) {
|
|
79
|
+
result += formatJournalEntry(je) + "\n";
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return result;
|
|
83
|
+
}
|
|
84
|
+
export async function qbo_get_journal_entry(client, input) {
|
|
85
|
+
const response = await client.get(`/journalentry/${input.journal_entry_id}`);
|
|
86
|
+
const je = response.JournalEntry;
|
|
87
|
+
if (input.response_format === "json") {
|
|
88
|
+
return JSON.stringify(je, null, 2);
|
|
89
|
+
}
|
|
90
|
+
return `# Journal Entry\n\n` + formatJournalEntry(je);
|
|
91
|
+
}
|
|
92
|
+
export async function qbo_create_journal_entry(client, input) {
|
|
93
|
+
const body = {
|
|
94
|
+
Line: input.lines.map(line => {
|
|
95
|
+
const l = {
|
|
96
|
+
Amount: line.amount,
|
|
97
|
+
DetailType: "JournalEntryLineDetail",
|
|
98
|
+
JournalEntryLineDetail: {
|
|
99
|
+
PostingType: line.posting_type,
|
|
100
|
+
AccountRef: { value: line.account_id },
|
|
101
|
+
...(line.entity_id && line.entity_type ? {
|
|
102
|
+
Entity: {
|
|
103
|
+
EntityRef: { value: line.entity_id },
|
|
104
|
+
Type: line.entity_type,
|
|
105
|
+
},
|
|
106
|
+
} : {}),
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
if (line.description)
|
|
110
|
+
l.Description = line.description;
|
|
111
|
+
return l;
|
|
112
|
+
}),
|
|
113
|
+
};
|
|
114
|
+
if (input.txn_date)
|
|
115
|
+
body.TxnDate = input.txn_date;
|
|
116
|
+
if (input.doc_number)
|
|
117
|
+
body.DocNumber = input.doc_number;
|
|
118
|
+
if (input.adjustment !== undefined)
|
|
119
|
+
body.Adjustment = input.adjustment;
|
|
120
|
+
const response = await client.post("/journalentry", body);
|
|
121
|
+
const je = response.JournalEntry;
|
|
122
|
+
if (input.response_format === "json") {
|
|
123
|
+
return JSON.stringify(je, null, 2);
|
|
124
|
+
}
|
|
125
|
+
return `# Journal Entry Created\n\n` + formatJournalEntry(je);
|
|
126
|
+
}
|
|
127
|
+
export async function qbo_delete_journal_entry(client, input) {
|
|
128
|
+
await client.delete("journalentry", input.journal_entry_id, input.sync_token);
|
|
129
|
+
return `Journal entry ${input.journal_entry_id} deleted successfully.`;
|
|
130
|
+
}
|
|
131
|
+
export const ListJournalEntriesInputSchemaExport = ListJournalEntriesInputSchema;
|
|
132
|
+
export const GetJournalEntryInputSchemaExport = GetJournalEntryInputSchema;
|
|
133
|
+
export const CreateJournalEntryInputSchemaExport = CreateJournalEntryInputSchema;
|
|
134
|
+
export const DeleteJournalEntryInputSchemaExport = DeleteJournalEntryInputSchema;
|
|
135
|
+
//# sourceMappingURL=journal-entries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journal-entries.js","sourceRoot":"","sources":["../../src/tools/journal-entries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,iBAAiB,CAAC;IACrE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IACjD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC;IAC1C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IACrF,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE;CACnE,CAAC,CAAC;AAEH,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,WAAW,EAAE,CAAC,CAAC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AC;IAClD,IAAI,KAAK,CAAC,UAAU;QAAE,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,UAAU,CAAC;IACxD,IAAI,KAAK,CAAC,UAAU,KAAK,SAAS;QAAE,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;IAEvE,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAiC,eAAe,EAAE,IAAI,CAAC,CAAC;IAC1F,MAAM,EAAE,GAAG,QAAQ,CAAC,YAAY,CAAC;IAEjC,IAAI,KAAK,CAAC,eAAe,KAAK,MAAM,EAAE,CAAC;QACrC,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,6BAA6B,GAAG,kBAAkB,CAAC,EAAE,CAAC,CAAC;AAChE,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,MAAiB,EACjB,KAA8B;IAE9B,MAAM,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,KAAK,CAAC,gBAAgB,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAC9E,OAAO,iBAAiB,KAAK,CAAC,gBAAgB,wBAAwB,CAAC;AACzE,CAAC;AAED,MAAM,CAAC,MAAM,mCAAmC,GAAG,6BAA6B,CAAC;AACjF,MAAM,CAAC,MAAM,gCAAgC,GAAG,0BAA0B,CAAC;AAC3E,MAAM,CAAC,MAAM,mCAAmC,GAAG,6BAA6B,CAAC;AACjF,MAAM,CAAC,MAAM,mCAAmC,GAAG,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { QBOClient } from "../client.js";
|
|
3
|
+
declare const ListPaymentsInputSchema: z.ZodObject<{
|
|
4
|
+
where: z.ZodOptional<z.ZodString>;
|
|
5
|
+
order_by: z.ZodOptional<z.ZodString>;
|
|
6
|
+
start_position: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
max_results: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
9
|
+
}, "strict", z.ZodTypeAny, {
|
|
10
|
+
response_format: "json" | "markdown";
|
|
11
|
+
where?: string | undefined;
|
|
12
|
+
order_by?: string | undefined;
|
|
13
|
+
start_position?: number | undefined;
|
|
14
|
+
max_results?: number | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
response_format?: "json" | "markdown" | undefined;
|
|
17
|
+
where?: string | undefined;
|
|
18
|
+
order_by?: string | undefined;
|
|
19
|
+
start_position?: number | undefined;
|
|
20
|
+
max_results?: number | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
declare const GetPaymentInputSchema: z.ZodObject<{
|
|
23
|
+
payment_id: z.ZodString;
|
|
24
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
25
|
+
}, "strict", z.ZodTypeAny, {
|
|
26
|
+
response_format: "json" | "markdown";
|
|
27
|
+
payment_id: string;
|
|
28
|
+
}, {
|
|
29
|
+
payment_id: string;
|
|
30
|
+
response_format?: "json" | "markdown" | undefined;
|
|
31
|
+
}>;
|
|
32
|
+
declare const CreatePaymentInputSchema: z.ZodObject<{
|
|
33
|
+
customer_id: z.ZodString;
|
|
34
|
+
total_amount: z.ZodNumber;
|
|
35
|
+
txn_date: z.ZodOptional<z.ZodString>;
|
|
36
|
+
linked_transactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
37
|
+
txn_id: z.ZodString;
|
|
38
|
+
txn_type: z.ZodString;
|
|
39
|
+
amount: z.ZodNumber;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
amount: number;
|
|
42
|
+
txn_id: string;
|
|
43
|
+
txn_type: string;
|
|
44
|
+
}, {
|
|
45
|
+
amount: number;
|
|
46
|
+
txn_id: string;
|
|
47
|
+
txn_type: string;
|
|
48
|
+
}>, "many">>;
|
|
49
|
+
deposit_to_account_id: z.ZodOptional<z.ZodString>;
|
|
50
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
51
|
+
}, "strict", z.ZodTypeAny, {
|
|
52
|
+
response_format: "json" | "markdown";
|
|
53
|
+
customer_id: string;
|
|
54
|
+
total_amount: number;
|
|
55
|
+
txn_date?: string | undefined;
|
|
56
|
+
linked_transactions?: {
|
|
57
|
+
amount: number;
|
|
58
|
+
txn_id: string;
|
|
59
|
+
txn_type: string;
|
|
60
|
+
}[] | undefined;
|
|
61
|
+
deposit_to_account_id?: string | undefined;
|
|
62
|
+
}, {
|
|
63
|
+
customer_id: string;
|
|
64
|
+
total_amount: number;
|
|
65
|
+
response_format?: "json" | "markdown" | undefined;
|
|
66
|
+
txn_date?: string | undefined;
|
|
67
|
+
linked_transactions?: {
|
|
68
|
+
amount: number;
|
|
69
|
+
txn_id: string;
|
|
70
|
+
txn_type: string;
|
|
71
|
+
}[] | undefined;
|
|
72
|
+
deposit_to_account_id?: string | undefined;
|
|
73
|
+
}>;
|
|
74
|
+
declare const DeletePaymentInputSchema: z.ZodObject<{
|
|
75
|
+
payment_id: z.ZodString;
|
|
76
|
+
sync_token: z.ZodString;
|
|
77
|
+
}, "strict", z.ZodTypeAny, {
|
|
78
|
+
sync_token: string;
|
|
79
|
+
payment_id: string;
|
|
80
|
+
}, {
|
|
81
|
+
sync_token: string;
|
|
82
|
+
payment_id: string;
|
|
83
|
+
}>;
|
|
84
|
+
export type ListPaymentsInput = z.infer<typeof ListPaymentsInputSchema>;
|
|
85
|
+
export type GetPaymentInput = z.infer<typeof GetPaymentInputSchema>;
|
|
86
|
+
export type CreatePaymentInput = z.infer<typeof CreatePaymentInputSchema>;
|
|
87
|
+
export type DeletePaymentInput = z.infer<typeof DeletePaymentInputSchema>;
|
|
88
|
+
export declare function qbo_list_payments(client: QBOClient, input: ListPaymentsInput): Promise<string>;
|
|
89
|
+
export declare function qbo_get_payment(client: QBOClient, input: GetPaymentInput): Promise<string>;
|
|
90
|
+
export declare function qbo_create_payment(client: QBOClient, input: CreatePaymentInput): Promise<string>;
|
|
91
|
+
export declare function qbo_delete_payment(client: QBOClient, input: DeletePaymentInput): Promise<string>;
|
|
92
|
+
export declare const ListPaymentsInputSchemaExport: z.ZodObject<{
|
|
93
|
+
where: z.ZodOptional<z.ZodString>;
|
|
94
|
+
order_by: z.ZodOptional<z.ZodString>;
|
|
95
|
+
start_position: z.ZodOptional<z.ZodNumber>;
|
|
96
|
+
max_results: z.ZodOptional<z.ZodNumber>;
|
|
97
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
98
|
+
}, "strict", z.ZodTypeAny, {
|
|
99
|
+
response_format: "json" | "markdown";
|
|
100
|
+
where?: string | undefined;
|
|
101
|
+
order_by?: string | undefined;
|
|
102
|
+
start_position?: number | undefined;
|
|
103
|
+
max_results?: number | undefined;
|
|
104
|
+
}, {
|
|
105
|
+
response_format?: "json" | "markdown" | undefined;
|
|
106
|
+
where?: string | undefined;
|
|
107
|
+
order_by?: string | undefined;
|
|
108
|
+
start_position?: number | undefined;
|
|
109
|
+
max_results?: number | undefined;
|
|
110
|
+
}>;
|
|
111
|
+
export declare const GetPaymentInputSchemaExport: z.ZodObject<{
|
|
112
|
+
payment_id: z.ZodString;
|
|
113
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
114
|
+
}, "strict", z.ZodTypeAny, {
|
|
115
|
+
response_format: "json" | "markdown";
|
|
116
|
+
payment_id: string;
|
|
117
|
+
}, {
|
|
118
|
+
payment_id: string;
|
|
119
|
+
response_format?: "json" | "markdown" | undefined;
|
|
120
|
+
}>;
|
|
121
|
+
export declare const CreatePaymentInputSchemaExport: z.ZodObject<{
|
|
122
|
+
customer_id: z.ZodString;
|
|
123
|
+
total_amount: z.ZodNumber;
|
|
124
|
+
txn_date: z.ZodOptional<z.ZodString>;
|
|
125
|
+
linked_transactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
126
|
+
txn_id: z.ZodString;
|
|
127
|
+
txn_type: z.ZodString;
|
|
128
|
+
amount: z.ZodNumber;
|
|
129
|
+
}, "strip", z.ZodTypeAny, {
|
|
130
|
+
amount: number;
|
|
131
|
+
txn_id: string;
|
|
132
|
+
txn_type: string;
|
|
133
|
+
}, {
|
|
134
|
+
amount: number;
|
|
135
|
+
txn_id: string;
|
|
136
|
+
txn_type: string;
|
|
137
|
+
}>, "many">>;
|
|
138
|
+
deposit_to_account_id: z.ZodOptional<z.ZodString>;
|
|
139
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
140
|
+
}, "strict", z.ZodTypeAny, {
|
|
141
|
+
response_format: "json" | "markdown";
|
|
142
|
+
customer_id: string;
|
|
143
|
+
total_amount: number;
|
|
144
|
+
txn_date?: string | undefined;
|
|
145
|
+
linked_transactions?: {
|
|
146
|
+
amount: number;
|
|
147
|
+
txn_id: string;
|
|
148
|
+
txn_type: string;
|
|
149
|
+
}[] | undefined;
|
|
150
|
+
deposit_to_account_id?: string | undefined;
|
|
151
|
+
}, {
|
|
152
|
+
customer_id: string;
|
|
153
|
+
total_amount: number;
|
|
154
|
+
response_format?: "json" | "markdown" | undefined;
|
|
155
|
+
txn_date?: string | undefined;
|
|
156
|
+
linked_transactions?: {
|
|
157
|
+
amount: number;
|
|
158
|
+
txn_id: string;
|
|
159
|
+
txn_type: string;
|
|
160
|
+
}[] | undefined;
|
|
161
|
+
deposit_to_account_id?: string | undefined;
|
|
162
|
+
}>;
|
|
163
|
+
export declare const DeletePaymentInputSchemaExport: z.ZodObject<{
|
|
164
|
+
payment_id: z.ZodString;
|
|
165
|
+
sync_token: z.ZodString;
|
|
166
|
+
}, "strict", z.ZodTypeAny, {
|
|
167
|
+
sync_token: string;
|
|
168
|
+
payment_id: string;
|
|
169
|
+
}, {
|
|
170
|
+
sync_token: string;
|
|
171
|
+
payment_id: string;
|
|
172
|
+
}>;
|
|
173
|
+
export {};
|
|
174
|
+
//# sour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,CAGjB;AAED,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;EAA0B,CAAC;AACrE,eAAO,MAAM,2BAA2B;;;;;;;;;EAAwB,CAAC;AACjE,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA2B,CAAC;AACvE,eAAO,MAAM,8BAA8B;;;;;;;;;EAA2B,CAAC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const LinkedTxnSchema = z.object({
|
|
3
|
+
txn_id: z.string().describe("Transaction ID to link (e.g. invoice ID)"),
|
|
4
|
+
txn_type: z.string().describe("Transaction type (e.g. 'Invoice')"),
|
|
5
|
+
amount: z.number().describe("Amount applied to this transaction"),
|
|
6
|
+
});
|
|
7
|
+
const ListPaymentsInputSchema = z.object({
|
|
8
|
+
where: z.string().optional().describe("WHERE clause filter"),
|
|
9
|
+
order_by: z.string().optional(),
|
|
10
|
+
start_position: z.number().optional(),
|
|
11
|
+
max_results: z.number().optional(),
|
|
12
|
+
response_format: z.enum(["json", "markdown"]).default("markdown"),
|
|
13
|
+
}).strict();
|
|
14
|
+
const GetPaymentInputSchema = z.object({
|
|
15
|
+
payment_id: z.string().describe("The payment ID"),
|
|
16
|
+
response_format: z.enum(["json", "markdown"]).default("markdown"),
|
|
17
|
+
}).strict();
|
|
18
|
+
const CreatePaymentInputSchema = z.object({
|
|
19
|
+
customer_id: z.string().describe("Customer reference ID"),
|
|
20
|
+
total_amount: z.number().describe("Total payment amount"),
|
|
21
|
+
txn_date: z.string().optional().describe("Payment date (YYYY-MM-DD)"),
|
|
22
|
+
linked_transactions: z.array(LinkedTxnSchema).optional().describe("Link payment to invoices"),
|
|
23
|
+
deposit_to_account_id: z.string().optional().describe("Deposit to account reference ID"),
|
|
24
|
+
response_format: z.enum(["json", "markdown"]).default("markdown"),
|
|
25
|
+
}).strict();
|
|
26
|
+
const DeletePaymentInputSchema = z.object({
|
|
27
|
+
payment_id: z.string().describe("The payment ID"),
|
|
28
|
+
sync_token: z.string().describe("SyncToken from the current payment record"),
|
|
29
|
+
}).strict();
|
|
30
|
+
function formatPayment(p) {
|
|
31
|
+
let result = `## Payment ${p.Id || ""}\n`;
|
|
32
|
+
if (p.Id)
|
|
33
|
+
result += `- **ID:** ${p.Id}\n`;
|
|
34
|
+
if (p.SyncToken)
|
|
35
|
+
result += `- **SyncToken:** ${p.SyncToken}\n`;
|
|
36
|
+
if (p.CustomerRef)
|
|
37
|
+
result += `- **Customer:** ${p.CustomerRef.name || p.CustomerRef.value}\n`;
|
|
38
|
+
if (p.TotalAmt !== undefined)
|
|
39
|
+
result += `- **Amount:** $${p.TotalAmt}\n`;
|
|
40
|
+
if (p.TxnDate)
|
|
41
|
+
result += `- **Date:** ${p.TxnDate}\n`;
|
|
42
|
+
if (p.CurrencyRef)
|
|
43
|
+
result += `- **Currency:** ${p.CurrencyRef.value}\n`;
|
|
44
|
+
if (p.DepositToAccountRef)
|
|
45
|
+
result += `- **Deposit To:** ${p.DepositToAccountRef.name || p.DepositToAccountRef.value}\n`;
|
|
46
|
+
if (p.Line && p.Line.length > 0) {
|
|
47
|
+
result += `- **Applied To:**\n`;
|
|
48
|
+
for (const line of p.Line) {
|
|
49
|
+
for (const txn of line.LinkedTxn) {
|
|
50
|
+
result += ` - ${txn.TxnType} #${txn.TxnId}: $${line.Amount}\n`;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (p.MetaData?.CreateTime)
|
|
55
|
+
result += `- **Created:** ${p.MetaData.CreateTime}\n`;
|
|
56
|
+
return result;
|
|
57
|
+
}
|
|
58
|
+
export async function qbo_list_payments(client, input) {
|
|
59
|
+
let query = "SELECT * FROM Payment";
|
|
60
|
+
if (input.where)
|
|
61
|
+
query += ` WHERE ${input.where}`;
|
|
62
|
+
if (input.order_by)
|
|
63
|
+
query += ` ORDER BY ${input.order_by}`;
|
|
64
|
+
query += ` STARTPOSITION ${input.start_position || 1}`;
|
|
65
|
+
query += ` MAXRESULTS ${input.max_results || 100}`;
|
|
66
|
+
const response = await client.query(query);
|
|
67
|
+
const payments = response.QueryResponse.Payment || [];
|
|
68
|
+
if (input.response_format === "json") {
|
|
69
|
+
return JSON.stringify({ payments, total: response.QueryResponse.totalCount }, null, 2);
|
|
70
|
+
}
|
|
71
|
+
let result = `# Payments (${payments.length} results)\n\n`;
|
|
72
|
+
if (payments.length === 0) {
|
|
73
|
+
result += "No payments found.";
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
for (const p of payments) {
|
|
77
|
+
result += formatPayment(p) + "\n";
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return result;
|
|
81
|
+
}
|
|
82
|
+
export async function qbo_get_payment(client, input) {
|
|
83
|
+
const response = await client.get(`/payment/${input.payment_id}`);
|
|
84
|
+
const p = response.Payment;
|
|
85
|
+
if (input.response_format === "json") {
|
|
86
|
+
return JSON.stringify(p, null, 2);
|
|
87
|
+
}
|
|
88
|
+
return `# Payment\n\n` + formatPayment(p);
|
|
89
|
+
}
|
|
90
|
+
export async function qbo_create_payment(client, input) {
|
|
91
|
+
const body = {
|
|
92
|
+
CustomerRef: { value: input.customer_id },
|
|
93
|
+
TotalAmt: input.total_amount,
|
|
94
|
+
};
|
|
95
|
+
if (input.txn_date)
|
|
96
|
+
body.TxnDate = input.txn_date;
|
|
97
|
+
if (input.deposit_to_account_id)
|
|
98
|
+
body.DepositToAccountRef = { value: input.deposit_to_account_id };
|
|
99
|
+
if (input.linked_transactions) {
|
|
100
|
+
body.Line = input.linked_transactions.map(lt => ({
|
|
101
|
+
Amount: lt.amount,
|
|
102
|
+
LinkedTxn: [{ TxnId: lt.txn_id, TxnType: lt.txn_type }],
|
|
103
|
+
}));
|
|
104
|
+
}
|
|
105
|
+
const response = await client.post("/payment", body);
|
|
106
|
+
const p = response.Payment;
|
|
107
|
+
if (input.response_format === "json") {
|
|
108
|
+
return JSON.stringify(p, null, 2);
|
|
109
|
+
}
|
|
110
|
+
return `# Payment Created\n\n` + formatPayment(p);
|
|
111
|
+
}
|
|
112
|
+
export async function qbo_delete_payment(client, input) {
|
|
113
|
+
await client.delete("payment", input.payment_id, input.sync_token);
|
|
114
|
+
return `Payment ${input.payment_id} deleted successfully.`;
|
|
115
|
+
}
|
|
116
|
+
export const ListPaymentsInputSchemaExport = ListPaymentsInputSchema;
|
|
117
|
+
export const GetPaymentInputSchemaExport = GetPaymentInputSchema;
|
|
118
|
+
export const CreatePaymentInputSchemaExport = CreatePaymentInputSchema;
|
|
119
|
+
export const DeletePaymentInputSchemaExport = DeletePaymentInputSchema;
|
|
120
|
+
//# sourceMappingURL=payments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payments.js","sourceRoot":"","sources":["../../src/tools/payments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IACvE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IAClE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;CAClE,CAAC,CAAC;AAEH,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;IAC5D,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,eAAe,EAAE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