@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,117 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const ProfitAndLossInputSchema = z.object({
|
|
3
|
+
start_date: z.string().optional().describe("Start date (YYYY-MM-DD)"),
|
|
4
|
+
end_date: z.string().optional().describe("End date (YYYY-MM-DD)"),
|
|
5
|
+
date_macro: z.string().optional().describe("Predefined date range: Today, This Month, This Quarter, This Year, Last Month, Last Quarter, Last Year"),
|
|
6
|
+
accounting_method: z.enum(["Cash", "Accrual"]).optional(),
|
|
7
|
+
summarize_column_by: z.string().optional().describe("Grouping: Total, Month, Week, Quarter, Year, Customers, Vendors"),
|
|
8
|
+
customer: z.string().optional().describe("Filter by customer ID"),
|
|
9
|
+
department: z.string().optional().describe("Filter by department ID"),
|
|
10
|
+
response_format: z.enum(["json", "markdown"]).default("markdown"),
|
|
11
|
+
}).strict();
|
|
12
|
+
const BalanceSheetInputSchema = z.object({
|
|
13
|
+
start_date: z.string().optional(),
|
|
14
|
+
end_date: z.string().optional(),
|
|
15
|
+
date_macro: z.string().optional(),
|
|
16
|
+
accounting_method: z.enum(["Cash", "Accrual"]).optional(),
|
|
17
|
+
summarize_column_by: z.string().optional(),
|
|
18
|
+
response_format: z.enum(["json", "markdown"]).default("markdown"),
|
|
19
|
+
}).strict();
|
|
20
|
+
const GeneralReportInputSchema = z.object({
|
|
21
|
+
report_name: z.string().describe("Report name: ProfitAndLoss, ProfitAndLossDetail, BalanceSheet, GeneralLedger, CustomerBalance, CustomerBalanceDetail, VendorBalance, VendorExpenses, InventoryValuationSummary, ItemSales"),
|
|
22
|
+
start_date: z.string().optional(),
|
|
23
|
+
end_date: z.string().optional(),
|
|
24
|
+
date_macro: z.string().optional(),
|
|
25
|
+
accounting_method: z.enum(["Cash", "Accrual"]).optional(),
|
|
26
|
+
summarize_column_by: z.string().optional(),
|
|
27
|
+
customer: z.string().optional(),
|
|
28
|
+
vendor: z.string().optional(),
|
|
29
|
+
department: z.string().optional(),
|
|
30
|
+
response_format: z.enum(["json", "markdown"]).default("markdown"),
|
|
31
|
+
}).strict();
|
|
32
|
+
function formatReport(report) {
|
|
33
|
+
let result = "";
|
|
34
|
+
if (report.Header) {
|
|
35
|
+
result += `## ${report.Header.ReportName || "Report"}\n`;
|
|
36
|
+
if (report.Header.StartPeriod)
|
|
37
|
+
result += `- **Period:** ${report.Header.StartPeriod} to ${report.Header.EndPeriod}\n`;
|
|
38
|
+
if (report.Header.Currency)
|
|
39
|
+
result += `- **Currency:** ${report.Header.Currency}\n`;
|
|
40
|
+
result += "\n";
|
|
41
|
+
}
|
|
42
|
+
if (report.Columns?.Column) {
|
|
43
|
+
result += "| " + report.Columns.Column.map(c => c.ColTitle || "").join(" | ") + " |\n";
|
|
44
|
+
result += "| " + report.Columns.Column.map(() => "---").join(" | ") + " |\n";
|
|
45
|
+
}
|
|
46
|
+
if (report.Rows?.Row) {
|
|
47
|
+
result += formatRows(report.Rows.Row);
|
|
48
|
+
}
|
|
49
|
+
return result;
|
|
50
|
+
}
|
|
51
|
+
function formatRows(rows, depth = 0) {
|
|
52
|
+
let result = "";
|
|
53
|
+
const indent = " ".repeat(depth);
|
|
54
|
+
for (const row of rows) {
|
|
55
|
+
if (row.Header?.ColData) {
|
|
56
|
+
result += `${indent}**${row.Header.ColData.map(c => c.value || "").join(" | ")}**\n`;
|
|
57
|
+
}
|
|
58
|
+
if (row.ColData) {
|
|
59
|
+
result += `| ${row.ColData.map(c => c.value || "").join(" | ")} |\n`;
|
|
60
|
+
}
|
|
61
|
+
if (row.Rows?.Row) {
|
|
62
|
+
result += formatRows(row.Rows.Row, depth + 1);
|
|
63
|
+
}
|
|
64
|
+
if (row.Summary?.ColData) {
|
|
65
|
+
result += `${indent}**${row.Summary.ColData.map(c => c.value || "").join(" | ")}**\n`;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return result;
|
|
69
|
+
}
|
|
70
|
+
function buildReportParams(input) {
|
|
71
|
+
const params = {};
|
|
72
|
+
if (input.start_date)
|
|
73
|
+
params.start_date = String(input.start_date);
|
|
74
|
+
if (input.end_date)
|
|
75
|
+
params.end_date = String(input.end_date);
|
|
76
|
+
if (input.date_macro)
|
|
77
|
+
params.date_macro = String(input.date_macro);
|
|
78
|
+
if (input.accounting_method)
|
|
79
|
+
params.accounting_method = String(input.accounting_method);
|
|
80
|
+
if (input.summarize_column_by)
|
|
81
|
+
params.summarize_column_by = String(input.summarize_column_by);
|
|
82
|
+
if (input.customer)
|
|
83
|
+
params.customer = String(input.customer);
|
|
84
|
+
if (input.vendor)
|
|
85
|
+
params.vendor = String(input.vendor);
|
|
86
|
+
if (input.department)
|
|
87
|
+
params.department = String(input.department);
|
|
88
|
+
return params;
|
|
89
|
+
}
|
|
90
|
+
export async function qbo_profit_and_loss(client, input) {
|
|
91
|
+
const params = buildReportParams(input);
|
|
92
|
+
const response = await client.getReport("ProfitAndLoss", params);
|
|
93
|
+
if (input.response_format === "json") {
|
|
94
|
+
return JSON.stringify(response, null, 2);
|
|
95
|
+
}
|
|
96
|
+
return `# Profit & Loss Report\n\n` + formatReport(response);
|
|
97
|
+
}
|
|
98
|
+
export async function qbo_balance_sheet(client, input) {
|
|
99
|
+
const params = buildReportParams(input);
|
|
100
|
+
const response = await client.getReport("BalanceSheet", params);
|
|
101
|
+
if (input.response_format === "json") {
|
|
102
|
+
return JSON.stringify(response, null, 2);
|
|
103
|
+
}
|
|
104
|
+
return `# Balance Sheet Report\n\n` + formatReport(response);
|
|
105
|
+
}
|
|
106
|
+
export async function qbo_report(client, input) {
|
|
107
|
+
const params = buildReportParams(input);
|
|
108
|
+
const response = await client.getReport(input.report_name, params);
|
|
109
|
+
if (input.response_format === "json") {
|
|
110
|
+
return JSON.stringify(response, null, 2);
|
|
111
|
+
}
|
|
112
|
+
return `# ${input.report_name} Report\n\n` + formatReport(response);
|
|
113
|
+
}
|
|
114
|
+
export const ProfitAndLossInputSchemaExport = ProfitAndLossInputSchema;
|
|
115
|
+
export const BalanceSheetInputSchemaExport = BalanceSheetInputSchema;
|
|
116
|
+
export const GeneralReportInputSchemaExport = GeneralReportInputSchema;
|
|
117
|
+
//# sourceMappingURL=reports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reports.js","sourceRoot":"","sources":["../../src/tools/reports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA4BxB,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,UAAU,EAAE,CAA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D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,MAAiB,EACjB,KAAyB;IAEzB,MAAM,MAAM,GAAG,iBAAiB,CAAC,KAA2C,CAAC,CAAC;IAC9E,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,SAAS,CAAiB,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAEnF,IAAI,KAAK,CAAC,eAAe,KAAK,MAAM,EAAE,CAAC;QACrC,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,KAAK,KAAK,CAAC,WAAW,aAAa,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;AACtE,CAAC;AAED,MAAM,CAAC,MAAM,8BAA8B,GAAG,wBAAwB,CAAC;AACvE,MAAM,CAAC,MAAM,6BAA6B,GAAG,uBAAuB,CAAC;AACrE,MAAM,CAAC,MAAM,8BAA8B,GAAG,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { QBOClient } from "../client.js";
|
|
3
|
+
declare const ListTaxRatesInputSchema: z.ZodObject<{
|
|
4
|
+
where: z.ZodOptional<z.ZodString>;
|
|
5
|
+
start_position: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
max_results: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
8
|
+
}, "strict", z.ZodTypeAny, {
|
|
9
|
+
response_format: "json" | "markdown";
|
|
10
|
+
where?: string | undefined;
|
|
11
|
+
start_position?: number | undefined;
|
|
12
|
+
max_results?: number | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
response_format?: "json" | "markdown" | undefined;
|
|
15
|
+
where?: string | undefined;
|
|
16
|
+
start_position?: number | undefined;
|
|
17
|
+
max_results?: number | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
declare const GetTaxRateInputSchema: z.ZodObject<{
|
|
20
|
+
tax_rate_id: z.ZodString;
|
|
21
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
22
|
+
}, "strict", z.ZodTypeAny, {
|
|
23
|
+
response_format: "json" | "markdown";
|
|
24
|
+
tax_rate_id: string;
|
|
25
|
+
}, {
|
|
26
|
+
tax_rate_id: string;
|
|
27
|
+
response_format?: "json" | "markdown" | undefined;
|
|
28
|
+
}>;
|
|
29
|
+
declare const ListTaxCodesInputSchema: z.ZodObject<{
|
|
30
|
+
where: z.ZodOptional<z.ZodString>;
|
|
31
|
+
start_position: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
max_results: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
34
|
+
}, "strict", z.ZodTypeAny, {
|
|
35
|
+
response_format: "json" | "markdown";
|
|
36
|
+
where?: string | undefined;
|
|
37
|
+
start_position?: number | undefined;
|
|
38
|
+
max_results?: number | undefined;
|
|
39
|
+
}, {
|
|
40
|
+
response_format?: "json" | "markdown" | undefined;
|
|
41
|
+
where?: string | undefined;
|
|
42
|
+
start_position?: number | undefined;
|
|
43
|
+
max_results?: number | undefined;
|
|
44
|
+
}>;
|
|
45
|
+
declare const GetTaxCodeInputSchema: z.ZodObject<{
|
|
46
|
+
tax_code_id: z.ZodString;
|
|
47
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
48
|
+
}, "strict", z.ZodTypeAny, {
|
|
49
|
+
response_format: "json" | "markdown";
|
|
50
|
+
tax_code_id: string;
|
|
51
|
+
}, {
|
|
52
|
+
tax_code_id: string;
|
|
53
|
+
response_format?: "json" | "markdown" | undefined;
|
|
54
|
+
}>;
|
|
55
|
+
export type ListTaxRatesInput = z.infer<typeof ListTaxRatesInputSchema>;
|
|
56
|
+
export type GetTaxRateInput = z.infer<typeof GetTaxRateInputSchema>;
|
|
57
|
+
export type ListTaxCodesInput = z.infer<typeof ListTaxCodesInputSchema>;
|
|
58
|
+
export type GetTaxCodeInput = z.infer<typeof GetTaxCodeInputSchema>;
|
|
59
|
+
export declare function qbo_list_tax_rates(client: QBOClient, input: ListTaxRatesInput): Promise<string>;
|
|
60
|
+
export declare function qbo_get_tax_rate(client: QBOClient, input: GetTaxRateInput): Promise<string>;
|
|
61
|
+
export declare function qbo_list_tax_codes(client: QBOClient, input: ListTaxCodesInput): Promise<string>;
|
|
62
|
+
export declare function qbo_get_tax_code(client: QBOClient, input: GetTaxCodeInput): Promise<string>;
|
|
63
|
+
export declare const ListTaxRatesInputSchemaExport: z.ZodObject<{
|
|
64
|
+
where: z.ZodOptional<z.ZodString>;
|
|
65
|
+
start_position: z.ZodOptional<z.ZodNumber>;
|
|
66
|
+
max_results: z.ZodOptional<z.ZodNumber>;
|
|
67
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
68
|
+
}, "strict", z.ZodTypeAny, {
|
|
69
|
+
response_format: "json" | "markdown";
|
|
70
|
+
where?: string | undefined;
|
|
71
|
+
start_position?: number | undefined;
|
|
72
|
+
max_results?: number | undefined;
|
|
73
|
+
}, {
|
|
74
|
+
response_format?: "json" | "markdown" | undefined;
|
|
75
|
+
where?: string | undefined;
|
|
76
|
+
start_position?: number | undefined;
|
|
77
|
+
max_results?: number | undefined;
|
|
78
|
+
}>;
|
|
79
|
+
export declare const GetTaxRateInputSchemaExport: z.ZodObject<{
|
|
80
|
+
tax_rate_id: z.ZodString;
|
|
81
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
82
|
+
}, "strict", z.ZodTypeAny, {
|
|
83
|
+
response_format: "json" | "markdown";
|
|
84
|
+
tax_rate_id: string;
|
|
85
|
+
}, {
|
|
86
|
+
tax_rate_id: string;
|
|
87
|
+
response_format?: "json" | "markdown" | undefined;
|
|
88
|
+
}>;
|
|
89
|
+
export declare const ListTaxCodesInputSchemaExport: z.ZodObject<{
|
|
90
|
+
where: z.ZodOptional<z.ZodString>;
|
|
91
|
+
start_position: z.ZodOptional<z.ZodNumber>;
|
|
92
|
+
max_results: z.ZodOptional<z.ZodNumber>;
|
|
93
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
94
|
+
}, "strict", z.ZodTypeAny, {
|
|
95
|
+
response_format: "json" | "markdown";
|
|
96
|
+
where?: string | undefined;
|
|
97
|
+
start_position?: number | undefined;
|
|
98
|
+
max_results?: number | undefined;
|
|
99
|
+
}, {
|
|
100
|
+
response_format?: "json" | "markdown" | undefined;
|
|
101
|
+
where?: string | undefined;
|
|
102
|
+
start_position?: number | undefined;
|
|
103
|
+
max_results?: number | undefined;
|
|
104
|
+
}>;
|
|
105
|
+
export declare const GetTaxCodeInputSchemaExport: z.ZodObject<{
|
|
106
|
+
tax_code_id: z.ZodString;
|
|
107
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
108
|
+
}, "strict", z.ZodTypeAny, {
|
|
109
|
+
response_format: "json" | "markdown";
|
|
110
|
+
tax_code_id: string;
|
|
111
|
+
}, {
|
|
112
|
+
tax_code_id: string;
|
|
113
|
+
response_format?: "json" | "markdown" | undefined;
|
|
114
|
+
}>;
|
|
115
|
+
export {};
|
|
116
|
+
//# sourceMappingURL=tax.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tax.d.ts","sourceRoot":"","sources":["../../src/tools/tax.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;EAKlB,CAAC;AAEZ,QAAA,MAAM,qBAAqB;;;;;;;;;EAGhB,CAAC;AAEZ,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;EAKlB,CAAC;AAEZ,QAAA,MAAM,qBAAqB;;;;;;;;;EAGhB,CAAC;AAEZ,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAqBpE,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,iBAAiB,GACvB,OAAO,CAAC,MAAM,CAAC,CAsBjB;AAED,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,eAAe,GACrB,OAAO,CAAC,MAAM,CAAC,CASjB;AAED,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,iBAAiB,GACvB,OAAO,CAAC,MAAM,CAAC,CAsBjB;AAED,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,eAAe,GACrB,OAAO,CAAC,MAAM,CAAC,CASjB;AAED,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;EAA0B,CAAC;AACrE,eAAO,MAAM,2BAA2B;;;;;;;;;EAAwB,CAAC;AACjE,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;EAA0B,CAAC;AACrE,eAAO,MAAM,2BAA2B;;;;;;;;;EAAwB,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const ListTaxRatesInputSchema = z.object({
|
|
3
|
+
where: z.string().optional(),
|
|
4
|
+
start_position: z.number().optional(),
|
|
5
|
+
max_results: z.number().optional(),
|
|
6
|
+
response_format: z.enum(["json", "markdown"]).default("markdown"),
|
|
7
|
+
}).strict();
|
|
8
|
+
const GetTaxRateInputSchema = z.object({
|
|
9
|
+
tax_rate_id: z.string().describe("The tax rate ID"),
|
|
10
|
+
response_format: z.enum(["json", "markdown"]).default("markdown"),
|
|
11
|
+
}).strict();
|
|
12
|
+
const ListTaxCodesInputSchema = z.object({
|
|
13
|
+
where: z.string().optional(),
|
|
14
|
+
start_position: z.number().optional(),
|
|
15
|
+
max_results: z.number().optional(),
|
|
16
|
+
response_format: z.enum(["json", "markdown"]).default("markdown"),
|
|
17
|
+
}).strict();
|
|
18
|
+
const GetTaxCodeInputSchema = z.object({
|
|
19
|
+
tax_code_id: z.string().describe("The tax code ID"),
|
|
20
|
+
response_format: z.enum(["json", "markdown"]).default("markdown"),
|
|
21
|
+
}).strict();
|
|
22
|
+
function formatTaxRate(t) {
|
|
23
|
+
let result = `## ${t.Name || "Unknown"}\n`;
|
|
24
|
+
if (t.Id)
|
|
25
|
+
result += `- **ID:** ${t.Id}\n`;
|
|
26
|
+
if (t.Description)
|
|
27
|
+
result += `- **Description:** ${t.Description}\n`;
|
|
28
|
+
if (t.RateValue !== undefined)
|
|
29
|
+
result += `- **Rate:** ${t.RateValue}%\n`;
|
|
30
|
+
if (t.Active !== undefined)
|
|
31
|
+
result += `- **Active:** ${t.Active}\n`;
|
|
32
|
+
if (t.AgencyRef)
|
|
33
|
+
result += `- **Agency:** ${t.AgencyRef.name || t.AgencyRef.value}\n`;
|
|
34
|
+
return result;
|
|
35
|
+
}
|
|
36
|
+
function formatTaxCode(t) {
|
|
37
|
+
let result = `## ${t.Name || "Unknown"}\n`;
|
|
38
|
+
if (t.Id)
|
|
39
|
+
result += `- **ID:** ${t.Id}\n`;
|
|
40
|
+
if (t.Description)
|
|
41
|
+
result += `- **Description:** ${t.Description}\n`;
|
|
42
|
+
if (t.Active !== undefined)
|
|
43
|
+
result += `- **Active:** ${t.Active}\n`;
|
|
44
|
+
if (t.Taxable !== undefined)
|
|
45
|
+
result += `- **Taxable:** ${t.Taxable}\n`;
|
|
46
|
+
return result;
|
|
47
|
+
}
|
|
48
|
+
export async function qbo_list_tax_rates(client, input) {
|
|
49
|
+
let query = "SELECT * FROM TaxRate";
|
|
50
|
+
if (input.where)
|
|
51
|
+
query += ` WHERE ${input.where}`;
|
|
52
|
+
query += ` STARTPOSITION ${input.start_position || 1}`;
|
|
53
|
+
query += ` MAXRESULTS ${input.max_results || 100}`;
|
|
54
|
+
const response = await client.query(query);
|
|
55
|
+
const rates = response.QueryResponse.TaxRate || [];
|
|
56
|
+
if (input.response_format === "json") {
|
|
57
|
+
return JSON.stringify({ tax_rates: rates, total: response.QueryResponse.totalCount }, null, 2);
|
|
58
|
+
}
|
|
59
|
+
let result = `# Tax Rates (${rates.length} results)\n\n`;
|
|
60
|
+
if (rates.length === 0) {
|
|
61
|
+
result += "No tax rates found.";
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
for (const t of rates) {
|
|
65
|
+
result += formatTaxRate(t) + "\n";
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return result;
|
|
69
|
+
}
|
|
70
|
+
export async function qbo_get_tax_rate(client, input) {
|
|
71
|
+
const response = await client.get(`/taxrate/${input.tax_rate_id}`);
|
|
72
|
+
const t = response.TaxRate;
|
|
73
|
+
if (input.response_format === "json") {
|
|
74
|
+
return JSON.stringify(t, null, 2);
|
|
75
|
+
}
|
|
76
|
+
return `# Tax Rate\n\n` + formatTaxRate(t);
|
|
77
|
+
}
|
|
78
|
+
export async function qbo_list_tax_codes(client, input) {
|
|
79
|
+
let query = "SELECT * FROM TaxCode";
|
|
80
|
+
if (input.where)
|
|
81
|
+
query += ` WHERE ${input.where}`;
|
|
82
|
+
query += ` STARTPOSITION ${input.start_position || 1}`;
|
|
83
|
+
query += ` MAXRESULTS ${input.max_results || 100}`;
|
|
84
|
+
const response = await client.query(query);
|
|
85
|
+
const codes = response.QueryResponse.TaxCode || [];
|
|
86
|
+
if (input.response_format === "json") {
|
|
87
|
+
return JSON.stringify({ tax_codes: codes, total: response.QueryResponse.totalCount }, null, 2);
|
|
88
|
+
}
|
|
89
|
+
let result = `# Tax Codes (${codes.length} results)\n\n`;
|
|
90
|
+
if (codes.length === 0) {
|
|
91
|
+
result += "No tax codes found.";
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
for (const t of codes) {
|
|
95
|
+
result += formatTaxCode(t) + "\n";
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return result;
|
|
99
|
+
}
|
|
100
|
+
export async function qbo_get_tax_code(client, input) {
|
|
101
|
+
const response = await client.get(`/taxcode/${input.tax_code_id}`);
|
|
102
|
+
const t = response.TaxCode;
|
|
103
|
+
if (input.response_format === "json") {
|
|
104
|
+
return JSON.stringify(t, null, 2);
|
|
105
|
+
}
|
|
106
|
+
return `# Tax Code\n\n` + formatTaxCode(t);
|
|
107
|
+
}
|
|
108
|
+
export const ListTaxRatesInputSchemaExport = ListTaxRatesInputSchema;
|
|
109
|
+
export const GetTaxRateInputSchemaExport = GetTaxRateInputSchema;
|
|
110
|
+
export const ListTaxCodesInputSchemaExport = ListTaxCodesInputSchema;
|
|
111
|
+
export const GetTaxCodeInputSchemaExport = GetTaxCodeInputSchema;
|
|
112
|
+
//# sourceMappingURL=tax.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tax.js","sourceRoot":"","sources":["../../src/tools/tax.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,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,CA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CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACpC,CAAC;IAED,OAAO,gBAAgB,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,CAAC,MAAM,6BAA6B,GAAG,uBAAuB,CAAC;AACrE,MAAM,CAAC,MAAM,2BAA2B,GAAG,qBAAqB,CAAC;AACjE,MAAM,CAAC,MAAM,6BAA6B,GAAG,uBAAuB,CAAC;AACrE,MAAM,CAAC,MAAM,2BAA2B,GAAG,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { QBOClient } from "../client.js";
|
|
3
|
+
declare const ListTimeActivitiesInputSchema: 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 GetTimeActivityInputSchema: z.ZodObject<{
|
|
23
|
+
time_activity_id: z.ZodString;
|
|
24
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
25
|
+
}, "strict", z.ZodTypeAny, {
|
|
26
|
+
response_format: "json" | "markdown";
|
|
27
|
+
time_activity_id: string;
|
|
28
|
+
}, {
|
|
29
|
+
time_activity_id: string;
|
|
30
|
+
response_format?: "json" | "markdown" | undefined;
|
|
31
|
+
}>;
|
|
32
|
+
declare const CreateTimeActivityInputSchema: z.ZodObject<{
|
|
33
|
+
name_of: z.ZodEnum<["Employee", "Vendor"]>;
|
|
34
|
+
employee_id: z.ZodOptional<z.ZodString>;
|
|
35
|
+
vendor_id: z.ZodOptional<z.ZodString>;
|
|
36
|
+
customer_id: z.ZodOptional<z.ZodString>;
|
|
37
|
+
item_id: z.ZodOptional<z.ZodString>;
|
|
38
|
+
txn_date: z.ZodString;
|
|
39
|
+
hours: z.ZodOptional<z.ZodNumber>;
|
|
40
|
+
minutes: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
description: z.ZodOptional<z.ZodString>;
|
|
42
|
+
billable: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
+
hourly_rate: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
45
|
+
}, "strict", z.ZodTypeAny, {
|
|
46
|
+
response_format: "json" | "markdown";
|
|
47
|
+
txn_date: string;
|
|
48
|
+
name_of: "Employee" | "Vendor";
|
|
49
|
+
customer_id?: string | undefined;
|
|
50
|
+
description?: string | undefined;
|
|
51
|
+
item_id?: string | undefined;
|
|
52
|
+
vendor_id?: string | undefined;
|
|
53
|
+
employee_id?: string | undefined;
|
|
54
|
+
hours?: number | undefined;
|
|
55
|
+
minutes?: number | undefined;
|
|
56
|
+
billable?: boolean | undefined;
|
|
57
|
+
hourly_rate?: number | undefined;
|
|
58
|
+
}, {
|
|
59
|
+
txn_date: string;
|
|
60
|
+
name_of: "Employee" | "Vendor";
|
|
61
|
+
response_format?: "json" | "markdown" | undefined;
|
|
62
|
+
customer_id?: string | undefined;
|
|
63
|
+
description?: string | undefined;
|
|
64
|
+
item_id?: string | undefined;
|
|
65
|
+
vendor_id?: string | undefined;
|
|
66
|
+
employee_id?: string | undefined;
|
|
67
|
+
hours?: number | undefined;
|
|
68
|
+
minutes?: number | undefined;
|
|
69
|
+
billable?: boolean | undefined;
|
|
70
|
+
hourly_rate?: number | undefined;
|
|
71
|
+
}>;
|
|
72
|
+
declare const UpdateTimeActivityInputSchema: z.ZodObject<{
|
|
73
|
+
time_activity_id: z.ZodString;
|
|
74
|
+
sync_token: z.ZodString;
|
|
75
|
+
hours: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
minutes: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
description: z.ZodOptional<z.ZodString>;
|
|
78
|
+
billable: z.ZodOptional<z.ZodBoolean>;
|
|
79
|
+
hourly_rate: z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
81
|
+
}, "strict", z.ZodTypeAny, {
|
|
82
|
+
response_format: "json" | "markdown";
|
|
83
|
+
sync_token: string;
|
|
84
|
+
time_activity_id: string;
|
|
85
|
+
description?: string | undefined;
|
|
86
|
+
hours?: number | undefined;
|
|
87
|
+
minutes?: number | undefined;
|
|
88
|
+
billable?: boolean | undefined;
|
|
89
|
+
hourly_rate?: number | undefined;
|
|
90
|
+
}, {
|
|
91
|
+
sync_token: string;
|
|
92
|
+
time_activity_id: string;
|
|
93
|
+
response_format?: "json" | "markdown" | undefined;
|
|
94
|
+
description?: string | undefined;
|
|
95
|
+
hours?: number | undefined;
|
|
96
|
+
minutes?: number | undefined;
|
|
97
|
+
billable?: boolean | undefined;
|
|
98
|
+
hourly_rate?: number | undefined;
|
|
99
|
+
}>;
|
|
100
|
+
declare const DeleteTimeActivityInputSchema: z.ZodObject<{
|
|
101
|
+
time_activity_id: z.ZodString;
|
|
102
|
+
sync_token: z.ZodString;
|
|
103
|
+
}, "strict", z.ZodTypeAny, {
|
|
104
|
+
sync_token: string;
|
|
105
|
+
time_activity_id: string;
|
|
106
|
+
}, {
|
|
107
|
+
sync_token: string;
|
|
108
|
+
time_activity_id: string;
|
|
109
|
+
}>;
|
|
110
|
+
export type ListTimeActivitiesInput = z.infer<typeof ListTimeActivitiesInputSchema>;
|
|
111
|
+
export type GetTimeActivityInput = z.infer<typeof GetTimeActivityInputSchema>;
|
|
112
|
+
export type CreateTimeActivityInput = z.infer<typeof CreateTimeActivityInputSchema>;
|
|
113
|
+
export type UpdateTimeActivityInput = z.infer<typeof UpdateTimeActivityInputSchema>;
|
|
114
|
+
export type DeleteTimeActivityInput = z.infer<typeof DeleteTimeActivityInputSchema>;
|
|
115
|
+
export declare function qbo_list_time_activities(client: QBOClient, input: ListTimeActivitiesInput): Promise<string>;
|
|
116
|
+
export declare function qbo_get_time_activity(client: QBOClient, input: GetTimeActivityInput): Promise<string>;
|
|
117
|
+
export declare function qbo_create_time_activity(client: QBOClient, input: CreateTimeActivityInput): Promise<string>;
|
|
118
|
+
export declare function qbo_update_time_activity(client: QBOClient, input: UpdateTimeActivityInput): Promise<string>;
|
|
119
|
+
export declare function qbo_delete_time_activity(client: QBOClient, input: DeleteTimeActivityInput): Promise<string>;
|
|
120
|
+
export declare const ListTimeActivitiesInputSchemaExport: z.ZodObject<{
|
|
121
|
+
where: z.ZodOptional<z.ZodString>;
|
|
122
|
+
order_by: z.ZodOptional<z.ZodString>;
|
|
123
|
+
start_position: z.ZodOptional<z.ZodNumber>;
|
|
124
|
+
max_results: z.ZodOptional<z.ZodNumber>;
|
|
125
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
126
|
+
}, "strict", z.ZodTypeAny, {
|
|
127
|
+
response_format: "json" | "markdown";
|
|
128
|
+
where?: string | undefined;
|
|
129
|
+
order_by?: string | undefined;
|
|
130
|
+
start_position?: number | undefined;
|
|
131
|
+
max_results?: number | undefined;
|
|
132
|
+
}, {
|
|
133
|
+
response_format?: "json" | "markdown" | undefined;
|
|
134
|
+
where?: string | undefined;
|
|
135
|
+
order_by?: string | undefined;
|
|
136
|
+
start_position?: number | undefined;
|
|
137
|
+
max_results?: number | undefined;
|
|
138
|
+
}>;
|
|
139
|
+
export declare const GetTimeActivityInputSchemaExport: z.ZodObject<{
|
|
140
|
+
time_activity_id: z.ZodString;
|
|
141
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
142
|
+
}, "strict", z.ZodTypeAny, {
|
|
143
|
+
response_format: "json" | "markdown";
|
|
144
|
+
time_activity_id: string;
|
|
145
|
+
}, {
|
|
146
|
+
time_activity_id: string;
|
|
147
|
+
response_format?: "json" | "markdown" | undefined;
|
|
148
|
+
}>;
|
|
149
|
+
export declare const CreateTimeActivityInputSchemaExport: z.ZodObject<{
|
|
150
|
+
name_of: z.ZodEnum<["Employee", "Vendor"]>;
|
|
151
|
+
employee_id: z.ZodOptional<z.ZodString>;
|
|
152
|
+
vendor_id: z.ZodOptional<z.ZodString>;
|
|
153
|
+
customer_id: z.ZodOptional<z.ZodString>;
|
|
154
|
+
item_id: z.ZodOptional<z.ZodString>;
|
|
155
|
+
txn_date: z.ZodString;
|
|
156
|
+
hours: z.ZodOptional<z.ZodNumber>;
|
|
157
|
+
minutes: z.ZodOptional<z.ZodNumber>;
|
|
158
|
+
description: z.ZodOptional<z.ZodString>;
|
|
159
|
+
billable: z.ZodOptional<z.ZodBoolean>;
|
|
160
|
+
hourly_rate: z.ZodOptional<z.ZodNumber>;
|
|
161
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
162
|
+
}, "strict", z.ZodTypeAny, {
|
|
163
|
+
response_format: "json" | "markdown";
|
|
164
|
+
txn_date: string;
|
|
165
|
+
name_of: "Employee" | "Vendor";
|
|
166
|
+
customer_id?: string | undefined;
|
|
167
|
+
description?: string | undefined;
|
|
168
|
+
item_id?: string | undefined;
|
|
169
|
+
vendor_id?: string | undefined;
|
|
170
|
+
employee_id?: string | undefined;
|
|
171
|
+
hours?: number | undefined;
|
|
172
|
+
minutes?: number | undefined;
|
|
173
|
+
billable?: boolean | undefined;
|
|
174
|
+
hourly_rate?: number | undefined;
|
|
175
|
+
}, {
|
|
176
|
+
txn_date: string;
|
|
177
|
+
name_of: "Employee" | "Vendor";
|
|
178
|
+
response_format?: "json" | "markdown" | undefined;
|
|
179
|
+
customer_id?: string | undefined;
|
|
180
|
+
description?: string | undefined;
|
|
181
|
+
item_id?: string | undefined;
|
|
182
|
+
vendor_id?: string | undefined;
|
|
183
|
+
employee_id?: string | undefined;
|
|
184
|
+
hours?: number | undefined;
|
|
185
|
+
minutes?: number | undefined;
|
|
186
|
+
billable?: boolean | undefined;
|
|
187
|
+
hourly_rate?: number | undefined;
|
|
188
|
+
}>;
|
|
189
|
+
export declare const UpdateTimeActivityInputSchemaExport: z.ZodObject<{
|
|
190
|
+
time_activity_id: z.ZodString;
|
|
191
|
+
sync_token: z.ZodString;
|
|
192
|
+
hours: z.ZodOptional<z.ZodNumber>;
|
|
193
|
+
minutes: z.ZodOptional<z.ZodNumber>;
|
|
194
|
+
description: z.ZodOptional<z.ZodString>;
|
|
195
|
+
billable: z.ZodOptional<z.ZodBoolean>;
|
|
196
|
+
hourly_rate: z.ZodOptional<z.ZodNumber>;
|
|
197
|
+
response_format: z.ZodDefault<z.ZodEnum<["json", "markdown"]>>;
|
|
198
|
+
}, "strict", z.ZodTypeAny, {
|
|
199
|
+
response_format: "json" | "markdown";
|
|
200
|
+
sync_token: string;
|
|
201
|
+
time_activity_id: string;
|
|
202
|
+
description?: string | undefined;
|
|
203
|
+
hours?: number | undefined;
|
|
204
|
+
minutes?: number | undefined;
|
|
205
|
+
billable?: boolean | undefined;
|
|
206
|
+
hourly_rate?: number | undefined;
|
|
207
|
+
}, {
|
|
208
|
+
sync_token: string;
|
|
209
|
+
time_activity_id: string;
|
|
210
|
+
response_format?: "json" | "markdown" | undefined;
|
|
211
|
+
description?: string | undefined;
|
|
212
|
+
hours?: number | undefined;
|
|
213
|
+
minutes?: number | undefined;
|
|
214
|
+
billable?: boolean | undefined;
|
|
215
|
+
hourly_rate?: number | undefined;
|
|
216
|
+
}>;
|
|
217
|
+
export declare const DeleteTimeActivityInputSchemaExport: z.ZodObject<{
|
|
218
|
+
time_activity_id: z.ZodString;
|
|
219
|
+
sync_token: z.ZodString;
|
|
220
|
+
}, "strict", z.ZodTypeAny, {
|
|
221
|
+
sync_token: string;
|
|
222
|
+
time_activity_id: string;
|
|
223
|
+
}, {
|
|
224
|
+
sync_token: string;
|
|
225
|
+
time_activity_id: string;
|
|
226
|
+
}>;
|
|
227
|
+
export {};
|
|
228
|
+
//# sourceMappingURL=time-activities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-activities.d.ts","sourceRoot":"","sources":["../../src/tools/time-activities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,QAAA,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;EAMxB,CAAC;AAEZ,QAAA,MAAM,0BAA0B;;;;;;;;;EAGrB,CAAC;AAEZ,QAAA,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAaxB,CAAC;AAEZ,QAAA,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;EASxB,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;AACpF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,C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