@roarkanalytics/sdk 0.323.0 → 0.325.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 +17 -0
- package/README.md +12 -18
- package/index.d.mts +3 -3
- package/index.d.ts +3 -3
- package/index.d.ts.map +1 -1
- package/index.js +3 -3
- package/index.js.map +1 -1
- package/index.mjs +3 -3
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/evaluation.d.ts +4 -0
- package/resources/evaluation.d.ts.map +1 -0
- package/resources/evaluation.js +9 -0
- package/resources/evaluation.js.map +1 -0
- package/resources/evaluation.mjs +5 -0
- package/resources/evaluation.mjs.map +1 -0
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/src/index.ts +4 -8
- package/src/resources/evaluation.ts +5 -0
- package/src/resources/index.ts +1 -1
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/evaluations.d.ts +0 -255
- package/resources/evaluations.d.ts.map +0 -1
- package/resources/evaluations.js +0 -15
- package/resources/evaluations.js.map +0 -1
- package/resources/evaluations.mjs +0 -11
- package/resources/evaluations.mjs.map +0 -1
- package/src/resources/evaluations.ts +0 -352
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.325.0 (2025-06-04)
|
4
|
+
|
5
|
+
Full Changelog: [v0.324.0...v0.325.0](https://github.com/roarkhq/sdk-roark-analytics-node/compare/v0.324.0...v0.325.0)
|
6
|
+
|
7
|
+
### Features
|
8
|
+
|
9
|
+
* **api:** api update ([fb77597](https://github.com/roarkhq/sdk-roark-analytics-node/commit/fb7759750b616d2d2e9bf88978de77157a042313))
|
10
|
+
* **api:** api update ([689d8d9](https://github.com/roarkhq/sdk-roark-analytics-node/commit/689d8d97951ed0021453bc4722f182f3c0d4e6d8))
|
11
|
+
|
12
|
+
## 0.324.0 (2025-06-03)
|
13
|
+
|
14
|
+
Full Changelog: [v0.323.0...v0.324.0](https://github.com/roarkhq/sdk-roark-analytics-node/compare/v0.323.0...v0.324.0)
|
15
|
+
|
16
|
+
### Features
|
17
|
+
|
18
|
+
* **api:** api update ([548364d](https://github.com/roarkhq/sdk-roark-analytics-node/commit/548364df880b8c20cce1e1459bc043e9c2edcd1e))
|
19
|
+
|
3
20
|
## 0.323.0 (2025-06-03)
|
4
21
|
|
5
22
|
Full Changelog: [v0.322.0...v0.323.0](https://github.com/roarkhq/sdk-roark-analytics-node/compare/v0.322.0...v0.323.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 health = await client.health.get();
|
31
31
|
|
32
|
-
console.log(
|
32
|
+
console.log(health.data);
|
33
33
|
}
|
34
34
|
|
35
35
|
main();
|
@@ -48,8 +48,7 @@ const client = new Roark({
|
|
48
48
|
});
|
49
49
|
|
50
50
|
async function main() {
|
51
|
-
const
|
52
|
-
const evaluation: Roark.EvaluationCreateResponse = await client.evaluations.create(params);
|
51
|
+
const health: Roark.HealthGetResponse = await client.health.get();
|
53
52
|
}
|
54
53
|
|
55
54
|
main();
|
@@ -66,7 +65,7 @@ a subclass of `APIError` will be thrown:
|
|
66
65
|
<!-- prettier-ignore -->
|
67
66
|
```ts
|
68
67
|
async function main() {
|
69
|
-
const
|
68
|
+
const health = await client.health.get().catch(async (err) => {
|
70
69
|
if (err instanceof Roark.APIError) {
|
71
70
|
console.log(err.status); // 400
|
72
71
|
console.log(err.name); // BadRequestError
|
@@ -109,7 +108,7 @@ const client = new Roark({
|
|
109
108
|
});
|
110
109
|
|
111
110
|
// Or, configure per-request:
|
112
|
-
await client.
|
111
|
+
await client.health.get({
|
113
112
|
maxRetries: 5,
|
114
113
|
});
|
115
114
|
```
|
@@ -126,7 +125,7 @@ const client = new Roark({
|
|
126
125
|
});
|
127
126
|
|
128
127
|
// Override per-request:
|
129
|
-
await client.
|
128
|
+
await client.health.get({
|
130
129
|
timeout: 5 * 1000,
|
131
130
|
});
|
132
131
|
```
|
@@ -147,15 +146,13 @@ You can also use the `.withResponse()` method to get the raw `Response` along wi
|
|
147
146
|
```ts
|
148
147
|
const client = new Roark();
|
149
148
|
|
150
|
-
const response = await client.
|
149
|
+
const response = await client.health.get().asResponse();
|
151
150
|
console.log(response.headers.get('X-My-Header'));
|
152
151
|
console.log(response.statusText); // access the underlying Response object
|
153
152
|
|
154
|
-
const { data:
|
155
|
-
.create({ evaluators: ['string'] })
|
156
|
-
.withResponse();
|
153
|
+
const { data: health, response: raw } = await client.health.get().withResponse();
|
157
154
|
console.log(raw.headers.get('X-My-Header'));
|
158
|
-
console.log(
|
155
|
+
console.log(health.data);
|
159
156
|
```
|
160
157
|
|
161
158
|
### Making custom/undocumented requests
|
@@ -259,12 +256,9 @@ const client = new Roark({
|
|
259
256
|
});
|
260
257
|
|
261
258
|
// Override per-request:
|
262
|
-
await client.
|
263
|
-
{
|
264
|
-
|
265
|
-
httpAgent: new http.Agent({ keepAlive: false }),
|
266
|
-
},
|
267
|
-
);
|
259
|
+
await client.health.get({
|
260
|
+
httpAgent: new http.Agent({ keepAlive: false }),
|
261
|
+
});
|
268
262
|
```
|
269
263
|
|
270
264
|
## 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 {
|
6
|
+
import { Evaluation } from "./resources/evaluation.js";
|
7
7
|
import { Health, HealthGetResponse } from "./resources/health.js";
|
8
8
|
export interface ClientOptions {
|
9
9
|
/**
|
@@ -80,7 +80,7 @@ export declare class Roark extends Core.APIClient {
|
|
80
80
|
*/
|
81
81
|
constructor({ baseURL, bearerToken, ...opts }?: ClientOptions);
|
82
82
|
health: API.Health;
|
83
|
-
|
83
|
+
evaluation: API.Evaluation;
|
84
84
|
protected defaultQuery(): Core.DefaultQuery | undefined;
|
85
85
|
protected defaultHeaders(opts: Core.FinalRequestOptions): Core.Headers;
|
86
86
|
protected authHeaders(opts: Core.FinalRequestOptions): Core.Headers;
|
@@ -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 {
|
108
|
+
export { Evaluation as Evaluation };
|
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 {
|
6
|
+
import { Evaluation } from "./resources/evaluation.js";
|
7
7
|
import { Health, HealthGetResponse } from "./resources/health.js";
|
8
8
|
export interface ClientOptions {
|
9
9
|
/**
|
@@ -80,7 +80,7 @@ export declare class Roark extends Core.APIClient {
|
|
80
80
|
*/
|
81
81
|
constructor({ baseURL, bearerToken, ...opts }?: ClientOptions);
|
82
82
|
health: API.Health;
|
83
|
-
|
83
|
+
evaluation: API.Evaluation;
|
84
84
|
protected defaultQuery(): Core.DefaultQuery | undefined;
|
85
85
|
protected defaultHeaders(opts: Core.FinalRequestOptions): Core.Headers;
|
86
86
|
protected authHeaders(opts: Core.FinalRequestOptions): Core.Headers;
|
@@ -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 {
|
108
|
+
export { Evaluation as Evaluation };
|
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,EAAE,
|
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,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,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;;;;OA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B;IACpD,MAAM,CAAC,aAAa,8BAAwB;IAC5C,MAAM,CAAC,aAAa,8BAAwB;IAC5C,MAAM,CAAC,cAAc,+BAAyB;IAC9C,MAAM,CAAC,eAAe,gCAA0B;IAChD,MAAM,CAAC,mBAAmB,oCAA8B;IACxD,MAAM,CAAC,mBAAmB,oCAA8B;IACxD,MAAM,CAAC,qBAAqB,sCAAgC;IAC5D,MAAM,CAAC,wBAAwB,yCAAmC;IAElE,MAAM,CAAC,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,EAAE,UAAU,IAAI,UAAU,EAAE,CAAC;CACrC;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
CHANGED
@@ -30,7 +30,7 @@ const Core = __importStar(require("./core.js"));
|
|
30
30
|
const Errors = __importStar(require("./error.js"));
|
31
31
|
const Uploads = __importStar(require("./uploads.js"));
|
32
32
|
const API = __importStar(require("./resources/index.js"));
|
33
|
-
const
|
33
|
+
const evaluation_1 = require("./resources/evaluation.js");
|
34
34
|
const health_1 = require("./resources/health.js");
|
35
35
|
/**
|
36
36
|
* API Client for interfacing with the Roark API.
|
@@ -65,7 +65,7 @@ class Roark extends Core.APIClient {
|
|
65
65
|
fetch: options.fetch,
|
66
66
|
});
|
67
67
|
this.health = new API.Health(this);
|
68
|
-
this.
|
68
|
+
this.evaluation = new API.Evaluation(this);
|
69
69
|
this._options = options;
|
70
70
|
this.bearerToken = bearerToken;
|
71
71
|
}
|
@@ -102,7 +102,7 @@ Roark.UnprocessableEntityError = Errors.UnprocessableEntityError;
|
|
102
102
|
Roark.toFile = Uploads.toFile;
|
103
103
|
Roark.fileFromPath = Uploads.fileFromPath;
|
104
104
|
Roark.Health = health_1.Health;
|
105
|
-
Roark.
|
105
|
+
Roark.Evaluation = evaluation_1.Evaluation;
|
106
106
|
var uploads_1 = require("./uploads.js");
|
107
107
|
Object.defineProperty(exports, "toFile", { enumerable: true, get: function () { return uploads_1.toFile; } });
|
108
108
|
Object.defineProperty(exports, "fileFromPath", { enumerable: true, get: function () { return uploads_1.fileFromPath; } });
|
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,0DAAoD;AACpD,kDAA+D;AAiE/D;;GAEG;AACH,MAAa,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,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AC;AAC7D,uBAAiB,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC7C,mBAAa,GAAG,MAAM,CAAC,aAAa,CAAC;AACrC,mBAAa,GAAG,MAAM,CAAC,aAAa,CAAC;AACrC,oBAAc,GAAG,MAAM,CAAC,cAAc,CAAC;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,eAAM,CAAC;AACtB,KAAK,CAAC,UAAU,GAAG,uBAAU,CAAC;AAS9B,wCAAiD;AAAxC,iGAAA,MAAM,OAAA;AAAE,uGAAA,YAAY,OAAA;AAC7B,oCAciB;AAbf,mGAAA,UAAU,OAAA;AACV,iGAAA,QAAQ,OAAA;AACR,2GAAA,kBAAkB,OAAA;AAClB,kHAAA,yBAAyB,OAAA;AACzB,0GAAA,iBAAiB,OAAA;AACjB,sGAAA,aAAa,OAAA;AACb,sGAAA,aAAa,OAAA;AACb,uGAAA,cAAc,OAAA;AACd,wGAAA,eAAe,OAAA;AACf,4GAAA,mBAAmB,OAAA;AACnB,4GAAA,mBAAmB,OAAA;AACnB,8GAAA,qBAAqB,OAAA;AACrB,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 {
|
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.
|
@@ -39,7 +39,7 @@ export class Roark extends Core.APIClient {
|
|
39
39
|
fetch: options.fetch,
|
40
40
|
});
|
41
41
|
this.health = new API.Health(this);
|
42
|
-
this.
|
42
|
+
this.evaluation = new API.Evaluation(this);
|
43
43
|
this._options = options;
|
44
44
|
this.bearerToken = bearerToken;
|
45
45
|
}
|
@@ -75,7 +75,7 @@ Roark.UnprocessableEntityError = Errors.UnprocessableEntityError;
|
|
75
75
|
Roark.toFile = Uploads.toFile;
|
76
76
|
Roark.fileFromPath = Uploads.fileFromPath;
|
77
77
|
Roark.Health = Health;
|
78
|
-
Roark.
|
78
|
+
Roark.Evaluation = Evaluation;
|
79
79
|
export { toFile, fileFromPath } from "./uploads.mjs";
|
80
80
|
export { RoarkError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./error.mjs";
|
81
81
|
export default Roark;
|
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,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAqB;AAiEpC;;GAEG;AACH,MAAM,OAAO,KAAM,SAAQ,IAAI,CAAC,SAAS;IAKvC;;;;;;;;;;;OAWG;IACH,YAAY,EACV,OAAO,GAAG,IAAI,CAAC,OAAO,CA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M,CAAC,UAAU,CAAC;AAC/B,cAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,wBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAC/C,+BAAyB,GAAG,MAAM,CAAC,yBAAyB,CAAC;AAC7D,uBAAiB,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC7C,mBAAa,GAAG,MAAM,CAAC,aAAa,CAAC;AACrC,mBAAa,GAAG,MAAM,CAAC,aAAa,CAAC;AACrC,oBAAc,GAAG,MAAM,CAAC,cAAc,CAAC;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;OASvB,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
@@ -0,0 +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;CAAG"}
|
@@ -0,0 +1,9 @@
|
|
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.Evaluation = void 0;
|
5
|
+
const resource_1 = require("../resource.js");
|
6
|
+
class Evaluation extends resource_1.APIResource {
|
7
|
+
}
|
8
|
+
exports.Evaluation = Evaluation;
|
9
|
+
//# sourceMappingURL=evaluation.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"evaluation.js","sourceRoot":"","sources":["../src/resources/evaluation.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAE1C,MAAa,UAAW,SAAQ,sBAAW;CAAG;AAA9C,gCAA8C"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"evaluation.mjs","sourceRoot":"","sources":["../src/resources/evaluation.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAEtB,MAAM,OAAO,UAAW,SAAQ,WAAW;CAAG"}
|
package/resources/index.d.ts
CHANGED
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,EAAE,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAC"}
|
package/resources/index.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.Health = exports.
|
5
|
-
var
|
6
|
-
Object.defineProperty(exports, "
|
4
|
+
exports.Health = exports.Evaluation = void 0;
|
5
|
+
var evaluation_1 = require("./evaluation.js");
|
6
|
+
Object.defineProperty(exports, "Evaluation", { enumerable: true, get: function () { return evaluation_1.Evaluation; } });
|
7
7
|
var health_1 = require("./health.js");
|
8
8
|
Object.defineProperty(exports, "Health", { enumerable: true, get: function () { return health_1.Health; } });
|
9
9
|
//# sourceMappingURL=index.js.map
|
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,8CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,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,EAAE,
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAA0B"}
|
package/src/index.ts
CHANGED
@@ -5,7 +5,7 @@ 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 { Evaluation } from './resources/evaluation';
|
9
9
|
import { Health, HealthGetResponse } from './resources/health';
|
10
10
|
|
11
11
|
export interface ClientOptions {
|
@@ -122,7 +122,7 @@ export class Roark extends Core.APIClient {
|
|
122
122
|
}
|
123
123
|
|
124
124
|
health: API.Health = new API.Health(this);
|
125
|
-
|
125
|
+
evaluation: API.Evaluation = new API.Evaluation(this);
|
126
126
|
|
127
127
|
protected override defaultQuery(): Core.DefaultQuery | undefined {
|
128
128
|
return this._options.defaultQuery;
|
@@ -161,17 +161,13 @@ export class Roark extends Core.APIClient {
|
|
161
161
|
}
|
162
162
|
|
163
163
|
Roark.Health = Health;
|
164
|
-
Roark.
|
164
|
+
Roark.Evaluation = Evaluation;
|
165
165
|
export declare namespace Roark {
|
166
166
|
export type RequestOptions = Core.RequestOptions;
|
167
167
|
|
168
168
|
export { Health as Health, type HealthGetResponse as HealthGetResponse };
|
169
169
|
|
170
|
-
export {
|
171
|
-
Evaluations as Evaluations,
|
172
|
-
type EvaluationCreateResponse as EvaluationCreateResponse,
|
173
|
-
type EvaluationCreateParams as EvaluationCreateParams,
|
174
|
-
};
|
170
|
+
export { Evaluation as Evaluation };
|
175
171
|
}
|
176
172
|
|
177
173
|
export { toFile, fileFromPath } from './uploads';
|
package/src/resources/index.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
2
|
|
3
|
-
export {
|
3
|
+
export { Evaluation } from './evaluation';
|
4
4
|
export { Health, type HealthGetResponse } from './health';
|
package/src/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const VERSION = '0.
|
1
|
+
export const VERSION = '0.325.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.325.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.325.0'; // x-release-please-version
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
@@ -1,255 +0,0 @@
|
|
1
|
-
import { APIResource } from "../resource.js";
|
2
|
-
import * as Core from "../core.js";
|
3
|
-
export declare class Evaluations extends APIResource {
|
4
|
-
/**
|
5
|
-
* Create evaluation jobs for either a dataset of calls or a single call
|
6
|
-
*/
|
7
|
-
create(body: EvaluationCreateParams, options?: Core.RequestOptions): Core.APIPromise<EvaluationCreateResponse>;
|
8
|
-
}
|
9
|
-
export interface EvaluationCreateResponse {
|
10
|
-
data: EvaluationCreateResponse.Data;
|
11
|
-
}
|
12
|
-
export declare namespace EvaluationCreateResponse {
|
13
|
-
interface Data {
|
14
|
-
/**
|
15
|
-
* ID of the evaluation job
|
16
|
-
*/
|
17
|
-
jobId: string;
|
18
|
-
/**
|
19
|
-
* Status of the evaluation job
|
20
|
-
*/
|
21
|
-
status: 'PENDING' | 'PROCESSING' | 'SUCCESS' | 'FAILURE';
|
22
|
-
}
|
23
|
-
}
|
24
|
-
export interface EvaluationCreateParams {
|
25
|
-
/**
|
26
|
-
* List of evaluators to evaluate the calls or "all" to evaluate all evaluators
|
27
|
-
*/
|
28
|
-
evaluators: Array<string> | 'all';
|
29
|
-
/**
|
30
|
-
* Call to evaluate
|
31
|
-
*/
|
32
|
-
call?: EvaluationCreateParams.Call;
|
33
|
-
dataset?: EvaluationCreateParams.Dataset;
|
34
|
-
}
|
35
|
-
export declare namespace EvaluationCreateParams {
|
36
|
-
/**
|
37
|
-
* Call to evaluate
|
38
|
-
*/
|
39
|
-
interface Call {
|
40
|
-
/**
|
41
|
-
* Direction of the call (INBOUND or OUTBOUND)
|
42
|
-
*/
|
43
|
-
callDirection: 'INBOUND' | 'OUTBOUND';
|
44
|
-
/**
|
45
|
-
* Interface type of the call (PHONE or WEB)
|
46
|
-
*/
|
47
|
-
interfaceType: 'PHONE' | 'WEB';
|
48
|
-
/**
|
49
|
-
* Exactly two participants in the call
|
50
|
-
*/
|
51
|
-
participants: Array<Call.Participant>;
|
52
|
-
/**
|
53
|
-
* URL of source recording (must be an accessible WAV or MP3 file). Can be a signed
|
54
|
-
* URL.
|
55
|
-
*/
|
56
|
-
recordingUrl: string;
|
57
|
-
/**
|
58
|
-
* When the call started (ISO 8601 format)
|
59
|
-
*/
|
60
|
-
startedAt: string;
|
61
|
-
/**
|
62
|
-
* Additional context on why the call terminated with the endedStatus
|
63
|
-
*/
|
64
|
-
endedReason?: string;
|
65
|
-
/**
|
66
|
-
* High-level call end status, indicating how the call terminated
|
67
|
-
*/
|
68
|
-
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';
|
69
|
-
/**
|
70
|
-
* Whether this is a test call
|
71
|
-
*/
|
72
|
-
isTest?: boolean;
|
73
|
-
/**
|
74
|
-
* Custom properties to include with the call. These can be used for filtering and
|
75
|
-
* will show in the call details page
|
76
|
-
*/
|
77
|
-
properties?: Record<string, unknown>;
|
78
|
-
/**
|
79
|
-
* Retell call ID if call is being imported from Retell
|
80
|
-
*/
|
81
|
-
retellCallId?: string;
|
82
|
-
/**
|
83
|
-
* URL of source stereo recording in WAV format. Must be accessible. Can be a
|
84
|
-
* signed URL. While optional it allows for a richer audio player
|
85
|
-
*/
|
86
|
-
stereoRecordingUrl?: string;
|
87
|
-
/**
|
88
|
-
* List of tool invocations made during the call
|
89
|
-
*/
|
90
|
-
toolInvocations?: Array<Call.ToolInvocation>;
|
91
|
-
/**
|
92
|
-
* Vapi call ID if call is being imported from Vapi
|
93
|
-
*/
|
94
|
-
vapiCallId?: string;
|
95
|
-
}
|
96
|
-
namespace Call {
|
97
|
-
interface Participant {
|
98
|
-
role: 'AGENT' | 'CUSTOMER';
|
99
|
-
isSimulated?: boolean;
|
100
|
-
name?: string | null;
|
101
|
-
phoneNumber?: string | null;
|
102
|
-
spokeFirst?: boolean;
|
103
|
-
}
|
104
|
-
interface ToolInvocation {
|
105
|
-
/**
|
106
|
-
* Name of the tool that was invoked
|
107
|
-
*/
|
108
|
-
name: string;
|
109
|
-
/**
|
110
|
-
* Parameters provided to the tool during invocation
|
111
|
-
*/
|
112
|
-
parameters: Record<string, ToolInvocation.UnionMember0 | unknown>;
|
113
|
-
/**
|
114
|
-
* Result returned by the tool after execution. Can be a string or a JSON object
|
115
|
-
*/
|
116
|
-
result: string | Record<string, unknown>;
|
117
|
-
/**
|
118
|
-
* Offset in milliseconds from the start of the call when the tool was invoked
|
119
|
-
*/
|
120
|
-
startOffsetMs: number;
|
121
|
-
/**
|
122
|
-
* Description of when the tool should be invoked
|
123
|
-
*/
|
124
|
-
description?: string;
|
125
|
-
/**
|
126
|
-
* Offset in milliseconds from the start of the call when the tool execution
|
127
|
-
* completed. Used to calculate duration of the tool execution
|
128
|
-
*/
|
129
|
-
endOffsetMs?: number;
|
130
|
-
}
|
131
|
-
namespace ToolInvocation {
|
132
|
-
interface UnionMember0 {
|
133
|
-
description?: string;
|
134
|
-
type?: 'string' | 'number' | 'boolean';
|
135
|
-
value?: unknown;
|
136
|
-
}
|
137
|
-
}
|
138
|
-
}
|
139
|
-
interface Dataset {
|
140
|
-
/**
|
141
|
-
* List of calls to evaluate
|
142
|
-
*/
|
143
|
-
calls: Array<Dataset.Call>;
|
144
|
-
/**
|
145
|
-
* Name of the dataset
|
146
|
-
*/
|
147
|
-
name: string;
|
148
|
-
}
|
149
|
-
namespace Dataset {
|
150
|
-
interface Call {
|
151
|
-
/**
|
152
|
-
* Direction of the call (INBOUND or OUTBOUND)
|
153
|
-
*/
|
154
|
-
callDirection: 'INBOUND' | 'OUTBOUND';
|
155
|
-
/**
|
156
|
-
* Interface type of the call (PHONE or WEB)
|
157
|
-
*/
|
158
|
-
interfaceType: 'PHONE' | 'WEB';
|
159
|
-
/**
|
160
|
-
* Exactly two participants in the call
|
161
|
-
*/
|
162
|
-
participants: Array<Call.Participant>;
|
163
|
-
/**
|
164
|
-
* URL of source recording (must be an accessible WAV or MP3 file). Can be a signed
|
165
|
-
* URL.
|
166
|
-
*/
|
167
|
-
recordingUrl: string;
|
168
|
-
/**
|
169
|
-
* When the call started (ISO 8601 format)
|
170
|
-
*/
|
171
|
-
startedAt: string;
|
172
|
-
/**
|
173
|
-
* Additional context on why the call terminated with the endedStatus
|
174
|
-
*/
|
175
|
-
endedReason?: string;
|
176
|
-
/**
|
177
|
-
* High-level call end status, indicating how the call terminated
|
178
|
-
*/
|
179
|
-
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';
|
180
|
-
/**
|
181
|
-
* Whether this is a test call
|
182
|
-
*/
|
183
|
-
isTest?: boolean;
|
184
|
-
/**
|
185
|
-
* Custom properties to include with the call. These can be used for filtering and
|
186
|
-
* will show in the call details page
|
187
|
-
*/
|
188
|
-
properties?: Record<string, unknown>;
|
189
|
-
/**
|
190
|
-
* Retell call ID if call is being imported from Retell
|
191
|
-
*/
|
192
|
-
retellCallId?: string;
|
193
|
-
/**
|
194
|
-
* URL of source stereo recording in WAV format. Must be accessible. Can be a
|
195
|
-
* signed URL. While optional it allows for a richer audio player
|
196
|
-
*/
|
197
|
-
stereoRecordingUrl?: string;
|
198
|
-
/**
|
199
|
-
* List of tool invocations made during the call
|
200
|
-
*/
|
201
|
-
toolInvocations?: Array<Call.ToolInvocation>;
|
202
|
-
/**
|
203
|
-
* Vapi call ID if call is being imported from Vapi
|
204
|
-
*/
|
205
|
-
vapiCallId?: string;
|
206
|
-
}
|
207
|
-
namespace Call {
|
208
|
-
interface Participant {
|
209
|
-
role: 'AGENT' | 'CUSTOMER';
|
210
|
-
isSimulated?: boolean;
|
211
|
-
name?: string | null;
|
212
|
-
phoneNumber?: string | null;
|
213
|
-
spokeFirst?: boolean;
|
214
|
-
}
|
215
|
-
interface ToolInvocation {
|
216
|
-
/**
|
217
|
-
* Name of the tool that was invoked
|
218
|
-
*/
|
219
|
-
name: string;
|
220
|
-
/**
|
221
|
-
* Parameters provided to the tool during invocation
|
222
|
-
*/
|
223
|
-
parameters: Record<string, ToolInvocation.UnionMember0 | unknown>;
|
224
|
-
/**
|
225
|
-
* Result returned by the tool after execution. Can be a string or a JSON object
|
226
|
-
*/
|
227
|
-
result: string | Record<string, unknown>;
|
228
|
-
/**
|
229
|
-
* Offset in milliseconds from the start of the call when the tool was invoked
|
230
|
-
*/
|
231
|
-
startOffsetMs: number;
|
232
|
-
/**
|
233
|
-
* Description of when the tool should be invoked
|
234
|
-
*/
|
235
|
-
description?: string;
|
236
|
-
/**
|
237
|
-
* Offset in milliseconds from the start of the call when the tool execution
|
238
|
-
* completed. Used to calculate duration of the tool execution
|
239
|
-
*/
|
240
|
-
endOffsetMs?: number;
|
241
|
-
}
|
242
|
-
namespace ToolInvocation {
|
243
|
-
interface UnionMember0 {
|
244
|
-
description?: string;
|
245
|
-
type?: 'string' | 'number' | 'boolean';
|
246
|
-
value?: unknown;
|
247
|
-
}
|
248
|
-
}
|
249
|
-
}
|
250
|
-
}
|
251
|
-
}
|
252
|
-
export declare namespace Evaluations {
|
253
|
-
export { type EvaluationCreateResponse as EvaluationCreateResponse, type EvaluationCreateParams as EvaluationCreateParams, };
|
254
|
-
}
|
255
|
-
//# sourceMappingURL=evaluations.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"evaluations.d.ts","sourceRoot":"","sources":["../src/resources/evaluations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,MAAM,CACJ,IAAI,EAAE,sBAAsB,EAC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AAiB,cAAc;gBAC7B;;mBAEG;gBACH,IAAI,EAAE,MAAM,CAAC;gBAEb;;mBAEG;gBACH,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,YAAY,GAAG,OAAO,CAAC,CAAC;gBAElE;;mBAEG;gBACH,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAEzC;;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,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
package/resources/evaluations.js
DELETED
@@ -1,15 +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.Evaluations = void 0;
|
5
|
-
const resource_1 = require("../resource.js");
|
6
|
-
class Evaluations extends resource_1.APIResource {
|
7
|
-
/**
|
8
|
-
* Create evaluation jobs for either a dataset of calls or a single call
|
9
|
-
*/
|
10
|
-
create(body, options) {
|
11
|
-
return this._client.post('/v1/evaluations', { body, ...options });
|
12
|
-
}
|
13
|
-
}
|
14
|
-
exports.Evaluations = Evaluations;
|
15
|
-
//# sourceMappingURL=evaluations.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"evaluations.js","sourceRoot":"","sources":["../src/resources/evaluations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAG1C,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;OAEG;IACH,MAAM,CACJ,IAA4B,EAC5B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;CACF;AAVD,kCAUC"}
|
@@ -1,11 +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 Evaluations extends APIResource {
|
4
|
-
/**
|
5
|
-
* Create evaluation jobs for either a dataset of calls or a single call
|
6
|
-
*/
|
7
|
-
create(body, options) {
|
8
|
-
return this._client.post('/v1/evaluations', { body, ...options });
|
9
|
-
}
|
10
|
-
}
|
11
|
-
//# sourceMappingURL=evaluations.mjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"evaluations.mjs","sourceRoot":"","sources":["../src/resources/evaluations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,MAAM,CACJ,IAA4B,EAC5B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;CACF"}
|
@@ -1,352 +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 Evaluations extends APIResource {
|
7
|
-
/**
|
8
|
-
* Create evaluation jobs for either a dataset of calls or a single call
|
9
|
-
*/
|
10
|
-
create(
|
11
|
-
body: EvaluationCreateParams,
|
12
|
-
options?: Core.RequestOptions,
|
13
|
-
): Core.APIPromise<EvaluationCreateResponse> {
|
14
|
-
return this._client.post('/v1/evaluations', { body, ...options });
|
15
|
-
}
|
16
|
-
}
|
17
|
-
|
18
|
-
export interface EvaluationCreateResponse {
|
19
|
-
data: EvaluationCreateResponse.Data;
|
20
|
-
}
|
21
|
-
|
22
|
-
export namespace EvaluationCreateResponse {
|
23
|
-
export interface Data {
|
24
|
-
/**
|
25
|
-
* ID of the evaluation job
|
26
|
-
*/
|
27
|
-
jobId: string;
|
28
|
-
|
29
|
-
/**
|
30
|
-
* Status of the evaluation job
|
31
|
-
*/
|
32
|
-
status: 'PENDING' | 'PROCESSING' | 'SUCCESS' | 'FAILURE';
|
33
|
-
}
|
34
|
-
}
|
35
|
-
|
36
|
-
export interface EvaluationCreateParams {
|
37
|
-
/**
|
38
|
-
* List of evaluators to evaluate the calls or "all" to evaluate all evaluators
|
39
|
-
*/
|
40
|
-
evaluators: Array<string> | 'all';
|
41
|
-
|
42
|
-
/**
|
43
|
-
* Call to evaluate
|
44
|
-
*/
|
45
|
-
call?: EvaluationCreateParams.Call;
|
46
|
-
|
47
|
-
dataset?: EvaluationCreateParams.Dataset;
|
48
|
-
}
|
49
|
-
|
50
|
-
export namespace EvaluationCreateParams {
|
51
|
-
/**
|
52
|
-
* Call to evaluate
|
53
|
-
*/
|
54
|
-
export interface Call {
|
55
|
-
/**
|
56
|
-
* Direction of the call (INBOUND or OUTBOUND)
|
57
|
-
*/
|
58
|
-
callDirection: 'INBOUND' | 'OUTBOUND';
|
59
|
-
|
60
|
-
/**
|
61
|
-
* Interface type of the call (PHONE or WEB)
|
62
|
-
*/
|
63
|
-
interfaceType: 'PHONE' | 'WEB';
|
64
|
-
|
65
|
-
/**
|
66
|
-
* Exactly two participants in the call
|
67
|
-
*/
|
68
|
-
participants: Array<Call.Participant>;
|
69
|
-
|
70
|
-
/**
|
71
|
-
* URL of source recording (must be an accessible WAV or MP3 file). Can be a signed
|
72
|
-
* URL.
|
73
|
-
*/
|
74
|
-
recordingUrl: string;
|
75
|
-
|
76
|
-
/**
|
77
|
-
* When the call started (ISO 8601 format)
|
78
|
-
*/
|
79
|
-
startedAt: string;
|
80
|
-
|
81
|
-
/**
|
82
|
-
* Additional context on why the call terminated with the endedStatus
|
83
|
-
*/
|
84
|
-
endedReason?: string;
|
85
|
-
|
86
|
-
/**
|
87
|
-
* High-level call end status, indicating how the call terminated
|
88
|
-
*/
|
89
|
-
endedStatus?:
|
90
|
-
| 'AGENT_ENDED_CALL'
|
91
|
-
| 'AGENT_TRANSFERRED_CALL'
|
92
|
-
| 'AGENT_ERROR'
|
93
|
-
| 'CUSTOMER_ENDED_CALL'
|
94
|
-
| 'VOICE_MAIL_REACHED'
|
95
|
-
| 'SILENCE_TIME_OUT'
|
96
|
-
| 'PHONE_CALL_PROVIDER_CONNECTION_ERROR'
|
97
|
-
| 'CUSTOMER_DID_NOT_ANSWER'
|
98
|
-
| 'CUSTOMER_BUSY'
|
99
|
-
| 'DIAL_ERROR'
|
100
|
-
| 'MAX_DURATION_REACHED'
|
101
|
-
| 'UNKNOWN';
|
102
|
-
|
103
|
-
/**
|
104
|
-
* Whether this is a test call
|
105
|
-
*/
|
106
|
-
isTest?: boolean;
|
107
|
-
|
108
|
-
/**
|
109
|
-
* Custom properties to include with the call. These can be used for filtering and
|
110
|
-
* will show in the call details page
|
111
|
-
*/
|
112
|
-
properties?: Record<string, unknown>;
|
113
|
-
|
114
|
-
/**
|
115
|
-
* Retell call ID if call is being imported from Retell
|
116
|
-
*/
|
117
|
-
retellCallId?: string;
|
118
|
-
|
119
|
-
/**
|
120
|
-
* URL of source stereo recording in WAV format. Must be accessible. Can be a
|
121
|
-
* signed URL. While optional it allows for a richer audio player
|
122
|
-
*/
|
123
|
-
stereoRecordingUrl?: string;
|
124
|
-
|
125
|
-
/**
|
126
|
-
* List of tool invocations made during the call
|
127
|
-
*/
|
128
|
-
toolInvocations?: Array<Call.ToolInvocation>;
|
129
|
-
|
130
|
-
/**
|
131
|
-
* Vapi call ID if call is being imported from Vapi
|
132
|
-
*/
|
133
|
-
vapiCallId?: string;
|
134
|
-
}
|
135
|
-
|
136
|
-
export namespace Call {
|
137
|
-
export interface Participant {
|
138
|
-
role: 'AGENT' | 'CUSTOMER';
|
139
|
-
|
140
|
-
isSimulated?: boolean;
|
141
|
-
|
142
|
-
name?: string | null;
|
143
|
-
|
144
|
-
phoneNumber?: string | null;
|
145
|
-
|
146
|
-
spokeFirst?: boolean;
|
147
|
-
}
|
148
|
-
|
149
|
-
export interface ToolInvocation {
|
150
|
-
/**
|
151
|
-
* Name of the tool that was invoked
|
152
|
-
*/
|
153
|
-
name: string;
|
154
|
-
|
155
|
-
/**
|
156
|
-
* Parameters provided to the tool during invocation
|
157
|
-
*/
|
158
|
-
parameters: Record<string, ToolInvocation.UnionMember0 | unknown>;
|
159
|
-
|
160
|
-
/**
|
161
|
-
* Result returned by the tool after execution. Can be a string or a JSON object
|
162
|
-
*/
|
163
|
-
result: string | Record<string, unknown>;
|
164
|
-
|
165
|
-
/**
|
166
|
-
* Offset in milliseconds from the start of the call when the tool was invoked
|
167
|
-
*/
|
168
|
-
startOffsetMs: number;
|
169
|
-
|
170
|
-
/**
|
171
|
-
* Description of when the tool should be invoked
|
172
|
-
*/
|
173
|
-
description?: string;
|
174
|
-
|
175
|
-
/**
|
176
|
-
* Offset in milliseconds from the start of the call when the tool execution
|
177
|
-
* completed. Used to calculate duration of the tool execution
|
178
|
-
*/
|
179
|
-
endOffsetMs?: number;
|
180
|
-
}
|
181
|
-
|
182
|
-
export namespace ToolInvocation {
|
183
|
-
export interface UnionMember0 {
|
184
|
-
description?: string;
|
185
|
-
|
186
|
-
type?: 'string' | 'number' | 'boolean';
|
187
|
-
|
188
|
-
value?: unknown;
|
189
|
-
}
|
190
|
-
}
|
191
|
-
}
|
192
|
-
|
193
|
-
export interface Dataset {
|
194
|
-
/**
|
195
|
-
* List of calls to evaluate
|
196
|
-
*/
|
197
|
-
calls: Array<Dataset.Call>;
|
198
|
-
|
199
|
-
/**
|
200
|
-
* Name of the dataset
|
201
|
-
*/
|
202
|
-
name: string;
|
203
|
-
}
|
204
|
-
|
205
|
-
export namespace Dataset {
|
206
|
-
export interface Call {
|
207
|
-
/**
|
208
|
-
* Direction of the call (INBOUND or OUTBOUND)
|
209
|
-
*/
|
210
|
-
callDirection: 'INBOUND' | 'OUTBOUND';
|
211
|
-
|
212
|
-
/**
|
213
|
-
* Interface type of the call (PHONE or WEB)
|
214
|
-
*/
|
215
|
-
interfaceType: 'PHONE' | 'WEB';
|
216
|
-
|
217
|
-
/**
|
218
|
-
* Exactly two participants in the call
|
219
|
-
*/
|
220
|
-
participants: Array<Call.Participant>;
|
221
|
-
|
222
|
-
/**
|
223
|
-
* URL of source recording (must be an accessible WAV or MP3 file). Can be a signed
|
224
|
-
* URL.
|
225
|
-
*/
|
226
|
-
recordingUrl: string;
|
227
|
-
|
228
|
-
/**
|
229
|
-
* When the call started (ISO 8601 format)
|
230
|
-
*/
|
231
|
-
startedAt: string;
|
232
|
-
|
233
|
-
/**
|
234
|
-
* Additional context on why the call terminated with the endedStatus
|
235
|
-
*/
|
236
|
-
endedReason?: string;
|
237
|
-
|
238
|
-
/**
|
239
|
-
* High-level call end status, indicating how the call terminated
|
240
|
-
*/
|
241
|
-
endedStatus?:
|
242
|
-
| 'AGENT_ENDED_CALL'
|
243
|
-
| 'AGENT_TRANSFERRED_CALL'
|
244
|
-
| 'AGENT_ERROR'
|
245
|
-
| 'CUSTOMER_ENDED_CALL'
|
246
|
-
| 'VOICE_MAIL_REACHED'
|
247
|
-
| 'SILENCE_TIME_OUT'
|
248
|
-
| 'PHONE_CALL_PROVIDER_CONNECTION_ERROR'
|
249
|
-
| 'CUSTOMER_DID_NOT_ANSWER'
|
250
|
-
| 'CUSTOMER_BUSY'
|
251
|
-
| 'DIAL_ERROR'
|
252
|
-
| 'MAX_DURATION_REACHED'
|
253
|
-
| 'UNKNOWN';
|
254
|
-
|
255
|
-
/**
|
256
|
-
* Whether this is a test call
|
257
|
-
*/
|
258
|
-
isTest?: boolean;
|
259
|
-
|
260
|
-
/**
|
261
|
-
* Custom properties to include with the call. These can be used for filtering and
|
262
|
-
* will show in the call details page
|
263
|
-
*/
|
264
|
-
properties?: Record<string, unknown>;
|
265
|
-
|
266
|
-
/**
|
267
|
-
* Retell call ID if call is being imported from Retell
|
268
|
-
*/
|
269
|
-
retellCallId?: string;
|
270
|
-
|
271
|
-
/**
|
272
|
-
* URL of source stereo recording in WAV format. Must be accessible. Can be a
|
273
|
-
* signed URL. While optional it allows for a richer audio player
|
274
|
-
*/
|
275
|
-
stereoRecordingUrl?: string;
|
276
|
-
|
277
|
-
/**
|
278
|
-
* List of tool invocations made during the call
|
279
|
-
*/
|
280
|
-
toolInvocations?: Array<Call.ToolInvocation>;
|
281
|
-
|
282
|
-
/**
|
283
|
-
* Vapi call ID if call is being imported from Vapi
|
284
|
-
*/
|
285
|
-
vapiCallId?: string;
|
286
|
-
}
|
287
|
-
|
288
|
-
export namespace Call {
|
289
|
-
export interface Participant {
|
290
|
-
role: 'AGENT' | 'CUSTOMER';
|
291
|
-
|
292
|
-
isSimulated?: boolean;
|
293
|
-
|
294
|
-
name?: string | null;
|
295
|
-
|
296
|
-
phoneNumber?: string | null;
|
297
|
-
|
298
|
-
spokeFirst?: boolean;
|
299
|
-
}
|
300
|
-
|
301
|
-
export interface ToolInvocation {
|
302
|
-
/**
|
303
|
-
* Name of the tool that was invoked
|
304
|
-
*/
|
305
|
-
name: string;
|
306
|
-
|
307
|
-
/**
|
308
|
-
* Parameters provided to the tool during invocation
|
309
|
-
*/
|
310
|
-
parameters: Record<string, ToolInvocation.UnionMember0 | unknown>;
|
311
|
-
|
312
|
-
/**
|
313
|
-
* Result returned by the tool after execution. Can be a string or a JSON object
|
314
|
-
*/
|
315
|
-
result: string | Record<string, unknown>;
|
316
|
-
|
317
|
-
/**
|
318
|
-
* Offset in milliseconds from the start of the call when the tool was invoked
|
319
|
-
*/
|
320
|
-
startOffsetMs: number;
|
321
|
-
|
322
|
-
/**
|
323
|
-
* Description of when the tool should be invoked
|
324
|
-
*/
|
325
|
-
description?: string;
|
326
|
-
|
327
|
-
/**
|
328
|
-
* Offset in milliseconds from the start of the call when the tool execution
|
329
|
-
* completed. Used to calculate duration of the tool execution
|
330
|
-
*/
|
331
|
-
endOffsetMs?: number;
|
332
|
-
}
|
333
|
-
|
334
|
-
export namespace ToolInvocation {
|
335
|
-
export interface UnionMember0 {
|
336
|
-
description?: string;
|
337
|
-
|
338
|
-
type?: 'string' | 'number' | 'boolean';
|
339
|
-
|
340
|
-
value?: unknown;
|
341
|
-
}
|
342
|
-
}
|
343
|
-
}
|
344
|
-
}
|
345
|
-
}
|
346
|
-
|
347
|
-
export declare namespace Evaluations {
|
348
|
-
export {
|
349
|
-
type EvaluationCreateResponse as EvaluationCreateResponse,
|
350
|
-
type EvaluationCreateParams as EvaluationCreateParams,
|
351
|
-
};
|
352
|
-
}
|