@roarkanalytics/sdk 2.30.0 → 2.33.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 +74 -0
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/client.d.mts +17 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +17 -5
- package/client.d.ts.map +1 -1
- package/client.js +35 -4
- package/client.js.map +1 -1
- package/client.mjs +35 -4
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/qs/formats.d.mts.map +1 -1
- package/internal/qs/formats.d.ts.map +1 -1
- package/internal/qs/index.d.mts +2 -2
- package/internal/qs/index.d.mts.map +1 -1
- package/internal/qs/index.d.ts +2 -2
- package/internal/qs/index.d.ts.map +1 -1
- package/internal/qs/index.mjs.map +1 -1
- package/internal/qs/stringify.d.mts.map +1 -1
- package/internal/qs/stringify.d.ts.map +1 -1
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/utils.d.mts.map +1 -1
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +10 -10
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +10 -10
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +2 -0
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +2 -0
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/package.json +1 -1
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/agent-endpoint.d.mts +4 -4
- package/resources/agent-endpoint.d.mts.map +1 -1
- package/resources/agent-endpoint.d.ts +4 -4
- package/resources/agent-endpoint.d.ts.map +1 -1
- package/resources/agent-endpoint.mjs.map +1 -1
- package/resources/agent.d.mts.map +1 -1
- package/resources/agent.d.ts.map +1 -1
- package/resources/agent.mjs.map +1 -1
- package/resources/call.d.mts +310 -162
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +310 -162
- package/resources/call.d.ts.map +1 -1
- package/resources/call.js +6 -7
- package/resources/call.js.map +1 -1
- package/resources/call.mjs +6 -7
- package/resources/call.mjs.map +1 -1
- package/resources/config.d.mts +535 -0
- package/resources/config.d.mts.map +1 -0
- package/resources/config.d.ts +535 -0
- package/resources/config.d.ts.map +1 -0
- package/resources/config.js +28 -0
- package/resources/config.js.map +1 -0
- package/resources/config.mjs +24 -0
- package/resources/config.mjs.map +1 -0
- package/resources/customer-flow-edge-case.d.mts +1742 -0
- package/resources/customer-flow-edge-case.d.mts.map +1 -0
- package/resources/customer-flow-edge-case.d.ts +1742 -0
- package/resources/customer-flow-edge-case.d.ts.map +1 -0
- package/resources/customer-flow-edge-case.js +50 -0
- package/resources/customer-flow-edge-case.js.map +1 -0
- package/resources/customer-flow-edge-case.mjs +46 -0
- package/resources/customer-flow-edge-case.mjs.map +1 -0
- package/resources/customer-flow.d.mts +7163 -0
- package/resources/customer-flow.d.mts.map +1 -0
- package/resources/customer-flow.d.ts +7163 -0
- package/resources/customer-flow.d.ts.map +1 -0
- package/resources/customer-flow.js +87 -0
- package/resources/customer-flow.js.map +1 -0
- package/resources/customer-flow.mjs +83 -0
- package/resources/customer-flow.mjs.map +1 -0
- package/resources/health.d.mts.map +1 -1
- package/resources/health.d.ts.map +1 -1
- package/resources/health.mjs.map +1 -1
- package/resources/http-request-definition.d.mts.map +1 -1
- package/resources/http-request-definition.d.ts.map +1 -1
- package/resources/http-request-definition.mjs.map +1 -1
- package/resources/index.d.mts +6 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +11 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +5 -1
- package/resources/index.mjs.map +1 -1
- package/resources/metric-collection-job.d.mts +5 -3
- package/resources/metric-collection-job.d.mts.map +1 -1
- package/resources/metric-collection-job.d.ts +5 -3
- package/resources/metric-collection-job.d.ts.map +1 -1
- package/resources/metric-collection-job.mjs.map +1 -1
- package/resources/metric-policy.d.mts.map +1 -1
- package/resources/metric-policy.d.ts.map +1 -1
- package/resources/metric-policy.mjs.map +1 -1
- package/resources/metric.d.mts +804 -109
- package/resources/metric.d.mts.map +1 -1
- package/resources/metric.d.ts +804 -109
- package/resources/metric.d.ts.map +1 -1
- package/resources/metric.js +6 -7
- package/resources/metric.js.map +1 -1
- package/resources/metric.mjs +6 -7
- package/resources/metric.mjs.map +1 -1
- package/resources/simulation-environment.d.mts +95 -0
- package/resources/simulation-environment.d.mts.map +1 -0
- package/resources/simulation-environment.d.ts +95 -0
- package/resources/simulation-environment.d.ts.map +1 -0
- package/resources/simulation-environment.js +24 -0
- package/resources/simulation-environment.js.map +1 -0
- package/resources/simulation-environment.mjs +20 -0
- package/resources/simulation-environment.mjs.map +1 -0
- package/resources/simulation-job.d.mts +58 -10
- package/resources/simulation-job.d.mts.map +1 -1
- package/resources/simulation-job.d.ts +58 -10
- package/resources/simulation-job.d.ts.map +1 -1
- package/resources/simulation-job.mjs.map +1 -1
- package/resources/simulation-persona.d.mts +60 -24
- package/resources/simulation-persona.d.mts.map +1 -1
- package/resources/simulation-persona.d.ts +60 -24
- package/resources/simulation-persona.d.ts.map +1 -1
- package/resources/simulation-persona.mjs.map +1 -1
- package/resources/simulation-run-plan-job.d.mts +73 -32
- package/resources/simulation-run-plan-job.d.mts.map +1 -1
- package/resources/simulation-run-plan-job.d.ts +73 -32
- package/resources/simulation-run-plan-job.d.ts.map +1 -1
- package/resources/simulation-run-plan-job.js +7 -8
- package/resources/simulation-run-plan-job.js.map +1 -1
- package/resources/simulation-run-plan-job.mjs +7 -8
- package/resources/simulation-run-plan-job.mjs.map +1 -1
- package/resources/simulation-run-plan.d.mts +408 -39
- package/resources/simulation-run-plan.d.mts.map +1 -1
- package/resources/simulation-run-plan.d.ts +408 -39
- package/resources/simulation-run-plan.d.ts.map +1 -1
- package/resources/simulation-run-plan.js +6 -11
- package/resources/simulation-run-plan.js.map +1 -1
- package/resources/simulation-run-plan.mjs +6 -11
- package/resources/simulation-run-plan.mjs.map +1 -1
- package/resources/simulation.d.mts +379 -0
- package/resources/simulation.d.mts.map +1 -0
- package/resources/simulation.d.ts +379 -0
- package/resources/simulation.d.ts.map +1 -0
- package/resources/simulation.js +33 -0
- package/resources/simulation.js.map +1 -0
- package/resources/simulation.mjs +29 -0
- package/resources/simulation.mjs.map +1 -0
- 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/resources/webhook.mjs.map +1 -1
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/client.ts +124 -28
- package/src/internal/types.ts +6 -8
- package/src/internal/utils/log.ts +2 -0
- package/src/resources/agent-endpoint.ts +36 -4
- package/src/resources/call.ts +333 -176
- package/src/resources/config.ts +1162 -0
- package/src/resources/customer-flow-edge-case.ts +2884 -0
- package/src/resources/customer-flow.ts +11713 -0
- package/src/resources/index.ts +42 -12
- package/src/resources/metric-collection-job.ts +5 -3
- package/src/resources/metric.ts +1057 -115
- package/src/resources/simulation-environment.ts +147 -0
- package/src/resources/simulation-job.ts +122 -10
- package/src/resources/simulation-persona.ts +192 -24
- package/src/resources/simulation-run-plan-job.ts +109 -27
- package/src/resources/simulation-run-plan.ts +445 -40
- package/src/resources/simulation.ts +444 -0
- package/src/resources/webhook.ts +8 -0
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +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/simulation-scenario.d.mts +0 -424
- package/resources/simulation-scenario.d.mts.map +0 -1
- package/resources/simulation-scenario.d.ts +0 -424
- package/resources/simulation-scenario.d.ts.map +0 -1
- package/resources/simulation-scenario.js +0 -40
- package/resources/simulation-scenario.js.map +0 -1
- package/resources/simulation-scenario.mjs +0 -36
- package/resources/simulation-scenario.mjs.map +0 -1
- package/src/resources/simulation-scenario.ts +0 -602
package/src/resources/call.ts
CHANGED
|
@@ -42,16 +42,14 @@ export class Call extends APIResource {
|
|
|
42
42
|
return this._client.get(path`/v1/call/${callID}/transcript`, { query, ...options });
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
/**
|
|
46
|
-
* Fetch all evaluation run results for a specific call.
|
|
47
|
-
*/
|
|
48
|
-
listEvaluationRuns(callID: string, options?: RequestOptions): APIPromise<CallListEvaluationRunsResponse> {
|
|
49
|
-
return this._client.get(path`/v1/call/${callID}/evaluation-run`, options);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
45
|
/**
|
|
53
46
|
* Fetch all call-level metrics for a specific call, including both
|
|
54
|
-
* system-generated and custom metrics. Only returns
|
|
47
|
+
* system-generated and custom metrics. Only returns rows from the **latest**
|
|
48
|
+
* metric-collection job per metric — if the same metric has been recomputed, prior
|
|
49
|
+
* runs are excluded and remain in the metric history. By default returns only
|
|
50
|
+
* successfully computed metrics; pass `?status=all` to also include rows that
|
|
51
|
+
* resolved as NOT_APPLICABLE / DATA_MISSING / ERROR (the `value` field is omitted
|
|
52
|
+
* on those entries — check `captureStatus`).
|
|
55
53
|
*/
|
|
56
54
|
listMetrics(
|
|
57
55
|
callID: string,
|
|
@@ -98,6 +96,8 @@ export namespace CallCreateResponse {
|
|
|
98
96
|
|
|
99
97
|
customers: Array<Data.Customer> | null;
|
|
100
98
|
|
|
99
|
+
externalId: string | null;
|
|
100
|
+
|
|
101
101
|
/**
|
|
102
102
|
* ID of the project this call belongs to
|
|
103
103
|
*/
|
|
@@ -162,6 +162,14 @@ export namespace CallListResponse {
|
|
|
162
162
|
*/
|
|
163
163
|
projectId: string;
|
|
164
164
|
|
|
165
|
+
/**
|
|
166
|
+
* Indicates the status of `recordingUrl`. `AVAILABLE`: signed URL returned.
|
|
167
|
+
* `NOT_AVAILABLE`: no recording on file yet (e.g. still processing). `RESTRICTED`:
|
|
168
|
+
* the calling API key does not have the `recording:read` permission and the URL
|
|
169
|
+
* has been withheld.
|
|
170
|
+
*/
|
|
171
|
+
recordingUrlAccess: 'AVAILABLE' | 'NOT_AVAILABLE' | 'RESTRICTED';
|
|
172
|
+
|
|
165
173
|
/**
|
|
166
174
|
* Timestamp when the call started
|
|
167
175
|
*/
|
|
@@ -217,6 +225,12 @@ export namespace CallListResponse {
|
|
|
217
225
|
| 'UNKNOWN'
|
|
218
226
|
| null;
|
|
219
227
|
|
|
228
|
+
/**
|
|
229
|
+
* Caller-supplied correlation ID echoed back from the create request, if any was
|
|
230
|
+
* provided
|
|
231
|
+
*/
|
|
232
|
+
externalId?: string | null;
|
|
233
|
+
|
|
220
234
|
/**
|
|
221
235
|
* IDs of metric policies that have been applied to this call
|
|
222
236
|
*/
|
|
@@ -332,6 +346,14 @@ export namespace CallGetByIDResponse {
|
|
|
332
346
|
*/
|
|
333
347
|
projectId: string;
|
|
334
348
|
|
|
349
|
+
/**
|
|
350
|
+
* Indicates the status of `recordingUrl`. `AVAILABLE`: signed URL returned.
|
|
351
|
+
* `NOT_AVAILABLE`: no recording on file yet (e.g. still processing). `RESTRICTED`:
|
|
352
|
+
* the calling API key does not have the `recording:read` permission and the URL
|
|
353
|
+
* has been withheld.
|
|
354
|
+
*/
|
|
355
|
+
recordingUrlAccess: 'AVAILABLE' | 'NOT_AVAILABLE' | 'RESTRICTED';
|
|
356
|
+
|
|
335
357
|
/**
|
|
336
358
|
* Timestamp when the call started
|
|
337
359
|
*/
|
|
@@ -387,6 +409,12 @@ export namespace CallGetByIDResponse {
|
|
|
387
409
|
| 'UNKNOWN'
|
|
388
410
|
| null;
|
|
389
411
|
|
|
412
|
+
/**
|
|
413
|
+
* Caller-supplied correlation ID echoed back from the create request, if any was
|
|
414
|
+
* provided
|
|
415
|
+
*/
|
|
416
|
+
externalId?: string | null;
|
|
417
|
+
|
|
390
418
|
/**
|
|
391
419
|
* IDs of metric policies that have been applied to this call
|
|
392
420
|
*/
|
|
@@ -493,12 +521,12 @@ export namespace CallGetTranscriptResponse {
|
|
|
493
521
|
*/
|
|
494
522
|
export interface Entry {
|
|
495
523
|
/**
|
|
496
|
-
* End time offset in milliseconds from the start of the
|
|
524
|
+
* End time offset in milliseconds from the start of the conversation
|
|
497
525
|
*/
|
|
498
526
|
endOffsetMs: number;
|
|
499
527
|
|
|
500
528
|
/**
|
|
501
|
-
* ID of the conversation participant who
|
|
529
|
+
* ID of the conversation participant who produced this entry. References
|
|
502
530
|
* participants[].id.
|
|
503
531
|
*/
|
|
504
532
|
participantId: string | null;
|
|
@@ -509,7 +537,7 @@ export namespace CallGetTranscriptResponse {
|
|
|
509
537
|
role: 'AGENT' | 'CUSTOMER' | null;
|
|
510
538
|
|
|
511
539
|
/**
|
|
512
|
-
* Start time offset in milliseconds from the start of the
|
|
540
|
+
* Start time offset in milliseconds from the start of the conversation
|
|
513
541
|
*/
|
|
514
542
|
startOffsetMs: number;
|
|
515
543
|
|
|
@@ -584,276 +612,277 @@ export namespace CallGetTranscriptResponse {
|
|
|
584
612
|
}
|
|
585
613
|
}
|
|
586
614
|
|
|
587
|
-
export interface
|
|
615
|
+
export interface CallListMetricsResponse {
|
|
588
616
|
/**
|
|
589
|
-
*
|
|
617
|
+
* Conversation metrics response payload grouped by metric definition
|
|
590
618
|
*/
|
|
591
|
-
data: Array<
|
|
619
|
+
data: Array<CallListMetricsResponse.Data>;
|
|
592
620
|
}
|
|
593
621
|
|
|
594
|
-
export namespace
|
|
622
|
+
export namespace CallListMetricsResponse {
|
|
623
|
+
/**
|
|
624
|
+
* Metric data grouped by metric definition
|
|
625
|
+
*/
|
|
595
626
|
export interface Data {
|
|
596
627
|
/**
|
|
597
|
-
*
|
|
628
|
+
* Description of what the metric measures
|
|
598
629
|
*/
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
evaluator: Data.Evaluator;
|
|
602
|
-
|
|
603
|
-
evidence: Array<Data.Evidence>;
|
|
630
|
+
description: string;
|
|
604
631
|
|
|
605
|
-
|
|
632
|
+
/**
|
|
633
|
+
* Unique identifier for the metric definition
|
|
634
|
+
*/
|
|
635
|
+
metricDefinitionId: string;
|
|
606
636
|
|
|
607
637
|
/**
|
|
608
|
-
*
|
|
638
|
+
* Alias of `slug` retained for backwards compatibility. Same value as `slug`.
|
|
609
639
|
*/
|
|
610
|
-
|
|
640
|
+
metricId: string;
|
|
611
641
|
|
|
612
642
|
/**
|
|
613
|
-
*
|
|
643
|
+
* Name of the metric
|
|
614
644
|
*/
|
|
615
|
-
|
|
645
|
+
name: string;
|
|
616
646
|
|
|
617
647
|
/**
|
|
618
|
-
*
|
|
648
|
+
* Whether metric is global or per-participant
|
|
619
649
|
*/
|
|
620
|
-
|
|
650
|
+
scope: 'GLOBAL' | 'PER_PARTICIPANT';
|
|
621
651
|
|
|
622
652
|
/**
|
|
623
|
-
*
|
|
624
|
-
* SKIPPED)
|
|
653
|
+
* Stable metric slug
|
|
625
654
|
*/
|
|
626
|
-
|
|
655
|
+
slug: string;
|
|
627
656
|
|
|
628
657
|
/**
|
|
629
|
-
*
|
|
658
|
+
* Type of value this metric produces
|
|
630
659
|
*/
|
|
631
|
-
|
|
660
|
+
type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET';
|
|
632
661
|
|
|
633
662
|
/**
|
|
634
|
-
*
|
|
663
|
+
* Array of metric values (multiple for PER_PARTICIPANT metrics, or multiple
|
|
664
|
+
* segments/turns)
|
|
635
665
|
*/
|
|
636
|
-
|
|
666
|
+
values: Array<Data.StandardMetricValue | Data.PropertyVerificationMetricValue>;
|
|
637
667
|
|
|
638
668
|
/**
|
|
639
|
-
*
|
|
669
|
+
* Unit information if applicable
|
|
640
670
|
*/
|
|
641
|
-
|
|
671
|
+
unit?: Data.Unit;
|
|
642
672
|
}
|
|
643
673
|
|
|
644
674
|
export namespace Data {
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
blockDefinitionId: string;
|
|
650
|
-
|
|
675
|
+
/**
|
|
676
|
+
* A metric value entry. Applies to every metric.
|
|
677
|
+
*/
|
|
678
|
+
export interface StandardMetricValue {
|
|
651
679
|
/**
|
|
652
|
-
*
|
|
680
|
+
* Result state of this metric computation. SUCCESS carries a real `value`;
|
|
681
|
+
* NOT_APPLICABLE / DATA_MISSING / ERROR do not (the `value` field is omitted).
|
|
682
|
+
* Non-SUCCESS rows only appear when the request includes ?status=all.
|
|
653
683
|
*/
|
|
654
|
-
|
|
684
|
+
captureStatus: 'SUCCESS' | 'NOT_APPLICABLE' | 'DATA_MISSING' | 'ERROR';
|
|
655
685
|
|
|
656
686
|
/**
|
|
657
|
-
*
|
|
687
|
+
* ISO 8601 timestamp when the metric was computed
|
|
658
688
|
*/
|
|
659
|
-
|
|
689
|
+
computedAt: string;
|
|
660
690
|
|
|
661
691
|
/**
|
|
662
|
-
*
|
|
692
|
+
* Context level: CALL (entire conversation), SEGMENT (single segment),
|
|
693
|
+
* SEGMENT_RANGE (between/across segments)
|
|
663
694
|
*/
|
|
664
|
-
|
|
695
|
+
context: 'CALL' | 'SEGMENT' | 'SEGMENT_RANGE';
|
|
665
696
|
|
|
666
697
|
/**
|
|
667
|
-
*
|
|
698
|
+
* ID of the call this value was computed on. Only set when the response spans
|
|
699
|
+
* multiple conversations (e.g. job-scoped metric values).
|
|
668
700
|
*/
|
|
669
|
-
|
|
701
|
+
callId?: string;
|
|
670
702
|
|
|
671
703
|
/**
|
|
672
|
-
*
|
|
704
|
+
* ID of the chat this value was computed on. Only set when the response spans
|
|
705
|
+
* multiple conversations (e.g. job-scoped metric values).
|
|
673
706
|
*/
|
|
674
|
-
|
|
707
|
+
chatId?: string;
|
|
675
708
|
|
|
676
709
|
/**
|
|
677
|
-
*
|
|
710
|
+
* Confidence score (0-1) for the computed value. Defaults to 1.0 for deterministic
|
|
711
|
+
* metrics. Omitted on non-SUCCESS rows.
|
|
678
712
|
*/
|
|
679
|
-
|
|
713
|
+
confidence?: number;
|
|
680
714
|
|
|
681
715
|
/**
|
|
682
|
-
*
|
|
716
|
+
* Error detail when captureStatus is ERROR — e.g. provider down, LLM timeout.
|
|
717
|
+
* Undefined for other statuses.
|
|
683
718
|
*/
|
|
684
|
-
|
|
685
|
-
}
|
|
719
|
+
errorMessage?: string;
|
|
686
720
|
|
|
687
|
-
export interface Evaluator {
|
|
688
721
|
/**
|
|
689
|
-
*
|
|
722
|
+
* Starting segment information (for SEGMENT_RANGE context metrics)
|
|
690
723
|
*/
|
|
691
|
-
|
|
724
|
+
fromSegment?: StandardMetricValue.FromSegment;
|
|
692
725
|
|
|
693
726
|
/**
|
|
694
|
-
*
|
|
727
|
+
* Role of participant (only for PER_PARTICIPANT metrics)
|
|
695
728
|
*/
|
|
696
|
-
|
|
729
|
+
participantRole?: 'agent' | 'customer';
|
|
697
730
|
|
|
698
731
|
/**
|
|
699
|
-
*
|
|
732
|
+
* IDs of metric policies that triggered this metric computation
|
|
700
733
|
*/
|
|
701
|
-
|
|
702
|
-
}
|
|
734
|
+
policyIds?: Array<string>;
|
|
703
735
|
|
|
704
|
-
export interface Evidence {
|
|
705
736
|
/**
|
|
706
|
-
*
|
|
737
|
+
* Segment information (for SEGMENT context metrics)
|
|
707
738
|
*/
|
|
708
|
-
|
|
739
|
+
segment?: StandardMetricValue.Segment;
|
|
709
740
|
|
|
710
741
|
/**
|
|
711
|
-
*
|
|
742
|
+
* Ending segment information (for SEGMENT_RANGE context metrics)
|
|
712
743
|
*/
|
|
713
|
-
|
|
744
|
+
toSegment?: StandardMetricValue.ToSegment;
|
|
714
745
|
|
|
715
746
|
/**
|
|
716
|
-
*
|
|
747
|
+
* The metric value (type depends on outputType). Present only on SUCCESS rows;
|
|
748
|
+
* omitted for NOT_APPLICABLE / DATA_MISSING / ERROR.
|
|
717
749
|
*/
|
|
718
|
-
|
|
750
|
+
value?: number | boolean | string;
|
|
719
751
|
|
|
720
752
|
/**
|
|
721
|
-
*
|
|
753
|
+
* Explanation for the metric value (especially useful for AI-computed metrics)
|
|
722
754
|
*/
|
|
723
|
-
|
|
755
|
+
valueReasoning?: string;
|
|
724
756
|
}
|
|
725
757
|
|
|
726
|
-
export
|
|
758
|
+
export namespace StandardMetricValue {
|
|
727
759
|
/**
|
|
728
|
-
*
|
|
760
|
+
* Starting segment information (for SEGMENT_RANGE context metrics)
|
|
729
761
|
*/
|
|
730
|
-
|
|
762
|
+
export interface FromSegment {
|
|
763
|
+
/**
|
|
764
|
+
* Segment ID
|
|
765
|
+
*/
|
|
766
|
+
id: string;
|
|
731
767
|
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
768
|
+
/**
|
|
769
|
+
* End time offset in milliseconds
|
|
770
|
+
*/
|
|
771
|
+
endOffsetMs: number;
|
|
736
772
|
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
773
|
+
/**
|
|
774
|
+
* Start time offset in milliseconds
|
|
775
|
+
*/
|
|
776
|
+
startOffsetMs: number;
|
|
741
777
|
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
778
|
+
/**
|
|
779
|
+
* Segment text content
|
|
780
|
+
*/
|
|
781
|
+
text: string;
|
|
782
|
+
}
|
|
746
783
|
|
|
747
784
|
/**
|
|
748
|
-
*
|
|
785
|
+
* Segment information (for SEGMENT context metrics)
|
|
749
786
|
*/
|
|
750
|
-
|
|
787
|
+
export interface Segment {
|
|
788
|
+
/**
|
|
789
|
+
* Segment ID
|
|
790
|
+
*/
|
|
791
|
+
id: string;
|
|
751
792
|
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
793
|
+
/**
|
|
794
|
+
* End time offset in milliseconds
|
|
795
|
+
*/
|
|
796
|
+
endOffsetMs: number;
|
|
756
797
|
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
798
|
+
/**
|
|
799
|
+
* Start time offset in milliseconds
|
|
800
|
+
*/
|
|
801
|
+
startOffsetMs: number;
|
|
761
802
|
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
803
|
+
/**
|
|
804
|
+
* Segment text content
|
|
805
|
+
*/
|
|
806
|
+
text: string;
|
|
807
|
+
}
|
|
766
808
|
|
|
767
809
|
/**
|
|
768
|
-
*
|
|
810
|
+
* Ending segment information (for SEGMENT_RANGE context metrics)
|
|
769
811
|
*/
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
export interface CallListMetricsResponse {
|
|
776
|
-
/**
|
|
777
|
-
* Call metrics response payload grouped by metric definition
|
|
778
|
-
*/
|
|
779
|
-
data: Array<CallListMetricsResponse.Data>;
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
export namespace CallListMetricsResponse {
|
|
783
|
-
/**
|
|
784
|
-
* Call metric data grouped by metric definition
|
|
785
|
-
*/
|
|
786
|
-
export interface Data {
|
|
787
|
-
/**
|
|
788
|
-
* Description of what the metric measures
|
|
789
|
-
*/
|
|
790
|
-
description: string;
|
|
791
|
-
|
|
792
|
-
/**
|
|
793
|
-
* Unique identifier for the metric definition
|
|
794
|
-
*/
|
|
795
|
-
metricDefinitionId: string;
|
|
796
|
-
|
|
797
|
-
/**
|
|
798
|
-
* Stable metric identifier
|
|
799
|
-
*/
|
|
800
|
-
metricId: string;
|
|
801
|
-
|
|
802
|
-
/**
|
|
803
|
-
* Name of the metric
|
|
804
|
-
*/
|
|
805
|
-
name: string;
|
|
812
|
+
export interface ToSegment {
|
|
813
|
+
/**
|
|
814
|
+
* Segment ID
|
|
815
|
+
*/
|
|
816
|
+
id: string;
|
|
806
817
|
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
818
|
+
/**
|
|
819
|
+
* End time offset in milliseconds
|
|
820
|
+
*/
|
|
821
|
+
endOffsetMs: number;
|
|
811
822
|
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
823
|
+
/**
|
|
824
|
+
* Start time offset in milliseconds
|
|
825
|
+
*/
|
|
826
|
+
startOffsetMs: number;
|
|
816
827
|
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
828
|
+
/**
|
|
829
|
+
* Segment text content
|
|
830
|
+
*/
|
|
831
|
+
text: string;
|
|
832
|
+
}
|
|
833
|
+
}
|
|
822
834
|
|
|
823
835
|
/**
|
|
824
|
-
*
|
|
836
|
+
* Returned for the Property Mismatch metric (`property_transcript_mismatch`): the
|
|
837
|
+
* standard entry plus the per-property verdict breakdown.
|
|
825
838
|
*/
|
|
826
|
-
|
|
827
|
-
|
|
839
|
+
export interface PropertyVerificationMetricValue {
|
|
840
|
+
/**
|
|
841
|
+
* Result state of this metric computation. SUCCESS carries a real `value`;
|
|
842
|
+
* NOT_APPLICABLE / DATA_MISSING / ERROR do not (the `value` field is omitted).
|
|
843
|
+
* Non-SUCCESS rows only appear when the request includes ?status=all.
|
|
844
|
+
*/
|
|
845
|
+
captureStatus: 'SUCCESS' | 'NOT_APPLICABLE' | 'DATA_MISSING' | 'ERROR';
|
|
828
846
|
|
|
829
|
-
export namespace Data {
|
|
830
|
-
export interface Value {
|
|
831
847
|
/**
|
|
832
848
|
* ISO 8601 timestamp when the metric was computed
|
|
833
849
|
*/
|
|
834
850
|
computedAt: string;
|
|
835
851
|
|
|
836
852
|
/**
|
|
837
|
-
*
|
|
838
|
-
*
|
|
853
|
+
* Context level: CALL (entire conversation), SEGMENT (single segment),
|
|
854
|
+
* SEGMENT_RANGE (between/across segments)
|
|
839
855
|
*/
|
|
840
|
-
|
|
856
|
+
context: 'CALL' | 'SEGMENT' | 'SEGMENT_RANGE';
|
|
841
857
|
|
|
842
858
|
/**
|
|
843
|
-
*
|
|
844
|
-
* (
|
|
859
|
+
* ID of the call this value was computed on. Only set when the response spans
|
|
860
|
+
* multiple conversations (e.g. job-scoped metric values).
|
|
845
861
|
*/
|
|
846
|
-
|
|
862
|
+
callId?: string;
|
|
847
863
|
|
|
848
864
|
/**
|
|
849
|
-
*
|
|
865
|
+
* ID of the chat this value was computed on. Only set when the response spans
|
|
866
|
+
* multiple conversations (e.g. job-scoped metric values).
|
|
850
867
|
*/
|
|
851
|
-
|
|
868
|
+
chatId?: string;
|
|
869
|
+
|
|
870
|
+
/**
|
|
871
|
+
* Confidence score (0-1) for the computed value. Defaults to 1.0 for deterministic
|
|
872
|
+
* metrics. Omitted on non-SUCCESS rows.
|
|
873
|
+
*/
|
|
874
|
+
confidence?: number;
|
|
875
|
+
|
|
876
|
+
/**
|
|
877
|
+
* Error detail when captureStatus is ERROR — e.g. provider down, LLM timeout.
|
|
878
|
+
* Undefined for other statuses.
|
|
879
|
+
*/
|
|
880
|
+
errorMessage?: string;
|
|
852
881
|
|
|
853
882
|
/**
|
|
854
883
|
* Starting segment information (for SEGMENT_RANGE context metrics)
|
|
855
884
|
*/
|
|
856
|
-
fromSegment?:
|
|
885
|
+
fromSegment?: PropertyVerificationMetricValue.FromSegment;
|
|
857
886
|
|
|
858
887
|
/**
|
|
859
888
|
* Role of participant (only for PER_PARTICIPANT metrics)
|
|
@@ -865,15 +894,27 @@ export namespace CallListMetricsResponse {
|
|
|
865
894
|
*/
|
|
866
895
|
policyIds?: Array<string>;
|
|
867
896
|
|
|
897
|
+
/**
|
|
898
|
+
* Per-property verdicts for the Property Mismatch metric, in the order the
|
|
899
|
+
* properties were checked. Omitted for every other metric.
|
|
900
|
+
*/
|
|
901
|
+
propertyVerdicts?: Array<PropertyVerificationMetricValue.PropertyVerdict>;
|
|
902
|
+
|
|
868
903
|
/**
|
|
869
904
|
* Segment information (for SEGMENT context metrics)
|
|
870
905
|
*/
|
|
871
|
-
segment?:
|
|
906
|
+
segment?: PropertyVerificationMetricValue.Segment;
|
|
872
907
|
|
|
873
908
|
/**
|
|
874
909
|
* Ending segment information (for SEGMENT_RANGE context metrics)
|
|
875
910
|
*/
|
|
876
|
-
toSegment?:
|
|
911
|
+
toSegment?: PropertyVerificationMetricValue.ToSegment;
|
|
912
|
+
|
|
913
|
+
/**
|
|
914
|
+
* The metric value (type depends on outputType). Present only on SUCCESS rows;
|
|
915
|
+
* omitted for NOT_APPLICABLE / DATA_MISSING / ERROR.
|
|
916
|
+
*/
|
|
917
|
+
value?: number | boolean | string;
|
|
877
918
|
|
|
878
919
|
/**
|
|
879
920
|
* Explanation for the metric value (especially useful for AI-computed metrics)
|
|
@@ -881,13 +922,13 @@ export namespace CallListMetricsResponse {
|
|
|
881
922
|
valueReasoning?: string;
|
|
882
923
|
}
|
|
883
924
|
|
|
884
|
-
export namespace
|
|
925
|
+
export namespace PropertyVerificationMetricValue {
|
|
885
926
|
/**
|
|
886
927
|
* Starting segment information (for SEGMENT_RANGE context metrics)
|
|
887
928
|
*/
|
|
888
929
|
export interface FromSegment {
|
|
889
930
|
/**
|
|
890
|
-
*
|
|
931
|
+
* Segment ID
|
|
891
932
|
*/
|
|
892
933
|
id: string;
|
|
893
934
|
|
|
@@ -902,11 +943,75 @@ export namespace CallListMetricsResponse {
|
|
|
902
943
|
startOffsetMs: number;
|
|
903
944
|
|
|
904
945
|
/**
|
|
905
|
-
*
|
|
946
|
+
* Segment text content
|
|
906
947
|
*/
|
|
907
948
|
text: string;
|
|
908
949
|
}
|
|
909
950
|
|
|
951
|
+
export interface PropertyVerdict {
|
|
952
|
+
/**
|
|
953
|
+
* The value supplied at ingest, frozen at scoring time
|
|
954
|
+
*/
|
|
955
|
+
expectedValue: string;
|
|
956
|
+
|
|
957
|
+
/**
|
|
958
|
+
* The call property checked, as sent at ingest
|
|
959
|
+
*/
|
|
960
|
+
propertyName: string;
|
|
961
|
+
|
|
962
|
+
/**
|
|
963
|
+
* How this property resolved against the transcript. NOT_MENTIONED means the
|
|
964
|
+
* subject never came up and is not a mismatch.
|
|
965
|
+
*/
|
|
966
|
+
verdict: 'MATCH' | 'MISMATCH' | 'NOT_MENTIONED';
|
|
967
|
+
|
|
968
|
+
/**
|
|
969
|
+
* What the transcript said instead. Only present when verdict is MISMATCH.
|
|
970
|
+
*/
|
|
971
|
+
observedValue?: string;
|
|
972
|
+
|
|
973
|
+
/**
|
|
974
|
+
* Judge reasoning for this verdict
|
|
975
|
+
*/
|
|
976
|
+
reasoning?: string;
|
|
977
|
+
|
|
978
|
+
/**
|
|
979
|
+
* The transcript segment this property was referred to in: the conflicting value
|
|
980
|
+
* for MISMATCH, the confirming reference for MATCH. Omitted for NOT_MENTIONED and
|
|
981
|
+
* when the verdict could not be anchored.
|
|
982
|
+
*/
|
|
983
|
+
segment?: PropertyVerdict.Segment;
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
export namespace PropertyVerdict {
|
|
987
|
+
/**
|
|
988
|
+
* The transcript segment this property was referred to in: the conflicting value
|
|
989
|
+
* for MISMATCH, the confirming reference for MATCH. Omitted for NOT_MENTIONED and
|
|
990
|
+
* when the verdict could not be anchored.
|
|
991
|
+
*/
|
|
992
|
+
export interface Segment {
|
|
993
|
+
/**
|
|
994
|
+
* Segment ID
|
|
995
|
+
*/
|
|
996
|
+
id: string;
|
|
997
|
+
|
|
998
|
+
/**
|
|
999
|
+
* End time offset in milliseconds
|
|
1000
|
+
*/
|
|
1001
|
+
endOffsetMs: number;
|
|
1002
|
+
|
|
1003
|
+
/**
|
|
1004
|
+
* Start time offset in milliseconds
|
|
1005
|
+
*/
|
|
1006
|
+
startOffsetMs: number;
|
|
1007
|
+
|
|
1008
|
+
/**
|
|
1009
|
+
* Segment text content
|
|
1010
|
+
*/
|
|
1011
|
+
text: string;
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
|
|
910
1015
|
/**
|
|
911
1016
|
* Segment information (for SEGMENT context metrics)
|
|
912
1017
|
*/
|
|
@@ -937,7 +1042,7 @@ export namespace CallListMetricsResponse {
|
|
|
937
1042
|
*/
|
|
938
1043
|
export interface ToSegment {
|
|
939
1044
|
/**
|
|
940
|
-
*
|
|
1045
|
+
* Segment ID
|
|
941
1046
|
*/
|
|
942
1047
|
id: string;
|
|
943
1048
|
|
|
@@ -952,7 +1057,7 @@ export namespace CallListMetricsResponse {
|
|
|
952
1057
|
startOffsetMs: number;
|
|
953
1058
|
|
|
954
1059
|
/**
|
|
955
|
-
*
|
|
1060
|
+
* Segment text content
|
|
956
1061
|
*/
|
|
957
1062
|
text: string;
|
|
958
1063
|
}
|
|
@@ -1085,6 +1190,20 @@ export interface CallCreateParams {
|
|
|
1085
1190
|
| 'MAX_DURATION_REACHED'
|
|
1086
1191
|
| 'UNKNOWN';
|
|
1087
1192
|
|
|
1193
|
+
/**
|
|
1194
|
+
* A stable identifier from your own system (e.g. session ID, conversation ID) used
|
|
1195
|
+
* to correlate this call with OpenTelemetry traces. Set the same value as a
|
|
1196
|
+
* `roark.external_id` span or resource attribute on your traces and the matching
|
|
1197
|
+
* trace will be linked automatically. Must be unique within a project.
|
|
1198
|
+
*/
|
|
1199
|
+
externalId?: string;
|
|
1200
|
+
|
|
1201
|
+
/**
|
|
1202
|
+
* The LiveKit Cloud room ID to link this call with OpenTelemetry trace data from
|
|
1203
|
+
* LiveKit. Used for matching calls with OTEL traces.
|
|
1204
|
+
*/
|
|
1205
|
+
livekitRoomId?: string;
|
|
1206
|
+
|
|
1088
1207
|
/**
|
|
1089
1208
|
* Custom properties to include with the call. These can be used for filtering and
|
|
1090
1209
|
* will show in the call details page
|
|
@@ -1106,6 +1225,12 @@ export interface CallCreateParams {
|
|
|
1106
1225
|
* List of transcript entries made during the call
|
|
1107
1226
|
*/
|
|
1108
1227
|
transcript?: Array<CallCreateParams.TranscriptEntryAgent | CallCreateParams.TranscriptEntryCustomer>;
|
|
1228
|
+
|
|
1229
|
+
/**
|
|
1230
|
+
* The Vapi call ID (UUID) to link this call with OpenTelemetry trace data from
|
|
1231
|
+
* Vapi. Used for matching calls with OTEL traces.
|
|
1232
|
+
*/
|
|
1233
|
+
vapiCallId?: string;
|
|
1109
1234
|
}
|
|
1110
1235
|
|
|
1111
1236
|
export namespace CallCreateParams {
|
|
@@ -1567,8 +1692,14 @@ export namespace CallCreateParams {
|
|
|
1567
1692
|
* the agents array this tool invocation belongs to
|
|
1568
1693
|
*/
|
|
1569
1694
|
export interface Agent {
|
|
1695
|
+
/**
|
|
1696
|
+
* The custom ID set on the agent
|
|
1697
|
+
*/
|
|
1570
1698
|
customId?: string;
|
|
1571
1699
|
|
|
1700
|
+
/**
|
|
1701
|
+
* The Roark ID of the agent
|
|
1702
|
+
*/
|
|
1572
1703
|
roarkId?: string;
|
|
1573
1704
|
}
|
|
1574
1705
|
}
|
|
@@ -1582,15 +1713,31 @@ export namespace CallCreateParams {
|
|
|
1582
1713
|
|
|
1583
1714
|
text: string;
|
|
1584
1715
|
|
|
1716
|
+
/**
|
|
1717
|
+
* Metadata about the agent that spoke this turn - used to match which agent from
|
|
1718
|
+
* the `agents` array this transcript entry belongs to
|
|
1719
|
+
*/
|
|
1585
1720
|
agent?: TranscriptEntryAgent.Agent;
|
|
1586
1721
|
|
|
1587
1722
|
languageCode?: string;
|
|
1723
|
+
|
|
1724
|
+
payload?: { [key: string]: unknown } | null;
|
|
1588
1725
|
}
|
|
1589
1726
|
|
|
1590
1727
|
export namespace TranscriptEntryAgent {
|
|
1728
|
+
/**
|
|
1729
|
+
* Metadata about the agent that spoke this turn - used to match which agent from
|
|
1730
|
+
* the `agents` array this transcript entry belongs to
|
|
1731
|
+
*/
|
|
1591
1732
|
export interface Agent {
|
|
1733
|
+
/**
|
|
1734
|
+
* The custom ID set on the agent
|
|
1735
|
+
*/
|
|
1592
1736
|
customId?: string;
|
|
1593
1737
|
|
|
1738
|
+
/**
|
|
1739
|
+
* The Roark ID of the agent
|
|
1740
|
+
*/
|
|
1594
1741
|
roarkId?: string;
|
|
1595
1742
|
}
|
|
1596
1743
|
}
|
|
@@ -1611,6 +1758,8 @@ export namespace CallCreateParams {
|
|
|
1611
1758
|
customer?: TranscriptEntryCustomer.Customer;
|
|
1612
1759
|
|
|
1613
1760
|
languageCode?: string;
|
|
1761
|
+
|
|
1762
|
+
payload?: { [key: string]: unknown } | null;
|
|
1614
1763
|
}
|
|
1615
1764
|
|
|
1616
1765
|
export namespace TranscriptEntryCustomer {
|
|
@@ -1686,6 +1835,15 @@ export interface CallListMetricsParams {
|
|
|
1686
1835
|
* false)
|
|
1687
1836
|
*/
|
|
1688
1837
|
flatten?: string;
|
|
1838
|
+
|
|
1839
|
+
/**
|
|
1840
|
+
* Filter metrics by capture status. `success` (default) returns only successfully
|
|
1841
|
+
* computed metrics — backwards-compatible with the historical behavior. `all` also
|
|
1842
|
+
* returns NOT_APPLICABLE / DATA_MISSING / ERROR rows (with `value` omitted), so
|
|
1843
|
+
* clients can distinguish "still computing" from "computed but no value" and exit
|
|
1844
|
+
* retry loops correctly.
|
|
1845
|
+
*/
|
|
1846
|
+
status?: 'success' | 'all';
|
|
1689
1847
|
}
|
|
1690
1848
|
|
|
1691
1849
|
export declare namespace Call {
|
|
@@ -1694,7 +1852,6 @@ export declare namespace Call {
|
|
|
1694
1852
|
type CallListResponse as CallListResponse,
|
|
1695
1853
|
type CallGetByIDResponse as CallGetByIDResponse,
|
|
1696
1854
|
type CallGetTranscriptResponse as CallGetTranscriptResponse,
|
|
1697
|
-
type CallListEvaluationRunsResponse as CallListEvaluationRunsResponse,
|
|
1698
1855
|
type CallListMetricsResponse as CallListMetricsResponse,
|
|
1699
1856
|
type CallListSentimentRunsResponse as CallListSentimentRunsResponse,
|
|
1700
1857
|
type CallCreateParams as CallCreateParams,
|