cogito-client 1.0.43 → 1.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +39 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -164,6 +164,16 @@ export declare interface CogitoConfig {
|
|
|
164
164
|
export declare interface CogitoConversation {
|
|
165
165
|
id: string;
|
|
166
166
|
configuration: CogitoConfig;
|
|
167
|
+
from?: string;
|
|
168
|
+
to?: string;
|
|
169
|
+
/**
|
|
170
|
+
* The URL to use to blind transfer calls
|
|
171
|
+
*/
|
|
172
|
+
phoneBlindTransferUrl?: string;
|
|
173
|
+
/**
|
|
174
|
+
* The LiveKit trunk ID for the outbound trunk
|
|
175
|
+
*/
|
|
176
|
+
phoneOutboundSipTrunkId?: string;
|
|
167
177
|
messages: CogitoMessage[];
|
|
168
178
|
[k: string]: unknown;
|
|
169
179
|
}
|
|
@@ -289,7 +299,26 @@ export declare interface CogitoFunctionTool {
|
|
|
289
299
|
export declare interface CogitoHandoffTool {
|
|
290
300
|
type: "handoff";
|
|
291
301
|
description?: string;
|
|
292
|
-
|
|
302
|
+
targetType?: "agent" | "phone_blind" | "phone_warm";
|
|
303
|
+
/**
|
|
304
|
+
* The channel specific address of the target e.g. to transfer to another agent, use the ID of the agent, to transfer to a phone use the e164 number to transfer to
|
|
305
|
+
*/
|
|
306
|
+
targetAddress?: string;
|
|
307
|
+
/**
|
|
308
|
+
* The name of the party transferring to
|
|
309
|
+
*/
|
|
310
|
+
targetName?: string;
|
|
311
|
+
/**
|
|
312
|
+
* The message to say to the caller before putting them on hold during the transfer process
|
|
313
|
+
*/
|
|
314
|
+
messageToCaller?: string;
|
|
315
|
+
/**
|
|
316
|
+
* A templated message to the party being transferred to. You can insert parameter values into this message e.g. 'I have {caller_name} on the line
|
|
317
|
+
*/
|
|
318
|
+
messageToTransfer?: string;
|
|
319
|
+
/**
|
|
320
|
+
* The object parameters used for the tool definition that will be provided to the LLM, e.g. you could supply a caller_name and reason_for_call property to collect those from the caller
|
|
321
|
+
*/
|
|
293
322
|
parameters?: {
|
|
294
323
|
[k: string]: unknown;
|
|
295
324
|
};
|
|
@@ -428,6 +457,12 @@ export declare interface CogitoMessagePayload {
|
|
|
428
457
|
message: CogitoMessage;
|
|
429
458
|
}
|
|
430
459
|
|
|
460
|
+
export declare interface CogitoMessageWebhook {
|
|
461
|
+
type?: "message";
|
|
462
|
+
role: string;
|
|
463
|
+
content: string;
|
|
464
|
+
}
|
|
465
|
+
|
|
431
466
|
export declare interface CogitoOptionListSurface {
|
|
432
467
|
type: "option-list";
|
|
433
468
|
state: {
|
|
@@ -787,7 +822,7 @@ export declare interface CogitoReadyPayload {
|
|
|
787
822
|
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
788
823
|
* and run json-schema-to-typescript to regenerate this file.
|
|
789
824
|
*/
|
|
790
|
-
export declare type CogitoSchema = CogitoConfig | CogitoMessage | CogitoConversation | CogitoPayload | CogitoSurfaceDefinition | CogitoSurfaceUpdate | CogitoBuiltInSurface;
|
|
825
|
+
export declare type CogitoSchema = CogitoConfig | CogitoMessage | CogitoWebhookPayload | CogitoConversation | CogitoPayload | CogitoSurfaceDefinition | CogitoSurfaceUpdate | CogitoBuiltInSurface;
|
|
791
826
|
|
|
792
827
|
export declare interface CogitoStatsDisplaySurface {
|
|
793
828
|
type: "stats-display";
|
|
@@ -1255,6 +1290,8 @@ export declare interface CogitoWeatherSurface {
|
|
|
1255
1290
|
};
|
|
1256
1291
|
}
|
|
1257
1292
|
|
|
1293
|
+
export declare type CogitoWebhookPayload = CogitoMessageWebhook;
|
|
1294
|
+
|
|
1258
1295
|
export declare type ConnectionState = 'disconnected' | 'connecting' | 'connected' | 'error';
|
|
1259
1296
|
|
|
1260
1297
|
export declare function useCogito({ mode, server, configuration }: UseCogitoOptions): {
|