@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,207 @@
1
+ /**
2
+ * Banking-related Zod schemas and types.
3
+ * Domain: Banking (Bank Accounts, Currencies, IBAN Payments, QR Payments)
4
+ *
5
+ * Swiss Standards:
6
+ * - IBAN payments: Swiss ISO 20022 payment standards
7
+ * - QR payments: SIX Group QR-bill specification v2.3
8
+ * - Addresses: Structured format only (type S) - required from Nov 2025
9
+ */
10
+ import { z } from "zod";
11
+ export declare const ListBankAccountsParamsSchema: z.ZodObject<{
12
+ limit: z.ZodDefault<z.ZodNumber>;
13
+ offset: z.ZodDefault<z.ZodNumber>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ limit: number;
16
+ offset: number;
17
+ }, {
18
+ limit?: number | undefined;
19
+ offset?: number | undefined;
20
+ }>;
21
+ export type ListBankAccountsParams = z.infer<typeof ListBankAccountsParamsSchema>;
22
+ export declare const GetBankAccountParamsSchema: z.ZodObject<{
23
+ account_id: z.ZodNumber;
24
+ }, "strip", z.ZodTypeAny, {
25
+ account_id: number;
26
+ }, {
27
+ account_id: number;
28
+ }>;
29
+ export type GetBankAccountParams = z.infer<typeof GetBankAccountParamsSchema>;
30
+ export declare const ListCurrenciesParamsSchema: z.ZodObject<{
31
+ limit: z.ZodDefault<z.ZodNumber>;
32
+ offset: z.ZodDefault<z.ZodNumber>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ limit: number;
35
+ offset: number;
36
+ }, {
37
+ limit?: number | undefined;
38
+ offset?: number | undefined;
39
+ }>;
40
+ export type ListCurrenciesParams = z.infer<typeof ListCurrenciesParamsSchema>;
41
+ export declare const GetCurrencyParamsSchema: z.ZodObject<{
42
+ currency_id: z.ZodNumber;
43
+ }, "strip", z.ZodTypeAny, {
44
+ currency_id: number;
45
+ }, {
46
+ currency_id: number;
47
+ }>;
48
+ export type GetCurrencyParams = z.infer<typeof GetCurrencyParamsSchema>;
49
+ export declare const CreateCurrencyParamsSchema: z.ZodObject<{
50
+ name: z.ZodString;
51
+ round_factor: z.ZodDefault<z.ZodNumber>;
52
+ }, "strip", z.ZodTypeAny, {
53
+ name: string;
54
+ round_factor: number;
55
+ }, {
56
+ name: string;
57
+ round_factor?: number | undefined;
58
+ }>;
59
+ export type CreateCurrencyParams = z.infer<typeof CreateCurrencyParamsSchema>;
60
+ export declare const UpdateCurrencyParamsSchema: z.ZodObject<{
61
+ currency_id: z.ZodNumber;
62
+ currency_data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
63
+ }, "strip", z.ZodTypeAny, {
64
+ currency_id: number;
65
+ currency_data: Record<string, unknown>;
66
+ }, {
67
+ currency_id: number;
68
+ currency_data: Record<string, unknown>;
69
+ }>;
70
+ export type UpdateCurrencyParams = z.infer<typeof UpdateCurrencyParamsSchema>;
71
+ export declare const DeleteCurrencyParamsSchema: z.ZodObject<{
72
+ currency_id: z.ZodNumber;
73
+ }, "strip", z.ZodTypeAny, {
74
+ currency_id: number;
75
+ }, {
76
+ currency_id: number;
77
+ }>;
78
+ export type DeleteCurrencyParams = z.infer<typeof DeleteCurrencyParamsSchema>;
79
+ export declare const CreateIbanPaymentParamsSchema: z.ZodObject<{
80
+ bank_account_id: z.ZodNumber;
81
+ iban: z.ZodString;
82
+ currency: z.ZodEnum<["CHF", "EUR"]>;
83
+ amount: z.ZodNumber;
84
+ recipient_name: z.ZodString;
85
+ recipient_street: z.ZodOptional<z.ZodString>;
86
+ recipient_house_number: z.ZodOptional<z.ZodString>;
87
+ recipient_zip: z.ZodString;
88
+ recipient_city: z.ZodString;
89
+ recipient_country_code: z.ZodDefault<z.ZodString>;
90
+ execution_date: z.ZodString;
91
+ message: z.ZodOptional<z.ZodString>;
92
+ is_salary_payment: z.ZodDefault<z.ZodBoolean>;
93
+ allowance_type: z.ZodDefault<z.ZodEnum<["no_fee", "our", "ben", "sha"]>>;
94
+ }, "strip", z.ZodTypeAny, {
95
+ amount: number;
96
+ bank_account_id: number;
97
+ iban: string;
98
+ currency: "CHF" | "EUR";
99
+ recipient_name: string;
100
+ recipient_zip: string;
101
+ recipient_city: string;
102
+ recipient_country_code: string;
103
+ execution_date: string;
104
+ is_salary_payment: boolean;
105
+ allowance_type: "no_fee" | "our" | "ben" | "sha";
106
+ message?: string | undefined;
107
+ recipient_street?: string | undefined;
108
+ recipient_house_number?: string | undefined;
109
+ }, {
110
+ amount: number;
111
+ bank_account_id: number;
112
+ iban: string;
113
+ currency: "CHF" | "EUR";
114
+ recipient_name: string;
115
+ recipient_zip: string;
116
+ recipient_city: string;
117
+ execution_date: string;
118
+ message?: string | undefined;
119
+ recipient_street?: string | undefined;
120
+ recipient_house_number?: string | undefined;
121
+ recipient_country_code?: string | undefined;
122
+ is_salary_payment?: boolean | undefined;
123
+ allowance_type?: "no_fee" | "our" | "ben" | "sha" | undefined;
124
+ }>;
125
+ export type CreateIbanPaymentParams = z.infer<typeof CreateIbanPaymentParamsSchema>;
126
+ export declare const GetIbanPaymentParamsSchema: z.ZodObject<{
127
+ payment_id: z.ZodNumber;
128
+ }, "strip", z.ZodTypeAny, {
129
+ payment_id: number;
130
+ }, {
131
+ payment_id: number;
132
+ }>;
133
+ export type GetIbanPaymentParams = z.infer<typeof GetIbanPaymentParamsSchema>;
134
+ export declare const UpdateIbanPaymentParamsSchema: z.ZodObject<{
135
+ payment_id: z.ZodNumber;
136
+ payment_data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
137
+ }, "strip", z.ZodTypeAny, {
138
+ payment_id: number;
139
+ payment_data: Record<string, unknown>;
140
+ }, {
141
+ payment_id: number;
142
+ payment_data: Record<string, unknown>;
143
+ }>;
144
+ export type UpdateIbanPaymentParams = z.infer<typeof UpdateIbanPaymentParamsSchema>;
145
+ export declare const CreateQrPaymentParamsSchema: z.ZodObject<{
146
+ bank_account_id: z.ZodNumber;
147
+ iban: z.ZodString;
148
+ currency: z.ZodEnum<["CHF", "EUR"]>;
149
+ amount: z.ZodNumber;
150
+ recipient_name: z.ZodString;
151
+ recipient_street: z.ZodOptional<z.ZodString>;
152
+ recipient_house_number: z.ZodOptional<z.ZodString>;
153
+ recipient_zip: z.ZodString;
154
+ recipient_city: z.ZodString;
155
+ recipient_country_code: z.ZodDefault<z.ZodString>;
156
+ execution_date: z.ZodString;
157
+ qr_reference_nr: z.ZodOptional<z.ZodString>;
158
+ additional_information: z.ZodOptional<z.ZodString>;
159
+ }, "strip", z.ZodTypeAny, {
160
+ amount: number;
161
+ bank_account_id: number;
162
+ iban: string;
163
+ currency: "CHF" | "EUR";
164
+ recipient_name: string;
165
+ recipient_zip: string;
166
+ recipient_city: string;
167
+ recipient_country_code: string;
168
+ execution_date: string;
169
+ recipient_street?: string | undefined;
170
+ recipient_house_number?: string | undefined;
171
+ qr_reference_nr?: string | undefined;
172
+ additional_information?: string | undefined;
173
+ }, {
174
+ amount: number;
175
+ bank_account_id: number;
176
+ iban: string;
177
+ currency: "CHF" | "EUR";
178
+ recipient_name: string;
179
+ recipient_zip: string;
180
+ recipient_city: string;
181
+ execution_date: string;
182
+ recipient_street?: string | undefined;
183
+ recipient_house_number?: string | undefined;
184
+ recipient_country_code?: string | undefined;
185
+ qr_reference_nr?: string | undefined;
186
+ additional_information?: string | undefined;
187
+ }>;
188
+ export type CreateQrPaymentParams = z.infer<typeof CreateQrPaymentParamsSchema>;
189
+ export declare const GetQrPaymentParamsSchema: z.ZodObject<{
190
+ payment_id: z.ZodNumber;
191
+ }, "strip", z.ZodTypeAny, {
192
+ payment_id: number;
193
+ }, {
194
+ payment_id: number;
195
+ }>;
196
+ export type GetQrPaymentParams = z.infer<typeof GetQrPaymentParamsSchema>;
197
+ export declare const UpdateQrPaymentParamsSchema: z.ZodObject<{
198
+ payment_id: z.ZodNumber;
199
+ payment_data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
200
+ }, "strip", z.ZodTypeAny, {
201
+ payment_id: number;
202
+ payment_data: Record<string, unknown>;
203
+ }, {
204
+ payment_id: number;
205
+ payment_data: Record<string, unknown>;
206
+ }>;
207
+ export type UpdateQrPaymentParams = z.infer<typeof UpdateQrPaymentParamsSchema>;
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Banking-related Zod schemas and types.
3
+ * Domain: Banking (Bank Accounts, Currencies, IBAN Payments, QR Payments)
4
+ *
5
+ * Swiss Standards:
6
+ * - IBAN payments: Swiss ISO 20022 payment standards
7
+ * - QR payments: SIX Group QR-bill specification v2.3
8
+ * - Addresses: Structured format only (type S) - required from Nov 2025
9
+ */
10
+ import { z } from "zod";
11
+ // ===== BANK ACCOUNTS (BANK-01) - Read Only =====
12
+ export const ListBankAccountsParamsSchema = z.object({
13
+ limit: z.number().int().positive().default(100),
14
+ offset: z.number().int().min(0).default(0),
15
+ });
16
+ export const GetBankAccountParamsSchema = z.object({
17
+ account_id: z.number().int().positive(),
18
+ });
19
+ // ===== CURRENCIES (BANK-02) - Full CRUD =====
20
+ export const ListCurrenciesParamsSchema = z.object({
21
+ limit: z.number().int().positive().default(100),
22
+ offset: z.number().int().min(0).default(0),
23
+ });
24
+ export const GetCurrencyParamsSchema = z.object({
25
+ currency_id: z.number().int().positive(),
26
+ });
27
+ export const CreateCurrencyParamsSchema = z.object({
28
+ name: z.string().min(1).max(10),
29
+ round_factor: z.number().positive().default(0.05), // Swiss 5 rappen default
30
+ });
31
+ export const UpdateCurrencyParamsSchema = z.object({
32
+ currency_id: z.number().int().positive(),
33
+ currency_data: z.record(z.unknown()),
34
+ });
35
+ export const DeleteCurrencyParamsSchema = z.object({
36
+ currency_id: z.number().int().positive(),
37
+ });
38
+ // ===== IBAN PAYMENTS (BANK-03) - Swiss ISO 20022 =====
39
+ // Flat params schema for MCP tool interface
40
+ // Structured recipient address (required from Nov 2025)
41
+ export const CreateIbanPaymentParamsSchema = z.object({
42
+ bank_account_id: z.number().int().positive(),
43
+ iban: z.string().min(15).max(34),
44
+ currency: z.enum(["CHF", "EUR"]),
45
+ amount: z.number().positive(),
46
+ recipient_name: z.string().max(70),
47
+ recipient_street: z.string().max(70).optional(),
48
+ recipient_house_number: z.string().max(16).optional(),
49
+ recipient_zip: z.string().max(10),
50
+ recipient_city: z.string().max(35),
51
+ recipient_country_code: z.string().length(2).default("CH"),
52
+ execution_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/, "Date must be YYYY-MM-DD format"),
53
+ message: z.string().max(140).optional(),
54
+ is_salary_payment: z.boolean().default(false),
55
+ allowance_type: z.enum(["no_fee", "our", "ben", "sha"]).default("no_fee"),
56
+ });
57
+ export const GetIbanPaymentParamsSchema = z.object({
58
+ payment_id: z.number().int().positive(),
59
+ });
60
+ export const UpdateIbanPaymentParamsSchema = z.object({
61
+ payment_id: z.number().int().positive(),
62
+ payment_data: z.record(z.unknown()),
63
+ });
64
+ // ===== QR PAYMENTS (BANK-04) - Swiss QR-invoice standard =====
65
+ export const CreateQrPaymentParamsSchema = z.object({
66
+ bank_account_id: z.number().int().positive(),
67
+ iban: z.string().min(15).max(34),
68
+ currency: z.enum(["CHF", "EUR"]),
69
+ amount: z.number().positive().max(999999999.99),
70
+ recipient_name: z.string().max(70),
71
+ recipient_street: z.string().max(70).optional(),
72
+ recipient_house_number: z.string().max(16).optional(),
73
+ recipient_zip: z.string().max(10),
74
+ recipient_city: z.string().max(35),
75
+ recipient_country_code: z.string().length(2).default("CH"),
76
+ execution_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/, "Date must be YYYY-MM-DD format"),
77
+ qr_reference_nr: z.string().length(27).regex(/^\d+$/, "QR reference must be 27 digits").optional(),
78
+ additional_information: z.string().max(140).optional(),
79
+ });
80
+ export const GetQrPaymentParamsSchema = z.object({
81
+ payment_id: z.number().int().positive(),
82
+ });
83
+ export const UpdateQrPaymentParamsSchema = z.object({
84
+ payment_id: z.number().int().positive(),
85
+ payment_data: z.record(z.unknown()),
86
+ });
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Company and payments config Zod schemas and types.
3
+ * Domain: Company Profile, Permissions, Payment Types
4
+ */
5
+ import { z } from "zod";
6
+ export declare const GetCompanyProfileParamsSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
7
+ export type GetCompanyProfileParams = z.infer<typeof GetCompanyProfileParamsSchema>;
8
+ export declare const UpdateCompanyProfileParamsSchema: z.ZodObject<{
9
+ profile_data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ profile_data: Record<string, unknown>;
12
+ }, {
13
+ profile_data: Record<string, unknown>;
14
+ }>;
15
+ export type UpdateCompanyProfileParams = z.infer<typeof UpdateCompanyProfileParamsSchema>;
16
+ export declare const ListPermissionsParamsSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
17
+ export type ListPermissionsParams = z.infer<typeof ListPermissionsParamsSchema>;
18
+ export declare const ListPaymentTypesParamsSchema: z.ZodObject<{
19
+ limit: z.ZodDefault<z.ZodNumber>;
20
+ offset: z.ZodDefault<z.ZodNumber>;
21
+ }, "strip", z.ZodTypeAny, {
22
+ limit: number;
23
+ offset: number;
24
+ }, {
25
+ limit?: number | undefined;
26
+ offset?: number | undefined;
27
+ }>;
28
+ export type ListPaymentTypesParams = z.infer<typeof ListPaymentTypesParamsSchema>;
29
+ export declare const GetPaymentTypeParamsSchema: z.ZodObject<{
30
+ payment_type_id: z.ZodNumber;
31
+ }, "strip", z.ZodTypeAny, {
32
+ payment_type_id: number;
33
+ }, {
34
+ payment_type_id: number;
35
+ }>;
36
+ export type GetPaymentTypeParams = z.infer<typeof GetPaymentTypeParamsSchema>;
37
+ export declare const CreatePaymentTypeParamsSchema: z.ZodObject<{
38
+ name: z.ZodString;
39
+ }, "strip", z.ZodTypeAny, {
40
+ name: string;
41
+ }, {
42
+ name: string;
43
+ }>;
44
+ export type CreatePaymentTypeParams = z.infer<typeof CreatePaymentTypeParamsSchema>;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Company and payments config Zod schemas and types.
3
+ * Domain: Company Profile, Permissions, Payment Types
4
+ */
5
+ import { z } from "zod";
6
+ // ===== COMPANY PROFILE (REFDATA-09) =====
7
+ export const GetCompanyProfileParamsSchema = z.object({});
8
+ export const UpdateCompanyProfileParamsSchema = z.object({
9
+ profile_data: z.record(z.unknown()),
10
+ });
11
+ // ===== PERMISSIONS (REFDATA-10) =====
12
+ export const ListPermissionsParamsSchema = z.object({});
13
+ // ===== PAYMENT TYPES (REFDATA-08) =====
14
+ export const ListPaymentTypesParamsSchema = z.object({
15
+ limit: z.number().int().positive().default(100),
16
+ offset: z.number().int().min(0).default(0),
17
+ });
18
+ export const GetPaymentTypeParamsSchema = z.object({
19
+ payment_type_id: z.number().int().positive(),
20
+ });
21
+ export const CreatePaymentTypeParamsSchema = z.object({
22
+ name: z.string().min(1, "Name is required"),
23
+ });
@@ -0,0 +1,104 @@
1
+ /**
2
+ * Contact-related Zod schemas and types.
3
+ * Domain: Contacts (CRM)
4
+ */
5
+ import { z } from "zod";
6
+ import { PaginationParams } from "../common.js";
7
+ export declare const ListContactsParamsSchema: z.ZodObject<{
8
+ limit: z.ZodDefault<z.ZodNumber>;
9
+ offset: z.ZodDefault<z.ZodNumber>;
10
+ search_term: z.ZodOptional<z.ZodString>;
11
+ contact_type_id: z.ZodOptional<z.ZodNumber>;
12
+ }, "strip", z.ZodTypeAny, {
13
+ limit: number;
14
+ offset: number;
15
+ search_term?: string | undefined;
16
+ contact_type_id?: number | undefined;
17
+ }, {
18
+ limit?: number | undefined;
19
+ offset?: number | undefined;
20
+ search_term?: string | undefined;
21
+ contact_type_id?: number | undefined;
22
+ }>;
23
+ export type ListContactsParams = z.infer<typeof ListContactsParamsSchema>;
24
+ export declare const GetContactParamsSchema: z.ZodObject<{
25
+ contact_id: z.ZodNumber;
26
+ }, "strip", z.ZodTypeAny, {
27
+ contact_id: number;
28
+ }, {
29
+ contact_id: number;
30
+ }>;
31
+ export type GetContactParams = z.infer<typeof GetContactParamsSchema>;
32
+ export declare const SearchContactsParamsSchema: z.ZodObject<{
33
+ query: z.ZodString;
34
+ limit: z.ZodDefault<z.ZodNumber>;
35
+ }, "strip", z.ZodTypeAny, {
36
+ limit: number;
37
+ query: string;
38
+ }, {
39
+ query: string;
40
+ limit?: number | undefined;
41
+ }>;
42
+ export type SearchContactsParams = z.infer<typeof SearchContactsParamsSchema>;
43
+ export declare const AdvancedSearchContactsParamsSchema: z.ZodObject<{
44
+ search_criteria: z.ZodArray<z.ZodObject<{
45
+ field: z.ZodString;
46
+ value: z.ZodString;
47
+ criteria: z.ZodDefault<z.ZodString>;
48
+ }, "strip", z.ZodTypeAny, {
49
+ field: string;
50
+ value: string;
51
+ criteria: string;
52
+ }, {
53
+ field: string;
54
+ value: string;
55
+ criteria?: string | undefined;
56
+ }>, "many">;
57
+ limit: z.ZodDefault<z.ZodNumber>;
58
+ }, "strip", z.ZodTypeAny, {
59
+ limit: number;
60
+ search_criteria: {
61
+ field: string;
62
+ value: string;
63
+ criteria: string;
64
+ }[];
65
+ }, {
66
+ search_criteria: {
67
+ field: string;
68
+ value: string;
69
+ criteria?: string | undefined;
70
+ }[];
71
+ limit?: number | undefined;
72
+ }>;
73
+ export type AdvancedSearchContactsParams = z.infer<typeof AdvancedSearchContactsParamsSchema>;
74
+ export declare const FindContactByNumberParamsSchema: z.ZodObject<{
75
+ contact_number: z.ZodString;
76
+ }, "strip", z.ZodTypeAny, {
77
+ contact_number: string;
78
+ }, {
79
+ contact_number: string;
80
+ }>;
81
+ export type FindContactByNumberParams = z.infer<typeof FindContactByNumberParamsSchema>;
82
+ export declare const FindContactByNameParamsSchema: z.ZodObject<{
83
+ name: z.ZodString;
84
+ }, "strip", z.ZodTypeAny, {
85
+ name: string;
86
+ }, {
87
+ name: string;
88
+ }>;
89
+ export type FindContactByNameParams = z.infer<typeof FindContactByNameParamsSchema>;
90
+ export declare const UpdateContactParamsSchema: z.ZodObject<{
91
+ contact_id: z.ZodNumber;
92
+ contact_data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
93
+ }, "strip", z.ZodTypeAny, {
94
+ contact_id: number;
95
+ contact_data: Record<string, unknown>;
96
+ }, {
97
+ contact_id: number;
98
+ contact_data: Record<string, unknown>;
99
+ }>;
100
+ export type UpdateContactParams = z.infer<typeof UpdateContactParamsSchema>;
101
+ export interface ContactSearchParams extends PaginationParams {
102
+ search_term?: string;
103
+ contact_type_id?: number;
104
+ }
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Contact-related Zod schemas and types.
3
+ * Domain: Contacts (CRM)
4
+ */
5
+ import { z } from "zod";
6
+ import { SearchCriteriaSchema } from "../common.js";
7
+ // List contacts with optional filtering
8
+ export const ListContactsParamsSchema = z.object({
9
+ limit: z.number().int().positive().default(50),
10
+ offset: z.number().int().min(0).default(0),
11
+ search_term: z.string().optional(),
12
+ contact_type_id: z.number().int().positive().optional(),
13
+ });
14
+ // Get single contact
15
+ export const GetContactParamsSchema = z.object({
16
+ contact_id: z.number().int().positive(),
17
+ });
18
+ // Simple search
19
+ export const SearchContactsParamsSchema = z.object({
20
+ query: z.string().min(1, "Query is required"),
21
+ limit: z.number().int().positive().default(50),
22
+ });
23
+ // Advanced search with multiple criteria
24
+ export const AdvancedSearchContactsParamsSchema = z.object({
25
+ search_criteria: z
26
+ .array(SearchCriteriaSchema)
27
+ .min(1, "At least one search criterion is required"),
28
+ limit: z.number().int().positive().default(50),
29
+ });
30
+ // Find by contact number (e.g., '001008')
31
+ export const FindContactByNumberParamsSchema = z.object({
32
+ contact_number: z.string().min(1, "Contact number is required"),
33
+ });
34
+ // Find by name
35
+ export const FindContactByNameParamsSchema = z.object({
36
+ name: z.string().min(1, "Name is required"),
37
+ });
38
+ // Update contact
39
+ export const UpdateContactParamsSchema = z.object({
40
+ contact_id: z.number().int().positive(),
41
+ contact_data: z.record(z.unknown()),
42
+ });
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Delivery-related Zod schemas and types.
3
+ * Domain: Deliveries (kb_delivery)
4
+ */
5
+ import { z } from "zod";
6
+ export declare const ListDeliveriesParamsSchema: 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 ListDeliveriesParams = z.infer<typeof ListDeliveriesParamsSchema>;
17
+ export declare const GetDeliveryParamsSchema: z.ZodObject<{
18
+ delivery_id: z.ZodNumber;
19
+ }, "strip", z.ZodTypeAny, {
20
+ delivery_id: number;
21
+ }, {
22
+ delivery_id: number;
23
+ }>;
24
+ export type GetDeliveryParams = z.infer<typeof GetDeliveryParamsSchema>;
25
+ export declare const IssueDeliveryParamsSchema: z.ZodObject<{
26
+ delivery_id: z.ZodNumber;
27
+ }, "strip", z.ZodTypeAny, {
28
+ delivery_id: number;
29
+ }, {
30
+ delivery_id: number;
31
+ }>;
32
+ export type IssueDeliveryParams = z.infer<typeof IssueDeliveryParamsSchema>;
33
+ export declare const SearchDeliveriesParamsSchema: z.ZodObject<{
34
+ search_params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
35
+ }, "strip", z.ZodTypeAny, {
36
+ search_params: Record<string, unknown>;
37
+ }, {
38
+ search_params: Record<string, unknown>;
39
+ }>;
40
+ export type SearchDeliveriesParams = z.infer<typeof SearchDeliveriesParamsSchema>;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Delivery-related Zod schemas and types.
3
+ * Domain: Deliveries (kb_delivery)
4
+ */
5
+ import { z } from "zod";
6
+ // List deliveries
7
+ export const ListDeliveriesParamsSchema = z.object({
8
+ limit: z.number().int().positive().default(50),
9
+ offset: z.number().int().min(0).default(0),
10
+ });
11
+ // Get single delivery
12
+ export const GetDeliveryParamsSchema = z.object({
13
+ delivery_id: z.number().int().positive(),
14
+ });
15
+ // Issue delivery
16
+ export const IssueDeliveryParamsSchema = z.object({
17
+ delivery_id: z.number().int().positive(),
18
+ });
19
+ // Search deliveries
20
+ export const SearchDeliveriesParamsSchema = z.object({
21
+ search_params: z.record(z.unknown()),
22
+ });