scorecard-ai 1.0.0-alpha.8 → 1.0.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 +46 -0
- package/README.md +25 -37
- package/client.d.mts +5 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +5 -4
- package/client.d.ts.map +1 -1
- package/client.js +19 -4
- package/client.js.map +1 -1
- package/client.mjs +19 -4
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +1 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts +1 -1
- package/core/pagination.d.ts.map +1 -1
- package/index.d.mts +1 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/internal/detect-platform.js +3 -3
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs +3 -3
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/shim-types.d.mts +11 -22
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +11 -22
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +2 -2
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +2 -2
- package/internal/shims.d.ts.map +1 -1
- package/internal/tslib.js +6 -6
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/lib/runAndEvaluate.d.mts +62 -10
- package/lib/runAndEvaluate.d.mts.map +1 -1
- package/lib/runAndEvaluate.d.ts +62 -10
- package/lib/runAndEvaluate.d.ts.map +1 -1
- package/lib/runAndEvaluate.js +72 -19
- package/lib/runAndEvaluate.js.map +1 -1
- package/lib/runAndEvaluate.mjs +72 -19
- package/lib/runAndEvaluate.mjs.map +1 -1
- package/package.json +1 -4
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -4
- 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 +421 -0
- package/resources/metrics.d.mts.map +1 -0
- package/resources/metrics.d.ts +421 -0
- package/resources/metrics.d.ts.map +1 -0
- package/resources/metrics.js +33 -0
- package/resources/metrics.js.map +1 -0
- package/resources/metrics.mjs +29 -0
- package/resources/metrics.mjs.map +1 -0
- package/resources/runs.d.mts +8 -8
- package/resources/runs.d.mts.map +1 -1
- package/resources/runs.d.ts +8 -8
- package/resources/runs.d.ts.map +1 -1
- package/resources/runs.js +1 -1
- package/resources/runs.mjs +1 -1
- package/resources/systems/index.d.mts +3 -0
- package/resources/systems/index.d.mts.map +1 -0
- package/resources/systems/index.d.ts +3 -0
- package/resources/systems/index.d.ts.map +1 -0
- package/resources/systems/index.js +9 -0
- package/resources/systems/index.js.map +1 -0
- package/resources/systems/index.mjs +4 -0
- package/resources/systems/index.mjs.map +1 -0
- package/resources/systems/systems.d.mts +229 -0
- package/resources/systems/systems.d.mts.map +1 -0
- package/resources/systems/systems.d.ts +229 -0
- package/resources/systems/systems.d.ts.map +1 -0
- package/resources/systems/systems.js +151 -0
- package/resources/systems/systems.js.map +1 -0
- package/resources/systems/systems.mjs +146 -0
- package/resources/systems/systems.mjs.map +1 -0
- package/resources/systems/versions.d.mts +132 -0
- package/resources/systems/versions.d.mts.map +1 -0
- package/resources/systems/versions.d.ts +132 -0
- package/resources/systems/versions.d.ts.map +1 -0
- package/resources/systems/versions.js +82 -0
- package/resources/systems/versions.js.map +1 -0
- package/resources/systems/versions.mjs +78 -0
- package/resources/systems/versions.mjs.map +1 -0
- package/resources/systems.d.mts +1 -224
- package/resources/systems.d.mts.map +1 -1
- package/resources/systems.d.ts +1 -224
- package/resources/systems.d.ts.map +1 -1
- package/resources/systems.js +2 -139
- package/resources/systems.js.map +1 -1
- package/resources/systems.mjs +1 -137
- package/resources/systems.mjs.map +1 -1
- package/resources/testsets.d.mts +1 -1
- package/resources/testsets.d.ts +1 -1
- package/resources/testsets.js +1 -1
- package/resources/testsets.mjs +1 -1
- package/src/client.ts +28 -28
- package/src/core/pagination.ts +1 -1
- package/src/index.ts +2 -0
- package/src/internal/detect-platform.ts +3 -3
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +2 -2
- package/src/internal/uploads.ts +1 -1
- package/src/lib/runAndEvaluate.ts +159 -31
- package/src/resources/index.ts +2 -9
- package/src/resources/metrics.ts +525 -0
- package/src/resources/runs.ts +8 -8
- package/src/resources/systems/index.ts +18 -0
- package/src/resources/systems/systems.ts +299 -0
- package/src/resources/systems/versions.ts +166 -0
- package/src/resources/systems.ts +1 -277
- package/src/resources/testsets.ts +1 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/resources/system-configs.d.mts +0 -155
- package/resources/system-configs.d.mts.map +0 -1
- package/resources/system-configs.d.ts +0 -155
- package/resources/system-configs.d.ts.map +0 -1
- package/resources/system-configs.js +0 -83
- package/resources/system-configs.js.map +0 -1
- package/resources/system-configs.mjs +0 -79
- package/resources/system-configs.mjs.map +0 -1
- package/src/internal/shim-types.d.ts +0 -28
- package/src/resources/system-configs.ts +0 -203
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.SystemConfigs = void 0;
|
|
5
|
-
const resource_1 = require("../core/resource.js");
|
|
6
|
-
const pagination_1 = require("../core/pagination.js");
|
|
7
|
-
const path_1 = require("../internal/utils/path.js");
|
|
8
|
-
class SystemConfigs extends resource_1.APIResource {
|
|
9
|
-
/**
|
|
10
|
-
* Create a new configuration for a system.
|
|
11
|
-
*
|
|
12
|
-
* Each configuration contains specific parameter values that match the system's
|
|
13
|
-
* configSchema - things like model parameters, thresholds, or processing options.
|
|
14
|
-
* Once created, configurations cannot be modified, ensuring stable reference
|
|
15
|
-
* points for evaluations.
|
|
16
|
-
*
|
|
17
|
-
* When creating a configuration:
|
|
18
|
-
*
|
|
19
|
-
* - The 'config' object is validated against the parent system's configSchema
|
|
20
|
-
* - Configurations with validation errors are still stored, with errors included
|
|
21
|
-
* in the response
|
|
22
|
-
* - Validation errors indicate fields that don't match the schema but don't
|
|
23
|
-
* prevent creation
|
|
24
|
-
* - Having validation errors may affect how some evaluation metrics are calculated
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```ts
|
|
28
|
-
* const systemConfig = await client.systemConfigs.create(
|
|
29
|
-
* '12345678-0a8b-4f66-b6f3-2ddcfa097257',
|
|
30
|
-
* {
|
|
31
|
-
* config: {
|
|
32
|
-
* temperature: 0.1,
|
|
33
|
-
* maxTokens: 1024,
|
|
34
|
-
* model: 'gpt-4-turbo',
|
|
35
|
-
* },
|
|
36
|
-
* name: 'Production (Low Temperature)',
|
|
37
|
-
* },
|
|
38
|
-
* );
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
create(systemID, body, options) {
|
|
42
|
-
return this._client.post((0, path_1.path) `/systems/${systemID}/configs`, { body, ...options });
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Retrieve a paginated list of configurations for a specific system.
|
|
46
|
-
*
|
|
47
|
-
* System configurations provide concrete parameter values for a System Under Test,
|
|
48
|
-
* defining exactly how the system should be configured during an evaluation run.
|
|
49
|
-
*
|
|
50
|
-
* @example
|
|
51
|
-
* ```ts
|
|
52
|
-
* // Automatically fetches more pages as needed.
|
|
53
|
-
* for await (const systemConfig of client.systemConfigs.list(
|
|
54
|
-
* '12345678-0a8b-4f66-b6f3-2ddcfa097257',
|
|
55
|
-
* )) {
|
|
56
|
-
* // ...
|
|
57
|
-
* }
|
|
58
|
-
* ```
|
|
59
|
-
*/
|
|
60
|
-
list(systemID, query = {}, options) {
|
|
61
|
-
return this._client.getAPIList((0, path_1.path) `/systems/${systemID}/configs`, (pagination_1.PaginatedResponse), {
|
|
62
|
-
query,
|
|
63
|
-
...options,
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Retrieve a specific system configuration by ID.
|
|
68
|
-
*
|
|
69
|
-
* @example
|
|
70
|
-
* ```ts
|
|
71
|
-
* const systemConfig = await client.systemConfigs.get(
|
|
72
|
-
* '87654321-4d3b-4ae4-8c7a-4b6e2a19ccf0',
|
|
73
|
-
* { systemId: '12345678-0a8b-4f66-b6f3-2ddcfa097257' },
|
|
74
|
-
* );
|
|
75
|
-
* ```
|
|
76
|
-
*/
|
|
77
|
-
get(systemConfigID, params, options) {
|
|
78
|
-
const { systemId } = params;
|
|
79
|
-
return this._client.get((0, path_1.path) `/systems/${systemId}/configs/${systemConfigID}`, options);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
exports.SystemConfigs = SystemConfigs;
|
|
83
|
-
//# sourceMappingURL=system-configs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"system-configs.js","sourceRoot":"","sources":["../src/resources/system-configs.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAAkG;AAElG,oDAA8C;AAE9C,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,MAAM,CACJ,QAAgB,EAChB,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,YAAY,QAAQ,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CACF,QAAgB,EAChB,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAA,WAAI,EAAA,YAAY,QAAQ,UAAU,EAAE,CAAA,8BAA+B,CAAA,EAAE;YAClG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,GAAG,CACD,cAAsB,EACtB,MAA6B,EAC7B,OAAwB;QAExB,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,YAAY,QAAQ,YAAY,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IACzF,CAAC;CACF;AAvFD,sCAuFC"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../core/resource.mjs";
|
|
3
|
-
import { PaginatedResponse } from "../core/pagination.mjs";
|
|
4
|
-
import { path } from "../internal/utils/path.mjs";
|
|
5
|
-
export class SystemConfigs extends APIResource {
|
|
6
|
-
/**
|
|
7
|
-
* Create a new configuration for a system.
|
|
8
|
-
*
|
|
9
|
-
* Each configuration contains specific parameter values that match the system's
|
|
10
|
-
* configSchema - things like model parameters, thresholds, or processing options.
|
|
11
|
-
* Once created, configurations cannot be modified, ensuring stable reference
|
|
12
|
-
* points for evaluations.
|
|
13
|
-
*
|
|
14
|
-
* When creating a configuration:
|
|
15
|
-
*
|
|
16
|
-
* - The 'config' object is validated against the parent system's configSchema
|
|
17
|
-
* - Configurations with validation errors are still stored, with errors included
|
|
18
|
-
* in the response
|
|
19
|
-
* - Validation errors indicate fields that don't match the schema but don't
|
|
20
|
-
* prevent creation
|
|
21
|
-
* - Having validation errors may affect how some evaluation metrics are calculated
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```ts
|
|
25
|
-
* const systemConfig = await client.systemConfigs.create(
|
|
26
|
-
* '12345678-0a8b-4f66-b6f3-2ddcfa097257',
|
|
27
|
-
* {
|
|
28
|
-
* config: {
|
|
29
|
-
* temperature: 0.1,
|
|
30
|
-
* maxTokens: 1024,
|
|
31
|
-
* model: 'gpt-4-turbo',
|
|
32
|
-
* },
|
|
33
|
-
* name: 'Production (Low Temperature)',
|
|
34
|
-
* },
|
|
35
|
-
* );
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
create(systemID, body, options) {
|
|
39
|
-
return this._client.post(path `/systems/${systemID}/configs`, { body, ...options });
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Retrieve a paginated list of configurations for a specific system.
|
|
43
|
-
*
|
|
44
|
-
* System configurations provide concrete parameter values for a System Under Test,
|
|
45
|
-
* defining exactly how the system should be configured during an evaluation run.
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* ```ts
|
|
49
|
-
* // Automatically fetches more pages as needed.
|
|
50
|
-
* for await (const systemConfig of client.systemConfigs.list(
|
|
51
|
-
* '12345678-0a8b-4f66-b6f3-2ddcfa097257',
|
|
52
|
-
* )) {
|
|
53
|
-
* // ...
|
|
54
|
-
* }
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
|
-
list(systemID, query = {}, options) {
|
|
58
|
-
return this._client.getAPIList(path `/systems/${systemID}/configs`, (PaginatedResponse), {
|
|
59
|
-
query,
|
|
60
|
-
...options,
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Retrieve a specific system configuration by ID.
|
|
65
|
-
*
|
|
66
|
-
* @example
|
|
67
|
-
* ```ts
|
|
68
|
-
* const systemConfig = await client.systemConfigs.get(
|
|
69
|
-
* '87654321-4d3b-4ae4-8c7a-4b6e2a19ccf0',
|
|
70
|
-
* { systemId: '12345678-0a8b-4f66-b6f3-2ddcfa097257' },
|
|
71
|
-
* );
|
|
72
|
-
* ```
|
|
73
|
-
*/
|
|
74
|
-
get(systemConfigID, params, options) {
|
|
75
|
-
const { systemId } = params;
|
|
76
|
-
return this._client.get(path `/systems/${systemId}/configs/${systemConfigID}`, options);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
//# sourceMappingURL=system-configs.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"system-configs.mjs","sourceRoot":"","sources":["../src/resources/system-configs.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAe,iBAAiB,EAAgC;OAEhE,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,MAAM,CACJ,QAAgB,EAChB,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,YAAY,QAAQ,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CACF,QAAgB,EAChB,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAA,YAAY,QAAQ,UAAU,EAAE,CAAA,iBAA+B,CAAA,EAAE;YAClG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,GAAG,CACD,cAAsB,EACtB,MAA6B,EAC7B,OAAwB;QAExB,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,YAAY,QAAQ,YAAY,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IACzF,CAAC;CACF"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Shims for types that we can't always rely on being available globally.
|
|
5
|
-
*
|
|
6
|
-
* Note: these only exist at the type-level, there is no corresponding runtime
|
|
7
|
-
* version for any of these symbols.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* In order to properly access the global `NodeJS` type, if it's available, we
|
|
12
|
-
* need to make use of declaration shadowing. Without this, any checks for the
|
|
13
|
-
* presence of `NodeJS.ReadableStream` will fail.
|
|
14
|
-
*/
|
|
15
|
-
declare namespace NodeJS {
|
|
16
|
-
interface ReadableStream {}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
type HasProperties<T> = keyof T extends never ? false : true;
|
|
20
|
-
|
|
21
|
-
// @ts-ignore
|
|
22
|
-
type _ReadableStream<R = any> =
|
|
23
|
-
// @ts-ignore
|
|
24
|
-
HasProperties<NodeJS.ReadableStream> extends true ? NodeJS.ReadableStream<R> : ReadableStream<R>;
|
|
25
|
-
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
declare const _ReadableStream: unknown extends typeof ReadableStream ? never : typeof ReadableStream;
|
|
28
|
-
export { _ReadableStream as ReadableStream };
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../core/resource';
|
|
4
|
-
import { APIPromise } from '../core/api-promise';
|
|
5
|
-
import { PagePromise, PaginatedResponse, type PaginatedResponseParams } from '../core/pagination';
|
|
6
|
-
import { RequestOptions } from '../internal/request-options';
|
|
7
|
-
import { path } from '../internal/utils/path';
|
|
8
|
-
|
|
9
|
-
export class SystemConfigs extends APIResource {
|
|
10
|
-
/**
|
|
11
|
-
* Create a new configuration for a system.
|
|
12
|
-
*
|
|
13
|
-
* Each configuration contains specific parameter values that match the system's
|
|
14
|
-
* configSchema - things like model parameters, thresholds, or processing options.
|
|
15
|
-
* Once created, configurations cannot be modified, ensuring stable reference
|
|
16
|
-
* points for evaluations.
|
|
17
|
-
*
|
|
18
|
-
* When creating a configuration:
|
|
19
|
-
*
|
|
20
|
-
* - The 'config' object is validated against the parent system's configSchema
|
|
21
|
-
* - Configurations with validation errors are still stored, with errors included
|
|
22
|
-
* in the response
|
|
23
|
-
* - Validation errors indicate fields that don't match the schema but don't
|
|
24
|
-
* prevent creation
|
|
25
|
-
* - Having validation errors may affect how some evaluation metrics are calculated
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```ts
|
|
29
|
-
* const systemConfig = await client.systemConfigs.create(
|
|
30
|
-
* '12345678-0a8b-4f66-b6f3-2ddcfa097257',
|
|
31
|
-
* {
|
|
32
|
-
* config: {
|
|
33
|
-
* temperature: 0.1,
|
|
34
|
-
* maxTokens: 1024,
|
|
35
|
-
* model: 'gpt-4-turbo',
|
|
36
|
-
* },
|
|
37
|
-
* name: 'Production (Low Temperature)',
|
|
38
|
-
* },
|
|
39
|
-
* );
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
create(
|
|
43
|
-
systemID: string,
|
|
44
|
-
body: SystemConfigCreateParams,
|
|
45
|
-
options?: RequestOptions,
|
|
46
|
-
): APIPromise<SystemConfig> {
|
|
47
|
-
return this._client.post(path`/systems/${systemID}/configs`, { body, ...options });
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Retrieve a paginated list of configurations for a specific system.
|
|
52
|
-
*
|
|
53
|
-
* System configurations provide concrete parameter values for a System Under Test,
|
|
54
|
-
* defining exactly how the system should be configured during an evaluation run.
|
|
55
|
-
*
|
|
56
|
-
* @example
|
|
57
|
-
* ```ts
|
|
58
|
-
* // Automatically fetches more pages as needed.
|
|
59
|
-
* for await (const systemConfig of client.systemConfigs.list(
|
|
60
|
-
* '12345678-0a8b-4f66-b6f3-2ddcfa097257',
|
|
61
|
-
* )) {
|
|
62
|
-
* // ...
|
|
63
|
-
* }
|
|
64
|
-
* ```
|
|
65
|
-
*/
|
|
66
|
-
list(
|
|
67
|
-
systemID: string,
|
|
68
|
-
query: SystemConfigListParams | null | undefined = {},
|
|
69
|
-
options?: RequestOptions,
|
|
70
|
-
): PagePromise<SystemConfigsPaginatedResponse, SystemConfig> {
|
|
71
|
-
return this._client.getAPIList(path`/systems/${systemID}/configs`, PaginatedResponse<SystemConfig>, {
|
|
72
|
-
query,
|
|
73
|
-
...options,
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Retrieve a specific system configuration by ID.
|
|
79
|
-
*
|
|
80
|
-
* @example
|
|
81
|
-
* ```ts
|
|
82
|
-
* const systemConfig = await client.systemConfigs.get(
|
|
83
|
-
* '87654321-4d3b-4ae4-8c7a-4b6e2a19ccf0',
|
|
84
|
-
* { systemId: '12345678-0a8b-4f66-b6f3-2ddcfa097257' },
|
|
85
|
-
* );
|
|
86
|
-
* ```
|
|
87
|
-
*/
|
|
88
|
-
get(
|
|
89
|
-
systemConfigID: string,
|
|
90
|
-
params: SystemConfigGetParams,
|
|
91
|
-
options?: RequestOptions,
|
|
92
|
-
): APIPromise<SystemConfig> {
|
|
93
|
-
const { systemId } = params;
|
|
94
|
-
return this._client.get(path`/systems/${systemId}/configs/${systemConfigID}`, options);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export type SystemConfigsPaginatedResponse = PaginatedResponse<SystemConfig>;
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* A SystemConfig defines the specific settings for a System Under Test.
|
|
102
|
-
*
|
|
103
|
-
* Configurations contain parameter values that determine system behavior during
|
|
104
|
-
* evaluation. They are immutable snapshots - once created, they never change.
|
|
105
|
-
*
|
|
106
|
-
* When running evaluations, you reference a specific configId to establish which
|
|
107
|
-
* configuration to test.
|
|
108
|
-
*
|
|
109
|
-
* Configurations will be validated against the system's configSchema, with
|
|
110
|
-
* non-conforming values generating warnings.
|
|
111
|
-
*/
|
|
112
|
-
export interface SystemConfig {
|
|
113
|
-
/**
|
|
114
|
-
* The ID of the system configuration.
|
|
115
|
-
*/
|
|
116
|
-
id: string;
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* The configuration of the system.
|
|
120
|
-
*/
|
|
121
|
-
config: Record<string, unknown>;
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* The name of the system configuration.
|
|
125
|
-
*/
|
|
126
|
-
name: string;
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* The ID of the system the configuration belongs to.
|
|
130
|
-
*/
|
|
131
|
-
systemId: string;
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Validation errors found in the configuration. If present, the configuration
|
|
135
|
-
* doesn't fully conform to its system's configSchema.
|
|
136
|
-
*/
|
|
137
|
-
validationErrors?: Array<SystemConfig.ValidationError>;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
export namespace SystemConfig {
|
|
141
|
-
export interface ValidationError {
|
|
142
|
-
/**
|
|
143
|
-
* Human-readable error description.
|
|
144
|
-
*/
|
|
145
|
-
message: string;
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* JSON Pointer to the field with the validation error.
|
|
149
|
-
*/
|
|
150
|
-
path: string;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export interface SystemConfigCreateParams {
|
|
155
|
-
/**
|
|
156
|
-
* The configuration of the system.
|
|
157
|
-
*/
|
|
158
|
-
config: Record<string, unknown>;
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* The name of the system configuration.
|
|
162
|
-
*/
|
|
163
|
-
name: string;
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Validation errors found in the configuration. If present, the configuration
|
|
167
|
-
* doesn't fully conform to its system's configSchema.
|
|
168
|
-
*/
|
|
169
|
-
validationErrors?: Array<SystemConfigCreateParams.ValidationError>;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export namespace SystemConfigCreateParams {
|
|
173
|
-
export interface ValidationError {
|
|
174
|
-
/**
|
|
175
|
-
* Human-readable error description.
|
|
176
|
-
*/
|
|
177
|
-
message: string;
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* JSON Pointer to the field with the validation error.
|
|
181
|
-
*/
|
|
182
|
-
path: string;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
export interface SystemConfigListParams extends PaginatedResponseParams {}
|
|
187
|
-
|
|
188
|
-
export interface SystemConfigGetParams {
|
|
189
|
-
/**
|
|
190
|
-
* The ID of the system the configuration belongs to.
|
|
191
|
-
*/
|
|
192
|
-
systemId: string;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
export declare namespace SystemConfigs {
|
|
196
|
-
export {
|
|
197
|
-
type SystemConfig as SystemConfig,
|
|
198
|
-
type SystemConfigsPaginatedResponse as SystemConfigsPaginatedResponse,
|
|
199
|
-
type SystemConfigCreateParams as SystemConfigCreateParams,
|
|
200
|
-
type SystemConfigListParams as SystemConfigListParams,
|
|
201
|
-
type SystemConfigGetParams as SystemConfigGetParams,
|
|
202
|
-
};
|
|
203
|
-
}
|