@deepintel-ltd/farmpro-contracts 1.36.13 → 1.36.15
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/integrations.routes.d.ts +8 -8
- package/dist/routes/live-monitor.routes.d.ts +626 -0
- package/dist/routes/live-monitor.routes.d.ts.map +1 -1
- package/dist/routes/live-monitor.routes.js +14 -1
- package/dist/routes/market-intelligence.routes.d.ts +32 -32
- package/dist/schemas/integrations.schemas.d.ts +8 -8
- package/dist/schemas/live-monitor.schemas.d.ts +1334 -0
- package/dist/schemas/live-monitor.schemas.d.ts.map +1 -1
- package/dist/schemas/live-monitor.schemas.js +116 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live-monitor.routes.d.ts","sourceRoot":"","sources":["../../src/routes/live-monitor.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"live-monitor.routes.d.ts","sourceRoot":"","sources":["../../src/routes/live-monitor.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBxB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+F5B,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { initContract } from '@ts-rest/core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { liveMonitorSummarySchema, liveMonitorCamerasResponseSchema, liveMonitorSensorsResponseSchema, liveMonitorEventsQuerySchema, liveMonitorEventsResponseSchema, cameraStreamTokenResponseSchema, captureSnapshotQuerySchema, captureSnapshotResponseSchema, liveMonitorErrorSchema, } from '../schemas/live-monitor.schemas';
|
|
3
|
+
import { liveMonitorSummarySchema, liveMonitorCamerasResponseSchema, liveMonitorSensorsResponseSchema, liveMonitorEventsQuerySchema, liveMonitorEventsResponseSchema, cameraStreamTokenResponseSchema, captureSnapshotQuerySchema, captureSnapshotResponseSchema, liveMonitorErrorSchema, liveMonitorFieldStatesResponseSchema, } from '../schemas/live-monitor.schemas';
|
|
4
4
|
const c = initContract();
|
|
5
5
|
export const liveMonitorRouter = c.router({
|
|
6
6
|
/**
|
|
@@ -15,6 +15,19 @@ export const liveMonitorRouter = c.router({
|
|
|
15
15
|
},
|
|
16
16
|
summary: 'Get live monitor summary for a farm',
|
|
17
17
|
},
|
|
18
|
+
/**
|
|
19
|
+
* One fused view per field: satellite health, water balance, radar, latest
|
|
20
|
+
* team report, open work and a next step — ordered by what needs attention.
|
|
21
|
+
*/
|
|
22
|
+
getFieldStates: {
|
|
23
|
+
method: 'GET',
|
|
24
|
+
path: '/farms/:farmId/live-monitor/field-states',
|
|
25
|
+
responses: {
|
|
26
|
+
200: liveMonitorFieldStatesResponseSchema,
|
|
27
|
+
404: liveMonitorErrorSchema,
|
|
28
|
+
},
|
|
29
|
+
summary: 'Get per-field state (health, water, radar, reports, next step) for live monitor',
|
|
30
|
+
},
|
|
18
31
|
/**
|
|
19
32
|
* List all cameras across every field in the farm
|
|
20
33
|
*/
|
|
@@ -400,15 +400,15 @@ export declare const marketPriceTrendSchema: z.ZodObject<{
|
|
|
400
400
|
currency: string;
|
|
401
401
|
unit: string;
|
|
402
402
|
label: string;
|
|
403
|
-
market: string;
|
|
404
|
-
distanceKm: number | null;
|
|
405
|
-
commodityKey: string;
|
|
406
|
-
scope: "zone" | "market" | "national";
|
|
407
403
|
latest: {
|
|
408
404
|
month: string;
|
|
409
405
|
price: number;
|
|
410
406
|
observed: boolean;
|
|
411
407
|
};
|
|
408
|
+
market: string;
|
|
409
|
+
distanceKm: number | null;
|
|
410
|
+
commodityKey: string;
|
|
411
|
+
scope: "zone" | "market" | "national";
|
|
412
412
|
previousMonthPrice: number | null;
|
|
413
413
|
yearAgoPrice: number | null;
|
|
414
414
|
sameMonth3yAverage: number | null;
|
|
@@ -422,15 +422,15 @@ export declare const marketPriceTrendSchema: z.ZodObject<{
|
|
|
422
422
|
currency: string;
|
|
423
423
|
unit: string;
|
|
424
424
|
label: string;
|
|
425
|
-
market: string;
|
|
426
|
-
distanceKm: number | null;
|
|
427
|
-
commodityKey: string;
|
|
428
|
-
scope: "zone" | "market" | "national";
|
|
429
425
|
latest: {
|
|
430
426
|
month: string;
|
|
431
427
|
price: number;
|
|
432
428
|
observed: boolean;
|
|
433
429
|
};
|
|
430
|
+
market: string;
|
|
431
|
+
distanceKm: number | null;
|
|
432
|
+
commodityKey: string;
|
|
433
|
+
scope: "zone" | "market" | "national";
|
|
434
434
|
previousMonthPrice: number | null;
|
|
435
435
|
yearAgoPrice: number | null;
|
|
436
436
|
sameMonth3yAverage: number | null;
|
|
@@ -462,15 +462,15 @@ export declare const marketPriceTrendSchema: z.ZodObject<{
|
|
|
462
462
|
currency: string;
|
|
463
463
|
unit: string;
|
|
464
464
|
label: string;
|
|
465
|
-
market: string;
|
|
466
|
-
distanceKm: number | null;
|
|
467
|
-
commodityKey: string;
|
|
468
|
-
scope: "zone" | "market" | "national";
|
|
469
465
|
latest: {
|
|
470
466
|
month: string;
|
|
471
467
|
price: number;
|
|
472
468
|
observed: boolean;
|
|
473
469
|
};
|
|
470
|
+
market: string;
|
|
471
|
+
distanceKm: number | null;
|
|
472
|
+
commodityKey: string;
|
|
473
|
+
scope: "zone" | "market" | "national";
|
|
474
474
|
previousMonthPrice: number | null;
|
|
475
475
|
yearAgoPrice: number | null;
|
|
476
476
|
sameMonth3yAverage: number | null;
|
|
@@ -492,15 +492,15 @@ export declare const marketPriceTrendSchema: z.ZodObject<{
|
|
|
492
492
|
currency: string;
|
|
493
493
|
unit: string;
|
|
494
494
|
label: string;
|
|
495
|
-
market: string;
|
|
496
|
-
distanceKm: number | null;
|
|
497
|
-
commodityKey: string;
|
|
498
|
-
scope: "zone" | "market" | "national";
|
|
499
495
|
latest: {
|
|
500
496
|
month: string;
|
|
501
497
|
price: number;
|
|
502
498
|
observed: boolean;
|
|
503
499
|
};
|
|
500
|
+
market: string;
|
|
501
|
+
distanceKm: number | null;
|
|
502
|
+
commodityKey: string;
|
|
503
|
+
scope: "zone" | "market" | "national";
|
|
504
504
|
previousMonthPrice: number | null;
|
|
505
505
|
yearAgoPrice: number | null;
|
|
506
506
|
sameMonth3yAverage: number | null;
|
|
@@ -2458,15 +2458,15 @@ export declare const marketIntelligenceRouter: {
|
|
|
2458
2458
|
currency: string;
|
|
2459
2459
|
unit: string;
|
|
2460
2460
|
label: string;
|
|
2461
|
-
market: string;
|
|
2462
|
-
distanceKm: number | null;
|
|
2463
|
-
commodityKey: string;
|
|
2464
|
-
scope: "zone" | "market" | "national";
|
|
2465
2461
|
latest: {
|
|
2466
2462
|
month: string;
|
|
2467
2463
|
price: number;
|
|
2468
2464
|
observed: boolean;
|
|
2469
2465
|
};
|
|
2466
|
+
market: string;
|
|
2467
|
+
distanceKm: number | null;
|
|
2468
|
+
commodityKey: string;
|
|
2469
|
+
scope: "zone" | "market" | "national";
|
|
2470
2470
|
previousMonthPrice: number | null;
|
|
2471
2471
|
yearAgoPrice: number | null;
|
|
2472
2472
|
sameMonth3yAverage: number | null;
|
|
@@ -2480,15 +2480,15 @@ export declare const marketIntelligenceRouter: {
|
|
|
2480
2480
|
currency: string;
|
|
2481
2481
|
unit: string;
|
|
2482
2482
|
label: string;
|
|
2483
|
-
market: string;
|
|
2484
|
-
distanceKm: number | null;
|
|
2485
|
-
commodityKey: string;
|
|
2486
|
-
scope: "zone" | "market" | "national";
|
|
2487
2483
|
latest: {
|
|
2488
2484
|
month: string;
|
|
2489
2485
|
price: number;
|
|
2490
2486
|
observed: boolean;
|
|
2491
2487
|
};
|
|
2488
|
+
market: string;
|
|
2489
|
+
distanceKm: number | null;
|
|
2490
|
+
commodityKey: string;
|
|
2491
|
+
scope: "zone" | "market" | "national";
|
|
2492
2492
|
previousMonthPrice: number | null;
|
|
2493
2493
|
yearAgoPrice: number | null;
|
|
2494
2494
|
sameMonth3yAverage: number | null;
|
|
@@ -2520,15 +2520,15 @@ export declare const marketIntelligenceRouter: {
|
|
|
2520
2520
|
currency: string;
|
|
2521
2521
|
unit: string;
|
|
2522
2522
|
label: string;
|
|
2523
|
-
market: string;
|
|
2524
|
-
distanceKm: number | null;
|
|
2525
|
-
commodityKey: string;
|
|
2526
|
-
scope: "zone" | "market" | "national";
|
|
2527
2523
|
latest: {
|
|
2528
2524
|
month: string;
|
|
2529
2525
|
price: number;
|
|
2530
2526
|
observed: boolean;
|
|
2531
2527
|
};
|
|
2528
|
+
market: string;
|
|
2529
|
+
distanceKm: number | null;
|
|
2530
|
+
commodityKey: string;
|
|
2531
|
+
scope: "zone" | "market" | "national";
|
|
2532
2532
|
previousMonthPrice: number | null;
|
|
2533
2533
|
yearAgoPrice: number | null;
|
|
2534
2534
|
sameMonth3yAverage: number | null;
|
|
@@ -2550,15 +2550,15 @@ export declare const marketIntelligenceRouter: {
|
|
|
2550
2550
|
currency: string;
|
|
2551
2551
|
unit: string;
|
|
2552
2552
|
label: string;
|
|
2553
|
-
market: string;
|
|
2554
|
-
distanceKm: number | null;
|
|
2555
|
-
commodityKey: string;
|
|
2556
|
-
scope: "zone" | "market" | "national";
|
|
2557
2553
|
latest: {
|
|
2558
2554
|
month: string;
|
|
2559
2555
|
price: number;
|
|
2560
2556
|
observed: boolean;
|
|
2561
2557
|
};
|
|
2558
|
+
market: string;
|
|
2559
|
+
distanceKm: number | null;
|
|
2560
|
+
commodityKey: string;
|
|
2561
|
+
scope: "zone" | "market" | "national";
|
|
2562
2562
|
previousMonthPrice: number | null;
|
|
2563
2563
|
yearAgoPrice: number | null;
|
|
2564
2564
|
sameMonth3yAverage: number | null;
|
|
@@ -598,22 +598,22 @@ export declare const cropConditionSchema: z.ZodObject<{
|
|
|
598
598
|
capturedAt: string;
|
|
599
599
|
mode: "ndvi" | "sar";
|
|
600
600
|
ndvi?: number | undefined;
|
|
601
|
+
ratio?: number | undefined;
|
|
602
|
+
ratioChangePercent?: number | undefined;
|
|
601
603
|
vv?: number | undefined;
|
|
602
604
|
vh?: number | undefined;
|
|
603
|
-
ratio?: number | undefined;
|
|
604
605
|
previousRatio?: number | undefined;
|
|
605
|
-
ratioChangePercent?: number | undefined;
|
|
606
606
|
}, {
|
|
607
607
|
fieldId: string;
|
|
608
608
|
note: string;
|
|
609
609
|
capturedAt: string;
|
|
610
610
|
mode: "ndvi" | "sar";
|
|
611
611
|
ndvi?: number | undefined;
|
|
612
|
+
ratio?: number | undefined;
|
|
613
|
+
ratioChangePercent?: number | undefined;
|
|
612
614
|
vv?: number | undefined;
|
|
613
615
|
vh?: number | undefined;
|
|
614
|
-
ratio?: number | undefined;
|
|
615
616
|
previousRatio?: number | undefined;
|
|
616
|
-
ratioChangePercent?: number | undefined;
|
|
617
617
|
}>;
|
|
618
618
|
provenance: z.ZodObject<{
|
|
619
619
|
provider: z.ZodString;
|
|
@@ -638,11 +638,11 @@ export declare const cropConditionSchema: z.ZodObject<{
|
|
|
638
638
|
capturedAt: string;
|
|
639
639
|
mode: "ndvi" | "sar";
|
|
640
640
|
ndvi?: number | undefined;
|
|
641
|
+
ratio?: number | undefined;
|
|
642
|
+
ratioChangePercent?: number | undefined;
|
|
641
643
|
vv?: number | undefined;
|
|
642
644
|
vh?: number | undefined;
|
|
643
|
-
ratio?: number | undefined;
|
|
644
645
|
previousRatio?: number | undefined;
|
|
645
|
-
ratioChangePercent?: number | undefined;
|
|
646
646
|
};
|
|
647
647
|
provenance: {
|
|
648
648
|
confidence: number;
|
|
@@ -657,11 +657,11 @@ export declare const cropConditionSchema: z.ZodObject<{
|
|
|
657
657
|
capturedAt: string;
|
|
658
658
|
mode: "ndvi" | "sar";
|
|
659
659
|
ndvi?: number | undefined;
|
|
660
|
+
ratio?: number | undefined;
|
|
661
|
+
ratioChangePercent?: number | undefined;
|
|
660
662
|
vv?: number | undefined;
|
|
661
663
|
vh?: number | undefined;
|
|
662
|
-
ratio?: number | undefined;
|
|
663
664
|
previousRatio?: number | undefined;
|
|
664
|
-
ratioChangePercent?: number | undefined;
|
|
665
665
|
};
|
|
666
666
|
provenance: {
|
|
667
667
|
confidence: number;
|