Skip to content

react/dist

Classes

CognideskApiError

Extends

  • Error

Constructors

Constructor
new CognideskApiError(message, input): CognideskApiError;
Parameters
Parameter Type
message string
input { body: unknown; response: Response; status: number; }
input.body unknown
input.response Response
input.status number
Returns

CognideskApiError

Overrides
Error.constructor

Properties

body
readonly body: unknown;
response
readonly response: Response;
status
readonly status: number;

Interfaces

ChannelEventShortcutEnvelope

Extends

Type Parameters

Type Parameter Default type
TPayload NormalizedChannelPayloadInput
TRawPayload unknown

Properties

actor?
optional actor?: ChannelEventActorInput;
agentId?
optional agentId?: string;
attachments?
optional attachments?: unknown[];
body?
optional body?: string;
channel?
optional channel?: ConversationChannelInput;
Inherited from
Omit.channel
conversationId?
optional conversationId?: string;
dedupeKey?
optional dedupeKey?: string;
direction?
optional direction?: "outbound" | "inbound" | "internal";
Inherited from
Omit.direction
id?
optional id?: string;
Inherited from
Omit.id
idempotencyKey?
optional idempotencyKey?: string;
identity?
optional identity?: ChannelEventIdentity;
Overrides
Omit.identity
identityKey?
optional identityKey?: string;
identityMetadata?
optional identityMetadata?: Record<string, unknown>;
identityStreamId?
optional identityStreamId?: string;
intent?
optional intent?: ChannelEventIntent;
Inherited from
Omit.intent
kind?
optional kind?: ChannelEventNature;
Inherited from
Omit.kind
message?
optional message?: string;
metadata?
optional metadata?: Record<string, unknown>;
Inherited from
Omit.metadata
nature?
optional nature?: ChannelEventNature;
Inherited from
Omit.nature
occurredAt?
optional occurredAt?: string;
Inherited from
Omit.occurredAt
payload?
optional payload?: TPayload;
Inherited from
Omit.payload
providerObject?
optional providerObject?: unknown;
raw?
optional raw?: TRawPayload;
sequence?
optional sequence?: string | number;
source?
optional source?: ChannelEventSourceEvidence<TRawPayload>;
Inherited from
Omit.source
status?
optional status?: string;
subject?
optional subject?: string;
summary?
optional summary?: string;
text?
optional text?: string;
turn?
optional turn?: unknown;

ChannelEventSubmitInput

Extends

Extended by

Type Parameters

Type Parameter Default type
TPayload NormalizedChannelPayloadInput
TRawPayload unknown
TTurn unknown

Properties

actor?
optional actor?: ChannelEventActorInput;
agentId?
optional agentId?: string;
Inherited from
Omit.agentId
app?
optional app?: unknown;
Inherited from
Omit.app
attachments?
optional attachments?: unknown[];
binding?
optional binding?: ChannelEventBindingInput;
Inherited from
Omit.binding
body?
optional body?: string;
channel?
optional channel?: ConversationChannelInput;
conversationContext?
optional conversationContext?: unknown;
Inherited from
Omit.conversationContext
conversationId?
optional conversationId?: string;
Inherited from
Omit.conversationId
createConversation?
optional createConversation?: CreateRuntimeConversationInput;
Inherited from
Omit.createConversation
dedupeKey?
optional dedupeKey?: string;
deliveryId?
optional deliveryId?: string;
direction?
optional direction?: "outbound" | "inbound" | "internal";
event?
optional event?: ChannelEventShortcutEnvelope<TPayload, TRawPayload>;
eventId?
optional eventId?: string;
externalObjectIds?
optional externalObjectIds?: Record<string, string>;
handling?
optional handling?: ChannelEventHandlingInput<TTurn>;
Inherited from
Omit.handling
id?
optional id?: string;
idempotencyKey?
optional idempotencyKey?: string;
identity?
optional identity?: ChannelEventIdentity;
identityKey?
optional identityKey?: string;
identityMetadata?
optional identityMetadata?: Record<string, unknown>;
identityStreamId?
optional identityStreamId?: string;
intent?
optional intent?: ChannelEventIntent;
kind?
optional kind?: ChannelEventNature;
message?
optional message?: string;
metadata?
optional metadata?: Record<string, unknown>;
nature?
optional nature?: ChannelEventNature;
occurredAt?
optional occurredAt?: string;
payload?
optional payload?: TPayload;
provider?
optional provider?: string;
providerObject?
optional providerObject?: unknown;
providerPackageId?
optional providerPackageId?: string;
raw?
optional raw?: TRawPayload;
receivedAt?
optional receivedAt?: string;
sequence?
optional sequence?: string | number;
signal?
optional signal?: AbortSignal;
Inherited from
Omit.signal
source?
optional source?: ChannelEventSourceEvidence<TRawPayload>;
sourceId?
optional sourceId?: string;
sourceType?
optional sourceType?:
  | "application"
  | "provider-adapter"
  | "schedule-adapter"
  | "operator-surface";
status?
optional status?: string;
streamId?
optional streamId?: string;
subject?
optional subject?: string;
summary?
optional summary?: string;
text?
optional text?: string;
turn?
optional turn?: TTurn;
verified?
optional verified?: boolean;

Methods

onAssistantTextDelta()?
optional onAssistantTextDelta(textDelta): void | Promise<void>;
Parameters
Parameter Type
textDelta string
Returns

void | Promise\<void>

Inherited from
Omit.onAssistantTextDelta

ChannelHandoffEventInput

Extends

Type Parameters

Type Parameter Default type
TPayload NormalizedChannelPayloadInput
TRawPayload unknown
TTurn unknown

Properties

actor?
optional actor?: ChannelEventActorInput;
Inherited from

ChannelEventSubmitInput.actor

agentId?
optional agentId?: string;
Inherited from

ChannelEventSubmitInput.agentId

app?
optional app?: unknown;
Inherited from

ChannelEventSubmitInput.app

attachments?
optional attachments?: unknown[];
Inherited from

ChannelEventSubmitInput.attachments

binding?
optional binding?: ChannelEventBindingInput;
Inherited from

ChannelEventSubmitInput.binding

body?
optional body?: string;
Inherited from

ChannelEventSubmitInput.body

channel
channel: ConversationChannelInput;
Overrides

ChannelEventSubmitInput.channel

conversationContext?
optional conversationContext?: unknown;
Inherited from

ChannelEventSubmitInput.conversationContext

conversationId?
optional conversationId?: string;
Inherited from

ChannelEventSubmitInput.conversationId

createConversation?
optional createConversation?: CreateRuntimeConversationInput;
Inherited from

ChannelEventSubmitInput.createConversation

dedupeKey?
optional dedupeKey?: string;
Inherited from

ChannelEventSubmitInput.dedupeKey

deliveryId?
optional deliveryId?: string;
Inherited from

ChannelEventSubmitInput.deliveryId

direction?
optional direction?: "outbound" | "inbound" | "internal";
Inherited from

ChannelEventSubmitInput.direction

event?
optional event?: ChannelEventShortcutEnvelope<TPayload, TRawPayload>;
Inherited from

ChannelEventSubmitInput.event

eventId?
optional eventId?: string;
Inherited from

ChannelEventSubmitInput.eventId

externalObjectIds?
optional externalObjectIds?: Record<string, string>;
Inherited from

ChannelEventSubmitInput.externalObjectIds

fromChannel?
optional fromChannel?: ConversationChannelInput;
handling?
optional handling?: ChannelEventHandlingInput<TTurn>;
Inherited from

ChannelEventSubmitInput.handling

id?
optional id?: string;
Inherited from

ChannelEventSubmitInput.id

idempotencyKey?
optional idempotencyKey?: string;
Inherited from

ChannelEventSubmitInput.idempotencyKey

identity?
optional identity?: ChannelEventIdentity;
Inherited from

ChannelEventSubmitInput.identity

identityKey?
optional identityKey?: string;
Inherited from

ChannelEventSubmitInput.identityKey

identityMetadata?
optional identityMetadata?: Record<string, unknown>;
Inherited from

ChannelEventSubmitInput.identityMetadata

identityStreamId?
optional identityStreamId?: string;
Inherited from

ChannelEventSubmitInput.identityStreamId

intent?
optional intent?: ChannelEventIntent;
Inherited from

ChannelEventSubmitInput.intent

kind?
optional kind?: ChannelEventNature;
Inherited from

ChannelEventSubmitInput.kind

message?
optional message?: string;
Inherited from

ChannelEventSubmitInput.message

metadata?
optional metadata?: Record<string, unknown>;
Inherited from

ChannelEventSubmitInput.metadata

nature?
optional nature?: ChannelEventNature;
Inherited from

ChannelEventSubmitInput.nature

occurredAt?
optional occurredAt?: string;
Inherited from

ChannelEventSubmitInput.occurredAt

payload?
optional payload?: TPayload;
Inherited from

ChannelEventSubmitInput.payload

provider?
optional provider?: string;
Inherited from

ChannelEventSubmitInput.provider

providerObject?
optional providerObject?: unknown;
Inherited from

ChannelEventSubmitInput.providerObject

providerPackageId?
optional providerPackageId?: string;
Inherited from

ChannelEventSubmitInput.providerPackageId

raw?
optional raw?: TRawPayload;
Inherited from

ChannelEventSubmitInput.raw

reason?
optional reason?: string;
reasonCode?
optional reasonCode?: string;
reasonLabel?
optional reasonLabel?: string;
receivedAt?
optional receivedAt?: string;
Inherited from

ChannelEventSubmitInput.receivedAt

sequence?
optional sequence?: string | number;
Inherited from

ChannelEventSubmitInput.sequence

signal?
optional signal?: AbortSignal;
Inherited from

ChannelEventSubmitInput.signal

source?
optional source?: ChannelEventSourceEvidence<TRawPayload>;
Inherited from

ChannelEventSubmitInput.source

sourceId?
optional sourceId?: string;
Inherited from

ChannelEventSubmitInput.sourceId

sourceType?
optional sourceType?:
  | "application"
  | "provider-adapter"
  | "schedule-adapter"
  | "operator-surface";
Inherited from

ChannelEventSubmitInput.sourceType

status?
optional status?: string;
Inherited from

ChannelEventSubmitInput.status

streamId?
optional streamId?: string;
Inherited from

ChannelEventSubmitInput.streamId

subject?
optional subject?: string;
Inherited from

ChannelEventSubmitInput.subject

summary?
optional summary?: string;
Inherited from

ChannelEventSubmitInput.summary

text?
optional text?: string;
Inherited from

ChannelEventSubmitInput.text

turn?
optional turn?: TTurn;
Inherited from

ChannelEventSubmitInput.turn

verified?
optional verified?: boolean;
Inherited from

ChannelEventSubmitInput.verified

Methods

onAssistantTextDelta()?
optional onAssistantTextDelta(textDelta): void | Promise<void>;
Parameters
Parameter Type
textDelta string
Returns

void | Promise\<void>

Inherited from

ChannelEventSubmitInput.onAssistantTextDelta


ChannelHandoffReviewEventInput

Extends

Type Parameters

Type Parameter Default type
TPayload NormalizedChannelPayloadInput
TRawPayload unknown
TTurn unknown

Properties

actor?
optional actor?: ChannelEventActorInput;
Inherited from

ChannelEventSubmitInput.actor

agentId?
optional agentId?: string;
Inherited from

ChannelEventSubmitInput.agentId

app?
optional app?: unknown;
Inherited from

ChannelEventSubmitInput.app

attachments?
optional attachments?: unknown[];
Inherited from

ChannelEventSubmitInput.attachments

binding?
optional binding?: ChannelEventBindingInput;
Inherited from

ChannelEventSubmitInput.binding

body?
optional body?: string;
Inherited from

ChannelEventSubmitInput.body

channel
channel: ConversationChannelInput;
Overrides

ChannelEventSubmitInput.channel

conversationContext?
optional conversationContext?: unknown;
Inherited from

ChannelEventSubmitInput.conversationContext

conversationId?
optional conversationId?: string;
Inherited from

ChannelEventSubmitInput.conversationId

createConversation?
optional createConversation?: CreateRuntimeConversationInput;
Inherited from

ChannelEventSubmitInput.createConversation

dedupeKey?
optional dedupeKey?: string;
Inherited from

ChannelEventSubmitInput.dedupeKey

deliveryId?
optional deliveryId?: string;
Inherited from

ChannelEventSubmitInput.deliveryId

direction?
optional direction?: "outbound" | "inbound" | "internal";
Inherited from

ChannelEventSubmitInput.direction

event?
optional event?: ChannelEventShortcutEnvelope<TPayload, TRawPayload>;
Inherited from

ChannelEventSubmitInput.event

eventId?
optional eventId?: string;
Inherited from

ChannelEventSubmitInput.eventId

externalObjectIds?
optional externalObjectIds?: Record<string, string>;
Inherited from

ChannelEventSubmitInput.externalObjectIds

handling?
optional handling?: ChannelEventHandlingInput<TTurn>;
Inherited from

ChannelEventSubmitInput.handling

id?
optional id?: string;
Inherited from

ChannelEventSubmitInput.id

idempotencyKey?
optional idempotencyKey?: string;
Inherited from

ChannelEventSubmitInput.idempotencyKey

identity?
optional identity?: ChannelEventIdentity;
Inherited from

ChannelEventSubmitInput.identity

identityKey?
optional identityKey?: string;
Inherited from

ChannelEventSubmitInput.identityKey

identityMetadata?
optional identityMetadata?: Record<string, unknown>;
Inherited from

ChannelEventSubmitInput.identityMetadata

identityStreamId?
optional identityStreamId?: string;
Inherited from

ChannelEventSubmitInput.identityStreamId

intent?
optional intent?: ChannelEventIntent;
Inherited from

ChannelEventSubmitInput.intent

kind?
optional kind?: ChannelEventNature;
Inherited from

ChannelEventSubmitInput.kind

message?
optional message?: string;
Inherited from

ChannelEventSubmitInput.message

metadata?
optional metadata?: Record<string, unknown>;
Inherited from

ChannelEventSubmitInput.metadata

nature?
optional nature?: ChannelEventNature;
Inherited from

ChannelEventSubmitInput.nature

occurredAt?
optional occurredAt?: string;
Inherited from

ChannelEventSubmitInput.occurredAt

payload?
optional payload?: TPayload;
Inherited from

ChannelEventSubmitInput.payload

provider?
optional provider?: string;
Inherited from

ChannelEventSubmitInput.provider

providerObject?
optional providerObject?: unknown;
Inherited from

ChannelEventSubmitInput.providerObject

providerPackageId?
optional providerPackageId?: string;
Inherited from

ChannelEventSubmitInput.providerPackageId

raw?
optional raw?: TRawPayload;
Inherited from

ChannelEventSubmitInput.raw

receivedAt?
optional receivedAt?: string;
Inherited from

ChannelEventSubmitInput.receivedAt

sequence?
optional sequence?: string | number;
Inherited from

ChannelEventSubmitInput.sequence

signal?
optional signal?: AbortSignal;
Inherited from

ChannelEventSubmitInput.signal

source?
optional source?: ChannelEventSourceEvidence<TRawPayload>;
Inherited from

ChannelEventSubmitInput.source

sourceId?
optional sourceId?: string;
Inherited from

ChannelEventSubmitInput.sourceId

sourceType?
optional sourceType?:
  | "application"
  | "provider-adapter"
  | "schedule-adapter"
  | "operator-surface";
Inherited from

ChannelEventSubmitInput.sourceType

status?
optional status?: string;
Inherited from

ChannelEventSubmitInput.status

streamId?
optional streamId?: string;
Inherited from

ChannelEventSubmitInput.streamId

subject?
optional subject?: string;
Inherited from

ChannelEventSubmitInput.subject

summary?
optional summary?: string;
Inherited from

ChannelEventSubmitInput.summary

text?
optional text?: string;
Inherited from

ChannelEventSubmitInput.text

turn?
optional turn?: TTurn;
Inherited from

ChannelEventSubmitInput.turn

verified?
optional verified?: boolean;
Inherited from

ChannelEventSubmitInput.verified

Methods

onAssistantTextDelta()?
optional onAssistantTextDelta(textDelta): void | Promise<void>;
Parameters
Parameter Type
textDelta string
Returns

void | Promise\<void>

Inherited from

ChannelEventSubmitInput.onAssistantTextDelta


ChannelMessageEventInput

Extends

Type Parameters

Type Parameter Default type
TPayload NormalizedChannelPayloadInput
TRawPayload unknown
TTurn unknown

Properties

actor?
optional actor?: ChannelEventActorInput;
Inherited from

ChannelEventSubmitInput.actor

agentId?
optional agentId?: string;
Inherited from

ChannelEventSubmitInput.agentId

app?
optional app?: unknown;
Inherited from

ChannelEventSubmitInput.app

attachments?
optional attachments?: unknown[];
Inherited from

ChannelEventSubmitInput.attachments

binding?
optional binding?: ChannelEventBindingInput;
Inherited from

ChannelEventSubmitInput.binding

body?
optional body?: string;
Inherited from

ChannelEventSubmitInput.body

channel
channel: ConversationChannelInput;
Overrides

ChannelEventSubmitInput.channel

conversationContext?
optional conversationContext?: unknown;
Inherited from

ChannelEventSubmitInput.conversationContext

conversationId?
optional conversationId?: string;
Inherited from

ChannelEventSubmitInput.conversationId

createConversation?
optional createConversation?: CreateRuntimeConversationInput;
Inherited from

ChannelEventSubmitInput.createConversation

dedupeKey?
optional dedupeKey?: string;
Inherited from

ChannelEventSubmitInput.dedupeKey

deliveryId?
optional deliveryId?: string;
Inherited from

ChannelEventSubmitInput.deliveryId

direction?
optional direction?: "outbound" | "inbound";
Overrides

ChannelEventSubmitInput.direction

event?
optional event?: ChannelEventShortcutEnvelope<TPayload, TRawPayload>;
Inherited from

ChannelEventSubmitInput.event

eventId?
optional eventId?: string;
Inherited from

ChannelEventSubmitInput.eventId

externalObjectIds?
optional externalObjectIds?: Record<string, string>;
Inherited from

ChannelEventSubmitInput.externalObjectIds

handling?
optional handling?: ChannelEventHandlingInput<TTurn>;
Inherited from

ChannelEventSubmitInput.handling

id?
optional id?: string;
Inherited from

ChannelEventSubmitInput.id

idempotencyKey?
optional idempotencyKey?: string;
Inherited from

ChannelEventSubmitInput.idempotencyKey

identity?
optional identity?: ChannelEventIdentity;
Inherited from

ChannelEventSubmitInput.identity

identityKey?
optional identityKey?: string;
Inherited from

ChannelEventSubmitInput.identityKey

identityMetadata?
optional identityMetadata?: Record<string, unknown>;
Inherited from

ChannelEventSubmitInput.identityMetadata

identityStreamId?
optional identityStreamId?: string;
Inherited from

ChannelEventSubmitInput.identityStreamId

intent?
optional intent?: ChannelEventIntent;
Inherited from

ChannelEventSubmitInput.intent

kind?
optional kind?: ChannelEventNature;
Inherited from

ChannelEventSubmitInput.kind

message?
optional message?: string;
Inherited from

ChannelEventSubmitInput.message

metadata?
optional metadata?: Record<string, unknown>;
Inherited from

ChannelEventSubmitInput.metadata

nature?
optional nature?: ChannelEventNature;
Inherited from

ChannelEventSubmitInput.nature

occurredAt?
optional occurredAt?: string;
Inherited from

ChannelEventSubmitInput.occurredAt

payload?
optional payload?: TPayload;
Inherited from

ChannelEventSubmitInput.payload

provider?
optional provider?: string;
Inherited from

ChannelEventSubmitInput.provider

providerObject?
optional providerObject?: unknown;
Inherited from

ChannelEventSubmitInput.providerObject

providerPackageId?
optional providerPackageId?: string;
Inherited from

ChannelEventSubmitInput.providerPackageId

raw?
optional raw?: TRawPayload;
Inherited from

ChannelEventSubmitInput.raw

receivedAt?
optional receivedAt?: string;
Inherited from

ChannelEventSubmitInput.receivedAt

sequence?
optional sequence?: string | number;
Inherited from

ChannelEventSubmitInput.sequence

signal?
optional signal?: AbortSignal;
Inherited from

ChannelEventSubmitInput.signal

source?
optional source?: ChannelEventSourceEvidence<TRawPayload>;
Inherited from

ChannelEventSubmitInput.source

sourceId?
optional sourceId?: string;
Inherited from

ChannelEventSubmitInput.sourceId

sourceType?
optional sourceType?:
  | "application"
  | "provider-adapter"
  | "schedule-adapter"
  | "operator-surface";
Inherited from

ChannelEventSubmitInput.sourceType

status?
optional status?: string;
Inherited from

ChannelEventSubmitInput.status

streamId?
optional streamId?: string;
Inherited from

ChannelEventSubmitInput.streamId

subject?
optional subject?: string;
Inherited from

ChannelEventSubmitInput.subject

summary?
optional summary?: string;
Inherited from

ChannelEventSubmitInput.summary

text
text: string;
Overrides

ChannelEventSubmitInput.text

turn?
optional turn?: TTurn;
Inherited from

ChannelEventSubmitInput.turn

verified?
optional verified?: boolean;
Inherited from

ChannelEventSubmitInput.verified

Methods

onAssistantTextDelta()?
optional onAssistantTextDelta(textDelta): void | Promise<void>;
Parameters
Parameter Type
textDelta string
Returns

void | Promise\<void>

Inherited from

ChannelEventSubmitInput.onAssistantTextDelta


ChannelOutputResolutionEventInput

Extends

Type Parameters

Type Parameter Default type
TPayload NormalizedChannelPayloadInput
TRawPayload unknown
TTurn unknown

Properties

actor?
optional actor?: ChannelEventActorInput;
Inherited from

ChannelEventSubmitInput.actor

agentId?
optional agentId?: string;
Inherited from

ChannelEventSubmitInput.agentId

app?
optional app?: unknown;
Inherited from

ChannelEventSubmitInput.app

attachments?
optional attachments?: unknown[];
Inherited from

ChannelEventSubmitInput.attachments

binding?
optional binding?: ChannelEventBindingInput;
Inherited from

ChannelEventSubmitInput.binding

body?
optional body?: string;
Inherited from

ChannelEventSubmitInput.body

channel
channel: ConversationChannelInput;
Overrides

ChannelEventSubmitInput.channel

conversationContext?
optional conversationContext?: unknown;
Inherited from

ChannelEventSubmitInput.conversationContext

conversationId?
optional conversationId?: string;
Inherited from

ChannelEventSubmitInput.conversationId

createConversation?
optional createConversation?: CreateRuntimeConversationInput;
Inherited from

ChannelEventSubmitInput.createConversation

dedupeKey?
optional dedupeKey?: string;
Inherited from

ChannelEventSubmitInput.dedupeKey

deliveryId?
optional deliveryId?: string;
Inherited from

ChannelEventSubmitInput.deliveryId

direction?
optional direction?: "outbound" | "inbound" | "internal";
Inherited from

ChannelEventSubmitInput.direction

event?
optional event?: ChannelEventShortcutEnvelope<TPayload, TRawPayload>;
Inherited from

ChannelEventSubmitInput.event

eventId?
optional eventId?: string;
Inherited from

ChannelEventSubmitInput.eventId

externalObjectIds?
optional externalObjectIds?: Record<string, string>;
Inherited from

ChannelEventSubmitInput.externalObjectIds

handling?
optional handling?: ChannelEventHandlingInput<TTurn>;
Inherited from

ChannelEventSubmitInput.handling

id?
optional id?: string;
Inherited from

ChannelEventSubmitInput.id

idempotencyKey?
optional idempotencyKey?: string;
Inherited from

ChannelEventSubmitInput.idempotencyKey

identity?
optional identity?: ChannelEventIdentity;
Inherited from

ChannelEventSubmitInput.identity

identityKey?
optional identityKey?: string;
Inherited from

ChannelEventSubmitInput.identityKey

identityMetadata?
optional identityMetadata?: Record<string, unknown>;
Inherited from

ChannelEventSubmitInput.identityMetadata

identityStreamId?
optional identityStreamId?: string;
Inherited from

ChannelEventSubmitInput.identityStreamId

intent?
optional intent?: ChannelEventIntent;
Inherited from

ChannelEventSubmitInput.intent

kind?
optional kind?: ChannelEventNature;
Inherited from

ChannelEventSubmitInput.kind

message?
optional message?: string;
Inherited from

ChannelEventSubmitInput.message

metadata?
optional metadata?: Record<string, unknown>;
Inherited from

ChannelEventSubmitInput.metadata

nature?
optional nature?: ChannelEventNature;
Inherited from

ChannelEventSubmitInput.nature

occurredAt?
optional occurredAt?: string;
Inherited from

ChannelEventSubmitInput.occurredAt

payload?
optional payload?: TPayload;
Inherited from

ChannelEventSubmitInput.payload

provider?
optional provider?: string;
Inherited from

ChannelEventSubmitInput.provider

providerObject?
optional providerObject?: unknown;
Inherited from

ChannelEventSubmitInput.providerObject

providerPackageId?
optional providerPackageId?: string;
Inherited from

ChannelEventSubmitInput.providerPackageId

raw?
optional raw?: TRawPayload;
Inherited from

ChannelEventSubmitInput.raw

receivedAt?
optional receivedAt?: string;
Inherited from

ChannelEventSubmitInput.receivedAt

sequence?
optional sequence?: string | number;
Inherited from

ChannelEventSubmitInput.sequence

signal?
optional signal?: AbortSignal;
Inherited from

ChannelEventSubmitInput.signal

source?
optional source?: ChannelEventSourceEvidence<TRawPayload>;
Inherited from

ChannelEventSubmitInput.source

sourceId?
optional sourceId?: string;
Inherited from

ChannelEventSubmitInput.sourceId

sourceType?
optional sourceType?:
  | "application"
  | "provider-adapter"
  | "schedule-adapter"
  | "operator-surface";
Inherited from

ChannelEventSubmitInput.sourceType

status?
optional status?: string;
Inherited from

ChannelEventSubmitInput.status

streamId?
optional streamId?: string;
Inherited from

ChannelEventSubmitInput.streamId

subject?
optional subject?: string;
Inherited from

ChannelEventSubmitInput.subject

summary?
optional summary?: string;
Inherited from

ChannelEventSubmitInput.summary

text?
optional text?: string;
Inherited from

ChannelEventSubmitInput.text

turn?
optional turn?: TTurn;
Inherited from

ChannelEventSubmitInput.turn

verified?
optional verified?: boolean;
Inherited from

ChannelEventSubmitInput.verified

Methods

onAssistantTextDelta()?
optional onAssistantTextDelta(textDelta): void | Promise<void>;
Parameters
Parameter Type
textDelta string
Returns

void | Promise\<void>

Inherited from

ChannelEventSubmitInput.onAssistantTextDelta


ChatActivity

Properties

id
id: string;
label
label: string;
status
status: "running" | "done";

ChatActivityLabelInput

Properties

defaultLabel
defaultLabel: string;
event
event: RuntimeEvent;
kind
kind: ChatActivityLabelKind;
name?
optional name?: string;

ChatEventReducerOptions

Properties

formatActivityLabel?
optional formatActivityLabel?: ChatActivityLabelFormatter;

ChatEventReducerState

Properties

activities
activities: ChatActivity[];
lastOffset
lastOffset: number;
messages
messages: ChatMessage[];
pendingMessageRole?
optional pendingMessageRole?: "user" | "assistant";
prompts
prompts: PromptState[];

ChatMessage

Properties

id
id: string;
offset?
optional offset?: number;
role
role: "user" | "assistant";
segments?
optional segments?: MessageSegment[];
status
status: "failed" | "aborted" | "sending" | "streaming" | "sent";
text
text: string;

ChatWidgetProps

Properties

agentId?
optional agentId?: string;
appearance?
optional appearance?: AppearanceConfiguration;
channel?
optional channel?: ConversationChannelInput;
client
client: CognideskClient;
conversationId?
optional conversationId?: string;
formatActivityLabel?
optional formatActivityLabel?: ChatActivityLabelFormatter;
initialContext?
optional initialContext?: unknown;
placeholder?
optional placeholder?: string;
sendLabel?
optional sendLabel?: string;
title?
optional title?: ReactNode;
widgets?
optional widgets?: WidgetRendererMap;

Methods

onConversationCreated()?
optional onConversationCreated(conversationId): void;
Parameters
Parameter Type
conversationId string
Returns

void

onWidgetSubmit()?
optional onWidgetSubmit(args): void;
Parameters
Parameter Type
args { kind: string; output: unknown; promptId: string; }
args.kind string
args.output unknown
args.promptId string
Returns

void


CognideskClient

Methods

closeConversation()
closeConversation(conversationId, input?): Promise<{
  conversation: {
     agentId: string;
     channel?: ConversationChannel;
     context: unknown;
     createdAt: string;
     id: string;
     lifecycle: string;
     updatedAt: string;
  };
}>;
Parameters
Parameter Type
conversationId string
input? { reason?: string; }
input.reason? string
Returns

Promise\<{ conversation: { agentId: string; channel?: ConversationChannel; context: unknown; createdAt: string; id: string; lifecycle: string; updatedAt: string; }; }>

compactConversation()
compactConversation(conversationId, input?): Promise<{
  events: RuntimeEvent[];
  snapshot: {
     activeJourneyId?: string;
     activeStateIds: string[];
     compactionSummary?: unknown;
     conversationId: string;
     definitionHash?: string;
     journeyContext?: unknown;
     lifecycle: string;
     updatedAt: string;
  };
  summary: unknown;
}>;
Parameters
Parameter Type
conversationId string
input? { fromOffset?: number; schemaVersion?: string; toOffset?: number; }
input.fromOffset? number
input.schemaVersion? string
input.toOffset? number
Returns

Promise\<{ events: RuntimeEvent[]; snapshot: { activeJourneyId?: string; activeStateIds: string[]; compactionSummary?: unknown; conversationId: string; definitionHash?: string; journeyContext?: unknown; lifecycle: string; updatedAt: string; }; summary: unknown; }>

createConversation()
createConversation(input?): Promise<CreateConversationResult>;
Parameters
Parameter Type
input? CreateConversationInput
Returns

Promise\<CreateConversationResult>

emitCustomEvent()
emitCustomEvent(
   conversationId,
   eventName,
   input?): Promise<{
  event: RuntimeEvent;
}>;
Parameters
Parameter Type
conversationId string
eventName string
input? { payload?: unknown; }
input.payload? unknown
Returns

Promise\<{ event: RuntimeEvent; }>

emitGeneratedPreamble()
emitGeneratedPreamble(conversationId, input?): Promise<{
  events: RuntimeEvent[];
  text: string;
}>;
Parameters
Parameter Type
conversationId string
input? { maxWords?: number; purpose?: string; }
input.maxWords? number
input.purpose? string
Returns

Promise\<{ events: RuntimeEvent[]; text: string; }>

emitIntermediateMessage()
emitIntermediateMessage(conversationId, input): Promise<{
  events: RuntimeEvent[];
}>;
Parameters
Parameter Type
conversationId string
input { text: string; visibleToModel?: boolean; }
input.text string
input.visibleToModel? boolean
Returns

Promise\<{ events: RuntimeEvent[]; }>

emitJourneyEvent()
emitJourneyEvent(
   conversationId,
   eventName,
   input?): Promise<{
  event: RuntimeEvent;
  events: RuntimeEvent[];
  snapshot: {
     activeJourneyId?: string;
     activeStateIds: string[];
     compactionSummary?: unknown;
     conversationId: string;
     definitionHash?: string;
     journeyContext?: unknown;
     lifecycle: string;
     updatedAt: string;
  };
}>;
Parameters
Parameter Type
conversationId string
eventName string
input? { app?: unknown; payload?: unknown; routing?: "none" | "activeJourneyOnly" | "full" | "targeted"; target?: { journeyId?: string; stateId?: string; }; }
input.app? unknown
input.payload? unknown
input.routing? "none" | "activeJourneyOnly" | "full" | "targeted"
input.target? { journeyId?: string; stateId?: string; }
input.target.journeyId? string
input.target.stateId? string
Returns

Promise\<{ event: RuntimeEvent; events: RuntimeEvent[]; snapshot: { activeJourneyId?: string; activeStateIds: string[]; compactionSummary?: unknown; conversationId: string; definitionHash?: string; journeyContext?: unknown; lifecycle: string; updatedAt: string; }; }>

finalizeVoiceTurn()
finalizeVoiceTurn(input): Promise<HandleChannelEventResult<unknown>>;
Parameters
Parameter Type
input VoiceTurnChannelEventInput
Returns

Promise\<HandleChannelEventResult\<unknown>>

getSnapshot()
getSnapshot(conversationId): Promise<RuntimeSnapshotResult>;
Parameters
Parameter Type
conversationId string
Returns

Promise\<RuntimeSnapshotResult>

handleChannelEvent()
handleChannelEvent(input): Promise<HandleChannelEventResult<unknown>>;
Parameters
Parameter Type
input ChannelEventSubmitInput
Returns

Promise\<HandleChannelEventResult\<unknown>>

listConversations()
listConversations(options?): Promise<ListConversationsResult>;
Parameters
Parameter Type
options? ListConversationsOptions
Returns

Promise\<ListConversationsResult>

listEvents()
listEvents(conversationId, options?): Promise<{
  events: RuntimeEvent[];
}>;
Parameters
Parameter Type
conversationId string
options? { afterOffset?: number; }
options.afterOffset? number
Returns

Promise\<{ events: RuntimeEvent[]; }>

receiveMessage()
receiveMessage(input): Promise<HandleChannelEventResult<unknown>>;
Parameters
Parameter Type
input ChannelMessageEventInput
Returns

Promise\<HandleChannelEventResult\<unknown>>

recordChannelOutputResolution()
recordChannelOutputResolution(input): Promise<HandleChannelEventResult<unknown>>;
Parameters
Parameter Type
input ChannelOutputResolutionEventInput
Returns

Promise\<HandleChannelEventResult\<unknown>>

recordProviderUpdate()
recordProviderUpdate(input): Promise<HandleChannelEventResult<unknown>>;
Parameters
Parameter Type
input ProviderObjectChannelEventInput
Returns

Promise\<HandleChannelEventResult\<unknown>>

replayConversation()
replayConversation(conversationId, options?): Promise<ReplayConversationResult>;
Parameters
Parameter Type
conversationId string
options? { afterOffset?: number; }
options.afterOffset? number
Returns

Promise\<ReplayConversationResult>

requestChannelHandoff()
requestChannelHandoff(input): Promise<HandleChannelEventResult<unknown>>;
Parameters
Parameter Type
input ChannelHandoffEventInput
Returns

Promise\<HandleChannelEventResult\<unknown>>

requestChannelHandoffReview()
requestChannelHandoffReview(input): Promise<HandleChannelEventResult<unknown>>;
Parameters
Parameter Type
input ChannelHandoffReviewEventInput
Returns

Promise\<HandleChannelEventResult\<unknown>>

requestHandoff()
requestHandoff(conversationId, input): Promise<{
  conversation: {
     agentId: string;
     channel?: ConversationChannel;
     context: unknown;
     createdAt: string;
     id: string;
     lifecycle: string;
     updatedAt: string;
  };
  event: RuntimeEvent;
}>;
Parameters
Parameter Type
conversationId string
input { payload?: unknown; reason: string; summary?: string; }
input.payload? unknown
input.reason string
input.summary? string
Returns

Promise\<{ conversation: { agentId: string; channel?: ConversationChannel; context: unknown; createdAt: string; id: string; lifecycle: string; updatedAt: string; }; event: RuntimeEvent; }>

requestOutboundContact()
requestOutboundContact(input): Promise<HandleChannelEventResult<unknown>>;
Parameters
Parameter Type
input OutboundContactChannelEventInput
Returns

Promise\<HandleChannelEventResult\<unknown>>

resolveChannelOutput()
resolveChannelOutput(input): Promise<ResolveChannelOutputResult<unknown>>;
Parameters
Parameter Type
input ResolveChannelOutputInput
Returns

Promise\<ResolveChannelOutputResult\<unknown>>

resumeConversation()
resumeConversation(conversationId, input?): Promise<{
  conversation: {
     agentId: string;
     channel?: ConversationChannel;
     context: unknown;
     createdAt: string;
     id: string;
     lifecycle: string;
     updatedAt: string;
  };
  event: RuntimeEvent;
}>;
Parameters
Parameter Type
conversationId string
input? { payload?: unknown; reason?: string; }
input.payload? unknown
input.reason? string
Returns

Promise\<{ conversation: { agentId: string; channel?: ConversationChannel; context: unknown; createdAt: string; id: string; lifecycle: string; updatedAt: string; }; event: RuntimeEvent; }>

sendMessage()
sendMessage(
   conversationId,
   message,
options?): Promise<SendMessageResult>;
Parameters
Parameter Type
conversationId string
message string
options? { app?: unknown; channel?: ConversationChannelInput; turn?: unknown; }
options.app? unknown
options.channel? ConversationChannelInput
options.turn? unknown
Returns

Promise\<SendMessageResult>

startVoiceConversation()
startVoiceConversation(input): Promise<StartVoiceResult>;
Parameters
Parameter Type
input { agentId?: string; app?: unknown; client?: VoiceStartClientHints; context?: unknown; id?: string; }
input.agentId? string
input.app? unknown
input.client? VoiceStartClientHints
input.context? unknown
input.id? string
Returns

Promise\<StartVoiceResult>

startVoiceSegment()
startVoiceSegment(conversationId, input?): Promise<StartVoiceResult>;
Parameters
Parameter Type
conversationId string
input? { app?: unknown; client?: VoiceStartClientHints; }
input.app? unknown
input.client? VoiceStartClientHints
Returns

Promise\<StartVoiceResult>

streamEvents()
streamEvents(
   conversationId,
   handlers,
   options?): () => void;
Parameters
Parameter Type
conversationId string
handlers { onError?: void; onEvent: void; }
handlers.onError?
handlers.onEvent?
options? CognideskStreamEventsOptions
Returns

() => void

submitScheduledEvent()
submitScheduledEvent(input): Promise<HandleChannelEventResult<unknown>>;
Parameters
Parameter Type
input ScheduledChannelEventInput
Returns

Promise\<HandleChannelEventResult\<unknown>>

submitWidget()
submitWidget(conversationId, input): Promise<{
  event: RuntimeEvent;
}>;
Parameters
Parameter Type
conversationId string
input { output: unknown; promptId: string; widgetKind: string; }
input.output unknown
input.promptId string
input.widgetKind string
Returns

Promise\<{ event: RuntimeEvent; }>


CognideskClientOptions

Properties

baseUrl
baseUrl: string;
createEventSource?
optional createEventSource?: CognideskEventSourceFactory;

Use a factory for EventSource implementations that need constructor options beyond the browser-native EventSourceInit, such as auth headers.

credentials?
optional credentials?: RequestCredentials;

Shared credentials mode for fetch requests. "include" also enables EventSource withCredentials unless streamEvents overrides it.

EventSource?
optional EventSource?: (url, eventSourceInitDict?) => EventSource;
Parameters
Parameter Type
url string | URL
eventSourceInitDict? EventSourceInit
Returns

EventSource

eventSourceOptions?
optional eventSourceOptions?: CognideskEventSourceOptions;
fetch?
optional fetch?: {
  (input, init?): Promise<Response>;
  (input, init?): Promise<Response>;
};
Call Signature
(input, init?): Promise<Response>;

MDN Reference

Parameters
Parameter Type
input URL | RequestInfo
init? RequestInit
Returns

Promise\<Response>

Call Signature
(input, init?): Promise<Response>;

MDN Reference

Parameters
Parameter Type
input string | Request | URL
init? RequestInit
Returns

Promise\<Response>

headers?
optional headers?: HeadersInit;

Shared headers for fetch requests. These are also passed to streamEvents factories/polyfills that support header-based EventSource authentication.

requestOptions?
optional requestOptions?:
  | CognideskRequestOptions
  | CognideskRequestOptionsResolver;

Shared request options, or a resolver for per-operation options such as auth headers, AbortSignal, cache mode, or credentials.


CognideskEventSourceOptions

Extends

  • EventSourceInit

Extended by

Properties

headers?
optional headers?: HeadersInit;

CognideskRequestContext

Properties

conversationId?
optional conversationId?: string;
method
method: "GET" | "POST";
operation
operation: CognideskRequestOperation;
url
url: string;

CognideskStreamEventsOptions

Extends

Properties

afterOffset?
optional afterOffset?: number;
createEventSource?
optional createEventSource?: CognideskEventSourceFactory;
EventSource?
optional EventSource?: (url, eventSourceInitDict?) => EventSource;
Parameters
Parameter Type
url string | URL
eventSourceInitDict? EventSourceInit
Returns

EventSource

headers?
optional headers?: HeadersInit;
Inherited from

CognideskEventSourceOptions.headers


CreateConversationInput

Properties

agentId?
optional agentId?: string;
channel?
optional channel?: ConversationChannelInput;
context?
optional context?: unknown;
id?
optional id?: string;

CreateConversationResult

Properties

conversation
conversation: {
  agentId: string;
  channel?: ConversationChannel;
  context: unknown;
  createdAt: string;
  id: string;
  lifecycle: string;
  updatedAt: string;
};
agentId
agentId: string;
channel?
optional channel?: ConversationChannel;
context
context: unknown;
createdAt
createdAt: string;
id
id: string;
lifecycle
lifecycle: string;
updatedAt
updatedAt: string;

ListConversationsOptions

Properties

after?
optional after?: ConversationListCursor;
afterUpdatedAt?
optional afterUpdatedAt?: string;

Timestamp-only range filter. Use after for lossless cursor pagination.

agentId?
optional agentId?: string;
before?
optional before?: ConversationListCursor;
beforeUpdatedAt?
optional beforeUpdatedAt?: string;

Timestamp-only range filter. Use before for lossless cursor pagination.

limit?
optional limit?: number;

ListConversationsResult

Properties

conversations
conversations: {
  agentId: string;
  channel?: ConversationChannel;
  context: unknown;
  createdAt: string;
  id: string;
  lifecycle: string;
  updatedAt: string;
}[];
agentId
agentId: string;
channel?
optional channel?: ConversationChannel;
context
context: unknown;
createdAt
createdAt: string;
id
id: string;
lifecycle
lifecycle: string;
updatedAt
updatedAt: string;

OutboundContactChannelEventInput

Extends

Type Parameters

Type Parameter Default type
TPayload NormalizedChannelPayloadInput
TRawPayload unknown
TTurn unknown

Properties

actor?
optional actor?: ChannelEventActorInput;
Inherited from

ChannelEventSubmitInput.actor

agentId?
optional agentId?: string;
Inherited from

ChannelEventSubmitInput.agentId

app?
optional app?: unknown;
Inherited from

ChannelEventSubmitInput.app

attachments?
optional attachments?: unknown[];
Inherited from

ChannelEventSubmitInput.attachments

binding?
optional binding?: ChannelEventBindingInput;
Inherited from

ChannelEventSubmitInput.binding

body?
optional body?: string;
Inherited from

ChannelEventSubmitInput.body

channel
channel: ConversationChannelInput;
Overrides

ChannelEventSubmitInput.channel

conversationContext?
optional conversationContext?: unknown;
Inherited from

ChannelEventSubmitInput.conversationContext

conversationId?
optional conversationId?: string;
Inherited from

ChannelEventSubmitInput.conversationId

createConversation?
optional createConversation?: CreateRuntimeConversationInput;
Inherited from

ChannelEventSubmitInput.createConversation

dedupeKey?
optional dedupeKey?: string;
Inherited from

ChannelEventSubmitInput.dedupeKey

deliveryId?
optional deliveryId?: string;
Inherited from

ChannelEventSubmitInput.deliveryId

direction?
optional direction?: "outbound" | "inbound" | "internal";
Inherited from

ChannelEventSubmitInput.direction

event?
optional event?: ChannelEventShortcutEnvelope<TPayload, TRawPayload>;
Inherited from

ChannelEventSubmitInput.event

eventId?
optional eventId?: string;
Inherited from

ChannelEventSubmitInput.eventId

externalObjectIds?
optional externalObjectIds?: Record<string, string>;
Inherited from

ChannelEventSubmitInput.externalObjectIds

handling?
optional handling?: ChannelEventHandlingInput<TTurn>;
Inherited from

ChannelEventSubmitInput.handling

id?
optional id?: string;
Inherited from

ChannelEventSubmitInput.id

idempotencyKey?
optional idempotencyKey?: string;
Inherited from

ChannelEventSubmitInput.idempotencyKey

identity?
optional identity?: ChannelEventIdentity;
Inherited from

ChannelEventSubmitInput.identity

identityKey?
optional identityKey?: string;
Inherited from

ChannelEventSubmitInput.identityKey

identityMetadata?
optional identityMetadata?: Record<string, unknown>;
Inherited from

ChannelEventSubmitInput.identityMetadata

identityStreamId?
optional identityStreamId?: string;
Inherited from

ChannelEventSubmitInput.identityStreamId

intent?
optional intent?: ChannelEventIntent;
Inherited from

ChannelEventSubmitInput.intent

kind?
optional kind?: ChannelEventNature;
Inherited from

ChannelEventSubmitInput.kind

message?
optional message?: string;
Inherited from

ChannelEventSubmitInput.message

metadata?
optional metadata?: Record<string, unknown>;
Inherited from

ChannelEventSubmitInput.metadata

nature?
optional nature?: ChannelEventNature;
Inherited from

ChannelEventSubmitInput.nature

occurredAt?
optional occurredAt?: string;
Inherited from

ChannelEventSubmitInput.occurredAt

payload?
optional payload?: TPayload;
Inherited from

ChannelEventSubmitInput.payload

provider?
optional provider?: string;
Inherited from

ChannelEventSubmitInput.provider

providerObject?
optional providerObject?: unknown;
Inherited from

ChannelEventSubmitInput.providerObject

providerPackageId?
optional providerPackageId?: string;
Inherited from

ChannelEventSubmitInput.providerPackageId

raw?
optional raw?: TRawPayload;
Inherited from

ChannelEventSubmitInput.raw

receivedAt?
optional receivedAt?: string;
Inherited from

ChannelEventSubmitInput.receivedAt

sequence?
optional sequence?: string | number;
Inherited from

ChannelEventSubmitInput.sequence

signal?
optional signal?: AbortSignal;
Inherited from

ChannelEventSubmitInput.signal

source?
optional source?: ChannelEventSourceEvidence<TRawPayload>;
Inherited from

ChannelEventSubmitInput.source

sourceId?
optional sourceId?: string;
Inherited from

ChannelEventSubmitInput.sourceId

sourceType?
optional sourceType?:
  | "application"
  | "provider-adapter"
  | "schedule-adapter"
  | "operator-surface";
Inherited from

ChannelEventSubmitInput.sourceType

status?
optional status?: string;
Inherited from

ChannelEventSubmitInput.status

streamId?
optional streamId?: string;
Inherited from

ChannelEventSubmitInput.streamId

subject?
optional subject?: string;
Inherited from

ChannelEventSubmitInput.subject

summary?
optional summary?: string;
Inherited from

ChannelEventSubmitInput.summary

text?
optional text?: string;
Inherited from

ChannelEventSubmitInput.text

turn?
optional turn?: TTurn;
Inherited from

ChannelEventSubmitInput.turn

verified?
optional verified?: boolean;
Inherited from

ChannelEventSubmitInput.verified

Methods

onAssistantTextDelta()?
optional onAssistantTextDelta(textDelta): void | Promise<void>;
Parameters
Parameter Type
textDelta string
Returns

void | Promise\<void>

Inherited from

ChannelEventSubmitInput.onAssistantTextDelta


PromptState

Properties

displayOffset?
optional displayOffset?: number;
input
input: unknown;
kind
kind: string;
offset
offset: number;
output?
optional output?: unknown;
promptId
promptId: string;
status
status: "open" | "submitted";

ProviderObjectChannelEventInput

Extends

Type Parameters

Type Parameter Default type
TPayload NormalizedChannelPayloadInput
TRawPayload unknown
TTurn unknown

Properties

actor?
optional actor?: ChannelEventActorInput;
Inherited from

ChannelEventSubmitInput.actor

agentId?
optional agentId?: string;
Inherited from

ChannelEventSubmitInput.agentId

app?
optional app?: unknown;
Inherited from

ChannelEventSubmitInput.app

attachments?
optional attachments?: unknown[];
Inherited from

ChannelEventSubmitInput.attachments

binding?
optional binding?: ChannelEventBindingInput;
Inherited from

ChannelEventSubmitInput.binding

body?
optional body?: string;
Inherited from

ChannelEventSubmitInput.body

channel
channel: ConversationChannelInput;
Overrides

ChannelEventSubmitInput.channel

conversationContext?
optional conversationContext?: unknown;
Inherited from

ChannelEventSubmitInput.conversationContext

conversationId?
optional conversationId?: string;
Inherited from

ChannelEventSubmitInput.conversationId

createConversation?
optional createConversation?: CreateRuntimeConversationInput;
Inherited from

ChannelEventSubmitInput.createConversation

dedupeKey?
optional dedupeKey?: string;
Inherited from

ChannelEventSubmitInput.dedupeKey

deliveryId?
optional deliveryId?: string;
Inherited from

ChannelEventSubmitInput.deliveryId

direction?
optional direction?: "outbound" | "inbound" | "internal";
Inherited from

ChannelEventSubmitInput.direction

event?
optional event?: ChannelEventShortcutEnvelope<TPayload, TRawPayload>;
Inherited from

ChannelEventSubmitInput.event

eventId?
optional eventId?: string;
Inherited from

ChannelEventSubmitInput.eventId

externalObjectIds?
optional externalObjectIds?: Record<string, string>;
Inherited from

ChannelEventSubmitInput.externalObjectIds

handling?
optional handling?: ChannelEventHandlingInput<TTurn>;
Inherited from

ChannelEventSubmitInput.handling

id?
optional id?: string;
Inherited from

ChannelEventSubmitInput.id

idempotencyKey?
optional idempotencyKey?: string;
Inherited from

ChannelEventSubmitInput.idempotencyKey

identity?
optional identity?: ChannelEventIdentity;
Inherited from

ChannelEventSubmitInput.identity

identityKey?
optional identityKey?: string;
Inherited from

ChannelEventSubmitInput.identityKey

identityMetadata?
optional identityMetadata?: Record<string, unknown>;
Inherited from

ChannelEventSubmitInput.identityMetadata

identityStreamId?
optional identityStreamId?: string;
Inherited from

ChannelEventSubmitInput.identityStreamId

intent?
optional intent?: ChannelEventIntent;
Inherited from

ChannelEventSubmitInput.intent

kind?
optional kind?: ChannelEventNature;
Inherited from

ChannelEventSubmitInput.kind

message?
optional message?: string;
Inherited from

ChannelEventSubmitInput.message

metadata?
optional metadata?: Record<string, unknown>;
Inherited from

ChannelEventSubmitInput.metadata

nature?
optional nature?: ChannelEventNature;
Inherited from

ChannelEventSubmitInput.nature

occurredAt?
optional occurredAt?: string;
Inherited from

ChannelEventSubmitInput.occurredAt

payload?
optional payload?: TPayload;
Inherited from

ChannelEventSubmitInput.payload

provider?
optional provider?: string;
Inherited from

ChannelEventSubmitInput.provider

providerObject?
optional providerObject?: unknown;
Inherited from

ChannelEventSubmitInput.providerObject

providerPackageId?
optional providerPackageId?: string;
Inherited from

ChannelEventSubmitInput.providerPackageId

raw?
optional raw?: TRawPayload;
Inherited from

ChannelEventSubmitInput.raw

receivedAt?
optional receivedAt?: string;
Inherited from

ChannelEventSubmitInput.receivedAt

sequence?
optional sequence?: string | number;
Inherited from

ChannelEventSubmitInput.sequence

signal?
optional signal?: AbortSignal;
Inherited from

ChannelEventSubmitInput.signal

source?
optional source?: ChannelEventSourceEvidence<TRawPayload>;
Inherited from

ChannelEventSubmitInput.source

sourceId?
optional sourceId?: string;
Inherited from

ChannelEventSubmitInput.sourceId

sourceType?
optional sourceType?:
  | "application"
  | "provider-adapter"
  | "schedule-adapter"
  | "operator-surface";
Inherited from

ChannelEventSubmitInput.sourceType

status?
optional status?: string;
Inherited from

ChannelEventSubmitInput.status

streamId?
optional streamId?: string;
Inherited from

ChannelEventSubmitInput.streamId

subject?
optional subject?: string;
Inherited from

ChannelEventSubmitInput.subject

summary?
optional summary?: string;
Inherited from

ChannelEventSubmitInput.summary

text?
optional text?: string;
Inherited from

ChannelEventSubmitInput.text

turn?
optional turn?: TTurn;
Inherited from

ChannelEventSubmitInput.turn

verified?
optional verified?: boolean;
Inherited from

ChannelEventSubmitInput.verified

Methods

onAssistantTextDelta()?
optional onAssistantTextDelta(textDelta): void | Promise<void>;
Parameters
Parameter Type
textDelta string
Returns

void | Promise\<void>

Inherited from

ChannelEventSubmitInput.onAssistantTextDelta


ReplayConversationResult

Properties

conversation
conversation: {
  agentId: string;
  channel?: ConversationChannel;
  context: unknown;
  createdAt: string;
  id: string;
  lifecycle: string;
  updatedAt: string;
};
agentId
agentId: string;
channel?
optional channel?: ConversationChannel;
context
context: unknown;
createdAt
createdAt: string;
id
id: string;
lifecycle
lifecycle: string;
updatedAt
updatedAt: string;
events
events: RuntimeEvent[];
messages
messages: {
  aborted: boolean;
  id: string;
  intermediate: boolean;
  offset: number;
  reason?: string;
  role: "user" | "assistant";
  segments?: MessageSegment[];
  text: string;
}[];
aborted
aborted: boolean;
id
id: string;
intermediate
intermediate: boolean;
offset
offset: number;
reason?
optional reason?: string;
role
role: "user" | "assistant";
segments?
optional segments?: MessageSegment[];
text
text: string;
openPrompts
openPrompts: {
  input: unknown;
  offset: number;
  promptId: string;
  widgetKind: string;
}[];
input
input: unknown;
offset
offset: number;
promptId
promptId: string;
widgetKind
widgetKind: string;
snapshot
snapshot: {
  activeJourneyId?: string;
  activeStateIds: string[];
  compactionSummary?: unknown;
  conversationId: string;
  definitionHash?: string;
  journeyContext?: unknown;
  lifecycle: string;
  updatedAt: string;
};
activeJourneyId?
optional activeJourneyId?: string;
activeStateIds
activeStateIds: string[];
compactionSummary?
optional compactionSummary?: unknown;
conversationId
conversationId: string;
definitionHash?
optional definitionHash?: string;
journeyContext?
optional journeyContext?: unknown;
lifecycle
lifecycle: string;
updatedAt
updatedAt: string;

RuntimeSnapshotResult

Properties

snapshot
snapshot: {
  activeJourneyId?: string;
  activeStateIds: string[];
  compactionSummary?: unknown;
  conversationId: string;
  definitionHash?: string;
  journeyContext?: unknown;
  lifecycle: string;
  updatedAt: string;
};
activeJourneyId?
optional activeJourneyId?: string;
activeStateIds
activeStateIds: string[];
compactionSummary?
optional compactionSummary?: unknown;
conversationId
conversationId: string;
definitionHash?
optional definitionHash?: string;
journeyContext?
optional journeyContext?: unknown;
lifecycle
lifecycle: string;
updatedAt
updatedAt: string;

ScheduledChannelEventInput

Extends

Type Parameters

Type Parameter Default type
TPayload NormalizedChannelPayloadInput
TRawPayload unknown
TTurn unknown

Properties

actor?
optional actor?: ChannelEventActorInput;
Inherited from

ChannelEventSubmitInput.actor

agentId?
optional agentId?: string;
Inherited from

ChannelEventSubmitInput.agentId

app?
optional app?: unknown;
Inherited from

ChannelEventSubmitInput.app

attachments?
optional attachments?: unknown[];
Inherited from

ChannelEventSubmitInput.attachments

binding?
optional binding?: ChannelEventBindingInput;
Inherited from

ChannelEventSubmitInput.binding

body?
optional body?: string;
Inherited from

ChannelEventSubmitInput.body

channel
channel: ConversationChannelInput;
Overrides

ChannelEventSubmitInput.channel

conversationContext?
optional conversationContext?: unknown;
Inherited from

ChannelEventSubmitInput.conversationContext

conversationId?
optional conversationId?: string;
Inherited from

ChannelEventSubmitInput.conversationId

createConversation?
optional createConversation?: CreateRuntimeConversationInput;
Inherited from

ChannelEventSubmitInput.createConversation

dedupeKey?
optional dedupeKey?: string;
Inherited from

ChannelEventSubmitInput.dedupeKey

deliveryId?
optional deliveryId?: string;
Inherited from

ChannelEventSubmitInput.deliveryId

direction?
optional direction?: "outbound" | "inbound" | "internal";
Inherited from

ChannelEventSubmitInput.direction

event?
optional event?: ChannelEventShortcutEnvelope<TPayload, TRawPayload>;
Inherited from

ChannelEventSubmitInput.event

eventId?
optional eventId?: string;
Inherited from

ChannelEventSubmitInput.eventId

externalObjectIds?
optional externalObjectIds?: Record<string, string>;
Inherited from

ChannelEventSubmitInput.externalObjectIds

handling?
optional handling?: ChannelEventHandlingInput<TTurn>;
Inherited from

ChannelEventSubmitInput.handling

id?
optional id?: string;
Inherited from

ChannelEventSubmitInput.id

idempotencyKey?
optional idempotencyKey?: string;
Inherited from

ChannelEventSubmitInput.idempotencyKey

identity?
optional identity?: ChannelEventIdentity;
Inherited from

ChannelEventSubmitInput.identity

identityKey?
optional identityKey?: string;
Inherited from

ChannelEventSubmitInput.identityKey

identityMetadata?
optional identityMetadata?: Record<string, unknown>;
Inherited from

ChannelEventSubmitInput.identityMetadata

identityStreamId?
optional identityStreamId?: string;
Inherited from

ChannelEventSubmitInput.identityStreamId

intent?
optional intent?: ChannelEventIntent;
Inherited from

ChannelEventSubmitInput.intent

kind?
optional kind?: ChannelEventNature;
Inherited from

ChannelEventSubmitInput.kind

message?
optional message?: string;
Inherited from

ChannelEventSubmitInput.message

metadata?
optional metadata?: Record<string, unknown>;
Inherited from

ChannelEventSubmitInput.metadata

nature?
optional nature?: ChannelEventNature;
Inherited from

ChannelEventSubmitInput.nature

occurredAt?
optional occurredAt?: string;
Inherited from

ChannelEventSubmitInput.occurredAt

payload?
optional payload?: TPayload;
Inherited from

ChannelEventSubmitInput.payload

provider?
optional provider?: string;
Inherited from

ChannelEventSubmitInput.provider

providerObject?
optional providerObject?: unknown;
Inherited from

ChannelEventSubmitInput.providerObject

providerPackageId?
optional providerPackageId?: string;
Inherited from

ChannelEventSubmitInput.providerPackageId

raw?
optional raw?: TRawPayload;
Inherited from

ChannelEventSubmitInput.raw

receivedAt?
optional receivedAt?: string;
Inherited from

ChannelEventSubmitInput.receivedAt

sequence?
optional sequence?: string | number;
Inherited from

ChannelEventSubmitInput.sequence

signal?
optional signal?: AbortSignal;
Inherited from

ChannelEventSubmitInput.signal

source?
optional source?: ChannelEventSourceEvidence<TRawPayload>;
Inherited from

ChannelEventSubmitInput.source

sourceId?
optional sourceId?: string;
Inherited from

ChannelEventSubmitInput.sourceId

sourceType?
optional sourceType?:
  | "application"
  | "provider-adapter"
  | "schedule-adapter"
  | "operator-surface";
Inherited from

ChannelEventSubmitInput.sourceType

status?
optional status?: string;
Inherited from

ChannelEventSubmitInput.status

streamId?
optional streamId?: string;
Inherited from

ChannelEventSubmitInput.streamId

subject?
optional subject?: string;
Inherited from

ChannelEventSubmitInput.subject

summary?
optional summary?: string;
Inherited from

ChannelEventSubmitInput.summary

text?
optional text?: string;
Inherited from

ChannelEventSubmitInput.text

turn?
optional turn?: TTurn;
Inherited from

ChannelEventSubmitInput.turn

verified?
optional verified?: boolean;
Inherited from

ChannelEventSubmitInput.verified

Methods

onAssistantTextDelta()?
optional onAssistantTextDelta(textDelta): void | Promise<void>;
Parameters
Parameter Type
textDelta string
Returns

void | Promise\<void>

Inherited from

ChannelEventSubmitInput.onAssistantTextDelta


SendMessageResult

Properties

activeJourneyId?
optional activeJourneyId?: string;
events
events: RuntimeEvent[];
text
text: string;

StartVoiceResult

Properties

channelSegment
channelSegment: {
  channel: "voice";
  conversationId: string;
  endedAt?: string;
  id: string;
  startedAt: string;
};
channel
channel: "voice";
conversationId
conversationId: string;
endedAt?
optional endedAt?: string;
id
id: string;
startedAt
startedAt: string;
connection
connection: {
  adapter: string;
  channelSegmentId: string;
  expiresAt?: string;
  id: string;
  provider?: string;
  providerSessionId?: string;
  status: string;
};
adapter
adapter: string;
channelSegmentId
channelSegmentId: string;
expiresAt?
optional expiresAt?: string;
id
id: string;
provider?
optional provider?: string;
providerSessionId?
optional providerSessionId?: string;
status
status: string;
conversation
conversation: {
  agentId: string;
  channel?: ConversationChannel;
  context: unknown;
  createdAt: string;
  id: string;
  lifecycle: string;
  updatedAt: string;
};
agentId
agentId: string;
channel?
optional channel?: ConversationChannel;
context
context: unknown;
createdAt
createdAt: string;
id
id: string;
lifecycle
lifecycle: string;
updatedAt
updatedAt: string;
events
events: RuntimeEvent[];
eventsUrl?
optional eventsUrl?: string;
socket
socket: {
  expiresAt: string;
  protocol: "cognidesk.voice.v1";
  token: string;
  url: string;
};
expiresAt
expiresAt: string;
protocol
protocol: "cognidesk.voice.v1";
token
token: string;
url
url: string;

Properties

id
id: string;
label
label: string;
url?
optional url?: string;

UseChatOptions

Properties

agentId?
optional agentId?: string;
channel?
optional channel?: ConversationChannelInput;
client
client: CognideskClient;
conversationId?
optional conversationId?: string;
formatActivityLabel?
optional formatActivityLabel?: ChatActivityLabelFormatter;
initialContext?
optional initialContext?: unknown;

Methods

onConversationCreated()?
optional onConversationCreated(conversationId): void;
Parameters
Parameter Type
conversationId string
Returns

void


UseVoiceOptions

Properties

agentId?
optional agentId?: string;
app?
optional app?: unknown;
audioContext?
optional audioContext?: AudioContext;
client
client: CognideskClient;
conversationId?
optional conversationId?: string;
initialContext?
optional initialContext?: unknown;
mediaConstraints?
optional mediaConstraints?: MediaStreamConstraints;
WebSocket?
optional WebSocket?: (url, protocols?) => WebSocket;
Parameters
Parameter Type
url string | URL
protocols? string | string[]
Returns

WebSocket

Methods

onConnected()?
optional onConnected(result): void;
Parameters
Parameter Type
result StartVoiceResult
Returns

void

onConversationCreated()?
optional onConversationCreated(conversationId): void;
Parameters
Parameter Type
conversationId string
Returns

void

onEnded()?
optional onEnded(): void;
Returns

void

onError()?
optional onError(error): void;
Parameters
Parameter Type
error Error
Returns

void

onEvent()?
optional onEvent(event): void;
Parameters
Parameter Type
event VoiceProtocolServerEvent
Returns

void


UseVoiceResult

Properties

channelSegmentId
channelSegmentId: string;
connectionId
connectionId: string;
conversationId
conversationId: string;
error
error: Error;
localStream
localStream: MediaStream;
muted
muted: boolean;
status
status: VoiceConnectionStatus;

Methods

sendEvent()
sendEvent(event): void;
Parameters
Parameter Type
event VoiceProtocolClientEvent
Returns

void

setMuted()
setMuted(muted): void;
Parameters
Parameter Type
muted boolean
Returns

void

start()
start(): Promise<StartVoiceResult>;
Returns

Promise\<StartVoiceResult>

stop()
stop(): void;
Returns

void


VoiceProtocolClient

Properties

socket
readonly socket: WebSocket;

Methods

close()
close(code?, reason?): void;
Parameters
Parameter Type
code? number
reason? string
Returns

void

sendEvent()
sendEvent(event): void;
Parameters
Parameter Type
event VoiceProtocolClientEvent
Returns

void


VoiceProtocolClientOptions

Properties

protocols?
optional protocols?: string | string[];
url
url: string;
WebSocket?
optional WebSocket?: (url, protocols?) => WebSocket;
Parameters
Parameter Type
url string | URL
protocols? string | string[]
Returns

WebSocket

Methods

onClose()?
optional onClose(event): void;
Parameters
Parameter Type
event CloseEvent
Returns

void

onError()?
optional onError(event): void;
Parameters
Parameter Type
event Event
Returns

void

onEvent()?
optional onEvent(event): void;
Parameters
Parameter Type
event VoiceProtocolServerEvent
Returns

void

onOpen()?
optional onOpen(): void;
Returns

void


VoiceTurnChannelEventInput

Extends

Type Parameters

Type Parameter Default type
TPayload NormalizedChannelPayloadInput
TRawPayload unknown
TTurn unknown

Properties

actor?
optional actor?: ChannelEventActorInput;
Inherited from

ChannelEventSubmitInput.actor

agentId?
optional agentId?: string;
Inherited from

ChannelEventSubmitInput.agentId

app?
optional app?: unknown;
Inherited from

ChannelEventSubmitInput.app

attachments?
optional attachments?: unknown[];
Inherited from

ChannelEventSubmitInput.attachments

binding?
optional binding?: ChannelEventBindingInput;
Inherited from

ChannelEventSubmitInput.binding

body?
optional body?: string;
Inherited from

ChannelEventSubmitInput.body

channel?
optional channel?: ConversationChannelInput;
Overrides

ChannelEventSubmitInput.channel

conversationContext?
optional conversationContext?: unknown;
Inherited from

ChannelEventSubmitInput.conversationContext

conversationId?
optional conversationId?: string;
Inherited from

ChannelEventSubmitInput.conversationId

createConversation?
optional createConversation?: CreateRuntimeConversationInput;
Inherited from

ChannelEventSubmitInput.createConversation

dedupeKey?
optional dedupeKey?: string;
Inherited from

ChannelEventSubmitInput.dedupeKey

deliveryId?
optional deliveryId?: string;
Inherited from

ChannelEventSubmitInput.deliveryId

direction?
optional direction?: "outbound" | "inbound" | "internal";
Inherited from

ChannelEventSubmitInput.direction

event?
optional event?: ChannelEventShortcutEnvelope<TPayload, TRawPayload>;
Inherited from

ChannelEventSubmitInput.event

eventId?
optional eventId?: string;
Inherited from

ChannelEventSubmitInput.eventId

externalObjectIds?
optional externalObjectIds?: Record<string, string>;
Inherited from

ChannelEventSubmitInput.externalObjectIds

handling?
optional handling?: ChannelEventHandlingInput<TTurn>;
Inherited from

ChannelEventSubmitInput.handling

id?
optional id?: string;
Inherited from

ChannelEventSubmitInput.id

idempotencyKey?
optional idempotencyKey?: string;
Inherited from

ChannelEventSubmitInput.idempotencyKey

identity?
optional identity?: ChannelEventIdentity;
Inherited from

ChannelEventSubmitInput.identity

identityKey?
optional identityKey?: string;
Inherited from

ChannelEventSubmitInput.identityKey

identityMetadata?
optional identityMetadata?: Record<string, unknown>;
Inherited from

ChannelEventSubmitInput.identityMetadata

identityStreamId?
optional identityStreamId?: string;
Inherited from

ChannelEventSubmitInput.identityStreamId

intent?
optional intent?: ChannelEventIntent;
Inherited from

ChannelEventSubmitInput.intent

kind?
optional kind?: ChannelEventNature;
Inherited from

ChannelEventSubmitInput.kind

message?
optional message?: string;
Inherited from

ChannelEventSubmitInput.message

metadata?
optional metadata?: Record<string, unknown>;
Inherited from

ChannelEventSubmitInput.metadata

nature?
optional nature?: ChannelEventNature;
Inherited from

ChannelEventSubmitInput.nature

occurredAt?
optional occurredAt?: string;
Inherited from

ChannelEventSubmitInput.occurredAt

payload?
optional payload?: TPayload;
Inherited from

ChannelEventSubmitInput.payload

provider?
optional provider?: string;
Inherited from

ChannelEventSubmitInput.provider

providerObject?
optional providerObject?: unknown;
Inherited from

ChannelEventSubmitInput.providerObject

providerPackageId?
optional providerPackageId?: string;
Inherited from

ChannelEventSubmitInput.providerPackageId

raw?
optional raw?: TRawPayload;
Inherited from

ChannelEventSubmitInput.raw

receivedAt?
optional receivedAt?: string;
Inherited from

ChannelEventSubmitInput.receivedAt

sequence?
optional sequence?: string | number;
Inherited from

ChannelEventSubmitInput.sequence

signal?
optional signal?: AbortSignal;
Inherited from

ChannelEventSubmitInput.signal

source?
optional source?: ChannelEventSourceEvidence<TRawPayload>;
Inherited from

ChannelEventSubmitInput.source

sourceId?
optional sourceId?: string;
Inherited from

ChannelEventSubmitInput.sourceId

sourceType?
optional sourceType?:
  | "application"
  | "provider-adapter"
  | "schedule-adapter"
  | "operator-surface";
Inherited from

ChannelEventSubmitInput.sourceType

status?
optional status?: string;
Inherited from

ChannelEventSubmitInput.status

streamId?
optional streamId?: string;
Inherited from

ChannelEventSubmitInput.streamId

subject?
optional subject?: string;
Inherited from

ChannelEventSubmitInput.subject

summary?
optional summary?: string;
Inherited from

ChannelEventSubmitInput.summary

text?
optional text?: string;
Overrides

ChannelEventSubmitInput.text

transcript?
optional transcript?: string;
turn?
optional turn?: TTurn;
Inherited from

ChannelEventSubmitInput.turn

verified?
optional verified?: boolean;
Inherited from

ChannelEventSubmitInput.verified

Methods

onAssistantTextDelta()?
optional onAssistantTextDelta(textDelta): void | Promise<void>;
Parameters
Parameter Type
textDelta string
Returns

void | Promise\<void>

Inherited from

ChannelEventSubmitInput.onAssistantTextDelta


WidgetRendererProps

Properties

appearance?
optional appearance?: AppearanceConfiguration;
disabled?
optional disabled?: boolean;
input
input: unknown;
kind
kind: string;
output?
optional output?: unknown;
promptId
promptId: string;
submitted?
optional submitted?: boolean;

Methods

submit()
submit(output): void;
Parameters
Parameter Type
output unknown
Returns

void

Type Aliases

ChannelEventActorInput

type ChannelEventActorInput =
  | ChannelEventActor
  | ChannelEventActorType;

ChannelEventRequestBody

type ChannelEventRequestBody<TPayload, TTurn> = Omit<HandleChannelEventInput<TPayload, TTurn>, "signal" | "onAssistantTextDelta">;

Type Parameters

Type Parameter Default type
TPayload NormalizedChannelPayloadInput
TTurn unknown

ChatActivityLabelFormatter

type ChatActivityLabelFormatter = (input) => string | undefined;

Parameters

Parameter Type
input ChatActivityLabelInput

Returns

string | undefined


ChatActivityLabelKind

type ChatActivityLabelKind =
  | "response"
  | "widget"
  | "intent"
  | "extraction"
  | "action"
  | "tool"
  | "knowledge";

CognideskEventSourceFactory

type CognideskEventSourceFactory = (url, options) => EventSource;

Parameters

Parameter Type
url string
options CognideskEventSourceOptions

Returns

EventSource


CognideskRequestOperation

type CognideskRequestOperation =
  | "createConversation"
  | "listConversations"
  | "handleChannelEvent"
  | "receiveMessage"
  | "recordProviderUpdate"
  | "finalizeVoiceTurn"
  | "requestOutboundContact"
  | "submitScheduledEvent"
  | "resolveChannelOutput"
  | "recordChannelOutputResolution"
  | "requestChannelHandoff"
  | "requestChannelHandoffReview"
  | "startVoiceConversation"
  | "startVoiceSegment"
  | "sendMessage"
  | "listEvents"
  | "submitWidget"
  | "emitCustomEvent"
  | "emitJourneyEvent"
  | "emitIntermediateMessage"
  | "emitGeneratedPreamble"
  | "compactConversation"
  | "closeConversation"
  | "requestHandoff"
  | "resumeConversation"
  | "getSnapshot"
  | "replayConversation";

CognideskRequestOptions

type CognideskRequestOptions = Omit<RequestInit, "body" | "method">;

CognideskRequestOptionsResolver

type CognideskRequestOptionsResolver = (context) => CognideskRequestOptions | undefined;

Parameters

Parameter Type
context CognideskRequestContext

Returns

CognideskRequestOptions | undefined


ResolveChannelOutputInput

type ResolveChannelOutputInput<TPayload> = ResolveChannelOutputInput<TPayload>;

Type Parameters

Type Parameter Default type
TPayload unknown

ResolveChannelOutputResult

type ResolveChannelOutputResult<TPayload> = ResolveChannelOutputResult<TPayload>;

Type Parameters

Type Parameter Default type
TPayload unknown

VoiceConnectionStatus

type VoiceConnectionStatus =
  | "idle"
  | "requestingPermission"
  | "connecting"
  | "connected"
  | "ended"
  | "error";

VoiceProtocolClientEvent

type VoiceProtocolClientEvent =
  | {
  event_id?: string;
  session?: Record<string, unknown>;
  type: "session.update";
}
  | {
  audio: string;
  event_id?: string;
  sequence?: number;
  type: "input_audio_buffer.append";
}
  | {
  event_id?: string;
  type: "input_audio_buffer.commit";
}
  | {
  event_id?: string;
  type: "input_audio_buffer.clear";
}
  | {
  audioEndMs?: number;
  event_id?: string;
  interruptedMessageId?: string;
  playedUntilMs?: number;
  reason?: string;
  response_id?: string;
  type: "response.cancel";
}
  | {
  audio_end_ms?: number;
  content_index?: number;
  event_id?: string;
  item_id?: string;
  type: "conversation.item.truncate";
};

VoiceProtocolServerEvent

type VoiceProtocolServerEvent = {
[key: string]: unknown;
  event_id?: string;
  type: string;
};

Indexable

[key: string]: unknown

Properties

event_id?
optional event_id?: string;
type
type: string;

WidgetRenderer

type WidgetRenderer = (props) => ReactNode;

Parameters

Parameter Type
props WidgetRendererProps

Returns

ReactNode


WidgetRendererMap

type WidgetRendererMap = Record<string, WidgetRenderer>;

Variables

defaultWidgetRenderers

const defaultWidgetRenderers: WidgetRendererMap;

Functions

ChatWidget()

function ChatWidget(props): Element;

Parameters

Parameter Type
props ChatWidgetProps

Returns

Element


function collectSupportSourceLinks(references): SupportSourceLink[];

Parameters

Parameter Type
references SupportReference[]

Returns

SupportSourceLink[]


createChannelEventInput()

function createChannelEventInput<TPayload, TRawPayload, TTurn>(input): HandleChannelEventInput<TPayload, TTurn>;

Type Parameters

Type Parameter Default type
TPayload NormalizedChannelPayloadInput
TRawPayload unknown
TTurn unknown

Parameters

Parameter Type
input ChannelEventSubmitInput\<TPayload, TRawPayload, TTurn>

Returns

HandleChannelEventInput\<TPayload, TTurn>


createChannelEventRequestBody()

function createChannelEventRequestBody<TPayload, TRawPayload, TTurn>(input): ChannelEventRequestBody<TPayload, TTurn>;

Type Parameters

Type Parameter Default type
TPayload NormalizedChannelPayloadInput
TRawPayload unknown
TTurn unknown

Parameters

Parameter Type
input ChannelEventSubmitInput\<TPayload, TRawPayload, TTurn>

Returns

ChannelEventRequestBody\<TPayload, TTurn>


createChannelHandoffEventInput()

function createChannelHandoffEventInput<TPayload, TRawPayload, TTurn>(input): HandleChannelEventInput<TPayload, TTurn>;

Type Parameters

Type Parameter Default type
TPayload NormalizedChannelPayloadInput
TRawPayload unknown
TTurn unknown

Parameters

Parameter Type
input ChannelHandoffEventInput\<TPayload, TRawPayload, TTurn>

Returns

HandleChannelEventInput\<TPayload, TTurn>


createChannelHandoffReviewEventInput()

function createChannelHandoffReviewEventInput<TPayload, TRawPayload, TTurn>(input): HandleChannelEventInput<TPayload, TTurn>;

Type Parameters

Type Parameter Default type
TPayload NormalizedChannelPayloadInput
TRawPayload unknown
TTurn unknown

Parameters

Parameter Type
input ChannelHandoffReviewEventInput\<TPayload, TRawPayload, TTurn>

Returns

HandleChannelEventInput\<TPayload, TTurn>


createChannelOutputResolutionEventInput()

function createChannelOutputResolutionEventInput<TPayload, TRawPayload, TTurn>(input): HandleChannelEventInput<TPayload, TTurn>;

Type Parameters

Type Parameter Default type
TPayload NormalizedChannelPayloadInput
TRawPayload unknown
TTurn unknown

Parameters

Parameter Type
input ChannelOutputResolutionEventInput\<TPayload, TRawPayload, TTurn>

Returns

HandleChannelEventInput\<TPayload, TTurn>


createCognideskClient()

function createCognideskClient(options): CognideskClient;

Parameters

Parameter Type
options CognideskClientOptions

Returns

CognideskClient


createMessageChannelEventInput()

function createMessageChannelEventInput<TPayload, TRawPayload, TTurn>(input): HandleChannelEventInput<TPayload, TTurn>;

Type Parameters

Type Parameter Default type
TPayload NormalizedChannelPayloadInput
TRawPayload unknown
TTurn unknown

Parameters

Parameter Type
input ChannelMessageEventInput\<TPayload, TRawPayload, TTurn>

Returns

HandleChannelEventInput\<TPayload, TTurn>


createOutboundContactChannelEventInput()

function createOutboundContactChannelEventInput<TPayload, TRawPayload, TTurn>(input): HandleChannelEventInput<TPayload, TTurn>;

Type Parameters

Type Parameter Default type
TPayload NormalizedChannelPayloadInput
TRawPayload unknown
TTurn unknown

Parameters

Parameter Type
input OutboundContactChannelEventInput\<TPayload, TRawPayload, TTurn>

Returns

HandleChannelEventInput\<TPayload, TTurn>


createProviderObjectChannelEventInput()

function createProviderObjectChannelEventInput<TPayload, TRawPayload, TTurn>(input): HandleChannelEventInput<TPayload, TTurn>;

Type Parameters

Type Parameter Default type
TPayload NormalizedChannelPayloadInput
TRawPayload unknown
TTurn unknown

Parameters

Parameter Type
input ProviderObjectChannelEventInput\<TPayload, TRawPayload, TTurn>

Returns

HandleChannelEventInput\<TPayload, TTurn>


createScheduledChannelEventInput()

function createScheduledChannelEventInput<TPayload, TRawPayload, TTurn>(input): HandleChannelEventInput<TPayload, TTurn>;

Type Parameters

Type Parameter Default type
TPayload NormalizedChannelPayloadInput
TRawPayload unknown
TTurn unknown

Parameters

Parameter Type
input ScheduledChannelEventInput\<TPayload, TRawPayload, TTurn>

Returns

HandleChannelEventInput\<TPayload, TTurn>


createVoiceProtocolClient()

function createVoiceProtocolClient(options): VoiceProtocolClient;

Parameters

Parameter Type
options VoiceProtocolClientOptions

Returns

VoiceProtocolClient


createVoiceTurnChannelEventInput()

function createVoiceTurnChannelEventInput<TPayload, TRawPayload, TTurn>(input): HandleChannelEventInput<TPayload, TTurn>;

Type Parameters

Type Parameter Default type
TPayload NormalizedChannelPayloadInput
TRawPayload unknown
TTurn unknown

Parameters

Parameter Type
input VoiceTurnChannelEventInput\<TPayload, TRawPayload, TTurn>

Returns

HandleChannelEventInput\<TPayload, TTurn>


formatSupportReferences()

function formatSupportReferences(references): string;

Parameters

Parameter Type
references SupportReference[]

Returns

string


reduceChatRuntimeEvent()

function reduceChatRuntimeEvent(
   state,
   event,
   options?): ChatEventReducerState;

Parameters

Parameter Type
state ChatEventReducerState
event RuntimeEvent
options? ChatEventReducerOptions

Returns

ChatEventReducerState


useChat()

function useChat(options): {
  activities: ChatActivity[];
  clearPrompt: (promptId) => void;
  conversationId: string;
  error: Error;
  messages: ChatMessage[];
  prompts: PromptState[];
  sendMessage: (text) => Promise<void>;
  status: "error" | "starting" | "sending" | "streaming" | "idle";
  submitWidget: (input) => Promise<{
     event: RuntimeEvent;
  }>;
};

Parameters

Parameter Type
options UseChatOptions

Returns

{
  activities: ChatActivity[];
  clearPrompt: (promptId) => void;
  conversationId: string;
  error: Error;
  messages: ChatMessage[];
  prompts: PromptState[];
  sendMessage: (text) => Promise<void>;
  status: "error" | "starting" | "sending" | "streaming" | "idle";
  submitWidget: (input) => Promise<{
     event: RuntimeEvent;
  }>;
}
Name Type
activities ChatActivity[]
clearPrompt() (promptId) => void
conversationId string
error Error
messages ChatMessage[]
prompts PromptState[]
sendMessage() (text) => Promise\<void>
status "error" | "starting" | "sending" | "streaming" | "idle"
submitWidget() (input) => Promise\<{ event: RuntimeEvent; }>

useVoice()

function useVoice(options): UseVoiceResult;

Parameters

Parameter Type
options UseVoiceOptions

Returns

UseVoiceResult

References

ChannelEventActor

Re-exports ChannelEventActor


ChannelEventActorType

Re-exports ChannelEventActorType


ChannelEventBindingOutcome

Re-exports ChannelEventBindingOutcome


ChannelEventDirection

Re-exports ChannelEventDirection


ChannelEventEnvelope

Re-exports ChannelEventEnvelope


ChannelEventEnvelopeInput

Re-exports ChannelEventEnvelopeInput


ChannelEventHandlingDisposition

Re-exports ChannelEventHandlingDisposition


ChannelEventIdentity

Re-exports ChannelEventIdentity


ChannelEventIntakeResult

Re-exports ChannelEventIntakeResult


ChannelEventIntakeStatus

Re-exports ChannelEventIntakeStatus


ChannelEventIntent

Re-exports ChannelEventIntent


ChannelEventKind

Re-exports ChannelEventKind


ChannelEventNature

Re-exports ChannelEventNature


ChannelEventSourceEvidence

Re-exports ChannelEventSourceEvidence


ChannelEventSourceType

Re-exports ChannelEventSourceType


ChannelOutputDeliveryMode

Re-exports ChannelOutputDeliveryMode


ChannelOutputIntent

Re-exports ChannelOutputIntent


ChannelOutputIntentInput

Re-exports ChannelOutputIntentInput


ChannelOutputIntentKind

Re-exports ChannelOutputIntentKind


ChannelOutputResolution

Re-exports ChannelOutputResolution


ChannelOutputResolutionDecision

Re-exports ChannelOutputResolutionDecision


ChannelOutputResolutionOutcome

Re-exports ChannelOutputResolutionOutcome


ChannelOutputResolutionPayload

Re-exports ChannelOutputResolutionPayload


ChannelOutputResolutionStatus

Re-exports ChannelOutputResolutionStatus


ChannelSourceEvidence

Re-exports ChannelSourceEvidence


HandleChannelEventInput

Re-exports HandleChannelEventInput


HandleChannelEventResult

Re-exports HandleChannelEventResult


NormalizedChannelPayload

Re-exports NormalizedChannelPayload


NormalizedChannelPayloadInput

Re-exports NormalizedChannelPayloadInput