@deepintel-ltd/farmpro-contracts 1.5.22 → 1.5.24

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.
@@ -101,11 +101,11 @@ export declare const createDocumentAttributesSchema: z.ZodObject<{
101
101
  fileUrl?: string | undefined;
102
102
  category?: string | undefined;
103
103
  fileSize?: number | undefined;
104
+ tags?: string[] | undefined;
104
105
  relatedTo?: {
105
106
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
106
107
  id: string;
107
108
  } | undefined;
108
- tags?: string[] | undefined;
109
109
  }, {
110
110
  type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
111
111
  name: string;
@@ -113,11 +113,11 @@ export declare const createDocumentAttributesSchema: z.ZodObject<{
113
113
  fileUrl?: string | undefined;
114
114
  category?: string | undefined;
115
115
  fileSize?: number | undefined;
116
+ tags?: string[] | undefined;
116
117
  relatedTo?: {
117
118
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
118
119
  id: string;
119
120
  } | undefined;
120
- tags?: string[] | undefined;
121
121
  }>;
122
122
  export declare const updateDocumentAttributesSchema: z.ZodObject<{
123
123
  name: z.ZodOptional<z.ZodString>;
@@ -144,11 +144,11 @@ export declare const updateDocumentAttributesSchema: z.ZodObject<{
144
144
  fileUrl?: string | undefined;
145
145
  category?: string | null | undefined;
146
146
  fileSize?: number | undefined;
147
+ tags?: string[] | undefined;
147
148
  relatedTo?: {
148
149
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
149
150
  id: string;
150
151
  } | null | undefined;
151
- tags?: string[] | undefined;
152
152
  }, {
153
153
  type?: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice" | undefined;
154
154
  name?: string | undefined;
@@ -156,11 +156,11 @@ export declare const updateDocumentAttributesSchema: z.ZodObject<{
156
156
  fileUrl?: string | undefined;
157
157
  category?: string | null | undefined;
158
158
  fileSize?: number | undefined;
159
+ tags?: string[] | undefined;
159
160
  relatedTo?: {
160
161
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
161
162
  id: string;
162
163
  } | null | undefined;
163
- tags?: string[] | undefined;
164
164
  }>;
165
165
  export declare const createDocumentSchema: z.ZodObject<{
166
166
  type: z.ZodLiteral<"documents">;
@@ -189,11 +189,11 @@ export declare const createDocumentSchema: z.ZodObject<{
189
189
  fileUrl?: string | undefined;
190
190
  category?: string | undefined;
191
191
  fileSize?: number | undefined;
192
+ tags?: string[] | undefined;
192
193
  relatedTo?: {
193
194
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
194
195
  id: string;
195
196
  } | undefined;
196
- tags?: string[] | undefined;
197
197
  }, {
198
198
  type: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice";
199
199
  name: string;
@@ -201,11 +201,11 @@ export declare const createDocumentSchema: z.ZodObject<{
201
201
  fileUrl?: string | undefined;
202
202
  category?: string | undefined;
203
203
  fileSize?: number | undefined;
204
+ tags?: string[] | undefined;
204
205
  relatedTo?: {
205
206
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
206
207
  id: string;
207
208
  } | undefined;
208
- tags?: string[] | undefined;
209
209
  }>;
210
210
  }, "strip", z.ZodTypeAny, {
211
211
  type: "documents";
@@ -216,11 +216,11 @@ export declare const createDocumentSchema: z.ZodObject<{
216
216
  fileUrl?: string | undefined;
217
217
  category?: string | undefined;
218
218
  fileSize?: number | undefined;
219
+ tags?: string[] | undefined;
219
220
  relatedTo?: {
220
221
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
221
222
  id: string;
222
223
  } | undefined;
223
- tags?: string[] | undefined;
224
224
  };
225
225
  }, {
226
226
  type: "documents";
@@ -231,11 +231,11 @@ export declare const createDocumentSchema: z.ZodObject<{
231
231
  fileUrl?: string | undefined;
232
232
  category?: string | undefined;
233
233
  fileSize?: number | undefined;
234
+ tags?: string[] | undefined;
234
235
  relatedTo?: {
235
236
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
236
237
  id: string;
237
238
  } | undefined;
238
- tags?: string[] | undefined;
239
239
  };
240
240
  }>;
241
241
  export declare const updateDocumentSchema: z.ZodObject<{
@@ -266,11 +266,11 @@ export declare const updateDocumentSchema: z.ZodObject<{
266
266
  fileUrl?: string | undefined;
267
267
  category?: string | null | undefined;
268
268
  fileSize?: number | undefined;
269
+ tags?: string[] | undefined;
269
270
  relatedTo?: {
270
271
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
271
272
  id: string;
272
273
  } | null | undefined;
273
- tags?: string[] | undefined;
274
274
  }, {
275
275
  type?: "other" | "receipt" | "certificate" | "land-document" | "insurance" | "contract" | "invoice" | undefined;
276
276
  name?: string | undefined;
@@ -278,11 +278,11 @@ export declare const updateDocumentSchema: z.ZodObject<{
278
278
  fileUrl?: string | undefined;
279
279
  category?: string | null | undefined;
280
280
  fileSize?: number | undefined;
281
+ tags?: string[] | undefined;
281
282
  relatedTo?: {
282
283
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
283
284
  id: string;
284
285
  } | null | undefined;
285
- tags?: string[] | undefined;
286
286
  }>;
287
287
  }, "strip", z.ZodTypeAny, {
288
288
  type: "documents";
@@ -294,11 +294,11 @@ export declare const updateDocumentSchema: z.ZodObject<{
294
294
  fileUrl?: string | undefined;
295
295
  category?: string | null | undefined;
296
296
  fileSize?: number | undefined;
297
+ tags?: string[] | undefined;
297
298
  relatedTo?: {
298
299
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
299
300
  id: string;
300
301
  } | null | undefined;
301
- tags?: string[] | undefined;
302
302
  };
303
303
  }, {
304
304
  type: "documents";
@@ -310,11 +310,11 @@ export declare const updateDocumentSchema: z.ZodObject<{
310
310
  fileUrl?: string | undefined;
311
311
  category?: string | null | undefined;
312
312
  fileSize?: number | undefined;
313
+ tags?: string[] | undefined;
313
314
  relatedTo?: {
314
315
  type: "farm" | "field" | "other" | "equipment" | "purchase" | "expense";
315
316
  id: string;
316
317
  } | null | undefined;
317
- tags?: string[] | undefined;
318
318
  };
319
319
  }>;
320
320
  export declare const documentResourceSchema: z.ZodObject<{
@@ -874,212 +874,7 @@ export declare const documentListResponseSchema: z.ZodObject<{
874
874
  meta?: Record<string, unknown> | undefined;
875
875
  }[] | undefined;
876
876
  }>;
877
- export declare const uploadedFileAttributesSchema: 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
- fileName: string;
886
- fileSize: number;
887
- uploadedAt: string;
888
- contentType?: string | undefined;
889
- }, {
890
- fileUrl: string;
891
- fileName: string;
892
- fileSize: number;
893
- uploadedAt: string;
894
- contentType?: string | undefined;
895
- }>;
896
- export declare const uploadedFileResourceSchema: z.ZodObject<{
897
- type: z.ZodLiteral<string>;
898
- id: z.ZodString;
899
- attributes: z.ZodObject<{
900
- fileUrl: z.ZodString;
901
- fileSize: z.ZodNumber;
902
- fileName: z.ZodString;
903
- contentType: z.ZodOptional<z.ZodString>;
904
- uploadedAt: z.ZodString;
905
- }, "strip", z.ZodTypeAny, {
906
- fileUrl: string;
907
- fileName: string;
908
- fileSize: number;
909
- uploadedAt: string;
910
- contentType?: string | undefined;
911
- }, {
912
- fileUrl: string;
913
- fileName: string;
914
- fileSize: number;
915
- uploadedAt: string;
916
- contentType?: string | undefined;
917
- }>;
918
- relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
919
- links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
920
- meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
921
- }, "strip", z.ZodTypeAny, {
922
- type: string;
923
- id: string;
924
- attributes: {
925
- fileUrl: string;
926
- fileName: string;
927
- fileSize: number;
928
- uploadedAt: string;
929
- contentType?: string | undefined;
930
- };
931
- relationships?: Record<string, unknown> | undefined;
932
- links?: Record<string, string> | undefined;
933
- meta?: Record<string, unknown> | undefined;
934
- }, {
935
- type: string;
936
- id: string;
937
- attributes: {
938
- fileUrl: string;
939
- fileName: string;
940
- fileSize: number;
941
- uploadedAt: string;
942
- contentType?: string | undefined;
943
- };
944
- relationships?: Record<string, unknown> | undefined;
945
- links?: Record<string, string> | undefined;
946
- meta?: Record<string, unknown> | undefined;
947
- }>;
948
- export declare const uploadedFileResponseSchema: z.ZodObject<{
949
- data: z.ZodObject<{
950
- type: z.ZodLiteral<string>;
951
- id: z.ZodString;
952
- attributes: z.ZodObject<{
953
- fileUrl: z.ZodString;
954
- fileSize: z.ZodNumber;
955
- fileName: z.ZodString;
956
- contentType: z.ZodOptional<z.ZodString>;
957
- uploadedAt: z.ZodString;
958
- }, "strip", z.ZodTypeAny, {
959
- fileUrl: string;
960
- fileName: string;
961
- fileSize: number;
962
- uploadedAt: string;
963
- contentType?: string | undefined;
964
- }, {
965
- fileUrl: string;
966
- fileName: string;
967
- fileSize: number;
968
- uploadedAt: string;
969
- contentType?: string | undefined;
970
- }>;
971
- relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
972
- links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
973
- meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
974
- }, "strip", z.ZodTypeAny, {
975
- type: string;
976
- id: string;
977
- attributes: {
978
- fileUrl: string;
979
- fileName: string;
980
- fileSize: number;
981
- uploadedAt: string;
982
- contentType?: string | undefined;
983
- };
984
- relationships?: Record<string, unknown> | undefined;
985
- links?: Record<string, string> | undefined;
986
- meta?: Record<string, unknown> | undefined;
987
- }, {
988
- type: string;
989
- id: string;
990
- attributes: {
991
- fileUrl: string;
992
- fileName: string;
993
- fileSize: number;
994
- uploadedAt: string;
995
- contentType?: string | undefined;
996
- };
997
- relationships?: Record<string, unknown> | undefined;
998
- links?: Record<string, string> | undefined;
999
- meta?: Record<string, unknown> | undefined;
1000
- }>;
1001
- included: z.ZodOptional<z.ZodArray<z.ZodObject<{
1002
- type: z.ZodString;
1003
- id: z.ZodString;
1004
- attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1005
- relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1006
- links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1007
- meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1008
- }, "strip", z.ZodTypeAny, {
1009
- type: string;
1010
- id: string;
1011
- attributes?: Record<string, unknown> | undefined;
1012
- relationships?: Record<string, unknown> | undefined;
1013
- links?: Record<string, string> | undefined;
1014
- meta?: Record<string, unknown> | undefined;
1015
- }, {
1016
- type: string;
1017
- id: string;
1018
- attributes?: Record<string, unknown> | undefined;
1019
- relationships?: Record<string, unknown> | undefined;
1020
- links?: Record<string, string> | undefined;
1021
- meta?: Record<string, unknown> | undefined;
1022
- }>, "many">>;
1023
- meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1024
- links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1025
- }, "strip", z.ZodTypeAny, {
1026
- data: {
1027
- type: string;
1028
- id: string;
1029
- attributes: {
1030
- fileUrl: string;
1031
- fileName: string;
1032
- fileSize: number;
1033
- uploadedAt: string;
1034
- contentType?: string | undefined;
1035
- };
1036
- relationships?: Record<string, unknown> | undefined;
1037
- links?: Record<string, string> | undefined;
1038
- meta?: Record<string, unknown> | undefined;
1039
- };
1040
- links?: Record<string, string> | undefined;
1041
- meta?: Record<string, unknown> | undefined;
1042
- included?: {
1043
- type: string;
1044
- id: string;
1045
- attributes?: Record<string, unknown> | undefined;
1046
- relationships?: Record<string, unknown> | undefined;
1047
- links?: Record<string, string> | undefined;
1048
- meta?: Record<string, unknown> | undefined;
1049
- }[] | undefined;
1050
- }, {
1051
- data: {
1052
- type: string;
1053
- id: string;
1054
- attributes: {
1055
- fileUrl: string;
1056
- fileName: string;
1057
- fileSize: number;
1058
- uploadedAt: string;
1059
- contentType?: string | undefined;
1060
- };
1061
- relationships?: Record<string, unknown> | undefined;
1062
- links?: Record<string, string> | undefined;
1063
- meta?: Record<string, unknown> | undefined;
1064
- };
1065
- links?: Record<string, string> | undefined;
1066
- meta?: Record<string, unknown> | undefined;
1067
- included?: {
1068
- type: string;
1069
- id: string;
1070
- attributes?: Record<string, unknown> | undefined;
1071
- relationships?: Record<string, unknown> | undefined;
1072
- links?: Record<string, string> | undefined;
1073
- meta?: Record<string, unknown> | undefined;
1074
- }[] | undefined;
1075
- }>;
1076
- export declare const uploadFileBodySchema: z.ZodObject<{
1077
- file: z.ZodAny;
1078
- }, "strip", z.ZodTypeAny, {
1079
- file?: any;
1080
- }, {
1081
- file?: any;
1082
- }>;
877
+ export { uploadedFileAttributesSchema, uploadedFileResourceSchema, uploadedFileResponseSchema, uploadFileBodySchema, type UploadedFileAttributes, type UploadedFileResource, type UploadedFileResponse, type UploadFileBody, } from './files.schemas';
1083
878
  export type DocumentType = z.infer<typeof documentTypeSchema>;
1084
879
  export type RelatedEntityType = z.infer<typeof relatedEntityTypeSchema>;
1085
880
  export type RelatedEntity = z.infer<typeof relatedEntitySchema>;
@@ -1091,7 +886,4 @@ export type UpdateDocumentInput = z.infer<typeof updateDocumentSchema>;
1091
886
  export type DocumentResource = z.infer<typeof documentResourceSchema>;
1092
887
  export type DocumentResponse = z.infer<typeof documentResponseSchema>;
1093
888
  export type DocumentListResponse = z.infer<typeof documentListResponseSchema>;
1094
- export type UploadedFileAttributes = z.infer<typeof uploadedFileAttributesSchema>;
1095
- export type UploadedFileResource = z.infer<typeof uploadedFileResourceSchema>;
1096
- export type UploadedFileResponse = z.infer<typeof uploadedFileResponseSchema>;
1097
889
  //# sourceMappingURL=documents.schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"documents.schemas.d.ts","sourceRoot":"","sources":["../../src/sch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MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACvE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACvE,MAAM,MAAM,gBAAgB,GAAG,CAAC,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"}
@@ -73,15 +73,5 @@ export const documentResourceSchema = createJsonApiResourceSchema('documents', d
73
73
  // Document responses (JSON:API format)
74
74
  export const documentResponseSchema = jsonApiSingleResponseSchema(documentResourceSchema);
75
75
  export const documentListResponseSchema = jsonApiCollectionResponseSchema(documentResourceSchema);
76
- export const uploadedFileAttributesSchema = z.object({
77
- fileUrl: z.string(),
78
- fileSize: z.number().int().positive(),
79
- fileName: z.string(),
80
- contentType: z.string().optional(),
81
- uploadedAt: z.string().datetime(),
82
- });
83
- export const uploadedFileResourceSchema = createJsonApiResourceSchema('uploaded-files', uploadedFileAttributesSchema);
84
- export const uploadedFileResponseSchema = jsonApiSingleResponseSchema(uploadedFileResourceSchema);
85
- export const uploadFileBodySchema = z.object({
86
- file: z.any(),
87
- });
76
+ // Re-export file upload schemas from shared files.schemas.ts
77
+ export { uploadedFileAttributesSchema, uploadedFileResourceSchema, uploadedFileResponseSchema, uploadFileBodySchema, } from './files.schemas';
@@ -0,0 +1,229 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Generic file upload schemas - reusable across all file upload endpoints
4
+ */
5
+ export declare const uploadedFileAttributesSchema: z.ZodObject<{
6
+ fileUrl: z.ZodString;
7
+ fileSize: z.ZodNumber;
8
+ fileName: z.ZodString;
9
+ contentType: z.ZodOptional<z.ZodString>;
10
+ uploadedAt: z.ZodString;
11
+ }, "strip", z.ZodTypeAny, {
12
+ fileUrl: string;
13
+ fileName: string;
14
+ fileSize: number;
15
+ uploadedAt: string;
16
+ contentType?: string | undefined;
17
+ }, {
18
+ fileUrl: string;
19
+ fileName: string;
20
+ fileSize: number;
21
+ uploadedAt: string;
22
+ contentType?: string | undefined;
23
+ }>;
24
+ export declare const uploadedFileResourceSchema: z.ZodObject<{
25
+ type: z.ZodLiteral<string>;
26
+ id: z.ZodString;
27
+ attributes: z.ZodObject<{
28
+ fileUrl: z.ZodString;
29
+ fileSize: z.ZodNumber;
30
+ fileName: z.ZodString;
31
+ contentType: z.ZodOptional<z.ZodString>;
32
+ uploadedAt: z.ZodString;
33
+ }, "strip", z.ZodTypeAny, {
34
+ fileUrl: string;
35
+ fileName: string;
36
+ fileSize: number;
37
+ uploadedAt: string;
38
+ contentType?: string | undefined;
39
+ }, {
40
+ fileUrl: string;
41
+ fileName: string;
42
+ fileSize: number;
43
+ uploadedAt: string;
44
+ contentType?: string | undefined;
45
+ }>;
46
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
47
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
48
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
49
+ }, "strip", z.ZodTypeAny, {
50
+ type: string;
51
+ id: string;
52
+ attributes: {
53
+ fileUrl: string;
54
+ fileName: string;
55
+ fileSize: number;
56
+ uploadedAt: string;
57
+ contentType?: string | undefined;
58
+ };
59
+ relationships?: Record<string, unknown> | undefined;
60
+ links?: Record<string, string> | undefined;
61
+ meta?: Record<string, unknown> | undefined;
62
+ }, {
63
+ type: string;
64
+ id: string;
65
+ attributes: {
66
+ fileUrl: string;
67
+ fileName: string;
68
+ fileSize: number;
69
+ uploadedAt: string;
70
+ contentType?: string | undefined;
71
+ };
72
+ relationships?: Record<string, unknown> | undefined;
73
+ links?: Record<string, string> | undefined;
74
+ meta?: Record<string, unknown> | undefined;
75
+ }>;
76
+ export declare const uploadedFileResponseSchema: z.ZodObject<{
77
+ data: z.ZodObject<{
78
+ type: z.ZodLiteral<string>;
79
+ id: z.ZodString;
80
+ attributes: z.ZodObject<{
81
+ fileUrl: z.ZodString;
82
+ fileSize: z.ZodNumber;
83
+ fileName: z.ZodString;
84
+ contentType: z.ZodOptional<z.ZodString>;
85
+ uploadedAt: z.ZodString;
86
+ }, "strip", z.ZodTypeAny, {
87
+ fileUrl: string;
88
+ fileName: string;
89
+ fileSize: number;
90
+ uploadedAt: string;
91
+ contentType?: string | undefined;
92
+ }, {
93
+ fileUrl: string;
94
+ fileName: string;
95
+ fileSize: number;
96
+ uploadedAt: string;
97
+ contentType?: string | undefined;
98
+ }>;
99
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
100
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
101
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
102
+ }, "strip", z.ZodTypeAny, {
103
+ type: string;
104
+ id: string;
105
+ attributes: {
106
+ fileUrl: string;
107
+ fileName: string;
108
+ fileSize: number;
109
+ uploadedAt: string;
110
+ contentType?: string | undefined;
111
+ };
112
+ relationships?: Record<string, unknown> | undefined;
113
+ links?: Record<string, string> | undefined;
114
+ meta?: Record<string, unknown> | undefined;
115
+ }, {
116
+ type: string;
117
+ id: string;
118
+ attributes: {
119
+ fileUrl: string;
120
+ fileName: string;
121
+ fileSize: number;
122
+ uploadedAt: string;
123
+ contentType?: string | undefined;
124
+ };
125
+ relationships?: Record<string, unknown> | undefined;
126
+ links?: Record<string, string> | undefined;
127
+ meta?: Record<string, unknown> | undefined;
128
+ }>;
129
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
130
+ type: z.ZodString;
131
+ id: z.ZodString;
132
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
133
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
134
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
135
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
136
+ }, "strip", z.ZodTypeAny, {
137
+ type: string;
138
+ id: string;
139
+ attributes?: Record<string, unknown> | undefined;
140
+ relationships?: Record<string, unknown> | undefined;
141
+ links?: Record<string, string> | undefined;
142
+ meta?: Record<string, unknown> | undefined;
143
+ }, {
144
+ type: string;
145
+ id: string;
146
+ attributes?: Record<string, unknown> | undefined;
147
+ relationships?: Record<string, unknown> | undefined;
148
+ links?: Record<string, string> | undefined;
149
+ meta?: Record<string, unknown> | undefined;
150
+ }>, "many">>;
151
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
152
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
153
+ }, "strip", z.ZodTypeAny, {
154
+ data: {
155
+ type: string;
156
+ id: string;
157
+ attributes: {
158
+ fileUrl: string;
159
+ fileName: string;
160
+ fileSize: number;
161
+ uploadedAt: string;
162
+ contentType?: string | undefined;
163
+ };
164
+ relationships?: Record<string, unknown> | undefined;
165
+ links?: Record<string, string> | undefined;
166
+ meta?: Record<string, unknown> | undefined;
167
+ };
168
+ links?: Record<string, string> | undefined;
169
+ meta?: Record<string, unknown> | undefined;
170
+ included?: {
171
+ type: string;
172
+ id: string;
173
+ attributes?: Record<string, unknown> | undefined;
174
+ relationships?: Record<string, unknown> | undefined;
175
+ links?: Record<string, string> | undefined;
176
+ meta?: Record<string, unknown> | undefined;
177
+ }[] | undefined;
178
+ }, {
179
+ data: {
180
+ type: string;
181
+ id: string;
182
+ attributes: {
183
+ fileUrl: string;
184
+ fileName: string;
185
+ fileSize: number;
186
+ uploadedAt: string;
187
+ contentType?: string | undefined;
188
+ };
189
+ relationships?: Record<string, unknown> | undefined;
190
+ links?: Record<string, string> | undefined;
191
+ meta?: Record<string, unknown> | undefined;
192
+ };
193
+ links?: Record<string, string> | undefined;
194
+ meta?: Record<string, unknown> | undefined;
195
+ included?: {
196
+ type: string;
197
+ id: string;
198
+ attributes?: Record<string, unknown> | undefined;
199
+ relationships?: Record<string, unknown> | undefined;
200
+ links?: Record<string, string> | undefined;
201
+ meta?: Record<string, unknown> | undefined;
202
+ }[] | undefined;
203
+ }>;
204
+ export declare const uploadFileBodySchema: z.ZodObject<{
205
+ file: z.ZodAny;
206
+ }, "strip", z.ZodTypeAny, {
207
+ file?: any;
208
+ }, {
209
+ file?: any;
210
+ }>;
211
+ export declare const uploadMetadataSchema: z.ZodOptional<z.ZodObject<{
212
+ category: z.ZodOptional<z.ZodString>;
213
+ description: z.ZodOptional<z.ZodString>;
214
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
215
+ }, "strip", z.ZodTypeAny, {
216
+ description?: string | undefined;
217
+ category?: string | undefined;
218
+ tags?: string[] | undefined;
219
+ }, {
220
+ description?: string | undefined;
221
+ category?: string | undefined;
222
+ tags?: string[] | undefined;
223
+ }>>;
224
+ export type UploadedFileAttributes = z.infer<typeof uploadedFileAttributesSchema>;
225
+ export type UploadedFileResource = z.infer<typeof uploadedFileResourceSchema>;
226
+ export type UploadedFileResponse = z.infer<typeof uploadedFileResponseSchema>;
227
+ export type UploadFileBody = z.infer<typeof uploadFileBodySchema>;
228
+ export type UploadMetadata = z.infer<typeof uploadMetadataSchema>;
229
+ //# sourceMappingURL=files.schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"files.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/files.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;GAEG;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;EAMvC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA8E,CAAC;AAEtH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA0D,CAAC;AAElG,eAAO,MAAM,oBAAoB;;;;;;EAE/B,CAAC;AAGH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;GAIpB,CAAC;AAGd,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;AAC9E,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ import { createJsonApiResourceSchema, jsonApiSingleResponseSchema } from './common.schemas';
3
+ /**
4
+ * Generic file upload schemas - reusable across all file upload endpoints
5
+ */
6
+ export const uploadedFileAttributesSchema = z.object({
7
+ fileUrl: z.string(),
8
+ fileSize: z.number().int().positive(),
9
+ fileName: z.string(),
10
+ contentType: z.string().optional(),
11
+ uploadedAt: z.string().datetime(),
12
+ });
13
+ export const uploadedFileResourceSchema = createJsonApiResourceSchema('uploaded-files', uploadedFileAttributesSchema);
14
+ export const uploadedFileResponseSchema = jsonApiSingleResponseSchema(uploadedFileResourceSchema);
15
+ export const uploadFileBodySchema = z.object({
16
+ file: z.any(), // File type handled at runtime (MulterFile or browser File)
17
+ });
18
+ // Optional metadata that can be included with uploads
19
+ export const uploadMetadataSchema = z.object({
20
+ category: z.string().optional(),
21
+ description: z.string().optional(),
22
+ tags: z.array(z.string()).optional(),
23
+ }).optional();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepintel-ltd/farmpro-contracts",
3
- "version": "1.5.22",
3
+ "version": "1.5.24",
4
4
  "description": "Type-safe API contracts for FarmPro API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",