cogito-client 1.0.49 → 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.
Files changed (2) hide show
  1. package/dist/index.d.ts +17 -2
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -76,10 +76,20 @@ export declare type CogitoBuiltInSurface = CogitoApprovalCardSurface | CogitoDat
76
76
  export declare interface CogitoCallCompletedWebhook {
77
77
  type?: "call-completed";
78
78
  conversationId: string;
79
+ callSid?: string;
79
80
  from?: string;
80
81
  to?: string;
81
82
  startTime?: string;
82
83
  endTime?: string;
84
+ messages?: CogitoMessage[];
85
+ }
86
+
87
+ export declare interface CogitoCallStartedWebhook {
88
+ type?: "call-started";
89
+ conversationId: string;
90
+ callSid?: string;
91
+ from?: string;
92
+ to?: string;
83
93
  }
84
94
 
85
95
  export declare interface CogitoChartSurface {
@@ -186,7 +196,7 @@ export declare interface CogitoConfig {
186
196
  };
187
197
  agents: CogitoAgent[];
188
198
  webhooks?: {
189
- events: ("message" | "call-completed")[];
199
+ events: ("message" | "call-completed" | "call-started")[];
190
200
  uri: string;
191
201
  [k: string]: unknown;
192
202
  }[];
@@ -199,6 +209,11 @@ export declare interface CogitoConversation {
199
209
  configuration: CogitoConfig;
200
210
  from?: string;
201
211
  to?: string;
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;
202
217
  /**
203
218
  * The URL to use to blind transfer calls
204
219
  */
@@ -1324,7 +1339,7 @@ export declare interface CogitoWeatherSurface {
1324
1339
  };
1325
1340
  }
1326
1341
 
1327
- export declare type CogitoWebhookPayload = CogitoMessageWebhook | CogitoCallCompletedWebhook;
1342
+ export declare type CogitoWebhookPayload = CogitoMessageWebhook | CogitoCallCompletedWebhook | CogitoCallStartedWebhook;
1328
1343
 
1329
1344
  export declare type ConnectionState = 'disconnected' | 'connecting' | 'connected' | 'error';
1330
1345
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cogito-client",
3
- "version": "1.0.49",
3
+ "version": "1.0.51",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"