@roarkanalytics/sdk 3.4.0 → 3.6.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 +24 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/metric.d.mts +160 -7
- package/resources/metric.d.mts.map +1 -1
- package/resources/metric.d.ts +160 -7
- package/resources/metric.d.ts.map +1 -1
- package/resources/metric.js +5 -4
- package/resources/metric.js.map +1 -1
- package/resources/metric.mjs +5 -4
- package/resources/metric.mjs.map +1 -1
- package/src/client.ts +2 -0
- package/src/resources/index.ts +1 -0
- package/src/resources/metric.ts +192 -7
- 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/src/resources/metric.ts
CHANGED
|
@@ -29,16 +29,20 @@ export class Metric extends APIResource {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
* Fetch
|
|
33
|
-
* system-generated and custom metrics.
|
|
32
|
+
* Fetch metric definitions available in the project, including both
|
|
33
|
+
* system-generated and custom metrics. Results are ordered by immutable definition
|
|
34
|
+
* ID; pass `nextCursor` to retrieve the following page.
|
|
34
35
|
*
|
|
35
36
|
* @example
|
|
36
37
|
* ```ts
|
|
37
38
|
* const response = await client.metric.listDefinitions();
|
|
38
39
|
* ```
|
|
39
40
|
*/
|
|
40
|
-
listDefinitions(
|
|
41
|
-
|
|
41
|
+
listDefinitions(
|
|
42
|
+
query: MetricListDefinitionsParams | null | undefined = {},
|
|
43
|
+
options?: RequestOptions,
|
|
44
|
+
): APIPromise<MetricListDefinitionsResponse> {
|
|
45
|
+
return this._client.get('/v1/metric/definitions', { query, ...options });
|
|
42
46
|
}
|
|
43
47
|
}
|
|
44
48
|
|
|
@@ -59,6 +63,18 @@ export namespace MetricCreateDefinitionResponse {
|
|
|
59
63
|
*/
|
|
60
64
|
id: string;
|
|
61
65
|
|
|
66
|
+
/**
|
|
67
|
+
* For a BOOLEAN metric, what a `false` value means. Also given to the judge as its
|
|
68
|
+
* polarity rule.
|
|
69
|
+
*/
|
|
70
|
+
booleanFalseLabel: string | null;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* For a BOOLEAN metric, what a `true` value means. Also given to the judge as its
|
|
74
|
+
* polarity rule.
|
|
75
|
+
*/
|
|
76
|
+
booleanTrueLabel: string | null;
|
|
77
|
+
|
|
62
78
|
/**
|
|
63
79
|
* Metric evaluated by an LLM against a prompt.
|
|
64
80
|
*/
|
|
@@ -69,6 +85,12 @@ export namespace MetricCreateDefinitionResponse {
|
|
|
69
85
|
*/
|
|
70
86
|
description: string;
|
|
71
87
|
|
|
88
|
+
/**
|
|
89
|
+
* The rubric this judge applies, as stored. Read it back to confirm which criteria
|
|
90
|
+
* are live after a create or update.
|
|
91
|
+
*/
|
|
92
|
+
llmPrompt: string | null;
|
|
93
|
+
|
|
72
94
|
/**
|
|
73
95
|
* Alias of `slug` retained for backwards compatibility. Same value as `slug`.
|
|
74
96
|
*/
|
|
@@ -79,6 +101,15 @@ export namespace MetricCreateDefinitionResponse {
|
|
|
79
101
|
*/
|
|
80
102
|
name: string;
|
|
81
103
|
|
|
104
|
+
/**
|
|
105
|
+
* True when this metric can only be scored from a live recording
|
|
106
|
+
* (`supportedConversationSources` is `["LIVE"]`). Selecting one of these on a
|
|
107
|
+
* simulation run forces live enrichment: the run waits for your recording and, if
|
|
108
|
+
* none arrives, the metric produces no value. Check this before a run rather than
|
|
109
|
+
* discovering the wait afterwards.
|
|
110
|
+
*/
|
|
111
|
+
requiresLiveConversation: boolean;
|
|
112
|
+
|
|
82
113
|
/**
|
|
83
114
|
* Whether metric is global or per-participant
|
|
84
115
|
*/
|
|
@@ -94,6 +125,13 @@ export namespace MetricCreateDefinitionResponse {
|
|
|
94
125
|
*/
|
|
95
126
|
supportedContexts: Array<'CALL' | 'SEGMENT' | 'TURN'>;
|
|
96
127
|
|
|
128
|
+
/**
|
|
129
|
+
* Which kinds of conversation this metric can be scored on. `null` means both.
|
|
130
|
+
* `["LIVE"]` marks a metric that can only be scored from your own recording of a
|
|
131
|
+
* real call, and `["SIMULATED"]` one that only applies to simulations.
|
|
132
|
+
*/
|
|
133
|
+
supportedConversationSources: Array<'SIMULATED' | 'LIVE'> | null;
|
|
134
|
+
|
|
97
135
|
/**
|
|
98
136
|
* Type of value this metric produces
|
|
99
137
|
*/
|
|
@@ -166,6 +204,15 @@ export namespace MetricCreateDefinitionResponse {
|
|
|
166
204
|
*/
|
|
167
205
|
name: string;
|
|
168
206
|
|
|
207
|
+
/**
|
|
208
|
+
* True when this metric can only be scored from a live recording
|
|
209
|
+
* (`supportedConversationSources` is `["LIVE"]`). Selecting one of these on a
|
|
210
|
+
* simulation run forces live enrichment: the run waits for your recording and, if
|
|
211
|
+
* none arrives, the metric produces no value. Check this before a run rather than
|
|
212
|
+
* discovering the wait afterwards.
|
|
213
|
+
*/
|
|
214
|
+
requiresLiveConversation: boolean;
|
|
215
|
+
|
|
169
216
|
/**
|
|
170
217
|
* Whether metric is global or per-participant
|
|
171
218
|
*/
|
|
@@ -181,6 +228,13 @@ export namespace MetricCreateDefinitionResponse {
|
|
|
181
228
|
*/
|
|
182
229
|
supportedContexts: Array<'CALL' | 'SEGMENT' | 'TURN'>;
|
|
183
230
|
|
|
231
|
+
/**
|
|
232
|
+
* Which kinds of conversation this metric can be scored on. `null` means both.
|
|
233
|
+
* `["LIVE"]` marks a metric that can only be scored from your own recording of a
|
|
234
|
+
* real call, and `["SIMULATED"]` one that only applies to simulations.
|
|
235
|
+
*/
|
|
236
|
+
supportedConversationSources: Array<'SIMULATED' | 'LIVE'> | null;
|
|
237
|
+
|
|
184
238
|
/**
|
|
185
239
|
* Type of value this metric produces
|
|
186
240
|
*/
|
|
@@ -270,6 +324,15 @@ export namespace MetricCreateDefinitionResponse {
|
|
|
270
324
|
*/
|
|
271
325
|
pattern: PatternMetricResponse.Pattern;
|
|
272
326
|
|
|
327
|
+
/**
|
|
328
|
+
* True when this metric can only be scored from a live recording
|
|
329
|
+
* (`supportedConversationSources` is `["LIVE"]`). Selecting one of these on a
|
|
330
|
+
* simulation run forces live enrichment: the run waits for your recording and, if
|
|
331
|
+
* none arrives, the metric produces no value. Check this before a run rather than
|
|
332
|
+
* discovering the wait afterwards.
|
|
333
|
+
*/
|
|
334
|
+
requiresLiveConversation: boolean;
|
|
335
|
+
|
|
273
336
|
/**
|
|
274
337
|
* Whether metric is global or per-participant
|
|
275
338
|
*/
|
|
@@ -285,6 +348,13 @@ export namespace MetricCreateDefinitionResponse {
|
|
|
285
348
|
*/
|
|
286
349
|
supportedContexts: Array<'CALL' | 'SEGMENT' | 'TURN'>;
|
|
287
350
|
|
|
351
|
+
/**
|
|
352
|
+
* Which kinds of conversation this metric can be scored on. `null` means both.
|
|
353
|
+
* `["LIVE"]` marks a metric that can only be scored from your own recording of a
|
|
354
|
+
* real call, and `["SIMULATED"]` one that only applies to simulations.
|
|
355
|
+
*/
|
|
356
|
+
supportedConversationSources: Array<'SIMULATED' | 'LIVE'> | null;
|
|
357
|
+
|
|
288
358
|
/**
|
|
289
359
|
* Type of value this metric produces
|
|
290
360
|
*/
|
|
@@ -384,10 +454,10 @@ export namespace MetricCreateDefinitionResponse {
|
|
|
384
454
|
}
|
|
385
455
|
}
|
|
386
456
|
|
|
457
|
+
/**
|
|
458
|
+
* Cursor-paginated metric definitions available in the project
|
|
459
|
+
*/
|
|
387
460
|
export interface MetricListDefinitionsResponse {
|
|
388
|
-
/**
|
|
389
|
-
* Metrics response payload
|
|
390
|
-
*/
|
|
391
461
|
data: Array<
|
|
392
462
|
| MetricListDefinitionsResponse.LlmJudgeMetricResponse
|
|
393
463
|
| MetricListDefinitionsResponse.ProviderMetricResponse
|
|
@@ -395,6 +465,8 @@ export interface MetricListDefinitionsResponse {
|
|
|
395
465
|
| MetricListDefinitionsResponse.FormulaMetricResponse
|
|
396
466
|
| MetricListDefinitionsResponse.PatternMetricResponse
|
|
397
467
|
>;
|
|
468
|
+
|
|
469
|
+
pagination: MetricListDefinitionsResponse.Pagination;
|
|
398
470
|
}
|
|
399
471
|
|
|
400
472
|
export namespace MetricListDefinitionsResponse {
|
|
@@ -404,6 +476,18 @@ export namespace MetricListDefinitionsResponse {
|
|
|
404
476
|
*/
|
|
405
477
|
id: string;
|
|
406
478
|
|
|
479
|
+
/**
|
|
480
|
+
* For a BOOLEAN metric, what a `false` value means. Also given to the judge as its
|
|
481
|
+
* polarity rule.
|
|
482
|
+
*/
|
|
483
|
+
booleanFalseLabel: string | null;
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* For a BOOLEAN metric, what a `true` value means. Also given to the judge as its
|
|
487
|
+
* polarity rule.
|
|
488
|
+
*/
|
|
489
|
+
booleanTrueLabel: string | null;
|
|
490
|
+
|
|
407
491
|
/**
|
|
408
492
|
* Metric evaluated by an LLM against a prompt.
|
|
409
493
|
*/
|
|
@@ -414,6 +498,12 @@ export namespace MetricListDefinitionsResponse {
|
|
|
414
498
|
*/
|
|
415
499
|
description: string;
|
|
416
500
|
|
|
501
|
+
/**
|
|
502
|
+
* The rubric this judge applies, as stored. Read it back to confirm which criteria
|
|
503
|
+
* are live after a create or update.
|
|
504
|
+
*/
|
|
505
|
+
llmPrompt: string | null;
|
|
506
|
+
|
|
417
507
|
/**
|
|
418
508
|
* Alias of `slug` retained for backwards compatibility. Same value as `slug`.
|
|
419
509
|
*/
|
|
@@ -424,6 +514,15 @@ export namespace MetricListDefinitionsResponse {
|
|
|
424
514
|
*/
|
|
425
515
|
name: string;
|
|
426
516
|
|
|
517
|
+
/**
|
|
518
|
+
* True when this metric can only be scored from a live recording
|
|
519
|
+
* (`supportedConversationSources` is `["LIVE"]`). Selecting one of these on a
|
|
520
|
+
* simulation run forces live enrichment: the run waits for your recording and, if
|
|
521
|
+
* none arrives, the metric produces no value. Check this before a run rather than
|
|
522
|
+
* discovering the wait afterwards.
|
|
523
|
+
*/
|
|
524
|
+
requiresLiveConversation: boolean;
|
|
525
|
+
|
|
427
526
|
/**
|
|
428
527
|
* Whether metric is global or per-participant
|
|
429
528
|
*/
|
|
@@ -439,6 +538,13 @@ export namespace MetricListDefinitionsResponse {
|
|
|
439
538
|
*/
|
|
440
539
|
supportedContexts: Array<'CALL' | 'SEGMENT' | 'TURN'>;
|
|
441
540
|
|
|
541
|
+
/**
|
|
542
|
+
* Which kinds of conversation this metric can be scored on. `null` means both.
|
|
543
|
+
* `["LIVE"]` marks a metric that can only be scored from your own recording of a
|
|
544
|
+
* real call, and `["SIMULATED"]` one that only applies to simulations.
|
|
545
|
+
*/
|
|
546
|
+
supportedConversationSources: Array<'SIMULATED' | 'LIVE'> | null;
|
|
547
|
+
|
|
442
548
|
/**
|
|
443
549
|
* Type of value this metric produces
|
|
444
550
|
*/
|
|
@@ -506,6 +612,15 @@ export namespace MetricListDefinitionsResponse {
|
|
|
506
612
|
*/
|
|
507
613
|
name: string;
|
|
508
614
|
|
|
615
|
+
/**
|
|
616
|
+
* True when this metric can only be scored from a live recording
|
|
617
|
+
* (`supportedConversationSources` is `["LIVE"]`). Selecting one of these on a
|
|
618
|
+
* simulation run forces live enrichment: the run waits for your recording and, if
|
|
619
|
+
* none arrives, the metric produces no value. Check this before a run rather than
|
|
620
|
+
* discovering the wait afterwards.
|
|
621
|
+
*/
|
|
622
|
+
requiresLiveConversation: boolean;
|
|
623
|
+
|
|
509
624
|
/**
|
|
510
625
|
* Whether metric is global or per-participant
|
|
511
626
|
*/
|
|
@@ -521,6 +636,13 @@ export namespace MetricListDefinitionsResponse {
|
|
|
521
636
|
*/
|
|
522
637
|
supportedContexts: Array<'CALL' | 'SEGMENT' | 'TURN'>;
|
|
523
638
|
|
|
639
|
+
/**
|
|
640
|
+
* Which kinds of conversation this metric can be scored on. `null` means both.
|
|
641
|
+
* `["LIVE"]` marks a metric that can only be scored from your own recording of a
|
|
642
|
+
* real call, and `["SIMULATED"]` one that only applies to simulations.
|
|
643
|
+
*/
|
|
644
|
+
supportedConversationSources: Array<'SIMULATED' | 'LIVE'> | null;
|
|
645
|
+
|
|
524
646
|
/**
|
|
525
647
|
* Type of value this metric produces
|
|
526
648
|
*/
|
|
@@ -588,6 +710,15 @@ export namespace MetricListDefinitionsResponse {
|
|
|
588
710
|
*/
|
|
589
711
|
name: string;
|
|
590
712
|
|
|
713
|
+
/**
|
|
714
|
+
* True when this metric can only be scored from a live recording
|
|
715
|
+
* (`supportedConversationSources` is `["LIVE"]`). Selecting one of these on a
|
|
716
|
+
* simulation run forces live enrichment: the run waits for your recording and, if
|
|
717
|
+
* none arrives, the metric produces no value. Check this before a run rather than
|
|
718
|
+
* discovering the wait afterwards.
|
|
719
|
+
*/
|
|
720
|
+
requiresLiveConversation: boolean;
|
|
721
|
+
|
|
591
722
|
/**
|
|
592
723
|
* Whether metric is global or per-participant
|
|
593
724
|
*/
|
|
@@ -603,6 +734,13 @@ export namespace MetricListDefinitionsResponse {
|
|
|
603
734
|
*/
|
|
604
735
|
supportedContexts: Array<'CALL' | 'SEGMENT' | 'TURN'>;
|
|
605
736
|
|
|
737
|
+
/**
|
|
738
|
+
* Which kinds of conversation this metric can be scored on. `null` means both.
|
|
739
|
+
* `["LIVE"]` marks a metric that can only be scored from your own recording of a
|
|
740
|
+
* real call, and `["SIMULATED"]` one that only applies to simulations.
|
|
741
|
+
*/
|
|
742
|
+
supportedConversationSources: Array<'SIMULATED' | 'LIVE'> | null;
|
|
743
|
+
|
|
606
744
|
/**
|
|
607
745
|
* Type of value this metric produces
|
|
608
746
|
*/
|
|
@@ -705,6 +843,15 @@ export namespace MetricListDefinitionsResponse {
|
|
|
705
843
|
*/
|
|
706
844
|
name: string;
|
|
707
845
|
|
|
846
|
+
/**
|
|
847
|
+
* True when this metric can only be scored from a live recording
|
|
848
|
+
* (`supportedConversationSources` is `["LIVE"]`). Selecting one of these on a
|
|
849
|
+
* simulation run forces live enrichment: the run waits for your recording and, if
|
|
850
|
+
* none arrives, the metric produces no value. Check this before a run rather than
|
|
851
|
+
* discovering the wait afterwards.
|
|
852
|
+
*/
|
|
853
|
+
requiresLiveConversation: boolean;
|
|
854
|
+
|
|
708
855
|
/**
|
|
709
856
|
* Whether metric is global or per-participant
|
|
710
857
|
*/
|
|
@@ -720,6 +867,13 @@ export namespace MetricListDefinitionsResponse {
|
|
|
720
867
|
*/
|
|
721
868
|
supportedContexts: Array<'CALL' | 'SEGMENT' | 'TURN'>;
|
|
722
869
|
|
|
870
|
+
/**
|
|
871
|
+
* Which kinds of conversation this metric can be scored on. `null` means both.
|
|
872
|
+
* `["LIVE"]` marks a metric that can only be scored from your own recording of a
|
|
873
|
+
* real call, and `["SIMULATED"]` one that only applies to simulations.
|
|
874
|
+
*/
|
|
875
|
+
supportedConversationSources: Array<'SIMULATED' | 'LIVE'> | null;
|
|
876
|
+
|
|
723
877
|
/**
|
|
724
878
|
* Type of value this metric produces
|
|
725
879
|
*/
|
|
@@ -809,6 +963,15 @@ export namespace MetricListDefinitionsResponse {
|
|
|
809
963
|
*/
|
|
810
964
|
pattern: PatternMetricResponse.Pattern;
|
|
811
965
|
|
|
966
|
+
/**
|
|
967
|
+
* True when this metric can only be scored from a live recording
|
|
968
|
+
* (`supportedConversationSources` is `["LIVE"]`). Selecting one of these on a
|
|
969
|
+
* simulation run forces live enrichment: the run waits for your recording and, if
|
|
970
|
+
* none arrives, the metric produces no value. Check this before a run rather than
|
|
971
|
+
* discovering the wait afterwards.
|
|
972
|
+
*/
|
|
973
|
+
requiresLiveConversation: boolean;
|
|
974
|
+
|
|
812
975
|
/**
|
|
813
976
|
* Whether metric is global or per-participant
|
|
814
977
|
*/
|
|
@@ -824,6 +987,13 @@ export namespace MetricListDefinitionsResponse {
|
|
|
824
987
|
*/
|
|
825
988
|
supportedContexts: Array<'CALL' | 'SEGMENT' | 'TURN'>;
|
|
826
989
|
|
|
990
|
+
/**
|
|
991
|
+
* Which kinds of conversation this metric can be scored on. `null` means both.
|
|
992
|
+
* `["LIVE"]` marks a metric that can only be scored from your own recording of a
|
|
993
|
+
* real call, and `["SIMULATED"]` one that only applies to simulations.
|
|
994
|
+
*/
|
|
995
|
+
supportedConversationSources: Array<'SIMULATED' | 'LIVE'> | null;
|
|
996
|
+
|
|
827
997
|
/**
|
|
828
998
|
* Type of value this metric produces
|
|
829
999
|
*/
|
|
@@ -921,6 +1091,14 @@ export namespace MetricListDefinitionsResponse {
|
|
|
921
1091
|
symbol: string | null;
|
|
922
1092
|
}
|
|
923
1093
|
}
|
|
1094
|
+
|
|
1095
|
+
export interface Pagination {
|
|
1096
|
+
hasMore: boolean;
|
|
1097
|
+
|
|
1098
|
+
limit: number;
|
|
1099
|
+
|
|
1100
|
+
nextCursor: string | null;
|
|
1101
|
+
}
|
|
924
1102
|
}
|
|
925
1103
|
|
|
926
1104
|
export type MetricCreateDefinitionParams =
|
|
@@ -1246,10 +1424,17 @@ export declare namespace MetricCreateDefinitionParams {
|
|
|
1246
1424
|
}
|
|
1247
1425
|
}
|
|
1248
1426
|
|
|
1427
|
+
export interface MetricListDefinitionsParams {
|
|
1428
|
+
after?: string;
|
|
1429
|
+
|
|
1430
|
+
limit?: number;
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1249
1433
|
export declare namespace Metric {
|
|
1250
1434
|
export {
|
|
1251
1435
|
type MetricCreateDefinitionResponse as MetricCreateDefinitionResponse,
|
|
1252
1436
|
type MetricListDefinitionsResponse as MetricListDefinitionsResponse,
|
|
1253
1437
|
type MetricCreateDefinitionParams as MetricCreateDefinitionParams,
|
|
1438
|
+
type MetricListDefinitionsParams as MetricListDefinitionsParams,
|
|
1254
1439
|
};
|
|
1255
1440
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '3.
|
|
1
|
+
export const VERSION = '3.6.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "3.
|
|
1
|
+
export declare const VERSION = "3.6.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "3.
|
|
1
|
+
export declare const VERSION = "3.6.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '3.
|
|
1
|
+
export const VERSION = '3.6.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|