@tokensapi/dsh-finance 0.1.0-beta.1

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.
@@ -0,0 +1,784 @@
1
+ import { z } from 'zod';
2
+ import type { InvocationDescriptor } from '@deepseek-ai/dsh-typert-protocol';
3
+ export declare const FINANCE_PACKAGE_NAME = "@tokensapi/dsh-finance";
4
+ export declare const FINANCE_NAMESPACE = "finance";
5
+ export declare const FINANCE_STATE_FORMAT = "tokens-cowork-finance-state";
6
+ export declare const FINANCE_STATE_VERSION = 1;
7
+ export declare const FINANCE_BACKUP_FORMAT = "tokenscowork-finance-backup";
8
+ export declare const FINANCE_BACKUP_VERSION = 1;
9
+ export declare const accountCategorySchema: z.ZodEnum<{
10
+ asset: "asset";
11
+ liability: "liability";
12
+ equity: "equity";
13
+ income: "income";
14
+ expense: "expense";
15
+ }>;
16
+ export type AccountCategory = z.infer<typeof accountCategorySchema>;
17
+ export declare const companySchema: z.ZodReadonly<z.ZodObject<{
18
+ id: z.ZodString;
19
+ name: z.ZodString;
20
+ baseCurrency: z.ZodString;
21
+ currencyExponent: z.ZodNumber;
22
+ openingDate: z.ZodString;
23
+ openingLocked: z.ZodBoolean;
24
+ retainedEarningsAccountId: z.ZodString;
25
+ createdAt: z.ZodString;
26
+ updatedAt: z.ZodString;
27
+ }, z.core.$strip>>;
28
+ export type Company = z.infer<typeof companySchema>;
29
+ export declare const accountSchema: z.ZodReadonly<z.ZodObject<{
30
+ id: z.ZodString;
31
+ companyId: z.ZodString;
32
+ code: z.ZodString;
33
+ name: z.ZodString;
34
+ category: z.ZodEnum<{
35
+ asset: "asset";
36
+ liability: "liability";
37
+ equity: "equity";
38
+ income: "income";
39
+ expense: "expense";
40
+ }>;
41
+ reportItem: z.ZodString;
42
+ openingBalanceMinor: z.ZodString;
43
+ isContra: z.ZodBoolean;
44
+ isActive: z.ZodBoolean;
45
+ createdAt: z.ZodString;
46
+ updatedAt: z.ZodString;
47
+ }, z.core.$strip>>;
48
+ export type Account = z.infer<typeof accountSchema>;
49
+ export declare const importSourceTypeSchema: z.ZodEnum<{
50
+ csv: "csv";
51
+ xlsx: "xlsx";
52
+ paste: "paste";
53
+ sample: "sample";
54
+ }>;
55
+ export type ImportSourceType = z.infer<typeof importSourceTypeSchema>;
56
+ export declare const importBatchSchema: z.ZodReadonly<z.ZodObject<{
57
+ id: z.ZodString;
58
+ companyId: z.ZodString;
59
+ fundingAccountId: z.ZodString;
60
+ sourceType: z.ZodEnum<{
61
+ csv: "csv";
62
+ xlsx: "xlsx";
63
+ paste: "paste";
64
+ sample: "sample";
65
+ }>;
66
+ sourceFileName: z.ZodNullable<z.ZodString>;
67
+ importedAt: z.ZodString;
68
+ status: z.ZodEnum<{
69
+ draft: "draft";
70
+ approved: "approved";
71
+ }>;
72
+ approvedAt: z.ZodNullable<z.ZodString>;
73
+ createdAt: z.ZodString;
74
+ updatedAt: z.ZodString;
75
+ }, z.core.$strip>>;
76
+ export type ImportBatch = z.infer<typeof importBatchSchema>;
77
+ export declare const transactionSchema: z.ZodReadonly<z.ZodObject<{
78
+ id: z.ZodString;
79
+ companyId: z.ZodString;
80
+ batchId: z.ZodString;
81
+ date: z.ZodString;
82
+ amountMinor: z.ZodString;
83
+ businessAccountId: z.ZodString;
84
+ description: z.ZodString;
85
+ counterparty: z.ZodString;
86
+ sourceRowNumber: z.ZodNullable<z.ZodNumber>;
87
+ createdAt: z.ZodString;
88
+ updatedAt: z.ZodString;
89
+ }, z.core.$strip>>;
90
+ export type Transaction = z.infer<typeof transactionSchema>;
91
+ export declare const financeStateSchema: z.ZodReadonly<z.ZodObject<{
92
+ format: z.ZodLiteral<"tokens-cowork-finance-state">;
93
+ version: z.ZodLiteral<1>;
94
+ revision: z.ZodNumber;
95
+ companies: z.ZodArray<z.ZodReadonly<z.ZodObject<{
96
+ id: z.ZodString;
97
+ name: z.ZodString;
98
+ baseCurrency: z.ZodString;
99
+ currencyExponent: z.ZodNumber;
100
+ openingDate: z.ZodString;
101
+ openingLocked: z.ZodBoolean;
102
+ retainedEarningsAccountId: z.ZodString;
103
+ createdAt: z.ZodString;
104
+ updatedAt: z.ZodString;
105
+ }, z.core.$strip>>>;
106
+ accounts: z.ZodArray<z.ZodReadonly<z.ZodObject<{
107
+ id: z.ZodString;
108
+ companyId: z.ZodString;
109
+ code: z.ZodString;
110
+ name: z.ZodString;
111
+ category: z.ZodEnum<{
112
+ asset: "asset";
113
+ liability: "liability";
114
+ equity: "equity";
115
+ income: "income";
116
+ expense: "expense";
117
+ }>;
118
+ reportItem: z.ZodString;
119
+ openingBalanceMinor: z.ZodString;
120
+ isContra: z.ZodBoolean;
121
+ isActive: z.ZodBoolean;
122
+ createdAt: z.ZodString;
123
+ updatedAt: z.ZodString;
124
+ }, z.core.$strip>>>;
125
+ batches: z.ZodArray<z.ZodReadonly<z.ZodObject<{
126
+ id: z.ZodString;
127
+ companyId: z.ZodString;
128
+ fundingAccountId: z.ZodString;
129
+ sourceType: z.ZodEnum<{
130
+ csv: "csv";
131
+ xlsx: "xlsx";
132
+ paste: "paste";
133
+ sample: "sample";
134
+ }>;
135
+ sourceFileName: z.ZodNullable<z.ZodString>;
136
+ importedAt: z.ZodString;
137
+ status: z.ZodEnum<{
138
+ draft: "draft";
139
+ approved: "approved";
140
+ }>;
141
+ approvedAt: z.ZodNullable<z.ZodString>;
142
+ createdAt: z.ZodString;
143
+ updatedAt: z.ZodString;
144
+ }, z.core.$strip>>>;
145
+ transactions: z.ZodArray<z.ZodReadonly<z.ZodObject<{
146
+ id: z.ZodString;
147
+ companyId: z.ZodString;
148
+ batchId: z.ZodString;
149
+ date: z.ZodString;
150
+ amountMinor: z.ZodString;
151
+ businessAccountId: z.ZodString;
152
+ description: z.ZodString;
153
+ counterparty: z.ZodString;
154
+ sourceRowNumber: z.ZodNullable<z.ZodNumber>;
155
+ createdAt: z.ZodString;
156
+ updatedAt: z.ZodString;
157
+ }, z.core.$strip>>>;
158
+ createdAt: z.ZodString;
159
+ updatedAt: z.ZodString;
160
+ }, z.core.$strip>>;
161
+ export type FinanceState = z.infer<typeof financeStateSchema>;
162
+ export declare const openingSummarySchema: z.ZodReadonly<z.ZodObject<{
163
+ assetsMinor: z.ZodString;
164
+ liabilitiesMinor: z.ZodString;
165
+ equityMinor: z.ZodString;
166
+ differenceMinor: z.ZodString;
167
+ balanced: z.ZodBoolean;
168
+ }, z.core.$strip>>;
169
+ export type OpeningSummary = z.infer<typeof openingSummarySchema>;
170
+ export declare const financeBootstrapSchema: z.ZodReadonly<z.ZodObject<{
171
+ revision: z.ZodNumber;
172
+ companies: z.ZodArray<z.ZodReadonly<z.ZodObject<{
173
+ id: z.ZodString;
174
+ name: z.ZodString;
175
+ baseCurrency: z.ZodString;
176
+ currencyExponent: z.ZodNumber;
177
+ openingDate: z.ZodString;
178
+ openingLocked: z.ZodBoolean;
179
+ retainedEarningsAccountId: z.ZodString;
180
+ createdAt: z.ZodString;
181
+ updatedAt: z.ZodString;
182
+ }, z.core.$strip>>>;
183
+ limits: z.ZodReadonly<z.ZodObject<{
184
+ maxImportFileBytes: z.ZodNumber;
185
+ maxImportRows: z.ZodNumber;
186
+ }, z.core.$strip>>;
187
+ capabilities: z.ZodReadonly<z.ZodObject<{
188
+ companyManagement: z.ZodBoolean;
189
+ accountManagement: z.ZodBoolean;
190
+ transactionImport: z.ZodBoolean;
191
+ reports: z.ZodBoolean;
192
+ backup: z.ZodBoolean;
193
+ }, z.core.$strip>>;
194
+ }, z.core.$strip>>;
195
+ export type FinanceBootstrap = z.infer<typeof financeBootstrapSchema>;
196
+ export declare const companyWorkspaceSchema: z.ZodReadonly<z.ZodObject<{
197
+ revision: z.ZodNumber;
198
+ company: z.ZodReadonly<z.ZodObject<{
199
+ id: z.ZodString;
200
+ name: z.ZodString;
201
+ baseCurrency: z.ZodString;
202
+ currencyExponent: z.ZodNumber;
203
+ openingDate: z.ZodString;
204
+ openingLocked: z.ZodBoolean;
205
+ retainedEarningsAccountId: z.ZodString;
206
+ createdAt: z.ZodString;
207
+ updatedAt: z.ZodString;
208
+ }, z.core.$strip>>;
209
+ accounts: z.ZodArray<z.ZodReadonly<z.ZodObject<{
210
+ id: z.ZodString;
211
+ companyId: z.ZodString;
212
+ code: z.ZodString;
213
+ name: z.ZodString;
214
+ category: z.ZodEnum<{
215
+ asset: "asset";
216
+ liability: "liability";
217
+ equity: "equity";
218
+ income: "income";
219
+ expense: "expense";
220
+ }>;
221
+ reportItem: z.ZodString;
222
+ openingBalanceMinor: z.ZodString;
223
+ isContra: z.ZodBoolean;
224
+ isActive: z.ZodBoolean;
225
+ createdAt: z.ZodString;
226
+ updatedAt: z.ZodString;
227
+ }, z.core.$strip>>>;
228
+ openingSummary: z.ZodReadonly<z.ZodObject<{
229
+ assetsMinor: z.ZodString;
230
+ liabilitiesMinor: z.ZodString;
231
+ equityMinor: z.ZodString;
232
+ differenceMinor: z.ZodString;
233
+ balanced: z.ZodBoolean;
234
+ }, z.core.$strip>>;
235
+ }, z.core.$strip>>;
236
+ export type CompanyWorkspace = z.infer<typeof companyWorkspaceSchema>;
237
+ export declare const importPreviewRowSchema: z.ZodReadonly<z.ZodObject<{
238
+ rowNumber: z.ZodNumber;
239
+ rawDate: z.ZodString;
240
+ rawAmount: z.ZodString;
241
+ rawAccount: z.ZodString;
242
+ date: z.ZodNullable<z.ZodString>;
243
+ amountMinor: z.ZodNullable<z.ZodString>;
244
+ description: z.ZodString;
245
+ counterparty: z.ZodString;
246
+ businessAccountId: z.ZodNullable<z.ZodString>;
247
+ errors: z.ZodArray<z.ZodString>;
248
+ }, z.core.$strip>>;
249
+ export type ImportPreviewRow = z.infer<typeof importPreviewRowSchema>;
250
+ export declare const importPreviewSchema: z.ZodReadonly<z.ZodObject<{
251
+ revision: z.ZodNumber;
252
+ companyId: z.ZodString;
253
+ fundingAccountId: z.ZodString;
254
+ sourceType: z.ZodEnum<{
255
+ csv: "csv";
256
+ xlsx: "xlsx";
257
+ paste: "paste";
258
+ }>;
259
+ sourceFileName: z.ZodNullable<z.ZodString>;
260
+ rows: z.ZodArray<z.ZodReadonly<z.ZodObject<{
261
+ rowNumber: z.ZodNumber;
262
+ rawDate: z.ZodString;
263
+ rawAmount: z.ZodString;
264
+ rawAccount: z.ZodString;
265
+ date: z.ZodNullable<z.ZodString>;
266
+ amountMinor: z.ZodNullable<z.ZodString>;
267
+ description: z.ZodString;
268
+ counterparty: z.ZodString;
269
+ businessAccountId: z.ZodNullable<z.ZodString>;
270
+ errors: z.ZodArray<z.ZodString>;
271
+ }, z.core.$strip>>>;
272
+ validRows: z.ZodNumber;
273
+ inflowMinor: z.ZodString;
274
+ outflowMinor: z.ZodString;
275
+ netMinor: z.ZodString;
276
+ }, z.core.$strip>>;
277
+ export type ImportPreview = z.infer<typeof importPreviewSchema>;
278
+ export declare const previewImportInputSchema: z.ZodReadonly<z.ZodObject<{
279
+ companyId: z.ZodString;
280
+ fundingAccountId: z.ZodString;
281
+ sourceType: z.ZodEnum<{
282
+ csv: "csv";
283
+ xlsx: "xlsx";
284
+ paste: "paste";
285
+ }>;
286
+ sourceFileName: z.ZodNullable<z.ZodString>;
287
+ content: z.ZodString;
288
+ }, z.core.$strip>>;
289
+ export type PreviewImportInput = z.infer<typeof previewImportInputSchema>;
290
+ export declare const commitImportRowSchema: z.ZodReadonly<z.ZodObject<{
291
+ rowNumber: z.ZodNumber;
292
+ date: z.ZodString;
293
+ amountMinor: z.ZodString;
294
+ businessAccountId: z.ZodString;
295
+ description: z.ZodString;
296
+ counterparty: z.ZodString;
297
+ }, z.core.$strip>>;
298
+ export type CommitImportRow = z.infer<typeof commitImportRowSchema>;
299
+ export declare const commitImportInputSchema: z.ZodReadonly<z.ZodObject<{
300
+ companyId: z.ZodString;
301
+ fundingAccountId: z.ZodString;
302
+ sourceType: z.ZodEnum<{
303
+ csv: "csv";
304
+ xlsx: "xlsx";
305
+ paste: "paste";
306
+ }>;
307
+ sourceFileName: z.ZodNullable<z.ZodString>;
308
+ rows: z.ZodArray<z.ZodReadonly<z.ZodObject<{
309
+ rowNumber: z.ZodNumber;
310
+ date: z.ZodString;
311
+ amountMinor: z.ZodString;
312
+ businessAccountId: z.ZodString;
313
+ description: z.ZodString;
314
+ counterparty: z.ZodString;
315
+ }, z.core.$strip>>>;
316
+ expectedRevision: z.ZodNumber;
317
+ }, z.core.$strip>>;
318
+ export type CommitImportInput = z.infer<typeof commitImportInputSchema>;
319
+ export declare const importCommitResultSchema: z.ZodReadonly<z.ZodObject<{
320
+ revision: z.ZodNumber;
321
+ batchId: z.ZodString;
322
+ count: z.ZodNumber;
323
+ inflowMinor: z.ZodString;
324
+ outflowMinor: z.ZodString;
325
+ netMinor: z.ZodString;
326
+ }, z.core.$strip>>;
327
+ export type ImportCommitResult = z.infer<typeof importCommitResultSchema>;
328
+ export declare const batchSummarySchema: z.ZodReadonly<z.ZodObject<{
329
+ id: z.ZodString;
330
+ companyId: z.ZodString;
331
+ fundingAccountId: z.ZodString;
332
+ sourceType: z.ZodEnum<{
333
+ csv: "csv";
334
+ xlsx: "xlsx";
335
+ paste: "paste";
336
+ sample: "sample";
337
+ }>;
338
+ sourceFileName: z.ZodNullable<z.ZodString>;
339
+ importedAt: z.ZodString;
340
+ status: z.ZodEnum<{
341
+ draft: "draft";
342
+ approved: "approved";
343
+ }>;
344
+ approvedAt: z.ZodNullable<z.ZodString>;
345
+ recordCount: z.ZodNumber;
346
+ startDate: z.ZodNullable<z.ZodString>;
347
+ endDate: z.ZodNullable<z.ZodString>;
348
+ inflowMinor: z.ZodString;
349
+ outflowMinor: z.ZodString;
350
+ netMinor: z.ZodString;
351
+ }, z.core.$strip>>;
352
+ export type BatchSummary = z.infer<typeof batchSummarySchema>;
353
+ export declare const companyBatchListSchema: z.ZodReadonly<z.ZodObject<{
354
+ revision: z.ZodNumber;
355
+ companyId: z.ZodString;
356
+ batches: z.ZodArray<z.ZodReadonly<z.ZodObject<{
357
+ id: z.ZodString;
358
+ companyId: z.ZodString;
359
+ fundingAccountId: z.ZodString;
360
+ sourceType: z.ZodEnum<{
361
+ csv: "csv";
362
+ xlsx: "xlsx";
363
+ paste: "paste";
364
+ sample: "sample";
365
+ }>;
366
+ sourceFileName: z.ZodNullable<z.ZodString>;
367
+ importedAt: z.ZodString;
368
+ status: z.ZodEnum<{
369
+ draft: "draft";
370
+ approved: "approved";
371
+ }>;
372
+ approvedAt: z.ZodNullable<z.ZodString>;
373
+ recordCount: z.ZodNumber;
374
+ startDate: z.ZodNullable<z.ZodString>;
375
+ endDate: z.ZodNullable<z.ZodString>;
376
+ inflowMinor: z.ZodString;
377
+ outflowMinor: z.ZodString;
378
+ netMinor: z.ZodString;
379
+ }, z.core.$strip>>>;
380
+ }, z.core.$strip>>;
381
+ export type CompanyBatchList = z.infer<typeof companyBatchListSchema>;
382
+ export declare const batchDetailSchema: z.ZodReadonly<z.ZodObject<{
383
+ revision: z.ZodNumber;
384
+ batch: z.ZodReadonly<z.ZodObject<{
385
+ id: z.ZodString;
386
+ companyId: z.ZodString;
387
+ fundingAccountId: z.ZodString;
388
+ sourceType: z.ZodEnum<{
389
+ csv: "csv";
390
+ xlsx: "xlsx";
391
+ paste: "paste";
392
+ sample: "sample";
393
+ }>;
394
+ sourceFileName: z.ZodNullable<z.ZodString>;
395
+ importedAt: z.ZodString;
396
+ status: z.ZodEnum<{
397
+ draft: "draft";
398
+ approved: "approved";
399
+ }>;
400
+ approvedAt: z.ZodNullable<z.ZodString>;
401
+ createdAt: z.ZodString;
402
+ updatedAt: z.ZodString;
403
+ }, z.core.$strip>>;
404
+ transactions: z.ZodArray<z.ZodReadonly<z.ZodObject<{
405
+ id: z.ZodString;
406
+ companyId: z.ZodString;
407
+ batchId: z.ZodString;
408
+ date: z.ZodString;
409
+ amountMinor: z.ZodString;
410
+ businessAccountId: z.ZodString;
411
+ description: z.ZodString;
412
+ counterparty: z.ZodString;
413
+ sourceRowNumber: z.ZodNullable<z.ZodNumber>;
414
+ createdAt: z.ZodString;
415
+ updatedAt: z.ZodString;
416
+ }, z.core.$strip>>>;
417
+ }, z.core.$strip>>;
418
+ export type BatchDetail = z.infer<typeof batchDetailSchema>;
419
+ export declare const accountReportLineSchema: z.ZodReadonly<z.ZodObject<{
420
+ accountId: z.ZodString;
421
+ code: z.ZodString;
422
+ name: z.ZodString;
423
+ category: z.ZodEnum<{
424
+ asset: "asset";
425
+ liability: "liability";
426
+ equity: "equity";
427
+ income: "income";
428
+ expense: "expense";
429
+ }>;
430
+ reportItem: z.ZodString;
431
+ isContra: z.ZodBoolean;
432
+ openingBalanceMinor: z.ZodString;
433
+ movementMinor: z.ZodString;
434
+ closingBalanceMinor: z.ZodString;
435
+ }, z.core.$strip>>;
436
+ export type AccountReportLine = z.infer<typeof accountReportLineSchema>;
437
+ export declare const profitReportLineSchema: z.ZodReadonly<z.ZodObject<{
438
+ accountId: z.ZodString;
439
+ code: z.ZodString;
440
+ name: z.ZodString;
441
+ category: z.ZodEnum<{
442
+ income: "income";
443
+ expense: "expense";
444
+ }>;
445
+ reportItem: z.ZodString;
446
+ amountMinor: z.ZodString;
447
+ }, z.core.$strip>>;
448
+ export type ProfitReportLine = z.infer<typeof profitReportLineSchema>;
449
+ export declare const balanceSheetSchema: z.ZodReadonly<z.ZodObject<{
450
+ asOfDate: z.ZodString;
451
+ lines: z.ZodArray<z.ZodReadonly<z.ZodObject<{
452
+ accountId: z.ZodString;
453
+ code: z.ZodString;
454
+ name: z.ZodString;
455
+ category: z.ZodEnum<{
456
+ asset: "asset";
457
+ liability: "liability";
458
+ equity: "equity";
459
+ income: "income";
460
+ expense: "expense";
461
+ }>;
462
+ reportItem: z.ZodString;
463
+ isContra: z.ZodBoolean;
464
+ openingBalanceMinor: z.ZodString;
465
+ movementMinor: z.ZodString;
466
+ closingBalanceMinor: z.ZodString;
467
+ }, z.core.$strip>>>;
468
+ totalAssetsMinor: z.ZodString;
469
+ totalLiabilitiesMinor: z.ZodString;
470
+ totalEquityMinor: z.ZodString;
471
+ netProfitToDateMinor: z.ZodString;
472
+ differenceMinor: z.ZodString;
473
+ balanced: z.ZodBoolean;
474
+ }, z.core.$strip>>;
475
+ export type BalanceSheet = z.infer<typeof balanceSheetSchema>;
476
+ export declare const incomeStatementSchema: z.ZodReadonly<z.ZodObject<{
477
+ startDate: z.ZodString;
478
+ endDate: z.ZodString;
479
+ lines: z.ZodArray<z.ZodReadonly<z.ZodObject<{
480
+ accountId: z.ZodString;
481
+ code: z.ZodString;
482
+ name: z.ZodString;
483
+ category: z.ZodEnum<{
484
+ income: "income";
485
+ expense: "expense";
486
+ }>;
487
+ reportItem: z.ZodString;
488
+ amountMinor: z.ZodString;
489
+ }, z.core.$strip>>>;
490
+ mainRevenueMinor: z.ZodString;
491
+ otherRevenueMinor: z.ZodString;
492
+ operatingRevenueMinor: z.ZodString;
493
+ mainCostMinor: z.ZodString;
494
+ otherCostMinor: z.ZodString;
495
+ sellingExpenseMinor: z.ZodString;
496
+ administrativeExpenseMinor: z.ZodString;
497
+ financialExpenseMinor: z.ZodString;
498
+ operatingProfitMinor: z.ZodString;
499
+ nonOperatingIncomeMinor: z.ZodString;
500
+ nonOperatingExpenseMinor: z.ZodString;
501
+ profitBeforeTaxMinor: z.ZodString;
502
+ incomeTaxExpenseMinor: z.ZodString;
503
+ netProfitMinor: z.ZodString;
504
+ }, z.core.$strip>>;
505
+ export type IncomeStatement = z.infer<typeof incomeStatementSchema>;
506
+ export declare const financeReportsSchema: z.ZodReadonly<z.ZodObject<{
507
+ revision: z.ZodNumber;
508
+ companyId: z.ZodString;
509
+ currency: z.ZodString;
510
+ currencyExponent: z.ZodNumber;
511
+ balanceSheet: z.ZodReadonly<z.ZodObject<{
512
+ asOfDate: z.ZodString;
513
+ lines: z.ZodArray<z.ZodReadonly<z.ZodObject<{
514
+ accountId: z.ZodString;
515
+ code: z.ZodString;
516
+ name: z.ZodString;
517
+ category: z.ZodEnum<{
518
+ asset: "asset";
519
+ liability: "liability";
520
+ equity: "equity";
521
+ income: "income";
522
+ expense: "expense";
523
+ }>;
524
+ reportItem: z.ZodString;
525
+ isContra: z.ZodBoolean;
526
+ openingBalanceMinor: z.ZodString;
527
+ movementMinor: z.ZodString;
528
+ closingBalanceMinor: z.ZodString;
529
+ }, z.core.$strip>>>;
530
+ totalAssetsMinor: z.ZodString;
531
+ totalLiabilitiesMinor: z.ZodString;
532
+ totalEquityMinor: z.ZodString;
533
+ netProfitToDateMinor: z.ZodString;
534
+ differenceMinor: z.ZodString;
535
+ balanced: z.ZodBoolean;
536
+ }, z.core.$strip>>;
537
+ incomeStatement: z.ZodReadonly<z.ZodObject<{
538
+ startDate: z.ZodString;
539
+ endDate: z.ZodString;
540
+ lines: z.ZodArray<z.ZodReadonly<z.ZodObject<{
541
+ accountId: z.ZodString;
542
+ code: z.ZodString;
543
+ name: z.ZodString;
544
+ category: z.ZodEnum<{
545
+ income: "income";
546
+ expense: "expense";
547
+ }>;
548
+ reportItem: z.ZodString;
549
+ amountMinor: z.ZodString;
550
+ }, z.core.$strip>>>;
551
+ mainRevenueMinor: z.ZodString;
552
+ otherRevenueMinor: z.ZodString;
553
+ operatingRevenueMinor: z.ZodString;
554
+ mainCostMinor: z.ZodString;
555
+ otherCostMinor: z.ZodString;
556
+ sellingExpenseMinor: z.ZodString;
557
+ administrativeExpenseMinor: z.ZodString;
558
+ financialExpenseMinor: z.ZodString;
559
+ operatingProfitMinor: z.ZodString;
560
+ nonOperatingIncomeMinor: z.ZodString;
561
+ nonOperatingExpenseMinor: z.ZodString;
562
+ profitBeforeTaxMinor: z.ZodString;
563
+ incomeTaxExpenseMinor: z.ZodString;
564
+ netProfitMinor: z.ZodString;
565
+ }, z.core.$strip>>;
566
+ }, z.core.$strip>>;
567
+ export type FinanceReports = z.infer<typeof financeReportsSchema>;
568
+ export declare const backupEnvelopeSchema: z.ZodReadonly<z.ZodObject<{
569
+ format: z.ZodLiteral<"tokenscowork-finance-backup">;
570
+ version: z.ZodLiteral<1>;
571
+ exportedAt: z.ZodString;
572
+ stateCreatedAt: z.ZodString;
573
+ sourceRevision: z.ZodNumber;
574
+ companies: z.ZodArray<z.ZodReadonly<z.ZodObject<{
575
+ id: z.ZodString;
576
+ name: z.ZodString;
577
+ baseCurrency: z.ZodString;
578
+ currencyExponent: z.ZodNumber;
579
+ openingDate: z.ZodString;
580
+ openingLocked: z.ZodBoolean;
581
+ retainedEarningsAccountId: z.ZodString;
582
+ createdAt: z.ZodString;
583
+ updatedAt: z.ZodString;
584
+ }, z.core.$strip>>>;
585
+ accounts: z.ZodArray<z.ZodReadonly<z.ZodObject<{
586
+ id: z.ZodString;
587
+ companyId: z.ZodString;
588
+ code: z.ZodString;
589
+ name: z.ZodString;
590
+ category: z.ZodEnum<{
591
+ asset: "asset";
592
+ liability: "liability";
593
+ equity: "equity";
594
+ income: "income";
595
+ expense: "expense";
596
+ }>;
597
+ reportItem: z.ZodString;
598
+ openingBalanceMinor: z.ZodString;
599
+ isContra: z.ZodBoolean;
600
+ isActive: z.ZodBoolean;
601
+ createdAt: z.ZodString;
602
+ updatedAt: z.ZodString;
603
+ }, z.core.$strip>>>;
604
+ batches: z.ZodArray<z.ZodReadonly<z.ZodObject<{
605
+ id: z.ZodString;
606
+ companyId: z.ZodString;
607
+ fundingAccountId: z.ZodString;
608
+ sourceType: z.ZodEnum<{
609
+ csv: "csv";
610
+ xlsx: "xlsx";
611
+ paste: "paste";
612
+ sample: "sample";
613
+ }>;
614
+ sourceFileName: z.ZodNullable<z.ZodString>;
615
+ importedAt: z.ZodString;
616
+ status: z.ZodEnum<{
617
+ draft: "draft";
618
+ approved: "approved";
619
+ }>;
620
+ approvedAt: z.ZodNullable<z.ZodString>;
621
+ createdAt: z.ZodString;
622
+ updatedAt: z.ZodString;
623
+ }, z.core.$strip>>>;
624
+ transactions: z.ZodArray<z.ZodReadonly<z.ZodObject<{
625
+ id: z.ZodString;
626
+ companyId: z.ZodString;
627
+ batchId: z.ZodString;
628
+ date: z.ZodString;
629
+ amountMinor: z.ZodString;
630
+ businessAccountId: z.ZodString;
631
+ description: z.ZodString;
632
+ counterparty: z.ZodString;
633
+ sourceRowNumber: z.ZodNullable<z.ZodNumber>;
634
+ createdAt: z.ZodString;
635
+ updatedAt: z.ZodString;
636
+ }, z.core.$strip>>>;
637
+ settings: z.ZodRecord<z.ZodString, z.ZodUnknown>;
638
+ }, z.core.$strip>>;
639
+ export type BackupEnvelope = z.infer<typeof backupEnvelopeSchema>;
640
+ export declare const backupPreviewSchema: z.ZodReadonly<z.ZodObject<{
641
+ format: z.ZodLiteral<"tokenscowork-finance-backup">;
642
+ version: z.ZodLiteral<1>;
643
+ exportedAt: z.ZodString;
644
+ sourceRevision: z.ZodNumber;
645
+ companyCount: z.ZodNumber;
646
+ accountCount: z.ZodNumber;
647
+ batchCount: z.ZodNumber;
648
+ transactionCount: z.ZodNumber;
649
+ companyNames: z.ZodArray<z.ZodString>;
650
+ }, z.core.$strip>>;
651
+ export type BackupPreview = z.infer<typeof backupPreviewSchema>;
652
+ export declare const createCompanyInputSchema: z.ZodReadonly<z.ZodObject<{
653
+ name: z.ZodString;
654
+ baseCurrency: z.ZodString;
655
+ currencyExponent: z.ZodNumber;
656
+ openingDate: z.ZodString;
657
+ expectedRevision: z.ZodNumber;
658
+ }, z.core.$strip>>;
659
+ export declare const renameCompanyInputSchema: z.ZodReadonly<z.ZodObject<{
660
+ companyId: z.ZodString;
661
+ name: z.ZodString;
662
+ expectedRevision: z.ZodNumber;
663
+ }, z.core.$strip>>;
664
+ export declare const deleteCompanyInputSchema: z.ZodReadonly<z.ZodObject<{
665
+ companyId: z.ZodString;
666
+ confirmationName: z.ZodString;
667
+ expectedRevision: z.ZodNumber;
668
+ }, z.core.$strip>>;
669
+ export declare const companyIdInputSchema: z.ZodReadonly<z.ZodObject<{
670
+ companyId: z.ZodString;
671
+ }, z.core.$strip>>;
672
+ export declare const createAccountInputSchema: z.ZodReadonly<z.ZodObject<{
673
+ companyId: z.ZodString;
674
+ code: z.ZodString;
675
+ name: z.ZodString;
676
+ category: z.ZodEnum<{
677
+ asset: "asset";
678
+ liability: "liability";
679
+ equity: "equity";
680
+ income: "income";
681
+ expense: "expense";
682
+ }>;
683
+ reportItem: z.ZodString;
684
+ isContra: z.ZodBoolean;
685
+ openingBalanceMinor: z.ZodString;
686
+ expectedRevision: z.ZodNumber;
687
+ }, z.core.$strip>>;
688
+ export declare const updateAccountInputSchema: z.ZodReadonly<z.ZodObject<{
689
+ accountId: z.ZodString;
690
+ code: z.ZodString;
691
+ name: z.ZodString;
692
+ category: z.ZodEnum<{
693
+ asset: "asset";
694
+ liability: "liability";
695
+ equity: "equity";
696
+ income: "income";
697
+ expense: "expense";
698
+ }>;
699
+ reportItem: z.ZodString;
700
+ isContra: z.ZodBoolean;
701
+ isActive: z.ZodBoolean;
702
+ expectedRevision: z.ZodNumber;
703
+ }, z.core.$strip>>;
704
+ export declare const accountMutationInputSchema: z.ZodReadonly<z.ZodObject<{
705
+ accountId: z.ZodString;
706
+ expectedRevision: z.ZodNumber;
707
+ }, z.core.$strip>>;
708
+ export declare const updateOpeningBalanceInputSchema: z.ZodReadonly<z.ZodObject<{
709
+ accountId: z.ZodString;
710
+ openingBalanceMinor: z.ZodString;
711
+ expectedRevision: z.ZodNumber;
712
+ }, z.core.$strip>>;
713
+ export declare const updateOpeningSettingsInputSchema: z.ZodReadonly<z.ZodObject<{
714
+ companyId: z.ZodString;
715
+ openingDate: z.ZodString;
716
+ baseCurrency: z.ZodString;
717
+ currencyExponent: z.ZodNumber;
718
+ expectedRevision: z.ZodNumber;
719
+ }, z.core.$strip>>;
720
+ export declare const setRetainedEarningsInputSchema: z.ZodReadonly<z.ZodObject<{
721
+ companyId: z.ZodString;
722
+ accountId: z.ZodString;
723
+ expectedRevision: z.ZodNumber;
724
+ }, z.core.$strip>>;
725
+ export declare const companyMutationInputSchema: z.ZodReadonly<z.ZodObject<{
726
+ companyId: z.ZodString;
727
+ expectedRevision: z.ZodNumber;
728
+ }, z.core.$strip>>;
729
+ export declare const batchIdInputSchema: z.ZodReadonly<z.ZodObject<{
730
+ batchId: z.ZodString;
731
+ }, z.core.$strip>>;
732
+ export declare const batchMutationInputSchema: z.ZodReadonly<z.ZodObject<{
733
+ batchId: z.ZodString;
734
+ expectedRevision: z.ZodNumber;
735
+ }, z.core.$strip>>;
736
+ export declare const transactionMutationInputSchema: z.ZodReadonly<z.ZodObject<{
737
+ transactionId: z.ZodString;
738
+ expectedRevision: z.ZodNumber;
739
+ }, z.core.$strip>>;
740
+ export declare const updateBatchFundingInputSchema: z.ZodReadonly<z.ZodObject<{
741
+ batchId: z.ZodString;
742
+ fundingAccountId: z.ZodString;
743
+ expectedRevision: z.ZodNumber;
744
+ }, z.core.$strip>>;
745
+ export declare const updateTransactionInputSchema: z.ZodReadonly<z.ZodObject<{
746
+ transactionId: z.ZodString;
747
+ date: z.ZodString;
748
+ amountMinor: z.ZodString;
749
+ businessAccountId: z.ZodString;
750
+ description: z.ZodString;
751
+ counterparty: z.ZodString;
752
+ expectedRevision: z.ZodNumber;
753
+ }, z.core.$strip>>;
754
+ export declare const generateReportsInputSchema: z.ZodReadonly<z.ZodObject<{
755
+ companyId: z.ZodString;
756
+ startDate: z.ZodString;
757
+ endDate: z.ZodString;
758
+ }, z.core.$strip>>;
759
+ export declare const previewBackupInputSchema: z.ZodReadonly<z.ZodObject<{
760
+ content: z.ZodString;
761
+ }, z.core.$strip>>;
762
+ export declare const restoreBackupInputSchema: z.ZodReadonly<z.ZodObject<{
763
+ content: z.ZodString;
764
+ confirmation: z.ZodLiteral<"OVERWRITE">;
765
+ expectedRevision: z.ZodNumber;
766
+ }, z.core.$strip>>;
767
+ export type CreateCompanyInput = z.infer<typeof createCompanyInputSchema>;
768
+ export type RenameCompanyInput = z.infer<typeof renameCompanyInputSchema>;
769
+ export type DeleteCompanyInput = z.infer<typeof deleteCompanyInputSchema>;
770
+ export type CreateAccountInput = z.infer<typeof createAccountInputSchema>;
771
+ export type UpdateAccountInput = z.infer<typeof updateAccountInputSchema>;
772
+ export type UpdateOpeningBalanceInput = z.infer<typeof updateOpeningBalanceInputSchema>;
773
+ export type UpdateOpeningSettingsInput = z.infer<typeof updateOpeningSettingsInputSchema>;
774
+ export type SetRetainedEarningsInput = z.infer<typeof setRetainedEarningsInputSchema>;
775
+ export type RevisionedIdInput = z.infer<typeof accountMutationInputSchema>;
776
+ export type CompanyMutationInput = z.infer<typeof companyMutationInputSchema>;
777
+ export type BatchMutationInput = z.infer<typeof batchMutationInputSchema>;
778
+ export type TransactionMutationInput = z.infer<typeof transactionMutationInputSchema>;
779
+ export type UpdateBatchFundingInput = z.infer<typeof updateBatchFundingInputSchema>;
780
+ export type UpdateTransactionInput = z.infer<typeof updateTransactionInputSchema>;
781
+ export type GenerateReportsInput = z.infer<typeof generateReportsInputSchema>;
782
+ export type PreviewBackupInput = z.infer<typeof previewBackupInputSchema>;
783
+ export type RestoreBackupInput = z.infer<typeof restoreBackupInputSchema>;
784
+ export declare const FINANCE_INVOCATIONS: readonly InvocationDescriptor[];