@deepintel-ltd/farmpro-contracts 1.0.2 → 1.0.4

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 (106) hide show
  1. package/dist/index.d.ts +43 -0
  2. package/dist/index.d.ts.map +1 -0
  3. package/dist/index.js +84 -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/categories.routes.d.ts +800 -0
  11. package/dist/routes/categories.routes.d.ts.map +1 -0
  12. package/dist/routes/categories.routes.js +120 -0
  13. package/dist/routes/documents.routes.d.ts +2476 -0
  14. package/dist/routes/documents.routes.d.ts.map +1 -0
  15. package/dist/routes/documents.routes.js +100 -0
  16. package/dist/routes/equipment.routes.d.ts +3617 -0
  17. package/dist/routes/equipment.routes.d.ts.map +1 -0
  18. package/dist/routes/equipment.routes.js +118 -0
  19. package/dist/routes/farms.routes.d.ts +2202 -0
  20. package/dist/routes/farms.routes.d.ts.map +1 -0
  21. package/dist/routes/farms.routes.js +111 -0
  22. package/dist/routes/fields.routes.d.ts +3479 -0
  23. package/dist/routes/fields.routes.d.ts.map +1 -0
  24. package/dist/routes/fields.routes.js +96 -0
  25. package/dist/routes/finance.routes.d.ts +6855 -0
  26. package/dist/routes/finance.routes.d.ts.map +1 -0
  27. package/dist/routes/finance.routes.js +259 -0
  28. package/dist/routes/harvest.routes.d.ts +2337 -0
  29. package/dist/routes/harvest.routes.d.ts.map +1 -0
  30. package/dist/routes/harvest.routes.js +99 -0
  31. package/dist/routes/index.d.ts +71 -0
  32. package/dist/routes/index.d.ts.map +1 -0
  33. package/dist/routes/index.js +45 -0
  34. package/dist/routes/inventory.routes.d.ts +2853 -0
  35. package/dist/routes/inventory.routes.d.ts.map +1 -0
  36. package/dist/routes/inventory.routes.js +121 -0
  37. package/dist/routes/soil-tests.routes.d.ts +3005 -0
  38. package/dist/routes/soil-tests.routes.d.ts.map +1 -0
  39. package/dist/routes/soil-tests.routes.js +98 -0
  40. package/dist/routes/suppliers.routes.d.ts +4190 -0
  41. package/dist/routes/suppliers.routes.d.ts.map +1 -0
  42. package/dist/routes/suppliers.routes.js +146 -0
  43. package/dist/routes/tasks.routes.d.ts +4248 -0
  44. package/dist/routes/tasks.routes.d.ts.map +1 -0
  45. package/dist/routes/tasks.routes.js +138 -0
  46. package/dist/routes/team.routes.d.ts +2210 -0
  47. package/dist/routes/team.routes.d.ts.map +1 -0
  48. package/dist/routes/team.routes.js +98 -0
  49. package/dist/routes/users.routes.d.ts +721 -0
  50. package/dist/routes/users.routes.d.ts.map +1 -0
  51. package/dist/routes/users.routes.js +35 -0
  52. package/dist/routes/weather.routes.d.ts +500 -0
  53. package/dist/routes/weather.routes.d.ts.map +1 -0
  54. package/dist/routes/weather.routes.js +23 -0
  55. package/dist/schemas/analytics.schemas.d.ts +1344 -0
  56. package/dist/schemas/analytics.schemas.d.ts.map +1 -0
  57. package/dist/schemas/analytics.schemas.js +73 -0
  58. package/dist/schemas/auth.schemas.d.ts +1093 -0
  59. package/dist/schemas/auth.schemas.d.ts.map +1 -0
  60. package/dist/schemas/auth.schemas.js +159 -0
  61. package/dist/schemas/categories.schemas.d.ts +471 -0
  62. package/dist/schemas/categories.schemas.d.ts.map +1 -0
  63. package/dist/schemas/categories.schemas.js +51 -0
  64. package/dist/schemas/common.schemas.d.ts +562 -0
  65. package/dist/schemas/common.schemas.d.ts.map +1 -0
  66. package/dist/schemas/common.schemas.js +122 -0
  67. package/dist/schemas/documents.schemas.d.ts +850 -0
  68. package/dist/schemas/documents.schemas.d.ts.map +1 -0
  69. package/dist/schemas/documents.schemas.js +75 -0
  70. package/dist/schemas/equipment.schemas.d.ts +1618 -0
  71. package/dist/schemas/equipment.schemas.d.ts.map +1 -0
  72. package/dist/schemas/equipment.schemas.js +125 -0
  73. package/dist/schemas/farms.schemas.d.ts +1171 -0
  74. package/dist/schemas/farms.schemas.d.ts.map +1 -0
  75. package/dist/schemas/farms.schemas.js +62 -0
  76. package/dist/schemas/fields.schemas.d.ts +2508 -0
  77. package/dist/schemas/fields.schemas.d.ts.map +1 -0
  78. package/dist/schemas/fields.schemas.js +125 -0
  79. package/dist/schemas/finance.schemas.d.ts +2869 -0
  80. package/dist/schemas/finance.schemas.d.ts.map +1 -0
  81. package/dist/schemas/finance.schemas.js +196 -0
  82. package/dist/schemas/harvest.schemas.d.ts +1051 -0
  83. package/dist/schemas/harvest.schemas.d.ts.map +1 -0
  84. package/dist/schemas/harvest.schemas.js +71 -0
  85. package/dist/schemas/inventory.schemas.d.ts +1138 -0
  86. package/dist/schemas/inventory.schemas.d.ts.map +1 -0
  87. package/dist/schemas/inventory.schemas.js +89 -0
  88. package/dist/schemas/soil-tests.schemas.d.ts +1885 -0
  89. package/dist/schemas/soil-tests.schemas.d.ts.map +1 -0
  90. package/dist/schemas/soil-tests.schemas.js +102 -0
  91. package/dist/schemas/suppliers.schemas.d.ts +1774 -0
  92. package/dist/schemas/suppliers.schemas.d.ts.map +1 -0
  93. package/dist/schemas/suppliers.schemas.js +121 -0
  94. package/dist/schemas/tasks.schemas.d.ts +1811 -0
  95. package/dist/schemas/tasks.schemas.d.ts.map +1 -0
  96. package/dist/schemas/tasks.schemas.js +124 -0
  97. package/dist/schemas/team.schemas.d.ts +583 -0
  98. package/dist/schemas/team.schemas.d.ts.map +1 -0
  99. package/dist/schemas/team.schemas.js +60 -0
  100. package/dist/schemas/users.schemas.d.ts +288 -0
  101. package/dist/schemas/users.schemas.d.ts.map +1 -0
  102. package/dist/schemas/users.schemas.js +32 -0
  103. package/dist/schemas/weather.schemas.d.ts +682 -0
  104. package/dist/schemas/weather.schemas.d.ts.map +1 -0
  105. package/dist/schemas/weather.schemas.js +49 -0
  106. package/package.json +1 -1
@@ -0,0 +1,850 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Document schemas - JSON:API compliant
4
+ */
5
+ export declare const documentTypeSchema: z.ZodEnum<["receipt", "certificate", "land-document", "insurance", "contract", "invoice", "other"]>;
6
+ export declare const relatedEntityTypeSchema: z.ZodEnum<["farm", "field", "purchase", "expense", "equipment", "other"]>;
7
+ export declare const relatedEntitySchema: z.ZodObject<{
8
+ type: z.ZodEnum<["farm", "field", "purchase", "expense", "equipment", "other"]>;
9
+ id: z.ZodString;
10
+ }, "strip", z.ZodTypeAny, {
11
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
12
+ id: string;
13
+ }, {
14
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
15
+ id: string;
16
+ }>;
17
+ export declare const documentAttributesSchema: z.ZodObject<{
18
+ farmId: z.ZodString;
19
+ name: z.ZodString;
20
+ type: z.ZodEnum<["receipt", "certificate", "land-document", "insurance", "contract", "invoice", "other"]>;
21
+ category: z.ZodNullable<z.ZodString>;
22
+ fileUrl: z.ZodString;
23
+ fileSize: z.ZodNullable<z.ZodNumber>;
24
+ uploadedDate: z.ZodString;
25
+ uploadedBy: z.ZodNullable<z.ZodString>;
26
+ relatedTo: z.ZodNullable<z.ZodObject<{
27
+ type: z.ZodEnum<["farm", "field", "purchase", "expense", "equipment", "other"]>;
28
+ id: z.ZodString;
29
+ }, "strip", z.ZodTypeAny, {
30
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
31
+ id: string;
32
+ }, {
33
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
34
+ id: string;
35
+ }>>;
36
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
37
+ description: z.ZodNullable<z.ZodString>;
38
+ } & {
39
+ createdAt: z.ZodString;
40
+ updatedAt: z.ZodString;
41
+ }, "strip", z.ZodTypeAny, {
42
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
43
+ createdAt: string;
44
+ updatedAt: string;
45
+ name: string;
46
+ description: string | null;
47
+ farmId: string;
48
+ category: string | null;
49
+ fileUrl: string;
50
+ fileSize: number | null;
51
+ uploadedDate: string;
52
+ uploadedBy: string | null;
53
+ relatedTo: {
54
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
55
+ id: string;
56
+ } | null;
57
+ tags?: string[] | undefined;
58
+ }, {
59
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
60
+ createdAt: string;
61
+ updatedAt: string;
62
+ name: string;
63
+ description: string | null;
64
+ farmId: string;
65
+ category: string | null;
66
+ fileUrl: string;
67
+ fileSize: number | null;
68
+ uploadedDate: string;
69
+ uploadedBy: string | null;
70
+ relatedTo: {
71
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
72
+ id: string;
73
+ } | null;
74
+ tags?: string[] | undefined;
75
+ }>;
76
+ export declare const createDocumentAttributesSchema: z.ZodObject<{
77
+ name: z.ZodString;
78
+ type: z.ZodEnum<["receipt", "certificate", "land-document", "insurance", "contract", "invoice", "other"]>;
79
+ category: z.ZodOptional<z.ZodString>;
80
+ fileUrl: z.ZodString;
81
+ fileSize: z.ZodOptional<z.ZodNumber>;
82
+ relatedTo: z.ZodOptional<z.ZodObject<{
83
+ type: z.ZodEnum<["farm", "field", "purchase", "expense", "equipment", "other"]>;
84
+ id: z.ZodString;
85
+ }, "strip", z.ZodTypeAny, {
86
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
87
+ id: string;
88
+ }, {
89
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
90
+ id: string;
91
+ }>>;
92
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
93
+ description: z.ZodOptional<z.ZodString>;
94
+ }, "strip", z.ZodTypeAny, {
95
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
96
+ name: string;
97
+ fileUrl: string;
98
+ description?: string | undefined;
99
+ category?: string | undefined;
100
+ fileSize?: number | undefined;
101
+ relatedTo?: {
102
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
103
+ id: string;
104
+ } | undefined;
105
+ tags?: string[] | undefined;
106
+ }, {
107
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
108
+ name: string;
109
+ fileUrl: string;
110
+ description?: string | undefined;
111
+ category?: string | undefined;
112
+ fileSize?: number | undefined;
113
+ relatedTo?: {
114
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
115
+ id: string;
116
+ } | undefined;
117
+ tags?: string[] | undefined;
118
+ }>;
119
+ export declare const updateDocumentAttributesSchema: z.ZodObject<{
120
+ name: z.ZodOptional<z.ZodString>;
121
+ type: z.ZodOptional<z.ZodEnum<["receipt", "certificate", "land-document", "insurance", "contract", "invoice", "other"]>>;
122
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
123
+ relatedTo: z.ZodOptional<z.ZodNullable<z.ZodObject<{
124
+ type: z.ZodEnum<["farm", "field", "purchase", "expense", "equipment", "other"]>;
125
+ id: z.ZodString;
126
+ }, "strip", z.ZodTypeAny, {
127
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
128
+ id: string;
129
+ }, {
130
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
131
+ id: string;
132
+ }>>>;
133
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
134
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
135
+ }, "strip", z.ZodTypeAny, {
136
+ type?: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice" | undefined;
137
+ name?: string | undefined;
138
+ description?: string | null | undefined;
139
+ category?: string | null | undefined;
140
+ relatedTo?: {
141
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
142
+ id: string;
143
+ } | null | undefined;
144
+ tags?: string[] | undefined;
145
+ }, {
146
+ type?: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice" | undefined;
147
+ name?: string | undefined;
148
+ description?: string | null | undefined;
149
+ category?: string | null | undefined;
150
+ relatedTo?: {
151
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
152
+ id: string;
153
+ } | null | undefined;
154
+ tags?: string[] | undefined;
155
+ }>;
156
+ export declare const createDocumentSchema: z.ZodObject<{
157
+ type: z.ZodLiteral<"documents">;
158
+ attributes: z.ZodObject<{
159
+ name: z.ZodString;
160
+ type: z.ZodEnum<["receipt", "certificate", "land-document", "insurance", "contract", "invoice", "other"]>;
161
+ category: z.ZodOptional<z.ZodString>;
162
+ fileUrl: z.ZodString;
163
+ fileSize: z.ZodOptional<z.ZodNumber>;
164
+ relatedTo: z.ZodOptional<z.ZodObject<{
165
+ type: z.ZodEnum<["farm", "field", "purchase", "expense", "equipment", "other"]>;
166
+ id: z.ZodString;
167
+ }, "strip", z.ZodTypeAny, {
168
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
169
+ id: string;
170
+ }, {
171
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
172
+ id: string;
173
+ }>>;
174
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
175
+ description: z.ZodOptional<z.ZodString>;
176
+ }, "strip", z.ZodTypeAny, {
177
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
178
+ name: string;
179
+ fileUrl: string;
180
+ description?: string | undefined;
181
+ category?: string | undefined;
182
+ fileSize?: number | undefined;
183
+ relatedTo?: {
184
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
185
+ id: string;
186
+ } | undefined;
187
+ tags?: string[] | undefined;
188
+ }, {
189
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
190
+ name: string;
191
+ fileUrl: string;
192
+ description?: string | undefined;
193
+ category?: string | undefined;
194
+ fileSize?: number | undefined;
195
+ relatedTo?: {
196
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
197
+ id: string;
198
+ } | undefined;
199
+ tags?: string[] | undefined;
200
+ }>;
201
+ }, "strip", z.ZodTypeAny, {
202
+ type: "documents";
203
+ attributes: {
204
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
205
+ name: string;
206
+ fileUrl: string;
207
+ description?: string | undefined;
208
+ category?: string | undefined;
209
+ fileSize?: number | undefined;
210
+ relatedTo?: {
211
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
212
+ id: string;
213
+ } | undefined;
214
+ tags?: string[] | undefined;
215
+ };
216
+ }, {
217
+ type: "documents";
218
+ attributes: {
219
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
220
+ name: string;
221
+ fileUrl: string;
222
+ description?: string | undefined;
223
+ category?: string | undefined;
224
+ fileSize?: number | undefined;
225
+ relatedTo?: {
226
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
227
+ id: string;
228
+ } | undefined;
229
+ tags?: string[] | undefined;
230
+ };
231
+ }>;
232
+ export declare const updateDocumentSchema: z.ZodObject<{
233
+ type: z.ZodLiteral<"documents">;
234
+ id: z.ZodString;
235
+ attributes: z.ZodObject<{
236
+ name: z.ZodOptional<z.ZodString>;
237
+ type: z.ZodOptional<z.ZodEnum<["receipt", "certificate", "land-document", "insurance", "contract", "invoice", "other"]>>;
238
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
239
+ relatedTo: z.ZodOptional<z.ZodNullable<z.ZodObject<{
240
+ type: z.ZodEnum<["farm", "field", "purchase", "expense", "equipment", "other"]>;
241
+ id: z.ZodString;
242
+ }, "strip", z.ZodTypeAny, {
243
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
244
+ id: string;
245
+ }, {
246
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
247
+ id: string;
248
+ }>>>;
249
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
250
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
251
+ }, "strip", z.ZodTypeAny, {
252
+ type?: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice" | undefined;
253
+ name?: string | undefined;
254
+ description?: string | null | undefined;
255
+ category?: string | null | undefined;
256
+ relatedTo?: {
257
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
258
+ id: string;
259
+ } | null | undefined;
260
+ tags?: string[] | undefined;
261
+ }, {
262
+ type?: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice" | undefined;
263
+ name?: string | undefined;
264
+ description?: string | null | undefined;
265
+ category?: string | null | undefined;
266
+ relatedTo?: {
267
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
268
+ id: string;
269
+ } | null | undefined;
270
+ tags?: string[] | undefined;
271
+ }>;
272
+ }, "strip", z.ZodTypeAny, {
273
+ type: "documents";
274
+ id: string;
275
+ attributes: {
276
+ type?: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice" | undefined;
277
+ name?: string | undefined;
278
+ description?: string | null | undefined;
279
+ category?: string | null | undefined;
280
+ relatedTo?: {
281
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
282
+ id: string;
283
+ } | null | undefined;
284
+ tags?: string[] | undefined;
285
+ };
286
+ }, {
287
+ type: "documents";
288
+ id: string;
289
+ attributes: {
290
+ type?: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice" | undefined;
291
+ name?: string | undefined;
292
+ description?: string | null | undefined;
293
+ category?: string | null | undefined;
294
+ relatedTo?: {
295
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
296
+ id: string;
297
+ } | null | undefined;
298
+ tags?: string[] | undefined;
299
+ };
300
+ }>;
301
+ export declare const documentResourceSchema: z.ZodObject<{
302
+ type: z.ZodLiteral<string>;
303
+ id: z.ZodString;
304
+ attributes: z.ZodObject<{
305
+ farmId: z.ZodString;
306
+ name: z.ZodString;
307
+ type: z.ZodEnum<["receipt", "certificate", "land-document", "insurance", "contract", "invoice", "other"]>;
308
+ category: z.ZodNullable<z.ZodString>;
309
+ fileUrl: z.ZodString;
310
+ fileSize: z.ZodNullable<z.ZodNumber>;
311
+ uploadedDate: z.ZodString;
312
+ uploadedBy: z.ZodNullable<z.ZodString>;
313
+ relatedTo: z.ZodNullable<z.ZodObject<{
314
+ type: z.ZodEnum<["farm", "field", "purchase", "expense", "equipment", "other"]>;
315
+ id: z.ZodString;
316
+ }, "strip", z.ZodTypeAny, {
317
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
318
+ id: string;
319
+ }, {
320
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
321
+ id: string;
322
+ }>>;
323
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
324
+ description: z.ZodNullable<z.ZodString>;
325
+ } & {
326
+ createdAt: z.ZodString;
327
+ updatedAt: z.ZodString;
328
+ }, "strip", z.ZodTypeAny, {
329
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
330
+ createdAt: string;
331
+ updatedAt: string;
332
+ name: string;
333
+ description: string | null;
334
+ farmId: string;
335
+ category: string | null;
336
+ fileUrl: string;
337
+ fileSize: number | null;
338
+ uploadedDate: string;
339
+ uploadedBy: string | null;
340
+ relatedTo: {
341
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
342
+ id: string;
343
+ } | null;
344
+ tags?: string[] | undefined;
345
+ }, {
346
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
347
+ createdAt: string;
348
+ updatedAt: string;
349
+ name: string;
350
+ description: string | null;
351
+ farmId: string;
352
+ category: string | null;
353
+ fileUrl: string;
354
+ fileSize: number | null;
355
+ uploadedDate: string;
356
+ uploadedBy: string | null;
357
+ relatedTo: {
358
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
359
+ id: string;
360
+ } | null;
361
+ tags?: string[] | undefined;
362
+ }>;
363
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
364
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
365
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
366
+ }, "strip", z.ZodTypeAny, {
367
+ type: string;
368
+ id: string;
369
+ attributes: {
370
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
371
+ createdAt: string;
372
+ updatedAt: string;
373
+ name: string;
374
+ description: string | null;
375
+ farmId: string;
376
+ category: string | null;
377
+ fileUrl: string;
378
+ fileSize: number | null;
379
+ uploadedDate: string;
380
+ uploadedBy: string | null;
381
+ relatedTo: {
382
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
383
+ id: string;
384
+ } | null;
385
+ tags?: string[] | undefined;
386
+ };
387
+ relationships?: Record<string, unknown> | undefined;
388
+ links?: Record<string, string> | undefined;
389
+ meta?: Record<string, unknown> | undefined;
390
+ }, {
391
+ type: string;
392
+ id: string;
393
+ attributes: {
394
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
395
+ createdAt: string;
396
+ updatedAt: string;
397
+ name: string;
398
+ description: string | null;
399
+ farmId: string;
400
+ category: string | null;
401
+ fileUrl: string;
402
+ fileSize: number | null;
403
+ uploadedDate: string;
404
+ uploadedBy: string | null;
405
+ relatedTo: {
406
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
407
+ id: string;
408
+ } | null;
409
+ tags?: string[] | undefined;
410
+ };
411
+ relationships?: Record<string, unknown> | undefined;
412
+ links?: Record<string, string> | undefined;
413
+ meta?: Record<string, unknown> | undefined;
414
+ }>;
415
+ export declare const documentResponseSchema: z.ZodObject<{
416
+ data: z.ZodObject<{
417
+ type: z.ZodLiteral<string>;
418
+ id: z.ZodString;
419
+ attributes: z.ZodObject<{
420
+ farmId: z.ZodString;
421
+ name: z.ZodString;
422
+ type: z.ZodEnum<["receipt", "certificate", "land-document", "insurance", "contract", "invoice", "other"]>;
423
+ category: z.ZodNullable<z.ZodString>;
424
+ fileUrl: z.ZodString;
425
+ fileSize: z.ZodNullable<z.ZodNumber>;
426
+ uploadedDate: z.ZodString;
427
+ uploadedBy: z.ZodNullable<z.ZodString>;
428
+ relatedTo: z.ZodNullable<z.ZodObject<{
429
+ type: z.ZodEnum<["farm", "field", "purchase", "expense", "equipment", "other"]>;
430
+ id: z.ZodString;
431
+ }, "strip", z.ZodTypeAny, {
432
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
433
+ id: string;
434
+ }, {
435
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
436
+ id: string;
437
+ }>>;
438
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
439
+ description: z.ZodNullable<z.ZodString>;
440
+ } & {
441
+ createdAt: z.ZodString;
442
+ updatedAt: z.ZodString;
443
+ }, "strip", z.ZodTypeAny, {
444
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
445
+ createdAt: string;
446
+ updatedAt: string;
447
+ name: string;
448
+ description: string | null;
449
+ farmId: string;
450
+ category: string | null;
451
+ fileUrl: string;
452
+ fileSize: number | null;
453
+ uploadedDate: string;
454
+ uploadedBy: string | null;
455
+ relatedTo: {
456
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
457
+ id: string;
458
+ } | null;
459
+ tags?: string[] | undefined;
460
+ }, {
461
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
462
+ createdAt: string;
463
+ updatedAt: string;
464
+ name: string;
465
+ description: string | null;
466
+ farmId: string;
467
+ category: string | null;
468
+ fileUrl: string;
469
+ fileSize: number | null;
470
+ uploadedDate: string;
471
+ uploadedBy: string | null;
472
+ relatedTo: {
473
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
474
+ id: string;
475
+ } | null;
476
+ tags?: string[] | undefined;
477
+ }>;
478
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
479
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
480
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
481
+ }, "strip", z.ZodTypeAny, {
482
+ type: string;
483
+ id: string;
484
+ attributes: {
485
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
486
+ createdAt: string;
487
+ updatedAt: string;
488
+ name: string;
489
+ description: string | null;
490
+ farmId: string;
491
+ category: string | null;
492
+ fileUrl: string;
493
+ fileSize: number | null;
494
+ uploadedDate: string;
495
+ uploadedBy: string | null;
496
+ relatedTo: {
497
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
498
+ id: string;
499
+ } | null;
500
+ tags?: string[] | undefined;
501
+ };
502
+ relationships?: Record<string, unknown> | undefined;
503
+ links?: Record<string, string> | undefined;
504
+ meta?: Record<string, unknown> | undefined;
505
+ }, {
506
+ type: string;
507
+ id: string;
508
+ attributes: {
509
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
510
+ createdAt: string;
511
+ updatedAt: string;
512
+ name: string;
513
+ description: string | null;
514
+ farmId: string;
515
+ category: string | null;
516
+ fileUrl: string;
517
+ fileSize: number | null;
518
+ uploadedDate: string;
519
+ uploadedBy: string | null;
520
+ relatedTo: {
521
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
522
+ id: string;
523
+ } | null;
524
+ tags?: string[] | undefined;
525
+ };
526
+ relationships?: Record<string, unknown> | undefined;
527
+ links?: Record<string, string> | undefined;
528
+ meta?: Record<string, unknown> | undefined;
529
+ }>;
530
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
531
+ type: z.ZodString;
532
+ id: z.ZodString;
533
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
534
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
535
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
536
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
537
+ }, "strip", z.ZodTypeAny, {
538
+ type: string;
539
+ id: string;
540
+ attributes?: Record<string, unknown> | undefined;
541
+ relationships?: Record<string, unknown> | undefined;
542
+ links?: Record<string, string> | undefined;
543
+ meta?: Record<string, unknown> | undefined;
544
+ }, {
545
+ type: string;
546
+ id: string;
547
+ attributes?: Record<string, unknown> | undefined;
548
+ relationships?: Record<string, unknown> | undefined;
549
+ links?: Record<string, string> | undefined;
550
+ meta?: Record<string, unknown> | undefined;
551
+ }>, "many">>;
552
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
553
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
554
+ }, "strip", z.ZodTypeAny, {
555
+ data: {
556
+ type: string;
557
+ id: string;
558
+ attributes: {
559
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
560
+ createdAt: string;
561
+ updatedAt: string;
562
+ name: string;
563
+ description: string | null;
564
+ farmId: string;
565
+ category: string | null;
566
+ fileUrl: string;
567
+ fileSize: number | null;
568
+ uploadedDate: string;
569
+ uploadedBy: string | null;
570
+ relatedTo: {
571
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
572
+ id: string;
573
+ } | null;
574
+ tags?: string[] | undefined;
575
+ };
576
+ relationships?: Record<string, unknown> | undefined;
577
+ links?: Record<string, string> | undefined;
578
+ meta?: Record<string, unknown> | undefined;
579
+ };
580
+ links?: Record<string, string> | undefined;
581
+ meta?: Record<string, unknown> | undefined;
582
+ included?: {
583
+ type: string;
584
+ id: string;
585
+ attributes?: Record<string, unknown> | undefined;
586
+ relationships?: Record<string, unknown> | undefined;
587
+ links?: Record<string, string> | undefined;
588
+ meta?: Record<string, unknown> | undefined;
589
+ }[] | undefined;
590
+ }, {
591
+ data: {
592
+ type: string;
593
+ id: string;
594
+ attributes: {
595
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
596
+ createdAt: string;
597
+ updatedAt: string;
598
+ name: string;
599
+ description: string | null;
600
+ farmId: string;
601
+ category: string | null;
602
+ fileUrl: string;
603
+ fileSize: number | null;
604
+ uploadedDate: string;
605
+ uploadedBy: string | null;
606
+ relatedTo: {
607
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
608
+ id: string;
609
+ } | null;
610
+ tags?: string[] | undefined;
611
+ };
612
+ relationships?: Record<string, unknown> | undefined;
613
+ links?: Record<string, string> | undefined;
614
+ meta?: Record<string, unknown> | undefined;
615
+ };
616
+ links?: Record<string, string> | undefined;
617
+ meta?: Record<string, unknown> | undefined;
618
+ included?: {
619
+ type: string;
620
+ id: string;
621
+ attributes?: Record<string, unknown> | undefined;
622
+ relationships?: Record<string, unknown> | undefined;
623
+ links?: Record<string, string> | undefined;
624
+ meta?: Record<string, unknown> | undefined;
625
+ }[] | undefined;
626
+ }>;
627
+ export declare const documentListResponseSchema: z.ZodObject<{
628
+ data: z.ZodArray<z.ZodObject<{
629
+ type: z.ZodLiteral<string>;
630
+ id: z.ZodString;
631
+ attributes: z.ZodObject<{
632
+ farmId: z.ZodString;
633
+ name: z.ZodString;
634
+ type: z.ZodEnum<["receipt", "certificate", "land-document", "insurance", "contract", "invoice", "other"]>;
635
+ category: z.ZodNullable<z.ZodString>;
636
+ fileUrl: z.ZodString;
637
+ fileSize: z.ZodNullable<z.ZodNumber>;
638
+ uploadedDate: z.ZodString;
639
+ uploadedBy: z.ZodNullable<z.ZodString>;
640
+ relatedTo: z.ZodNullable<z.ZodObject<{
641
+ type: z.ZodEnum<["farm", "field", "purchase", "expense", "equipment", "other"]>;
642
+ id: z.ZodString;
643
+ }, "strip", z.ZodTypeAny, {
644
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
645
+ id: string;
646
+ }, {
647
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
648
+ id: string;
649
+ }>>;
650
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
651
+ description: z.ZodNullable<z.ZodString>;
652
+ } & {
653
+ createdAt: z.ZodString;
654
+ updatedAt: z.ZodString;
655
+ }, "strip", z.ZodTypeAny, {
656
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
657
+ createdAt: string;
658
+ updatedAt: string;
659
+ name: string;
660
+ description: string | null;
661
+ farmId: string;
662
+ category: string | null;
663
+ fileUrl: string;
664
+ fileSize: number | null;
665
+ uploadedDate: string;
666
+ uploadedBy: string | null;
667
+ relatedTo: {
668
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
669
+ id: string;
670
+ } | null;
671
+ tags?: string[] | undefined;
672
+ }, {
673
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
674
+ createdAt: string;
675
+ updatedAt: string;
676
+ name: string;
677
+ description: string | null;
678
+ farmId: string;
679
+ category: string | null;
680
+ fileUrl: string;
681
+ fileSize: number | null;
682
+ uploadedDate: string;
683
+ uploadedBy: string | null;
684
+ relatedTo: {
685
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
686
+ id: string;
687
+ } | null;
688
+ tags?: string[] | undefined;
689
+ }>;
690
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
691
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
692
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
693
+ }, "strip", z.ZodTypeAny, {
694
+ type: string;
695
+ id: string;
696
+ attributes: {
697
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
698
+ createdAt: string;
699
+ updatedAt: string;
700
+ name: string;
701
+ description: string | null;
702
+ farmId: string;
703
+ category: string | null;
704
+ fileUrl: string;
705
+ fileSize: number | null;
706
+ uploadedDate: string;
707
+ uploadedBy: string | null;
708
+ relatedTo: {
709
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
710
+ id: string;
711
+ } | null;
712
+ tags?: string[] | undefined;
713
+ };
714
+ relationships?: Record<string, unknown> | undefined;
715
+ links?: Record<string, string> | undefined;
716
+ meta?: Record<string, unknown> | undefined;
717
+ }, {
718
+ type: string;
719
+ id: string;
720
+ attributes: {
721
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
722
+ createdAt: string;
723
+ updatedAt: string;
724
+ name: string;
725
+ description: string | null;
726
+ farmId: string;
727
+ category: string | null;
728
+ fileUrl: string;
729
+ fileSize: number | null;
730
+ uploadedDate: string;
731
+ uploadedBy: string | null;
732
+ relatedTo: {
733
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
734
+ id: string;
735
+ } | null;
736
+ tags?: string[] | undefined;
737
+ };
738
+ relationships?: Record<string, unknown> | undefined;
739
+ links?: Record<string, string> | undefined;
740
+ meta?: Record<string, unknown> | undefined;
741
+ }>, "many">;
742
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
743
+ type: z.ZodString;
744
+ id: z.ZodString;
745
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
746
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
747
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
748
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
749
+ }, "strip", z.ZodTypeAny, {
750
+ type: string;
751
+ id: string;
752
+ attributes?: Record<string, unknown> | undefined;
753
+ relationships?: Record<string, unknown> | undefined;
754
+ links?: Record<string, string> | undefined;
755
+ meta?: Record<string, unknown> | undefined;
756
+ }, {
757
+ type: string;
758
+ id: string;
759
+ attributes?: Record<string, unknown> | undefined;
760
+ relationships?: Record<string, unknown> | undefined;
761
+ links?: Record<string, string> | undefined;
762
+ meta?: Record<string, unknown> | undefined;
763
+ }>, "many">>;
764
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
765
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
766
+ }, "strip", z.ZodTypeAny, {
767
+ data: {
768
+ type: string;
769
+ id: string;
770
+ attributes: {
771
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
772
+ createdAt: string;
773
+ updatedAt: string;
774
+ name: string;
775
+ description: string | null;
776
+ farmId: string;
777
+ category: string | null;
778
+ fileUrl: string;
779
+ fileSize: number | null;
780
+ uploadedDate: string;
781
+ uploadedBy: string | null;
782
+ relatedTo: {
783
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
784
+ id: string;
785
+ } | null;
786
+ tags?: string[] | undefined;
787
+ };
788
+ relationships?: Record<string, unknown> | undefined;
789
+ links?: Record<string, string> | undefined;
790
+ meta?: Record<string, unknown> | undefined;
791
+ }[];
792
+ links?: Record<string, string> | undefined;
793
+ meta?: Record<string, unknown> | undefined;
794
+ included?: {
795
+ type: string;
796
+ id: string;
797
+ attributes?: Record<string, unknown> | undefined;
798
+ relationships?: Record<string, unknown> | undefined;
799
+ links?: Record<string, string> | undefined;
800
+ meta?: Record<string, unknown> | undefined;
801
+ }[] | undefined;
802
+ }, {
803
+ data: {
804
+ type: string;
805
+ id: string;
806
+ attributes: {
807
+ type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
808
+ createdAt: string;
809
+ updatedAt: string;
810
+ name: string;
811
+ description: string | null;
812
+ farmId: string;
813
+ category: string | null;
814
+ fileUrl: string;
815
+ fileSize: number | null;
816
+ uploadedDate: string;
817
+ uploadedBy: string | null;
818
+ relatedTo: {
819
+ type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
820
+ id: string;
821
+ } | null;
822
+ tags?: string[] | undefined;
823
+ };
824
+ relationships?: Record<string, unknown> | undefined;
825
+ links?: Record<string, string> | undefined;
826
+ meta?: Record<string, unknown> | undefined;
827
+ }[];
828
+ links?: Record<string, string> | undefined;
829
+ meta?: Record<string, unknown> | undefined;
830
+ included?: {
831
+ type: string;
832
+ id: string;
833
+ attributes?: Record<string, unknown> | undefined;
834
+ relationships?: Record<string, unknown> | undefined;
835
+ links?: Record<string, string> | undefined;
836
+ meta?: Record<string, unknown> | undefined;
837
+ }[] | undefined;
838
+ }>;
839
+ export type DocumentType = z.infer<typeof documentTypeSchema>;
840
+ export type RelatedEntityType = z.infer<typeof relatedEntityTypeSchema>;
841
+ export type RelatedEntity = z.infer<typeof relatedEntitySchema>;
842
+ export type DocumentAttributes = z.infer<typeof documentAttributesSchema>;
843
+ export type CreateDocumentAttributes = z.infer<typeof createDocumentAttributesSchema>;
844
+ export type UpdateDocumentAttributes = z.infer<typeof updateDocumentAttributesSchema>;
845
+ export type CreateDocumentInput = z.infer<typeof createDocumentSchema>;
846
+ export type UpdateDocumentInput = z.infer<typeof updateDocumentSchema>;
847
+ export type DocumentResource = z.infer<typeof documentResourceSchema>;
848
+ export type DocumentResponse = z.infer<typeof documentResponseSchema>;
849
+ export type DocumentListResponse = z.infer<typeof documentListResponseSchema>;
850
+ //# sourceMappingURL=documents.schemas.d.ts.map