scorecard-ai 2.1.0 → 2.2.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 +58 -0
- package/client.d.mts +6 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -6
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs +2 -2
- package/client.mjs.map +1 -1
- package/internal/to-file.d.mts +1 -1
- package/internal/to-file.d.ts +1 -1
- package/internal/to-file.js +1 -1
- package/internal/to-file.mjs +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +3 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -2
- package/resources/index.mjs.map +1 -1
- package/resources/metrics.d.mts +348 -28
- package/resources/metrics.d.mts.map +1 -1
- package/resources/metrics.d.ts +348 -28
- package/resources/metrics.d.ts.map +1 -1
- package/resources/metrics.js +30 -0
- package/resources/metrics.js.map +1 -1
- package/resources/metrics.mjs +30 -0
- package/resources/metrics.mjs.map +1 -1
- package/resources/records.d.mts +30 -1
- package/resources/records.d.mts.map +1 -1
- package/resources/records.d.ts +30 -1
- package/resources/records.d.ts.map +1 -1
- package/resources/records.js +21 -0
- package/resources/records.js.map +1 -1
- package/resources/records.mjs +21 -0
- package/resources/records.mjs.map +1 -1
- package/resources/runs.d.mts +52 -5
- package/resources/runs.d.mts.map +1 -1
- package/resources/runs.d.ts +52 -5
- package/resources/runs.d.ts.map +1 -1
- package/resources/runs.js +30 -0
- package/resources/runs.js.map +1 -1
- package/resources/runs.mjs +30 -0
- package/resources/runs.mjs.map +1 -1
- package/src/client.ts +34 -5
- package/src/internal/to-file.ts +1 -1
- package/src/resources/index.ts +17 -3
- package/src/resources/metrics.ts +438 -27
- package/src/resources/records.ts +48 -1
- package/src/resources/runs.ts +76 -5
- 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/resources/records.d.mts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import * as ScoresAPI from "./scores.mjs";
|
|
2
3
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
4
|
+
import { PagePromise, PaginatedResponse, type PaginatedResponseParams } from "../core/pagination.mjs";
|
|
3
5
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
6
|
export declare class Records extends APIResource {
|
|
5
7
|
/**
|
|
@@ -18,7 +20,23 @@ export declare class Records extends APIResource {
|
|
|
18
20
|
* ```
|
|
19
21
|
*/
|
|
20
22
|
create(runID: string, body: RecordCreateParams, options?: RequestOptions): APIPromise<Record>;
|
|
23
|
+
/**
|
|
24
|
+
* Retrieve a paginated list of Records for a Run, including all scores for each
|
|
25
|
+
* record.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* // Automatically fetches more pages as needed.
|
|
30
|
+
* for await (const recordListResponse of client.records.list(
|
|
31
|
+
* '135',
|
|
32
|
+
* )) {
|
|
33
|
+
* // ...
|
|
34
|
+
* }
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
list(runID: string, query?: RecordListParams | null | undefined, options?: RequestOptions): PagePromise<RecordListResponsesPaginatedResponse, RecordListResponse>;
|
|
21
38
|
}
|
|
39
|
+
export type RecordListResponsesPaginatedResponse = PaginatedResponse<RecordListResponse>;
|
|
22
40
|
/**
|
|
23
41
|
* A record of a system execution in the Scorecard system.
|
|
24
42
|
*/
|
|
@@ -55,6 +73,15 @@ export interface Record {
|
|
|
55
73
|
*/
|
|
56
74
|
testcaseId?: string;
|
|
57
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* A record with all its associated scores.
|
|
78
|
+
*/
|
|
79
|
+
export interface RecordListResponse extends Record {
|
|
80
|
+
/**
|
|
81
|
+
* All scores associated with this record.
|
|
82
|
+
*/
|
|
83
|
+
scores: Array<ScoresAPI.Score>;
|
|
84
|
+
}
|
|
58
85
|
export interface RecordCreateParams {
|
|
59
86
|
/**
|
|
60
87
|
* The expected outputs for the Testcase.
|
|
@@ -80,7 +107,9 @@ export interface RecordCreateParams {
|
|
|
80
107
|
*/
|
|
81
108
|
testcaseId?: string;
|
|
82
109
|
}
|
|
110
|
+
export interface RecordListParams extends PaginatedResponseParams {
|
|
111
|
+
}
|
|
83
112
|
export declare namespace Records {
|
|
84
|
-
export { type Record as Record, type RecordCreateParams as RecordCreateParams };
|
|
113
|
+
export { type Record as Record, type RecordListResponse as RecordListResponse, type RecordListResponsesPaginatedResponse as RecordListResponsesPaginatedResponse, type RecordCreateParams as RecordCreateParams, type RecordListParams as RecordListParams, };
|
|
85
114
|
}
|
|
86
115
|
//# sourceMappingURL=records.d.mts.map
|
|
@@ -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,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;
|
|
1
|
+
{"version":3,"file":"records.d.mts","sourceRoot":"","sources":["../src/resources/records.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,UAAU,EAAE;OACd,EAAE,WAAW,EAAE,iBAAiB,EAAE,KAAK,uBAAuB,EAAE;OAChE,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI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IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gBAAiB,SAAQ,uBAAuB;CAAG;AAEpE,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oCAAoC,IAAI,oCAAoC,EACjF,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
package/resources/records.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import * as ScoresAPI from "./scores.js";
|
|
2
3
|
import { APIPromise } from "../core/api-promise.js";
|
|
4
|
+
import { PagePromise, PaginatedResponse, type PaginatedResponseParams } from "../core/pagination.js";
|
|
3
5
|
import { RequestOptions } from "../internal/request-options.js";
|
|
4
6
|
export declare class Records extends APIResource {
|
|
5
7
|
/**
|
|
@@ -18,7 +20,23 @@ export declare class Records extends APIResource {
|
|
|
18
20
|
* ```
|
|
19
21
|
*/
|
|
20
22
|
create(runID: string, body: RecordCreateParams, options?: RequestOptions): APIPromise<Record>;
|
|
23
|
+
/**
|
|
24
|
+
* Retrieve a paginated list of Records for a Run, including all scores for each
|
|
25
|
+
* record.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* // Automatically fetches more pages as needed.
|
|
30
|
+
* for await (const recordListResponse of client.records.list(
|
|
31
|
+
* '135',
|
|
32
|
+
* )) {
|
|
33
|
+
* // ...
|
|
34
|
+
* }
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
list(runID: string, query?: RecordListParams | null | undefined, options?: RequestOptions): PagePromise<RecordListResponsesPaginatedResponse, RecordListResponse>;
|
|
21
38
|
}
|
|
39
|
+
export type RecordListResponsesPaginatedResponse = PaginatedResponse<RecordListResponse>;
|
|
22
40
|
/**
|
|
23
41
|
* A record of a system execution in the Scorecard system.
|
|
24
42
|
*/
|
|
@@ -55,6 +73,15 @@ export interface Record {
|
|
|
55
73
|
*/
|
|
56
74
|
testcaseId?: string;
|
|
57
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* A record with all its associated scores.
|
|
78
|
+
*/
|
|
79
|
+
export interface RecordListResponse extends Record {
|
|
80
|
+
/**
|
|
81
|
+
* All scores associated with this record.
|
|
82
|
+
*/
|
|
83
|
+
scores: Array<ScoresAPI.Score>;
|
|
84
|
+
}
|
|
58
85
|
export interface RecordCreateParams {
|
|
59
86
|
/**
|
|
60
87
|
* The expected outputs for the Testcase.
|
|
@@ -80,7 +107,9 @@ export interface RecordCreateParams {
|
|
|
80
107
|
*/
|
|
81
108
|
testcaseId?: string;
|
|
82
109
|
}
|
|
110
|
+
export interface RecordListParams extends PaginatedResponseParams {
|
|
111
|
+
}
|
|
83
112
|
export declare namespace Records {
|
|
84
|
-
export { type Record as Record, type RecordCreateParams as RecordCreateParams };
|
|
113
|
+
export { type Record as Record, type RecordListResponse as RecordListResponse, type RecordListResponsesPaginatedResponse as RecordListResponsesPaginatedResponse, type RecordCreateParams as RecordCreateParams, type RecordListParams as RecordListParams, };
|
|
85
114
|
}
|
|
86
115
|
//# sourceMappingURL=records.d.ts.map
|
|
@@ -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,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;
|
|
1
|
+
{"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../src/resources/records.ts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AAQ,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAErC;;;OAGG;IACH,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAEnC;;OAEG;IACH,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAEpC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gBAAiB,SAAQ,uBAAuB;CAAG;AAEpE,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oCAAoC,IAAI,oCAAoC,EACjF,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
package/resources/records.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Records = void 0;
|
|
5
5
|
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../core/pagination.js");
|
|
6
7
|
const path_1 = require("../internal/utils/path.js");
|
|
7
8
|
class Records extends resource_1.APIResource {
|
|
8
9
|
/**
|
|
@@ -23,6 +24,26 @@ class Records extends resource_1.APIResource {
|
|
|
23
24
|
create(runID, body, options) {
|
|
24
25
|
return this._client.post((0, path_1.path) `/runs/${runID}/records`, { body, ...options });
|
|
25
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Retrieve a paginated list of Records for a Run, including all scores for each
|
|
29
|
+
* record.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* // Automatically fetches more pages as needed.
|
|
34
|
+
* for await (const recordListResponse of client.records.list(
|
|
35
|
+
* '135',
|
|
36
|
+
* )) {
|
|
37
|
+
* // ...
|
|
38
|
+
* }
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
list(runID, query = {}, options) {
|
|
42
|
+
return this._client.getAPIList((0, path_1.path) `/runs/${runID}/records`, (pagination_1.PaginatedResponse), {
|
|
43
|
+
query,
|
|
44
|
+
...options,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
26
47
|
}
|
|
27
48
|
exports.Records = Records;
|
|
28
49
|
//# sourceMappingURL=records.js.map
|
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;AAG/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;
|
|
1
|
+
{"version":3,"file":"records.js","sourceRoot":"","sources":["../src/resources/records.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAAkG;AAElG,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;IAED;;;;;;;;;;;;;OAaG;IACH,IAAI,CACF,KAAa,EACb,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAA,WAAI,EAAA,SAAS,KAAK,UAAU,EAAE,CAAA,8BAAqC,CAAA,EAAE;YAClG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AA5CD,0BA4CC"}
|
package/resources/records.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { PaginatedResponse } from "../core/pagination.mjs";
|
|
3
4
|
import { path } from "../internal/utils/path.mjs";
|
|
4
5
|
export class Records extends APIResource {
|
|
5
6
|
/**
|
|
@@ -20,5 +21,25 @@ export class Records extends APIResource {
|
|
|
20
21
|
create(runID, body, options) {
|
|
21
22
|
return this._client.post(path `/runs/${runID}/records`, { body, ...options });
|
|
22
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Retrieve a paginated list of Records for a Run, including all scores for each
|
|
26
|
+
* record.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* // Automatically fetches more pages as needed.
|
|
31
|
+
* for await (const recordListResponse of client.records.list(
|
|
32
|
+
* '135',
|
|
33
|
+
* )) {
|
|
34
|
+
* // ...
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
list(runID, query = {}, options) {
|
|
39
|
+
return this._client.getAPIList(path `/runs/${runID}/records`, (PaginatedResponse), {
|
|
40
|
+
query,
|
|
41
|
+
...options,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
23
44
|
}
|
|
24
45
|
//# sourceMappingURL=records.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"records.mjs","sourceRoot":"","sources":["../src/resources/records.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,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"}
|
|
1
|
+
{"version":3,"file":"records.mjs","sourceRoot":"","sources":["../src/resources/records.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAe,iBAAiB,EAAgC;OAEhE,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;IAED;;;;;;;;;;;;;OAaG;IACH,IAAI,CACF,KAAa,EACb,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAA,SAAS,KAAK,UAAU,EAAE,CAAA,iBAAqC,CAAA,EAAE;YAClG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/resources/runs.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
2
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { PagePromise, PaginatedResponse, type PaginatedResponseParams } from "../core/pagination.mjs";
|
|
3
4
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
5
|
export declare class Runs extends APIResource {
|
|
5
6
|
/**
|
|
@@ -15,7 +16,30 @@ export declare class Runs extends APIResource {
|
|
|
15
16
|
* ```
|
|
16
17
|
*/
|
|
17
18
|
create(projectID: string, body: RunCreateParams, options?: RequestOptions): APIPromise<Run>;
|
|
19
|
+
/**
|
|
20
|
+
* Retrieve a paginated list of all Runs for a Project. Runs are ordered by
|
|
21
|
+
* creation date, most recent first.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* // Automatically fetches more pages as needed.
|
|
26
|
+
* for await (const run of client.runs.list('314')) {
|
|
27
|
+
* // ...
|
|
28
|
+
* }
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
list(projectID: string, query?: RunListParams | null | undefined, options?: RequestOptions): PagePromise<RunsPaginatedResponse, Run>;
|
|
32
|
+
/**
|
|
33
|
+
* Retrieve a specific Run by ID.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const run = await client.runs.get('135');
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
get(runID: string, options?: RequestOptions): APIPromise<Run>;
|
|
18
41
|
}
|
|
42
|
+
export type RunsPaginatedResponse = PaginatedResponse<Run>;
|
|
19
43
|
/**
|
|
20
44
|
* A Run in the Scorecard system.
|
|
21
45
|
*/
|
|
@@ -28,18 +52,39 @@ export interface Run {
|
|
|
28
52
|
* The IDs of the metrics this Run is using.
|
|
29
53
|
*/
|
|
30
54
|
metricIds: Array<string>;
|
|
55
|
+
/**
|
|
56
|
+
* The IDs of the metric versions this Run is using.
|
|
57
|
+
*/
|
|
58
|
+
metricVersionIds: Array<string>;
|
|
59
|
+
/**
|
|
60
|
+
* The number of expected records in the Run. Determined by the number of testcases
|
|
61
|
+
* in the Run's Testset at the time of Run creation.
|
|
62
|
+
*/
|
|
63
|
+
numExpectedRecords: number | null;
|
|
64
|
+
/**
|
|
65
|
+
* The number of records in the Run.
|
|
66
|
+
*/
|
|
67
|
+
numRecords: number;
|
|
68
|
+
/**
|
|
69
|
+
* The number of completed scores in the Run so far.
|
|
70
|
+
*/
|
|
71
|
+
numScores: number;
|
|
31
72
|
/**
|
|
32
73
|
* The status of the Run.
|
|
33
74
|
*/
|
|
34
75
|
status: 'pending' | 'awaiting_execution' | 'running_execution' | 'awaiting_scoring' | 'running_scoring' | 'awaiting_human_scoring' | 'completed';
|
|
35
76
|
/**
|
|
36
|
-
* The ID of the
|
|
77
|
+
* The ID of the system this Run is using.
|
|
37
78
|
*/
|
|
38
|
-
|
|
79
|
+
systemId: string | null;
|
|
39
80
|
/**
|
|
40
81
|
* The ID of the system version this Run is using.
|
|
41
82
|
*/
|
|
42
|
-
systemVersionId
|
|
83
|
+
systemVersionId: string | null;
|
|
84
|
+
/**
|
|
85
|
+
* The ID of the Testset this Run is testing.
|
|
86
|
+
*/
|
|
87
|
+
testsetId: string | null;
|
|
43
88
|
}
|
|
44
89
|
export interface RunCreateParams {
|
|
45
90
|
/**
|
|
@@ -49,13 +94,15 @@ export interface RunCreateParams {
|
|
|
49
94
|
/**
|
|
50
95
|
* The ID of the system version this Run is using.
|
|
51
96
|
*/
|
|
52
|
-
systemVersionId?: string;
|
|
97
|
+
systemVersionId?: string | null;
|
|
53
98
|
/**
|
|
54
99
|
* The ID of the Testset this Run is testing.
|
|
55
100
|
*/
|
|
56
101
|
testsetId?: string | null;
|
|
57
102
|
}
|
|
103
|
+
export interface RunListParams extends PaginatedResponseParams {
|
|
104
|
+
}
|
|
58
105
|
export declare namespace Runs {
|
|
59
|
-
export { type Run as Run, type RunCreateParams as RunCreateParams };
|
|
106
|
+
export { type Run as Run, type RunsPaginatedResponse as RunsPaginatedResponse, type RunCreateParams as RunCreateParams, type RunListParams as RunListParams, };
|
|
60
107
|
}
|
|
61
108
|
//# 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":"OA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AAE,MAAM,GAAG,IAAI,CAAC;IAElC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,EACF,SAAS,GACT,oBAAoB,GACpB,mBAAmB,GACnB,kBAAkB,GAClB,iBAAiB,GACjB,wBAAwB,GACxB,WAAW,CAAC;IAEhB;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB;;OAEG;IACH,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEzB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,aAAc,SAAQ,uBAAuB;CAAG;AAEjE,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,GAAG,IAAI,GAAG,EACf,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,aAAa,IAAI,aAAa,GACpC,CAAC;CACH"}
|
package/resources/runs.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.js";
|
|
2
2
|
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { PagePromise, PaginatedResponse, type PaginatedResponseParams } from "../core/pagination.js";
|
|
3
4
|
import { RequestOptions } from "../internal/request-options.js";
|
|
4
5
|
export declare class Runs extends APIResource {
|
|
5
6
|
/**
|
|
@@ -15,7 +16,30 @@ export declare class Runs extends APIResource {
|
|
|
15
16
|
* ```
|
|
16
17
|
*/
|
|
17
18
|
create(projectID: string, body: RunCreateParams, options?: RequestOptions): APIPromise<Run>;
|
|
19
|
+
/**
|
|
20
|
+
* Retrieve a paginated list of all Runs for a Project. Runs are ordered by
|
|
21
|
+
* creation date, most recent first.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* // Automatically fetches more pages as needed.
|
|
26
|
+
* for await (const run of client.runs.list('314')) {
|
|
27
|
+
* // ...
|
|
28
|
+
* }
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
list(projectID: string, query?: RunListParams | null | undefined, options?: RequestOptions): PagePromise<RunsPaginatedResponse, Run>;
|
|
32
|
+
/**
|
|
33
|
+
* Retrieve a specific Run by ID.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const run = await client.runs.get('135');
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
get(runID: string, options?: RequestOptions): APIPromise<Run>;
|
|
18
41
|
}
|
|
42
|
+
export type RunsPaginatedResponse = PaginatedResponse<Run>;
|
|
19
43
|
/**
|
|
20
44
|
* A Run in the Scorecard system.
|
|
21
45
|
*/
|
|
@@ -28,18 +52,39 @@ export interface Run {
|
|
|
28
52
|
* The IDs of the metrics this Run is using.
|
|
29
53
|
*/
|
|
30
54
|
metricIds: Array<string>;
|
|
55
|
+
/**
|
|
56
|
+
* The IDs of the metric versions this Run is using.
|
|
57
|
+
*/
|
|
58
|
+
metricVersionIds: Array<string>;
|
|
59
|
+
/**
|
|
60
|
+
* The number of expected records in the Run. Determined by the number of testcases
|
|
61
|
+
* in the Run's Testset at the time of Run creation.
|
|
62
|
+
*/
|
|
63
|
+
numExpectedRecords: number | null;
|
|
64
|
+
/**
|
|
65
|
+
* The number of records in the Run.
|
|
66
|
+
*/
|
|
67
|
+
numRecords: number;
|
|
68
|
+
/**
|
|
69
|
+
* The number of completed scores in the Run so far.
|
|
70
|
+
*/
|
|
71
|
+
numScores: number;
|
|
31
72
|
/**
|
|
32
73
|
* The status of the Run.
|
|
33
74
|
*/
|
|
34
75
|
status: 'pending' | 'awaiting_execution' | 'running_execution' | 'awaiting_scoring' | 'running_scoring' | 'awaiting_human_scoring' | 'completed';
|
|
35
76
|
/**
|
|
36
|
-
* The ID of the
|
|
77
|
+
* The ID of the system this Run is using.
|
|
37
78
|
*/
|
|
38
|
-
|
|
79
|
+
systemId: string | null;
|
|
39
80
|
/**
|
|
40
81
|
* The ID of the system version this Run is using.
|
|
41
82
|
*/
|
|
42
|
-
systemVersionId
|
|
83
|
+
systemVersionId: string | null;
|
|
84
|
+
/**
|
|
85
|
+
* The ID of the Testset this Run is testing.
|
|
86
|
+
*/
|
|
87
|
+
testsetId: string | null;
|
|
43
88
|
}
|
|
44
89
|
export interface RunCreateParams {
|
|
45
90
|
/**
|
|
@@ -49,13 +94,15 @@ export interface RunCreateParams {
|
|
|
49
94
|
/**
|
|
50
95
|
* The ID of the system version this Run is using.
|
|
51
96
|
*/
|
|
52
|
-
systemVersionId?: string;
|
|
97
|
+
systemVersionId?: string | null;
|
|
53
98
|
/**
|
|
54
99
|
* The ID of the Testset this Run is testing.
|
|
55
100
|
*/
|
|
56
101
|
testsetId?: string | null;
|
|
57
102
|
}
|
|
103
|
+
export interface RunListParams extends PaginatedResponseParams {
|
|
104
|
+
}
|
|
58
105
|
export declare namespace Runs {
|
|
59
|
-
export { type Run as Run, type RunCreateParams as RunCreateParams };
|
|
106
|
+
export { type Run as Run, type RunsPaginatedResponse as RunsPaginatedResponse, type RunCreateParams as RunCreateParams, type RunListParams as RunListParams, };
|
|
60
107
|
}
|
|
61
108
|
//# 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,qBA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;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,EACF,SAAS,GACT,oBAAoB,GACpB,mBAAmB,GACnB,kBAAkB,GAClB,iBAAiB,GACjB,wBAAwB,GACxB,WAAW,CAAC;IAEhB;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB;;OAEG;IACH,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEzB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,aAAc,SAAQ,uBAAuB;CAAG;AAEjE,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,GAAG,IAAI,GAAG,EACf,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,aAAa,IAAI,aAAa,GACpC,CAAC;CACH"}
|
package/resources/runs.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Runs = void 0;
|
|
5
5
|
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../core/pagination.js");
|
|
6
7
|
const path_1 = require("../internal/utils/path.js");
|
|
7
8
|
class Runs extends resource_1.APIResource {
|
|
8
9
|
/**
|
|
@@ -20,6 +21,35 @@ class Runs extends resource_1.APIResource {
|
|
|
20
21
|
create(projectID, body, options) {
|
|
21
22
|
return this._client.post((0, path_1.path) `/projects/${projectID}/runs`, { body, ...options });
|
|
22
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Retrieve a paginated list of all Runs for a Project. Runs are ordered by
|
|
26
|
+
* creation date, most recent first.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* // Automatically fetches more pages as needed.
|
|
31
|
+
* for await (const run of client.runs.list('314')) {
|
|
32
|
+
* // ...
|
|
33
|
+
* }
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
list(projectID, query = {}, options) {
|
|
37
|
+
return this._client.getAPIList((0, path_1.path) `/projects/${projectID}/runs`, (pagination_1.PaginatedResponse), {
|
|
38
|
+
query,
|
|
39
|
+
...options,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Retrieve a specific Run by ID.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const run = await client.runs.get('135');
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
get(runID, options) {
|
|
51
|
+
return this._client.get((0, path_1.path) `/runs/${runID}`, options);
|
|
52
|
+
}
|
|
23
53
|
}
|
|
24
54
|
exports.Runs = Runs;
|
|
25
55
|
//# 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;
|
|
1
|
+
{"version":3,"file":"runs.js","sourceRoot":"","sources":["../src/resources/runs.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAAkG;AAElG,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;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CACF,SAAiB,EACjB,QAA0C,EAAE,EAC5C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAA,WAAI,EAAA,aAAa,SAAS,OAAO,EAAE,CAAA,8BAAsB,CAAA,EAAE;YACxF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,GAAG,CAAC,KAAa,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,SAAS,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;CACF;AAnDD,oBAmDC"}
|
package/resources/runs.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { PaginatedResponse } from "../core/pagination.mjs";
|
|
3
4
|
import { path } from "../internal/utils/path.mjs";
|
|
4
5
|
export class Runs extends APIResource {
|
|
5
6
|
/**
|
|
@@ -17,5 +18,34 @@ export class Runs extends APIResource {
|
|
|
17
18
|
create(projectID, body, options) {
|
|
18
19
|
return this._client.post(path `/projects/${projectID}/runs`, { body, ...options });
|
|
19
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Retrieve a paginated list of all Runs for a Project. Runs are ordered by
|
|
23
|
+
* creation date, most recent first.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* // Automatically fetches more pages as needed.
|
|
28
|
+
* for await (const run of client.runs.list('314')) {
|
|
29
|
+
* // ...
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
list(projectID, query = {}, options) {
|
|
34
|
+
return this._client.getAPIList(path `/projects/${projectID}/runs`, (PaginatedResponse), {
|
|
35
|
+
query,
|
|
36
|
+
...options,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Retrieve a specific Run by ID.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* const run = await client.runs.get('135');
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
get(runID, options) {
|
|
48
|
+
return this._client.get(path `/runs/${runID}`, options);
|
|
49
|
+
}
|
|
20
50
|
}
|
|
21
51
|
//# 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;
|
|
1
|
+
{"version":3,"file":"runs.mjs","sourceRoot":"","sources":["../src/resources/runs.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAe,iBAAiB,EAAgC;OAEhE,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;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CACF,SAAiB,EACjB,QAA0C,EAAE,EAC5C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAA,aAAa,SAAS,OAAO,EAAE,CAAA,iBAAsB,CAAA,EAAE;YACxF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,GAAG,CAAC,KAAa,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,SAAS,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;CACF"}
|
package/src/client.ts
CHANGED
|
@@ -18,7 +18,14 @@ import { AbstractPage, type PaginatedResponseParams, PaginatedResponseResponse }
|
|
|
18
18
|
import * as Uploads from './core/uploads';
|
|
19
19
|
import * as API from './resources/index';
|
|
20
20
|
import { APIPromise } from './core/api-promise';
|
|
21
|
-
import {
|
|
21
|
+
import {
|
|
22
|
+
Metric,
|
|
23
|
+
MetricCreateParams,
|
|
24
|
+
MetricListParams,
|
|
25
|
+
MetricUpdateParams,
|
|
26
|
+
Metrics,
|
|
27
|
+
MetricsPaginatedResponse,
|
|
28
|
+
} from './resources/metrics';
|
|
22
29
|
import {
|
|
23
30
|
Project,
|
|
24
31
|
ProjectCreateParams,
|
|
@@ -26,8 +33,15 @@ import {
|
|
|
26
33
|
Projects,
|
|
27
34
|
ProjectsPaginatedResponse,
|
|
28
35
|
} from './resources/projects';
|
|
29
|
-
import {
|
|
30
|
-
|
|
36
|
+
import {
|
|
37
|
+
Record,
|
|
38
|
+
RecordCreateParams,
|
|
39
|
+
RecordListParams,
|
|
40
|
+
RecordListResponse,
|
|
41
|
+
RecordListResponsesPaginatedResponse,
|
|
42
|
+
Records,
|
|
43
|
+
} from './resources/records';
|
|
44
|
+
import { Run, RunCreateParams, RunListParams, Runs, RunsPaginatedResponse } from './resources/runs';
|
|
31
45
|
import { Score, ScoreUpsertParams, Scores } from './resources/scores';
|
|
32
46
|
import {
|
|
33
47
|
Testcase,
|
|
@@ -872,16 +886,31 @@ export declare namespace Scorecard {
|
|
|
872
886
|
type TestcaseDeleteParams as TestcaseDeleteParams,
|
|
873
887
|
};
|
|
874
888
|
|
|
875
|
-
export {
|
|
889
|
+
export {
|
|
890
|
+
Runs as Runs,
|
|
891
|
+
type Run as Run,
|
|
892
|
+
type RunsPaginatedResponse as RunsPaginatedResponse,
|
|
893
|
+
type RunCreateParams as RunCreateParams,
|
|
894
|
+
type RunListParams as RunListParams,
|
|
895
|
+
};
|
|
876
896
|
|
|
877
897
|
export {
|
|
878
898
|
Metrics as Metrics,
|
|
879
899
|
type Metric as Metric,
|
|
900
|
+
type MetricsPaginatedResponse as MetricsPaginatedResponse,
|
|
880
901
|
type MetricCreateParams as MetricCreateParams,
|
|
881
902
|
type MetricUpdateParams as MetricUpdateParams,
|
|
903
|
+
type MetricListParams as MetricListParams,
|
|
882
904
|
};
|
|
883
905
|
|
|
884
|
-
export {
|
|
906
|
+
export {
|
|
907
|
+
Records as Records,
|
|
908
|
+
type Record as Record,
|
|
909
|
+
type RecordListResponse as RecordListResponse,
|
|
910
|
+
type RecordListResponsesPaginatedResponse as RecordListResponsesPaginatedResponse,
|
|
911
|
+
type RecordCreateParams as RecordCreateParams,
|
|
912
|
+
type RecordListParams as RecordListParams,
|
|
913
|
+
};
|
|
885
914
|
|
|
886
915
|
export { Scores as Scores, type Score as Score, type ScoreUpsertParams as ScoreUpsertParams };
|
|
887
916
|
|
package/src/internal/to-file.ts
CHANGED
|
@@ -73,7 +73,7 @@ export type ToFileInput =
|
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
75
|
* Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats
|
|
76
|
-
* @param value the raw content of the file.
|
|
76
|
+
* @param value the raw content of the file. Can be an {@link Uploadable}, BlobLikePart, or AsyncIterable of BlobLikeParts
|
|
77
77
|
* @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible
|
|
78
78
|
* @param {Object=} options additional properties
|
|
79
79
|
* @param {string=} options.type the MIME type of the content
|
package/src/resources/index.ts
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
export * from './shared';
|
|
4
|
-
export {
|
|
4
|
+
export {
|
|
5
|
+
Metrics,
|
|
6
|
+
type Metric,
|
|
7
|
+
type MetricCreateParams,
|
|
8
|
+
type MetricUpdateParams,
|
|
9
|
+
type MetricListParams,
|
|
10
|
+
type MetricsPaginatedResponse,
|
|
11
|
+
} from './metrics';
|
|
5
12
|
export {
|
|
6
13
|
Projects,
|
|
7
14
|
type Project,
|
|
@@ -9,8 +16,15 @@ export {
|
|
|
9
16
|
type ProjectListParams,
|
|
10
17
|
type ProjectsPaginatedResponse,
|
|
11
18
|
} from './projects';
|
|
12
|
-
export {
|
|
13
|
-
|
|
19
|
+
export {
|
|
20
|
+
Records,
|
|
21
|
+
type Record,
|
|
22
|
+
type RecordListResponse,
|
|
23
|
+
type RecordCreateParams,
|
|
24
|
+
type RecordListParams,
|
|
25
|
+
type RecordListResponsesPaginatedResponse,
|
|
26
|
+
} from './records';
|
|
27
|
+
export { Runs, type Run, type RunCreateParams, type RunListParams, type RunsPaginatedResponse } from './runs';
|
|
14
28
|
export { Scores, type Score, type ScoreUpsertParams } from './scores';
|
|
15
29
|
export {
|
|
16
30
|
Systems,
|