@roarkanalytics/sdk 2.24.0 → 2.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/client.d.mts +8 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -2
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +7 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +3 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -1
- package/resources/index.mjs.map +1 -1
- package/resources/metric-collection-job.d.mts +237 -0
- package/resources/metric-collection-job.d.mts.map +1 -0
- package/resources/metric-collection-job.d.ts +237 -0
- package/resources/metric-collection-job.d.ts.map +1 -0
- package/resources/metric-collection-job.js +29 -0
- package/resources/metric-collection-job.js.map +1 -0
- package/resources/metric-collection-job.mjs +25 -0
- package/resources/metric-collection-job.mjs.map +1 -0
- package/resources/metric-policy.d.mts +502 -0
- package/resources/metric-policy.d.mts.map +1 -0
- package/resources/metric-policy.d.ts +502 -0
- package/resources/metric-policy.d.ts.map +1 -0
- package/resources/metric-policy.js +76 -0
- package/resources/metric-policy.js.map +1 -0
- package/resources/metric-policy.mjs +72 -0
- package/resources/metric-policy.mjs.map +1 -0
- package/resources/metric.d.mts +187 -1
- package/resources/metric.d.mts.map +1 -1
- package/resources/metric.d.ts +187 -1
- package/resources/metric.d.ts.map +1 -1
- package/resources/metric.js +21 -0
- package/resources/metric.js.map +1 -1
- package/resources/metric.mjs +21 -0
- package/resources/metric.mjs.map +1 -1
- package/resources/simulation-job.d.mts +34 -2
- package/resources/simulation-job.d.mts.map +1 -1
- package/resources/simulation-job.d.ts +34 -2
- package/resources/simulation-job.d.ts.map +1 -1
- package/resources/simulation-persona.d.mts +102 -6
- package/resources/simulation-persona.d.mts.map +1 -1
- package/resources/simulation-persona.d.ts +102 -6
- package/resources/simulation-persona.d.ts.map +1 -1
- package/resources/simulation-run-plan-job.d.mts +24 -7
- package/resources/simulation-run-plan-job.d.mts.map +1 -1
- package/resources/simulation-run-plan-job.d.ts +24 -7
- package/resources/simulation-run-plan-job.d.ts.map +1 -1
- package/resources/simulation-run-plan.d.mts +31 -1
- package/resources/simulation-run-plan.d.mts.map +1 -1
- package/resources/simulation-run-plan.d.ts +31 -1
- package/resources/simulation-run-plan.d.ts.map +1 -1
- package/resources/webhook.d.mts +4 -4
- package/resources/webhook.d.mts.map +1 -1
- package/resources/webhook.d.ts +4 -4
- package/resources/webhook.d.ts.map +1 -1
- package/src/client.ts +56 -2
- package/src/resources/index.ts +25 -1
- package/src/resources/metric-collection-job.ts +307 -0
- package/src/resources/metric-policy.ts +679 -0
- package/src/resources/metric.ts +232 -1
- package/src/resources/simulation-job.ts +42 -2
- package/src/resources/simulation-persona.ts +126 -6
- package/src/resources/simulation-run-plan-job.ts +32 -6
- package/src/resources/simulation-run-plan.ts +38 -1
- package/src/resources/webhook.ts +4 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/resources/metric.d.mts
CHANGED
|
@@ -2,13 +2,92 @@ import { APIResource } from "../core/resource.mjs";
|
|
|
2
2
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
3
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
4
|
export declare class Metric extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Create a new custom metric definition. The metric will be added to the specified
|
|
7
|
+
* analysis package and can be used for evaluating calls.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const response = await client.metric.createDefinition({
|
|
12
|
+
* analysisPackageId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
13
|
+
* name: 'Customer Satisfaction',
|
|
14
|
+
* outputType: 'BOOLEAN',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
createDefinition(body: MetricCreateDefinitionParams, options?: RequestOptions): APIPromise<MetricCreateDefinitionResponse>;
|
|
5
19
|
/**
|
|
6
20
|
* Fetch all metric definitions available in the project, including both
|
|
7
21
|
* system-generated and custom metrics. Only returns metrics from enabled analysis
|
|
8
22
|
* packages.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const response = await client.metric.listDefinitions();
|
|
27
|
+
* ```
|
|
9
28
|
*/
|
|
10
29
|
listDefinitions(options?: RequestOptions): APIPromise<MetricListDefinitionsResponse>;
|
|
11
30
|
}
|
|
31
|
+
export interface MetricCreateDefinitionResponse {
|
|
32
|
+
/**
|
|
33
|
+
* Metric definition data
|
|
34
|
+
*/
|
|
35
|
+
data: MetricCreateDefinitionResponse.Data;
|
|
36
|
+
}
|
|
37
|
+
export declare namespace MetricCreateDefinitionResponse {
|
|
38
|
+
/**
|
|
39
|
+
* Metric definition data
|
|
40
|
+
*/
|
|
41
|
+
interface Data {
|
|
42
|
+
/**
|
|
43
|
+
* Unique identifier for the metric definition
|
|
44
|
+
*/
|
|
45
|
+
id: string;
|
|
46
|
+
/**
|
|
47
|
+
* Description of what the metric measures
|
|
48
|
+
*/
|
|
49
|
+
description: string;
|
|
50
|
+
/**
|
|
51
|
+
* Stable metric identifier (e.g. "call_reason", "customer_satisfaction")
|
|
52
|
+
*/
|
|
53
|
+
metricId: string;
|
|
54
|
+
/**
|
|
55
|
+
* Name of the metric
|
|
56
|
+
*/
|
|
57
|
+
name: string;
|
|
58
|
+
/**
|
|
59
|
+
* Whether metric is global or per-participant
|
|
60
|
+
*/
|
|
61
|
+
scope: 'GLOBAL' | 'PER_PARTICIPANT';
|
|
62
|
+
/**
|
|
63
|
+
* Which levels this metric can produce values at
|
|
64
|
+
*/
|
|
65
|
+
supportedContexts: Array<'CALL' | 'SEGMENT' | 'TURN'>;
|
|
66
|
+
/**
|
|
67
|
+
* Type of value this metric produces
|
|
68
|
+
*/
|
|
69
|
+
type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET';
|
|
70
|
+
/**
|
|
71
|
+
* Unit information if applicable
|
|
72
|
+
*/
|
|
73
|
+
unit?: Data.Unit;
|
|
74
|
+
}
|
|
75
|
+
namespace Data {
|
|
76
|
+
/**
|
|
77
|
+
* Unit information if applicable
|
|
78
|
+
*/
|
|
79
|
+
interface Unit {
|
|
80
|
+
/**
|
|
81
|
+
* Name of the unit
|
|
82
|
+
*/
|
|
83
|
+
name: string;
|
|
84
|
+
/**
|
|
85
|
+
* Symbol for the unit
|
|
86
|
+
*/
|
|
87
|
+
symbol: string | null;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
12
91
|
export interface MetricListDefinitionsResponse {
|
|
13
92
|
/**
|
|
14
93
|
* Metrics response payload
|
|
@@ -69,7 +148,114 @@ export declare namespace MetricListDefinitionsResponse {
|
|
|
69
148
|
}
|
|
70
149
|
}
|
|
71
150
|
}
|
|
151
|
+
export interface MetricCreateDefinitionParams {
|
|
152
|
+
/**
|
|
153
|
+
* ID of the analysis package to add this metric to
|
|
154
|
+
*/
|
|
155
|
+
analysisPackageId: string;
|
|
156
|
+
/**
|
|
157
|
+
* Name of the metric
|
|
158
|
+
*/
|
|
159
|
+
name: string;
|
|
160
|
+
/**
|
|
161
|
+
* Type of value this metric produces
|
|
162
|
+
*/
|
|
163
|
+
outputType: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET';
|
|
164
|
+
/**
|
|
165
|
+
* Label for the false/negative case (only for BOOLEAN type)
|
|
166
|
+
*/
|
|
167
|
+
booleanFalseLabel?: string;
|
|
168
|
+
/**
|
|
169
|
+
* Label for the true/positive case (only for BOOLEAN type)
|
|
170
|
+
*/
|
|
171
|
+
booleanTrueLabel?: string;
|
|
172
|
+
/**
|
|
173
|
+
* Options for classification. Required for CLASSIFICATION type.
|
|
174
|
+
*/
|
|
175
|
+
classificationOptions?: Array<MetricCreateDefinitionParams.ClassificationOption>;
|
|
176
|
+
/**
|
|
177
|
+
* LLM prompt/criteria for evaluating this metric. Used to instruct the model on
|
|
178
|
+
* how to score. Required for BOOLEAN, NUMERIC, TEXT, and SCALE types.
|
|
179
|
+
*/
|
|
180
|
+
llmPrompt?: string;
|
|
181
|
+
/**
|
|
182
|
+
* Maximum number of classifications that can be selected (only for CLASSIFICATION
|
|
183
|
+
* type)
|
|
184
|
+
*/
|
|
185
|
+
maxClassifications?: number;
|
|
186
|
+
/**
|
|
187
|
+
* Unique identifier for the metric (e.g. "customer_satisfaction"). Auto-generated
|
|
188
|
+
* from name if not provided.
|
|
189
|
+
*/
|
|
190
|
+
metricId?: string;
|
|
191
|
+
/**
|
|
192
|
+
* Participant role to evaluate. Required when scope is PER_PARTICIPANT.
|
|
193
|
+
*/
|
|
194
|
+
participantRole?: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER';
|
|
195
|
+
/**
|
|
196
|
+
* Labels for scale ranges (only for SCALE type)
|
|
197
|
+
*/
|
|
198
|
+
scaleLabels?: Array<MetricCreateDefinitionParams.ScaleLabel>;
|
|
199
|
+
/**
|
|
200
|
+
* Maximum value for scale. Required for SCALE type.
|
|
201
|
+
*/
|
|
202
|
+
scaleMax?: number;
|
|
203
|
+
/**
|
|
204
|
+
* Minimum value for scale. Required for SCALE type.
|
|
205
|
+
*/
|
|
206
|
+
scaleMin?: number;
|
|
207
|
+
/**
|
|
208
|
+
* Whether metric is global or per-participant (default: GLOBAL)
|
|
209
|
+
*/
|
|
210
|
+
scope?: 'GLOBAL' | 'PER_PARTICIPANT';
|
|
211
|
+
/**
|
|
212
|
+
* Which levels this metric can produce values at (default: ["CALL"])
|
|
213
|
+
*/
|
|
214
|
+
supportedContexts?: Array<'CALL' | 'SEGMENT' | 'TURN'>;
|
|
215
|
+
}
|
|
216
|
+
export declare namespace MetricCreateDefinitionParams {
|
|
217
|
+
interface ClassificationOption {
|
|
218
|
+
/**
|
|
219
|
+
* Description of what this option means
|
|
220
|
+
*/
|
|
221
|
+
description: string;
|
|
222
|
+
/**
|
|
223
|
+
* Display order of this option
|
|
224
|
+
*/
|
|
225
|
+
displayOrder: number;
|
|
226
|
+
/**
|
|
227
|
+
* Label for this classification option
|
|
228
|
+
*/
|
|
229
|
+
label: string;
|
|
230
|
+
}
|
|
231
|
+
interface ScaleLabel {
|
|
232
|
+
/**
|
|
233
|
+
* Display order of this label
|
|
234
|
+
*/
|
|
235
|
+
displayOrder: number;
|
|
236
|
+
/**
|
|
237
|
+
* Label for this range
|
|
238
|
+
*/
|
|
239
|
+
label: string;
|
|
240
|
+
/**
|
|
241
|
+
* Maximum value for this label range
|
|
242
|
+
*/
|
|
243
|
+
rangeMax: number;
|
|
244
|
+
/**
|
|
245
|
+
* Minimum value for this label range
|
|
246
|
+
*/
|
|
247
|
+
rangeMin: number;
|
|
248
|
+
/**
|
|
249
|
+
* Hex color code for this label (e.g. "#FF0000")
|
|
250
|
+
*/
|
|
251
|
+
colorHex?: string;
|
|
252
|
+
/**
|
|
253
|
+
* Description of what this range means
|
|
254
|
+
*/
|
|
255
|
+
description?: string;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
72
258
|
export declare namespace Metric {
|
|
73
|
-
export { type MetricListDefinitionsResponse as MetricListDefinitionsResponse };
|
|
259
|
+
export { type MetricCreateDefinitionResponse as MetricCreateDefinitionResponse, type MetricListDefinitionsResponse as MetricListDefinitionsResponse, type MetricCreateDefinitionParams as MetricCreateDefinitionParams, };
|
|
74
260
|
}
|
|
75
261
|
//# sourceMappingURL=metric.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metric.d.mts","sourceRoot":"","sources":["../src/resources/metric.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"metric.d.mts","sourceRoot":"","sources":["../src/resources/metric.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;OAYG;IACH,gBAAgB,CACd,IAAI,EAAE,4BAA4B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,8BAA8B,CAAC;IAI7C;;;;;;;;;OASG;IACH,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,6BAA6B,CAAC;CAGrF;AAED,MAAM,WAAW,8BAA8B;IAC7C;;OAEG;IACH,IAAI,EAAE,8BAA8B,CAAC,IAAI,CAAC;CAC3C;AAED,yBAAiB,8BAA8B,CAAC;IAC9C;;OAEG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,WAAW,EAAE,MAAM,CAAC;QAEpB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,KAAK,EAAE,QAAQ,GAAG,iBAAiB,CAAC;QAEpC;;WAEG;QACH,iBAAiB,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC,CAAC;QAEtD;;WAEG;QACH,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,gBAAgB,GAAG,QAAQ,CAAC;QAEvF;;WAEG;QACH,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC;KAClB;IAED,UAAiB,IAAI,CAAC;QACpB;;WA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AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;CACH"}
|
package/resources/metric.d.ts
CHANGED
|
@@ -2,13 +2,92 @@ import { APIResource } from "../core/resource.js";
|
|
|
2
2
|
import { APIPromise } from "../core/api-promise.js";
|
|
3
3
|
import { RequestOptions } from "../internal/request-options.js";
|
|
4
4
|
export declare class Metric extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Create a new custom metric definition. The metric will be added to the specified
|
|
7
|
+
* analysis package and can be used for evaluating calls.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const response = await client.metric.createDefinition({
|
|
12
|
+
* analysisPackageId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
13
|
+
* name: 'Customer Satisfaction',
|
|
14
|
+
* outputType: 'BOOLEAN',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
createDefinition(body: MetricCreateDefinitionParams, options?: RequestOptions): APIPromise<MetricCreateDefinitionResponse>;
|
|
5
19
|
/**
|
|
6
20
|
* Fetch all metric definitions available in the project, including both
|
|
7
21
|
* system-generated and custom metrics. Only returns metrics from enabled analysis
|
|
8
22
|
* packages.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const response = await client.metric.listDefinitions();
|
|
27
|
+
* ```
|
|
9
28
|
*/
|
|
10
29
|
listDefinitions(options?: RequestOptions): APIPromise<MetricListDefinitionsResponse>;
|
|
11
30
|
}
|
|
31
|
+
export interface MetricCreateDefinitionResponse {
|
|
32
|
+
/**
|
|
33
|
+
* Metric definition data
|
|
34
|
+
*/
|
|
35
|
+
data: MetricCreateDefinitionResponse.Data;
|
|
36
|
+
}
|
|
37
|
+
export declare namespace MetricCreateDefinitionResponse {
|
|
38
|
+
/**
|
|
39
|
+
* Metric definition data
|
|
40
|
+
*/
|
|
41
|
+
interface Data {
|
|
42
|
+
/**
|
|
43
|
+
* Unique identifier for the metric definition
|
|
44
|
+
*/
|
|
45
|
+
id: string;
|
|
46
|
+
/**
|
|
47
|
+
* Description of what the metric measures
|
|
48
|
+
*/
|
|
49
|
+
description: string;
|
|
50
|
+
/**
|
|
51
|
+
* Stable metric identifier (e.g. "call_reason", "customer_satisfaction")
|
|
52
|
+
*/
|
|
53
|
+
metricId: string;
|
|
54
|
+
/**
|
|
55
|
+
* Name of the metric
|
|
56
|
+
*/
|
|
57
|
+
name: string;
|
|
58
|
+
/**
|
|
59
|
+
* Whether metric is global or per-participant
|
|
60
|
+
*/
|
|
61
|
+
scope: 'GLOBAL' | 'PER_PARTICIPANT';
|
|
62
|
+
/**
|
|
63
|
+
* Which levels this metric can produce values at
|
|
64
|
+
*/
|
|
65
|
+
supportedContexts: Array<'CALL' | 'SEGMENT' | 'TURN'>;
|
|
66
|
+
/**
|
|
67
|
+
* Type of value this metric produces
|
|
68
|
+
*/
|
|
69
|
+
type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET';
|
|
70
|
+
/**
|
|
71
|
+
* Unit information if applicable
|
|
72
|
+
*/
|
|
73
|
+
unit?: Data.Unit;
|
|
74
|
+
}
|
|
75
|
+
namespace Data {
|
|
76
|
+
/**
|
|
77
|
+
* Unit information if applicable
|
|
78
|
+
*/
|
|
79
|
+
interface Unit {
|
|
80
|
+
/**
|
|
81
|
+
* Name of the unit
|
|
82
|
+
*/
|
|
83
|
+
name: string;
|
|
84
|
+
/**
|
|
85
|
+
* Symbol for the unit
|
|
86
|
+
*/
|
|
87
|
+
symbol: string | null;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
12
91
|
export interface MetricListDefinitionsResponse {
|
|
13
92
|
/**
|
|
14
93
|
* Metrics response payload
|
|
@@ -69,7 +148,114 @@ export declare namespace MetricListDefinitionsResponse {
|
|
|
69
148
|
}
|
|
70
149
|
}
|
|
71
150
|
}
|
|
151
|
+
export interface MetricCreateDefinitionParams {
|
|
152
|
+
/**
|
|
153
|
+
* ID of the analysis package to add this metric to
|
|
154
|
+
*/
|
|
155
|
+
analysisPackageId: string;
|
|
156
|
+
/**
|
|
157
|
+
* Name of the metric
|
|
158
|
+
*/
|
|
159
|
+
name: string;
|
|
160
|
+
/**
|
|
161
|
+
* Type of value this metric produces
|
|
162
|
+
*/
|
|
163
|
+
outputType: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET';
|
|
164
|
+
/**
|
|
165
|
+
* Label for the false/negative case (only for BOOLEAN type)
|
|
166
|
+
*/
|
|
167
|
+
booleanFalseLabel?: string;
|
|
168
|
+
/**
|
|
169
|
+
* Label for the true/positive case (only for BOOLEAN type)
|
|
170
|
+
*/
|
|
171
|
+
booleanTrueLabel?: string;
|
|
172
|
+
/**
|
|
173
|
+
* Options for classification. Required for CLASSIFICATION type.
|
|
174
|
+
*/
|
|
175
|
+
classificationOptions?: Array<MetricCreateDefinitionParams.ClassificationOption>;
|
|
176
|
+
/**
|
|
177
|
+
* LLM prompt/criteria for evaluating this metric. Used to instruct the model on
|
|
178
|
+
* how to score. Required for BOOLEAN, NUMERIC, TEXT, and SCALE types.
|
|
179
|
+
*/
|
|
180
|
+
llmPrompt?: string;
|
|
181
|
+
/**
|
|
182
|
+
* Maximum number of classifications that can be selected (only for CLASSIFICATION
|
|
183
|
+
* type)
|
|
184
|
+
*/
|
|
185
|
+
maxClassifications?: number;
|
|
186
|
+
/**
|
|
187
|
+
* Unique identifier for the metric (e.g. "customer_satisfaction"). Auto-generated
|
|
188
|
+
* from name if not provided.
|
|
189
|
+
*/
|
|
190
|
+
metricId?: string;
|
|
191
|
+
/**
|
|
192
|
+
* Participant role to evaluate. Required when scope is PER_PARTICIPANT.
|
|
193
|
+
*/
|
|
194
|
+
participantRole?: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER';
|
|
195
|
+
/**
|
|
196
|
+
* Labels for scale ranges (only for SCALE type)
|
|
197
|
+
*/
|
|
198
|
+
scaleLabels?: Array<MetricCreateDefinitionParams.ScaleLabel>;
|
|
199
|
+
/**
|
|
200
|
+
* Maximum value for scale. Required for SCALE type.
|
|
201
|
+
*/
|
|
202
|
+
scaleMax?: number;
|
|
203
|
+
/**
|
|
204
|
+
* Minimum value for scale. Required for SCALE type.
|
|
205
|
+
*/
|
|
206
|
+
scaleMin?: number;
|
|
207
|
+
/**
|
|
208
|
+
* Whether metric is global or per-participant (default: GLOBAL)
|
|
209
|
+
*/
|
|
210
|
+
scope?: 'GLOBAL' | 'PER_PARTICIPANT';
|
|
211
|
+
/**
|
|
212
|
+
* Which levels this metric can produce values at (default: ["CALL"])
|
|
213
|
+
*/
|
|
214
|
+
supportedContexts?: Array<'CALL' | 'SEGMENT' | 'TURN'>;
|
|
215
|
+
}
|
|
216
|
+
export declare namespace MetricCreateDefinitionParams {
|
|
217
|
+
interface ClassificationOption {
|
|
218
|
+
/**
|
|
219
|
+
* Description of what this option means
|
|
220
|
+
*/
|
|
221
|
+
description: string;
|
|
222
|
+
/**
|
|
223
|
+
* Display order of this option
|
|
224
|
+
*/
|
|
225
|
+
displayOrder: number;
|
|
226
|
+
/**
|
|
227
|
+
* Label for this classification option
|
|
228
|
+
*/
|
|
229
|
+
label: string;
|
|
230
|
+
}
|
|
231
|
+
interface ScaleLabel {
|
|
232
|
+
/**
|
|
233
|
+
* Display order of this label
|
|
234
|
+
*/
|
|
235
|
+
displayOrder: number;
|
|
236
|
+
/**
|
|
237
|
+
* Label for this range
|
|
238
|
+
*/
|
|
239
|
+
label: string;
|
|
240
|
+
/**
|
|
241
|
+
* Maximum value for this label range
|
|
242
|
+
*/
|
|
243
|
+
rangeMax: number;
|
|
244
|
+
/**
|
|
245
|
+
* Minimum value for this label range
|
|
246
|
+
*/
|
|
247
|
+
rangeMin: number;
|
|
248
|
+
/**
|
|
249
|
+
* Hex color code for this label (e.g. "#FF0000")
|
|
250
|
+
*/
|
|
251
|
+
colorHex?: string;
|
|
252
|
+
/**
|
|
253
|
+
* Description of what this range means
|
|
254
|
+
*/
|
|
255
|
+
description?: string;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
72
258
|
export declare namespace Metric {
|
|
73
|
-
export { type MetricListDefinitionsResponse as MetricListDefinitionsResponse };
|
|
259
|
+
export { type MetricCreateDefinitionResponse as MetricCreateDefinitionResponse, type MetricListDefinitionsResponse as MetricListDefinitionsResponse, type MetricCreateDefinitionParams as MetricCreateDefinitionParams, };
|
|
74
260
|
}
|
|
75
261
|
//# sourceMappingURL=metric.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metric.d.ts","sourceRoot":"","sources":["../src/resources/metric.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"metric.d.ts","sourceRoot":"","sources":["../src/resources/metric.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;OAYG;IACH,gBAAgB,CACd,IAAI,EAAE,4BAA4B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,8BAA8B,CAAC;IAI7C;;;;;;;;;OASG;IACH,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,6BAA6B,CAAC;CAGrF;AAED,MAAM,WAAW,8BAA8B;IAC7C;;OAEG;IACH,IAAI,EAAE,8BAA8B,CAAC,IAAI,C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,QAAQ,GAAG,iBAAiB,CAAC;IAErC;;OAEG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC,CAAC;CACxD;AAED,yBAAiB,4BAA4B,CAAC;IAC5C,UAAiB,oBAAoB;QACnC;;WAEG;QACH,WAAW,EAAE,MAAM,CAAC;QAEpB;;WAEG;QACH,YAAY,EAAE,MAAM,CAAC;QAErB;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;KACf;IAED,UAAiB,UAAU;QACzB;;WAEG;QACH,YAAY,EAAE,MAAM,CAAC;QAErB;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;CACH"}
|
package/resources/metric.js
CHANGED
|
@@ -4,10 +4,31 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.Metric = void 0;
|
|
5
5
|
const resource_1 = require("../core/resource.js");
|
|
6
6
|
class Metric extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Create a new custom metric definition. The metric will be added to the specified
|
|
9
|
+
* analysis package and can be used for evaluating calls.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const response = await client.metric.createDefinition({
|
|
14
|
+
* analysisPackageId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
15
|
+
* name: 'Customer Satisfaction',
|
|
16
|
+
* outputType: 'BOOLEAN',
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
createDefinition(body, options) {
|
|
21
|
+
return this._client.post('/v1/metric/definitions', { body, ...options });
|
|
22
|
+
}
|
|
7
23
|
/**
|
|
8
24
|
* Fetch all metric definitions available in the project, including both
|
|
9
25
|
* system-generated and custom metrics. Only returns metrics from enabled analysis
|
|
10
26
|
* packages.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const response = await client.metric.listDefinitions();
|
|
31
|
+
* ```
|
|
11
32
|
*/
|
|
12
33
|
listDefinitions(options) {
|
|
13
34
|
return this._client.get('/v1/metric/definitions', options);
|
package/resources/metric.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metric.js","sourceRoot":"","sources":["../src/resources/metric.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,MAAO,SAAQ,sBAAW;IACrC
|
|
1
|
+
{"version":3,"file":"metric.js","sourceRoot":"","sources":["../src/resources/metric.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;;;;;;OAYG;IACH,gBAAgB,CACd,IAAkC,EAClC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;;OASG;IACH,eAAe,CAAC,OAAwB;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;CACF;AAlCD,wBAkCC"}
|
package/resources/metric.mjs
CHANGED
|
@@ -1,10 +1,31 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../core/resource.mjs";
|
|
3
3
|
export class Metric extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Create a new custom metric definition. The metric will be added to the specified
|
|
6
|
+
* analysis package and can be used for evaluating calls.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const response = await client.metric.createDefinition({
|
|
11
|
+
* analysisPackageId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
12
|
+
* name: 'Customer Satisfaction',
|
|
13
|
+
* outputType: 'BOOLEAN',
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
createDefinition(body, options) {
|
|
18
|
+
return this._client.post('/v1/metric/definitions', { body, ...options });
|
|
19
|
+
}
|
|
4
20
|
/**
|
|
5
21
|
* Fetch all metric definitions available in the project, including both
|
|
6
22
|
* system-generated and custom metrics. Only returns metrics from enabled analysis
|
|
7
23
|
* packages.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const response = await client.metric.listDefinitions();
|
|
28
|
+
* ```
|
|
8
29
|
*/
|
|
9
30
|
listDefinitions(options) {
|
|
10
31
|
return this._client.get('/v1/metric/definitions', options);
|
package/resources/metric.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metric.mjs","sourceRoot":"","sources":["../src/resources/metric.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC
|
|
1
|
+
{"version":3,"file":"metric.mjs","sourceRoot":"","sources":["../src/resources/metric.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;OAYG;IACH,gBAAgB,CACd,IAAkC,EAClC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;;OASG;IACH,eAAe,CAAC,OAAwB;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;CACF"}
|
|
@@ -133,11 +133,27 @@ export declare namespace SimulationJobGetByIDResponse {
|
|
|
133
133
|
/**
|
|
134
134
|
* Gender of the persona
|
|
135
135
|
*/
|
|
136
|
-
gender: 'MALE' | 'FEMALE'
|
|
136
|
+
gender: 'MALE' | 'FEMALE';
|
|
137
137
|
/**
|
|
138
138
|
* Whether the persona uses filler words like "um" and "uh"
|
|
139
139
|
*/
|
|
140
140
|
hasDisfluencies: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Maximum number of idle messages the persona will send before giving up
|
|
143
|
+
*/
|
|
144
|
+
idleMessageMaxSpokenCount: number;
|
|
145
|
+
/**
|
|
146
|
+
* Whether the idle message counter resets when the agent speaks
|
|
147
|
+
*/
|
|
148
|
+
idleMessageResetCountOnUserSpeechEnabled: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* Messages the persona will say when the agent goes silent during a call
|
|
151
|
+
*/
|
|
152
|
+
idleMessages: Array<string>;
|
|
153
|
+
/**
|
|
154
|
+
* Seconds of silence before the persona sends an idle message
|
|
155
|
+
*/
|
|
156
|
+
idleTimeoutSeconds: number;
|
|
141
157
|
/**
|
|
142
158
|
* How clearly the persona expresses their intentions
|
|
143
159
|
*/
|
|
@@ -311,11 +327,27 @@ export declare namespace SimulationJobLookupResponse {
|
|
|
311
327
|
/**
|
|
312
328
|
* Gender of the persona
|
|
313
329
|
*/
|
|
314
|
-
gender: 'MALE' | 'FEMALE'
|
|
330
|
+
gender: 'MALE' | 'FEMALE';
|
|
315
331
|
/**
|
|
316
332
|
* Whether the persona uses filler words like "um" and "uh"
|
|
317
333
|
*/
|
|
318
334
|
hasDisfluencies: boolean;
|
|
335
|
+
/**
|
|
336
|
+
* Maximum number of idle messages the persona will send before giving up
|
|
337
|
+
*/
|
|
338
|
+
idleMessageMaxSpokenCount: number;
|
|
339
|
+
/**
|
|
340
|
+
* Whether the idle message counter resets when the agent speaks
|
|
341
|
+
*/
|
|
342
|
+
idleMessageResetCountOnUserSpeechEnabled: boolean;
|
|
343
|
+
/**
|
|
344
|
+
* Messages the persona will say when the agent goes silent during a call
|
|
345
|
+
*/
|
|
346
|
+
idleMessages: Array<string>;
|
|
347
|
+
/**
|
|
348
|
+
* Seconds of silence before the persona sends an idle message
|
|
349
|
+
*/
|
|
350
|
+
idleTimeoutSeconds: number;
|
|
319
351
|
/**
|
|
320
352
|
* How clearly the persona expresses their intentions
|
|
321
353
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simulation-job.d.mts","sourceRoot":"","sources":["../src/resources/simulation-job.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;OAUG;IACH,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,4BAA4B,CAAC;IAI3F;;;;;;;;;;OAUG;IACH,MAAM,CACJ,KAAK,EAAE,yBAAyB,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,2BAA2B,CAAC;CAG3C;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,IAAI,EAAE,4BAA4B,CAAC,IAAI,CAAC;CACzC;AAED,yBAAiB,4BAA4B,CAAC;IAC5C;;OAEG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,aAAa,EAAE,IAAI,CAAC,aAAa,CAAC;QAElC;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB,OAAO,EAAE,IAAI,CA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AC;YAE5B;;eAEG;YACH,iBAAiB,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;SACjC;QAED;;WAEG;QACH,UAAiB,QAAQ;YACvB;;eAEG;YACH,EAAE,EAAE,MAAM,CAAC;YAEX;;eAEG;YACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;SAC7B;KACF;CACF;AAED,MAAM,WAAW,yBAAyB;IACxC;;;;OAIG;IACH,gBAAgB,EAAE,OAAO,CAAC;IAE1B;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -133,11 +133,27 @@ export declare namespace SimulationJobGetByIDResponse {
|
|
|
133
133
|
/**
|
|
134
134
|
* Gender of the persona
|
|
135
135
|
*/
|
|
136
|
-
gender: 'MALE' | 'FEMALE'
|
|
136
|
+
gender: 'MALE' | 'FEMALE';
|
|
137
137
|
/**
|
|
138
138
|
* Whether the persona uses filler words like "um" and "uh"
|
|
139
139
|
*/
|
|
140
140
|
hasDisfluencies: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Maximum number of idle messages the persona will send before giving up
|
|
143
|
+
*/
|
|
144
|
+
idleMessageMaxSpokenCount: number;
|
|
145
|
+
/**
|
|
146
|
+
* Whether the idle message counter resets when the agent speaks
|
|
147
|
+
*/
|
|
148
|
+
idleMessageResetCountOnUserSpeechEnabled: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* Messages the persona will say when the agent goes silent during a call
|
|
151
|
+
*/
|
|
152
|
+
idleMessages: Array<string>;
|
|
153
|
+
/**
|
|
154
|
+
* Seconds of silence before the persona sends an idle message
|
|
155
|
+
*/
|
|
156
|
+
idleTimeoutSeconds: number;
|
|
141
157
|
/**
|
|
142
158
|
* How clearly the persona expresses their intentions
|
|
143
159
|
*/
|
|
@@ -311,11 +327,27 @@ export declare namespace SimulationJobLookupResponse {
|
|
|
311
327
|
/**
|
|
312
328
|
* Gender of the persona
|
|
313
329
|
*/
|
|
314
|
-
gender: 'MALE' | 'FEMALE'
|
|
330
|
+
gender: 'MALE' | 'FEMALE';
|
|
315
331
|
/**
|
|
316
332
|
* Whether the persona uses filler words like "um" and "uh"
|
|
317
333
|
*/
|
|
318
334
|
hasDisfluencies: boolean;
|
|
335
|
+
/**
|
|
336
|
+
* Maximum number of idle messages the persona will send before giving up
|
|
337
|
+
*/
|
|
338
|
+
idleMessageMaxSpokenCount: number;
|
|
339
|
+
/**
|
|
340
|
+
* Whether the idle message counter resets when the agent speaks
|
|
341
|
+
*/
|
|
342
|
+
idleMessageResetCountOnUserSpeechEnabled: boolean;
|
|
343
|
+
/**
|
|
344
|
+
* Messages the persona will say when the agent goes silent during a call
|
|
345
|
+
*/
|
|
346
|
+
idleMessages: Array<string>;
|
|
347
|
+
/**
|
|
348
|
+
* Seconds of silence before the persona sends an idle message
|
|
349
|
+
*/
|
|
350
|
+
idleTimeoutSeconds: number;
|
|
319
351
|
/**
|
|
320
352
|
* How clearly the persona expresses their intentions
|
|
321
353
|
*/
|