@codemill-solutions/yuki-mcp 1.1.0 → 1.3.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.
- package/README.md +94 -16
- package/dist/index.js +56 -12
- package/dist/index.js.map +1 -1
- package/dist/tools/accounting-info.d.ts +19 -0
- package/dist/tools/accounting-info.d.ts.map +1 -0
- package/dist/tools/accounting-info.js +366 -0
- package/dist/tools/accounting-info.js.map +1 -0
- package/dist/tools/accounting.d.ts +6 -0
- package/dist/tools/accounting.d.ts.map +1 -1
- package/dist/tools/accounting.js +122 -1
- package/dist/tools/accounting.js.map +1 -1
- package/dist/tools/administrations.d.ts +10 -0
- package/dist/tools/administrations.d.ts.map +1 -1
- package/dist/tools/administrations.js +46 -0
- package/dist/tools/administrations.js.map +1 -1
- package/dist/tools/backoffice.js +2 -2
- package/dist/tools/backoffice.js.map +1 -1
- package/dist/tools/documents.d.ts.map +1 -1
- package/dist/tools/documents.js +372 -3
- package/dist/tools/documents.js.map +1 -1
- package/dist/tools/invoices.js +4 -4
- package/dist/tools/invoices.js.map +1 -1
- package/dist/tools/relations.js +2 -2
- package/dist/tools/relations.js.map +1 -1
- package/dist/tools/transactions.js +3 -3
- package/dist/tools/transactions.js.map +1 -1
- package/dist/yuki-client.d.ts +25 -10
- package/dist/yuki-client.d.ts.map +1 -1
- package/dist/yuki-client.js +74 -19
- package/dist/yuki-client.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -89,13 +89,47 @@ Add to your MCP host configuration (e.g. `claude_desktop_config.json`):
|
|
|
89
89
|
|
|
90
90
|
---
|
|
91
91
|
|
|
92
|
-
##
|
|
92
|
+
## Multi-administration support
|
|
93
|
+
|
|
94
|
+
If you manage **multiple Yuki administrations** (each with its own API key), you can supply a JSON file that maps every `administrationId` to its corresponding API key. The server then authenticates per administration automatically — no single shared key required.
|
|
95
|
+
|
|
96
|
+
### Keys file format
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"a1b2c3d4-0000-0000-0000-000000000001": "api-key-for-admin-1",
|
|
101
|
+
"a1b2c3d4-0000-0000-0000-000000000002": "api-key-for-admin-2"
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Path resolution (first match wins)
|
|
106
|
+
|
|
107
|
+
| Priority | Path |
|
|
108
|
+
|----------|------|
|
|
109
|
+
| 1 | `YUKI_API_KEYS_FILE` environment variable (explicit path) |
|
|
110
|
+
| 2 | `~/.yuki/api-keys.json` (default user-level location) |
|
|
111
|
+
| 3 | `./api-keys.json` (local fallback for development) |
|
|
112
|
+
|
|
113
|
+
### Environment variable
|
|
114
|
+
|
|
115
|
+
```env
|
|
116
|
+
YUKI_API_KEYS_FILE=/path/to/your/api-keys.json
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
When a keys file is present, `YUKI_API_KEY` becomes optional — the file keys are used for all administration-specific tool calls, and `YUKI_API_KEY` (if set) serves as the fallback for tools that don't target a specific administration (e.g. `get_administrations`).
|
|
120
|
+
|
|
121
|
+
If neither `YUKI_API_KEY` nor a keys file is found at startup, the server logs a warning but continues running — tools will return an error when called.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Available tools (29)
|
|
93
126
|
|
|
94
127
|
### Administrations
|
|
95
128
|
|
|
96
129
|
| Tool | Description |
|
|
97
130
|
|------|-------------|
|
|
98
131
|
| `get_administrations` | List all administrations (companies) for this API key. **Run this first** to find the correct `administrationId`. |
|
|
132
|
+
| `get_administration_id` | Look up an administration's GUID by its exact name. Useful when you know the name but not the GUID. |
|
|
99
133
|
|
|
100
134
|
### Relations
|
|
101
135
|
|
|
@@ -130,7 +164,21 @@ Add to your MCP host configuration (e.g. `claude_desktop_config.json`):
|
|
|
130
164
|
|
|
131
165
|
| Tool | Key parameters | Description |
|
|
132
166
|
|------|----------------|-------------|
|
|
133
|
-
| `get_gl_accounts` | `date?` | Retrieve all GL accounts with their balance at a given date. Use this to find
|
|
167
|
+
| `get_gl_accounts` | `date?` | Retrieve all GL accounts with their balance at a given date (commercial view). Use this to find account codes before calling `get_transactions`. |
|
|
168
|
+
| `get_gl_accounts_fiscal` | `date?` | Same as `get_gl_accounts` but including fiscal corrections. Use for balance sheets and P&L views that must match Yuki's fiscal reports. |
|
|
169
|
+
| `get_net_revenue` | `startDate`, `endDate`, `fiscal?` | Retrieve net revenue (netto-omzet) for a date range. Set `fiscal=true` to include fiscal corrections. |
|
|
170
|
+
|
|
171
|
+
### Accounting info
|
|
172
|
+
|
|
173
|
+
Richer read-only views from the `AccountingInfo.asmx` service — not available through the standard `Accounting.asmx`.
|
|
174
|
+
|
|
175
|
+
| Tool | Key parameters | Description |
|
|
176
|
+
|------|----------------|-------------|
|
|
177
|
+
| `get_gl_account_scheme` | — | Retrieve the complete GL account scheme (rekeningschema): all codes with type, subtype, description, and active/inactive status. Use to validate GL codes or build account pickers. |
|
|
178
|
+
| `get_period_table` | `yearId` | Retrieve the fiscal period table for a year: period numbers, names, and date ranges. Use to translate transaction dates into human-readable period names for reports. |
|
|
179
|
+
| `get_gl_transactions_detailed` | `startDate`, `endDate`, `glAccountCode?`, `financialMode?` | Detailed transaction listing with document type, archive folder, fiscal period ID, project code, and mutation user. More complete than `get_transactions`. Leave `glAccountCode` empty for all accounts. |
|
|
180
|
+
| `get_transaction_document` | `transactionId` | Download the source PDF for a booked transaction as base64. Use the `id` or `hID` from `get_gl_transactions_detailed`. |
|
|
181
|
+
| `get_start_balances` | `yearId`, `financialMode?` | Retrieve opening balances (beginbalansen) per GL account for a fiscal year. |
|
|
134
182
|
|
|
135
183
|
### Documents
|
|
136
184
|
|
|
@@ -139,6 +187,11 @@ Add to your MCP host configuration (e.g. `claude_desktop_config.json`):
|
|
|
139
187
|
| `upload_document` | `fileName`, `dataBase64`, `folder?`, `amount?` | Upload a PDF to the Yuki archive by passing its content as a base64 string. Use `get_document_folders` first to find the right folder ID. |
|
|
140
188
|
| `upload_document_from_path` | `filePath`, `fileName?`, `folder?`, `amount?` | Upload a PDF from a local file path. Reads and encodes the file internally — preferred over `upload_document` when the file is available on disk. Validates that the file exists and is a valid PDF before uploading. |
|
|
141
189
|
| `get_document_folders` | — | List all archive folders available in the administration. |
|
|
190
|
+
| `list_documents` | `folderId` | List documents in a specific archive folder. Returns document IDs, file names, dates, and amounts. |
|
|
191
|
+
| `search_documents` | `searchText` | Full-text search across all archived documents (file names, amounts, OCR content). |
|
|
192
|
+
| `get_document` | `documentId` | Retrieve metadata for a single archived document by its ID (name, folder, date, amount, status). |
|
|
193
|
+
| `download_document` | `documentId` | Download an archived document as a base64-encoded string. |
|
|
194
|
+
| `get_cost_categories` | — | List available GL cost categories for use as the `costCategory` parameter in upload tools. |
|
|
142
195
|
|
|
143
196
|
### Backoffice
|
|
144
197
|
|
|
@@ -188,20 +241,25 @@ Available scenarios: `get-administrations`, `search-relations`, `outstanding-inv
|
|
|
188
241
|
|
|
189
242
|
```
|
|
190
243
|
src/
|
|
191
|
-
├── index.ts
|
|
192
|
-
├── yuki-client.ts
|
|
244
|
+
├── index.ts # Entry point — loads env + keys file, registers tools, starts stdio transport
|
|
245
|
+
├── yuki-client.ts # SOAP client: per-key session cache, envelope builder, axios HTTP, fast-xml-parser
|
|
193
246
|
└── tools/
|
|
194
|
-
├── administrations.ts
|
|
195
|
-
├── relations.ts
|
|
196
|
-
├── invoices.ts
|
|
197
|
-
│
|
|
198
|
-
├── transactions.ts
|
|
199
|
-
├── accounting.ts
|
|
200
|
-
├──
|
|
201
|
-
|
|
247
|
+
├── administrations.ts # get_administrations, get_administration_id
|
|
248
|
+
├── relations.ts # search_relations, upsert_contact
|
|
249
|
+
├── invoices.ts # get_sales_invoices, get_purchase_invoices,
|
|
250
|
+
│ # process_sales_invoice, process_purchase_invoice
|
|
251
|
+
├── transactions.ts # get_transactions, get_transaction_details, process_journal
|
|
252
|
+
├── accounting.ts # get_gl_accounts, get_gl_accounts_fiscal, get_net_revenue
|
|
253
|
+
├── accounting-info.ts # get_gl_account_scheme, get_period_table,
|
|
254
|
+
│ # get_gl_transactions_detailed, get_transaction_document,
|
|
255
|
+
│ # get_start_balances
|
|
256
|
+
├── documents.ts # upload_document, upload_document_from_path,
|
|
257
|
+
│ # get_document_folders, list_documents, search_documents,
|
|
258
|
+
│ # get_document, download_document, get_cost_categories
|
|
259
|
+
└── backoffice.ts # get_workflow, get_outstanding_questions
|
|
202
260
|
|
|
203
261
|
scripts/
|
|
204
|
-
└── test-agent.ts
|
|
262
|
+
└── test-agent.ts # Agent test harness (Claude + MCP client loop)
|
|
205
263
|
```
|
|
206
264
|
|
|
207
265
|
### Auth flow
|
|
@@ -211,9 +269,9 @@ Yuki uses a two-step authentication pattern:
|
|
|
211
269
|
1. `Authenticate(accessKey)` → returns a temporary `sessionID`
|
|
212
270
|
2. All subsequent calls include that `sessionID`
|
|
213
271
|
|
|
214
|
-
`YukiClient.getSessionID()` handles this transparently
|
|
272
|
+
`YukiClient.getSessionID(adminId?)` handles this transparently. When called with an `administrationId`, it resolves the matching API key from the loaded keys map. Session IDs are cached per API key for the lifetime of the process — `Authenticate` is only called once per key, not once per tool call.
|
|
215
273
|
|
|
216
|
-
> **Note:** Parameter casing differs across Yuki's services — `sessionId` (lowercase d) on `Sales.asmx` and `Purchase.asmx`; `sessionID` (uppercase D) on `Accounting.asmx`, `Contact.asmx`, and `Archive.asmx`. This is handled per-tool.
|
|
274
|
+
> **Note:** Parameter casing differs across Yuki's services — `sessionId` (lowercase d) on `Sales.asmx` and `Purchase.asmx`; `sessionID` (uppercase D) on `Accounting.asmx`, `AccountingInfo.asmx`, `Contact.asmx`, and `Archive.asmx`. This is handled per-tool.
|
|
217
275
|
|
|
218
276
|
### XML documents
|
|
219
277
|
|
|
@@ -223,7 +281,7 @@ Write tools (`process_sales_invoice`, `process_purchase_invoice`, `process_journ
|
|
|
223
281
|
|
|
224
282
|
## Rate limits
|
|
225
283
|
|
|
226
|
-
Yuki enforces **1,000 API requests per day
|
|
284
|
+
Yuki enforces **1,000 API requests per day** (upgradeable to 5,000–10,000). Each tool call is 1 request. Session IDs are cached so `Authenticate` is only called once per API key per server process, not once per tool call.
|
|
227
285
|
|
|
228
286
|
Design agent workflows to fetch broad lists once and reference them from the agent's context window rather than re-fetching on every step.
|
|
229
287
|
|
|
@@ -234,6 +292,7 @@ Design agent workflows to fetch broad lists once and reference them from the age
|
|
|
234
292
|
| Error | Likely cause |
|
|
235
293
|
|-------|-------------|
|
|
236
294
|
| `SOAP Fault: Authentication failed` | `YUKI_API_KEY` is incorrect or API access is not enabled in Yuki Settings |
|
|
295
|
+
| `No API key found for administration …` | The `administrationId` passed to the tool is not in the loaded keys file — check `YUKI_API_KEYS_FILE` |
|
|
237
296
|
| `SOAP Fault: Administration not found` | Wrong `administrationId` — run `get_administrations` to get the correct GUID |
|
|
238
297
|
| `Journal entries do not balance` | Amounts in `process_journal` don't sum to 0 — check debit/credit signs |
|
|
239
298
|
| `HTTP 500 from api.yukiworks.nl` | Usually a wrong XML namespace or malformed `xmlDoc` — check the WSDL at `https://api.yukiworks.nl/ws/{Service}.asmx?wsdl` |
|
|
@@ -243,6 +302,25 @@ Design agent workflows to fetch broad lists once and reference them from the age
|
|
|
243
302
|
|
|
244
303
|
---
|
|
245
304
|
|
|
305
|
+
## About CodeMill Solutions
|
|
306
|
+
|
|
307
|
+
[CodeMill Solutions](https://codemill.dev/en/) is a Dutch software company based in the Netherlands. We build smart, scalable, and customized solutions that help organizations grow, optimize processes, and realize their digital ambitions.
|
|
308
|
+
|
|
309
|
+
Our services include:
|
|
310
|
+
|
|
311
|
+
- **Custom applications** — portals, dashboards, business software, and fully tailored platforms that truly add value.
|
|
312
|
+
- **API integrations** — connecting your application with other systems and external platforms via smart API connections.
|
|
313
|
+
- **Mobile apps** — iOS and Android apps as a logical extension of your web application(s).
|
|
314
|
+
|
|
315
|
+
`yuki-mcp` is one of our open-source integrations, making Yuki's accounting platform accessible to AI agents through the Model Context Protocol.
|
|
316
|
+
|
|
317
|
+
📧 [info@codemill.dev](mailto:info@codemill.dev)
|
|
318
|
+
🌐 [codemill.dev](https://codemill.dev/en/)
|
|
319
|
+
💼 [LinkedIn](https://www.linkedin.com/company/codemill-solutions/)
|
|
320
|
+
🐙 [GitHub](https://github.com/CodeMill-Solutions)
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
246
324
|
## License
|
|
247
325
|
|
|
248
326
|
MIT — see [LICENSE](./LICENSE).
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import 'dotenv/config';
|
|
2
|
+
import { readFileSync, existsSync } from 'fs';
|
|
3
|
+
import { join } from 'path';
|
|
4
|
+
import { homedir } from 'os';
|
|
2
5
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
6
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
7
|
import { YukiClient } from './yuki-client.js';
|
|
5
8
|
// Read tools
|
|
6
|
-
import { registerAdministrationTools } from './tools/administrations.js';
|
|
9
|
+
import { registerAdministrationTools, registerAdministrationLookupTools } from './tools/administrations.js';
|
|
7
10
|
import { registerRelationTools } from './tools/relations.js';
|
|
8
11
|
import { registerInvoiceTools } from './tools/invoices.js';
|
|
9
12
|
import { registerTransactionTools } from './tools/transactions.js';
|
|
10
|
-
import { registerAccountingTools } from './tools/accounting.js';
|
|
13
|
+
import { registerAccountingTools, registerAccountingExtendedTools } from './tools/accounting.js';
|
|
14
|
+
import { registerAccountingInfoTools } from './tools/accounting-info.js';
|
|
11
15
|
// Write tools
|
|
12
16
|
import { registerInvoiceWriteTools } from './tools/invoices.js';
|
|
13
17
|
import { registerJournalWriteTools } from './tools/transactions.js';
|
|
@@ -15,28 +19,63 @@ import { registerContactWriteTools } from './tools/relations.js';
|
|
|
15
19
|
import { registerDocumentTools } from './tools/documents.js';
|
|
16
20
|
// Backoffice tools
|
|
17
21
|
import { registerBackofficeTools } from './tools/backoffice.js';
|
|
22
|
+
// ── API key map ───────────────────────────────────────────────────────────────
|
|
23
|
+
//
|
|
24
|
+
// Optionally load a JSON file that maps administrationId → apiKey.
|
|
25
|
+
// This allows the MCP server to serve multiple Yuki administrations, each with
|
|
26
|
+
// its own API key, without requiring a single YUKI_API_KEY for all of them.
|
|
27
|
+
//
|
|
28
|
+
// The file format is a plain JSON object:
|
|
29
|
+
// { "<administrationId>": "<apiKey>", ... }
|
|
30
|
+
//
|
|
31
|
+
// Path resolution (first match wins):
|
|
32
|
+
// 1. YUKI_API_KEYS_FILE environment variable (explicit path)
|
|
33
|
+
// 2. ~/.yuki/api-keys.json (default user-level location)
|
|
34
|
+
// 3. ./api-keys.json (local fallback for development)
|
|
35
|
+
const DEFAULT_KEYS_FILE = join(homedir(), '.yuki', 'api-keys.json');
|
|
36
|
+
const keysFilePath = process.env['YUKI_API_KEYS_FILE'] ??
|
|
37
|
+
(existsSync(DEFAULT_KEYS_FILE) ? DEFAULT_KEYS_FILE : 'api-keys.json');
|
|
38
|
+
const apiKeyMap = new Map();
|
|
39
|
+
if (existsSync(keysFilePath)) {
|
|
40
|
+
try {
|
|
41
|
+
const raw = JSON.parse(readFileSync(keysFilePath, 'utf-8'));
|
|
42
|
+
for (const [adminId, key] of Object.entries(raw)) {
|
|
43
|
+
if (adminId && key)
|
|
44
|
+
apiKeyMap.set(adminId, key);
|
|
45
|
+
}
|
|
46
|
+
process.stderr.write(`[yuki-mcp] Loaded ${apiKeyMap.size} API keys from ${keysFilePath}\n`);
|
|
47
|
+
}
|
|
48
|
+
catch (err) {
|
|
49
|
+
process.stderr.write(`[yuki-mcp] Warning: could not read API keys file at ${keysFilePath}: ${err}\n`);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
18
52
|
// ── Environment validation ────────────────────────────────────────────────────
|
|
19
|
-
const apiKey = process.env['YUKI_API_KEY'];
|
|
53
|
+
const apiKey = process.env['YUKI_API_KEY'] ?? '';
|
|
20
54
|
const domainId = process.env['YUKI_DOMAIN_ID'] ?? '';
|
|
21
|
-
if (!apiKey) {
|
|
22
|
-
//
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
55
|
+
if (!apiKey && apiKeyMap.size === 0) {
|
|
56
|
+
// Neither a default key nor a keys file — nothing will work
|
|
57
|
+
process.stderr.write('[yuki-mcp] Warning: YUKI_API_KEY is not set and no api-keys.json was found.\n' +
|
|
58
|
+
' Run a full sync from the dashboard, or set YUKI_API_KEY.\n');
|
|
59
|
+
}
|
|
60
|
+
else if (!apiKey) {
|
|
61
|
+
process.stderr.write(`[yuki-mcp] Note: YUKI_API_KEY not set — using per-administration keys (${apiKeyMap.size} loaded).\n`);
|
|
26
62
|
}
|
|
27
63
|
// ── Yuki SOAP client ──────────────────────────────────────────────────────────
|
|
28
|
-
const yukiClient = new YukiClient(apiKey, domainId);
|
|
64
|
+
const yukiClient = new YukiClient(apiKey, domainId, apiKeyMap);
|
|
29
65
|
// ── MCP server ────────────────────────────────────────────────────────────────
|
|
30
66
|
const server = new McpServer({
|
|
31
67
|
name: 'yuki-mcp',
|
|
32
|
-
version: '1.
|
|
68
|
+
version: '1.3.0',
|
|
33
69
|
});
|
|
34
70
|
// ── Read tools ────────────────────────────────────────────────────────────────
|
|
35
71
|
registerAdministrationTools(server, yukiClient);
|
|
72
|
+
registerAdministrationLookupTools(server, yukiClient);
|
|
36
73
|
registerRelationTools(server, yukiClient);
|
|
37
74
|
registerInvoiceTools(server, yukiClient);
|
|
38
75
|
registerTransactionTools(server, yukiClient);
|
|
39
76
|
registerAccountingTools(server, yukiClient);
|
|
77
|
+
registerAccountingExtendedTools(server, yukiClient);
|
|
78
|
+
registerAccountingInfoTools(server, yukiClient);
|
|
40
79
|
// ── Write tools ───────────────────────────────────────────────────────────────
|
|
41
80
|
registerInvoiceWriteTools(server, yukiClient);
|
|
42
81
|
registerJournalWriteTools(server, yukiClient);
|
|
@@ -48,6 +87,11 @@ registerBackofficeTools(server, yukiClient);
|
|
|
48
87
|
const transport = new StdioServerTransport();
|
|
49
88
|
await server.connect(transport);
|
|
50
89
|
// Log startup info to stderr only (stdout is reserved for JSON-RPC)
|
|
51
|
-
|
|
52
|
-
|
|
90
|
+
const keyInfo = apiKeyMap.size > 0
|
|
91
|
+
? `${apiKeyMap.size} per-admin keys loaded`
|
|
92
|
+
: apiKey
|
|
93
|
+
? 'single YUKI_API_KEY'
|
|
94
|
+
: 'no API keys configured';
|
|
95
|
+
process.stderr.write(`[yuki-mcp] Server started — 29 tools registered. ` +
|
|
96
|
+
`Domain ID: ${domainId || '(none)'} — ${keyInfo}\n`);
|
|
53
97
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,aAAa;AACb,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,aAAa;AACb,OAAO,EAAE,2BAA2B,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAC5G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uki AccountingInfo service.
|
|
5
|
+
*
|
|
6
|
+
* AccountingInfo.asmx provides richer read-only views of accounting data
|
|
7
|
+
* that are not available through the main Accounting.asmx service:
|
|
8
|
+
*
|
|
9
|
+
* - Full GL account scheme (codes, types, subtypes, active/inactive)
|
|
10
|
+
* - Fiscal period table (period names and date ranges per year)
|
|
11
|
+
* - Detailed transaction listing (includes document type, folder, period, project)
|
|
12
|
+
* - Transaction document download (retrieve the source PDF as base64)
|
|
13
|
+
* - Opening balances per GL account per fiscal year
|
|
14
|
+
*
|
|
15
|
+
* Yuki service: AccountingInfo.asmx
|
|
16
|
+
* Note: uses sessionID / administrationID (uppercase D), same as Accounting.asmx.
|
|
17
|
+
*/
|
|
18
|
+
export declare function registerAccountingInfoTools(server: McpServer, client: YukiClient): void;
|
|
19
|
+
//# sourceMappingURL=accounting-info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accounting-info.d.ts","sourceRoot":"","sources":["../../src/tools/accounting-info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,CAsXvF"}
|