@coval/sdk 0.7.1 → 0.9.3

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 (153) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +5 -0
  3. package/README.md +2 -2
  4. package/dist/CovalClient.d.ts +3 -2
  5. package/dist/CovalClient.d.ts.map +1 -1
  6. package/dist/CovalClient.js +4 -1
  7. package/dist/CovalClient.js.map +1 -1
  8. package/dist/generated/apis/PythonMetricsApi.d.ts +290 -0
  9. package/dist/generated/apis/PythonMetricsApi.d.ts.map +1 -0
  10. package/dist/generated/apis/PythonMetricsApi.js +291 -0
  11. package/dist/generated/apis/PythonMetricsApi.js.map +1 -0
  12. package/dist/generated/apis/ReviewAnnotationsApi.d.ts +16 -16
  13. package/dist/generated/apis/ReviewAnnotationsApi.js +6 -6
  14. package/dist/generated/apis/ReviewProjectsApi.d.ts +4 -4
  15. package/dist/generated/apis/ReviewProjectsApi.js +2 -2
  16. package/dist/generated/apis/SimulatedConversationsApi.d.ts +15 -12
  17. package/dist/generated/apis/SimulatedConversationsApi.d.ts.map +1 -1
  18. package/dist/generated/apis/SimulatedConversationsApi.js +7 -4
  19. package/dist/generated/apis/SimulatedConversationsApi.js.map +1 -1
  20. package/dist/generated/apis/index.d.ts +1 -0
  21. package/dist/generated/apis/index.d.ts.map +1 -1
  22. package/dist/generated/apis/index.js +1 -0
  23. package/dist/generated/apis/index.js.map +1 -1
  24. package/dist/generated/models/CovalMetricsAPIMetricType.d.ts +2 -0
  25. package/dist/generated/models/CovalMetricsAPIMetricType.d.ts.map +1 -1
  26. package/dist/generated/models/CovalMetricsAPIMetricType.js +2 -0
  27. package/dist/generated/models/CovalMetricsAPIMetricType.js.map +1 -1
  28. package/dist/generated/models/CovalPersonasAPICreatePersonaRequest.d.ts +9 -0
  29. package/dist/generated/models/CovalPersonasAPICreatePersonaRequest.d.ts.map +1 -1
  30. package/dist/generated/models/CovalPersonasAPICreatePersonaRequest.js +2 -0
  31. package/dist/generated/models/CovalPersonasAPICreatePersonaRequest.js.map +1 -1
  32. package/dist/generated/models/CovalPersonasAPIPersonaResource.d.ts +9 -0
  33. package/dist/generated/models/CovalPersonasAPIPersonaResource.d.ts.map +1 -1
  34. package/dist/generated/models/CovalPersonasAPIPersonaResource.js +2 -0
  35. package/dist/generated/models/CovalPersonasAPIPersonaResource.js.map +1 -1
  36. package/dist/generated/models/CovalPersonasAPIUpdatePersonaRequest.d.ts +10 -0
  37. package/dist/generated/models/CovalPersonasAPIUpdatePersonaRequest.d.ts.map +1 -1
  38. package/dist/generated/models/CovalPersonasAPIUpdatePersonaRequest.js +2 -0
  39. package/dist/generated/models/CovalPersonasAPIUpdatePersonaRequest.js.map +1 -1
  40. package/dist/generated/models/CovalReviewsAPICreateReviewAnnotationRequest.d.ts +2 -2
  41. package/dist/generated/models/CovalReviewsAPIProjectType.d.ts +1 -1
  42. package/dist/generated/models/CovalReviewsAPIProjectType.js +1 -1
  43. package/dist/generated/models/CovalReviewsAPIReviewAnnotationResource.d.ts +2 -2
  44. package/dist/generated/models/CovalReviewsAPIReviewAnnotationWithMetricVersionResource.d.ts +1 -1
  45. package/dist/generated/models/CovalReviewsAPIReviewProjectResource.d.ts +7 -1
  46. package/dist/generated/models/CovalReviewsAPIReviewProjectResource.d.ts.map +1 -1
  47. package/dist/generated/models/CovalReviewsAPIReviewProjectResource.js +2 -0
  48. package/dist/generated/models/CovalReviewsAPIReviewProjectResource.js.map +1 -1
  49. package/dist/generated/models/CovalReviewsAPIUpdateReviewAnnotationRequest.d.ts +7 -3
  50. package/dist/generated/models/CovalReviewsAPIUpdateReviewAnnotationRequest.d.ts.map +1 -1
  51. package/dist/generated/models/CovalReviewsAPIUpdateReviewAnnotationRequest.js.map +1 -1
  52. package/dist/generated/models/CovalReviewsAPIUpdateReviewProjectRequest.d.ts +7 -1
  53. package/dist/generated/models/CovalReviewsAPIUpdateReviewProjectRequest.d.ts.map +1 -1
  54. package/dist/generated/models/CovalReviewsAPIUpdateReviewProjectRequest.js +2 -0
  55. package/dist/generated/models/CovalReviewsAPIUpdateReviewProjectRequest.js.map +1 -1
  56. package/dist/generated/models/CovalRunTemplatesAPIErrorResponseError.d.ts +1 -0
  57. package/dist/generated/models/CovalRunTemplatesAPIErrorResponseError.d.ts.map +1 -1
  58. package/dist/generated/models/CovalRunTemplatesAPIErrorResponseError.js +1 -0
  59. package/dist/generated/models/CovalRunTemplatesAPIErrorResponseError.js.map +1 -1
  60. package/dist/generated/models/CovalRunsAPIError.d.ts +1 -0
  61. package/dist/generated/models/CovalRunsAPIError.d.ts.map +1 -1
  62. package/dist/generated/models/CovalRunsAPIError.js +1 -0
  63. package/dist/generated/models/CovalRunsAPIError.js.map +1 -1
  64. package/dist/generated/models/CovalSimulatedConversationsAPIRerunSimulatedConversationMetricsRequest.d.ts +1 -1
  65. package/dist/generated/models/CovalUploadedConversationsAPISubmitUploadedConversationRequest.d.ts +8 -2
  66. package/dist/generated/models/CovalUploadedConversationsAPISubmitUploadedConversationRequest.d.ts.map +1 -1
  67. package/dist/generated/models/CovalUploadedConversationsAPISubmitUploadedConversationRequest.js.map +1 -1
  68. package/dist/generated/models/CovalUploadedConversationsAPITranscriptMessage.d.ts +53 -0
  69. package/dist/generated/models/CovalUploadedConversationsAPITranscriptMessage.d.ts.map +1 -1
  70. package/dist/generated/models/CovalUploadedConversationsAPITranscriptMessage.js +17 -0
  71. package/dist/generated/models/CovalUploadedConversationsAPITranscriptMessage.js.map +1 -1
  72. package/dist/generated/models/CovalUploadedConversationsAPIUploadedConversationResource.d.ts +4 -1
  73. package/dist/generated/models/CovalUploadedConversationsAPIUploadedConversationResource.d.ts.map +1 -1
  74. package/dist/generated/models/CovalUploadedConversationsAPIUploadedConversationResource.js.map +1 -1
  75. package/dist/generated/models/PythonMetricsAPICreatePythonMetricDraftRequest.d.ts +84 -0
  76. package/dist/generated/models/PythonMetricsAPICreatePythonMetricDraftRequest.d.ts.map +1 -0
  77. package/dist/generated/models/PythonMetricsAPICreatePythonMetricDraftRequest.js +70 -0
  78. package/dist/generated/models/PythonMetricsAPICreatePythonMetricDraftRequest.js.map +1 -0
  79. package/dist/generated/models/PythonMetricsAPIInputRequirements.d.ts +45 -0
  80. package/dist/generated/models/PythonMetricsAPIInputRequirements.d.ts.map +1 -0
  81. package/dist/generated/models/PythonMetricsAPIInputRequirements.js +46 -0
  82. package/dist/generated/models/PythonMetricsAPIInputRequirements.js.map +1 -0
  83. package/dist/generated/models/PythonMetricsAPIPreviewPythonMetricBody.d.ts +33 -0
  84. package/dist/generated/models/PythonMetricsAPIPreviewPythonMetricBody.d.ts.map +1 -0
  85. package/dist/generated/models/PythonMetricsAPIPreviewPythonMetricBody.js +44 -0
  86. package/dist/generated/models/PythonMetricsAPIPreviewPythonMetricBody.js.map +1 -0
  87. package/dist/generated/models/PythonMetricsAPIPublishPythonMetricBody.d.ts +39 -0
  88. package/dist/generated/models/PythonMetricsAPIPublishPythonMetricBody.d.ts.map +1 -0
  89. package/dist/generated/models/PythonMetricsAPIPublishPythonMetricBody.js +48 -0
  90. package/dist/generated/models/PythonMetricsAPIPublishPythonMetricBody.js.map +1 -0
  91. package/dist/generated/models/PythonMetricsAPIPublishPythonMetricResponse.d.ts +39 -0
  92. package/dist/generated/models/PythonMetricsAPIPublishPythonMetricResponse.d.ts.map +1 -0
  93. package/dist/generated/models/PythonMetricsAPIPublishPythonMetricResponse.js +48 -0
  94. package/dist/generated/models/PythonMetricsAPIPublishPythonMetricResponse.js.map +1 -0
  95. package/dist/generated/models/PythonMetricsAPIPythonMetricDraftResource.d.ts +108 -0
  96. package/dist/generated/models/PythonMetricsAPIPythonMetricDraftResource.d.ts.map +1 -0
  97. package/dist/generated/models/PythonMetricsAPIPythonMetricDraftResource.js +92 -0
  98. package/dist/generated/models/PythonMetricsAPIPythonMetricDraftResource.js.map +1 -0
  99. package/dist/generated/models/PythonMetricsAPIPythonMetricDraftResponse.d.ts +34 -0
  100. package/dist/generated/models/PythonMetricsAPIPythonMetricDraftResponse.d.ts.map +1 -0
  101. package/dist/generated/models/PythonMetricsAPIPythonMetricDraftResponse.js +45 -0
  102. package/dist/generated/models/PythonMetricsAPIPythonMetricDraftResponse.js.map +1 -0
  103. package/dist/generated/models/PythonMetricsAPIPythonMetricPreviewResource.d.ts +64 -0
  104. package/dist/generated/models/PythonMetricsAPIPythonMetricPreviewResource.d.ts.map +1 -0
  105. package/dist/generated/models/PythonMetricsAPIPythonMetricPreviewResource.js +59 -0
  106. package/dist/generated/models/PythonMetricsAPIPythonMetricPreviewResource.js.map +1 -0
  107. package/dist/generated/models/PythonMetricsAPIPythonMetricPreviewResourceValue.d.ts +27 -0
  108. package/dist/generated/models/PythonMetricsAPIPythonMetricPreviewResourceValue.d.ts.map +1 -0
  109. package/dist/generated/models/PythonMetricsAPIPythonMetricPreviewResourceValue.js +32 -0
  110. package/dist/generated/models/PythonMetricsAPIPythonMetricPreviewResourceValue.js.map +1 -0
  111. package/dist/generated/models/PythonMetricsAPIPythonMetricPreviewsResponse.d.ts +34 -0
  112. package/dist/generated/models/PythonMetricsAPIPythonMetricPreviewsResponse.d.ts.map +1 -0
  113. package/dist/generated/models/PythonMetricsAPIPythonMetricPreviewsResponse.js +45 -0
  114. package/dist/generated/models/PythonMetricsAPIPythonMetricPreviewsResponse.js.map +1 -0
  115. package/dist/generated/models/index.d.ts +10 -0
  116. package/dist/generated/models/index.d.ts.map +1 -1
  117. package/dist/generated/models/index.js +10 -0
  118. package/dist/generated/models/index.js.map +1 -1
  119. package/package.json +7 -5
  120. package/src/CovalClient.ts +4 -0
  121. package/src/generated/apis/PythonMetricsApi.ts +627 -0
  122. package/src/generated/apis/ReviewAnnotationsApi.ts +16 -16
  123. package/src/generated/apis/ReviewProjectsApi.ts +4 -4
  124. package/src/generated/apis/SimulatedConversationsApi.ts +19 -12
  125. package/src/generated/apis/index.ts +1 -0
  126. package/src/generated/models/CovalMetricsAPIMetricType.ts +2 -0
  127. package/src/generated/models/CovalPersonasAPICreatePersonaRequest.ts +11 -0
  128. package/src/generated/models/CovalPersonasAPIPersonaResource.ts +11 -0
  129. package/src/generated/models/CovalPersonasAPIUpdatePersonaRequest.ts +12 -0
  130. package/src/generated/models/CovalReviewsAPICreateReviewAnnotationRequest.ts +2 -2
  131. package/src/generated/models/CovalReviewsAPIProjectType.ts +1 -1
  132. package/src/generated/models/CovalReviewsAPIReviewAnnotationResource.ts +2 -2
  133. package/src/generated/models/CovalReviewsAPIReviewAnnotationWithMetricVersionResource.ts +1 -1
  134. package/src/generated/models/CovalReviewsAPIReviewProjectResource.ts +9 -1
  135. package/src/generated/models/CovalReviewsAPIUpdateReviewAnnotationRequest.ts +7 -3
  136. package/src/generated/models/CovalReviewsAPIUpdateReviewProjectRequest.ts +9 -1
  137. package/src/generated/models/CovalRunTemplatesAPIErrorResponseError.ts +1 -0
  138. package/src/generated/models/CovalRunsAPIError.ts +1 -0
  139. package/src/generated/models/CovalSimulatedConversationsAPIRerunSimulatedConversationMetricsRequest.ts +1 -1
  140. package/src/generated/models/CovalUploadedConversationsAPISubmitUploadedConversationRequest.ts +8 -2
  141. package/src/generated/models/CovalUploadedConversationsAPITranscriptMessage.ts +64 -0
  142. package/src/generated/models/CovalUploadedConversationsAPIUploadedConversationResource.ts +4 -1
  143. package/src/generated/models/PythonMetricsAPICreatePythonMetricDraftRequest.ts +143 -0
  144. package/src/generated/models/PythonMetricsAPIInputRequirements.ts +81 -0
  145. package/src/generated/models/PythonMetricsAPIPreviewPythonMetricBody.ts +66 -0
  146. package/src/generated/models/PythonMetricsAPIPublishPythonMetricBody.ts +75 -0
  147. package/src/generated/models/PythonMetricsAPIPublishPythonMetricResponse.ts +75 -0
  148. package/src/generated/models/PythonMetricsAPIPythonMetricDraftResource.ts +182 -0
  149. package/src/generated/models/PythonMetricsAPIPythonMetricDraftResponse.ts +74 -0
  150. package/src/generated/models/PythonMetricsAPIPythonMetricPreviewResource.ts +116 -0
  151. package/src/generated/models/PythonMetricsAPIPythonMetricPreviewResourceValue.ts +46 -0
  152. package/src/generated/models/PythonMetricsAPIPythonMetricPreviewsResponse.ts +74 -0
  153. package/src/generated/models/index.ts +10 -0
@@ -109,7 +109,10 @@ export interface CovalUploadedConversationsAPISubmitUploadedConversationRequest
109
109
  */
110
110
  upload_id?: string;
111
111
  /**
112
- * List of metric IDs to evaluate (22–26 character IDs).
112
+ * Metric IDs or exact legacy metric_name values to evaluate. IDs take precedence.
113
+ * Legacy names must resolve to a unique active metric visible in the request workspace.
114
+ * Display names are not accepted. Unknown, ambiguous, inactive, hidden, deleted, or
115
+ * inaccessible selections return 400 INVALID_ARGUMENT.
113
116
  *
114
117
  * If not provided, uses your default metrics configured in the Coval dashboard.
115
118
  *
@@ -157,7 +160,10 @@ export interface CovalUploadedConversationsAPISubmitUploadedConversationRequest
157
160
  */
158
161
  external_conversation_id?: string;
159
162
  /**
160
- * When the conversation actually occurred (ISO 8601)
163
+ * The instant the audio recording begins, in ISO 8601 with sub-second precision. Coval uses it to align the recording with trace spans in the trace viewer and to locate traces around the call.
164
+ *
165
+ * Optional. Without it, the trace viewer draws the recording without aligning it to spans.
166
+ *
161
167
  * @type {Date}
162
168
  * @memberof CovalUploadedConversationsAPISubmitUploadedConversationRequest
163
169
  */
@@ -34,6 +34,11 @@ import {
34
34
  * 2. Each tool call has a unique `id` and function details
35
35
  * 3. Tool responses use `role: tool` with matching `tool_call_id`
36
36
  *
37
+ * **Coval Tool Entries:**
38
+ * - A `role: tool` message with `is_tool_call` set is an entry recorded by Coval's simulator: a tool
39
+ * invocation (`true`) or a setup payload record (`false`)
40
+ * - It carries `name` and `tool_call_owner` and needs no `tool_call_id`
41
+ *
37
42
  * **Timing Information:**
38
43
  * - `start_time` and `end_time` are measured in seconds from the start of the audio (e.g., 0.0, 3.5, 7.2)
39
44
  * - Both `start_time` and `end_time` are **required** if:
@@ -96,6 +101,46 @@ export interface CovalUploadedConversationsAPITranscriptMessage {
96
101
  * @memberof CovalUploadedConversationsAPITranscriptMessage
97
102
  */
98
103
  tool_call_id?: string | null;
104
+ /**
105
+ * Tool or record name for a Coval tool entry (`role: tool` with `is_tool_call` set).
106
+ *
107
+ * Coval's own simulator records each tool call made during a simulation, such as a persona
108
+ * keypad press (`dtmf_tool`), and each setup payload exchanged with the agent, as a `role: tool`
109
+ * message in this form.
110
+ *
111
+ * @type {string}
112
+ * @memberof CovalUploadedConversationsAPITranscriptMessage
113
+ */
114
+ name?: string | null;
115
+ /**
116
+ * Present on a Coval tool entry: `true` for a tool invocation, `false` for a setup payload record.
117
+ *
118
+ * A Coval tool entry needs no `tool_call_id`; the message `content` carries the call's arguments and
119
+ * result, or the recorded payload. `true` is only valid with `role: tool`.
120
+ *
121
+ * @type {boolean}
122
+ * @memberof CovalUploadedConversationsAPITranscriptMessage
123
+ */
124
+ is_tool_call?: boolean | null;
125
+ /**
126
+ * Which side produced a Coval tool entry. Only valid with `role: tool`.
127
+ *
128
+ * @type {CovalUploadedConversationsAPITranscriptMessageToolCallOwnerEnum}
129
+ * @memberof CovalUploadedConversationsAPITranscriptMessage
130
+ */
131
+ tool_call_owner?: CovalUploadedConversationsAPITranscriptMessageToolCallOwnerEnum | null;
132
+ /**
133
+ * `true` when the speaker was interrupted before finishing this message.
134
+ * @type {boolean}
135
+ * @memberof CovalUploadedConversationsAPITranscriptMessage
136
+ */
137
+ is_interrupted?: boolean | null;
138
+ /**
139
+ * `true` when `start_time` and `end_time` are estimated rather than measured.
140
+ * @type {boolean}
141
+ * @memberof CovalUploadedConversationsAPITranscriptMessage
142
+ */
143
+ is_estimated?: boolean | null;
99
144
  /**
100
145
  * When this message started, in seconds from the beginning of the conversation.
101
146
  *
@@ -152,6 +197,15 @@ export const CovalUploadedConversationsAPITranscriptMessageRoleEnum = {
152
197
  } as const;
153
198
  export type CovalUploadedConversationsAPITranscriptMessageRoleEnum = typeof CovalUploadedConversationsAPITranscriptMessageRoleEnum[keyof typeof CovalUploadedConversationsAPITranscriptMessageRoleEnum];
154
199
 
200
+ /**
201
+ * @export
202
+ */
203
+ export const CovalUploadedConversationsAPITranscriptMessageToolCallOwnerEnum = {
204
+ User: 'user',
205
+ Assistant: 'assistant'
206
+ } as const;
207
+ export type CovalUploadedConversationsAPITranscriptMessageToolCallOwnerEnum = typeof CovalUploadedConversationsAPITranscriptMessageToolCallOwnerEnum[keyof typeof CovalUploadedConversationsAPITranscriptMessageToolCallOwnerEnum];
208
+
155
209
 
156
210
  /**
157
211
  * Check if a given object implements the CovalUploadedConversationsAPITranscriptMessage interface.
@@ -176,6 +230,11 @@ export function CovalUploadedConversationsAPITranscriptMessageFromJSONTyped(json
176
230
  'message': json['message'] == null ? undefined : json['message'],
177
231
  'tool_calls': json['tool_calls'] == null ? undefined : ((json['tool_calls'] as Array<any>).map(CovalUploadedConversationsAPIToolCallFromJSON)),
178
232
  'tool_call_id': json['tool_call_id'] == null ? undefined : json['tool_call_id'],
233
+ 'name': json['name'] == null ? undefined : json['name'],
234
+ 'is_tool_call': json['is_tool_call'] == null ? undefined : json['is_tool_call'],
235
+ 'tool_call_owner': json['tool_call_owner'] == null ? undefined : json['tool_call_owner'],
236
+ 'is_interrupted': json['is_interrupted'] == null ? undefined : json['is_interrupted'],
237
+ 'is_estimated': json['is_estimated'] == null ? undefined : json['is_estimated'],
179
238
  'start_time': json['start_time'] == null ? undefined : json['start_time'],
180
239
  'end_time': json['end_time'] == null ? undefined : json['end_time'],
181
240
  'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
@@ -200,6 +259,11 @@ export function CovalUploadedConversationsAPITranscriptMessageToJSONTyped(value?
200
259
  'message': value['message'],
201
260
  'tool_calls': value['tool_calls'] == null ? undefined : ((value['tool_calls'] as Array<any>).map(CovalUploadedConversationsAPIToolCallToJSON)),
202
261
  'tool_call_id': value['tool_call_id'],
262
+ 'name': value['name'],
263
+ 'is_tool_call': value['is_tool_call'],
264
+ 'tool_call_owner': value['tool_call_owner'],
265
+ 'is_interrupted': value['is_interrupted'],
266
+ 'is_estimated': value['is_estimated'],
203
267
  'start_time': value['start_time'],
204
268
  'end_time': value['end_time'],
205
269
  'timestamp': value['timestamp'] == null ? value['timestamp'] : value['timestamp'].toISOString(),
@@ -100,7 +100,10 @@ export interface CovalUploadedConversationsAPIUploadedConversationResource {
100
100
  */
101
101
  external_conversation_id?: string | null;
102
102
  /**
103
- * When the conversation actually occurred (ISO 8601)
103
+ * The instant the audio recording begins, in ISO 8601 with sub-second precision. Coval uses it to align the recording with trace spans in the trace viewer and to locate traces around the call.
104
+ *
105
+ * When it was not provided at submit, this is the time Coval received the conversation, and the trace viewer draws the recording without aligning it to spans.
106
+ *
104
107
  * @type {Date}
105
108
  * @memberof CovalUploadedConversationsAPIUploadedConversationResource
106
109
  */
@@ -0,0 +1,143 @@
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 { PythonMetricsAPIInputRequirements } from './PythonMetricsAPIInputRequirements.js';
17
+ import {
18
+ PythonMetricsAPIInputRequirementsFromJSON,
19
+ PythonMetricsAPIInputRequirementsFromJSONTyped,
20
+ PythonMetricsAPIInputRequirementsToJSON,
21
+ PythonMetricsAPIInputRequirementsToJSONTyped,
22
+ } from './PythonMetricsAPIInputRequirements.js';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface PythonMetricsAPICreatePythonMetricDraftRequest
28
+ */
29
+ export interface PythonMetricsAPICreatePythonMetricDraftRequest {
30
+ /**
31
+ * Existing Python metric to revise; null creates a new metric.
32
+ * @type {string}
33
+ * @memberof PythonMetricsAPICreatePythonMetricDraftRequest
34
+ */
35
+ target_metric_id?: string | null;
36
+ /**
37
+ * Expected current version when revising a metric; null for a new metric.
38
+ * @type {string}
39
+ * @memberof PythonMetricsAPICreatePythonMetricDraftRequest
40
+ */
41
+ target_version_id?: string | null;
42
+ /**
43
+ * Display name for the metric.
44
+ * @type {string}
45
+ * @memberof PythonMetricsAPICreatePythonMetricDraftRequest
46
+ */
47
+ display_name: string;
48
+ /**
49
+ * What this metric measures.
50
+ * @type {string}
51
+ * @memberof PythonMetricsAPICreatePythonMetricDraftRequest
52
+ */
53
+ description?: string;
54
+ /**
55
+ * Python defining evaluate(conversation).
56
+ * @type {string}
57
+ * @memberof PythonMetricsAPICreatePythonMetricDraftRequest
58
+ */
59
+ source: string;
60
+ /**
61
+ * Scalar return type.
62
+ * @type {PythonMetricsAPICreatePythonMetricDraftRequestOutputTypeEnum}
63
+ * @memberof PythonMetricsAPICreatePythonMetricDraftRequest
64
+ */
65
+ output_type: PythonMetricsAPICreatePythonMetricDraftRequestOutputTypeEnum;
66
+ /**
67
+ * Optional numeric unit; null means unitless.
68
+ * @type {string}
69
+ * @memberof PythonMetricsAPICreatePythonMetricDraftRequest
70
+ */
71
+ unit?: string | null;
72
+ /**
73
+ * Inputs required to evaluate a conversation.
74
+ * @type {PythonMetricsAPIInputRequirements}
75
+ * @memberof PythonMetricsAPICreatePythonMetricDraftRequest
76
+ */
77
+ requirements?: PythonMetricsAPIInputRequirements;
78
+ }
79
+
80
+
81
+ /**
82
+ * @export
83
+ */
84
+ export const PythonMetricsAPICreatePythonMetricDraftRequestOutputTypeEnum = {
85
+ Number: 'number',
86
+ Boolean: 'boolean'
87
+ } as const;
88
+ export type PythonMetricsAPICreatePythonMetricDraftRequestOutputTypeEnum = typeof PythonMetricsAPICreatePythonMetricDraftRequestOutputTypeEnum[keyof typeof PythonMetricsAPICreatePythonMetricDraftRequestOutputTypeEnum];
89
+
90
+
91
+ /**
92
+ * Check if a given object implements the PythonMetricsAPICreatePythonMetricDraftRequest interface.
93
+ */
94
+ export function instanceOfPythonMetricsAPICreatePythonMetricDraftRequest(value: object): value is PythonMetricsAPICreatePythonMetricDraftRequest {
95
+ if (!('display_name' in value) || value['display_name'] === undefined) return false;
96
+ if (!('source' in value) || value['source'] === undefined) return false;
97
+ if (!('output_type' in value) || value['output_type'] === undefined) return false;
98
+ return true;
99
+ }
100
+
101
+ export function PythonMetricsAPICreatePythonMetricDraftRequestFromJSON(json: any): PythonMetricsAPICreatePythonMetricDraftRequest {
102
+ return PythonMetricsAPICreatePythonMetricDraftRequestFromJSONTyped(json, false);
103
+ }
104
+
105
+ export function PythonMetricsAPICreatePythonMetricDraftRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PythonMetricsAPICreatePythonMetricDraftRequest {
106
+ if (json == null) {
107
+ return json;
108
+ }
109
+ return {
110
+
111
+ 'target_metric_id': json['target_metric_id'] == null ? undefined : json['target_metric_id'],
112
+ 'target_version_id': json['target_version_id'] == null ? undefined : json['target_version_id'],
113
+ 'display_name': json['display_name'],
114
+ 'description': json['description'] == null ? undefined : json['description'],
115
+ 'source': json['source'],
116
+ 'output_type': json['output_type'],
117
+ 'unit': json['unit'] == null ? undefined : json['unit'],
118
+ 'requirements': json['requirements'] == null ? undefined : PythonMetricsAPIInputRequirementsFromJSON(json['requirements']),
119
+ };
120
+ }
121
+
122
+ export function PythonMetricsAPICreatePythonMetricDraftRequestToJSON(json: any): PythonMetricsAPICreatePythonMetricDraftRequest {
123
+ return PythonMetricsAPICreatePythonMetricDraftRequestToJSONTyped(json, false);
124
+ }
125
+
126
+ export function PythonMetricsAPICreatePythonMetricDraftRequestToJSONTyped(value?: PythonMetricsAPICreatePythonMetricDraftRequest | null, ignoreDiscriminator: boolean = false): any {
127
+ if (value == null) {
128
+ return value;
129
+ }
130
+
131
+ return {
132
+
133
+ 'target_metric_id': value['target_metric_id'],
134
+ 'target_version_id': value['target_version_id'],
135
+ 'display_name': value['display_name'],
136
+ 'description': value['description'],
137
+ 'source': value['source'],
138
+ 'output_type': value['output_type'],
139
+ 'unit': value['unit'],
140
+ 'requirements': PythonMetricsAPIInputRequirementsToJSON(value['requirements']),
141
+ };
142
+ }
143
+
@@ -0,0 +1,81 @@
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
+ /**
17
+ * Distinguish required inputs from optional, unavailable conversation data.
18
+ * @export
19
+ * @interface PythonMetricsAPIInputRequirements
20
+ */
21
+ export interface PythonMetricsAPIInputRequirements {
22
+ /**
23
+ *
24
+ * @type {boolean}
25
+ * @memberof PythonMetricsAPIInputRequirements
26
+ */
27
+ audio?: boolean;
28
+ /**
29
+ *
30
+ * @type {boolean}
31
+ * @memberof PythonMetricsAPIInputRequirements
32
+ */
33
+ traces?: boolean;
34
+ /**
35
+ *
36
+ * @type {Array<string>}
37
+ * @memberof PythonMetricsAPIInputRequirements
38
+ */
39
+ frame_tables?: Array<string>;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the PythonMetricsAPIInputRequirements interface.
44
+ */
45
+ export function instanceOfPythonMetricsAPIInputRequirements(value: object): value is PythonMetricsAPIInputRequirements {
46
+ return true;
47
+ }
48
+
49
+ export function PythonMetricsAPIInputRequirementsFromJSON(json: any): PythonMetricsAPIInputRequirements {
50
+ return PythonMetricsAPIInputRequirementsFromJSONTyped(json, false);
51
+ }
52
+
53
+ export function PythonMetricsAPIInputRequirementsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PythonMetricsAPIInputRequirements {
54
+ if (json == null) {
55
+ return json;
56
+ }
57
+ return {
58
+
59
+ 'audio': json['audio'] == null ? undefined : json['audio'],
60
+ 'traces': json['traces'] == null ? undefined : json['traces'],
61
+ 'frame_tables': json['frame_tables'] == null ? undefined : json['frame_tables'],
62
+ };
63
+ }
64
+
65
+ export function PythonMetricsAPIInputRequirementsToJSON(json: any): PythonMetricsAPIInputRequirements {
66
+ return PythonMetricsAPIInputRequirementsToJSONTyped(json, false);
67
+ }
68
+
69
+ export function PythonMetricsAPIInputRequirementsToJSONTyped(value?: PythonMetricsAPIInputRequirements | null, ignoreDiscriminator: boolean = false): any {
70
+ if (value == null) {
71
+ return value;
72
+ }
73
+
74
+ return {
75
+
76
+ 'audio': value['audio'],
77
+ 'traces': value['traces'],
78
+ 'frame_tables': value['frame_tables'],
79
+ };
80
+ }
81
+
@@ -0,0 +1,66 @@
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
+ /**
17
+ *
18
+ * @export
19
+ * @interface PythonMetricsAPIPreviewPythonMetricBody
20
+ */
21
+ export interface PythonMetricsAPIPreviewPythonMetricBody {
22
+ /**
23
+ * Historical simulation or uploaded-conversation IDs to evaluate.
24
+ * @type {Array<string>}
25
+ * @memberof PythonMetricsAPIPreviewPythonMetricBody
26
+ */
27
+ simulation_output_ids: Array<string>;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the PythonMetricsAPIPreviewPythonMetricBody interface.
32
+ */
33
+ export function instanceOfPythonMetricsAPIPreviewPythonMetricBody(value: object): value is PythonMetricsAPIPreviewPythonMetricBody {
34
+ if (!('simulation_output_ids' in value) || value['simulation_output_ids'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function PythonMetricsAPIPreviewPythonMetricBodyFromJSON(json: any): PythonMetricsAPIPreviewPythonMetricBody {
39
+ return PythonMetricsAPIPreviewPythonMetricBodyFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function PythonMetricsAPIPreviewPythonMetricBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): PythonMetricsAPIPreviewPythonMetricBody {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'simulation_output_ids': json['simulation_output_ids'],
49
+ };
50
+ }
51
+
52
+ export function PythonMetricsAPIPreviewPythonMetricBodyToJSON(json: any): PythonMetricsAPIPreviewPythonMetricBody {
53
+ return PythonMetricsAPIPreviewPythonMetricBodyToJSONTyped(json, false);
54
+ }
55
+
56
+ export function PythonMetricsAPIPreviewPythonMetricBodyToJSONTyped(value?: PythonMetricsAPIPreviewPythonMetricBody | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'simulation_output_ids': value['simulation_output_ids'],
64
+ };
65
+ }
66
+
@@ -0,0 +1,75 @@
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
+ /**
17
+ *
18
+ * @export
19
+ * @interface PythonMetricsAPIPublishPythonMetricBody
20
+ */
21
+ export interface PythonMetricsAPIPublishPythonMetricBody {
22
+ /**
23
+ * Successful previews of this exact draft to approve for publication.
24
+ * @type {Array<string>}
25
+ * @memberof PythonMetricsAPIPublishPythonMetricBody
26
+ */
27
+ preview_ids: Array<string>;
28
+ /**
29
+ * Fingerprint of the source and configuration the user approved.
30
+ * @type {string}
31
+ * @memberof PythonMetricsAPIPublishPythonMetricBody
32
+ */
33
+ fingerprint: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the PythonMetricsAPIPublishPythonMetricBody interface.
38
+ */
39
+ export function instanceOfPythonMetricsAPIPublishPythonMetricBody(value: object): value is PythonMetricsAPIPublishPythonMetricBody {
40
+ if (!('preview_ids' in value) || value['preview_ids'] === undefined) return false;
41
+ if (!('fingerprint' in value) || value['fingerprint'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function PythonMetricsAPIPublishPythonMetricBodyFromJSON(json: any): PythonMetricsAPIPublishPythonMetricBody {
46
+ return PythonMetricsAPIPublishPythonMetricBodyFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function PythonMetricsAPIPublishPythonMetricBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): PythonMetricsAPIPublishPythonMetricBody {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'preview_ids': json['preview_ids'],
56
+ 'fingerprint': json['fingerprint'],
57
+ };
58
+ }
59
+
60
+ export function PythonMetricsAPIPublishPythonMetricBodyToJSON(json: any): PythonMetricsAPIPublishPythonMetricBody {
61
+ return PythonMetricsAPIPublishPythonMetricBodyToJSONTyped(json, false);
62
+ }
63
+
64
+ export function PythonMetricsAPIPublishPythonMetricBodyToJSONTyped(value?: PythonMetricsAPIPublishPythonMetricBody | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'preview_ids': value['preview_ids'],
72
+ 'fingerprint': value['fingerprint'],
73
+ };
74
+ }
75
+
@@ -0,0 +1,75 @@
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
+ /**
17
+ *
18
+ * @export
19
+ * @interface PythonMetricsAPIPublishPythonMetricResponse
20
+ */
21
+ export interface PythonMetricsAPIPublishPythonMetricResponse {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof PythonMetricsAPIPublishPythonMetricResponse
26
+ */
27
+ metric_id: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof PythonMetricsAPIPublishPythonMetricResponse
32
+ */
33
+ version_id: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the PythonMetricsAPIPublishPythonMetricResponse interface.
38
+ */
39
+ export function instanceOfPythonMetricsAPIPublishPythonMetricResponse(value: object): value is PythonMetricsAPIPublishPythonMetricResponse {
40
+ if (!('metric_id' in value) || value['metric_id'] === undefined) return false;
41
+ if (!('version_id' in value) || value['version_id'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function PythonMetricsAPIPublishPythonMetricResponseFromJSON(json: any): PythonMetricsAPIPublishPythonMetricResponse {
46
+ return PythonMetricsAPIPublishPythonMetricResponseFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function PythonMetricsAPIPublishPythonMetricResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PythonMetricsAPIPublishPythonMetricResponse {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'metric_id': json['metric_id'],
56
+ 'version_id': json['version_id'],
57
+ };
58
+ }
59
+
60
+ export function PythonMetricsAPIPublishPythonMetricResponseToJSON(json: any): PythonMetricsAPIPublishPythonMetricResponse {
61
+ return PythonMetricsAPIPublishPythonMetricResponseToJSONTyped(json, false);
62
+ }
63
+
64
+ export function PythonMetricsAPIPublishPythonMetricResponseToJSONTyped(value?: PythonMetricsAPIPublishPythonMetricResponse | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'metric_id': value['metric_id'],
72
+ 'version_id': value['version_id'],
73
+ };
74
+ }
75
+