@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 @@
1
+ {"version":3,"file":"users.routes.d.ts","sourceRoot":"","sources":["../../src/routes/users.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BtB,CAAC"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.usersRouter = void 0;
4
+ const core_1 = require("@ts-rest/core");
5
+ const zod_1 = require("zod");
6
+ const users_schemas_1 = require("../schemas/users.schemas");
7
+ const common_schemas_1 = require("../schemas/common.schemas");
8
+ const c = (0, core_1.initContract)();
9
+ exports.usersRouter = c.router({
10
+ // Get current user profile
11
+ getProfile: {
12
+ method: 'GET',
13
+ path: '/user/profile',
14
+ responses: {
15
+ 200: users_schemas_1.userResponseSchema,
16
+ 401: common_schemas_1.jsonApiErrorResponseSchema,
17
+ },
18
+ summary: 'Get current user profile',
19
+ description: 'Get authenticated user profile information',
20
+ },
21
+ // Update user profile
22
+ updateProfile: {
23
+ method: 'PATCH',
24
+ path: '/user/profile',
25
+ body: zod_1.z.object({ data: users_schemas_1.updateProfileSchema }),
26
+ responses: {
27
+ 200: users_schemas_1.userResponseSchema,
28
+ 400: common_schemas_1.jsonApiErrorResponseSchema,
29
+ 401: common_schemas_1.jsonApiErrorResponseSchema,
30
+ 422: common_schemas_1.jsonApiErrorResponseSchema,
31
+ },
32
+ summary: 'Update user profile',
33
+ description: 'Update authenticated user profile information',
34
+ },
35
+ });
@@ -0,0 +1,500 @@
1
+ import { z } from 'zod';
2
+ export declare const weatherRouter: {
3
+ getWeather: {
4
+ pathParams: z.ZodObject<{
5
+ farmId: z.ZodString;
6
+ }, "strip", z.ZodTypeAny, {
7
+ farmId: string;
8
+ }, {
9
+ farmId: string;
10
+ }>;
11
+ summary: "Get weather data";
12
+ description: "Get current weather, forecast, and alerts for a farm";
13
+ method: "GET";
14
+ path: "/farms/:farmId/weather";
15
+ responses: {
16
+ 200: z.ZodObject<{
17
+ data: z.ZodObject<{
18
+ type: z.ZodLiteral<string>;
19
+ id: z.ZodString;
20
+ attributes: z.ZodObject<{
21
+ farmId: z.ZodString;
22
+ current: z.ZodObject<{
23
+ temp: z.ZodNumber;
24
+ condition: z.ZodString;
25
+ icon: z.ZodOptional<z.ZodString>;
26
+ rainfall: z.ZodOptional<z.ZodNumber>;
27
+ humidity: z.ZodOptional<z.ZodNumber>;
28
+ }, "strip", z.ZodTypeAny, {
29
+ temp: number;
30
+ condition: string;
31
+ icon?: string | undefined;
32
+ rainfall?: number | undefined;
33
+ humidity?: number | undefined;
34
+ }, {
35
+ temp: number;
36
+ condition: string;
37
+ icon?: string | undefined;
38
+ rainfall?: number | undefined;
39
+ humidity?: number | undefined;
40
+ }>;
41
+ forecast: z.ZodArray<z.ZodObject<{
42
+ day: z.ZodString;
43
+ temp: z.ZodNumber;
44
+ rain: z.ZodOptional<z.ZodNumber>;
45
+ rainfall: z.ZodOptional<z.ZodNumber>;
46
+ condition: z.ZodOptional<z.ZodString>;
47
+ }, "strip", z.ZodTypeAny, {
48
+ temp: number;
49
+ day: string;
50
+ condition?: string | undefined;
51
+ rainfall?: number | undefined;
52
+ rain?: number | undefined;
53
+ }, {
54
+ temp: number;
55
+ day: string;
56
+ condition?: string | undefined;
57
+ rainfall?: number | undefined;
58
+ rain?: number | undefined;
59
+ }>, "many">;
60
+ alerts: z.ZodOptional<z.ZodArray<z.ZodObject<{
61
+ id: z.ZodString;
62
+ type: z.ZodEnum<["drought", "heavy-rain", "frost", "optimal", "wind"]>;
63
+ severity: z.ZodEnum<["high", "medium", "low"]>;
64
+ message: z.ZodString;
65
+ fieldId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
66
+ date: z.ZodString;
67
+ recommendation: z.ZodOptional<z.ZodString>;
68
+ }, "strip", z.ZodTypeAny, {
69
+ type: "drought" | "heavy-rain" | "frost" | "optimal" | "wind";
70
+ message: string;
71
+ date: string;
72
+ id: string;
73
+ severity: "high" | "medium" | "low";
74
+ fieldId?: string | null | undefined;
75
+ recommendation?: string | undefined;
76
+ }, {
77
+ type: "drought" | "heavy-rain" | "frost" | "optimal" | "wind";
78
+ message: string;
79
+ date: string;
80
+ id: string;
81
+ severity: "high" | "medium" | "low";
82
+ fieldId?: string | null | undefined;
83
+ recommendation?: string | undefined;
84
+ }>, "many">>;
85
+ }, "strip", z.ZodTypeAny, {
86
+ farmId: string;
87
+ current: {
88
+ temp: number;
89
+ condition: string;
90
+ icon?: string | undefined;
91
+ rainfall?: number | undefined;
92
+ humidity?: number | undefined;
93
+ };
94
+ forecast: {
95
+ temp: number;
96
+ day: string;
97
+ condition?: string | undefined;
98
+ rainfall?: number | undefined;
99
+ rain?: number | undefined;
100
+ }[];
101
+ alerts?: {
102
+ type: "drought" | "heavy-rain" | "frost" | "optimal" | "wind";
103
+ message: string;
104
+ date: string;
105
+ id: string;
106
+ severity: "high" | "medium" | "low";
107
+ fieldId?: string | null | undefined;
108
+ recommendation?: string | undefined;
109
+ }[] | undefined;
110
+ }, {
111
+ farmId: string;
112
+ current: {
113
+ temp: number;
114
+ condition: string;
115
+ icon?: string | undefined;
116
+ rainfall?: number | undefined;
117
+ humidity?: number | undefined;
118
+ };
119
+ forecast: {
120
+ temp: number;
121
+ day: string;
122
+ condition?: string | undefined;
123
+ rainfall?: number | undefined;
124
+ rain?: number | undefined;
125
+ }[];
126
+ alerts?: {
127
+ type: "drought" | "heavy-rain" | "frost" | "optimal" | "wind";
128
+ message: string;
129
+ date: string;
130
+ id: string;
131
+ severity: "high" | "medium" | "low";
132
+ fieldId?: string | null | undefined;
133
+ recommendation?: string | undefined;
134
+ }[] | undefined;
135
+ }>;
136
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
137
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
138
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
139
+ }, "strip", z.ZodTypeAny, {
140
+ type: string;
141
+ id: string;
142
+ attributes: {
143
+ farmId: string;
144
+ current: {
145
+ temp: number;
146
+ condition: string;
147
+ icon?: string | undefined;
148
+ rainfall?: number | undefined;
149
+ humidity?: number | undefined;
150
+ };
151
+ forecast: {
152
+ temp: number;
153
+ day: string;
154
+ condition?: string | undefined;
155
+ rainfall?: number | undefined;
156
+ rain?: number | undefined;
157
+ }[];
158
+ alerts?: {
159
+ type: "drought" | "heavy-rain" | "frost" | "optimal" | "wind";
160
+ message: string;
161
+ date: string;
162
+ id: string;
163
+ severity: "high" | "medium" | "low";
164
+ fieldId?: string | null | undefined;
165
+ recommendation?: string | undefined;
166
+ }[] | undefined;
167
+ };
168
+ relationships?: Record<string, unknown> | undefined;
169
+ links?: Record<string, string> | undefined;
170
+ meta?: Record<string, unknown> | undefined;
171
+ }, {
172
+ type: string;
173
+ id: string;
174
+ attributes: {
175
+ farmId: string;
176
+ current: {
177
+ temp: number;
178
+ condition: string;
179
+ icon?: string | undefined;
180
+ rainfall?: number | undefined;
181
+ humidity?: number | undefined;
182
+ };
183
+ forecast: {
184
+ temp: number;
185
+ day: string;
186
+ condition?: string | undefined;
187
+ rainfall?: number | undefined;
188
+ rain?: number | undefined;
189
+ }[];
190
+ alerts?: {
191
+ type: "drought" | "heavy-rain" | "frost" | "optimal" | "wind";
192
+ message: string;
193
+ date: string;
194
+ id: string;
195
+ severity: "high" | "medium" | "low";
196
+ fieldId?: string | null | undefined;
197
+ recommendation?: string | undefined;
198
+ }[] | undefined;
199
+ };
200
+ relationships?: Record<string, unknown> | undefined;
201
+ links?: Record<string, string> | undefined;
202
+ meta?: Record<string, unknown> | undefined;
203
+ }>;
204
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
205
+ type: z.ZodString;
206
+ id: z.ZodString;
207
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
208
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
209
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
210
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
211
+ }, "strip", z.ZodTypeAny, {
212
+ type: string;
213
+ id: string;
214
+ attributes?: Record<string, unknown> | undefined;
215
+ relationships?: Record<string, unknown> | undefined;
216
+ links?: Record<string, string> | undefined;
217
+ meta?: Record<string, unknown> | undefined;
218
+ }, {
219
+ type: string;
220
+ id: string;
221
+ attributes?: Record<string, unknown> | undefined;
222
+ relationships?: Record<string, unknown> | undefined;
223
+ links?: Record<string, string> | undefined;
224
+ meta?: Record<string, unknown> | undefined;
225
+ }>, "many">>;
226
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
227
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
228
+ }, "strip", z.ZodTypeAny, {
229
+ data: {
230
+ type: string;
231
+ id: string;
232
+ attributes: {
233
+ farmId: string;
234
+ current: {
235
+ temp: number;
236
+ condition: string;
237
+ icon?: string | undefined;
238
+ rainfall?: number | undefined;
239
+ humidity?: number | undefined;
240
+ };
241
+ forecast: {
242
+ temp: number;
243
+ day: string;
244
+ condition?: string | undefined;
245
+ rainfall?: number | undefined;
246
+ rain?: number | undefined;
247
+ }[];
248
+ alerts?: {
249
+ type: "drought" | "heavy-rain" | "frost" | "optimal" | "wind";
250
+ message: string;
251
+ date: string;
252
+ id: string;
253
+ severity: "high" | "medium" | "low";
254
+ fieldId?: string | null | undefined;
255
+ recommendation?: string | undefined;
256
+ }[] | undefined;
257
+ };
258
+ relationships?: Record<string, unknown> | undefined;
259
+ links?: Record<string, string> | undefined;
260
+ meta?: Record<string, unknown> | undefined;
261
+ };
262
+ links?: Record<string, string> | undefined;
263
+ meta?: Record<string, unknown> | undefined;
264
+ included?: {
265
+ type: string;
266
+ id: string;
267
+ attributes?: Record<string, unknown> | undefined;
268
+ relationships?: Record<string, unknown> | undefined;
269
+ links?: Record<string, string> | undefined;
270
+ meta?: Record<string, unknown> | undefined;
271
+ }[] | undefined;
272
+ }, {
273
+ data: {
274
+ type: string;
275
+ id: string;
276
+ attributes: {
277
+ farmId: string;
278
+ current: {
279
+ temp: number;
280
+ condition: string;
281
+ icon?: string | undefined;
282
+ rainfall?: number | undefined;
283
+ humidity?: number | undefined;
284
+ };
285
+ forecast: {
286
+ temp: number;
287
+ day: string;
288
+ condition?: string | undefined;
289
+ rainfall?: number | undefined;
290
+ rain?: number | undefined;
291
+ }[];
292
+ alerts?: {
293
+ type: "drought" | "heavy-rain" | "frost" | "optimal" | "wind";
294
+ message: string;
295
+ date: string;
296
+ id: string;
297
+ severity: "high" | "medium" | "low";
298
+ fieldId?: string | null | undefined;
299
+ recommendation?: string | undefined;
300
+ }[] | undefined;
301
+ };
302
+ relationships?: Record<string, unknown> | undefined;
303
+ links?: Record<string, string> | undefined;
304
+ meta?: Record<string, unknown> | undefined;
305
+ };
306
+ links?: Record<string, string> | undefined;
307
+ meta?: Record<string, unknown> | undefined;
308
+ included?: {
309
+ type: string;
310
+ id: string;
311
+ attributes?: Record<string, unknown> | undefined;
312
+ relationships?: Record<string, unknown> | undefined;
313
+ links?: Record<string, string> | undefined;
314
+ meta?: Record<string, unknown> | undefined;
315
+ }[] | undefined;
316
+ }>;
317
+ 404: z.ZodObject<{
318
+ errors: z.ZodArray<z.ZodObject<{
319
+ id: z.ZodOptional<z.ZodString>;
320
+ links: z.ZodOptional<z.ZodObject<{
321
+ about: z.ZodOptional<z.ZodString>;
322
+ }, "strip", z.ZodTypeAny, {
323
+ about?: string | undefined;
324
+ }, {
325
+ about?: string | undefined;
326
+ }>>;
327
+ status: z.ZodOptional<z.ZodString>;
328
+ code: z.ZodOptional<z.ZodString>;
329
+ title: z.ZodOptional<z.ZodString>;
330
+ detail: z.ZodOptional<z.ZodString>;
331
+ source: z.ZodOptional<z.ZodObject<{
332
+ pointer: z.ZodOptional<z.ZodString>;
333
+ parameter: z.ZodOptional<z.ZodString>;
334
+ }, "strip", z.ZodTypeAny, {
335
+ pointer?: string | undefined;
336
+ parameter?: string | undefined;
337
+ }, {
338
+ pointer?: string | undefined;
339
+ parameter?: string | undefined;
340
+ }>>;
341
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
342
+ }, "strip", z.ZodTypeAny, {
343
+ status?: string | undefined;
344
+ code?: string | undefined;
345
+ id?: string | undefined;
346
+ links?: {
347
+ about?: string | undefined;
348
+ } | undefined;
349
+ meta?: Record<string, unknown> | undefined;
350
+ title?: string | undefined;
351
+ detail?: string | undefined;
352
+ source?: {
353
+ pointer?: string | undefined;
354
+ parameter?: string | undefined;
355
+ } | undefined;
356
+ }, {
357
+ status?: string | undefined;
358
+ code?: string | undefined;
359
+ id?: string | undefined;
360
+ links?: {
361
+ about?: string | undefined;
362
+ } | undefined;
363
+ meta?: Record<string, unknown> | undefined;
364
+ title?: string | undefined;
365
+ detail?: string | undefined;
366
+ source?: {
367
+ pointer?: string | undefined;
368
+ parameter?: string | undefined;
369
+ } | undefined;
370
+ }>, "many">;
371
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
372
+ }, "strip", z.ZodTypeAny, {
373
+ errors: {
374
+ status?: string | undefined;
375
+ code?: string | undefined;
376
+ id?: string | undefined;
377
+ links?: {
378
+ about?: string | undefined;
379
+ } | undefined;
380
+ meta?: Record<string, unknown> | undefined;
381
+ title?: string | undefined;
382
+ detail?: string | undefined;
383
+ source?: {
384
+ pointer?: string | undefined;
385
+ parameter?: string | undefined;
386
+ } | undefined;
387
+ }[];
388
+ meta?: Record<string, unknown> | undefined;
389
+ }, {
390
+ errors: {
391
+ status?: string | undefined;
392
+ code?: string | undefined;
393
+ id?: string | undefined;
394
+ links?: {
395
+ about?: string | undefined;
396
+ } | undefined;
397
+ meta?: Record<string, unknown> | undefined;
398
+ title?: string | undefined;
399
+ detail?: string | undefined;
400
+ source?: {
401
+ pointer?: string | undefined;
402
+ parameter?: string | undefined;
403
+ } | undefined;
404
+ }[];
405
+ meta?: Record<string, unknown> | undefined;
406
+ }>;
407
+ 401: z.ZodObject<{
408
+ errors: z.ZodArray<z.ZodObject<{
409
+ id: z.ZodOptional<z.ZodString>;
410
+ links: z.ZodOptional<z.ZodObject<{
411
+ about: z.ZodOptional<z.ZodString>;
412
+ }, "strip", z.ZodTypeAny, {
413
+ about?: string | undefined;
414
+ }, {
415
+ about?: string | undefined;
416
+ }>>;
417
+ status: z.ZodOptional<z.ZodString>;
418
+ code: z.ZodOptional<z.ZodString>;
419
+ title: z.ZodOptional<z.ZodString>;
420
+ detail: z.ZodOptional<z.ZodString>;
421
+ source: z.ZodOptional<z.ZodObject<{
422
+ pointer: z.ZodOptional<z.ZodString>;
423
+ parameter: z.ZodOptional<z.ZodString>;
424
+ }, "strip", z.ZodTypeAny, {
425
+ pointer?: string | undefined;
426
+ parameter?: string | undefined;
427
+ }, {
428
+ pointer?: string | undefined;
429
+ parameter?: string | undefined;
430
+ }>>;
431
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
432
+ }, "strip", z.ZodTypeAny, {
433
+ status?: string | undefined;
434
+ code?: string | undefined;
435
+ id?: string | undefined;
436
+ links?: {
437
+ about?: string | undefined;
438
+ } | undefined;
439
+ meta?: Record<string, unknown> | undefined;
440
+ title?: string | undefined;
441
+ detail?: string | undefined;
442
+ source?: {
443
+ pointer?: string | undefined;
444
+ parameter?: string | undefined;
445
+ } | undefined;
446
+ }, {
447
+ status?: string | undefined;
448
+ code?: string | undefined;
449
+ id?: string | undefined;
450
+ links?: {
451
+ about?: string | undefined;
452
+ } | undefined;
453
+ meta?: Record<string, unknown> | undefined;
454
+ title?: string | undefined;
455
+ detail?: string | undefined;
456
+ source?: {
457
+ pointer?: string | undefined;
458
+ parameter?: string | undefined;
459
+ } | undefined;
460
+ }>, "many">;
461
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
462
+ }, "strip", z.ZodTypeAny, {
463
+ errors: {
464
+ status?: string | undefined;
465
+ code?: string | undefined;
466
+ id?: string | undefined;
467
+ links?: {
468
+ about?: string | undefined;
469
+ } | undefined;
470
+ meta?: Record<string, unknown> | undefined;
471
+ title?: string | undefined;
472
+ detail?: string | undefined;
473
+ source?: {
474
+ pointer?: string | undefined;
475
+ parameter?: string | undefined;
476
+ } | undefined;
477
+ }[];
478
+ meta?: Record<string, unknown> | undefined;
479
+ }, {
480
+ errors: {
481
+ status?: string | undefined;
482
+ code?: string | undefined;
483
+ id?: string | undefined;
484
+ links?: {
485
+ about?: string | undefined;
486
+ } | undefined;
487
+ meta?: Record<string, unknown> | undefined;
488
+ title?: string | undefined;
489
+ detail?: string | undefined;
490
+ source?: {
491
+ pointer?: string | undefined;
492
+ parameter?: string | undefined;
493
+ } | undefined;
494
+ }[];
495
+ meta?: Record<string, unknown> | undefined;
496
+ }>;
497
+ };
498
+ };
499
+ };
500
+ //# sourceMappingURL=weather.routes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"weather.routes.d.ts","sourceRoot":"","sources":["../../src/routes/weather.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAcxB,CAAC"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.weatherRouter = void 0;
4
+ const core_1 = require("@ts-rest/core");
5
+ const zod_1 = require("zod");
6
+ const weather_schemas_1 = require("../schemas/weather.schemas");
7
+ const common_schemas_1 = require("../schemas/common.schemas");
8
+ const c = (0, core_1.initContract)();
9
+ exports.weatherRouter = c.router({
10
+ // Get weather for a farm
11
+ getWeather: {
12
+ method: 'GET',
13
+ path: '/farms/:farmId/weather',
14
+ pathParams: zod_1.z.object({ farmId: zod_1.z.string().uuid() }),
15
+ responses: {
16
+ 200: weather_schemas_1.weatherResponseSchema,
17
+ 404: common_schemas_1.jsonApiErrorResponseSchema,
18
+ 401: common_schemas_1.jsonApiErrorResponseSchema,
19
+ },
20
+ summary: 'Get weather data',
21
+ description: 'Get current weather, forecast, and alerts for a farm',
22
+ },
23
+ });