react/dist¶
Classes¶
CognideskApiError¶
Extends¶
Error
Constructors¶
Constructor¶
Parameters¶
| Parameter | Type |
|---|---|
message |
string |
input |
{ body: unknown; response: Response; status: number; } |
input.body |
unknown |
input.response |
Response |
input.status |
number |
Returns¶
Overrides¶
Properties¶
body¶
response¶
status¶
Interfaces¶
ChannelEventShortcutEnvelope¶
Extends¶
Omit\<Partial\<ChannelEventEnvelopeInput\<TPayload,TRawPayload>>,"actor">
Type Parameters¶
| Type Parameter | Default type |
|---|---|
TPayload |
NormalizedChannelPayloadInput |
TRawPayload |
unknown |
Properties¶
actor?¶
agentId?¶
attachments?¶
body?¶
channel?¶
Inherited from¶
conversationId?¶
dedupeKey?¶
direction?¶
Inherited from¶
id?¶
Inherited from¶
idempotencyKey?¶
identity?¶
Overrides¶
identityKey?¶
identityMetadata?¶
identityStreamId?¶
intent?¶
Inherited from¶
kind?¶
Inherited from¶
message?¶
metadata?¶
Inherited from¶
nature?¶
Inherited from¶
occurredAt?¶
Inherited from¶
payload?¶
Inherited from¶
providerObject?¶
raw?¶
sequence?¶
source?¶
Inherited from¶
status?¶
subject?¶
summary?¶
text?¶
turn?¶
ChannelEventSubmitInput¶
Extends¶
Omit\<HandleChannelEventInput\<TPayload,TTurn>,"event">
Extended by¶
ChannelHandoffEventInputChannelHandoffReviewEventInputChannelMessageEventInputChannelOutputResolutionEventInputOutboundContactChannelEventInputProviderObjectChannelEventInputScheduledChannelEventInputVoiceTurnChannelEventInput
Type Parameters¶
| Type Parameter | Default type |
|---|---|
TPayload |
NormalizedChannelPayloadInput |
TRawPayload |
unknown |
TTurn |
unknown |
Properties¶
actor?¶
agentId?¶
Inherited from¶
app?¶
Inherited from¶
attachments?¶
binding?¶
Inherited from¶
body?¶
channel?¶
conversationContext?¶
Inherited from¶
conversationId?¶
Inherited from¶
createConversation?¶
Inherited from¶
dedupeKey?¶
deliveryId?¶
direction?¶
event?¶
eventId?¶
externalObjectIds?¶
handling?¶
Inherited from¶
id?¶
idempotencyKey?¶
identity?¶
identityKey?¶
identityMetadata?¶
identityStreamId?¶
intent?¶
kind?¶
message?¶
metadata?¶
nature?¶
occurredAt?¶
payload?¶
provider?¶
providerObject?¶
providerPackageId?¶
raw?¶
receivedAt?¶
sequence?¶
signal?¶
Inherited from¶
source?¶
sourceId?¶
sourceType?¶
optional sourceType?:
| "application"
| "provider-adapter"
| "schedule-adapter"
| "operator-surface";
status?¶
streamId?¶
subject?¶
summary?¶
text?¶
turn?¶
verified?¶
Methods¶
onAssistantTextDelta()?¶
Parameters¶
| Parameter | Type |
|---|---|
textDelta |
string |
Returns¶
void | Promise\<void>
Inherited from¶
ChannelHandoffEventInput¶
Extends¶
ChannelEventSubmitInput\<TPayload,TRawPayload,TTurn>
Type Parameters¶
| Type Parameter | Default type |
|---|---|
TPayload |
NormalizedChannelPayloadInput |
TRawPayload |
unknown |
TTurn |
unknown |
Properties¶
actor?¶
Inherited from¶
agentId?¶
Inherited from¶
ChannelEventSubmitInput.agentId
app?¶
Inherited from¶
attachments?¶
Inherited from¶
ChannelEventSubmitInput.attachments
binding?¶
Inherited from¶
ChannelEventSubmitInput.binding
body?¶
Inherited from¶
channel¶
Overrides¶
ChannelEventSubmitInput.channel
conversationContext?¶
Inherited from¶
ChannelEventSubmitInput.conversationContext
conversationId?¶
Inherited from¶
ChannelEventSubmitInput.conversationId
createConversation?¶
Inherited from¶
ChannelEventSubmitInput.createConversation
dedupeKey?¶
Inherited from¶
ChannelEventSubmitInput.dedupeKey
deliveryId?¶
Inherited from¶
ChannelEventSubmitInput.deliveryId
direction?¶
Inherited from¶
ChannelEventSubmitInput.direction
event?¶
Inherited from¶
eventId?¶
Inherited from¶
ChannelEventSubmitInput.eventId
externalObjectIds?¶
Inherited from¶
ChannelEventSubmitInput.externalObjectIds
fromChannel?¶
handling?¶
Inherited from¶
ChannelEventSubmitInput.handling
id?¶
Inherited from¶
idempotencyKey?¶
Inherited from¶
ChannelEventSubmitInput.idempotencyKey
identity?¶
Inherited from¶
ChannelEventSubmitInput.identity
identityKey?¶
Inherited from¶
ChannelEventSubmitInput.identityKey
identityMetadata?¶
Inherited from¶
ChannelEventSubmitInput.identityMetadata
identityStreamId?¶
Inherited from¶
ChannelEventSubmitInput.identityStreamId
intent?¶
Inherited from¶
ChannelEventSubmitInput.intent
kind?¶
Inherited from¶
message?¶
Inherited from¶
ChannelEventSubmitInput.message
metadata?¶
Inherited from¶
ChannelEventSubmitInput.metadata
nature?¶
Inherited from¶
ChannelEventSubmitInput.nature
occurredAt?¶
Inherited from¶
ChannelEventSubmitInput.occurredAt
payload?¶
Inherited from¶
ChannelEventSubmitInput.payload
provider?¶
Inherited from¶
ChannelEventSubmitInput.provider
providerObject?¶
Inherited from¶
ChannelEventSubmitInput.providerObject
providerPackageId?¶
Inherited from¶
ChannelEventSubmitInput.providerPackageId
raw?¶
Inherited from¶
reason?¶
reasonCode?¶
reasonLabel?¶
receivedAt?¶
Inherited from¶
ChannelEventSubmitInput.receivedAt
sequence?¶
Inherited from¶
ChannelEventSubmitInput.sequence
signal?¶
Inherited from¶
ChannelEventSubmitInput.signal
source?¶
Inherited from¶
ChannelEventSubmitInput.source
sourceId?¶
Inherited from¶
ChannelEventSubmitInput.sourceId
sourceType?¶
optional sourceType?:
| "application"
| "provider-adapter"
| "schedule-adapter"
| "operator-surface";
Inherited from¶
ChannelEventSubmitInput.sourceType
status?¶
Inherited from¶
ChannelEventSubmitInput.status
streamId?¶
Inherited from¶
ChannelEventSubmitInput.streamId
subject?¶
Inherited from¶
ChannelEventSubmitInput.subject
summary?¶
Inherited from¶
ChannelEventSubmitInput.summary
text?¶
Inherited from¶
turn?¶
Inherited from¶
verified?¶
Inherited from¶
ChannelEventSubmitInput.verified
Methods¶
onAssistantTextDelta()?¶
Parameters¶
| Parameter | Type |
|---|---|
textDelta |
string |
Returns¶
void | Promise\<void>
Inherited from¶
ChannelEventSubmitInput.onAssistantTextDelta
ChannelHandoffReviewEventInput¶
Extends¶
ChannelEventSubmitInput\<TPayload,TRawPayload,TTurn>
Type Parameters¶
| Type Parameter | Default type |
|---|---|
TPayload |
NormalizedChannelPayloadInput |
TRawPayload |
unknown |
TTurn |
unknown |
Properties¶
actor?¶
Inherited from¶
agentId?¶
Inherited from¶
ChannelEventSubmitInput.agentId
app?¶
Inherited from¶
attachments?¶
Inherited from¶
ChannelEventSubmitInput.attachments
binding?¶
Inherited from¶
ChannelEventSubmitInput.binding
body?¶
Inherited from¶
channel¶
Overrides¶
ChannelEventSubmitInput.channel
conversationContext?¶
Inherited from¶
ChannelEventSubmitInput.conversationContext
conversationId?¶
Inherited from¶
ChannelEventSubmitInput.conversationId
createConversation?¶
Inherited from¶
ChannelEventSubmitInput.createConversation
dedupeKey?¶
Inherited from¶
ChannelEventSubmitInput.dedupeKey
deliveryId?¶
Inherited from¶
ChannelEventSubmitInput.deliveryId
direction?¶
Inherited from¶
ChannelEventSubmitInput.direction
event?¶
Inherited from¶
eventId?¶
Inherited from¶
ChannelEventSubmitInput.eventId
externalObjectIds?¶
Inherited from¶
ChannelEventSubmitInput.externalObjectIds
handling?¶
Inherited from¶
ChannelEventSubmitInput.handling
id?¶
Inherited from¶
idempotencyKey?¶
Inherited from¶
ChannelEventSubmitInput.idempotencyKey
identity?¶
Inherited from¶
ChannelEventSubmitInput.identity
identityKey?¶
Inherited from¶
ChannelEventSubmitInput.identityKey
identityMetadata?¶
Inherited from¶
ChannelEventSubmitInput.identityMetadata
identityStreamId?¶
Inherited from¶
ChannelEventSubmitInput.identityStreamId
intent?¶
Inherited from¶
ChannelEventSubmitInput.intent
kind?¶
Inherited from¶
message?¶
Inherited from¶
ChannelEventSubmitInput.message
metadata?¶
Inherited from¶
ChannelEventSubmitInput.metadata
nature?¶
Inherited from¶
ChannelEventSubmitInput.nature
occurredAt?¶
Inherited from¶
ChannelEventSubmitInput.occurredAt
payload?¶
Inherited from¶
ChannelEventSubmitInput.payload
provider?¶
Inherited from¶
ChannelEventSubmitInput.provider
providerObject?¶
Inherited from¶
ChannelEventSubmitInput.providerObject
providerPackageId?¶
Inherited from¶
ChannelEventSubmitInput.providerPackageId
raw?¶
Inherited from¶
receivedAt?¶
Inherited from¶
ChannelEventSubmitInput.receivedAt
sequence?¶
Inherited from¶
ChannelEventSubmitInput.sequence
signal?¶
Inherited from¶
ChannelEventSubmitInput.signal
source?¶
Inherited from¶
ChannelEventSubmitInput.source
sourceId?¶
Inherited from¶
ChannelEventSubmitInput.sourceId
sourceType?¶
optional sourceType?:
| "application"
| "provider-adapter"
| "schedule-adapter"
| "operator-surface";
Inherited from¶
ChannelEventSubmitInput.sourceType
status?¶
Inherited from¶
ChannelEventSubmitInput.status
streamId?¶
Inherited from¶
ChannelEventSubmitInput.streamId
subject?¶
Inherited from¶
ChannelEventSubmitInput.subject
summary?¶
Inherited from¶
ChannelEventSubmitInput.summary
text?¶
Inherited from¶
turn?¶
Inherited from¶
verified?¶
Inherited from¶
ChannelEventSubmitInput.verified
Methods¶
onAssistantTextDelta()?¶
Parameters¶
| Parameter | Type |
|---|---|
textDelta |
string |
Returns¶
void | Promise\<void>
Inherited from¶
ChannelEventSubmitInput.onAssistantTextDelta
ChannelMessageEventInput¶
Extends¶
ChannelEventSubmitInput\<TPayload,TRawPayload,TTurn>
Type Parameters¶
| Type Parameter | Default type |
|---|---|
TPayload |
NormalizedChannelPayloadInput |
TRawPayload |
unknown |
TTurn |
unknown |
Properties¶
actor?¶
Inherited from¶
agentId?¶
Inherited from¶
ChannelEventSubmitInput.agentId
app?¶
Inherited from¶
attachments?¶
Inherited from¶
ChannelEventSubmitInput.attachments
binding?¶
Inherited from¶
ChannelEventSubmitInput.binding
body?¶
Inherited from¶
channel¶
Overrides¶
ChannelEventSubmitInput.channel
conversationContext?¶
Inherited from¶
ChannelEventSubmitInput.conversationContext
conversationId?¶
Inherited from¶
ChannelEventSubmitInput.conversationId
createConversation?¶
Inherited from¶
ChannelEventSubmitInput.createConversation
dedupeKey?¶
Inherited from¶
ChannelEventSubmitInput.dedupeKey
deliveryId?¶
Inherited from¶
ChannelEventSubmitInput.deliveryId
direction?¶
Overrides¶
ChannelEventSubmitInput.direction
event?¶
Inherited from¶
eventId?¶
Inherited from¶
ChannelEventSubmitInput.eventId
externalObjectIds?¶
Inherited from¶
ChannelEventSubmitInput.externalObjectIds
handling?¶
Inherited from¶
ChannelEventSubmitInput.handling
id?¶
Inherited from¶
idempotencyKey?¶
Inherited from¶
ChannelEventSubmitInput.idempotencyKey
identity?¶
Inherited from¶
ChannelEventSubmitInput.identity
identityKey?¶
Inherited from¶
ChannelEventSubmitInput.identityKey
identityMetadata?¶
Inherited from¶
ChannelEventSubmitInput.identityMetadata
identityStreamId?¶
Inherited from¶
ChannelEventSubmitInput.identityStreamId
intent?¶
Inherited from¶
ChannelEventSubmitInput.intent
kind?¶
Inherited from¶
message?¶
Inherited from¶
ChannelEventSubmitInput.message
metadata?¶
Inherited from¶
ChannelEventSubmitInput.metadata
nature?¶
Inherited from¶
ChannelEventSubmitInput.nature
occurredAt?¶
Inherited from¶
ChannelEventSubmitInput.occurredAt
payload?¶
Inherited from¶
ChannelEventSubmitInput.payload
provider?¶
Inherited from¶
ChannelEventSubmitInput.provider
providerObject?¶
Inherited from¶
ChannelEventSubmitInput.providerObject
providerPackageId?¶
Inherited from¶
ChannelEventSubmitInput.providerPackageId
raw?¶
Inherited from¶
receivedAt?¶
Inherited from¶
ChannelEventSubmitInput.receivedAt
sequence?¶
Inherited from¶
ChannelEventSubmitInput.sequence
signal?¶
Inherited from¶
ChannelEventSubmitInput.signal
source?¶
Inherited from¶
ChannelEventSubmitInput.source
sourceId?¶
Inherited from¶
ChannelEventSubmitInput.sourceId
sourceType?¶
optional sourceType?:
| "application"
| "provider-adapter"
| "schedule-adapter"
| "operator-surface";
Inherited from¶
ChannelEventSubmitInput.sourceType
status?¶
Inherited from¶
ChannelEventSubmitInput.status
streamId?¶
Inherited from¶
ChannelEventSubmitInput.streamId
subject?¶
Inherited from¶
ChannelEventSubmitInput.subject
summary?¶
Inherited from¶
ChannelEventSubmitInput.summary
text¶
Overrides¶
turn?¶
Inherited from¶
verified?¶
Inherited from¶
ChannelEventSubmitInput.verified
Methods¶
onAssistantTextDelta()?¶
Parameters¶
| Parameter | Type |
|---|---|
textDelta |
string |
Returns¶
void | Promise\<void>
Inherited from¶
ChannelEventSubmitInput.onAssistantTextDelta
ChannelOutputResolutionEventInput¶
Extends¶
ChannelEventSubmitInput\<TPayload,TRawPayload,TTurn>
Type Parameters¶
| Type Parameter | Default type |
|---|---|
TPayload |
NormalizedChannelPayloadInput |
TRawPayload |
unknown |
TTurn |
unknown |
Properties¶
actor?¶
Inherited from¶
agentId?¶
Inherited from¶
ChannelEventSubmitInput.agentId
app?¶
Inherited from¶
attachments?¶
Inherited from¶
ChannelEventSubmitInput.attachments
binding?¶
Inherited from¶
ChannelEventSubmitInput.binding
body?¶
Inherited from¶
channel¶
Overrides¶
ChannelEventSubmitInput.channel
conversationContext?¶
Inherited from¶
ChannelEventSubmitInput.conversationContext
conversationId?¶
Inherited from¶
ChannelEventSubmitInput.conversationId
createConversation?¶
Inherited from¶
ChannelEventSubmitInput.createConversation
dedupeKey?¶
Inherited from¶
ChannelEventSubmitInput.dedupeKey
deliveryId?¶
Inherited from¶
ChannelEventSubmitInput.deliveryId
direction?¶
Inherited from¶
ChannelEventSubmitInput.direction
event?¶
Inherited from¶
eventId?¶
Inherited from¶
ChannelEventSubmitInput.eventId
externalObjectIds?¶
Inherited from¶
ChannelEventSubmitInput.externalObjectIds
handling?¶
Inherited from¶
ChannelEventSubmitInput.handling
id?¶
Inherited from¶
idempotencyKey?¶
Inherited from¶
ChannelEventSubmitInput.idempotencyKey
identity?¶
Inherited from¶
ChannelEventSubmitInput.identity
identityKey?¶
Inherited from¶
ChannelEventSubmitInput.identityKey
identityMetadata?¶
Inherited from¶
ChannelEventSubmitInput.identityMetadata
identityStreamId?¶
Inherited from¶
ChannelEventSubmitInput.identityStreamId
intent?¶
Inherited from¶
ChannelEventSubmitInput.intent
kind?¶
Inherited from¶
message?¶
Inherited from¶
ChannelEventSubmitInput.message
metadata?¶
Inherited from¶
ChannelEventSubmitInput.metadata
nature?¶
Inherited from¶
ChannelEventSubmitInput.nature
occurredAt?¶
Inherited from¶
ChannelEventSubmitInput.occurredAt
payload?¶
Inherited from¶
ChannelEventSubmitInput.payload
provider?¶
Inherited from¶
ChannelEventSubmitInput.provider
providerObject?¶
Inherited from¶
ChannelEventSubmitInput.providerObject
providerPackageId?¶
Inherited from¶
ChannelEventSubmitInput.providerPackageId
raw?¶
Inherited from¶
receivedAt?¶
Inherited from¶
ChannelEventSubmitInput.receivedAt
sequence?¶
Inherited from¶
ChannelEventSubmitInput.sequence
signal?¶
Inherited from¶
ChannelEventSubmitInput.signal
source?¶
Inherited from¶
ChannelEventSubmitInput.source
sourceId?¶
Inherited from¶
ChannelEventSubmitInput.sourceId
sourceType?¶
optional sourceType?:
| "application"
| "provider-adapter"
| "schedule-adapter"
| "operator-surface";
Inherited from¶
ChannelEventSubmitInput.sourceType
status?¶
Inherited from¶
ChannelEventSubmitInput.status
streamId?¶
Inherited from¶
ChannelEventSubmitInput.streamId
subject?¶
Inherited from¶
ChannelEventSubmitInput.subject
summary?¶
Inherited from¶
ChannelEventSubmitInput.summary
text?¶
Inherited from¶
turn?¶
Inherited from¶
verified?¶
Inherited from¶
ChannelEventSubmitInput.verified
Methods¶
onAssistantTextDelta()?¶
Parameters¶
| Parameter | Type |
|---|---|
textDelta |
string |
Returns¶
void | Promise\<void>
Inherited from¶
ChannelEventSubmitInput.onAssistantTextDelta
ChatActivity¶
Properties¶
id¶
label¶
status¶
ChatActivityLabelInput¶
Properties¶
defaultLabel¶
event¶
kind¶
name?¶
ChatEventReducerOptions¶
Properties¶
formatActivityLabel?¶
ChatEventReducerState¶
Properties¶
activities¶
lastOffset¶
messages¶
pendingMessageRole?¶
prompts¶
ChatMessage¶
Properties¶
id¶
offset?¶
role¶
segments?¶
status¶
text¶
ChatWidgetProps¶
Properties¶
agentId?¶
appearance?¶
channel?¶
client¶
conversationId?¶
formatActivityLabel?¶
initialContext?¶
placeholder?¶
sendLabel?¶
title?¶
widgets?¶
Methods¶
onConversationCreated()?¶
Parameters¶
| Parameter | Type |
|---|---|
conversationId |
string |
Returns¶
void
onWidgetSubmit()?¶
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()¶
Parameters¶
| Parameter | Type |
|---|---|
input? |
CreateConversationInput |
Returns¶
Promise\<CreateConversationResult>
emitCustomEvent()¶
Parameters¶
| Parameter | Type |
|---|---|
conversationId |
string |
eventName |
string |
input? |
{ payload?: unknown; } |
input.payload? |
unknown |
Returns¶
Promise\<{
event: RuntimeEvent;
}>
emitGeneratedPreamble()¶
Parameters¶
| Parameter | Type |
|---|---|
conversationId |
string |
input? |
{ maxWords?: number; purpose?: string; } |
input.maxWords? |
number |
input.purpose? |
string |
Returns¶
Promise\<{
events: RuntimeEvent[];
text: string;
}>
emitIntermediateMessage()¶
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()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
VoiceTurnChannelEventInput |
Returns¶
Promise\<HandleChannelEventResult\<unknown>>
getSnapshot()¶
Parameters¶
| Parameter | Type |
|---|---|
conversationId |
string |
Returns¶
Promise\<RuntimeSnapshotResult>
handleChannelEvent()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
ChannelEventSubmitInput |
Returns¶
Promise\<HandleChannelEventResult\<unknown>>
listConversations()¶
Parameters¶
| Parameter | Type |
|---|---|
options? |
ListConversationsOptions |
Returns¶
Promise\<ListConversationsResult>
listEvents()¶
Parameters¶
| Parameter | Type |
|---|---|
conversationId |
string |
options? |
{ afterOffset?: number; } |
options.afterOffset? |
number |
Returns¶
Promise\<{
events: RuntimeEvent[];
}>
receiveMessage()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
ChannelMessageEventInput |
Returns¶
Promise\<HandleChannelEventResult\<unknown>>
recordChannelOutputResolution()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
ChannelOutputResolutionEventInput |
Returns¶
Promise\<HandleChannelEventResult\<unknown>>
recordProviderUpdate()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
ProviderObjectChannelEventInput |
Returns¶
Promise\<HandleChannelEventResult\<unknown>>
replayConversation()¶
Parameters¶
| Parameter | Type |
|---|---|
conversationId |
string |
options? |
{ afterOffset?: number; } |
options.afterOffset? |
number |
Returns¶
Promise\<ReplayConversationResult>
requestChannelHandoff()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
ChannelHandoffEventInput |
Returns¶
Promise\<HandleChannelEventResult\<unknown>>
requestChannelHandoffReview()¶
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()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
OutboundContactChannelEventInput |
Returns¶
Promise\<HandleChannelEventResult\<unknown>>
resolveChannelOutput()¶
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()¶
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()¶
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()¶
Parameters¶
| Parameter | Type |
|---|---|
conversationId |
string |
input? |
{ app?: unknown; client?: VoiceStartClientHints; } |
input.app? |
unknown |
input.client? |
VoiceStartClientHints |
Returns¶
Promise\<StartVoiceResult>
streamEvents()¶
Parameters¶
| Parameter | Type |
|---|---|
conversationId |
string |
handlers |
{ onError?: void; onEvent: void; } |
handlers.onError? |
|
handlers.onEvent? |
|
options? |
CognideskStreamEventsOptions |
Returns¶
() => void
submitScheduledEvent()¶
Parameters¶
| Parameter | Type |
|---|---|
input |
ScheduledChannelEventInput |
Returns¶
Promise\<HandleChannelEventResult\<unknown>>
submitWidget()¶
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¶
createEventSource?¶
Use a factory for EventSource implementations that need constructor options beyond the browser-native EventSourceInit, such as auth headers.
credentials?¶
Shared credentials mode for fetch requests. "include" also enables EventSource withCredentials unless streamEvents overrides it.
EventSource?¶
Parameters¶
| Parameter | Type |
|---|---|
url |
string | URL |
eventSourceInitDict? |
EventSourceInit |
Returns¶
EventSource
eventSourceOptions?¶
fetch?¶
Call Signature¶
Parameters¶
| Parameter | Type |
|---|---|
input |
URL | RequestInfo |
init? |
RequestInit |
Returns¶
Promise\<Response>
Call Signature¶
Parameters¶
| Parameter | Type |
|---|---|
input |
string | Request | URL |
init? |
RequestInit |
Returns¶
Promise\<Response>
headers?¶
Shared headers for fetch requests. These are also passed to streamEvents factories/polyfills that support header-based EventSource authentication.
requestOptions?¶
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?¶
CognideskRequestContext¶
Properties¶
conversationId?¶
method¶
operation¶
url¶
CognideskStreamEventsOptions¶
Extends¶
Properties¶
afterOffset?¶
createEventSource?¶
EventSource?¶
Parameters¶
| Parameter | Type |
|---|---|
url |
string | URL |
eventSourceInitDict? |
EventSourceInit |
Returns¶
EventSource
headers?¶
Inherited from¶
CognideskEventSourceOptions.headers
CreateConversationInput¶
Properties¶
agentId?¶
channel?¶
context?¶
id?¶
CreateConversationResult¶
Properties¶
conversation¶
conversation: {
agentId: string;
channel?: ConversationChannel;
context: unknown;
createdAt: string;
id: string;
lifecycle: string;
updatedAt: string;
};
agentId¶
channel?¶
context¶
createdAt¶
id¶
lifecycle¶
updatedAt¶
ListConversationsOptions¶
Properties¶
after?¶
afterUpdatedAt?¶
Timestamp-only range filter. Use after for lossless cursor pagination.
agentId?¶
before?¶
beforeUpdatedAt?¶
Timestamp-only range filter. Use before for lossless cursor pagination.
limit?¶
ListConversationsResult¶
Properties¶
conversations¶
conversations: {
agentId: string;
channel?: ConversationChannel;
context: unknown;
createdAt: string;
id: string;
lifecycle: string;
updatedAt: string;
}[];
agentId¶
channel?¶
context¶
createdAt¶
id¶
lifecycle¶
updatedAt¶
OutboundContactChannelEventInput¶
Extends¶
ChannelEventSubmitInput\<TPayload,TRawPayload,TTurn>
Type Parameters¶
| Type Parameter | Default type |
|---|---|
TPayload |
NormalizedChannelPayloadInput |
TRawPayload |
unknown |
TTurn |
unknown |
Properties¶
actor?¶
Inherited from¶
agentId?¶
Inherited from¶
ChannelEventSubmitInput.agentId
app?¶
Inherited from¶
attachments?¶
Inherited from¶
ChannelEventSubmitInput.attachments
binding?¶
Inherited from¶
ChannelEventSubmitInput.binding
body?¶
Inherited from¶
channel¶
Overrides¶
ChannelEventSubmitInput.channel
conversationContext?¶
Inherited from¶
ChannelEventSubmitInput.conversationContext
conversationId?¶
Inherited from¶
ChannelEventSubmitInput.conversationId
createConversation?¶
Inherited from¶
ChannelEventSubmitInput.createConversation
dedupeKey?¶
Inherited from¶
ChannelEventSubmitInput.dedupeKey
deliveryId?¶
Inherited from¶
ChannelEventSubmitInput.deliveryId
direction?¶
Inherited from¶
ChannelEventSubmitInput.direction
event?¶
Inherited from¶
eventId?¶
Inherited from¶
ChannelEventSubmitInput.eventId
externalObjectIds?¶
Inherited from¶
ChannelEventSubmitInput.externalObjectIds
handling?¶
Inherited from¶
ChannelEventSubmitInput.handling
id?¶
Inherited from¶
idempotencyKey?¶
Inherited from¶
ChannelEventSubmitInput.idempotencyKey
identity?¶
Inherited from¶
ChannelEventSubmitInput.identity
identityKey?¶
Inherited from¶
ChannelEventSubmitInput.identityKey
identityMetadata?¶
Inherited from¶
ChannelEventSubmitInput.identityMetadata
identityStreamId?¶
Inherited from¶
ChannelEventSubmitInput.identityStreamId
intent?¶
Inherited from¶
ChannelEventSubmitInput.intent
kind?¶
Inherited from¶
message?¶
Inherited from¶
ChannelEventSubmitInput.message
metadata?¶
Inherited from¶
ChannelEventSubmitInput.metadata
nature?¶
Inherited from¶
ChannelEventSubmitInput.nature
occurredAt?¶
Inherited from¶
ChannelEventSubmitInput.occurredAt
payload?¶
Inherited from¶
ChannelEventSubmitInput.payload
provider?¶
Inherited from¶
ChannelEventSubmitInput.provider
providerObject?¶
Inherited from¶
ChannelEventSubmitInput.providerObject
providerPackageId?¶
Inherited from¶
ChannelEventSubmitInput.providerPackageId
raw?¶
Inherited from¶
receivedAt?¶
Inherited from¶
ChannelEventSubmitInput.receivedAt
sequence?¶
Inherited from¶
ChannelEventSubmitInput.sequence
signal?¶
Inherited from¶
ChannelEventSubmitInput.signal
source?¶
Inherited from¶
ChannelEventSubmitInput.source
sourceId?¶
Inherited from¶
ChannelEventSubmitInput.sourceId
sourceType?¶
optional sourceType?:
| "application"
| "provider-adapter"
| "schedule-adapter"
| "operator-surface";
Inherited from¶
ChannelEventSubmitInput.sourceType
status?¶
Inherited from¶
ChannelEventSubmitInput.status
streamId?¶
Inherited from¶
ChannelEventSubmitInput.streamId
subject?¶
Inherited from¶
ChannelEventSubmitInput.subject
summary?¶
Inherited from¶
ChannelEventSubmitInput.summary
text?¶
Inherited from¶
turn?¶
Inherited from¶
verified?¶
Inherited from¶
ChannelEventSubmitInput.verified
Methods¶
onAssistantTextDelta()?¶
Parameters¶
| Parameter | Type |
|---|---|
textDelta |
string |
Returns¶
void | Promise\<void>
Inherited from¶
ChannelEventSubmitInput.onAssistantTextDelta
PromptState¶
Properties¶
displayOffset?¶
input¶
kind¶
offset¶
output?¶
promptId¶
status¶
ProviderObjectChannelEventInput¶
Extends¶
ChannelEventSubmitInput\<TPayload,TRawPayload,TTurn>
Type Parameters¶
| Type Parameter | Default type |
|---|---|
TPayload |
NormalizedChannelPayloadInput |
TRawPayload |
unknown |
TTurn |
unknown |
Properties¶
actor?¶
Inherited from¶
agentId?¶
Inherited from¶
ChannelEventSubmitInput.agentId
app?¶
Inherited from¶
attachments?¶
Inherited from¶
ChannelEventSubmitInput.attachments
binding?¶
Inherited from¶
ChannelEventSubmitInput.binding
body?¶
Inherited from¶
channel¶
Overrides¶
ChannelEventSubmitInput.channel
conversationContext?¶
Inherited from¶
ChannelEventSubmitInput.conversationContext
conversationId?¶
Inherited from¶
ChannelEventSubmitInput.conversationId
createConversation?¶
Inherited from¶
ChannelEventSubmitInput.createConversation
dedupeKey?¶
Inherited from¶
ChannelEventSubmitInput.dedupeKey
deliveryId?¶
Inherited from¶
ChannelEventSubmitInput.deliveryId
direction?¶
Inherited from¶
ChannelEventSubmitInput.direction
event?¶
Inherited from¶
eventId?¶
Inherited from¶
ChannelEventSubmitInput.eventId
externalObjectIds?¶
Inherited from¶
ChannelEventSubmitInput.externalObjectIds
handling?¶
Inherited from¶
ChannelEventSubmitInput.handling
id?¶
Inherited from¶
idempotencyKey?¶
Inherited from¶
ChannelEventSubmitInput.idempotencyKey
identity?¶
Inherited from¶
ChannelEventSubmitInput.identity
identityKey?¶
Inherited from¶
ChannelEventSubmitInput.identityKey
identityMetadata?¶
Inherited from¶
ChannelEventSubmitInput.identityMetadata
identityStreamId?¶
Inherited from¶
ChannelEventSubmitInput.identityStreamId
intent?¶
Inherited from¶
ChannelEventSubmitInput.intent
kind?¶
Inherited from¶
message?¶
Inherited from¶
ChannelEventSubmitInput.message
metadata?¶
Inherited from¶
ChannelEventSubmitInput.metadata
nature?¶
Inherited from¶
ChannelEventSubmitInput.nature
occurredAt?¶
Inherited from¶
ChannelEventSubmitInput.occurredAt
payload?¶
Inherited from¶
ChannelEventSubmitInput.payload
provider?¶
Inherited from¶
ChannelEventSubmitInput.provider
providerObject?¶
Inherited from¶
ChannelEventSubmitInput.providerObject
providerPackageId?¶
Inherited from¶
ChannelEventSubmitInput.providerPackageId
raw?¶
Inherited from¶
receivedAt?¶
Inherited from¶
ChannelEventSubmitInput.receivedAt
sequence?¶
Inherited from¶
ChannelEventSubmitInput.sequence
signal?¶
Inherited from¶
ChannelEventSubmitInput.signal
source?¶
Inherited from¶
ChannelEventSubmitInput.source
sourceId?¶
Inherited from¶
ChannelEventSubmitInput.sourceId
sourceType?¶
optional sourceType?:
| "application"
| "provider-adapter"
| "schedule-adapter"
| "operator-surface";
Inherited from¶
ChannelEventSubmitInput.sourceType
status?¶
Inherited from¶
ChannelEventSubmitInput.status
streamId?¶
Inherited from¶
ChannelEventSubmitInput.streamId
subject?¶
Inherited from¶
ChannelEventSubmitInput.subject
summary?¶
Inherited from¶
ChannelEventSubmitInput.summary
text?¶
Inherited from¶
turn?¶
Inherited from¶
verified?¶
Inherited from¶
ChannelEventSubmitInput.verified
Methods¶
onAssistantTextDelta()?¶
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¶
channel?¶
context¶
createdAt¶
id¶
lifecycle¶
updatedAt¶
events¶
messages¶
messages: {
aborted: boolean;
id: string;
intermediate: boolean;
offset: number;
reason?: string;
role: "user" | "assistant";
segments?: MessageSegment[];
text: string;
}[];
aborted¶
id¶
intermediate¶
offset¶
reason?¶
role¶
segments?¶
text¶
openPrompts¶
input¶
offset¶
promptId¶
widgetKind¶
snapshot¶
snapshot: {
activeJourneyId?: string;
activeStateIds: string[];
compactionSummary?: unknown;
conversationId: string;
definitionHash?: string;
journeyContext?: unknown;
lifecycle: string;
updatedAt: string;
};
activeJourneyId?¶
activeStateIds¶
compactionSummary?¶
conversationId¶
definitionHash?¶
journeyContext?¶
lifecycle¶
updatedAt¶
RuntimeSnapshotResult¶
Properties¶
snapshot¶
snapshot: {
activeJourneyId?: string;
activeStateIds: string[];
compactionSummary?: unknown;
conversationId: string;
definitionHash?: string;
journeyContext?: unknown;
lifecycle: string;
updatedAt: string;
};
activeJourneyId?¶
activeStateIds¶
compactionSummary?¶
conversationId¶
definitionHash?¶
journeyContext?¶
lifecycle¶
updatedAt¶
ScheduledChannelEventInput¶
Extends¶
ChannelEventSubmitInput\<TPayload,TRawPayload,TTurn>
Type Parameters¶
| Type Parameter | Default type |
|---|---|
TPayload |
NormalizedChannelPayloadInput |
TRawPayload |
unknown |
TTurn |
unknown |
Properties¶
actor?¶
Inherited from¶
agentId?¶
Inherited from¶
ChannelEventSubmitInput.agentId
app?¶
Inherited from¶
attachments?¶
Inherited from¶
ChannelEventSubmitInput.attachments
binding?¶
Inherited from¶
ChannelEventSubmitInput.binding
body?¶
Inherited from¶
channel¶
Overrides¶
ChannelEventSubmitInput.channel
conversationContext?¶
Inherited from¶
ChannelEventSubmitInput.conversationContext
conversationId?¶
Inherited from¶
ChannelEventSubmitInput.conversationId
createConversation?¶
Inherited from¶
ChannelEventSubmitInput.createConversation
dedupeKey?¶
Inherited from¶
ChannelEventSubmitInput.dedupeKey
deliveryId?¶
Inherited from¶
ChannelEventSubmitInput.deliveryId
direction?¶
Inherited from¶
ChannelEventSubmitInput.direction
event?¶
Inherited from¶
eventId?¶
Inherited from¶
ChannelEventSubmitInput.eventId
externalObjectIds?¶
Inherited from¶
ChannelEventSubmitInput.externalObjectIds
handling?¶
Inherited from¶
ChannelEventSubmitInput.handling
id?¶
Inherited from¶
idempotencyKey?¶
Inherited from¶
ChannelEventSubmitInput.idempotencyKey
identity?¶
Inherited from¶
ChannelEventSubmitInput.identity
identityKey?¶
Inherited from¶
ChannelEventSubmitInput.identityKey
identityMetadata?¶
Inherited from¶
ChannelEventSubmitInput.identityMetadata
identityStreamId?¶
Inherited from¶
ChannelEventSubmitInput.identityStreamId
intent?¶
Inherited from¶
ChannelEventSubmitInput.intent
kind?¶
Inherited from¶
message?¶
Inherited from¶
ChannelEventSubmitInput.message
metadata?¶
Inherited from¶
ChannelEventSubmitInput.metadata
nature?¶
Inherited from¶
ChannelEventSubmitInput.nature
occurredAt?¶
Inherited from¶
ChannelEventSubmitInput.occurredAt
payload?¶
Inherited from¶
ChannelEventSubmitInput.payload
provider?¶
Inherited from¶
ChannelEventSubmitInput.provider
providerObject?¶
Inherited from¶
ChannelEventSubmitInput.providerObject
providerPackageId?¶
Inherited from¶
ChannelEventSubmitInput.providerPackageId
raw?¶
Inherited from¶
receivedAt?¶
Inherited from¶
ChannelEventSubmitInput.receivedAt
sequence?¶
Inherited from¶
ChannelEventSubmitInput.sequence
signal?¶
Inherited from¶
ChannelEventSubmitInput.signal
source?¶
Inherited from¶
ChannelEventSubmitInput.source
sourceId?¶
Inherited from¶
ChannelEventSubmitInput.sourceId
sourceType?¶
optional sourceType?:
| "application"
| "provider-adapter"
| "schedule-adapter"
| "operator-surface";
Inherited from¶
ChannelEventSubmitInput.sourceType
status?¶
Inherited from¶
ChannelEventSubmitInput.status
streamId?¶
Inherited from¶
ChannelEventSubmitInput.streamId
subject?¶
Inherited from¶
ChannelEventSubmitInput.subject
summary?¶
Inherited from¶
ChannelEventSubmitInput.summary
text?¶
Inherited from¶
turn?¶
Inherited from¶
verified?¶
Inherited from¶
ChannelEventSubmitInput.verified
Methods¶
onAssistantTextDelta()?¶
Parameters¶
| Parameter | Type |
|---|---|
textDelta |
string |
Returns¶
void | Promise\<void>
Inherited from¶
ChannelEventSubmitInput.onAssistantTextDelta
SendMessageResult¶
Properties¶
activeJourneyId?¶
events¶
text¶
StartVoiceResult¶
Properties¶
channelSegment¶
channelSegment: {
channel: "voice";
conversationId: string;
endedAt?: string;
id: string;
startedAt: string;
};
channel¶
conversationId¶
endedAt?¶
id¶
startedAt¶
connection¶
connection: {
adapter: string;
channelSegmentId: string;
expiresAt?: string;
id: string;
provider?: string;
providerSessionId?: string;
status: string;
};
adapter¶
channelSegmentId¶
expiresAt?¶
id¶
provider?¶
providerSessionId?¶
status¶
conversation¶
conversation: {
agentId: string;
channel?: ConversationChannel;
context: unknown;
createdAt: string;
id: string;
lifecycle: string;
updatedAt: string;
};
agentId¶
channel?¶
context¶
createdAt¶
id¶
lifecycle¶
updatedAt¶
events¶
eventsUrl?¶
socket¶
expiresAt¶
protocol¶
token¶
url¶
SupportSourceLink¶
Properties¶
id¶
label¶
url?¶
UseChatOptions¶
Properties¶
agentId?¶
channel?¶
client¶
conversationId?¶
formatActivityLabel?¶
initialContext?¶
Methods¶
onConversationCreated()?¶
Parameters¶
| Parameter | Type |
|---|---|
conversationId |
string |
Returns¶
void
UseVoiceOptions¶
Properties¶
agentId?¶
app?¶
audioContext?¶
client¶
conversationId?¶
initialContext?¶
mediaConstraints?¶
WebSocket?¶
Parameters¶
| Parameter | Type |
|---|---|
url |
string | URL |
protocols? |
string | string[] |
Returns¶
WebSocket
Methods¶
onConnected()?¶
Parameters¶
| Parameter | Type |
|---|---|
result |
StartVoiceResult |
Returns¶
void
onConversationCreated()?¶
Parameters¶
| Parameter | Type |
|---|---|
conversationId |
string |
Returns¶
void
onEnded()?¶
Returns¶
void
onError()?¶
Parameters¶
| Parameter | Type |
|---|---|
error |
Error |
Returns¶
void
onEvent()?¶
Parameters¶
| Parameter | Type |
|---|---|
event |
VoiceProtocolServerEvent |
Returns¶
void
UseVoiceResult¶
Properties¶
channelSegmentId¶
connectionId¶
conversationId¶
error¶
localStream¶
muted¶
status¶
Methods¶
sendEvent()¶
Parameters¶
| Parameter | Type |
|---|---|
event |
VoiceProtocolClientEvent |
Returns¶
void
setMuted()¶
Parameters¶
| Parameter | Type |
|---|---|
muted |
boolean |
Returns¶
void
start()¶
Returns¶
Promise\<StartVoiceResult>
stop()¶
Returns¶
void
VoiceProtocolClient¶
Properties¶
socket¶
Methods¶
close()¶
Parameters¶
| Parameter | Type |
|---|---|
code? |
number |
reason? |
string |
Returns¶
void
sendEvent()¶
Parameters¶
| Parameter | Type |
|---|---|
event |
VoiceProtocolClientEvent |
Returns¶
void
VoiceProtocolClientOptions¶
Properties¶
protocols?¶
url¶
WebSocket?¶
Parameters¶
| Parameter | Type |
|---|---|
url |
string | URL |
protocols? |
string | string[] |
Returns¶
WebSocket
Methods¶
onClose()?¶
Parameters¶
| Parameter | Type |
|---|---|
event |
CloseEvent |
Returns¶
void
onError()?¶
Parameters¶
| Parameter | Type |
|---|---|
event |
Event |
Returns¶
void
onEvent()?¶
Parameters¶
| Parameter | Type |
|---|---|
event |
VoiceProtocolServerEvent |
Returns¶
void
onOpen()?¶
Returns¶
void
VoiceTurnChannelEventInput¶
Extends¶
ChannelEventSubmitInput\<TPayload,TRawPayload,TTurn>
Type Parameters¶
| Type Parameter | Default type |
|---|---|
TPayload |
NormalizedChannelPayloadInput |
TRawPayload |
unknown |
TTurn |
unknown |
Properties¶
actor?¶
Inherited from¶
agentId?¶
Inherited from¶
ChannelEventSubmitInput.agentId
app?¶
Inherited from¶
attachments?¶
Inherited from¶
ChannelEventSubmitInput.attachments
binding?¶
Inherited from¶
ChannelEventSubmitInput.binding
body?¶
Inherited from¶
channel?¶
Overrides¶
ChannelEventSubmitInput.channel
conversationContext?¶
Inherited from¶
ChannelEventSubmitInput.conversationContext
conversationId?¶
Inherited from¶
ChannelEventSubmitInput.conversationId
createConversation?¶
Inherited from¶
ChannelEventSubmitInput.createConversation
dedupeKey?¶
Inherited from¶
ChannelEventSubmitInput.dedupeKey
deliveryId?¶
Inherited from¶
ChannelEventSubmitInput.deliveryId
direction?¶
Inherited from¶
ChannelEventSubmitInput.direction
event?¶
Inherited from¶
eventId?¶
Inherited from¶
ChannelEventSubmitInput.eventId
externalObjectIds?¶
Inherited from¶
ChannelEventSubmitInput.externalObjectIds
handling?¶
Inherited from¶
ChannelEventSubmitInput.handling
id?¶
Inherited from¶
idempotencyKey?¶
Inherited from¶
ChannelEventSubmitInput.idempotencyKey
identity?¶
Inherited from¶
ChannelEventSubmitInput.identity
identityKey?¶
Inherited from¶
ChannelEventSubmitInput.identityKey
identityMetadata?¶
Inherited from¶
ChannelEventSubmitInput.identityMetadata
identityStreamId?¶
Inherited from¶
ChannelEventSubmitInput.identityStreamId
intent?¶
Inherited from¶
ChannelEventSubmitInput.intent
kind?¶
Inherited from¶
message?¶
Inherited from¶
ChannelEventSubmitInput.message
metadata?¶
Inherited from¶
ChannelEventSubmitInput.metadata
nature?¶
Inherited from¶
ChannelEventSubmitInput.nature
occurredAt?¶
Inherited from¶
ChannelEventSubmitInput.occurredAt
payload?¶
Inherited from¶
ChannelEventSubmitInput.payload
provider?¶
Inherited from¶
ChannelEventSubmitInput.provider
providerObject?¶
Inherited from¶
ChannelEventSubmitInput.providerObject
providerPackageId?¶
Inherited from¶
ChannelEventSubmitInput.providerPackageId
raw?¶
Inherited from¶
receivedAt?¶
Inherited from¶
ChannelEventSubmitInput.receivedAt
sequence?¶
Inherited from¶
ChannelEventSubmitInput.sequence
signal?¶
Inherited from¶
ChannelEventSubmitInput.signal
source?¶
Inherited from¶
ChannelEventSubmitInput.source
sourceId?¶
Inherited from¶
ChannelEventSubmitInput.sourceId
sourceType?¶
optional sourceType?:
| "application"
| "provider-adapter"
| "schedule-adapter"
| "operator-surface";
Inherited from¶
ChannelEventSubmitInput.sourceType
status?¶
Inherited from¶
ChannelEventSubmitInput.status
streamId?¶
Inherited from¶
ChannelEventSubmitInput.streamId
subject?¶
Inherited from¶
ChannelEventSubmitInput.subject
summary?¶
Inherited from¶
ChannelEventSubmitInput.summary
text?¶
Overrides¶
transcript?¶
turn?¶
Inherited from¶
verified?¶
Inherited from¶
ChannelEventSubmitInput.verified
Methods¶
onAssistantTextDelta()?¶
Parameters¶
| Parameter | Type |
|---|---|
textDelta |
string |
Returns¶
void | Promise\<void>
Inherited from¶
ChannelEventSubmitInput.onAssistantTextDelta
WidgetRendererProps¶
Properties¶
appearance?¶
disabled?¶
input¶
kind¶
output?¶
promptId¶
submitted?¶
Methods¶
submit()¶
Parameters¶
| Parameter | Type |
|---|---|
output |
unknown |
Returns¶
void
Type Aliases¶
ChannelEventActorInput¶
ChannelEventRequestBody¶
type ChannelEventRequestBody<TPayload, TTurn> = Omit<HandleChannelEventInput<TPayload, TTurn>, "signal" | "onAssistantTextDelta">;
Type Parameters¶
| Type Parameter | Default type |
|---|---|
TPayload |
NormalizedChannelPayloadInput |
TTurn |
unknown |
ChatActivityLabelFormatter¶
Parameters¶
| Parameter | Type |
|---|---|
input |
ChatActivityLabelInput |
Returns¶
string | undefined
ChatActivityLabelKind¶
type ChatActivityLabelKind =
| "response"
| "widget"
| "intent"
| "extraction"
| "action"
| "tool"
| "knowledge";
CognideskEventSourceFactory¶
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¶
CognideskRequestOptionsResolver¶
Parameters¶
| Parameter | Type |
|---|---|
context |
CognideskRequestContext |
Returns¶
CognideskRequestOptions | undefined
ResolveChannelOutputInput¶
Type Parameters¶
| Type Parameter | Default type |
|---|---|
TPayload |
unknown |
ResolveChannelOutputResult¶
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¶
Indexable¶
Properties¶
event_id?¶
type¶
WidgetRenderer¶
Parameters¶
| Parameter | Type |
|---|---|
props |
WidgetRendererProps |
Returns¶
ReactNode
WidgetRendererMap¶
Variables¶
defaultWidgetRenderers¶
Functions¶
ChatWidget()¶
Parameters¶
| Parameter | Type |
|---|---|
props |
ChatWidgetProps |
Returns¶
Element
collectSupportSourceLinks()¶
Parameters¶
| Parameter | Type |
|---|---|
references |
SupportReference[] |
Returns¶
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()¶
Parameters¶
| Parameter | Type |
|---|---|
options |
CognideskClientOptions |
Returns¶
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()¶
Parameters¶
| Parameter | Type |
|---|---|
options |
VoiceProtocolClientOptions |
Returns¶
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()¶
Parameters¶
| Parameter | Type |
|---|---|
references |
SupportReference[] |
Returns¶
string
reduceChatRuntimeEvent()¶
Parameters¶
| Parameter | Type |
|---|---|
state |
ChatEventReducerState |
event |
RuntimeEvent |
options? |
ChatEventReducerOptions |
Returns¶
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()¶
Parameters¶
| Parameter | Type |
|---|---|
options |
UseVoiceOptions |
Returns¶
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