@deepintel-ltd/farmpro-contracts 1.5.12 → 1.5.13
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.
- package/dist/routes/agent-workflows.routes.d.ts +48 -42
- package/dist/routes/agent-workflows.routes.d.ts.map +1 -1
- package/dist/routes/agent-workflows.routes.js +17 -20
- package/dist/routes/agents.routes.d.ts +9 -84
- package/dist/routes/agents.routes.d.ts.map +1 -1
- package/dist/routes/agents.routes.js +30 -4
- package/dist/routes/field-observations.routes.d.ts +56 -48
- package/dist/routes/field-observations.routes.d.ts.map +1 -1
- package/dist/routes/finance.routes.d.ts +107 -2
- package/dist/routes/finance.routes.d.ts.map +1 -1
- package/dist/routes/finance.routes.js +2 -2
- package/dist/schemas/field-observations.schemas.d.ts +38 -24
- package/dist/schemas/field-observations.schemas.d.ts.map +1 -1
- package/dist/schemas/field-observations.schemas.js +9 -11
- package/dist/schemas/finance.schemas.d.ts +116 -0
- package/dist/schemas/finance.schemas.d.ts.map +1 -1
- package/dist/schemas/finance.schemas.js +11 -0
- package/package.json +1 -1
|
@@ -40,6 +40,9 @@ export declare const financeRouter: {
|
|
|
40
40
|
planned: z.ZodNumber;
|
|
41
41
|
actual: z.ZodOptional<z.ZodNumber>;
|
|
42
42
|
remaining: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
startDate: z.ZodString;
|
|
44
|
+
endDate: z.ZodString;
|
|
45
|
+
period: z.ZodOptional<z.ZodEnum<["monthly", "quarterly", "annual", "custom", "legacy"]>>;
|
|
43
46
|
} & {
|
|
44
47
|
createdAt: z.ZodString;
|
|
45
48
|
updatedAt: z.ZodString;
|
|
@@ -48,15 +51,21 @@ export declare const financeRouter: {
|
|
|
48
51
|
updatedAt: string;
|
|
49
52
|
category: string;
|
|
50
53
|
planned: number;
|
|
54
|
+
startDate: string;
|
|
55
|
+
endDate: string;
|
|
51
56
|
actual?: number | undefined;
|
|
52
57
|
remaining?: number | undefined;
|
|
58
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
53
59
|
}, {
|
|
54
60
|
createdAt: string;
|
|
55
61
|
updatedAt: string;
|
|
56
62
|
category: string;
|
|
57
63
|
planned: number;
|
|
64
|
+
startDate: string;
|
|
65
|
+
endDate: string;
|
|
58
66
|
actual?: number | undefined;
|
|
59
67
|
remaining?: number | undefined;
|
|
68
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
60
69
|
}>;
|
|
61
70
|
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
62
71
|
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -69,8 +78,11 @@ export declare const financeRouter: {
|
|
|
69
78
|
updatedAt: string;
|
|
70
79
|
category: string;
|
|
71
80
|
planned: number;
|
|
81
|
+
startDate: string;
|
|
82
|
+
endDate: string;
|
|
72
83
|
actual?: number | undefined;
|
|
73
84
|
remaining?: number | undefined;
|
|
85
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
74
86
|
};
|
|
75
87
|
relationships?: Record<string, unknown> | undefined;
|
|
76
88
|
links?: Record<string, string> | undefined;
|
|
@@ -83,8 +95,11 @@ export declare const financeRouter: {
|
|
|
83
95
|
updatedAt: string;
|
|
84
96
|
category: string;
|
|
85
97
|
planned: number;
|
|
98
|
+
startDate: string;
|
|
99
|
+
endDate: string;
|
|
86
100
|
actual?: number | undefined;
|
|
87
101
|
remaining?: number | undefined;
|
|
102
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
88
103
|
};
|
|
89
104
|
relationships?: Record<string, unknown> | undefined;
|
|
90
105
|
links?: Record<string, string> | undefined;
|
|
@@ -123,8 +138,11 @@ export declare const financeRouter: {
|
|
|
123
138
|
updatedAt: string;
|
|
124
139
|
category: string;
|
|
125
140
|
planned: number;
|
|
141
|
+
startDate: string;
|
|
142
|
+
endDate: string;
|
|
126
143
|
actual?: number | undefined;
|
|
127
144
|
remaining?: number | undefined;
|
|
145
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
128
146
|
};
|
|
129
147
|
relationships?: Record<string, unknown> | undefined;
|
|
130
148
|
links?: Record<string, string> | undefined;
|
|
@@ -149,8 +167,11 @@ export declare const financeRouter: {
|
|
|
149
167
|
updatedAt: string;
|
|
150
168
|
category: string;
|
|
151
169
|
planned: number;
|
|
170
|
+
startDate: string;
|
|
171
|
+
endDate: string;
|
|
152
172
|
actual?: number | undefined;
|
|
153
173
|
remaining?: number | undefined;
|
|
174
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
154
175
|
};
|
|
155
176
|
relationships?: Record<string, unknown> | undefined;
|
|
156
177
|
links?: Record<string, string> | undefined;
|
|
@@ -358,7 +379,7 @@ export declare const financeRouter: {
|
|
|
358
379
|
farmId: string;
|
|
359
380
|
}>;
|
|
360
381
|
summary: "Create budget item";
|
|
361
|
-
description: "Create a new budget category";
|
|
382
|
+
description: "Create a new budget category with a specific date range (startDate and endDate). Budgets are matched to expenses based on whether the expense date falls within the budget period.";
|
|
362
383
|
method: "POST";
|
|
363
384
|
body: z.ZodObject<{
|
|
364
385
|
data: z.ZodObject<{
|
|
@@ -366,24 +387,39 @@ export declare const financeRouter: {
|
|
|
366
387
|
attributes: z.ZodObject<{
|
|
367
388
|
category: z.ZodString;
|
|
368
389
|
planned: z.ZodNumber;
|
|
390
|
+
startDate: z.ZodString;
|
|
391
|
+
endDate: z.ZodString;
|
|
392
|
+
period: z.ZodOptional<z.ZodEnum<["monthly", "quarterly", "annual", "custom", "legacy"]>>;
|
|
369
393
|
}, "strip", z.ZodTypeAny, {
|
|
370
394
|
category: string;
|
|
371
395
|
planned: number;
|
|
396
|
+
startDate: string;
|
|
397
|
+
endDate: string;
|
|
398
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
372
399
|
}, {
|
|
373
400
|
category: string;
|
|
374
401
|
planned: number;
|
|
402
|
+
startDate: string;
|
|
403
|
+
endDate: string;
|
|
404
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
375
405
|
}>;
|
|
376
406
|
}, "strip", z.ZodTypeAny, {
|
|
377
407
|
type: "budgets";
|
|
378
408
|
attributes: {
|
|
379
409
|
category: string;
|
|
380
410
|
planned: number;
|
|
411
|
+
startDate: string;
|
|
412
|
+
endDate: string;
|
|
413
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
381
414
|
};
|
|
382
415
|
}, {
|
|
383
416
|
type: "budgets";
|
|
384
417
|
attributes: {
|
|
385
418
|
category: string;
|
|
386
419
|
planned: number;
|
|
420
|
+
startDate: string;
|
|
421
|
+
endDate: string;
|
|
422
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
387
423
|
};
|
|
388
424
|
}>;
|
|
389
425
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -392,6 +428,9 @@ export declare const financeRouter: {
|
|
|
392
428
|
attributes: {
|
|
393
429
|
category: string;
|
|
394
430
|
planned: number;
|
|
431
|
+
startDate: string;
|
|
432
|
+
endDate: string;
|
|
433
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
395
434
|
};
|
|
396
435
|
};
|
|
397
436
|
}, {
|
|
@@ -400,6 +439,9 @@ export declare const financeRouter: {
|
|
|
400
439
|
attributes: {
|
|
401
440
|
category: string;
|
|
402
441
|
planned: number;
|
|
442
|
+
startDate: string;
|
|
443
|
+
endDate: string;
|
|
444
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
403
445
|
};
|
|
404
446
|
};
|
|
405
447
|
}>;
|
|
@@ -414,6 +456,9 @@ export declare const financeRouter: {
|
|
|
414
456
|
planned: z.ZodNumber;
|
|
415
457
|
actual: z.ZodOptional<z.ZodNumber>;
|
|
416
458
|
remaining: z.ZodOptional<z.ZodNumber>;
|
|
459
|
+
startDate: z.ZodString;
|
|
460
|
+
endDate: z.ZodString;
|
|
461
|
+
period: z.ZodOptional<z.ZodEnum<["monthly", "quarterly", "annual", "custom", "legacy"]>>;
|
|
417
462
|
} & {
|
|
418
463
|
createdAt: z.ZodString;
|
|
419
464
|
updatedAt: z.ZodString;
|
|
@@ -422,15 +467,21 @@ export declare const financeRouter: {
|
|
|
422
467
|
updatedAt: string;
|
|
423
468
|
category: string;
|
|
424
469
|
planned: number;
|
|
470
|
+
startDate: string;
|
|
471
|
+
endDate: string;
|
|
425
472
|
actual?: number | undefined;
|
|
426
473
|
remaining?: number | undefined;
|
|
474
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
427
475
|
}, {
|
|
428
476
|
createdAt: string;
|
|
429
477
|
updatedAt: string;
|
|
430
478
|
category: string;
|
|
431
479
|
planned: number;
|
|
480
|
+
startDate: string;
|
|
481
|
+
endDate: string;
|
|
432
482
|
actual?: number | undefined;
|
|
433
483
|
remaining?: number | undefined;
|
|
484
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
434
485
|
}>;
|
|
435
486
|
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
436
487
|
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -443,8 +494,11 @@ export declare const financeRouter: {
|
|
|
443
494
|
updatedAt: string;
|
|
444
495
|
category: string;
|
|
445
496
|
planned: number;
|
|
497
|
+
startDate: string;
|
|
498
|
+
endDate: string;
|
|
446
499
|
actual?: number | undefined;
|
|
447
500
|
remaining?: number | undefined;
|
|
501
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
448
502
|
};
|
|
449
503
|
relationships?: Record<string, unknown> | undefined;
|
|
450
504
|
links?: Record<string, string> | undefined;
|
|
@@ -457,8 +511,11 @@ export declare const financeRouter: {
|
|
|
457
511
|
updatedAt: string;
|
|
458
512
|
category: string;
|
|
459
513
|
planned: number;
|
|
514
|
+
startDate: string;
|
|
515
|
+
endDate: string;
|
|
460
516
|
actual?: number | undefined;
|
|
461
517
|
remaining?: number | undefined;
|
|
518
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
462
519
|
};
|
|
463
520
|
relationships?: Record<string, unknown> | undefined;
|
|
464
521
|
links?: Record<string, string> | undefined;
|
|
@@ -497,8 +554,11 @@ export declare const financeRouter: {
|
|
|
497
554
|
updatedAt: string;
|
|
498
555
|
category: string;
|
|
499
556
|
planned: number;
|
|
557
|
+
startDate: string;
|
|
558
|
+
endDate: string;
|
|
500
559
|
actual?: number | undefined;
|
|
501
560
|
remaining?: number | undefined;
|
|
561
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
502
562
|
};
|
|
503
563
|
relationships?: Record<string, unknown> | undefined;
|
|
504
564
|
links?: Record<string, string> | undefined;
|
|
@@ -523,8 +583,11 @@ export declare const financeRouter: {
|
|
|
523
583
|
updatedAt: string;
|
|
524
584
|
category: string;
|
|
525
585
|
planned: number;
|
|
586
|
+
startDate: string;
|
|
587
|
+
endDate: string;
|
|
526
588
|
actual?: number | undefined;
|
|
527
589
|
remaining?: number | undefined;
|
|
590
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
528
591
|
};
|
|
529
592
|
relationships?: Record<string, unknown> | undefined;
|
|
530
593
|
links?: Record<string, string> | undefined;
|
|
@@ -915,7 +978,7 @@ export declare const financeRouter: {
|
|
|
915
978
|
farmId: string;
|
|
916
979
|
}>;
|
|
917
980
|
summary: "Update budget item";
|
|
918
|
-
description: "Update a budget category";
|
|
981
|
+
description: "Update a budget category. Can update planned amount, date range (startDate/endDate), period type, or category name.";
|
|
919
982
|
method: "PATCH";
|
|
920
983
|
body: z.ZodObject<{
|
|
921
984
|
data: z.ZodObject<{
|
|
@@ -924,12 +987,21 @@ export declare const financeRouter: {
|
|
|
924
987
|
attributes: z.ZodObject<{
|
|
925
988
|
category: z.ZodOptional<z.ZodString>;
|
|
926
989
|
planned: z.ZodOptional<z.ZodNumber>;
|
|
990
|
+
startDate: z.ZodOptional<z.ZodString>;
|
|
991
|
+
endDate: z.ZodOptional<z.ZodString>;
|
|
992
|
+
period: z.ZodOptional<z.ZodEnum<["monthly", "quarterly", "annual", "custom", "legacy"]>>;
|
|
927
993
|
}, "strip", z.ZodTypeAny, {
|
|
928
994
|
category?: string | undefined;
|
|
929
995
|
planned?: number | undefined;
|
|
996
|
+
startDate?: string | undefined;
|
|
997
|
+
endDate?: string | undefined;
|
|
998
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
930
999
|
}, {
|
|
931
1000
|
category?: string | undefined;
|
|
932
1001
|
planned?: number | undefined;
|
|
1002
|
+
startDate?: string | undefined;
|
|
1003
|
+
endDate?: string | undefined;
|
|
1004
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
933
1005
|
}>;
|
|
934
1006
|
}, "strip", z.ZodTypeAny, {
|
|
935
1007
|
type: "budgets";
|
|
@@ -937,6 +1009,9 @@ export declare const financeRouter: {
|
|
|
937
1009
|
attributes: {
|
|
938
1010
|
category?: string | undefined;
|
|
939
1011
|
planned?: number | undefined;
|
|
1012
|
+
startDate?: string | undefined;
|
|
1013
|
+
endDate?: string | undefined;
|
|
1014
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
940
1015
|
};
|
|
941
1016
|
}, {
|
|
942
1017
|
type: "budgets";
|
|
@@ -944,6 +1019,9 @@ export declare const financeRouter: {
|
|
|
944
1019
|
attributes: {
|
|
945
1020
|
category?: string | undefined;
|
|
946
1021
|
planned?: number | undefined;
|
|
1022
|
+
startDate?: string | undefined;
|
|
1023
|
+
endDate?: string | undefined;
|
|
1024
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
947
1025
|
};
|
|
948
1026
|
}>;
|
|
949
1027
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -953,6 +1031,9 @@ export declare const financeRouter: {
|
|
|
953
1031
|
attributes: {
|
|
954
1032
|
category?: string | undefined;
|
|
955
1033
|
planned?: number | undefined;
|
|
1034
|
+
startDate?: string | undefined;
|
|
1035
|
+
endDate?: string | undefined;
|
|
1036
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
956
1037
|
};
|
|
957
1038
|
};
|
|
958
1039
|
}, {
|
|
@@ -962,6 +1043,9 @@ export declare const financeRouter: {
|
|
|
962
1043
|
attributes: {
|
|
963
1044
|
category?: string | undefined;
|
|
964
1045
|
planned?: number | undefined;
|
|
1046
|
+
startDate?: string | undefined;
|
|
1047
|
+
endDate?: string | undefined;
|
|
1048
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
965
1049
|
};
|
|
966
1050
|
};
|
|
967
1051
|
}>;
|
|
@@ -976,6 +1060,9 @@ export declare const financeRouter: {
|
|
|
976
1060
|
planned: z.ZodNumber;
|
|
977
1061
|
actual: z.ZodOptional<z.ZodNumber>;
|
|
978
1062
|
remaining: z.ZodOptional<z.ZodNumber>;
|
|
1063
|
+
startDate: z.ZodString;
|
|
1064
|
+
endDate: z.ZodString;
|
|
1065
|
+
period: z.ZodOptional<z.ZodEnum<["monthly", "quarterly", "annual", "custom", "legacy"]>>;
|
|
979
1066
|
} & {
|
|
980
1067
|
createdAt: z.ZodString;
|
|
981
1068
|
updatedAt: z.ZodString;
|
|
@@ -984,15 +1071,21 @@ export declare const financeRouter: {
|
|
|
984
1071
|
updatedAt: string;
|
|
985
1072
|
category: string;
|
|
986
1073
|
planned: number;
|
|
1074
|
+
startDate: string;
|
|
1075
|
+
endDate: string;
|
|
987
1076
|
actual?: number | undefined;
|
|
988
1077
|
remaining?: number | undefined;
|
|
1078
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
989
1079
|
}, {
|
|
990
1080
|
createdAt: string;
|
|
991
1081
|
updatedAt: string;
|
|
992
1082
|
category: string;
|
|
993
1083
|
planned: number;
|
|
1084
|
+
startDate: string;
|
|
1085
|
+
endDate: string;
|
|
994
1086
|
actual?: number | undefined;
|
|
995
1087
|
remaining?: number | undefined;
|
|
1088
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
996
1089
|
}>;
|
|
997
1090
|
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
998
1091
|
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -1005,8 +1098,11 @@ export declare const financeRouter: {
|
|
|
1005
1098
|
updatedAt: string;
|
|
1006
1099
|
category: string;
|
|
1007
1100
|
planned: number;
|
|
1101
|
+
startDate: string;
|
|
1102
|
+
endDate: string;
|
|
1008
1103
|
actual?: number | undefined;
|
|
1009
1104
|
remaining?: number | undefined;
|
|
1105
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
1010
1106
|
};
|
|
1011
1107
|
relationships?: Record<string, unknown> | undefined;
|
|
1012
1108
|
links?: Record<string, string> | undefined;
|
|
@@ -1019,8 +1115,11 @@ export declare const financeRouter: {
|
|
|
1019
1115
|
updatedAt: string;
|
|
1020
1116
|
category: string;
|
|
1021
1117
|
planned: number;
|
|
1118
|
+
startDate: string;
|
|
1119
|
+
endDate: string;
|
|
1022
1120
|
actual?: number | undefined;
|
|
1023
1121
|
remaining?: number | undefined;
|
|
1122
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
1024
1123
|
};
|
|
1025
1124
|
relationships?: Record<string, unknown> | undefined;
|
|
1026
1125
|
links?: Record<string, string> | undefined;
|
|
@@ -1059,8 +1158,11 @@ export declare const financeRouter: {
|
|
|
1059
1158
|
updatedAt: string;
|
|
1060
1159
|
category: string;
|
|
1061
1160
|
planned: number;
|
|
1161
|
+
startDate: string;
|
|
1162
|
+
endDate: string;
|
|
1062
1163
|
actual?: number | undefined;
|
|
1063
1164
|
remaining?: number | undefined;
|
|
1165
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
1064
1166
|
};
|
|
1065
1167
|
relationships?: Record<string, unknown> | undefined;
|
|
1066
1168
|
links?: Record<string, string> | undefined;
|
|
@@ -1085,8 +1187,11 @@ export declare const financeRouter: {
|
|
|
1085
1187
|
updatedAt: string;
|
|
1086
1188
|
category: string;
|
|
1087
1189
|
planned: number;
|
|
1190
|
+
startDate: string;
|
|
1191
|
+
endDate: string;
|
|
1088
1192
|
actual?: number | undefined;
|
|
1089
1193
|
remaining?: number | undefined;
|
|
1194
|
+
period?: "custom" | "monthly" | "quarterly" | "annual" | "legacy" | undefined;
|
|
1090
1195
|
};
|
|
1091
1196
|
relationships?: Record<string, unknown> | undefined;
|
|
1092
1197
|
links?: Record<string, string> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"finance.routes.d.ts","sourceRoot":"","sources":["../../src/routes/finance.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA6BxB,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"finance.routes.d.ts","sourceRoot":"","sources":["../../src/routes/finance.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA6BxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwQxB,CAAC"}
|
|
@@ -33,7 +33,7 @@ export const financeRouter = c.router({
|
|
|
33
33
|
422: jsonApiErrorResponseSchema,
|
|
34
34
|
},
|
|
35
35
|
summary: 'Create budget item',
|
|
36
|
-
description: 'Create a new budget category',
|
|
36
|
+
description: 'Create a new budget category with a specific date range (startDate and endDate). Budgets are matched to expenses based on whether the expense date falls within the budget period.',
|
|
37
37
|
},
|
|
38
38
|
updateBudget: {
|
|
39
39
|
method: 'PATCH',
|
|
@@ -51,7 +51,7 @@ export const financeRouter = c.router({
|
|
|
51
51
|
422: jsonApiErrorResponseSchema,
|
|
52
52
|
},
|
|
53
53
|
summary: 'Update budget item',
|
|
54
|
-
description: 'Update a budget category',
|
|
54
|
+
description: 'Update a budget category. Can update planned amount, date range (startDate/endDate), period type, or category name.',
|
|
55
55
|
},
|
|
56
56
|
deleteBudget: {
|
|
57
57
|
method: 'DELETE',
|
|
@@ -2816,32 +2816,36 @@ export declare const observationListResponseSchema: z.ZodObject<{
|
|
|
2816
2816
|
}[] | undefined;
|
|
2817
2817
|
}>;
|
|
2818
2818
|
export declare const observationListQuerySchema: z.ZodObject<{
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2819
|
+
'page[number]': z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
2820
|
+
'page[size]': z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
2821
|
+
'filter[startDate]': z.ZodOptional<z.ZodString>;
|
|
2822
|
+
'filter[endDate]': z.ZodOptional<z.ZodString>;
|
|
2823
|
+
'filter[crop]': z.ZodOptional<z.ZodString>;
|
|
2824
|
+
} & {
|
|
2825
|
+
'filter[fieldId]': z.ZodOptional<z.ZodString>;
|
|
2826
|
+
'filter[status]': z.ZodOptional<z.ZodEnum<["pending", "processing", "completed", "failed"]>>;
|
|
2827
|
+
'filter[observationType]': z.ZodOptional<z.ZodString>;
|
|
2828
|
+
'filter[severity]': z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
|
|
2827
2829
|
}, "strip", z.ZodTypeAny, {
|
|
2828
|
-
|
|
2829
|
-
page
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
observationType?: string | undefined;
|
|
2830
|
+
'page[number]'?: number | undefined;
|
|
2831
|
+
'page[size]'?: number | undefined;
|
|
2832
|
+
'filter[startDate]'?: string | undefined;
|
|
2833
|
+
'filter[endDate]'?: string | undefined;
|
|
2834
|
+
'filter[status]'?: "pending" | "completed" | "failed" | "processing" | undefined;
|
|
2835
|
+
'filter[crop]'?: string | undefined;
|
|
2836
|
+
'filter[fieldId]'?: string | undefined;
|
|
2837
|
+
'filter[observationType]'?: string | undefined;
|
|
2838
|
+
'filter[severity]'?: "critical" | "low" | "medium" | "high" | undefined;
|
|
2836
2839
|
}, {
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2840
|
+
'page[number]'?: number | undefined;
|
|
2841
|
+
'page[size]'?: number | undefined;
|
|
2842
|
+
'filter[startDate]'?: string | undefined;
|
|
2843
|
+
'filter[endDate]'?: string | undefined;
|
|
2844
|
+
'filter[status]'?: "pending" | "completed" | "failed" | "processing" | undefined;
|
|
2845
|
+
'filter[crop]'?: string | undefined;
|
|
2846
|
+
'filter[fieldId]'?: string | undefined;
|
|
2847
|
+
'filter[observationType]'?: string | undefined;
|
|
2848
|
+
'filter[severity]'?: "critical" | "low" | "medium" | "high" | undefined;
|
|
2845
2849
|
}>;
|
|
2846
2850
|
export declare const observationStatsQuerySchema: z.ZodObject<{
|
|
2847
2851
|
startDate: z.ZodOptional<z.ZodString>;
|
|
@@ -2862,5 +2866,15 @@ export type UpdateObservationActionInput = z.infer<typeof updateObservationActio
|
|
|
2862
2866
|
export type ObservationResponse = z.infer<typeof observationResponseSchema>;
|
|
2863
2867
|
export type ObservationListResponse = z.infer<typeof observationListResponseSchema>;
|
|
2864
2868
|
export type ObservationListQuery = z.infer<typeof observationListQuerySchema>;
|
|
2869
|
+
export type ObservationListQueryInternal = {
|
|
2870
|
+
page: number;
|
|
2871
|
+
pageSize: number;
|
|
2872
|
+
fieldId?: string;
|
|
2873
|
+
status?: 'pending' | 'processing' | 'completed' | 'failed';
|
|
2874
|
+
observationType?: string;
|
|
2875
|
+
severity?: 'low' | 'medium' | 'high' | 'critical';
|
|
2876
|
+
startDate?: string;
|
|
2877
|
+
endDate?: string;
|
|
2878
|
+
};
|
|
2865
2879
|
export type ObservationStatsQuery = z.infer<typeof observationStatsQuerySchema>;
|
|
2866
2880
|
//# sourceMappingURL=field-observations.schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-observations.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/field-observations.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"field-observations.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/field-observations.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB;;GAEG;AAGH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsGd,CAAC;AAG3B,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8B5C,CAAC;AAGH,eAAO,MAAM,uCAAuC;;;;;;;;;;;;EAIlD,CAAC;AAGH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAG9E,MAAM,MAAM,4BAA4B,GAAG;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,SAAS,GAAG,YAAY,GAAG,WAAW,GAAG,QAAQ,CAAC;IAC3D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { timestampsSchema, createJsonApiResourceSchema, jsonApiSingleResponseSchema, jsonApiCollectionResponseSchema, } from './common.schemas';
|
|
2
|
+
import { timestampsSchema, createJsonApiResourceSchema, jsonApiSingleResponseSchema, jsonApiCollectionResponseSchema, jsonApiPaginationQuerySchema, jsonApiFilterQuerySchema, } from './common.schemas';
|
|
3
3
|
import { recommendationSchema } from './recommendations.schemas';
|
|
4
4
|
/**
|
|
5
5
|
* Field Observation schemas - JSON:API compliant
|
|
@@ -144,16 +144,14 @@ export const updateObservationActionInputSchema = createJsonApiResourceSchema('o
|
|
|
144
144
|
export const observationResponseSchema = jsonApiSingleResponseSchema(observationResourceSchema);
|
|
145
145
|
export const observationListResponseSchema = jsonApiCollectionResponseSchema(observationResourceSchema);
|
|
146
146
|
// Query schemas
|
|
147
|
-
export const observationListQuerySchema =
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
pageSize: z.string().default('20'),
|
|
156
|
-
});
|
|
147
|
+
export const observationListQuerySchema = jsonApiPaginationQuerySchema
|
|
148
|
+
.merge(jsonApiFilterQuerySchema)
|
|
149
|
+
.merge(z.object({
|
|
150
|
+
'filter[fieldId]': z.string().uuid().optional(),
|
|
151
|
+
'filter[status]': z.enum(['pending', 'processing', 'completed', 'failed']).optional(),
|
|
152
|
+
'filter[observationType]': z.string().optional(),
|
|
153
|
+
'filter[severity]': z.enum(['low', 'medium', 'high', 'critical']).optional(),
|
|
154
|
+
}));
|
|
157
155
|
export const observationStatsQuerySchema = z.object({
|
|
158
156
|
startDate: z.string().datetime().optional(),
|
|
159
157
|
endDate: z.string().datetime().optional(),
|