Files
placeholder-artcraft/frontend/libs/tauri-api/src/lib/openai/GetOpenAIApiKey.ts
T
Brandon Thomas 0daf83dba9 mirror repo (WIP)
Need to remove secrets before entire repo can be made public.
2025-09-18 22:45:56 -04:00

16 lines
479 B
TypeScript

import { invoke } from "@tauri-apps/api/core";
import { CommandResult } from "../common/CommandStatus";
export interface GetOpenAIApiKeySuccessResult extends CommandResult {
payload: {
key: string;
};
}
export type GetOpenAIApiKeyResult = GetOpenAIApiKeySuccessResult | CommandResult;
export const GetOpenAIApiKey = async (): Promise<GetOpenAIApiKeyResult> => {
const result = await invoke("get_openai_api_key_command");
return result as GetOpenAIApiKeyResult;
};