@composableai/cli
Version:
Code generation for the interaction defined with Composable AI Studio
56 lines • 1.88 kB
TypeScript
import { ConfigPayload, ConfigResult } from "./server/index.js";
export declare function getConfigFile(path?: string): string;
export type ConfigUrlRef = "local" | "staging" | "preview" | "prod" | string;
export declare function getConfigUrl(value: ConfigUrlRef): string;
export interface Profile {
name: string;
config_url: string;
apikey: string;
account: string;
project: string;
studio_server_url: string;
zeno_server_url: string;
session_tags?: string;
}
interface ProfilesData {
default: string;
profiles: Profile[];
}
export declare class ConfigureProfile {
config: Config;
data: Partial<Profile>;
isNew: boolean;
constructor(config: Config, data: Partial<Profile>, isNew: boolean);
getConfigPayload(): ConfigPayload;
applyConfigResult(result: ConfigResult): void;
start(): void;
}
export declare class Config {
current?: Profile;
profiles: Profile[];
constructor(data?: ProfilesData);
hasProfile(name: string): boolean;
getProfile(name: string): Profile | undefined;
use(name: string): this;
add(profile: Profile): this;
update(profile: Profile): this;
replace(existingProfile: Profile, newProfile: Profile): this;
remove(name: string): this;
createProfile(name: string, target: ConfigUrlRef): ConfigureProfile;
updateProfile(name: string): ConfigureProfile;
createOrUpdateProfile(name: string, target?: ConfigUrlRef): ConfigureProfile;
save(): this;
load(): this;
}
export declare class ProfileAlreadyExistsError extends Error {
constructor(message: string);
}
export declare class ProfileNotFoundError extends Error {
constructor(message: string);
}
export declare class InvalidConfigUrlError extends Error {
constructor(message: string);
}
declare const config: Config;
export { config };
//# sourceMappingURL=index.d.ts.map