scorecard-ai 1.0.0-alpha.6 → 1.0.0-alpha.8
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 +57 -0
- package/README.md +15 -5
- package/client.d.mts +11 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +11 -4
- package/client.d.ts.map +1 -1
- package/client.js +20 -0
- package/client.js.map +1 -1
- package/client.mjs +20 -0
- package/client.mjs.map +1 -1
- package/internal/headers.js +1 -1
- package/internal/headers.js.map +1 -1
- package/internal/headers.mjs +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/to-file.d.mts +0 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts +0 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.js +3 -2
- package/internal/to-file.js.map +1 -1
- package/internal/to-file.mjs +3 -2
- package/internal/to-file.mjs.map +1 -1
- package/internal/uploads.d.mts +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.js +14 -4
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +12 -3
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/uuid.d.mts +1 -1
- package/internal/utils/uuid.d.mts.map +1 -1
- package/internal/utils/uuid.d.ts +1 -1
- package/internal/utils/uuid.d.ts.map +1 -1
- package/internal/utils/uuid.js +1 -2
- package/internal/utils/uuid.js.map +1 -1
- package/internal/utils/uuid.mjs +1 -2
- package/internal/utils/uuid.mjs.map +1 -1
- package/lib/runAndEvaluate.d.mts.map +1 -1
- package/lib/runAndEvaluate.d.ts.map +1 -1
- package/lib/runAndEvaluate.js +1 -5
- package/lib/runAndEvaluate.js.map +1 -1
- package/lib/runAndEvaluate.mjs +1 -5
- package/lib/runAndEvaluate.mjs.map +1 -1
- package/package.json +1 -5
- package/resources/index.d.mts +3 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/projects.d.mts +39 -4
- package/resources/projects.d.mts.map +1 -1
- package/resources/projects.d.ts +39 -4
- package/resources/projects.d.ts.map +1 -1
- package/resources/projects.js +23 -4
- package/resources/projects.js.map +1 -1
- package/resources/projects.mjs +23 -4
- package/resources/projects.mjs.map +1 -1
- package/resources/records.d.mts +20 -8
- package/resources/records.d.mts.map +1 -1
- package/resources/records.d.ts +20 -8
- package/resources/records.d.ts.map +1 -1
- package/resources/records.js +12 -0
- package/resources/records.js.map +1 -1
- package/resources/records.mjs +12 -0
- package/resources/records.mjs.map +1 -1
- package/resources/runs.d.mts +10 -21
- package/resources/runs.d.mts.map +1 -1
- package/resources/runs.d.ts +10 -21
- package/resources/runs.d.ts.map +1 -1
- package/resources/runs.js +9 -6
- package/resources/runs.js.map +1 -1
- package/resources/runs.mjs +9 -6
- package/resources/runs.mjs.map +1 -1
- package/resources/scores.d.mts +83 -0
- package/resources/scores.d.mts.map +1 -0
- package/resources/scores.d.ts +83 -0
- package/resources/scores.d.ts.map +1 -0
- package/resources/scores.js +35 -0
- package/resources/scores.js.map +1 -0
- package/resources/scores.mjs +31 -0
- package/resources/scores.mjs.map +1 -0
- package/resources/system-configs.d.mts +33 -0
- package/resources/system-configs.d.mts.map +1 -1
- package/resources/system-configs.d.ts +33 -0
- package/resources/system-configs.d.ts.map +1 -1
- package/resources/system-configs.js +33 -0
- package/resources/system-configs.js.map +1 -1
- package/resources/system-configs.mjs +33 -0
- package/resources/system-configs.mjs.map +1 -1
- package/resources/systems.d.mts +73 -0
- package/resources/systems.d.mts.map +1 -1
- package/resources/systems.d.ts +73 -0
- package/resources/systems.d.ts.map +1 -1
- package/resources/systems.js +73 -0
- package/resources/systems.js.map +1 -1
- package/resources/systems.mjs +73 -0
- package/resources/systems.mjs.map +1 -1
- package/resources/testcases.d.mts +72 -18
- package/resources/testcases.d.mts.map +1 -1
- package/resources/testcases.d.ts +72 -18
- package/resources/testcases.d.ts.map +1 -1
- package/resources/testcases.js +62 -0
- package/resources/testcases.js.map +1 -1
- package/resources/testcases.mjs +62 -0
- package/resources/testcases.mjs.map +1 -1
- package/resources/testsets.d.mts +78 -30
- package/resources/testsets.d.mts.map +1 -1
- package/resources/testsets.d.ts +78 -30
- package/resources/testsets.d.ts.map +1 -1
- package/resources/testsets.js +48 -0
- package/resources/testsets.js.map +1 -1
- package/resources/testsets.mjs +48 -0
- package/resources/testsets.mjs.map +1 -1
- package/src/client.ts +31 -12
- package/src/internal/headers.ts +1 -1
- package/src/internal/to-file.ts +4 -2
- package/src/internal/uploads.ts +16 -4
- package/src/internal/utils/uuid.ts +1 -3
- package/src/lib/runAndEvaluate.ts +1 -6
- package/src/resources/index.ts +5 -3
- package/src/resources/projects.ts +48 -9
- package/src/resources/records.ts +22 -10
- package/src/resources/runs.ts +10 -46
- package/src/resources/scores.ts +98 -0
- package/src/resources/system-configs.ts +33 -0
- package/src/resources/systems.ts +73 -0
- package/src/resources/testcases.ts +73 -19
- package/src/resources/testsets.ts +78 -30
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/internal/shims/crypto.d.mts +0 -13
- package/internal/shims/crypto.d.mts.map +0 -1
- package/internal/shims/crypto.d.ts +0 -13
- package/internal/shims/crypto.d.ts.map +0 -1
- package/internal/shims/crypto.js +0 -13
- package/internal/shims/crypto.js.map +0 -1
- package/internal/shims/crypto.mjs +0 -9
- package/internal/shims/crypto.mjs.map +0 -1
- package/internal/shims/file.d.mts +0 -22
- package/internal/shims/file.d.mts.map +0 -1
- package/internal/shims/file.d.ts +0 -22
- package/internal/shims/file.d.ts.map +0 -1
- package/internal/shims/file.js +0 -16
- package/internal/shims/file.js.map +0 -1
- package/internal/shims/file.mjs +0 -12
- package/internal/shims/file.mjs.map +0 -1
- package/internal/shims/getBuiltinModule.d.mts +0 -11
- package/internal/shims/getBuiltinModule.d.mts.map +0 -1
- package/internal/shims/getBuiltinModule.d.ts +0 -11
- package/internal/shims/getBuiltinModule.d.ts.map +0 -1
- package/internal/shims/getBuiltinModule.js +0 -71
- package/internal/shims/getBuiltinModule.js.map +0 -1
- package/internal/shims/getBuiltinModule.mjs +0 -67
- package/internal/shims/getBuiltinModule.mjs.map +0 -1
- package/internal/shims/nullGetBuiltinModule.d.mts +0 -2
- package/internal/shims/nullGetBuiltinModule.d.mts.map +0 -1
- package/internal/shims/nullGetBuiltinModule.d.ts +0 -2
- package/internal/shims/nullGetBuiltinModule.d.ts.map +0 -1
- package/internal/shims/nullGetBuiltinModule.js +0 -5
- package/internal/shims/nullGetBuiltinModule.js.map +0 -1
- package/internal/shims/nullGetBuiltinModule.mjs +0 -2
- package/internal/shims/nullGetBuiltinModule.mjs.map +0 -1
- package/src/internal/shims/crypto.ts +0 -18
- package/src/internal/shims/file.ts +0 -32
- package/src/internal/shims/getBuiltinModule.ts +0 -66
- package/src/internal/shims/nullGetBuiltinModule.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.d.mts","sourceRoot":"","sources":["../src/resources/projects.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,WAAW,EAAE,iBAAiB,EAAE,KAAK,uBAAuB,EAAE;OAChE,EAAE,cAAc,EAAE;AAEzB,qBAAa,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"projects.d.mts","sourceRoot":"","sources":["../src/resources/projects.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,WAAW,EAAE,iBAAiB,EAAE,KAAK,uBAAuB,EAAE;OAChE,EAAE,cAAc,EAAE;AAEzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;IAIhF;;;;;;;;;;;OAWG;IACH,IAAI,CACF,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,yBAAyB,EAAE,OAAO,CAAC;CAGnD;AAED,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAkB,SAAQ,uBAAuB;CAAG;AAErE,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
package/resources/projects.d.ts
CHANGED
|
@@ -1,30 +1,65 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
2
3
|
import { PagePromise, PaginatedResponse, type PaginatedResponseParams } from "../core/pagination.js";
|
|
3
4
|
import { RequestOptions } from "../internal/request-options.js";
|
|
4
5
|
export declare class Projects extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Create a new Project.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const project = await client.projects.create({
|
|
12
|
+
* description: 'This is a test project',
|
|
13
|
+
* name: 'My Project',
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
create(body: ProjectCreateParams, options?: RequestOptions): APIPromise<Project>;
|
|
5
18
|
/**
|
|
6
19
|
* Retrieve a paginated list of all Projects. Projects are ordered by creation
|
|
7
20
|
* date, with oldest Projects first.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* // Automatically fetches more pages as needed.
|
|
25
|
+
* for await (const project of client.projects.list()) {
|
|
26
|
+
* // ...
|
|
27
|
+
* }
|
|
28
|
+
* ```
|
|
8
29
|
*/
|
|
9
|
-
list(query?: ProjectListParams | null | undefined, options?: RequestOptions): PagePromise<
|
|
30
|
+
list(query?: ProjectListParams | null | undefined, options?: RequestOptions): PagePromise<ProjectsPaginatedResponse, Project>;
|
|
10
31
|
}
|
|
11
|
-
export type
|
|
32
|
+
export type ProjectsPaginatedResponse = PaginatedResponse<Project>;
|
|
12
33
|
/**
|
|
13
34
|
* A Project in the Scorecard system.
|
|
14
35
|
*/
|
|
15
|
-
export interface
|
|
36
|
+
export interface Project {
|
|
16
37
|
/**
|
|
17
38
|
* The ID of the Project.
|
|
18
39
|
*/
|
|
19
40
|
id: string;
|
|
41
|
+
/**
|
|
42
|
+
* The description of the Project.
|
|
43
|
+
*/
|
|
44
|
+
description: string | null;
|
|
20
45
|
/**
|
|
21
46
|
* The name of the Project.
|
|
22
47
|
*/
|
|
23
48
|
name: string | null;
|
|
24
49
|
}
|
|
50
|
+
export interface ProjectCreateParams {
|
|
51
|
+
/**
|
|
52
|
+
* The description of the Project.
|
|
53
|
+
*/
|
|
54
|
+
description: string;
|
|
55
|
+
/**
|
|
56
|
+
* The name of the Project.
|
|
57
|
+
*/
|
|
58
|
+
name: string;
|
|
59
|
+
}
|
|
25
60
|
export interface ProjectListParams extends PaginatedResponseParams {
|
|
26
61
|
}
|
|
27
62
|
export declare namespace Projects {
|
|
28
|
-
export { type
|
|
63
|
+
export { type Project as Project, type ProjectsPaginatedResponse as ProjectsPaginatedResponse, type ProjectCreateParams as ProjectCreateParams, type ProjectListParams as ProjectListParams, };
|
|
29
64
|
}
|
|
30
65
|
//# sourceMappingURL=projects.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../src/resources/projects.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,WAAW,EAAE,iBAAiB,EAAE,KAAK,uBAAuB,EAAE;OAChE,EAAE,cAAc,EAAE;AAEzB,qBAAa,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../src/resources/projects.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,WAAW,EAAE,iBAAiB,EAAE,KAAK,uBAAuB,EAAE;OAChE,EAAE,cAAc,EAAE;AAEzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;IAIhF;;;;;;;;;;;OAWG;IACH,IAAI,CACF,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,yBAAyB,EAAE,OAAO,CAAC;CAGnD;AAED,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAkB,SAAQ,uBAAuB;CAAG;AAErE,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
package/resources/projects.js
CHANGED
|
@@ -5,15 +5,34 @@ exports.Projects = void 0;
|
|
|
5
5
|
const resource_1 = require("../core/resource.js");
|
|
6
6
|
const pagination_1 = require("../core/pagination.js");
|
|
7
7
|
class Projects extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Create a new Project.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const project = await client.projects.create({
|
|
14
|
+
* description: 'This is a test project',
|
|
15
|
+
* name: 'My Project',
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
create(body, options) {
|
|
20
|
+
return this._client.post('/projects', { body, ...options });
|
|
21
|
+
}
|
|
8
22
|
/**
|
|
9
23
|
* Retrieve a paginated list of all Projects. Projects are ordered by creation
|
|
10
24
|
* date, with oldest Projects first.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* // Automatically fetches more pages as needed.
|
|
29
|
+
* for await (const project of client.projects.list()) {
|
|
30
|
+
* // ...
|
|
31
|
+
* }
|
|
32
|
+
* ```
|
|
11
33
|
*/
|
|
12
34
|
list(query = {}, options) {
|
|
13
|
-
return this._client.getAPIList('/projects', (pagination_1.PaginatedResponse), {
|
|
14
|
-
query,
|
|
15
|
-
...options,
|
|
16
|
-
});
|
|
35
|
+
return this._client.getAPIList('/projects', (pagination_1.PaginatedResponse), { query, ...options });
|
|
17
36
|
}
|
|
18
37
|
}
|
|
19
38
|
exports.Projects = Projects;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../src/resources/projects.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;
|
|
1
|
+
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../src/resources/projects.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAAkG;AAGlG,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CACF,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,CAAA,8BAA0B,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjG,CAAC;CACF;AAlCD,4BAkCC"}
|
package/resources/projects.mjs
CHANGED
|
@@ -2,15 +2,34 @@
|
|
|
2
2
|
import { APIResource } from "../core/resource.mjs";
|
|
3
3
|
import { PaginatedResponse } from "../core/pagination.mjs";
|
|
4
4
|
export class Projects extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Create a new Project.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const project = await client.projects.create({
|
|
11
|
+
* description: 'This is a test project',
|
|
12
|
+
* name: 'My Project',
|
|
13
|
+
* });
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
create(body, options) {
|
|
17
|
+
return this._client.post('/projects', { body, ...options });
|
|
18
|
+
}
|
|
5
19
|
/**
|
|
6
20
|
* Retrieve a paginated list of all Projects. Projects are ordered by creation
|
|
7
21
|
* date, with oldest Projects first.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* // Automatically fetches more pages as needed.
|
|
26
|
+
* for await (const project of client.projects.list()) {
|
|
27
|
+
* // ...
|
|
28
|
+
* }
|
|
29
|
+
* ```
|
|
8
30
|
*/
|
|
9
31
|
list(query = {}, options) {
|
|
10
|
-
return this._client.getAPIList('/projects', (PaginatedResponse), {
|
|
11
|
-
query,
|
|
12
|
-
...options,
|
|
13
|
-
});
|
|
32
|
+
return this._client.getAPIList('/projects', (PaginatedResponse), { query, ...options });
|
|
14
33
|
}
|
|
15
34
|
}
|
|
16
35
|
//# sourceMappingURL=projects.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.mjs","sourceRoot":"","sources":["../src/resources/projects.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"projects.mjs","sourceRoot":"","sources":["../src/resources/projects.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAe,iBAAiB,EAAgC;AAGvE,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CACF,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,CAAA,iBAA0B,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjG,CAAC;CACF"}
|
package/resources/records.d.mts
CHANGED
|
@@ -5,6 +5,18 @@ import { RequestOptions } from "../internal/request-options.mjs";
|
|
|
5
5
|
export declare class Records extends APIResource {
|
|
6
6
|
/**
|
|
7
7
|
* Create a new Record in a Run.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const record = await client.records.create('135', {
|
|
12
|
+
* expected: {
|
|
13
|
+
* idealAnswer: 'Paris is the capital of France',
|
|
14
|
+
* },
|
|
15
|
+
* inputs: { question: 'What is the capital of France?' },
|
|
16
|
+
* outputs: { response: 'The capital of France is Paris.' },
|
|
17
|
+
* testcaseId: '248',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
8
20
|
*/
|
|
9
21
|
create(runID: string, body: RecordCreateParams, options?: RequestOptions): APIPromise<Record>;
|
|
10
22
|
}
|
|
@@ -16,15 +28,15 @@ export interface Record {
|
|
|
16
28
|
* The ID of the Record.
|
|
17
29
|
*/
|
|
18
30
|
id: string;
|
|
31
|
+
/**
|
|
32
|
+
* The expected outputs for the Testcase.
|
|
33
|
+
*/
|
|
34
|
+
expected: BuiltinRecord<string, unknown>;
|
|
19
35
|
/**
|
|
20
36
|
* The actual inputs sent to the system, which should match the system's input
|
|
21
37
|
* schema.
|
|
22
38
|
*/
|
|
23
39
|
inputs: BuiltinRecord<string, unknown>;
|
|
24
|
-
/**
|
|
25
|
-
* The expected outputs for the Testcase.
|
|
26
|
-
*/
|
|
27
|
-
labels: BuiltinRecord<string, unknown>;
|
|
28
40
|
/**
|
|
29
41
|
* The actual outputs from the system.
|
|
30
42
|
*/
|
|
@@ -39,15 +51,15 @@ export interface Record {
|
|
|
39
51
|
testcaseId?: string;
|
|
40
52
|
}
|
|
41
53
|
export interface RecordCreateParams {
|
|
54
|
+
/**
|
|
55
|
+
* The expected outputs for the Testcase.
|
|
56
|
+
*/
|
|
57
|
+
expected: BuiltinRecord<string, unknown>;
|
|
42
58
|
/**
|
|
43
59
|
* The actual inputs sent to the system, which should match the system's input
|
|
44
60
|
* schema.
|
|
45
61
|
*/
|
|
46
62
|
inputs: BuiltinRecord<string, unknown>;
|
|
47
|
-
/**
|
|
48
|
-
* The expected outputs for the Testcase.
|
|
49
|
-
*/
|
|
50
|
-
labels: BuiltinRecord<string, unknown>;
|
|
51
63
|
/**
|
|
52
64
|
* The actual outputs from the system.
|
|
53
65
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"records.d.mts","sourceRoot":"","sources":["../src/resources/records.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,MAAM,IAAI,aAAa,EAAE;OAChC,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC
|
|
1
|
+
{"version":3,"file":"records.d.mts","sourceRoot":"","sources":["../src/resources/records.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,MAAM,IAAI,aAAa,EAAE;OAChC,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;CAG9F;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,QAAQ,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEzC;;;OAGG;IACH,MAAM,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEvC;;OAEG;IACH,OAAO,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAExC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,QAAQ,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEzC;;;OAGG;IACH,MAAM,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEvC;;OAEG;IACH,OAAO,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAExC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,MAAM,IAAI,MAAM,EAAE,KAAK,kBAAkB,IAAI,kBAAkB,EAAE,CAAC;CACjF"}
|
package/resources/records.d.ts
CHANGED
|
@@ -5,6 +5,18 @@ import { RequestOptions } from "../internal/request-options.js";
|
|
|
5
5
|
export declare class Records extends APIResource {
|
|
6
6
|
/**
|
|
7
7
|
* Create a new Record in a Run.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const record = await client.records.create('135', {
|
|
12
|
+
* expected: {
|
|
13
|
+
* idealAnswer: 'Paris is the capital of France',
|
|
14
|
+
* },
|
|
15
|
+
* inputs: { question: 'What is the capital of France?' },
|
|
16
|
+
* outputs: { response: 'The capital of France is Paris.' },
|
|
17
|
+
* testcaseId: '248',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
8
20
|
*/
|
|
9
21
|
create(runID: string, body: RecordCreateParams, options?: RequestOptions): APIPromise<Record>;
|
|
10
22
|
}
|
|
@@ -16,15 +28,15 @@ export interface Record {
|
|
|
16
28
|
* The ID of the Record.
|
|
17
29
|
*/
|
|
18
30
|
id: string;
|
|
31
|
+
/**
|
|
32
|
+
* The expected outputs for the Testcase.
|
|
33
|
+
*/
|
|
34
|
+
expected: BuiltinRecord<string, unknown>;
|
|
19
35
|
/**
|
|
20
36
|
* The actual inputs sent to the system, which should match the system's input
|
|
21
37
|
* schema.
|
|
22
38
|
*/
|
|
23
39
|
inputs: BuiltinRecord<string, unknown>;
|
|
24
|
-
/**
|
|
25
|
-
* The expected outputs for the Testcase.
|
|
26
|
-
*/
|
|
27
|
-
labels: BuiltinRecord<string, unknown>;
|
|
28
40
|
/**
|
|
29
41
|
* The actual outputs from the system.
|
|
30
42
|
*/
|
|
@@ -39,15 +51,15 @@ export interface Record {
|
|
|
39
51
|
testcaseId?: string;
|
|
40
52
|
}
|
|
41
53
|
export interface RecordCreateParams {
|
|
54
|
+
/**
|
|
55
|
+
* The expected outputs for the Testcase.
|
|
56
|
+
*/
|
|
57
|
+
expected: BuiltinRecord<string, unknown>;
|
|
42
58
|
/**
|
|
43
59
|
* The actual inputs sent to the system, which should match the system's input
|
|
44
60
|
* schema.
|
|
45
61
|
*/
|
|
46
62
|
inputs: BuiltinRecord<string, unknown>;
|
|
47
|
-
/**
|
|
48
|
-
* The expected outputs for the Testcase.
|
|
49
|
-
*/
|
|
50
|
-
labels: BuiltinRecord<string, unknown>;
|
|
51
63
|
/**
|
|
52
64
|
* The actual outputs from the system.
|
|
53
65
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../src/resources/records.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,MAAM,IAAI,aAAa,EAAE;OAChC,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC
|
|
1
|
+
{"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../src/resources/records.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,MAAM,IAAI,aAAa,EAAE;OAChC,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;CAG9F;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,QAAQ,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEzC;;;OAGG;IACH,MAAM,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEvC;;OAEG;IACH,OAAO,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAExC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,QAAQ,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEzC;;;OAGG;IACH,MAAM,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEvC;;OAEG;IACH,OAAO,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAExC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,MAAM,IAAI,MAAM,EAAE,KAAK,kBAAkB,IAAI,kBAAkB,EAAE,CAAC;CACjF"}
|
package/resources/records.js
CHANGED
|
@@ -7,6 +7,18 @@ const path_1 = require("../internal/utils/path.js");
|
|
|
7
7
|
class Records extends resource_1.APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Create a new Record in a Run.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const record = await client.records.create('135', {
|
|
14
|
+
* expected: {
|
|
15
|
+
* idealAnswer: 'Paris is the capital of France',
|
|
16
|
+
* },
|
|
17
|
+
* inputs: { question: 'What is the capital of France?' },
|
|
18
|
+
* outputs: { response: 'The capital of France is Paris.' },
|
|
19
|
+
* testcaseId: '248',
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
10
22
|
*/
|
|
11
23
|
create(runID, body, options) {
|
|
12
24
|
return this._client.post((0, path_1.path) `/runs/${runID}/records`, { body, ...options });
|
package/resources/records.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"records.js","sourceRoot":"","sources":["../src/resources/records.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,oDAA8C;AAE9C,MAAa,OAAQ,SAAQ,sBAAW;IACtC
|
|
1
|
+
{"version":3,"file":"records.js","sourceRoot":"","sources":["../src/resources/records.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,oDAA8C;AAE9C,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,KAAa,EAAE,IAAwB,EAAE,OAAwB;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,SAAS,KAAK,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF;AAnBD,0BAmBC"}
|
package/resources/records.mjs
CHANGED
|
@@ -4,6 +4,18 @@ import { path } from "../internal/utils/path.mjs";
|
|
|
4
4
|
export class Records extends APIResource {
|
|
5
5
|
/**
|
|
6
6
|
* Create a new Record in a Run.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const record = await client.records.create('135', {
|
|
11
|
+
* expected: {
|
|
12
|
+
* idealAnswer: 'Paris is the capital of France',
|
|
13
|
+
* },
|
|
14
|
+
* inputs: { question: 'What is the capital of France?' },
|
|
15
|
+
* outputs: { response: 'The capital of France is Paris.' },
|
|
16
|
+
* testcaseId: '248',
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
7
19
|
*/
|
|
8
20
|
create(runID, body, options) {
|
|
9
21
|
return this._client.post(path `/runs/${runID}/records`, { body, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"records.mjs","sourceRoot":"","sources":["../src/resources/records.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC
|
|
1
|
+
{"version":3,"file":"records.mjs","sourceRoot":"","sources":["../src/resources/records.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,KAAa,EAAE,IAAwB,EAAE,OAAwB;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,SAAS,KAAK,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF"}
|
package/resources/runs.d.mts
CHANGED
|
@@ -4,12 +4,17 @@ import { RequestOptions } from "../internal/request-options.mjs";
|
|
|
4
4
|
export declare class Runs extends APIResource {
|
|
5
5
|
/**
|
|
6
6
|
* Create a new Run.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const run = await client.runs.create('314', {
|
|
11
|
+
* metricIds: ['789', '101'],
|
|
12
|
+
* testsetId: '246',
|
|
13
|
+
* systemConfigId: '87654321-4d3b-4ae4-8c7a-4b6e2a19ccf0',
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
7
16
|
*/
|
|
8
17
|
create(projectID: string, body: RunCreateParams, options?: RequestOptions): APIPromise<Run>;
|
|
9
|
-
/**
|
|
10
|
-
* Update the status of a Run.
|
|
11
|
-
*/
|
|
12
|
-
update(runID: string, body: RunUpdateParams, options?: RequestOptions): APIPromise<RunUpdateResponse>;
|
|
13
18
|
}
|
|
14
19
|
/**
|
|
15
20
|
* A Run in the Scorecard system.
|
|
@@ -36,16 +41,6 @@ export interface Run {
|
|
|
36
41
|
*/
|
|
37
42
|
systemConfigId?: string;
|
|
38
43
|
}
|
|
39
|
-
export interface RunUpdateResponse {
|
|
40
|
-
/**
|
|
41
|
-
* The ID of the Run.
|
|
42
|
-
*/
|
|
43
|
-
id: string;
|
|
44
|
-
/**
|
|
45
|
-
* The status of the Run.
|
|
46
|
-
*/
|
|
47
|
-
status: 'pending' | 'awaiting_execution' | 'running_execution' | 'awaiting_scoring' | 'running_scoring' | 'awaiting_human_scoring' | 'completed';
|
|
48
|
-
}
|
|
49
44
|
export interface RunCreateParams {
|
|
50
45
|
/**
|
|
51
46
|
* The IDs of the metrics this Run is using.
|
|
@@ -60,13 +55,7 @@ export interface RunCreateParams {
|
|
|
60
55
|
*/
|
|
61
56
|
systemConfigId?: string;
|
|
62
57
|
}
|
|
63
|
-
export interface RunUpdateParams {
|
|
64
|
-
/**
|
|
65
|
-
* The status of the Run.
|
|
66
|
-
*/
|
|
67
|
-
status: 'pending' | 'awaiting_execution' | 'running_execution' | 'awaiting_scoring' | 'running_scoring' | 'awaiting_human_scoring' | 'completed';
|
|
68
|
-
}
|
|
69
58
|
export declare namespace Runs {
|
|
70
|
-
export { type Run as Run, type
|
|
59
|
+
export { type Run as Run, type RunCreateParams as RunCreateParams };
|
|
71
60
|
}
|
|
72
61
|
//# sourceMappingURL=runs.d.mts.map
|
package/resources/runs.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runs.d.mts","sourceRoot":"","sources":["../src/resources/runs.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,IAAK,SAAQ,WAAW;IACnC
|
|
1
|
+
{"version":3,"file":"runs.d.mts","sourceRoot":"","sources":["../src/resources/runs.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,GAAG,CAAC;CAG5F;AAED;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEzB;;OAEG;IACH,MAAM,EACF,SAAS,GACT,oBAAoB,GACpB,mBAAmB,GACnB,kBAAkB,GAClB,iBAAiB,GACjB,wBAAwB,GACxB,WAAW,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEzB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,GAAG,IAAI,GAAG,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,CAAC;CACrE"}
|
package/resources/runs.d.ts
CHANGED
|
@@ -4,12 +4,17 @@ import { RequestOptions } from "../internal/request-options.js";
|
|
|
4
4
|
export declare class Runs extends APIResource {
|
|
5
5
|
/**
|
|
6
6
|
* Create a new Run.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const run = await client.runs.create('314', {
|
|
11
|
+
* metricIds: ['789', '101'],
|
|
12
|
+
* testsetId: '246',
|
|
13
|
+
* systemConfigId: '87654321-4d3b-4ae4-8c7a-4b6e2a19ccf0',
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
7
16
|
*/
|
|
8
17
|
create(projectID: string, body: RunCreateParams, options?: RequestOptions): APIPromise<Run>;
|
|
9
|
-
/**
|
|
10
|
-
* Update the status of a Run.
|
|
11
|
-
*/
|
|
12
|
-
update(runID: string, body: RunUpdateParams, options?: RequestOptions): APIPromise<RunUpdateResponse>;
|
|
13
18
|
}
|
|
14
19
|
/**
|
|
15
20
|
* A Run in the Scorecard system.
|
|
@@ -36,16 +41,6 @@ export interface Run {
|
|
|
36
41
|
*/
|
|
37
42
|
systemConfigId?: string;
|
|
38
43
|
}
|
|
39
|
-
export interface RunUpdateResponse {
|
|
40
|
-
/**
|
|
41
|
-
* The ID of the Run.
|
|
42
|
-
*/
|
|
43
|
-
id: string;
|
|
44
|
-
/**
|
|
45
|
-
* The status of the Run.
|
|
46
|
-
*/
|
|
47
|
-
status: 'pending' | 'awaiting_execution' | 'running_execution' | 'awaiting_scoring' | 'running_scoring' | 'awaiting_human_scoring' | 'completed';
|
|
48
|
-
}
|
|
49
44
|
export interface RunCreateParams {
|
|
50
45
|
/**
|
|
51
46
|
* The IDs of the metrics this Run is using.
|
|
@@ -60,13 +55,7 @@ export interface RunCreateParams {
|
|
|
60
55
|
*/
|
|
61
56
|
systemConfigId?: string;
|
|
62
57
|
}
|
|
63
|
-
export interface RunUpdateParams {
|
|
64
|
-
/**
|
|
65
|
-
* The status of the Run.
|
|
66
|
-
*/
|
|
67
|
-
status: 'pending' | 'awaiting_execution' | 'running_execution' | 'awaiting_scoring' | 'running_scoring' | 'awaiting_human_scoring' | 'completed';
|
|
68
|
-
}
|
|
69
58
|
export declare namespace Runs {
|
|
70
|
-
export { type Run as Run, type
|
|
59
|
+
export { type Run as Run, type RunCreateParams as RunCreateParams };
|
|
71
60
|
}
|
|
72
61
|
//# sourceMappingURL=runs.d.ts.map
|
package/resources/runs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../src/resources/runs.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,IAAK,SAAQ,WAAW;IACnC
|
|
1
|
+
{"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../src/resources/runs.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,GAAG,CAAC;CAG5F;AAED;;GAEG;AACH,MAAM,WAAW,GAAG;IAClB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEzB;;OAEG;IACH,MAAM,EACF,SAAS,GACT,oBAAoB,GACpB,mBAAmB,GACnB,kBAAkB,GAClB,iBAAiB,GACjB,wBAAwB,GACxB,WAAW,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEzB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,GAAG,IAAI,GAAG,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,CAAC;CACrE"}
|
package/resources/runs.js
CHANGED
|
@@ -7,16 +7,19 @@ const path_1 = require("../internal/utils/path.js");
|
|
|
7
7
|
class Runs extends resource_1.APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Create a new Run.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const run = await client.runs.create('314', {
|
|
14
|
+
* metricIds: ['789', '101'],
|
|
15
|
+
* testsetId: '246',
|
|
16
|
+
* systemConfigId: '87654321-4d3b-4ae4-8c7a-4b6e2a19ccf0',
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
10
19
|
*/
|
|
11
20
|
create(projectID, body, options) {
|
|
12
21
|
return this._client.post((0, path_1.path) `/projects/${projectID}/runs`, { body, ...options });
|
|
13
22
|
}
|
|
14
|
-
/**
|
|
15
|
-
* Update the status of a Run.
|
|
16
|
-
*/
|
|
17
|
-
update(runID, body, options) {
|
|
18
|
-
return this._client.patch((0, path_1.path) `/runs/${runID}`, { body, ...options });
|
|
19
|
-
}
|
|
20
23
|
}
|
|
21
24
|
exports.Runs = Runs;
|
|
22
25
|
//# sourceMappingURL=runs.js.map
|
package/resources/runs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runs.js","sourceRoot":"","sources":["../src/resources/runs.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,IAAK,SAAQ,sBAAW;IACnC
|
|
1
|
+
{"version":3,"file":"runs.js","sourceRoot":"","sources":["../src/resources/runs.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,IAAK,SAAQ,sBAAW;IACnC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,SAAiB,EAAE,IAAqB,EAAE,OAAwB;QACvE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,SAAS,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;CACF;AAhBD,oBAgBC"}
|
package/resources/runs.mjs
CHANGED
|
@@ -4,15 +4,18 @@ import { path } from "../internal/utils/path.mjs";
|
|
|
4
4
|
export class Runs extends APIResource {
|
|
5
5
|
/**
|
|
6
6
|
* Create a new Run.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const run = await client.runs.create('314', {
|
|
11
|
+
* metricIds: ['789', '101'],
|
|
12
|
+
* testsetId: '246',
|
|
13
|
+
* systemConfigId: '87654321-4d3b-4ae4-8c7a-4b6e2a19ccf0',
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
7
16
|
*/
|
|
8
17
|
create(projectID, body, options) {
|
|
9
18
|
return this._client.post(path `/projects/${projectID}/runs`, { body, ...options });
|
|
10
19
|
}
|
|
11
|
-
/**
|
|
12
|
-
* Update the status of a Run.
|
|
13
|
-
*/
|
|
14
|
-
update(runID, body, options) {
|
|
15
|
-
return this._client.patch(path `/runs/${runID}`, { body, ...options });
|
|
16
|
-
}
|
|
17
20
|
}
|
|
18
21
|
//# sourceMappingURL=runs.mjs.map
|
package/resources/runs.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runs.mjs","sourceRoot":"","sources":["../src/resources/runs.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC
|
|
1
|
+
{"version":3,"file":"runs.mjs","sourceRoot":"","sources":["../src/resources/runs.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,SAAiB,EAAE,IAAqB,EAAE,OAAwB;QACvE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,aAAa,SAAS,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;CACF"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
export declare class Scores extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Create or update a Score for a given Record and MetricConfig. If a Score with
|
|
7
|
+
* the specified Record ID and MetricConfig ID already exists, it will be updated.
|
|
8
|
+
* Otherwise, a new Score will be created. The score provided should conform to the
|
|
9
|
+
* schema defined by the MetricConfig; otherwise, validation errors will be
|
|
10
|
+
* reported.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const score = await client.scores.upsert(
|
|
15
|
+
* 'a1b2c3d4-e5f6-7890-1234-567890abcdef',
|
|
16
|
+
* {
|
|
17
|
+
* recordId: '777',
|
|
18
|
+
* score: {
|
|
19
|
+
* value: true,
|
|
20
|
+
* reasoning: 'The response is correct',
|
|
21
|
+
* },
|
|
22
|
+
* },
|
|
23
|
+
* );
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
upsert(metricConfigID: string, params: ScoreUpsertParams, options?: RequestOptions): APIPromise<Score>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A Score represents the evaluation of a Record against a specific MetricConfig.
|
|
30
|
+
* The actual `score` is stored as flexible JSON. While any JSON is accepted, it is
|
|
31
|
+
* expected to conform to the output schema defined by the MetricConfig. Any
|
|
32
|
+
* discrepancies will be noted in the `validationErrors` field, but the Score will
|
|
33
|
+
* still be stored.
|
|
34
|
+
*/
|
|
35
|
+
export interface Score {
|
|
36
|
+
/**
|
|
37
|
+
* The ID of the MetricConfig this Score is for.
|
|
38
|
+
*/
|
|
39
|
+
metricConfigId: string;
|
|
40
|
+
/**
|
|
41
|
+
* The ID of the Record this Score is for.
|
|
42
|
+
*/
|
|
43
|
+
recordId: string;
|
|
44
|
+
/**
|
|
45
|
+
* The score of the Record, as arbitrary JSON. This data should ideally conform to
|
|
46
|
+
* the output schema defined by the associated MetricConfig. If it doesn't,
|
|
47
|
+
* validation errors will be captured in the `validationErrors` field.
|
|
48
|
+
*/
|
|
49
|
+
score: Record<string, unknown>;
|
|
50
|
+
/**
|
|
51
|
+
* Validation errors found in the Score data. If present, the Score doesn't fully
|
|
52
|
+
* conform to its MetricConfig's schema.
|
|
53
|
+
*/
|
|
54
|
+
validationErrors?: Array<Score.ValidationError>;
|
|
55
|
+
}
|
|
56
|
+
export declare namespace Score {
|
|
57
|
+
interface ValidationError {
|
|
58
|
+
/**
|
|
59
|
+
* Human-readable error description.
|
|
60
|
+
*/
|
|
61
|
+
message: string;
|
|
62
|
+
/**
|
|
63
|
+
* JSON Pointer to the field with the validation error.
|
|
64
|
+
*/
|
|
65
|
+
path: string;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
export interface ScoreUpsertParams {
|
|
69
|
+
/**
|
|
70
|
+
* Path param: The ID of the Record.
|
|
71
|
+
*/
|
|
72
|
+
recordId: string;
|
|
73
|
+
/**
|
|
74
|
+
* Body param: The score of the Record, as arbitrary JSON. This data should ideally
|
|
75
|
+
* conform to the output schema defined by the associated MetricConfig. If it
|
|
76
|
+
* doesn't, validation errors will be captured in the `validationErrors` field.
|
|
77
|
+
*/
|
|
78
|
+
score: Record<string, unknown>;
|
|
79
|
+
}
|
|
80
|
+
export declare namespace Scores {
|
|
81
|
+
export { type Score as Score, type ScoreUpsertParams as ScoreUpsertParams };
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=scores.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scores.d.mts","sourceRoot":"","sources":["../src/resources/scores.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;CAIvG;AAED;;;;;;GAMG;AACH,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE/B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;CACjD;AAED,yBAAiB,KAAK,CAAC;IACrB,UAAiB,eAAe;QAC9B;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,KAAK,IAAI,KAAK,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CAC7E"}
|