@kirjapro/mcp-server 0.8.2 → 0.8.5

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 (66) hide show
  1. package/CHANGELOG.md +58 -3
  2. package/dist/index.js +144 -142
  3. package/package.json +1 -1
  4. package/server.json +1 -1
  5. package/tool-fingerprints.json +4 -4
  6. package/dist/accounts.d.ts +0 -40
  7. package/dist/accounts.js +0 -45
  8. package/dist/auth.d.ts +0 -17
  9. package/dist/auth.js +0 -245
  10. package/dist/compliance/rates.d.ts +0 -53
  11. package/dist/compliance/rates.js +0 -57
  12. package/dist/database.types.d.ts +0 -6525
  13. package/dist/database.types.js +0 -20
  14. package/dist/index.d.ts +0 -2
  15. package/dist/lib/incomeStatementSynthesis.d.ts +0 -47
  16. package/dist/lib/incomeStatementSynthesis.js +0 -140
  17. package/dist/resources/company.d.ts +0 -2
  18. package/dist/resources/company.js +0 -75
  19. package/dist/resources/compliance.d.ts +0 -2
  20. package/dist/resources/compliance.js +0 -338
  21. package/dist/resources/index.d.ts +0 -2
  22. package/dist/resources/index.js +0 -10
  23. package/dist/resources/schema.d.ts +0 -2
  24. package/dist/resources/schema.js +0 -63
  25. package/dist/resources/security.d.ts +0 -2
  26. package/dist/resources/security.js +0 -33
  27. package/dist/schemas.d.ts +0 -12
  28. package/dist/schemas.js +0 -12
  29. package/dist/tools/accounts.d.ts +0 -2
  30. package/dist/tools/accounts.js +0 -48
  31. package/dist/tools/banking.d.ts +0 -2
  32. package/dist/tools/banking.js +0 -196
  33. package/dist/tools/bookings.d.ts +0 -2
  34. package/dist/tools/bookings.js +0 -294
  35. package/dist/tools/customers.d.ts +0 -2
  36. package/dist/tools/customers.js +0 -320
  37. package/dist/tools/financialNotes.d.ts +0 -2
  38. package/dist/tools/financialNotes.js +0 -255
  39. package/dist/tools/fingerprints.d.ts +0 -6
  40. package/dist/tools/fingerprints.js +0 -28
  41. package/dist/tools/fiscal-years.d.ts +0 -2
  42. package/dist/tools/fiscal-years.js +0 -35
  43. package/dist/tools/index.d.ts +0 -9
  44. package/dist/tools/index.js +0 -105
  45. package/dist/tools/invoices.d.ts +0 -2
  46. package/dist/tools/invoices.js +0 -489
  47. package/dist/tools/offers.d.ts +0 -2
  48. package/dist/tools/offers.js +0 -443
  49. package/dist/tools/received-invoices.d.ts +0 -2
  50. package/dist/tools/received-invoices.js +0 -134
  51. package/dist/tools/recurring-invoices.d.ts +0 -2
  52. package/dist/tools/recurring-invoices.js +0 -348
  53. package/dist/tools/reports.d.ts +0 -2
  54. package/dist/tools/reports.js +0 -869
  55. package/dist/tools/templates.d.ts +0 -89
  56. package/dist/tools/templates.js +0 -636
  57. package/dist/tools/transactions.d.ts +0 -2
  58. package/dist/tools/transactions.js +0 -597
  59. package/dist/tools/validation.d.ts +0 -26
  60. package/dist/tools/validation.js +0 -127
  61. package/dist/types.d.ts +0 -388
  62. package/dist/types.js +0 -34
  63. package/dist/utils.d.ts +0 -276
  64. package/dist/utils.js +0 -637
  65. package/dist/version.d.ts +0 -1
  66. package/dist/version.js +0 -3
@@ -1,89 +0,0 @@
1
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
- import type { TemplateEntry } from "../types.js";
3
- /**
4
- * Split a gross EUR amount into net + VAT using residual method.
5
- * vat = gross - net ensures no rounding drift.
6
- */
7
- export declare function splitVat(gross: number, vatRate: number): {
8
- net: number;
9
- vat: number;
10
- };
11
- /**
12
- * Validate that each accountOverrides pair (source → target) satisfies:
13
- * 1. source exists in this company's chart,
14
- * 2. target exists and is active, and
15
- * 3. source.account_type === target.account_type.
16
- *
17
- * Prevents a caller from redirecting e.g. salary expense (`ELAKEKULUT`,
18
- * expense) into an owner-withdrawal account (equity) or VAT receivable
19
- * (asset) into a revenue account.
20
- */
21
- export declare function validateAccountOverrides(overrides: Record<string, string>): Promise<{
22
- ok: true;
23
- } | {
24
- error: string;
25
- }>;
26
- /**
27
- * Expand a template into journal entries for a given gross amount.
28
- * Returns an error string if the template is unknown.
29
- */
30
- export declare function expandTemplate(templateId: string, amount: number, opts?: {
31
- accountOverrides?: Record<string, string>;
32
- }): {
33
- entries: TemplateEntry[];
34
- } | {
35
- error: string;
36
- };
37
- /**
38
- * Validate the fiscal year (exists, open, date in range) for a given
39
- * transaction date. Shared by `resolveAndCreate` and the atomic booking
40
- * wrappers in `bookings.ts` so they get the same preflight checks before
41
- * entering an advisory-locked RPC.
42
- */
43
- export declare function validateFiscalYearForDate(fiscalYearId: string, transactionDate: string): Promise<{
44
- content: Array<{
45
- type: "text";
46
- text: string;
47
- }>;
48
- isError: true;
49
- } | {
50
- start_date: string;
51
- end_date: string;
52
- }>;
53
- /**
54
- * Resolve a set of account numbers to `{account_number -> id}` within the
55
- * current company. Returns `toErrorContent` on lookup failure or missing
56
- * accounts.
57
- */
58
- export declare function resolveAccountNumbers(accountNumbers: string[]): Promise<{
59
- content: Array<{
60
- type: "text";
61
- text: string;
62
- }>;
63
- isError: true;
64
- } | Map<string, string>>;
65
- /**
66
- * Build DB-shaped journal entries from `TemplateEntry[]` using an
67
- * account-number -> id map. Caller is responsible for balance validation.
68
- */
69
- export declare function toJournalEntries(entries: TemplateEntry[], accountMap: Map<string, string>): Array<{
70
- account_id: string;
71
- debit_amount: number;
72
- credit_amount: number;
73
- }>;
74
- export declare function resolveAndCreate(params: {
75
- fiscalYearId?: string;
76
- transactionDate: string;
77
- description: string;
78
- documentNumber?: string;
79
- entries: TemplateEntry[];
80
- }): Promise<{
81
- content: Array<{
82
- type: "text";
83
- text: string;
84
- }>;
85
- isError: true;
86
- } | {
87
- id: string;
88
- }>;
89
- export declare function registerTemplateTools(server: McpServer): void;