@roarkanalytics/sdk 2.31.0 → 2.33.1
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 +69 -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 +303 -155
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +303 -155
- 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 +326 -169
- 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/resources/call.d.ts
CHANGED
|
@@ -19,13 +19,14 @@ export declare class Call extends APIResource {
|
|
|
19
19
|
* transcription source; otherwise the best available source is used automatically.
|
|
20
20
|
*/
|
|
21
21
|
getTranscript(callID: string, query?: CallGetTranscriptParams | null | undefined, options?: RequestOptions): APIPromise<CallGetTranscriptResponse>;
|
|
22
|
-
/**
|
|
23
|
-
* Fetch all evaluation run results for a specific call.
|
|
24
|
-
*/
|
|
25
|
-
listEvaluationRuns(callID: string, options?: RequestOptions): APIPromise<CallListEvaluationRunsResponse>;
|
|
26
22
|
/**
|
|
27
23
|
* Fetch all call-level metrics for a specific call, including both
|
|
28
|
-
* system-generated and custom metrics. Only returns
|
|
24
|
+
* system-generated and custom metrics. Only returns rows from the **latest**
|
|
25
|
+
* metric-collection job per metric — if the same metric has been recomputed, prior
|
|
26
|
+
* runs are excluded and remain in the metric history. By default returns only
|
|
27
|
+
* successfully computed metrics; pass `?status=all` to also include rows that
|
|
28
|
+
* resolved as NOT_APPLICABLE / DATA_MISSING / ERROR (the `value` field is omitted
|
|
29
|
+
* on those entries — check `captureStatus`).
|
|
29
30
|
*/
|
|
30
31
|
listMetrics(callID: string, query?: CallListMetricsParams | null | undefined, options?: RequestOptions): APIPromise<CallListMetricsResponse>;
|
|
31
32
|
/**
|
|
@@ -56,6 +57,7 @@ export declare namespace CallCreateResponse {
|
|
|
56
57
|
callDirection: 'INBOUND' | 'OUTBOUND';
|
|
57
58
|
createdAt: string | null;
|
|
58
59
|
customers: Array<Data.Customer> | null;
|
|
60
|
+
externalId: string | null;
|
|
59
61
|
/**
|
|
60
62
|
* ID of the project this call belongs to
|
|
61
63
|
*/
|
|
@@ -105,6 +107,13 @@ export declare namespace CallListResponse {
|
|
|
105
107
|
* ID of the project this call belongs to
|
|
106
108
|
*/
|
|
107
109
|
projectId: string;
|
|
110
|
+
/**
|
|
111
|
+
* Indicates the status of `recordingUrl`. `AVAILABLE`: signed URL returned.
|
|
112
|
+
* `NOT_AVAILABLE`: no recording on file yet (e.g. still processing). `RESTRICTED`:
|
|
113
|
+
* the calling API key does not have the `recording:read` permission and the URL
|
|
114
|
+
* has been withheld.
|
|
115
|
+
*/
|
|
116
|
+
recordingUrlAccess: 'AVAILABLE' | 'NOT_AVAILABLE' | 'RESTRICTED';
|
|
108
117
|
/**
|
|
109
118
|
* Timestamp when the call started
|
|
110
119
|
*/
|
|
@@ -133,6 +142,11 @@ export declare namespace CallListResponse {
|
|
|
133
142
|
* Status indicating how the call ended
|
|
134
143
|
*/
|
|
135
144
|
endedStatus?: 'PARTICIPANTS_DID_NOT_SPEAK' | 'AGENT_DID_NOT_ANSWER' | 'AGENT_DID_NOT_SPEAK' | 'AGENT_STOPPED_SPEAKING' | 'AGENT_ENDED_CALL' | 'AGENT_TRANSFERRED_CALL' | 'AGENT_BUSY' | 'AGENT_ERROR' | 'CUSTOMER_ENDED_CALL' | 'VOICE_MAIL_REACHED' | 'SILENCE_TIME_OUT' | 'PHONE_CALL_PROVIDER_CONNECTION_ERROR' | 'CUSTOMER_DID_NOT_ANSWER' | 'CUSTOMER_DID_NOT_SPEAK' | 'CUSTOMER_STOPPED_SPEAKING' | 'CUSTOMER_BUSY' | 'DIAL_ERROR' | 'MAX_DURATION_REACHED' | 'UNKNOWN' | null;
|
|
145
|
+
/**
|
|
146
|
+
* Caller-supplied correlation ID echoed back from the create request, if any was
|
|
147
|
+
* provided
|
|
148
|
+
*/
|
|
149
|
+
externalId?: string | null;
|
|
136
150
|
/**
|
|
137
151
|
* IDs of metric policies that have been applied to this call
|
|
138
152
|
*/
|
|
@@ -227,6 +241,13 @@ export declare namespace CallGetByIDResponse {
|
|
|
227
241
|
* ID of the project this call belongs to
|
|
228
242
|
*/
|
|
229
243
|
projectId: string;
|
|
244
|
+
/**
|
|
245
|
+
* Indicates the status of `recordingUrl`. `AVAILABLE`: signed URL returned.
|
|
246
|
+
* `NOT_AVAILABLE`: no recording on file yet (e.g. still processing). `RESTRICTED`:
|
|
247
|
+
* the calling API key does not have the `recording:read` permission and the URL
|
|
248
|
+
* has been withheld.
|
|
249
|
+
*/
|
|
250
|
+
recordingUrlAccess: 'AVAILABLE' | 'NOT_AVAILABLE' | 'RESTRICTED';
|
|
230
251
|
/**
|
|
231
252
|
* Timestamp when the call started
|
|
232
253
|
*/
|
|
@@ -255,6 +276,11 @@ export declare namespace CallGetByIDResponse {
|
|
|
255
276
|
* Status indicating how the call ended
|
|
256
277
|
*/
|
|
257
278
|
endedStatus?: 'PARTICIPANTS_DID_NOT_SPEAK' | 'AGENT_DID_NOT_ANSWER' | 'AGENT_DID_NOT_SPEAK' | 'AGENT_STOPPED_SPEAKING' | 'AGENT_ENDED_CALL' | 'AGENT_TRANSFERRED_CALL' | 'AGENT_BUSY' | 'AGENT_ERROR' | 'CUSTOMER_ENDED_CALL' | 'VOICE_MAIL_REACHED' | 'SILENCE_TIME_OUT' | 'PHONE_CALL_PROVIDER_CONNECTION_ERROR' | 'CUSTOMER_DID_NOT_ANSWER' | 'CUSTOMER_DID_NOT_SPEAK' | 'CUSTOMER_STOPPED_SPEAKING' | 'CUSTOMER_BUSY' | 'DIAL_ERROR' | 'MAX_DURATION_REACHED' | 'UNKNOWN' | null;
|
|
279
|
+
/**
|
|
280
|
+
* Caller-supplied correlation ID echoed back from the create request, if any was
|
|
281
|
+
* provided
|
|
282
|
+
*/
|
|
283
|
+
externalId?: string | null;
|
|
258
284
|
/**
|
|
259
285
|
* IDs of metric policies that have been applied to this call
|
|
260
286
|
*/
|
|
@@ -418,227 +444,234 @@ export declare namespace CallGetTranscriptResponse {
|
|
|
418
444
|
}
|
|
419
445
|
}
|
|
420
446
|
}
|
|
421
|
-
export interface
|
|
447
|
+
export interface CallListMetricsResponse {
|
|
422
448
|
/**
|
|
423
|
-
*
|
|
449
|
+
* Conversation metrics response payload grouped by metric definition
|
|
424
450
|
*/
|
|
425
|
-
data: Array<
|
|
451
|
+
data: Array<CallListMetricsResponse.Data>;
|
|
426
452
|
}
|
|
427
|
-
export declare namespace
|
|
453
|
+
export declare namespace CallListMetricsResponse {
|
|
454
|
+
/**
|
|
455
|
+
* Metric data grouped by metric definition
|
|
456
|
+
*/
|
|
428
457
|
interface Data {
|
|
429
458
|
/**
|
|
430
|
-
*
|
|
459
|
+
* Description of what the metric measures
|
|
431
460
|
*/
|
|
432
|
-
|
|
433
|
-
evaluator: Data.Evaluator;
|
|
434
|
-
evidence: Array<Data.Evidence>;
|
|
435
|
-
metrics: Array<Data.Metric>;
|
|
461
|
+
description: string;
|
|
436
462
|
/**
|
|
437
|
-
*
|
|
463
|
+
* Unique identifier for the metric definition
|
|
438
464
|
*/
|
|
439
|
-
|
|
465
|
+
metricDefinitionId: string;
|
|
440
466
|
/**
|
|
441
|
-
*
|
|
467
|
+
* Alias of `slug` retained for backwards compatibility. Same value as `slug`.
|
|
442
468
|
*/
|
|
443
|
-
|
|
469
|
+
metricId: string;
|
|
444
470
|
/**
|
|
445
|
-
*
|
|
471
|
+
* Name of the metric
|
|
446
472
|
*/
|
|
447
|
-
|
|
473
|
+
name: string;
|
|
448
474
|
/**
|
|
449
|
-
*
|
|
450
|
-
* SKIPPED)
|
|
475
|
+
* Whether metric is global or per-participant
|
|
451
476
|
*/
|
|
452
|
-
|
|
477
|
+
scope: 'GLOBAL' | 'PER_PARTICIPANT';
|
|
453
478
|
/**
|
|
454
|
-
*
|
|
479
|
+
* Stable metric slug
|
|
455
480
|
*/
|
|
456
|
-
|
|
481
|
+
slug: string;
|
|
457
482
|
/**
|
|
458
|
-
*
|
|
483
|
+
* Type of value this metric produces
|
|
459
484
|
*/
|
|
460
|
-
|
|
485
|
+
type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET';
|
|
461
486
|
/**
|
|
462
|
-
*
|
|
487
|
+
* Array of metric values (multiple for PER_PARTICIPANT metrics, or multiple
|
|
488
|
+
* segments/turns)
|
|
463
489
|
*/
|
|
464
|
-
|
|
490
|
+
values: Array<Data.StandardMetricValue | Data.PropertyVerificationMetricValue>;
|
|
491
|
+
/**
|
|
492
|
+
* Unit information if applicable
|
|
493
|
+
*/
|
|
494
|
+
unit?: Data.Unit;
|
|
465
495
|
}
|
|
466
496
|
namespace Data {
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
blockDefinitionId: string;
|
|
497
|
+
/**
|
|
498
|
+
* A metric value entry. Applies to every metric.
|
|
499
|
+
*/
|
|
500
|
+
interface StandardMetricValue {
|
|
472
501
|
/**
|
|
473
|
-
*
|
|
502
|
+
* Result state of this metric computation. SUCCESS carries a real `value`;
|
|
503
|
+
* NOT_APPLICABLE / DATA_MISSING / ERROR do not (the `value` field is omitted).
|
|
504
|
+
* Non-SUCCESS rows only appear when the request includes ?status=all.
|
|
474
505
|
*/
|
|
475
|
-
|
|
506
|
+
captureStatus: 'SUCCESS' | 'NOT_APPLICABLE' | 'DATA_MISSING' | 'ERROR';
|
|
476
507
|
/**
|
|
477
|
-
*
|
|
508
|
+
* ISO 8601 timestamp when the metric was computed
|
|
478
509
|
*/
|
|
479
|
-
|
|
510
|
+
computedAt: string;
|
|
480
511
|
/**
|
|
481
|
-
*
|
|
512
|
+
* Context level: CALL (entire conversation), SEGMENT (single segment),
|
|
513
|
+
* SEGMENT_RANGE (between/across segments)
|
|
482
514
|
*/
|
|
483
|
-
|
|
515
|
+
context: 'CALL' | 'SEGMENT' | 'SEGMENT_RANGE';
|
|
484
516
|
/**
|
|
485
|
-
*
|
|
517
|
+
* ID of the call this value was computed on. Only set when the response spans
|
|
518
|
+
* multiple conversations (e.g. job-scoped metric values).
|
|
486
519
|
*/
|
|
487
|
-
|
|
520
|
+
callId?: string;
|
|
488
521
|
/**
|
|
489
|
-
*
|
|
522
|
+
* ID of the chat this value was computed on. Only set when the response spans
|
|
523
|
+
* multiple conversations (e.g. job-scoped metric values).
|
|
490
524
|
*/
|
|
491
|
-
|
|
525
|
+
chatId?: string;
|
|
492
526
|
/**
|
|
493
|
-
*
|
|
527
|
+
* Confidence score (0-1) for the computed value. Defaults to 1.0 for deterministic
|
|
528
|
+
* metrics. Omitted on non-SUCCESS rows.
|
|
494
529
|
*/
|
|
495
|
-
|
|
530
|
+
confidence?: number;
|
|
496
531
|
/**
|
|
497
|
-
*
|
|
532
|
+
* Error detail when captureStatus is ERROR — e.g. provider down, LLM timeout.
|
|
533
|
+
* Undefined for other statuses.
|
|
498
534
|
*/
|
|
499
|
-
|
|
500
|
-
}
|
|
501
|
-
interface Evaluator {
|
|
535
|
+
errorMessage?: string;
|
|
502
536
|
/**
|
|
503
|
-
*
|
|
537
|
+
* Starting segment information (for SEGMENT_RANGE context metrics)
|
|
504
538
|
*/
|
|
505
|
-
|
|
539
|
+
fromSegment?: StandardMetricValue.FromSegment;
|
|
506
540
|
/**
|
|
507
|
-
*
|
|
541
|
+
* Role of participant (only for PER_PARTICIPANT metrics)
|
|
508
542
|
*/
|
|
509
|
-
|
|
543
|
+
participantRole?: 'agent' | 'customer';
|
|
510
544
|
/**
|
|
511
|
-
*
|
|
545
|
+
* IDs of metric policies that triggered this metric computation
|
|
512
546
|
*/
|
|
513
|
-
|
|
514
|
-
}
|
|
515
|
-
interface Evidence {
|
|
547
|
+
policyIds?: Array<string>;
|
|
516
548
|
/**
|
|
517
|
-
*
|
|
549
|
+
* Segment information (for SEGMENT context metrics)
|
|
518
550
|
*/
|
|
519
|
-
|
|
551
|
+
segment?: StandardMetricValue.Segment;
|
|
520
552
|
/**
|
|
521
|
-
*
|
|
553
|
+
* Ending segment information (for SEGMENT_RANGE context metrics)
|
|
522
554
|
*/
|
|
523
|
-
|
|
555
|
+
toSegment?: StandardMetricValue.ToSegment;
|
|
524
556
|
/**
|
|
525
|
-
*
|
|
557
|
+
* The metric value (type depends on outputType). Present only on SUCCESS rows;
|
|
558
|
+
* omitted for NOT_APPLICABLE / DATA_MISSING / ERROR.
|
|
526
559
|
*/
|
|
527
|
-
|
|
560
|
+
value?: number | boolean | string;
|
|
528
561
|
/**
|
|
529
|
-
*
|
|
562
|
+
* Explanation for the metric value (especially useful for AI-computed metrics)
|
|
530
563
|
*/
|
|
531
|
-
|
|
564
|
+
valueReasoning?: string;
|
|
532
565
|
}
|
|
533
|
-
|
|
534
|
-
/**
|
|
535
|
-
* Boolean value of the metric
|
|
536
|
-
*/
|
|
537
|
-
booleanValue: boolean | null;
|
|
566
|
+
namespace StandardMetricValue {
|
|
538
567
|
/**
|
|
539
|
-
*
|
|
540
|
-
*/
|
|
541
|
-
confidence: number | null;
|
|
542
|
-
/**
|
|
543
|
-
* Created at of the metric
|
|
568
|
+
* Starting segment information (for SEGMENT_RANGE context metrics)
|
|
544
569
|
*/
|
|
545
|
-
|
|
570
|
+
interface FromSegment {
|
|
571
|
+
/**
|
|
572
|
+
* Segment ID
|
|
573
|
+
*/
|
|
574
|
+
id: string;
|
|
575
|
+
/**
|
|
576
|
+
* End time offset in milliseconds
|
|
577
|
+
*/
|
|
578
|
+
endOffsetMs: number;
|
|
579
|
+
/**
|
|
580
|
+
* Start time offset in milliseconds
|
|
581
|
+
*/
|
|
582
|
+
startOffsetMs: number;
|
|
583
|
+
/**
|
|
584
|
+
* Segment text content
|
|
585
|
+
*/
|
|
586
|
+
text: string;
|
|
587
|
+
}
|
|
546
588
|
/**
|
|
547
|
-
*
|
|
589
|
+
* Segment information (for SEGMENT context metrics)
|
|
548
590
|
*/
|
|
549
|
-
|
|
591
|
+
interface Segment {
|
|
592
|
+
/**
|
|
593
|
+
* Segment ID
|
|
594
|
+
*/
|
|
595
|
+
id: string;
|
|
596
|
+
/**
|
|
597
|
+
* End time offset in milliseconds
|
|
598
|
+
*/
|
|
599
|
+
endOffsetMs: number;
|
|
600
|
+
/**
|
|
601
|
+
* Start time offset in milliseconds
|
|
602
|
+
*/
|
|
603
|
+
startOffsetMs: number;
|
|
604
|
+
/**
|
|
605
|
+
* Segment text content
|
|
606
|
+
*/
|
|
607
|
+
text: string;
|
|
608
|
+
}
|
|
550
609
|
/**
|
|
551
|
-
*
|
|
610
|
+
* Ending segment information (for SEGMENT_RANGE context metrics)
|
|
552
611
|
*/
|
|
553
|
-
|
|
612
|
+
interface ToSegment {
|
|
613
|
+
/**
|
|
614
|
+
* Segment ID
|
|
615
|
+
*/
|
|
616
|
+
id: string;
|
|
617
|
+
/**
|
|
618
|
+
* End time offset in milliseconds
|
|
619
|
+
*/
|
|
620
|
+
endOffsetMs: number;
|
|
621
|
+
/**
|
|
622
|
+
* Start time offset in milliseconds
|
|
623
|
+
*/
|
|
624
|
+
startOffsetMs: number;
|
|
625
|
+
/**
|
|
626
|
+
* Segment text content
|
|
627
|
+
*/
|
|
628
|
+
text: string;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* Returned for the Property Mismatch metric (`property_transcript_mismatch`): the
|
|
633
|
+
* standard entry plus the per-property verdict breakdown.
|
|
634
|
+
*/
|
|
635
|
+
interface PropertyVerificationMetricValue {
|
|
554
636
|
/**
|
|
555
|
-
*
|
|
637
|
+
* Result state of this metric computation. SUCCESS carries a real `value`;
|
|
638
|
+
* NOT_APPLICABLE / DATA_MISSING / ERROR do not (the `value` field is omitted).
|
|
639
|
+
* Non-SUCCESS rows only appear when the request includes ?status=all.
|
|
556
640
|
*/
|
|
557
|
-
|
|
641
|
+
captureStatus: 'SUCCESS' | 'NOT_APPLICABLE' | 'DATA_MISSING' | 'ERROR';
|
|
558
642
|
/**
|
|
559
|
-
*
|
|
643
|
+
* ISO 8601 timestamp when the metric was computed
|
|
560
644
|
*/
|
|
561
|
-
|
|
645
|
+
computedAt: string;
|
|
562
646
|
/**
|
|
563
|
-
*
|
|
647
|
+
* Context level: CALL (entire conversation), SEGMENT (single segment),
|
|
648
|
+
* SEGMENT_RANGE (between/across segments)
|
|
564
649
|
*/
|
|
565
|
-
|
|
650
|
+
context: 'CALL' | 'SEGMENT' | 'SEGMENT_RANGE';
|
|
566
651
|
/**
|
|
567
|
-
*
|
|
652
|
+
* ID of the call this value was computed on. Only set when the response spans
|
|
653
|
+
* multiple conversations (e.g. job-scoped metric values).
|
|
568
654
|
*/
|
|
569
|
-
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
export interface CallListMetricsResponse {
|
|
574
|
-
/**
|
|
575
|
-
* Conversation metrics response payload grouped by metric definition
|
|
576
|
-
*/
|
|
577
|
-
data: Array<CallListMetricsResponse.Data>;
|
|
578
|
-
}
|
|
579
|
-
export declare namespace CallListMetricsResponse {
|
|
580
|
-
/**
|
|
581
|
-
* Metric data grouped by metric definition
|
|
582
|
-
*/
|
|
583
|
-
interface Data {
|
|
584
|
-
/**
|
|
585
|
-
* Description of what the metric measures
|
|
586
|
-
*/
|
|
587
|
-
description: string;
|
|
588
|
-
/**
|
|
589
|
-
* Unique identifier for the metric definition
|
|
590
|
-
*/
|
|
591
|
-
metricDefinitionId: string;
|
|
592
|
-
/**
|
|
593
|
-
* Stable metric identifier
|
|
594
|
-
*/
|
|
595
|
-
metricId: string;
|
|
596
|
-
/**
|
|
597
|
-
* Name of the metric
|
|
598
|
-
*/
|
|
599
|
-
name: string;
|
|
600
|
-
/**
|
|
601
|
-
* Whether metric is global or per-participant
|
|
602
|
-
*/
|
|
603
|
-
scope: 'GLOBAL' | 'PER_PARTICIPANT';
|
|
604
|
-
/**
|
|
605
|
-
* Type of value this metric produces
|
|
606
|
-
*/
|
|
607
|
-
type: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET';
|
|
608
|
-
/**
|
|
609
|
-
* Array of metric values (multiple for PER_PARTICIPANT metrics, or multiple
|
|
610
|
-
* segments/turns)
|
|
611
|
-
*/
|
|
612
|
-
values: Array<Data.Value>;
|
|
613
|
-
/**
|
|
614
|
-
* Unit information if applicable
|
|
615
|
-
*/
|
|
616
|
-
unit?: Data.Unit;
|
|
617
|
-
}
|
|
618
|
-
namespace Data {
|
|
619
|
-
interface Value {
|
|
655
|
+
callId?: string;
|
|
620
656
|
/**
|
|
621
|
-
*
|
|
657
|
+
* ID of the chat this value was computed on. Only set when the response spans
|
|
658
|
+
* multiple conversations (e.g. job-scoped metric values).
|
|
622
659
|
*/
|
|
623
|
-
|
|
660
|
+
chatId?: string;
|
|
624
661
|
/**
|
|
625
662
|
* Confidence score (0-1) for the computed value. Defaults to 1.0 for deterministic
|
|
626
|
-
* metrics.
|
|
663
|
+
* metrics. Omitted on non-SUCCESS rows.
|
|
627
664
|
*/
|
|
628
|
-
confidence
|
|
665
|
+
confidence?: number;
|
|
629
666
|
/**
|
|
630
|
-
*
|
|
631
|
-
*
|
|
667
|
+
* Error detail when captureStatus is ERROR — e.g. provider down, LLM timeout.
|
|
668
|
+
* Undefined for other statuses.
|
|
632
669
|
*/
|
|
633
|
-
|
|
634
|
-
/**
|
|
635
|
-
* The metric value (type depends on outputType)
|
|
636
|
-
*/
|
|
637
|
-
value: number | boolean | string;
|
|
670
|
+
errorMessage?: string;
|
|
638
671
|
/**
|
|
639
672
|
* Starting segment information (for SEGMENT_RANGE context metrics)
|
|
640
673
|
*/
|
|
641
|
-
fromSegment?:
|
|
674
|
+
fromSegment?: PropertyVerificationMetricValue.FromSegment;
|
|
642
675
|
/**
|
|
643
676
|
* Role of participant (only for PER_PARTICIPANT metrics)
|
|
644
677
|
*/
|
|
@@ -647,20 +680,30 @@ export declare namespace CallListMetricsResponse {
|
|
|
647
680
|
* IDs of metric policies that triggered this metric computation
|
|
648
681
|
*/
|
|
649
682
|
policyIds?: Array<string>;
|
|
683
|
+
/**
|
|
684
|
+
* Per-property verdicts for the Property Mismatch metric, in the order the
|
|
685
|
+
* properties were checked. Omitted for every other metric.
|
|
686
|
+
*/
|
|
687
|
+
propertyVerdicts?: Array<PropertyVerificationMetricValue.PropertyVerdict>;
|
|
650
688
|
/**
|
|
651
689
|
* Segment information (for SEGMENT context metrics)
|
|
652
690
|
*/
|
|
653
|
-
segment?:
|
|
691
|
+
segment?: PropertyVerificationMetricValue.Segment;
|
|
654
692
|
/**
|
|
655
693
|
* Ending segment information (for SEGMENT_RANGE context metrics)
|
|
656
694
|
*/
|
|
657
|
-
toSegment?:
|
|
695
|
+
toSegment?: PropertyVerificationMetricValue.ToSegment;
|
|
696
|
+
/**
|
|
697
|
+
* The metric value (type depends on outputType). Present only on SUCCESS rows;
|
|
698
|
+
* omitted for NOT_APPLICABLE / DATA_MISSING / ERROR.
|
|
699
|
+
*/
|
|
700
|
+
value?: number | boolean | string;
|
|
658
701
|
/**
|
|
659
702
|
* Explanation for the metric value (especially useful for AI-computed metrics)
|
|
660
703
|
*/
|
|
661
704
|
valueReasoning?: string;
|
|
662
705
|
}
|
|
663
|
-
namespace
|
|
706
|
+
namespace PropertyVerificationMetricValue {
|
|
664
707
|
/**
|
|
665
708
|
* Starting segment information (for SEGMENT_RANGE context metrics)
|
|
666
709
|
*/
|
|
@@ -682,6 +725,60 @@ export declare namespace CallListMetricsResponse {
|
|
|
682
725
|
*/
|
|
683
726
|
text: string;
|
|
684
727
|
}
|
|
728
|
+
interface PropertyVerdict {
|
|
729
|
+
/**
|
|
730
|
+
* The value supplied at ingest, frozen at scoring time
|
|
731
|
+
*/
|
|
732
|
+
expectedValue: string;
|
|
733
|
+
/**
|
|
734
|
+
* The call property checked, as sent at ingest
|
|
735
|
+
*/
|
|
736
|
+
propertyName: string;
|
|
737
|
+
/**
|
|
738
|
+
* How this property resolved against the transcript. NOT_MENTIONED means the
|
|
739
|
+
* subject never came up and is not a mismatch.
|
|
740
|
+
*/
|
|
741
|
+
verdict: 'MATCH' | 'MISMATCH' | 'NOT_MENTIONED';
|
|
742
|
+
/**
|
|
743
|
+
* What the transcript said instead. Only present when verdict is MISMATCH.
|
|
744
|
+
*/
|
|
745
|
+
observedValue?: string;
|
|
746
|
+
/**
|
|
747
|
+
* Judge reasoning for this verdict
|
|
748
|
+
*/
|
|
749
|
+
reasoning?: string;
|
|
750
|
+
/**
|
|
751
|
+
* The transcript segment this property was referred to in: the conflicting value
|
|
752
|
+
* for MISMATCH, the confirming reference for MATCH. Omitted for NOT_MENTIONED and
|
|
753
|
+
* when the verdict could not be anchored.
|
|
754
|
+
*/
|
|
755
|
+
segment?: PropertyVerdict.Segment;
|
|
756
|
+
}
|
|
757
|
+
namespace PropertyVerdict {
|
|
758
|
+
/**
|
|
759
|
+
* The transcript segment this property was referred to in: the conflicting value
|
|
760
|
+
* for MISMATCH, the confirming reference for MATCH. Omitted for NOT_MENTIONED and
|
|
761
|
+
* when the verdict could not be anchored.
|
|
762
|
+
*/
|
|
763
|
+
interface Segment {
|
|
764
|
+
/**
|
|
765
|
+
* Segment ID
|
|
766
|
+
*/
|
|
767
|
+
id: string;
|
|
768
|
+
/**
|
|
769
|
+
* End time offset in milliseconds
|
|
770
|
+
*/
|
|
771
|
+
endOffsetMs: number;
|
|
772
|
+
/**
|
|
773
|
+
* Start time offset in milliseconds
|
|
774
|
+
*/
|
|
775
|
+
startOffsetMs: number;
|
|
776
|
+
/**
|
|
777
|
+
* Segment text content
|
|
778
|
+
*/
|
|
779
|
+
text: string;
|
|
780
|
+
}
|
|
781
|
+
}
|
|
685
782
|
/**
|
|
686
783
|
* Segment information (for SEGMENT context metrics)
|
|
687
784
|
*/
|
|
@@ -810,6 +907,18 @@ export interface CallCreateParams {
|
|
|
810
907
|
* High-level call end status, indicating how the call terminated
|
|
811
908
|
*/
|
|
812
909
|
endedStatus?: 'PARTICIPANTS_DID_NOT_SPEAK' | 'AGENT_DID_NOT_ANSWER' | 'AGENT_DID_NOT_SPEAK' | 'AGENT_STOPPED_SPEAKING' | 'AGENT_ENDED_CALL' | 'AGENT_TRANSFERRED_CALL' | 'AGENT_BUSY' | 'AGENT_ERROR' | 'CUSTOMER_ENDED_CALL' | 'VOICE_MAIL_REACHED' | 'SILENCE_TIME_OUT' | 'PHONE_CALL_PROVIDER_CONNECTION_ERROR' | 'CUSTOMER_DID_NOT_ANSWER' | 'CUSTOMER_DID_NOT_SPEAK' | 'CUSTOMER_STOPPED_SPEAKING' | 'CUSTOMER_BUSY' | 'DIAL_ERROR' | 'MAX_DURATION_REACHED' | 'UNKNOWN';
|
|
910
|
+
/**
|
|
911
|
+
* A stable identifier from your own system (e.g. session ID, conversation ID) used
|
|
912
|
+
* to correlate this call with OpenTelemetry traces. Set the same value as a
|
|
913
|
+
* `roark.external_id` span or resource attribute on your traces and the matching
|
|
914
|
+
* trace will be linked automatically. Must be unique within a project.
|
|
915
|
+
*/
|
|
916
|
+
externalId?: string;
|
|
917
|
+
/**
|
|
918
|
+
* The LiveKit Cloud room ID to link this call with OpenTelemetry trace data from
|
|
919
|
+
* LiveKit. Used for matching calls with OTEL traces.
|
|
920
|
+
*/
|
|
921
|
+
livekitRoomId?: string;
|
|
813
922
|
/**
|
|
814
923
|
* Custom properties to include with the call. These can be used for filtering and
|
|
815
924
|
* will show in the call details page
|
|
@@ -830,6 +939,11 @@ export interface CallCreateParams {
|
|
|
830
939
|
* List of transcript entries made during the call
|
|
831
940
|
*/
|
|
832
941
|
transcript?: Array<CallCreateParams.TranscriptEntryAgent | CallCreateParams.TranscriptEntryCustomer>;
|
|
942
|
+
/**
|
|
943
|
+
* The Vapi call ID (UUID) to link this call with OpenTelemetry trace data from
|
|
944
|
+
* Vapi. Used for matching calls with OTEL traces.
|
|
945
|
+
*/
|
|
946
|
+
vapiCallId?: string;
|
|
833
947
|
}
|
|
834
948
|
export declare namespace CallCreateParams {
|
|
835
949
|
interface AgentIdentificationByRoarkID {
|
|
@@ -1220,7 +1334,13 @@ export declare namespace CallCreateParams {
|
|
|
1220
1334
|
* the agents array this tool invocation belongs to
|
|
1221
1335
|
*/
|
|
1222
1336
|
interface Agent {
|
|
1337
|
+
/**
|
|
1338
|
+
* The custom ID set on the agent
|
|
1339
|
+
*/
|
|
1223
1340
|
customId?: string;
|
|
1341
|
+
/**
|
|
1342
|
+
* The Roark ID of the agent
|
|
1343
|
+
*/
|
|
1224
1344
|
roarkId?: string;
|
|
1225
1345
|
}
|
|
1226
1346
|
}
|
|
@@ -1229,12 +1349,29 @@ export declare namespace CallCreateParams {
|
|
|
1229
1349
|
role: 'AGENT';
|
|
1230
1350
|
startOffsetMs: number;
|
|
1231
1351
|
text: string;
|
|
1352
|
+
/**
|
|
1353
|
+
* Metadata about the agent that spoke this turn - used to match which agent from
|
|
1354
|
+
* the `agents` array this transcript entry belongs to
|
|
1355
|
+
*/
|
|
1232
1356
|
agent?: TranscriptEntryAgent.Agent;
|
|
1233
1357
|
languageCode?: string;
|
|
1358
|
+
payload?: {
|
|
1359
|
+
[key: string]: unknown;
|
|
1360
|
+
} | null;
|
|
1234
1361
|
}
|
|
1235
1362
|
namespace TranscriptEntryAgent {
|
|
1363
|
+
/**
|
|
1364
|
+
* Metadata about the agent that spoke this turn - used to match which agent from
|
|
1365
|
+
* the `agents` array this transcript entry belongs to
|
|
1366
|
+
*/
|
|
1236
1367
|
interface Agent {
|
|
1368
|
+
/**
|
|
1369
|
+
* The custom ID set on the agent
|
|
1370
|
+
*/
|
|
1237
1371
|
customId?: string;
|
|
1372
|
+
/**
|
|
1373
|
+
* The Roark ID of the agent
|
|
1374
|
+
*/
|
|
1238
1375
|
roarkId?: string;
|
|
1239
1376
|
}
|
|
1240
1377
|
}
|
|
@@ -1249,6 +1386,9 @@ export declare namespace CallCreateParams {
|
|
|
1249
1386
|
*/
|
|
1250
1387
|
customer?: TranscriptEntryCustomer.Customer;
|
|
1251
1388
|
languageCode?: string;
|
|
1389
|
+
payload?: {
|
|
1390
|
+
[key: string]: unknown;
|
|
1391
|
+
} | null;
|
|
1252
1392
|
}
|
|
1253
1393
|
namespace TranscriptEntryCustomer {
|
|
1254
1394
|
/**
|
|
@@ -1313,8 +1453,16 @@ export interface CallListMetricsParams {
|
|
|
1313
1453
|
* false)
|
|
1314
1454
|
*/
|
|
1315
1455
|
flatten?: string;
|
|
1456
|
+
/**
|
|
1457
|
+
* Filter metrics by capture status. `success` (default) returns only successfully
|
|
1458
|
+
* computed metrics — backwards-compatible with the historical behavior. `all` also
|
|
1459
|
+
* returns NOT_APPLICABLE / DATA_MISSING / ERROR rows (with `value` omitted), so
|
|
1460
|
+
* clients can distinguish "still computing" from "computed but no value" and exit
|
|
1461
|
+
* retry loops correctly.
|
|
1462
|
+
*/
|
|
1463
|
+
status?: 'success' | 'all';
|
|
1316
1464
|
}
|
|
1317
1465
|
export declare namespace Call {
|
|
1318
|
-
export { type CallCreateResponse as CallCreateResponse, type CallListResponse as CallListResponse, type CallGetByIDResponse as CallGetByIDResponse, type CallGetTranscriptResponse as CallGetTranscriptResponse, type
|
|
1466
|
+
export { type CallCreateResponse as CallCreateResponse, type CallListResponse as CallListResponse, type CallGetByIDResponse as CallGetByIDResponse, type CallGetTranscriptResponse as CallGetTranscriptResponse, type CallListMetricsResponse as CallListMetricsResponse, type CallListSentimentRunsResponse as CallListSentimentRunsResponse, type CallCreateParams as CallCreateParams, type CallListParams as CallListParams, type CallGetTranscriptParams as CallGetTranscriptParams, type CallListMetricsParams as CallListMetricsParams, };
|
|
1319
1467
|
}
|
|
1320
1468
|
//# sourceMappingURL=call.d.ts.map
|