@promptpartner/bexio-mcp-server 2.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/LICENSE +21 -0
- package/README.md +161 -0
- package/dist/bexio-client.d.ts +350 -0
- package/dist/bexio-client.js +1045 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +80 -0
- package/dist/logger.d.ts +17 -0
- package/dist/logger.js +28 -0
- package/dist/server.d.ts +18 -0
- package/dist/server.js +81 -0
- package/dist/shared/errors.d.ts +21 -0
- package/dist/shared/errors.js +54 -0
- package/dist/shared/index.d.ts +5 -0
- package/dist/shared/index.js +5 -0
- package/dist/shared/response.d.ts +24 -0
- package/dist/shared/response.js +92 -0
- package/dist/tools/accounting/definitions.d.ts +9 -0
- package/dist/tools/accounting/definitions.js +345 -0
- package/dist/tools/accounting/handlers.d.ts +10 -0
- package/dist/tools/accounting/handlers.js +121 -0
- package/dist/tools/accounting/index.d.ts +16 -0
- package/dist/tools/accounting/index.js +16 -0
- package/dist/tools/banking/definitions.d.ts +11 -0
- package/dist/tools/banking/definitions.js +349 -0
- package/dist/tools/banking/handlers.d.ts +9 -0
- package/dist/tools/banking/handlers.js +123 -0
- package/dist/tools/banking/index.d.ts +6 -0
- package/dist/tools/banking/index.js +6 -0
- package/dist/tools/company/definitions.d.ts +7 -0
- package/dist/tools/company/definitions.js +87 -0
- package/dist/tools/company/handlers.d.ts +7 -0
- package/dist/tools/company/handlers.js +31 -0
- package/dist/tools/company/index.d.ts +6 -0
- package/dist/tools/company/index.js +6 -0
- package/dist/tools/contacts/definitions.d.ts +6 -0
- package/dist/tools/contacts/definitions.js +150 -0
- package/dist/tools/contacts/handlers.d.ts +7 -0
- package/dist/tools/contacts/handlers.js +40 -0
- package/dist/tools/contacts/index.d.ts +6 -0
- package/dist/tools/contacts/index.js +5 -0
- package/dist/tools/deliveries/definitions.d.ts +6 -0
- package/dist/tools/deliveries/definitions.js +67 -0
- package/dist/tools/deliveries/handlers.d.ts +7 -0
- package/dist/tools/deliveries/handlers.js +28 -0
- package/dist/tools/deliveries/index.d.ts +6 -0
- package/dist/tools/deliveries/index.js +5 -0
- package/dist/tools/files/definitions.d.ts +6 -0
- package/dist/tools/files/definitions.js +217 -0
- package/dist/tools/files/handlers.d.ts +7 -0
- package/dist/tools/files/handlers.js +63 -0
- package/dist/tools/files/index.d.ts +6 -0
- package/dist/tools/files/index.js +5 -0
- package/dist/tools/index.d.ts +19 -0
- package/dist/tools/index.js +93 -0
- package/dist/tools/invoices/definitions.d.ts +6 -0
- package/dist/tools/invoices/definitions.js +147 -0
- package/dist/tools/invoices/handlers.d.ts +7 -0
- package/dist/tools/invoices/handlers.js +119 -0
- package/dist/tools/invoices/index.d.ts +6 -0
- package/dist/tools/invoices/index.js +5 -0
- package/dist/tools/items/definitions.d.ts +6 -0
- package/dist/tools/items/definitions.js +100 -0
- package/dist/tools/items/handlers.d.ts +7 -0
- package/dist/tools/items/handlers.js +36 -0
- package/dist/tools/items/index.d.ts +6 -0
- package/dist/tools/items/index.js +5 -0
- package/dist/tools/misc/definitions.d.ts +6 -0
- package/dist/tools/misc/definitions.js +126 -0
- package/dist/tools/misc/handlers.d.ts +7 -0
- package/dist/tools/misc/handlers.js +52 -0
- package/dist/tools/misc/index.d.ts +6 -0
- package/dist/tools/misc/index.js +5 -0
- package/dist/tools/orders/definitions.d.ts +6 -0
- package/dist/tools/orders/definitions.js +114 -0
- package/dist/tools/orders/handlers.d.ts +7 -0
- package/dist/tools/orders/handlers.js +62 -0
- package/dist/tools/orders/index.d.ts +6 -0
- package/dist/tools/orders/index.js +5 -0
- package/dist/tools/payments/definitions.d.ts +6 -0
- package/dist/tools/payments/definitions.js +74 -0
- package/dist/tools/payments/handlers.d.ts +7 -0
- package/dist/tools/payments/handlers.js +28 -0
- package/dist/tools/payments/index.d.ts +6 -0
- package/dist/tools/payments/index.js +5 -0
- package/dist/tools/payroll/definitions.d.ts +15 -0
- package/dist/tools/payroll/definitions.js +239 -0
- package/dist/tools/payroll/handlers.d.ts +14 -0
- package/dist/tools/payroll/handlers.js +152 -0
- package/dist/tools/payroll/index.d.ts +16 -0
- package/dist/tools/payroll/index.js +16 -0
- package/dist/tools/projects/definitions.d.ts +7 -0
- package/dist/tools/projects/definitions.js +430 -0
- package/dist/tools/projects/handlers.d.ts +7 -0
- package/dist/tools/projects/handlers.js +127 -0
- package/dist/tools/projects/index.d.ts +6 -0
- package/dist/tools/projects/index.js +6 -0
- package/dist/tools/purchase/definitions.d.ts +6 -0
- package/dist/tools/purchase/definitions.js +381 -0
- package/dist/tools/purchase/handlers.d.ts +7 -0
- package/dist/tools/purchase/handlers.js +120 -0
- package/dist/tools/purchase/index.d.ts +7 -0
- package/dist/tools/purchase/index.js +6 -0
- package/dist/tools/quotes/definitions.d.ts +6 -0
- package/dist/tools/quotes/definitions.js +174 -0
- package/dist/tools/quotes/handlers.d.ts +7 -0
- package/dist/tools/quotes/handlers.js +79 -0
- package/dist/tools/quotes/index.d.ts +6 -0
- package/dist/tools/quotes/index.js +5 -0
- package/dist/tools/reference/definitions.d.ts +7 -0
- package/dist/tools/reference/definitions.js +421 -0
- package/dist/tools/reference/handlers.d.ts +7 -0
- package/dist/tools/reference/handlers.js +161 -0
- package/dist/tools/reference/index.d.ts +6 -0
- package/dist/tools/reference/index.js +6 -0
- package/dist/tools/reminders/definitions.d.ts +6 -0
- package/dist/tools/reminders/definitions.js +132 -0
- package/dist/tools/reminders/handlers.d.ts +7 -0
- package/dist/tools/reminders/handlers.js +43 -0
- package/dist/tools/reminders/index.d.ts +6 -0
- package/dist/tools/reminders/index.js +5 -0
- package/dist/tools/reports/definitions.d.ts +6 -0
- package/dist/tools/reports/definitions.js +133 -0
- package/dist/tools/reports/handlers.d.ts +7 -0
- package/dist/tools/reports/handlers.js +33 -0
- package/dist/tools/reports/index.d.ts +6 -0
- package/dist/tools/reports/index.js +5 -0
- package/dist/tools/timetracking/definitions.d.ts +9 -0
- package/dist/tools/timetracking/definitions.js +226 -0
- package/dist/tools/timetracking/handlers.d.ts +9 -0
- package/dist/tools/timetracking/handlers.js +88 -0
- package/dist/tools/timetracking/index.d.ts +6 -0
- package/dist/tools/timetracking/index.js +6 -0
- package/dist/tools/users/definitions.d.ts +6 -0
- package/dist/tools/users/definitions.js +93 -0
- package/dist/tools/users/handlers.d.ts +7 -0
- package/dist/tools/users/handlers.js +35 -0
- package/dist/tools/users/index.d.ts +6 -0
- package/dist/tools/users/index.js +5 -0
- package/dist/transports/http.d.ts +17 -0
- package/dist/transports/http.js +203 -0
- package/dist/transports/index.d.ts +4 -0
- package/dist/transports/index.js +4 -0
- package/dist/types/common.d.ts +32 -0
- package/dist/types/common.js +11 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/index.js +11 -0
- package/dist/types/schemas/accounting.d.ts +225 -0
- package/dist/types/schemas/accounting.js +96 -0
- package/dist/types/schemas/banking.d.ts +207 -0
- package/dist/types/schemas/banking.js +86 -0
- package/dist/types/schemas/company.d.ts +44 -0
- package/dist/types/schemas/company.js +23 -0
- package/dist/types/schemas/contacts.d.ts +104 -0
- package/dist/types/schemas/contacts.js +42 -0
- package/dist/types/schemas/deliveries.d.ts +40 -0
- package/dist/types/schemas/deliveries.js +22 -0
- package/dist/types/schemas/files.d.ts +152 -0
- package/dist/types/schemas/files.js +64 -0
- package/dist/types/schemas/index.d.ts +24 -0
- package/dist/types/schemas/index.js +44 -0
- package/dist/types/schemas/invoices.d.ts +594 -0
- package/dist/types/schemas/invoices.js +109 -0
- package/dist/types/schemas/items.d.ts +153 -0
- package/dist/types/schemas/items.js +43 -0
- package/dist/types/schemas/misc.d.ts +64 -0
- package/dist/types/schemas/misc.js +36 -0
- package/dist/types/schemas/orders.d.ts +657 -0
- package/dist/types/schemas/orders.js +101 -0
- package/dist/types/schemas/payments.d.ts +46 -0
- package/dist/types/schemas/payments.js +24 -0
- package/dist/types/schemas/payroll.d.ts +146 -0
- package/dist/types/schemas/payroll.js +65 -0
- package/dist/types/schemas/projects.d.ts +268 -0
- package/dist/types/schemas/projects.js +102 -0
- package/dist/types/schemas/purchase.d.ts +228 -0
- package/dist/types/schemas/purchase.js +114 -0
- package/dist/types/schemas/quotes.d.ts +102 -0
- package/dist/types/schemas/quotes.js +49 -0
- package/dist/types/schemas/reference.d.ts +240 -0
- package/dist/types/schemas/reference.js +99 -0
- package/dist/types/schemas/reminders.d.ts +76 -0
- package/dist/types/schemas/reminders.js +38 -0
- package/dist/types/schemas/reports.d.ts +69 -0
- package/dist/types/schemas/reports.js +36 -0
- package/dist/types/schemas/timetracking.d.ts +150 -0
- package/dist/types/schemas/timetracking.js +68 -0
- package/dist/types/schemas/users.d.ts +51 -0
- package/dist/types/schemas/users.js +27 -0
- package/dist/ui/contact-card/mcp-app.d.ts +1 -0
- package/dist/ui/contact-card/mcp-app.js +108 -0
- package/dist/ui/dashboard/mcp-app.d.ts +1 -0
- package/dist/ui/dashboard/mcp-app.js +81 -0
- package/dist/ui/invoice-preview/mcp-app.d.ts +1 -0
- package/dist/ui/invoice-preview/mcp-app.js +96 -0
- package/dist/ui-resources.d.ts +17 -0
- package/dist/ui-resources.js +124 -0
- package/dist/vite.config.d.ts +2 -0
- package/dist/vite.config.js +46 -0
- package/package.json +78 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Projects Zod schemas and types.
|
|
3
|
+
* Domain: Projects (Projects, Project Types, Project Statuses)
|
|
4
|
+
*/
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
// ===== PROJECTS (PROJ-01) =====
|
|
7
|
+
export const ListProjectsParamsSchema = z.object({
|
|
8
|
+
limit: z.number().int().positive().default(100),
|
|
9
|
+
offset: z.number().int().min(0).default(0),
|
|
10
|
+
});
|
|
11
|
+
export const GetProjectParamsSchema = z.object({
|
|
12
|
+
project_id: z.number().int().positive(),
|
|
13
|
+
});
|
|
14
|
+
export const CreateProjectParamsSchema = z.object({
|
|
15
|
+
user_id: z.number().int().positive(),
|
|
16
|
+
name: z.string().min(1, "Project name is required"),
|
|
17
|
+
contact_id: z.number().int().positive().optional(),
|
|
18
|
+
pr_state_id: z.number().int().positive().optional(),
|
|
19
|
+
pr_project_type_id: z.number().int().positive().optional(),
|
|
20
|
+
start_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/, "Date must be YYYY-MM-DD").optional(),
|
|
21
|
+
end_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/, "Date must be YYYY-MM-DD").optional(),
|
|
22
|
+
comment: z.string().optional(),
|
|
23
|
+
});
|
|
24
|
+
export const UpdateProjectParamsSchema = z.object({
|
|
25
|
+
project_id: z.number().int().positive(),
|
|
26
|
+
project_data: z.record(z.unknown()),
|
|
27
|
+
});
|
|
28
|
+
export const DeleteProjectParamsSchema = z.object({
|
|
29
|
+
project_id: z.number().int().positive(),
|
|
30
|
+
});
|
|
31
|
+
export const ArchiveProjectParamsSchema = z.object({
|
|
32
|
+
project_id: z.number().int().positive(),
|
|
33
|
+
});
|
|
34
|
+
export const UnarchiveProjectParamsSchema = z.object({
|
|
35
|
+
project_id: z.number().int().positive(),
|
|
36
|
+
});
|
|
37
|
+
export const SearchProjectsParamsSchema = z.object({
|
|
38
|
+
search_criteria: z.array(z.object({
|
|
39
|
+
field: z.string(),
|
|
40
|
+
value: z.union([z.string(), z.number(), z.boolean()]),
|
|
41
|
+
criteria: z.string().optional(),
|
|
42
|
+
})),
|
|
43
|
+
});
|
|
44
|
+
// ===== PROJECT TYPES (PROJ-02) =====
|
|
45
|
+
export const ListProjectTypesParamsSchema = z.object({
|
|
46
|
+
limit: z.number().int().positive().default(100),
|
|
47
|
+
offset: z.number().int().min(0).default(0),
|
|
48
|
+
});
|
|
49
|
+
export const GetProjectTypeParamsSchema = z.object({
|
|
50
|
+
type_id: z.number().int().positive(),
|
|
51
|
+
});
|
|
52
|
+
// ===== PROJECT STATUSES (PROJ-03) =====
|
|
53
|
+
export const ListProjectStatusesParamsSchema = z.object({
|
|
54
|
+
limit: z.number().int().positive().default(100),
|
|
55
|
+
offset: z.number().int().min(0).default(0),
|
|
56
|
+
});
|
|
57
|
+
export const GetProjectStatusParamsSchema = z.object({
|
|
58
|
+
status_id: z.number().int().positive(),
|
|
59
|
+
});
|
|
60
|
+
// ===== MILESTONES (PROJ-04) =====
|
|
61
|
+
export const ListMilestonesParamsSchema = z.object({
|
|
62
|
+
project_id: z.number().int().positive(),
|
|
63
|
+
limit: z.number().int().positive().default(100),
|
|
64
|
+
offset: z.number().int().min(0).default(0),
|
|
65
|
+
});
|
|
66
|
+
export const GetMilestoneParamsSchema = z.object({
|
|
67
|
+
project_id: z.number().int().positive(),
|
|
68
|
+
milestone_id: z.number().int().positive(),
|
|
69
|
+
});
|
|
70
|
+
export const CreateMilestoneParamsSchema = z.object({
|
|
71
|
+
project_id: z.number().int().positive(),
|
|
72
|
+
name: z.string().min(1, "Milestone name is required"),
|
|
73
|
+
end_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/, "Date must be YYYY-MM-DD").optional(),
|
|
74
|
+
});
|
|
75
|
+
export const DeleteMilestoneParamsSchema = z.object({
|
|
76
|
+
project_id: z.number().int().positive(),
|
|
77
|
+
milestone_id: z.number().int().positive(),
|
|
78
|
+
});
|
|
79
|
+
// ===== WORK PACKAGES (PROJ-05) =====
|
|
80
|
+
export const ListWorkPackagesParamsSchema = z.object({
|
|
81
|
+
project_id: z.number().int().positive(),
|
|
82
|
+
limit: z.number().int().positive().default(100),
|
|
83
|
+
offset: z.number().int().min(0).default(0),
|
|
84
|
+
});
|
|
85
|
+
export const GetWorkPackageParamsSchema = z.object({
|
|
86
|
+
project_id: z.number().int().positive(),
|
|
87
|
+
workpackage_id: z.number().int().positive(),
|
|
88
|
+
});
|
|
89
|
+
export const CreateWorkPackageParamsSchema = z.object({
|
|
90
|
+
project_id: z.number().int().positive(),
|
|
91
|
+
name: z.string().min(1, "Work package name is required"),
|
|
92
|
+
estimated_time: z.string().regex(/^\d{2}:\d{2}$/, "Duration must be HH:MM format").optional(),
|
|
93
|
+
});
|
|
94
|
+
export const UpdateWorkPackageParamsSchema = z.object({
|
|
95
|
+
project_id: z.number().int().positive(),
|
|
96
|
+
workpackage_id: z.number().int().positive(),
|
|
97
|
+
workpackage_data: z.record(z.unknown()),
|
|
98
|
+
});
|
|
99
|
+
export const DeleteWorkPackageParamsSchema = z.object({
|
|
100
|
+
project_id: z.number().int().positive(),
|
|
101
|
+
workpackage_id: z.number().int().positive(),
|
|
102
|
+
});
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Purchase-related Zod schemas and types.
|
|
3
|
+
* Domain: Bills (kb_bill) and Expenses (kb_expense)
|
|
4
|
+
*/
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
export declare const ListBillsParamsSchema: z.ZodObject<{
|
|
7
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
8
|
+
offset: z.ZodDefault<z.ZodNumber>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
limit: number;
|
|
11
|
+
offset: number;
|
|
12
|
+
}, {
|
|
13
|
+
limit?: number | undefined;
|
|
14
|
+
offset?: number | undefined;
|
|
15
|
+
}>;
|
|
16
|
+
export type ListBillsParams = z.infer<typeof ListBillsParamsSchema>;
|
|
17
|
+
export declare const GetBillParamsSchema: z.ZodObject<{
|
|
18
|
+
bill_id: z.ZodNumber;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
bill_id: number;
|
|
21
|
+
}, {
|
|
22
|
+
bill_id: number;
|
|
23
|
+
}>;
|
|
24
|
+
export type GetBillParams = z.infer<typeof GetBillParamsSchema>;
|
|
25
|
+
export declare const CreateBillParamsSchema: z.ZodObject<{
|
|
26
|
+
bill_data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
bill_data: Record<string, unknown>;
|
|
29
|
+
}, {
|
|
30
|
+
bill_data: Record<string, unknown>;
|
|
31
|
+
}>;
|
|
32
|
+
export type CreateBillParams = z.infer<typeof CreateBillParamsSchema>;
|
|
33
|
+
export declare const UpdateBillParamsSchema: z.ZodObject<{
|
|
34
|
+
bill_id: z.ZodNumber;
|
|
35
|
+
bill_data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
bill_id: number;
|
|
38
|
+
bill_data: Record<string, unknown>;
|
|
39
|
+
}, {
|
|
40
|
+
bill_id: number;
|
|
41
|
+
bill_data: Record<string, unknown>;
|
|
42
|
+
}>;
|
|
43
|
+
export type UpdateBillParams = z.infer<typeof UpdateBillParamsSchema>;
|
|
44
|
+
export declare const DeleteBillParamsSchema: z.ZodObject<{
|
|
45
|
+
bill_id: z.ZodNumber;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
bill_id: number;
|
|
48
|
+
}, {
|
|
49
|
+
bill_id: number;
|
|
50
|
+
}>;
|
|
51
|
+
export type DeleteBillParams = z.infer<typeof DeleteBillParamsSchema>;
|
|
52
|
+
export declare const SearchBillsParamsSchema: z.ZodObject<{
|
|
53
|
+
criteria: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
|
|
54
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
}, "strip", z.ZodTypeAny, {
|
|
57
|
+
criteria: Record<string, unknown>[];
|
|
58
|
+
limit?: number | undefined;
|
|
59
|
+
offset?: number | undefined;
|
|
60
|
+
}, {
|
|
61
|
+
criteria: Record<string, unknown>[];
|
|
62
|
+
limit?: number | undefined;
|
|
63
|
+
offset?: number | undefined;
|
|
64
|
+
}>;
|
|
65
|
+
export type SearchBillsParams = z.infer<typeof SearchBillsParamsSchema>;
|
|
66
|
+
export declare const IssueBillParamsSchema: z.ZodObject<{
|
|
67
|
+
bill_id: z.ZodNumber;
|
|
68
|
+
}, "strip", z.ZodTypeAny, {
|
|
69
|
+
bill_id: number;
|
|
70
|
+
}, {
|
|
71
|
+
bill_id: number;
|
|
72
|
+
}>;
|
|
73
|
+
export type IssueBillParams = z.infer<typeof IssueBillParamsSchema>;
|
|
74
|
+
export declare const MarkBillAsPaidParamsSchema: z.ZodObject<{
|
|
75
|
+
bill_id: z.ZodNumber;
|
|
76
|
+
}, "strip", z.ZodTypeAny, {
|
|
77
|
+
bill_id: number;
|
|
78
|
+
}, {
|
|
79
|
+
bill_id: number;
|
|
80
|
+
}>;
|
|
81
|
+
export type MarkBillAsPaidParams = z.infer<typeof MarkBillAsPaidParamsSchema>;
|
|
82
|
+
export declare const ListExpensesParamsSchema: z.ZodObject<{
|
|
83
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
84
|
+
offset: z.ZodDefault<z.ZodNumber>;
|
|
85
|
+
}, "strip", z.ZodTypeAny, {
|
|
86
|
+
limit: number;
|
|
87
|
+
offset: number;
|
|
88
|
+
}, {
|
|
89
|
+
limit?: number | undefined;
|
|
90
|
+
offset?: number | undefined;
|
|
91
|
+
}>;
|
|
92
|
+
export type ListExpensesParams = z.infer<typeof ListExpensesParamsSchema>;
|
|
93
|
+
export declare const GetExpenseParamsSchema: z.ZodObject<{
|
|
94
|
+
expense_id: z.ZodNumber;
|
|
95
|
+
}, "strip", z.ZodTypeAny, {
|
|
96
|
+
expense_id: number;
|
|
97
|
+
}, {
|
|
98
|
+
expense_id: number;
|
|
99
|
+
}>;
|
|
100
|
+
export type GetExpenseParams = z.infer<typeof GetExpenseParamsSchema>;
|
|
101
|
+
export declare const CreateExpenseParamsSchema: z.ZodObject<{
|
|
102
|
+
expense_data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
103
|
+
}, "strip", z.ZodTypeAny, {
|
|
104
|
+
expense_data: Record<string, unknown>;
|
|
105
|
+
}, {
|
|
106
|
+
expense_data: Record<string, unknown>;
|
|
107
|
+
}>;
|
|
108
|
+
export type CreateExpenseParams = z.infer<typeof CreateExpenseParamsSchema>;
|
|
109
|
+
export declare const UpdateExpenseParamsSchema: z.ZodObject<{
|
|
110
|
+
expense_id: z.ZodNumber;
|
|
111
|
+
expense_data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
112
|
+
}, "strip", z.ZodTypeAny, {
|
|
113
|
+
expense_id: number;
|
|
114
|
+
expense_data: Record<string, unknown>;
|
|
115
|
+
}, {
|
|
116
|
+
expense_id: number;
|
|
117
|
+
expense_data: Record<string, unknown>;
|
|
118
|
+
}>;
|
|
119
|
+
export type UpdateExpenseParams = z.infer<typeof UpdateExpenseParamsSchema>;
|
|
120
|
+
export declare const DeleteExpenseParamsSchema: z.ZodObject<{
|
|
121
|
+
expense_id: z.ZodNumber;
|
|
122
|
+
}, "strip", z.ZodTypeAny, {
|
|
123
|
+
expense_id: number;
|
|
124
|
+
}, {
|
|
125
|
+
expense_id: number;
|
|
126
|
+
}>;
|
|
127
|
+
export type DeleteExpenseParams = z.infer<typeof DeleteExpenseParamsSchema>;
|
|
128
|
+
export declare const ListPurchaseOrdersParamsSchema: z.ZodObject<{
|
|
129
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
130
|
+
offset: z.ZodDefault<z.ZodNumber>;
|
|
131
|
+
}, "strip", z.ZodTypeAny, {
|
|
132
|
+
limit: number;
|
|
133
|
+
offset: number;
|
|
134
|
+
}, {
|
|
135
|
+
limit?: number | undefined;
|
|
136
|
+
offset?: number | undefined;
|
|
137
|
+
}>;
|
|
138
|
+
export type ListPurchaseOrdersParams = z.infer<typeof ListPurchaseOrdersParamsSchema>;
|
|
139
|
+
export declare const GetPurchaseOrderParamsSchema: z.ZodObject<{
|
|
140
|
+
purchase_order_id: z.ZodNumber;
|
|
141
|
+
}, "strip", z.ZodTypeAny, {
|
|
142
|
+
purchase_order_id: number;
|
|
143
|
+
}, {
|
|
144
|
+
purchase_order_id: number;
|
|
145
|
+
}>;
|
|
146
|
+
export type GetPurchaseOrderParams = z.infer<typeof GetPurchaseOrderParamsSchema>;
|
|
147
|
+
export declare const CreatePurchaseOrderParamsSchema: z.ZodObject<{
|
|
148
|
+
purchase_order_data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
149
|
+
}, "strip", z.ZodTypeAny, {
|
|
150
|
+
purchase_order_data: Record<string, unknown>;
|
|
151
|
+
}, {
|
|
152
|
+
purchase_order_data: Record<string, unknown>;
|
|
153
|
+
}>;
|
|
154
|
+
export type CreatePurchaseOrderParams = z.infer<typeof CreatePurchaseOrderParamsSchema>;
|
|
155
|
+
export declare const UpdatePurchaseOrderParamsSchema: z.ZodObject<{
|
|
156
|
+
purchase_order_id: z.ZodNumber;
|
|
157
|
+
purchase_order_data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
158
|
+
}, "strip", z.ZodTypeAny, {
|
|
159
|
+
purchase_order_id: number;
|
|
160
|
+
purchase_order_data: Record<string, unknown>;
|
|
161
|
+
}, {
|
|
162
|
+
purchase_order_id: number;
|
|
163
|
+
purchase_order_data: Record<string, unknown>;
|
|
164
|
+
}>;
|
|
165
|
+
export type UpdatePurchaseOrderParams = z.infer<typeof UpdatePurchaseOrderParamsSchema>;
|
|
166
|
+
export declare const DeletePurchaseOrderParamsSchema: z.ZodObject<{
|
|
167
|
+
purchase_order_id: z.ZodNumber;
|
|
168
|
+
}, "strip", z.ZodTypeAny, {
|
|
169
|
+
purchase_order_id: number;
|
|
170
|
+
}, {
|
|
171
|
+
purchase_order_id: number;
|
|
172
|
+
}>;
|
|
173
|
+
export type DeletePurchaseOrderParams = z.infer<typeof DeletePurchaseOrderParamsSchema>;
|
|
174
|
+
export declare const ListOutgoingPaymentsParamsSchema: z.ZodObject<{
|
|
175
|
+
bill_id: z.ZodNumber;
|
|
176
|
+
}, "strip", z.ZodTypeAny, {
|
|
177
|
+
bill_id: number;
|
|
178
|
+
}, {
|
|
179
|
+
bill_id: number;
|
|
180
|
+
}>;
|
|
181
|
+
export type ListOutgoingPaymentsParams = z.infer<typeof ListOutgoingPaymentsParamsSchema>;
|
|
182
|
+
export declare const GetOutgoingPaymentParamsSchema: z.ZodObject<{
|
|
183
|
+
bill_id: z.ZodNumber;
|
|
184
|
+
payment_id: z.ZodNumber;
|
|
185
|
+
}, "strip", z.ZodTypeAny, {
|
|
186
|
+
payment_id: number;
|
|
187
|
+
bill_id: number;
|
|
188
|
+
}, {
|
|
189
|
+
payment_id: number;
|
|
190
|
+
bill_id: number;
|
|
191
|
+
}>;
|
|
192
|
+
export type GetOutgoingPaymentParams = z.infer<typeof GetOutgoingPaymentParamsSchema>;
|
|
193
|
+
export declare const CreateOutgoingPaymentParamsSchema: z.ZodObject<{
|
|
194
|
+
bill_id: z.ZodNumber;
|
|
195
|
+
payment_data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
196
|
+
}, "strip", z.ZodTypeAny, {
|
|
197
|
+
payment_data: Record<string, unknown>;
|
|
198
|
+
bill_id: number;
|
|
199
|
+
}, {
|
|
200
|
+
payment_data: Record<string, unknown>;
|
|
201
|
+
bill_id: number;
|
|
202
|
+
}>;
|
|
203
|
+
export type CreateOutgoingPaymentParams = z.infer<typeof CreateOutgoingPaymentParamsSchema>;
|
|
204
|
+
export declare const UpdateOutgoingPaymentParamsSchema: z.ZodObject<{
|
|
205
|
+
bill_id: z.ZodNumber;
|
|
206
|
+
payment_id: z.ZodNumber;
|
|
207
|
+
payment_data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
208
|
+
}, "strip", z.ZodTypeAny, {
|
|
209
|
+
payment_id: number;
|
|
210
|
+
payment_data: Record<string, unknown>;
|
|
211
|
+
bill_id: number;
|
|
212
|
+
}, {
|
|
213
|
+
payment_id: number;
|
|
214
|
+
payment_data: Record<string, unknown>;
|
|
215
|
+
bill_id: number;
|
|
216
|
+
}>;
|
|
217
|
+
export type UpdateOutgoingPaymentParams = z.infer<typeof UpdateOutgoingPaymentParamsSchema>;
|
|
218
|
+
export declare const DeleteOutgoingPaymentParamsSchema: z.ZodObject<{
|
|
219
|
+
bill_id: z.ZodNumber;
|
|
220
|
+
payment_id: z.ZodNumber;
|
|
221
|
+
}, "strip", z.ZodTypeAny, {
|
|
222
|
+
payment_id: number;
|
|
223
|
+
bill_id: number;
|
|
224
|
+
}, {
|
|
225
|
+
payment_id: number;
|
|
226
|
+
bill_id: number;
|
|
227
|
+
}>;
|
|
228
|
+
export type DeleteOutgoingPaymentParams = z.infer<typeof DeleteOutgoingPaymentParamsSchema>;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Purchase-related Zod schemas and types.
|
|
3
|
+
* Domain: Bills (kb_bill) and Expenses (kb_expense)
|
|
4
|
+
*/
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
// ===== BILLS (Creditor Invoices) =====
|
|
7
|
+
// List bills
|
|
8
|
+
export const ListBillsParamsSchema = z.object({
|
|
9
|
+
limit: z.number().int().positive().default(50),
|
|
10
|
+
offset: z.number().int().min(0).default(0),
|
|
11
|
+
});
|
|
12
|
+
// Get single bill
|
|
13
|
+
export const GetBillParamsSchema = z.object({
|
|
14
|
+
bill_id: z.number().int().positive(),
|
|
15
|
+
});
|
|
16
|
+
// Create bill
|
|
17
|
+
export const CreateBillParamsSchema = z.object({
|
|
18
|
+
bill_data: z.record(z.unknown()),
|
|
19
|
+
});
|
|
20
|
+
// Update bill
|
|
21
|
+
export const UpdateBillParamsSchema = z.object({
|
|
22
|
+
bill_id: z.number().int().positive(),
|
|
23
|
+
bill_data: z.record(z.unknown()),
|
|
24
|
+
});
|
|
25
|
+
// Delete bill
|
|
26
|
+
export const DeleteBillParamsSchema = z.object({
|
|
27
|
+
bill_id: z.number().int().positive(),
|
|
28
|
+
});
|
|
29
|
+
// Search bills
|
|
30
|
+
export const SearchBillsParamsSchema = z.object({
|
|
31
|
+
criteria: z.array(z.record(z.unknown())),
|
|
32
|
+
limit: z.number().int().positive().optional(),
|
|
33
|
+
offset: z.number().int().min(0).optional(),
|
|
34
|
+
});
|
|
35
|
+
// Issue bill
|
|
36
|
+
export const IssueBillParamsSchema = z.object({
|
|
37
|
+
bill_id: z.number().int().positive(),
|
|
38
|
+
});
|
|
39
|
+
// Mark bill as paid
|
|
40
|
+
export const MarkBillAsPaidParamsSchema = z.object({
|
|
41
|
+
bill_id: z.number().int().positive(),
|
|
42
|
+
});
|
|
43
|
+
// ===== EXPENSES =====
|
|
44
|
+
// List expenses
|
|
45
|
+
export const ListExpensesParamsSchema = z.object({
|
|
46
|
+
limit: z.number().int().positive().default(50),
|
|
47
|
+
offset: z.number().int().min(0).default(0),
|
|
48
|
+
});
|
|
49
|
+
// Get single expense
|
|
50
|
+
export const GetExpenseParamsSchema = z.object({
|
|
51
|
+
expense_id: z.number().int().positive(),
|
|
52
|
+
});
|
|
53
|
+
// Create expense
|
|
54
|
+
export const CreateExpenseParamsSchema = z.object({
|
|
55
|
+
expense_data: z.record(z.unknown()),
|
|
56
|
+
});
|
|
57
|
+
// Update expense
|
|
58
|
+
export const UpdateExpenseParamsSchema = z.object({
|
|
59
|
+
expense_id: z.number().int().positive(),
|
|
60
|
+
expense_data: z.record(z.unknown()),
|
|
61
|
+
});
|
|
62
|
+
// Delete expense
|
|
63
|
+
export const DeleteExpenseParamsSchema = z.object({
|
|
64
|
+
expense_id: z.number().int().positive(),
|
|
65
|
+
});
|
|
66
|
+
// ===== PURCHASE ORDERS =====
|
|
67
|
+
// List purchase orders
|
|
68
|
+
export const ListPurchaseOrdersParamsSchema = z.object({
|
|
69
|
+
limit: z.number().int().positive().default(50),
|
|
70
|
+
offset: z.number().int().min(0).default(0),
|
|
71
|
+
});
|
|
72
|
+
// Get single purchase order
|
|
73
|
+
export const GetPurchaseOrderParamsSchema = z.object({
|
|
74
|
+
purchase_order_id: z.number().int().positive(),
|
|
75
|
+
});
|
|
76
|
+
// Create purchase order
|
|
77
|
+
export const CreatePurchaseOrderParamsSchema = z.object({
|
|
78
|
+
purchase_order_data: z.record(z.unknown()),
|
|
79
|
+
});
|
|
80
|
+
// Update purchase order
|
|
81
|
+
export const UpdatePurchaseOrderParamsSchema = z.object({
|
|
82
|
+
purchase_order_id: z.number().int().positive(),
|
|
83
|
+
purchase_order_data: z.record(z.unknown()),
|
|
84
|
+
});
|
|
85
|
+
// Delete purchase order
|
|
86
|
+
export const DeletePurchaseOrderParamsSchema = z.object({
|
|
87
|
+
purchase_order_id: z.number().int().positive(),
|
|
88
|
+
});
|
|
89
|
+
// ===== OUTGOING PAYMENTS (linked to bills) =====
|
|
90
|
+
// List outgoing payments for a bill
|
|
91
|
+
export const ListOutgoingPaymentsParamsSchema = z.object({
|
|
92
|
+
bill_id: z.number().int().positive(),
|
|
93
|
+
});
|
|
94
|
+
// Get single outgoing payment
|
|
95
|
+
export const GetOutgoingPaymentParamsSchema = z.object({
|
|
96
|
+
bill_id: z.number().int().positive(),
|
|
97
|
+
payment_id: z.number().int().positive(),
|
|
98
|
+
});
|
|
99
|
+
// Create outgoing payment
|
|
100
|
+
export const CreateOutgoingPaymentParamsSchema = z.object({
|
|
101
|
+
bill_id: z.number().int().positive(),
|
|
102
|
+
payment_data: z.record(z.unknown()),
|
|
103
|
+
});
|
|
104
|
+
// Update outgoing payment
|
|
105
|
+
export const UpdateOutgoingPaymentParamsSchema = z.object({
|
|
106
|
+
bill_id: z.number().int().positive(),
|
|
107
|
+
payment_id: z.number().int().positive(),
|
|
108
|
+
payment_data: z.record(z.unknown()),
|
|
109
|
+
});
|
|
110
|
+
// Delete outgoing payment
|
|
111
|
+
export const DeleteOutgoingPaymentParamsSchema = z.object({
|
|
112
|
+
bill_id: z.number().int().positive(),
|
|
113
|
+
payment_id: z.number().int().positive(),
|
|
114
|
+
});
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Quote-related Zod schemas and types.
|
|
3
|
+
* Domain: Quotes/Offers (kb_offer)
|
|
4
|
+
*/
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
export declare const ListQuotesParamsSchema: z.ZodObject<{
|
|
7
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
8
|
+
offset: z.ZodDefault<z.ZodNumber>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
limit: number;
|
|
11
|
+
offset: number;
|
|
12
|
+
}, {
|
|
13
|
+
limit?: number | undefined;
|
|
14
|
+
offset?: number | undefined;
|
|
15
|
+
}>;
|
|
16
|
+
export type ListQuotesParams = z.infer<typeof ListQuotesParamsSchema>;
|
|
17
|
+
export declare const GetQuoteParamsSchema: z.ZodObject<{
|
|
18
|
+
quote_id: z.ZodNumber;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
quote_id: number;
|
|
21
|
+
}, {
|
|
22
|
+
quote_id: number;
|
|
23
|
+
}>;
|
|
24
|
+
export type GetQuoteParams = z.infer<typeof GetQuoteParamsSchema>;
|
|
25
|
+
export declare const CreateQuoteParamsSchema: z.ZodObject<{
|
|
26
|
+
contact_id: z.ZodNumber;
|
|
27
|
+
quote_data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
contact_id: number;
|
|
30
|
+
quote_data: Record<string, unknown>;
|
|
31
|
+
}, {
|
|
32
|
+
contact_id: number;
|
|
33
|
+
quote_data: Record<string, unknown>;
|
|
34
|
+
}>;
|
|
35
|
+
export type CreateQuoteParams = z.infer<typeof CreateQuoteParamsSchema>;
|
|
36
|
+
export declare const SearchQuotesParamsSchema: z.ZodObject<{
|
|
37
|
+
search_params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
search_params: Record<string, unknown>;
|
|
40
|
+
}, {
|
|
41
|
+
search_params: Record<string, unknown>;
|
|
42
|
+
}>;
|
|
43
|
+
export type SearchQuotesParams = z.infer<typeof SearchQuotesParamsSchema>;
|
|
44
|
+
export declare const SearchQuotesByCustomerParamsSchema: z.ZodObject<{
|
|
45
|
+
customer_name: z.ZodString;
|
|
46
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
47
|
+
}, "strip", z.ZodTypeAny, {
|
|
48
|
+
limit: number;
|
|
49
|
+
customer_name: string;
|
|
50
|
+
}, {
|
|
51
|
+
customer_name: string;
|
|
52
|
+
limit?: number | undefined;
|
|
53
|
+
}>;
|
|
54
|
+
export type SearchQuotesByCustomerParams = z.infer<typeof SearchQuotesByCustomerParamsSchema>;
|
|
55
|
+
export declare const IssueQuoteParamsSchema: z.ZodObject<{
|
|
56
|
+
quote_id: z.ZodNumber;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
quote_id: number;
|
|
59
|
+
}, {
|
|
60
|
+
quote_id: number;
|
|
61
|
+
}>;
|
|
62
|
+
export type IssueQuoteParams = z.infer<typeof IssueQuoteParamsSchema>;
|
|
63
|
+
export declare const AcceptQuoteParamsSchema: z.ZodObject<{
|
|
64
|
+
quote_id: z.ZodNumber;
|
|
65
|
+
}, "strip", z.ZodTypeAny, {
|
|
66
|
+
quote_id: number;
|
|
67
|
+
}, {
|
|
68
|
+
quote_id: number;
|
|
69
|
+
}>;
|
|
70
|
+
export type AcceptQuoteParams = z.infer<typeof AcceptQuoteParamsSchema>;
|
|
71
|
+
export declare const DeclineQuoteParamsSchema: z.ZodObject<{
|
|
72
|
+
quote_id: z.ZodNumber;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
quote_id: number;
|
|
75
|
+
}, {
|
|
76
|
+
quote_id: number;
|
|
77
|
+
}>;
|
|
78
|
+
export type DeclineQuoteParams = z.infer<typeof DeclineQuoteParamsSchema>;
|
|
79
|
+
export declare const SendQuoteParamsSchema: z.ZodObject<{
|
|
80
|
+
quote_id: z.ZodNumber;
|
|
81
|
+
}, "strip", z.ZodTypeAny, {
|
|
82
|
+
quote_id: number;
|
|
83
|
+
}, {
|
|
84
|
+
quote_id: number;
|
|
85
|
+
}>;
|
|
86
|
+
export type SendQuoteParams = z.infer<typeof SendQuoteParamsSchema>;
|
|
87
|
+
export declare const CreateOrderFromQuoteParamsSchema: z.ZodObject<{
|
|
88
|
+
quote_id: z.ZodNumber;
|
|
89
|
+
}, "strip", z.ZodTypeAny, {
|
|
90
|
+
quote_id: number;
|
|
91
|
+
}, {
|
|
92
|
+
quote_id: number;
|
|
93
|
+
}>;
|
|
94
|
+
export type CreateOrderFromQuoteParams = z.infer<typeof CreateOrderFromQuoteParamsSchema>;
|
|
95
|
+
export declare const CreateInvoiceFromQuoteParamsSchema: z.ZodObject<{
|
|
96
|
+
quote_id: z.ZodNumber;
|
|
97
|
+
}, "strip", z.ZodTypeAny, {
|
|
98
|
+
quote_id: number;
|
|
99
|
+
}, {
|
|
100
|
+
quote_id: number;
|
|
101
|
+
}>;
|
|
102
|
+
export type CreateInvoiceFromQuoteParams = z.infer<typeof CreateInvoiceFromQuoteParamsSchema>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Quote-related Zod schemas and types.
|
|
3
|
+
* Domain: Quotes/Offers (kb_offer)
|
|
4
|
+
*/
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
// List quotes
|
|
7
|
+
export const ListQuotesParamsSchema = z.object({
|
|
8
|
+
limit: z.number().int().positive().default(50),
|
|
9
|
+
offset: z.number().int().min(0).default(0),
|
|
10
|
+
});
|
|
11
|
+
// Get single quote
|
|
12
|
+
export const GetQuoteParamsSchema = z.object({
|
|
13
|
+
quote_id: z.number().int().positive(),
|
|
14
|
+
});
|
|
15
|
+
// Create quote
|
|
16
|
+
export const CreateQuoteParamsSchema = z.object({
|
|
17
|
+
contact_id: z.number().int().positive(),
|
|
18
|
+
quote_data: z.record(z.unknown()),
|
|
19
|
+
});
|
|
20
|
+
// Search quotes
|
|
21
|
+
export const SearchQuotesParamsSchema = z.object({
|
|
22
|
+
search_params: z.record(z.unknown()),
|
|
23
|
+
});
|
|
24
|
+
// Search by customer name
|
|
25
|
+
export const SearchQuotesByCustomerParamsSchema = z.object({
|
|
26
|
+
customer_name: z.string().min(1),
|
|
27
|
+
limit: z.number().int().positive().default(50),
|
|
28
|
+
});
|
|
29
|
+
// Quote actions
|
|
30
|
+
export const IssueQuoteParamsSchema = z.object({
|
|
31
|
+
quote_id: z.number().int().positive(),
|
|
32
|
+
});
|
|
33
|
+
export const AcceptQuoteParamsSchema = z.object({
|
|
34
|
+
quote_id: z.number().int().positive(),
|
|
35
|
+
});
|
|
36
|
+
export const DeclineQuoteParamsSchema = z.object({
|
|
37
|
+
quote_id: z.number().int().positive(),
|
|
38
|
+
});
|
|
39
|
+
export const SendQuoteParamsSchema = z.object({
|
|
40
|
+
quote_id: z.number().int().positive(),
|
|
41
|
+
});
|
|
42
|
+
// Create order from quote
|
|
43
|
+
export const CreateOrderFromQuoteParamsSchema = z.object({
|
|
44
|
+
quote_id: z.number().int().positive(),
|
|
45
|
+
});
|
|
46
|
+
// Create invoice from quote
|
|
47
|
+
export const CreateInvoiceFromQuoteParamsSchema = z.object({
|
|
48
|
+
quote_id: z.number().int().positive(),
|
|
49
|
+
});
|