export interface Agent extends AgentFields { id: string; account_id?: string; last_logout?: string; } export interface AgentFields { name?: string; role?: string; avatar_path?: string; job_title?: string; mobile?: string; max_chats_count?: number; awaiting_approval?: boolean; groups?: GroupConfig[]; work_scheduler?: WorkScheduler; notifications?: string[]; email_subscriptions?: string[]; } export interface GroupConfig { id: number; priority: string; } export interface WorkScheduler { timezone: string; schedule: Schedule[]; } export interface Schedule { day: string; enabled: boolean; start: string; end: string; } export interface BotFields { name?: string; avatar_path?: string; default_group_priority?: GroupPriority; job_title?: string; mobile?: string; max_chats_count?: number; groups?: GroupConfig[]; work_scheduler?: WorkScheduler; owner_client_id?: string; timezone?: string; } export interface Bot { id: string; name?: string; avatar?: string; default_group_priority?: GroupPriority; owner_client_id?: string; max_chats_count?: number; groups?: GroupConfig[]; job_title?: string; work_scheduler?: WorkScheduler; } export interface BotTemplate extends BotTemplateFieldsCreate { id: string; name: string; } export interface BotTemplateFieldsCreate { avatar?: string; max_chats_count?: number; default_group_priority?: GroupPriority; job_title?: string; } export interface BotTemplateFieldsUpdate { name?: string; avatar?: string; max_chats_count?: number; default_group_priority?: GroupPriority; job_title?: string; } export declare enum GroupPriority { First = "first", Normal = "normal", Last = "last", DoNotAssign = "supervisor" } export interface AgentPriorities { [agent_id: string]: GroupPriority; } export interface Group { id: number; name: string; language_code: string; agent_priorities?: AgentPriorities; routing_status?: RoutingStatus; } export interface PropertiesConfig { [propertyName: string]: PropertyConfig; } export interface PropertyConfig { name: string; owner_client_id?: string; type: string; access: { [locationName: string]: LocationAccess; }; description?: string; domain?: any[]; range?: { from: number; to: number; }; public_access?: string[]; default_value?: any; } export interface LocationAccess { agent?: string[]; customer?: string[]; } export interface Webhook { action: string; secret_key: string; url: string; type: string; additional_data?: string[]; description?: string; filters?: WebhookFilters; } type WebhookSourceType = "my_client" | "other_clients" | "system"; export interface WebhookFilters { author_type?: string; only_my_chats?: boolean; chat_presence?: { user_ids?: Filter; my_bots: boolean; }; source_type?: WebhookSourceType[]; } export interface RegisteredWebhook extends Webhook { id: string; owner_client_id: string; } export interface WebhookData { action: string; additional_data?: string[]; filters?: string[]; } export interface WebhooksState { license_webhooks_enabled: boolean; } interface AutoAccessConditions { url?: Filter<{ value: string; exact_match?: boolean; }>; domain?: Filter<{ value: string; exact_match?: boolean; }>; geolocation?: Filter<{ country?: string; country_code?: string; region?: string; city?: string; }>; } export interface AutoAccess { id: string; access: { groups: number[]; }; description?: string; next_id?: string; } export interface AddAutoAccessRequest extends Omit { conditions: AutoAccessConditions; } export interface UpdateAutoAccessRequest extends Omit { conditions?: AutoAccessConditions; } export interface PlanLimit { resource: string; limit_balance: number; id?: string; } export interface ChannelActivity { channel_type: string; channel_subtype: string; first_activity_timestamp: string; } export interface Tag { name: string; group_ids: number[]; author_id: string; created_at: string; } export interface CompanyDetails { invoice_name?: string; company?: string; street?: string; postal_code?: string; city?: string; country?: string; nip?: string; state?: string; province?: string; phone?: string; url?: string; invoice_email?: string; company_size?: string; chat_purpose?: string; audience?: string; industry?: string; } export interface GroupProperties { id: string; properties: Properties; } export interface Properties { [property_namespace: string]: PropertyNamespace; } export interface PropertyNamespace { [property_name: string]: any; } export declare enum RoutingStatus { AcceptingChats = "accepting_chats", NotAcceptingChats = "not_accepting_chats", Offline = "offline" } export interface Filter { values?: T[]; exclude_values?: T[]; } export interface WebAPIOptions { apiUrl?: string; } export interface RichMessageElementImage { url: string; alternative_text: string; } export interface RichMessageElementButton { button_id?: string; postback_id?: string; text: string; type: string; value: string; role?: string; } export interface RichMessageElement { title?: string; subtitle?: string; image?: RichMessageElementImage; buttons?: RichMessageElementButton[]; } export interface RichMessage { template_id: string; elements: RichMessageElement[]; } export interface ActionURL { url?: string; operator?: string; } export interface ActionRule { id?: number; value?: string; type: string; operator?: string; condition: string; session_field?: Record; urls?: ActionURL[]; } export interface Greeting { id: number; type: string; active: boolean; name: string; group: number; active_from?: string; active_until?: string; rules: ActionRule[]; properties: Record; rich_message?: RichMessage; } export interface CreateGreetingRequest { type: string; active: boolean; name: string; group: number; rules: ActionRule[]; active_from?: string; active_until?: string; properties?: Record; rich_message?: RichMessage; } export interface UpdateGreetingRequest { id: number; type?: string; active?: boolean; active_from?: string; active_until?: string; name?: string; rules?: ActionRule[]; properties?: Record; rich_message?: RichMessage; } export interface ListGreetingsRequest { groups?: number[]; } export interface ListGreetingsResponse { greetings: Greeting[]; found_greetings: number; next_page_id?: string; } export {}; //# sourceMappingURL=structures.d.ts.map