UNPKG

@rapidaai/react

Version:

An easy to use react client for building generative ai application using Rapida platform.

876 lines (856 loc) 149 kB
import { C as Content, V as VoiceAgent, F as Feedback, A as AssistantDebuggerDeployment, a as AssistantWebpluginDeployment, b as AssistantApiDeployment, c as Assistant, R as RapidaSource, M as Message, d as ConnectionConfig, e as ClientAuthInfo, U as UserAuthInfo, I as IndexKnowledgeDocumentResponse, G as GetAllDeploymentResponse, f as InvokeRequest, g as InvokeResponse, h as AuthenticateResponse, i as VerifyTokenResponse, j as ForgotPasswordResponse, k as CreatePasswordResponse, l as GetUserResponse, m as UpdateUserResponse, n as GetAllUserResponse, o as GetAllModelProviderResponse, p as GetAllToolProviderResponse, q as GeneralConnectResponse, K as KnowledgeConnectResponse, r as ActionConnectResponse, s as Criteria, t as GetConnectorFilesResponse, u as CreateOrganizationResponse, v as UpdateOrganizationResponse, w as GetOrganizationResponse, x as GetAllAssistantResponse, y as GetAssistantResponse, z as GetAllAssistantProviderModelResponse, B as GetAssistantRequest, T as TextChatCompletePrompt, D as Metadata, E as GetAssistantProviderModelResponse, H as CreateAssistantProviderModelRequest, J as CreateAssistantKnowledgeRequest, L as CreateAssistantToolRequest, N as GetAllAssistantMessageResponse, O as GetAllMessageResponse, P as GetAllConversationMessageResponse, Q as CreateAssistantDeploymentRequest, S as GetAssistantDebuggerDeploymentResponse, W as GetAssistantDeploymentRequest, X as GetAssistantApiDeploymentResponse, Y as GetAssistantWebpluginDeploymentResponse, Z as GetAssistantPhoneDeploymentResponse, _ as GetAssistantWhatsappDeploymentResponse, $ as GetAllAssistantWebhookResponse, a0 as GetAssistantWebhookResponse, a1 as GetAssistantConversationRequest, a2 as GetAssistantConversationResponse, a3 as GetAllAssistantAnalysisResponse, a4 as GetAssistantAnalysisResponse, a5 as GetAllAssistantWebhookLogResponse, a6 as GetAssistantWebhookLogResponse, a7 as GetAllAssistantToolResponse, a8 as GetAssistantToolResponse, a9 as GetAllAssistantKnowledgeResponse, aa as GetAssistantKnowledgeResponse, ab as GetAssistantToolLogRequest, ac as GetAssistantToolLogResponse, ad as GetAllAssistantToolLogRequest, ae as GetAllAssistantToolLogResponse, af as GetAllAuditLogResponse, ag as GetAuditLogResponse, ah as GetAllEndpointResponse, ai as UpdateEndpointVersionResponse, aj as GetAllEndpointProviderModelResponse, ak as GetEndpointResponse, al as EndpointProviderModelAttribute, am as CreateEndpointProviderModelResponse, an as EndpointAttribute, ao as CreateEndpointResponse, ap as EndpointRetryConfiguration, aq as EndpointCacheConfiguration, ar as CreateEndpointRetryConfigurationResponse, as as CreateEndpointCacheConfigurationResponse, at as GetAllEndpointLogResponse, au as GetEndpointLogResponse, av as GetCredentialResponse, aw as GetAllOrganizationCredentialResponse, ax as AssistantMessagingRequest, ay as AssistantMessagingResponse, az as CreateMessageMetricRequest, aA as CreateMessageMetricResponse, aB as CreateConversationMetricRequest, aC as CreateConversationMetricResponse, aD as GetAllAssistantConversationResponse, aE as CreateKnowledgeResponse, aF as GetKnowledgeResponse, aG as GetAllKnowledgeResponse, aH as CreateKnowledgeDocumentResponse, aI as GetAllKnowledgeDocumentResponse, aJ as GetAllKnowledgeDocumentSegmentResponse, aK as BaseResponse, aL as GetKnowledgeLogRequest, aM as GetKnowledgeLogResponse, aN as GetAllKnowledgeLogRequest, aO as GetAllKnowledgeLogResponse, aP as AddUsersToProjectResponse, aQ as CreateProjectResponse, aR as UpdateProjectResponse, aS as GetAllProjectResponse, aT as GetProjectResponse, aU as ArchiveProjectResponse, aV as GetAllProjectCredentialResponse, aW as CreateProjectCredentialResponse, aX as Error$1, aY as Metric, aZ as Message$1, a_ as CreatePhoneCallRequest, a$ as CreatePhoneCallResponse, b0 as CreateBulkPhoneCallRequest, b1 as CreateBulkPhoneCallResponse } from './device-selector-DIhyLN0t.js'; export { dx as ActionConnectRequest, cT as AddUsersToProjectRequest, b7 as AgentCallback, b6 as AgentConfig, dG as AggregatedEndpointAnalytics, cU as ArchiveProjectRequest, d1 as Argument, cf as AssistantAnalysis, dd as AssistantConversation, ce as AssistantConversationAssistantMessage, cb as AssistantConversationConfiguration, dc as AssistantConversationContext, cc as AssistantConversationInterruption, db as AssistantConversationMessage, dg as AssistantConversationRecording, cd as AssistantConversationUserMessage, ca as AssistantDefinition, bF as AssistantDeploymentService, bG as AssistantDeploymentServiceClient, bN as AssistantKnowledge, da as AssistantMessageStage, e0 as AssistantPhoneDeployment, eh as AssistantProviderModel, dh as AssistantService, di as AssistantServiceClient, dV as AssistantTool, dW as AssistantToolLog, dl as AssistantWebhook, dm as AssistantWebhookLog, e1 as AssistantWhatsappDeployment, bU as AuditLog, e2 as AuditLoggingService, e3 as AuditLoggingServiceClient, cq as AuthenticateRequest, cw as Authentication, cy as AuthenticationError, er as AuthenticationService, eu as AuthenticationServiceClient, cC as AuthorizeRequest, b3 as Channel, bH as ConnectService, bI as ConnectServiceClient, b2 as ConnectionState, cg as CreateAssistantAnalysisRequest, ei as CreateAssistantRequest, ej as CreateAssistantTagRequest, dn as CreateAssistantWebhookRequest, dO as CreateEndpointCacheConfigurationRequest, dI as CreateEndpointProviderModelRequest, dE as CreateEndpointRequest, dN as CreateEndpointRetryConfigurationRequest, dP as CreateEndpointTagRequest, ea as CreateKnowledgeDocumentRequest, e4 as CreateKnowledgeRequest, e7 as CreateKnowledgeTagRequest, bX as CreateMetadataRequest, bY as CreateMetadataResponse, cK as CreateOrganizationRequest, cA as CreatePasswordRequest, cW as CreateProjectCredentialRequest, cP as CreateProjectRequest, c3 as CreateProviderCredentialRequest, c4 as CreateToolCredentialRequest, ez as DEBUGGER_SOURCE, cj as DeleteAssistantAnalysisRequest, bQ as DeleteAssistantKnowledgeRequest, ek as DeleteAssistantRequest, dZ as DeleteAssistantToolRequest, dr as DeleteAssistantWebhookRequest, ef as DeleteKnowledgeDocumentSegmentRequest, bL as Deployment, d$ as DeploymentAudioProvider, bM as DeploymentClient, ex as DeviceSelectorComponent, dz as DocumentService, dA as DocumentServiceClient, dH as Endpoint, cl as EndpointDefinition, dS as EndpointLog, dF as EndpointProviderModel, bD as EndpointService, bE as EndpointServiceClient, cv as FeaturePermission, cY as FieldSelector, cz as ForgotPasswordRequest, dQ as ForkEndpointRequest, d7 as FunctionCall, dw as GeneralConnectRequest, ck as GetAllAssistantAnalysisRequest, de as GetAllAssistantConversationRequest, bR as GetAllAssistantKnowledgeRequest, en as GetAllAssistantMessageRequest, em as GetAllAssistantProviderModelRequest, el as GetAllAssistantRequest, d_ as GetAllAssistantToolRequest, dt as GetAllAssistantWebhookLogRequest, ds as GetAllAssistantWebhookRequest, bV as GetAllAuditLogRequest, df as GetAllConversationMessageRequest, bS as GetAllDeploymentRequest, dT as GetAllEndpointLogRequest, dL as GetAllEndpointProviderModelRequest, dK as GetAllEndpointRequest, e9 as GetAllKnowledgeDocumentRequest, ec as GetAllKnowledgeDocumentSegmentRequest, e5 as GetAllKnowledgeRequest, eo as GetAllMessageRequest, b$ as GetAllModelProviderRequest, c6 as GetAllOrganizationCredentialRequest, cX as GetAllProjectCredentialRequest, cS as GetAllProjectRequest, c1 as GetAllToolProviderRequest, cI as GetAllUserRequest, ci as GetAssistantAnalysisRequest, bP as GetAssistantKnowledgeRequest, dY as GetAssistantToolRequest, du as GetAssistantWebhookLogRequest, dq as GetAssistantWebhookRequest, bW as GetAuditLogRequest, dy as GetConnectorFilesRequest, c7 as GetCredentialRequest, dU as GetEndpointLogRequest, dJ as GetEndpointRequest, e6 as GetKnowledgeRequest, cM as GetOrganizationRequest, cR as GetProjectRequest, c5 as GetProviderCredentialRequest, cF as GetUserRequest, bd as HEADER_API_KEY, be as HEADER_AUTH_ID, bo as HEADER_COLOR_DEPTH, bs as HEADER_CONNECTION_EFFECTIVE_TYPE, br as HEADER_CONNECTION_TYPE, bt as HEADER_COOKIES_ENABLED, bp as HEADER_DEVICE_MEMORY, bu as HEADER_DO_NOT_TRACK, ba as HEADER_ENVIRONMENT_KEY, bq as HEADER_HARDWARE_CONCURRENCY, bh as HEADER_LANGUAGE, bx as HEADER_LATITUDE, by as HEADER_LONGITUDE, bi as HEADER_PLATFORM, bf as HEADER_PROJECT_ID, bv as HEADER_REFERRER, bc as HEADER_REGION_KEY, bw as HEADER_REMOTE_URL, bk as HEADER_SCREEN_HEIGHT, bj as HEADER_SCREEN_WIDTH, bb as HEADER_SOURCE_KEY, bn as HEADER_TIMEZONE, bg as HEADER_USER_AGENT, bm as HEADER_WINDOW_HEIGHT, bl as HEADER_WINDOW_WIDTH, dD as IndexKnowledgeDocumentRequest, b4 as InputOptions, d8 as Knowledge, dv as KnowledgeConnectRequest, e8 as KnowledgeDocument, eb as KnowledgeDocumentSegment, eg as KnowledgeLog, bZ as KnowledgeService, b_ as KnowledgeServiceClient, dB as MarketplaceService, dC as MarketplaceServiceClient, b8 as MessageRole, b9 as MessageStatus, c$ as Ordering, d5 as Organization, cJ as OrganizationError, ct as OrganizationRole, es as OrganizationService, ev as OrganizationServiceClient, b5 as OutputOptions, eB as PHONE_CALL_SOURCE, cZ as Paginate, c_ as Paginated, co as ProbeRequest, cp as ProbeResponse, cO as Project, cV as ProjectCredential, cu as ProjectRole, et as ProjectService, ew as ProjectServiceClient, d3 as Provider, c8 as ProviderService, c9 as ProviderServiceClient, cr as RegisterUserRequest, eA as SDK_SOURCE, cD as ScopeAuthorizeRequest, cx as ScopedAuthentication, cE as ScopedAuthenticationResponse, bT as SearchableDeployment, cH as SocialAuthenticationRequest, d4 as Tag, dj as TalkService, dk as TalkServiceClient, d9 as TextPrompt, cs as Token, d6 as ToolCall, c0 as ToolProvider, ch as UpdateAssistantAnalysisRequest, eq as UpdateAssistantDetailRequest, bO as UpdateAssistantKnowledgeRequest, dX as UpdateAssistantToolRequest, ep as UpdateAssistantVersionRequest, dp as UpdateAssistantWebhookRequest, cN as UpdateBillingInformationRequest, dR as UpdateEndpointDetailRequest, dM as UpdateEndpointVersionRequest, ed as UpdateKnowledgeDetailRequest, ee as UpdateKnowledgeDocumentSegmentRequest, cL as UpdateOrganizationRequest, cQ as UpdateProjectRequest, cm as UpdateRequest, cn as UpdateResponse, cG as UpdateUserRequest, d0 as User, d2 as Variable, c2 as VaultCredential, bJ as VaultService, bK as VaultServiceClient, cB as VerifyTokenRequest, ey as WEB_PLUGIN_SOURCE, eC as WHATSAPP_SOURCE, bA as WithAuthContext, bC as WithClientContext, bz as WithPlatform, eE as fromStr, bB as getClientInfo, eD as getRapidaSourceValue } from './device-selector-DIhyLN0t.js'; import * as jspb from 'google-protobuf'; import { Map } from 'google-protobuf'; import * as google_protobuf_any_pb from 'google-protobuf/google/protobuf/any_pb'; import { Any } from 'google-protobuf/google/protobuf/any_pb'; import { grpc } from '@improbable-eng/grpc-web'; import * as google_protobuf_struct_pb from 'google-protobuf/google/protobuf/struct_pb'; export { MultibandAudioVisualizerComponent } from './components/visualization/multiband-audio-visualizer.js'; import { Observable } from 'rxjs'; import 'google-protobuf/google/protobuf/timestamp_pb'; import 'typed-emitter'; import 'react'; import 'react/jsx-runtime'; type ResponseContentFormat = "raw" | "word" | "url" | "chunk"; /** * * @param str * @returns */ declare const toTextContent: (str: string, format?: ResponseContentFormat) => Content; declare const toStreamAudioContent: (raw: Uint8Array | string) => Content; declare const toContentText: (cnt?: Content[]) => string; /** * Custom hook for managing agent connection in a voice system. * @returns An object containing the connection handler and connection status. */ declare function useMessageFeedback(agent: VoiceAgent): { handleMessageFeedback: (messageId: string, name: string, description: string, value: string) => Promise<void>; handleHelpfulnessFeedback: (messageId: string, value: Feedback) => Promise<void>; }; /** * Custom hook for managing agent connection in a voice system. * @returns An object containing the connection handler and connection status. */ declare function useConversationFeedback(agent: VoiceAgent): { handleHelpfulnessFeedback: (value: Feedback) => Promise<void>; handleConversationFeedback: (name: string, description: string, value: string) => Promise<void>; }; /** * Custom hook for managing agent connection in a voice system. * @returns An object containing the connection handler and connection status. */ declare function useConnectAgent(agent: VoiceAgent): { handleConnectAgent: () => Promise<void>; handleDisconnectAgent: () => Promise<void>; isConnected: boolean; }; /** * Custom hook for toggling input mode (voice/text) for the agent. * @returns An object containing toggle handlers and the current input channel. */ declare function useInputModeToggleAgent(agent: VoiceAgent): { handleTextToggle: () => Promise<void>; handleVoiceToggle: () => Promise<void>; channel: any; }; /** @public */ interface UseMediaDeviceSelectProps { /** * this will call getUserMedia if the permissions are not yet given to enumerate the devices with device labels. * in some browsers multiple calls to getUserMedia result in multiple permission prompts. * It's generally advised only flip this to true, once a (preview) track has been acquired successfully with the * appropriate permissions. * * @see {@link MediaDeviceMenu} * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/enumerateDevices | MDN enumerateDevices} */ requestPermissions?: boolean; /** * this callback gets called if an error is thrown when failing to select a device and also if a user * denied permissions, eventhough the `requestPermissions` option is set to `true`. * Most commonly this will emit a MediaDeviceError */ onError?: (e: Error) => void; /** * voice agent */ voiceAgent: VoiceAgent; } /** * The `useMediaDeviceSelect` hook is used to implement the `MediaDeviceSelect` component and * returns o.a. the list of devices of a given kind (audioinput or videoinput), the currently active device * and a function to set the the active device. * * @example * ```tsx * const { devices, activeDeviceId, setActiveMediaDevice } = useMediaDeviceSelect({kind: 'audioinput'}); * ``` * @public */ declare function useSelectInputDeviceAgent({ voiceAgent, requestPermissions, onError, }: UseMediaDeviceSelectProps): { devices: MediaDeviceInfo[]; className: string; activeDeviceId: string; setActiveMediaDevice: (id: string) => Promise<void>; }; declare enum MediaDeviceFailure { PermissionDenied = "PermissionDenied", NotFound = "NotFound", DeviceInUse = "DeviceInUse", Other = "Other" } /** * The function `useMultibandSpeakerTrackVolume` calculates and updates frequency bands based on audio * player data at regular intervals. * @param {number} [bands=5] - The `bands` parameter in the `useMultibandSpeakerTrackVolume` function * determines the number of frequency bands that the audio signal will be divided into for processing. * This parameter allows you to specify how many bands you want to split the frequency spectrum into. * @param {number} [loPass=0.1] - The `loPass` parameter in the `useMultibandSpeakerTrackVolume` * function represents the lower passband frequency limit. It is used to filter out frequencies below a * certain threshold in the audio signal. In the provided code snippet, the `loPass` parameter is set * to a default value of * @param {number} [hiPass=1.0] - The `hiPass` parameter in the `useMultibandSpeakerTrackVolume` * function represents the upper limit frequency value for filtering the audio frequencies. It is used * to define the range of frequencies that will be included in the analysis and processing of the audio * data. In the provided code snippet, the ` * @returns The `useMultibandSpeakerTrackVolume` custom hook returns an array of `Float32Array` * frequency bands that have been calculated based on the audio frequencies received from the audio * player. The number of bands, low-pass and high-pass values are used to divide and normalize the * frequencies into the specified bands. The hook continuously updates the frequency bands at an * interval of 100ms. */ declare const useMultibandMicrophoneTrackVolume: (agentContext: VoiceAgent, bands?: number, loPass?: number, hiPass?: number) => number[][]; declare const useMultiband3DSpeakerTrackVolume: (agentContext: VoiceAgent, bands?: number, loPass?: number, hiPass?: number) => { xNorm: number; yNorm: number; zNorm: number; elapsedTimeSec: number; frequencyBands: number[][]; }; declare function StringArrayToAny(values: string[]): Any; declare function StringToAny(value: string): Any; declare function AnyToString(anyValue: Any): string; declare function FloatToAny(value: number): Any; declare function AnyToFloat(anyValue: Any): number; declare function Int32ToAny(value: number): Any; declare function AnyToInt32(anyValue: Any): number; declare function BoolToAny(value: boolean): Any; declare function AnyToBool(anyValue: Any): boolean; declare function BytesToAny(value: Uint8Array): Any; declare function JSONToAny(value: object): Any; declare function AnyToJSON(anyValue: Any): object; declare function MapToObject(protoMap: Map<string, google_protobuf_any_pb.Any>): Record<string, any>; type AgentDeployment = { type: "debugger"; deployment: AssistantDebuggerDeployment; inAudio: boolean; outAudio: boolean; } | { type: "web-plugin"; deployment: AssistantWebpluginDeployment; inAudio: boolean; outAudio: boolean; } | { type: "api"; deployment: AssistantApiDeployment; inAudio: boolean; outAudio: boolean; }; declare const GetDeployment: (assistant: Assistant, source: RapidaSource) => AgentDeployment | undefined; /** * Custom hook for managing agent messages in a voice system. * @returns An object containing the agent messages. */ declare function useAgentMessages(agent: VoiceAgent): { messages: Message[]; }; type ServiceError$2 = { message: string; code: number; metadata: grpc.Metadata; }; type Status$1 = { details: string; code: number; metadata: grpc.Metadata; }; interface UnaryResponse$2 { cancel(): void; } interface ResponseStream$1<T> { cancel(): void; on(type: "data", handler: (message: T) => void): ResponseStream$1<T>; on(type: "end", handler: (status?: Status$1) => void): ResponseStream$1<T>; on(type: "status", handler: (status: Status$1) => void): ResponseStream$1<T>; } interface RequestStream<T> { write(message: T): RequestStream<T>; end(): void; cancel(): void; on(type: "end", handler: (status?: Status$1) => void): RequestStream<T>; on(type: "status", handler: (status: Status$1) => void): RequestStream<T>; } interface BidirectionalStream<ReqT, ResT> { write(message: ReqT): BidirectionalStream<ReqT, ResT>; end(): void; cancel(): void; on(type: "data", handler: (message: ResT) => void): BidirectionalStream<ReqT, ResT>; on(type: "end", handler: (status?: Status$1) => void): BidirectionalStream<ReqT, ResT>; on(type: "status", handler: (status: Status$1) => void): BidirectionalStream<ReqT, ResT>; } /** * Index a document for knowledge * * @param knowledgeId - The ID of the knowledge id * @param knowledgeDocumentIds - A list of documents * @param indexType - an index type * @param authHeader - Authentication headers for the request. * @param cb - Callback function to handle the response. */ declare function IndexKnowledgeDocument(client: ConnectionConfig, knowledgeId: string, knowledgeDocumentIds: string[], indexType: string, authHeader: ClientAuthInfo | UserAuthInfo, cb: (err: ServiceError$2 | null, response: IndexKnowledgeDocumentResponse | null) => void): undefined; /** * Retrieve all deployments based on pagination and filtering criteria. * * @param page - The page number for pagination. * @param pageSize - The number of results per page. * @param criteria - List of filtering criteria. * @param authHeader - Authentication headers for the request. * @param cb - Callback function to handle the response. * @returns UnaryResponse - The gRPC response object. */ declare function GetAllDeployment(client: ConnectionConfig, page: number, pageSize: number, criteria: { key: string; value: string; logic: string; }[], cb: (err: ServiceError$2 | null, response: GetAllDeploymentResponse | null) => void, authHeader: ClientAuthInfo | UserAuthInfo): undefined; /** * Invoke an endpoint with specified parameters. * * @param endpointId - The ID of the endpoint to invoke. * @param endpointProviderModelId - The provider model ID of the endpoint. * @param parameters - A map of parameters to pass to the endpoint. * @param cb - Callback function to handle the response. * @param authHeader - Authentication headers for the request. * @param metadata - Optional metadata to include in the request. * @returns UnaryResponse - The gRPC response object. */ declare function Invoke(clientCfg: ConnectionConfig, request: InvokeRequest, authHeader?: ClientAuthInfo | UserAuthInfo): Promise<InvokeResponse>; /** * Authenticate a user with email and password. * * @param email - The email address of the user. * @param password - The password of the user. * @param cb - Callback function to handle the response. */ declare function AuthenticateUser(config: ConnectionConfig, email: string, password: string, cb: (err: ServiceError$2 | null, auth: AuthenticateResponse | null) => void): undefined; /** * Authorize or reauthorize the user with headers. * * @param cb - Callback function to handle the response. * @param authHeader - Authentication headers for the request. */ declare function AuthorizeUser(config: ConnectionConfig, cb: (err: ServiceError$2 | null, org: AuthenticateResponse | null) => void, authHeader: ClientAuthInfo | UserAuthInfo): undefined; /** * Register a new user with email, password, and name. * * @param email - The email address of the user. * @param password - The password for the new user. * @param name - The name of the new user. * @param cb - Callback function to handle the response. */ declare function RegisterUser(config: ConnectionConfig, email: string, password: string, name: string, cb: (err: ServiceError$2 | null, user: AuthenticateResponse | null) => void): undefined; /** * Verify a token for authentication or authorization. * * @param token - The token to verify. * @param tokenType - The type of the token. * @param cb - Callback function to handle the response. */ declare function VerifyToken(config: ConnectionConfig, token: string, tokenType: string, cb: (err: ServiceError$2 | null, tokenResponse: VerifyTokenResponse | null) => void): undefined; /** * Request a password reset for a user. * * @param email - The email address of the user. * @param cb - Callback function to handle the response. */ declare function ForgotPassword(config: ConnectionConfig, email: string, cb: (err: ServiceError$2 | null, fpr: ForgotPasswordResponse | null) => void): undefined; /** * Create a new password after a password reset link. * * @param token - The token received for password reset. * @param password - The new password. * @param cb - Callback function to handle the response. */ declare function CreatePassword(config: ConnectionConfig, token: string, password: string, cb: (err: ServiceError$2 | null, fpr: CreatePasswordResponse | null) => void): undefined; /** * Retrieve user information with authorization headers. * * @param cb - Callback function to handle the response. * @param authHeader - Authentication headers for the request. */ declare function GetUser(config: ConnectionConfig, cb: (err: ServiceError$2 | null, gur: GetUserResponse | null) => void, authHeader: ClientAuthInfo | UserAuthInfo): undefined; /** * Update user information with optional name and authorization headers. * * @param cb - Callback function to handle the response. * @param authHeader - Authentication headers for the request. * @param name - Optional new name for the user. */ declare function UpdateUser(config: ConnectionConfig, cb: (err: ServiceError$2 | null, uur: UpdateUserResponse | null) => void, authHeader: ClientAuthInfo | UserAuthInfo, name?: string): undefined; /** * Retrieve all users with pagination and criteria. * * @param page - The page number for pagination. * @param pageSize - The number of users per page. * @param criteria - List of criteria to filter users. * @param cb - Callback function to handle the response. * @param authHeader - Authentication headers for the request. */ declare function GetAllUser(config: ConnectionConfig, page: number, pageSize: number, criteria: { key: string; value: string; }[], cb: (err: ServiceError$2 | null, uur: GetAllUserResponse | null) => void, authHeader: ClientAuthInfo | UserAuthInfo): undefined; /** * Social authentication with Google. * * @param cb - Callback function to handle the response. * @param state - Optional state parameter for the authentication request. * @param code - Optional code parameter for the authentication request. */ declare function Google(config: ConnectionConfig, cb: (err: ServiceError$2 | null, uur: AuthenticateResponse | null) => void, state?: string, code?: string): undefined; /** * Social authentication with LinkedIn. * * @param cb - Callback function to handle the response. * @param state - Optional state parameter for the authentication request. * @param code - Optional code parameter for the authentication request. */ declare function Linkedin(config: ConnectionConfig, cb: (err: ServiceError$2 | null, uur: AuthenticateResponse | null) => void, state?: string, code?: string): undefined; /** * Social authentication with GitHub. * * @param cb - Callback function to handle the response. * @param state - Optional state parameter for the authentication request. * @param code - Optional code parameter for the authentication request. */ declare function Github(config: ConnectionConfig, cb: (err: ServiceError$2 | null, uur: AuthenticateResponse | null) => void, state?: string, code?: string): undefined; /** * Retrieve all providers. * * @param cb - Callback function to handle the response. * @returns UnaryResponse - The gRPC response object. */ declare function GetAllProvider(connectionConfig: ConnectionConfig, cb: (err: ServiceError$2 | null, response: GetAllModelProviderResponse | null) => void, authHeader?: ClientAuthInfo | UserAuthInfo): void; /** * * @param page * @param pageSize * @param criteria * @param cb * @param authHeader * @returns */ declare function GetAllToolProvider(connectionConfig: ConnectionConfig, page: number, pageSize: number, criteria: { key: string; value: string; }[], cb: (err: ServiceError$2 | null, uvcr: GetAllToolProviderResponse | null) => void, authHeader: ClientAuthInfo | UserAuthInfo): undefined; /** * Establish a general connection. * * @param connect - The connection identifier. * @param code - The authorization code. * @param state - The state parameter. * @param scope - The requested scope. * @param authHeader - Authentication headers for the request. * @param cb - Callback function to handle the response. * @returns UnaryResponse - The gRPC response object. */ declare function GeneralConnect(config: ConnectionConfig, connect: string, code: string, state: string, scope: string, authHeader: ClientAuthInfo | UserAuthInfo, cb: (err: ServiceError$2 | null, response: GeneralConnectResponse | null) => void): undefined; /** * Establish a knowledge connection. * * @param connect - The connection identifier. * @param code - The authorization code. * @param state - The state parameter. * @param scope - The requested scope. * @param authHeader - Authentication headers for the request. * @param cb - Callback function to handle the response. * @returns UnaryResponse - The gRPC response object. */ declare function KnowledgeConnect(config: ConnectionConfig, connect: string, code: string, state: string, scope: string, authHeader: ClientAuthInfo | UserAuthInfo, cb: (err: ServiceError$2 | null, response: KnowledgeConnectResponse | null) => void): undefined; /** * Establish an action connection. * * @param connect - The connection identifier. * @param code - The authorization code. * @param state - The state parameter. * @param scope - The requested scope. * @param authHeader - Authentication headers for the request. * @param cb - Callback function to handle the response. * @returns UnaryResponse - The gRPC response object. */ declare function ActionConnect(config: ConnectionConfig, connect: string, code: string, state: string, scope: string, authHeader: ClientAuthInfo | UserAuthInfo, cb: (err: ServiceError$2 | null, response: ActionConnectResponse | null) => void): undefined; /** * Retrieve files associated with a connector based on specified criteria. * * @param toolId - The ID of the tool (connector) to retrieve files from. * @param criterias - List of criteria to filter the files. * @param authHeader - Authentication headers for the request. * @param cb - Callback function to handle the response. * @returns UnaryResponse - The gRPC response object. */ declare function GetConnectorFiles(config: ConnectionConfig, toolId: string, criterias: Criteria[], authHeader: ClientAuthInfo | UserAuthInfo, cb: (err: ServiceError$2 | null, response: GetConnectorFilesResponse | null) => void): undefined; /** * Create a new organization. * * @param name - The name of the organization. * @param size - The size of the organization. * @param industry - The industry the organization operates in. * @param authHeader - Authentication headers for the request. * @param cb - Callback function to handle the response. * @returns UnaryResponse - The gRPC response object. */ declare function CreateOrganization(connectionConfig: ConnectionConfig, name: string, size: string, industry: string, authHeader: ClientAuthInfo | UserAuthInfo, cb: (err: ServiceError$2 | null, response: CreateOrganizationResponse | null) => void): undefined; /** * Update an existing organization. * * @param organizationId - The ID of the organization to update. * @param authHeader - Authentication headers for the request. * @param organizationName - Optional new name for the organization. * @param organizationIndustry - Optional new industry for the organization. * @param organizationContact - Optional new contact for the organization. * @param cb - Callback function to handle the response. * @returns UnaryResponse - The gRPC response object. */ declare function UpdateOrganization(connectionConfig: ConnectionConfig, organizationId: string, authHeader: ClientAuthInfo | UserAuthInfo, cb: (err: ServiceError$2 | null, response: UpdateOrganizationResponse | null) => void, organizationName?: string, organizationIndustry?: string, organizationContact?: string): undefined; /** * Retrieve details of an organization. * * @param authHeader - Authentication headers for the request. * @param cb - Callback function to handle the response. * @returns UnaryResponse - The gRPC response object. */ declare function GetOrganization(connectionConfig: ConnectionConfig, authHeader: ClientAuthInfo | UserAuthInfo, cb: (err: ServiceError$2 | null, response: GetOrganizationResponse | null) => void): undefined; /** * Retrieve all assistants with pagination and filtering criteria. * * @param page - The page number for pagination. * @param pageSize - The number of assistants per page. * @param criteria - List of criteria to filter assistants. * @param cb - Callback function to handle the response. * @param authHeader - Authentication headers for the request. * @returns UnaryResponse - The gRPC response object. */ declare function GetAllAssistant(connectionConfig: ConnectionConfig, page: number, pageSize: number, criteria: { key: string; value: string; }[], cb: (err: ServiceError$2 | null, response: GetAllAssistantResponse | null) => void, authHeader: ClientAuthInfo | UserAuthInfo): undefined; /** * Update the version of an assistant. * * @param assistantId - The ID of the assistant to update. * @param assistantProviderModelId - The ID of the assistant provider model. * @param cb - Callback function to handle the response. * @param authHeader - Authentication headers for the request. * @returns UnaryResponse - The gRPC response object. */ declare function UpdateAssistantVersion(connectionConfig: ConnectionConfig, assistantId: string, assistantProviderModelId: string, cb: (err: ServiceError$2 | null, response: GetAssistantResponse | null) => void, authHeader: UserAuthInfo): undefined; /** * Retrieve all assistant provider models with pagination and filtering criteria. * * @param assistantId - The ID of the assistant. * @param page - The page number for pagination. * @param pageSize - The number of provider models per page. * @param criteria - List of criteria to filter provider models. * @param cb - Callback function to handle the response. * @param authHeader - Authentication headers for the request. * @returns UnaryResponse - The gRPC response object. */ declare function GetAllAssistantProviderModel(connectionConfig: ConnectionConfig, assistantId: string, page: number, pageSize: number, criteria: { key: string; value: string; }[], cb: (err: ServiceError$2 | null, response: GetAllAssistantProviderModelResponse | null) => void, authHeader: ClientAuthInfo | UserAuthInfo): undefined; /** * Retrieve details of a specific assistant. * * @param assistantId - The ID of the assistant to retrieve. * @param assistantProviderModelId - Optional ID of the assistant provider model. * @param cb - Callback function to handle the response. * @param authHeader - Authentication headers for the request. * @returns UnaryResponse - The gRPC response object. */ declare function GetAssistant(connectionConfig: ConnectionConfig, req: GetAssistantRequest, authHeader?: ClientAuthInfo | UserAuthInfo): Promise<GetAssistantResponse>; /** * Create a new assistant provider model. * * @param assistantId - The ID of the assistant. * @param assistantProviderModel - Attributes for the new provider model. * @param authHeader - Authentication headers for the request. * @param cb - Callback function to handle the response. * @returns UnaryResponse - The gRPC response object. */ declare function CreateAssistantProviderModel(connectionConfig: ConnectionConfig, assistantId: string, template: TextChatCompletePrompt, modelProviderId: string, modelProviderName: string, modelProviderOptions: Array<Metadata>, description: string, authHeader: UserAuthInfo, cb: (err: ServiceError$2 | null, response: GetAssistantProviderModelResponse | null) => void): undefined; /** * Create a new assistant with the specified attributes. * * @param assistantProviderModel - Attributes for the assistant provider model. * @param assistantAttributes - Attributes for the assistant. * @param assistantKnowledgeConfig - Knowledge configuration attributes for the assistant. * @param tags - Tags associated with the assistant. * @param authHeader - Authentication headers for the request. * @param cb - Callback function to handle the response. * @returns UnaryResponse - The gRPC response object. */ declare function CreateAssistant(connectionConfig: ConnectionConfig, name: string, description: string, tagsList: Array<string>, assistantProviderModel: CreateAssistantProviderModelRequest, tags: string[], authHeader: UserAuthInfo, cb: (err: ServiceError$2 | null, response: GetAssistantResponse | null) => void, assistantKnowledgeConfig?: Array<CreateAssistantKnowledgeRequest>, assistantToolConfig?: Array<CreateAssistantToolRequest>): undefined; /** * Create tags for an assistant. * * @param assistantId - The ID of the assistant. * @param tags - List of tags to add. * @param cb - Callback function to handle the response. * @param authHeader - Authentication headers for the request. * @returns UnaryResponse - The gRPC response object. */ declare function CreateAssistantTag(connectionConfig: ConnectionConfig, assistantId: string, tags: string[], cb: (err: ServiceError$2 | null, response: GetAssistantResponse | null) => void, authHeader: UserAuthInfo): undefined; /** * Update details of an existing assistant. * * @param assistantId - The ID of the assistant to update. * @param name - The new name for the assistant. * @param description - The new description for the assistant. * @param cb - Callback function to handle the response. * @param authHeader - Authentication headers for the request. * @returns UnaryResponse - The gRPC response object. */ declare function UpdateAssistantDetail(connectionConfig: ConnectionConfig, assistantId: string, name: string, description: string, cb: (err: ServiceError$2 | null, response: GetAssistantResponse | null) => void, authHeader: UserAuthInfo): undefined; /** * * @param assistantId * @param page * @param pageSize * @param criteria * @param cb * @param authHeader * @returns */ declare function GetAssistantMessages(connectionConfig: ConnectionConfig, assistantId: string, page: number, pageSize: number, criteria: { key: string; value: string; logic: string; }[], selectors: ("metadata" | "metric" | "stage" | "request" | "response")[], cb: (err: ServiceError$2 | null, response: GetAllAssistantMessageResponse | null) => void, authHeader: ClientAuthInfo | UserAuthInfo): undefined; /** * * @param page * @param pageSize * @param criteria * @param selectors * @param cb * @param authHeader * @returns */ declare function GetMessages(connectionConfig: ConnectionConfig, page: number, pageSize: number, criteria: { key: string; value: string; logic: string; }[], selectors: ("metadata" | "metric" | "stage" | "request" | "response")[], cb: (err: ServiceError$2 | null, response: GetAllMessageResponse | null) => void, authHeader: ClientAuthInfo | UserAuthInfo): undefined; /** * * @param assistantId * @param assistantConversationId * @param page * @param pageSize * @param criteria * @param cb * @param authHeader */ declare function GetAllAssistantConversationMessage(connectionConfig: ConnectionConfig, assistantId: string, assistantConversationId: string, page: number, pageSize: number, criteria: { key: string; value: string; }[], authHeader: ClientAuthInfo | UserAuthInfo, cb: (err: ServiceError$2 | null, uvcr: GetAllConversationMessageResponse | null) => void): void; /** * * @param assistantId * @param cb * @param authHeader * @returns */ declare function CreateAssistantDebuggerDeployment(clientCfg: ConnectionConfig, request: CreateAssistantDeploymentRequest, auth?: ClientAuthInfo | UserAuthInfo): Promise<GetAssistantDebuggerDeploymentResponse>; /** * * @param assistantId * @param cb * @param authHeader * @returns */ declare function GetAssistantDebuggerDeployment(connectionConfig: ConnectionConfig, request: GetAssistantDeploymentRequest, auth?: ClientAuthInfo | UserAuthInfo): Promise<GetAssistantDebuggerDeploymentResponse>; declare function CreateAssistantApiDeployment(clientCfg: ConnectionConfig, request: CreateAssistantDeploymentRequest, auth?: ClientAuthInfo | UserAuthInfo): Promise<GetAssistantApiDeploymentResponse>; declare function GetAssistantApiDeployment(clientCfg: ConnectionConfig, req: GetAssistantDeploymentRequest, auth?: ClientAuthInfo | UserAuthInfo): Promise<GetAssistantApiDeploymentResponse>; declare function CreateAssistantWebpluginDeployment(clientCfg: ConnectionConfig, request: CreateAssistantDeploymentRequest, auth?: ClientAuthInfo | UserAuthInfo): Promise<GetAssistantWebpluginDeploymentResponse>; declare function GetAssistantWebpluginDeployment(clientCfg: ConnectionConfig, req: GetAssistantDeploymentRequest, auth?: ClientAuthInfo | UserAuthInfo): Promise<GetAssistantWebpluginDeploymentResponse>; declare function CreateAssistantPhoneDeployment(clientCfg: ConnectionConfig, request: CreateAssistantDeploymentRequest, auth?: ClientAuthInfo | UserAuthInfo): Promise<GetAssistantPhoneDeploymentResponse>; declare function GetAssistantPhoneDeployment(clientCfg: ConnectionConfig, req: GetAssistantDeploymentRequest, auth?: ClientAuthInfo | UserAuthInfo): Promise<GetAssistantPhoneDeploymentResponse>; declare function CreateAssistantWhatsappDeployment(clientCfg: ConnectionConfig, request: CreateAssistantDeploymentRequest, auth?: ClientAuthInfo | UserAuthInfo): Promise<GetAssistantWhatsappDeploymentResponse>; declare function GetAssistantWhatsappDeployment(clientCfg: ConnectionConfig, req: GetAssistantDeploymentRequest, auth?: ClientAuthInfo | UserAuthInfo): Promise<GetAssistantWhatsappDeploymentResponse>; declare function GetAllAssistantWebhook(connectionConfig: ConnectionConfig, assistantId: string, page: number, pageSize: number, criteria: { key: string; value: string; }[], cb: (err: ServiceError$2 | null, response: GetAllAssistantWebhookResponse | null) => void, authHeader: ClientAuthInfo | UserAuthInfo): undefined; /** * * @param assistantId * @param method * @param endpoint * @param headers * @param parameters * @param events * @param retryOnStatus * @param maxRetries * @param timeout * @param priority * @param cb * @param authHeader * @param description * @returns */ declare function CreateWebhook(connectionConfig: ConnectionConfig, assistantId: string, method: string, endpoint: string, headers: { key: string; value: string; }[], parameters: { key: string; value: string; }[], events: string[], retryOnStatus: string[], maxRetries: number, timeout: number, priority: number, cb: (err: ServiceError$2 | null, response: GetAssistantWebhookResponse | null) => void, authHeader: UserAuthInfo, description?: string): undefined; /** * * @param assistantId * @param webhookId * @param method * @param endpoint * @param headers * @param events * @param retryOnStatus * @param maxRetries * @param timeout * @param cb * @param authHeader * @param description * @returns */ declare function UpdateWebhook(connectionConfig: ConnectionConfig, assistantId: string, webhookId: string, method: string, endpoint: string, headers: { key: string; value: string; }[], parameters: { key: string; value: string; }[], events: string[], retryOnStatus: string[], maxRetries: number, timeout: number, priority: number, cb: (err: ServiceError$2 | null, response: GetAssistantWebhookResponse | null) => void, authHeader: UserAuthInfo, description?: string): undefined; /** * * @param assistantId * @param webhookId * @param cb * @param authHeader * @returns */ declare function GetAssistantWebhook(connectionConfig: ConnectionConfig, assistantId: string, webhookId: string, cb: (err: ServiceError$2 | null, response: GetAssistantWebhookResponse | null) => void, authHeader: ClientAuthInfo | UserAuthInfo): undefined; /** * * @param assistantId * @param webhookId * @param cb * @param authHeader * @returns */ declare function DeleteAssistantWebhook(connectionConfig: ConnectionConfig, assistantId: string, webhookId: string, cb: (err: ServiceError$2 | null, response: GetAssistantWebhookResponse | null) => void, authHeader: UserAuthInfo): undefined; /** * * @param assistantId * @param webhookId * @param cb * @param authHeader * @returns */ declare function GetAssistantConversation(connectionConfig: ConnectionConfig, req: GetAssistantConversationRequest, auth?: ClientAuthInfo | UserAuthInfo): Promise<GetAssistantConversationResponse>; /** * * @param assistantId * @param cb * @param authHeader * @returns */ declare function DeleteAssistant(connectionConfig: ConnectionConfig, assistantId: string, cb: (err: ServiceError$2 | null, response: GetAssistantResponse | null) => void, authHeader: UserAuthInfo): undefined; /** * * @param assistantId * @param page * @param pageSize * @param criteria * @param cb * @param authHeader * @returns */ declare function GetAllAssistantAnalysis(connectionConfig: ConnectionConfig, assistantId: string, page: number, pageSize: number, criteria: { key: string; value: string; }[], cb: (err: ServiceError$2 | null, response: GetAllAssistantAnalysisResponse | null) => void, authHeader: ClientAuthInfo | UserAuthInfo): undefined; /** * * @param assistantId * @param name * @param endpointid * @param endpointversion * @param executionpriority * @param parameters * @param cb * @param authHeader * @param description * @returns */ declare function CreateAnalysis(connectionConfig: ConnectionConfig, assistantId: string, name: string, endpointid: string, endpointversion: string, executionpriority: number, parameters: { key: string; value: string; }[], cb: (err: ServiceError$2 | null, response: GetAssistantAnalysisResponse | null) => void, authHeader: UserAuthInfo, description?: string): undefined; /** * * @param assistantId * @param webhookId * @param method * @param endpoint * @param headers * @param events * @param retryOnStatus * @param maxRetries * @param timeout * @param cb * @param authHeader * @param description * @returns */ declare function UpdateAnalysis(connectionConfig: ConnectionConfig, assistantId: string, AnalysisId: string, name: string, endpointid: string, endpointversion: string, executionpriority: number, parameters: { key: string; value: string; }[], cb: (err: ServiceError$2 | null, response: GetAssistantAnalysisResponse | null) => void, authHeader: UserAuthInfo, description?: string): undefined; /** * * @param assistantId * @param webhookId * @param cb * @param authHeader * @returns */ declare function GetAssistantAnalysis(connectionConfig: ConnectionConfig, assistantId: string, AnalysisId: string, cb: (err: ServiceError$2 | null, response: GetAssistantAnalysisResponse | null) => void, authHeader: ClientAuthInfo | UserAuthInfo): undefined; /** * * @param assistantId * @param AnalysisId * @param cb * @param authHeader * @returns */ declare function DeleteAssistantAnalysis(connectionConfig: ConnectionConfig, assistantId: string, AnalysisId: string, cb: (err: ServiceError$2 | null, response: GetAssistantAnalysisResponse | null) => void, authHeader: UserAuthInfo): undefined; /** * * @param page * @param pageSize * @param criteria * @param cb * @param authHeader * @returns */ declare function GetAllWebhookLog(connectionConfig: ConnectionConfig, projectId: string, page: number, pageSize: number, criteria: { key: string; value: string; logic: string; }[], cb: (err: ServiceError$2 | null, response: GetAllAssistantWebhookLogResponse | null) => void, authHeader: ClientAuthInfo | UserAuthInfo): undefined; /** * * @param organizationId * @param projectId * @param webhookLogId * @param cb * @param authHeader * @returns */ declare function GetWebhookLog(connectionConfig: ConnectionConfig, projectId: string, webhookLogId: string, cb: (err: ServiceError$2 | null, response: GetAssistantWebhookLogResponse | null) => void, authHeader: ClientAuthInfo | UserAuthInfo): undefined; /** * * @param assistantId * @param page * @param pageSize * @param criteria * @param cb * @param authHeader * @returns */ declare function GetAllAssistantTool(connectionConfig: ConnectionConfig, assistantId: string, page: number, pageSize: number, criteria: { key: string; value: string; }[], cb: (err: ServiceError$2 | null, response: GetAllAssistantToolResponse | null) => void, authHeader: ClientAuthInfo | UserAuthInfo): undefined; /** * * @param assistantId * @param name * @param endpointid * @param endpointversion * @param executionpriority * @param parameters * @param cb * @param authHeader * @param description * @returns */ declare function CreateAssistantTool(connectionConfig: ConnectionConfig, assistantId: string, name: string, description: string, fields: {}, executionMethod: string, executionOptions: Metadata[], cb: (err: ServiceError$2 | null, response: GetAssistantToolResponse | null) => void, authHeader: UserAuthInfo): undefined; /** * * @param assistantId * @param webhookId * @param method * @param endpoint * @param headers * @param events * @param retryOnStatus * @param maxRetries * @param timeout * @param cb * @param authHeader * @param description * @returns */ declare function UpdateAssistantTool(connectionConfig: ConnectionConfig, assistantId: string, assistantToolId: string, name: string, description: string, fields: {}, executionMethod: string, executionOptions: Metadata[], cb: (err: ServiceError$2 | null, response: GetAssistantToolResponse | null) => void, authHeader: UserAuthInfo): undefined; /** * * @param assistantId * @param webhookId * @param cb * @param authHeader * @returns */ declare function GetAssistantTool(connectionConfig: ConnectionConfig, assistantId: string, ToolId: string, cb: (err: ServiceError$2 | null, response: GetAssistantToolResponse | null) => void, authHeader: ClientAuthInfo | UserAuthInfo): undefined; /** * * @param assistantId * @param ToolId * @param cb * @param authHeader * @returns */ declare function DeleteAssistantTool(connectionConfig: ConnectionConfig, assistantId: string, ToolId: string, cb: (err: ServiceError$2 | null, response: GetAssistantToolResponse | null) => void, authHeader: UserAuthInfo): undefined; /** * * @param assistantId * @param page * @param pageSize * @param criteria * @param cb * @param authHeader * @returns */ declare function GetAllAssistantKnowledge(connectionConfig: ConnectionConfig, assistantId: string, page: number, pageSize: number, criteria: { key: string; value: string; }[], cb: (err: ServiceError$2 | null, response: GetAllAssistantKnowledgeResponse | null) => void, authHeader: ClientAuthInfo | UserAuthInfo): undefined; /** * * @param assistantId * @param name * @param endp