mirror of
https://github.com/storytold/placeholder-artcraft.git
synced 2026-10-17 00:13:00 +00:00
0daf83dba9
Need to remove secrets before entire repo can be made public.
16 lines
479 B
TypeScript
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;
|
|
};
|