@deepintel-ltd/farmpro-contracts 1.36.12 → 1.36.14
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 +612 -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/routes/nutrient-plan.routes.d.ts +97 -0
- package/dist/routes/nutrient-plan.routes.d.ts.map +1 -1
- package/dist/routes/trade-cash-events.routes.d.ts +6 -6
- package/dist/schemas/farm-fertilizers.schemas.d.ts +175 -0
- package/dist/schemas/farm-fertilizers.schemas.d.ts.map +1 -1
- package/dist/schemas/farm-fertilizers.schemas.js +25 -0
- package/dist/schemas/integrations.schemas.d.ts +8 -8
- package/dist/schemas/live-monitor.schemas.d.ts +1301 -0
- package/dist/schemas/live-monitor.schemas.d.ts.map +1 -1
- package/dist/schemas/live-monitor.schemas.js +113 -0
- package/dist/schemas/trade-cash-events.schemas.d.ts +8 -8
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -8304,6 +8304,69 @@ export declare const nutrientPlanRouter: {
|
|
|
8304
8304
|
suggestedProduct: string | null;
|
|
8305
8305
|
}>, "many">;
|
|
8306
8306
|
warnings: z.ZodArray<z.ZodString, "many">;
|
|
8307
|
+
costCompare: z.ZodNullable<z.ZodObject<{
|
|
8308
|
+
currency: z.ZodLiteral<"NGN">;
|
|
8309
|
+
asOf: z.ZodString;
|
|
8310
|
+
weeksRemaining: z.ZodNumber;
|
|
8311
|
+
current: z.ZodObject<{
|
|
8312
|
+
setId: z.ZodString;
|
|
8313
|
+
setName: z.ZodString;
|
|
8314
|
+
seasonCostNaira: z.ZodNumber;
|
|
8315
|
+
}, "strip", z.ZodTypeAny, {
|
|
8316
|
+
setId: string;
|
|
8317
|
+
setName: string;
|
|
8318
|
+
seasonCostNaira: number;
|
|
8319
|
+
}, {
|
|
8320
|
+
setId: string;
|
|
8321
|
+
setName: string;
|
|
8322
|
+
seasonCostNaira: number;
|
|
8323
|
+
}>;
|
|
8324
|
+
saltKit: z.ZodObject<{
|
|
8325
|
+
setId: z.ZodString;
|
|
8326
|
+
setName: z.ZodString;
|
|
8327
|
+
seasonCostNaira: z.ZodNumber;
|
|
8328
|
+
}, "strip", z.ZodTypeAny, {
|
|
8329
|
+
setId: string;
|
|
8330
|
+
setName: string;
|
|
8331
|
+
seasonCostNaira: number;
|
|
8332
|
+
}, {
|
|
8333
|
+
setId: string;
|
|
8334
|
+
setName: string;
|
|
8335
|
+
seasonCostNaira: number;
|
|
8336
|
+
}>;
|
|
8337
|
+
savingNaira: z.ZodNumber;
|
|
8338
|
+
}, "strip", z.ZodTypeAny, {
|
|
8339
|
+
current: {
|
|
8340
|
+
setId: string;
|
|
8341
|
+
setName: string;
|
|
8342
|
+
seasonCostNaira: number;
|
|
8343
|
+
};
|
|
8344
|
+
currency: "NGN";
|
|
8345
|
+
asOf: string;
|
|
8346
|
+
weeksRemaining: number;
|
|
8347
|
+
saltKit: {
|
|
8348
|
+
setId: string;
|
|
8349
|
+
setName: string;
|
|
8350
|
+
seasonCostNaira: number;
|
|
8351
|
+
};
|
|
8352
|
+
savingNaira: number;
|
|
8353
|
+
}, {
|
|
8354
|
+
current: {
|
|
8355
|
+
setId: string;
|
|
8356
|
+
setName: string;
|
|
8357
|
+
seasonCostNaira: number;
|
|
8358
|
+
};
|
|
8359
|
+
currency: "NGN";
|
|
8360
|
+
asOf: string;
|
|
8361
|
+
weeksRemaining: number;
|
|
8362
|
+
saltKit: {
|
|
8363
|
+
setId: string;
|
|
8364
|
+
setName: string;
|
|
8365
|
+
seasonCostNaira: number;
|
|
8366
|
+
};
|
|
8367
|
+
savingNaira: number;
|
|
8368
|
+
}>>;
|
|
8369
|
+
substitutions: z.ZodArray<z.ZodString, "many">;
|
|
8307
8370
|
}, "strip", z.ZodTypeAny, {
|
|
8308
8371
|
status: "ok" | "no-plan";
|
|
8309
8372
|
message: string | null;
|
|
@@ -8437,6 +8500,23 @@ export declare const nutrientPlanRouter: {
|
|
|
8437
8500
|
suggestedProduct: string | null;
|
|
8438
8501
|
}[];
|
|
8439
8502
|
warnings: string[];
|
|
8503
|
+
costCompare: {
|
|
8504
|
+
current: {
|
|
8505
|
+
setId: string;
|
|
8506
|
+
setName: string;
|
|
8507
|
+
seasonCostNaira: number;
|
|
8508
|
+
};
|
|
8509
|
+
currency: "NGN";
|
|
8510
|
+
asOf: string;
|
|
8511
|
+
weeksRemaining: number;
|
|
8512
|
+
saltKit: {
|
|
8513
|
+
setId: string;
|
|
8514
|
+
setName: string;
|
|
8515
|
+
seasonCostNaira: number;
|
|
8516
|
+
};
|
|
8517
|
+
savingNaira: number;
|
|
8518
|
+
} | null;
|
|
8519
|
+
substitutions: string[];
|
|
8440
8520
|
}, {
|
|
8441
8521
|
status: "ok" | "no-plan";
|
|
8442
8522
|
message: string | null;
|
|
@@ -8570,6 +8650,23 @@ export declare const nutrientPlanRouter: {
|
|
|
8570
8650
|
suggestedProduct: string | null;
|
|
8571
8651
|
}[];
|
|
8572
8652
|
warnings: string[];
|
|
8653
|
+
costCompare: {
|
|
8654
|
+
current: {
|
|
8655
|
+
setId: string;
|
|
8656
|
+
setName: string;
|
|
8657
|
+
seasonCostNaira: number;
|
|
8658
|
+
};
|
|
8659
|
+
currency: "NGN";
|
|
8660
|
+
asOf: string;
|
|
8661
|
+
weeksRemaining: number;
|
|
8662
|
+
saltKit: {
|
|
8663
|
+
setId: string;
|
|
8664
|
+
setName: string;
|
|
8665
|
+
seasonCostNaira: number;
|
|
8666
|
+
};
|
|
8667
|
+
savingNaira: number;
|
|
8668
|
+
} | null;
|
|
8669
|
+
substitutions: string[];
|
|
8573
8670
|
}>;
|
|
8574
8671
|
404: z.ZodObject<{
|
|
8575
8672
|
message: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nutrient-plan.routes.d.ts","sourceRoot":"","sources":["../../src/routes/nutrient-plan.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0BxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;YAWzB,qFAAqF;;YAErF,wFAAwF;;YAExF,kDAAkD;;YAKlD,gFAAgF
|
|
1
|
+
{"version":3,"file":"nutrient-plan.routes.d.ts","sourceRoot":"","sources":["../../src/routes/nutrient-plan.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0BxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;YAWzB,qFAAqF;;YAErF,wFAAwF;;YAExF,kDAAkD;;YAKlD,gFAAgF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4IpF,CAAC"}
|
|
@@ -3563,9 +3563,9 @@ export declare const tradeCashEventsRouter: {
|
|
|
3563
3563
|
}, "strip", z.ZodTypeAny, {
|
|
3564
3564
|
received: number;
|
|
3565
3565
|
currency: string;
|
|
3566
|
+
asOf: string;
|
|
3566
3567
|
available: number;
|
|
3567
3568
|
computedAt: string;
|
|
3568
|
-
asOf: string;
|
|
3569
3569
|
returnedToFunders: number;
|
|
3570
3570
|
inSourcing: number;
|
|
3571
3571
|
unallocatedSpend: number;
|
|
@@ -3637,9 +3637,9 @@ export declare const tradeCashEventsRouter: {
|
|
|
3637
3637
|
}, {
|
|
3638
3638
|
received: number;
|
|
3639
3639
|
currency: string;
|
|
3640
|
+
asOf: string;
|
|
3640
3641
|
available: number;
|
|
3641
3642
|
computedAt: string;
|
|
3642
|
-
asOf: string;
|
|
3643
3643
|
returnedToFunders: number;
|
|
3644
3644
|
inSourcing: number;
|
|
3645
3645
|
unallocatedSpend: number;
|
|
@@ -3715,9 +3715,9 @@ export declare const tradeCashEventsRouter: {
|
|
|
3715
3715
|
attributes: {
|
|
3716
3716
|
received: number;
|
|
3717
3717
|
currency: string;
|
|
3718
|
+
asOf: string;
|
|
3718
3719
|
available: number;
|
|
3719
3720
|
computedAt: string;
|
|
3720
|
-
asOf: string;
|
|
3721
3721
|
returnedToFunders: number;
|
|
3722
3722
|
inSourcing: number;
|
|
3723
3723
|
unallocatedSpend: number;
|
|
@@ -3793,9 +3793,9 @@ export declare const tradeCashEventsRouter: {
|
|
|
3793
3793
|
attributes: {
|
|
3794
3794
|
received: number;
|
|
3795
3795
|
currency: string;
|
|
3796
|
+
asOf: string;
|
|
3796
3797
|
available: number;
|
|
3797
3798
|
computedAt: string;
|
|
3798
|
-
asOf: string;
|
|
3799
3799
|
returnedToFunders: number;
|
|
3800
3800
|
inSourcing: number;
|
|
3801
3801
|
unallocatedSpend: number;
|
|
@@ -3873,9 +3873,9 @@ export declare const tradeCashEventsRouter: {
|
|
|
3873
3873
|
attributes: {
|
|
3874
3874
|
received: number;
|
|
3875
3875
|
currency: string;
|
|
3876
|
+
asOf: string;
|
|
3876
3877
|
available: number;
|
|
3877
3878
|
computedAt: string;
|
|
3878
|
-
asOf: string;
|
|
3879
3879
|
returnedToFunders: number;
|
|
3880
3880
|
inSourcing: number;
|
|
3881
3881
|
unallocatedSpend: number;
|
|
@@ -3953,9 +3953,9 @@ export declare const tradeCashEventsRouter: {
|
|
|
3953
3953
|
attributes: {
|
|
3954
3954
|
received: number;
|
|
3955
3955
|
currency: string;
|
|
3956
|
+
asOf: string;
|
|
3956
3957
|
available: number;
|
|
3957
3958
|
computedAt: string;
|
|
3958
|
-
asOf: string;
|
|
3959
3959
|
returnedToFunders: number;
|
|
3960
3960
|
inSourcing: number;
|
|
3961
3961
|
unallocatedSpend: number;
|
|
@@ -572,6 +572,78 @@ export declare const fertilizerRequirementSchema: z.ZodObject<{
|
|
|
572
572
|
};
|
|
573
573
|
}>;
|
|
574
574
|
export type FertilizerRequirementContract = z.infer<typeof fertilizerRequirementSchema>;
|
|
575
|
+
/**
|
|
576
|
+
* What the rest of the season's fertilizer costs on the current set against the plain soluble-salt kit. Prices are the
|
|
577
|
+
* farm's own recorded cost where it has one, else dated reference prices; absent when a price or the plant count is
|
|
578
|
+
* not known, never filled with a guess.
|
|
579
|
+
*/
|
|
580
|
+
export declare const costCompareSchema: z.ZodObject<{
|
|
581
|
+
currency: z.ZodLiteral<"NGN">;
|
|
582
|
+
/** Date of the reference prices. */
|
|
583
|
+
asOf: z.ZodString;
|
|
584
|
+
weeksRemaining: z.ZodNumber;
|
|
585
|
+
current: z.ZodObject<{
|
|
586
|
+
setId: z.ZodString;
|
|
587
|
+
setName: z.ZodString;
|
|
588
|
+
/** Naira for the rest of the season at standard rates, to the nearest hundred. */
|
|
589
|
+
seasonCostNaira: z.ZodNumber;
|
|
590
|
+
}, "strip", z.ZodTypeAny, {
|
|
591
|
+
setId: string;
|
|
592
|
+
setName: string;
|
|
593
|
+
seasonCostNaira: number;
|
|
594
|
+
}, {
|
|
595
|
+
setId: string;
|
|
596
|
+
setName: string;
|
|
597
|
+
seasonCostNaira: number;
|
|
598
|
+
}>;
|
|
599
|
+
saltKit: z.ZodObject<{
|
|
600
|
+
setId: z.ZodString;
|
|
601
|
+
setName: z.ZodString;
|
|
602
|
+
/** Naira for the rest of the season at standard rates, to the nearest hundred. */
|
|
603
|
+
seasonCostNaira: z.ZodNumber;
|
|
604
|
+
}, "strip", z.ZodTypeAny, {
|
|
605
|
+
setId: string;
|
|
606
|
+
setName: string;
|
|
607
|
+
seasonCostNaira: number;
|
|
608
|
+
}, {
|
|
609
|
+
setId: string;
|
|
610
|
+
setName: string;
|
|
611
|
+
seasonCostNaira: number;
|
|
612
|
+
}>;
|
|
613
|
+
/** What switching to the salt kit saves for the rest of the season; 0 when it would not. */
|
|
614
|
+
savingNaira: z.ZodNumber;
|
|
615
|
+
}, "strip", z.ZodTypeAny, {
|
|
616
|
+
current: {
|
|
617
|
+
setId: string;
|
|
618
|
+
setName: string;
|
|
619
|
+
seasonCostNaira: number;
|
|
620
|
+
};
|
|
621
|
+
currency: "NGN";
|
|
622
|
+
asOf: string;
|
|
623
|
+
weeksRemaining: number;
|
|
624
|
+
saltKit: {
|
|
625
|
+
setId: string;
|
|
626
|
+
setName: string;
|
|
627
|
+
seasonCostNaira: number;
|
|
628
|
+
};
|
|
629
|
+
savingNaira: number;
|
|
630
|
+
}, {
|
|
631
|
+
current: {
|
|
632
|
+
setId: string;
|
|
633
|
+
setName: string;
|
|
634
|
+
seasonCostNaira: number;
|
|
635
|
+
};
|
|
636
|
+
currency: "NGN";
|
|
637
|
+
asOf: string;
|
|
638
|
+
weeksRemaining: number;
|
|
639
|
+
saltKit: {
|
|
640
|
+
setId: string;
|
|
641
|
+
setName: string;
|
|
642
|
+
seasonCostNaira: number;
|
|
643
|
+
};
|
|
644
|
+
savingNaira: number;
|
|
645
|
+
}>;
|
|
646
|
+
export type CostCompareContract = z.infer<typeof costCompareSchema>;
|
|
575
647
|
export declare const uncoveredRoleSchema: z.ZodObject<{
|
|
576
648
|
role: z.ZodString;
|
|
577
649
|
message: z.ZodString;
|
|
@@ -1030,6 +1102,75 @@ export declare const fertilizerRequirementsResponseSchema: z.ZodObject<{
|
|
|
1030
1102
|
suggestedProduct: string | null;
|
|
1031
1103
|
}>, "many">;
|
|
1032
1104
|
warnings: z.ZodArray<z.ZodString, "many">;
|
|
1105
|
+
/** The rest of the season on the current set against the salt kit. Null when it cannot be priced. */
|
|
1106
|
+
costCompare: z.ZodNullable<z.ZodObject<{
|
|
1107
|
+
currency: z.ZodLiteral<"NGN">;
|
|
1108
|
+
/** Date of the reference prices. */
|
|
1109
|
+
asOf: z.ZodString;
|
|
1110
|
+
weeksRemaining: z.ZodNumber;
|
|
1111
|
+
current: z.ZodObject<{
|
|
1112
|
+
setId: z.ZodString;
|
|
1113
|
+
setName: z.ZodString;
|
|
1114
|
+
/** Naira for the rest of the season at standard rates, to the nearest hundred. */
|
|
1115
|
+
seasonCostNaira: z.ZodNumber;
|
|
1116
|
+
}, "strip", z.ZodTypeAny, {
|
|
1117
|
+
setId: string;
|
|
1118
|
+
setName: string;
|
|
1119
|
+
seasonCostNaira: number;
|
|
1120
|
+
}, {
|
|
1121
|
+
setId: string;
|
|
1122
|
+
setName: string;
|
|
1123
|
+
seasonCostNaira: number;
|
|
1124
|
+
}>;
|
|
1125
|
+
saltKit: z.ZodObject<{
|
|
1126
|
+
setId: z.ZodString;
|
|
1127
|
+
setName: z.ZodString;
|
|
1128
|
+
/** Naira for the rest of the season at standard rates, to the nearest hundred. */
|
|
1129
|
+
seasonCostNaira: z.ZodNumber;
|
|
1130
|
+
}, "strip", z.ZodTypeAny, {
|
|
1131
|
+
setId: string;
|
|
1132
|
+
setName: string;
|
|
1133
|
+
seasonCostNaira: number;
|
|
1134
|
+
}, {
|
|
1135
|
+
setId: string;
|
|
1136
|
+
setName: string;
|
|
1137
|
+
seasonCostNaira: number;
|
|
1138
|
+
}>;
|
|
1139
|
+
/** What switching to the salt kit saves for the rest of the season; 0 when it would not. */
|
|
1140
|
+
savingNaira: z.ZodNumber;
|
|
1141
|
+
}, "strip", z.ZodTypeAny, {
|
|
1142
|
+
current: {
|
|
1143
|
+
setId: string;
|
|
1144
|
+
setName: string;
|
|
1145
|
+
seasonCostNaira: number;
|
|
1146
|
+
};
|
|
1147
|
+
currency: "NGN";
|
|
1148
|
+
asOf: string;
|
|
1149
|
+
weeksRemaining: number;
|
|
1150
|
+
saltKit: {
|
|
1151
|
+
setId: string;
|
|
1152
|
+
setName: string;
|
|
1153
|
+
seasonCostNaira: number;
|
|
1154
|
+
};
|
|
1155
|
+
savingNaira: number;
|
|
1156
|
+
}, {
|
|
1157
|
+
current: {
|
|
1158
|
+
setId: string;
|
|
1159
|
+
setName: string;
|
|
1160
|
+
seasonCostNaira: number;
|
|
1161
|
+
};
|
|
1162
|
+
currency: "NGN";
|
|
1163
|
+
asOf: string;
|
|
1164
|
+
weeksRemaining: number;
|
|
1165
|
+
saltKit: {
|
|
1166
|
+
setId: string;
|
|
1167
|
+
setName: string;
|
|
1168
|
+
seasonCostNaira: number;
|
|
1169
|
+
};
|
|
1170
|
+
savingNaira: number;
|
|
1171
|
+
}>>;
|
|
1172
|
+
/** Short swaps worth making when stock or brand makes the plan dearer than it needs to be. */
|
|
1173
|
+
substitutions: z.ZodArray<z.ZodString, "many">;
|
|
1033
1174
|
}, "strip", z.ZodTypeAny, {
|
|
1034
1175
|
status: "ok" | "no-plan";
|
|
1035
1176
|
message: string | null;
|
|
@@ -1163,6 +1304,23 @@ export declare const fertilizerRequirementsResponseSchema: z.ZodObject<{
|
|
|
1163
1304
|
suggestedProduct: string | null;
|
|
1164
1305
|
}[];
|
|
1165
1306
|
warnings: string[];
|
|
1307
|
+
costCompare: {
|
|
1308
|
+
current: {
|
|
1309
|
+
setId: string;
|
|
1310
|
+
setName: string;
|
|
1311
|
+
seasonCostNaira: number;
|
|
1312
|
+
};
|
|
1313
|
+
currency: "NGN";
|
|
1314
|
+
asOf: string;
|
|
1315
|
+
weeksRemaining: number;
|
|
1316
|
+
saltKit: {
|
|
1317
|
+
setId: string;
|
|
1318
|
+
setName: string;
|
|
1319
|
+
seasonCostNaira: number;
|
|
1320
|
+
};
|
|
1321
|
+
savingNaira: number;
|
|
1322
|
+
} | null;
|
|
1323
|
+
substitutions: string[];
|
|
1166
1324
|
}, {
|
|
1167
1325
|
status: "ok" | "no-plan";
|
|
1168
1326
|
message: string | null;
|
|
@@ -1296,6 +1454,23 @@ export declare const fertilizerRequirementsResponseSchema: z.ZodObject<{
|
|
|
1296
1454
|
suggestedProduct: string | null;
|
|
1297
1455
|
}[];
|
|
1298
1456
|
warnings: string[];
|
|
1457
|
+
costCompare: {
|
|
1458
|
+
current: {
|
|
1459
|
+
setId: string;
|
|
1460
|
+
setName: string;
|
|
1461
|
+
seasonCostNaira: number;
|
|
1462
|
+
};
|
|
1463
|
+
currency: "NGN";
|
|
1464
|
+
asOf: string;
|
|
1465
|
+
weeksRemaining: number;
|
|
1466
|
+
saltKit: {
|
|
1467
|
+
setId: string;
|
|
1468
|
+
setName: string;
|
|
1469
|
+
seasonCostNaira: number;
|
|
1470
|
+
};
|
|
1471
|
+
savingNaira: number;
|
|
1472
|
+
} | null;
|
|
1473
|
+
substitutions: string[];
|
|
1299
1474
|
}>;
|
|
1300
1475
|
export type FertilizerRequirementsResponse = z.infer<typeof fertilizerRequirementsResponseSchema>;
|
|
1301
1476
|
//# sourceMappingURL=farm-fertilizers.schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"farm-fertilizers.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/farm-fertilizers.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,uBAAuB,8CAA4C,CAAC;AACjF,eAAO,MAAM,oBAAoB,8CAA4C,CAAC;AAiB9E,wGAAwG;AACxG,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBrC,CAAC;AACL,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,mGAAmG;AACnG,eAAO,MAAM,0B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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE9F,CAAC;AACH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC"}
|
|
@@ -148,6 +148,27 @@ export const fertilizerRequirementSchema = z.object({
|
|
|
148
148
|
labelDirections: z.string().nullable(),
|
|
149
149
|
guidance: guidanceSchema,
|
|
150
150
|
});
|
|
151
|
+
const seasonCostSchema = z.object({
|
|
152
|
+
setId: z.string(),
|
|
153
|
+
setName: z.string(),
|
|
154
|
+
/** Naira for the rest of the season at standard rates, to the nearest hundred. */
|
|
155
|
+
seasonCostNaira: z.number(),
|
|
156
|
+
});
|
|
157
|
+
/**
|
|
158
|
+
* What the rest of the season's fertilizer costs on the current set against the plain soluble-salt kit. Prices are the
|
|
159
|
+
* farm's own recorded cost where it has one, else dated reference prices; absent when a price or the plant count is
|
|
160
|
+
* not known, never filled with a guess.
|
|
161
|
+
*/
|
|
162
|
+
export const costCompareSchema = z.object({
|
|
163
|
+
currency: z.literal('NGN'),
|
|
164
|
+
/** Date of the reference prices. */
|
|
165
|
+
asOf: z.string(),
|
|
166
|
+
weeksRemaining: z.number(),
|
|
167
|
+
current: seasonCostSchema,
|
|
168
|
+
saltKit: seasonCostSchema,
|
|
169
|
+
/** What switching to the salt kit saves for the rest of the season; 0 when it would not. */
|
|
170
|
+
savingNaira: z.number(),
|
|
171
|
+
});
|
|
151
172
|
export const uncoveredRoleSchema = z.object({
|
|
152
173
|
role: z.string(),
|
|
153
174
|
message: z.string(),
|
|
@@ -172,4 +193,8 @@ export const fertilizerRequirementsResponseSchema = z.object({
|
|
|
172
193
|
/** Jobs the stage needs done that no fertilizer on the farm can do. */
|
|
173
194
|
uncoveredRoles: z.array(uncoveredRoleSchema),
|
|
174
195
|
warnings: z.array(z.string()),
|
|
196
|
+
/** The rest of the season on the current set against the salt kit. Null when it cannot be priced. */
|
|
197
|
+
costCompare: costCompareSchema.nullable(),
|
|
198
|
+
/** Short swaps worth making when stock or brand makes the plan dearer than it needs to be. */
|
|
199
|
+
substitutions: z.array(z.string()),
|
|
175
200
|
});
|