@deepintel-ltd/farmpro-contracts 1.17.0 → 1.18.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 (33) hide show
  1. package/dist/index.d.ts +3 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +2 -0
  4. package/dist/routes/accounting.routes.d.ts +13861 -0
  5. package/dist/routes/accounting.routes.d.ts.map +1 -0
  6. package/dist/routes/accounting.routes.js +448 -0
  7. package/dist/routes/commodity-deals.routes.d.ts +48 -48
  8. package/dist/routes/finance.routes.d.ts +235 -38
  9. package/dist/routes/finance.routes.d.ts.map +1 -1
  10. package/dist/routes/index.d.ts +3 -0
  11. package/dist/routes/index.d.ts.map +1 -1
  12. package/dist/routes/index.js +2 -0
  13. package/dist/routes/live-monitor.routes.d.ts +4 -4
  14. package/dist/routes/monitoring-visualization.routes.d.ts +16 -10
  15. package/dist/routes/monitoring-visualization.routes.d.ts.map +1 -1
  16. package/dist/routes/staff.routes.d.ts +36 -36
  17. package/dist/schemas/accounting.schemas.d.ts +6002 -0
  18. package/dist/schemas/accounting.schemas.d.ts.map +1 -0
  19. package/dist/schemas/accounting.schemas.js +341 -0
  20. package/dist/schemas/commodity-deals.schemas.d.ts +24 -24
  21. package/dist/schemas/farms.schemas.d.ts.map +1 -1
  22. package/dist/schemas/finance.schemas.d.ts +304 -46
  23. package/dist/schemas/finance.schemas.d.ts.map +1 -1
  24. package/dist/schemas/finance.schemas.js +23 -9
  25. package/dist/schemas/live-monitor.schemas.d.ts +6 -6
  26. package/dist/schemas/locale.schemas.d.ts +3 -0
  27. package/dist/schemas/locale.schemas.d.ts.map +1 -1
  28. package/dist/schemas/locale.schemas.js +1 -0
  29. package/dist/schemas/monitoring-visualization.schemas.d.ts +43 -12
  30. package/dist/schemas/monitoring-visualization.schemas.d.ts.map +1 -1
  31. package/dist/schemas/monitoring-visualization.schemas.js +5 -1
  32. package/dist/schemas/staff.schemas.d.ts +30 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AC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAC9F,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAClG,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC"}
@@ -0,0 +1,341 @@
1
+ import { z } from 'zod';
2
+ import { timestampsSchema, createJsonApiResourceSchema, jsonApiSingleResponseSchema, jsonApiCollectionResponseSchema, } from './common.schemas';
3
+ export const accountingBasisSchema = z.enum(['cash', 'accrual']);
4
+ export const accountTypeSchema = z.enum([
5
+ 'ASSET',
6
+ 'LIABILITY',
7
+ 'EQUITY',
8
+ 'INCOME',
9
+ 'COGS',
10
+ 'EXPENSE',
11
+ ]);
12
+ export const farmAccountingSettingsAttributesSchema = z.object({
13
+ accountingPackId: z.string(),
14
+ fiscalYearStartMonth: z.number().int().min(1).max(12),
15
+ fiscalYearStartDay: z.number().int().min(1).max(31),
16
+ accountingBasis: accountingBasisSchema,
17
+ coaInitialized: z.boolean(),
18
+ showAccountantWorkspace: z.boolean(),
19
+ }).merge(timestampsSchema);
20
+ export const patchFarmAccountingSettingsAttributesSchema = z.object({
21
+ accountingPackId: z.string().max(64).optional(),
22
+ fiscalYearStartMonth: z.number().int().min(1).max(12).optional(),
23
+ fiscalYearStartDay: z.number().int().min(1).max(31).optional(),
24
+ accountingBasis: accountingBasisSchema.optional(),
25
+ showAccountantWorkspace: z.boolean().optional(),
26
+ });
27
+ export const chartOfAccountAttributesSchema = z.object({
28
+ code: z.string(),
29
+ name: z.string(),
30
+ accountType: accountTypeSchema,
31
+ parentId: z.string().uuid().nullable(),
32
+ isSystem: z.boolean(),
33
+ isActive: z.boolean(),
34
+ categoryMapping: z.string().nullable(),
35
+ }).merge(timestampsSchema);
36
+ export const journalLineAttributesSchema = z.object({
37
+ accountId: z.string().uuid(),
38
+ accountCode: z.string().optional(),
39
+ accountName: z.string().optional(),
40
+ debit: z.number().nonnegative(),
41
+ credit: z.number().nonnegative(),
42
+ memo: z.string().nullable(),
43
+ });
44
+ export const journalEntryAttributesSchema = z.object({
45
+ entryDate: z.string().datetime(),
46
+ description: z.string(),
47
+ sourceType: z.string(),
48
+ sourceId: z.string().nullable(),
49
+ isAdjustment: z.boolean(),
50
+ isLocked: z.boolean(),
51
+ createdById: z.string().uuid().nullable(),
52
+ lines: z.array(journalLineAttributesSchema),
53
+ }).merge(timestampsSchema);
54
+ export const createJournalEntryAttributesSchema = z.object({
55
+ entryDate: z.string().datetime(),
56
+ description: z.string().max(500),
57
+ lines: z
58
+ .array(z.object({
59
+ accountId: z.string().uuid(),
60
+ debit: z.number().nonnegative().default(0),
61
+ credit: z.number().nonnegative().default(0),
62
+ memo: z.string().max(300).optional(),
63
+ }))
64
+ .min(2),
65
+ }).refine((data) => {
66
+ const totalDebit = data.lines.reduce((s, l) => s + l.debit, 0);
67
+ const totalCredit = data.lines.reduce((s, l) => s + l.credit, 0);
68
+ return Math.abs(totalDebit - totalCredit) < 0.01 && totalDebit > 0;
69
+ }, { message: 'Journal entry must be balanced with non-zero amounts' });
70
+ export const trialBalanceLineSchema = z.object({
71
+ accountId: z.string().uuid(),
72
+ code: z.string(),
73
+ name: z.string(),
74
+ accountType: accountTypeSchema,
75
+ debit: z.number(),
76
+ credit: z.number(),
77
+ balance: z.number(),
78
+ });
79
+ export const trialBalanceResponseSchema = jsonApiSingleResponseSchema(createJsonApiResourceSchema('accounting-trial-balance', z.object({
80
+ asOfDate: z.string().datetime().nullable(),
81
+ lines: z.array(trialBalanceLineSchema),
82
+ totalDebit: z.number(),
83
+ totalCredit: z.number(),
84
+ })));
85
+ export const balanceSheetResponseSchema = jsonApiSingleResponseSchema(createJsonApiResourceSchema('accounting-balance-sheet', z.object({
86
+ asOfDate: z.string().datetime().nullable(),
87
+ assets: z.number(),
88
+ liabilities: z.number(),
89
+ equity: z.number(),
90
+ lines: z.array(z.object({
91
+ accountType: accountTypeSchema,
92
+ code: z.string(),
93
+ name: z.string(),
94
+ balance: z.number(),
95
+ })),
96
+ })));
97
+ export const cashFlowResponseSchema = jsonApiSingleResponseSchema(createJsonApiResourceSchema('accounting-cash-flow', z.object({
98
+ periodStart: z.string().datetime().nullable(),
99
+ periodEnd: z.string().datetime().nullable(),
100
+ operating: z.number(),
101
+ investing: z.number(),
102
+ financing: z.number(),
103
+ netChange: z.number(),
104
+ })));
105
+ export const agingBucketSchema = z.object({
106
+ current: z.number(),
107
+ days1to30: z.number(),
108
+ days31to60: z.number(),
109
+ days61to90: z.number(),
110
+ over90: z.number(),
111
+ total: z.number(),
112
+ });
113
+ export const agingLineSchema = z.object({
114
+ id: z.string().uuid(),
115
+ name: z.string(),
116
+ dueDate: z.string().datetime().nullable(),
117
+ amount: z.number(),
118
+ amountOutstanding: z.number(),
119
+ daysPastDue: z.number(),
120
+ bucket: z.enum(['current', '1-30', '31-60', '61-90', '90+']),
121
+ });
122
+ export const arAgingResponseSchema = jsonApiSingleResponseSchema(createJsonApiResourceSchema('accounting-ar-aging', z.object({
123
+ buckets: agingBucketSchema,
124
+ lines: z.array(agingLineSchema),
125
+ })));
126
+ export const apAgingResponseSchema = jsonApiSingleResponseSchema(createJsonApiResourceSchema('accounting-ap-aging', z.object({
127
+ buckets: agingBucketSchema,
128
+ lines: z.array(agingLineSchema),
129
+ })));
130
+ export const ledgerBankAccountAttributesSchema = z.object({
131
+ name: z.string(),
132
+ accountType: z.string(),
133
+ currency: z.string(),
134
+ openingBalance: z.number(),
135
+ currentBalance: z.number(),
136
+ lastReconciledAt: z.string().datetime().nullable(),
137
+ feedProvider: z.string().nullable(),
138
+ }).merge(timestampsSchema);
139
+ export const createLedgerBankAccountAttributesSchema = z.object({
140
+ name: z.string().max(200),
141
+ accountType: z.string().max(32).default('bank'),
142
+ currency: z.string().length(3).default('NGN'),
143
+ openingBalance: z.number().default(0),
144
+ feedProvider: z.string().max(50).optional(),
145
+ });
146
+ export const bankStatementLineAttributesSchema = z.object({
147
+ transactionDate: z.string().datetime(),
148
+ description: z.string(),
149
+ amount: z.number(),
150
+ isMatched: z.boolean(),
151
+ matchedJournalEntryId: z.string().uuid().nullable(),
152
+ importBatchId: z.string().nullable(),
153
+ });
154
+ export const reconcileBankAccountAttributesSchema = z.object({
155
+ statementLineIds: z.array(z.string().uuid()).min(1),
156
+ journalEntryIds: z.array(z.string().uuid()).optional(),
157
+ createAdjustments: z.boolean().default(false),
158
+ });
159
+ export const reconciliationSummaryResponseSchema = jsonApiSingleResponseSchema(createJsonApiResourceSchema('accounting-reconciliation-summary', z.object({
160
+ bankAccounts: z.array(z.object({
161
+ bankAccountId: z.string().uuid(),
162
+ name: z.string(),
163
+ unmatchedLines: z.number(),
164
+ matchedLines: z.number(),
165
+ lastReconciledAt: z.string().datetime().nullable(),
166
+ })),
167
+ totalUnmatched: z.number(),
168
+ })));
169
+ export const depreciationScheduleAttributesSchema = z.object({
170
+ equipmentId: z.string().uuid(),
171
+ method: z.string(),
172
+ purchaseValue: z.number(),
173
+ salvageValue: z.number(),
174
+ usefulLifeMonths: z.number().int().positive(),
175
+ startDate: z.string().datetime(),
176
+ monthlyAmount: z.number(),
177
+ accumulatedDepreciation: z.number(),
178
+ isActive: z.boolean(),
179
+ }).merge(timestampsSchema);
180
+ export const createDepreciationScheduleAttributesSchema = z.object({
181
+ equipmentId: z.string().uuid(),
182
+ method: z.string().max(32).default('straight_line'),
183
+ purchaseValue: z.number().positive(),
184
+ salvageValue: z.number().nonnegative().default(0),
185
+ usefulLifeMonths: z.number().int().positive(),
186
+ startDate: z.string().datetime(),
187
+ });
188
+ export const runDepreciationAttributesSchema = z.object({
189
+ year: z.number().int().optional(),
190
+ month: z.number().int().min(1).max(12).optional(),
191
+ });
192
+ export const taxExportResponseSchema = jsonApiSingleResponseSchema(createJsonApiResourceSchema('accounting-tax-export', z.object({
193
+ packId: z.string(),
194
+ generatedAt: z.string().datetime(),
195
+ periodStart: z.string().datetime().nullable(),
196
+ periodEnd: z.string().datetime().nullable(),
197
+ reports: z.array(z.object({
198
+ id: z.string(),
199
+ name: z.string(),
200
+ lines: z.array(z.object({
201
+ id: z.string(),
202
+ label: z.string(),
203
+ amount: z.number(),
204
+ details: z
205
+ .array(z.object({ category: z.string(), amount: z.number() }))
206
+ .optional(),
207
+ })),
208
+ })),
209
+ })));
210
+ export const accountantAccessAttributesSchema = z.object({
211
+ accountantEmail: z.string().email(),
212
+ firmName: z.string().nullable(),
213
+ accessLevel: z.enum(['read_only', 'write', 'admin']),
214
+ isActive: z.boolean(),
215
+ invitedById: z.string().uuid().nullable(),
216
+ }).merge(timestampsSchema);
217
+ export const createAccountantAccessAttributesSchema = z.object({
218
+ accountantEmail: z.string().email(),
219
+ firmName: z.string().max(200).optional(),
220
+ accessLevel: z.enum(['read_only', 'write', 'admin']).default('read_only'),
221
+ });
222
+ export const accountingSoftwareConnectionAttributesSchema = z.object({
223
+ provider: z.enum(['quickbooks', 'xero', 'other']),
224
+ externalId: z.string().nullable(),
225
+ syncEnabled: z.boolean(),
226
+ lastSyncAt: z.string().datetime().nullable(),
227
+ hasCredentials: z.boolean(),
228
+ }).merge(timestampsSchema);
229
+ export const createSoftwareConnectionAttributesSchema = z.object({
230
+ provider: z.enum(['quickbooks', 'xero', 'other']),
231
+ externalId: z.string().max(200).optional(),
232
+ syncEnabled: z.boolean().default(false),
233
+ });
234
+ export const patchSoftwareConnectionAttributesSchema = z.object({
235
+ externalId: z.string().max(200).optional(),
236
+ syncEnabled: z.boolean().optional(),
237
+ accessToken: z.string().optional(),
238
+ refreshToken: z.string().optional(),
239
+ });
240
+ export const coaInitializeResponseSchema = jsonApiSingleResponseSchema(createJsonApiResourceSchema('accounting-coa-initialize', z.object({
241
+ accountsCreated: z.number().int(),
242
+ packId: z.string(),
243
+ })));
244
+ export const farmAccountingSettingsResponseSchema = jsonApiSingleResponseSchema(createJsonApiResourceSchema('farm-accounting-settings', farmAccountingSettingsAttributesSchema));
245
+ export const chartOfAccountResourceSchema = createJsonApiResourceSchema('chart-of-accounts', chartOfAccountAttributesSchema);
246
+ export const chartOfAccountListResponseSchema = jsonApiCollectionResponseSchema(chartOfAccountResourceSchema);
247
+ export const journalEntryResourceSchema = createJsonApiResourceSchema('journal-entries', journalEntryAttributesSchema);
248
+ export const journalEntryListResponseSchema = jsonApiCollectionResponseSchema(journalEntryResourceSchema);
249
+ export const journalEntryResponseSchema = jsonApiSingleResponseSchema(journalEntryResourceSchema);
250
+ export const ledgerBankAccountResourceSchema = createJsonApiResourceSchema('ledger-bank-accounts', ledgerBankAccountAttributesSchema);
251
+ export const ledgerBankAccountListResponseSchema = jsonApiCollectionResponseSchema(ledgerBankAccountResourceSchema);
252
+ export const ledgerBankAccountResponseSchema = jsonApiSingleResponseSchema(ledgerBankAccountResourceSchema);
253
+ export const depreciationScheduleResourceSchema = createJsonApiResourceSchema('depreciation-schedules', depreciationScheduleAttributesSchema);
254
+ export const depreciationScheduleListResponseSchema = jsonApiCollectionResponseSchema(depreciationScheduleResourceSchema);
255
+ export const depreciationScheduleResponseSchema = jsonApiSingleResponseSchema(depreciationScheduleResourceSchema);
256
+ export const accountantAccessResourceSchema = createJsonApiResourceSchema('accountant-firm-access', accountantAccessAttributesSchema);
257
+ export const accountantAccessListResponseSchema = jsonApiCollectionResponseSchema(accountantAccessResourceSchema);
258
+ export const accountantAccessResponseSchema = jsonApiSingleResponseSchema(accountantAccessResourceSchema);
259
+ export const softwareConnectionResourceSchema = createJsonApiResourceSchema('accounting-software-connections', accountingSoftwareConnectionAttributesSchema);
260
+ export const softwareConnectionListResponseSchema = jsonApiCollectionResponseSchema(softwareConnectionResourceSchema);
261
+ export const softwareConnectionResponseSchema = jsonApiSingleResponseSchema(softwareConnectionResourceSchema);
262
+ export const importCsvResponseSchema = jsonApiSingleResponseSchema(createJsonApiResourceSchema('bank-csv-import', z.object({
263
+ importBatchId: z.string(),
264
+ linesImported: z.number().int(),
265
+ })));
266
+ export const closePeriodResponseSchema = jsonApiSingleResponseSchema(createJsonApiResourceSchema('accounting-period-close', z.object({
267
+ year: z.number().int(),
268
+ month: z.number().int(),
269
+ isClosed: z.boolean(),
270
+ closedAt: z.string().datetime().nullable(),
271
+ })));
272
+ export const runDepreciationResponseSchema = jsonApiSingleResponseSchema(createJsonApiResourceSchema('depreciation-run', z.object({
273
+ schedulesProcessed: z.number().int(),
274
+ totalDepreciation: z.number(),
275
+ journalEntryIds: z.array(z.string().uuid()),
276
+ })));
277
+ export const taxDocumentsChecklistItemSchema = z.object({
278
+ id: z.string(),
279
+ label: z.string(),
280
+ done: z.boolean(),
281
+ });
282
+ export const taxDocumentsResponseSchema = jsonApiSingleResponseSchema(createJsonApiResourceSchema('accounting-tax-documents', z.object({
283
+ year: z.number().int(),
284
+ readinessScore: z.number().int().min(0).max(100),
285
+ checklist: z.array(taxDocumentsChecklistItemSchema),
286
+ periodStart: z.string().datetime(),
287
+ periodEnd: z.string().datetime(),
288
+ })));
289
+ export const taxDocumentsDownloadResponseSchema = jsonApiSingleResponseSchema(createJsonApiResourceSchema('accounting-tax-documents-download', z.object({
290
+ filename: z.string(),
291
+ contentType: z.string(),
292
+ dataBase64: z.string(),
293
+ })));
294
+ export const accountingReviewItemAttributesSchema = z.object({
295
+ type: z.enum(['categorize_expense', 'match_bank_line', 'tax_gap']),
296
+ message: z.string(),
297
+ confidence: z.number(),
298
+ expenseId: z.string().uuid().optional(),
299
+ bankLineId: z.string().uuid().optional(),
300
+ suggestedCategory: z.string().optional(),
301
+ });
302
+ export const accountingReviewQueueResponseSchema = jsonApiCollectionResponseSchema(createJsonApiResourceSchema('accounting-review-items', accountingReviewItemAttributesSchema));
303
+ export const resolveReviewItemAttributesSchema = z.object({
304
+ action: z.enum(['accept', 'dismiss']),
305
+ category: z.string().min(1).max(100).optional(),
306
+ });
307
+ export const resolveReviewItemResponseSchema = jsonApiSingleResponseSchema(createJsonApiResourceSchema('accounting-review-resolve', z.object({
308
+ itemId: z.string(),
309
+ action: z.enum(['accept', 'dismiss']),
310
+ appliedCategory: z.string().optional(),
311
+ })));
312
+ export const softwareOAuthStartResponseSchema = jsonApiSingleResponseSchema(createJsonApiResourceSchema('accounting-software-oauth', z.object({
313
+ authorizationUrl: z.string().url(),
314
+ provider: z.enum(['quickbooks', 'xero']),
315
+ })));
316
+ export const softwareSyncTriggerResponseSchema = jsonApiSingleResponseSchema(createJsonApiResourceSchema('accounting-software-sync', z.object({
317
+ status: z.enum(['queued', 'completed']),
318
+ pushed: z.number().int().optional(),
319
+ skipped: z.number().int().optional(),
320
+ errors: z.array(z.string()).optional(),
321
+ })));
322
+ export const sendTaxHandoffAttributesSchema = z.object({
323
+ year: z.number().int().optional(),
324
+ accountantEmail: z.string().email().optional(),
325
+ firmName: z.string().max(200).optional(),
326
+ });
327
+ export const sendTaxHandoffResponseSchema = jsonApiSingleResponseSchema(createJsonApiResourceSchema('accounting-tax-handoff', z.object({
328
+ sentTo: z.array(z.string().email()),
329
+ year: z.number().int(),
330
+ })));
331
+ export const incomeStatementLineSchema = z.object({
332
+ id: z.string(),
333
+ label: z.string(),
334
+ amount: z.number(),
335
+ });
336
+ export const incomeStatementResponseSchema = jsonApiSingleResponseSchema(createJsonApiResourceSchema('accounting-income-statement', z.object({
337
+ periodStart: z.string().datetime().nullable(),
338
+ periodEnd: z.string().datetime().nullable(),
339
+ lines: z.array(incomeStatementLineSchema),
340
+ netIncome: z.number(),
341
+ })));