scorecard-ai 1.0.0-alpha.2 → 1.0.0-alpha.4
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 +28 -0
- package/README.md +10 -12
- package/client.d.mts +3 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -3
- package/client.d.ts.map +1 -1
- package/client.js +9 -7
- package/client.js.map +1 -1
- package/client.mjs +9 -7
- package/client.mjs.map +1 -1
- package/internal/headers.d.mts +1 -1
- package/internal/headers.d.mts.map +1 -1
- package/internal/headers.d.ts +1 -1
- package/internal/headers.d.ts.map +1 -1
- package/internal/headers.js +2 -0
- package/internal/headers.js.map +1 -1
- package/internal/headers.mjs +2 -0
- package/internal/headers.mjs.map +1 -1
- package/internal/utils/base64.d.mts.map +1 -1
- package/internal/utils/base64.d.ts.map +1 -1
- package/internal/utils/base64.js +4 -3
- package/internal/utils/base64.js.map +1 -1
- package/internal/utils/base64.mjs +4 -3
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +32 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/lib/runAndEvaluate.d.mts +19 -0
- package/lib/runAndEvaluate.d.mts.map +1 -0
- package/lib/runAndEvaluate.d.ts +19 -0
- package/lib/runAndEvaluate.d.ts.map +1 -0
- package/lib/runAndEvaluate.js +40 -0
- package/lib/runAndEvaluate.js.map +1 -0
- package/lib/runAndEvaluate.mjs +36 -0
- package/lib/runAndEvaluate.mjs.map +1 -0
- package/package.json +12 -2
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- 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/resources/projects.d.mts +5 -5
- package/resources/projects.d.ts +5 -5
- package/resources/projects.js +2 -2
- package/resources/projects.mjs +2 -2
- package/resources/records.d.mts +63 -0
- package/resources/records.d.mts.map +1 -0
- package/resources/records.d.ts +63 -0
- package/resources/records.d.ts.map +1 -0
- package/resources/{execution-records.js → records.js} +6 -6
- package/resources/records.js.map +1 -0
- package/resources/{execution-records.mjs → records.mjs} +4 -4
- package/resources/records.mjs.map +1 -0
- package/resources/runs.d.mts +13 -13
- package/resources/runs.d.ts +13 -13
- package/resources/runs.js +2 -2
- package/resources/runs.mjs +2 -2
- package/resources/shared.d.mts +1 -1
- package/resources/shared.d.ts +1 -1
- package/resources/system-configs.d.mts +11 -11
- package/resources/system-configs.d.ts +11 -11
- package/resources/systems.d.mts +20 -20
- package/resources/systems.d.ts +20 -20
- package/resources/testcases.d.mts +23 -23
- package/resources/testcases.d.ts +23 -23
- package/resources/testcases.js +5 -5
- package/resources/testcases.mjs +5 -5
- package/resources/testsets.d.mts +43 -42
- package/resources/testsets.d.mts.map +1 -1
- package/resources/testsets.d.ts +43 -42
- package/resources/testsets.d.ts.map +1 -1
- package/resources/testsets.js +5 -5
- package/resources/testsets.mjs +5 -5
- package/src/client.ts +11 -15
- package/src/internal/headers.ts +3 -2
- package/src/internal/utils/base64.ts +5 -4
- package/src/internal/utils/bytes.ts +32 -0
- package/src/lib/runAndEvaluate.ts +54 -0
- package/src/resources/index.ts +1 -5
- package/src/resources/projects.ts +5 -5
- package/src/resources/records.ts +79 -0
- package/src/resources/runs.ts +13 -13
- package/src/resources/shared.ts +1 -1
- package/src/resources/system-configs.ts +11 -11
- package/src/resources/systems.ts +20 -20
- package/src/resources/testcases.ts +23 -23
- package/src/resources/testsets.ts +43 -42
- 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/execution-records.d.mts +0 -62
- package/resources/execution-records.d.mts.map +0 -1
- package/resources/execution-records.d.ts +0 -62
- package/resources/execution-records.d.ts.map +0 -1
- package/resources/execution-records.js.map +0 -1
- package/resources/execution-records.mjs.map +0 -1
- package/src/resources/execution-records.ts +0 -85
package/src/resources/runs.ts
CHANGED
|
@@ -7,14 +7,14 @@ import { path } from '../internal/utils/path';
|
|
|
7
7
|
|
|
8
8
|
export class Runs extends APIResource {
|
|
9
9
|
/**
|
|
10
|
-
* Create a new
|
|
10
|
+
* Create a new Run.
|
|
11
11
|
*/
|
|
12
12
|
create(projectID: string, body: RunCreateParams, options?: RequestOptions): APIPromise<Run> {
|
|
13
13
|
return this._client.post(path`/projects/${projectID}/runs`, { body, ...options });
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* Update the status of a
|
|
17
|
+
* Update the status of a Run.
|
|
18
18
|
*/
|
|
19
19
|
update(runID: string, body: RunUpdateParams, options?: RequestOptions): APIPromise<RunUpdateResponse> {
|
|
20
20
|
return this._client.patch(path`/runs/${runID}`, { body, ...options });
|
|
@@ -26,17 +26,17 @@ export class Runs extends APIResource {
|
|
|
26
26
|
*/
|
|
27
27
|
export interface Run {
|
|
28
28
|
/**
|
|
29
|
-
* The ID of the Run
|
|
29
|
+
* The ID of the Run.
|
|
30
30
|
*/
|
|
31
31
|
id: string;
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
|
-
* The IDs of the metrics this Run is using
|
|
34
|
+
* The IDs of the metrics this Run is using.
|
|
35
35
|
*/
|
|
36
36
|
metricIds: Array<string>;
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
* The status of the Run
|
|
39
|
+
* The status of the Run.
|
|
40
40
|
*/
|
|
41
41
|
status:
|
|
42
42
|
| 'pending'
|
|
@@ -48,24 +48,24 @@ export interface Run {
|
|
|
48
48
|
| 'completed';
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
* The ID of the Testset this Run is testing
|
|
51
|
+
* The ID of the Testset this Run is testing.
|
|
52
52
|
*/
|
|
53
53
|
testsetId: string;
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
* The ID of the system configuration this Run is using
|
|
56
|
+
* The ID of the system configuration this Run is using.
|
|
57
57
|
*/
|
|
58
58
|
systemConfigId?: string;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
export interface RunUpdateResponse {
|
|
62
62
|
/**
|
|
63
|
-
* The ID of the Run
|
|
63
|
+
* The ID of the Run.
|
|
64
64
|
*/
|
|
65
65
|
id: string;
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
|
-
* The status of the Run
|
|
68
|
+
* The status of the Run.
|
|
69
69
|
*/
|
|
70
70
|
status:
|
|
71
71
|
| 'pending'
|
|
@@ -79,24 +79,24 @@ export interface RunUpdateResponse {
|
|
|
79
79
|
|
|
80
80
|
export interface RunCreateParams {
|
|
81
81
|
/**
|
|
82
|
-
* The IDs of the metrics this Run is using
|
|
82
|
+
* The IDs of the metrics this Run is using.
|
|
83
83
|
*/
|
|
84
84
|
metricIds: Array<string>;
|
|
85
85
|
|
|
86
86
|
/**
|
|
87
|
-
* The ID of the Testset this Run is testing
|
|
87
|
+
* The ID of the Testset this Run is testing.
|
|
88
88
|
*/
|
|
89
89
|
testsetId: string;
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
|
-
* The ID of the system configuration this Run is using
|
|
92
|
+
* The ID of the system configuration this Run is using.
|
|
93
93
|
*/
|
|
94
94
|
systemConfigId?: string;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
export interface RunUpdateParams {
|
|
98
98
|
/**
|
|
99
|
-
* The status of the Run
|
|
99
|
+
* The status of the Run.
|
|
100
100
|
*/
|
|
101
101
|
status:
|
|
102
102
|
| 'pending'
|
package/src/resources/shared.ts
CHANGED
|
@@ -78,22 +78,22 @@ export type SystemConfigsPaginatedResponse = PaginatedResponse<SystemConfig>;
|
|
|
78
78
|
*/
|
|
79
79
|
export interface SystemConfig {
|
|
80
80
|
/**
|
|
81
|
-
* The ID of the system configuration
|
|
81
|
+
* The ID of the system configuration.
|
|
82
82
|
*/
|
|
83
83
|
id: string;
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
|
-
* The configuration of the system
|
|
86
|
+
* The configuration of the system.
|
|
87
87
|
*/
|
|
88
88
|
config: Record<string, unknown>;
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
|
-
* The name of the system configuration
|
|
91
|
+
* The name of the system configuration.
|
|
92
92
|
*/
|
|
93
93
|
name: string;
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
|
-
* The ID of the system the configuration belongs to
|
|
96
|
+
* The ID of the system the configuration belongs to.
|
|
97
97
|
*/
|
|
98
98
|
systemId: string;
|
|
99
99
|
|
|
@@ -107,12 +107,12 @@ export interface SystemConfig {
|
|
|
107
107
|
export namespace SystemConfig {
|
|
108
108
|
export interface ValidationError {
|
|
109
109
|
/**
|
|
110
|
-
* Human-readable error description
|
|
110
|
+
* Human-readable error description.
|
|
111
111
|
*/
|
|
112
112
|
message: string;
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
|
-
* JSON Pointer to the field with the validation error
|
|
115
|
+
* JSON Pointer to the field with the validation error.
|
|
116
116
|
*/
|
|
117
117
|
path: string;
|
|
118
118
|
}
|
|
@@ -120,12 +120,12 @@ export namespace SystemConfig {
|
|
|
120
120
|
|
|
121
121
|
export interface SystemConfigCreateParams {
|
|
122
122
|
/**
|
|
123
|
-
* The configuration of the system
|
|
123
|
+
* The configuration of the system.
|
|
124
124
|
*/
|
|
125
125
|
config: Record<string, unknown>;
|
|
126
126
|
|
|
127
127
|
/**
|
|
128
|
-
* The name of the system configuration
|
|
128
|
+
* The name of the system configuration.
|
|
129
129
|
*/
|
|
130
130
|
name: string;
|
|
131
131
|
|
|
@@ -139,12 +139,12 @@ export interface SystemConfigCreateParams {
|
|
|
139
139
|
export namespace SystemConfigCreateParams {
|
|
140
140
|
export interface ValidationError {
|
|
141
141
|
/**
|
|
142
|
-
* Human-readable error description
|
|
142
|
+
* Human-readable error description.
|
|
143
143
|
*/
|
|
144
144
|
message: string;
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
|
-
* JSON Pointer to the field with the validation error
|
|
147
|
+
* JSON Pointer to the field with the validation error.
|
|
148
148
|
*/
|
|
149
149
|
path: string;
|
|
150
150
|
}
|
|
@@ -154,7 +154,7 @@ export interface SystemConfigListParams extends PaginatedResponseParams {}
|
|
|
154
154
|
|
|
155
155
|
export interface SystemConfigGetParams {
|
|
156
156
|
/**
|
|
157
|
-
* The ID of the system the configuration belongs to
|
|
157
|
+
* The ID of the system the configuration belongs to.
|
|
158
158
|
*/
|
|
159
159
|
systemId: string;
|
|
160
160
|
}
|
package/src/resources/systems.ts
CHANGED
|
@@ -88,9 +88,9 @@ export type SystemsPaginatedResponse = PaginatedResponse<System>;
|
|
|
88
88
|
*
|
|
89
89
|
* It specifies three contracts through schemas:
|
|
90
90
|
*
|
|
91
|
-
* - inputSchema: The structure of data the system accepts
|
|
92
|
-
* - outputSchema: The structure of data the system produces
|
|
93
|
-
* - configSchema: The parameters that modify system behavior
|
|
91
|
+
* - inputSchema: The structure of data the system accepts.
|
|
92
|
+
* - outputSchema: The structure of data the system produces.
|
|
93
|
+
* - configSchema: The parameters that modify system behavior.
|
|
94
94
|
*
|
|
95
95
|
* This abstraction lets you evaluate any system as a black box, focusing on its
|
|
96
96
|
* interface rather than implementation details. It's particularly useful for
|
|
@@ -101,93 +101,93 @@ export type SystemsPaginatedResponse = PaginatedResponse<System>;
|
|
|
101
101
|
*/
|
|
102
102
|
export interface System {
|
|
103
103
|
/**
|
|
104
|
-
* The ID of the system
|
|
104
|
+
* The ID of the system.
|
|
105
105
|
*/
|
|
106
106
|
id: string;
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
|
-
* The schema of the system's configuration
|
|
109
|
+
* The schema of the system's configuration.
|
|
110
110
|
*/
|
|
111
111
|
configSchema: Record<string, unknown>;
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
|
-
* The description of the system
|
|
114
|
+
* The description of the system.
|
|
115
115
|
*/
|
|
116
116
|
description: string;
|
|
117
117
|
|
|
118
118
|
/**
|
|
119
|
-
* The schema of the system's inputs
|
|
119
|
+
* The schema of the system's inputs.
|
|
120
120
|
*/
|
|
121
121
|
inputSchema: Record<string, unknown>;
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
|
-
* The name of the system
|
|
124
|
+
* The name of the system.
|
|
125
125
|
*/
|
|
126
126
|
name: string;
|
|
127
127
|
|
|
128
128
|
/**
|
|
129
|
-
* The schema of the system's outputs
|
|
129
|
+
* The schema of the system's outputs.
|
|
130
130
|
*/
|
|
131
131
|
outputSchema: Record<string, unknown>;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
export interface SystemDeleteResponse {
|
|
135
135
|
/**
|
|
136
|
-
* Whether the deletion was successful
|
|
136
|
+
* Whether the deletion was successful.
|
|
137
137
|
*/
|
|
138
138
|
success: boolean;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
export interface SystemCreateParams {
|
|
142
142
|
/**
|
|
143
|
-
* The schema of the system's configuration
|
|
143
|
+
* The schema of the system's configuration.
|
|
144
144
|
*/
|
|
145
145
|
configSchema: Record<string, unknown>;
|
|
146
146
|
|
|
147
147
|
/**
|
|
148
|
-
* The description of the system
|
|
148
|
+
* The description of the system.
|
|
149
149
|
*/
|
|
150
150
|
description: string;
|
|
151
151
|
|
|
152
152
|
/**
|
|
153
|
-
* The schema of the system's inputs
|
|
153
|
+
* The schema of the system's inputs.
|
|
154
154
|
*/
|
|
155
155
|
inputSchema: Record<string, unknown>;
|
|
156
156
|
|
|
157
157
|
/**
|
|
158
|
-
* The name of the system
|
|
158
|
+
* The name of the system.
|
|
159
159
|
*/
|
|
160
160
|
name: string;
|
|
161
161
|
|
|
162
162
|
/**
|
|
163
|
-
* The schema of the system's outputs
|
|
163
|
+
* The schema of the system's outputs.
|
|
164
164
|
*/
|
|
165
165
|
outputSchema: Record<string, unknown>;
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
export interface SystemUpdateParams {
|
|
169
169
|
/**
|
|
170
|
-
* The schema of the system's configuration
|
|
170
|
+
* The schema of the system's configuration.
|
|
171
171
|
*/
|
|
172
172
|
configSchema?: Record<string, unknown>;
|
|
173
173
|
|
|
174
174
|
/**
|
|
175
|
-
* The description of the system
|
|
175
|
+
* The description of the system.
|
|
176
176
|
*/
|
|
177
177
|
description?: string;
|
|
178
178
|
|
|
179
179
|
/**
|
|
180
|
-
* The schema of the system's inputs
|
|
180
|
+
* The schema of the system's inputs.
|
|
181
181
|
*/
|
|
182
182
|
inputSchema?: Record<string, unknown>;
|
|
183
183
|
|
|
184
184
|
/**
|
|
185
|
-
* The name of the system
|
|
185
|
+
* The name of the system.
|
|
186
186
|
*/
|
|
187
187
|
name?: string;
|
|
188
188
|
|
|
189
189
|
/**
|
|
190
|
-
* The schema of the system's outputs
|
|
190
|
+
* The schema of the system's outputs.
|
|
191
191
|
*/
|
|
192
192
|
outputSchema?: Record<string, unknown>;
|
|
193
193
|
}
|
|
@@ -8,7 +8,7 @@ import { path } from '../internal/utils/path';
|
|
|
8
8
|
|
|
9
9
|
export class Testcases extends APIResource {
|
|
10
10
|
/**
|
|
11
|
-
* Create multiple
|
|
11
|
+
* Create multiple Testcases in the specified Testset.
|
|
12
12
|
*/
|
|
13
13
|
create(
|
|
14
14
|
testsetID: string,
|
|
@@ -19,14 +19,14 @@ export class Testcases extends APIResource {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* Replace the data of an existing
|
|
22
|
+
* Replace the data of an existing Testcase while keeping its ID.
|
|
23
23
|
*/
|
|
24
24
|
update(testcaseID: string, body: TestcaseUpdateParams, options?: RequestOptions): APIPromise<Testcase> {
|
|
25
25
|
return this._client.put(path`/testcases/${testcaseID}`, { body, ...options });
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* Retrieve a paginated list of
|
|
29
|
+
* Retrieve a paginated list of Testcases belonging to a Testset.
|
|
30
30
|
*/
|
|
31
31
|
list(
|
|
32
32
|
testsetID: string,
|
|
@@ -40,14 +40,14 @@ export class Testcases extends APIResource {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
|
-
* Delete multiple
|
|
43
|
+
* Delete multiple Testcases by their IDs.
|
|
44
44
|
*/
|
|
45
45
|
delete(body: TestcaseDeleteParams, options?: RequestOptions): APIPromise<TestcaseDeleteResponse> {
|
|
46
46
|
return this._client.post('/testcases/bulk-delete', { body, ...options });
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
|
-
* Retrieve a specific
|
|
50
|
+
* Retrieve a specific Testcase by ID.
|
|
51
51
|
*/
|
|
52
52
|
get(testcaseID: string, options?: RequestOptions): APIPromise<Testcase> {
|
|
53
53
|
return this._client.get(path`/testcases/${testcaseID}`, options);
|
|
@@ -58,43 +58,43 @@ export type TestcasesPaginatedResponse = PaginatedResponse<Testcase>;
|
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* A test case in the Scorecard system. Contains JSON data that is validated
|
|
61
|
-
* against the schema defined by its
|
|
62
|
-
* derived from the `data` field based on the
|
|
61
|
+
* against the schema defined by its Testset. The `inputs` and `labels` fields are
|
|
62
|
+
* derived from the `data` field based on the Testset's `fieldMapping`, and include
|
|
63
63
|
* all mapped fields, including those with validation errors. Testcases are stored
|
|
64
64
|
* regardless of validation results, with any validation errors included in the
|
|
65
65
|
* `validationErrors` field.
|
|
66
66
|
*/
|
|
67
67
|
export interface Testcase {
|
|
68
68
|
/**
|
|
69
|
-
* The ID of the
|
|
69
|
+
* The ID of the Testcase.
|
|
70
70
|
*/
|
|
71
71
|
id: string;
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
|
-
* Derived from data based on the
|
|
74
|
+
* Derived from data based on the Testset's fieldMapping. Contains all fields
|
|
75
75
|
* marked as inputs, including those with validation errors.
|
|
76
76
|
*/
|
|
77
77
|
inputs: Record<string, unknown>;
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
|
-
* The JSON data of the
|
|
80
|
+
* The JSON data of the Testcase, which is validated against the Testset's schema.
|
|
81
81
|
*/
|
|
82
82
|
jsonData: Record<string, unknown>;
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
|
-
* Derived from data based on the
|
|
85
|
+
* Derived from data based on the Testset's fieldMapping. Contains all fields
|
|
86
86
|
* marked as labels, including those with validation errors.
|
|
87
87
|
*/
|
|
88
88
|
labels: Record<string, unknown>;
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
|
-
* The ID of the
|
|
91
|
+
* The ID of the Testset this Testcase belongs to.
|
|
92
92
|
*/
|
|
93
93
|
testsetId: string;
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
|
-
* Validation errors found in the
|
|
97
|
-
* fully conform to its
|
|
96
|
+
* Validation errors found in the Testcase data. If present, the Testcase doesn't
|
|
97
|
+
* fully conform to its Testset's schema.
|
|
98
98
|
*/
|
|
99
99
|
validationErrors?: Array<Testcase.ValidationError>;
|
|
100
100
|
}
|
|
@@ -102,12 +102,12 @@ export interface Testcase {
|
|
|
102
102
|
export namespace Testcase {
|
|
103
103
|
export interface ValidationError {
|
|
104
104
|
/**
|
|
105
|
-
* Human-readable error description
|
|
105
|
+
* Human-readable error description.
|
|
106
106
|
*/
|
|
107
107
|
message: string;
|
|
108
108
|
|
|
109
109
|
/**
|
|
110
|
-
* JSON Pointer to the field with the validation error
|
|
110
|
+
* JSON Pointer to the field with the validation error.
|
|
111
111
|
*/
|
|
112
112
|
path: string;
|
|
113
113
|
}
|
|
@@ -119,14 +119,14 @@ export interface TestcaseCreateResponse {
|
|
|
119
119
|
|
|
120
120
|
export interface TestcaseDeleteResponse {
|
|
121
121
|
/**
|
|
122
|
-
* Whether the deletion was successful
|
|
122
|
+
* Whether the deletion was successful.
|
|
123
123
|
*/
|
|
124
124
|
success: boolean;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
export interface TestcaseCreateParams {
|
|
128
128
|
/**
|
|
129
|
-
* Testcases to create (max 100)
|
|
129
|
+
* Testcases to create (max 100).
|
|
130
130
|
*/
|
|
131
131
|
items: Array<TestcaseCreateParams.Item>;
|
|
132
132
|
}
|
|
@@ -134,15 +134,15 @@ export interface TestcaseCreateParams {
|
|
|
134
134
|
export namespace TestcaseCreateParams {
|
|
135
135
|
/**
|
|
136
136
|
* A test case in the Scorecard system. Contains JSON data that is validated
|
|
137
|
-
* against the schema defined by its
|
|
138
|
-
* derived from the `data` field based on the
|
|
137
|
+
* against the schema defined by its Testset. The `inputs` and `labels` fields are
|
|
138
|
+
* derived from the `data` field based on the Testset's `fieldMapping`, and include
|
|
139
139
|
* all mapped fields, including those with validation errors. Testcases are stored
|
|
140
140
|
* regardless of validation results, with any validation errors included in the
|
|
141
141
|
* `validationErrors` field.
|
|
142
142
|
*/
|
|
143
143
|
export interface Item {
|
|
144
144
|
/**
|
|
145
|
-
* The JSON data of the
|
|
145
|
+
* The JSON data of the Testcase, which is validated against the Testset's schema.
|
|
146
146
|
*/
|
|
147
147
|
jsonData: Record<string, unknown>;
|
|
148
148
|
}
|
|
@@ -150,7 +150,7 @@ export namespace TestcaseCreateParams {
|
|
|
150
150
|
|
|
151
151
|
export interface TestcaseUpdateParams {
|
|
152
152
|
/**
|
|
153
|
-
* The JSON data of the
|
|
153
|
+
* The JSON data of the Testcase, which is validated against the Testset's schema.
|
|
154
154
|
*/
|
|
155
155
|
jsonData: Record<string, unknown>;
|
|
156
156
|
}
|
|
@@ -159,7 +159,7 @@ export interface TestcaseListParams extends PaginatedResponseParams {}
|
|
|
159
159
|
|
|
160
160
|
export interface TestcaseDeleteParams {
|
|
161
161
|
/**
|
|
162
|
-
* IDs of
|
|
162
|
+
* IDs of Testcases to delete.
|
|
163
163
|
*/
|
|
164
164
|
ids: Array<string>;
|
|
165
165
|
}
|