@deepintel-ltd/farmpro-contracts 1.4.0 → 1.4.2

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.
@@ -460,8 +460,12 @@ export declare const documentsRouter: {
460
460
  description: "Upload a file and get back the file URL in JSON:API format";
461
461
  method: "POST";
462
462
  contentType: "multipart/form-data";
463
- body: import("@ts-rest/core").ContractPlainType<{
464
- file: File;
463
+ body: z.ZodObject<{
464
+ file: z.ZodType<import("buffer").File, z.ZodTypeDef, import("buffer").File>;
465
+ }, "strip", z.ZodTypeAny, {
466
+ file: import("buffer").File;
467
+ }, {
468
+ file: import("buffer").File;
465
469
  }>;
466
470
  path: "/farms/:farmId/documents/upload";
467
471
  responses: {
@@ -880,8 +884,12 @@ export declare const documentsRouter: {
880
884
  description: "Upload a file to an existing document record and update it with the file URL";
881
885
  method: "POST";
882
886
  contentType: "multipart/form-data";
883
- body: import("@ts-rest/core").ContractPlainType<{
884
- file: File;
887
+ body: z.ZodObject<{
888
+ file: z.ZodType<import("buffer").File, z.ZodTypeDef, import("buffer").File>;
889
+ }, "strip", z.ZodTypeAny, {
890
+ file: import("buffer").File;
891
+ }, {
892
+ file: import("buffer").File;
885
893
  }>;
886
894
  path: "/farms/:farmId/documents/:id/upload";
887
895
  responses: {
@@ -1 +1 @@
1
- {"version":3,"file":"documents.routes.d.ts","sourceRoot":"","sources":["../../src/routes/documents.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqBxB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoI1B,CAAC"}
@@ -35,7 +35,7 @@ exports.documentsRouter = c.router({
35
35
  path: '/farms/:farmId/documents/upload',
36
36
  contentType: 'multipart/form-data',
37
37
  pathParams: zod_1.z.object({ farmId: zod_1.z.string().uuid() }),
38
- body: c.type(),
38
+ body: documents_schemas_1.uploadFileBodySchema,
39
39
  responses: {
40
40
  200: documents_schemas_1.uploadedFileResponseSchema,
41
41
  400: common_schemas_1.jsonApiErrorResponseSchema,
@@ -54,7 +54,7 @@ exports.documentsRouter = c.router({
54
54
  farmId: zod_1.z.string().uuid(),
55
55
  id: zod_1.z.string().uuid(),
56
56
  }),
57
- body: c.type(),
57
+ body: documents_schemas_1.uploadFileBodySchema,
58
58
  responses: {
59
59
  200: documents_schemas_1.documentResponseSchema,
60
60
  400: common_schemas_1.jsonApiErrorResponseSchema,
@@ -4,26 +4,51 @@ export declare const fieldObservationsRouter: {
4
4
  summary: "Upload farm observation photo for AI analysis";
5
5
  method: "POST";
6
6
  contentType: "multipart/form-data";
7
- body: import("@ts-rest/core").ContractPlainType<{
8
- photo: File;
7
+ body: z.ZodObject<{
8
+ fieldId: z.ZodOptional<z.ZodString>;
9
+ observationType: z.ZodEnum<["disease", "pest", "nutrient", "weed", "general", "health_check"]>;
10
+ userNotes: z.ZodOptional<z.ZodString>;
11
+ cropStageAtTime: z.ZodOptional<z.ZodEnum<["planted", "germination", "vegetative", "flowering", "fruiting", "mature", "harvested"]>>;
12
+ location: z.ZodOptional<z.ZodObject<{
13
+ lat: z.ZodNumber;
14
+ lng: z.ZodNumber;
15
+ accuracy: z.ZodOptional<z.ZodNumber>;
16
+ }, "strip", z.ZodTypeAny, {
17
+ lat: number;
18
+ lng: number;
19
+ accuracy?: number | undefined;
20
+ }, {
21
+ lat: number;
22
+ lng: number;
23
+ accuracy?: number | undefined;
24
+ }>>;
25
+ capturedAt: z.ZodOptional<z.ZodString>;
9
26
  } & {
10
- type: string;
11
- id: string;
12
- attributes: {
13
- observationType: "general" | "disease" | "pest" | "nutrient" | "weed" | "health_check";
14
- location?: {
15
- lat: number;
16
- lng: number;
17
- accuracy?: number | undefined;
18
- } | undefined;
19
- fieldId?: string | undefined;
20
- capturedAt?: string | undefined;
21
- userNotes?: string | undefined;
22
- cropStageAtTime?: "planted" | "flowering" | "mature" | "harvested" | "germination" | "vegetative" | "fruiting" | undefined;
23
- };
24
- relationships?: Record<string, unknown> | undefined;
25
- links?: Record<string, string> | undefined;
26
- meta?: Record<string, unknown> | undefined;
27
+ photo: z.ZodType<import("buffer").File, z.ZodTypeDef, import("buffer").File>;
28
+ }, "strip", z.ZodTypeAny, {
29
+ observationType: "general" | "disease" | "pest" | "nutrient" | "weed" | "health_check";
30
+ photo: import("buffer").File;
31
+ location?: {
32
+ lat: number;
33
+ lng: number;
34
+ accuracy?: number | undefined;
35
+ } | undefined;
36
+ fieldId?: string | undefined;
37
+ capturedAt?: string | undefined;
38
+ userNotes?: string | undefined;
39
+ cropStageAtTime?: "planted" | "flowering" | "mature" | "harvested" | "germination" | "vegetative" | "fruiting" | undefined;
40
+ }, {
41
+ observationType: "general" | "disease" | "pest" | "nutrient" | "weed" | "health_check";
42
+ photo: import("buffer").File;
43
+ location?: {
44
+ lat: number;
45
+ lng: number;
46
+ accuracy?: number | undefined;
47
+ } | undefined;
48
+ fieldId?: string | undefined;
49
+ capturedAt?: string | undefined;
50
+ userNotes?: string | undefined;
51
+ cropStageAtTime?: "planted" | "flowering" | "mature" | "harvested" | "germination" | "vegetative" | "fruiting" | undefined;
27
52
  }>;
28
53
  path: "/farms/:farmId/observations";
29
54
  responses: {
@@ -66,26 +91,51 @@ export declare const fieldObservationsRouter: {
66
91
  summary: "Upload field observation photo for AI analysis";
67
92
  method: "POST";
68
93
  contentType: "multipart/form-data";
69
- body: import("@ts-rest/core").ContractPlainType<{
70
- photo: File;
94
+ body: z.ZodObject<{
95
+ fieldId: z.ZodOptional<z.ZodString>;
96
+ observationType: z.ZodEnum<["disease", "pest", "nutrient", "weed", "general", "health_check"]>;
97
+ userNotes: z.ZodOptional<z.ZodString>;
98
+ cropStageAtTime: z.ZodOptional<z.ZodEnum<["planted", "germination", "vegetative", "flowering", "fruiting", "mature", "harvested"]>>;
99
+ location: z.ZodOptional<z.ZodObject<{
100
+ lat: z.ZodNumber;
101
+ lng: z.ZodNumber;
102
+ accuracy: z.ZodOptional<z.ZodNumber>;
103
+ }, "strip", z.ZodTypeAny, {
104
+ lat: number;
105
+ lng: number;
106
+ accuracy?: number | undefined;
107
+ }, {
108
+ lat: number;
109
+ lng: number;
110
+ accuracy?: number | undefined;
111
+ }>>;
112
+ capturedAt: z.ZodOptional<z.ZodString>;
71
113
  } & {
72
- type: string;
73
- id: string;
74
- attributes: {
75
- observationType: "general" | "disease" | "pest" | "nutrient" | "weed" | "health_check";
76
- location?: {
77
- lat: number;
78
- lng: number;
79
- accuracy?: number | undefined;
80
- } | undefined;
81
- fieldId?: string | undefined;
82
- capturedAt?: string | undefined;
83
- userNotes?: string | undefined;
84
- cropStageAtTime?: "planted" | "flowering" | "mature" | "harvested" | "germination" | "vegetative" | "fruiting" | undefined;
85
- };
86
- relationships?: Record<string, unknown> | undefined;
87
- links?: Record<string, string> | undefined;
88
- meta?: Record<string, unknown> | undefined;
114
+ photo: z.ZodType<import("buffer").File, z.ZodTypeDef, import("buffer").File>;
115
+ }, "strip", z.ZodTypeAny, {
116
+ observationType: "general" | "disease" | "pest" | "nutrient" | "weed" | "health_check";
117
+ photo: import("buffer").File;
118
+ location?: {
119
+ lat: number;
120
+ lng: number;
121
+ accuracy?: number | undefined;
122
+ } | undefined;
123
+ fieldId?: string | undefined;
124
+ capturedAt?: string | undefined;
125
+ userNotes?: string | undefined;
126
+ cropStageAtTime?: "planted" | "flowering" | "mature" | "harvested" | "germination" | "vegetative" | "fruiting" | undefined;
127
+ }, {
128
+ observationType: "general" | "disease" | "pest" | "nutrient" | "weed" | "health_check";
129
+ photo: import("buffer").File;
130
+ location?: {
131
+ lat: number;
132
+ lng: number;
133
+ accuracy?: number | undefined;
134
+ } | undefined;
135
+ fieldId?: string | undefined;
136
+ capturedAt?: string | undefined;
137
+ userNotes?: string | undefined;
138
+ cropStageAtTime?: "planted" | "flowering" | "mature" | "harvested" | "germination" | "vegetative" | "fruiting" | undefined;
89
139
  }>;
90
140
  path: "/fields/:fieldId/observations";
91
141
  responses: {
@@ -3515,10 +3565,9 @@ export declare const fieldObservationsRouter: {
3515
3565
  deleteObservation: {
3516
3566
  summary: "Delete observation and associated photo";
3517
3567
  method: "DELETE";
3518
- body: typeof import("@ts-rest/core").ContractNoBody;
3519
3568
  path: "/observations/:id";
3520
3569
  responses: {
3521
- 204: typeof import("@ts-rest/core").ContractNoBody;
3570
+ 204: z.ZodVoid;
3522
3571
  404: z.ZodObject<{
3523
3572
  message: z.ZodString;
3524
3573
  code: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"field-observations.routes.d.ts","sourceRoot":"","sources":["../../src/routes/field-observations.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,uBAAuB;;;;;;mBAMV,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAkBJ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoHlC,CAAC"}
@@ -11,7 +11,7 @@ exports.fieldObservationsRouter = c.router({
11
11
  method: 'POST',
12
12
  path: '/farms/:farmId/observations',
13
13
  contentType: 'multipart/form-data',
14
- body: c.type(),
14
+ body: field_observations_schemas_1.uploadObservationBodySchema,
15
15
  responses: {
16
16
  202: zod_1.z.object({
17
17
  message: zod_1.z.string(),
@@ -28,7 +28,7 @@ exports.fieldObservationsRouter = c.router({
28
28
  method: 'POST',
29
29
  path: '/fields/:fieldId/observations',
30
30
  contentType: 'multipart/form-data',
31
- body: c.type(),
31
+ body: field_observations_schemas_1.uploadObservationBodySchema,
32
32
  responses: {
33
33
  202: zod_1.z.object({
34
34
  message: zod_1.z.string(),
@@ -86,9 +86,8 @@ exports.fieldObservationsRouter = c.router({
86
86
  deleteObservation: {
87
87
  method: 'DELETE',
88
88
  path: '/observations/:id',
89
- body: c.noBody(),
90
89
  responses: {
91
- 204: c.noBody(),
90
+ 204: zod_1.z.void(),
92
91
  404: zod_1.z.object({ message: zod_1.z.string(), code: zod_1.z.string() }),
93
92
  },
94
93
  summary: 'Delete observation and associated photo',
@@ -1051,6 +1051,13 @@ export declare const uploadedFileResponseSchema: z.ZodObject<{
1051
1051
  meta?: Record<string, unknown> | undefined;
1052
1052
  }[] | undefined;
1053
1053
  }>;
1054
+ export declare const uploadFileBodySchema: z.ZodObject<{
1055
+ file: z.ZodType<import("buffer").File, z.ZodTypeDef, import("buffer").File>;
1056
+ }, "strip", z.ZodTypeAny, {
1057
+ file: import("buffer").File;
1058
+ }, {
1059
+ file: import("buffer").File;
1060
+ }>;
1054
1061
  export type DocumentType = z.infer<typeof documentTypeSchema>;
1055
1062
  export type RelatedEntityType = z.infer<typeof relatedEntityTypeSchema>;
1056
1063
  export type RelatedEntity = z.infer<typeof relatedEntitySchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"documents.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/documents.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;GAEG;AAGH,eAAO,MAAM,kBAAkB,qGAQ7B,CAAC;AAGH,eAAO,MAAM,uBAAuB,2EAAyE,CAAC;AAG9G,eAAO,MAAM,mBAAmB;;;;;;;;;EAG9B,CAAC;AAGH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYX,CAAC;AAG3B,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASzC,CAAC;AAGH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASzC,CAAC;AAGH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG/B,CAAC;AAGH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI/B,CAAC;AAGH,eAAO,MAAM,sBAAsB;;;;;;;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C,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.uploadedFileResponseSchema = exports.uploadedFileResourceSchema = exports.uploadedFileAttributesSchema = exports.documentListResponseSchema = exports.documentResponseSchema = exports.documentResourceSchema = exports.updateDocumentSchema = exports.createDocumentSchema = exports.updateDocumentAttributesSchema = exports.createDocumentAttributesSchema = exports.documentAttributesSchema = exports.relatedEntitySchema = exports.relatedEntityTypeSchema = exports.documentTypeSchema = void 0;
3
+ exports.uploadFileBodySchema = exports.uploadedFileResponseSchema = exports.uploadedFileResourceSchema = exports.uploadedFileAttributesSchema = exports.documentListResponseSchema = exports.documentResponseSchema = exports.documentResourceSchema = exports.updateDocumentSchema = exports.createDocumentSchema = exports.updateDocumentAttributesSchema = exports.createDocumentAttributesSchema = exports.documentAttributesSchema = exports.relatedEntitySchema = exports.relatedEntityTypeSchema = exports.documentTypeSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const common_schemas_1 = require("./common.schemas");
6
6
  /**
@@ -84,3 +84,6 @@ exports.uploadedFileAttributesSchema = zod_1.z.object({
84
84
  });
85
85
  exports.uploadedFileResourceSchema = (0, common_schemas_1.createJsonApiResourceSchema)('uploaded-files', exports.uploadedFileAttributesSchema);
86
86
  exports.uploadedFileResponseSchema = (0, common_schemas_1.jsonApiSingleResponseSchema)(exports.uploadedFileResourceSchema);
87
+ exports.uploadFileBodySchema = zod_1.z.object({
88
+ file: zod_1.z.instanceof(File),
89
+ });
@@ -1111,6 +1111,52 @@ export declare const createObservationInputSchema: z.ZodObject<{
1111
1111
  links?: Record<string, string> | undefined;
1112
1112
  meta?: Record<string, unknown> | undefined;
1113
1113
  }>;
1114
+ export declare const uploadObservationBodySchema: z.ZodObject<{
1115
+ fieldId: z.ZodOptional<z.ZodString>;
1116
+ observationType: z.ZodEnum<["disease", "pest", "nutrient", "weed", "general", "health_check"]>;
1117
+ userNotes: z.ZodOptional<z.ZodString>;
1118
+ cropStageAtTime: z.ZodOptional<z.ZodEnum<["planted", "germination", "vegetative", "flowering", "fruiting", "mature", "harvested"]>>;
1119
+ location: z.ZodOptional<z.ZodObject<{
1120
+ lat: z.ZodNumber;
1121
+ lng: z.ZodNumber;
1122
+ accuracy: z.ZodOptional<z.ZodNumber>;
1123
+ }, "strip", z.ZodTypeAny, {
1124
+ lat: number;
1125
+ lng: number;
1126
+ accuracy?: number | undefined;
1127
+ }, {
1128
+ lat: number;
1129
+ lng: number;
1130
+ accuracy?: number | undefined;
1131
+ }>>;
1132
+ capturedAt: z.ZodOptional<z.ZodString>;
1133
+ } & {
1134
+ photo: z.ZodType<import("buffer").File, z.ZodTypeDef, import("buffer").File>;
1135
+ }, "strip", z.ZodTypeAny, {
1136
+ observationType: "general" | "disease" | "pest" | "nutrient" | "weed" | "health_check";
1137
+ photo: import("buffer").File;
1138
+ location?: {
1139
+ lat: number;
1140
+ lng: number;
1141
+ accuracy?: number | undefined;
1142
+ } | undefined;
1143
+ fieldId?: string | undefined;
1144
+ capturedAt?: string | undefined;
1145
+ userNotes?: string | undefined;
1146
+ cropStageAtTime?: "planted" | "flowering" | "mature" | "harvested" | "germination" | "vegetative" | "fruiting" | undefined;
1147
+ }, {
1148
+ observationType: "general" | "disease" | "pest" | "nutrient" | "weed" | "health_check";
1149
+ photo: import("buffer").File;
1150
+ location?: {
1151
+ lat: number;
1152
+ lng: number;
1153
+ accuracy?: number | undefined;
1154
+ } | undefined;
1155
+ fieldId?: string | undefined;
1156
+ capturedAt?: string | undefined;
1157
+ userNotes?: string | undefined;
1158
+ cropStageAtTime?: "planted" | "flowering" | "mature" | "harvested" | "germination" | "vegetative" | "fruiting" | undefined;
1159
+ }>;
1114
1160
  export declare const updateObservationActionInputSchema: z.ZodObject<{
1115
1161
  type: z.ZodLiteral<string>;
1116
1162
  id: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"field-observations.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/field-observations.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB;;GAEG;AAGH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsGd,CAAC;AAG3B,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8B5C,CAAC;AAGH,eAAO,MAAM,uCAAuC;;;;;;;;;;;;EAIlD,CAAC;AAGH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;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C;AAC9E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.observationStatsQuerySchema = exports.observationListQuerySchema = exports.observationListResponseSchema = exports.observationResponseSchema = exports.updateObservationActionInputSchema = exports.createObservationInputSchema = exports.observationResourceSchema = exports.updateObservationActionAttributesSchema = exports.createObservationAttributesSchema = exports.observationAttributesSchema = void 0;
3
+ exports.observationStatsQuerySchema = exports.observationListQuerySchema = exports.observationListResponseSchema = exports.observationResponseSchema = exports.updateObservationActionInputSchema = exports.uploadObservationBodySchema = exports.createObservationInputSchema = exports.observationResourceSchema = exports.updateObservationActionAttributesSchema = exports.createObservationAttributesSchema = exports.observationAttributesSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const common_schemas_1 = require("./common.schemas");
6
6
  const recommendations_schemas_1 = require("./recommendations.schemas");
@@ -139,6 +139,9 @@ exports.updateObservationActionAttributesSchema = zod_1.z.object({
139
139
  // JSON:API resource schemas
140
140
  exports.observationResourceSchema = (0, common_schemas_1.createJsonApiResourceSchema)('observations', exports.observationAttributesSchema);
141
141
  exports.createObservationInputSchema = (0, common_schemas_1.createJsonApiResourceSchema)('observations', exports.createObservationAttributesSchema);
142
+ exports.uploadObservationBodySchema = exports.createObservationAttributesSchema.merge(zod_1.z.object({
143
+ photo: zod_1.z.instanceof(File),
144
+ }));
142
145
  exports.updateObservationActionInputSchema = (0, common_schemas_1.createJsonApiResourceSchema)('observations', exports.updateObservationActionAttributesSchema);
143
146
  // Response schemas
144
147
  exports.observationResponseSchema = (0, common_schemas_1.jsonApiSingleResponseSchema)(exports.observationResourceSchema);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepintel-ltd/farmpro-contracts",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "Type-safe API contracts for FarmPro API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",