@deepintel-ltd/farmpro-contracts 1.17.0 → 1.19.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.
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 +14156 -0
  5. package/dist/routes/accounting.routes.d.ts.map +1 -0
  6. package/dist/routes/accounting.routes.js +460 -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 +6102 -0
  18. package/dist/schemas/accounting.schemas.d.ts.map +1 -0
  19. package/dist/schemas/accounting.schemas.js +344 -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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+1,460 @@
1
+ import { initContract } from '@ts-rest/core';
2
+ import { z } from 'zod';
3
+ import { farmAccountingSettingsResponseSchema, patchFarmAccountingSettingsAttributesSchema, coaInitializeResponseSchema, chartOfAccountListResponseSchema, journalEntryListResponseSchema, journalEntryResponseSchema, createJournalEntryAttributesSchema, trialBalanceResponseSchema, balanceSheetResponseSchema, cashFlowResponseSchema, arAgingResponseSchema, apAgingResponseSchema, ledgerBankAccountListResponseSchema, ledgerBankAccountResponseSchema, createLedgerBankAccountAttributesSchema, importCsvResponseSchema, reconcileBankAccountAttributesSchema, reconciliationSummaryResponseSchema, closePeriodResponseSchema, depreciationScheduleListResponseSchema, depreciationScheduleResponseSchema, createDepreciationScheduleAttributesSchema, runDepreciationAttributesSchema, runDepreciationResponseSchema, taxExportResponseSchema, taxDocumentsResponseSchema, incomeStatementResponseSchema, taxDocumentsDownloadResponseSchema, accountingReviewQueueResponseSchema, resolveReviewItemAttributesSchema, resolveReviewItemResponseSchema, autoCategorizeReviewQueueResponseSchema, softwareOAuthStartResponseSchema, softwareSyncTriggerResponseSchema, sendTaxHandoffAttributesSchema, sendTaxHandoffResponseSchema, accountantAccessListResponseSchema, accountantAccessResponseSchema, createAccountantAccessAttributesSchema, softwareConnectionListResponseSchema, softwareConnectionResponseSchema, createSoftwareConnectionAttributesSchema, patchSoftwareConnectionAttributesSchema, } from '../schemas/accounting.schemas';
4
+ import { jsonApiErrorResponseSchema, jsonApiPaginationQuerySchema, jsonApiSortQuerySchema, jsonApiFilterQuerySchema, } from '../schemas/common.schemas';
5
+ const c = initContract();
6
+ const farmIdParams = z.object({ farmId: z.string().uuid() });
7
+ export const accountingRouter = c.router({
8
+ getAccountingSettings: {
9
+ method: 'GET',
10
+ path: '/farms/:farmId/accounting/settings',
11
+ pathParams: farmIdParams,
12
+ responses: {
13
+ 200: farmAccountingSettingsResponseSchema,
14
+ 404: jsonApiErrorResponseSchema,
15
+ 401: jsonApiErrorResponseSchema,
16
+ },
17
+ summary: 'Get farm accounting settings',
18
+ },
19
+ patchAccountingSettings: {
20
+ method: 'PATCH',
21
+ path: '/farms/:farmId/accounting/settings',
22
+ pathParams: farmIdParams,
23
+ body: z.object({ data: patchFarmAccountingSettingsAttributesSchema }),
24
+ responses: {
25
+ 200: farmAccountingSettingsResponseSchema,
26
+ 400: jsonApiErrorResponseSchema,
27
+ 404: jsonApiErrorResponseSchema,
28
+ 401: jsonApiErrorResponseSchema,
29
+ },
30
+ summary: 'Update farm accounting settings',
31
+ },
32
+ initializeChartOfAccounts: {
33
+ method: 'POST',
34
+ path: '/farms/:farmId/accounting/coa/initialize',
35
+ pathParams: farmIdParams,
36
+ body: z.object({}).optional(),
37
+ responses: {
38
+ 201: coaInitializeResponseSchema,
39
+ 400: jsonApiErrorResponseSchema,
40
+ 404: jsonApiErrorResponseSchema,
41
+ 401: jsonApiErrorResponseSchema,
42
+ },
43
+ summary: 'Initialize chart of accounts from compliance pack',
44
+ },
45
+ listChartOfAccounts: {
46
+ method: 'GET',
47
+ path: '/farms/:farmId/accounting/coa',
48
+ pathParams: farmIdParams,
49
+ query: jsonApiSortQuerySchema.merge(z.object({
50
+ 'filter[accountType]': z.string().optional(),
51
+ 'filter[isActive]': z.coerce.boolean().optional(),
52
+ })),
53
+ responses: {
54
+ 200: chartOfAccountListResponseSchema,
55
+ 404: jsonApiErrorResponseSchema,
56
+ 401: jsonApiErrorResponseSchema,
57
+ },
58
+ summary: 'List chart of accounts',
59
+ },
60
+ listJournalEntries: {
61
+ method: 'GET',
62
+ path: '/farms/:farmId/accounting/journal-entries',
63
+ pathParams: farmIdParams,
64
+ query: jsonApiPaginationQuerySchema
65
+ .merge(jsonApiSortQuerySchema)
66
+ .merge(jsonApiFilterQuerySchema)
67
+ .merge(z.object({
68
+ 'filter[sourceType]': z.string().optional(),
69
+ 'filter[isAdjustment]': z.coerce.boolean().optional(),
70
+ })),
71
+ responses: {
72
+ 200: journalEntryListResponseSchema,
73
+ 404: jsonApiErrorResponseSchema,
74
+ 401: jsonApiErrorResponseSchema,
75
+ },
76
+ summary: 'List journal entries',
77
+ },
78
+ createJournalEntry: {
79
+ method: 'POST',
80
+ path: '/farms/:farmId/accounting/journal-entries',
81
+ pathParams: farmIdParams,
82
+ body: z.object({ data: createJournalEntryAttributesSchema }),
83
+ responses: {
84
+ 201: journalEntryResponseSchema,
85
+ 400: jsonApiErrorResponseSchema,
86
+ 404: jsonApiErrorResponseSchema,
87
+ 401: jsonApiErrorResponseSchema,
88
+ 422: jsonApiErrorResponseSchema,
89
+ },
90
+ summary: 'Create manual adjustment journal entry',
91
+ },
92
+ getTrialBalance: {
93
+ method: 'GET',
94
+ path: '/farms/:farmId/accounting/statements/trial-balance',
95
+ pathParams: farmIdParams,
96
+ query: jsonApiFilterQuerySchema,
97
+ responses: {
98
+ 200: trialBalanceResponseSchema,
99
+ 404: jsonApiErrorResponseSchema,
100
+ 401: jsonApiErrorResponseSchema,
101
+ },
102
+ summary: 'Get trial balance',
103
+ },
104
+ getBalanceSheet: {
105
+ method: 'GET',
106
+ path: '/farms/:farmId/accounting/statements/balance-sheet',
107
+ pathParams: farmIdParams,
108
+ query: jsonApiFilterQuerySchema,
109
+ responses: {
110
+ 200: balanceSheetResponseSchema,
111
+ 404: jsonApiErrorResponseSchema,
112
+ 401: jsonApiErrorResponseSchema,
113
+ },
114
+ summary: 'Get balance sheet',
115
+ },
116
+ getCashFlowStatement: {
117
+ method: 'GET',
118
+ path: '/farms/:farmId/accounting/statements/cash-flow',
119
+ pathParams: farmIdParams,
120
+ query: jsonApiFilterQuerySchema,
121
+ responses: {
122
+ 200: cashFlowResponseSchema,
123
+ 404: jsonApiErrorResponseSchema,
124
+ 401: jsonApiErrorResponseSchema,
125
+ },
126
+ summary: 'Get cash flow statement',
127
+ },
128
+ getArAging: {
129
+ method: 'GET',
130
+ path: '/farms/:farmId/accounting/ar-aging',
131
+ pathParams: farmIdParams,
132
+ query: jsonApiFilterQuerySchema,
133
+ responses: {
134
+ 200: arAgingResponseSchema,
135
+ 404: jsonApiErrorResponseSchema,
136
+ 401: jsonApiErrorResponseSchema,
137
+ },
138
+ summary: 'Get accounts receivable aging',
139
+ },
140
+ getApAging: {
141
+ method: 'GET',
142
+ path: '/farms/:farmId/accounting/ap-aging',
143
+ pathParams: farmIdParams,
144
+ query: jsonApiFilterQuerySchema,
145
+ responses: {
146
+ 200: apAgingResponseSchema,
147
+ 404: jsonApiErrorResponseSchema,
148
+ 401: jsonApiErrorResponseSchema,
149
+ },
150
+ summary: 'Get accounts payable aging',
151
+ },
152
+ listBankAccounts: {
153
+ method: 'GET',
154
+ path: '/farms/:farmId/accounting/bank-accounts',
155
+ pathParams: farmIdParams,
156
+ responses: {
157
+ 200: ledgerBankAccountListResponseSchema,
158
+ 404: jsonApiErrorResponseSchema,
159
+ 401: jsonApiErrorResponseSchema,
160
+ },
161
+ summary: 'List ledger bank accounts',
162
+ },
163
+ createBankAccount: {
164
+ method: 'POST',
165
+ path: '/farms/:farmId/accounting/bank-accounts',
166
+ pathParams: farmIdParams,
167
+ body: z.object({ data: createLedgerBankAccountAttributesSchema }),
168
+ responses: {
169
+ 201: ledgerBankAccountResponseSchema,
170
+ 400: jsonApiErrorResponseSchema,
171
+ 404: jsonApiErrorResponseSchema,
172
+ 401: jsonApiErrorResponseSchema,
173
+ },
174
+ summary: 'Create ledger bank account',
175
+ },
176
+ importBankCsv: {
177
+ method: 'POST',
178
+ path: '/farms/:farmId/accounting/bank-accounts/:id/import-csv',
179
+ pathParams: z.object({ farmId: z.string().uuid(), id: z.string().uuid() }),
180
+ contentType: 'multipart/form-data',
181
+ body: z.object({
182
+ file: z.unknown(),
183
+ }),
184
+ responses: {
185
+ 201: importCsvResponseSchema,
186
+ 400: jsonApiErrorResponseSchema,
187
+ 404: jsonApiErrorResponseSchema,
188
+ 401: jsonApiErrorResponseSchema,
189
+ },
190
+ summary: 'Import bank statement CSV',
191
+ },
192
+ reconcileBankAccount: {
193
+ method: 'POST',
194
+ path: '/farms/:farmId/accounting/bank-accounts/:id/reconcile',
195
+ pathParams: z.object({ farmId: z.string().uuid(), id: z.string().uuid() }),
196
+ body: z.object({ data: reconcileBankAccountAttributesSchema }),
197
+ responses: {
198
+ 200: reconciliationSummaryResponseSchema,
199
+ 400: jsonApiErrorResponseSchema,
200
+ 404: jsonApiErrorResponseSchema,
201
+ 401: jsonApiErrorResponseSchema,
202
+ },
203
+ summary: 'Reconcile bank statement lines',
204
+ },
205
+ getReconciliationSummary: {
206
+ method: 'GET',
207
+ path: '/farms/:farmId/accounting/reconciliation/summary',
208
+ pathParams: farmIdParams,
209
+ responses: {
210
+ 200: reconciliationSummaryResponseSchema,
211
+ 404: jsonApiErrorResponseSchema,
212
+ 401: jsonApiErrorResponseSchema,
213
+ },
214
+ summary: 'Get reconciliation summary across bank accounts',
215
+ },
216
+ closeAccountingPeriod: {
217
+ method: 'POST',
218
+ path: '/farms/:farmId/accounting/periods/:year/:month/close',
219
+ pathParams: z.object({
220
+ farmId: z.string().uuid(),
221
+ year: z.coerce.number().int(),
222
+ month: z.coerce.number().int().min(1).max(12),
223
+ }),
224
+ body: z.object({}).optional(),
225
+ responses: {
226
+ 200: closePeriodResponseSchema,
227
+ 400: jsonApiErrorResponseSchema,
228
+ 404: jsonApiErrorResponseSchema,
229
+ 401: jsonApiErrorResponseSchema,
230
+ },
231
+ summary: 'Close an accounting period',
232
+ },
233
+ listDepreciationSchedules: {
234
+ method: 'GET',
235
+ path: '/farms/:farmId/accounting/depreciation-schedules',
236
+ pathParams: farmIdParams,
237
+ query: z.object({
238
+ 'filter[isActive]': z.coerce.boolean().optional(),
239
+ }),
240
+ responses: {
241
+ 200: depreciationScheduleListResponseSchema,
242
+ 404: jsonApiErrorResponseSchema,
243
+ 401: jsonApiErrorResponseSchema,
244
+ },
245
+ summary: 'List depreciation schedules',
246
+ },
247
+ createDepreciationSchedule: {
248
+ method: 'POST',
249
+ path: '/farms/:farmId/accounting/depreciation-schedules',
250
+ pathParams: farmIdParams,
251
+ body: z.object({ data: createDepreciationScheduleAttributesSchema }),
252
+ responses: {
253
+ 201: depreciationScheduleResponseSchema,
254
+ 400: jsonApiErrorResponseSchema,
255
+ 404: jsonApiErrorResponseSchema,
256
+ 401: jsonApiErrorResponseSchema,
257
+ },
258
+ summary: 'Create depreciation schedule',
259
+ },
260
+ runDepreciation: {
261
+ method: 'POST',
262
+ path: '/farms/:farmId/accounting/depreciation/run',
263
+ pathParams: farmIdParams,
264
+ body: z.object({ data: runDepreciationAttributesSchema.optional() }),
265
+ responses: {
266
+ 200: runDepreciationResponseSchema,
267
+ 400: jsonApiErrorResponseSchema,
268
+ 404: jsonApiErrorResponseSchema,
269
+ 401: jsonApiErrorResponseSchema,
270
+ },
271
+ summary: 'Run monthly depreciation',
272
+ },
273
+ getTaxExport: {
274
+ method: 'GET',
275
+ path: '/farms/:farmId/accounting/tax-export',
276
+ pathParams: farmIdParams,
277
+ query: jsonApiFilterQuerySchema,
278
+ responses: {
279
+ 200: taxExportResponseSchema,
280
+ 404: jsonApiErrorResponseSchema,
281
+ 401: jsonApiErrorResponseSchema,
282
+ },
283
+ summary: 'Generate tax export from compliance pack',
284
+ },
285
+ getTaxDocuments: {
286
+ method: 'GET',
287
+ path: '/farms/:farmId/accounting/tax-documents',
288
+ pathParams: farmIdParams,
289
+ query: z.object({ year: z.coerce.number().int().optional() }),
290
+ responses: {
291
+ 200: taxDocumentsResponseSchema,
292
+ 404: jsonApiErrorResponseSchema,
293
+ 401: jsonApiErrorResponseSchema,
294
+ },
295
+ summary: 'Tax document readiness and checklist',
296
+ },
297
+ downloadTaxDocuments: {
298
+ method: 'POST',
299
+ path: '/farms/:farmId/accounting/tax-documents/download',
300
+ pathParams: farmIdParams,
301
+ body: z.object({ year: z.number().int().optional() }).optional(),
302
+ responses: {
303
+ 200: taxDocumentsDownloadResponseSchema,
304
+ 404: jsonApiErrorResponseSchema,
305
+ 401: jsonApiErrorResponseSchema,
306
+ },
307
+ summary: 'Download tax documents zip',
308
+ },
309
+ getAccountingReviewQueue: {
310
+ method: 'GET',
311
+ path: '/farms/:farmId/accounting/review-queue',
312
+ pathParams: farmIdParams,
313
+ responses: {
314
+ 200: accountingReviewQueueResponseSchema,
315
+ 404: jsonApiErrorResponseSchema,
316
+ 401: jsonApiErrorResponseSchema,
317
+ },
318
+ summary: 'Agent review items needing farmer input',
319
+ },
320
+ resolveReviewItem: {
321
+ method: 'POST',
322
+ path: '/farms/:farmId/accounting/review-queue/:itemId/resolve',
323
+ pathParams: z.object({ farmId: z.string().uuid(), itemId: z.string().min(1) }),
324
+ body: z.object({ data: resolveReviewItemAttributesSchema }),
325
+ responses: {
326
+ 200: resolveReviewItemResponseSchema,
327
+ 400: jsonApiErrorResponseSchema,
328
+ 404: jsonApiErrorResponseSchema,
329
+ 401: jsonApiErrorResponseSchema,
330
+ },
331
+ summary: 'Accept or dismiss a review queue item',
332
+ },
333
+ autoCategorizeReviewQueue: {
334
+ method: 'POST',
335
+ path: '/farms/:farmId/accounting/review-queue/auto-categorize',
336
+ pathParams: farmIdParams,
337
+ body: z.object({}).optional(),
338
+ responses: {
339
+ 200: autoCategorizeReviewQueueResponseSchema,
340
+ 400: jsonApiErrorResponseSchema,
341
+ 401: jsonApiErrorResponseSchema,
342
+ },
343
+ summary: 'Infer categories for all pending review expenses',
344
+ },
345
+ getSoftwareOAuthStart: {
346
+ method: 'GET',
347
+ path: '/farms/:farmId/accounting/software-connections/:provider/oauth',
348
+ pathParams: z.object({
349
+ farmId: z.string().uuid(),
350
+ provider: z.enum(['quickbooks', 'xero']),
351
+ }),
352
+ responses: {
353
+ 200: softwareOAuthStartResponseSchema,
354
+ 400: jsonApiErrorResponseSchema,
355
+ 401: jsonApiErrorResponseSchema,
356
+ },
357
+ summary: 'Start QuickBooks or Xero OAuth',
358
+ },
359
+ triggerSoftwareSync: {
360
+ method: 'POST',
361
+ path: '/farms/:farmId/accounting/software-connections/:provider/sync',
362
+ pathParams: z.object({
363
+ farmId: z.string().uuid(),
364
+ provider: z.enum(['quickbooks', 'xero']),
365
+ }),
366
+ body: z.object({}).optional(),
367
+ responses: {
368
+ 200: softwareSyncTriggerResponseSchema,
369
+ 400: jsonApiErrorResponseSchema,
370
+ 401: jsonApiErrorResponseSchema,
371
+ },
372
+ summary: 'Queue one-way journal sync to accounting software',
373
+ },
374
+ sendTaxDocumentsToAccountant: {
375
+ method: 'POST',
376
+ path: '/farms/:farmId/accounting/tax-documents/send',
377
+ pathParams: farmIdParams,
378
+ body: z.object({ data: sendTaxHandoffAttributesSchema }).optional(),
379
+ responses: {
380
+ 200: sendTaxHandoffResponseSchema,
381
+ 400: jsonApiErrorResponseSchema,
382
+ 404: jsonApiErrorResponseSchema,
383
+ 401: jsonApiErrorResponseSchema,
384
+ },
385
+ summary: 'Email tax document bundle to accountant',
386
+ },
387
+ getIncomeStatement: {
388
+ method: 'GET',
389
+ path: '/farms/:farmId/accounting/statements/income',
390
+ pathParams: farmIdParams,
391
+ query: jsonApiFilterQuerySchema,
392
+ responses: {
393
+ 200: incomeStatementResponseSchema,
394
+ 404: jsonApiErrorResponseSchema,
395
+ 401: jsonApiErrorResponseSchema,
396
+ },
397
+ summary: 'Income statement from GL',
398
+ },
399
+ listAccountantAccess: {
400
+ method: 'GET',
401
+ path: '/farms/:farmId/accounting/accountant-access',
402
+ pathParams: farmIdParams,
403
+ responses: {
404
+ 200: accountantAccessListResponseSchema,
405
+ 404: jsonApiErrorResponseSchema,
406
+ 401: jsonApiErrorResponseSchema,
407
+ },
408
+ summary: 'List accountant firm access grants',
409
+ },
410
+ createAccountantAccess: {
411
+ method: 'POST',
412
+ path: '/farms/:farmId/accounting/accountant-access',
413
+ pathParams: farmIdParams,
414
+ body: z.object({ data: createAccountantAccessAttributesSchema }),
415
+ responses: {
416
+ 201: accountantAccessResponseSchema,
417
+ 400: jsonApiErrorResponseSchema,
418
+ 404: jsonApiErrorResponseSchema,
419
+ 401: jsonApiErrorResponseSchema,
420
+ },
421
+ summary: 'Grant accountant firm access',
422
+ },
423
+ listSoftwareConnections: {
424
+ method: 'GET',
425
+ path: '/farms/:farmId/accounting/software-connections',
426
+ pathParams: farmIdParams,
427
+ responses: {
428
+ 200: softwareConnectionListResponseSchema,
429
+ 404: jsonApiErrorResponseSchema,
430
+ 401: jsonApiErrorResponseSchema,
431
+ },
432
+ summary: 'List accounting software connections',
433
+ },
434
+ createSoftwareConnection: {
435
+ method: 'POST',
436
+ path: '/farms/:farmId/accounting/software-connections',
437
+ pathParams: farmIdParams,
438
+ body: z.object({ data: createSoftwareConnectionAttributesSchema }),
439
+ responses: {
440
+ 201: softwareConnectionResponseSchema,
441
+ 400: jsonApiErrorResponseSchema,
442
+ 404: jsonApiErrorResponseSchema,
443
+ 401: jsonApiErrorResponseSchema,
444
+ },
445
+ summary: 'Create accounting software connection',
446
+ },
447
+ patchSoftwareConnection: {
448
+ method: 'PATCH',
449
+ path: '/farms/:farmId/accounting/software-connections/:id',
450
+ pathParams: z.object({ farmId: z.string().uuid(), id: z.string().uuid() }),
451
+ body: z.object({ data: patchSoftwareConnectionAttributesSchema }),
452
+ responses: {
453
+ 200: softwareConnectionResponseSchema,
454
+ 400: jsonApiErrorResponseSchema,
455
+ 404: jsonApiErrorResponseSchema,
456
+ 401: jsonApiErrorResponseSchema,
457
+ },
458
+ summary: 'Update accounting software connection',
459
+ },
460
+ });