@deepintel-ltd/farmpro-contracts 1.0.2 → 1.0.3

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 (100) hide show
  1. package/dist/index.d.ts +41 -0
  2. package/dist/index.d.ts.map +1 -0
  3. package/dist/index.js +81 -0
  4. package/dist/routes/analytics.routes.d.ts +754 -0
  5. package/dist/routes/analytics.routes.d.ts.map +1 -0
  6. package/dist/routes/analytics.routes.js +24 -0
  7. package/dist/routes/auth.routes.d.ts +3836 -0
  8. package/dist/routes/auth.routes.d.ts.map +1 -0
  9. package/dist/routes/auth.routes.js +158 -0
  10. package/dist/routes/documents.routes.d.ts +2476 -0
  11. package/dist/routes/documents.routes.d.ts.map +1 -0
  12. package/dist/routes/documents.routes.js +100 -0
  13. package/dist/routes/equipment.routes.d.ts +3617 -0
  14. package/dist/routes/equipment.routes.d.ts.map +1 -0
  15. package/dist/routes/equipment.routes.js +118 -0
  16. package/dist/routes/farms.routes.d.ts +2202 -0
  17. package/dist/routes/farms.routes.d.ts.map +1 -0
  18. package/dist/routes/farms.routes.js +111 -0
  19. package/dist/routes/fields.routes.d.ts +3389 -0
  20. package/dist/routes/fields.routes.d.ts.map +1 -0
  21. package/dist/routes/fields.routes.js +95 -0
  22. package/dist/routes/finance.routes.d.ts +6855 -0
  23. package/dist/routes/finance.routes.d.ts.map +1 -0
  24. package/dist/routes/finance.routes.js +259 -0
  25. package/dist/routes/harvest.routes.d.ts +2337 -0
  26. package/dist/routes/harvest.routes.d.ts.map +1 -0
  27. package/dist/routes/harvest.routes.js +99 -0
  28. package/dist/routes/index.d.ts +68 -0
  29. package/dist/routes/index.d.ts.map +1 -0
  30. package/dist/routes/index.js +43 -0
  31. package/dist/routes/inventory.routes.d.ts +2853 -0
  32. package/dist/routes/inventory.routes.d.ts.map +1 -0
  33. package/dist/routes/inventory.routes.js +121 -0
  34. package/dist/routes/soil-tests.routes.d.ts +3005 -0
  35. package/dist/routes/soil-tests.routes.d.ts.map +1 -0
  36. package/dist/routes/soil-tests.routes.js +98 -0
  37. package/dist/routes/suppliers.routes.d.ts +4190 -0
  38. package/dist/routes/suppliers.routes.d.ts.map +1 -0
  39. package/dist/routes/suppliers.routes.js +146 -0
  40. package/dist/routes/tasks.routes.d.ts +4192 -0
  41. package/dist/routes/tasks.routes.d.ts.map +1 -0
  42. package/dist/routes/tasks.routes.js +138 -0
  43. package/dist/routes/team.routes.d.ts +2210 -0
  44. package/dist/routes/team.routes.d.ts.map +1 -0
  45. package/dist/routes/team.routes.js +98 -0
  46. package/dist/routes/users.routes.d.ts +721 -0
  47. package/dist/routes/users.routes.d.ts.map +1 -0
  48. package/dist/routes/users.routes.js +35 -0
  49. package/dist/routes/weather.routes.d.ts +500 -0
  50. package/dist/routes/weather.routes.d.ts.map +1 -0
  51. package/dist/routes/weather.routes.js +23 -0
  52. package/dist/schemas/analytics.schemas.d.ts +1344 -0
  53. package/dist/schemas/analytics.schemas.d.ts.map +1 -0
  54. package/dist/schemas/analytics.schemas.js +73 -0
  55. package/dist/schemas/auth.schemas.d.ts +1093 -0
  56. package/dist/schemas/auth.schemas.d.ts.map +1 -0
  57. package/dist/schemas/auth.schemas.js +159 -0
  58. package/dist/schemas/common.schemas.d.ts +562 -0
  59. package/dist/schemas/common.schemas.d.ts.map +1 -0
  60. package/dist/schemas/common.schemas.js +122 -0
  61. package/dist/schemas/documents.schemas.d.ts +850 -0
  62. package/dist/schemas/documents.schemas.d.ts.map +1 -0
  63. package/dist/schemas/documents.schemas.js +75 -0
  64. package/dist/schemas/equipment.schemas.d.ts +1618 -0
  65. package/dist/schemas/equipment.schemas.d.ts.map +1 -0
  66. package/dist/schemas/equipment.schemas.js +125 -0
  67. package/dist/schemas/farms.schemas.d.ts +1171 -0
  68. package/dist/schemas/farms.schemas.d.ts.map +1 -0
  69. package/dist/schemas/farms.schemas.js +62 -0
  70. package/dist/schemas/fields.schemas.d.ts +2508 -0
  71. package/dist/schemas/fields.schemas.d.ts.map +1 -0
  72. package/dist/schemas/fields.schemas.js +125 -0
  73. package/dist/schemas/finance.schemas.d.ts +2869 -0
  74. package/dist/schemas/finance.schemas.d.ts.map +1 -0
  75. package/dist/schemas/finance.schemas.js +196 -0
  76. package/dist/schemas/harvest.schemas.d.ts +1051 -0
  77. package/dist/schemas/harvest.schemas.d.ts.map +1 -0
  78. package/dist/schemas/harvest.schemas.js +71 -0
  79. package/dist/schemas/inventory.schemas.d.ts +1138 -0
  80. package/dist/schemas/inventory.schemas.d.ts.map +1 -0
  81. package/dist/schemas/inventory.schemas.js +89 -0
  82. package/dist/schemas/soil-tests.schemas.d.ts +1885 -0
  83. package/dist/schemas/soil-tests.schemas.d.ts.map +1 -0
  84. package/dist/schemas/soil-tests.schemas.js +102 -0
  85. package/dist/schemas/suppliers.schemas.d.ts +1774 -0
  86. package/dist/schemas/suppliers.schemas.d.ts.map +1 -0
  87. package/dist/schemas/suppliers.schemas.js +121 -0
  88. package/dist/schemas/tasks.schemas.d.ts +1761 -0
  89. package/dist/schemas/tasks.schemas.d.ts.map +1 -0
  90. package/dist/schemas/tasks.schemas.js +121 -0
  91. package/dist/schemas/team.schemas.d.ts +583 -0
  92. package/dist/schemas/team.schemas.d.ts.map +1 -0
  93. package/dist/schemas/team.schemas.js +60 -0
  94. package/dist/schemas/users.schemas.d.ts +288 -0
  95. package/dist/schemas/users.schemas.d.ts.map +1 -0
  96. package/dist/schemas/users.schemas.js +32 -0
  97. package/dist/schemas/weather.schemas.d.ts +682 -0
  98. package/dist/schemas/weather.schemas.d.ts.map +1 -0
  99. package/dist/schemas/weather.schemas.js +49 -0
  100. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"finance.routes.d.ts","sourceRoot":"","sources":["../../src/routes/finance.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA6BxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwQxB,CAAC"}
@@ -0,0 +1,259 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.financeRouter = void 0;
4
+ const core_1 = require("@ts-rest/core");
5
+ const zod_1 = require("zod");
6
+ const finance_schemas_1 = require("../schemas/finance.schemas");
7
+ const common_schemas_1 = require("../schemas/common.schemas");
8
+ const c = (0, core_1.initContract)();
9
+ exports.financeRouter = c.router({
10
+ // Budget routes
11
+ listBudget: {
12
+ method: 'GET',
13
+ path: '/farms/:farmId/budget',
14
+ pathParams: zod_1.z.object({ farmId: zod_1.z.string().uuid() }),
15
+ query: common_schemas_1.jsonApiPaginationQuerySchema
16
+ .merge(common_schemas_1.jsonApiSortQuerySchema)
17
+ .merge(common_schemas_1.jsonApiIncludeQuerySchema),
18
+ responses: {
19
+ 200: finance_schemas_1.budgetListResponseSchema,
20
+ 404: common_schemas_1.jsonApiErrorResponseSchema,
21
+ 401: common_schemas_1.jsonApiErrorResponseSchema,
22
+ },
23
+ summary: 'List budget items',
24
+ description: 'Get all budget categories for a farm',
25
+ },
26
+ createBudget: {
27
+ method: 'POST',
28
+ path: '/farms/:farmId/budget',
29
+ pathParams: zod_1.z.object({ farmId: zod_1.z.string().uuid() }),
30
+ body: zod_1.z.object({ data: finance_schemas_1.createBudgetSchema }),
31
+ responses: {
32
+ 201: finance_schemas_1.budgetResponseSchema,
33
+ 400: common_schemas_1.jsonApiErrorResponseSchema,
34
+ 404: common_schemas_1.jsonApiErrorResponseSchema,
35
+ 401: common_schemas_1.jsonApiErrorResponseSchema,
36
+ 422: common_schemas_1.jsonApiErrorResponseSchema,
37
+ },
38
+ summary: 'Create budget item',
39
+ description: 'Create a new budget category',
40
+ },
41
+ updateBudget: {
42
+ method: 'PATCH',
43
+ path: '/farms/:farmId/budget/:id',
44
+ pathParams: zod_1.z.object({
45
+ farmId: zod_1.z.string().uuid(),
46
+ id: zod_1.z.string().uuid(),
47
+ }),
48
+ body: zod_1.z.object({ data: finance_schemas_1.updateBudgetSchema }),
49
+ responses: {
50
+ 200: finance_schemas_1.budgetResponseSchema,
51
+ 400: common_schemas_1.jsonApiErrorResponseSchema,
52
+ 404: common_schemas_1.jsonApiErrorResponseSchema,
53
+ 401: common_schemas_1.jsonApiErrorResponseSchema,
54
+ 422: common_schemas_1.jsonApiErrorResponseSchema,
55
+ },
56
+ summary: 'Update budget item',
57
+ description: 'Update a budget category',
58
+ },
59
+ deleteBudget: {
60
+ method: 'DELETE',
61
+ path: '/farms/:farmId/budget/:id',
62
+ pathParams: zod_1.z.object({
63
+ farmId: zod_1.z.string().uuid(),
64
+ id: zod_1.z.string().uuid(),
65
+ }),
66
+ responses: {
67
+ 204: common_schemas_1.jsonApiSuccessResponseSchema,
68
+ 404: common_schemas_1.jsonApiErrorResponseSchema,
69
+ 401: common_schemas_1.jsonApiErrorResponseSchema,
70
+ },
71
+ summary: 'Delete budget item',
72
+ description: 'Delete a budget category',
73
+ },
74
+ // Expense routes
75
+ listExpenses: {
76
+ method: 'GET',
77
+ path: '/farms/:farmId/expenses',
78
+ pathParams: zod_1.z.object({ farmId: zod_1.z.string().uuid() }),
79
+ query: common_schemas_1.jsonApiPaginationQuerySchema
80
+ .merge(common_schemas_1.jsonApiSortQuerySchema)
81
+ .merge(common_schemas_1.jsonApiIncludeQuerySchema)
82
+ .merge(common_schemas_1.jsonApiFilterQuerySchema)
83
+ .merge(zod_1.z.object({
84
+ 'filter[category]': zod_1.z.string().optional(),
85
+ 'filter[fieldId]': zod_1.z.string().uuid().optional(),
86
+ 'filter[cropId]': zod_1.z.string().optional(),
87
+ })),
88
+ responses: {
89
+ 200: finance_schemas_1.expenseListResponseSchema,
90
+ 404: common_schemas_1.jsonApiErrorResponseSchema,
91
+ 401: common_schemas_1.jsonApiErrorResponseSchema,
92
+ },
93
+ summary: 'List expenses',
94
+ description: 'Get all expenses for a farm with optional filtering',
95
+ },
96
+ createExpense: {
97
+ method: 'POST',
98
+ path: '/farms/:farmId/expenses',
99
+ pathParams: zod_1.z.object({ farmId: zod_1.z.string().uuid() }),
100
+ body: zod_1.z.object({ data: finance_schemas_1.createExpenseSchema }),
101
+ responses: {
102
+ 201: finance_schemas_1.expenseResponseSchema,
103
+ 400: common_schemas_1.jsonApiErrorResponseSchema,
104
+ 404: common_schemas_1.jsonApiErrorResponseSchema,
105
+ 401: common_schemas_1.jsonApiErrorResponseSchema,
106
+ 422: common_schemas_1.jsonApiErrorResponseSchema,
107
+ },
108
+ summary: 'Create expense',
109
+ description: 'Create a new expense with optional field/crop allocation',
110
+ },
111
+ getExpense: {
112
+ method: 'GET',
113
+ path: '/farms/:farmId/expenses/:id',
114
+ pathParams: zod_1.z.object({
115
+ farmId: zod_1.z.string().uuid(),
116
+ id: zod_1.z.string().uuid(),
117
+ }),
118
+ query: common_schemas_1.jsonApiIncludeQuerySchema,
119
+ responses: {
120
+ 200: finance_schemas_1.expenseDetailResponseSchema,
121
+ 404: common_schemas_1.jsonApiErrorResponseSchema,
122
+ 401: common_schemas_1.jsonApiErrorResponseSchema,
123
+ },
124
+ summary: 'Get expense by ID',
125
+ description: 'Get detailed information about a specific expense',
126
+ },
127
+ updateExpense: {
128
+ method: 'PATCH',
129
+ path: '/farms/:farmId/expenses/:id',
130
+ pathParams: zod_1.z.object({
131
+ farmId: zod_1.z.string().uuid(),
132
+ id: zod_1.z.string().uuid(),
133
+ }),
134
+ body: zod_1.z.object({ data: finance_schemas_1.updateExpenseSchema }),
135
+ responses: {
136
+ 200: finance_schemas_1.expenseResponseSchema,
137
+ 400: common_schemas_1.jsonApiErrorResponseSchema,
138
+ 404: common_schemas_1.jsonApiErrorResponseSchema,
139
+ 401: common_schemas_1.jsonApiErrorResponseSchema,
140
+ 422: common_schemas_1.jsonApiErrorResponseSchema,
141
+ },
142
+ summary: 'Update expense',
143
+ description: 'Update an expense',
144
+ },
145
+ deleteExpense: {
146
+ method: 'DELETE',
147
+ path: '/farms/:farmId/expenses/:id',
148
+ pathParams: zod_1.z.object({
149
+ farmId: zod_1.z.string().uuid(),
150
+ id: zod_1.z.string().uuid(),
151
+ }),
152
+ responses: {
153
+ 204: common_schemas_1.jsonApiSuccessResponseSchema,
154
+ 404: common_schemas_1.jsonApiErrorResponseSchema,
155
+ 401: common_schemas_1.jsonApiErrorResponseSchema,
156
+ },
157
+ summary: 'Delete expense',
158
+ description: 'Delete an expense',
159
+ },
160
+ // Revenue routes
161
+ listRevenue: {
162
+ method: 'GET',
163
+ path: '/farms/:farmId/revenue',
164
+ pathParams: zod_1.z.object({ farmId: zod_1.z.string().uuid() }),
165
+ query: common_schemas_1.jsonApiPaginationQuerySchema
166
+ .merge(common_schemas_1.jsonApiSortQuerySchema)
167
+ .merge(common_schemas_1.jsonApiIncludeQuerySchema)
168
+ .merge(common_schemas_1.jsonApiFilterQuerySchema)
169
+ .merge(zod_1.z.object({
170
+ 'filter[crop]': zod_1.z.string().optional(),
171
+ 'filter[fieldId]': zod_1.z.string().uuid().optional(),
172
+ })),
173
+ responses: {
174
+ 200: finance_schemas_1.revenueListResponseSchema,
175
+ 404: common_schemas_1.jsonApiErrorResponseSchema,
176
+ 401: common_schemas_1.jsonApiErrorResponseSchema,
177
+ },
178
+ summary: 'List revenue',
179
+ description: 'Get all revenue entries for a farm',
180
+ },
181
+ createRevenue: {
182
+ method: 'POST',
183
+ path: '/farms/:farmId/revenue',
184
+ pathParams: zod_1.z.object({ farmId: zod_1.z.string().uuid() }),
185
+ body: zod_1.z.object({ data: finance_schemas_1.createRevenueSchema }),
186
+ responses: {
187
+ 201: finance_schemas_1.revenueResponseSchema,
188
+ 400: common_schemas_1.jsonApiErrorResponseSchema,
189
+ 404: common_schemas_1.jsonApiErrorResponseSchema,
190
+ 401: common_schemas_1.jsonApiErrorResponseSchema,
191
+ 422: common_schemas_1.jsonApiErrorResponseSchema,
192
+ },
193
+ summary: 'Create revenue',
194
+ description: 'Create a new revenue entry',
195
+ },
196
+ getRevenue: {
197
+ method: 'GET',
198
+ path: '/farms/:farmId/revenue/:id',
199
+ pathParams: zod_1.z.object({
200
+ farmId: zod_1.z.string().uuid(),
201
+ id: zod_1.z.string().uuid(),
202
+ }),
203
+ query: common_schemas_1.jsonApiIncludeQuerySchema,
204
+ responses: {
205
+ 200: finance_schemas_1.revenueDetailResponseSchema,
206
+ 404: common_schemas_1.jsonApiErrorResponseSchema,
207
+ 401: common_schemas_1.jsonApiErrorResponseSchema,
208
+ },
209
+ summary: 'Get revenue by ID',
210
+ description: 'Get detailed information about a specific revenue entry',
211
+ },
212
+ updateRevenue: {
213
+ method: 'PATCH',
214
+ path: '/farms/:farmId/revenue/:id',
215
+ pathParams: zod_1.z.object({
216
+ farmId: zod_1.z.string().uuid(),
217
+ id: zod_1.z.string().uuid(),
218
+ }),
219
+ body: zod_1.z.object({ data: finance_schemas_1.updateRevenueSchema }),
220
+ responses: {
221
+ 200: finance_schemas_1.revenueResponseSchema,
222
+ 400: common_schemas_1.jsonApiErrorResponseSchema,
223
+ 404: common_schemas_1.jsonApiErrorResponseSchema,
224
+ 401: common_schemas_1.jsonApiErrorResponseSchema,
225
+ 422: common_schemas_1.jsonApiErrorResponseSchema,
226
+ },
227
+ summary: 'Update revenue',
228
+ description: 'Update a revenue entry',
229
+ },
230
+ deleteRevenue: {
231
+ method: 'DELETE',
232
+ path: '/farms/:farmId/revenue/:id',
233
+ pathParams: zod_1.z.object({
234
+ farmId: zod_1.z.string().uuid(),
235
+ id: zod_1.z.string().uuid(),
236
+ }),
237
+ responses: {
238
+ 204: common_schemas_1.jsonApiSuccessResponseSchema,
239
+ 404: common_schemas_1.jsonApiErrorResponseSchema,
240
+ 401: common_schemas_1.jsonApiErrorResponseSchema,
241
+ },
242
+ summary: 'Delete revenue',
243
+ description: 'Delete a revenue entry',
244
+ },
245
+ // Finance summary
246
+ getFinanceSummary: {
247
+ method: 'GET',
248
+ path: '/farms/:farmId/finance/summary',
249
+ pathParams: zod_1.z.object({ farmId: zod_1.z.string().uuid() }),
250
+ query: common_schemas_1.jsonApiFilterQuerySchema,
251
+ responses: {
252
+ 200: finance_schemas_1.financeSummaryResponseSchema,
253
+ 404: common_schemas_1.jsonApiErrorResponseSchema,
254
+ 401: common_schemas_1.jsonApiErrorResponseSchema,
255
+ },
256
+ summary: 'Get finance summary',
257
+ description: 'Get financial overview including totals, profit, and budget breakdown',
258
+ },
259
+ });