Remove FBJS interfaces from project. Part I.
parent
035d20191c
commit
05c737eec4
|
@ -5,12 +5,6 @@ export interface PeripheralState {
|
|||
isEditing: boolean;
|
||||
}
|
||||
|
||||
export interface Peripheral {
|
||||
id?: number;
|
||||
pin: number | undefined;
|
||||
label: string;
|
||||
}
|
||||
|
||||
export interface PeripheralFormProps {
|
||||
dispatch: Function;
|
||||
peripherals: TaggedPeripheral[];
|
||||
|
|
|
@ -2,36 +2,6 @@ import { BotState, ShouldDisplay } from "../interfaces";
|
|||
import { NetworkState } from "../../connectivity/interfaces";
|
||||
import { ResourceIndex } from "../../resources/interfaces";
|
||||
|
||||
export type PinBinding = StandardPinBinding | SpecialPinBinding;
|
||||
|
||||
interface PinBindingBase { id?: number; pin_num: number; }
|
||||
|
||||
export enum PinBindingType {
|
||||
special = "special",
|
||||
standard = "standard",
|
||||
}
|
||||
|
||||
interface StandardPinBinding extends PinBindingBase {
|
||||
binding_type: PinBindingType.standard;
|
||||
sequence_id: number;
|
||||
}
|
||||
|
||||
export interface SpecialPinBinding extends PinBindingBase {
|
||||
binding_type: PinBindingType.special;
|
||||
special_action: PinBindingSpecialAction;
|
||||
}
|
||||
|
||||
export enum PinBindingSpecialAction {
|
||||
emergency_lock = "emergency_lock",
|
||||
emergency_unlock = "emergency_unlock",
|
||||
sync = "sync",
|
||||
reboot = "reboot",
|
||||
power_off = "power_off",
|
||||
dump_info = "dump_info",
|
||||
read_status = "read_status",
|
||||
take_photo = "take_photo",
|
||||
}
|
||||
|
||||
export interface PinBindingsProps {
|
||||
bot: BotState;
|
||||
dispatch: Function;
|
||||
|
|
|
@ -67,27 +67,6 @@ export interface Props {
|
|||
getConfigValue: GetWebAppConfigValue;
|
||||
}
|
||||
|
||||
export type TimeUnit =
|
||||
| "never"
|
||||
| "minutely"
|
||||
| "hourly"
|
||||
| "daily"
|
||||
| "weekly"
|
||||
| "monthly"
|
||||
| "yearly";
|
||||
|
||||
export type ExecutableType = "Sequence" | "Regimen";
|
||||
|
||||
export interface FarmEvent {
|
||||
id?: number | undefined;
|
||||
start_time: string;
|
||||
end_time?: string | undefined;
|
||||
repeat?: number | undefined;
|
||||
time_unit: TimeUnit;
|
||||
executable_id: number;
|
||||
executable_type: ExecutableType;
|
||||
}
|
||||
|
||||
export interface MovePlantProps {
|
||||
deltaX: number;
|
||||
deltaY: number;
|
||||
|
@ -265,17 +244,6 @@ export interface CurrentPointPayl {
|
|||
color?: string;
|
||||
}
|
||||
|
||||
export interface PlantTemplate {
|
||||
id?: number;
|
||||
saved_garden_id: number;
|
||||
radius: number;
|
||||
x: number;
|
||||
y: number;
|
||||
z: number;
|
||||
name: string;
|
||||
openfarm_slug: string;
|
||||
}
|
||||
|
||||
export interface SavedGarden {
|
||||
id?: number;
|
||||
name?: string;
|
||||
|
|
|
@ -1,20 +1,5 @@
|
|||
import { TaggedImage } from "farmbot";
|
||||
|
||||
export interface Image {
|
||||
id: number;
|
||||
device_id: number;
|
||||
attachment_processed_at: string | undefined;
|
||||
updated_at: string;
|
||||
created_at: string;
|
||||
attachment_url: string;
|
||||
meta: {
|
||||
x: number | undefined;
|
||||
y: number | undefined;
|
||||
z: number | undefined;
|
||||
name?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ImageFlipperProps {
|
||||
onFlip(uuid: string | undefined): void;
|
||||
images: TaggedImage[];
|
||||
|
|
|
@ -30,9 +30,4 @@ export interface FarmwareConfigMenuProps {
|
|||
firstPartyFwsInstalled: boolean;
|
||||
}
|
||||
|
||||
export interface FarmwareInstallation {
|
||||
id?: number;
|
||||
url: string;
|
||||
}
|
||||
|
||||
export type Farmwares = Dictionary<FarmwareManifest | undefined>;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { AuthState } from "./auth/interfaces";
|
||||
import { ConfigState } from "./config/interfaces";
|
||||
import { BotState } from "./devices/interfaces";
|
||||
import { Color as FarmBotJsColor, ALLOWED_MESSAGE_TYPES, PlantStage } from "farmbot";
|
||||
import { Color as FarmBotJsColor } from "farmbot";
|
||||
import { Point } from "farmbot/dist/resources/api_resources";
|
||||
import { DraggableState } from "./draggable/interfaces";
|
||||
import { PeripheralState } from "./controls/peripherals/interfaces";
|
||||
import { RestResources } from "./resources/interfaces";
|
||||
import { ChannelName } from "./sequences/interfaces";
|
||||
|
||||
/** Regimens and sequences may have a "color" which determines how it looks
|
||||
in the UI. Only certain colors are valid. */
|
||||
|
@ -34,19 +34,6 @@ export interface DeviceConfig {
|
|||
key: string;
|
||||
value: string | number | boolean;
|
||||
}
|
||||
export interface Log {
|
||||
id?: number | undefined;
|
||||
message: string;
|
||||
type: ALLOWED_MESSAGE_TYPES;
|
||||
x?: number;
|
||||
y?: number;
|
||||
z?: number;
|
||||
verbosity?: number;
|
||||
major_version?: number;
|
||||
minor_version?: number;
|
||||
channels: ChannelName[];
|
||||
created_at: number;
|
||||
}
|
||||
|
||||
interface Location {
|
||||
/** EX: /app/designer */
|
||||
|
@ -85,48 +72,4 @@ export interface Everything {
|
|||
// tslint:disable-next-line:no-any
|
||||
export type UnsafeError = any;
|
||||
|
||||
interface BasePoint {
|
||||
id?: number | undefined;
|
||||
dirty?: boolean | undefined;
|
||||
created_at?: string | undefined;
|
||||
updated_at?: string | undefined;
|
||||
radius: number;
|
||||
x: number;
|
||||
y: number;
|
||||
z: number;
|
||||
pointer_id?: number | undefined;
|
||||
meta: { [key: string]: (string | undefined) };
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface PlantPointer extends BasePoint {
|
||||
openfarm_slug: string;
|
||||
pointer_type: "Plant";
|
||||
planted_at?: string;
|
||||
plant_stage: PlantStage;
|
||||
}
|
||||
|
||||
export enum ToolPulloutDirection {
|
||||
NONE = 0,
|
||||
POSITIVE_X = 1,
|
||||
NEGATIVE_X = 2,
|
||||
POSITIVE_Y = 3,
|
||||
NEGATIVE_Y = 4,
|
||||
}
|
||||
|
||||
export interface ToolSlotPointer extends BasePoint {
|
||||
tool_id: number | undefined;
|
||||
pointer_type: "ToolSlot";
|
||||
pullout_direction: ToolPulloutDirection;
|
||||
}
|
||||
|
||||
export interface GenericPointer extends BasePoint {
|
||||
pointer_type: "GenericPointer";
|
||||
}
|
||||
|
||||
export type Point =
|
||||
| GenericPointer
|
||||
| ToolSlotPointer
|
||||
| PlantPointer;
|
||||
|
||||
export type PointerTypeName = Point["pointer_type"];
|
||||
|
|
Loading…
Reference in New Issue