Farmbot-Web-App/frontend/farmware/interfaces.ts

56 lines
1.3 KiB
TypeScript
Raw Permalink Normal View History

2019-03-20 14:18:19 -06:00
import { Dictionary, SyncStatus, FarmwareConfig } from "farmbot";
import { NetworkState } from "../connectivity/interfaces";
2018-10-22 09:35:44 -06:00
import { BooleanConfigKey } from "farmbot/dist/resources/configs/web_app";
2018-11-02 13:53:17 -06:00
import { ShouldDisplay } from "../devices/interfaces";
2017-06-29 12:54:02 -06:00
export interface FWState {
selectedFarmware: string | undefined;
packageUrl: string | undefined;
}
export interface FWProps {
botToMqttStatus: NetworkState;
2018-01-19 10:49:07 -07:00
syncStatus: SyncStatus | undefined;
2018-06-21 15:04:21 -06:00
farmwares: Farmwares;
showFirstParty: boolean;
onToggle(key: BooleanConfigKey): void;
2018-02-14 22:07:36 -07:00
firstPartyFarmwareNames: string[];
2017-06-29 12:54:02 -06:00
}
export interface FarmwareState {
2018-06-21 15:04:21 -06:00
currentFarmware: string | undefined;
2017-06-29 12:54:02 -06:00
currentImage: string | undefined;
2018-02-14 22:07:36 -07:00
firstPartyFarmwareNames: string[];
2019-04-09 19:45:59 -06:00
infoOpen: boolean;
2017-06-29 12:54:02 -06:00
}
2017-10-27 02:06:20 -06:00
export interface FarmwareConfigMenuProps {
show: boolean | undefined;
2018-06-21 15:04:21 -06:00
dispatch: Function;
2017-10-27 02:06:20 -06:00
firstPartyFwsInstalled: boolean;
2018-11-02 13:53:17 -06:00
shouldDisplay: ShouldDisplay;
2017-10-27 02:06:20 -06:00
}
2018-02-26 10:53:41 -07:00
2019-03-20 14:18:19 -06:00
export type Farmwares = Dictionary<FarmwareManifestInfo>;
2019-01-13 17:16:22 -07:00
export interface FarmwareEnv {
id?: number;
key: string;
value: string | number | boolean;
}
2019-03-20 14:18:19 -06:00
export interface FarmwareManifestInfo {
name: string;
installation_pending: boolean;
url: string;
config: FarmwareConfig[];
meta: {
fbos_version: string;
farmware_tools_version: string;
description: string;
language: string;
version: string;
author: string;
}
}