@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.
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/routes/accounting.routes.d.ts +13861 -0
- package/dist/routes/accounting.routes.d.ts.map +1 -0
- package/dist/routes/accounting.routes.js +448 -0
- package/dist/routes/commodity-deals.routes.d.ts +48 -48
- package/dist/routes/finance.routes.d.ts +235 -38
- package/dist/routes/finance.routes.d.ts.map +1 -1
- package/dist/routes/index.d.ts +3 -0
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +2 -0
- package/dist/routes/live-monitor.routes.d.ts +4 -4
- package/dist/routes/monitoring-visualization.routes.d.ts +16 -10
- package/dist/routes/monitoring-visualization.routes.d.ts.map +1 -1
- package/dist/routes/staff.routes.d.ts +36 -36
- package/dist/schemas/accounting.schemas.d.ts +6002 -0
- package/dist/schemas/accounting.schemas.d.ts.map +1 -0
- package/dist/schemas/accounting.schemas.js +341 -0
- package/dist/schemas/commodity-deals.schemas.d.ts +24 -24
- package/dist/schemas/farms.schemas.d.ts.map +1 -1
- package/dist/schemas/finance.schemas.d.ts +304 -46
- package/dist/schemas/finance.schemas.d.ts.map +1 -1
- package/dist/schemas/finance.schemas.js +23 -9
- package/dist/schemas/live-monitor.schemas.d.ts +6 -6
- package/dist/schemas/locale.schemas.d.ts +3 -0
- package/dist/schemas/locale.schemas.d.ts.map +1 -1
- package/dist/schemas/locale.schemas.js +1 -0
- package/dist/schemas/monitoring-visualization.schemas.d.ts +43 -12
- package/dist/schemas/monitoring-visualization.schemas.d.ts.map +1 -1
- package/dist/schemas/monitoring-visualization.schemas.js +5 -1
- package/dist/schemas/staff.schemas.d.ts +30 -30
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accounting.routes.d.ts","sourceRoot":"","s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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8d3B,CAAC"}
|
|
@@ -0,0 +1,448 @@
|
|
|
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, 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
|
+
getSoftwareOAuthStart: {
|
|
334
|
+
method: 'GET',
|
|
335
|
+
path: '/farms/:farmId/accounting/software-connections/:provider/oauth',
|
|
336
|
+
pathParams: z.object({
|
|
337
|
+
farmId: z.string().uuid(),
|
|
338
|
+
provider: z.enum(['quickbooks', 'xero']),
|
|
339
|
+
}),
|
|
340
|
+
responses: {
|
|
341
|
+
200: softwareOAuthStartResponseSchema,
|
|
342
|
+
400: jsonApiErrorResponseSchema,
|
|
343
|
+
401: jsonApiErrorResponseSchema,
|
|
344
|
+
},
|
|
345
|
+
summary: 'Start QuickBooks or Xero OAuth',
|
|
346
|
+
},
|
|
347
|
+
triggerSoftwareSync: {
|
|
348
|
+
method: 'POST',
|
|
349
|
+
path: '/farms/:farmId/accounting/software-connections/:provider/sync',
|
|
350
|
+
pathParams: z.object({
|
|
351
|
+
farmId: z.string().uuid(),
|
|
352
|
+
provider: z.enum(['quickbooks', 'xero']),
|
|
353
|
+
}),
|
|
354
|
+
body: z.object({}).optional(),
|
|
355
|
+
responses: {
|
|
356
|
+
200: softwareSyncTriggerResponseSchema,
|
|
357
|
+
400: jsonApiErrorResponseSchema,
|
|
358
|
+
401: jsonApiErrorResponseSchema,
|
|
359
|
+
},
|
|
360
|
+
summary: 'Queue one-way journal sync to accounting software',
|
|
361
|
+
},
|
|
362
|
+
sendTaxDocumentsToAccountant: {
|
|
363
|
+
method: 'POST',
|
|
364
|
+
path: '/farms/:farmId/accounting/tax-documents/send',
|
|
365
|
+
pathParams: farmIdParams,
|
|
366
|
+
body: z.object({ data: sendTaxHandoffAttributesSchema }).optional(),
|
|
367
|
+
responses: {
|
|
368
|
+
200: sendTaxHandoffResponseSchema,
|
|
369
|
+
400: jsonApiErrorResponseSchema,
|
|
370
|
+
404: jsonApiErrorResponseSchema,
|
|
371
|
+
401: jsonApiErrorResponseSchema,
|
|
372
|
+
},
|
|
373
|
+
summary: 'Email tax document bundle to accountant',
|
|
374
|
+
},
|
|
375
|
+
getIncomeStatement: {
|
|
376
|
+
method: 'GET',
|
|
377
|
+
path: '/farms/:farmId/accounting/statements/income',
|
|
378
|
+
pathParams: farmIdParams,
|
|
379
|
+
query: jsonApiFilterQuerySchema,
|
|
380
|
+
responses: {
|
|
381
|
+
200: incomeStatementResponseSchema,
|
|
382
|
+
404: jsonApiErrorResponseSchema,
|
|
383
|
+
401: jsonApiErrorResponseSchema,
|
|
384
|
+
},
|
|
385
|
+
summary: 'Income statement from GL',
|
|
386
|
+
},
|
|
387
|
+
listAccountantAccess: {
|
|
388
|
+
method: 'GET',
|
|
389
|
+
path: '/farms/:farmId/accounting/accountant-access',
|
|
390
|
+
pathParams: farmIdParams,
|
|
391
|
+
responses: {
|
|
392
|
+
200: accountantAccessListResponseSchema,
|
|
393
|
+
404: jsonApiErrorResponseSchema,
|
|
394
|
+
401: jsonApiErrorResponseSchema,
|
|
395
|
+
},
|
|
396
|
+
summary: 'List accountant firm access grants',
|
|
397
|
+
},
|
|
398
|
+
createAccountantAccess: {
|
|
399
|
+
method: 'POST',
|
|
400
|
+
path: '/farms/:farmId/accounting/accountant-access',
|
|
401
|
+
pathParams: farmIdParams,
|
|
402
|
+
body: z.object({ data: createAccountantAccessAttributesSchema }),
|
|
403
|
+
responses: {
|
|
404
|
+
201: accountantAccessResponseSchema,
|
|
405
|
+
400: jsonApiErrorResponseSchema,
|
|
406
|
+
404: jsonApiErrorResponseSchema,
|
|
407
|
+
401: jsonApiErrorResponseSchema,
|
|
408
|
+
},
|
|
409
|
+
summary: 'Grant accountant firm access',
|
|
410
|
+
},
|
|
411
|
+
listSoftwareConnections: {
|
|
412
|
+
method: 'GET',
|
|
413
|
+
path: '/farms/:farmId/accounting/software-connections',
|
|
414
|
+
pathParams: farmIdParams,
|
|
415
|
+
responses: {
|
|
416
|
+
200: softwareConnectionListResponseSchema,
|
|
417
|
+
404: jsonApiErrorResponseSchema,
|
|
418
|
+
401: jsonApiErrorResponseSchema,
|
|
419
|
+
},
|
|
420
|
+
summary: 'List accounting software connections',
|
|
421
|
+
},
|
|
422
|
+
createSoftwareConnection: {
|
|
423
|
+
method: 'POST',
|
|
424
|
+
path: '/farms/:farmId/accounting/software-connections',
|
|
425
|
+
pathParams: farmIdParams,
|
|
426
|
+
body: z.object({ data: createSoftwareConnectionAttributesSchema }),
|
|
427
|
+
responses: {
|
|
428
|
+
201: softwareConnectionResponseSchema,
|
|
429
|
+
400: jsonApiErrorResponseSchema,
|
|
430
|
+
404: jsonApiErrorResponseSchema,
|
|
431
|
+
401: jsonApiErrorResponseSchema,
|
|
432
|
+
},
|
|
433
|
+
summary: 'Create accounting software connection',
|
|
434
|
+
},
|
|
435
|
+
patchSoftwareConnection: {
|
|
436
|
+
method: 'PATCH',
|
|
437
|
+
path: '/farms/:farmId/accounting/software-connections/:id',
|
|
438
|
+
pathParams: z.object({ farmId: z.string().uuid(), id: z.string().uuid() }),
|
|
439
|
+
body: z.object({ data: patchSoftwareConnectionAttributesSchema }),
|
|
440
|
+
responses: {
|
|
441
|
+
200: softwareConnectionResponseSchema,
|
|
442
|
+
400: jsonApiErrorResponseSchema,
|
|
443
|
+
404: jsonApiErrorResponseSchema,
|
|
444
|
+
401: jsonApiErrorResponseSchema,
|
|
445
|
+
},
|
|
446
|
+
summary: 'Update accounting software connection',
|
|
447
|
+
},
|
|
448
|
+
});
|