import { DeviceInfo } from '../types/device'; export interface ManagedInstall { instanceName: string; install: DeviceInfo; updatedMillisecond: number; } export declare abstract class InstallStoreBase { /** * Get an install. * @param id obnizId */ abstract get(id: string): Promise; /** * Get all installs specified in the ID array. */ abstract getMany(ids: string[]): Promise<{ [id: string]: ManagedInstall | undefined; }>; /** * Get the Installs on a specific Worker. */ abstract getByWorker(name: string): Promise<{ [id: string]: ManagedInstall; }>; /** * Get all the installs on the InstallStore. */ abstract getAll(): Promise<{ [id: string]: ManagedInstall; }>; /** * Automatically selects an optimal Slave and creates an Install. * @param id obnizId */ abstract autoCreate(id: string, deviceInfo: DeviceInfo): Promise; /** * Create an Install from the data. * @param id obnizId * @param install Install Data */ abstract manualCreate(id: string, install: ManagedInstall): Promise; /** * Update the Install data. * @param id obnizId * @param props Install Data */ abstract update(id: string, props: Partial): Promise; /** * Automatically relocates the Install. * @param id obnizId */ abstract autoRelocate(id: string, force?: boolean): Promise; /** * Remove Install. * @param id obnizId */ abstract remove(id: string): Promise; }