rapida-react
Version:
An easy to use react client for building generative ai application using Rapida platform.
1,393 lines (1,193 loc) • 76.3 kB
TypeScript
import * as jspb from 'google-protobuf';
import * as google_protobuf_any_pb from 'google-protobuf/google/protobuf/any_pb';
import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb';
import * as google_protobuf_struct_pb from 'google-protobuf/google/protobuf/struct_pb';
import { grpc } from '@improbable-eng/grpc-web';
import { F as Feedback, M as Message$1 } from './index-0bkcyQsE.js';
export { C as Conversation, a as MessageRole, b as MessageStatus } from './index-0bkcyQsE.js';
import TypedEmitter from 'typed-emitter';
import * as React from 'react';
export { AgentMultibandAudioVisualizer } from './components/visualization/agent-multiband-audio-visualizer.js';
export { AgentLiveTranscript } from './components/live-transcript.js';
import 'react/jsx-runtime';
// package:
// file: common.proto
declare class Criteria extends jspb.Message {
getKey(): string;
setKey(value: string): void;
getValue(): string;
setValue(value: string): void;
getLogic(): string;
setLogic(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Criteria.AsObject;
static toObject(includeInstance: boolean, msg: Criteria): Criteria.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Criteria, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Criteria;
static deserializeBinaryFromReader(message: Criteria, reader: jspb.BinaryReader): Criteria;
}
declare namespace Criteria {
export type AsObject = {
key: string,
value: string,
logic: string,
}
}
declare class Error$1 extends jspb.Message {
getErrorcode(): string;
setErrorcode(value: string): void;
getErrormessage(): string;
setErrormessage(value: string): void;
getHumanmessage(): string;
setHumanmessage(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Error$1.AsObject;
static toObject(includeInstance: boolean, msg: Error$1): Error$1.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Error$1, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Error$1;
static deserializeBinaryFromReader(message: Error$1, reader: jspb.BinaryReader): Error$1;
}
declare namespace Error$1 {
export type AsObject = {
errorcode: string,
errormessage: string,
humanmessage: string,
}
}
declare class Paginate extends jspb.Message {
getPage(): number;
setPage(value: number): void;
getPagesize(): number;
setPagesize(value: number): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Paginate.AsObject;
static toObject(includeInstance: boolean, msg: Paginate): Paginate.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Paginate, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Paginate;
static deserializeBinaryFromReader(message: Paginate, reader: jspb.BinaryReader): Paginate;
}
declare namespace Paginate {
export type AsObject = {
page: number,
pagesize: number,
}
}
declare class Paginated extends jspb.Message {
getCurrentpage(): number;
setCurrentpage(value: number): void;
getTotalitem(): number;
setTotalitem(value: number): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Paginated.AsObject;
static toObject(includeInstance: boolean, msg: Paginated): Paginated.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Paginated, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Paginated;
static deserializeBinaryFromReader(message: Paginated, reader: jspb.BinaryReader): Paginated;
}
declare namespace Paginated {
export type AsObject = {
currentpage: number,
totalitem: number,
}
}
declare class Ordering extends jspb.Message {
getColumn(): string;
setColumn(value: string): void;
getOrder(): string;
setOrder(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Ordering.AsObject;
static toObject(includeInstance: boolean, msg: Ordering): Ordering.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Ordering, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Ordering;
static deserializeBinaryFromReader(message: Ordering, reader: jspb.BinaryReader): Ordering;
}
declare namespace Ordering {
export type AsObject = {
column: string,
order: string,
}
}
declare class User extends jspb.Message {
getId(): string;
setId(value: string): void;
getName(): string;
setName(value: string): void;
getEmail(): string;
setEmail(value: string): void;
getRole(): string;
setRole(value: string): void;
hasCreateddate(): boolean;
clearCreateddate(): void;
getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined;
setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void;
getStatus(): string;
setStatus(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): User.AsObject;
static toObject(includeInstance: boolean, msg: User): User.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: User, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): User;
static deserializeBinaryFromReader(message: User, reader: jspb.BinaryReader): User;
}
declare namespace User {
export type AsObject = {
id: string,
name: string,
email: string,
role: string,
createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject,
status: string,
}
}
declare class Metadata extends jspb.Message {
getId(): string;
setId(value: string): void;
getKey(): string;
setKey(value: string): void;
getValue(): string;
setValue(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Metadata.AsObject;
static toObject(includeInstance: boolean, msg: Metadata): Metadata.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Metadata, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Metadata;
static deserializeBinaryFromReader(message: Metadata, reader: jspb.BinaryReader): Metadata;
}
declare namespace Metadata {
export type AsObject = {
id: string,
key: string,
value: string,
}
}
declare class Metric extends jspb.Message {
getName(): string;
setName(value: string): void;
getValue(): string;
setValue(value: string): void;
getDescription(): string;
setDescription(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Metric.AsObject;
static toObject(includeInstance: boolean, msg: Metric): Metric.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Metric, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Metric;
static deserializeBinaryFromReader(message: Metric, reader: jspb.BinaryReader): Metric;
}
declare namespace Metric {
export type AsObject = {
name: string,
value: string,
description: string,
}
}
declare class Content extends jspb.Message {
getName(): string;
setName(value: string): void;
getContenttype(): string;
setContenttype(value: string): void;
getContentformat(): string;
setContentformat(value: string): void;
getContent(): Uint8Array | string;
getContent_asU8(): Uint8Array;
getContent_asB64(): string;
setContent(value: Uint8Array | string): void;
hasMeta(): boolean;
clearMeta(): void;
getMeta(): google_protobuf_struct_pb.Struct | undefined;
setMeta(value?: google_protobuf_struct_pb.Struct): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Content.AsObject;
static toObject(includeInstance: boolean, msg: Content): Content.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Content, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Content;
static deserializeBinaryFromReader(message: Content, reader: jspb.BinaryReader): Content;
}
declare namespace Content {
export type AsObject = {
name: string,
contenttype: string,
contentformat: string,
content: Uint8Array | string,
meta?: google_protobuf_struct_pb.Struct.AsObject,
}
}
declare class Message extends jspb.Message {
getRole(): string;
setRole(value: string): void;
clearContentsList(): void;
getContentsList(): Array<Content>;
setContentsList(value: Array<Content>): void;
addContents(value?: Content, index?: number): Content;
clearToolcallsList(): void;
getToolcallsList(): Array<ToolCall>;
setToolcallsList(value: Array<ToolCall>): void;
addToolcalls(value?: ToolCall, index?: number): ToolCall;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Message.AsObject;
static toObject(includeInstance: boolean, msg: Message): Message.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Message, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Message;
static deserializeBinaryFromReader(message: Message, reader: jspb.BinaryReader): Message;
}
declare namespace Message {
export type AsObject = {
role: string,
contentsList: Array<Content.AsObject>,
toolcallsList: Array<ToolCall.AsObject>,
}
}
declare class Event extends jspb.Message {
getName(): string;
setName(value: string): void;
hasMeta(): boolean;
clearMeta(): void;
getMeta(): google_protobuf_struct_pb.Struct | undefined;
setMeta(value?: google_protobuf_struct_pb.Struct): void;
hasTime(): boolean;
clearTime(): void;
getTime(): google_protobuf_timestamp_pb.Timestamp | undefined;
setTime(value?: google_protobuf_timestamp_pb.Timestamp): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Event.AsObject;
static toObject(includeInstance: boolean, msg: Event): Event.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Event, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Event;
static deserializeBinaryFromReader(message: Event, reader: jspb.BinaryReader): Event;
}
declare namespace Event {
export type AsObject = {
name: string,
meta?: google_protobuf_struct_pb.Struct.AsObject,
time?: google_protobuf_timestamp_pb.Timestamp.AsObject,
}
}
declare class ToolCall extends jspb.Message {
getId(): string;
setId(value: string): void;
getType(): string;
setType(value: string): void;
hasFunction(): boolean;
clearFunction(): void;
getFunction(): FunctionCall | undefined;
setFunction(value?: FunctionCall): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ToolCall.AsObject;
static toObject(includeInstance: boolean, msg: ToolCall): ToolCall.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: ToolCall, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): ToolCall;
static deserializeBinaryFromReader(message: ToolCall, reader: jspb.BinaryReader): ToolCall;
}
declare namespace ToolCall {
export type AsObject = {
id: string,
type: string,
pb_function?: FunctionCall.AsObject,
}
}
declare class FunctionCall extends jspb.Message {
getName(): string;
setName(value: string): void;
getArguments(): string;
setArguments(value: string): void;
hasArgs(): boolean;
clearArgs(): void;
getArgs(): google_protobuf_struct_pb.Struct | undefined;
setArgs(value?: google_protobuf_struct_pb.Struct): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): FunctionCall.AsObject;
static toObject(includeInstance: boolean, msg: FunctionCall): FunctionCall.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: FunctionCall, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): FunctionCall;
static deserializeBinaryFromReader(message: FunctionCall, reader: jspb.BinaryReader): FunctionCall;
}
declare namespace FunctionCall {
export type AsObject = {
name: string,
arguments: string,
args?: google_protobuf_struct_pb.Struct.AsObject,
}
}
declare class AssistantMessageStage extends jspb.Message {
getStage(): string;
setStage(value: string): void;
getAdditionaldataMap(): jspb.Map<string, string>;
clearAdditionaldataMap(): void;
getTimetaken(): number;
setTimetaken(value: number): void;
getLifecycleid(): string;
setLifecycleid(value: string): void;
hasStarttimestamp(): boolean;
clearStarttimestamp(): void;
getStarttimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined;
setStarttimestamp(value?: google_protobuf_timestamp_pb.Timestamp): void;
hasEndtimestamp(): boolean;
clearEndtimestamp(): void;
getEndtimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined;
setEndtimestamp(value?: google_protobuf_timestamp_pb.Timestamp): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): AssistantMessageStage.AsObject;
static toObject(includeInstance: boolean, msg: AssistantMessageStage): AssistantMessageStage.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: AssistantMessageStage, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): AssistantMessageStage;
static deserializeBinaryFromReader(message: AssistantMessageStage, reader: jspb.BinaryReader): AssistantMessageStage;
}
declare namespace AssistantMessageStage {
export type AsObject = {
stage: string,
additionaldataMap: Array<[string, string]>,
timetaken: number,
lifecycleid: string,
starttimestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject,
endtimestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject,
}
}
declare class AssistantConversationMessage extends jspb.Message {
getId(): string;
setId(value: string): void;
getMessageid(): string;
setMessageid(value: string): void;
getAssistantconversationid(): string;
setAssistantconversationid(value: string): void;
hasRequest(): boolean;
clearRequest(): void;
getRequest(): Message | undefined;
setRequest(value?: Message): void;
hasResponse(): boolean;
clearResponse(): void;
getResponse(): Message | undefined;
setResponse(value?: Message): void;
getSource(): string;
setSource(value: string): void;
clearMetricsList(): void;
getMetricsList(): Array<Metric>;
setMetricsList(value: Array<Metric>): void;
addMetrics(value?: Metric, index?: number): Metric;
getStatus(): string;
setStatus(value: string): void;
getCreatedby(): string;
setCreatedby(value: string): void;
getUpdatedby(): string;
setUpdatedby(value: string): void;
clearSuggestedquestionsList(): void;
getSuggestedquestionsList(): Array<string>;
setSuggestedquestionsList(value: Array<string>): void;
addSuggestedquestions(value: string, index?: number): string;
clearStagesList(): void;
getStagesList(): Array<AssistantMessageStage>;
setStagesList(value: Array<AssistantMessageStage>): void;
addStages(value?: AssistantMessageStage, index?: number): AssistantMessageStage;
hasCreateddate(): boolean;
clearCreateddate(): void;
getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined;
setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void;
hasUpdateddate(): boolean;
clearUpdateddate(): void;
getUpdateddate(): google_protobuf_timestamp_pb.Timestamp | undefined;
setUpdateddate(value?: google_protobuf_timestamp_pb.Timestamp): void;
getAssistantid(): string;
setAssistantid(value: string): void;
getAssistantprovidermodelid(): string;
setAssistantprovidermodelid(value: string): void;
clearMetadataList(): void;
getMetadataList(): Array<Metadata>;
setMetadataList(value: Array<Metadata>): void;
addMetadata(value?: Metadata, index?: number): Metadata;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): AssistantConversationMessage.AsObject;
static toObject(includeInstance: boolean, msg: AssistantConversationMessage): AssistantConversationMessage.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: AssistantConversationMessage, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): AssistantConversationMessage;
static deserializeBinaryFromReader(message: AssistantConversationMessage, reader: jspb.BinaryReader): AssistantConversationMessage;
}
declare namespace AssistantConversationMessage {
export type AsObject = {
id: string,
messageid: string,
assistantconversationid: string,
request?: Message.AsObject,
response?: Message.AsObject,
source: string,
metricsList: Array<Metric.AsObject>,
status: string,
createdby: string,
updatedby: string,
suggestedquestionsList: Array<string>,
stagesList: Array<AssistantMessageStage.AsObject>,
createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject,
updateddate?: google_protobuf_timestamp_pb.Timestamp.AsObject,
assistantid: string,
assistantprovidermodelid: string,
metadataList: Array<Metadata.AsObject>,
}
}
declare class AssistantConversationContext extends jspb.Message {
getId(): string;
setId(value: string): void;
getContext(): string;
setContext(value: string): void;
hasMetadata(): boolean;
clearMetadata(): void;
getMetadata(): google_protobuf_struct_pb.Struct | undefined;
setMetadata(value?: google_protobuf_struct_pb.Struct): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): AssistantConversationContext.AsObject;
static toObject(includeInstance: boolean, msg: AssistantConversationContext): AssistantConversationContext.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: AssistantConversationContext, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): AssistantConversationContext;
static deserializeBinaryFromReader(message: AssistantConversationContext, reader: jspb.BinaryReader): AssistantConversationContext;
}
declare namespace AssistantConversationContext {
export type AsObject = {
id: string,
context: string,
metadata?: google_protobuf_struct_pb.Struct.AsObject,
}
}
declare class AssistantConversation extends jspb.Message {
getId(): string;
setId(value: string): void;
getUserid(): string;
setUserid(value: string): void;
getAssistantid(): string;
setAssistantid(value: string): void;
getName(): string;
setName(value: string): void;
getProjectid(): string;
setProjectid(value: string): void;
getOrganizationid(): string;
setOrganizationid(value: string): void;
getSource(): string;
setSource(value: string): void;
getCreatedby(): string;
setCreatedby(value: string): void;
getUpdatedby(): string;
setUpdatedby(value: string): void;
hasUser(): boolean;
clearUser(): void;
getUser(): User | undefined;
setUser(value?: User): void;
getAssistantprovidermodelid(): string;
setAssistantprovidermodelid(value: string): void;
clearAssistantconversationmessageList(): void;
getAssistantconversationmessageList(): Array<AssistantConversationMessage>;
setAssistantconversationmessageList(value: Array<AssistantConversationMessage>): void;
addAssistantconversationmessage(value?: AssistantConversationMessage, index?: number): AssistantConversationMessage;
getIdentifier(): string;
setIdentifier(value: string): void;
getStatus(): string;
setStatus(value: string): void;
hasCreateddate(): boolean;
clearCreateddate(): void;
getCreateddate(): google_protobuf_timestamp_pb.Timestamp | undefined;
setCreateddate(value?: google_protobuf_timestamp_pb.Timestamp): void;
hasUpdateddate(): boolean;
clearUpdateddate(): void;
getUpdateddate(): google_protobuf_timestamp_pb.Timestamp | undefined;
setUpdateddate(value?: google_protobuf_timestamp_pb.Timestamp): void;
clearContextsList(): void;
getContextsList(): Array<AssistantConversationContext>;
setContextsList(value: Array<AssistantConversationContext>): void;
addContexts(value?: AssistantConversationContext, index?: number): AssistantConversationContext;
clearMetricsList(): void;
getMetricsList(): Array<Metric>;
setMetricsList(value: Array<Metric>): void;
addMetrics(value?: Metric, index?: number): Metric;
clearMetadataList(): void;
getMetadataList(): Array<Metadata>;
setMetadataList(value: Array<Metadata>): void;
addMetadata(value?: Metadata, index?: number): Metadata;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): AssistantConversation.AsObject;
static toObject(includeInstance: boolean, msg: AssistantConversation): AssistantConversation.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: AssistantConversation, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): AssistantConversation;
static deserializeBinaryFromReader(message: AssistantConversation, reader: jspb.BinaryReader): AssistantConversation;
}
declare namespace AssistantConversation {
export type AsObject = {
id: string,
userid: string,
assistantid: string,
name: string,
projectid: string,
organizationid: string,
source: string,
createdby: string,
updatedby: string,
user?: User.AsObject,
assistantprovidermodelid: string,
assistantconversationmessageList: Array<AssistantConversationMessage.AsObject>,
identifier: string,
status: string,
createddate?: google_protobuf_timestamp_pb.Timestamp.AsObject,
updateddate?: google_protobuf_timestamp_pb.Timestamp.AsObject,
contextsList: Array<AssistantConversationContext.AsObject>,
metricsList: Array<Metric.AsObject>,
metadataList: Array<Metadata.AsObject>,
}
}
declare class GetAllAssistantConversationRequest extends jspb.Message {
getAssistantid(): string;
setAssistantid(value: string): void;
hasPaginate(): boolean;
clearPaginate(): void;
getPaginate(): Paginate | undefined;
setPaginate(value?: Paginate): void;
clearCriteriasList(): void;
getCriteriasList(): Array<Criteria>;
setCriteriasList(value: Array<Criteria>): void;
addCriterias(value?: Criteria, index?: number): Criteria;
getSource(): SourceMap[keyof SourceMap];
setSource(value: SourceMap[keyof SourceMap]): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GetAllAssistantConversationRequest.AsObject;
static toObject(includeInstance: boolean, msg: GetAllAssistantConversationRequest): GetAllAssistantConversationRequest.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: GetAllAssistantConversationRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetAllAssistantConversationRequest;
static deserializeBinaryFromReader(message: GetAllAssistantConversationRequest, reader: jspb.BinaryReader): GetAllAssistantConversationRequest;
}
declare namespace GetAllAssistantConversationRequest {
export type AsObject = {
assistantid: string,
paginate?: Paginate.AsObject,
criteriasList: Array<Criteria.AsObject>,
source: SourceMap[keyof SourceMap],
}
}
declare class GetAllAssistantConversationResponse extends jspb.Message {
getCode(): number;
setCode(value: number): void;
getSuccess(): boolean;
setSuccess(value: boolean): void;
clearDataList(): void;
getDataList(): Array<AssistantConversation>;
setDataList(value: Array<AssistantConversation>): void;
addData(value?: AssistantConversation, index?: number): AssistantConversation;
hasError(): boolean;
clearError(): void;
getError(): Error$1 | undefined;
setError(value?: Error$1): void;
hasPaginated(): boolean;
clearPaginated(): void;
getPaginated(): Paginated | undefined;
setPaginated(value?: Paginated): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GetAllAssistantConversationResponse.AsObject;
static toObject(includeInstance: boolean, msg: GetAllAssistantConversationResponse): GetAllAssistantConversationResponse.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: GetAllAssistantConversationResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetAllAssistantConversationResponse;
static deserializeBinaryFromReader(message: GetAllAssistantConversationResponse, reader: jspb.BinaryReader): GetAllAssistantConversationResponse;
}
declare namespace GetAllAssistantConversationResponse {
export type AsObject = {
code: number,
success: boolean,
dataList: Array<AssistantConversation.AsObject>,
error?: Error$1.AsObject,
paginated?: Paginated.AsObject,
}
}
declare class GetAllConversationMessageRequest extends jspb.Message {
getAssistantid(): string;
setAssistantid(value: string): void;
getAssistantconversationid(): string;
setAssistantconversationid(value: string): void;
hasPaginate(): boolean;
clearPaginate(): void;
getPaginate(): Paginate | undefined;
setPaginate(value?: Paginate): void;
clearCriteriasList(): void;
getCriteriasList(): Array<Criteria>;
setCriteriasList(value: Array<Criteria>): void;
addCriterias(value?: Criteria, index?: number): Criteria;
hasOrder(): boolean;
clearOrder(): void;
getOrder(): Ordering | undefined;
setOrder(value?: Ordering): void;
getSource(): SourceMap[keyof SourceMap];
setSource(value: SourceMap[keyof SourceMap]): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GetAllConversationMessageRequest.AsObject;
static toObject(includeInstance: boolean, msg: GetAllConversationMessageRequest): GetAllConversationMessageRequest.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: GetAllConversationMessageRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetAllConversationMessageRequest;
static deserializeBinaryFromReader(message: GetAllConversationMessageRequest, reader: jspb.BinaryReader): GetAllConversationMessageRequest;
}
declare namespace GetAllConversationMessageRequest {
export type AsObject = {
assistantid: string,
assistantconversationid: string,
paginate?: Paginate.AsObject,
criteriasList: Array<Criteria.AsObject>,
order?: Ordering.AsObject,
source: SourceMap[keyof SourceMap],
}
}
declare class GetAllConversationMessageResponse extends jspb.Message {
getCode(): number;
setCode(value: number): void;
getSuccess(): boolean;
setSuccess(value: boolean): void;
clearDataList(): void;
getDataList(): Array<AssistantConversationMessage>;
setDataList(value: Array<AssistantConversationMessage>): void;
addData(value?: AssistantConversationMessage, index?: number): AssistantConversationMessage;
hasError(): boolean;
clearError(): void;
getError(): Error$1 | undefined;
setError(value?: Error$1): void;
hasPaginated(): boolean;
clearPaginated(): void;
getPaginated(): Paginated | undefined;
setPaginated(value?: Paginated): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GetAllConversationMessageResponse.AsObject;
static toObject(includeInstance: boolean, msg: GetAllConversationMessageResponse): GetAllConversationMessageResponse.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: GetAllConversationMessageResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetAllConversationMessageResponse;
static deserializeBinaryFromReader(message: GetAllConversationMessageResponse, reader: jspb.BinaryReader): GetAllConversationMessageResponse;
}
declare namespace GetAllConversationMessageResponse {
export type AsObject = {
code: number,
success: boolean,
dataList: Array<AssistantConversationMessage.AsObject>,
error?: Error$1.AsObject,
paginated?: Paginated.AsObject,
}
}
interface SourceMap {
WEB_PLUGIN: 0;
RAPIDA_APP: 1;
PYTHON_SDK: 2;
NODE_SDK: 3;
GO_SDK: 4;
TYPESCRIPT_SDK: 5;
JAVA_SDK: 6;
PHP_SDK: 7;
RUST_SDK: 8;
}
// package: talk_api
// file: talk-api.proto
declare class AssistantDefinition extends jspb.Message {
getAssistantid(): string;
setAssistantid(value: string): void;
getVersion(): string;
setVersion(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): AssistantDefinition.AsObject;
static toObject(includeInstance: boolean, msg: AssistantDefinition): AssistantDefinition.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: AssistantDefinition, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): AssistantDefinition;
static deserializeBinaryFromReader(message: AssistantDefinition, reader: jspb.BinaryReader): AssistantDefinition;
}
declare namespace AssistantDefinition {
export type AsObject = {
assistantid: string,
version: string,
}
}
declare class AssistantMessagingRequest extends jspb.Message {
hasAssistant(): boolean;
clearAssistant(): void;
getAssistant(): AssistantDefinition | undefined;
setAssistant(value?: AssistantDefinition): void;
hasMessage(): boolean;
clearMessage(): void;
getMessage(): Message | undefined;
setMessage(value?: Message): void;
hasAssistantconversationid(): boolean;
clearAssistantconversationid(): void;
getAssistantconversationid(): string;
setAssistantconversationid(value: string): void;
getMetadataMap(): jspb.Map<string, google_protobuf_any_pb.Any>;
clearMetadataMap(): void;
getSource(): SourceMap[keyof SourceMap];
setSource(value: SourceMap[keyof SourceMap]): void;
getArgsMap(): jspb.Map<string, google_protobuf_any_pb.Any>;
clearArgsMap(): void;
getOptionsMap(): jspb.Map<string, google_protobuf_any_pb.Any>;
clearOptionsMap(): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): AssistantMessagingRequest.AsObject;
static toObject(includeInstance: boolean, msg: AssistantMessagingRequest): AssistantMessagingRequest.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: AssistantMessagingRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): AssistantMessagingRequest;
static deserializeBinaryFromReader(message: AssistantMessagingRequest, reader: jspb.BinaryReader): AssistantMessagingRequest;
}
declare namespace AssistantMessagingRequest {
export type AsObject = {
assistant?: AssistantDefinition.AsObject,
message?: Message.AsObject,
assistantconversationid: string,
metadataMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>,
source: SourceMap[keyof SourceMap],
argsMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>,
optionsMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>,
}
}
declare class AssistantMessagingResponse extends jspb.Message {
getCode(): number;
setCode(value: number): void;
getSuccess(): boolean;
setSuccess(value: boolean): void;
hasError(): boolean;
clearError(): void;
getError(): Error$1 | undefined;
setError(value?: Error$1): void;
hasMessage(): boolean;
clearMessage(): void;
getMessage(): AssistantConversationMessage | undefined;
setMessage(value?: AssistantConversationMessage): void;
hasEvent(): boolean;
clearEvent(): void;
getEvent(): Event | undefined;
setEvent(value?: Event): void;
getDataCase(): AssistantMessagingResponse.DataCase;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): AssistantMessagingResponse.AsObject;
static toObject(includeInstance: boolean, msg: AssistantMessagingResponse): AssistantMessagingResponse.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: AssistantMessagingResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): AssistantMessagingResponse;
static deserializeBinaryFromReader(message: AssistantMessagingResponse, reader: jspb.BinaryReader): AssistantMessagingResponse;
}
declare namespace AssistantMessagingResponse {
export type AsObject = {
code: number,
success: boolean,
error?: Error$1.AsObject,
message?: AssistantConversationMessage.AsObject,
event?: Event.AsObject,
}
export enum DataCase {
DATA_NOT_SET = 0,
MESSAGE = 3,
EVENT = 5,
}
}
declare class CreateMessageMetricRequest extends jspb.Message {
getAssistantid(): string;
setAssistantid(value: string): void;
getAssistantconversationid(): string;
setAssistantconversationid(value: string): void;
getMessageid(): string;
setMessageid(value: string): void;
clearMetricsList(): void;
getMetricsList(): Array<Metric>;
setMetricsList(value: Array<Metric>): void;
addMetrics(value?: Metric, index?: number): Metric;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): CreateMessageMetricRequest.AsObject;
static toObject(includeInstance: boolean, msg: CreateMessageMetricRequest): CreateMessageMetricRequest.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: CreateMessageMetricRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): CreateMessageMetricRequest;
static deserializeBinaryFromReader(message: CreateMessageMetricRequest, reader: jspb.BinaryReader): CreateMessageMetricRequest;
}
declare namespace CreateMessageMetricRequest {
export type AsObject = {
assistantid: string,
assistantconversationid: string,
messageid: string,
metricsList: Array<Metric.AsObject>,
}
}
declare class CreateMessageMetricResponse extends jspb.Message {
getCode(): number;
setCode(value: number): void;
getSuccess(): boolean;
setSuccess(value: boolean): void;
clearDataList(): void;
getDataList(): Array<Metric>;
setDataList(value: Array<Metric>): void;
addData(value?: Metric, index?: number): Metric;
hasError(): boolean;
clearError(): void;
getError(): Error$1 | undefined;
setError(value?: Error$1): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): CreateMessageMetricResponse.AsObject;
static toObject(includeInstance: boolean, msg: CreateMessageMetricResponse): CreateMessageMetricResponse.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: CreateMessageMetricResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): CreateMessageMetricResponse;
static deserializeBinaryFromReader(message: CreateMessageMetricResponse, reader: jspb.BinaryReader): CreateMessageMetricResponse;
}
declare namespace CreateMessageMetricResponse {
export type AsObject = {
code: number,
success: boolean,
dataList: Array<Metric.AsObject>,
error?: Error$1.AsObject,
}
}
declare class CreateConversationMetricRequest extends jspb.Message {
getAssistantid(): string;
setAssistantid(value: string): void;
getAssistantconversationid(): string;
setAssistantconversationid(value: string): void;
clearMetricsList(): void;
getMetricsList(): Array<Metric>;
setMetricsList(value: Array<Metric>): void;
addMetrics(value?: Metric, index?: number): Metric;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): CreateConversationMetricRequest.AsObject;
static toObject(includeInstance: boolean, msg: CreateConversationMetricRequest): CreateConversationMetricRequest.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: CreateConversationMetricRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): CreateConversationMetricRequest;
static deserializeBinaryFromReader(message: CreateConversationMetricRequest, reader: jspb.BinaryReader): CreateConversationMetricRequest;
}
declare namespace CreateConversationMetricRequest {
export type AsObject = {
assistantid: string,
assistantconversationid: string,
metricsList: Array<Metric.AsObject>,
}
}
declare class CreateConversationMetricResponse extends jspb.Message {
getCode(): number;
setCode(value: number): void;
getSuccess(): boolean;
setSuccess(value: boolean): void;
clearDataList(): void;
getDataList(): Array<Metric>;
setDataList(value: Array<Metric>): void;
addData(value?: Metric, index?: number): Metric;
hasError(): boolean;
clearError(): void;
getError(): Error$1 | undefined;
setError(value?: Error$1): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): CreateConversationMetricResponse.AsObject;
static toObject(includeInstance: boolean, msg: CreateConversationMetricResponse): CreateConversationMetricResponse.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: CreateConversationMetricResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): CreateConversationMetricResponse;
static deserializeBinaryFromReader(message: CreateConversationMetricResponse, reader: jspb.BinaryReader): CreateConversationMetricResponse;
}
declare namespace CreateConversationMetricResponse {
export type AsObject = {
code: number,
success: boolean,
dataList: Array<Metric.AsObject>,
error?: Error$1.AsObject,
}
}
/**
* Output of AudioAnalysis for the frequency domain of the audio
*/
type AudioAnalysisOutputType = {
/**
* Amplitude of this frequency between {0, 1} inclusive
*/
values: Float32Array;
/**
* Raw frequency bucket values
*/
frequencies: number[];
/**
* Labels for the frequency bucket values
*/
labels: string[];
};
/**
* Raw wav audio file contents
*/
type WavPackerAudioType = {
blob: Blob;
url: string;
channelCount: number;
sampleRate: number;
duration: number;
};
/**
* Plays audio streams received in raw PCM16 chunks from the browser
* @class
*/
declare class WavStreamPlayer {
/**
* Creates a new WavStreamPlayer instance
* @param {{sampleRate?: number}} options
* @returns {WavStreamPlayer}
*/
constructor({ sampleRate }?: {
sampleRate?: number;
});
scriptSrc: string;
sampleRate: number;
context: AudioContext | null;
stream: AudioWorkletNode | null;
analyser: AnalyserNode | null;
trackSampleOffsets: {};
interruptedTrackIds: {};
/**
* Connects the audio context and enables output to speakers
* @returns {Promise<true>}
*/
connect(deviceId?: string): Promise<true>;
/**
* if user want to change the device id that is needed for the user
* @param deviceId
*/
changeDeviceId(deviceId: any): Promise<void>;
/**
* Gets the current frequency domain data from the playing track
* @param {"frequency"|"music"|"voice"} [analysisType]
* @param {number} [minDecibels] default -100
* @param {number} [maxDecibels] default -30
* @returns {import('./analysis/audio_analysis.js').AudioAnalysisOutputType}
*/
getFrequencies(analysisType?: "frequency" | "music" | "voice", minDecibels?: number, maxDecibels?: number): AudioAnalysisOutputType;
/**
* Starts audio streaming
* @private
* @returns {Promise<true>}
*/
private _start;
/**
* Adds 16BitPCM data to the currently playing audio stream
* You can add chunks beyond the current play point and they will be queued for play
* @param {ArrayBuffer|Int16Array} arrayBuffer
* @param {string} [trackId]
* @returns {Int16Array}
*/
add16BitPCM(arrayBuffer: ArrayBuffer | Int16Array, trackId?: string): Int16Array;
/**
* Gets the offset (sample count) of the currently playing stream
* @param {boolean} [interrupt]
* @returns {{trackId: string|null, offset: number, currentTime: number}}
*/
getTrackSampleOffset(interrupt?: boolean): {
trackId: string | null;
offset: number;
currentTime: number;
};
/**
* Strips the current stream and returns the sample offset of the audio
* @param {boolean} [interrupt]
* @returns {{trackId: string|null, offset: number, currentTime: number}}
*/
interrupt(): {
trackId: string | null;
offset: number;
currentTime: number;
};
}
/**
* Decodes audio into a wav file
* @typedef {Object} DecodedAudioType
* @property {Blob} blob
* @property {string} url
* @property {Float32Array} values
* @property {AudioBuffer} audioBuffer
*/
/**
* Records live stream of user audio as PCM16 "audio/wav" data
* @class
*/
declare class WavRecorder {
/**
* Decodes audio data from multiple formats to a Blob, url, Float32Array and AudioBuffer
* @param {Blob|Float32Array|Int16Array|ArrayBuffer|number[]} audioData
* @param {number} sampleRate
* @param {number} fromSampleRate
* @returns {Promise<DecodedAudioType>}
*/
static decode(audioData: Blob | Float32Array | Int16Array | ArrayBuffer | number[], sampleRate?: number, fromSampleRate?: number): Promise<DecodedAudioType>;
/**
* Create a new WavRecorder instance
* @param {{sampleRate?: number, outputToSpeakers?: boolean, debug?: boolean}} [options]
* @returns {WavRecorder}
*/
constructor({ sampleRate, outputToSpeakers, debug, }?: {
sampleRate?: number;
outputToSpeakers?: boolean;
debug?: boolean;
});
scriptSrc: string;
sampleRate: number;
outputToSpeakers: boolean;
debug: boolean;
_deviceChangeCallback: (() => Promise<void>) | null;
_devices: any[];
stream: MediaStream | null;
processor: AudioWorkletNode | null;
source: MediaStreamAudioSourceNode | null;
node: AudioNode | null;
recording: boolean;
_lastEventId: number;
eventReceipts: {};
eventTimeout: number;
_chunkProcessor: () => void;
_chunkProcessorBuffer: {
raw: ArrayBuffer;
mono: ArrayBuffer;
};
/**
* Logs data in debug mode
* @param {...any} arguments
* @returns {true}
*/
log(...args: any[]): true;
/**
* Retrieves the current sampleRate for the recorder
* @returns {number}
*/
getSampleRate(): number;
/**
* Retrieves the current status of the recording
* @returns {"ended"|"paused"|"recording"}
*/
getStatus(): "ended" | "paused" | "recording";
/**
* Sends an event to the AudioWorklet
* @private
* @param {string} name
* @param {{[key: string]: any}} data
* @param {AudioWorkletNode} [_processor]
* @returns {Promise<{[key: string]: any}>}
*/
private _event;
/**
* Sets device change callback, remove if callback provided is `null`
* @param {(Array<MediaDeviceInfo & {default: boolean}>): void|null} callback
* @returns {true}
*/
listenForDeviceChange(callback: any): true;
/**
* Manually request permission to use the microphone
* @returns {Promise<true>}
*/
requestPermission(): Promise<true>;
/**
* List all eligible devices for recording, will request permission to use microphone
* @returns {Promise<Array<MediaDeviceInfo & {default: boolean}>>}
*/
listDevices(): Promise<Array<MediaDeviceInfo & {
default: boolean;
}>>;
/**
* Begins a recording session and requests microphone permissions if not already granted
* Microphone recording indicator will appear on browser tab but status will be "paused"
* @param {string} [deviceId] if no device provided, default device will be used
* @returns {Promise<true>}
*/
begin(deviceId?: string): Promise<true>;
analyser: AnalyserNode | undefined;
/**
* Gets the current frequency domain data from the recording track
* @param {"frequency"|"music"|"voice"} [analysisType]
* @param {number} [minDecibels] default -100
* @param {number} [maxDecibels] default -30
* @returns {import('./analysis/audio_analysis.js').AudioAnalysisOutputType}
*/
getFrequencies(analysisType?: "frequency" | "music" | "voice", minDecibels?: number, maxDecibels?: number): AudioAnalysisOutputType;
/**
* Pauses the recording
* Keeps microphone stream open but halts storage of audio
* @returns {Promise<true>}
*/
pause(): Promise<true>;
/**
* Start recording stream and storing to memory from the connected audio source
* @param {(data: { mono: Int16Array; raw: Int16Array }) => any} [chunkProcessor]
* @param {number} [chunkSize] chunkProcessor will not be triggered until this size threshold met in mono audio
* @returns {Promise<true>}
*/
record(chunkProcessor?: (data: {
mono: Int16Array;
raw: Int16Array;
}) => any, chunkSize?: number): Promise<true>;
_chunkProcessorSize: number | undefined;
/**
* Clears the audio buffer, empties stored recording
* @returns {Promise<true>}
*/
clear(): Promise<true>;
/**
* Reads the current audio stream data
* @returns {Promise<{meanValues: Float32Array, channels: Array<Float32Array>}>}
*/
read(): Promise<{
meanValues: Float32Array;
channels: Array<Float32Array>;
}>;
/**
* Saves the current audio stream to a file
* @param {boolean} [force] Force saving while still recording
* @returns {Promise<import('./wav_packer.js').WavPackerAudioType>}
*/
save(force?: boolean): Promise<WavPackerAudioType>;
/**
* Ends the current recording session and saves the result
* @returns {Promise<import('./wav_packer.js').WavPackerAudioType>}
*/
end(): Promise<WavPackerAudioType>;
/**
* Performs a full cleanup of WavRecorder instance
* Stops actively listening via microphone and removes existing listeners
* @returns {Promise<true>}
*/
quit(): Promise<true>;
}
/**
* Decodes audio into a wav file
*/
type DecodedAudioType = {
blob: Blob;
url: string;