@coval/sdk 0.4.4 → 0.4.5

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 (71) hide show
  1. package/dist/generated/apis/MetricsApi.d.ts +4 -4
  2. package/dist/generated/apis/MetricsApi.js +2 -2
  3. package/dist/generated/apis/SimulationsApi.d.ts +4 -4
  4. package/dist/generated/apis/SimulationsApi.js +2 -2
  5. package/dist/generated/models/CovalAgentsAPICreateAgentRequest.d.ts +4 -10
  6. package/dist/generated/models/CovalAgentsAPICreateAgentRequest.d.ts.map +1 -1
  7. package/dist/generated/models/CovalAgentsAPICreateAgentRequest.js.map +1 -1
  8. package/dist/generated/models/CovalMetricsAPICreateMetricRequest.d.ts +62 -3
  9. package/dist/generated/models/CovalMetricsAPICreateMetricRequest.d.ts.map +1 -1
  10. package/dist/generated/models/CovalMetricsAPICreateMetricRequest.js +26 -0
  11. package/dist/generated/models/CovalMetricsAPICreateMetricRequest.js.map +1 -1
  12. package/dist/generated/models/CovalMetricsAPIMetricResource.d.ts +51 -3
  13. package/dist/generated/models/CovalMetricsAPIMetricResource.d.ts.map +1 -1
  14. package/dist/generated/models/CovalMetricsAPIMetricResource.js +26 -0
  15. package/dist/generated/models/CovalMetricsAPIMetricResource.js.map +1 -1
  16. package/dist/generated/models/CovalMetricsAPIMetricType.d.ts +3 -0
  17. package/dist/generated/models/CovalMetricsAPIMetricType.d.ts.map +1 -1
  18. package/dist/generated/models/CovalMetricsAPIMetricType.js +4 -1
  19. package/dist/generated/models/CovalMetricsAPIMetricType.js.map +1 -1
  20. package/dist/generated/models/CovalMetricsAPITestMetricBatchItemResult.d.ts +52 -0
  21. package/dist/generated/models/CovalMetricsAPITestMetricBatchItemResult.d.ts.map +1 -0
  22. package/dist/generated/models/CovalMetricsAPITestMetricBatchItemResult.js +53 -0
  23. package/dist/generated/models/CovalMetricsAPITestMetricBatchItemResult.js.map +1 -0
  24. package/dist/generated/models/CovalMetricsAPITestMetricItemStatus.d.ts +34 -0
  25. package/dist/generated/models/CovalMetricsAPITestMetricItemStatus.d.ts.map +1 -0
  26. package/dist/generated/models/CovalMetricsAPITestMetricItemStatus.js +52 -0
  27. package/dist/generated/models/CovalMetricsAPITestMetricItemStatus.js.map +1 -0
  28. package/dist/generated/models/CovalMetricsAPITestMetricRequest.d.ts +10 -3
  29. package/dist/generated/models/CovalMetricsAPITestMetricRequest.d.ts.map +1 -1
  30. package/dist/generated/models/CovalMetricsAPITestMetricRequest.js +3 -3
  31. package/dist/generated/models/CovalMetricsAPITestMetricRequest.js.map +1 -1
  32. package/dist/generated/models/CovalMetricsAPITestMetricResponse.d.ts +10 -2
  33. package/dist/generated/models/CovalMetricsAPITestMetricResponse.d.ts.map +1 -1
  34. package/dist/generated/models/CovalMetricsAPITestMetricResponse.js +5 -0
  35. package/dist/generated/models/CovalMetricsAPITestMetricResponse.js.map +1 -1
  36. package/dist/generated/models/CovalMetricsAPIUpdateMetricRequest.d.ts +51 -1
  37. package/dist/generated/models/CovalMetricsAPIUpdateMetricRequest.d.ts.map +1 -1
  38. package/dist/generated/models/CovalMetricsAPIUpdateMetricRequest.js +26 -0
  39. package/dist/generated/models/CovalMetricsAPIUpdateMetricRequest.js.map +1 -1
  40. package/dist/generated/models/CovalReviewsAPICreateReviewProjectRequest.d.ts +6 -0
  41. package/dist/generated/models/CovalReviewsAPICreateReviewProjectRequest.d.ts.map +1 -1
  42. package/dist/generated/models/CovalReviewsAPICreateReviewProjectRequest.js +2 -0
  43. package/dist/generated/models/CovalReviewsAPICreateReviewProjectRequest.js.map +1 -1
  44. package/dist/generated/models/CovalReviewsAPIReviewProjectResource.d.ts +6 -0
  45. package/dist/generated/models/CovalReviewsAPIReviewProjectResource.d.ts.map +1 -1
  46. package/dist/generated/models/CovalReviewsAPIReviewProjectResource.js +2 -0
  47. package/dist/generated/models/CovalReviewsAPIReviewProjectResource.js.map +1 -1
  48. package/dist/generated/models/CovalReviewsAPIUpdateReviewProjectRequest.d.ts +20 -0
  49. package/dist/generated/models/CovalReviewsAPIUpdateReviewProjectRequest.d.ts.map +1 -1
  50. package/dist/generated/models/CovalReviewsAPIUpdateReviewProjectRequest.js +11 -0
  51. package/dist/generated/models/CovalReviewsAPIUpdateReviewProjectRequest.js.map +1 -1
  52. package/dist/generated/models/index.d.ts +2 -0
  53. package/dist/generated/models/index.d.ts.map +1 -1
  54. package/dist/generated/models/index.js +2 -0
  55. package/dist/generated/models/index.js.map +1 -1
  56. package/package.json +1 -1
  57. package/src/generated/apis/MetricsApi.ts +4 -4
  58. package/src/generated/apis/SimulationsApi.ts +4 -4
  59. package/src/generated/models/CovalAgentsAPICreateAgentRequest.ts +4 -10
  60. package/src/generated/models/CovalMetricsAPICreateMetricRequest.ts +74 -3
  61. package/src/generated/models/CovalMetricsAPIMetricResource.ts +63 -3
  62. package/src/generated/models/CovalMetricsAPIMetricType.ts +4 -1
  63. package/src/generated/models/CovalMetricsAPITestMetricBatchItemResult.ts +101 -0
  64. package/src/generated/models/CovalMetricsAPITestMetricItemStatus.ts +61 -0
  65. package/src/generated/models/CovalMetricsAPITestMetricRequest.ts +13 -5
  66. package/src/generated/models/CovalMetricsAPITestMetricResponse.ts +20 -2
  67. package/src/generated/models/CovalMetricsAPIUpdateMetricRequest.ts +63 -1
  68. package/src/generated/models/CovalReviewsAPICreateReviewProjectRequest.ts +8 -0
  69. package/src/generated/models/CovalReviewsAPIReviewProjectResource.ts +8 -0
  70. package/src/generated/models/CovalReviewsAPIUpdateReviewProjectRequest.ts +27 -0
  71. package/src/generated/models/index.ts +2 -0
@@ -0,0 +1,101 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Coval Agents API
5
+ * Manage configurations for simulations and evaluations.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@coval.dev
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ import type { CovalMetricsAPITestMetricItemStatus } from './CovalMetricsAPITestMetricItemStatus.js';
17
+ import {
18
+ CovalMetricsAPITestMetricItemStatusFromJSON,
19
+ CovalMetricsAPITestMetricItemStatusFromJSONTyped,
20
+ CovalMetricsAPITestMetricItemStatusToJSON,
21
+ CovalMetricsAPITestMetricItemStatusToJSONTyped,
22
+ } from './CovalMetricsAPITestMetricItemStatus.js';
23
+
24
+ /**
25
+ * Result for one simulation output in a test-metric request.
26
+ * @export
27
+ * @interface CovalMetricsAPITestMetricBatchItemResult
28
+ */
29
+ export interface CovalMetricsAPITestMetricBatchItemResult {
30
+ /**
31
+ * The simulation output ID this result applies to.
32
+ * @type {string}
33
+ * @memberof CovalMetricsAPITestMetricBatchItemResult
34
+ */
35
+ simulation_output_id: string;
36
+ /**
37
+ *
38
+ * @type {CovalMetricsAPITestMetricItemStatus}
39
+ * @memberof CovalMetricsAPITestMetricBatchItemResult
40
+ */
41
+ status: CovalMetricsAPITestMetricItemStatus;
42
+ /**
43
+ * ULID of the created metric output, used to poll for the result. Null unless `status` is `QUEUED`.
44
+ * @type {string}
45
+ * @memberof CovalMetricsAPITestMetricBatchItemResult
46
+ */
47
+ metric_output_ulid?: string | null;
48
+ /**
49
+ * Human-readable error detail when the item was not queued.
50
+ * @type {string}
51
+ * @memberof CovalMetricsAPITestMetricBatchItemResult
52
+ */
53
+ error?: string | null;
54
+ }
55
+
56
+
57
+
58
+ /**
59
+ * Check if a given object implements the CovalMetricsAPITestMetricBatchItemResult interface.
60
+ */
61
+ export function instanceOfCovalMetricsAPITestMetricBatchItemResult(value: object): value is CovalMetricsAPITestMetricBatchItemResult {
62
+ if (!('simulation_output_id' in value) || value['simulation_output_id'] === undefined) return false;
63
+ if (!('status' in value) || value['status'] === undefined) return false;
64
+ return true;
65
+ }
66
+
67
+ export function CovalMetricsAPITestMetricBatchItemResultFromJSON(json: any): CovalMetricsAPITestMetricBatchItemResult {
68
+ return CovalMetricsAPITestMetricBatchItemResultFromJSONTyped(json, false);
69
+ }
70
+
71
+ export function CovalMetricsAPITestMetricBatchItemResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): CovalMetricsAPITestMetricBatchItemResult {
72
+ if (json == null) {
73
+ return json;
74
+ }
75
+ return {
76
+
77
+ 'simulation_output_id': json['simulation_output_id'],
78
+ 'status': CovalMetricsAPITestMetricItemStatusFromJSON(json['status']),
79
+ 'metric_output_ulid': json['metric_output_ulid'] == null ? undefined : json['metric_output_ulid'],
80
+ 'error': json['error'] == null ? undefined : json['error'],
81
+ };
82
+ }
83
+
84
+ export function CovalMetricsAPITestMetricBatchItemResultToJSON(json: any): CovalMetricsAPITestMetricBatchItemResult {
85
+ return CovalMetricsAPITestMetricBatchItemResultToJSONTyped(json, false);
86
+ }
87
+
88
+ export function CovalMetricsAPITestMetricBatchItemResultToJSONTyped(value?: CovalMetricsAPITestMetricBatchItemResult | null, ignoreDiscriminator: boolean = false): any {
89
+ if (value == null) {
90
+ return value;
91
+ }
92
+
93
+ return {
94
+
95
+ 'simulation_output_id': value['simulation_output_id'],
96
+ 'status': CovalMetricsAPITestMetricItemStatusToJSON(value['status']),
97
+ 'metric_output_ulid': value['metric_output_ulid'],
98
+ 'error': value['error'],
99
+ };
100
+ }
101
+
@@ -0,0 +1,61 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Coval Agents API
5
+ * Manage configurations for simulations and evaluations.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@coval.dev
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ /**
17
+ * Per-simulation-output outcome of a test-metric request.
18
+ *
19
+ * - `QUEUED` - Metric execution queued successfully
20
+ * - `NOT_FOUND` - Simulation output not found
21
+ * - `FORBIDDEN` - Access to the simulation output denied
22
+ * - `ENQUEUE_FAILED` - Failed to enqueue the metric execution
23
+ *
24
+ * @export
25
+ */
26
+ export const CovalMetricsAPITestMetricItemStatus = {
27
+ Queued: 'QUEUED',
28
+ NotFound: 'NOT_FOUND',
29
+ Forbidden: 'FORBIDDEN',
30
+ EnqueueFailed: 'ENQUEUE_FAILED'
31
+ } as const;
32
+ export type CovalMetricsAPITestMetricItemStatus = typeof CovalMetricsAPITestMetricItemStatus[keyof typeof CovalMetricsAPITestMetricItemStatus];
33
+
34
+
35
+ export function instanceOfCovalMetricsAPITestMetricItemStatus(value: any): boolean {
36
+ for (const key in CovalMetricsAPITestMetricItemStatus) {
37
+ if (Object.prototype.hasOwnProperty.call(CovalMetricsAPITestMetricItemStatus, key)) {
38
+ if (CovalMetricsAPITestMetricItemStatus[key as keyof typeof CovalMetricsAPITestMetricItemStatus] === value) {
39
+ return true;
40
+ }
41
+ }
42
+ }
43
+ return false;
44
+ }
45
+
46
+ export function CovalMetricsAPITestMetricItemStatusFromJSON(json: any): CovalMetricsAPITestMetricItemStatus {
47
+ return CovalMetricsAPITestMetricItemStatusFromJSONTyped(json, false);
48
+ }
49
+
50
+ export function CovalMetricsAPITestMetricItemStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): CovalMetricsAPITestMetricItemStatus {
51
+ return json as CovalMetricsAPITestMetricItemStatus;
52
+ }
53
+
54
+ export function CovalMetricsAPITestMetricItemStatusToJSON(value?: CovalMetricsAPITestMetricItemStatus | null): any {
55
+ return value as any;
56
+ }
57
+
58
+ export function CovalMetricsAPITestMetricItemStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): CovalMetricsAPITestMetricItemStatus {
59
+ return value as CovalMetricsAPITestMetricItemStatus;
60
+ }
61
+
@@ -14,17 +14,24 @@
14
14
 
15
15
  import { mapValues } from '../runtime.js';
16
16
  /**
17
- *
17
+ * Provide exactly one of `simulation_output_id` or `simulation_output_ids`.
18
18
  * @export
19
19
  * @interface CovalMetricsAPITestMetricRequest
20
20
  */
21
21
  export interface CovalMetricsAPITestMetricRequest {
22
22
  /**
23
- * The simulation output ID (22-character ShortUUID) to run the metric against
23
+ * Deprecated: a single simulation output ID (22-character ShortUUID) to run the metric against. Prefer `simulation_output_ids`.
24
24
  * @type {string}
25
25
  * @memberof CovalMetricsAPITestMetricRequest
26
+ * @deprecated
26
27
  */
27
- simulation_output_id: string;
28
+ simulation_output_id?: string;
29
+ /**
30
+ * Simulation output IDs (22-character ShortUUIDs) to run the metric against; 1–100 per call.
31
+ * @type {Array<string>}
32
+ * @memberof CovalMetricsAPITestMetricRequest
33
+ */
34
+ simulation_output_ids?: Array<string>;
28
35
  /**
29
36
  * Optional developer identifier for debugging
30
37
  * @type {string}
@@ -37,7 +44,6 @@ export interface CovalMetricsAPITestMetricRequest {
37
44
  * Check if a given object implements the CovalMetricsAPITestMetricRequest interface.
38
45
  */
39
46
  export function instanceOfCovalMetricsAPITestMetricRequest(value: object): value is CovalMetricsAPITestMetricRequest {
40
- if (!('simulation_output_id' in value) || value['simulation_output_id'] === undefined) return false;
41
47
  return true;
42
48
  }
43
49
 
@@ -51,7 +57,8 @@ export function CovalMetricsAPITestMetricRequestFromJSONTyped(json: any, ignoreD
51
57
  }
52
58
  return {
53
59
 
54
- 'simulation_output_id': json['simulation_output_id'],
60
+ 'simulation_output_id': json['simulation_output_id'] == null ? undefined : json['simulation_output_id'],
61
+ 'simulation_output_ids': json['simulation_output_ids'] == null ? undefined : json['simulation_output_ids'],
55
62
  'dev_id': json['dev_id'] == null ? undefined : json['dev_id'],
56
63
  };
57
64
  }
@@ -68,6 +75,7 @@ export function CovalMetricsAPITestMetricRequestToJSONTyped(value?: CovalMetrics
68
75
  return {
69
76
 
70
77
  'simulation_output_id': value['simulation_output_id'],
78
+ 'simulation_output_ids': value['simulation_output_ids'],
71
79
  'dev_id': value['dev_id'],
72
80
  };
73
81
  }
@@ -13,6 +13,14 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime.js';
16
+ import type { CovalMetricsAPITestMetricBatchItemResult } from './CovalMetricsAPITestMetricBatchItemResult.js';
17
+ import {
18
+ CovalMetricsAPITestMetricBatchItemResultFromJSON,
19
+ CovalMetricsAPITestMetricBatchItemResultFromJSONTyped,
20
+ CovalMetricsAPITestMetricBatchItemResultToJSON,
21
+ CovalMetricsAPITestMetricBatchItemResultToJSONTyped,
22
+ } from './CovalMetricsAPITestMetricBatchItemResult.js';
23
+
16
24
  /**
17
25
  *
18
26
  * @export
@@ -20,17 +28,25 @@ import { mapValues } from '../runtime.js';
20
28
  */
21
29
  export interface CovalMetricsAPITestMetricResponse {
22
30
  /**
23
- * The ULID of the created metric output, used to track result
31
+ * One entry per requested simulation output.
32
+ * @type {Array<CovalMetricsAPITestMetricBatchItemResult>}
33
+ * @memberof CovalMetricsAPITestMetricResponse
34
+ */
35
+ results: Array<CovalMetricsAPITestMetricBatchItemResult>;
36
+ /**
37
+ * Deprecated: the ULID of the created metric output, used to track the result. Only set for single `simulation_output_id` requests; null for batch (`simulation_output_ids`) requests, which should read `results` instead.
24
38
  * @type {string}
25
39
  * @memberof CovalMetricsAPITestMetricResponse
40
+ * @deprecated
26
41
  */
27
- metric_output_ulid?: string;
42
+ metric_output_ulid?: string | null;
28
43
  }
29
44
 
30
45
  /**
31
46
  * Check if a given object implements the CovalMetricsAPITestMetricResponse interface.
32
47
  */
33
48
  export function instanceOfCovalMetricsAPITestMetricResponse(value: object): value is CovalMetricsAPITestMetricResponse {
49
+ if (!('results' in value) || value['results'] === undefined) return false;
34
50
  return true;
35
51
  }
36
52
 
@@ -44,6 +60,7 @@ export function CovalMetricsAPITestMetricResponseFromJSONTyped(json: any, ignore
44
60
  }
45
61
  return {
46
62
 
63
+ 'results': ((json['results'] as Array<any>).map(CovalMetricsAPITestMetricBatchItemResultFromJSON)),
47
64
  'metric_output_ulid': json['metric_output_ulid'] == null ? undefined : json['metric_output_ulid'],
48
65
  };
49
66
  }
@@ -59,6 +76,7 @@ export function CovalMetricsAPITestMetricResponseToJSONTyped(value?: CovalMetric
59
76
 
60
77
  return {
61
78
 
79
+ 'results': ((value['results'] as Array<any>).map(CovalMetricsAPITestMetricBatchItemResultToJSON)),
62
80
  'metric_output_ulid': value['metric_output_ulid'],
63
81
  };
64
82
  }
@@ -126,9 +126,41 @@ export interface CovalMetricsAPIUpdateMetricRequest {
126
126
  * @memberof CovalMetricsAPIUpdateMetricRequest
127
127
  */
128
128
  sql_query?: string;
129
+ /**
130
+ * Where a METRIC_COMPOSITE_EVALUATION metric reads its criteria from.
131
+ * @type {CovalMetricsAPIUpdateMetricRequestCriteriaSourceEnum}
132
+ * @memberof CovalMetricsAPIUpdateMetricRequest
133
+ */
134
+ criteria_source?: CovalMetricsAPIUpdateMetricRequestCriteriaSourceEnum;
135
+ /**
136
+ * Path to the criteria on the source, when `criteria_source` is `test_case`
137
+ * or `test_case_attribute`.
138
+ *
139
+ * @type {string}
140
+ * @memberof CovalMetricsAPIUpdateMetricRequest
141
+ */
142
+ criteria_path?: string;
143
+ /**
144
+ * Literal list of criteria, when `criteria_source` is `metric_metadata`.
145
+ * @type {Array<string>}
146
+ * @memberof CovalMetricsAPIUpdateMetricRequest
147
+ */
148
+ criteria?: Array<string>;
149
+ /**
150
+ * How per-criterion verdicts aggregate into the metric's value.
151
+ * @type {CovalMetricsAPIUpdateMetricRequestReportingMethodEnum}
152
+ * @memberof CovalMetricsAPIUpdateMetricRequest
153
+ */
154
+ reporting_method?: CovalMetricsAPIUpdateMetricRequestReportingMethodEnum;
155
+ /**
156
+ * Custom prompt template used to evaluate each criterion.
157
+ * @type {string}
158
+ * @memberof CovalMetricsAPIUpdateMetricRequest
159
+ */
160
+ base_prompt_template?: string;
129
161
  /**
130
162
  * Inject OTel trace context into the LLM judge prompt during evaluation.
131
- * Supported for LLM judge metric types only.
163
+ * Supported for LLM judge metric types and `METRIC_COMPOSITE_EVALUATION`.
132
164
  *
133
165
  * @type {boolean}
134
166
  * @memberof CovalMetricsAPIUpdateMetricRequest
@@ -169,6 +201,26 @@ export const CovalMetricsAPIUpdateMetricRequestRoleEnum = {
169
201
  } as const;
170
202
  export type CovalMetricsAPIUpdateMetricRequestRoleEnum = typeof CovalMetricsAPIUpdateMetricRequestRoleEnum[keyof typeof CovalMetricsAPIUpdateMetricRequestRoleEnum];
171
203
 
204
+ /**
205
+ * @export
206
+ */
207
+ export const CovalMetricsAPIUpdateMetricRequestCriteriaSourceEnum = {
208
+ TestCase: 'test_case',
209
+ TestCaseAttribute: 'test_case_attribute',
210
+ MetricMetadata: 'metric_metadata'
211
+ } as const;
212
+ export type CovalMetricsAPIUpdateMetricRequestCriteriaSourceEnum = typeof CovalMetricsAPIUpdateMetricRequestCriteriaSourceEnum[keyof typeof CovalMetricsAPIUpdateMetricRequestCriteriaSourceEnum];
213
+
214
+ /**
215
+ * @export
216
+ */
217
+ export const CovalMetricsAPIUpdateMetricRequestReportingMethodEnum = {
218
+ PercentageOfCriteriaMet: 'percentage_of_criteria_met',
219
+ CountOfCriteriaMet: 'count_of_criteria_met',
220
+ AllCriteriaMet: 'all_criteria_met'
221
+ } as const;
222
+ export type CovalMetricsAPIUpdateMetricRequestReportingMethodEnum = typeof CovalMetricsAPIUpdateMetricRequestReportingMethodEnum[keyof typeof CovalMetricsAPIUpdateMetricRequestReportingMethodEnum];
223
+
172
224
 
173
225
  /**
174
226
  * Check if a given object implements the CovalMetricsAPIUpdateMetricRequest interface.
@@ -200,6 +252,11 @@ export function CovalMetricsAPIUpdateMetricRequestFromJSONTyped(json: any, ignor
200
252
  'role': json['role'] == null ? undefined : json['role'],
201
253
  'min_pause_duration_seconds': json['min_pause_duration_seconds'] == null ? undefined : json['min_pause_duration_seconds'],
202
254
  'sql_query': json['sql_query'] == null ? undefined : json['sql_query'],
255
+ 'criteria_source': json['criteria_source'] == null ? undefined : json['criteria_source'],
256
+ 'criteria_path': json['criteria_path'] == null ? undefined : json['criteria_path'],
257
+ 'criteria': json['criteria'] == null ? undefined : json['criteria'],
258
+ 'reporting_method': json['reporting_method'] == null ? undefined : json['reporting_method'],
259
+ 'base_prompt_template': json['base_prompt_template'] == null ? undefined : json['base_prompt_template'],
203
260
  'include_traces': json['include_traces'] == null ? undefined : json['include_traces'],
204
261
  'runtime_config': json['runtime_config'] == null ? undefined : CovalMetricsAPIMetricRuntimeConfigFromJSON(json['runtime_config']),
205
262
  'target_condition': json['target_condition'] == null ? undefined : CovalMetricsAPITargetConditionFromJSON(json['target_condition']),
@@ -231,6 +288,11 @@ export function CovalMetricsAPIUpdateMetricRequestToJSONTyped(value?: CovalMetri
231
288
  'role': value['role'],
232
289
  'min_pause_duration_seconds': value['min_pause_duration_seconds'],
233
290
  'sql_query': value['sql_query'],
291
+ 'criteria_source': value['criteria_source'],
292
+ 'criteria_path': value['criteria_path'],
293
+ 'criteria': value['criteria'],
294
+ 'reporting_method': value['reporting_method'],
295
+ 'base_prompt_template': value['base_prompt_template'],
234
296
  'include_traces': value['include_traces'],
235
297
  'runtime_config': CovalMetricsAPIMetricRuntimeConfigToJSON(value['runtime_config']),
236
298
  'target_condition': CovalMetricsAPITargetConditionToJSON(value['target_condition']),
@@ -88,6 +88,12 @@ export interface CovalReviewsAPICreateReviewProjectRequest {
88
88
  * @memberof CovalReviewsAPICreateReviewProjectRequest
89
89
  */
90
90
  blind_labeling_shown_metric_ids?: Array<string> | null;
91
+ /**
92
+ * Enforce claims and explicit single-author completion for collaborative projects
93
+ * @type {boolean}
94
+ * @memberof CovalReviewsAPICreateReviewProjectRequest
95
+ */
96
+ enforced_collaboration?: boolean;
91
97
  }
92
98
 
93
99
 
@@ -122,6 +128,7 @@ export function CovalReviewsAPICreateReviewProjectRequestFromJSONTyped(json: any
122
128
  'notifications': json['notifications'] == null ? undefined : json['notifications'],
123
129
  'project_rules': json['project_rules'] == null ? undefined : ((json['project_rules'] as Array<any>).map(CovalReviewsAPIProjectRuleFromJSON)),
124
130
  'blind_labeling_shown_metric_ids': json['blind_labeling_shown_metric_ids'] == null ? undefined : json['blind_labeling_shown_metric_ids'],
131
+ 'enforced_collaboration': json['enforced_collaboration'] == null ? undefined : json['enforced_collaboration'],
125
132
  };
126
133
  }
127
134
 
@@ -145,6 +152,7 @@ export function CovalReviewsAPICreateReviewProjectRequestToJSONTyped(value?: Cov
145
152
  'notifications': value['notifications'],
146
153
  'project_rules': value['project_rules'] == null ? undefined : ((value['project_rules'] as Array<any>).map(CovalReviewsAPIProjectRuleToJSON)),
147
154
  'blind_labeling_shown_metric_ids': value['blind_labeling_shown_metric_ids'],
155
+ 'enforced_collaboration': value['enforced_collaboration'],
148
156
  };
149
157
  }
150
158
 
@@ -94,6 +94,12 @@ export interface CovalReviewsAPIReviewProjectResource {
94
94
  * @memberof CovalReviewsAPIReviewProjectResource
95
95
  */
96
96
  project_rules?: Array<CovalReviewsAPIProjectRule> | null;
97
+ /**
98
+ * Whether collaborative claims and explicit single-author completion are enforced
99
+ * @type {boolean}
100
+ * @memberof CovalReviewsAPIReviewProjectResource
101
+ */
102
+ enforced_collaboration?: boolean;
97
103
  /**
98
104
  * Creation timestamp (ISO 8601)
99
105
  * @type {Date}
@@ -147,6 +153,7 @@ export function CovalReviewsAPIReviewProjectResourceFromJSONTyped(json: any, ign
147
153
  'project_type': CovalReviewsAPIProjectTypeFromJSON(json['project_type']),
148
154
  'notifications': json['notifications'],
149
155
  'project_rules': json['project_rules'] == null ? undefined : ((json['project_rules'] as Array<any>).map(CovalReviewsAPIProjectRuleFromJSON)),
156
+ 'enforced_collaboration': json['enforced_collaboration'] == null ? undefined : json['enforced_collaboration'],
150
157
  'create_time': (new Date(json['create_time'])),
151
158
  'update_time': (new Date(json['update_time'])),
152
159
  };
@@ -173,6 +180,7 @@ export function CovalReviewsAPIReviewProjectResourceToJSONTyped(value?: CovalRev
173
180
  'project_type': CovalReviewsAPIProjectTypeToJSON(value['project_type']),
174
181
  'notifications': value['notifications'],
175
182
  'project_rules': value['project_rules'] == null ? undefined : ((value['project_rules'] as Array<any>).map(CovalReviewsAPIProjectRuleToJSON)),
183
+ 'enforced_collaboration': value['enforced_collaboration'],
176
184
  'create_time': value['create_time'].toISOString(),
177
185
  'update_time': value['update_time'].toISOString(),
178
186
  };
@@ -69,6 +69,12 @@ export interface CovalReviewsAPIUpdateReviewProjectRequest {
69
69
  * @memberof CovalReviewsAPIUpdateReviewProjectRequest
70
70
  */
71
71
  linked_metric_ids?: Array<string> | null;
72
+ /**
73
+ * Required only when adding metrics to choose whether valid enforced-collaborative completed conversations reopen; omitted keeps completed conversations unchanged
74
+ * @type {CovalReviewsAPIUpdateReviewProjectRequestMetricAdditionCompletionActionEnum}
75
+ * @memberof CovalReviewsAPIUpdateReviewProjectRequest
76
+ */
77
+ metric_addition_completion_action?: CovalReviewsAPIUpdateReviewProjectRequestMetricAdditionCompletionActionEnum | null;
72
78
  /**
73
79
  * Updated notification setting
74
80
  * @type {boolean}
@@ -93,8 +99,25 @@ export interface CovalReviewsAPIUpdateReviewProjectRequest {
93
99
  * @memberof CovalReviewsAPIUpdateReviewProjectRequest
94
100
  */
95
101
  opted_out_assignees?: Array<string> | null;
102
+ /**
103
+ * Enforce claims and explicit single-author completion for collaborative projects
104
+ * @type {boolean}
105
+ * @memberof CovalReviewsAPIUpdateReviewProjectRequest
106
+ */
107
+ enforced_collaboration?: boolean;
96
108
  }
97
109
 
110
+
111
+ /**
112
+ * @export
113
+ */
114
+ export const CovalReviewsAPIUpdateReviewProjectRequestMetricAdditionCompletionActionEnum = {
115
+ KeepCompleted: 'KEEP_COMPLETED',
116
+ ReopenCompleted: 'REOPEN_COMPLETED'
117
+ } as const;
118
+ export type CovalReviewsAPIUpdateReviewProjectRequestMetricAdditionCompletionActionEnum = typeof CovalReviewsAPIUpdateReviewProjectRequestMetricAdditionCompletionActionEnum[keyof typeof CovalReviewsAPIUpdateReviewProjectRequestMetricAdditionCompletionActionEnum];
119
+
120
+
98
121
  /**
99
122
  * Check if a given object implements the CovalReviewsAPIUpdateReviewProjectRequest interface.
100
123
  */
@@ -119,10 +142,12 @@ export function CovalReviewsAPIUpdateReviewProjectRequestFromJSONTyped(json: any
119
142
  'add_linked_simulation_ids': json['add_linked_simulation_ids'] == null ? undefined : json['add_linked_simulation_ids'],
120
143
  'remove_linked_simulation_ids': json['remove_linked_simulation_ids'] == null ? undefined : json['remove_linked_simulation_ids'],
121
144
  'linked_metric_ids': json['linked_metric_ids'] == null ? undefined : json['linked_metric_ids'],
145
+ 'metric_addition_completion_action': json['metric_addition_completion_action'] == null ? undefined : json['metric_addition_completion_action'],
122
146
  'notifications': json['notifications'] == null ? undefined : json['notifications'],
123
147
  'project_rules': json['project_rules'] == null ? undefined : ((json['project_rules'] as Array<any>).map(CovalReviewsAPIProjectRuleFromJSON)),
124
148
  'blind_labeling_shown_metric_ids': json['blind_labeling_shown_metric_ids'] == null ? undefined : json['blind_labeling_shown_metric_ids'],
125
149
  'opted_out_assignees': json['opted_out_assignees'] == null ? undefined : json['opted_out_assignees'],
150
+ 'enforced_collaboration': json['enforced_collaboration'] == null ? undefined : json['enforced_collaboration'],
126
151
  };
127
152
  }
128
153
 
@@ -144,10 +169,12 @@ export function CovalReviewsAPIUpdateReviewProjectRequestToJSONTyped(value?: Cov
144
169
  'add_linked_simulation_ids': value['add_linked_simulation_ids'],
145
170
  'remove_linked_simulation_ids': value['remove_linked_simulation_ids'],
146
171
  'linked_metric_ids': value['linked_metric_ids'],
172
+ 'metric_addition_completion_action': value['metric_addition_completion_action'],
147
173
  'notifications': value['notifications'],
148
174
  'project_rules': value['project_rules'] == null ? undefined : ((value['project_rules'] as Array<any>).map(CovalReviewsAPIProjectRuleToJSON)),
149
175
  'blind_labeling_shown_metric_ids': value['blind_labeling_shown_metric_ids'],
150
176
  'opted_out_assignees': value['opted_out_assignees'],
177
+ 'enforced_collaboration': value['enforced_collaboration'],
151
178
  };
152
179
  }
153
180
 
@@ -178,6 +178,8 @@ export * from './CovalMetricsAPISimulationDataFramesSchemaResponse.js';
178
178
  export * from './CovalMetricsAPISqlMetricTestSubvalue.js';
179
179
  export * from './CovalMetricsAPISubvalueByTimestamp.js';
180
180
  export * from './CovalMetricsAPITargetCondition.js';
181
+ export * from './CovalMetricsAPITestMetricBatchItemResult.js';
182
+ export * from './CovalMetricsAPITestMetricItemStatus.js';
181
183
  export * from './CovalMetricsAPITestMetricRequest.js';
182
184
  export * from './CovalMetricsAPITestMetricResponse.js';
183
185
  export * from './CovalMetricsAPITestSqlMetricRequest.js';