@kirjapro/mcp-server 0.7.0 → 0.8.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 (67) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/README.md +46 -4
  3. package/dist/index.js +1278 -611
  4. package/package.json +1 -1
  5. package/server.json +5 -1
  6. package/tool-fingerprints.json +52 -52
  7. package/dist/accounts.d.ts +0 -40
  8. package/dist/accounts.js +0 -45
  9. package/dist/auth.d.ts +0 -17
  10. package/dist/auth.js +0 -245
  11. package/dist/compliance/rates.d.ts +0 -53
  12. package/dist/compliance/rates.js +0 -57
  13. package/dist/database.types.d.ts +0 -6525
  14. package/dist/database.types.js +0 -20
  15. package/dist/index.d.ts +0 -2
  16. package/dist/lib/incomeStatementSynthesis.d.ts +0 -47
  17. package/dist/lib/incomeStatementSynthesis.js +0 -140
  18. package/dist/resources/company.d.ts +0 -2
  19. package/dist/resources/company.js +0 -75
  20. package/dist/resources/compliance.d.ts +0 -2
  21. package/dist/resources/compliance.js +0 -338
  22. package/dist/resources/index.d.ts +0 -2
  23. package/dist/resources/index.js +0 -10
  24. package/dist/resources/schema.d.ts +0 -2
  25. package/dist/resources/schema.js +0 -63
  26. package/dist/resources/security.d.ts +0 -2
  27. package/dist/resources/security.js +0 -33
  28. package/dist/schemas.d.ts +0 -12
  29. package/dist/schemas.js +0 -12
  30. package/dist/tools/accounts.d.ts +0 -2
  31. package/dist/tools/accounts.js +0 -48
  32. package/dist/tools/banking.d.ts +0 -2
  33. package/dist/tools/banking.js +0 -196
  34. package/dist/tools/bookings.d.ts +0 -2
  35. package/dist/tools/bookings.js +0 -294
  36. package/dist/tools/customers.d.ts +0 -2
  37. package/dist/tools/customers.js +0 -320
  38. package/dist/tools/financialNotes.d.ts +0 -2
  39. package/dist/tools/financialNotes.js +0 -255
  40. package/dist/tools/fingerprints.d.ts +0 -6
  41. package/dist/tools/fingerprints.js +0 -28
  42. package/dist/tools/fiscal-years.d.ts +0 -2
  43. package/dist/tools/fiscal-years.js +0 -35
  44. package/dist/tools/index.d.ts +0 -9
  45. package/dist/tools/index.js +0 -105
  46. package/dist/tools/invoices.d.ts +0 -2
  47. package/dist/tools/invoices.js +0 -489
  48. package/dist/tools/offers.d.ts +0 -2
  49. package/dist/tools/offers.js +0 -443
  50. package/dist/tools/received-invoices.d.ts +0 -2
  51. package/dist/tools/received-invoices.js +0 -134
  52. package/dist/tools/recurring-invoices.d.ts +0 -2
  53. package/dist/tools/recurring-invoices.js +0 -348
  54. package/dist/tools/reports.d.ts +0 -2
  55. package/dist/tools/reports.js +0 -869
  56. package/dist/tools/templates.d.ts +0 -89
  57. package/dist/tools/templates.js +0 -636
  58. package/dist/tools/transactions.d.ts +0 -2
  59. package/dist/tools/transactions.js +0 -597
  60. package/dist/tools/validation.d.ts +0 -26
  61. package/dist/tools/validation.js +0 -127
  62. package/dist/types.d.ts +0 -388
  63. package/dist/types.js +0 -34
  64. package/dist/utils.d.ts +0 -276
  65. package/dist/utils.js +0 -637
  66. package/dist/version.d.ts +0 -1
  67. 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;