@deepintel-ltd/farmpro-contracts 1.0.1 → 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":"soil-tests.routes.d.ts","sourceRoot":"","sources":["../../src/routes/soil-tests.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmBxB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;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= require("@ts-rest/core");
5
+ const zod_1 = require("zod");
6
+ const soil_tests_schemas_1 = require("../schemas/soil-tests.schemas");
7
+ const common_schemas_1 = require("../schemas/common.schemas");
8
+ const c = (0, core_1.initContract)();
9
+ exports.soilTestsRouter = c.router({
10
+ // List soil tests for a farm
11
+ listSoilTests: {
12
+ method: 'GET',
13
+ path: '/farms/:farmId/soil-tests',
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
+ .merge(common_schemas_1.jsonApiFilterQuerySchema)
19
+ .merge(zod_1.z.object({
20
+ 'filter[fieldId]': zod_1.z.string().uuid().optional(),
21
+ })),
22
+ responses: {
23
+ 200: soil_tests_schemas_1.soilTestListResponseSchema,
24
+ 404: common_schemas_1.jsonApiErrorResponseSchema,
25
+ 401: common_schemas_1.jsonApiErrorResponseSchema,
26
+ },
27
+ summary: 'List soil tests',
28
+ description: 'Get all soil tests for a farm',
29
+ },
30
+ // Create soil test
31
+ createSoilTest: {
32
+ method: 'POST',
33
+ path: '/farms/:farmId/soil-tests',
34
+ pathParams: zod_1.z.object({ farmId: zod_1.z.string().uuid() }),
35
+ body: zod_1.z.object({ data: soil_tests_schemas_1.createSoilTestSchema }),
36
+ responses: {
37
+ 201: soil_tests_schemas_1.soilTestResponseSchema,
38
+ 400: common_schemas_1.jsonApiErrorResponseSchema,
39
+ 404: common_schemas_1.jsonApiErrorResponseSchema,
40
+ 401: common_schemas_1.jsonApiErrorResponseSchema,
41
+ 422: common_schemas_1.jsonApiErrorResponseSchema,
42
+ },
43
+ summary: 'Create soil test',
44
+ description: 'Record a new soil test with automatic fertilizer recommendations',
45
+ },
46
+ // Get soil test by ID
47
+ getSoilTest: {
48
+ method: 'GET',
49
+ path: '/farms/:farmId/soil-tests/:id',
50
+ pathParams: zod_1.z.object({
51
+ farmId: zod_1.z.string().uuid(),
52
+ id: zod_1.z.string().uuid(),
53
+ }),
54
+ query: common_schemas_1.jsonApiIncludeQuerySchema,
55
+ responses: {
56
+ 200: soil_tests_schemas_1.soilTestDetailResponseSchema,
57
+ 404: common_schemas_1.jsonApiErrorResponseSchema,
58
+ 401: common_schemas_1.jsonApiErrorResponseSchema,
59
+ },
60
+ summary: 'Get soil test by ID',
61
+ description: 'Get detailed soil test information with recommendations',
62
+ },
63
+ // Update soil test
64
+ updateSoilTest: {
65
+ method: 'PATCH',
66
+ path: '/farms/:farmId/soil-tests/:id',
67
+ pathParams: zod_1.z.object({
68
+ farmId: zod_1.z.string().uuid(),
69
+ id: zod_1.z.string().uuid(),
70
+ }),
71
+ body: zod_1.z.object({ data: soil_tests_schemas_1.updateSoilTestSchema }),
72
+ responses: {
73
+ 200: soil_tests_schemas_1.soilTestResponseSchema,
74
+ 400: common_schemas_1.jsonApiErrorResponseSchema,
75
+ 404: common_schemas_1.jsonApiErrorResponseSchema,
76
+ 401: common_schemas_1.jsonApiErrorResponseSchema,
77
+ 422: common_schemas_1.jsonApiErrorResponseSchema,
78
+ },
79
+ summary: 'Update soil test',
80
+ description: 'Update soil test information',
81
+ },
82
+ // Delete soil test
83
+ deleteSoilTest: {
84
+ method: 'DELETE',
85
+ path: '/farms/:farmId/soil-tests/:id',
86
+ pathParams: zod_1.z.object({
87
+ farmId: zod_1.z.string().uuid(),
88
+ id: zod_1.z.string().uuid(),
89
+ }),
90
+ responses: {
91
+ 204: common_schemas_1.jsonApiSuccessResponseSchema,
92
+ 404: common_schemas_1.jsonApiErrorResponseSchema,
93
+ 401: common_schemas_1.jsonApiErrorResponseSchema,
94
+ },
95
+ summary: 'Delete soil test',
96
+ description: 'Delete a soil test record',
97
+ },
98
+ });