cogito-client 1.0.45 → 1.0.48
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 +12 -3
- package/dist/index.js +2447 -2445
- package/dist/index.umd.cjs +6 -6
- package/package.json +50 -50
package/dist/index.d.ts
CHANGED
|
@@ -73,6 +73,13 @@ export declare interface CogitoAudioSurface {
|
|
|
73
73
|
|
|
74
74
|
export declare type CogitoBuiltInSurface = CogitoApprovalCardSurface | CogitoDataTableSurface | CogitoImageSurface | CogitoImageGallerySurface | CogitoVideoSurface | CogitoAudioSurface | CogitoTerminalSurface | CogitoQuestionFlowSurface | CogitoPreferencesPanelSurface | CogitoParameterSliderSurface | CogitoOptionListSurface | CogitoProgressTrackerSurface | CogitoPlanSurface | CogitoOrderSummarySurface | CogitoCitationSurface | CogitoCodeSurface | CogitoWeatherSurface | CogitoStatsDisplaySurface | CogitoItemCarouselSurface | CogitoChartSurface | CogitoLinkPreviewSurface;
|
|
75
75
|
|
|
76
|
+
export declare interface CogitoCallCompletedWebhook {
|
|
77
|
+
type?: "call-completed";
|
|
78
|
+
conversationId: string;
|
|
79
|
+
startTime?: string;
|
|
80
|
+
endTime?: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
76
83
|
export declare interface CogitoChartSurface {
|
|
77
84
|
type: "chart";
|
|
78
85
|
state: {
|
|
@@ -159,7 +166,7 @@ export declare interface CogitoCodeSurface {
|
|
|
159
166
|
export declare interface CogitoConfig {
|
|
160
167
|
agents?: CogitoAgent[];
|
|
161
168
|
webhooks?: {
|
|
162
|
-
events: "message"[];
|
|
169
|
+
events: ("message" | "call-completed")[];
|
|
163
170
|
uri: string;
|
|
164
171
|
[k: string]: unknown;
|
|
165
172
|
}[];
|
|
@@ -1296,11 +1303,11 @@ export declare interface CogitoWeatherSurface {
|
|
|
1296
1303
|
};
|
|
1297
1304
|
}
|
|
1298
1305
|
|
|
1299
|
-
export declare type CogitoWebhookPayload = CogitoMessageWebhook;
|
|
1306
|
+
export declare type CogitoWebhookPayload = CogitoMessageWebhook | CogitoCallCompletedWebhook;
|
|
1300
1307
|
|
|
1301
1308
|
export declare type ConnectionState = 'disconnected' | 'connecting' | 'connected' | 'error';
|
|
1302
1309
|
|
|
1303
|
-
export declare function useCogito({ mode, server, configuration, id }: UseCogitoOptions): {
|
|
1310
|
+
export declare function useCogito({ mode, server, configuration, applicationId, tenantId, id }: UseCogitoOptions): {
|
|
1304
1311
|
messages: CogitoMessage[];
|
|
1305
1312
|
connectionState: ConnectionState;
|
|
1306
1313
|
isLoading: boolean;
|
|
@@ -1321,6 +1328,8 @@ declare interface UseCogitoOptions {
|
|
|
1321
1328
|
server: string;
|
|
1322
1329
|
mode: ChatMode;
|
|
1323
1330
|
configuration: string;
|
|
1331
|
+
applicationId: string;
|
|
1332
|
+
tenantId: string;
|
|
1324
1333
|
/** Optional unique identifier for localStorage conversation key.
|
|
1325
1334
|
* When provided, each id gets its own conversation history.
|
|
1326
1335
|
* Without it, all agents share a single global conversation. */
|