@thisispamela/sdk 1.0.3 → 1.0.4

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/README.md CHANGED
@@ -25,6 +25,7 @@ const call = await client.createCall({
25
25
  to: '+1234567890',
26
26
  task: 'Order a large pizza for delivery',
27
27
  locale: 'en-US',
28
+ max_duration_seconds: 299,
28
29
  voice: 'female',
29
30
  agent_name: 'Pamela',
30
31
  caller_name: 'John from Acme',
@@ -256,6 +257,7 @@ All exceptions have:
256
257
  - `getCall(callId)` - Get call status and details
257
258
  - `listCalls(params?)` - List calls with optional filters
258
259
  - `cancelCall(callId)` - Cancel an in-progress call
260
+ - `hangupCall(callId)` - Force hangup an in-progress call
259
261
 
260
262
  ### Tools
261
263
 
package/dist/index.d.ts CHANGED
@@ -13,6 +13,7 @@ export interface CreateCallRequest {
13
13
  locale?: string;
14
14
  task: string;
15
15
  instructions?: string;
16
+ max_duration_seconds?: number;
16
17
  voice?: 'male' | 'female' | 'auto';
17
18
  agent_name?: string;
18
19
  caller_name?: string;
@@ -40,6 +41,7 @@ export interface CallStatus {
40
41
  started_at?: string;
41
42
  completed_at?: string;
42
43
  duration_seconds?: number;
44
+ max_duration_seconds?: number;
43
45
  transcript?: Array<Record<string, any>>;
44
46
  summary?: string;
45
47
  metadata: Record<string, any>;
@@ -114,6 +116,14 @@ export declare class PamelaClient {
114
116
  call_id: string;
115
117
  status: string;
116
118
  }>;
119
+ /**
120
+ * Force hangup an in-progress call.
121
+ */
122
+ hangupCall(callId: string): Promise<{
123
+ success: boolean;
124
+ call_id: string;
125
+ status: string;
126
+ }>;
117
127
  /**
118
128
  * Register a tool.
119
129
  */
package/dist/index.js CHANGED
@@ -161,6 +161,13 @@ class PamelaClient {
161
161
  const response = await this.client.post(`/calls/${callId}/cancel`);
162
162
  return response.data;
163
163
  }
164
+ /**
165
+ * Force hangup an in-progress call.
166
+ */
167
+ async hangupCall(callId) {
168
+ const response = await this.client.post(`/calls/${callId}/hangup`);
169
+ return response.data;
170
+ }
164
171
  /**
165
172
  * Register a tool.
166
173
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thisispamela/sdk",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Pamela Enterprise Voice API SDK for JavaScript/TypeScript",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -24,6 +24,7 @@ export interface CreateCallRequest {
24
24
  locale?: string;
25
25
  task: string;
26
26
  instructions?: string;
27
+ max_duration_seconds?: number;
27
28
  voice?: 'male' | 'female' | 'auto';
28
29
  agent_name?: string;
29
30
  caller_name?: string;
@@ -53,6 +54,7 @@ export interface CallStatus {
53
54
  started_at?: string;
54
55
  completed_at?: string;
55
56
  duration_seconds?: number;
57
+ max_duration_seconds?: number;
56
58
  transcript?: Array<Record<string, any>>;
57
59
  summary?: string;
58
60
  metadata: Record<string, any>;
@@ -225,6 +227,14 @@ export class PamelaClient {
225
227
  return response.data;
226
228
  }
227
229
 
230
+ /**
231
+ * Force hangup an in-progress call.
232
+ */
233
+ async hangupCall(callId: string): Promise<{ success: boolean; call_id: string; status: string }> {
234
+ const response = await this.client.post(`/calls/${callId}/hangup`);
235
+ return response.data;
236
+ }
237
+
228
238
  /**
229
239
  * Register a tool.
230
240
  */