UNPKG

@humanlayer/sdk

Version:

typescript client for humanlayer.dev

88 lines (87 loc) 2.39 kB
type FunctionCallStatus = { requested_at: Date; responded_at?: Date; approved?: boolean; comment?: string; reject_option_name?: string; slack_message_ts?: string; }; type SlackContactChannel = { channel_or_user_id: string; context_about_channel_or_user?: string; bot_token?: string; experimental_slack_blocks?: boolean; thread_ts?: string; }; type SMSContactChannel = { phone_number: string; context_about_user?: string; }; type WhatsAppContactChannel = { phone_number: string; context_about_user?: string; }; type EmailContactChannel = { address: string; context_about_user?: string; additional_recipients?: EmailRecipient[]; experimental_subject_line?: string; experimental_in_reply_to_message_id?: string; experimental_references_message_id?: string; template?: string; }; type EmailRecipient = { address: string; context_about_user?: string; field: 'to' | 'cc' | 'bcc'; }; type ContactChannel = { slack?: SlackContactChannel; sms?: SMSContactChannel; whatsapp?: WhatsAppContactChannel; email?: EmailContactChannel; }; type ResponseOption = { name: string; title?: string; description?: string; prompt_fill?: string; interactive?: boolean; }; type FunctionCallSpec = { fn: string; kwargs: Record<string, any>; channel?: ContactChannel; reject_options?: ResponseOption[]; state?: Record<string, any>; }; type FunctionCall = { run_id: string; call_id: string; spec: FunctionCallSpec; status?: FunctionCallStatus; }; type Escalation = { escalation_msg: string; additional_recipients?: EmailRecipient[]; channel?: ContactChannel; }; type HumanContactSpec = { msg: string; channel?: ContactChannel; response_options?: ResponseOption[]; state?: Record<string, any>; }; type HumanContactStatus = { requested_at?: Date; responded_at?: Date; response?: string; response_option_name?: string; }; type HumanContact = { run_id: string; call_id: string; spec: HumanContactSpec; status?: HumanContactStatus; }; export { SlackContactChannel, SMSContactChannel, WhatsAppContactChannel, EmailContactChannel, EmailRecipient, ContactChannel, ResponseOption, FunctionCallSpec, FunctionCallStatus, FunctionCall, Escalation, HumanContactSpec, HumanContactStatus, HumanContact, };