@roarkanalytics/sdk 0.325.0 → 0.326.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.
- package/CHANGELOG.md +9 -0
- package/README.md +18 -12
- package/index.d.mts +2 -2
- package/index.d.ts +2 -2
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -1
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/evaluation.d.ts +273 -0
- package/resources/evaluation.d.ts.map +1 -1
- package/resources/evaluation.js +19 -0
- package/resources/evaluation.js.map +1 -1
- package/resources/evaluation.mjs +19 -0
- package/resources/evaluation.mjs.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/src/index.ts +16 -2
- package/src/resources/evaluation.ts +396 -1
- package/src/resources/index.ts +8 -1
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.326.0 (2025-06-04)
|
4
|
+
|
5
|
+
Full Changelog: [v0.325.0...v0.326.0](https://github.com/roarkhq/sdk-roark-analytics-node/compare/v0.325.0...v0.326.0)
|
6
|
+
|
7
|
+
### Features
|
8
|
+
|
9
|
+
* **api:** api update ([23e99b6](https://github.com/roarkhq/sdk-roark-analytics-node/commit/23e99b6f14c02edb15dde099087a9ae4ef08c374))
|
10
|
+
* **api:** api update ([57a490c](https://github.com/roarkhq/sdk-roark-analytics-node/commit/57a490c3e6cf6fa151a000437682981bb11035f0))
|
11
|
+
|
3
12
|
## 0.325.0 (2025-06-04)
|
4
13
|
|
5
14
|
Full Changelog: [v0.324.0...v0.325.0](https://github.com/roarkhq/sdk-roark-analytics-node/compare/v0.324.0...v0.325.0)
|
package/README.md
CHANGED
@@ -27,9 +27,9 @@ const client = new Roark({
|
|
27
27
|
});
|
28
28
|
|
29
29
|
async function main() {
|
30
|
-
const
|
30
|
+
const response = await client.evaluation.createJob({ evaluators: ['string'] });
|
31
31
|
|
32
|
-
console.log(
|
32
|
+
console.log(response.data);
|
33
33
|
}
|
34
34
|
|
35
35
|
main();
|
@@ -48,7 +48,8 @@ const client = new Roark({
|
|
48
48
|
});
|
49
49
|
|
50
50
|
async function main() {
|
51
|
-
const
|
51
|
+
const params: Roark.EvaluationCreateJobParams = { evaluators: ['string'] };
|
52
|
+
const response: Roark.EvaluationCreateJobResponse = await client.evaluation.createJob(params);
|
52
53
|
}
|
53
54
|
|
54
55
|
main();
|
@@ -65,7 +66,7 @@ a subclass of `APIError` will be thrown:
|
|
65
66
|
<!-- prettier-ignore -->
|
66
67
|
```ts
|
67
68
|
async function main() {
|
68
|
-
const
|
69
|
+
const response = await client.evaluation.createJob({ evaluators: ['string'] }).catch(async (err) => {
|
69
70
|
if (err instanceof Roark.APIError) {
|
70
71
|
console.log(err.status); // 400
|
71
72
|
console.log(err.name); // BadRequestError
|
@@ -108,7 +109,7 @@ const client = new Roark({
|
|
108
109
|
});
|
109
110
|
|
110
111
|
// Or, configure per-request:
|
111
|
-
await client.
|
112
|
+
await client.evaluation.createJob({ evaluators: ['string'] }, {
|
112
113
|
maxRetries: 5,
|
113
114
|
});
|
114
115
|
```
|
@@ -125,7 +126,7 @@ const client = new Roark({
|
|
125
126
|
});
|
126
127
|
|
127
128
|
// Override per-request:
|
128
|
-
await client.
|
129
|
+
await client.evaluation.createJob({ evaluators: ['string'] }, {
|
129
130
|
timeout: 5 * 1000,
|
130
131
|
});
|
131
132
|
```
|
@@ -146,13 +147,15 @@ You can also use the `.withResponse()` method to get the raw `Response` along wi
|
|
146
147
|
```ts
|
147
148
|
const client = new Roark();
|
148
149
|
|
149
|
-
const response = await client.
|
150
|
+
const response = await client.evaluation.createJob({ evaluators: ['string'] }).asResponse();
|
150
151
|
console.log(response.headers.get('X-My-Header'));
|
151
152
|
console.log(response.statusText); // access the underlying Response object
|
152
153
|
|
153
|
-
const { data:
|
154
|
+
const { data: response, response: raw } = await client.evaluation
|
155
|
+
.createJob({ evaluators: ['string'] })
|
156
|
+
.withResponse();
|
154
157
|
console.log(raw.headers.get('X-My-Header'));
|
155
|
-
console.log(
|
158
|
+
console.log(response.data);
|
156
159
|
```
|
157
160
|
|
158
161
|
### Making custom/undocumented requests
|
@@ -256,9 +259,12 @@ const client = new Roark({
|
|
256
259
|
});
|
257
260
|
|
258
261
|
// Override per-request:
|
259
|
-
await client.
|
260
|
-
|
261
|
-
|
262
|
+
await client.evaluation.createJob(
|
263
|
+
{ evaluators: ['string'] },
|
264
|
+
{
|
265
|
+
httpAgent: new http.Agent({ keepAlive: false }),
|
266
|
+
},
|
267
|
+
);
|
262
268
|
```
|
263
269
|
|
264
270
|
## Semantic versioning
|
package/index.d.mts
CHANGED
@@ -3,7 +3,7 @@ import * as Core from "./core.js";
|
|
3
3
|
import * as Errors from "./error.js";
|
4
4
|
import * as Uploads from "./uploads.js";
|
5
5
|
import * as API from "./resources/index.js";
|
6
|
-
import { Evaluation } from "./resources/evaluation.js";
|
6
|
+
import { Evaluation, EvaluationCreateJobParams, EvaluationCreateJobResponse, EvaluationGetJobResponse, EvaluationGetJobRunsParams, EvaluationGetJobRunsResponse } from "./resources/evaluation.js";
|
7
7
|
import { Health, HealthGetResponse } from "./resources/health.js";
|
8
8
|
export interface ClientOptions {
|
9
9
|
/**
|
@@ -105,7 +105,7 @@ export declare class Roark extends Core.APIClient {
|
|
105
105
|
export declare namespace Roark {
|
106
106
|
export type RequestOptions = Core.RequestOptions;
|
107
107
|
export { Health as Health, type HealthGetResponse as HealthGetResponse };
|
108
|
-
export { Evaluation as Evaluation };
|
108
|
+
export { Evaluation as Evaluation, type EvaluationCreateJobResponse as EvaluationCreateJobResponse, type EvaluationGetJobResponse as EvaluationGetJobResponse, type EvaluationGetJobRunsResponse as EvaluationGetJobRunsResponse, type EvaluationCreateJobParams as EvaluationCreateJobParams, type EvaluationGetJobRunsParams as EvaluationGetJobRunsParams, };
|
109
109
|
}
|
110
110
|
export { toFile, fileFromPath } from "./uploads.js";
|
111
111
|
export { RoarkError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./error.js";
|
package/index.d.ts
CHANGED
@@ -3,7 +3,7 @@ import * as Core from "./core.js";
|
|
3
3
|
import * as Errors from "./error.js";
|
4
4
|
import * as Uploads from "./uploads.js";
|
5
5
|
import * as API from "./resources/index.js";
|
6
|
-
import { Evaluation } from "./resources/evaluation.js";
|
6
|
+
import { Evaluation, EvaluationCreateJobParams, EvaluationCreateJobResponse, EvaluationGetJobResponse, EvaluationGetJobRunsParams, EvaluationGetJobRunsResponse } from "./resources/evaluation.js";
|
7
7
|
import { Health, HealthGetResponse } from "./resources/health.js";
|
8
8
|
export interface ClientOptions {
|
9
9
|
/**
|
@@ -105,7 +105,7 @@ export declare class Roark extends Core.APIClient {
|
|
105
105
|
export declare namespace Roark {
|
106
106
|
export type RequestOptions = Core.RequestOptions;
|
107
107
|
export { Health as Health, type HealthGetResponse as HealthGetResponse };
|
108
|
-
export { Evaluation as Evaluation };
|
108
|
+
export { Evaluation as Evaluation, type EvaluationCreateJobResponse as EvaluationCreateJobResponse, type EvaluationGetJobResponse as EvaluationGetJobResponse, type EvaluationGetJobRunsResponse as EvaluationGetJobRunsResponse, type EvaluationCreateJobParams as EvaluationCreateJobParams, type EvaluationGetJobRunsParams as EvaluationGetJobRunsParams, };
|
109
109
|
}
|
110
110
|
export { toFile, fileFromPath } from "./uploads.js";
|
111
111
|
export { RoarkError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./error.js";
|
package/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,GAAG,MAAM,mBAAmB,CAAC;AACzC,OAAO,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,GAAG,MAAM,mBAAmB,CAAC;AACzC,OAAO,EACL,UAAU,EACV,yBAAyB,EACzB,2BAA2B,EAC3B,wBAAwB,EACxB,0BAA0B,EAC1B,4BAA4B,EAC7B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAEpC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE7B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC;IAE9B;;;;;OAKG;IACH,KAAK,CAAC,EAAE,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;IAE/B;;;;;OAKG;IACH,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,MAAM,wBAAkB;IAC/B,MAAM,CAAC,YAAY,8BAAwB;CAC5C;AAID,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC;IAEjD,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;IAEzE,OAAO,EACL,UAAU,IAAI,UAAU,EACxB,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH;AAED,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EACL,UAAU,EACV,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,SAAS,CAAC;AAEjB,eAAe,KAAK,CAAC"}
|
package/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtF,gDAA+B;AAC/B,mDAAkC;AAClC,sDAAqC;AACrC,0DAAyC;AACzC,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtF,gDAA+B;AAC/B,mDAAkC;AAClC,sDAAqC;AACrC,0DAAyC;AACzC,0DAOgC;AAChC,kDAA+D;AAiE/D;;GAEG;AACH,MAAa,KAAM,SAAQ,IAAI,CAAC,SAAS;IAK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B,iHAAA,wBAAwB,OAAA;AAG1B,kBAAe,KAAK,CAAC"}
|
package/index.mjs
CHANGED
@@ -4,7 +4,7 @@ import * as Core from "./core.mjs";
|
|
4
4
|
import * as Errors from "./error.mjs";
|
5
5
|
import * as Uploads from "./uploads.mjs";
|
6
6
|
import * as API from "./resources/index.mjs";
|
7
|
-
import { Evaluation } from "./resources/evaluation.mjs";
|
7
|
+
import { Evaluation, } from "./resources/evaluation.mjs";
|
8
8
|
import { Health } from "./resources/health.mjs";
|
9
9
|
/**
|
10
10
|
* API Client for interfacing with the Roark API.
|
package/index.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,KAAK,IAAI;OACT,KAAK,MAAM;OACX,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,KAAK,IAAI;OACT,KAAK,MAAM;OACX,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EACL,UAAU,GAMX;OACM,EAAE,MAAM,EAAqB;AAiEpC;;GAEG;AACH,MAAM,OAAO,KAAM,SAAQ,IAAI,CAAC,SAAS;IAKvC;;;;;;;;;;;OAWG;IACH,YAAY,EACV,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,EACxC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,EACpD,GAAG,IAAI,KACU,EAAE;QACnB,IAAI,WAAW,KAAK,SAAS,EAAE;YAC7B,MAAM,IAAI,MAAM,CAAC,UAAU,CACzB,yMAAyM,CAC1M,CAAC;SACH;QAED,MAAM,OAAO,GAAkB;YAC7B,WAAW;YACX,GAAG,IAAI;YACP,OAAO,EAAE,OAAO,IAAI,sBAAsB;SAC3C,CAAC;QAEF,KAAK,CAAC;YACJ,OA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;AACvC,qBAAe,GAAG,MAAM,CAAC,eAAe,CAAC;AACzC,yBAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACjD,yBAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACjD,2BAAqB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACrD,8BAAwB,GAAG,MAAM,CAAC,wBAAwB,CAAC;AAE3D,YAAM,GAAG,OAAO,CAAC,MAAM,CAAC;AACxB,kBAAY,GAAG,OAAO,CAAC,YAAY,CAAC;AAG7C,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;AACtB,KAAK,CAAC,UAAU,GAAG,UAAU,CAAC;OAgBvB,EAAE,MAAM,EAAE,YAAY,EAAE;OACxB,EACL,UAAU,EACV,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,GACzB;AAED,eAAe,KAAK,CAAC"}
|
package/package.json
CHANGED
@@ -1,4 +1,277 @@
|
|
1
1
|
import { APIResource } from "../resource.js";
|
2
|
+
import * as Core from "../core.js";
|
2
3
|
export declare class Evaluation extends APIResource {
|
4
|
+
/**
|
5
|
+
* Create a evaluation job for a single call or dataset of calls
|
6
|
+
*/
|
7
|
+
createJob(body: EvaluationCreateJobParams, options?: Core.RequestOptions): Core.APIPromise<EvaluationCreateJobResponse>;
|
8
|
+
/**
|
9
|
+
* Retrieve details of a specific evaluation job
|
10
|
+
*/
|
11
|
+
getJob(jobId: string, options?: Core.RequestOptions): Core.APIPromise<unknown>;
|
12
|
+
/**
|
13
|
+
* Retrieve paginated details of a specific evaluation job runs
|
14
|
+
*/
|
15
|
+
getJobRuns(jobId: string, query?: EvaluationGetJobRunsParams, options?: Core.RequestOptions): Core.APIPromise<unknown>;
|
16
|
+
getJobRuns(jobId: string, options?: Core.RequestOptions): Core.APIPromise<unknown>;
|
17
|
+
}
|
18
|
+
export interface EvaluationCreateJobResponse {
|
19
|
+
data: EvaluationCreateJobResponse.Data;
|
20
|
+
}
|
21
|
+
export declare namespace EvaluationCreateJobResponse {
|
22
|
+
interface Data {
|
23
|
+
/**
|
24
|
+
* ID of the evaluation job
|
25
|
+
*/
|
26
|
+
jobId: string;
|
27
|
+
/**
|
28
|
+
* Status of the evaluation job
|
29
|
+
*/
|
30
|
+
status: 'PENDING' | 'PROCESSING' | 'SUCCESS' | 'FAILURE';
|
31
|
+
}
|
32
|
+
}
|
33
|
+
export type EvaluationGetJobResponse = unknown;
|
34
|
+
export type EvaluationGetJobRunsResponse = unknown;
|
35
|
+
export interface EvaluationCreateJobParams {
|
36
|
+
/**
|
37
|
+
* List of evaluators slugs to evaluate the calls or "all" to evaluate all
|
38
|
+
* evaluators
|
39
|
+
*/
|
40
|
+
evaluators: Array<string> | 'all';
|
41
|
+
/**
|
42
|
+
* Call input to evaluate
|
43
|
+
*/
|
44
|
+
call?: EvaluationCreateJobParams.Call;
|
45
|
+
dataset?: EvaluationCreateJobParams.Dataset;
|
46
|
+
}
|
47
|
+
export declare namespace EvaluationCreateJobParams {
|
48
|
+
/**
|
49
|
+
* Call input to evaluate
|
50
|
+
*/
|
51
|
+
interface Call {
|
52
|
+
/**
|
53
|
+
* Direction of the call (INBOUND or OUTBOUND)
|
54
|
+
*/
|
55
|
+
callDirection: 'INBOUND' | 'OUTBOUND';
|
56
|
+
/**
|
57
|
+
* Interface type of the call (PHONE or WEB)
|
58
|
+
*/
|
59
|
+
interfaceType: 'PHONE' | 'WEB';
|
60
|
+
/**
|
61
|
+
* Exactly two participants in the call
|
62
|
+
*/
|
63
|
+
participants: Array<Call.Participant>;
|
64
|
+
/**
|
65
|
+
* URL of source recording (must be an accessible WAV or MP3 file). Can be a signed
|
66
|
+
* URL.
|
67
|
+
*/
|
68
|
+
recordingUrl: string;
|
69
|
+
/**
|
70
|
+
* When the call started (ISO 8601 format)
|
71
|
+
*/
|
72
|
+
startedAt: string;
|
73
|
+
/**
|
74
|
+
* Additional context on why the call terminated with the endedStatus
|
75
|
+
*/
|
76
|
+
endedReason?: string;
|
77
|
+
/**
|
78
|
+
* High-level call end status, indicating how the call terminated
|
79
|
+
*/
|
80
|
+
endedStatus?: 'AGENT_ENDED_CALL' | 'AGENT_TRANSFERRED_CALL' | 'AGENT_ERROR' | 'CUSTOMER_ENDED_CALL' | 'VOICE_MAIL_REACHED' | 'SILENCE_TIME_OUT' | 'PHONE_CALL_PROVIDER_CONNECTION_ERROR' | 'CUSTOMER_DID_NOT_ANSWER' | 'CUSTOMER_BUSY' | 'DIAL_ERROR' | 'MAX_DURATION_REACHED' | 'UNKNOWN';
|
81
|
+
/**
|
82
|
+
* Whether this is a test call
|
83
|
+
*/
|
84
|
+
isTest?: boolean;
|
85
|
+
/**
|
86
|
+
* Custom properties to include with the call. These can be used for filtering and
|
87
|
+
* will show in the call details page
|
88
|
+
*/
|
89
|
+
properties?: Record<string, unknown>;
|
90
|
+
/**
|
91
|
+
* Retell call ID if call is being imported from Retell
|
92
|
+
*/
|
93
|
+
retellCallId?: string;
|
94
|
+
/**
|
95
|
+
* URL of source stereo recording in WAV format. Must be accessible. Can be a
|
96
|
+
* signed URL. While optional it allows for a richer audio player
|
97
|
+
*/
|
98
|
+
stereoRecordingUrl?: string;
|
99
|
+
/**
|
100
|
+
* List of tool invocations made during the call
|
101
|
+
*/
|
102
|
+
toolInvocations?: Array<Call.ToolInvocation>;
|
103
|
+
/**
|
104
|
+
* Vapi call ID if call is being imported from Vapi
|
105
|
+
*/
|
106
|
+
vapiCallId?: string;
|
107
|
+
}
|
108
|
+
namespace Call {
|
109
|
+
interface Participant {
|
110
|
+
role: 'AGENT' | 'CUSTOMER';
|
111
|
+
isSimulated?: boolean;
|
112
|
+
name?: string | null;
|
113
|
+
phoneNumber?: string | null;
|
114
|
+
spokeFirst?: boolean;
|
115
|
+
}
|
116
|
+
interface ToolInvocation {
|
117
|
+
/**
|
118
|
+
* Name of the tool that was invoked
|
119
|
+
*/
|
120
|
+
name: string;
|
121
|
+
/**
|
122
|
+
* Parameters provided to the tool during invocation
|
123
|
+
*/
|
124
|
+
parameters: Record<string, ToolInvocation.UnionMember0 | unknown>;
|
125
|
+
/**
|
126
|
+
* Result returned by the tool after execution. Can be a string or a JSON object
|
127
|
+
*/
|
128
|
+
result: string | Record<string, unknown>;
|
129
|
+
/**
|
130
|
+
* Offset in milliseconds from the start of the call when the tool was invoked
|
131
|
+
*/
|
132
|
+
startOffsetMs: number;
|
133
|
+
/**
|
134
|
+
* Description of when the tool should be invoked
|
135
|
+
*/
|
136
|
+
description?: string;
|
137
|
+
/**
|
138
|
+
* Offset in milliseconds from the start of the call when the tool execution
|
139
|
+
* completed. Used to calculate duration of the tool execution
|
140
|
+
*/
|
141
|
+
endOffsetMs?: number;
|
142
|
+
}
|
143
|
+
namespace ToolInvocation {
|
144
|
+
interface UnionMember0 {
|
145
|
+
description?: string;
|
146
|
+
type?: 'string' | 'number' | 'boolean';
|
147
|
+
value?: unknown;
|
148
|
+
}
|
149
|
+
}
|
150
|
+
}
|
151
|
+
interface Dataset {
|
152
|
+
/**
|
153
|
+
* List of calls input to evaluate
|
154
|
+
*/
|
155
|
+
calls: Array<Dataset.Call>;
|
156
|
+
/**
|
157
|
+
* Name of the dataset
|
158
|
+
*/
|
159
|
+
name: string;
|
160
|
+
}
|
161
|
+
namespace Dataset {
|
162
|
+
interface Call {
|
163
|
+
/**
|
164
|
+
* Direction of the call (INBOUND or OUTBOUND)
|
165
|
+
*/
|
166
|
+
callDirection: 'INBOUND' | 'OUTBOUND';
|
167
|
+
/**
|
168
|
+
* Interface type of the call (PHONE or WEB)
|
169
|
+
*/
|
170
|
+
interfaceType: 'PHONE' | 'WEB';
|
171
|
+
/**
|
172
|
+
* Exactly two participants in the call
|
173
|
+
*/
|
174
|
+
participants: Array<Call.Participant>;
|
175
|
+
/**
|
176
|
+
* URL of source recording (must be an accessible WAV or MP3 file). Can be a signed
|
177
|
+
* URL.
|
178
|
+
*/
|
179
|
+
recordingUrl: string;
|
180
|
+
/**
|
181
|
+
* When the call started (ISO 8601 format)
|
182
|
+
*/
|
183
|
+
startedAt: string;
|
184
|
+
/**
|
185
|
+
* Additional context on why the call terminated with the endedStatus
|
186
|
+
*/
|
187
|
+
endedReason?: string;
|
188
|
+
/**
|
189
|
+
* High-level call end status, indicating how the call terminated
|
190
|
+
*/
|
191
|
+
endedStatus?: 'AGENT_ENDED_CALL' | 'AGENT_TRANSFERRED_CALL' | 'AGENT_ERROR' | 'CUSTOMER_ENDED_CALL' | 'VOICE_MAIL_REACHED' | 'SILENCE_TIME_OUT' | 'PHONE_CALL_PROVIDER_CONNECTION_ERROR' | 'CUSTOMER_DID_NOT_ANSWER' | 'CUSTOMER_BUSY' | 'DIAL_ERROR' | 'MAX_DURATION_REACHED' | 'UNKNOWN';
|
192
|
+
/**
|
193
|
+
* Whether this is a test call
|
194
|
+
*/
|
195
|
+
isTest?: boolean;
|
196
|
+
/**
|
197
|
+
* Custom properties to include with the call. These can be used for filtering and
|
198
|
+
* will show in the call details page
|
199
|
+
*/
|
200
|
+
properties?: Record<string, unknown>;
|
201
|
+
/**
|
202
|
+
* Retell call ID if call is being imported from Retell
|
203
|
+
*/
|
204
|
+
retellCallId?: string;
|
205
|
+
/**
|
206
|
+
* URL of source stereo recording in WAV format. Must be accessible. Can be a
|
207
|
+
* signed URL. While optional it allows for a richer audio player
|
208
|
+
*/
|
209
|
+
stereoRecordingUrl?: string;
|
210
|
+
/**
|
211
|
+
* List of tool invocations made during the call
|
212
|
+
*/
|
213
|
+
toolInvocations?: Array<Call.ToolInvocation>;
|
214
|
+
/**
|
215
|
+
* Vapi call ID if call is being imported from Vapi
|
216
|
+
*/
|
217
|
+
vapiCallId?: string;
|
218
|
+
}
|
219
|
+
namespace Call {
|
220
|
+
interface Participant {
|
221
|
+
role: 'AGENT' | 'CUSTOMER';
|
222
|
+
isSimulated?: boolean;
|
223
|
+
name?: string | null;
|
224
|
+
phoneNumber?: string | null;
|
225
|
+
spokeFirst?: boolean;
|
226
|
+
}
|
227
|
+
interface ToolInvocation {
|
228
|
+
/**
|
229
|
+
* Name of the tool that was invoked
|
230
|
+
*/
|
231
|
+
name: string;
|
232
|
+
/**
|
233
|
+
* Parameters provided to the tool during invocation
|
234
|
+
*/
|
235
|
+
parameters: Record<string, ToolInvocation.UnionMember0 | unknown>;
|
236
|
+
/**
|
237
|
+
* Result returned by the tool after execution. Can be a string or a JSON object
|
238
|
+
*/
|
239
|
+
result: string | Record<string, unknown>;
|
240
|
+
/**
|
241
|
+
* Offset in milliseconds from the start of the call when the tool was invoked
|
242
|
+
*/
|
243
|
+
startOffsetMs: number;
|
244
|
+
/**
|
245
|
+
* Description of when the tool should be invoked
|
246
|
+
*/
|
247
|
+
description?: string;
|
248
|
+
/**
|
249
|
+
* Offset in milliseconds from the start of the call when the tool execution
|
250
|
+
* completed. Used to calculate duration of the tool execution
|
251
|
+
*/
|
252
|
+
endOffsetMs?: number;
|
253
|
+
}
|
254
|
+
namespace ToolInvocation {
|
255
|
+
interface UnionMember0 {
|
256
|
+
description?: string;
|
257
|
+
type?: 'string' | 'number' | 'boolean';
|
258
|
+
value?: unknown;
|
259
|
+
}
|
260
|
+
}
|
261
|
+
}
|
262
|
+
}
|
263
|
+
}
|
264
|
+
export interface EvaluationGetJobRunsParams {
|
265
|
+
/**
|
266
|
+
* Number of items to return per page
|
267
|
+
*/
|
268
|
+
limit?: string;
|
269
|
+
/**
|
270
|
+
* Cursor for the next page of items
|
271
|
+
*/
|
272
|
+
nextCursor?: string;
|
273
|
+
}
|
274
|
+
export declare namespace Evaluation {
|
275
|
+
export { type EvaluationCreateJobResponse as EvaluationCreateJobResponse, type EvaluationGetJobResponse as EvaluationGetJobResponse, type EvaluationGetJobRunsResponse as EvaluationGetJobRunsResponse, type EvaluationCreateJobParams as EvaluationCreateJobParams, type EvaluationGetJobRunsParams as EvaluationGetJobRunsParams, };
|
3
276
|
}
|
4
277
|
//# sourceMappingURL=evaluation.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"evaluation.d.ts","sourceRoot":"","sources":["../src/resources/evaluation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,qBAAa,UAAW,SAAQ,WAAW;
|
1
|
+
{"version":3,"file":"evaluation.d.ts","sourceRoot":"","sources":["../src/resources/evaluation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,qBAAa,UAAW,SAAQ,WAAW;IACzC;;OAEG;IACH,SAAS,CACP,IAAI,EAAE,yBAAyB,EAC/B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,2BAA2B,CAAC;IAI/C;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;IAI9E;;OAEG;IACH,UAAU,CACR,KAAK,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,0BAA0B,EAClC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;IAC3B,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;CAWnF;AAED,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,2BAA2B,CAAC,IAAI,CAAC;CACxC;AAED,yBAAiB,2BAA2B,CAAC;IAC3C,UAAiB,IAAI;QACnB;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,MAAM,EAAE,SAAS,GAAG,YAAY,GAAG,SAAS,GAAG,SAAS,CAAC;KAC1D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AEzC;;mBAEG;gBACH,aAAa,EAAE,MAAM,CAAC;gBAEtB;;mBAEG;gBACH,WAAW,CAAC,EAAE,MAAM,CAAC;gBAErB;;;mBAGG;gBACH,WAAW,CAAC,EAAE,MAAM,CAAC;aACtB;YAED,UAAiB,cAAc,CAAC;gBAC9B,UAAiB,YAAY;oBAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;oBAErB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;oBAEvC,KAAK,CAAC,EAAE,OAAO,CAAC;iBACjB;aACF;SACF;KACF;CACF;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
|
package/resources/evaluation.js
CHANGED
@@ -3,7 +3,26 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4
4
|
exports.Evaluation = void 0;
|
5
5
|
const resource_1 = require("../resource.js");
|
6
|
+
const core_1 = require("../core.js");
|
6
7
|
class Evaluation extends resource_1.APIResource {
|
8
|
+
/**
|
9
|
+
* Create a evaluation job for a single call or dataset of calls
|
10
|
+
*/
|
11
|
+
createJob(body, options) {
|
12
|
+
return this._client.post('/v1/evaluation/job', { body, ...options });
|
13
|
+
}
|
14
|
+
/**
|
15
|
+
* Retrieve details of a specific evaluation job
|
16
|
+
*/
|
17
|
+
getJob(jobId, options) {
|
18
|
+
return this._client.get(`/v1/evaluation/job/${jobId}`, options);
|
19
|
+
}
|
20
|
+
getJobRuns(jobId, query = {}, options) {
|
21
|
+
if ((0, core_1.isRequestOptions)(query)) {
|
22
|
+
return this.getJobRuns(jobId, {}, query);
|
23
|
+
}
|
24
|
+
return this._client.get(`/v1/evaluation/job/${jobId}/runs`, { query, ...options });
|
25
|
+
}
|
7
26
|
}
|
8
27
|
exports.Evaluation = Evaluation;
|
9
28
|
//# sourceMappingURL=evaluation.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"evaluation.js","sourceRoot":"","sources":["../src/resources/evaluation.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;
|
1
|
+
{"version":3,"file":"evaluation.js","sourceRoot":"","sources":["../src/resources/evaluation.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAC1C,qCAA2C;AAG3C,MAAa,UAAW,SAAQ,sBAAW;IACzC;;OAEG;IACH,SAAS,CACP,IAA+B,EAC/B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,KAAa,EAAE,OAA6B;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAWD,UAAU,CACR,KAAa,EACb,QAA0D,EAAE,EAC5D,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SAC1C;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,KAAK,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF;AArCD,gCAqCC"}
|
package/resources/evaluation.mjs
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
2
|
import { APIResource } from "../resource.mjs";
|
3
|
+
import { isRequestOptions } from "../core.mjs";
|
3
4
|
export class Evaluation extends APIResource {
|
5
|
+
/**
|
6
|
+
* Create a evaluation job for a single call or dataset of calls
|
7
|
+
*/
|
8
|
+
createJob(body, options) {
|
9
|
+
return this._client.post('/v1/evaluation/job', { body, ...options });
|
10
|
+
}
|
11
|
+
/**
|
12
|
+
* Retrieve details of a specific evaluation job
|
13
|
+
*/
|
14
|
+
getJob(jobId, options) {
|
15
|
+
return this._client.get(`/v1/evaluation/job/${jobId}`, options);
|
16
|
+
}
|
17
|
+
getJobRuns(jobId, query = {}, options) {
|
18
|
+
if (isRequestOptions(query)) {
|
19
|
+
return this.getJobRuns(jobId, {}, query);
|
20
|
+
}
|
21
|
+
return this._client.get(`/v1/evaluation/job/${jobId}/runs`, { query, ...options });
|
22
|
+
}
|
4
23
|
}
|
5
24
|
//# sourceMappingURL=evaluation.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"evaluation.mjs","sourceRoot":"","sources":["../src/resources/evaluation.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
1
|
+
{"version":3,"file":"evaluation.mjs","sourceRoot":"","sources":["../src/resources/evaluation.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;AAG3B,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;OAEG;IACH,SAAS,CACP,IAA+B,EAC/B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,KAAa,EAAE,OAA6B;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAWD,UAAU,CACR,KAAa,EACb,QAA0D,EAAE,EAC5D,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SAC1C;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,KAAK,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF"}
|
package/resources/index.d.ts
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
export { Evaluation } from "./evaluation.js";
|
1
|
+
export { Evaluation, type EvaluationCreateJobResponse, type EvaluationGetJobResponse, type EvaluationGetJobRunsResponse, type EvaluationCreateJobParams, type EvaluationGetJobRunsParams, } from "./evaluation.js";
|
2
2
|
export { Health, type HealthGetResponse } from "./health.js";
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/resources/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,OAAO,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EACV,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,GAChC,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAC"}
|
package/resources/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,8CAOsB;AANpB,wGAAA,UAAU,OAAA;AAOZ,sCAA0D;AAAjD,gGAAA,MAAM,OAAA"}
|
package/resources/index.mjs
CHANGED
package/resources/index.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,UAAU,GAMX;OACM,EAAE,MAAM,EAA0B"}
|
package/src/index.ts
CHANGED
@@ -5,7 +5,14 @@ import * as Core from './core';
|
|
5
5
|
import * as Errors from './error';
|
6
6
|
import * as Uploads from './uploads';
|
7
7
|
import * as API from './resources/index';
|
8
|
-
import {
|
8
|
+
import {
|
9
|
+
Evaluation,
|
10
|
+
EvaluationCreateJobParams,
|
11
|
+
EvaluationCreateJobResponse,
|
12
|
+
EvaluationGetJobResponse,
|
13
|
+
EvaluationGetJobRunsParams,
|
14
|
+
EvaluationGetJobRunsResponse,
|
15
|
+
} from './resources/evaluation';
|
9
16
|
import { Health, HealthGetResponse } from './resources/health';
|
10
17
|
|
11
18
|
export interface ClientOptions {
|
@@ -167,7 +174,14 @@ export declare namespace Roark {
|
|
167
174
|
|
168
175
|
export { Health as Health, type HealthGetResponse as HealthGetResponse };
|
169
176
|
|
170
|
-
export {
|
177
|
+
export {
|
178
|
+
Evaluation as Evaluation,
|
179
|
+
type EvaluationCreateJobResponse as EvaluationCreateJobResponse,
|
180
|
+
type EvaluationGetJobResponse as EvaluationGetJobResponse,
|
181
|
+
type EvaluationGetJobRunsResponse as EvaluationGetJobRunsResponse,
|
182
|
+
type EvaluationCreateJobParams as EvaluationCreateJobParams,
|
183
|
+
type EvaluationGetJobRunsParams as EvaluationGetJobRunsParams,
|
184
|
+
};
|
171
185
|
}
|
172
186
|
|
173
187
|
export { toFile, fileFromPath } from './uploads';
|
@@ -1,5 +1,400 @@
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
2
|
|
3
3
|
import { APIResource } from '../resource';
|
4
|
+
import { isRequestOptions } from '../core';
|
5
|
+
import * as Core from '../core';
|
4
6
|
|
5
|
-
export class Evaluation extends APIResource {
|
7
|
+
export class Evaluation extends APIResource {
|
8
|
+
/**
|
9
|
+
* Create a evaluation job for a single call or dataset of calls
|
10
|
+
*/
|
11
|
+
createJob(
|
12
|
+
body: EvaluationCreateJobParams,
|
13
|
+
options?: Core.RequestOptions,
|
14
|
+
): Core.APIPromise<EvaluationCreateJobResponse> {
|
15
|
+
return this._client.post('/v1/evaluation/job', { body, ...options });
|
16
|
+
}
|
17
|
+
|
18
|
+
/**
|
19
|
+
* Retrieve details of a specific evaluation job
|
20
|
+
*/
|
21
|
+
getJob(jobId: string, options?: Core.RequestOptions): Core.APIPromise<unknown> {
|
22
|
+
return this._client.get(`/v1/evaluation/job/${jobId}`, options);
|
23
|
+
}
|
24
|
+
|
25
|
+
/**
|
26
|
+
* Retrieve paginated details of a specific evaluation job runs
|
27
|
+
*/
|
28
|
+
getJobRuns(
|
29
|
+
jobId: string,
|
30
|
+
query?: EvaluationGetJobRunsParams,
|
31
|
+
options?: Core.RequestOptions,
|
32
|
+
): Core.APIPromise<unknown>;
|
33
|
+
getJobRuns(jobId: string, options?: Core.RequestOptions): Core.APIPromise<unknown>;
|
34
|
+
getJobRuns(
|
35
|
+
jobId: string,
|
36
|
+
query: EvaluationGetJobRunsParams | Core.RequestOptions = {},
|
37
|
+
options?: Core.RequestOptions,
|
38
|
+
): Core.APIPromise<unknown> {
|
39
|
+
if (isRequestOptions(query)) {
|
40
|
+
return this.getJobRuns(jobId, {}, query);
|
41
|
+
}
|
42
|
+
return this._client.get(`/v1/evaluation/job/${jobId}/runs`, { query, ...options });
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
export interface EvaluationCreateJobResponse {
|
47
|
+
data: EvaluationCreateJobResponse.Data;
|
48
|
+
}
|
49
|
+
|
50
|
+
export namespace EvaluationCreateJobResponse {
|
51
|
+
export interface Data {
|
52
|
+
/**
|
53
|
+
* ID of the evaluation job
|
54
|
+
*/
|
55
|
+
jobId: string;
|
56
|
+
|
57
|
+
/**
|
58
|
+
* Status of the evaluation job
|
59
|
+
*/
|
60
|
+
status: 'PENDING' | 'PROCESSING' | 'SUCCESS' | 'FAILURE';
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
export type EvaluationGetJobResponse = unknown;
|
65
|
+
|
66
|
+
export type EvaluationGetJobRunsResponse = unknown;
|
67
|
+
|
68
|
+
export interface EvaluationCreateJobParams {
|
69
|
+
/**
|
70
|
+
* List of evaluators slugs to evaluate the calls or "all" to evaluate all
|
71
|
+
* evaluators
|
72
|
+
*/
|
73
|
+
evaluators: Array<string> | 'all';
|
74
|
+
|
75
|
+
/**
|
76
|
+
* Call input to evaluate
|
77
|
+
*/
|
78
|
+
call?: EvaluationCreateJobParams.Call;
|
79
|
+
|
80
|
+
dataset?: EvaluationCreateJobParams.Dataset;
|
81
|
+
}
|
82
|
+
|
83
|
+
export namespace EvaluationCreateJobParams {
|
84
|
+
/**
|
85
|
+
* Call input to evaluate
|
86
|
+
*/
|
87
|
+
export interface Call {
|
88
|
+
/**
|
89
|
+
* Direction of the call (INBOUND or OUTBOUND)
|
90
|
+
*/
|
91
|
+
callDirection: 'INBOUND' | 'OUTBOUND';
|
92
|
+
|
93
|
+
/**
|
94
|
+
* Interface type of the call (PHONE or WEB)
|
95
|
+
*/
|
96
|
+
interfaceType: 'PHONE' | 'WEB';
|
97
|
+
|
98
|
+
/**
|
99
|
+
* Exactly two participants in the call
|
100
|
+
*/
|
101
|
+
participants: Array<Call.Participant>;
|
102
|
+
|
103
|
+
/**
|
104
|
+
* URL of source recording (must be an accessible WAV or MP3 file). Can be a signed
|
105
|
+
* URL.
|
106
|
+
*/
|
107
|
+
recordingUrl: string;
|
108
|
+
|
109
|
+
/**
|
110
|
+
* When the call started (ISO 8601 format)
|
111
|
+
*/
|
112
|
+
startedAt: string;
|
113
|
+
|
114
|
+
/**
|
115
|
+
* Additional context on why the call terminated with the endedStatus
|
116
|
+
*/
|
117
|
+
endedReason?: string;
|
118
|
+
|
119
|
+
/**
|
120
|
+
* High-level call end status, indicating how the call terminated
|
121
|
+
*/
|
122
|
+
endedStatus?:
|
123
|
+
| 'AGENT_ENDED_CALL'
|
124
|
+
| 'AGENT_TRANSFERRED_CALL'
|
125
|
+
| 'AGENT_ERROR'
|
126
|
+
| 'CUSTOMER_ENDED_CALL'
|
127
|
+
| 'VOICE_MAIL_REACHED'
|
128
|
+
| 'SILENCE_TIME_OUT'
|
129
|
+
| 'PHONE_CALL_PROVIDER_CONNECTION_ERROR'
|
130
|
+
| 'CUSTOMER_DID_NOT_ANSWER'
|
131
|
+
| 'CUSTOMER_BUSY'
|
132
|
+
| 'DIAL_ERROR'
|
133
|
+
| 'MAX_DURATION_REACHED'
|
134
|
+
| 'UNKNOWN';
|
135
|
+
|
136
|
+
/**
|
137
|
+
* Whether this is a test call
|
138
|
+
*/
|
139
|
+
isTest?: boolean;
|
140
|
+
|
141
|
+
/**
|
142
|
+
* Custom properties to include with the call. These can be used for filtering and
|
143
|
+
* will show in the call details page
|
144
|
+
*/
|
145
|
+
properties?: Record<string, unknown>;
|
146
|
+
|
147
|
+
/**
|
148
|
+
* Retell call ID if call is being imported from Retell
|
149
|
+
*/
|
150
|
+
retellCallId?: string;
|
151
|
+
|
152
|
+
/**
|
153
|
+
* URL of source stereo recording in WAV format. Must be accessible. Can be a
|
154
|
+
* signed URL. While optional it allows for a richer audio player
|
155
|
+
*/
|
156
|
+
stereoRecordingUrl?: string;
|
157
|
+
|
158
|
+
/**
|
159
|
+
* List of tool invocations made during the call
|
160
|
+
*/
|
161
|
+
toolInvocations?: Array<Call.ToolInvocation>;
|
162
|
+
|
163
|
+
/**
|
164
|
+
* Vapi call ID if call is being imported from Vapi
|
165
|
+
*/
|
166
|
+
vapiCallId?: string;
|
167
|
+
}
|
168
|
+
|
169
|
+
export namespace Call {
|
170
|
+
export interface Participant {
|
171
|
+
role: 'AGENT' | 'CUSTOMER';
|
172
|
+
|
173
|
+
isSimulated?: boolean;
|
174
|
+
|
175
|
+
name?: string | null;
|
176
|
+
|
177
|
+
phoneNumber?: string | null;
|
178
|
+
|
179
|
+
spokeFirst?: boolean;
|
180
|
+
}
|
181
|
+
|
182
|
+
export interface ToolInvocation {
|
183
|
+
/**
|
184
|
+
* Name of the tool that was invoked
|
185
|
+
*/
|
186
|
+
name: string;
|
187
|
+
|
188
|
+
/**
|
189
|
+
* Parameters provided to the tool during invocation
|
190
|
+
*/
|
191
|
+
parameters: Record<string, ToolInvocation.UnionMember0 | unknown>;
|
192
|
+
|
193
|
+
/**
|
194
|
+
* Result returned by the tool after execution. Can be a string or a JSON object
|
195
|
+
*/
|
196
|
+
result: string | Record<string, unknown>;
|
197
|
+
|
198
|
+
/**
|
199
|
+
* Offset in milliseconds from the start of the call when the tool was invoked
|
200
|
+
*/
|
201
|
+
startOffsetMs: number;
|
202
|
+
|
203
|
+
/**
|
204
|
+
* Description of when the tool should be invoked
|
205
|
+
*/
|
206
|
+
description?: string;
|
207
|
+
|
208
|
+
/**
|
209
|
+
* Offset in milliseconds from the start of the call when the tool execution
|
210
|
+
* completed. Used to calculate duration of the tool execution
|
211
|
+
*/
|
212
|
+
endOffsetMs?: number;
|
213
|
+
}
|
214
|
+
|
215
|
+
export namespace ToolInvocation {
|
216
|
+
export interface UnionMember0 {
|
217
|
+
description?: string;
|
218
|
+
|
219
|
+
type?: 'string' | 'number' | 'boolean';
|
220
|
+
|
221
|
+
value?: unknown;
|
222
|
+
}
|
223
|
+
}
|
224
|
+
}
|
225
|
+
|
226
|
+
export interface Dataset {
|
227
|
+
/**
|
228
|
+
* List of calls input to evaluate
|
229
|
+
*/
|
230
|
+
calls: Array<Dataset.Call>;
|
231
|
+
|
232
|
+
/**
|
233
|
+
* Name of the dataset
|
234
|
+
*/
|
235
|
+
name: string;
|
236
|
+
}
|
237
|
+
|
238
|
+
export namespace Dataset {
|
239
|
+
export interface Call {
|
240
|
+
/**
|
241
|
+
* Direction of the call (INBOUND or OUTBOUND)
|
242
|
+
*/
|
243
|
+
callDirection: 'INBOUND' | 'OUTBOUND';
|
244
|
+
|
245
|
+
/**
|
246
|
+
* Interface type of the call (PHONE or WEB)
|
247
|
+
*/
|
248
|
+
interfaceType: 'PHONE' | 'WEB';
|
249
|
+
|
250
|
+
/**
|
251
|
+
* Exactly two participants in the call
|
252
|
+
*/
|
253
|
+
participants: Array<Call.Participant>;
|
254
|
+
|
255
|
+
/**
|
256
|
+
* URL of source recording (must be an accessible WAV or MP3 file). Can be a signed
|
257
|
+
* URL.
|
258
|
+
*/
|
259
|
+
recordingUrl: string;
|
260
|
+
|
261
|
+
/**
|
262
|
+
* When the call started (ISO 8601 format)
|
263
|
+
*/
|
264
|
+
startedAt: string;
|
265
|
+
|
266
|
+
/**
|
267
|
+
* Additional context on why the call terminated with the endedStatus
|
268
|
+
*/
|
269
|
+
endedReason?: string;
|
270
|
+
|
271
|
+
/**
|
272
|
+
* High-level call end status, indicating how the call terminated
|
273
|
+
*/
|
274
|
+
endedStatus?:
|
275
|
+
| 'AGENT_ENDED_CALL'
|
276
|
+
| 'AGENT_TRANSFERRED_CALL'
|
277
|
+
| 'AGENT_ERROR'
|
278
|
+
| 'CUSTOMER_ENDED_CALL'
|
279
|
+
| 'VOICE_MAIL_REACHED'
|
280
|
+
| 'SILENCE_TIME_OUT'
|
281
|
+
| 'PHONE_CALL_PROVIDER_CONNECTION_ERROR'
|
282
|
+
| 'CUSTOMER_DID_NOT_ANSWER'
|
283
|
+
| 'CUSTOMER_BUSY'
|
284
|
+
| 'DIAL_ERROR'
|
285
|
+
| 'MAX_DURATION_REACHED'
|
286
|
+
| 'UNKNOWN';
|
287
|
+
|
288
|
+
/**
|
289
|
+
* Whether this is a test call
|
290
|
+
*/
|
291
|
+
isTest?: boolean;
|
292
|
+
|
293
|
+
/**
|
294
|
+
* Custom properties to include with the call. These can be used for filtering and
|
295
|
+
* will show in the call details page
|
296
|
+
*/
|
297
|
+
properties?: Record<string, unknown>;
|
298
|
+
|
299
|
+
/**
|
300
|
+
* Retell call ID if call is being imported from Retell
|
301
|
+
*/
|
302
|
+
retellCallId?: string;
|
303
|
+
|
304
|
+
/**
|
305
|
+
* URL of source stereo recording in WAV format. Must be accessible. Can be a
|
306
|
+
* signed URL. While optional it allows for a richer audio player
|
307
|
+
*/
|
308
|
+
stereoRecordingUrl?: string;
|
309
|
+
|
310
|
+
/**
|
311
|
+
* List of tool invocations made during the call
|
312
|
+
*/
|
313
|
+
toolInvocations?: Array<Call.ToolInvocation>;
|
314
|
+
|
315
|
+
/**
|
316
|
+
* Vapi call ID if call is being imported from Vapi
|
317
|
+
*/
|
318
|
+
vapiCallId?: string;
|
319
|
+
}
|
320
|
+
|
321
|
+
export namespace Call {
|
322
|
+
export interface Participant {
|
323
|
+
role: 'AGENT' | 'CUSTOMER';
|
324
|
+
|
325
|
+
isSimulated?: boolean;
|
326
|
+
|
327
|
+
name?: string | null;
|
328
|
+
|
329
|
+
phoneNumber?: string | null;
|
330
|
+
|
331
|
+
spokeFirst?: boolean;
|
332
|
+
}
|
333
|
+
|
334
|
+
export interface ToolInvocation {
|
335
|
+
/**
|
336
|
+
* Name of the tool that was invoked
|
337
|
+
*/
|
338
|
+
name: string;
|
339
|
+
|
340
|
+
/**
|
341
|
+
* Parameters provided to the tool during invocation
|
342
|
+
*/
|
343
|
+
parameters: Record<string, ToolInvocation.UnionMember0 | unknown>;
|
344
|
+
|
345
|
+
/**
|
346
|
+
* Result returned by the tool after execution. Can be a string or a JSON object
|
347
|
+
*/
|
348
|
+
result: string | Record<string, unknown>;
|
349
|
+
|
350
|
+
/**
|
351
|
+
* Offset in milliseconds from the start of the call when the tool was invoked
|
352
|
+
*/
|
353
|
+
startOffsetMs: number;
|
354
|
+
|
355
|
+
/**
|
356
|
+
* Description of when the tool should be invoked
|
357
|
+
*/
|
358
|
+
description?: string;
|
359
|
+
|
360
|
+
/**
|
361
|
+
* Offset in milliseconds from the start of the call when the tool execution
|
362
|
+
* completed. Used to calculate duration of the tool execution
|
363
|
+
*/
|
364
|
+
endOffsetMs?: number;
|
365
|
+
}
|
366
|
+
|
367
|
+
export namespace ToolInvocation {
|
368
|
+
export interface UnionMember0 {
|
369
|
+
description?: string;
|
370
|
+
|
371
|
+
type?: 'string' | 'number' | 'boolean';
|
372
|
+
|
373
|
+
value?: unknown;
|
374
|
+
}
|
375
|
+
}
|
376
|
+
}
|
377
|
+
}
|
378
|
+
}
|
379
|
+
|
380
|
+
export interface EvaluationGetJobRunsParams {
|
381
|
+
/**
|
382
|
+
* Number of items to return per page
|
383
|
+
*/
|
384
|
+
limit?: string;
|
385
|
+
|
386
|
+
/**
|
387
|
+
* Cursor for the next page of items
|
388
|
+
*/
|
389
|
+
nextCursor?: string;
|
390
|
+
}
|
391
|
+
|
392
|
+
export declare namespace Evaluation {
|
393
|
+
export {
|
394
|
+
type EvaluationCreateJobResponse as EvaluationCreateJobResponse,
|
395
|
+
type EvaluationGetJobResponse as EvaluationGetJobResponse,
|
396
|
+
type EvaluationGetJobRunsResponse as EvaluationGetJobRunsResponse,
|
397
|
+
type EvaluationCreateJobParams as EvaluationCreateJobParams,
|
398
|
+
type EvaluationGetJobRunsParams as EvaluationGetJobRunsParams,
|
399
|
+
};
|
400
|
+
}
|
package/src/resources/index.ts
CHANGED
@@ -1,4 +1,11 @@
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
2
|
|
3
|
-
export {
|
3
|
+
export {
|
4
|
+
Evaluation,
|
5
|
+
type EvaluationCreateJobResponse,
|
6
|
+
type EvaluationGetJobResponse,
|
7
|
+
type EvaluationGetJobRunsResponse,
|
8
|
+
type EvaluationCreateJobParams,
|
9
|
+
type EvaluationGetJobRunsParams,
|
10
|
+
} from './evaluation';
|
4
11
|
export { Health, type HealthGetResponse } from './health';
|
package/src/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const VERSION = '0.
|
1
|
+
export const VERSION = '0.326.0'; // x-release-please-version
|
package/version.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const VERSION = "0.
|
1
|
+
export declare const VERSION = "0.326.0";
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export const VERSION = '0.
|
1
|
+
export const VERSION = '0.326.0'; // x-release-please-version
|
2
2
|
//# sourceMappingURL=version.mjs.map
|