cogito-client 1.0.50 → 1.0.51
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 +14 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -84,6 +84,14 @@ export declare interface CogitoCallCompletedWebhook {
|
|
|
84
84
|
messages?: CogitoMessage[];
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
+
export declare interface CogitoCallStartedWebhook {
|
|
88
|
+
type?: "call-started";
|
|
89
|
+
conversationId: string;
|
|
90
|
+
callSid?: string;
|
|
91
|
+
from?: string;
|
|
92
|
+
to?: string;
|
|
93
|
+
}
|
|
94
|
+
|
|
87
95
|
export declare interface CogitoChartSurface {
|
|
88
96
|
type: "chart";
|
|
89
97
|
state: {
|
|
@@ -188,7 +196,7 @@ export declare interface CogitoConfig {
|
|
|
188
196
|
};
|
|
189
197
|
agents: CogitoAgent[];
|
|
190
198
|
webhooks?: {
|
|
191
|
-
events: ("message" | "call-completed")[];
|
|
199
|
+
events: ("message" | "call-completed" | "call-started")[];
|
|
192
200
|
uri: string;
|
|
193
201
|
[k: string]: unknown;
|
|
194
202
|
}[];
|
|
@@ -202,6 +210,10 @@ export declare interface CogitoConversation {
|
|
|
202
210
|
from?: string;
|
|
203
211
|
to?: string;
|
|
204
212
|
twilioCallSid?: string;
|
|
213
|
+
/**
|
|
214
|
+
* If specified, Cogito will make a POST to this URL with the call identifier (e.g. sid) to record and a file name to associate it with e.g. call.mp3
|
|
215
|
+
*/
|
|
216
|
+
recordCallUrl?: string;
|
|
205
217
|
/**
|
|
206
218
|
* The URL to use to blind transfer calls
|
|
207
219
|
*/
|
|
@@ -1327,7 +1339,7 @@ export declare interface CogitoWeatherSurface {
|
|
|
1327
1339
|
};
|
|
1328
1340
|
}
|
|
1329
1341
|
|
|
1330
|
-
export declare type CogitoWebhookPayload = CogitoMessageWebhook | CogitoCallCompletedWebhook;
|
|
1342
|
+
export declare type CogitoWebhookPayload = CogitoMessageWebhook | CogitoCallCompletedWebhook | CogitoCallStartedWebhook;
|
|
1331
1343
|
|
|
1332
1344
|
export declare type ConnectionState = 'disconnected' | 'connecting' | 'connected' | 'error';
|
|
1333
1345
|
|