@roarkanalytics/sdk 0.320.0 → 0.322.0

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.
@@ -1,39 +0,0 @@
1
- "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.CallAnalysis = void 0;
5
- const resource_1 = require("../resource.js");
6
- class CallAnalysis extends resource_1.APIResource {
7
- /**
8
- * Upload a new call recording
9
- *
10
- * @example
11
- * ```ts
12
- * const callAnalysis = await client.callAnalysis.create({
13
- * callDirection: 'INBOUND',
14
- * interfaceType: 'WEB',
15
- * participants: [{ role: 'AGENT' }, { role: 'CUSTOMER' }],
16
- * recordingUrl: 'https://example.com/recording.wav',
17
- * startedAt: '2025-06-02T13:42:03.028Z',
18
- * });
19
- * ```
20
- */
21
- create(body, options) {
22
- return this._client.post('/v1/call-analysis', { body, ...options });
23
- }
24
- /**
25
- * Fetch a call analysis job by ID
26
- *
27
- * @example
28
- * ```ts
29
- * const callAnalysis = await client.callAnalysis.retrieve(
30
- * 'jobId',
31
- * );
32
- * ```
33
- */
34
- retrieve(jobId, options) {
35
- return this._client.get(`/v1/call-analysis/${jobId}`, options);
36
- }
37
- }
38
- exports.CallAnalysis = CallAnalysis;
39
- //# sourceMappingURL=call-analysis.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"call-analysis.js","sourceRoot":"","sources":["../src/resources/call-analysis.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAG1C,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;;;;;;;;OAaG;IACH,MAAM,CACJ,IAA8B,EAC9B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,KAAa,EAAE,OAA6B;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;CACF;AAnCD,oCAmCC"}
@@ -1,35 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../resource.mjs";
3
- export class CallAnalysis extends APIResource {
4
- /**
5
- * Upload a new call recording
6
- *
7
- * @example
8
- * ```ts
9
- * const callAnalysis = await client.callAnalysis.create({
10
- * callDirection: 'INBOUND',
11
- * interfaceType: 'WEB',
12
- * participants: [{ role: 'AGENT' }, { role: 'CUSTOMER' }],
13
- * recordingUrl: 'https://example.com/recording.wav',
14
- * startedAt: '2025-06-02T13:42:03.028Z',
15
- * });
16
- * ```
17
- */
18
- create(body, options) {
19
- return this._client.post('/v1/call-analysis', { body, ...options });
20
- }
21
- /**
22
- * Fetch a call analysis job by ID
23
- *
24
- * @example
25
- * ```ts
26
- * const callAnalysis = await client.callAnalysis.retrieve(
27
- * 'jobId',
28
- * );
29
- * ```
30
- */
31
- retrieve(jobId, options) {
32
- return this._client.get(`/v1/call-analysis/${jobId}`, options);
33
- }
34
- }
35
- //# sourceMappingURL=call-analysis.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"call-analysis.mjs","sourceRoot":"","sources":["../src/resources/call-analysis.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;OAaG;IACH,MAAM,CACJ,IAA8B,EAC9B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,KAAa,EAAE,OAA6B;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;CACF"}
@@ -1,314 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../resource';
4
- import * as Core from '../core';
5
-
6
- export class CallAnalysis extends APIResource {
7
- /**
8
- * Upload a new call recording
9
- *
10
- * @example
11
- * ```ts
12
- * const callAnalysis = await client.callAnalysis.create({
13
- * callDirection: 'INBOUND',
14
- * interfaceType: 'WEB',
15
- * participants: [{ role: 'AGENT' }, { role: 'CUSTOMER' }],
16
- * recordingUrl: 'https://example.com/recording.wav',
17
- * startedAt: '2025-06-02T13:42:03.028Z',
18
- * });
19
- * ```
20
- */
21
- create(
22
- body: CallAnalysisCreateParams,
23
- options?: Core.RequestOptions,
24
- ): Core.APIPromise<CallAnalysisCreateResponse> {
25
- return this._client.post('/v1/call-analysis', { body, ...options });
26
- }
27
-
28
- /**
29
- * Fetch a call analysis job by ID
30
- *
31
- * @example
32
- * ```ts
33
- * const callAnalysis = await client.callAnalysis.retrieve(
34
- * 'jobId',
35
- * );
36
- * ```
37
- */
38
- retrieve(jobId: string, options?: Core.RequestOptions): Core.APIPromise<CallAnalysisRetrieveResponse> {
39
- return this._client.get(`/v1/call-analysis/${jobId}`, options);
40
- }
41
- }
42
-
43
- export interface CallAnalysisCreateResponse {
44
- /**
45
- * Analysis job with associated call context
46
- */
47
- data: CallAnalysisCreateResponse.Data;
48
- }
49
-
50
- export namespace CallAnalysisCreateResponse {
51
- /**
52
- * Analysis job with associated call context
53
- */
54
- export interface Data {
55
- call: Data.Call;
56
-
57
- /**
58
- * Analysis job ID for tracking progress
59
- */
60
- jobId: string;
61
-
62
- status: 'PENDING' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED';
63
- }
64
-
65
- export namespace Data {
66
- export interface Call {
67
- id: string;
68
-
69
- callDirection: 'INBOUND' | 'OUTBOUND';
70
-
71
- isTest: boolean;
72
-
73
- participants: Array<Call.Participant>;
74
-
75
- startedAt: string;
76
-
77
- status: 'RINGING' | 'IN_PROGRESS' | 'ENDED' | null;
78
-
79
- durationMs?: number | null;
80
-
81
- endedAt?: string | null;
82
-
83
- endedReason?: string | null;
84
-
85
- properties?: Record<string, unknown> | null;
86
-
87
- summary?: string | null;
88
- }
89
-
90
- export namespace Call {
91
- export interface Participant {
92
- role: 'AGENT' | 'CUSTOMER';
93
-
94
- isSimulated?: boolean;
95
-
96
- name?: string | null;
97
-
98
- phoneNumber?: string | null;
99
-
100
- spokeFirst?: boolean;
101
- }
102
- }
103
- }
104
- }
105
-
106
- export interface CallAnalysisRetrieveResponse {
107
- /**
108
- * Analysis job with associated call context
109
- */
110
- data: CallAnalysisRetrieveResponse.Data;
111
- }
112
-
113
- export namespace CallAnalysisRetrieveResponse {
114
- /**
115
- * Analysis job with associated call context
116
- */
117
- export interface Data {
118
- call: Data.Call;
119
-
120
- /**
121
- * Analysis job ID for tracking progress
122
- */
123
- jobId: string;
124
-
125
- status: 'PENDING' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED';
126
- }
127
-
128
- export namespace Data {
129
- export interface Call {
130
- id: string;
131
-
132
- callDirection: 'INBOUND' | 'OUTBOUND';
133
-
134
- isTest: boolean;
135
-
136
- participants: Array<Call.Participant>;
137
-
138
- startedAt: string;
139
-
140
- status: 'RINGING' | 'IN_PROGRESS' | 'ENDED' | null;
141
-
142
- durationMs?: number | null;
143
-
144
- endedAt?: string | null;
145
-
146
- endedReason?: string | null;
147
-
148
- properties?: Record<string, unknown> | null;
149
-
150
- summary?: string | null;
151
- }
152
-
153
- export namespace Call {
154
- export interface Participant {
155
- role: 'AGENT' | 'CUSTOMER';
156
-
157
- isSimulated?: boolean;
158
-
159
- name?: string | null;
160
-
161
- phoneNumber?: string | null;
162
-
163
- spokeFirst?: boolean;
164
- }
165
- }
166
- }
167
- }
168
-
169
- export interface CallAnalysisCreateParams {
170
- /**
171
- * Direction of the call (INBOUND or OUTBOUND)
172
- */
173
- callDirection: 'INBOUND' | 'OUTBOUND';
174
-
175
- /**
176
- * Interface type of the call (PHONE or WEB)
177
- */
178
- interfaceType: 'PHONE' | 'WEB';
179
-
180
- /**
181
- * Exactly two participants in the call
182
- */
183
- participants: Array<CallAnalysisCreateParams.Participant>;
184
-
185
- /**
186
- * URL of source recording (must be an accessible WAV or MP3 file). Can be a signed
187
- * URL.
188
- */
189
- recordingUrl: string;
190
-
191
- /**
192
- * When the call started (ISO 8601 format)
193
- */
194
- startedAt: string;
195
-
196
- /**
197
- * Additional context on why the call terminated with the endedStatus
198
- */
199
- endedReason?: string;
200
-
201
- /**
202
- * High-level call end status, indicating how the call terminated
203
- */
204
- endedStatus?:
205
- | 'AGENT_ENDED_CALL'
206
- | 'AGENT_TRANSFERRED_CALL'
207
- | 'AGENT_ERROR'
208
- | 'CUSTOMER_ENDED_CALL'
209
- | 'VOICE_MAIL_REACHED'
210
- | 'SILENCE_TIME_OUT'
211
- | 'PHONE_CALL_PROVIDER_CONNECTION_ERROR'
212
- | 'CUSTOMER_DID_NOT_ANSWER'
213
- | 'CUSTOMER_BUSY'
214
- | 'DIAL_ERROR'
215
- | 'MAX_DURATION_REACHED'
216
- | 'UNKNOWN';
217
-
218
- /**
219
- * Whether this is a test call
220
- */
221
- isTest?: boolean;
222
-
223
- /**
224
- * Custom properties to include with the call. These can be used for filtering and
225
- * will show in the call details page
226
- */
227
- properties?: Record<string, unknown>;
228
-
229
- /**
230
- * Retell call ID if call is being imported from Retell
231
- */
232
- retellCallId?: string;
233
-
234
- /**
235
- * URL of source stereo recording in WAV format. Must be accessible. Can be a
236
- * signed URL. While optional it allows for a richer audio player
237
- */
238
- stereoRecordingUrl?: string;
239
-
240
- /**
241
- * List of tool invocations made during the call
242
- */
243
- toolInvocations?: Array<CallAnalysisCreateParams.ToolInvocation>;
244
-
245
- /**
246
- * Vapi call ID if call is being imported from Vapi
247
- */
248
- vapiCallId?: string;
249
- }
250
-
251
- export namespace CallAnalysisCreateParams {
252
- export interface Participant {
253
- role: 'AGENT' | 'CUSTOMER';
254
-
255
- isSimulated?: boolean;
256
-
257
- name?: string | null;
258
-
259
- phoneNumber?: string | null;
260
-
261
- spokeFirst?: boolean;
262
- }
263
-
264
- export interface ToolInvocation {
265
- /**
266
- * Name of the tool that was invoked
267
- */
268
- name: string;
269
-
270
- /**
271
- * Parameters provided to the tool during invocation
272
- */
273
- parameters: Record<string, ToolInvocation.UnionMember0 | unknown>;
274
-
275
- /**
276
- * Result returned by the tool after execution. Can be a string or a JSON object
277
- */
278
- result: string | Record<string, unknown>;
279
-
280
- /**
281
- * Offset in milliseconds from the start of the call when the tool was invoked
282
- */
283
- startOffsetMs: number;
284
-
285
- /**
286
- * Description of when the tool should be invoked
287
- */
288
- description?: string;
289
-
290
- /**
291
- * Offset in milliseconds from the start of the call when the tool execution
292
- * completed. Used to calculate duration of the tool execution
293
- */
294
- endOffsetMs?: number;
295
- }
296
-
297
- export namespace ToolInvocation {
298
- export interface UnionMember0 {
299
- description?: string;
300
-
301
- type?: 'string' | 'number' | 'boolean';
302
-
303
- value?: unknown;
304
- }
305
- }
306
- }
307
-
308
- export declare namespace CallAnalysis {
309
- export {
310
- type CallAnalysisCreateResponse as CallAnalysisCreateResponse,
311
- type CallAnalysisRetrieveResponse as CallAnalysisRetrieveResponse,
312
- type CallAnalysisCreateParams as CallAnalysisCreateParams,
313
- };
314
- }