@deepintel-ltd/farmpro-contracts 1.3.3 → 1.4.0

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.
@@ -77,7 +77,7 @@ export declare const createDocumentAttributesSchema: z.ZodObject<{
77
77
  name: z.ZodString;
78
78
  type: z.ZodEnum<["receipt", "certificate", "land-document", "insurance", "contract", "invoice", "other"]>;
79
79
  category: z.ZodOptional<z.ZodString>;
80
- fileUrl: z.ZodString;
80
+ fileUrl: z.ZodOptional<z.ZodString>;
81
81
  fileSize: z.ZodOptional<z.ZodNumber>;
82
82
  relatedTo: z.ZodOptional<z.ZodObject<{
83
83
  type: z.ZodEnum<["farm", "field", "purchase", "expense", "equipment", "other"]>;
@@ -94,9 +94,9 @@ export declare const createDocumentAttributesSchema: z.ZodObject<{
94
94
  }, "strip", z.ZodTypeAny, {
95
95
  type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
96
96
  name: string;
97
- fileUrl: string;
98
97
  description?: string | undefined;
99
98
  category?: string | undefined;
99
+ fileUrl?: string | undefined;
100
100
  fileSize?: number | undefined;
101
101
  relatedTo?: {
102
102
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
@@ -106,9 +106,9 @@ export declare const createDocumentAttributesSchema: z.ZodObject<{
106
106
  }, {
107
107
  type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
108
108
  name: string;
109
- fileUrl: string;
110
109
  description?: string | undefined;
111
110
  category?: string | undefined;
111
+ fileUrl?: string | undefined;
112
112
  fileSize?: number | undefined;
113
113
  relatedTo?: {
114
114
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
@@ -120,6 +120,8 @@ export declare const updateDocumentAttributesSchema: z.ZodObject<{
120
120
  name: z.ZodOptional<z.ZodString>;
121
121
  type: z.ZodOptional<z.ZodEnum<["receipt", "certificate", "land-document", "insurance", "contract", "invoice", "other"]>>;
122
122
  category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
123
+ fileUrl: z.ZodOptional<z.ZodString>;
124
+ fileSize: z.ZodOptional<z.ZodNumber>;
123
125
  relatedTo: z.ZodOptional<z.ZodNullable<z.ZodObject<{
124
126
  type: z.ZodEnum<["farm", "field", "purchase", "expense", "equipment", "other"]>;
125
127
  id: z.ZodString;
@@ -137,6 +139,8 @@ export declare const updateDocumentAttributesSchema: z.ZodObject<{
137
139
  name?: string | undefined;
138
140
  description?: string | null | undefined;
139
141
  category?: string | null | undefined;
142
+ fileUrl?: string | undefined;
143
+ fileSize?: number | undefined;
140
144
  relatedTo?: {
141
145
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
142
146
  id: string;
@@ -147,6 +151,8 @@ export declare const updateDocumentAttributesSchema: z.ZodObject<{
147
151
  name?: string | undefined;
148
152
  description?: string | null | undefined;
149
153
  category?: string | null | undefined;
154
+ fileUrl?: string | undefined;
155
+ fileSize?: number | undefined;
150
156
  relatedTo?: {
151
157
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
152
158
  id: string;
@@ -159,7 +165,7 @@ export declare const createDocumentSchema: z.ZodObject<{
159
165
  name: z.ZodString;
160
166
  type: z.ZodEnum<["receipt", "certificate", "land-document", "insurance", "contract", "invoice", "other"]>;
161
167
  category: z.ZodOptional<z.ZodString>;
162
- fileUrl: z.ZodString;
168
+ fileUrl: z.ZodOptional<z.ZodString>;
163
169
  fileSize: z.ZodOptional<z.ZodNumber>;
164
170
  relatedTo: z.ZodOptional<z.ZodObject<{
165
171
  type: z.ZodEnum<["farm", "field", "purchase", "expense", "equipment", "other"]>;
@@ -176,9 +182,9 @@ export declare const createDocumentSchema: z.ZodObject<{
176
182
  }, "strip", z.ZodTypeAny, {
177
183
  type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
178
184
  name: string;
179
- fileUrl: string;
180
185
  description?: string | undefined;
181
186
  category?: string | undefined;
187
+ fileUrl?: string | undefined;
182
188
  fileSize?: number | undefined;
183
189
  relatedTo?: {
184
190
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
@@ -188,9 +194,9 @@ export declare const createDocumentSchema: z.ZodObject<{
188
194
  }, {
189
195
  type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
190
196
  name: string;
191
- fileUrl: string;
192
197
  description?: string | undefined;
193
198
  category?: string | undefined;
199
+ fileUrl?: string | undefined;
194
200
  fileSize?: number | undefined;
195
201
  relatedTo?: {
196
202
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
@@ -203,9 +209,9 @@ export declare const createDocumentSchema: z.ZodObject<{
203
209
  attributes: {
204
210
  type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
205
211
  name: string;
206
- fileUrl: string;
207
212
  description?: string | undefined;
208
213
  category?: string | undefined;
214
+ fileUrl?: string | undefined;
209
215
  fileSize?: number | undefined;
210
216
  relatedTo?: {
211
217
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
@@ -218,9 +224,9 @@ export declare const createDocumentSchema: z.ZodObject<{
218
224
  attributes: {
219
225
  type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
220
226
  name: string;
221
- fileUrl: string;
222
227
  description?: string | undefined;
223
228
  category?: string | undefined;
229
+ fileUrl?: string | undefined;
224
230
  fileSize?: number | undefined;
225
231
  relatedTo?: {
226
232
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
@@ -236,6 +242,8 @@ export declare const updateDocumentSchema: z.ZodObject<{
236
242
  name: z.ZodOptional<z.ZodString>;
237
243
  type: z.ZodOptional<z.ZodEnum<["receipt", "certificate", "land-document", "insurance", "contract", "invoice", "other"]>>;
238
244
  category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
245
+ fileUrl: z.ZodOptional<z.ZodString>;
246
+ fileSize: z.ZodOptional<z.ZodNumber>;
239
247
  relatedTo: z.ZodOptional<z.ZodNullable<z.ZodObject<{
240
248
  type: z.ZodEnum<["farm", "field", "purchase", "expense", "equipment", "other"]>;
241
249
  id: z.ZodString;
@@ -253,6 +261,8 @@ export declare const updateDocumentSchema: z.ZodObject<{
253
261
  name?: string | undefined;
254
262
  description?: string | null | undefined;
255
263
  category?: string | null | undefined;
264
+ fileUrl?: string | undefined;
265
+ fileSize?: number | undefined;
256
266
  relatedTo?: {
257
267
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
258
268
  id: string;
@@ -263,6 +273,8 @@ export declare const updateDocumentSchema: z.ZodObject<{
263
273
  name?: string | undefined;
264
274
  description?: string | null | undefined;
265
275
  category?: string | null | undefined;
276
+ fileUrl?: string | undefined;
277
+ fileSize?: number | undefined;
266
278
  relatedTo?: {
267
279
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
268
280
  id: string;
@@ -277,6 +289,8 @@ export declare const updateDocumentSchema: z.ZodObject<{
277
289
  name?: string | undefined;
278
290
  description?: string | null | undefined;
279
291
  category?: string | null | undefined;
292
+ fileUrl?: string | undefined;
293
+ fileSize?: number | undefined;
280
294
  relatedTo?: {
281
295
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
282
296
  id: string;
@@ -291,6 +305,8 @@ export declare const updateDocumentSchema: z.ZodObject<{
291
305
  name?: string | undefined;
292
306
  description?: string | null | undefined;
293
307
  category?: string | null | undefined;
308
+ fileUrl?: string | undefined;
309
+ fileSize?: number | undefined;
294
310
  relatedTo?: {
295
311
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
296
312
  id: string;
@@ -836,6 +852,205 @@ export declare const documentListResponseSchema: z.ZodObject<{
836
852
  meta?: Record<string, unknown> | undefined;
837
853
  }[] | undefined;
838
854
  }>;
855
+ export declare const uploadedFileAttributesSchema: z.ZodObject<{
856
+ fileUrl: z.ZodString;
857
+ fileSize: z.ZodNumber;
858
+ fileName: z.ZodString;
859
+ contentType: z.ZodOptional<z.ZodString>;
860
+ uploadedAt: z.ZodString;
861
+ }, "strip", z.ZodTypeAny, {
862
+ fileUrl: string;
863
+ fileSize: number;
864
+ fileName: string;
865
+ uploadedAt: string;
866
+ contentType?: string | undefined;
867
+ }, {
868
+ fileUrl: string;
869
+ fileSize: number;
870
+ fileName: string;
871
+ uploadedAt: string;
872
+ contentType?: string | undefined;
873
+ }>;
874
+ export declare const uploadedFileResourceSchema: z.ZodObject<{
875
+ type: z.ZodLiteral<string>;
876
+ id: z.ZodString;
877
+ attributes: z.ZodObject<{
878
+ fileUrl: z.ZodString;
879
+ fileSize: z.ZodNumber;
880
+ fileName: z.ZodString;
881
+ contentType: z.ZodOptional<z.ZodString>;
882
+ uploadedAt: z.ZodString;
883
+ }, "strip", z.ZodTypeAny, {
884
+ fileUrl: string;
885
+ fileSize: number;
886
+ fileName: string;
887
+ uploadedAt: string;
888
+ contentType?: string | undefined;
889
+ }, {
890
+ fileUrl: string;
891
+ fileSize: number;
892
+ fileName: string;
893
+ uploadedAt: string;
894
+ contentType?: string | undefined;
895
+ }>;
896
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
897
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
898
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
899
+ }, "strip", z.ZodTypeAny, {
900
+ type: string;
901
+ id: string;
902
+ attributes: {
903
+ fileUrl: string;
904
+ fileSize: number;
905
+ fileName: string;
906
+ uploadedAt: string;
907
+ contentType?: string | undefined;
908
+ };
909
+ relationships?: Record<string, unknown> | undefined;
910
+ links?: Record<string, string> | undefined;
911
+ meta?: Record<string, unknown> | undefined;
912
+ }, {
913
+ type: string;
914
+ id: string;
915
+ attributes: {
916
+ fileUrl: string;
917
+ fileSize: number;
918
+ fileName: string;
919
+ uploadedAt: string;
920
+ contentType?: string | undefined;
921
+ };
922
+ relationships?: Record<string, unknown> | undefined;
923
+ links?: Record<string, string> | undefined;
924
+ meta?: Record<string, unknown> | undefined;
925
+ }>;
926
+ export declare const uploadedFileResponseSchema: z.ZodObject<{
927
+ data: z.ZodObject<{
928
+ type: z.ZodLiteral<string>;
929
+ id: z.ZodString;
930
+ attributes: z.ZodObject<{
931
+ fileUrl: z.ZodString;
932
+ fileSize: z.ZodNumber;
933
+ fileName: z.ZodString;
934
+ contentType: z.ZodOptional<z.ZodString>;
935
+ uploadedAt: z.ZodString;
936
+ }, "strip", z.ZodTypeAny, {
937
+ fileUrl: string;
938
+ fileSize: number;
939
+ fileName: string;
940
+ uploadedAt: string;
941
+ contentType?: string | undefined;
942
+ }, {
943
+ fileUrl: string;
944
+ fileSize: number;
945
+ fileName: string;
946
+ uploadedAt: string;
947
+ contentType?: string | undefined;
948
+ }>;
949
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
950
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
951
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
952
+ }, "strip", z.ZodTypeAny, {
953
+ type: string;
954
+ id: string;
955
+ attributes: {
956
+ fileUrl: string;
957
+ fileSize: number;
958
+ fileName: string;
959
+ uploadedAt: string;
960
+ contentType?: string | undefined;
961
+ };
962
+ relationships?: Record<string, unknown> | undefined;
963
+ links?: Record<string, string> | undefined;
964
+ meta?: Record<string, unknown> | undefined;
965
+ }, {
966
+ type: string;
967
+ id: string;
968
+ attributes: {
969
+ fileUrl: string;
970
+ fileSize: number;
971
+ fileName: string;
972
+ uploadedAt: string;
973
+ contentType?: string | undefined;
974
+ };
975
+ relationships?: Record<string, unknown> | undefined;
976
+ links?: Record<string, string> | undefined;
977
+ meta?: Record<string, unknown> | undefined;
978
+ }>;
979
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
980
+ type: z.ZodString;
981
+ id: z.ZodString;
982
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
983
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
984
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
985
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
986
+ }, "strip", z.ZodTypeAny, {
987
+ type: string;
988
+ id: string;
989
+ attributes?: Record<string, unknown> | undefined;
990
+ relationships?: Record<string, unknown> | undefined;
991
+ links?: Record<string, string> | undefined;
992
+ meta?: Record<string, unknown> | undefined;
993
+ }, {
994
+ type: string;
995
+ id: string;
996
+ attributes?: Record<string, unknown> | undefined;
997
+ relationships?: Record<string, unknown> | undefined;
998
+ links?: Record<string, string> | undefined;
999
+ meta?: Record<string, unknown> | undefined;
1000
+ }>, "many">>;
1001
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1002
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1003
+ }, "strip", z.ZodTypeAny, {
1004
+ data: {
1005
+ type: string;
1006
+ id: string;
1007
+ attributes: {
1008
+ fileUrl: string;
1009
+ fileSize: number;
1010
+ fileName: string;
1011
+ uploadedAt: string;
1012
+ contentType?: string | undefined;
1013
+ };
1014
+ relationships?: Record<string, unknown> | undefined;
1015
+ links?: Record<string, string> | undefined;
1016
+ meta?: Record<string, unknown> | undefined;
1017
+ };
1018
+ links?: Record<string, string> | undefined;
1019
+ meta?: Record<string, unknown> | undefined;
1020
+ included?: {
1021
+ type: string;
1022
+ id: string;
1023
+ attributes?: Record<string, unknown> | undefined;
1024
+ relationships?: Record<string, unknown> | undefined;
1025
+ links?: Record<string, string> | undefined;
1026
+ meta?: Record<string, unknown> | undefined;
1027
+ }[] | undefined;
1028
+ }, {
1029
+ data: {
1030
+ type: string;
1031
+ id: string;
1032
+ attributes: {
1033
+ fileUrl: string;
1034
+ fileSize: number;
1035
+ fileName: string;
1036
+ uploadedAt: string;
1037
+ contentType?: string | undefined;
1038
+ };
1039
+ relationships?: Record<string, unknown> | undefined;
1040
+ links?: Record<string, string> | undefined;
1041
+ meta?: Record<string, unknown> | undefined;
1042
+ };
1043
+ links?: Record<string, string> | undefined;
1044
+ meta?: Record<string, unknown> | undefined;
1045
+ included?: {
1046
+ type: string;
1047
+ id: string;
1048
+ attributes?: Record<string, unknown> | undefined;
1049
+ relationships?: Record<string, unknown> | undefined;
1050
+ links?: Record<string, string> | undefined;
1051
+ meta?: Record<string, unknown> | undefined;
1052
+ }[] | undefined;
1053
+ }>;
839
1054
  export type DocumentType = z.infer<typeof documentTypeSchema>;
840
1055
  export type RelatedEntityType = z.infer<typeof relatedEntityTypeSchema>;
841
1056
  export type RelatedEntity = z.infer<typeof relatedEntitySchema>;
@@ -847,4 +1062,7 @@ export type UpdateDocumentInput = z.infer<typeof updateDocumentSchema>;
847
1062
  export type DocumentResource = z.infer<typeof documentResourceSchema>;
848
1063
  export type DocumentResponse = z.infer<typeof documentResponseSchema>;
849
1064
  export type DocumentListResponse = z.infer<typeof documentListResponseSchema>;
1065
+ export type UploadedFileAttributes = z.infer<typeof uploadedFileAttributesSchema>;
1066
+ export type UploadedFileResource = z.infer<typeof uploadedFileResourceSchema>;
1067
+ export type UploadedFileResponse = z.infer<typeof uploadedFileResponseSchema>;
850
1068
  //# sourceMappingURL=documents.schemas.d.ts.map
@@ -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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B,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.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.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
  /**
@@ -42,7 +42,7 @@ exports.createDocumentAttributesSchema = zod_1.z.object({
42
42
  name: zod_1.z.string().min(1).max(200),
43
43
  type: exports.documentTypeSchema,
44
44
  category: zod_1.z.string().optional(),
45
- fileUrl: zod_1.z.string().url(), // URL to uploaded file
45
+ fileUrl: zod_1.z.string().url().optional(), // URL to uploaded file (optional - can be set after upload)
46
46
  fileSize: zod_1.z.number().int().positive().optional(), // in bytes
47
47
  relatedTo: exports.relatedEntitySchema.optional(),
48
48
  tags: zod_1.z.array(zod_1.z.string()).optional(),
@@ -53,6 +53,8 @@ exports.updateDocumentAttributesSchema = zod_1.z.object({
53
53
  name: zod_1.z.string().min(1).max(200).optional(),
54
54
  type: exports.documentTypeSchema.optional(),
55
55
  category: zod_1.z.string().nullable().optional(),
56
+ fileUrl: zod_1.z.string().url().optional(), // URL to uploaded file (can be updated after upload)
57
+ fileSize: zod_1.z.number().int().positive().optional(), // in bytes
56
58
  relatedTo: exports.relatedEntitySchema.nullable().optional(),
57
59
  tags: zod_1.z.array(zod_1.z.string()).optional(),
58
60
  description: zod_1.z.string().nullable().optional(),
@@ -73,3 +75,12 @@ exports.documentResourceSchema = (0, common_schemas_1.createJsonApiResourceSchem
73
75
  // Document responses (JSON:API format)
74
76
  exports.documentResponseSchema = (0, common_schemas_1.jsonApiSingleResponseSchema)(exports.documentResourceSchema);
75
77
  exports.documentListResponseSchema = (0, common_schemas_1.jsonApiCollectionResponseSchema)(exports.documentResourceSchema);
78
+ exports.uploadedFileAttributesSchema = zod_1.z.object({
79
+ fileUrl: zod_1.z.string().url(),
80
+ fileSize: zod_1.z.number().int().positive(),
81
+ fileName: zod_1.z.string(),
82
+ contentType: zod_1.z.string().optional(),
83
+ uploadedAt: zod_1.z.string().datetime(),
84
+ });
85
+ exports.uploadedFileResourceSchema = (0, common_schemas_1.createJsonApiResourceSchema)('uploaded-files', exports.uploadedFileAttributesSchema);
86
+ exports.uploadedFileResponseSchema = (0, common_schemas_1.jsonApiSingleResponseSchema)(exports.uploadedFileResourceSchema);
@@ -0,0 +1,176 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Health status for individual services
4
+ */
5
+ export declare const serviceHealthSchema: z.ZodObject<{
6
+ status: z.ZodEnum<["healthy", "unhealthy", "degraded"]>;
7
+ message: z.ZodOptional<z.ZodString>;
8
+ responseTime: z.ZodOptional<z.ZodNumber>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ status: "healthy" | "unhealthy" | "degraded";
11
+ message?: string | undefined;
12
+ responseTime?: number | undefined;
13
+ }, {
14
+ status: "healthy" | "unhealthy" | "degraded";
15
+ message?: string | undefined;
16
+ responseTime?: number | undefined;
17
+ }>;
18
+ /**
19
+ * Overall health check response
20
+ */
21
+ export declare const healthCheckResponseSchema: z.ZodObject<{
22
+ status: z.ZodEnum<["healthy", "unhealthy", "degraded"]>;
23
+ timestamp: z.ZodString;
24
+ uptime: z.ZodNumber;
25
+ services: z.ZodObject<{
26
+ database: z.ZodObject<{
27
+ status: z.ZodEnum<["healthy", "unhealthy", "degraded"]>;
28
+ message: z.ZodOptional<z.ZodString>;
29
+ responseTime: z.ZodOptional<z.ZodNumber>;
30
+ }, "strip", z.ZodTypeAny, {
31
+ status: "healthy" | "unhealthy" | "degraded";
32
+ message?: string | undefined;
33
+ responseTime?: number | undefined;
34
+ }, {
35
+ status: "healthy" | "unhealthy" | "degraded";
36
+ message?: string | undefined;
37
+ responseTime?: number | undefined;
38
+ }>;
39
+ redis: z.ZodObject<{
40
+ status: z.ZodEnum<["healthy", "unhealthy", "degraded"]>;
41
+ message: z.ZodOptional<z.ZodString>;
42
+ responseTime: z.ZodOptional<z.ZodNumber>;
43
+ }, "strip", z.ZodTypeAny, {
44
+ status: "healthy" | "unhealthy" | "degraded";
45
+ message?: string | undefined;
46
+ responseTime?: number | undefined;
47
+ }, {
48
+ status: "healthy" | "unhealthy" | "degraded";
49
+ message?: string | undefined;
50
+ responseTime?: number | undefined;
51
+ }>;
52
+ storage: z.ZodOptional<z.ZodObject<{
53
+ status: z.ZodEnum<["healthy", "unhealthy", "degraded"]>;
54
+ message: z.ZodOptional<z.ZodString>;
55
+ responseTime: z.ZodOptional<z.ZodNumber>;
56
+ }, "strip", z.ZodTypeAny, {
57
+ status: "healthy" | "unhealthy" | "degraded";
58
+ message?: string | undefined;
59
+ responseTime?: number | undefined;
60
+ }, {
61
+ status: "healthy" | "unhealthy" | "degraded";
62
+ message?: string | undefined;
63
+ responseTime?: number | undefined;
64
+ }>>;
65
+ timescale: z.ZodOptional<z.ZodObject<{
66
+ status: z.ZodEnum<["healthy", "unhealthy", "degraded"]>;
67
+ message: z.ZodOptional<z.ZodString>;
68
+ responseTime: z.ZodOptional<z.ZodNumber>;
69
+ }, "strip", z.ZodTypeAny, {
70
+ status: "healthy" | "unhealthy" | "degraded";
71
+ message?: string | undefined;
72
+ responseTime?: number | undefined;
73
+ }, {
74
+ status: "healthy" | "unhealthy" | "degraded";
75
+ message?: string | undefined;
76
+ responseTime?: number | undefined;
77
+ }>>;
78
+ }, "strip", z.ZodTypeAny, {
79
+ database: {
80
+ status: "healthy" | "unhealthy" | "degraded";
81
+ message?: string | undefined;
82
+ responseTime?: number | undefined;
83
+ };
84
+ redis: {
85
+ status: "healthy" | "unhealthy" | "degraded";
86
+ message?: string | undefined;
87
+ responseTime?: number | undefined;
88
+ };
89
+ storage?: {
90
+ status: "healthy" | "unhealthy" | "degraded";
91
+ message?: string | undefined;
92
+ responseTime?: number | undefined;
93
+ } | undefined;
94
+ timescale?: {
95
+ status: "healthy" | "unhealthy" | "degraded";
96
+ message?: string | undefined;
97
+ responseTime?: number | undefined;
98
+ } | undefined;
99
+ }, {
100
+ database: {
101
+ status: "healthy" | "unhealthy" | "degraded";
102
+ message?: string | undefined;
103
+ responseTime?: number | undefined;
104
+ };
105
+ redis: {
106
+ status: "healthy" | "unhealthy" | "degraded";
107
+ message?: string | undefined;
108
+ responseTime?: number | undefined;
109
+ };
110
+ storage?: {
111
+ status: "healthy" | "unhealthy" | "degraded";
112
+ message?: string | undefined;
113
+ responseTime?: number | undefined;
114
+ } | undefined;
115
+ timescale?: {
116
+ status: "healthy" | "unhealthy" | "degraded";
117
+ message?: string | undefined;
118
+ responseTime?: number | undefined;
119
+ } | undefined;
120
+ }>;
121
+ }, "strip", z.ZodTypeAny, {
122
+ status: "healthy" | "unhealthy" | "degraded";
123
+ timestamp: string;
124
+ uptime: number;
125
+ services: {
126
+ database: {
127
+ status: "healthy" | "unhealthy" | "degraded";
128
+ message?: string | undefined;
129
+ responseTime?: number | undefined;
130
+ };
131
+ redis: {
132
+ status: "healthy" | "unhealthy" | "degraded";
133
+ message?: string | undefined;
134
+ responseTime?: number | undefined;
135
+ };
136
+ storage?: {
137
+ status: "healthy" | "unhealthy" | "degraded";
138
+ message?: string | undefined;
139
+ responseTime?: number | undefined;
140
+ } | undefined;
141
+ timescale?: {
142
+ status: "healthy" | "unhealthy" | "degraded";
143
+ message?: string | undefined;
144
+ responseTime?: number | undefined;
145
+ } | undefined;
146
+ };
147
+ }, {
148
+ status: "healthy" | "unhealthy" | "degraded";
149
+ timestamp: string;
150
+ uptime: number;
151
+ services: {
152
+ database: {
153
+ status: "healthy" | "unhealthy" | "degraded";
154
+ message?: string | undefined;
155
+ responseTime?: number | undefined;
156
+ };
157
+ redis: {
158
+ status: "healthy" | "unhealthy" | "degraded";
159
+ message?: string | undefined;
160
+ responseTime?: number | undefined;
161
+ };
162
+ storage?: {
163
+ status: "healthy" | "unhealthy" | "degraded";
164
+ message?: string | undefined;
165
+ responseTime?: number | undefined;
166
+ } | undefined;
167
+ timescale?: {
168
+ status: "healthy" | "unhealthy" | "degraded";
169
+ message?: string | undefined;
170
+ responseTime?: number | undefined;
171
+ } | undefined;
172
+ };
173
+ }>;
174
+ export type ServiceHealth = z.infer<typeof serviceHealthSchema>;
175
+ export type HealthCheckResponse = z.infer<typeof healthCheckResponseSchema>;
176
+ //# sourceMappingURL=health.schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/health.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EAI9B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUpC,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.healthCheckResponseSchema = exports.serviceHealthSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Health status for individual services
7
+ */
8
+ exports.serviceHealthSchema = zod_1.z.object({
9
+ status: zod_1.z.enum(['healthy', 'unhealthy', 'degraded']),
10
+ message: zod_1.z.string().optional(),
11
+ responseTime: zod_1.z.number().optional(), // in milliseconds
12
+ });
13
+ /**
14
+ * Overall health check response
15
+ */
16
+ exports.healthCheckResponseSchema = zod_1.z.object({
17
+ status: zod_1.z.enum(['healthy', 'unhealthy', 'degraded']),
18
+ timestamp: zod_1.z.string().datetime(),
19
+ uptime: zod_1.z.number(), // in seconds
20
+ services: zod_1.z.object({
21
+ database: exports.serviceHealthSchema,
22
+ redis: exports.serviceHealthSchema,
23
+ storage: exports.serviceHealthSchema.optional(),
24
+ timescale: exports.serviceHealthSchema.optional(),
25
+ }),
26
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepintel-ltd/farmpro-contracts",
3
- "version": "1.3.3",
3
+ "version": "1.4.0",
4
4
  "description": "Type-safe API contracts for FarmPro API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",