@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,240 @@
1
+ /**
2
+ * Reference data Zod schemas and types.
3
+ * Domain: Reference Data (Contact Groups, Sectors, Salutations, Titles, Countries, Languages, Units)
4
+ */
5
+ import { z } from "zod";
6
+ export declare const ListContactGroupsParamsSchema: 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 ListContactGroupsParams = z.infer<typeof ListContactGroupsParamsSchema>;
17
+ export declare const GetContactGroupParamsSchema: z.ZodObject<{
18
+ group_id: z.ZodNumber;
19
+ }, "strip", z.ZodTypeAny, {
20
+ group_id: number;
21
+ }, {
22
+ group_id: number;
23
+ }>;
24
+ export type GetContactGroupParams = z.infer<typeof GetContactGroupParamsSchema>;
25
+ export declare const CreateContactGroupParamsSchema: z.ZodObject<{
26
+ name: z.ZodString;
27
+ }, "strip", z.ZodTypeAny, {
28
+ name: string;
29
+ }, {
30
+ name: string;
31
+ }>;
32
+ export type CreateContactGroupParams = z.infer<typeof CreateContactGroupParamsSchema>;
33
+ export declare const DeleteContactGroupParamsSchema: z.ZodObject<{
34
+ group_id: z.ZodNumber;
35
+ }, "strip", z.ZodTypeAny, {
36
+ group_id: number;
37
+ }, {
38
+ group_id: number;
39
+ }>;
40
+ export type DeleteContactGroupParams = z.infer<typeof DeleteContactGroupParamsSchema>;
41
+ export declare const ListContactSectorsParamsSchema: z.ZodObject<{
42
+ limit: z.ZodDefault<z.ZodNumber>;
43
+ offset: z.ZodDefault<z.ZodNumber>;
44
+ }, "strip", z.ZodTypeAny, {
45
+ limit: number;
46
+ offset: number;
47
+ }, {
48
+ limit?: number | undefined;
49
+ offset?: number | undefined;
50
+ }>;
51
+ export type ListContactSectorsParams = z.infer<typeof ListContactSectorsParamsSchema>;
52
+ export declare const GetContactSectorParamsSchema: z.ZodObject<{
53
+ sector_id: z.ZodNumber;
54
+ }, "strip", z.ZodTypeAny, {
55
+ sector_id: number;
56
+ }, {
57
+ sector_id: number;
58
+ }>;
59
+ export type GetContactSectorParams = z.infer<typeof GetContactSectorParamsSchema>;
60
+ export declare const CreateContactSectorParamsSchema: z.ZodObject<{
61
+ name: z.ZodString;
62
+ }, "strip", z.ZodTypeAny, {
63
+ name: string;
64
+ }, {
65
+ name: string;
66
+ }>;
67
+ export type CreateContactSectorParams = z.infer<typeof CreateContactSectorParamsSchema>;
68
+ export declare const ListSalutationsParamsSchema: z.ZodObject<{
69
+ limit: z.ZodDefault<z.ZodNumber>;
70
+ offset: z.ZodDefault<z.ZodNumber>;
71
+ }, "strip", z.ZodTypeAny, {
72
+ limit: number;
73
+ offset: number;
74
+ }, {
75
+ limit?: number | undefined;
76
+ offset?: number | undefined;
77
+ }>;
78
+ export type ListSalutationsParams = z.infer<typeof ListSalutationsParamsSchema>;
79
+ export declare const GetSalutationParamsSchema: z.ZodObject<{
80
+ salutation_id: z.ZodNumber;
81
+ }, "strip", z.ZodTypeAny, {
82
+ salutation_id: number;
83
+ }, {
84
+ salutation_id: number;
85
+ }>;
86
+ export type GetSalutationParams = z.infer<typeof GetSalutationParamsSchema>;
87
+ export declare const CreateSalutationParamsSchema: z.ZodObject<{
88
+ name: z.ZodString;
89
+ }, "strip", z.ZodTypeAny, {
90
+ name: string;
91
+ }, {
92
+ name: string;
93
+ }>;
94
+ export type CreateSalutationParams = z.infer<typeof CreateSalutationParamsSchema>;
95
+ export declare const DeleteSalutationParamsSchema: z.ZodObject<{
96
+ salutation_id: z.ZodNumber;
97
+ }, "strip", z.ZodTypeAny, {
98
+ salutation_id: number;
99
+ }, {
100
+ salutation_id: number;
101
+ }>;
102
+ export type DeleteSalutationParams = z.infer<typeof DeleteSalutationParamsSchema>;
103
+ export declare const ListTitlesParamsSchema: z.ZodObject<{
104
+ limit: z.ZodDefault<z.ZodNumber>;
105
+ offset: z.ZodDefault<z.ZodNumber>;
106
+ }, "strip", z.ZodTypeAny, {
107
+ limit: number;
108
+ offset: number;
109
+ }, {
110
+ limit?: number | undefined;
111
+ offset?: number | undefined;
112
+ }>;
113
+ export type ListTitlesParams = z.infer<typeof ListTitlesParamsSchema>;
114
+ export declare const GetTitleParamsSchema: z.ZodObject<{
115
+ title_id: z.ZodNumber;
116
+ }, "strip", z.ZodTypeAny, {
117
+ title_id: number;
118
+ }, {
119
+ title_id: number;
120
+ }>;
121
+ export type GetTitleParams = z.infer<typeof GetTitleParamsSchema>;
122
+ export declare const CreateTitleParamsSchema: z.ZodObject<{
123
+ name: z.ZodString;
124
+ }, "strip", z.ZodTypeAny, {
125
+ name: string;
126
+ }, {
127
+ name: string;
128
+ }>;
129
+ export type CreateTitleParams = z.infer<typeof CreateTitleParamsSchema>;
130
+ export declare const DeleteTitleParamsSchema: z.ZodObject<{
131
+ title_id: z.ZodNumber;
132
+ }, "strip", z.ZodTypeAny, {
133
+ title_id: number;
134
+ }, {
135
+ title_id: number;
136
+ }>;
137
+ export type DeleteTitleParams = z.infer<typeof DeleteTitleParamsSchema>;
138
+ export declare const ListCountriesParamsSchema: z.ZodObject<{
139
+ limit: z.ZodDefault<z.ZodNumber>;
140
+ offset: z.ZodDefault<z.ZodNumber>;
141
+ }, "strip", z.ZodTypeAny, {
142
+ limit: number;
143
+ offset: number;
144
+ }, {
145
+ limit?: number | undefined;
146
+ offset?: number | undefined;
147
+ }>;
148
+ export type ListCountriesParams = z.infer<typeof ListCountriesParamsSchema>;
149
+ export declare const GetCountryParamsSchema: z.ZodObject<{
150
+ country_id: z.ZodNumber;
151
+ }, "strip", z.ZodTypeAny, {
152
+ country_id: number;
153
+ }, {
154
+ country_id: number;
155
+ }>;
156
+ export type GetCountryParams = z.infer<typeof GetCountryParamsSchema>;
157
+ export declare const CreateCountryParamsSchema: z.ZodObject<{
158
+ name: z.ZodString;
159
+ iso_3166_alpha2: z.ZodString;
160
+ }, "strip", z.ZodTypeAny, {
161
+ name: string;
162
+ iso_3166_alpha2: string;
163
+ }, {
164
+ name: string;
165
+ iso_3166_alpha2: string;
166
+ }>;
167
+ export type CreateCountryParams = z.infer<typeof CreateCountryParamsSchema>;
168
+ export declare const DeleteCountryParamsSchema: z.ZodObject<{
169
+ country_id: z.ZodNumber;
170
+ }, "strip", z.ZodTypeAny, {
171
+ country_id: number;
172
+ }, {
173
+ country_id: number;
174
+ }>;
175
+ export type DeleteCountryParams = z.infer<typeof DeleteCountryParamsSchema>;
176
+ export declare const ListLanguagesParamsSchema: z.ZodObject<{
177
+ limit: z.ZodDefault<z.ZodNumber>;
178
+ offset: z.ZodDefault<z.ZodNumber>;
179
+ }, "strip", z.ZodTypeAny, {
180
+ limit: number;
181
+ offset: number;
182
+ }, {
183
+ limit?: number | undefined;
184
+ offset?: number | undefined;
185
+ }>;
186
+ export type ListLanguagesParams = z.infer<typeof ListLanguagesParamsSchema>;
187
+ export declare const GetLanguageParamsSchema: z.ZodObject<{
188
+ language_id: z.ZodNumber;
189
+ }, "strip", z.ZodTypeAny, {
190
+ language_id: number;
191
+ }, {
192
+ language_id: number;
193
+ }>;
194
+ export type GetLanguageParams = z.infer<typeof GetLanguageParamsSchema>;
195
+ export declare const CreateLanguageParamsSchema: z.ZodObject<{
196
+ name: z.ZodString;
197
+ iso_639_1: z.ZodString;
198
+ }, "strip", z.ZodTypeAny, {
199
+ name: string;
200
+ iso_639_1: string;
201
+ }, {
202
+ name: string;
203
+ iso_639_1: string;
204
+ }>;
205
+ export type CreateLanguageParams = z.infer<typeof CreateLanguageParamsSchema>;
206
+ export declare const ListUnitsParamsSchema: z.ZodObject<{
207
+ limit: z.ZodDefault<z.ZodNumber>;
208
+ offset: z.ZodDefault<z.ZodNumber>;
209
+ }, "strip", z.ZodTypeAny, {
210
+ limit: number;
211
+ offset: number;
212
+ }, {
213
+ limit?: number | undefined;
214
+ offset?: number | undefined;
215
+ }>;
216
+ export type ListUnitsParams = z.infer<typeof ListUnitsParamsSchema>;
217
+ export declare const GetUnitParamsSchema: z.ZodObject<{
218
+ unit_id: z.ZodNumber;
219
+ }, "strip", z.ZodTypeAny, {
220
+ unit_id: number;
221
+ }, {
222
+ unit_id: number;
223
+ }>;
224
+ export type GetUnitParams = z.infer<typeof GetUnitParamsSchema>;
225
+ export declare const CreateUnitParamsSchema: z.ZodObject<{
226
+ name: z.ZodString;
227
+ }, "strip", z.ZodTypeAny, {
228
+ name: string;
229
+ }, {
230
+ name: string;
231
+ }>;
232
+ export type CreateUnitParams = z.infer<typeof CreateUnitParamsSchema>;
233
+ export declare const DeleteUnitParamsSchema: z.ZodObject<{
234
+ unit_id: z.ZodNumber;
235
+ }, "strip", z.ZodTypeAny, {
236
+ unit_id: number;
237
+ }, {
238
+ unit_id: number;
239
+ }>;
240
+ export type DeleteUnitParams = z.infer<typeof DeleteUnitParamsSchema>;
@@ -0,0 +1,99 @@
1
+ /**
2
+ * Reference data Zod schemas and types.
3
+ * Domain: Reference Data (Contact Groups, Sectors, Salutations, Titles, Countries, Languages, Units)
4
+ */
5
+ import { z } from "zod";
6
+ // ===== CONTACT GROUPS (REFDATA-01) =====
7
+ export const ListContactGroupsParamsSchema = z.object({
8
+ limit: z.number().int().positive().default(100),
9
+ offset: z.number().int().min(0).default(0),
10
+ });
11
+ export const GetContactGroupParamsSchema = z.object({
12
+ group_id: z.number().int().positive(),
13
+ });
14
+ export const CreateContactGroupParamsSchema = z.object({
15
+ name: z.string().min(1, "Name is required"),
16
+ });
17
+ export const DeleteContactGroupParamsSchema = z.object({
18
+ group_id: z.number().int().positive(),
19
+ });
20
+ // ===== CONTACT SECTORS (REFDATA-02) =====
21
+ export const ListContactSectorsParamsSchema = z.object({
22
+ limit: z.number().int().positive().default(100),
23
+ offset: z.number().int().min(0).default(0),
24
+ });
25
+ export const GetContactSectorParamsSchema = z.object({
26
+ sector_id: z.number().int().positive(),
27
+ });
28
+ export const CreateContactSectorParamsSchema = z.object({
29
+ name: z.string().min(1, "Name is required"),
30
+ });
31
+ // ===== SALUTATIONS (REFDATA-03) =====
32
+ export const ListSalutationsParamsSchema = z.object({
33
+ limit: z.number().int().positive().default(100),
34
+ offset: z.number().int().min(0).default(0),
35
+ });
36
+ export const GetSalutationParamsSchema = z.object({
37
+ salutation_id: z.number().int().positive(),
38
+ });
39
+ export const CreateSalutationParamsSchema = z.object({
40
+ name: z.string().min(1, "Name is required"),
41
+ });
42
+ export const DeleteSalutationParamsSchema = z.object({
43
+ salutation_id: z.number().int().positive(),
44
+ });
45
+ // ===== TITLES (REFDATA-04) =====
46
+ export const ListTitlesParamsSchema = z.object({
47
+ limit: z.number().int().positive().default(100),
48
+ offset: z.number().int().min(0).default(0),
49
+ });
50
+ export const GetTitleParamsSchema = z.object({
51
+ title_id: z.number().int().positive(),
52
+ });
53
+ export const CreateTitleParamsSchema = z.object({
54
+ name: z.string().min(1, "Name is required"),
55
+ });
56
+ export const DeleteTitleParamsSchema = z.object({
57
+ title_id: z.number().int().positive(),
58
+ });
59
+ // ===== COUNTRIES (REFDATA-05) =====
60
+ export const ListCountriesParamsSchema = z.object({
61
+ limit: z.number().int().positive().default(100),
62
+ offset: z.number().int().min(0).default(0),
63
+ });
64
+ export const GetCountryParamsSchema = z.object({
65
+ country_id: z.number().int().positive(),
66
+ });
67
+ export const CreateCountryParamsSchema = z.object({
68
+ name: z.string().min(1, "Name is required"),
69
+ iso_3166_alpha2: z.string().length(2, "ISO 3166 alpha-2 code must be exactly 2 characters"),
70
+ });
71
+ export const DeleteCountryParamsSchema = z.object({
72
+ country_id: z.number().int().positive(),
73
+ });
74
+ // ===== LANGUAGES (REFDATA-06) =====
75
+ export const ListLanguagesParamsSchema = z.object({
76
+ limit: z.number().int().positive().default(100),
77
+ offset: z.number().int().min(0).default(0),
78
+ });
79
+ export const GetLanguageParamsSchema = z.object({
80
+ language_id: z.number().int().positive(),
81
+ });
82
+ export const CreateLanguageParamsSchema = z.object({
83
+ name: z.string().min(1, "Name is required"),
84
+ iso_639_1: z.string().length(2, "ISO 639-1 code must be exactly 2 characters"),
85
+ });
86
+ // ===== UNITS (REFDATA-07) =====
87
+ export const ListUnitsParamsSchema = z.object({
88
+ limit: z.number().int().positive().default(100),
89
+ offset: z.number().int().min(0).default(0),
90
+ });
91
+ export const GetUnitParamsSchema = z.object({
92
+ unit_id: z.number().int().positive(),
93
+ });
94
+ export const CreateUnitParamsSchema = z.object({
95
+ name: z.string().min(1, "Name is required"),
96
+ });
97
+ export const DeleteUnitParamsSchema = z.object({
98
+ unit_id: z.number().int().positive(),
99
+ });
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Reminder-related Zod schemas and types.
3
+ * Domain: Reminders (Mahnungen)
4
+ */
5
+ import { z } from "zod";
6
+ export declare const ListRemindersParamsSchema: z.ZodObject<{
7
+ invoice_id: z.ZodNumber;
8
+ }, "strip", z.ZodTypeAny, {
9
+ invoice_id: number;
10
+ }, {
11
+ invoice_id: number;
12
+ }>;
13
+ export type ListRemindersParams = z.infer<typeof ListRemindersParamsSchema>;
14
+ export declare const GetReminderParamsSchema: z.ZodObject<{
15
+ invoice_id: z.ZodNumber;
16
+ reminder_id: z.ZodNumber;
17
+ }, "strip", z.ZodTypeAny, {
18
+ invoice_id: number;
19
+ reminder_id: number;
20
+ }, {
21
+ invoice_id: number;
22
+ reminder_id: number;
23
+ }>;
24
+ export type GetReminderParams = z.infer<typeof GetReminderParamsSchema>;
25
+ export declare const CreateReminderParamsSchema: z.ZodObject<{
26
+ invoice_id: z.ZodNumber;
27
+ reminder_data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
28
+ }, "strip", z.ZodTypeAny, {
29
+ invoice_id: number;
30
+ reminder_data: Record<string, unknown>;
31
+ }, {
32
+ invoice_id: number;
33
+ reminder_data: Record<string, unknown>;
34
+ }>;
35
+ export type CreateReminderParams = z.infer<typeof CreateReminderParamsSchema>;
36
+ export declare const DeleteReminderParamsSchema: z.ZodObject<{
37
+ invoice_id: z.ZodNumber;
38
+ reminder_id: z.ZodNumber;
39
+ }, "strip", z.ZodTypeAny, {
40
+ invoice_id: number;
41
+ reminder_id: number;
42
+ }, {
43
+ invoice_id: number;
44
+ reminder_id: number;
45
+ }>;
46
+ export type DeleteReminderParams = z.infer<typeof DeleteReminderParamsSchema>;
47
+ export declare const MarkReminderAsSentParamsSchema: z.ZodObject<{
48
+ invoice_id: z.ZodNumber;
49
+ reminder_id: z.ZodNumber;
50
+ }, "strip", z.ZodTypeAny, {
51
+ invoice_id: number;
52
+ reminder_id: number;
53
+ }, {
54
+ invoice_id: number;
55
+ reminder_id: number;
56
+ }>;
57
+ export type MarkReminderAsSentParams = z.infer<typeof MarkReminderAsSentParamsSchema>;
58
+ export declare const SendReminderParamsSchema: z.ZodObject<{
59
+ invoice_id: z.ZodNumber;
60
+ reminder_id: z.ZodNumber;
61
+ }, "strip", z.ZodTypeAny, {
62
+ invoice_id: number;
63
+ reminder_id: number;
64
+ }, {
65
+ invoice_id: number;
66
+ reminder_id: number;
67
+ }>;
68
+ export type SendReminderParams = z.infer<typeof SendReminderParamsSchema>;
69
+ export declare const SearchRemindersParamsSchema: z.ZodObject<{
70
+ search_params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
71
+ }, "strip", z.ZodTypeAny, {
72
+ search_params: Record<string, unknown>;
73
+ }, {
74
+ search_params: Record<string, unknown>;
75
+ }>;
76
+ export type SearchRemindersParams = z.infer<typeof SearchRemindersParamsSchema>;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Reminder-related Zod schemas and types.
3
+ * Domain: Reminders (Mahnungen)
4
+ */
5
+ import { z } from "zod";
6
+ // List reminders for an invoice
7
+ export const ListRemindersParamsSchema = z.object({
8
+ invoice_id: z.number().int().positive(),
9
+ });
10
+ // Get single reminder
11
+ export const GetReminderParamsSchema = z.object({
12
+ invoice_id: z.number().int().positive(),
13
+ reminder_id: z.number().int().positive(),
14
+ });
15
+ // Create reminder
16
+ export const CreateReminderParamsSchema = z.object({
17
+ invoice_id: z.number().int().positive(),
18
+ reminder_data: z.record(z.unknown()),
19
+ });
20
+ // Delete reminder
21
+ export const DeleteReminderParamsSchema = z.object({
22
+ invoice_id: z.number().int().positive(),
23
+ reminder_id: z.number().int().positive(),
24
+ });
25
+ // Mark reminder as sent
26
+ export const MarkReminderAsSentParamsSchema = z.object({
27
+ invoice_id: z.number().int().positive(),
28
+ reminder_id: z.number().int().positive(),
29
+ });
30
+ // Send reminder
31
+ export const SendReminderParamsSchema = z.object({
32
+ invoice_id: z.number().int().positive(),
33
+ reminder_id: z.number().int().positive(),
34
+ });
35
+ // Search reminders
36
+ export const SearchRemindersParamsSchema = z.object({
37
+ search_params: z.record(z.unknown()),
38
+ });
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Report-related Zod schemas and types.
3
+ * Domain: Reports and Business Intelligence
4
+ */
5
+ import { z } from "zod";
6
+ export declare const GetRevenueReportParamsSchema: z.ZodObject<{
7
+ start_date: z.ZodString;
8
+ end_date: z.ZodString;
9
+ group_by: z.ZodOptional<z.ZodString>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ start_date: string;
12
+ end_date: string;
13
+ group_by?: string | undefined;
14
+ }, {
15
+ start_date: string;
16
+ end_date: string;
17
+ group_by?: string | undefined;
18
+ }>;
19
+ export type GetRevenueReportParams = z.infer<typeof GetRevenueReportParamsSchema>;
20
+ export declare const GetCustomerRevenueReportParamsSchema: z.ZodObject<{
21
+ start_date: z.ZodString;
22
+ end_date: z.ZodString;
23
+ limit: z.ZodDefault<z.ZodNumber>;
24
+ }, "strip", z.ZodTypeAny, {
25
+ limit: number;
26
+ start_date: string;
27
+ end_date: string;
28
+ }, {
29
+ start_date: string;
30
+ end_date: string;
31
+ limit?: number | undefined;
32
+ }>;
33
+ export type GetCustomerRevenueReportParams = z.infer<typeof GetCustomerRevenueReportParamsSchema>;
34
+ export declare const GetInvoiceStatusReportParamsSchema: z.ZodObject<{
35
+ start_date: z.ZodString;
36
+ end_date: z.ZodString;
37
+ }, "strip", z.ZodTypeAny, {
38
+ start_date: string;
39
+ end_date: string;
40
+ }, {
41
+ start_date: string;
42
+ end_date: string;
43
+ }>;
44
+ export type GetInvoiceStatusReportParams = z.infer<typeof GetInvoiceStatusReportParamsSchema>;
45
+ export declare const GetMonthlyRevenueReportParamsSchema: z.ZodObject<{
46
+ year: z.ZodNumber;
47
+ month: z.ZodNumber;
48
+ }, "strip", z.ZodTypeAny, {
49
+ year: number;
50
+ month: number;
51
+ }, {
52
+ year: number;
53
+ month: number;
54
+ }>;
55
+ export type GetMonthlyRevenueReportParams = z.infer<typeof GetMonthlyRevenueReportParamsSchema>;
56
+ export declare const GetTopCustomersByRevenueParamsSchema: z.ZodObject<{
57
+ limit: z.ZodDefault<z.ZodNumber>;
58
+ start_date: z.ZodOptional<z.ZodString>;
59
+ end_date: z.ZodOptional<z.ZodString>;
60
+ }, "strip", z.ZodTypeAny, {
61
+ limit: number;
62
+ start_date?: string | undefined;
63
+ end_date?: string | undefined;
64
+ }, {
65
+ limit?: number | undefined;
66
+ start_date?: string | undefined;
67
+ end_date?: string | undefined;
68
+ }>;
69
+ export type GetTopCustomersByRevenueParams = z.infer<typeof GetTopCustomersByRevenueParamsSchema>;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Report-related Zod schemas and types.
3
+ * Domain: Reports and Business Intelligence
4
+ */
5
+ import { z } from "zod";
6
+ // Date validation regex
7
+ const dateRegex = /^\d{4}-\d{2}-\d{2}$/;
8
+ const dateMessage = "Date must be in YYYY-MM-DD format";
9
+ // Revenue report
10
+ export const GetRevenueReportParamsSchema = z.object({
11
+ start_date: z.string().regex(dateRegex, dateMessage),
12
+ end_date: z.string().regex(dateRegex, dateMessage),
13
+ group_by: z.string().optional(),
14
+ });
15
+ // Customer revenue report
16
+ export const GetCustomerRevenueReportParamsSchema = z.object({
17
+ start_date: z.string().regex(dateRegex, dateMessage),
18
+ end_date: z.string().regex(dateRegex, dateMessage),
19
+ limit: z.number().int().positive().default(10),
20
+ });
21
+ // Invoice status report
22
+ export const GetInvoiceStatusReportParamsSchema = z.object({
23
+ start_date: z.string().regex(dateRegex, dateMessage),
24
+ end_date: z.string().regex(dateRegex, dateMessage),
25
+ });
26
+ // Monthly revenue report
27
+ export const GetMonthlyRevenueReportParamsSchema = z.object({
28
+ year: z.number().int().min(2000).max(2100),
29
+ month: z.number().int().min(1).max(12),
30
+ });
31
+ // Top customers by revenue
32
+ export const GetTopCustomersByRevenueParamsSchema = z.object({
33
+ limit: z.number().int().positive().default(10),
34
+ start_date: z.string().regex(dateRegex, dateMessage).optional(),
35
+ end_date: z.string().regex(dateRegex, dateMessage).optional(),
36
+ });