/** Parameters for the InvokeLLM function. */
interface InvokeLLMParams {
/** The prompt text to send to the model. */
prompt: string;
/** Optional model override for this call (app-level model setting is used otherwise). */
model?: 'gemini_3_8_flash' | 'gpt_6_luna' | 'claude-sonnet-5' | 'claude_opus_5_5' | 'gpt_6_sol' | 'gpt_6_astra' | 'claude_fable_5_1' | 'glm_5_2' | 'gemini_3_1_pro' | 'gpt_5_4' | 'claude_sonnet_4_6' | 'claude_opus_4_6' | 'claude_opus_4_7' | 'claude_opus_4_8' | 'claude_opus_5' | 'gpt_5_6_terra' | 'gpt_5_6_sol' | 'gpt_5_6_luna';
/** If true, uses Google Search/Maps/News for real-time context. Default false. */
add_context_from_internet?: boolean;
/** JSON schema for structured output. If provided, returns object instead of string. */
response_json_schema?: object;
/** File URLs (from UploadFile) to provide as context. Don't combine with add_context_from_internet. */
file_urls?: string[];
}
/** Parameters for the GenerateImage function. */
interface GenerateImageParams {
/** Description of the image to generate (or of the edit, when existing_image_urls is set). */
prompt: string;
/** Reference image URLs, for edits/style/visual context. Unreadable images are skipped. */
existing_image_urls?: string[];
}
/** Result from GenerateImage. */
interface GenerateImageResult {
/** URL of the generated image. */
url: string;
}
/** Parameters for the UploadFile function. */
interface UploadFileParams {
/** The file object to upload. */
file: File;
}
/** Result from UploadFile. */
interface UploadFileResult {
/** URL of the uploaded file. */
file_url: string;
}
/** A file to attach to an email. */
interface EmailAttachment {
/** Shown filename, including extension. Supported: csv, docx, gif, ics, jpeg, jpg, md, pdf, png, txt, webp, xlsx. */
filename: string;
/** A file your app already uploaded (e.g. UploadFile's file_url or UploadPrivateFile's file_uri). */
file_url?: string;
/** Base64-encoded contents, for a file your code generated. */
content?: string;
}
/** Parameters for the SendEmail function. Set at least one of body, html, or text. */
interface SendEmailParams {
/** Recipient email address. */
to: string;
/** Email subject line. */
subject: string;
/** HTML email body. Same as html — set one or the other, not both. */
body?: string;
/** HTML email body. Same as body — set one or the other, not both. */
html?: string;
/** Plain-text body. Alone, sends plain-text only; with body/html, sends both. */
text?: string;
/** Sender name (defaults to app name). */
from_name?: string;
/** Up to 5 files, up to 5 MB each / 10 MB total. */
attachments?: EmailAttachment[];
}
/** Parameters for ExtractDataFromUploadedFile. */
interface ExtractDataFromUploadedFileParams {
/** URL of the uploaded file. */
file_url: string;
/** JSON schema defining fields to extract. */
json_schema: object;
}
/** Parameters for UploadPrivateFile. */
interface UploadPrivateFileParams {
/** The file object to upload. */
file: File;
}
/** Result from UploadPrivateFile. */
interface UploadPrivateFileResult {
/** URI of the private file (used for signed URLs). */
file_uri: string;
}
/** Parameters for CreateFileSignedUrl. */
interface CreateFileSignedUrlParams {
/** URI from UploadPrivateFile. */
file_uri: string;
/** Expiration time in seconds, from 60 to 3600 (default: 300). */
expires_in?: number;
}
/** Result from CreateFileSignedUrl. */
interface CreateFileSignedUrlResult {
/** Temporary signed URL to access the file. */
signed_url: string;
}