balena-cli
Version:
The official balena Command Line Interface
26 lines (25 loc) • 1.63 kB
TypeScript
import type { Application, BalenaSDK, Organization, Pine } from 'balena-sdk';
export declare function authenticate(options: object): Promise<void>;
export declare function checkLoggedIn(): Promise<void>;
export declare const checkLoggedInIf: (doCheck: boolean) => Promise<void>;
export declare const checkNotUsingOfflineMode: () => void;
export declare function askLoginType(): Promise<"token" | "web" | "credentials" | "register">;
export declare function selectDeviceType(): Promise<string>;
export declare function confirm(yesOption: boolean, message: string, yesMessage?: string, defaultValue?: boolean): Promise<void>;
declare const selectApplicationPineOptions: {
readonly $select: readonly ["id", "slug", "app_name"];
readonly $expand: {
readonly is_for__device_type: {
readonly $select: "slug";
};
};
};
type SelectApplicationResult = Pine.OptionsToResponse<Application['Read'], typeof selectApplicationPineOptions, undefined>[number];
export declare function selectApplication<T extends Pine.Filter<Application['Read']>>(filter?: T | ((app: SelectApplicationResult) => boolean), errorOnEmptySelection?: boolean): Promise<SelectApplicationResult>;
export declare function selectOrganization(organizations?: Array<Pick<Organization['Read'], 'handle' | 'name'>>): Promise<string>;
export declare function getAndSelectOrganization(): Promise<string>;
export declare function getOnlineTargetDeviceUuid(sdk: BalenaSDK, fleetOrDevice: string): Promise<string>;
export declare function selectFromList<T>(message: string, choices: Array<T & {
name: string;
}>): Promise<T>;
export {};