@deepintel-ltd/farmpro-contracts 1.11.11 → 1.12.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"staff.routes.d.ts","sourceRoot":"","sources":["../../src/routes/staff.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsBxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuJtB,CAAC"}
@@ -0,0 +1,144 @@
1
+ import { initContract } from '@ts-rest/core';
2
+ import { z } from 'zod';
3
+ import { createStaffMemberSchema, updateStaffMemberSchema, createStaffPaymentSchema, createBulkStaffPaymentsSchema, staffMemberResponseSchema, staffMemberListResponseSchema, staffPaymentResponseSchema, staffPaymentListResponseSchema, staffPayTypeSchema, } from '../schemas/staff.schemas';
4
+ import { jsonApiErrorResponseSchema, jsonApiSuccessResponseSchema, jsonApiPaginationQuerySchema, jsonApiSortQuerySchema, jsonApiFilterQuerySchema, } from '../schemas/common.schemas';
5
+ const c = initContract();
6
+ export const staffRouter = c.router({
7
+ // Payments list — before :id routes
8
+ listStaffPayments: {
9
+ method: 'GET',
10
+ path: '/farms/:farmId/staff/payments',
11
+ pathParams: z.object({ farmId: z.string().uuid() }),
12
+ query: jsonApiPaginationQuerySchema
13
+ .merge(jsonApiSortQuerySchema)
14
+ .merge(jsonApiFilterQuerySchema)
15
+ .merge(z.object({
16
+ 'filter[staffMemberId]': z.string().uuid().optional(),
17
+ })),
18
+ responses: {
19
+ 200: staffPaymentListResponseSchema,
20
+ 404: jsonApiErrorResponseSchema,
21
+ 401: jsonApiErrorResponseSchema,
22
+ },
23
+ summary: 'List staff salary payments',
24
+ description: 'List salary payments for a farm (each payment posts an Expense)',
25
+ },
26
+ // Create payment
27
+ createStaffPayment: {
28
+ method: 'POST',
29
+ path: '/farms/:farmId/staff/payments',
30
+ pathParams: z.object({ farmId: z.string().uuid() }),
31
+ body: z.object({ data: createStaffPaymentSchema }),
32
+ responses: {
33
+ 201: staffPaymentResponseSchema,
34
+ 400: jsonApiErrorResponseSchema,
35
+ 404: jsonApiErrorResponseSchema,
36
+ 401: jsonApiErrorResponseSchema,
37
+ 422: jsonApiErrorResponseSchema,
38
+ },
39
+ summary: 'Record staff salary payment',
40
+ description: 'Record a salary payment and atomically create a Salary expense',
41
+ },
42
+ // Bulk create payments
43
+ createBulkStaffPayments: {
44
+ method: 'POST',
45
+ path: '/farms/:farmId/staff/payments/bulk',
46
+ pathParams: z.object({ farmId: z.string().uuid() }),
47
+ body: z.object({ data: createBulkStaffPaymentsSchema }),
48
+ responses: {
49
+ 201: staffPaymentListResponseSchema,
50
+ 400: jsonApiErrorResponseSchema,
51
+ 404: jsonApiErrorResponseSchema,
52
+ 401: jsonApiErrorResponseSchema,
53
+ 422: jsonApiErrorResponseSchema,
54
+ },
55
+ summary: 'Record multiple staff salary payments',
56
+ description: 'Pay multiple staff for a period in one all-or-nothing transaction; each creates a Salary expense. If any item fails, no payments or expenses from the batch are kept.',
57
+ },
58
+ // List staff
59
+ listStaffMembers: {
60
+ method: 'GET',
61
+ path: '/farms/:farmId/staff',
62
+ pathParams: z.object({ farmId: z.string().uuid() }),
63
+ query: jsonApiPaginationQuerySchema
64
+ .merge(jsonApiSortQuerySchema)
65
+ .merge(jsonApiFilterQuerySchema)
66
+ .merge(z.object({
67
+ 'filter[isActive]': z.coerce.boolean().optional(),
68
+ 'filter[payType]': staffPayTypeSchema.optional(),
69
+ })),
70
+ responses: {
71
+ 200: staffMemberListResponseSchema,
72
+ 404: jsonApiErrorResponseSchema,
73
+ 401: jsonApiErrorResponseSchema,
74
+ },
75
+ summary: 'List staff members',
76
+ description: 'List payroll staff for a farm (separate from team login members)',
77
+ },
78
+ // Create staff
79
+ createStaffMember: {
80
+ method: 'POST',
81
+ path: '/farms/:farmId/staff',
82
+ pathParams: z.object({ farmId: z.string().uuid() }),
83
+ body: z.object({ data: createStaffMemberSchema }),
84
+ responses: {
85
+ 201: staffMemberResponseSchema,
86
+ 400: jsonApiErrorResponseSchema,
87
+ 404: jsonApiErrorResponseSchema,
88
+ 401: jsonApiErrorResponseSchema,
89
+ 422: jsonApiErrorResponseSchema,
90
+ },
91
+ summary: 'Add staff member',
92
+ description: 'Add someone to the farm payroll roster',
93
+ },
94
+ // Get staff by ID
95
+ getStaffMember: {
96
+ method: 'GET',
97
+ path: '/farms/:farmId/staff/:id',
98
+ pathParams: z.object({
99
+ farmId: z.string().uuid(),
100
+ id: z.string().uuid(),
101
+ }),
102
+ responses: {
103
+ 200: staffMemberResponseSchema,
104
+ 404: jsonApiErrorResponseSchema,
105
+ 401: jsonApiErrorResponseSchema,
106
+ },
107
+ summary: 'Get staff member',
108
+ },
109
+ // Update staff
110
+ updateStaffMember: {
111
+ method: 'PATCH',
112
+ path: '/farms/:farmId/staff/:id',
113
+ pathParams: z.object({
114
+ farmId: z.string().uuid(),
115
+ id: z.string().uuid(),
116
+ }),
117
+ body: z.object({ data: updateStaffMemberSchema }),
118
+ responses: {
119
+ 200: staffMemberResponseSchema,
120
+ 400: jsonApiErrorResponseSchema,
121
+ 404: jsonApiErrorResponseSchema,
122
+ 401: jsonApiErrorResponseSchema,
123
+ 422: jsonApiErrorResponseSchema,
124
+ },
125
+ summary: 'Update staff member',
126
+ },
127
+ // Deactivate / remove staff (soft: sets isActive false; hard delete only if no payments)
128
+ deleteStaffMember: {
129
+ method: 'DELETE',
130
+ path: '/farms/:farmId/staff/:id',
131
+ pathParams: z.object({
132
+ farmId: z.string().uuid(),
133
+ id: z.string().uuid(),
134
+ }),
135
+ responses: {
136
+ 204: jsonApiSuccessResponseSchema,
137
+ 404: jsonApiErrorResponseSchema,
138
+ 401: jsonApiErrorResponseSchema,
139
+ 400: jsonApiErrorResponseSchema,
140
+ },
141
+ summary: 'Remove staff member',
142
+ description: 'Hard-deletes staff with no payments; otherwise deactivates (isActive=false). Posted payments cannot be deleted.',
143
+ },
144
+ });
@@ -57,8 +57,8 @@ export declare const teamPaymentsRouter: {
57
57
  bankName: string;
58
58
  accountNumber: string;
59
59
  accountName: string;
60
- label: string;
61
60
  isActive: boolean;
61
+ label: string;
62
62
  providerAccountId: string | null;
63
63
  dailyLimit: number | null;
64
64
  monthlyLimit: number | null;
@@ -73,8 +73,8 @@ export declare const teamPaymentsRouter: {
73
73
  bankName: string;
74
74
  accountNumber: string;
75
75
  accountName: string;
76
- label: string;
77
76
  isActive: boolean;
77
+ label: string;
78
78
  providerAccountId: string | null;
79
79
  dailyLimit: number | null;
80
80
  monthlyLimit: number | null;
@@ -96,8 +96,8 @@ export declare const teamPaymentsRouter: {
96
96
  bankName: string;
97
97
  accountNumber: string;
98
98
  accountName: string;
99
- label: string;
100
99
  isActive: boolean;
100
+ label: string;
101
101
  providerAccountId: string | null;
102
102
  dailyLimit: number | null;
103
103
  monthlyLimit: number | null;
@@ -119,8 +119,8 @@ export declare const teamPaymentsRouter: {
119
119
  bankName: string;
120
120
  accountNumber: string;
121
121
  accountName: string;
122
- label: string;
123
122
  isActive: boolean;
123
+ label: string;
124
124
  providerAccountId: string | null;
125
125
  dailyLimit: number | null;
126
126
  monthlyLimit: number | null;
@@ -168,8 +168,8 @@ export declare const teamPaymentsRouter: {
168
168
  bankName: string;
169
169
  accountNumber: string;
170
170
  accountName: string;
171
- label: string;
172
171
  isActive: boolean;
172
+ label: string;
173
173
  providerAccountId: string | null;
174
174
  dailyLimit: number | null;
175
175
  monthlyLimit: number | null;
@@ -203,8 +203,8 @@ export declare const teamPaymentsRouter: {
203
203
  bankName: string;
204
204
  accountNumber: string;
205
205
  accountName: string;
206
- label: string;
207
206
  isActive: boolean;
207
+ label: string;
208
208
  providerAccountId: string | null;
209
209
  dailyLimit: number | null;
210
210
  monthlyLimit: number | null;
@@ -530,8 +530,8 @@ export declare const teamPaymentsRouter: {
530
530
  bankName: string;
531
531
  accountNumber: string;
532
532
  accountName: string;
533
- label: string;
534
533
  isActive: boolean;
534
+ label: string;
535
535
  providerAccountId?: string | undefined;
536
536
  dailyLimit?: number | undefined;
537
537
  monthlyLimit?: number | undefined;
@@ -557,8 +557,8 @@ export declare const teamPaymentsRouter: {
557
557
  bankName: string;
558
558
  accountNumber: string;
559
559
  accountName: string;
560
- label: string;
561
560
  isActive: boolean;
561
+ label: string;
562
562
  providerAccountId?: string | undefined;
563
563
  dailyLimit?: number | undefined;
564
564
  monthlyLimit?: number | undefined;
@@ -589,8 +589,8 @@ export declare const teamPaymentsRouter: {
589
589
  bankName: string;
590
590
  accountNumber: string;
591
591
  accountName: string;
592
- label: string;
593
592
  isActive: boolean;
593
+ label: string;
594
594
  providerAccountId?: string | undefined;
595
595
  dailyLimit?: number | undefined;
596
596
  monthlyLimit?: number | undefined;
@@ -647,8 +647,8 @@ export declare const teamPaymentsRouter: {
647
647
  bankName: string;
648
648
  accountNumber: string;
649
649
  accountName: string;
650
- label: string;
651
650
  isActive: boolean;
651
+ label: string;
652
652
  providerAccountId: string | null;
653
653
  dailyLimit: number | null;
654
654
  monthlyLimit: number | null;
@@ -663,8 +663,8 @@ export declare const teamPaymentsRouter: {
663
663
  bankName: string;
664
664
  accountNumber: string;
665
665
  accountName: string;
666
- label: string;
667
666
  isActive: boolean;
667
+ label: string;
668
668
  providerAccountId: string | null;
669
669
  dailyLimit: number | null;
670
670
  monthlyLimit: number | null;
@@ -686,8 +686,8 @@ export declare const teamPaymentsRouter: {
686
686
  bankName: string;
687
687
  accountNumber: string;
688
688
  accountName: string;
689
- label: string;
690
689
  isActive: boolean;
690
+ label: string;
691
691
  providerAccountId: string | null;
692
692
  dailyLimit: number | null;
693
693
  monthlyLimit: number | null;
@@ -709,8 +709,8 @@ export declare const teamPaymentsRouter: {
709
709
  bankName: string;
710
710
  accountNumber: string;
711
711
  accountName: string;
712
- label: string;
713
712
  isActive: boolean;
713
+ label: string;
714
714
  providerAccountId: string | null;
715
715
  dailyLimit: number | null;
716
716
  monthlyLimit: number | null;
@@ -758,8 +758,8 @@ export declare const teamPaymentsRouter: {
758
758
  bankName: string;
759
759
  accountNumber: string;
760
760
  accountName: string;
761
- label: string;
762
761
  isActive: boolean;
762
+ label: string;
763
763
  providerAccountId: string | null;
764
764
  dailyLimit: number | null;
765
765
  monthlyLimit: number | null;
@@ -793,8 +793,8 @@ export declare const teamPaymentsRouter: {
793
793
  bankName: string;
794
794
  accountNumber: string;
795
795
  accountName: string;
796
- label: string;
797
796
  isActive: boolean;
797
+ label: string;
798
798
  providerAccountId: string | null;
799
799
  dailyLimit: number | null;
800
800
  monthlyLimit: number | null;
@@ -1313,8 +1313,8 @@ export declare const teamPaymentsRouter: {
1313
1313
  bankName: string;
1314
1314
  accountNumber: string;
1315
1315
  accountName: string;
1316
- label: string;
1317
1316
  isActive: boolean;
1317
+ label: string;
1318
1318
  providerAccountId: string | null;
1319
1319
  dailyLimit: number | null;
1320
1320
  monthlyLimit: number | null;
@@ -1329,8 +1329,8 @@ export declare const teamPaymentsRouter: {
1329
1329
  bankName: string;
1330
1330
  accountNumber: string;
1331
1331
  accountName: string;
1332
- label: string;
1333
1332
  isActive: boolean;
1333
+ label: string;
1334
1334
  providerAccountId: string | null;
1335
1335
  dailyLimit: number | null;
1336
1336
  monthlyLimit: number | null;
@@ -1352,8 +1352,8 @@ export declare const teamPaymentsRouter: {
1352
1352
  bankName: string;
1353
1353
  accountNumber: string;
1354
1354
  accountName: string;
1355
- label: string;
1356
1355
  isActive: boolean;
1356
+ label: string;
1357
1357
  providerAccountId: string | null;
1358
1358
  dailyLimit: number | null;
1359
1359
  monthlyLimit: number | null;
@@ -1375,8 +1375,8 @@ export declare const teamPaymentsRouter: {
1375
1375
  bankName: string;
1376
1376
  accountNumber: string;
1377
1377
  accountName: string;
1378
- label: string;
1379
1378
  isActive: boolean;
1379
+ label: string;
1380
1380
  providerAccountId: string | null;
1381
1381
  dailyLimit: number | null;
1382
1382
  monthlyLimit: number | null;
@@ -1424,8 +1424,8 @@ export declare const teamPaymentsRouter: {
1424
1424
  bankName: string;
1425
1425
  accountNumber: string;
1426
1426
  accountName: string;
1427
- label: string;
1428
1427
  isActive: boolean;
1428
+ label: string;
1429
1429
  providerAccountId: string | null;
1430
1430
  dailyLimit: number | null;
1431
1431
  monthlyLimit: number | null;
@@ -1459,8 +1459,8 @@ export declare const teamPaymentsRouter: {
1459
1459
  bankName: string;
1460
1460
  accountNumber: string;
1461
1461
  accountName: string;
1462
- label: string;
1463
1462
  isActive: boolean;
1463
+ label: string;
1464
1464
  providerAccountId: string | null;
1465
1465
  dailyLimit: number | null;
1466
1466
  monthlyLimit: number | null;
@@ -1789,8 +1789,8 @@ export declare const teamPaymentsRouter: {
1789
1789
  bankName?: string | undefined;
1790
1790
  accountNumber?: string | undefined;
1791
1791
  accountName?: string | undefined;
1792
- label?: string | undefined;
1793
1792
  isActive?: boolean | undefined;
1793
+ label?: string | undefined;
1794
1794
  providerAccountId?: string | undefined;
1795
1795
  dailyLimit?: number | undefined;
1796
1796
  monthlyLimit?: number | undefined;
@@ -1801,8 +1801,8 @@ export declare const teamPaymentsRouter: {
1801
1801
  bankName?: string | undefined;
1802
1802
  accountNumber?: string | undefined;
1803
1803
  accountName?: string | undefined;
1804
- label?: string | undefined;
1805
1804
  isActive?: boolean | undefined;
1805
+ label?: string | undefined;
1806
1806
  providerAccountId?: string | undefined;
1807
1807
  dailyLimit?: number | undefined;
1808
1808
  monthlyLimit?: number | undefined;
@@ -1817,8 +1817,8 @@ export declare const teamPaymentsRouter: {
1817
1817
  bankName?: string | undefined;
1818
1818
  accountNumber?: string | undefined;
1819
1819
  accountName?: string | undefined;
1820
- label?: string | undefined;
1821
1820
  isActive?: boolean | undefined;
1821
+ label?: string | undefined;
1822
1822
  providerAccountId?: string | undefined;
1823
1823
  dailyLimit?: number | undefined;
1824
1824
  monthlyLimit?: number | undefined;
@@ -1833,8 +1833,8 @@ export declare const teamPaymentsRouter: {
1833
1833
  bankName?: string | undefined;
1834
1834
  accountNumber?: string | undefined;
1835
1835
  accountName?: string | undefined;
1836
- label?: string | undefined;
1837
1836
  isActive?: boolean | undefined;
1837
+ label?: string | undefined;
1838
1838
  providerAccountId?: string | undefined;
1839
1839
  dailyLimit?: number | undefined;
1840
1840
  monthlyLimit?: number | undefined;
@@ -1851,8 +1851,8 @@ export declare const teamPaymentsRouter: {
1851
1851
  bankName?: string | undefined;
1852
1852
  accountNumber?: string | undefined;
1853
1853
  accountName?: string | undefined;
1854
- label?: string | undefined;
1855
1854
  isActive?: boolean | undefined;
1855
+ label?: string | undefined;
1856
1856
  providerAccountId?: string | undefined;
1857
1857
  dailyLimit?: number | undefined;
1858
1858
  monthlyLimit?: number | undefined;
@@ -1869,8 +1869,8 @@ export declare const teamPaymentsRouter: {
1869
1869
  bankName?: string | undefined;
1870
1870
  accountNumber?: string | undefined;
1871
1871
  accountName?: string | undefined;
1872
- label?: string | undefined;
1873
1872
  isActive?: boolean | undefined;
1873
+ label?: string | undefined;
1874
1874
  providerAccountId?: string | undefined;
1875
1875
  dailyLimit?: number | undefined;
1876
1876
  monthlyLimit?: number | undefined;
@@ -1910,8 +1910,8 @@ export declare const teamPaymentsRouter: {
1910
1910
  bankName: string;
1911
1911
  accountNumber: string;
1912
1912
  accountName: string;
1913
- label: string;
1914
1913
  isActive: boolean;
1914
+ label: string;
1915
1915
  providerAccountId: string | null;
1916
1916
  dailyLimit: number | null;
1917
1917
  monthlyLimit: number | null;
@@ -1926,8 +1926,8 @@ export declare const teamPaymentsRouter: {
1926
1926
  bankName: string;
1927
1927
  accountNumber: string;
1928
1928
  accountName: string;
1929
- label: string;
1930
1929
  isActive: boolean;
1930
+ label: string;
1931
1931
  providerAccountId: string | null;
1932
1932
  dailyLimit: number | null;
1933
1933
  monthlyLimit: number | null;
@@ -1949,8 +1949,8 @@ export declare const teamPaymentsRouter: {
1949
1949
  bankName: string;
1950
1950
  accountNumber: string;
1951
1951
  accountName: string;
1952
- label: string;
1953
1952
  isActive: boolean;
1953
+ label: string;
1954
1954
  providerAccountId: string | null;
1955
1955
  dailyLimit: number | null;
1956
1956
  monthlyLimit: number | null;
@@ -1972,8 +1972,8 @@ export declare const teamPaymentsRouter: {
1972
1972
  bankName: string;
1973
1973
  accountNumber: string;
1974
1974
  accountName: string;
1975
- label: string;
1976
1975
  isActive: boolean;
1976
+ label: string;
1977
1977
  providerAccountId: string | null;
1978
1978
  dailyLimit: number | null;
1979
1979
  monthlyLimit: number | null;
@@ -2021,8 +2021,8 @@ export declare const teamPaymentsRouter: {
2021
2021
  bankName: string;
2022
2022
  accountNumber: string;
2023
2023
  accountName: string;
2024
- label: string;
2025
2024
  isActive: boolean;
2025
+ label: string;
2026
2026
  providerAccountId: string | null;
2027
2027
  dailyLimit: number | null;
2028
2028
  monthlyLimit: number | null;
@@ -2056,8 +2056,8 @@ export declare const teamPaymentsRouter: {
2056
2056
  bankName: string;
2057
2057
  accountNumber: string;
2058
2058
  accountName: string;
2059
- label: string;
2060
2059
  isActive: boolean;
2060
+ label: string;
2061
2061
  providerAccountId: string | null;
2062
2062
  dailyLimit: number | null;
2063
2063
  monthlyLimit: number | null;
@@ -64,6 +64,7 @@ export declare const weatherRouter: {
64
64
  message: z.ZodString;
65
65
  fieldId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
66
66
  date: z.ZodString;
67
+ recommendation: z.ZodOptional<z.ZodString>;
67
68
  recommendations: z.ZodOptional<z.ZodArray<z.ZodObject<{
68
69
  priority: z.ZodNumber;
69
70
  action: z.ZodString;
@@ -173,6 +174,7 @@ export declare const weatherRouter: {
173
174
  riskLevel?: string | undefined;
174
175
  }[] | undefined;
175
176
  fieldId?: string | null | undefined;
177
+ recommendation?: string | undefined;
176
178
  }, {
177
179
  type: "drought" | "heavy-rain" | "frost" | "optimal" | "wind";
178
180
  message: string;
@@ -202,6 +204,7 @@ export declare const weatherRouter: {
202
204
  riskLevel?: string | undefined;
203
205
  }[] | undefined;
204
206
  fieldId?: string | null | undefined;
207
+ recommendation?: string | undefined;
205
208
  }>, "many">>;
206
209
  }, "strip", z.ZodTypeAny, {
207
210
  farmId: string;
@@ -248,6 +251,7 @@ export declare const weatherRouter: {
248
251
  riskLevel?: string | undefined;
249
252
  }[] | undefined;
250
253
  fieldId?: string | null | undefined;
254
+ recommendation?: string | undefined;
251
255
  }[] | undefined;
252
256
  }, {
253
257
  farmId: string;
@@ -294,6 +298,7 @@ export declare const weatherRouter: {
294
298
  riskLevel?: string | undefined;
295
299
  }[] | undefined;
296
300
  fieldId?: string | null | undefined;
301
+ recommendation?: string | undefined;
297
302
  }[] | undefined;
298
303
  }>;
299
304
  relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -347,6 +352,7 @@ export declare const weatherRouter: {
347
352
  riskLevel?: string | undefined;
348
353
  }[] | undefined;
349
354
  fieldId?: string | null | undefined;
355
+ recommendation?: string | undefined;
350
356
  }[] | undefined;
351
357
  };
352
358
  relationships?: Record<string, unknown> | undefined;
@@ -400,6 +406,7 @@ export declare const weatherRouter: {
400
406
  riskLevel?: string | undefined;
401
407
  }[] | undefined;
402
408
  fieldId?: string | null | undefined;
409
+ recommendation?: string | undefined;
403
410
  }[] | undefined;
404
411
  };
405
412
  relationships?: Record<string, unknown> | undefined;
@@ -479,6 +486,7 @@ export declare const weatherRouter: {
479
486
  riskLevel?: string | undefined;
480
487
  }[] | undefined;
481
488
  fieldId?: string | null | undefined;
489
+ recommendation?: string | undefined;
482
490
  }[] | undefined;
483
491
  };
484
492
  relationships?: Record<string, unknown> | undefined;
@@ -544,6 +552,7 @@ export declare const weatherRouter: {
544
552
  riskLevel?: string | undefined;
545
553
  }[] | undefined;
546
554
  fieldId?: string | null | undefined;
555
+ recommendation?: string | undefined;
547
556
  }[] | undefined;
548
557
  };
549
558
  relationships?: Record<string, unknown> | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"weather.routes.d.ts","sourceRoot":"","sources":["../../src/routes/weather.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BxB,CAAC"}
@@ -29,8 +29,8 @@ export declare const geofenceSchema: z.ZodObject<{
29
29
  type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
30
30
  coordinates: number[] | number[][] | number[][][] | number[][][][];
31
31
  };
32
- alertType: "both" | "entry" | "exit";
33
32
  isActive: boolean;
33
+ alertType: "both" | "entry" | "exit";
34
34
  updatedAt?: string | undefined;
35
35
  color?: string | undefined;
36
36
  linkedGroupIds?: string[] | undefined;
@@ -44,8 +44,8 @@ export declare const geofenceSchema: z.ZodObject<{
44
44
  type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
45
45
  coordinates: number[] | number[][] | number[][][] | number[][][][];
46
46
  };
47
- alertType: "both" | "entry" | "exit";
48
47
  isActive: boolean;
48
+ alertType: "both" | "entry" | "exit";
49
49
  updatedAt?: string | undefined;
50
50
  color?: string | undefined;
51
51
  linkedGroupIds?: string[] | undefined;
@@ -75,8 +75,8 @@ export declare const createGeofenceBodySchema: z.ZodObject<{
75
75
  coordinates: number[] | number[][] | number[][][] | number[][][][];
76
76
  };
77
77
  alertType: "both" | "entry" | "exit";
78
- color?: string | undefined;
79
78
  isActive?: boolean | undefined;
79
+ color?: string | undefined;
80
80
  linkedGroupIds?: string[] | undefined;
81
81
  linkedLivestockIds?: string[] | undefined;
82
82
  }, {
@@ -86,8 +86,8 @@ export declare const createGeofenceBodySchema: z.ZodObject<{
86
86
  coordinates: number[] | number[][] | number[][][] | number[][][][];
87
87
  };
88
88
  alertType: "both" | "entry" | "exit";
89
- color?: string | undefined;
90
89
  isActive?: boolean | undefined;
90
+ color?: string | undefined;
91
91
  linkedGroupIds?: string[] | undefined;
92
92
  linkedLivestockIds?: string[] | undefined;
93
93
  }>;
@@ -114,9 +114,9 @@ export declare const updateGeofenceBodySchema: z.ZodObject<{
114
114
  type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
115
115
  coordinates: number[] | number[][] | number[][][] | number[][][][];
116
116
  } | undefined;
117
+ isActive?: boolean | undefined;
117
118
  color?: string | undefined;
118
119
  alertType?: "both" | "entry" | "exit" | undefined;
119
- isActive?: boolean | undefined;
120
120
  linkedGroupIds?: string[] | undefined;
121
121
  linkedLivestockIds?: string[] | undefined;
122
122
  }, {
@@ -125,9 +125,9 @@ export declare const updateGeofenceBodySchema: z.ZodObject<{
125
125
  type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
126
126
  coordinates: number[] | number[][] | number[][][] | number[][][][];
127
127
  } | undefined;
128
+ isActive?: boolean | undefined;
128
129
  color?: string | undefined;
129
130
  alertType?: "both" | "entry" | "exit" | undefined;
130
- isActive?: boolean | undefined;
131
131
  linkedGroupIds?: string[] | undefined;
132
132
  linkedLivestockIds?: string[] | undefined;
133
133
  }>;
@@ -219,8 +219,8 @@ export declare const geofenceListResponseSchema: z.ZodArray<z.ZodObject<{
219
219
  type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
220
220
  coordinates: number[] | number[][] | number[][][] | number[][][][];
221
221
  };
222
- alertType: "both" | "entry" | "exit";
223
222
  isActive: boolean;
223
+ alertType: "both" | "entry" | "exit";
224
224
  updatedAt?: string | undefined;
225
225
  color?: string | undefined;
226
226
  linkedGroupIds?: string[] | undefined;
@@ -234,8 +234,8 @@ export declare const geofenceListResponseSchema: z.ZodArray<z.ZodObject<{
234
234
  type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
235
235
  coordinates: number[] | number[][] | number[][][] | number[][][][];
236
236
  };
237
- alertType: "both" | "entry" | "exit";
238
237
  isActive: boolean;
238
+ alertType: "both" | "entry" | "exit";
239
239
  updatedAt?: string | undefined;
240
240
  color?: string | undefined;
241
241
  linkedGroupIds?: string[] | undefined;
@@ -271,8 +271,8 @@ export declare const geofenceSingleResponseSchema: z.ZodObject<{
271
271
  type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
272
272
  coordinates: number[] | number[][] | number[][][] | number[][][][];
273
273
  };
274
- alertType: "both" | "entry" | "exit";
275
274
  isActive: boolean;
275
+ alertType: "both" | "entry" | "exit";
276
276
  updatedAt?: string | undefined;
277
277
  color?: string | undefined;
278
278
  linkedGroupIds?: string[] | undefined;
@@ -286,8 +286,8 @@ export declare const geofenceSingleResponseSchema: z.ZodObject<{
286
286
  type: "Polygon" | "MultiPolygon" | "Point" | "LineString";
287
287
  coordinates: number[] | number[][] | number[][][] | number[][][][];
288
288
  };
289
- alertType: "both" | "entry" | "exit";
290
289
  isActive: boolean;
290
+ alertType: "both" | "entry" | "exit";
291
291
  updatedAt?: string | undefined;
292
292
  color?: string | undefined;
293
293
  linkedGroupIds?: string[] | undefined;