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/src/resources/runs.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
4
|
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { PagePromise, PaginatedResponse, type PaginatedResponseParams } from '../core/pagination';
|
|
5
6
|
import { RequestOptions } from '../internal/request-options';
|
|
6
7
|
import { path } from '../internal/utils/path';
|
|
7
8
|
|
|
@@ -21,8 +22,45 @@ export class Runs extends APIResource {
|
|
|
21
22
|
create(projectID: string, body: RunCreateParams, options?: RequestOptions): APIPromise<Run> {
|
|
22
23
|
return this._client.post(path`/projects/${projectID}/runs`, { body, ...options });
|
|
23
24
|
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Retrieve a paginated list of all Runs for a Project. Runs are ordered by
|
|
28
|
+
* creation date, most recent first.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* // Automatically fetches more pages as needed.
|
|
33
|
+
* for await (const run of client.runs.list('314')) {
|
|
34
|
+
* // ...
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
list(
|
|
39
|
+
projectID: string,
|
|
40
|
+
query: RunListParams | null | undefined = {},
|
|
41
|
+
options?: RequestOptions,
|
|
42
|
+
): PagePromise<RunsPaginatedResponse, Run> {
|
|
43
|
+
return this._client.getAPIList(path`/projects/${projectID}/runs`, PaginatedResponse<Run>, {
|
|
44
|
+
query,
|
|
45
|
+
...options,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Retrieve a specific Run by ID.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* const run = await client.runs.get('135');
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
get(runID: string, options?: RequestOptions): APIPromise<Run> {
|
|
58
|
+
return this._client.get(path`/runs/${runID}`, options);
|
|
59
|
+
}
|
|
24
60
|
}
|
|
25
61
|
|
|
62
|
+
export type RunsPaginatedResponse = PaginatedResponse<Run>;
|
|
63
|
+
|
|
26
64
|
/**
|
|
27
65
|
* A Run in the Scorecard system.
|
|
28
66
|
*/
|
|
@@ -37,6 +75,27 @@ export interface Run {
|
|
|
37
75
|
*/
|
|
38
76
|
metricIds: Array<string>;
|
|
39
77
|
|
|
78
|
+
/**
|
|
79
|
+
* The IDs of the metric versions this Run is using.
|
|
80
|
+
*/
|
|
81
|
+
metricVersionIds: Array<string>;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The number of expected records in the Run. Determined by the number of testcases
|
|
85
|
+
* in the Run's Testset at the time of Run creation.
|
|
86
|
+
*/
|
|
87
|
+
numExpectedRecords: number | null;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* The number of records in the Run.
|
|
91
|
+
*/
|
|
92
|
+
numRecords: number;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* The number of completed scores in the Run so far.
|
|
96
|
+
*/
|
|
97
|
+
numScores: number;
|
|
98
|
+
|
|
40
99
|
/**
|
|
41
100
|
* The status of the Run.
|
|
42
101
|
*/
|
|
@@ -50,14 +109,19 @@ export interface Run {
|
|
|
50
109
|
| 'completed';
|
|
51
110
|
|
|
52
111
|
/**
|
|
53
|
-
* The ID of the
|
|
112
|
+
* The ID of the system this Run is using.
|
|
54
113
|
*/
|
|
55
|
-
|
|
114
|
+
systemId: string | null;
|
|
56
115
|
|
|
57
116
|
/**
|
|
58
117
|
* The ID of the system version this Run is using.
|
|
59
118
|
*/
|
|
60
|
-
systemVersionId
|
|
119
|
+
systemVersionId: string | null;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* The ID of the Testset this Run is testing.
|
|
123
|
+
*/
|
|
124
|
+
testsetId: string | null;
|
|
61
125
|
}
|
|
62
126
|
|
|
63
127
|
export interface RunCreateParams {
|
|
@@ -69,7 +133,7 @@ export interface RunCreateParams {
|
|
|
69
133
|
/**
|
|
70
134
|
* The ID of the system version this Run is using.
|
|
71
135
|
*/
|
|
72
|
-
systemVersionId?: string;
|
|
136
|
+
systemVersionId?: string | null;
|
|
73
137
|
|
|
74
138
|
/**
|
|
75
139
|
* The ID of the Testset this Run is testing.
|
|
@@ -77,6 +141,13 @@ export interface RunCreateParams {
|
|
|
77
141
|
testsetId?: string | null;
|
|
78
142
|
}
|
|
79
143
|
|
|
144
|
+
export interface RunListParams extends PaginatedResponseParams {}
|
|
145
|
+
|
|
80
146
|
export declare namespace Runs {
|
|
81
|
-
export {
|
|
147
|
+
export {
|
|
148
|
+
type Run as Run,
|
|
149
|
+
type RunsPaginatedResponse as RunsPaginatedResponse,
|
|
150
|
+
type RunCreateParams as RunCreateParams,
|
|
151
|
+
type RunListParams as RunListParams,
|
|
152
|
+
};
|
|
82
153
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.2.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.
|
|
1
|
+
export declare const VERSION = "2.2.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.
|
|
1
|
+
export declare const VERSION = "2.2.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.2.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|