@deepintel-ltd/farmpro-contracts 1.22.1 → 1.22.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.
@@ -0,0 +1,435 @@
1
+ import { z } from 'zod';
2
+ export declare const farmEnterpriseTypeSchema: z.ZodEnum<["CROPS", "POULTRY", "AQUACULTURE", "CATTLE", "GOAT"]>;
3
+ export declare const farmEnterpriseAttributesSchema: z.ZodObject<{
4
+ type: z.ZodEnum<["CROPS", "POULTRY", "AQUACULTURE", "CATTLE", "GOAT"]>;
5
+ subtype: z.ZodNullable<z.ZodString>;
6
+ enabledAt: z.ZodString;
7
+ } & {
8
+ createdAt: z.ZodString;
9
+ updatedAt: z.ZodString;
10
+ }, "strip", z.ZodTypeAny, {
11
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
12
+ createdAt: string;
13
+ updatedAt: string;
14
+ subtype: string | null;
15
+ enabledAt: string;
16
+ }, {
17
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
18
+ createdAt: string;
19
+ updatedAt: string;
20
+ subtype: string | null;
21
+ enabledAt: string;
22
+ }>;
23
+ export declare const createFarmEnterpriseAttributesSchema: z.ZodObject<{
24
+ type: z.ZodEnum<["CROPS", "POULTRY", "AQUACULTURE", "CATTLE", "GOAT"]>;
25
+ subtype: z.ZodNullable<z.ZodOptional<z.ZodString>>;
26
+ }, "strip", z.ZodTypeAny, {
27
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
28
+ subtype?: string | null | undefined;
29
+ }, {
30
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
31
+ subtype?: string | null | undefined;
32
+ }>;
33
+ export declare const replaceFarmEnterprisesAttributesSchema: z.ZodObject<{
34
+ enterprises: z.ZodArray<z.ZodObject<{
35
+ type: z.ZodEnum<["CROPS", "POULTRY", "AQUACULTURE", "CATTLE", "GOAT"]>;
36
+ subtype: z.ZodNullable<z.ZodOptional<z.ZodString>>;
37
+ }, "strip", z.ZodTypeAny, {
38
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
39
+ subtype?: string | null | undefined;
40
+ }, {
41
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
42
+ subtype?: string | null | undefined;
43
+ }>, "many">;
44
+ }, "strip", z.ZodTypeAny, {
45
+ enterprises: {
46
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
47
+ subtype?: string | null | undefined;
48
+ }[];
49
+ }, {
50
+ enterprises: {
51
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
52
+ subtype?: string | null | undefined;
53
+ }[];
54
+ }>;
55
+ export declare const farmEnterpriseResourceSchema: z.ZodObject<{
56
+ type: z.ZodLiteral<string>;
57
+ id: z.ZodString;
58
+ attributes: z.ZodObject<{
59
+ type: z.ZodEnum<["CROPS", "POULTRY", "AQUACULTURE", "CATTLE", "GOAT"]>;
60
+ subtype: z.ZodNullable<z.ZodString>;
61
+ enabledAt: z.ZodString;
62
+ } & {
63
+ createdAt: z.ZodString;
64
+ updatedAt: z.ZodString;
65
+ }, "strip", z.ZodTypeAny, {
66
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
67
+ createdAt: string;
68
+ updatedAt: string;
69
+ subtype: string | null;
70
+ enabledAt: string;
71
+ }, {
72
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
73
+ createdAt: string;
74
+ updatedAt: string;
75
+ subtype: string | null;
76
+ enabledAt: string;
77
+ }>;
78
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
79
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
80
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
81
+ }, "strip", z.ZodTypeAny, {
82
+ type: string;
83
+ id: string;
84
+ attributes: {
85
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
86
+ createdAt: string;
87
+ updatedAt: string;
88
+ subtype: string | null;
89
+ enabledAt: string;
90
+ };
91
+ relationships?: Record<string, unknown> | undefined;
92
+ links?: Record<string, string> | undefined;
93
+ meta?: Record<string, unknown> | undefined;
94
+ }, {
95
+ type: string;
96
+ id: string;
97
+ attributes: {
98
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
99
+ createdAt: string;
100
+ updatedAt: string;
101
+ subtype: string | null;
102
+ enabledAt: string;
103
+ };
104
+ relationships?: Record<string, unknown> | undefined;
105
+ links?: Record<string, string> | undefined;
106
+ meta?: Record<string, unknown> | undefined;
107
+ }>;
108
+ export declare const farmEnterpriseResponseSchema: z.ZodObject<{
109
+ data: z.ZodObject<{
110
+ type: z.ZodLiteral<string>;
111
+ id: z.ZodString;
112
+ attributes: z.ZodObject<{
113
+ type: z.ZodEnum<["CROPS", "POULTRY", "AQUACULTURE", "CATTLE", "GOAT"]>;
114
+ subtype: z.ZodNullable<z.ZodString>;
115
+ enabledAt: z.ZodString;
116
+ } & {
117
+ createdAt: z.ZodString;
118
+ updatedAt: z.ZodString;
119
+ }, "strip", z.ZodTypeAny, {
120
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
121
+ createdAt: string;
122
+ updatedAt: string;
123
+ subtype: string | null;
124
+ enabledAt: string;
125
+ }, {
126
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
127
+ createdAt: string;
128
+ updatedAt: string;
129
+ subtype: string | null;
130
+ enabledAt: string;
131
+ }>;
132
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
133
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
134
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
135
+ }, "strip", z.ZodTypeAny, {
136
+ type: string;
137
+ id: string;
138
+ attributes: {
139
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
140
+ createdAt: string;
141
+ updatedAt: string;
142
+ subtype: string | null;
143
+ enabledAt: string;
144
+ };
145
+ relationships?: Record<string, unknown> | undefined;
146
+ links?: Record<string, string> | undefined;
147
+ meta?: Record<string, unknown> | undefined;
148
+ }, {
149
+ type: string;
150
+ id: string;
151
+ attributes: {
152
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
153
+ createdAt: string;
154
+ updatedAt: string;
155
+ subtype: string | null;
156
+ enabledAt: string;
157
+ };
158
+ relationships?: Record<string, unknown> | undefined;
159
+ links?: Record<string, string> | undefined;
160
+ meta?: Record<string, unknown> | undefined;
161
+ }>;
162
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
163
+ type: z.ZodString;
164
+ id: z.ZodString;
165
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
166
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
167
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
168
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
169
+ }, "strip", z.ZodTypeAny, {
170
+ type: string;
171
+ id: string;
172
+ attributes?: Record<string, unknown> | undefined;
173
+ relationships?: Record<string, unknown> | undefined;
174
+ links?: Record<string, string> | undefined;
175
+ meta?: Record<string, unknown> | undefined;
176
+ }, {
177
+ type: string;
178
+ id: string;
179
+ attributes?: Record<string, unknown> | undefined;
180
+ relationships?: Record<string, unknown> | undefined;
181
+ links?: Record<string, string> | undefined;
182
+ meta?: Record<string, unknown> | undefined;
183
+ }>, "many">>;
184
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
185
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
186
+ }, "strip", z.ZodTypeAny, {
187
+ data: {
188
+ type: string;
189
+ id: string;
190
+ attributes: {
191
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
192
+ createdAt: string;
193
+ updatedAt: string;
194
+ subtype: string | null;
195
+ enabledAt: string;
196
+ };
197
+ relationships?: Record<string, unknown> | undefined;
198
+ links?: Record<string, string> | undefined;
199
+ meta?: Record<string, unknown> | undefined;
200
+ };
201
+ links?: Record<string, string> | undefined;
202
+ meta?: Record<string, unknown> | undefined;
203
+ included?: {
204
+ type: string;
205
+ id: string;
206
+ attributes?: Record<string, unknown> | undefined;
207
+ relationships?: Record<string, unknown> | undefined;
208
+ links?: Record<string, string> | undefined;
209
+ meta?: Record<string, unknown> | undefined;
210
+ }[] | undefined;
211
+ }, {
212
+ data: {
213
+ type: string;
214
+ id: string;
215
+ attributes: {
216
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
217
+ createdAt: string;
218
+ updatedAt: string;
219
+ subtype: string | null;
220
+ enabledAt: string;
221
+ };
222
+ relationships?: Record<string, unknown> | undefined;
223
+ links?: Record<string, string> | undefined;
224
+ meta?: Record<string, unknown> | undefined;
225
+ };
226
+ links?: Record<string, string> | undefined;
227
+ meta?: Record<string, unknown> | undefined;
228
+ included?: {
229
+ type: string;
230
+ id: string;
231
+ attributes?: Record<string, unknown> | undefined;
232
+ relationships?: Record<string, unknown> | undefined;
233
+ links?: Record<string, string> | undefined;
234
+ meta?: Record<string, unknown> | undefined;
235
+ }[] | undefined;
236
+ }>;
237
+ export declare const farmEnterpriseListResponseSchema: z.ZodObject<{
238
+ data: z.ZodArray<z.ZodObject<{
239
+ type: z.ZodLiteral<string>;
240
+ id: z.ZodString;
241
+ attributes: z.ZodObject<{
242
+ type: z.ZodEnum<["CROPS", "POULTRY", "AQUACULTURE", "CATTLE", "GOAT"]>;
243
+ subtype: z.ZodNullable<z.ZodString>;
244
+ enabledAt: z.ZodString;
245
+ } & {
246
+ createdAt: z.ZodString;
247
+ updatedAt: z.ZodString;
248
+ }, "strip", z.ZodTypeAny, {
249
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
250
+ createdAt: string;
251
+ updatedAt: string;
252
+ subtype: string | null;
253
+ enabledAt: string;
254
+ }, {
255
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
256
+ createdAt: string;
257
+ updatedAt: string;
258
+ subtype: string | null;
259
+ enabledAt: string;
260
+ }>;
261
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
262
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
263
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
264
+ }, "strip", z.ZodTypeAny, {
265
+ type: string;
266
+ id: string;
267
+ attributes: {
268
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
269
+ createdAt: string;
270
+ updatedAt: string;
271
+ subtype: string | null;
272
+ enabledAt: string;
273
+ };
274
+ relationships?: Record<string, unknown> | undefined;
275
+ links?: Record<string, string> | undefined;
276
+ meta?: Record<string, unknown> | undefined;
277
+ }, {
278
+ type: string;
279
+ id: string;
280
+ attributes: {
281
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
282
+ createdAt: string;
283
+ updatedAt: string;
284
+ subtype: string | null;
285
+ enabledAt: string;
286
+ };
287
+ relationships?: Record<string, unknown> | undefined;
288
+ links?: Record<string, string> | undefined;
289
+ meta?: Record<string, unknown> | undefined;
290
+ }>, "many">;
291
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
292
+ type: z.ZodString;
293
+ id: z.ZodString;
294
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
295
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
296
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
297
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
298
+ }, "strip", z.ZodTypeAny, {
299
+ type: string;
300
+ id: string;
301
+ attributes?: Record<string, unknown> | undefined;
302
+ relationships?: Record<string, unknown> | undefined;
303
+ links?: Record<string, string> | undefined;
304
+ meta?: Record<string, unknown> | undefined;
305
+ }, {
306
+ type: string;
307
+ id: string;
308
+ attributes?: Record<string, unknown> | undefined;
309
+ relationships?: Record<string, unknown> | undefined;
310
+ links?: Record<string, string> | undefined;
311
+ meta?: Record<string, unknown> | undefined;
312
+ }>, "many">>;
313
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
314
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
315
+ }, "strip", z.ZodTypeAny, {
316
+ data: {
317
+ type: string;
318
+ id: string;
319
+ attributes: {
320
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
321
+ createdAt: string;
322
+ updatedAt: string;
323
+ subtype: string | null;
324
+ enabledAt: string;
325
+ };
326
+ relationships?: Record<string, unknown> | undefined;
327
+ links?: Record<string, string> | undefined;
328
+ meta?: Record<string, unknown> | undefined;
329
+ }[];
330
+ links?: Record<string, string> | undefined;
331
+ meta?: Record<string, unknown> | undefined;
332
+ included?: {
333
+ type: string;
334
+ id: string;
335
+ attributes?: Record<string, unknown> | undefined;
336
+ relationships?: Record<string, unknown> | undefined;
337
+ links?: Record<string, string> | undefined;
338
+ meta?: Record<string, unknown> | undefined;
339
+ }[] | undefined;
340
+ }, {
341
+ data: {
342
+ type: string;
343
+ id: string;
344
+ attributes: {
345
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
346
+ createdAt: string;
347
+ updatedAt: string;
348
+ subtype: string | null;
349
+ enabledAt: string;
350
+ };
351
+ relationships?: Record<string, unknown> | undefined;
352
+ links?: Record<string, string> | undefined;
353
+ meta?: Record<string, unknown> | undefined;
354
+ }[];
355
+ links?: Record<string, string> | undefined;
356
+ meta?: Record<string, unknown> | undefined;
357
+ included?: {
358
+ type: string;
359
+ id: string;
360
+ attributes?: Record<string, unknown> | undefined;
361
+ relationships?: Record<string, unknown> | undefined;
362
+ links?: Record<string, string> | undefined;
363
+ meta?: Record<string, unknown> | undefined;
364
+ }[] | undefined;
365
+ }>;
366
+ export declare const createFarmEnterpriseSchema: z.ZodObject<{
367
+ type: z.ZodLiteral<"farm-enterprises">;
368
+ attributes: z.ZodObject<{
369
+ type: z.ZodEnum<["CROPS", "POULTRY", "AQUACULTURE", "CATTLE", "GOAT"]>;
370
+ subtype: z.ZodNullable<z.ZodOptional<z.ZodString>>;
371
+ }, "strip", z.ZodTypeAny, {
372
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
373
+ subtype?: string | null | undefined;
374
+ }, {
375
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
376
+ subtype?: string | null | undefined;
377
+ }>;
378
+ }, "strip", z.ZodTypeAny, {
379
+ type: "farm-enterprises";
380
+ attributes: {
381
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
382
+ subtype?: string | null | undefined;
383
+ };
384
+ }, {
385
+ type: "farm-enterprises";
386
+ attributes: {
387
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
388
+ subtype?: string | null | undefined;
389
+ };
390
+ }>;
391
+ export declare const replaceFarmEnterprisesSchema: z.ZodObject<{
392
+ type: z.ZodLiteral<"farm-enterprises">;
393
+ attributes: z.ZodObject<{
394
+ enterprises: z.ZodArray<z.ZodObject<{
395
+ type: z.ZodEnum<["CROPS", "POULTRY", "AQUACULTURE", "CATTLE", "GOAT"]>;
396
+ subtype: z.ZodNullable<z.ZodOptional<z.ZodString>>;
397
+ }, "strip", z.ZodTypeAny, {
398
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
399
+ subtype?: string | null | undefined;
400
+ }, {
401
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
402
+ subtype?: string | null | undefined;
403
+ }>, "many">;
404
+ }, "strip", z.ZodTypeAny, {
405
+ enterprises: {
406
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
407
+ subtype?: string | null | undefined;
408
+ }[];
409
+ }, {
410
+ enterprises: {
411
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
412
+ subtype?: string | null | undefined;
413
+ }[];
414
+ }>;
415
+ }, "strip", z.ZodTypeAny, {
416
+ type: "farm-enterprises";
417
+ attributes: {
418
+ enterprises: {
419
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
420
+ subtype?: string | null | undefined;
421
+ }[];
422
+ };
423
+ }, {
424
+ type: "farm-enterprises";
425
+ attributes: {
426
+ enterprises: {
427
+ type: "CROPS" | "POULTRY" | "AQUACULTURE" | "CATTLE" | "GOAT";
428
+ subtype?: string | null | undefined;
429
+ }[];
430
+ };
431
+ }>;
432
+ export type FarmEnterpriseType = z.infer<typeof farmEnterpriseTypeSchema>;
433
+ export type FarmEnterpriseAttributes = z.infer<typeof farmEnterpriseAttributesSchema>;
434
+ export type CreateFarmEnterpriseAttributes = z.infer<typeof createFarmEnterpriseAttributesSchema>;
435
+ //# sourceMappingURL=farm-enterprises.schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"farm-enterprises.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/farm-enterprises.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,wBAAwB,kEAMnC,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;EAMjB,CAAC;AAE3B,eAAO,MAAM,oCAAoC;;;;;;;;;EAG/C,CAAC;AAEH,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;EASjD,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGxC,CAAC;AAEF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAExC,CAAC;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE5C,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;EAGrC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGvC,CAAC;AAEH,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,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,oCAAoC,CAC5C,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { z } from 'zod';
2
+ import { timestampsSchema, createJsonApiResourceSchema, jsonApiSingleResponseSchema, jsonApiCollectionResponseSchema, } from './common.schemas';
3
+ export const farmEnterpriseTypeSchema = z.enum([
4
+ 'CROPS',
5
+ 'POULTRY',
6
+ 'AQUACULTURE',
7
+ 'CATTLE',
8
+ 'GOAT',
9
+ ]);
10
+ export const farmEnterpriseAttributesSchema = z
11
+ .object({
12
+ type: farmEnterpriseTypeSchema,
13
+ subtype: z.string().max(100).nullable(),
14
+ enabledAt: z.string().datetime(),
15
+ })
16
+ .merge(timestampsSchema);
17
+ export const createFarmEnterpriseAttributesSchema = z.object({
18
+ type: farmEnterpriseTypeSchema,
19
+ subtype: z.string().max(100).optional().nullable(),
20
+ });
21
+ export const replaceFarmEnterprisesAttributesSchema = z.object({
22
+ enterprises: z
23
+ .array(z.object({
24
+ type: farmEnterpriseTypeSchema,
25
+ subtype: z.string().max(100).optional().nullable(),
26
+ }))
27
+ .min(1),
28
+ });
29
+ export const farmEnterpriseResourceSchema = createJsonApiResourceSchema('farm-enterprises', farmEnterpriseAttributesSchema);
30
+ export const farmEnterpriseResponseSchema = jsonApiSingleResponseSchema(farmEnterpriseResourceSchema);
31
+ export const farmEnterpriseListResponseSchema = jsonApiCollectionResponseSchema(farmEnterpriseResourceSchema);
32
+ export const createFarmEnterpriseSchema = z.object({
33
+ type: z.literal('farm-enterprises'),
34
+ attributes: createFarmEnterpriseAttributesSchema,
35
+ });
36
+ export const replaceFarmEnterprisesSchema = z.object({
37
+ type: z.literal('farm-enterprises'),
38
+ attributes: replaceFarmEnterprisesAttributesSchema,
39
+ });