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.
Files changed (107) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +10 -12
  3. package/client.d.mts +3 -3
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +3 -3
  6. package/client.d.ts.map +1 -1
  7. package/client.js +9 -7
  8. package/client.js.map +1 -1
  9. package/client.mjs +9 -7
  10. package/client.mjs.map +1 -1
  11. package/internal/headers.d.mts +1 -1
  12. package/internal/headers.d.mts.map +1 -1
  13. package/internal/headers.d.ts +1 -1
  14. package/internal/headers.d.ts.map +1 -1
  15. package/internal/headers.js +2 -0
  16. package/internal/headers.js.map +1 -1
  17. package/internal/headers.mjs +2 -0
  18. package/internal/headers.mjs.map +1 -1
  19. package/internal/utils/base64.d.mts.map +1 -1
  20. package/internal/utils/base64.d.ts.map +1 -1
  21. package/internal/utils/base64.js +4 -3
  22. package/internal/utils/base64.js.map +1 -1
  23. package/internal/utils/base64.mjs +4 -3
  24. package/internal/utils/base64.mjs.map +1 -1
  25. package/internal/utils/bytes.d.mts +4 -0
  26. package/internal/utils/bytes.d.mts.map +1 -0
  27. package/internal/utils/bytes.d.ts +4 -0
  28. package/internal/utils/bytes.d.ts.map +1 -0
  29. package/internal/utils/bytes.js +32 -0
  30. package/internal/utils/bytes.js.map +1 -0
  31. package/internal/utils/bytes.mjs +26 -0
  32. package/internal/utils/bytes.mjs.map +1 -0
  33. package/lib/runAndEvaluate.d.mts +19 -0
  34. package/lib/runAndEvaluate.d.mts.map +1 -0
  35. package/lib/runAndEvaluate.d.ts +19 -0
  36. package/lib/runAndEvaluate.d.ts.map +1 -0
  37. package/lib/runAndEvaluate.js +40 -0
  38. package/lib/runAndEvaluate.js.map +1 -0
  39. package/lib/runAndEvaluate.mjs +36 -0
  40. package/lib/runAndEvaluate.mjs.map +1 -0
  41. package/package.json +12 -2
  42. package/resources/index.d.mts +1 -1
  43. package/resources/index.d.mts.map +1 -1
  44. package/resources/index.d.ts +1 -1
  45. package/resources/index.d.ts.map +1 -1
  46. package/resources/index.js +3 -3
  47. package/resources/index.js.map +1 -1
  48. package/resources/index.mjs +1 -1
  49. package/resources/index.mjs.map +1 -1
  50. package/resources/projects.d.mts +5 -5
  51. package/resources/projects.d.ts +5 -5
  52. package/resources/projects.js +2 -2
  53. package/resources/projects.mjs +2 -2
  54. package/resources/records.d.mts +63 -0
  55. package/resources/records.d.mts.map +1 -0
  56. package/resources/records.d.ts +63 -0
  57. package/resources/records.d.ts.map +1 -0
  58. package/resources/{execution-records.js → records.js} +6 -6
  59. package/resources/records.js.map +1 -0
  60. package/resources/{execution-records.mjs → records.mjs} +4 -4
  61. package/resources/records.mjs.map +1 -0
  62. package/resources/runs.d.mts +13 -13
  63. package/resources/runs.d.ts +13 -13
  64. package/resources/runs.js +2 -2
  65. package/resources/runs.mjs +2 -2
  66. package/resources/shared.d.mts +1 -1
  67. package/resources/shared.d.ts +1 -1
  68. package/resources/system-configs.d.mts +11 -11
  69. package/resources/system-configs.d.ts +11 -11
  70. package/resources/systems.d.mts +20 -20
  71. package/resources/systems.d.ts +20 -20
  72. package/resources/testcases.d.mts +23 -23
  73. package/resources/testcases.d.ts +23 -23
  74. package/resources/testcases.js +5 -5
  75. package/resources/testcases.mjs +5 -5
  76. package/resources/testsets.d.mts +43 -42
  77. package/resources/testsets.d.mts.map +1 -1
  78. package/resources/testsets.d.ts +43 -42
  79. package/resources/testsets.d.ts.map +1 -1
  80. package/resources/testsets.js +5 -5
  81. package/resources/testsets.mjs +5 -5
  82. package/src/client.ts +11 -15
  83. package/src/internal/headers.ts +3 -2
  84. package/src/internal/utils/base64.ts +5 -4
  85. package/src/internal/utils/bytes.ts +32 -0
  86. package/src/lib/runAndEvaluate.ts +54 -0
  87. package/src/resources/index.ts +1 -5
  88. package/src/resources/projects.ts +5 -5
  89. package/src/resources/records.ts +79 -0
  90. package/src/resources/runs.ts +13 -13
  91. package/src/resources/shared.ts +1 -1
  92. package/src/resources/system-configs.ts +11 -11
  93. package/src/resources/systems.ts +20 -20
  94. package/src/resources/testcases.ts +23 -23
  95. package/src/resources/testsets.ts +43 -42
  96. package/src/version.ts +1 -1
  97. package/version.d.mts +1 -1
  98. package/version.d.ts +1 -1
  99. package/version.js +1 -1
  100. package/version.mjs +1 -1
  101. package/resources/execution-records.d.mts +0 -62
  102. package/resources/execution-records.d.mts.map +0 -1
  103. package/resources/execution-records.d.ts +0 -62
  104. package/resources/execution-records.d.ts.map +0 -1
  105. package/resources/execution-records.js.map +0 -1
  106. package/resources/execution-records.mjs.map +0 -1
  107. package/src/resources/execution-records.ts +0 -85
@@ -4,72 +4,72 @@ import { PagePromise, PaginatedResponse, type PaginatedResponseParams } from "..
4
4
  import { RequestOptions } from "../internal/request-options.mjs";
5
5
  export declare class Testcases extends APIResource {
6
6
  /**
7
- * Create multiple testcases in the specified testset.
7
+ * Create multiple Testcases in the specified Testset.
8
8
  */
9
9
  create(testsetID: string, body: TestcaseCreateParams, options?: RequestOptions): APIPromise<TestcaseCreateResponse>;
10
10
  /**
11
- * Replace the data of an existing testcase while keeping its ID.
11
+ * Replace the data of an existing Testcase while keeping its ID.
12
12
  */
13
13
  update(testcaseID: string, body: TestcaseUpdateParams, options?: RequestOptions): APIPromise<Testcase>;
14
14
  /**
15
- * Retrieve a paginated list of testcases belonging to a testset.
15
+ * Retrieve a paginated list of Testcases belonging to a Testset.
16
16
  */
17
17
  list(testsetID: string, query?: TestcaseListParams | null | undefined, options?: RequestOptions): PagePromise<TestcasesPaginatedResponse, Testcase>;
18
18
  /**
19
- * Delete multiple testcases by their IDs.
19
+ * Delete multiple Testcases by their IDs.
20
20
  */
21
21
  delete(body: TestcaseDeleteParams, options?: RequestOptions): APIPromise<TestcaseDeleteResponse>;
22
22
  /**
23
- * Retrieve a specific testcase by ID.
23
+ * Retrieve a specific Testcase by ID.
24
24
  */
25
25
  get(testcaseID: string, options?: RequestOptions): APIPromise<Testcase>;
26
26
  }
27
27
  export type TestcasesPaginatedResponse = PaginatedResponse<Testcase>;
28
28
  /**
29
29
  * A test case in the Scorecard system. Contains JSON data that is validated
30
- * against the schema defined by its testset. The `inputs` and `labels` fields are
31
- * derived from the `data` field based on the testset's `fieldMapping`, and include
30
+ * against the schema defined by its Testset. The `inputs` and `labels` fields are
31
+ * derived from the `data` field based on the Testset's `fieldMapping`, and include
32
32
  * all mapped fields, including those with validation errors. Testcases are stored
33
33
  * regardless of validation results, with any validation errors included in the
34
34
  * `validationErrors` field.
35
35
  */
36
36
  export interface Testcase {
37
37
  /**
38
- * The ID of the testcase
38
+ * The ID of the Testcase.
39
39
  */
40
40
  id: string;
41
41
  /**
42
- * Derived from data based on the testset's fieldMapping. Contains all fields
42
+ * Derived from data based on the Testset's fieldMapping. Contains all fields
43
43
  * marked as inputs, including those with validation errors.
44
44
  */
45
45
  inputs: Record<string, unknown>;
46
46
  /**
47
- * The JSON data of the testcase, which is validated against the testset's schema.
47
+ * The JSON data of the Testcase, which is validated against the Testset's schema.
48
48
  */
49
49
  jsonData: Record<string, unknown>;
50
50
  /**
51
- * Derived from data based on the testset's fieldMapping. Contains all fields
51
+ * Derived from data based on the Testset's fieldMapping. Contains all fields
52
52
  * marked as labels, including those with validation errors.
53
53
  */
54
54
  labels: Record<string, unknown>;
55
55
  /**
56
- * The ID of the testset this testcase belongs to
56
+ * The ID of the Testset this Testcase belongs to.
57
57
  */
58
58
  testsetId: string;
59
59
  /**
60
- * Validation errors found in the testcase data. If present, the testcase doesn't
61
- * fully conform to its testset's schema.
60
+ * Validation errors found in the Testcase data. If present, the Testcase doesn't
61
+ * fully conform to its Testset's schema.
62
62
  */
63
63
  validationErrors?: Array<Testcase.ValidationError>;
64
64
  }
65
65
  export declare namespace Testcase {
66
66
  interface ValidationError {
67
67
  /**
68
- * Human-readable error description
68
+ * Human-readable error description.
69
69
  */
70
70
  message: string;
71
71
  /**
72
- * JSON Pointer to the field with the validation error
72
+ * JSON Pointer to the field with the validation error.
73
73
  */
74
74
  path: string;
75
75
  }
@@ -79,35 +79,35 @@ export interface TestcaseCreateResponse {
79
79
  }
80
80
  export interface TestcaseDeleteResponse {
81
81
  /**
82
- * Whether the deletion was successful
82
+ * Whether the deletion was successful.
83
83
  */
84
84
  success: boolean;
85
85
  }
86
86
  export interface TestcaseCreateParams {
87
87
  /**
88
- * Testcases to create (max 100)
88
+ * Testcases to create (max 100).
89
89
  */
90
90
  items: Array<TestcaseCreateParams.Item>;
91
91
  }
92
92
  export declare namespace TestcaseCreateParams {
93
93
  /**
94
94
  * A test case in the Scorecard system. Contains JSON data that is validated
95
- * against the schema defined by its testset. The `inputs` and `labels` fields are
96
- * derived from the `data` field based on the testset's `fieldMapping`, and include
95
+ * against the schema defined by its Testset. The `inputs` and `labels` fields are
96
+ * derived from the `data` field based on the Testset's `fieldMapping`, and include
97
97
  * all mapped fields, including those with validation errors. Testcases are stored
98
98
  * regardless of validation results, with any validation errors included in the
99
99
  * `validationErrors` field.
100
100
  */
101
101
  interface Item {
102
102
  /**
103
- * The JSON data of the testcase, which is validated against the testset's schema.
103
+ * The JSON data of the Testcase, which is validated against the Testset's schema.
104
104
  */
105
105
  jsonData: Record<string, unknown>;
106
106
  }
107
107
  }
108
108
  export interface TestcaseUpdateParams {
109
109
  /**
110
- * The JSON data of the testcase, which is validated against the testset's schema.
110
+ * The JSON data of the Testcase, which is validated against the Testset's schema.
111
111
  */
112
112
  jsonData: Record<string, unknown>;
113
113
  }
@@ -115,7 +115,7 @@ export interface TestcaseListParams extends PaginatedResponseParams {
115
115
  }
116
116
  export interface TestcaseDeleteParams {
117
117
  /**
118
- * IDs of testcases to delete
118
+ * IDs of Testcases to delete.
119
119
  */
120
120
  ids: Array<string>;
121
121
  }
@@ -4,72 +4,72 @@ import { PagePromise, PaginatedResponse, type PaginatedResponseParams } from "..
4
4
  import { RequestOptions } from "../internal/request-options.js";
5
5
  export declare class Testcases extends APIResource {
6
6
  /**
7
- * Create multiple testcases in the specified testset.
7
+ * Create multiple Testcases in the specified Testset.
8
8
  */
9
9
  create(testsetID: string, body: TestcaseCreateParams, options?: RequestOptions): APIPromise<TestcaseCreateResponse>;
10
10
  /**
11
- * Replace the data of an existing testcase while keeping its ID.
11
+ * Replace the data of an existing Testcase while keeping its ID.
12
12
  */
13
13
  update(testcaseID: string, body: TestcaseUpdateParams, options?: RequestOptions): APIPromise<Testcase>;
14
14
  /**
15
- * Retrieve a paginated list of testcases belonging to a testset.
15
+ * Retrieve a paginated list of Testcases belonging to a Testset.
16
16
  */
17
17
  list(testsetID: string, query?: TestcaseListParams | null | undefined, options?: RequestOptions): PagePromise<TestcasesPaginatedResponse, Testcase>;
18
18
  /**
19
- * Delete multiple testcases by their IDs.
19
+ * Delete multiple Testcases by their IDs.
20
20
  */
21
21
  delete(body: TestcaseDeleteParams, options?: RequestOptions): APIPromise<TestcaseDeleteResponse>;
22
22
  /**
23
- * Retrieve a specific testcase by ID.
23
+ * Retrieve a specific Testcase by ID.
24
24
  */
25
25
  get(testcaseID: string, options?: RequestOptions): APIPromise<Testcase>;
26
26
  }
27
27
  export type TestcasesPaginatedResponse = PaginatedResponse<Testcase>;
28
28
  /**
29
29
  * A test case in the Scorecard system. Contains JSON data that is validated
30
- * against the schema defined by its testset. The `inputs` and `labels` fields are
31
- * derived from the `data` field based on the testset's `fieldMapping`, and include
30
+ * against the schema defined by its Testset. The `inputs` and `labels` fields are
31
+ * derived from the `data` field based on the Testset's `fieldMapping`, and include
32
32
  * all mapped fields, including those with validation errors. Testcases are stored
33
33
  * regardless of validation results, with any validation errors included in the
34
34
  * `validationErrors` field.
35
35
  */
36
36
  export interface Testcase {
37
37
  /**
38
- * The ID of the testcase
38
+ * The ID of the Testcase.
39
39
  */
40
40
  id: string;
41
41
  /**
42
- * Derived from data based on the testset's fieldMapping. Contains all fields
42
+ * Derived from data based on the Testset's fieldMapping. Contains all fields
43
43
  * marked as inputs, including those with validation errors.
44
44
  */
45
45
  inputs: Record<string, unknown>;
46
46
  /**
47
- * The JSON data of the testcase, which is validated against the testset's schema.
47
+ * The JSON data of the Testcase, which is validated against the Testset's schema.
48
48
  */
49
49
  jsonData: Record<string, unknown>;
50
50
  /**
51
- * Derived from data based on the testset's fieldMapping. Contains all fields
51
+ * Derived from data based on the Testset's fieldMapping. Contains all fields
52
52
  * marked as labels, including those with validation errors.
53
53
  */
54
54
  labels: Record<string, unknown>;
55
55
  /**
56
- * The ID of the testset this testcase belongs to
56
+ * The ID of the Testset this Testcase belongs to.
57
57
  */
58
58
  testsetId: string;
59
59
  /**
60
- * Validation errors found in the testcase data. If present, the testcase doesn't
61
- * fully conform to its testset's schema.
60
+ * Validation errors found in the Testcase data. If present, the Testcase doesn't
61
+ * fully conform to its Testset's schema.
62
62
  */
63
63
  validationErrors?: Array<Testcase.ValidationError>;
64
64
  }
65
65
  export declare namespace Testcase {
66
66
  interface ValidationError {
67
67
  /**
68
- * Human-readable error description
68
+ * Human-readable error description.
69
69
  */
70
70
  message: string;
71
71
  /**
72
- * JSON Pointer to the field with the validation error
72
+ * JSON Pointer to the field with the validation error.
73
73
  */
74
74
  path: string;
75
75
  }
@@ -79,35 +79,35 @@ export interface TestcaseCreateResponse {
79
79
  }
80
80
  export interface TestcaseDeleteResponse {
81
81
  /**
82
- * Whether the deletion was successful
82
+ * Whether the deletion was successful.
83
83
  */
84
84
  success: boolean;
85
85
  }
86
86
  export interface TestcaseCreateParams {
87
87
  /**
88
- * Testcases to create (max 100)
88
+ * Testcases to create (max 100).
89
89
  */
90
90
  items: Array<TestcaseCreateParams.Item>;
91
91
  }
92
92
  export declare namespace TestcaseCreateParams {
93
93
  /**
94
94
  * A test case in the Scorecard system. Contains JSON data that is validated
95
- * against the schema defined by its testset. The `inputs` and `labels` fields are
96
- * derived from the `data` field based on the testset's `fieldMapping`, and include
95
+ * against the schema defined by its Testset. The `inputs` and `labels` fields are
96
+ * derived from the `data` field based on the Testset's `fieldMapping`, and include
97
97
  * all mapped fields, including those with validation errors. Testcases are stored
98
98
  * regardless of validation results, with any validation errors included in the
99
99
  * `validationErrors` field.
100
100
  */
101
101
  interface Item {
102
102
  /**
103
- * The JSON data of the testcase, which is validated against the testset's schema.
103
+ * The JSON data of the Testcase, which is validated against the Testset's schema.
104
104
  */
105
105
  jsonData: Record<string, unknown>;
106
106
  }
107
107
  }
108
108
  export interface TestcaseUpdateParams {
109
109
  /**
110
- * The JSON data of the testcase, which is validated against the testset's schema.
110
+ * The JSON data of the Testcase, which is validated against the Testset's schema.
111
111
  */
112
112
  jsonData: Record<string, unknown>;
113
113
  }
@@ -115,7 +115,7 @@ export interface TestcaseListParams extends PaginatedResponseParams {
115
115
  }
116
116
  export interface TestcaseDeleteParams {
117
117
  /**
118
- * IDs of testcases to delete
118
+ * IDs of Testcases to delete.
119
119
  */
120
120
  ids: Array<string>;
121
121
  }
@@ -7,19 +7,19 @@ const pagination_1 = require("../core/pagination.js");
7
7
  const path_1 = require("../internal/utils/path.js");
8
8
  class Testcases extends resource_1.APIResource {
9
9
  /**
10
- * Create multiple testcases in the specified testset.
10
+ * Create multiple Testcases in the specified Testset.
11
11
  */
12
12
  create(testsetID, body, options) {
13
13
  return this._client.post((0, path_1.path) `/testsets/${testsetID}/testcases`, { body, ...options });
14
14
  }
15
15
  /**
16
- * Replace the data of an existing testcase while keeping its ID.
16
+ * Replace the data of an existing Testcase while keeping its ID.
17
17
  */
18
18
  update(testcaseID, body, options) {
19
19
  return this._client.put((0, path_1.path) `/testcases/${testcaseID}`, { body, ...options });
20
20
  }
21
21
  /**
22
- * Retrieve a paginated list of testcases belonging to a testset.
22
+ * Retrieve a paginated list of Testcases belonging to a Testset.
23
23
  */
24
24
  list(testsetID, query = {}, options) {
25
25
  return this._client.getAPIList((0, path_1.path) `/testsets/${testsetID}/testcases`, (pagination_1.PaginatedResponse), {
@@ -28,13 +28,13 @@ class Testcases extends resource_1.APIResource {
28
28
  });
29
29
  }
30
30
  /**
31
- * Delete multiple testcases by their IDs.
31
+ * Delete multiple Testcases by their IDs.
32
32
  */
33
33
  delete(body, options) {
34
34
  return this._client.post('/testcases/bulk-delete', { body, ...options });
35
35
  }
36
36
  /**
37
- * Retrieve a specific testcase by ID.
37
+ * Retrieve a specific Testcase by ID.
38
38
  */
39
39
  get(testcaseID, options) {
40
40
  return this._client.get((0, path_1.path) `/testcases/${testcaseID}`, options);
@@ -4,19 +4,19 @@ import { PaginatedResponse } from "../core/pagination.mjs";
4
4
  import { path } from "../internal/utils/path.mjs";
5
5
  export class Testcases extends APIResource {
6
6
  /**
7
- * Create multiple testcases in the specified testset.
7
+ * Create multiple Testcases in the specified Testset.
8
8
  */
9
9
  create(testsetID, body, options) {
10
10
  return this._client.post(path `/testsets/${testsetID}/testcases`, { body, ...options });
11
11
  }
12
12
  /**
13
- * Replace the data of an existing testcase while keeping its ID.
13
+ * Replace the data of an existing Testcase while keeping its ID.
14
14
  */
15
15
  update(testcaseID, body, options) {
16
16
  return this._client.put(path `/testcases/${testcaseID}`, { body, ...options });
17
17
  }
18
18
  /**
19
- * Retrieve a paginated list of testcases belonging to a testset.
19
+ * Retrieve a paginated list of Testcases belonging to a Testset.
20
20
  */
21
21
  list(testsetID, query = {}, options) {
22
22
  return this._client.getAPIList(path `/testsets/${testsetID}/testcases`, (PaginatedResponse), {
@@ -25,13 +25,13 @@ export class Testcases extends APIResource {
25
25
  });
26
26
  }
27
27
  /**
28
- * Delete multiple testcases by their IDs.
28
+ * Delete multiple Testcases by their IDs.
29
29
  */
30
30
  delete(body, options) {
31
31
  return this._client.post('/testcases/bulk-delete', { body, ...options });
32
32
  }
33
33
  /**
34
- * Retrieve a specific testcase by ID.
34
+ * Retrieve a specific Testcase by ID.
35
35
  */
36
36
  get(testcaseID, options) {
37
37
  return this._client.get(path `/testcases/${testcaseID}`, options);
@@ -4,12 +4,12 @@ import { PagePromise, PaginatedResponse, type PaginatedResponseParams } from "..
4
4
  import { RequestOptions } from "../internal/request-options.mjs";
5
5
  export declare class Testsets extends APIResource {
6
6
  /**
7
- * Create a new testset for a project. The testset will be created in the project
7
+ * Create a new Testset for a Project. The Testset will be created in the Project
8
8
  * specified in the path.
9
9
  */
10
10
  create(projectID: string, body: TestsetCreateParams, options?: RequestOptions): APIPromise<Testset>;
11
11
  /**
12
- * Update a testset. Only the fields provided in the request body will be updated.
12
+ * Update a Testset. Only the fields provided in the request body will be updated.
13
13
  * If a field is provided, the new content will replace the existing content. If a
14
14
  * field is not provided, the existing content will remain unchanged.
15
15
  *
@@ -24,167 +24,168 @@ export declare class Testsets extends APIResource {
24
24
  */
25
25
  update(testsetID: string, body?: TestsetUpdateParams | null | undefined, options?: RequestOptions): APIPromise<Testset>;
26
26
  /**
27
- * Retrieve a paginated list of testsets belonging to a project.
27
+ * Retrieve a paginated list of Testsets belonging to a Project.
28
28
  */
29
29
  list(projectID: string, query?: TestsetListParams | null | undefined, options?: RequestOptions): PagePromise<TestsetsPaginatedResponse, Testset>;
30
30
  /**
31
- * Delete testset
31
+ * Delete Testset
32
32
  */
33
33
  delete(testsetID: string, options?: RequestOptions): APIPromise<TestsetDeleteResponse>;
34
34
  /**
35
- * Get testset by ID
35
+ * Get Testset by ID
36
36
  */
37
37
  get(testsetID: string, options?: RequestOptions): APIPromise<Testset>;
38
38
  }
39
39
  export type TestsetsPaginatedResponse = PaginatedResponse<Testset>;
40
40
  /**
41
- * A collection of test cases that share the same schema. Each testset defines the
42
- * structure of its test cases through a JSON schema. The `fieldMapping` object
43
- * maps top-level keys of the testcase schema to their roles (input/label). Fields
44
- * not mentioned in the `fieldMapping` during creation or update are treated as
41
+ * A collection of Testcases that share the same schema. Each Testset defines the
42
+ * structure of its Testcases through a JSON schema. The `fieldMapping` object maps
43
+ * top-level keys of the Testcase schema to their roles (input/label). Fields not
44
+ * mentioned in the `fieldMapping` during creation or update are treated as
45
45
  * metadata.
46
46
  *
47
47
  * ## JSON Schema validation constraints supported:
48
48
  *
49
49
  * - **Required fields** - Fields listed in the schema's `required` array must be
50
- * present in testcases
50
+ * present in Testcases.
51
51
  * - **Type validation** - Values must match the specified type (string, number,
52
- * boolean, null, integer, object, array)
52
+ * boolean, null, integer, object, array).
53
53
  * - **Enum validation** - Values must be one of the options specified in the
54
- * `enum` array
54
+ * `enum` array.
55
55
  * - **Object property validation** - Properties of objects must conform to their
56
- * defined schemas
57
- * - **Array item validation** - Items in arrays must conform to the `items` schema
56
+ * defined schemas.
57
+ * - **Array item validation** - Items in arrays must conform to the `items`
58
+ * schema.
58
59
  * - **Logical composition** - Values must conform to at least one schema in the
59
- * `anyOf` array
60
+ * `anyOf` array.
60
61
  *
61
62
  * Testcases that fail validation will still be stored, but will include
62
- * `validationErrors` detailing the issues. Extra fields in the testcase data that
63
+ * `validationErrors` detailing the issues. Extra fields in the Testcase data that
63
64
  * are not in the schema will be stored but are ignored during validation.
64
65
  */
65
66
  export interface Testset {
66
67
  /**
67
- * The ID of the testset
68
+ * The ID of the Testset.
68
69
  */
69
70
  id: string;
70
71
  /**
71
- * The description of the testset
72
+ * The description of the Testset.
72
73
  */
73
74
  description: string;
74
75
  /**
75
- * Maps top-level keys of the testcase schema to their roles (input/label).
76
+ * Maps top-level keys of the Testcase schema to their roles (input/label).
76
77
  * Unmapped fields are treated as metadata.
77
78
  */
78
79
  fieldMapping: Testset.FieldMapping;
79
80
  /**
80
- * The JSON schema for each testcase in the testset
81
+ * The JSON schema for each Testcase in the Testset.
81
82
  */
82
83
  jsonSchema: Record<string, unknown>;
83
84
  /**
84
- * The name of the testset
85
+ * The name of the Testset.
85
86
  */
86
87
  name: string;
87
88
  }
88
89
  export declare namespace Testset {
89
90
  /**
90
- * Maps top-level keys of the testcase schema to their roles (input/label).
91
+ * Maps top-level keys of the Testcase schema to their roles (input/label).
91
92
  * Unmapped fields are treated as metadata.
92
93
  */
93
94
  interface FieldMapping {
94
95
  /**
95
- * Fields that represent inputs to the AI system
96
+ * Fields that represent inputs to the AI system.
96
97
  */
97
98
  inputs: Array<string>;
98
99
  /**
99
- * Fields that represent expected outputs/labels
100
+ * Fields that represent expected outputs/labels.
100
101
  */
101
102
  labels: Array<string>;
102
103
  /**
103
- * Fields that are not inputs or labels
104
+ * Fields that are not inputs or labels.
104
105
  */
105
106
  metadata: Array<string>;
106
107
  }
107
108
  }
108
109
  export interface TestsetDeleteResponse {
109
110
  /**
110
- * Whether the deletion was successful
111
+ * Whether the deletion was successful.
111
112
  */
112
113
  success: boolean;
113
114
  }
114
115
  export interface TestsetCreateParams {
115
116
  /**
116
- * The description of the testset
117
+ * The description of the Testset.
117
118
  */
118
119
  description: string;
119
120
  /**
120
- * Maps top-level keys of the testcase schema to their roles (input/label).
121
+ * Maps top-level keys of the Testcase schema to their roles (input/label).
121
122
  * Unmapped fields are treated as metadata.
122
123
  */
123
124
  fieldMapping: TestsetCreateParams.FieldMapping;
124
125
  /**
125
- * The JSON schema for each testcase in the testset
126
+ * The JSON schema for each Testcase in the Testset.
126
127
  */
127
128
  jsonSchema: Record<string, unknown>;
128
129
  /**
129
- * The name of the testset
130
+ * The name of the Testset.
130
131
  */
131
132
  name: string;
132
133
  }
133
134
  export declare namespace TestsetCreateParams {
134
135
  /**
135
- * Maps top-level keys of the testcase schema to their roles (input/label).
136
+ * Maps top-level keys of the Testcase schema to their roles (input/label).
136
137
  * Unmapped fields are treated as metadata.
137
138
  */
138
139
  interface FieldMapping {
139
140
  /**
140
- * Fields that represent inputs to the AI system
141
+ * Fields that represent inputs to the AI system.
141
142
  */
142
143
  inputs: Array<string>;
143
144
  /**
144
- * Fields that represent expected outputs/labels
145
+ * Fields that represent expected outputs/labels.
145
146
  */
146
147
  labels: Array<string>;
147
148
  /**
148
- * Fields that are not inputs or labels
149
+ * Fields that are not inputs or labels.
149
150
  */
150
151
  metadata: Array<string>;
151
152
  }
152
153
  }
153
154
  export interface TestsetUpdateParams {
154
155
  /**
155
- * The description of the testset
156
+ * The description of the Testset.
156
157
  */
157
158
  description?: string;
158
159
  /**
159
- * Maps top-level keys of the testcase schema to their roles (input/label).
160
+ * Maps top-level keys of the Testcase schema to their roles (input/label).
160
161
  * Unmapped fields are treated as metadata.
161
162
  */
162
163
  fieldMapping?: TestsetUpdateParams.FieldMapping;
163
164
  /**
164
- * The JSON schema for each testcase in the testset
165
+ * The JSON schema for each Testcase in the Testset.
165
166
  */
166
167
  jsonSchema?: Record<string, unknown>;
167
168
  /**
168
- * The name of the testset
169
+ * The name of the Testset.
169
170
  */
170
171
  name?: string;
171
172
  }
172
173
  export declare namespace TestsetUpdateParams {
173
174
  /**
174
- * Maps top-level keys of the testcase schema to their roles (input/label).
175
+ * Maps top-level keys of the Testcase schema to their roles (input/label).
175
176
  * Unmapped fields are treated as metadata.
176
177
  */
177
178
  interface FieldMapping {
178
179
  /**
179
- * Fields that represent inputs to the AI system
180
+ * Fields that represent inputs to the AI system.
180
181
  */
181
182
  inputs: Array<string>;
182
183
  /**
183
- * Fields that represent expected outputs/labels
184
+ * Fields that represent expected outputs/labels.
184
185
  */
185
186
  labels: Array<string>;
186
187
  /**
187
- * Fields that are not inputs or labels
188
+ * Fields that are not inputs or labels.
188
189
  */
189
190
  metadata: Array<string>;
190
191
  }
@@ -1 +1 @@
1
- {"version":3,"file":"testsets.d.mts","sourceRoot":"","sources":["../src/resources/testsets.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,WAAW,EAAE,iBAAiB,EAAE,KAAK,uBAAuB,EAAE;OAChE,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;OAGG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;IAInG;;;;;;;;;;;;;OAaG;IACH,MAAM,CACJ,SAAS,EAAE,MAAM,EACjB,IAAI,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc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