import { ServiceError } from '@grpc/grpc-js'; import { Status } from '@grpc/grpc-js/build/src/constants'; export declare enum ErrorType { SESSION_TOKEN_EXPIRED = "SESSION_TOKEN_EXPIRED", SESSION_TOKEN_INVALID = "SESSION_TOKEN_INVALID", SESSION_RESOURCES_EXHAUSTED = "SESSION_RESOURCES_EXHAUSTED", BILLING_TOKENS_EXHAUSTED = "BILLING_TOKENS_EXHAUSTED", ACCOUNT_DISABLED = "ACCOUNT_DISABLED", SESSION_INVALID = "SESSION_INVALID", RESOURCE_NOT_FOUND = "RESOURCE_NOT_FOUND", SAFETY_VIOLATION = "SAFETY_VIOLATION", SESSION_EXPIRED = "SESSION_EXPIRED", AUDIO_SESSION_EXPIRED = "AUDIO_SESSION_EXPIRED", SESSION_PAUSED = "SESSION_PAUSED" } export declare enum ErrorReconnectionType { UNDEFINED = "UNDEFINED", NO_RETRY = "NO_RETRY", IMMEDIATE = "IMMEDIATE", TIMEOUT = "TIMEOUT" } export declare enum ErrorResourceType { RESOURCE_TYPE_UNDEFINED = "RESOURCE_TYPE_UNDEFINED", RESOURCE_TYPE_CONVERSATION = "RESOURCE_TYPE_CONVERSATION" } interface ResourceNotFoundDetails { resourceId?: string; resourceType?: ErrorResourceType; } interface InworldStatus { errorType?: ErrorType; reconnectTime?: string; reconnectType?: ErrorReconnectionType; maxRetries?: number; resourceNotFound?: ResourceNotFoundDetails; } export declare class InworldError { message: string; code: Status | undefined; details: InworldStatus[]; constructor(message: string, code?: Status, details?: InworldStatus[]); static fromProto(proto: ServiceError): InworldError; private static getErrorType; private static getErrorReconnectionType; private static getErrorResourceType; } export {};