@deepintel-ltd/farmpro-contracts 1.7.6 → 1.7.9

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 (43) hide show
  1. package/dist/index.d.ts +11 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +10 -0
  4. package/dist/routes/crop-profile.routes.d.ts +556 -0
  5. package/dist/routes/crop-profile.routes.d.ts.map +1 -0
  6. package/dist/routes/crop-profile.routes.js +55 -0
  7. package/dist/routes/geofences.routes.d.ts +1913 -0
  8. package/dist/routes/geofences.routes.d.ts.map +1 -0
  9. package/dist/routes/geofences.routes.js +105 -0
  10. package/dist/routes/index.d.ts +15 -0
  11. package/dist/routes/index.d.ts.map +1 -1
  12. package/dist/routes/index.js +10 -0
  13. package/dist/routes/livestock-map.routes.d.ts +1319 -0
  14. package/dist/routes/livestock-map.routes.d.ts.map +1 -0
  15. package/dist/routes/livestock-map.routes.js +83 -0
  16. package/dist/routes/measurements.routes.d.ts +1081 -0
  17. package/dist/routes/measurements.routes.d.ts.map +1 -0
  18. package/dist/routes/measurements.routes.js +69 -0
  19. package/dist/routes/monitoring-visualization.routes.d.ts +1637 -0
  20. package/dist/routes/monitoring-visualization.routes.d.ts.map +1 -1
  21. package/dist/routes/monitoring-visualization.routes.js +153 -0
  22. package/dist/routes/prescription-maps.routes.d.ts +3092 -0
  23. package/dist/routes/prescription-maps.routes.d.ts.map +1 -0
  24. package/dist/routes/prescription-maps.routes.js +143 -0
  25. package/dist/schemas/crop-profile.schemas.d.ts +724 -0
  26. package/dist/schemas/crop-profile.schemas.d.ts.map +1 -0
  27. package/dist/schemas/crop-profile.schemas.js +84 -0
  28. package/dist/schemas/geofences.schemas.d.ts +358 -0
  29. package/dist/schemas/geofences.schemas.d.ts.map +1 -0
  30. package/dist/schemas/geofences.schemas.js +44 -0
  31. package/dist/schemas/livestock-map.schemas.d.ts +328 -0
  32. package/dist/schemas/livestock-map.schemas.d.ts.map +1 -0
  33. package/dist/schemas/livestock-map.schemas.js +52 -0
  34. package/dist/schemas/measurements.schemas.d.ts +234 -0
  35. package/dist/schemas/measurements.schemas.d.ts.map +1 -0
  36. package/dist/schemas/measurements.schemas.js +57 -0
  37. package/dist/schemas/monitoring-visualization.schemas.d.ts +1703 -0
  38. package/dist/schemas/monitoring-visualization.schemas.d.ts.map +1 -1
  39. package/dist/schemas/monitoring-visualization.schemas.js +338 -0
  40. package/dist/schemas/prescription-maps.schemas.d.ts +974 -0
  41. package/dist/schemas/prescription-maps.schemas.d.ts.map +1 -0
  42. package/dist/schemas/prescription-maps.schemas.js +132 -0
  43. package/package.json +1 -1
@@ -0,0 +1,55 @@
1
+ import { initContract } from '@ts-rest/core';
2
+ import { z } from 'zod';
3
+ import { cropProfileListResponseSchema, cropProfileResponseSchema, fieldCropProfileResponseSchema, cropProfileErrorSchema, } from '../schemas/crop-profile.schemas';
4
+ const c = initContract();
5
+ export const cropProfilesRouter = c.router({
6
+ /**
7
+ * List all available crop profiles
8
+ * Returns all crop NDVI profiles with growth stages
9
+ */
10
+ list: {
11
+ method: 'GET',
12
+ path: '/crop-profiles',
13
+ responses: {
14
+ 200: cropProfileListResponseSchema,
15
+ },
16
+ summary: 'List all available crop NDVI profiles',
17
+ },
18
+ /**
19
+ * Get a specific crop profile by crop type
20
+ * Returns detailed crop profile with growth stages and NDVI thresholds
21
+ */
22
+ getByCropType: {
23
+ method: 'GET',
24
+ path: '/crop-profiles/:cropType',
25
+ pathParams: z.object({
26
+ cropType: z.string(),
27
+ }),
28
+ query: z.object({
29
+ variety: z.string().optional(),
30
+ region: z.string().optional(),
31
+ }),
32
+ responses: {
33
+ 200: cropProfileResponseSchema,
34
+ 404: cropProfileErrorSchema,
35
+ },
36
+ summary: 'Get crop profile by crop type',
37
+ },
38
+ /**
39
+ * Get crop profile for a specific field's current crop
40
+ * Returns the profile with current stage assessment based on planting date
41
+ */
42
+ getFieldCropProfile: {
43
+ method: 'GET',
44
+ path: '/farms/:farmId/fields/:fieldId/crop-profile',
45
+ pathParams: z.object({
46
+ farmId: z.string().uuid(),
47
+ fieldId: z.string().uuid(),
48
+ }),
49
+ responses: {
50
+ 200: fieldCropProfileResponseSchema,
51
+ 404: cropProfileErrorSchema,
52
+ },
53
+ summary: 'Get crop profile for field\'s current crop with stage assessment',
54
+ },
55
+ });