@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.
Files changed (199) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +161 -0
  3. package/dist/bexio-client.d.ts +350 -0
  4. package/dist/bexio-client.js +1045 -0
  5. package/dist/index.d.ts +15 -0
  6. package/dist/index.js +80 -0
  7. package/dist/logger.d.ts +17 -0
  8. package/dist/logger.js +28 -0
  9. package/dist/server.d.ts +18 -0
  10. package/dist/server.js +81 -0
  11. package/dist/shared/errors.d.ts +21 -0
  12. package/dist/shared/errors.js +54 -0
  13. package/dist/shared/index.d.ts +5 -0
  14. package/dist/shared/index.js +5 -0
  15. package/dist/shared/response.d.ts +24 -0
  16. package/dist/shared/response.js +92 -0
  17. package/dist/tools/accounting/definitions.d.ts +9 -0
  18. package/dist/tools/accounting/definitions.js +345 -0
  19. package/dist/tools/accounting/handlers.d.ts +10 -0
  20. package/dist/tools/accounting/handlers.js +121 -0
  21. package/dist/tools/accounting/index.d.ts +16 -0
  22. package/dist/tools/accounting/index.js +16 -0
  23. package/dist/tools/banking/definitions.d.ts +11 -0
  24. package/dist/tools/banking/definitions.js +349 -0
  25. package/dist/tools/banking/handlers.d.ts +9 -0
  26. package/dist/tools/banking/handlers.js +123 -0
  27. package/dist/tools/banking/index.d.ts +6 -0
  28. package/dist/tools/banking/index.js +6 -0
  29. package/dist/tools/company/definitions.d.ts +7 -0
  30. package/dist/tools/company/definitions.js +87 -0
  31. package/dist/tools/company/handlers.d.ts +7 -0
  32. package/dist/tools/company/handlers.js +31 -0
  33. package/dist/tools/company/index.d.ts +6 -0
  34. package/dist/tools/company/index.js +6 -0
  35. package/dist/tools/contacts/definitions.d.ts +6 -0
  36. package/dist/tools/contacts/definitions.js +150 -0
  37. package/dist/tools/contacts/handlers.d.ts +7 -0
  38. package/dist/tools/contacts/handlers.js +40 -0
  39. package/dist/tools/contacts/index.d.ts +6 -0
  40. package/dist/tools/contacts/index.js +5 -0
  41. package/dist/tools/deliveries/definitions.d.ts +6 -0
  42. package/dist/tools/deliveries/definitions.js +67 -0
  43. package/dist/tools/deliveries/handlers.d.ts +7 -0
  44. package/dist/tools/deliveries/handlers.js +28 -0
  45. package/dist/tools/deliveries/index.d.ts +6 -0
  46. package/dist/tools/deliveries/index.js +5 -0
  47. package/dist/tools/files/definitions.d.ts +6 -0
  48. package/dist/tools/files/definitions.js +217 -0
  49. package/dist/tools/files/handlers.d.ts +7 -0
  50. package/dist/tools/files/handlers.js +63 -0
  51. package/dist/tools/files/index.d.ts +6 -0
  52. package/dist/tools/files/index.js +5 -0
  53. package/dist/tools/index.d.ts +19 -0
  54. package/dist/tools/index.js +93 -0
  55. package/dist/tools/invoices/definitions.d.ts +6 -0
  56. package/dist/tools/invoices/definitions.js +147 -0
  57. package/dist/tools/invoices/handlers.d.ts +7 -0
  58. package/dist/tools/invoices/handlers.js +119 -0
  59. package/dist/tools/invoices/index.d.ts +6 -0
  60. package/dist/tools/invoices/index.js +5 -0
  61. package/dist/tools/items/definitions.d.ts +6 -0
  62. package/dist/tools/items/definitions.js +100 -0
  63. package/dist/tools/items/handlers.d.ts +7 -0
  64. package/dist/tools/items/handlers.js +36 -0
  65. package/dist/tools/items/index.d.ts +6 -0
  66. package/dist/tools/items/index.js +5 -0
  67. package/dist/tools/misc/definitions.d.ts +6 -0
  68. package/dist/tools/misc/definitions.js +126 -0
  69. package/dist/tools/misc/handlers.d.ts +7 -0
  70. package/dist/tools/misc/handlers.js +52 -0
  71. package/dist/tools/misc/index.d.ts +6 -0
  72. package/dist/tools/misc/index.js +5 -0
  73. package/dist/tools/orders/definitions.d.ts +6 -0
  74. package/dist/tools/orders/definitions.js +114 -0
  75. package/dist/tools/orders/handlers.d.ts +7 -0
  76. package/dist/tools/orders/handlers.js +62 -0
  77. package/dist/tools/orders/index.d.ts +6 -0
  78. package/dist/tools/orders/index.js +5 -0
  79. package/dist/tools/payments/definitions.d.ts +6 -0
  80. package/dist/tools/payments/definitions.js +74 -0
  81. package/dist/tools/payments/handlers.d.ts +7 -0
  82. package/dist/tools/payments/handlers.js +28 -0
  83. package/dist/tools/payments/index.d.ts +6 -0
  84. package/dist/tools/payments/index.js +5 -0
  85. package/dist/tools/payroll/definitions.d.ts +15 -0
  86. package/dist/tools/payroll/definitions.js +239 -0
  87. package/dist/tools/payroll/handlers.d.ts +14 -0
  88. package/dist/tools/payroll/handlers.js +152 -0
  89. package/dist/tools/payroll/index.d.ts +16 -0
  90. package/dist/tools/payroll/index.js +16 -0
  91. package/dist/tools/projects/definitions.d.ts +7 -0
  92. package/dist/tools/projects/definitions.js +430 -0
  93. package/dist/tools/projects/handlers.d.ts +7 -0
  94. package/dist/tools/projects/handlers.js +127 -0
  95. package/dist/tools/projects/index.d.ts +6 -0
  96. package/dist/tools/projects/index.js +6 -0
  97. package/dist/tools/purchase/definitions.d.ts +6 -0
  98. package/dist/tools/purchase/definitions.js +381 -0
  99. package/dist/tools/purchase/handlers.d.ts +7 -0
  100. package/dist/tools/purchase/handlers.js +120 -0
  101. package/dist/tools/purchase/index.d.ts +7 -0
  102. package/dist/tools/purchase/index.js +6 -0
  103. package/dist/tools/quotes/definitions.d.ts +6 -0
  104. package/dist/tools/quotes/definitions.js +174 -0
  105. package/dist/tools/quotes/handlers.d.ts +7 -0
  106. package/dist/tools/quotes/handlers.js +79 -0
  107. package/dist/tools/quotes/index.d.ts +6 -0
  108. package/dist/tools/quotes/index.js +5 -0
  109. package/dist/tools/reference/definitions.d.ts +7 -0
  110. package/dist/tools/reference/definitions.js +421 -0
  111. package/dist/tools/reference/handlers.d.ts +7 -0
  112. package/dist/tools/reference/handlers.js +161 -0
  113. package/dist/tools/reference/index.d.ts +6 -0
  114. package/dist/tools/reference/index.js +6 -0
  115. package/dist/tools/reminders/definitions.d.ts +6 -0
  116. package/dist/tools/reminders/definitions.js +132 -0
  117. package/dist/tools/reminders/handlers.d.ts +7 -0
  118. package/dist/tools/reminders/handlers.js +43 -0
  119. package/dist/tools/reminders/index.d.ts +6 -0
  120. package/dist/tools/reminders/index.js +5 -0
  121. package/dist/tools/reports/definitions.d.ts +6 -0
  122. package/dist/tools/reports/definitions.js +133 -0
  123. package/dist/tools/reports/handlers.d.ts +7 -0
  124. package/dist/tools/reports/handlers.js +33 -0
  125. package/dist/tools/reports/index.d.ts +6 -0
  126. package/dist/tools/reports/index.js +5 -0
  127. package/dist/tools/timetracking/definitions.d.ts +9 -0
  128. package/dist/tools/timetracking/definitions.js +226 -0
  129. package/dist/tools/timetracking/handlers.d.ts +9 -0
  130. package/dist/tools/timetracking/handlers.js +88 -0
  131. package/dist/tools/timetracking/index.d.ts +6 -0
  132. package/dist/tools/timetracking/index.js +6 -0
  133. package/dist/tools/users/definitions.d.ts +6 -0
  134. package/dist/tools/users/definitions.js +93 -0
  135. package/dist/tools/users/handlers.d.ts +7 -0
  136. package/dist/tools/users/handlers.js +35 -0
  137. package/dist/tools/users/index.d.ts +6 -0
  138. package/dist/tools/users/index.js +5 -0
  139. package/dist/transports/http.d.ts +17 -0
  140. package/dist/transports/http.js +203 -0
  141. package/dist/transports/index.d.ts +4 -0
  142. package/dist/transports/index.js +4 -0
  143. package/dist/types/common.d.ts +32 -0
  144. package/dist/types/common.js +11 -0
  145. package/dist/types/index.d.ts +9 -0
  146. package/dist/types/index.js +11 -0
  147. package/dist/types/schemas/accounting.d.ts +225 -0
  148. package/dist/types/schemas/accounting.js +96 -0
  149. package/dist/types/schemas/banking.d.ts +207 -0
  150. package/dist/types/schemas/banking.js +86 -0
  151. package/dist/types/schemas/company.d.ts +44 -0
  152. package/dist/types/schemas/company.js +23 -0
  153. package/dist/types/schemas/contacts.d.ts +104 -0
  154. package/dist/types/schemas/contacts.js +42 -0
  155. package/dist/types/schemas/deliveries.d.ts +40 -0
  156. package/dist/types/schemas/deliveries.js +22 -0
  157. package/dist/types/schemas/files.d.ts +152 -0
  158. package/dist/types/schemas/files.js +64 -0
  159. package/dist/types/schemas/index.d.ts +24 -0
  160. package/dist/types/schemas/index.js +44 -0
  161. package/dist/types/schemas/invoices.d.ts +594 -0
  162. package/dist/types/schemas/invoices.js +109 -0
  163. package/dist/types/schemas/items.d.ts +153 -0
  164. package/dist/types/schemas/items.js +43 -0
  165. package/dist/types/schemas/misc.d.ts +64 -0
  166. package/dist/types/schemas/misc.js +36 -0
  167. package/dist/types/schemas/orders.d.ts +657 -0
  168. package/dist/types/schemas/orders.js +101 -0
  169. package/dist/types/schemas/payments.d.ts +46 -0
  170. package/dist/types/schemas/payments.js +24 -0
  171. package/dist/types/schemas/payroll.d.ts +146 -0
  172. package/dist/types/schemas/payroll.js +65 -0
  173. package/dist/types/schemas/projects.d.ts +268 -0
  174. package/dist/types/schemas/projects.js +102 -0
  175. package/dist/types/schemas/purchase.d.ts +228 -0
  176. package/dist/types/schemas/purchase.js +114 -0
  177. package/dist/types/schemas/quotes.d.ts +102 -0
  178. package/dist/types/schemas/quotes.js +49 -0
  179. package/dist/types/schemas/reference.d.ts +240 -0
  180. package/dist/types/schemas/reference.js +99 -0
  181. package/dist/types/schemas/reminders.d.ts +76 -0
  182. package/dist/types/schemas/reminders.js +38 -0
  183. package/dist/types/schemas/reports.d.ts +69 -0
  184. package/dist/types/schemas/reports.js +36 -0
  185. package/dist/types/schemas/timetracking.d.ts +150 -0
  186. package/dist/types/schemas/timetracking.js +68 -0
  187. package/dist/types/schemas/users.d.ts +51 -0
  188. package/dist/types/schemas/users.js +27 -0
  189. package/dist/ui/contact-card/mcp-app.d.ts +1 -0
  190. package/dist/ui/contact-card/mcp-app.js +108 -0
  191. package/dist/ui/dashboard/mcp-app.d.ts +1 -0
  192. package/dist/ui/dashboard/mcp-app.js +81 -0
  193. package/dist/ui/invoice-preview/mcp-app.d.ts +1 -0
  194. package/dist/ui/invoice-preview/mcp-app.js +96 -0
  195. package/dist/ui-resources.d.ts +17 -0
  196. package/dist/ui-resources.js +124 -0
  197. package/dist/vite.config.d.ts +2 -0
  198. package/dist/vite.config.js +46 -0
  199. package/package.json +78 -0
@@ -0,0 +1,152 @@
1
+ /**
2
+ * Files and Additional Addresses Zod schemas and types.
3
+ * Domain: Files (file) and Additional Addresses (contact/{id}/additional_address)
4
+ */
5
+ import { z } from "zod";
6
+ export declare const ListFilesParamsSchema: 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 ListFilesParams = z.infer<typeof ListFilesParamsSchema>;
17
+ export declare const GetFileParamsSchema: z.ZodObject<{
18
+ file_id: z.ZodNumber;
19
+ }, "strip", z.ZodTypeAny, {
20
+ file_id: number;
21
+ }, {
22
+ file_id: number;
23
+ }>;
24
+ export type GetFileParams = z.infer<typeof GetFileParamsSchema>;
25
+ export declare const UploadFileParamsSchema: z.ZodObject<{
26
+ name: z.ZodString;
27
+ content_base64: z.ZodString;
28
+ content_type: z.ZodString;
29
+ }, "strip", z.ZodTypeAny, {
30
+ name: string;
31
+ content_base64: string;
32
+ content_type: string;
33
+ }, {
34
+ name: string;
35
+ content_base64: string;
36
+ content_type: string;
37
+ }>;
38
+ export type UploadFileParams = z.infer<typeof UploadFileParamsSchema>;
39
+ export declare const DownloadFileParamsSchema: z.ZodObject<{
40
+ file_id: z.ZodNumber;
41
+ }, "strip", z.ZodTypeAny, {
42
+ file_id: number;
43
+ }, {
44
+ file_id: number;
45
+ }>;
46
+ export type DownloadFileParams = z.infer<typeof DownloadFileParamsSchema>;
47
+ export declare const UpdateFileParamsSchema: z.ZodObject<{
48
+ file_id: z.ZodNumber;
49
+ file_data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
50
+ }, "strip", z.ZodTypeAny, {
51
+ file_id: number;
52
+ file_data: Record<string, unknown>;
53
+ }, {
54
+ file_id: number;
55
+ file_data: Record<string, unknown>;
56
+ }>;
57
+ export type UpdateFileParams = z.infer<typeof UpdateFileParamsSchema>;
58
+ export declare const DeleteFileParamsSchema: z.ZodObject<{
59
+ file_id: z.ZodNumber;
60
+ }, "strip", z.ZodTypeAny, {
61
+ file_id: number;
62
+ }, {
63
+ file_id: number;
64
+ }>;
65
+ export type DeleteFileParams = z.infer<typeof DeleteFileParamsSchema>;
66
+ export declare const ListAdditionalAddressesParamsSchema: z.ZodObject<{
67
+ contact_id: z.ZodNumber;
68
+ limit: z.ZodDefault<z.ZodNumber>;
69
+ offset: z.ZodDefault<z.ZodNumber>;
70
+ }, "strip", z.ZodTypeAny, {
71
+ limit: number;
72
+ offset: number;
73
+ contact_id: number;
74
+ }, {
75
+ contact_id: number;
76
+ limit?: number | undefined;
77
+ offset?: number | undefined;
78
+ }>;
79
+ export type ListAdditionalAddressesParams = z.infer<typeof ListAdditionalAddressesParamsSchema>;
80
+ export declare const GetAdditionalAddressParamsSchema: z.ZodObject<{
81
+ contact_id: z.ZodNumber;
82
+ address_id: z.ZodNumber;
83
+ }, "strip", z.ZodTypeAny, {
84
+ contact_id: number;
85
+ address_id: number;
86
+ }, {
87
+ contact_id: number;
88
+ address_id: number;
89
+ }>;
90
+ export type GetAdditionalAddressParams = z.infer<typeof GetAdditionalAddressParamsSchema>;
91
+ export declare const CreateAdditionalAddressParamsSchema: z.ZodObject<{
92
+ contact_id: z.ZodNumber;
93
+ address_data: z.ZodObject<{
94
+ name: z.ZodOptional<z.ZodString>;
95
+ address: z.ZodOptional<z.ZodString>;
96
+ postcode: z.ZodOptional<z.ZodString>;
97
+ city: z.ZodOptional<z.ZodString>;
98
+ country_id: z.ZodOptional<z.ZodNumber>;
99
+ subject: z.ZodOptional<z.ZodString>;
100
+ description: z.ZodOptional<z.ZodString>;
101
+ }, "strip", z.ZodTypeAny, {
102
+ name?: string | undefined;
103
+ description?: string | undefined;
104
+ country_id?: number | undefined;
105
+ address?: string | undefined;
106
+ postcode?: string | undefined;
107
+ city?: string | undefined;
108
+ subject?: string | undefined;
109
+ }, {
110
+ name?: string | undefined;
111
+ description?: string | undefined;
112
+ country_id?: number | undefined;
113
+ address?: string | undefined;
114
+ postcode?: string | undefined;
115
+ city?: string | undefined;
116
+ subject?: string | undefined;
117
+ }>;
118
+ }, "strip", z.ZodTypeAny, {
119
+ contact_id: number;
120
+ address_data: {
121
+ name?: string | undefined;
122
+ description?: string | undefined;
123
+ country_id?: number | undefined;
124
+ address?: string | undefined;
125
+ postcode?: string | undefined;
126
+ city?: string | undefined;
127
+ subject?: string | undefined;
128
+ };
129
+ }, {
130
+ contact_id: number;
131
+ address_data: {
132
+ name?: string | undefined;
133
+ description?: string | undefined;
134
+ country_id?: number | undefined;
135
+ address?: string | undefined;
136
+ postcode?: string | undefined;
137
+ city?: string | undefined;
138
+ subject?: string | undefined;
139
+ };
140
+ }>;
141
+ export type CreateAdditionalAddressParams = z.infer<typeof CreateAdditionalAddressParamsSchema>;
142
+ export declare const DeleteAdditionalAddressParamsSchema: z.ZodObject<{
143
+ contact_id: z.ZodNumber;
144
+ address_id: z.ZodNumber;
145
+ }, "strip", z.ZodTypeAny, {
146
+ contact_id: number;
147
+ address_id: number;
148
+ }, {
149
+ contact_id: number;
150
+ address_id: number;
151
+ }>;
152
+ export type DeleteAdditionalAddressParams = z.infer<typeof DeleteAdditionalAddressParamsSchema>;
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Files and Additional Addresses Zod schemas and types.
3
+ * Domain: Files (file) and Additional Addresses (contact/{id}/additional_address)
4
+ */
5
+ import { z } from "zod";
6
+ // ===== FILES =====
7
+ // List files
8
+ export const ListFilesParamsSchema = z.object({
9
+ limit: z.number().int().positive().default(50),
10
+ offset: z.number().int().min(0).default(0),
11
+ });
12
+ // Get single file
13
+ export const GetFileParamsSchema = z.object({
14
+ file_id: z.number().int().positive(),
15
+ });
16
+ // Upload file (accepts base64 content for MCP JSON transport)
17
+ export const UploadFileParamsSchema = z.object({
18
+ name: z.string().min(1),
19
+ content_base64: z.string().min(1),
20
+ content_type: z.string().min(1),
21
+ });
22
+ // Download file
23
+ export const DownloadFileParamsSchema = z.object({
24
+ file_id: z.number().int().positive(),
25
+ });
26
+ // Update file
27
+ export const UpdateFileParamsSchema = z.object({
28
+ file_id: z.number().int().positive(),
29
+ file_data: z.record(z.unknown()),
30
+ });
31
+ // Delete file
32
+ export const DeleteFileParamsSchema = z.object({
33
+ file_id: z.number().int().positive(),
34
+ });
35
+ // ===== ADDITIONAL ADDRESSES =====
36
+ // List additional addresses for a contact
37
+ export const ListAdditionalAddressesParamsSchema = z.object({
38
+ contact_id: z.number().int().positive(),
39
+ limit: z.number().int().positive().default(50),
40
+ offset: z.number().int().min(0).default(0),
41
+ });
42
+ // Get single additional address
43
+ export const GetAdditionalAddressParamsSchema = z.object({
44
+ contact_id: z.number().int().positive(),
45
+ address_id: z.number().int().positive(),
46
+ });
47
+ // Create additional address
48
+ export const CreateAdditionalAddressParamsSchema = z.object({
49
+ contact_id: z.number().int().positive(),
50
+ address_data: z.object({
51
+ name: z.string().optional(),
52
+ address: z.string().optional(),
53
+ postcode: z.string().optional(),
54
+ city: z.string().optional(),
55
+ country_id: z.number().int().positive().optional(),
56
+ subject: z.string().optional(),
57
+ description: z.string().optional(),
58
+ }),
59
+ });
60
+ // Delete additional address
61
+ export const DeleteAdditionalAddressParamsSchema = z.object({
62
+ contact_id: z.number().int().positive(),
63
+ address_id: z.number().int().positive(),
64
+ });
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Barrel export for all domain schemas.
3
+ * Import from this file for easy access to all schemas.
4
+ */
5
+ export * from "./contacts.js";
6
+ export * from "./invoices.js";
7
+ export * from "./orders.js";
8
+ export * from "./quotes.js";
9
+ export * from "./payments.js";
10
+ export * from "./reminders.js";
11
+ export * from "./deliveries.js";
12
+ export * from "./items.js";
13
+ export * from "./reports.js";
14
+ export * from "./users.js";
15
+ export * from "./misc.js";
16
+ export * from "./reference.js";
17
+ export * from "./company.js";
18
+ export * from "./banking.js";
19
+ export * from "./projects.js";
20
+ export * from "./timetracking.js";
21
+ export * from "./accounting.js";
22
+ export * from "./purchase.js";
23
+ export * from "./files.js";
24
+ export * from "./payroll.js";
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Barrel export for all domain schemas.
3
+ * Import from this file for easy access to all schemas.
4
+ */
5
+ // Contacts
6
+ export * from "./contacts.js";
7
+ // Invoices
8
+ export * from "./invoices.js";
9
+ // Orders
10
+ export * from "./orders.js";
11
+ // Quotes
12
+ export * from "./quotes.js";
13
+ // Payments
14
+ export * from "./payments.js";
15
+ // Reminders
16
+ export * from "./reminders.js";
17
+ // Deliveries
18
+ export * from "./deliveries.js";
19
+ // Items and Taxes
20
+ export * from "./items.js";
21
+ // Reports
22
+ export * from "./reports.js";
23
+ // Users
24
+ export * from "./users.js";
25
+ // Misc (Comments, Contact Relations)
26
+ export * from "./misc.js";
27
+ // Reference Data (Contact Groups, Sectors, Salutations, Titles, Countries, Languages, Units)
28
+ export * from "./reference.js";
29
+ // Company (Company Profile, Permissions, Payment Types)
30
+ export * from "./company.js";
31
+ // Banking (Bank Accounts, Currencies, IBAN Payments, QR Payments)
32
+ export * from "./banking.js";
33
+ // Projects (Projects, Project Types, Project Statuses)
34
+ export * from "./projects.js";
35
+ // Time Tracking (Timesheets, Statuses, Business Activities, Communication Types)
36
+ export * from "./timetracking.js";
37
+ // Accounting (Accounts, Account Groups, Years, Manual Entries, VAT, Journal)
38
+ export * from "./accounting.js";
39
+ // Purchase (Bills, Expenses)
40
+ export * from "./purchase.js";
41
+ // Files (Files, Additional Addresses)
42
+ export * from "./files.js";
43
+ // Payroll (Employees, Absences, Payroll Documents - conditional module)
44
+ export * from "./payroll.js";