@deepintel-ltd/farmpro-contracts 1.8.0 → 1.9.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.
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/routes/device-gateway-admin.routes.d.ts +378 -3
- package/dist/routes/device-gateway-admin.routes.d.ts.map +1 -1
- package/dist/routes/device-gateway-admin.routes.js +19 -4
- package/dist/routes/farm-gateway-device.routes.d.ts +46 -0
- package/dist/routes/farm-gateway-device.routes.d.ts.map +1 -0
- package/dist/routes/farm-gateway-device.routes.js +15 -0
- package/dist/routes/farm-gateway.routes.d.ts +302 -0
- package/dist/routes/farm-gateway.routes.d.ts.map +1 -0
- package/dist/routes/farm-gateway.routes.js +51 -0
- package/dist/routes/index.d.ts +6 -0
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +4 -0
- package/dist/schemas/device-gateway.schemas.d.ts +361 -0
- package/dist/schemas/device-gateway.schemas.d.ts.map +1 -1
- package/dist/schemas/device-gateway.schemas.js +28 -0
- package/dist/schemas/farm-gateway.schemas.d.ts +232 -0
- package/dist/schemas/farm-gateway.schemas.d.ts.map +1 -0
- package/dist/schemas/farm-gateway.schemas.js +45 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @module @farmpro/contracts
|
|
7
7
|
*/
|
|
8
8
|
export { apiContract } from './routes';
|
|
9
|
-
export type { ApiContractType, ApiContractDefinition, AuthEndpoints, UsersEndpoints, FarmsEndpoints, FieldsEndpoints, TasksEndpoints, InventoryEndpoints, FinanceEndpoints, HarvestEndpoints, SoilTestsEndpoints, WeatherEndpoints, TeamEndpoints, EquipmentEndpoints, DocumentsEndpoints, SuppliersEndpoints, AnalyticsEndpoints, CategoriesEndpoints, AgentsEndpoints, AgentWorkflowsEndpoints, FieldMonitoringEndpoints, FieldObservationsEndpoints, AdminEndpoints, HealthEndpoints, SeasonalPlansEndpoints, InputUsageEndpoints, PaymentsEndpoints, SubscriptionsEndpoints, OrganizationsEndpoints, WaybillsEndpoints, InvoicesEndpoints, FertigationEndpoints, CropNutrientProfilesEndpoints, FertilizerProductsEndpoints, FertigationSchedulesEndpoints, FertigationEventsEndpoints, FertigationRecommendationsEndpoints, CapitalEndpoints, WhatsAppGatewayEndpoints, MonitoringVisualizationEndpoints, LivestockEndpoints, LivestockGroupsEndpoints, GeofencesEndpoints, LivestockMapEndpoints, PrescriptionMapsEndpoints, MeasurementsEndpoints, CropProfilesEndpoints, FarmStatusEndpoints, LiveMonitorEndpoints, TeamPaymentsEndpoints, CooperativeEndpoints, ExtensionEndpoints, NotificationsEndpoints, CommodityDealsEndpoints, DeviceGatewayEndpoints, DeviceGatewayAdminEndpoints, } from './routes';
|
|
9
|
+
export type { ApiContractType, ApiContractDefinition, AuthEndpoints, UsersEndpoints, FarmsEndpoints, FieldsEndpoints, TasksEndpoints, InventoryEndpoints, FinanceEndpoints, HarvestEndpoints, SoilTestsEndpoints, WeatherEndpoints, TeamEndpoints, EquipmentEndpoints, DocumentsEndpoints, SuppliersEndpoints, AnalyticsEndpoints, CategoriesEndpoints, AgentsEndpoints, AgentWorkflowsEndpoints, FieldMonitoringEndpoints, FieldObservationsEndpoints, AdminEndpoints, HealthEndpoints, SeasonalPlansEndpoints, InputUsageEndpoints, PaymentsEndpoints, SubscriptionsEndpoints, OrganizationsEndpoints, WaybillsEndpoints, InvoicesEndpoints, FertigationEndpoints, CropNutrientProfilesEndpoints, FertilizerProductsEndpoints, FertigationSchedulesEndpoints, FertigationEventsEndpoints, FertigationRecommendationsEndpoints, CapitalEndpoints, WhatsAppGatewayEndpoints, MonitoringVisualizationEndpoints, LivestockEndpoints, LivestockGroupsEndpoints, GeofencesEndpoints, LivestockMapEndpoints, PrescriptionMapsEndpoints, MeasurementsEndpoints, CropProfilesEndpoints, FarmStatusEndpoints, LiveMonitorEndpoints, TeamPaymentsEndpoints, CooperativeEndpoints, ExtensionEndpoints, NotificationsEndpoints, CommodityDealsEndpoints, DeviceGatewayEndpoints, DeviceGatewayAdminEndpoints, FarmGatewayAdminEndpoints, FarmGatewayDeviceEndpoints, } from './routes';
|
|
10
10
|
export { authRouter } from './routes/auth.routes';
|
|
11
11
|
export { usersRouter } from './routes/users.routes';
|
|
12
12
|
export { farmsRouter } from './routes/farms.routes';
|
|
@@ -56,6 +56,8 @@ export { notificationsRouter } from './routes/notifications.routes';
|
|
|
56
56
|
export { commodityDealsRouter } from './routes/commodity-deals.routes';
|
|
57
57
|
export { deviceGatewayRouter } from './routes/device-gateway.routes';
|
|
58
58
|
export { deviceGatewayAdminRouter } from './routes/device-gateway-admin.routes';
|
|
59
|
+
export { farmGatewayAdminRouter } from './routes/farm-gateway.routes';
|
|
60
|
+
export { farmGatewayDeviceRouter } from './routes/farm-gateway-device.routes';
|
|
59
61
|
export { irrigationRouter } from './routes/irrigation.routes';
|
|
60
62
|
export { yieldPredictionRouter } from './routes/yield-prediction.routes';
|
|
61
63
|
export { pestDiseaseRiskRouter } from './routes/pest-disease-risk.routes';
|
|
@@ -110,6 +112,7 @@ export * from './schemas/extension.schemas';
|
|
|
110
112
|
export * from './schemas/notifications.schemas';
|
|
111
113
|
export * from './schemas/commodity-deals.schemas';
|
|
112
114
|
export * from './schemas/device-gateway.schemas';
|
|
115
|
+
export * from './schemas/farm-gateway.schemas';
|
|
113
116
|
export { irrigationMethodSchema, waterRequirementSchema, moistureThresholdsSchema, irrigationRecommendationSchema, irrigationWeatherForecastSchema, irrigationScheduleAttributesSchema, createIrrigationScheduleSchema, updateIrrigationScheduleSchema, irrigationEventAttributesSchema, completeIrrigationEventSchema, skipIrrigationEventSchema, irrigationScheduleResponseSchema, irrigationScheduleListResponseSchema, irrigationEventResponseSchema, irrigationEventListResponseSchema, waterRequirementResponseSchema, irrigationErrorSchema, irrigationScheduleQuerySchema, } from './schemas/irrigation.schemas';
|
|
114
117
|
export type { IrrigationMethod, WaterRequirement, MoistureThresholds, IrrigationRecommendation, IrrigationScheduleAttributes, IrrigationEventAttributes, CreateIrrigationSchedule, UpdateIrrigationSchedule, CompleteIrrigationEvent, WaterRequirementResponse, } from './schemas/irrigation.schemas';
|
|
115
118
|
export { riskLevelSchema, threatTypeSchema, environmentalFactorsSchema, threatProbabilitySchema, riskZoneSchema, fieldThreatSummarySchema, riskHeatmapResponseSchema, fieldRiskSummarySchema, farmRiskAssessmentSchema, triggerAnalysisRequestSchema, riskHeatmapQuerySchema, farmAssessmentQuerySchema, pestDiseaseRiskErrorSchema, } from './schemas/pest-disease-risk.schemas';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,YAAY,EACV,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,cAAc,EACd,cAAc,EACd,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,uBAAuB,EACvB,wBAAwB,EACxB,0BAA0B,EAC1B,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,6BAA6B,EAC7B,2BAA2B,EAC3B,6BAA6B,EAC7B,0BAA0B,EAC1B,mCAAmC,EACnC,gBAAgB,EAChB,wBAAwB,EACxB,gCAAgC,EAChC,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EAClB,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,2BAA2B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,YAAY,EACV,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,cAAc,EACd,cAAc,EACd,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,uBAAuB,EACvB,wBAAwB,EACxB,0BAA0B,EAC1B,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,6BAA6B,EAC7B,2BAA2B,EAC3B,6BAA6B,EAC7B,0BAA0B,EAC1B,mCAAmC,EACnC,gBAAgB,EAChB,wBAAwB,EACxB,gCAAgC,EAChC,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EAClB,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,2BAA2B,EAC3B,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,UAAU,CAAC;AAMlB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,E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AAC7C,YAAY,EACV,SAAS,EACT,UAAU,EACV,oBAAoB,EACpB,iBAAiB,EACjB,QAAQ,EACR,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,qCAAqC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -61,6 +61,8 @@ export { notificationsRouter } from './routes/notifications.routes';
|
|
|
61
61
|
export { commodityDealsRouter } from './routes/commodity-deals.routes';
|
|
62
62
|
export { deviceGatewayRouter } from './routes/device-gateway.routes';
|
|
63
63
|
export { deviceGatewayAdminRouter } from './routes/device-gateway-admin.routes';
|
|
64
|
+
export { farmGatewayAdminRouter } from './routes/farm-gateway.routes';
|
|
65
|
+
export { farmGatewayDeviceRouter } from './routes/farm-gateway-device.routes';
|
|
64
66
|
export { irrigationRouter } from './routes/irrigation.routes';
|
|
65
67
|
export { yieldPredictionRouter } from './routes/yield-prediction.routes';
|
|
66
68
|
export { pestDiseaseRiskRouter } from './routes/pest-disease-risk.routes';
|
|
@@ -118,6 +120,7 @@ export * from './schemas/extension.schemas';
|
|
|
118
120
|
export * from './schemas/notifications.schemas';
|
|
119
121
|
export * from './schemas/commodity-deals.schemas';
|
|
120
122
|
export * from './schemas/device-gateway.schemas';
|
|
123
|
+
export * from './schemas/farm-gateway.schemas';
|
|
121
124
|
// Irrigation: re-export explicitly to avoid conflict with fertigation (EventStatus, ScheduleStatus, eventStatusSchema, scheduleStatusSchema, upcomingEventsQuerySchema)
|
|
122
125
|
export { irrigationMethodSchema, waterRequirementSchema, moistureThresholdsSchema, irrigationRecommendationSchema, irrigationWeatherForecastSchema, irrigationScheduleAttributesSchema, createIrrigationScheduleSchema, updateIrrigationScheduleSchema, irrigationEventAttributesSchema, completeIrrigationEventSchema, skipIrrigationEventSchema, irrigationScheduleResponseSchema, irrigationScheduleListResponseSchema, irrigationEventResponseSchema, irrigationEventListResponseSchema, waterRequirementResponseSchema, irrigationErrorSchema, irrigationScheduleQuerySchema, } from './schemas/irrigation.schemas';
|
|
123
126
|
// Pest-disease-risk: re-export explicitly to avoid conflict with field-monitoring (triggerAnalysisResponseSchema)
|
|
@@ -11,7 +11,7 @@ export declare const deviceGatewayAdminRouter: {
|
|
|
11
11
|
farmId: string;
|
|
12
12
|
fieldId: string;
|
|
13
13
|
}>;
|
|
14
|
-
summary: "Register a
|
|
14
|
+
summary: "Register a field edge device and generate API key";
|
|
15
15
|
method: "POST";
|
|
16
16
|
body: z.ZodObject<{
|
|
17
17
|
name: z.ZodString;
|
|
@@ -91,6 +91,9 @@ export declare const deviceGatewayAdminRouter: {
|
|
|
91
91
|
} | undefined;
|
|
92
92
|
gpioMap?: Record<string, number> | undefined;
|
|
93
93
|
}>>;
|
|
94
|
+
fieldType: z.ZodOptional<z.ZodEnum<["GREENHOUSE", "OPEN_FIELD"]>>;
|
|
95
|
+
transport: z.ZodOptional<z.ZodEnum<["WIFI", "LORA", "CELLULAR_DIRECT"]>>;
|
|
96
|
+
gatewayId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
94
97
|
}, "strip", z.ZodTypeAny, {
|
|
95
98
|
name: string;
|
|
96
99
|
config?: {
|
|
@@ -109,6 +112,9 @@ export declare const deviceGatewayAdminRouter: {
|
|
|
109
112
|
} | undefined;
|
|
110
113
|
gpioMap?: Record<string, number> | undefined;
|
|
111
114
|
} | undefined;
|
|
115
|
+
fieldType?: "GREENHOUSE" | "OPEN_FIELD" | undefined;
|
|
116
|
+
transport?: "WIFI" | "LORA" | "CELLULAR_DIRECT" | undefined;
|
|
117
|
+
gatewayId?: string | null | undefined;
|
|
112
118
|
}, {
|
|
113
119
|
name: string;
|
|
114
120
|
config?: {
|
|
@@ -127,6 +133,9 @@ export declare const deviceGatewayAdminRouter: {
|
|
|
127
133
|
} | undefined;
|
|
128
134
|
gpioMap?: Record<string, number> | undefined;
|
|
129
135
|
} | undefined;
|
|
136
|
+
fieldType?: "GREENHOUSE" | "OPEN_FIELD" | undefined;
|
|
137
|
+
transport?: "WIFI" | "LORA" | "CELLULAR_DIRECT" | undefined;
|
|
138
|
+
gatewayId?: string | null | undefined;
|
|
130
139
|
}>;
|
|
131
140
|
path: "/farms/:farmId/fields/:fieldId/devices";
|
|
132
141
|
responses: {
|
|
@@ -213,7 +222,7 @@ export declare const deviceGatewayAdminRouter: {
|
|
|
213
222
|
farmId: string;
|
|
214
223
|
fieldId: string;
|
|
215
224
|
}>;
|
|
216
|
-
summary: "List
|
|
225
|
+
summary: "List field devices for a field";
|
|
217
226
|
method: "GET";
|
|
218
227
|
path: "/farms/:farmId/fields/:fieldId/devices";
|
|
219
228
|
responses: {
|
|
@@ -223,6 +232,10 @@ export declare const deviceGatewayAdminRouter: {
|
|
|
223
232
|
name: z.ZodString;
|
|
224
233
|
fieldId: z.ZodString;
|
|
225
234
|
farmId: z.ZodString;
|
|
235
|
+
fieldType: z.ZodEnum<["GREENHOUSE", "OPEN_FIELD"]>;
|
|
236
|
+
transport: z.ZodEnum<["WIFI", "LORA", "CELLULAR_DIRECT"]>;
|
|
237
|
+
gatewayId: z.ZodNullable<z.ZodString>;
|
|
238
|
+
gatewayName: z.ZodNullable<z.ZodString>;
|
|
226
239
|
lastSeenAt: z.ZodNullable<z.ZodString>;
|
|
227
240
|
bufferedReadingsCount: z.ZodNullable<z.ZodNumber>;
|
|
228
241
|
bufferOverflow: z.ZodBoolean;
|
|
@@ -330,6 +343,10 @@ export declare const deviceGatewayAdminRouter: {
|
|
|
330
343
|
} | undefined;
|
|
331
344
|
gpioMap?: Record<string, number> | undefined;
|
|
332
345
|
} | null;
|
|
346
|
+
fieldType: "GREENHOUSE" | "OPEN_FIELD";
|
|
347
|
+
transport: "WIFI" | "LORA" | "CELLULAR_DIRECT";
|
|
348
|
+
gatewayId: string | null;
|
|
349
|
+
gatewayName: string | null;
|
|
333
350
|
lastSeenAt: string | null;
|
|
334
351
|
isOnline: boolean;
|
|
335
352
|
}, {
|
|
@@ -357,6 +374,10 @@ export declare const deviceGatewayAdminRouter: {
|
|
|
357
374
|
} | undefined;
|
|
358
375
|
gpioMap?: Record<string, number> | undefined;
|
|
359
376
|
} | null;
|
|
377
|
+
fieldType: "GREENHOUSE" | "OPEN_FIELD";
|
|
378
|
+
transport: "WIFI" | "LORA" | "CELLULAR_DIRECT";
|
|
379
|
+
gatewayId: string | null;
|
|
380
|
+
gatewayName: string | null;
|
|
360
381
|
lastSeenAt: string | null;
|
|
361
382
|
isOnline: boolean;
|
|
362
383
|
}>, "many">;
|
|
@@ -386,6 +407,10 @@ export declare const deviceGatewayAdminRouter: {
|
|
|
386
407
|
} | undefined;
|
|
387
408
|
gpioMap?: Record<string, number> | undefined;
|
|
388
409
|
} | null;
|
|
410
|
+
fieldType: "GREENHOUSE" | "OPEN_FIELD";
|
|
411
|
+
transport: "WIFI" | "LORA" | "CELLULAR_DIRECT";
|
|
412
|
+
gatewayId: string | null;
|
|
413
|
+
gatewayName: string | null;
|
|
389
414
|
lastSeenAt: string | null;
|
|
390
415
|
isOnline: boolean;
|
|
391
416
|
}[];
|
|
@@ -415,6 +440,10 @@ export declare const deviceGatewayAdminRouter: {
|
|
|
415
440
|
} | undefined;
|
|
416
441
|
gpioMap?: Record<string, number> | undefined;
|
|
417
442
|
} | null;
|
|
443
|
+
fieldType: "GREENHOUSE" | "OPEN_FIELD";
|
|
444
|
+
transport: "WIFI" | "LORA" | "CELLULAR_DIRECT";
|
|
445
|
+
gatewayId: string | null;
|
|
446
|
+
gatewayName: string | null;
|
|
418
447
|
lastSeenAt: string | null;
|
|
419
448
|
isOnline: boolean;
|
|
420
449
|
}[];
|
|
@@ -545,6 +574,9 @@ export declare const deviceGatewayAdminRouter: {
|
|
|
545
574
|
} | undefined;
|
|
546
575
|
gpioMap?: Record<string, number> | undefined;
|
|
547
576
|
}>>;
|
|
577
|
+
fieldType: z.ZodOptional<z.ZodEnum<["GREENHOUSE", "OPEN_FIELD"]>>;
|
|
578
|
+
transport: z.ZodOptional<z.ZodEnum<["WIFI", "LORA", "CELLULAR_DIRECT"]>>;
|
|
579
|
+
gatewayId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
548
580
|
}, "strip", z.ZodTypeAny, {
|
|
549
581
|
name?: string | undefined;
|
|
550
582
|
config?: {
|
|
@@ -563,6 +595,9 @@ export declare const deviceGatewayAdminRouter: {
|
|
|
563
595
|
} | undefined;
|
|
564
596
|
gpioMap?: Record<string, number> | undefined;
|
|
565
597
|
} | undefined;
|
|
598
|
+
fieldType?: "GREENHOUSE" | "OPEN_FIELD" | undefined;
|
|
599
|
+
transport?: "WIFI" | "LORA" | "CELLULAR_DIRECT" | undefined;
|
|
600
|
+
gatewayId?: string | null | undefined;
|
|
566
601
|
}, {
|
|
567
602
|
name?: string | undefined;
|
|
568
603
|
config?: {
|
|
@@ -581,6 +616,9 @@ export declare const deviceGatewayAdminRouter: {
|
|
|
581
616
|
} | undefined;
|
|
582
617
|
gpioMap?: Record<string, number> | undefined;
|
|
583
618
|
} | undefined;
|
|
619
|
+
fieldType?: "GREENHOUSE" | "OPEN_FIELD" | undefined;
|
|
620
|
+
transport?: "WIFI" | "LORA" | "CELLULAR_DIRECT" | undefined;
|
|
621
|
+
gatewayId?: string | null | undefined;
|
|
584
622
|
}>;
|
|
585
623
|
path: "/farms/:farmId/fields/:fieldId/devices/:deviceId";
|
|
586
624
|
responses: {
|
|
@@ -590,6 +628,10 @@ export declare const deviceGatewayAdminRouter: {
|
|
|
590
628
|
name: z.ZodString;
|
|
591
629
|
fieldId: z.ZodString;
|
|
592
630
|
farmId: z.ZodString;
|
|
631
|
+
fieldType: z.ZodEnum<["GREENHOUSE", "OPEN_FIELD"]>;
|
|
632
|
+
transport: z.ZodEnum<["WIFI", "LORA", "CELLULAR_DIRECT"]>;
|
|
633
|
+
gatewayId: z.ZodNullable<z.ZodString>;
|
|
634
|
+
gatewayName: z.ZodNullable<z.ZodString>;
|
|
593
635
|
lastSeenAt: z.ZodNullable<z.ZodString>;
|
|
594
636
|
bufferedReadingsCount: z.ZodNullable<z.ZodNumber>;
|
|
595
637
|
bufferOverflow: z.ZodBoolean;
|
|
@@ -697,6 +739,10 @@ export declare const deviceGatewayAdminRouter: {
|
|
|
697
739
|
} | undefined;
|
|
698
740
|
gpioMap?: Record<string, number> | undefined;
|
|
699
741
|
} | null;
|
|
742
|
+
fieldType: "GREENHOUSE" | "OPEN_FIELD";
|
|
743
|
+
transport: "WIFI" | "LORA" | "CELLULAR_DIRECT";
|
|
744
|
+
gatewayId: string | null;
|
|
745
|
+
gatewayName: string | null;
|
|
700
746
|
lastSeenAt: string | null;
|
|
701
747
|
isOnline: boolean;
|
|
702
748
|
}, {
|
|
@@ -724,6 +770,10 @@ export declare const deviceGatewayAdminRouter: {
|
|
|
724
770
|
} | undefined;
|
|
725
771
|
gpioMap?: Record<string, number> | undefined;
|
|
726
772
|
} | null;
|
|
773
|
+
fieldType: "GREENHOUSE" | "OPEN_FIELD";
|
|
774
|
+
transport: "WIFI" | "LORA" | "CELLULAR_DIRECT";
|
|
775
|
+
gatewayId: string | null;
|
|
776
|
+
gatewayName: string | null;
|
|
727
777
|
lastSeenAt: string | null;
|
|
728
778
|
isOnline: boolean;
|
|
729
779
|
}>;
|
|
@@ -753,6 +803,10 @@ export declare const deviceGatewayAdminRouter: {
|
|
|
753
803
|
} | undefined;
|
|
754
804
|
gpioMap?: Record<string, number> | undefined;
|
|
755
805
|
} | null;
|
|
806
|
+
fieldType: "GREENHOUSE" | "OPEN_FIELD";
|
|
807
|
+
transport: "WIFI" | "LORA" | "CELLULAR_DIRECT";
|
|
808
|
+
gatewayId: string | null;
|
|
809
|
+
gatewayName: string | null;
|
|
756
810
|
lastSeenAt: string | null;
|
|
757
811
|
isOnline: boolean;
|
|
758
812
|
};
|
|
@@ -782,6 +836,10 @@ export declare const deviceGatewayAdminRouter: {
|
|
|
782
836
|
} | undefined;
|
|
783
837
|
gpioMap?: Record<string, number> | undefined;
|
|
784
838
|
} | null;
|
|
839
|
+
fieldType: "GREENHOUSE" | "OPEN_FIELD";
|
|
840
|
+
transport: "WIFI" | "LORA" | "CELLULAR_DIRECT";
|
|
841
|
+
gatewayId: string | null;
|
|
842
|
+
gatewayName: string | null;
|
|
785
843
|
lastSeenAt: string | null;
|
|
786
844
|
isOnline: boolean;
|
|
787
845
|
};
|
|
@@ -832,7 +890,7 @@ export declare const deviceGatewayAdminRouter: {
|
|
|
832
890
|
fieldId: string;
|
|
833
891
|
deviceId: string;
|
|
834
892
|
}>;
|
|
835
|
-
summary: "Register an actuator on a
|
|
893
|
+
summary: "Register an actuator on a field device";
|
|
836
894
|
method: "POST";
|
|
837
895
|
body: z.ZodObject<{
|
|
838
896
|
type: z.ZodEnum<["IRRIGATION_VALVE", "FERT_PUMP_A", "FERT_PUMP_B", "FAN"]>;
|
|
@@ -1131,5 +1189,322 @@ export declare const deviceGatewayAdminRouter: {
|
|
|
1131
1189
|
}>;
|
|
1132
1190
|
};
|
|
1133
1191
|
};
|
|
1192
|
+
getFieldSummary: {
|
|
1193
|
+
pathParams: z.ZodObject<{
|
|
1194
|
+
farmId: z.ZodString;
|
|
1195
|
+
fieldId: z.ZodString;
|
|
1196
|
+
}, "strip", z.ZodTypeAny, {
|
|
1197
|
+
farmId: string;
|
|
1198
|
+
fieldId: string;
|
|
1199
|
+
}, {
|
|
1200
|
+
farmId: string;
|
|
1201
|
+
fieldId: string;
|
|
1202
|
+
}>;
|
|
1203
|
+
summary: "Field automation dashboard aggregate";
|
|
1204
|
+
method: "GET";
|
|
1205
|
+
path: "/farms/:farmId/fields/:fieldId/field/summary";
|
|
1206
|
+
responses: {
|
|
1207
|
+
200: z.ZodObject<{
|
|
1208
|
+
fieldId: z.ZodString;
|
|
1209
|
+
fieldType: z.ZodNullable<z.ZodEnum<["GREENHOUSE", "OPEN_FIELD"]>>;
|
|
1210
|
+
devices: z.ZodArray<z.ZodObject<{
|
|
1211
|
+
id: z.ZodString;
|
|
1212
|
+
name: z.ZodString;
|
|
1213
|
+
fieldId: z.ZodString;
|
|
1214
|
+
farmId: z.ZodString;
|
|
1215
|
+
fieldType: z.ZodEnum<["GREENHOUSE", "OPEN_FIELD"]>;
|
|
1216
|
+
transport: z.ZodEnum<["WIFI", "LORA", "CELLULAR_DIRECT"]>;
|
|
1217
|
+
gatewayId: z.ZodNullable<z.ZodString>;
|
|
1218
|
+
gatewayName: z.ZodNullable<z.ZodString>;
|
|
1219
|
+
lastSeenAt: z.ZodNullable<z.ZodString>;
|
|
1220
|
+
bufferedReadingsCount: z.ZodNullable<z.ZodNumber>;
|
|
1221
|
+
bufferOverflow: z.ZodBoolean;
|
|
1222
|
+
firmwareVersion: z.ZodNullable<z.ZodString>;
|
|
1223
|
+
isOnline: z.ZodBoolean;
|
|
1224
|
+
config: z.ZodNullable<z.ZodObject<{
|
|
1225
|
+
heartbeatIntervalSec: z.ZodOptional<z.ZodNumber>;
|
|
1226
|
+
commandPollIntervalSec: z.ZodOptional<z.ZodNumber>;
|
|
1227
|
+
sensorIntervals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
1228
|
+
pumpCalibration: z.ZodOptional<z.ZodObject<{
|
|
1229
|
+
fert_pump_a: z.ZodOptional<z.ZodObject<{
|
|
1230
|
+
mlPerSecond: z.ZodNumber;
|
|
1231
|
+
calibratedAt: z.ZodOptional<z.ZodString>;
|
|
1232
|
+
}, "strip", z.ZodTypeAny, {
|
|
1233
|
+
mlPerSecond: number;
|
|
1234
|
+
calibratedAt?: string | undefined;
|
|
1235
|
+
}, {
|
|
1236
|
+
mlPerSecond: number;
|
|
1237
|
+
calibratedAt?: string | undefined;
|
|
1238
|
+
}>>;
|
|
1239
|
+
fert_pump_b: z.ZodOptional<z.ZodObject<{
|
|
1240
|
+
mlPerSecond: z.ZodNumber;
|
|
1241
|
+
calibratedAt: z.ZodOptional<z.ZodString>;
|
|
1242
|
+
}, "strip", z.ZodTypeAny, {
|
|
1243
|
+
mlPerSecond: number;
|
|
1244
|
+
calibratedAt?: string | undefined;
|
|
1245
|
+
}, {
|
|
1246
|
+
mlPerSecond: number;
|
|
1247
|
+
calibratedAt?: string | undefined;
|
|
1248
|
+
}>>;
|
|
1249
|
+
}, "strip", z.ZodTypeAny, {
|
|
1250
|
+
fert_pump_a?: {
|
|
1251
|
+
mlPerSecond: number;
|
|
1252
|
+
calibratedAt?: string | undefined;
|
|
1253
|
+
} | undefined;
|
|
1254
|
+
fert_pump_b?: {
|
|
1255
|
+
mlPerSecond: number;
|
|
1256
|
+
calibratedAt?: string | undefined;
|
|
1257
|
+
} | undefined;
|
|
1258
|
+
}, {
|
|
1259
|
+
fert_pump_a?: {
|
|
1260
|
+
mlPerSecond: number;
|
|
1261
|
+
calibratedAt?: string | undefined;
|
|
1262
|
+
} | undefined;
|
|
1263
|
+
fert_pump_b?: {
|
|
1264
|
+
mlPerSecond: number;
|
|
1265
|
+
calibratedAt?: string | undefined;
|
|
1266
|
+
} | undefined;
|
|
1267
|
+
}>>;
|
|
1268
|
+
gpioMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
1269
|
+
}, "strip", z.ZodTypeAny, {
|
|
1270
|
+
heartbeatIntervalSec?: number | undefined;
|
|
1271
|
+
commandPollIntervalSec?: number | undefined;
|
|
1272
|
+
sensorIntervals?: Record<string, number> | undefined;
|
|
1273
|
+
pumpCalibration?: {
|
|
1274
|
+
fert_pump_a?: {
|
|
1275
|
+
mlPerSecond: number;
|
|
1276
|
+
calibratedAt?: string | undefined;
|
|
1277
|
+
} | undefined;
|
|
1278
|
+
fert_pump_b?: {
|
|
1279
|
+
mlPerSecond: number;
|
|
1280
|
+
calibratedAt?: string | undefined;
|
|
1281
|
+
} | undefined;
|
|
1282
|
+
} | undefined;
|
|
1283
|
+
gpioMap?: Record<string, number> | undefined;
|
|
1284
|
+
}, {
|
|
1285
|
+
heartbeatIntervalSec?: number | undefined;
|
|
1286
|
+
commandPollIntervalSec?: number | undefined;
|
|
1287
|
+
sensorIntervals?: Record<string, number> | undefined;
|
|
1288
|
+
pumpCalibration?: {
|
|
1289
|
+
fert_pump_a?: {
|
|
1290
|
+
mlPerSecond: number;
|
|
1291
|
+
calibratedAt?: string | undefined;
|
|
1292
|
+
} | undefined;
|
|
1293
|
+
fert_pump_b?: {
|
|
1294
|
+
mlPerSecond: number;
|
|
1295
|
+
calibratedAt?: string | undefined;
|
|
1296
|
+
} | undefined;
|
|
1297
|
+
} | undefined;
|
|
1298
|
+
gpioMap?: Record<string, number> | undefined;
|
|
1299
|
+
}>>;
|
|
1300
|
+
createdAt: z.ZodString;
|
|
1301
|
+
}, "strip", z.ZodTypeAny, {
|
|
1302
|
+
id: string;
|
|
1303
|
+
createdAt: string;
|
|
1304
|
+
name: string;
|
|
1305
|
+
farmId: string;
|
|
1306
|
+
fieldId: string;
|
|
1307
|
+
firmwareVersion: string | null;
|
|
1308
|
+
bufferedReadingsCount: number | null;
|
|
1309
|
+
bufferOverflow: boolean;
|
|
1310
|
+
config: {
|
|
1311
|
+
heartbeatIntervalSec?: number | undefined;
|
|
1312
|
+
commandPollIntervalSec?: number | undefined;
|
|
1313
|
+
sensorIntervals?: Record<string, number> | undefined;
|
|
1314
|
+
pumpCalibration?: {
|
|
1315
|
+
fert_pump_a?: {
|
|
1316
|
+
mlPerSecond: number;
|
|
1317
|
+
calibratedAt?: string | undefined;
|
|
1318
|
+
} | undefined;
|
|
1319
|
+
fert_pump_b?: {
|
|
1320
|
+
mlPerSecond: number;
|
|
1321
|
+
calibratedAt?: string | undefined;
|
|
1322
|
+
} | undefined;
|
|
1323
|
+
} | undefined;
|
|
1324
|
+
gpioMap?: Record<string, number> | undefined;
|
|
1325
|
+
} | null;
|
|
1326
|
+
fieldType: "GREENHOUSE" | "OPEN_FIELD";
|
|
1327
|
+
transport: "WIFI" | "LORA" | "CELLULAR_DIRECT";
|
|
1328
|
+
gatewayId: string | null;
|
|
1329
|
+
gatewayName: string | null;
|
|
1330
|
+
lastSeenAt: string | null;
|
|
1331
|
+
isOnline: boolean;
|
|
1332
|
+
}, {
|
|
1333
|
+
id: string;
|
|
1334
|
+
createdAt: string;
|
|
1335
|
+
name: string;
|
|
1336
|
+
farmId: string;
|
|
1337
|
+
fieldId: string;
|
|
1338
|
+
firmwareVersion: string | null;
|
|
1339
|
+
bufferedReadingsCount: number | null;
|
|
1340
|
+
bufferOverflow: boolean;
|
|
1341
|
+
config: {
|
|
1342
|
+
heartbeatIntervalSec?: number | undefined;
|
|
1343
|
+
commandPollIntervalSec?: number | undefined;
|
|
1344
|
+
sensorIntervals?: Record<string, number> | undefined;
|
|
1345
|
+
pumpCalibration?: {
|
|
1346
|
+
fert_pump_a?: {
|
|
1347
|
+
mlPerSecond: number;
|
|
1348
|
+
calibratedAt?: string | undefined;
|
|
1349
|
+
} | undefined;
|
|
1350
|
+
fert_pump_b?: {
|
|
1351
|
+
mlPerSecond: number;
|
|
1352
|
+
calibratedAt?: string | undefined;
|
|
1353
|
+
} | undefined;
|
|
1354
|
+
} | undefined;
|
|
1355
|
+
gpioMap?: Record<string, number> | undefined;
|
|
1356
|
+
} | null;
|
|
1357
|
+
fieldType: "GREENHOUSE" | "OPEN_FIELD";
|
|
1358
|
+
transport: "WIFI" | "LORA" | "CELLULAR_DIRECT";
|
|
1359
|
+
gatewayId: string | null;
|
|
1360
|
+
gatewayName: string | null;
|
|
1361
|
+
lastSeenAt: string | null;
|
|
1362
|
+
isOnline: boolean;
|
|
1363
|
+
}>, "many">;
|
|
1364
|
+
actuatorCount: z.ZodNumber;
|
|
1365
|
+
openAlertCount: z.ZodNumber;
|
|
1366
|
+
hasCameras: z.ZodBoolean;
|
|
1367
|
+
sensors: z.ZodArray<z.ZodObject<{
|
|
1368
|
+
id: z.ZodString;
|
|
1369
|
+
name: z.ZodString;
|
|
1370
|
+
type: z.ZodString;
|
|
1371
|
+
lastValue: z.ZodNullable<z.ZodNumber>;
|
|
1372
|
+
unit: z.ZodNullable<z.ZodString>;
|
|
1373
|
+
}, "strip", z.ZodTypeAny, {
|
|
1374
|
+
type: string;
|
|
1375
|
+
id: string;
|
|
1376
|
+
name: string;
|
|
1377
|
+
unit: string | null;
|
|
1378
|
+
lastValue: number | null;
|
|
1379
|
+
}, {
|
|
1380
|
+
type: string;
|
|
1381
|
+
id: string;
|
|
1382
|
+
name: string;
|
|
1383
|
+
unit: string | null;
|
|
1384
|
+
lastValue: number | null;
|
|
1385
|
+
}>, "many">;
|
|
1386
|
+
}, "strip", z.ZodTypeAny, {
|
|
1387
|
+
fieldId: string;
|
|
1388
|
+
sensors: {
|
|
1389
|
+
type: string;
|
|
1390
|
+
id: string;
|
|
1391
|
+
name: string;
|
|
1392
|
+
unit: string | null;
|
|
1393
|
+
lastValue: number | null;
|
|
1394
|
+
}[];
|
|
1395
|
+
fieldType: "GREENHOUSE" | "OPEN_FIELD" | null;
|
|
1396
|
+
devices: {
|
|
1397
|
+
id: string;
|
|
1398
|
+
createdAt: string;
|
|
1399
|
+
name: string;
|
|
1400
|
+
farmId: string;
|
|
1401
|
+
fieldId: string;
|
|
1402
|
+
firmwareVersion: string | null;
|
|
1403
|
+
bufferedReadingsCount: number | null;
|
|
1404
|
+
bufferOverflow: boolean;
|
|
1405
|
+
config: {
|
|
1406
|
+
heartbeatIntervalSec?: number | undefined;
|
|
1407
|
+
commandPollIntervalSec?: number | undefined;
|
|
1408
|
+
sensorIntervals?: Record<string, number> | undefined;
|
|
1409
|
+
pumpCalibration?: {
|
|
1410
|
+
fert_pump_a?: {
|
|
1411
|
+
mlPerSecond: number;
|
|
1412
|
+
calibratedAt?: string | undefined;
|
|
1413
|
+
} | undefined;
|
|
1414
|
+
fert_pump_b?: {
|
|
1415
|
+
mlPerSecond: number;
|
|
1416
|
+
calibratedAt?: string | undefined;
|
|
1417
|
+
} | undefined;
|
|
1418
|
+
} | undefined;
|
|
1419
|
+
gpioMap?: Record<string, number> | undefined;
|
|
1420
|
+
} | null;
|
|
1421
|
+
fieldType: "GREENHOUSE" | "OPEN_FIELD";
|
|
1422
|
+
transport: "WIFI" | "LORA" | "CELLULAR_DIRECT";
|
|
1423
|
+
gatewayId: string | null;
|
|
1424
|
+
gatewayName: string | null;
|
|
1425
|
+
lastSeenAt: string | null;
|
|
1426
|
+
isOnline: boolean;
|
|
1427
|
+
}[];
|
|
1428
|
+
actuatorCount: number;
|
|
1429
|
+
openAlertCount: number;
|
|
1430
|
+
hasCameras: boolean;
|
|
1431
|
+
}, {
|
|
1432
|
+
fieldId: string;
|
|
1433
|
+
sensors: {
|
|
1434
|
+
type: string;
|
|
1435
|
+
id: string;
|
|
1436
|
+
name: string;
|
|
1437
|
+
unit: string | null;
|
|
1438
|
+
lastValue: number | null;
|
|
1439
|
+
}[];
|
|
1440
|
+
fieldType: "GREENHOUSE" | "OPEN_FIELD" | null;
|
|
1441
|
+
devices: {
|
|
1442
|
+
id: string;
|
|
1443
|
+
createdAt: string;
|
|
1444
|
+
name: string;
|
|
1445
|
+
farmId: string;
|
|
1446
|
+
fieldId: string;
|
|
1447
|
+
firmwareVersion: string | null;
|
|
1448
|
+
bufferedReadingsCount: number | null;
|
|
1449
|
+
bufferOverflow: boolean;
|
|
1450
|
+
config: {
|
|
1451
|
+
heartbeatIntervalSec?: number | undefined;
|
|
1452
|
+
commandPollIntervalSec?: number | undefined;
|
|
1453
|
+
sensorIntervals?: Record<string, number> | undefined;
|
|
1454
|
+
pumpCalibration?: {
|
|
1455
|
+
fert_pump_a?: {
|
|
1456
|
+
mlPerSecond: number;
|
|
1457
|
+
calibratedAt?: string | undefined;
|
|
1458
|
+
} | undefined;
|
|
1459
|
+
fert_pump_b?: {
|
|
1460
|
+
mlPerSecond: number;
|
|
1461
|
+
calibratedAt?: string | undefined;
|
|
1462
|
+
} | undefined;
|
|
1463
|
+
} | undefined;
|
|
1464
|
+
gpioMap?: Record<string, number> | undefined;
|
|
1465
|
+
} | null;
|
|
1466
|
+
fieldType: "GREENHOUSE" | "OPEN_FIELD";
|
|
1467
|
+
transport: "WIFI" | "LORA" | "CELLULAR_DIRECT";
|
|
1468
|
+
gatewayId: string | null;
|
|
1469
|
+
gatewayName: string | null;
|
|
1470
|
+
lastSeenAt: string | null;
|
|
1471
|
+
isOnline: boolean;
|
|
1472
|
+
}[];
|
|
1473
|
+
actuatorCount: number;
|
|
1474
|
+
openAlertCount: number;
|
|
1475
|
+
hasCameras: boolean;
|
|
1476
|
+
}>;
|
|
1477
|
+
401: z.ZodObject<{
|
|
1478
|
+
message: z.ZodString;
|
|
1479
|
+
code: z.ZodString;
|
|
1480
|
+
}, "strip", z.ZodTypeAny, {
|
|
1481
|
+
code: string;
|
|
1482
|
+
message: string;
|
|
1483
|
+
}, {
|
|
1484
|
+
code: string;
|
|
1485
|
+
message: string;
|
|
1486
|
+
}>;
|
|
1487
|
+
403: z.ZodObject<{
|
|
1488
|
+
message: z.ZodString;
|
|
1489
|
+
code: z.ZodString;
|
|
1490
|
+
}, "strip", z.ZodTypeAny, {
|
|
1491
|
+
code: string;
|
|
1492
|
+
message: string;
|
|
1493
|
+
}, {
|
|
1494
|
+
code: string;
|
|
1495
|
+
message: string;
|
|
1496
|
+
}>;
|
|
1497
|
+
404: z.ZodObject<{
|
|
1498
|
+
message: z.ZodString;
|
|
1499
|
+
code: z.ZodString;
|
|
1500
|
+
}, "strip", z.ZodTypeAny, {
|
|
1501
|
+
code: string;
|
|
1502
|
+
message: string;
|
|
1503
|
+
}, {
|
|
1504
|
+
code: string;
|
|
1505
|
+
message: string;
|
|
1506
|
+
}>;
|
|
1507
|
+
};
|
|
1508
|
+
};
|
|
1134
1509
|
};
|
|
1135
1510
|
//# sourceMappingURL=device-gateway-admin.routes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device-gateway-admin.routes.d.ts","sourceRoot":"","sources":["../../src/routes/device-gateway-admin.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"device-gateway-admin.routes.d.ts","sourceRoot":"","sources":["../../src/routes/device-gateway-admin.routes.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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyHnC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { initContract } from '@ts-rest/core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { createDeviceRequestSchema, createDeviceResponseSchema, listDevicesResponseSchema, updateDeviceRequestSchema, updateDeviceResponseSchema, createActuatorRequestSchema, listActuatorsResponseSchema, actuatorSchema, actuatorCommandRequestSchema, actuatorCommandResponseSchema, deviceErrorSchema, } from '../schemas/device-gateway.schemas';
|
|
3
|
+
import { createDeviceRequestSchema, createDeviceResponseSchema, listDevicesResponseSchema, updateDeviceRequestSchema, updateDeviceResponseSchema, createActuatorRequestSchema, listActuatorsResponseSchema, actuatorSchema, actuatorCommandRequestSchema, actuatorCommandResponseSchema, fieldSummaryResponseSchema, deviceErrorSchema, } from '../schemas/device-gateway.schemas';
|
|
4
4
|
const c = initContract();
|
|
5
5
|
export const deviceGatewayAdminRouter = c.router({
|
|
6
6
|
createDevice: {
|
|
@@ -17,7 +17,7 @@ export const deviceGatewayAdminRouter = c.router({
|
|
|
17
17
|
403: deviceErrorSchema,
|
|
18
18
|
404: deviceErrorSchema,
|
|
19
19
|
},
|
|
20
|
-
summary: 'Register a
|
|
20
|
+
summary: 'Register a field edge device and generate API key',
|
|
21
21
|
},
|
|
22
22
|
listDevices: {
|
|
23
23
|
method: 'GET',
|
|
@@ -32,7 +32,7 @@ export const deviceGatewayAdminRouter = c.router({
|
|
|
32
32
|
403: deviceErrorSchema,
|
|
33
33
|
404: deviceErrorSchema,
|
|
34
34
|
},
|
|
35
|
-
summary: 'List
|
|
35
|
+
summary: 'List field devices for a field',
|
|
36
36
|
},
|
|
37
37
|
updateDevice: {
|
|
38
38
|
method: 'PATCH',
|
|
@@ -66,7 +66,7 @@ export const deviceGatewayAdminRouter = c.router({
|
|
|
66
66
|
403: deviceErrorSchema,
|
|
67
67
|
404: deviceErrorSchema,
|
|
68
68
|
},
|
|
69
|
-
summary: 'Register an actuator on a
|
|
69
|
+
summary: 'Register an actuator on a field device',
|
|
70
70
|
},
|
|
71
71
|
listActuators: {
|
|
72
72
|
method: 'GET',
|
|
@@ -102,4 +102,19 @@ export const deviceGatewayAdminRouter = c.router({
|
|
|
102
102
|
},
|
|
103
103
|
summary: 'Queue a manual actuator command (Run now)',
|
|
104
104
|
},
|
|
105
|
+
getFieldSummary: {
|
|
106
|
+
method: 'GET',
|
|
107
|
+
path: '/farms/:farmId/fields/:fieldId/field/summary',
|
|
108
|
+
pathParams: z.object({
|
|
109
|
+
farmId: z.string().uuid(),
|
|
110
|
+
fieldId: z.string().uuid(),
|
|
111
|
+
}),
|
|
112
|
+
responses: {
|
|
113
|
+
200: fieldSummaryResponseSchema,
|
|
114
|
+
401: deviceErrorSchema,
|
|
115
|
+
403: deviceErrorSchema,
|
|
116
|
+
404: deviceErrorSchema,
|
|
117
|
+
},
|
|
118
|
+
summary: 'Field automation dashboard aggregate',
|
|
119
|
+
},
|
|
105
120
|
});
|