@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,7 @@
1
+ /**
2
+ * Reference data tool handlers.
3
+ * Implements the logic for each reference data tool.
4
+ */
5
+ import { BexioClient } from "../../bexio-client.js";
6
+ export type HandlerFn = (client: BexioClient, args: unknown) => Promise<unknown>;
7
+ export declare const handlers: Record<string, HandlerFn>;
@@ -0,0 +1,161 @@
1
+ /**
2
+ * Reference data tool handlers.
3
+ * Implements the logic for each reference data tool.
4
+ */
5
+ import { McpError } from "../../shared/errors.js";
6
+ import {
7
+ // Contact Groups
8
+ ListContactGroupsParamsSchema, GetContactGroupParamsSchema, CreateContactGroupParamsSchema, DeleteContactGroupParamsSchema,
9
+ // Contact Sectors
10
+ ListContactSectorsParamsSchema, GetContactSectorParamsSchema, CreateContactSectorParamsSchema,
11
+ // Salutations
12
+ ListSalutationsParamsSchema, GetSalutationParamsSchema, CreateSalutationParamsSchema, DeleteSalutationParamsSchema,
13
+ // Titles
14
+ ListTitlesParamsSchema, GetTitleParamsSchema, CreateTitleParamsSchema, DeleteTitleParamsSchema,
15
+ // Countries
16
+ ListCountriesParamsSchema, GetCountryParamsSchema, CreateCountryParamsSchema, DeleteCountryParamsSchema,
17
+ // Languages
18
+ ListLanguagesParamsSchema, GetLanguageParamsSchema, CreateLanguageParamsSchema,
19
+ // Units
20
+ ListUnitsParamsSchema, GetUnitParamsSchema, CreateUnitParamsSchema, DeleteUnitParamsSchema, } from "../../types/index.js";
21
+ export const handlers = {
22
+ // ===== CONTACT GROUPS (REFDATA-01) =====
23
+ list_contact_groups: async (client, args) => {
24
+ const params = ListContactGroupsParamsSchema.parse(args);
25
+ return client.listContactGroups(params);
26
+ },
27
+ get_contact_group: async (client, args) => {
28
+ const { group_id } = GetContactGroupParamsSchema.parse(args);
29
+ const group = await client.getContactGroup(group_id);
30
+ if (!group) {
31
+ throw McpError.notFound("Contact Group", group_id);
32
+ }
33
+ return group;
34
+ },
35
+ create_contact_group: async (client, args) => {
36
+ const { name } = CreateContactGroupParamsSchema.parse(args);
37
+ return client.createContactGroup({ name });
38
+ },
39
+ delete_contact_group: async (client, args) => {
40
+ const { group_id } = DeleteContactGroupParamsSchema.parse(args);
41
+ return client.deleteContactGroup(group_id);
42
+ },
43
+ // ===== CONTACT SECTORS (REFDATA-02) =====
44
+ list_contact_sectors: async (client, args) => {
45
+ const params = ListContactSectorsParamsSchema.parse(args);
46
+ return client.listContactSectors(params);
47
+ },
48
+ get_contact_sector: async (client, args) => {
49
+ const { sector_id } = GetContactSectorParamsSchema.parse(args);
50
+ const sector = await client.getContactSector(sector_id);
51
+ if (!sector) {
52
+ throw McpError.notFound("Contact Sector", sector_id);
53
+ }
54
+ return sector;
55
+ },
56
+ create_contact_sector: async (client, args) => {
57
+ const { name } = CreateContactSectorParamsSchema.parse(args);
58
+ return client.createContactSector({ name });
59
+ },
60
+ // ===== SALUTATIONS (REFDATA-03) =====
61
+ list_salutations: async (client, args) => {
62
+ const params = ListSalutationsParamsSchema.parse(args);
63
+ return client.listSalutations(params);
64
+ },
65
+ get_salutation: async (client, args) => {
66
+ const { salutation_id } = GetSalutationParamsSchema.parse(args);
67
+ const salutation = await client.getSalutation(salutation_id);
68
+ if (!salutation) {
69
+ throw McpError.notFound("Salutation", salutation_id);
70
+ }
71
+ return salutation;
72
+ },
73
+ create_salutation: async (client, args) => {
74
+ const { name } = CreateSalutationParamsSchema.parse(args);
75
+ return client.createSalutation({ name });
76
+ },
77
+ delete_salutation: async (client, args) => {
78
+ const { salutation_id } = DeleteSalutationParamsSchema.parse(args);
79
+ return client.deleteSalutation(salutation_id);
80
+ },
81
+ // ===== TITLES (REFDATA-04) =====
82
+ list_titles: async (client, args) => {
83
+ const params = ListTitlesParamsSchema.parse(args);
84
+ return client.listTitles(params);
85
+ },
86
+ get_title: async (client, args) => {
87
+ const { title_id } = GetTitleParamsSchema.parse(args);
88
+ const title = await client.getTitle(title_id);
89
+ if (!title) {
90
+ throw McpError.notFound("Title", title_id);
91
+ }
92
+ return title;
93
+ },
94
+ create_title: async (client, args) => {
95
+ const { name } = CreateTitleParamsSchema.parse(args);
96
+ return client.createTitle({ name });
97
+ },
98
+ delete_title: async (client, args) => {
99
+ const { title_id } = DeleteTitleParamsSchema.parse(args);
100
+ return client.deleteTitle(title_id);
101
+ },
102
+ // ===== COUNTRIES (REFDATA-05) =====
103
+ list_countries: async (client, args) => {
104
+ const params = ListCountriesParamsSchema.parse(args);
105
+ return client.listCountries(params);
106
+ },
107
+ get_country: async (client, args) => {
108
+ const { country_id } = GetCountryParamsSchema.parse(args);
109
+ const country = await client.getCountry(country_id);
110
+ if (!country) {
111
+ throw McpError.notFound("Country", country_id);
112
+ }
113
+ return country;
114
+ },
115
+ create_country: async (client, args) => {
116
+ const { name, iso_3166_alpha2 } = CreateCountryParamsSchema.parse(args);
117
+ return client.createCountry({ name, iso_3166_alpha2 });
118
+ },
119
+ delete_country: async (client, args) => {
120
+ const { country_id } = DeleteCountryParamsSchema.parse(args);
121
+ return client.deleteCountry(country_id);
122
+ },
123
+ // ===== LANGUAGES (REFDATA-06) =====
124
+ list_languages: async (client, args) => {
125
+ const params = ListLanguagesParamsSchema.parse(args);
126
+ return client.listLanguages(params);
127
+ },
128
+ get_language: async (client, args) => {
129
+ const { language_id } = GetLanguageParamsSchema.parse(args);
130
+ const language = await client.getLanguage(language_id);
131
+ if (!language) {
132
+ throw McpError.notFound("Language", language_id);
133
+ }
134
+ return language;
135
+ },
136
+ create_language: async (client, args) => {
137
+ const { name, iso_639_1 } = CreateLanguageParamsSchema.parse(args);
138
+ return client.createLanguage({ name, iso_639_1 });
139
+ },
140
+ // ===== UNITS (REFDATA-07) =====
141
+ list_units: async (client, args) => {
142
+ const params = ListUnitsParamsSchema.parse(args);
143
+ return client.listUnits(params);
144
+ },
145
+ get_unit: async (client, args) => {
146
+ const { unit_id } = GetUnitParamsSchema.parse(args);
147
+ const unit = await client.getUnit(unit_id);
148
+ if (!unit) {
149
+ throw McpError.notFound("Unit", unit_id);
150
+ }
151
+ return unit;
152
+ },
153
+ create_unit: async (client, args) => {
154
+ const { name } = CreateUnitParamsSchema.parse(args);
155
+ return client.createUnit({ name });
156
+ },
157
+ delete_unit: async (client, args) => {
158
+ const { unit_id } = DeleteUnitParamsSchema.parse(args);
159
+ return client.deleteUnit(unit_id);
160
+ },
161
+ };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Reference data domain barrel export.
3
+ * Exports tool definitions and handlers for reference data domain.
4
+ */
5
+ export { toolDefinitions } from "./definitions.js";
6
+ export { handlers } from "./handlers.js";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Reference data domain barrel export.
3
+ * Exports tool definitions and handlers for reference data domain.
4
+ */
5
+ export { toolDefinitions } from "./definitions.js";
6
+ export { handlers } from "./handlers.js";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Reminder tool definitions.
3
+ * Contains MCP tool metadata for reminders/Mahnungen domain.
4
+ */
5
+ import type { Tool } from "@modelcontextprotocol/sdk/types.js";
6
+ export declare const toolDefinitions: Tool[];
@@ -0,0 +1,132 @@
1
+ /**
2
+ * Reminder tool definitions.
3
+ * Contains MCP tool metadata for reminders/Mahnungen domain.
4
+ */
5
+ export const toolDefinitions = [
6
+ {
7
+ name: "list_reminders",
8
+ description: "List reminders for a specific invoice",
9
+ inputSchema: {
10
+ type: "object",
11
+ properties: {
12
+ invoice_id: {
13
+ type: "integer",
14
+ description: "The ID of the invoice to get reminders for",
15
+ },
16
+ },
17
+ required: ["invoice_id"],
18
+ },
19
+ },
20
+ {
21
+ name: "get_reminder",
22
+ description: "Get a specific reminder by ID",
23
+ inputSchema: {
24
+ type: "object",
25
+ properties: {
26
+ invoice_id: {
27
+ type: "integer",
28
+ description: "The ID of the invoice",
29
+ },
30
+ reminder_id: {
31
+ type: "integer",
32
+ description: "The ID of the reminder to retrieve",
33
+ },
34
+ },
35
+ required: ["invoice_id", "reminder_id"],
36
+ },
37
+ },
38
+ {
39
+ name: "create_reminder",
40
+ description: "Create a new reminder for an invoice",
41
+ inputSchema: {
42
+ type: "object",
43
+ properties: {
44
+ invoice_id: {
45
+ type: "integer",
46
+ description: "The ID of the invoice to create a reminder for",
47
+ },
48
+ reminder_data: {
49
+ type: "object",
50
+ description: "Reminder data to create",
51
+ },
52
+ },
53
+ required: ["invoice_id", "reminder_data"],
54
+ },
55
+ },
56
+ {
57
+ name: "delete_reminder",
58
+ description: "Delete a reminder",
59
+ inputSchema: {
60
+ type: "object",
61
+ properties: {
62
+ invoice_id: {
63
+ type: "integer",
64
+ description: "The ID of the invoice",
65
+ },
66
+ reminder_id: {
67
+ type: "integer",
68
+ description: "The ID of the reminder to delete",
69
+ },
70
+ },
71
+ required: ["invoice_id", "reminder_id"],
72
+ },
73
+ },
74
+ {
75
+ name: "mark_reminder_as_sent",
76
+ description: "Mark a reminder as sent",
77
+ inputSchema: {
78
+ type: "object",
79
+ properties: {
80
+ invoice_id: {
81
+ type: "integer",
82
+ description: "The ID of the invoice",
83
+ },
84
+ reminder_id: {
85
+ type: "integer",
86
+ description: "The ID of the reminder to mark as sent",
87
+ },
88
+ },
89
+ required: ["invoice_id", "reminder_id"],
90
+ },
91
+ },
92
+ {
93
+ name: "send_reminder",
94
+ description: "Send a reminder",
95
+ inputSchema: {
96
+ type: "object",
97
+ properties: {
98
+ invoice_id: {
99
+ type: "integer",
100
+ description: "The ID of the invoice",
101
+ },
102
+ reminder_id: {
103
+ type: "integer",
104
+ description: "The ID of the reminder to send",
105
+ },
106
+ },
107
+ required: ["invoice_id", "reminder_id"],
108
+ },
109
+ },
110
+ {
111
+ name: "search_reminders",
112
+ description: "Search reminders with filters",
113
+ inputSchema: {
114
+ type: "object",
115
+ properties: {
116
+ search_params: {
117
+ type: "object",
118
+ description: "Search parameters for reminders",
119
+ },
120
+ },
121
+ required: ["search_params"],
122
+ },
123
+ },
124
+ {
125
+ name: "get_reminders_sent_this_week",
126
+ description: "Get all reminders sent this week",
127
+ inputSchema: {
128
+ type: "object",
129
+ properties: {},
130
+ },
131
+ },
132
+ ];
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Reminder tool handlers.
3
+ * Implements the logic for each reminder tool.
4
+ */
5
+ import { BexioClient } from "../../bexio-client.js";
6
+ export type HandlerFn = (client: BexioClient, args: unknown) => Promise<unknown>;
7
+ export declare const handlers: Record<string, HandlerFn>;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Reminder tool handlers.
3
+ * Implements the logic for each reminder tool.
4
+ */
5
+ import { McpError } from "../../shared/errors.js";
6
+ import { ListRemindersParamsSchema, GetReminderParamsSchema, CreateReminderParamsSchema, DeleteReminderParamsSchema, MarkReminderAsSentParamsSchema, SendReminderParamsSchema, SearchRemindersParamsSchema, } from "../../types/index.js";
7
+ export const handlers = {
8
+ list_reminders: async (client, args) => {
9
+ const { invoice_id } = ListRemindersParamsSchema.parse(args);
10
+ return client.listReminders(invoice_id);
11
+ },
12
+ get_reminder: async (client, args) => {
13
+ const { invoice_id, reminder_id } = GetReminderParamsSchema.parse(args);
14
+ const reminder = await client.getReminder(invoice_id, reminder_id);
15
+ if (!reminder) {
16
+ throw McpError.notFound("Reminder", reminder_id);
17
+ }
18
+ return reminder;
19
+ },
20
+ create_reminder: async (client, args) => {
21
+ const { invoice_id, reminder_data } = CreateReminderParamsSchema.parse(args);
22
+ return client.createReminder(invoice_id, reminder_data);
23
+ },
24
+ delete_reminder: async (client, args) => {
25
+ const { invoice_id, reminder_id } = DeleteReminderParamsSchema.parse(args);
26
+ return client.deleteReminder(invoice_id, reminder_id);
27
+ },
28
+ mark_reminder_as_sent: async (client, args) => {
29
+ const { invoice_id, reminder_id } = MarkReminderAsSentParamsSchema.parse(args);
30
+ return client.markReminderAsSent(invoice_id, reminder_id);
31
+ },
32
+ send_reminder: async (client, args) => {
33
+ const { invoice_id, reminder_id } = SendReminderParamsSchema.parse(args);
34
+ return client.sendReminder(invoice_id, reminder_id);
35
+ },
36
+ search_reminders: async (client, args) => {
37
+ const { search_params } = SearchRemindersParamsSchema.parse(args);
38
+ return client.searchReminders(search_params);
39
+ },
40
+ get_reminders_sent_this_week: async (client) => {
41
+ return client.getRemindersSentThisWeek();
42
+ },
43
+ };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Reminders domain module barrel export.
3
+ */
4
+ export { toolDefinitions } from "./definitions.js";
5
+ export { handlers } from "./handlers.js";
6
+ export type { HandlerFn } from "./handlers.js";
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Reminders domain module barrel export.
3
+ */
4
+ export { toolDefinitions } from "./definitions.js";
5
+ export { handlers } from "./handlers.js";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Report tool definitions.
3
+ * Contains MCP tool metadata for reports and business intelligence domain.
4
+ */
5
+ import type { Tool } from "@modelcontextprotocol/sdk/types.js";
6
+ export declare const toolDefinitions: Tool[];
@@ -0,0 +1,133 @@
1
+ /**
2
+ * Report tool definitions.
3
+ * Contains MCP tool metadata for reports and business intelligence domain.
4
+ */
5
+ export const toolDefinitions = [
6
+ {
7
+ name: "get_revenue_report",
8
+ description: "Get revenue report for a specific period",
9
+ inputSchema: {
10
+ type: "object",
11
+ properties: {
12
+ start_date: {
13
+ type: "string",
14
+ format: "date",
15
+ description: "Start date for the report (YYYY-MM-DD)",
16
+ },
17
+ end_date: {
18
+ type: "string",
19
+ format: "date",
20
+ description: "End date for the report (YYYY-MM-DD)",
21
+ },
22
+ group_by: {
23
+ type: "string",
24
+ description: "Group by field (optional)",
25
+ },
26
+ },
27
+ required: ["start_date", "end_date"],
28
+ },
29
+ },
30
+ {
31
+ name: "get_customer_revenue_report",
32
+ description: "Get customer revenue report for a specific period",
33
+ inputSchema: {
34
+ type: "object",
35
+ properties: {
36
+ start_date: {
37
+ type: "string",
38
+ format: "date",
39
+ description: "Start date for the report (YYYY-MM-DD)",
40
+ },
41
+ end_date: {
42
+ type: "string",
43
+ format: "date",
44
+ description: "End date for the report (YYYY-MM-DD)",
45
+ },
46
+ limit: {
47
+ type: "integer",
48
+ description: "Maximum number of customers to return (default: 10)",
49
+ default: 10,
50
+ },
51
+ },
52
+ required: ["start_date", "end_date"],
53
+ },
54
+ },
55
+ {
56
+ name: "get_invoice_status_report",
57
+ description: "Get invoice status report for a specific period",
58
+ inputSchema: {
59
+ type: "object",
60
+ properties: {
61
+ start_date: {
62
+ type: "string",
63
+ format: "date",
64
+ description: "Start date for the report (YYYY-MM-DD)",
65
+ },
66
+ end_date: {
67
+ type: "string",
68
+ format: "date",
69
+ description: "End date for the report (YYYY-MM-DD)",
70
+ },
71
+ },
72
+ required: ["start_date", "end_date"],
73
+ },
74
+ },
75
+ {
76
+ name: "get_overdue_invoices_report",
77
+ description: "Get overdue invoices report",
78
+ inputSchema: {
79
+ type: "object",
80
+ properties: {},
81
+ },
82
+ },
83
+ {
84
+ name: "get_monthly_revenue_report",
85
+ description: "Get monthly revenue report for a specific month",
86
+ inputSchema: {
87
+ type: "object",
88
+ properties: {
89
+ year: {
90
+ type: "integer",
91
+ description: "Year for the report",
92
+ },
93
+ month: {
94
+ type: "integer",
95
+ description: "Month for the report (1-12)",
96
+ },
97
+ },
98
+ required: ["year", "month"],
99
+ },
100
+ },
101
+ {
102
+ name: "get_top_customers_by_revenue",
103
+ description: "Get top customers by revenue",
104
+ inputSchema: {
105
+ type: "object",
106
+ properties: {
107
+ limit: {
108
+ type: "integer",
109
+ description: "Maximum number of customers to return (default: 10)",
110
+ default: 10,
111
+ },
112
+ start_date: {
113
+ type: "string",
114
+ format: "date",
115
+ description: "Start date for the report (YYYY-MM-DD)",
116
+ },
117
+ end_date: {
118
+ type: "string",
119
+ format: "date",
120
+ description: "End date for the report (YYYY-MM-DD)",
121
+ },
122
+ },
123
+ },
124
+ },
125
+ {
126
+ name: "get_tasks_due_this_week",
127
+ description: "Get all tasks due this week (invoices with due date this week)",
128
+ inputSchema: {
129
+ type: "object",
130
+ properties: {},
131
+ },
132
+ },
133
+ ];
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Report tool handlers.
3
+ * Implements the logic for each report and business intelligence tool.
4
+ */
5
+ import { BexioClient } from "../../bexio-client.js";
6
+ export type HandlerFn = (client: BexioClient, args: unknown) => Promise<unknown>;
7
+ export declare const handlers: Record<string, HandlerFn>;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Report tool handlers.
3
+ * Implements the logic for each report and business intelligence tool.
4
+ */
5
+ import { GetRevenueReportParamsSchema, GetCustomerRevenueReportParamsSchema, GetInvoiceStatusReportParamsSchema, GetMonthlyRevenueReportParamsSchema, GetTopCustomersByRevenueParamsSchema, } from "../../types/index.js";
6
+ export const handlers = {
7
+ get_revenue_report: async (client, args) => {
8
+ const { start_date, end_date, group_by } = GetRevenueReportParamsSchema.parse(args);
9
+ return client.getRevenueReport(start_date, end_date, group_by);
10
+ },
11
+ get_customer_revenue_report: async (client, args) => {
12
+ const { start_date, end_date, limit } = GetCustomerRevenueReportParamsSchema.parse(args);
13
+ return client.getCustomerRevenueReport(start_date, end_date, limit);
14
+ },
15
+ get_invoice_status_report: async (client, args) => {
16
+ const { start_date, end_date } = GetInvoiceStatusReportParamsSchema.parse(args);
17
+ return client.getInvoiceStatusReport(start_date, end_date);
18
+ },
19
+ get_overdue_invoices_report: async (client) => {
20
+ return client.getOverdueInvoicesReport();
21
+ },
22
+ get_monthly_revenue_report: async (client, args) => {
23
+ const { year, month } = GetMonthlyRevenueReportParamsSchema.parse(args);
24
+ return client.getMonthlyRevenueReport(year, month);
25
+ },
26
+ get_top_customers_by_revenue: async (client, args) => {
27
+ const { limit, start_date, end_date } = GetTopCustomersByRevenueParamsSchema.parse(args);
28
+ return client.getTopCustomersByRevenue(limit, start_date, end_date);
29
+ },
30
+ get_tasks_due_this_week: async (client) => {
31
+ return client.getTasksDueThisWeek();
32
+ },
33
+ };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Reports domain module barrel export.
3
+ */
4
+ export { toolDefinitions } from "./definitions.js";
5
+ export { handlers } from "./handlers.js";
6
+ export type { HandlerFn } from "./handlers.js";
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Reports domain module barrel export.
3
+ */
4
+ export { toolDefinitions } from "./definitions.js";
5
+ export { handlers } from "./handlers.js";
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Time Tracking tool definitions.
3
+ * Contains MCP tool metadata for time tracking domain.
4
+ * Includes: Timesheets, Timesheet Statuses, Business Activities, Communication Types
5
+ *
6
+ * IMPORTANT: Duration format for timesheets is "HH:MM" (e.g., "02:30" for 2.5 hours).
7
+ */
8
+ import type { Tool } from "@modelcontextprotocol/sdk/types.js";
9
+ export declare const toolDefinitions: Tool[];