@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,212 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { QBOClient } from "../client.js";
|
|
3
|
+
declare const ListItemsInputSchema: 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 GetItemInputSchema: z.ZodObject<{
|
|
23
|
+
item_id: z.ZodString;
|
|
24
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
25
|
+
}, "strict", z.ZodTypeAny, {
|
|
26
|
+
response_format: "json" | "markdown";
|
|
27
|
+
item_id: string;
|
|
28
|
+
}, {
|
|
29
|
+
item_id: string;
|
|
30
|
+
response_format?: "json" | "markdown" | undefined;
|
|
31
|
+
}>;
|
|
32
|
+
declare const CreateItemInputSchema: z.ZodObject<{
|
|
33
|
+
name: z.ZodString;
|
|
34
|
+
type: z.ZodEnum<["Inventory", "NonInventory", "Service"]>;
|
|
35
|
+
description: z.ZodOptional<z.ZodString>;
|
|
36
|
+
unit_price: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
purchase_cost: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
income_account_id: z.ZodOptional<z.ZodString>;
|
|
39
|
+
expense_account_id: z.ZodOptional<z.ZodString>;
|
|
40
|
+
asset_account_id: z.ZodOptional<z.ZodString>;
|
|
41
|
+
qty_on_hand: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
inv_start_date: z.ZodOptional<z.ZodString>;
|
|
43
|
+
taxable: z.ZodOptional<z.ZodBoolean>;
|
|
44
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
45
|
+
}, "strict", z.ZodTypeAny, {
|
|
46
|
+
response_format: "json" | "markdown";
|
|
47
|
+
type: "Inventory" | "NonInventory" | "Service";
|
|
48
|
+
name: string;
|
|
49
|
+
description?: string | undefined;
|
|
50
|
+
unit_price?: number | undefined;
|
|
51
|
+
purchase_cost?: number | undefined;
|
|
52
|
+
income_account_id?: string | undefined;
|
|
53
|
+
expense_account_id?: string | undefined;
|
|
54
|
+
asset_account_id?: string | undefined;
|
|
55
|
+
qty_on_hand?: number | undefined;
|
|
56
|
+
inv_start_date?: string | undefined;
|
|
57
|
+
taxable?: boolean | undefined;
|
|
58
|
+
}, {
|
|
59
|
+
type: "Inventory" | "NonInventory" | "Service";
|
|
60
|
+
name: string;
|
|
61
|
+
response_format?: "json" | "markdown" | undefined;
|
|
62
|
+
description?: string | undefined;
|
|
63
|
+
unit_price?: number | undefined;
|
|
64
|
+
purchase_cost?: number | undefined;
|
|
65
|
+
income_account_id?: string | undefined;
|
|
66
|
+
expense_account_id?: string | undefined;
|
|
67
|
+
asset_account_id?: string | undefined;
|
|
68
|
+
qty_on_hand?: number | undefined;
|
|
69
|
+
inv_start_date?: string | undefined;
|
|
70
|
+
taxable?: boolean | undefined;
|
|
71
|
+
}>;
|
|
72
|
+
declare const UpdateItemInputSchema: z.ZodObject<{
|
|
73
|
+
item_id: z.ZodString;
|
|
74
|
+
sync_token: z.ZodString;
|
|
75
|
+
name: z.ZodOptional<z.ZodString>;
|
|
76
|
+
description: z.ZodOptional<z.ZodString>;
|
|
77
|
+
unit_price: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
purchase_cost: z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
80
|
+
taxable: z.ZodOptional<z.ZodBoolean>;
|
|
81
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
82
|
+
}, "strict", z.ZodTypeAny, {
|
|
83
|
+
response_format: "json" | "markdown";
|
|
84
|
+
sync_token: string;
|
|
85
|
+
item_id: string;
|
|
86
|
+
active?: boolean | undefined;
|
|
87
|
+
description?: string | undefined;
|
|
88
|
+
unit_price?: number | undefined;
|
|
89
|
+
name?: string | undefined;
|
|
90
|
+
purchase_cost?: number | undefined;
|
|
91
|
+
taxable?: boolean | undefined;
|
|
92
|
+
}, {
|
|
93
|
+
sync_token: string;
|
|
94
|
+
item_id: string;
|
|
95
|
+
response_format?: "json" | "markdown" | undefined;
|
|
96
|
+
active?: boolean | undefined;
|
|
97
|
+
description?: string | undefined;
|
|
98
|
+
unit_price?: number | undefined;
|
|
99
|
+
name?: string | undefined;
|
|
100
|
+
purchase_cost?: number | undefined;
|
|
101
|
+
taxable?: boolean | undefined;
|
|
102
|
+
}>;
|
|
103
|
+
export type ListItemsInput = z.infer<typeof ListItemsInputSchema>;
|
|
104
|
+
export type GetItemInput = z.infer<typeof GetItemInputSchema>;
|
|
105
|
+
export type CreateItemInput = z.infer<typeof CreateItemInputSchema>;
|
|
106
|
+
export type UpdateItemInput = z.infer<typeof UpdateItemInputSchema>;
|
|
107
|
+
export declare function qbo_list_items(client: QBOClient, input: ListItemsInput): Promise<string>;
|
|
108
|
+
export declare function qbo_get_item(client: QBOClient, input: GetItemInput): Promise<string>;
|
|
109
|
+
export declare function qbo_create_item(client: QBOClient, input: CreateItemInput): Promise<string>;
|
|
110
|
+
export declare function qbo_update_item(client: QBOClient, input: UpdateItemInput): Promise<string>;
|
|
111
|
+
export declare const ListItemsInputSchemaExport: z.ZodObject<{
|
|
112
|
+
where: z.ZodOptional<z.ZodString>;
|
|
113
|
+
order_by: z.ZodOptional<z.ZodString>;
|
|
114
|
+
start_position: z.ZodOptional<z.ZodNumber>;
|
|
115
|
+
max_results: z.ZodOptional<z.ZodNumber>;
|
|
116
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
117
|
+
}, "strict", z.ZodTypeAny, {
|
|
118
|
+
response_format: "json" | "markdown";
|
|
119
|
+
where?: string | undefined;
|
|
120
|
+
order_by?: string | undefined;
|
|
121
|
+
start_position?: number | undefined;
|
|
122
|
+
max_results?: number | undefined;
|
|
123
|
+
}, {
|
|
124
|
+
response_format?: "json" | "markdown" | undefined;
|
|
125
|
+
where?: string | undefined;
|
|
126
|
+
order_by?: string | undefined;
|
|
127
|
+
start_position?: number | undefined;
|
|
128
|
+
max_results?: number | undefined;
|
|
129
|
+
}>;
|
|
130
|
+
export declare const GetItemInputSchemaExport: z.ZodObject<{
|
|
131
|
+
item_id: z.ZodString;
|
|
132
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
133
|
+
}, "strict", z.ZodTypeAny, {
|
|
134
|
+
response_format: "json" | "markdown";
|
|
135
|
+
item_id: string;
|
|
136
|
+
}, {
|
|
137
|
+
item_id: string;
|
|
138
|
+
response_format?: "json" | "markdown" | undefined;
|
|
139
|
+
}>;
|
|
140
|
+
export declare const CreateItemInputSchemaExport: z.ZodObject<{
|
|
141
|
+
name: z.ZodString;
|
|
142
|
+
type: z.ZodEnum<["Inventory", "NonInventory", "Service"]>;
|
|
143
|
+
description: z.ZodOptional<z.ZodString>;
|
|
144
|
+
unit_price: z.ZodOptional<z.ZodNumber>;
|
|
145
|
+
purchase_cost: z.ZodOptional<z.ZodNumber>;
|
|
146
|
+
income_account_id: z.ZodOptional<z.ZodString>;
|
|
147
|
+
expense_account_id: z.ZodOptional<z.ZodString>;
|
|
148
|
+
asset_account_id: z.ZodOptional<z.ZodString>;
|
|
149
|
+
qty_on_hand: z.ZodOptional<z.ZodNumber>;
|
|
150
|
+
inv_start_date: z.ZodOptional<z.ZodString>;
|
|
151
|
+
taxable: z.ZodOptional<z.ZodBoolean>;
|
|
152
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
153
|
+
}, "strict", z.ZodTypeAny, {
|
|
154
|
+
response_format: "json" | "markdown";
|
|
155
|
+
type: "Inventory" | "NonInventory" | "Service";
|
|
156
|
+
name: string;
|
|
157
|
+
description?: string | undefined;
|
|
158
|
+
unit_price?: number | undefined;
|
|
159
|
+
purchase_cost?: number | undefined;
|
|
160
|
+
income_account_id?: string | undefined;
|
|
161
|
+
expense_account_id?: string | undefined;
|
|
162
|
+
asset_account_id?: string | undefined;
|
|
163
|
+
qty_on_hand?: number | undefined;
|
|
164
|
+
inv_start_date?: string | undefined;
|
|
165
|
+
taxable?: boolean | undefined;
|
|
166
|
+
}, {
|
|
167
|
+
type: "Inventory" | "NonInventory" | "Service";
|
|
168
|
+
name: string;
|
|
169
|
+
response_format?: "json" | "markdown" | undefined;
|
|
170
|
+
description?: string | undefined;
|
|
171
|
+
unit_price?: number | undefined;
|
|
172
|
+
purchase_cost?: number | undefined;
|
|
173
|
+
income_account_id?: string | undefined;
|
|
174
|
+
expense_account_id?: string | undefined;
|
|
175
|
+
asset_account_id?: string | undefined;
|
|
176
|
+
qty_on_hand?: number | undefined;
|
|
177
|
+
inv_start_date?: string | undefined;
|
|
178
|
+
taxable?: boolean | undefined;
|
|
179
|
+
}>;
|
|
180
|
+
export declare const UpdateItemInputSchemaExport: z.ZodObject<{
|
|
181
|
+
item_id: z.ZodString;
|
|
182
|
+
sync_token: z.ZodString;
|
|
183
|
+
name: z.ZodOptional<z.ZodString>;
|
|
184
|
+
description: z.ZodOptional<z.ZodString>;
|
|
185
|
+
unit_price: z.ZodOptional<z.ZodNumber>;
|
|
186
|
+
purchase_cost: z.ZodOptional<z.ZodNumber>;
|
|
187
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
188
|
+
taxable: z.ZodOptional<z.ZodBoolean>;
|
|
189
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
190
|
+
}, "strict", z.ZodTypeAny, {
|
|
191
|
+
response_format: "json" | "markdown";
|
|
192
|
+
sync_token: string;
|
|
193
|
+
item_id: string;
|
|
194
|
+
active?: boolean | undefined;
|
|
195
|
+
description?: string | undefined;
|
|
196
|
+
unit_price?: number | undefined;
|
|
197
|
+
name?: string | undefined;
|
|
198
|
+
purchase_cost?: number | undefined;
|
|
199
|
+
taxable?: boolean | undefined;
|
|
200
|
+
}, {
|
|
201
|
+
sync_token: string;
|
|
202
|
+
item_id: string;
|
|
203
|
+
response_format?: "json" | "markdown" | undefined;
|
|
204
|
+
active?: boolean | undefined;
|
|
205
|
+
description?: string | undefined;
|
|
206
|
+
unit_price?: number | undefined;
|
|
207
|
+
name?: string | undefined;
|
|
208
|
+
purchase_cost?: number | undefined;
|
|
209
|
+
taxable?: boolean | undefined;
|
|
210
|
+
}>;
|
|
211
|
+
export {};
|
|
212
|
+
//# sourceMappingURL=items.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../../src/tools/items.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;EAMf,CAAC;AAEZ,QAAA,MAAM,kBAAkB;;;;;;;;;EAGb,CAAC;AAEZ,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAahB,CAAC;AAEZ,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUhB,CAAC;AAEZ,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAiBpE,wBAAsB,cAAc,CAClC,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,cAAc,GACpB,OAAO,CAAC,MAAM,CAAC,CAuBjB;AAED,wBAAsB,YAAY,CAChC,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,YAAY,GAClB,OAAO,CAAC,MAAM,CAAC,CASjB;AAED,wBAAsB,eAAe,CACnC,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,eAAe,GACrB,OAAO,CAAC,MAAM,CAAC,CAuBjB;AAED,wBAAsB,eAAe,CACnC,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,eAAe,GACrB,OAAO,CAAC,MAAM,CAAC,CAqBjB;AAED,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;EAAuB,CAAC;AAC/D,eAAO,MAAM,wBAAwB;;;;;;;;;EAAqB,CAAC;AAC3D,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAwB,CAAC;AACjE,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAwB,CAAC"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const ListItemsInputSchema = z.object({
|
|
3
|
+
where: z.string().optional().describe("WHERE clause, e.g. \"Type = 'Service'\" or \"Name LIKE '%Widget%'\""),
|
|
4
|
+
order_by: z.string().optional(),
|
|
5
|
+
start_position: z.number().optional(),
|
|
6
|
+
max_results: z.number().optional(),
|
|
7
|
+
response_format: z.enum(["json", "markdown"]).default("markdown"),
|
|
8
|
+
}).strict();
|
|
9
|
+
const GetItemInputSchema = z.object({
|
|
10
|
+
item_id: z.string().describe("The item ID"),
|
|
11
|
+
response_format: z.enum(["json", "markdown"]).default("markdown"),
|
|
12
|
+
}).strict();
|
|
13
|
+
const CreateItemInputSchema = z.object({
|
|
14
|
+
name: z.string().describe("Item name"),
|
|
15
|
+
type: z.enum(["Inventory", "NonInventory", "Service"]).describe("Item type"),
|
|
16
|
+
description: z.string().optional(),
|
|
17
|
+
unit_price: z.number().optional().describe("Sales price"),
|
|
18
|
+
purchase_cost: z.number().optional().describe("Purchase cost"),
|
|
19
|
+
income_account_id: z.string().optional().describe("Income account ref ID (required for Service/NonInventory)"),
|
|
20
|
+
expense_account_id: z.string().optional().describe("Expense account ref ID"),
|
|
21
|
+
asset_account_id: z.string().optional().describe("Asset account ref ID (required for Inventory)"),
|
|
22
|
+
qty_on_hand: z.number().optional().describe("Quantity on hand (required for Inventory)"),
|
|
23
|
+
inv_start_date: z.string().optional().describe("Inventory start date (required for Inventory, YYYY-MM-DD)"),
|
|
24
|
+
taxable: z.boolean().optional(),
|
|
25
|
+
response_format: z.enum(["json", "markdown"]).default("markdown"),
|
|
26
|
+
}).strict();
|
|
27
|
+
const UpdateItemInputSchema = z.object({
|
|
28
|
+
item_id: z.string().describe("The item ID"),
|
|
29
|
+
sync_token: z.string().describe("SyncToken from the current item record"),
|
|
30
|
+
name: z.string().optional(),
|
|
31
|
+
description: z.string().optional(),
|
|
32
|
+
unit_price: z.number().optional(),
|
|
33
|
+
purchase_cost: z.number().optional(),
|
|
34
|
+
active: z.boolean().optional(),
|
|
35
|
+
taxable: z.boolean().optional(),
|
|
36
|
+
response_format: z.enum(["json", "markdown"]).default("markdown"),
|
|
37
|
+
}).strict();
|
|
38
|
+
function formatItem(i) {
|
|
39
|
+
let result = `## ${i.Name || "Unknown"}\n`;
|
|
40
|
+
if (i.Id)
|
|
41
|
+
result += `- **ID:** ${i.Id}\n`;
|
|
42
|
+
if (i.SyncToken)
|
|
43
|
+
result += `- **SyncToken:** ${i.SyncToken}\n`;
|
|
44
|
+
if (i.Type)
|
|
45
|
+
result += `- **Type:** ${i.Type}\n`;
|
|
46
|
+
if (i.Description)
|
|
47
|
+
result += `- **Description:** ${i.Description}\n`;
|
|
48
|
+
if (i.UnitPrice !== undefined)
|
|
49
|
+
result += `- **Price:** $${i.UnitPrice}\n`;
|
|
50
|
+
if (i.PurchaseCost !== undefined)
|
|
51
|
+
result += `- **Cost:** $${i.PurchaseCost}\n`;
|
|
52
|
+
if (i.QtyOnHand !== undefined)
|
|
53
|
+
result += `- **Qty On Hand:** ${i.QtyOnHand}\n`;
|
|
54
|
+
if (i.Active !== undefined)
|
|
55
|
+
result += `- **Active:** ${i.Active}\n`;
|
|
56
|
+
if (i.Taxable !== undefined)
|
|
57
|
+
result += `- **Taxable:** ${i.Taxable}\n`;
|
|
58
|
+
if (i.MetaData?.CreateTime)
|
|
59
|
+
result += `- **Created:** ${i.MetaData.CreateTime}\n`;
|
|
60
|
+
return result;
|
|
61
|
+
}
|
|
62
|
+
export async function qbo_list_items(client, input) {
|
|
63
|
+
let query = "SELECT * FROM Item";
|
|
64
|
+
if (input.where)
|
|
65
|
+
query += ` WHERE ${input.where}`;
|
|
66
|
+
if (input.order_by)
|
|
67
|
+
query += ` ORDER BY ${input.order_by}`;
|
|
68
|
+
query += ` STARTPOSITION ${input.start_position || 1}`;
|
|
69
|
+
query += ` MAXRESULTS ${input.max_results || 100}`;
|
|
70
|
+
const response = await client.query(query);
|
|
71
|
+
const items = response.QueryResponse.Item || [];
|
|
72
|
+
if (input.response_format === "json") {
|
|
73
|
+
return JSON.stringify({ items, total: response.QueryResponse.totalCount }, null, 2);
|
|
74
|
+
}
|
|
75
|
+
let result = `# Items (${items.length} results)\n\n`;
|
|
76
|
+
if (items.length === 0) {
|
|
77
|
+
result += "No items found.";
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
for (const i of items) {
|
|
81
|
+
result += formatItem(i) + "\n";
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return result;
|
|
85
|
+
}
|
|
86
|
+
export async function qbo_get_item(client, input) {
|
|
87
|
+
const response = await client.get(`/item/${input.item_id}`);
|
|
88
|
+
const i = response.Item;
|
|
89
|
+
if (input.response_format === "json") {
|
|
90
|
+
return JSON.stringify(i, null, 2);
|
|
91
|
+
}
|
|
92
|
+
return `# Item\n\n` + formatItem(i);
|
|
93
|
+
}
|
|
94
|
+
export async function qbo_create_item(client, input) {
|
|
95
|
+
const body = {
|
|
96
|
+
Name: input.name,
|
|
97
|
+
Type: input.type,
|
|
98
|
+
};
|
|
99
|
+
if (input.description)
|
|
100
|
+
body.Description = input.description;
|
|
101
|
+
if (input.unit_price !== undefined)
|
|
102
|
+
body.UnitPrice = input.unit_price;
|
|
103
|
+
if (input.purchase_cost !== undefined)
|
|
104
|
+
body.PurchaseCost = input.purchase_cost;
|
|
105
|
+
if (input.income_account_id)
|
|
106
|
+
body.IncomeAccountRef = { value: input.income_account_id };
|
|
107
|
+
if (input.expense_account_id)
|
|
108
|
+
body.ExpenseAccountRef = { value: input.expense_account_id };
|
|
109
|
+
if (input.asset_account_id)
|
|
110
|
+
body.AssetAccountRef = { value: input.asset_account_id };
|
|
111
|
+
if (input.qty_on_hand !== undefined)
|
|
112
|
+
body.QtyOnHand = input.qty_on_hand;
|
|
113
|
+
if (input.inv_start_date)
|
|
114
|
+
body.InvStartDate = input.inv_start_date;
|
|
115
|
+
if (input.taxable !== undefined)
|
|
116
|
+
body.Taxable = input.taxable;
|
|
117
|
+
const response = await client.post("/item", body);
|
|
118
|
+
const i = response.Item;
|
|
119
|
+
if (input.response_format === "json") {
|
|
120
|
+
return JSON.stringify(i, null, 2);
|
|
121
|
+
}
|
|
122
|
+
return `# Item Created\n\n` + formatItem(i);
|
|
123
|
+
}
|
|
124
|
+
export async function qbo_update_item(client, input) {
|
|
125
|
+
const body = {
|
|
126
|
+
Id: input.item_id,
|
|
127
|
+
SyncToken: input.sync_token,
|
|
128
|
+
sparse: true,
|
|
129
|
+
};
|
|
130
|
+
if (input.name)
|
|
131
|
+
body.Name = input.name;
|
|
132
|
+
if (input.description)
|
|
133
|
+
body.Description = input.description;
|
|
134
|
+
if (input.unit_price !== undefined)
|
|
135
|
+
body.UnitPrice = input.unit_price;
|
|
136
|
+
if (input.purchase_cost !== undefined)
|
|
137
|
+
body.PurchaseCost = input.purchase_cost;
|
|
138
|
+
if (input.active !== undefined)
|
|
139
|
+
body.Active = input.active;
|
|
140
|
+
if (input.taxable !== undefined)
|
|
141
|
+
body.Taxable = input.taxable;
|
|
142
|
+
const response = await client.post("/item", body);
|
|
143
|
+
const i = response.Item;
|
|
144
|
+
if (input.response_format === "json") {
|
|
145
|
+
return JSON.stringify(i, null, 2);
|
|
146
|
+
}
|
|
147
|
+
return `# Item Updated\n\n` + formatItem(i);
|
|
148
|
+
}
|
|
149
|
+
export const ListItemsInputSchemaExport = ListItemsInputSchema;
|
|
150
|
+
export const GetItemInputSchemaExport = GetItemInputSchema;
|
|
151
|
+
export const CreateItemInputSchemaExport = CreateItemInputSchema;
|
|
152
|
+
export const UpdateItemInputSchemaExport = UpdateItemInputSchema;
|
|
153
|
+
//# sourceMappingURL=items.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"items.js","sourceRoot":"","sources":["../../src/tools/items.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qEAAqE,CAAC;IAC5G,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,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;CAClE,CAAC,CAAC,MAAM,EAAE,CAAC;AAEZ,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC;IAC3C,eAAe,EAAE,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@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { QBOClient } from "../client.js";
|
|
3
|
+
declare const ListJournalEntriesInputSchema: 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 GetJournalEntryInputSchema: z.ZodObject<{
|
|
23
|
+
journal_entry_id: z.ZodString;
|
|
24
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
25
|
+
}, "strict", z.ZodTypeAny, {
|
|
26
|
+
response_format: "json" | "markdown";
|
|
27
|
+
journal_entry_id: string;
|
|
28
|
+
}, {
|
|
29
|
+
journal_entry_id: string;
|
|
30
|
+
response_format?: "json" | "markdown" | undefined;
|
|
31
|
+
}>;
|
|
32
|
+
declare const CreateJournalEntryInputSchema: z.ZodObject<{
|
|
33
|
+
lines: z.ZodArray<z.ZodObject<{
|
|
34
|
+
posting_type: z.ZodEnum<["Debit", "Credit"]>;
|
|
35
|
+
account_id: z.ZodString;
|
|
36
|
+
amount: z.ZodNumber;
|
|
37
|
+
description: z.ZodOptional<z.ZodString>;
|
|
38
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
39
|
+
entity_type: z.ZodOptional<z.ZodEnum<["Customer", "Vendor", "Employee"]>>;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
amount: number;
|
|
42
|
+
account_id: string;
|
|
43
|
+
posting_type: "Debit" | "Credit";
|
|
44
|
+
description?: string | undefined;
|
|
45
|
+
entity_id?: string | undefined;
|
|
46
|
+
entity_type?: "Employee" | "Vendor" | "Customer" | undefined;
|
|
47
|
+
}, {
|
|
48
|
+
amount: number;
|
|
49
|
+
account_id: string;
|
|
50
|
+
posting_type: "Debit" | "Credit";
|
|
51
|
+
description?: string | undefined;
|
|
52
|
+
entity_id?: string | undefined;
|
|
53
|
+
entity_type?: "Employee" | "Vendor" | "Customer" | undefined;
|
|
54
|
+
}>, "many">;
|
|
55
|
+
txn_date: z.ZodOptional<z.ZodString>;
|
|
56
|
+
doc_number: z.ZodOptional<z.ZodString>;
|
|
57
|
+
adjustment: z.ZodOptional<z.ZodBoolean>;
|
|
58
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
59
|
+
}, "strict", z.ZodTypeAny, {
|
|
60
|
+
response_format: "json" | "markdown";
|
|
61
|
+
lines: {
|
|
62
|
+
amount: number;
|
|
63
|
+
account_id: string;
|
|
64
|
+
posting_type: "Debit" | "Credit";
|
|
65
|
+
description?: string | undefined;
|
|
66
|
+
entity_id?: string | undefined;
|
|
67
|
+
entity_type?: "Employee" | "Vendor" | "Customer" | undefined;
|
|
68
|
+
}[];
|
|
69
|
+
txn_date?: string | undefined;
|
|
70
|
+
doc_number?: string | undefined;
|
|
71
|
+
adjustment?: boolean | undefined;
|
|
72
|
+
}, {
|
|
73
|
+
lines: {
|
|
74
|
+
amount: number;
|
|
75
|
+
account_id: string;
|
|
76
|
+
posting_type: "Debit" | "Credit";
|
|
77
|
+
description?: string | undefined;
|
|
78
|
+
entity_id?: string | undefined;
|
|
79
|
+
entity_type?: "Employee" | "Vendor" | "Customer" | undefined;
|
|
80
|
+
}[];
|
|
81
|
+
response_format?: "json" | "markdown" | undefined;
|
|
82
|
+
txn_date?: string | undefined;
|
|
83
|
+
doc_number?: string | undefined;
|
|
84
|
+
adjustment?: boolean | undefined;
|
|
85
|
+
}>;
|
|
86
|
+
declare const DeleteJournalEntryInputSchema: z.ZodObject<{
|
|
87
|
+
journal_entry_id: z.ZodString;
|
|
88
|
+
sync_token: z.ZodString;
|
|
89
|
+
}, "strict", z.ZodTypeAny, {
|
|
90
|
+
sync_token: string;
|
|
91
|
+
journal_entry_id: string;
|
|
92
|
+
}, {
|
|
93
|
+
sync_token: string;
|
|
94
|
+
journal_entry_id: string;
|
|
95
|
+
}>;
|
|
96
|
+
export type ListJournalEntriesInput = z.infer<typeof ListJournalEntriesInputSchema>;
|
|
97
|
+
export type GetJournalEntryInput = z.infer<typeof GetJournalEntryInputSchema>;
|
|
98
|
+
export type CreateJournalEntryInput = z.infer<typeof CreateJournalEntryInputSchema>;
|
|
99
|
+
export type DeleteJournalEntryInput = z.infer<typeof DeleteJournalEntryInputSchema>;
|
|
100
|
+
export declare function qbo_list_journal_entries(client: QBOClient, input: ListJournalEntriesInput): Promise<string>;
|
|
101
|
+
export declare function qbo_get_journal_entry(client: QBOClient, input: GetJournalEntryInput): Promise<string>;
|
|
102
|
+
export declare function qbo_create_journal_entry(client: QBOClient, input: CreateJournalEntryInput): Promise<string>;
|
|
103
|
+
export declare function qbo_delete_journal_entry(client: QBOClient, input: DeleteJournalEntryInput): Promise<string>;
|
|
104
|
+
export declare const ListJournalEntriesInputSchemaExport: z.ZodObject<{
|
|
105
|
+
where: z.ZodOptional<z.ZodString>;
|
|
106
|
+
order_by: z.ZodOptional<z.ZodString>;
|
|
107
|
+
start_position: z.ZodOptional<z.ZodNumber>;
|
|
108
|
+
max_results: z.ZodOptional<z.ZodNumber>;
|
|
109
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
110
|
+
}, "strict", z.ZodTypeAny, {
|
|
111
|
+
response_format: "json" | "markdown";
|
|
112
|
+
where?: string | undefined;
|
|
113
|
+
order_by?: string | undefined;
|
|
114
|
+
start_position?: number | undefined;
|
|
115
|
+
max_results?: number | undefined;
|
|
116
|
+
}, {
|
|
117
|
+
response_format?: "json" | "markdown" | undefined;
|
|
118
|
+
where?: string | undefined;
|
|
119
|
+
order_by?: string | undefined;
|
|
120
|
+
start_position?: number | undefined;
|
|
121
|
+
max_results?: number | undefined;
|
|
122
|
+
}>;
|
|
123
|
+
export declare const GetJournalEntryInputSchemaExport: z.ZodObject<{
|
|
124
|
+
journal_entry_id: z.ZodString;
|
|
125
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
126
|
+
}, "strict", z.ZodTypeAny, {
|
|
127
|
+
response_format: "json" | "markdown";
|
|
128
|
+
journal_entry_id: string;
|
|
129
|
+
}, {
|
|
130
|
+
journal_entry_id: string;
|
|
131
|
+
response_format?: "json" | "markdown" | undefined;
|
|
132
|
+
}>;
|
|
133
|
+
export declare const CreateJournalEntryInputSchemaExport: z.ZodObject<{
|
|
134
|
+
lines: z.ZodArray<z.ZodObject<{
|
|
135
|
+
posting_type: z.ZodEnum<["Debit", "Credit"]>;
|
|
136
|
+
account_id: z.ZodString;
|
|
137
|
+
amount: z.ZodNumber;
|
|
138
|
+
description: z.ZodOptional<z.ZodString>;
|
|
139
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
140
|
+
entity_type: z.ZodOptional<z.ZodEnum<["Customer", "Vendor", "Employee"]>>;
|
|
141
|
+
}, "strip", z.ZodTypeAny, {
|
|
142
|
+
amount: number;
|
|
143
|
+
account_id: string;
|
|
144
|
+
posting_type: "Debit" | "Credit";
|
|
145
|
+
description?: string | undefined;
|
|
146
|
+
entity_id?: string | undefined;
|
|
147
|
+
entity_type?: "Employee" | "Vendor" | "Customer" | undefined;
|
|
148
|
+
}, {
|
|
149
|
+
amount: number;
|
|
150
|
+
account_id: string;
|
|
151
|
+
posting_type: "Debit" | "Credit";
|
|
152
|
+
description?: string | undefined;
|
|
153
|
+
entity_id?: string | undefined;
|
|
154
|
+
entity_type?: "Employee" | "Vendor" | "Customer" | undefined;
|
|
155
|
+
}>, "many">;
|
|
156
|
+
txn_date: z.ZodOptional<z.ZodString>;
|
|
157
|
+
doc_number: z.ZodOptional<z.ZodString>;
|
|
158
|
+
adjustment: z.ZodOptional<z.ZodBoolean>;
|
|
159
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
160
|
+
}, "strict", z.ZodTypeAny, {
|
|
161
|
+
response_format: "json" | "markdown";
|
|
162
|
+
lines: {
|
|
163
|
+
amount: number;
|
|
164
|
+
account_id: string;
|
|
165
|
+
posting_type: "Debit" | "Credit";
|
|
166
|
+
description?: string | undefined;
|
|
167
|
+
entity_id?: string | undefined;
|
|
168
|
+
entity_type?: "Employee" | "Vendor" | "Customer" | undefined;
|
|
169
|
+
}[];
|
|
170
|
+
txn_date?: string | undefined;
|
|
171
|
+
doc_number?: string | undefined;
|
|
172
|
+
adjustment?: boolean | undefined;
|
|
173
|
+
}, {
|
|
174
|
+
lines: {
|
|
175
|
+
amount: number;
|
|
176
|
+
account_id: string;
|
|
177
|
+
posting_type: "Debit" | "Credit";
|
|
178
|
+
description?: string | undefined;
|
|
179
|
+
entity_id?: string | undefined;
|
|
180
|
+
entity_type?: "Employee" | "Vendor" | "Customer" | undefined;
|
|
181
|
+
}[];
|
|
182
|
+
response_format?: "json" | "markdown" | undefined;
|
|
183
|
+
txn_date?: string | undefined;
|
|
184
|
+
doc_number?: string | undefined;
|
|
185
|
+
adjustment?: boolean | undefined;
|
|
186
|
+
}>;
|
|
187
|
+
export declare const DeleteJournalEntryInputSchemaExport: z.ZodObject<{
|
|
188
|
+
journal_entry_id: z.ZodString;
|
|
189
|
+
sync_token: z.ZodString;
|
|
190
|
+
}, "strict", z.ZodTypeAny, {
|
|
191
|
+
sync_token: string;
|
|
192
|
+
journal_entry_id: string;
|
|
193
|
+
}, {
|
|
194
|
+
sync_token: string;
|
|
195
|
+
journal_entry_id: string;
|
|
196
|
+
}>;
|
|
197
|
+
export {};
|
|
198
|
+
//# sourceMappingURL=journal-entries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journal-entries.d.ts","sourceRoot":"","sources":["../../src/tools/journal-entries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAYzC,QAAA,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;EAMxB,CAAC;AAEZ,QAAA,MAAM,0BAA0B;;;;;;;;;EAGrB,CAAC;AAEZ,QAAA,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMxB,CAAC;AAEZ,QAAA,MAAM,6BAA6B;;;;;;;;;EAGxB,CAAC;AAEZ,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACpF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACpF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAuBpF,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,uBAAuB,GAC7B,OAAO,CAAC,MAAM,CAAC,CAuBjB;AAED,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,oBAAoB,GAC1B,OAAO,CAAC,MAAM,CAAC,CASjB;AAED,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,uB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