@roarkanalytics/sdk 6.0.0 → 6.2.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 +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/call.d.mts +35 -11
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +35 -11
- package/resources/call.d.ts.map +1 -1
- package/resources/call.js +3 -1
- package/resources/call.js.map +1 -1
- package/resources/call.mjs +3 -1
- package/resources/call.mjs.map +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/live-report.d.mts +1830 -0
- package/resources/live-report.d.mts.map +1 -0
- package/resources/live-report.d.ts +1830 -0
- package/resources/live-report.d.ts.map +1 -0
- package/resources/live-report.js +131 -0
- package/resources/live-report.js.map +1 -0
- package/resources/live-report.mjs +127 -0
- package/resources/live-report.mjs.map +1 -0
- package/src/client.ts +37 -0
- package/src/resources/call.ts +37 -11
- package/src/resources/index.ts +17 -0
- package/src/resources/live-report.ts +3036 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,1830 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
export declare class LiveReport extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Saves a report on the project's live calls. Simulations are never included.
|
|
7
|
+
*
|
|
8
|
+
* Targets are analytics measures held to a bar: a threshold metric is read as its
|
|
9
|
+
* pass rate (`value` is a percentage, 0-100, held AT_LEAST by default); a numeric
|
|
10
|
+
* metric as its average (held AT_MOST by default). Every target is read for the
|
|
11
|
+
* period and the period before it, so the report says whether each was met and how
|
|
12
|
+
* it moved.
|
|
13
|
+
*
|
|
14
|
+
* Scheduled reports are written `deliveryHour` hours into the day after each
|
|
15
|
+
* period ends in `timezone` (a week runs Monday to Sunday), then emailed and
|
|
16
|
+
* posted per `notifications`. With `generateNow` (the default) the report for the
|
|
17
|
+
* latest closed period is written right away and not sent.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const liveReport = await client.liveReport.create({
|
|
22
|
+
* name: 'x',
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
create(body: LiveReportCreateParams, options?: RequestOptions): APIPromise<LiveReportCreateResponse>;
|
|
27
|
+
/**
|
|
28
|
+
* Changes the fields sent. Set `status` to PAUSED to stop scheduled reports.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const liveReport = await client.liveReport.update(
|
|
33
|
+
* '5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f',
|
|
34
|
+
* );
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
update(reportID: string, body?: LiveReportUpdateParams | null | undefined, options?: RequestOptions): APIPromise<LiveReportUpdateResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Lists the project's saved live call reports, newest first.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const liveReports = await client.liveReport.list();
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
list(query?: LiveReportListParams | null | undefined, options?: RequestOptions): APIPromise<LiveReportListResponse>;
|
|
47
|
+
/**
|
|
48
|
+
* Deletes the report and stops its scheduled reports.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* const liveReport = await client.liveReport.delete(
|
|
53
|
+
* '5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f',
|
|
54
|
+
* );
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
delete(reportID: string, options?: RequestOptions): APIPromise<LiveReportDeleteResponse>;
|
|
58
|
+
/**
|
|
59
|
+
* Get a live report
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* const response = await client.liveReport.getByID(
|
|
64
|
+
* '5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f',
|
|
65
|
+
* );
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
getByID(reportID: string, options?: RequestOptions): APIPromise<LiveReportGetByIDResponse>;
|
|
69
|
+
/**
|
|
70
|
+
* Returns one written report. `document` is null until `status` is READY. Theme
|
|
71
|
+
* excerpts and grader quotes (call transcript text) are included only for keys
|
|
72
|
+
* with transcript:read.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```ts
|
|
76
|
+
* const response = await client.liveReport.getDocument(
|
|
77
|
+
* '9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b',
|
|
78
|
+
* { reportId: '5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f' },
|
|
79
|
+
* );
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
getDocument(documentID: string, params: LiveReportGetDocumentParams, options?: RequestOptions): APIPromise<LiveReportGetDocumentResponse>;
|
|
83
|
+
/**
|
|
84
|
+
* Lists a report's documents, newest period first.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* const response =
|
|
89
|
+
* await client.liveReport.listDocuments('reportId');
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
listDocuments(reportID: string, query?: LiveReportListDocumentsParams | null | undefined, options?: RequestOptions): APIPromise<LiveReportListDocumentsResponse>;
|
|
93
|
+
/**
|
|
94
|
+
* Writes the report now, for its latest closed period or a custom window
|
|
95
|
+
* (`periodStart` + `periodEnd`, at most 92 days, ended). Returns 202 with the
|
|
96
|
+
* document in PENDING; poll GET /v1/live-report/{reportId}/document/{documentId}
|
|
97
|
+
* until `status` is READY or FAILED (typically a few minutes). An identical
|
|
98
|
+
* request already in flight is returned as-is. A generated document is not
|
|
99
|
+
* emailed.
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```ts
|
|
103
|
+
* const response = await client.liveReport.run(
|
|
104
|
+
* '5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f',
|
|
105
|
+
* );
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
run(reportID: string, body?: LiveReportRunParams | null | undefined, options?: RequestOptions): APIPromise<LiveReportRunResponse>;
|
|
109
|
+
}
|
|
110
|
+
export interface LiveReportCreateResponse {
|
|
111
|
+
data: LiveReportCreateResponse.Data;
|
|
112
|
+
}
|
|
113
|
+
export declare namespace LiveReportCreateResponse {
|
|
114
|
+
interface Data {
|
|
115
|
+
id: string;
|
|
116
|
+
agentId: string | null;
|
|
117
|
+
cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY';
|
|
118
|
+
configKey: string | null;
|
|
119
|
+
/**
|
|
120
|
+
* Managed by config as code: read-only here (edits return 409).
|
|
121
|
+
*/
|
|
122
|
+
configManaged: boolean;
|
|
123
|
+
createdAt: string;
|
|
124
|
+
dashboardId: string | null;
|
|
125
|
+
deliveryHour: number;
|
|
126
|
+
description: string | null;
|
|
127
|
+
filters: Array<Data.Filter>;
|
|
128
|
+
includeTranscriptExcerpts: boolean;
|
|
129
|
+
name: string;
|
|
130
|
+
/**
|
|
131
|
+
* When the next scheduled report is written. Null while the report is paused.
|
|
132
|
+
*/
|
|
133
|
+
nextDeliveryAt: string | null;
|
|
134
|
+
notifications: Data.Notifications;
|
|
135
|
+
projectId: string;
|
|
136
|
+
status: 'ACTIVE' | 'PAUSED';
|
|
137
|
+
targets: Array<Data.Target>;
|
|
138
|
+
timezone: string;
|
|
139
|
+
updatedAt: string;
|
|
140
|
+
}
|
|
141
|
+
namespace Data {
|
|
142
|
+
interface Filter {
|
|
143
|
+
/**
|
|
144
|
+
* What the filter narrows on. GET /v1/analytics/schema lists each type.
|
|
145
|
+
*/
|
|
146
|
+
type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE';
|
|
147
|
+
/**
|
|
148
|
+
* Defaults to EQUALS. IS_SET / IS_NOT_SET (CALL_PROPERTY only) keep conversations
|
|
149
|
+
* where the property is set, whatever the value, or missing (never sent, sent as
|
|
150
|
+
* null, or removed); they take no value.
|
|
151
|
+
*/
|
|
152
|
+
operator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO' | 'CONTAINS' | 'STARTS_WITH' | 'IS_SET' | 'IS_NOT_SET';
|
|
153
|
+
/**
|
|
154
|
+
* The property to compare. Required for CALL_PROPERTY and METRIC_PROPERTY; may be
|
|
155
|
+
* omitted for AGENT_PROPERTY, DATASET, MODALITY and CALL_ID.
|
|
156
|
+
*/
|
|
157
|
+
property?: string;
|
|
158
|
+
/**
|
|
159
|
+
* The value to compare against (an agent id, "call" / "chat", a property value).
|
|
160
|
+
* Required except with IS_SET / IS_NOT_SET.
|
|
161
|
+
*/
|
|
162
|
+
value?: string | number | boolean;
|
|
163
|
+
}
|
|
164
|
+
interface Notifications {
|
|
165
|
+
email: Notifications.Email;
|
|
166
|
+
slack: Array<Notifications.Slack>;
|
|
167
|
+
fromConfig?: boolean;
|
|
168
|
+
}
|
|
169
|
+
namespace Notifications {
|
|
170
|
+
interface Email {
|
|
171
|
+
enabled: boolean;
|
|
172
|
+
recipients: Array<string>;
|
|
173
|
+
}
|
|
174
|
+
interface Slack {
|
|
175
|
+
channelId: string;
|
|
176
|
+
channelName: string;
|
|
177
|
+
notificationConfigId: string;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
interface Target {
|
|
181
|
+
/**
|
|
182
|
+
* The metric's slug (e.g. `task_completion`) or id.
|
|
183
|
+
*/
|
|
184
|
+
metric: string;
|
|
185
|
+
/**
|
|
186
|
+
* The bar, in display units. A PASS_RATE bar is a percentage, 0-100.
|
|
187
|
+
*/
|
|
188
|
+
value: number;
|
|
189
|
+
/**
|
|
190
|
+
* Defaults to PASS_RATE for thresholds and booleans, AVG for anything numeric.
|
|
191
|
+
*/
|
|
192
|
+
aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX';
|
|
193
|
+
/**
|
|
194
|
+
* AT_LEAST (default for PASS_RATE) or AT_MOST (default for every other
|
|
195
|
+
* aggregation).
|
|
196
|
+
*/
|
|
197
|
+
comparator?: 'AT_LEAST' | 'AT_MOST';
|
|
198
|
+
/**
|
|
199
|
+
* Shown instead of the metric's name.
|
|
200
|
+
*/
|
|
201
|
+
label?: string;
|
|
202
|
+
/**
|
|
203
|
+
* PASS_RATE on a metric that isn't a threshold: the per-call condition a call
|
|
204
|
+
* passes on.
|
|
205
|
+
*/
|
|
206
|
+
passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO';
|
|
207
|
+
passValue?: string | number | boolean;
|
|
208
|
+
/**
|
|
209
|
+
* Required with PERCENTILE, e.g. 95.
|
|
210
|
+
*/
|
|
211
|
+
percentile?: number;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
export interface LiveReportUpdateResponse {
|
|
216
|
+
data: LiveReportUpdateResponse.Data;
|
|
217
|
+
}
|
|
218
|
+
export declare namespace LiveReportUpdateResponse {
|
|
219
|
+
interface Data {
|
|
220
|
+
id: string;
|
|
221
|
+
agentId: string | null;
|
|
222
|
+
cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY';
|
|
223
|
+
configKey: string | null;
|
|
224
|
+
/**
|
|
225
|
+
* Managed by config as code: read-only here (edits return 409).
|
|
226
|
+
*/
|
|
227
|
+
configManaged: boolean;
|
|
228
|
+
createdAt: string;
|
|
229
|
+
dashboardId: string | null;
|
|
230
|
+
deliveryHour: number;
|
|
231
|
+
description: string | null;
|
|
232
|
+
filters: Array<Data.Filter>;
|
|
233
|
+
includeTranscriptExcerpts: boolean;
|
|
234
|
+
name: string;
|
|
235
|
+
/**
|
|
236
|
+
* When the next scheduled report is written. Null while the report is paused.
|
|
237
|
+
*/
|
|
238
|
+
nextDeliveryAt: string | null;
|
|
239
|
+
notifications: Data.Notifications;
|
|
240
|
+
projectId: string;
|
|
241
|
+
status: 'ACTIVE' | 'PAUSED';
|
|
242
|
+
targets: Array<Data.Target>;
|
|
243
|
+
timezone: string;
|
|
244
|
+
updatedAt: string;
|
|
245
|
+
}
|
|
246
|
+
namespace Data {
|
|
247
|
+
interface Filter {
|
|
248
|
+
/**
|
|
249
|
+
* What the filter narrows on. GET /v1/analytics/schema lists each type.
|
|
250
|
+
*/
|
|
251
|
+
type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE';
|
|
252
|
+
/**
|
|
253
|
+
* Defaults to EQUALS. IS_SET / IS_NOT_SET (CALL_PROPERTY only) keep conversations
|
|
254
|
+
* where the property is set, whatever the value, or missing (never sent, sent as
|
|
255
|
+
* null, or removed); they take no value.
|
|
256
|
+
*/
|
|
257
|
+
operator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO' | 'CONTAINS' | 'STARTS_WITH' | 'IS_SET' | 'IS_NOT_SET';
|
|
258
|
+
/**
|
|
259
|
+
* The property to compare. Required for CALL_PROPERTY and METRIC_PROPERTY; may be
|
|
260
|
+
* omitted for AGENT_PROPERTY, DATASET, MODALITY and CALL_ID.
|
|
261
|
+
*/
|
|
262
|
+
property?: string;
|
|
263
|
+
/**
|
|
264
|
+
* The value to compare against (an agent id, "call" / "chat", a property value).
|
|
265
|
+
* Required except with IS_SET / IS_NOT_SET.
|
|
266
|
+
*/
|
|
267
|
+
value?: string | number | boolean;
|
|
268
|
+
}
|
|
269
|
+
interface Notifications {
|
|
270
|
+
email: Notifications.Email;
|
|
271
|
+
slack: Array<Notifications.Slack>;
|
|
272
|
+
fromConfig?: boolean;
|
|
273
|
+
}
|
|
274
|
+
namespace Notifications {
|
|
275
|
+
interface Email {
|
|
276
|
+
enabled: boolean;
|
|
277
|
+
recipients: Array<string>;
|
|
278
|
+
}
|
|
279
|
+
interface Slack {
|
|
280
|
+
channelId: string;
|
|
281
|
+
channelName: string;
|
|
282
|
+
notificationConfigId: string;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
interface Target {
|
|
286
|
+
/**
|
|
287
|
+
* The metric's slug (e.g. `task_completion`) or id.
|
|
288
|
+
*/
|
|
289
|
+
metric: string;
|
|
290
|
+
/**
|
|
291
|
+
* The bar, in display units. A PASS_RATE bar is a percentage, 0-100.
|
|
292
|
+
*/
|
|
293
|
+
value: number;
|
|
294
|
+
/**
|
|
295
|
+
* Defaults to PASS_RATE for thresholds and booleans, AVG for anything numeric.
|
|
296
|
+
*/
|
|
297
|
+
aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX';
|
|
298
|
+
/**
|
|
299
|
+
* AT_LEAST (default for PASS_RATE) or AT_MOST (default for every other
|
|
300
|
+
* aggregation).
|
|
301
|
+
*/
|
|
302
|
+
comparator?: 'AT_LEAST' | 'AT_MOST';
|
|
303
|
+
/**
|
|
304
|
+
* Shown instead of the metric's name.
|
|
305
|
+
*/
|
|
306
|
+
label?: string;
|
|
307
|
+
/**
|
|
308
|
+
* PASS_RATE on a metric that isn't a threshold: the per-call condition a call
|
|
309
|
+
* passes on.
|
|
310
|
+
*/
|
|
311
|
+
passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO';
|
|
312
|
+
passValue?: string | number | boolean;
|
|
313
|
+
/**
|
|
314
|
+
* Required with PERCENTILE, e.g. 95.
|
|
315
|
+
*/
|
|
316
|
+
percentile?: number;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
export interface LiveReportListResponse {
|
|
321
|
+
data: LiveReportListResponse.Data;
|
|
322
|
+
}
|
|
323
|
+
export declare namespace LiveReportListResponse {
|
|
324
|
+
interface Data {
|
|
325
|
+
items: Array<Data.Item>;
|
|
326
|
+
totalCount: number;
|
|
327
|
+
}
|
|
328
|
+
namespace Data {
|
|
329
|
+
interface Item {
|
|
330
|
+
id: string;
|
|
331
|
+
agentId: string | null;
|
|
332
|
+
cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY';
|
|
333
|
+
configKey: string | null;
|
|
334
|
+
/**
|
|
335
|
+
* Managed by config as code: read-only here (edits return 409).
|
|
336
|
+
*/
|
|
337
|
+
configManaged: boolean;
|
|
338
|
+
createdAt: string;
|
|
339
|
+
dashboardId: string | null;
|
|
340
|
+
deliveryHour: number;
|
|
341
|
+
description: string | null;
|
|
342
|
+
filters: Array<Item.Filter>;
|
|
343
|
+
includeTranscriptExcerpts: boolean;
|
|
344
|
+
name: string;
|
|
345
|
+
/**
|
|
346
|
+
* When the next scheduled report is written. Null while the report is paused.
|
|
347
|
+
*/
|
|
348
|
+
nextDeliveryAt: string | null;
|
|
349
|
+
notifications: Item.Notifications;
|
|
350
|
+
projectId: string;
|
|
351
|
+
status: 'ACTIVE' | 'PAUSED';
|
|
352
|
+
targets: Array<Item.Target>;
|
|
353
|
+
timezone: string;
|
|
354
|
+
updatedAt: string;
|
|
355
|
+
}
|
|
356
|
+
namespace Item {
|
|
357
|
+
interface Filter {
|
|
358
|
+
/**
|
|
359
|
+
* What the filter narrows on. GET /v1/analytics/schema lists each type.
|
|
360
|
+
*/
|
|
361
|
+
type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE';
|
|
362
|
+
/**
|
|
363
|
+
* Defaults to EQUALS. IS_SET / IS_NOT_SET (CALL_PROPERTY only) keep conversations
|
|
364
|
+
* where the property is set, whatever the value, or missing (never sent, sent as
|
|
365
|
+
* null, or removed); they take no value.
|
|
366
|
+
*/
|
|
367
|
+
operator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO' | 'CONTAINS' | 'STARTS_WITH' | 'IS_SET' | 'IS_NOT_SET';
|
|
368
|
+
/**
|
|
369
|
+
* The property to compare. Required for CALL_PROPERTY and METRIC_PROPERTY; may be
|
|
370
|
+
* omitted for AGENT_PROPERTY, DATASET, MODALITY and CALL_ID.
|
|
371
|
+
*/
|
|
372
|
+
property?: string;
|
|
373
|
+
/**
|
|
374
|
+
* The value to compare against (an agent id, "call" / "chat", a property value).
|
|
375
|
+
* Required except with IS_SET / IS_NOT_SET.
|
|
376
|
+
*/
|
|
377
|
+
value?: string | number | boolean;
|
|
378
|
+
}
|
|
379
|
+
interface Notifications {
|
|
380
|
+
email: Notifications.Email;
|
|
381
|
+
slack: Array<Notifications.Slack>;
|
|
382
|
+
fromConfig?: boolean;
|
|
383
|
+
}
|
|
384
|
+
namespace Notifications {
|
|
385
|
+
interface Email {
|
|
386
|
+
enabled: boolean;
|
|
387
|
+
recipients: Array<string>;
|
|
388
|
+
}
|
|
389
|
+
interface Slack {
|
|
390
|
+
channelId: string;
|
|
391
|
+
channelName: string;
|
|
392
|
+
notificationConfigId: string;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
interface Target {
|
|
396
|
+
/**
|
|
397
|
+
* The metric's slug (e.g. `task_completion`) or id.
|
|
398
|
+
*/
|
|
399
|
+
metric: string;
|
|
400
|
+
/**
|
|
401
|
+
* The bar, in display units. A PASS_RATE bar is a percentage, 0-100.
|
|
402
|
+
*/
|
|
403
|
+
value: number;
|
|
404
|
+
/**
|
|
405
|
+
* Defaults to PASS_RATE for thresholds and booleans, AVG for anything numeric.
|
|
406
|
+
*/
|
|
407
|
+
aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX';
|
|
408
|
+
/**
|
|
409
|
+
* AT_LEAST (default for PASS_RATE) or AT_MOST (default for every other
|
|
410
|
+
* aggregation).
|
|
411
|
+
*/
|
|
412
|
+
comparator?: 'AT_LEAST' | 'AT_MOST';
|
|
413
|
+
/**
|
|
414
|
+
* Shown instead of the metric's name.
|
|
415
|
+
*/
|
|
416
|
+
label?: string;
|
|
417
|
+
/**
|
|
418
|
+
* PASS_RATE on a metric that isn't a threshold: the per-call condition a call
|
|
419
|
+
* passes on.
|
|
420
|
+
*/
|
|
421
|
+
passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO';
|
|
422
|
+
passValue?: string | number | boolean;
|
|
423
|
+
/**
|
|
424
|
+
* Required with PERCENTILE, e.g. 95.
|
|
425
|
+
*/
|
|
426
|
+
percentile?: number;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
export interface LiveReportDeleteResponse {
|
|
432
|
+
data: LiveReportDeleteResponse.Data;
|
|
433
|
+
}
|
|
434
|
+
export declare namespace LiveReportDeleteResponse {
|
|
435
|
+
interface Data {
|
|
436
|
+
id: string;
|
|
437
|
+
deleted: true;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
export interface LiveReportGetByIDResponse {
|
|
441
|
+
data: LiveReportGetByIDResponse.Data;
|
|
442
|
+
}
|
|
443
|
+
export declare namespace LiveReportGetByIDResponse {
|
|
444
|
+
interface Data {
|
|
445
|
+
id: string;
|
|
446
|
+
agentId: string | null;
|
|
447
|
+
cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY';
|
|
448
|
+
configKey: string | null;
|
|
449
|
+
/**
|
|
450
|
+
* Managed by config as code: read-only here (edits return 409).
|
|
451
|
+
*/
|
|
452
|
+
configManaged: boolean;
|
|
453
|
+
createdAt: string;
|
|
454
|
+
dashboardId: string | null;
|
|
455
|
+
deliveryHour: number;
|
|
456
|
+
description: string | null;
|
|
457
|
+
filters: Array<Data.Filter>;
|
|
458
|
+
includeTranscriptExcerpts: boolean;
|
|
459
|
+
name: string;
|
|
460
|
+
/**
|
|
461
|
+
* When the next scheduled report is written. Null while the report is paused.
|
|
462
|
+
*/
|
|
463
|
+
nextDeliveryAt: string | null;
|
|
464
|
+
notifications: Data.Notifications;
|
|
465
|
+
projectId: string;
|
|
466
|
+
status: 'ACTIVE' | 'PAUSED';
|
|
467
|
+
targets: Array<Data.Target>;
|
|
468
|
+
timezone: string;
|
|
469
|
+
updatedAt: string;
|
|
470
|
+
}
|
|
471
|
+
namespace Data {
|
|
472
|
+
interface Filter {
|
|
473
|
+
/**
|
|
474
|
+
* What the filter narrows on. GET /v1/analytics/schema lists each type.
|
|
475
|
+
*/
|
|
476
|
+
type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE';
|
|
477
|
+
/**
|
|
478
|
+
* Defaults to EQUALS. IS_SET / IS_NOT_SET (CALL_PROPERTY only) keep conversations
|
|
479
|
+
* where the property is set, whatever the value, or missing (never sent, sent as
|
|
480
|
+
* null, or removed); they take no value.
|
|
481
|
+
*/
|
|
482
|
+
operator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO' | 'CONTAINS' | 'STARTS_WITH' | 'IS_SET' | 'IS_NOT_SET';
|
|
483
|
+
/**
|
|
484
|
+
* The property to compare. Required for CALL_PROPERTY and METRIC_PROPERTY; may be
|
|
485
|
+
* omitted for AGENT_PROPERTY, DATASET, MODALITY and CALL_ID.
|
|
486
|
+
*/
|
|
487
|
+
property?: string;
|
|
488
|
+
/**
|
|
489
|
+
* The value to compare against (an agent id, "call" / "chat", a property value).
|
|
490
|
+
* Required except with IS_SET / IS_NOT_SET.
|
|
491
|
+
*/
|
|
492
|
+
value?: string | number | boolean;
|
|
493
|
+
}
|
|
494
|
+
interface Notifications {
|
|
495
|
+
email: Notifications.Email;
|
|
496
|
+
slack: Array<Notifications.Slack>;
|
|
497
|
+
fromConfig?: boolean;
|
|
498
|
+
}
|
|
499
|
+
namespace Notifications {
|
|
500
|
+
interface Email {
|
|
501
|
+
enabled: boolean;
|
|
502
|
+
recipients: Array<string>;
|
|
503
|
+
}
|
|
504
|
+
interface Slack {
|
|
505
|
+
channelId: string;
|
|
506
|
+
channelName: string;
|
|
507
|
+
notificationConfigId: string;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
interface Target {
|
|
511
|
+
/**
|
|
512
|
+
* The metric's slug (e.g. `task_completion`) or id.
|
|
513
|
+
*/
|
|
514
|
+
metric: string;
|
|
515
|
+
/**
|
|
516
|
+
* The bar, in display units. A PASS_RATE bar is a percentage, 0-100.
|
|
517
|
+
*/
|
|
518
|
+
value: number;
|
|
519
|
+
/**
|
|
520
|
+
* Defaults to PASS_RATE for thresholds and booleans, AVG for anything numeric.
|
|
521
|
+
*/
|
|
522
|
+
aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX';
|
|
523
|
+
/**
|
|
524
|
+
* AT_LEAST (default for PASS_RATE) or AT_MOST (default for every other
|
|
525
|
+
* aggregation).
|
|
526
|
+
*/
|
|
527
|
+
comparator?: 'AT_LEAST' | 'AT_MOST';
|
|
528
|
+
/**
|
|
529
|
+
* Shown instead of the metric's name.
|
|
530
|
+
*/
|
|
531
|
+
label?: string;
|
|
532
|
+
/**
|
|
533
|
+
* PASS_RATE on a metric that isn't a threshold: the per-call condition a call
|
|
534
|
+
* passes on.
|
|
535
|
+
*/
|
|
536
|
+
passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO';
|
|
537
|
+
passValue?: string | number | boolean;
|
|
538
|
+
/**
|
|
539
|
+
* Required with PERCENTILE, e.g. 95.
|
|
540
|
+
*/
|
|
541
|
+
percentile?: number;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
export interface LiveReportGetDocumentResponse {
|
|
546
|
+
/**
|
|
547
|
+
* One written report over one period. `document` is null until `status` is READY;
|
|
548
|
+
* every number in it comes from the analytics engine (the same reads GET
|
|
549
|
+
* /v1/dashboard/{dashboardId}/data makes over the same window and filters).
|
|
550
|
+
*/
|
|
551
|
+
data: LiveReportGetDocumentResponse.Data;
|
|
552
|
+
}
|
|
553
|
+
export declare namespace LiveReportGetDocumentResponse {
|
|
554
|
+
/**
|
|
555
|
+
* One written report over one period. `document` is null until `status` is READY;
|
|
556
|
+
* every number in it comes from the analytics engine (the same reads GET
|
|
557
|
+
* /v1/dashboard/{dashboardId}/data makes over the same window and filters).
|
|
558
|
+
*/
|
|
559
|
+
interface Data {
|
|
560
|
+
id: string;
|
|
561
|
+
announcedAt: string | null;
|
|
562
|
+
cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY' | null;
|
|
563
|
+
completedAt: string | null;
|
|
564
|
+
createdAt: string;
|
|
565
|
+
definition: Data.Definition;
|
|
566
|
+
document: Data.Document | null;
|
|
567
|
+
errorMessage: string | null;
|
|
568
|
+
liveReportId: string | null;
|
|
569
|
+
periodEnd: string;
|
|
570
|
+
periodStart: string;
|
|
571
|
+
projectId: string;
|
|
572
|
+
status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED';
|
|
573
|
+
timezone: string;
|
|
574
|
+
trigger: 'SCHEDULED' | 'MANUAL';
|
|
575
|
+
}
|
|
576
|
+
namespace Data {
|
|
577
|
+
interface Definition {
|
|
578
|
+
agentId: string | null;
|
|
579
|
+
agentName: string | null;
|
|
580
|
+
dashboardId: string | null;
|
|
581
|
+
description: string | null;
|
|
582
|
+
filters: Array<Definition.Filter>;
|
|
583
|
+
includeTranscriptExcerpts: boolean;
|
|
584
|
+
name: string;
|
|
585
|
+
targets: Array<Definition.Target>;
|
|
586
|
+
}
|
|
587
|
+
namespace Definition {
|
|
588
|
+
interface Filter {
|
|
589
|
+
/**
|
|
590
|
+
* What the filter narrows on. GET /v1/analytics/schema lists each type.
|
|
591
|
+
*/
|
|
592
|
+
type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE';
|
|
593
|
+
/**
|
|
594
|
+
* Defaults to EQUALS. IS_SET / IS_NOT_SET (CALL_PROPERTY only) keep conversations
|
|
595
|
+
* where the property is set, whatever the value, or missing (never sent, sent as
|
|
596
|
+
* null, or removed); they take no value.
|
|
597
|
+
*/
|
|
598
|
+
operator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO' | 'CONTAINS' | 'STARTS_WITH' | 'IS_SET' | 'IS_NOT_SET';
|
|
599
|
+
/**
|
|
600
|
+
* The property to compare. Required for CALL_PROPERTY and METRIC_PROPERTY; may be
|
|
601
|
+
* omitted for AGENT_PROPERTY, DATASET, MODALITY and CALL_ID.
|
|
602
|
+
*/
|
|
603
|
+
property?: string;
|
|
604
|
+
/**
|
|
605
|
+
* The value to compare against (an agent id, "call" / "chat", a property value).
|
|
606
|
+
* Required except with IS_SET / IS_NOT_SET.
|
|
607
|
+
*/
|
|
608
|
+
value?: string | number | boolean;
|
|
609
|
+
}
|
|
610
|
+
interface Target {
|
|
611
|
+
/**
|
|
612
|
+
* The metric's slug (e.g. `task_completion`) or id.
|
|
613
|
+
*/
|
|
614
|
+
metric: string;
|
|
615
|
+
/**
|
|
616
|
+
* The bar, in display units. A PASS_RATE bar is a percentage, 0-100.
|
|
617
|
+
*/
|
|
618
|
+
value: number;
|
|
619
|
+
/**
|
|
620
|
+
* Defaults to PASS_RATE for thresholds and booleans, AVG for anything numeric.
|
|
621
|
+
*/
|
|
622
|
+
aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX';
|
|
623
|
+
/**
|
|
624
|
+
* AT_LEAST (default for PASS_RATE) or AT_MOST (default for every other
|
|
625
|
+
* aggregation).
|
|
626
|
+
*/
|
|
627
|
+
comparator?: 'AT_LEAST' | 'AT_MOST';
|
|
628
|
+
/**
|
|
629
|
+
* Shown instead of the metric's name.
|
|
630
|
+
*/
|
|
631
|
+
label?: string;
|
|
632
|
+
/**
|
|
633
|
+
* PASS_RATE on a metric that isn't a threshold: the per-call condition a call
|
|
634
|
+
* passes on.
|
|
635
|
+
*/
|
|
636
|
+
passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO';
|
|
637
|
+
passValue?: string | number | boolean;
|
|
638
|
+
/**
|
|
639
|
+
* Required with PERCENTILE, e.g. 95.
|
|
640
|
+
*/
|
|
641
|
+
percentile?: number;
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
interface Document {
|
|
645
|
+
agents: Array<Document.Agent>;
|
|
646
|
+
appendix: Document.Appendix;
|
|
647
|
+
charts: Array<Document.Chart>;
|
|
648
|
+
checks: Array<Document.Check>;
|
|
649
|
+
evidence: Document.Evidence;
|
|
650
|
+
executiveSummary: Document.ExecutiveSummary;
|
|
651
|
+
generatedAtIso: string;
|
|
652
|
+
headline: Document.Headline;
|
|
653
|
+
liveReportId: string | null;
|
|
654
|
+
model: string;
|
|
655
|
+
recommendations: Array<Document.Recommendation>;
|
|
656
|
+
targets: Array<Document.Target>;
|
|
657
|
+
themes: Array<Document.Theme>;
|
|
658
|
+
version: 1;
|
|
659
|
+
volume: Document.Volume;
|
|
660
|
+
}
|
|
661
|
+
namespace Document {
|
|
662
|
+
interface Agent {
|
|
663
|
+
agentId: string;
|
|
664
|
+
agentName: string;
|
|
665
|
+
conversationCount: number;
|
|
666
|
+
sharePct: number;
|
|
667
|
+
targets: Array<Agent.Target>;
|
|
668
|
+
}
|
|
669
|
+
namespace Agent {
|
|
670
|
+
interface Target {
|
|
671
|
+
actual: number | null;
|
|
672
|
+
actualLabel: string | null;
|
|
673
|
+
key: string;
|
|
674
|
+
status: 'MET' | 'MISSED' | 'NO_DATA';
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
interface Appendix {
|
|
678
|
+
methodology: string;
|
|
679
|
+
notes: Array<string>;
|
|
680
|
+
}
|
|
681
|
+
interface Chart {
|
|
682
|
+
blocked: boolean;
|
|
683
|
+
description: string | null;
|
|
684
|
+
display: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE';
|
|
685
|
+
error: string | null;
|
|
686
|
+
interval: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH';
|
|
687
|
+
name: string;
|
|
688
|
+
omittedSeries: number;
|
|
689
|
+
series: Array<Chart.Sery>;
|
|
690
|
+
}
|
|
691
|
+
namespace Chart {
|
|
692
|
+
interface Sery {
|
|
693
|
+
aggregation: 'COUNT' | 'AVG' | 'MIN' | 'MAX' | 'SUM' | 'MEDIAN' | 'PERCENTILE' | 'PASS_RATE';
|
|
694
|
+
breakdownValue: string | null;
|
|
695
|
+
buckets: Array<Sery.Bucket>;
|
|
696
|
+
comparisonGroup: string | null;
|
|
697
|
+
comparisonValue: number | null;
|
|
698
|
+
measureIndex: number;
|
|
699
|
+
metric: string | null;
|
|
700
|
+
percentageOfBaseline: number | null;
|
|
701
|
+
sampleSize: number | null;
|
|
702
|
+
type: 'METRIC' | 'CONVERSATION' | 'UPTIME';
|
|
703
|
+
value: number;
|
|
704
|
+
}
|
|
705
|
+
namespace Sery {
|
|
706
|
+
interface Bucket {
|
|
707
|
+
date: string;
|
|
708
|
+
value: number;
|
|
709
|
+
comparisonDate?: string;
|
|
710
|
+
comparisonValue?: number;
|
|
711
|
+
passed?: number;
|
|
712
|
+
percentageOfBaseline?: number;
|
|
713
|
+
sampleSize?: number;
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
interface Check {
|
|
718
|
+
checkName: string;
|
|
719
|
+
comparable: boolean;
|
|
720
|
+
deltaPts: number | null;
|
|
721
|
+
evaluatedCount: number;
|
|
722
|
+
failedCount: number;
|
|
723
|
+
isTarget: boolean;
|
|
724
|
+
metricDefinitionId: string;
|
|
725
|
+
metricSlug: string;
|
|
726
|
+
passRatePct: number | null;
|
|
727
|
+
previousPassRatePct: number | null;
|
|
728
|
+
}
|
|
729
|
+
interface Evidence {
|
|
730
|
+
failingConversationCount: number;
|
|
731
|
+
failingCountIsLowerBound: boolean;
|
|
732
|
+
readConversationCount: number;
|
|
733
|
+
sampled: boolean;
|
|
734
|
+
}
|
|
735
|
+
interface ExecutiveSummary {
|
|
736
|
+
keyFindings: Array<ExecutiveSummary.KeyFinding>;
|
|
737
|
+
paragraphs: Array<string>;
|
|
738
|
+
sections?: Array<ExecutiveSummary.Section>;
|
|
739
|
+
}
|
|
740
|
+
namespace ExecutiveSummary {
|
|
741
|
+
interface KeyFinding {
|
|
742
|
+
body: string;
|
|
743
|
+
title: string;
|
|
744
|
+
calls?: Array<KeyFinding.Call>;
|
|
745
|
+
}
|
|
746
|
+
namespace KeyFinding {
|
|
747
|
+
interface Call {
|
|
748
|
+
callId: string | null;
|
|
749
|
+
conversationId: string;
|
|
750
|
+
cueMs: number | null;
|
|
751
|
+
personaName: string | null;
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
interface Section {
|
|
755
|
+
body: string;
|
|
756
|
+
heading: string | null;
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
interface Headline {
|
|
760
|
+
agentName: string | null;
|
|
761
|
+
cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY' | null;
|
|
762
|
+
periodEndIso: string;
|
|
763
|
+
periodLabel: string;
|
|
764
|
+
periodStartIso: string;
|
|
765
|
+
reportName: string;
|
|
766
|
+
statTiles: Array<Headline.StatTile>;
|
|
767
|
+
timezone: string;
|
|
768
|
+
verdict: 'ON_TARGET' | 'OFF_TARGET' | 'NO_TARGETS' | 'NO_DATA';
|
|
769
|
+
verdictProse: string;
|
|
770
|
+
}
|
|
771
|
+
namespace Headline {
|
|
772
|
+
interface StatTile {
|
|
773
|
+
deltaDirection: 'POSITIVE' | 'NEGATIVE' | 'NEUTRAL' | null;
|
|
774
|
+
label: string;
|
|
775
|
+
sub: string | null;
|
|
776
|
+
value: string;
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
interface Recommendation {
|
|
780
|
+
afterText: string | null;
|
|
781
|
+
beforeText: string | null;
|
|
782
|
+
body: string;
|
|
783
|
+
channel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL' | null;
|
|
784
|
+
order: number;
|
|
785
|
+
promptOptimizationFindingId: string | null;
|
|
786
|
+
severity: 'HIGH' | 'MEDIUM' | 'LOW' | null;
|
|
787
|
+
source: 'PROMPT_OPTIMIZER' | 'DEBRIEF';
|
|
788
|
+
themeSlugs: Array<string>;
|
|
789
|
+
title: string;
|
|
790
|
+
}
|
|
791
|
+
interface Target {
|
|
792
|
+
actual: number | null;
|
|
793
|
+
actualLabel: string | null;
|
|
794
|
+
aggregation: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX';
|
|
795
|
+
comparator: 'AT_LEAST' | 'AT_MOST';
|
|
796
|
+
deltaDirection: 'POSITIVE' | 'NEGATIVE' | 'NEUTRAL' | null;
|
|
797
|
+
deltaLabel: string | null;
|
|
798
|
+
error: string | null;
|
|
799
|
+
failingConversationCount: number | null;
|
|
800
|
+
key: string;
|
|
801
|
+
label: string;
|
|
802
|
+
lifecycle: 'NEW_MISS' | 'STILL_MISSED' | 'RECOVERED' | 'HOLDING' | null;
|
|
803
|
+
metricDefinitionId: string | null;
|
|
804
|
+
metricName: string;
|
|
805
|
+
metricSlug: string;
|
|
806
|
+
percentile: number | null;
|
|
807
|
+
previous: number | null;
|
|
808
|
+
previousLabel: string | null;
|
|
809
|
+
sampleSize: number;
|
|
810
|
+
series: Array<Target.Sery>;
|
|
811
|
+
status: 'MET' | 'MISSED' | 'NO_DATA';
|
|
812
|
+
targetLabel: string;
|
|
813
|
+
targetValue: number;
|
|
814
|
+
unit: 'PERCENT' | 'VALUE';
|
|
815
|
+
}
|
|
816
|
+
namespace Target {
|
|
817
|
+
interface Sery {
|
|
818
|
+
date: string;
|
|
819
|
+
sampleSize: number | null;
|
|
820
|
+
value: number | null;
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
interface Theme {
|
|
824
|
+
affectedConversationCount: number;
|
|
825
|
+
analysis: string;
|
|
826
|
+
checkNames: Array<string>;
|
|
827
|
+
collectorQuote: Theme.CollectorQuote | null;
|
|
828
|
+
estimatedAffectedConversationCount: number | null;
|
|
829
|
+
excerpts: Array<Theme.Excerpt>;
|
|
830
|
+
flaggedForImpact: boolean;
|
|
831
|
+
impact: 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW' | null;
|
|
832
|
+
impactReason: string | null;
|
|
833
|
+
issue: Theme.Issue | null;
|
|
834
|
+
lifecycle: 'NEW' | 'PERSISTENT' | 'IMPROVING' | 'FIXED' | null;
|
|
835
|
+
memberConversationIds: Array<string>;
|
|
836
|
+
metricDefinitionIds: Array<string>;
|
|
837
|
+
prevalence: 'WIDESPREAD' | 'RECURRING' | 'ISOLATED' | null;
|
|
838
|
+
rootCauseChannel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL' | null;
|
|
839
|
+
severity: 'HIGH' | 'MEDIUM' | 'LOW';
|
|
840
|
+
slug: string;
|
|
841
|
+
title: string;
|
|
842
|
+
totalConversationCount: number;
|
|
843
|
+
memberCalls?: Array<Theme.MemberCall>;
|
|
844
|
+
}
|
|
845
|
+
namespace Theme {
|
|
846
|
+
interface CollectorQuote {
|
|
847
|
+
conversationId: string;
|
|
848
|
+
metricName: string;
|
|
849
|
+
quote: string;
|
|
850
|
+
}
|
|
851
|
+
interface Excerpt {
|
|
852
|
+
callId: string | null;
|
|
853
|
+
caption: string | null;
|
|
854
|
+
conversationId: string;
|
|
855
|
+
personaName: string | null;
|
|
856
|
+
scenarioName: string | null;
|
|
857
|
+
turns: Array<Excerpt.Turn>;
|
|
858
|
+
}
|
|
859
|
+
namespace Excerpt {
|
|
860
|
+
interface Turn {
|
|
861
|
+
flagNote: string | null;
|
|
862
|
+
flagged: boolean;
|
|
863
|
+
offsetMs: number | null;
|
|
864
|
+
role: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER';
|
|
865
|
+
text: string;
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
interface Issue {
|
|
869
|
+
id: string;
|
|
870
|
+
firstSeenAtIso: string | null;
|
|
871
|
+
status: string;
|
|
872
|
+
title: string;
|
|
873
|
+
}
|
|
874
|
+
interface MemberCall {
|
|
875
|
+
callId: string | null;
|
|
876
|
+
conversationId: string;
|
|
877
|
+
cueMs: number | null;
|
|
878
|
+
personaName: string | null;
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
interface Volume {
|
|
882
|
+
conversationCount: number;
|
|
883
|
+
deltaPct: number | null;
|
|
884
|
+
endings: Array<Volume.Ending>;
|
|
885
|
+
previousConversationCount: number | null;
|
|
886
|
+
series: Array<Volume.Sery>;
|
|
887
|
+
}
|
|
888
|
+
namespace Volume {
|
|
889
|
+
interface Ending {
|
|
890
|
+
count: number;
|
|
891
|
+
label: string;
|
|
892
|
+
sharePct: number;
|
|
893
|
+
value: string;
|
|
894
|
+
}
|
|
895
|
+
interface Sery {
|
|
896
|
+
date: string;
|
|
897
|
+
sampleSize: number | null;
|
|
898
|
+
value: number | null;
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
export interface LiveReportListDocumentsResponse {
|
|
905
|
+
data: LiveReportListDocumentsResponse.Data;
|
|
906
|
+
}
|
|
907
|
+
export declare namespace LiveReportListDocumentsResponse {
|
|
908
|
+
interface Data {
|
|
909
|
+
items: Array<Data.Item>;
|
|
910
|
+
totalCount: number;
|
|
911
|
+
}
|
|
912
|
+
namespace Data {
|
|
913
|
+
/**
|
|
914
|
+
* One written report over one period. `document` is null until `status` is READY;
|
|
915
|
+
* every number in it comes from the analytics engine (the same reads GET
|
|
916
|
+
* /v1/dashboard/{dashboardId}/data makes over the same window and filters).
|
|
917
|
+
*/
|
|
918
|
+
interface Item {
|
|
919
|
+
id: string;
|
|
920
|
+
announcedAt: string | null;
|
|
921
|
+
cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY' | null;
|
|
922
|
+
completedAt: string | null;
|
|
923
|
+
createdAt: string;
|
|
924
|
+
definition: Item.Definition;
|
|
925
|
+
document: Item.Document | null;
|
|
926
|
+
errorMessage: string | null;
|
|
927
|
+
liveReportId: string | null;
|
|
928
|
+
periodEnd: string;
|
|
929
|
+
periodStart: string;
|
|
930
|
+
projectId: string;
|
|
931
|
+
status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED';
|
|
932
|
+
timezone: string;
|
|
933
|
+
trigger: 'SCHEDULED' | 'MANUAL';
|
|
934
|
+
}
|
|
935
|
+
namespace Item {
|
|
936
|
+
interface Definition {
|
|
937
|
+
agentId: string | null;
|
|
938
|
+
agentName: string | null;
|
|
939
|
+
dashboardId: string | null;
|
|
940
|
+
description: string | null;
|
|
941
|
+
filters: Array<Definition.Filter>;
|
|
942
|
+
includeTranscriptExcerpts: boolean;
|
|
943
|
+
name: string;
|
|
944
|
+
targets: Array<Definition.Target>;
|
|
945
|
+
}
|
|
946
|
+
namespace Definition {
|
|
947
|
+
interface Filter {
|
|
948
|
+
/**
|
|
949
|
+
* What the filter narrows on. GET /v1/analytics/schema lists each type.
|
|
950
|
+
*/
|
|
951
|
+
type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE';
|
|
952
|
+
/**
|
|
953
|
+
* Defaults to EQUALS. IS_SET / IS_NOT_SET (CALL_PROPERTY only) keep conversations
|
|
954
|
+
* where the property is set, whatever the value, or missing (never sent, sent as
|
|
955
|
+
* null, or removed); they take no value.
|
|
956
|
+
*/
|
|
957
|
+
operator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO' | 'CONTAINS' | 'STARTS_WITH' | 'IS_SET' | 'IS_NOT_SET';
|
|
958
|
+
/**
|
|
959
|
+
* The property to compare. Required for CALL_PROPERTY and METRIC_PROPERTY; may be
|
|
960
|
+
* omitted for AGENT_PROPERTY, DATASET, MODALITY and CALL_ID.
|
|
961
|
+
*/
|
|
962
|
+
property?: string;
|
|
963
|
+
/**
|
|
964
|
+
* The value to compare against (an agent id, "call" / "chat", a property value).
|
|
965
|
+
* Required except with IS_SET / IS_NOT_SET.
|
|
966
|
+
*/
|
|
967
|
+
value?: string | number | boolean;
|
|
968
|
+
}
|
|
969
|
+
interface Target {
|
|
970
|
+
/**
|
|
971
|
+
* The metric's slug (e.g. `task_completion`) or id.
|
|
972
|
+
*/
|
|
973
|
+
metric: string;
|
|
974
|
+
/**
|
|
975
|
+
* The bar, in display units. A PASS_RATE bar is a percentage, 0-100.
|
|
976
|
+
*/
|
|
977
|
+
value: number;
|
|
978
|
+
/**
|
|
979
|
+
* Defaults to PASS_RATE for thresholds and booleans, AVG for anything numeric.
|
|
980
|
+
*/
|
|
981
|
+
aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX';
|
|
982
|
+
/**
|
|
983
|
+
* AT_LEAST (default for PASS_RATE) or AT_MOST (default for every other
|
|
984
|
+
* aggregation).
|
|
985
|
+
*/
|
|
986
|
+
comparator?: 'AT_LEAST' | 'AT_MOST';
|
|
987
|
+
/**
|
|
988
|
+
* Shown instead of the metric's name.
|
|
989
|
+
*/
|
|
990
|
+
label?: string;
|
|
991
|
+
/**
|
|
992
|
+
* PASS_RATE on a metric that isn't a threshold: the per-call condition a call
|
|
993
|
+
* passes on.
|
|
994
|
+
*/
|
|
995
|
+
passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO';
|
|
996
|
+
passValue?: string | number | boolean;
|
|
997
|
+
/**
|
|
998
|
+
* Required with PERCENTILE, e.g. 95.
|
|
999
|
+
*/
|
|
1000
|
+
percentile?: number;
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
interface Document {
|
|
1004
|
+
agents: Array<Document.Agent>;
|
|
1005
|
+
appendix: Document.Appendix;
|
|
1006
|
+
charts: Array<Document.Chart>;
|
|
1007
|
+
checks: Array<Document.Check>;
|
|
1008
|
+
evidence: Document.Evidence;
|
|
1009
|
+
executiveSummary: Document.ExecutiveSummary;
|
|
1010
|
+
generatedAtIso: string;
|
|
1011
|
+
headline: Document.Headline;
|
|
1012
|
+
liveReportId: string | null;
|
|
1013
|
+
model: string;
|
|
1014
|
+
recommendations: Array<Document.Recommendation>;
|
|
1015
|
+
targets: Array<Document.Target>;
|
|
1016
|
+
themes: Array<Document.Theme>;
|
|
1017
|
+
version: 1;
|
|
1018
|
+
volume: Document.Volume;
|
|
1019
|
+
}
|
|
1020
|
+
namespace Document {
|
|
1021
|
+
interface Agent {
|
|
1022
|
+
agentId: string;
|
|
1023
|
+
agentName: string;
|
|
1024
|
+
conversationCount: number;
|
|
1025
|
+
sharePct: number;
|
|
1026
|
+
targets: Array<Agent.Target>;
|
|
1027
|
+
}
|
|
1028
|
+
namespace Agent {
|
|
1029
|
+
interface Target {
|
|
1030
|
+
actual: number | null;
|
|
1031
|
+
actualLabel: string | null;
|
|
1032
|
+
key: string;
|
|
1033
|
+
status: 'MET' | 'MISSED' | 'NO_DATA';
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
interface Appendix {
|
|
1037
|
+
methodology: string;
|
|
1038
|
+
notes: Array<string>;
|
|
1039
|
+
}
|
|
1040
|
+
interface Chart {
|
|
1041
|
+
blocked: boolean;
|
|
1042
|
+
description: string | null;
|
|
1043
|
+
display: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE';
|
|
1044
|
+
error: string | null;
|
|
1045
|
+
interval: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH';
|
|
1046
|
+
name: string;
|
|
1047
|
+
omittedSeries: number;
|
|
1048
|
+
series: Array<Chart.Sery>;
|
|
1049
|
+
}
|
|
1050
|
+
namespace Chart {
|
|
1051
|
+
interface Sery {
|
|
1052
|
+
aggregation: 'COUNT' | 'AVG' | 'MIN' | 'MAX' | 'SUM' | 'MEDIAN' | 'PERCENTILE' | 'PASS_RATE';
|
|
1053
|
+
breakdownValue: string | null;
|
|
1054
|
+
buckets: Array<Sery.Bucket>;
|
|
1055
|
+
comparisonGroup: string | null;
|
|
1056
|
+
comparisonValue: number | null;
|
|
1057
|
+
measureIndex: number;
|
|
1058
|
+
metric: string | null;
|
|
1059
|
+
percentageOfBaseline: number | null;
|
|
1060
|
+
sampleSize: number | null;
|
|
1061
|
+
type: 'METRIC' | 'CONVERSATION' | 'UPTIME';
|
|
1062
|
+
value: number;
|
|
1063
|
+
}
|
|
1064
|
+
namespace Sery {
|
|
1065
|
+
interface Bucket {
|
|
1066
|
+
date: string;
|
|
1067
|
+
value: number;
|
|
1068
|
+
comparisonDate?: string;
|
|
1069
|
+
comparisonValue?: number;
|
|
1070
|
+
passed?: number;
|
|
1071
|
+
percentageOfBaseline?: number;
|
|
1072
|
+
sampleSize?: number;
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
interface Check {
|
|
1077
|
+
checkName: string;
|
|
1078
|
+
comparable: boolean;
|
|
1079
|
+
deltaPts: number | null;
|
|
1080
|
+
evaluatedCount: number;
|
|
1081
|
+
failedCount: number;
|
|
1082
|
+
isTarget: boolean;
|
|
1083
|
+
metricDefinitionId: string;
|
|
1084
|
+
metricSlug: string;
|
|
1085
|
+
passRatePct: number | null;
|
|
1086
|
+
previousPassRatePct: number | null;
|
|
1087
|
+
}
|
|
1088
|
+
interface Evidence {
|
|
1089
|
+
failingConversationCount: number;
|
|
1090
|
+
failingCountIsLowerBound: boolean;
|
|
1091
|
+
readConversationCount: number;
|
|
1092
|
+
sampled: boolean;
|
|
1093
|
+
}
|
|
1094
|
+
interface ExecutiveSummary {
|
|
1095
|
+
keyFindings: Array<ExecutiveSummary.KeyFinding>;
|
|
1096
|
+
paragraphs: Array<string>;
|
|
1097
|
+
sections?: Array<ExecutiveSummary.Section>;
|
|
1098
|
+
}
|
|
1099
|
+
namespace ExecutiveSummary {
|
|
1100
|
+
interface KeyFinding {
|
|
1101
|
+
body: string;
|
|
1102
|
+
title: string;
|
|
1103
|
+
calls?: Array<KeyFinding.Call>;
|
|
1104
|
+
}
|
|
1105
|
+
namespace KeyFinding {
|
|
1106
|
+
interface Call {
|
|
1107
|
+
callId: string | null;
|
|
1108
|
+
conversationId: string;
|
|
1109
|
+
cueMs: number | null;
|
|
1110
|
+
personaName: string | null;
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
interface Section {
|
|
1114
|
+
body: string;
|
|
1115
|
+
heading: string | null;
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
interface Headline {
|
|
1119
|
+
agentName: string | null;
|
|
1120
|
+
cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY' | null;
|
|
1121
|
+
periodEndIso: string;
|
|
1122
|
+
periodLabel: string;
|
|
1123
|
+
periodStartIso: string;
|
|
1124
|
+
reportName: string;
|
|
1125
|
+
statTiles: Array<Headline.StatTile>;
|
|
1126
|
+
timezone: string;
|
|
1127
|
+
verdict: 'ON_TARGET' | 'OFF_TARGET' | 'NO_TARGETS' | 'NO_DATA';
|
|
1128
|
+
verdictProse: string;
|
|
1129
|
+
}
|
|
1130
|
+
namespace Headline {
|
|
1131
|
+
interface StatTile {
|
|
1132
|
+
deltaDirection: 'POSITIVE' | 'NEGATIVE' | 'NEUTRAL' | null;
|
|
1133
|
+
label: string;
|
|
1134
|
+
sub: string | null;
|
|
1135
|
+
value: string;
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
interface Recommendation {
|
|
1139
|
+
afterText: string | null;
|
|
1140
|
+
beforeText: string | null;
|
|
1141
|
+
body: string;
|
|
1142
|
+
channel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL' | null;
|
|
1143
|
+
order: number;
|
|
1144
|
+
promptOptimizationFindingId: string | null;
|
|
1145
|
+
severity: 'HIGH' | 'MEDIUM' | 'LOW' | null;
|
|
1146
|
+
source: 'PROMPT_OPTIMIZER' | 'DEBRIEF';
|
|
1147
|
+
themeSlugs: Array<string>;
|
|
1148
|
+
title: string;
|
|
1149
|
+
}
|
|
1150
|
+
interface Target {
|
|
1151
|
+
actual: number | null;
|
|
1152
|
+
actualLabel: string | null;
|
|
1153
|
+
aggregation: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX';
|
|
1154
|
+
comparator: 'AT_LEAST' | 'AT_MOST';
|
|
1155
|
+
deltaDirection: 'POSITIVE' | 'NEGATIVE' | 'NEUTRAL' | null;
|
|
1156
|
+
deltaLabel: string | null;
|
|
1157
|
+
error: string | null;
|
|
1158
|
+
failingConversationCount: number | null;
|
|
1159
|
+
key: string;
|
|
1160
|
+
label: string;
|
|
1161
|
+
lifecycle: 'NEW_MISS' | 'STILL_MISSED' | 'RECOVERED' | 'HOLDING' | null;
|
|
1162
|
+
metricDefinitionId: string | null;
|
|
1163
|
+
metricName: string;
|
|
1164
|
+
metricSlug: string;
|
|
1165
|
+
percentile: number | null;
|
|
1166
|
+
previous: number | null;
|
|
1167
|
+
previousLabel: string | null;
|
|
1168
|
+
sampleSize: number;
|
|
1169
|
+
series: Array<Target.Sery>;
|
|
1170
|
+
status: 'MET' | 'MISSED' | 'NO_DATA';
|
|
1171
|
+
targetLabel: string;
|
|
1172
|
+
targetValue: number;
|
|
1173
|
+
unit: 'PERCENT' | 'VALUE';
|
|
1174
|
+
}
|
|
1175
|
+
namespace Target {
|
|
1176
|
+
interface Sery {
|
|
1177
|
+
date: string;
|
|
1178
|
+
sampleSize: number | null;
|
|
1179
|
+
value: number | null;
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
interface Theme {
|
|
1183
|
+
affectedConversationCount: number;
|
|
1184
|
+
analysis: string;
|
|
1185
|
+
checkNames: Array<string>;
|
|
1186
|
+
collectorQuote: Theme.CollectorQuote | null;
|
|
1187
|
+
estimatedAffectedConversationCount: number | null;
|
|
1188
|
+
excerpts: Array<Theme.Excerpt>;
|
|
1189
|
+
flaggedForImpact: boolean;
|
|
1190
|
+
impact: 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW' | null;
|
|
1191
|
+
impactReason: string | null;
|
|
1192
|
+
issue: Theme.Issue | null;
|
|
1193
|
+
lifecycle: 'NEW' | 'PERSISTENT' | 'IMPROVING' | 'FIXED' | null;
|
|
1194
|
+
memberConversationIds: Array<string>;
|
|
1195
|
+
metricDefinitionIds: Array<string>;
|
|
1196
|
+
prevalence: 'WIDESPREAD' | 'RECURRING' | 'ISOLATED' | null;
|
|
1197
|
+
rootCauseChannel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL' | null;
|
|
1198
|
+
severity: 'HIGH' | 'MEDIUM' | 'LOW';
|
|
1199
|
+
slug: string;
|
|
1200
|
+
title: string;
|
|
1201
|
+
totalConversationCount: number;
|
|
1202
|
+
memberCalls?: Array<Theme.MemberCall>;
|
|
1203
|
+
}
|
|
1204
|
+
namespace Theme {
|
|
1205
|
+
interface CollectorQuote {
|
|
1206
|
+
conversationId: string;
|
|
1207
|
+
metricName: string;
|
|
1208
|
+
quote: string;
|
|
1209
|
+
}
|
|
1210
|
+
interface Excerpt {
|
|
1211
|
+
callId: string | null;
|
|
1212
|
+
caption: string | null;
|
|
1213
|
+
conversationId: string;
|
|
1214
|
+
personaName: string | null;
|
|
1215
|
+
scenarioName: string | null;
|
|
1216
|
+
turns: Array<Excerpt.Turn>;
|
|
1217
|
+
}
|
|
1218
|
+
namespace Excerpt {
|
|
1219
|
+
interface Turn {
|
|
1220
|
+
flagNote: string | null;
|
|
1221
|
+
flagged: boolean;
|
|
1222
|
+
offsetMs: number | null;
|
|
1223
|
+
role: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER';
|
|
1224
|
+
text: string;
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
interface Issue {
|
|
1228
|
+
id: string;
|
|
1229
|
+
firstSeenAtIso: string | null;
|
|
1230
|
+
status: string;
|
|
1231
|
+
title: string;
|
|
1232
|
+
}
|
|
1233
|
+
interface MemberCall {
|
|
1234
|
+
callId: string | null;
|
|
1235
|
+
conversationId: string;
|
|
1236
|
+
cueMs: number | null;
|
|
1237
|
+
personaName: string | null;
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
interface Volume {
|
|
1241
|
+
conversationCount: number;
|
|
1242
|
+
deltaPct: number | null;
|
|
1243
|
+
endings: Array<Volume.Ending>;
|
|
1244
|
+
previousConversationCount: number | null;
|
|
1245
|
+
series: Array<Volume.Sery>;
|
|
1246
|
+
}
|
|
1247
|
+
namespace Volume {
|
|
1248
|
+
interface Ending {
|
|
1249
|
+
count: number;
|
|
1250
|
+
label: string;
|
|
1251
|
+
sharePct: number;
|
|
1252
|
+
value: string;
|
|
1253
|
+
}
|
|
1254
|
+
interface Sery {
|
|
1255
|
+
date: string;
|
|
1256
|
+
sampleSize: number | null;
|
|
1257
|
+
value: number | null;
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
export interface LiveReportRunResponse {
|
|
1265
|
+
/**
|
|
1266
|
+
* One written report over one period. `document` is null until `status` is READY;
|
|
1267
|
+
* every number in it comes from the analytics engine (the same reads GET
|
|
1268
|
+
* /v1/dashboard/{dashboardId}/data makes over the same window and filters).
|
|
1269
|
+
*/
|
|
1270
|
+
data: LiveReportRunResponse.Data;
|
|
1271
|
+
}
|
|
1272
|
+
export declare namespace LiveReportRunResponse {
|
|
1273
|
+
/**
|
|
1274
|
+
* One written report over one period. `document` is null until `status` is READY;
|
|
1275
|
+
* every number in it comes from the analytics engine (the same reads GET
|
|
1276
|
+
* /v1/dashboard/{dashboardId}/data makes over the same window and filters).
|
|
1277
|
+
*/
|
|
1278
|
+
interface Data {
|
|
1279
|
+
id: string;
|
|
1280
|
+
announcedAt: string | null;
|
|
1281
|
+
cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY' | null;
|
|
1282
|
+
completedAt: string | null;
|
|
1283
|
+
createdAt: string;
|
|
1284
|
+
definition: Data.Definition;
|
|
1285
|
+
document: Data.Document | null;
|
|
1286
|
+
errorMessage: string | null;
|
|
1287
|
+
liveReportId: string | null;
|
|
1288
|
+
periodEnd: string;
|
|
1289
|
+
periodStart: string;
|
|
1290
|
+
projectId: string;
|
|
1291
|
+
status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED';
|
|
1292
|
+
timezone: string;
|
|
1293
|
+
trigger: 'SCHEDULED' | 'MANUAL';
|
|
1294
|
+
}
|
|
1295
|
+
namespace Data {
|
|
1296
|
+
interface Definition {
|
|
1297
|
+
agentId: string | null;
|
|
1298
|
+
agentName: string | null;
|
|
1299
|
+
dashboardId: string | null;
|
|
1300
|
+
description: string | null;
|
|
1301
|
+
filters: Array<Definition.Filter>;
|
|
1302
|
+
includeTranscriptExcerpts: boolean;
|
|
1303
|
+
name: string;
|
|
1304
|
+
targets: Array<Definition.Target>;
|
|
1305
|
+
}
|
|
1306
|
+
namespace Definition {
|
|
1307
|
+
interface Filter {
|
|
1308
|
+
/**
|
|
1309
|
+
* What the filter narrows on. GET /v1/analytics/schema lists each type.
|
|
1310
|
+
*/
|
|
1311
|
+
type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE';
|
|
1312
|
+
/**
|
|
1313
|
+
* Defaults to EQUALS. IS_SET / IS_NOT_SET (CALL_PROPERTY only) keep conversations
|
|
1314
|
+
* where the property is set, whatever the value, or missing (never sent, sent as
|
|
1315
|
+
* null, or removed); they take no value.
|
|
1316
|
+
*/
|
|
1317
|
+
operator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO' | 'CONTAINS' | 'STARTS_WITH' | 'IS_SET' | 'IS_NOT_SET';
|
|
1318
|
+
/**
|
|
1319
|
+
* The property to compare. Required for CALL_PROPERTY and METRIC_PROPERTY; may be
|
|
1320
|
+
* omitted for AGENT_PROPERTY, DATASET, MODALITY and CALL_ID.
|
|
1321
|
+
*/
|
|
1322
|
+
property?: string;
|
|
1323
|
+
/**
|
|
1324
|
+
* The value to compare against (an agent id, "call" / "chat", a property value).
|
|
1325
|
+
* Required except with IS_SET / IS_NOT_SET.
|
|
1326
|
+
*/
|
|
1327
|
+
value?: string | number | boolean;
|
|
1328
|
+
}
|
|
1329
|
+
interface Target {
|
|
1330
|
+
/**
|
|
1331
|
+
* The metric's slug (e.g. `task_completion`) or id.
|
|
1332
|
+
*/
|
|
1333
|
+
metric: string;
|
|
1334
|
+
/**
|
|
1335
|
+
* The bar, in display units. A PASS_RATE bar is a percentage, 0-100.
|
|
1336
|
+
*/
|
|
1337
|
+
value: number;
|
|
1338
|
+
/**
|
|
1339
|
+
* Defaults to PASS_RATE for thresholds and booleans, AVG for anything numeric.
|
|
1340
|
+
*/
|
|
1341
|
+
aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX';
|
|
1342
|
+
/**
|
|
1343
|
+
* AT_LEAST (default for PASS_RATE) or AT_MOST (default for every other
|
|
1344
|
+
* aggregation).
|
|
1345
|
+
*/
|
|
1346
|
+
comparator?: 'AT_LEAST' | 'AT_MOST';
|
|
1347
|
+
/**
|
|
1348
|
+
* Shown instead of the metric's name.
|
|
1349
|
+
*/
|
|
1350
|
+
label?: string;
|
|
1351
|
+
/**
|
|
1352
|
+
* PASS_RATE on a metric that isn't a threshold: the per-call condition a call
|
|
1353
|
+
* passes on.
|
|
1354
|
+
*/
|
|
1355
|
+
passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO';
|
|
1356
|
+
passValue?: string | number | boolean;
|
|
1357
|
+
/**
|
|
1358
|
+
* Required with PERCENTILE, e.g. 95.
|
|
1359
|
+
*/
|
|
1360
|
+
percentile?: number;
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
interface Document {
|
|
1364
|
+
agents: Array<Document.Agent>;
|
|
1365
|
+
appendix: Document.Appendix;
|
|
1366
|
+
charts: Array<Document.Chart>;
|
|
1367
|
+
checks: Array<Document.Check>;
|
|
1368
|
+
evidence: Document.Evidence;
|
|
1369
|
+
executiveSummary: Document.ExecutiveSummary;
|
|
1370
|
+
generatedAtIso: string;
|
|
1371
|
+
headline: Document.Headline;
|
|
1372
|
+
liveReportId: string | null;
|
|
1373
|
+
model: string;
|
|
1374
|
+
recommendations: Array<Document.Recommendation>;
|
|
1375
|
+
targets: Array<Document.Target>;
|
|
1376
|
+
themes: Array<Document.Theme>;
|
|
1377
|
+
version: 1;
|
|
1378
|
+
volume: Document.Volume;
|
|
1379
|
+
}
|
|
1380
|
+
namespace Document {
|
|
1381
|
+
interface Agent {
|
|
1382
|
+
agentId: string;
|
|
1383
|
+
agentName: string;
|
|
1384
|
+
conversationCount: number;
|
|
1385
|
+
sharePct: number;
|
|
1386
|
+
targets: Array<Agent.Target>;
|
|
1387
|
+
}
|
|
1388
|
+
namespace Agent {
|
|
1389
|
+
interface Target {
|
|
1390
|
+
actual: number | null;
|
|
1391
|
+
actualLabel: string | null;
|
|
1392
|
+
key: string;
|
|
1393
|
+
status: 'MET' | 'MISSED' | 'NO_DATA';
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
interface Appendix {
|
|
1397
|
+
methodology: string;
|
|
1398
|
+
notes: Array<string>;
|
|
1399
|
+
}
|
|
1400
|
+
interface Chart {
|
|
1401
|
+
blocked: boolean;
|
|
1402
|
+
description: string | null;
|
|
1403
|
+
display: 'LINE' | 'NUMBER' | 'RADAR' | 'STACKED_BAR' | 'TABLE';
|
|
1404
|
+
error: string | null;
|
|
1405
|
+
interval: 'HOUR' | 'DAY' | 'WEEK' | 'MONTH';
|
|
1406
|
+
name: string;
|
|
1407
|
+
omittedSeries: number;
|
|
1408
|
+
series: Array<Chart.Sery>;
|
|
1409
|
+
}
|
|
1410
|
+
namespace Chart {
|
|
1411
|
+
interface Sery {
|
|
1412
|
+
aggregation: 'COUNT' | 'AVG' | 'MIN' | 'MAX' | 'SUM' | 'MEDIAN' | 'PERCENTILE' | 'PASS_RATE';
|
|
1413
|
+
breakdownValue: string | null;
|
|
1414
|
+
buckets: Array<Sery.Bucket>;
|
|
1415
|
+
comparisonGroup: string | null;
|
|
1416
|
+
comparisonValue: number | null;
|
|
1417
|
+
measureIndex: number;
|
|
1418
|
+
metric: string | null;
|
|
1419
|
+
percentageOfBaseline: number | null;
|
|
1420
|
+
sampleSize: number | null;
|
|
1421
|
+
type: 'METRIC' | 'CONVERSATION' | 'UPTIME';
|
|
1422
|
+
value: number;
|
|
1423
|
+
}
|
|
1424
|
+
namespace Sery {
|
|
1425
|
+
interface Bucket {
|
|
1426
|
+
date: string;
|
|
1427
|
+
value: number;
|
|
1428
|
+
comparisonDate?: string;
|
|
1429
|
+
comparisonValue?: number;
|
|
1430
|
+
passed?: number;
|
|
1431
|
+
percentageOfBaseline?: number;
|
|
1432
|
+
sampleSize?: number;
|
|
1433
|
+
}
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
interface Check {
|
|
1437
|
+
checkName: string;
|
|
1438
|
+
comparable: boolean;
|
|
1439
|
+
deltaPts: number | null;
|
|
1440
|
+
evaluatedCount: number;
|
|
1441
|
+
failedCount: number;
|
|
1442
|
+
isTarget: boolean;
|
|
1443
|
+
metricDefinitionId: string;
|
|
1444
|
+
metricSlug: string;
|
|
1445
|
+
passRatePct: number | null;
|
|
1446
|
+
previousPassRatePct: number | null;
|
|
1447
|
+
}
|
|
1448
|
+
interface Evidence {
|
|
1449
|
+
failingConversationCount: number;
|
|
1450
|
+
failingCountIsLowerBound: boolean;
|
|
1451
|
+
readConversationCount: number;
|
|
1452
|
+
sampled: boolean;
|
|
1453
|
+
}
|
|
1454
|
+
interface ExecutiveSummary {
|
|
1455
|
+
keyFindings: Array<ExecutiveSummary.KeyFinding>;
|
|
1456
|
+
paragraphs: Array<string>;
|
|
1457
|
+
sections?: Array<ExecutiveSummary.Section>;
|
|
1458
|
+
}
|
|
1459
|
+
namespace ExecutiveSummary {
|
|
1460
|
+
interface KeyFinding {
|
|
1461
|
+
body: string;
|
|
1462
|
+
title: string;
|
|
1463
|
+
calls?: Array<KeyFinding.Call>;
|
|
1464
|
+
}
|
|
1465
|
+
namespace KeyFinding {
|
|
1466
|
+
interface Call {
|
|
1467
|
+
callId: string | null;
|
|
1468
|
+
conversationId: string;
|
|
1469
|
+
cueMs: number | null;
|
|
1470
|
+
personaName: string | null;
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
interface Section {
|
|
1474
|
+
body: string;
|
|
1475
|
+
heading: string | null;
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
interface Headline {
|
|
1479
|
+
agentName: string | null;
|
|
1480
|
+
cadence: 'DAILY' | 'WEEKLY' | 'MONTHLY' | null;
|
|
1481
|
+
periodEndIso: string;
|
|
1482
|
+
periodLabel: string;
|
|
1483
|
+
periodStartIso: string;
|
|
1484
|
+
reportName: string;
|
|
1485
|
+
statTiles: Array<Headline.StatTile>;
|
|
1486
|
+
timezone: string;
|
|
1487
|
+
verdict: 'ON_TARGET' | 'OFF_TARGET' | 'NO_TARGETS' | 'NO_DATA';
|
|
1488
|
+
verdictProse: string;
|
|
1489
|
+
}
|
|
1490
|
+
namespace Headline {
|
|
1491
|
+
interface StatTile {
|
|
1492
|
+
deltaDirection: 'POSITIVE' | 'NEGATIVE' | 'NEUTRAL' | null;
|
|
1493
|
+
label: string;
|
|
1494
|
+
sub: string | null;
|
|
1495
|
+
value: string;
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
interface Recommendation {
|
|
1499
|
+
afterText: string | null;
|
|
1500
|
+
beforeText: string | null;
|
|
1501
|
+
body: string;
|
|
1502
|
+
channel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL' | null;
|
|
1503
|
+
order: number;
|
|
1504
|
+
promptOptimizationFindingId: string | null;
|
|
1505
|
+
severity: 'HIGH' | 'MEDIUM' | 'LOW' | null;
|
|
1506
|
+
source: 'PROMPT_OPTIMIZER' | 'DEBRIEF';
|
|
1507
|
+
themeSlugs: Array<string>;
|
|
1508
|
+
title: string;
|
|
1509
|
+
}
|
|
1510
|
+
interface Target {
|
|
1511
|
+
actual: number | null;
|
|
1512
|
+
actualLabel: string | null;
|
|
1513
|
+
aggregation: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX';
|
|
1514
|
+
comparator: 'AT_LEAST' | 'AT_MOST';
|
|
1515
|
+
deltaDirection: 'POSITIVE' | 'NEGATIVE' | 'NEUTRAL' | null;
|
|
1516
|
+
deltaLabel: string | null;
|
|
1517
|
+
error: string | null;
|
|
1518
|
+
failingConversationCount: number | null;
|
|
1519
|
+
key: string;
|
|
1520
|
+
label: string;
|
|
1521
|
+
lifecycle: 'NEW_MISS' | 'STILL_MISSED' | 'RECOVERED' | 'HOLDING' | null;
|
|
1522
|
+
metricDefinitionId: string | null;
|
|
1523
|
+
metricName: string;
|
|
1524
|
+
metricSlug: string;
|
|
1525
|
+
percentile: number | null;
|
|
1526
|
+
previous: number | null;
|
|
1527
|
+
previousLabel: string | null;
|
|
1528
|
+
sampleSize: number;
|
|
1529
|
+
series: Array<Target.Sery>;
|
|
1530
|
+
status: 'MET' | 'MISSED' | 'NO_DATA';
|
|
1531
|
+
targetLabel: string;
|
|
1532
|
+
targetValue: number;
|
|
1533
|
+
unit: 'PERCENT' | 'VALUE';
|
|
1534
|
+
}
|
|
1535
|
+
namespace Target {
|
|
1536
|
+
interface Sery {
|
|
1537
|
+
date: string;
|
|
1538
|
+
sampleSize: number | null;
|
|
1539
|
+
value: number | null;
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
interface Theme {
|
|
1543
|
+
affectedConversationCount: number;
|
|
1544
|
+
analysis: string;
|
|
1545
|
+
checkNames: Array<string>;
|
|
1546
|
+
collectorQuote: Theme.CollectorQuote | null;
|
|
1547
|
+
estimatedAffectedConversationCount: number | null;
|
|
1548
|
+
excerpts: Array<Theme.Excerpt>;
|
|
1549
|
+
flaggedForImpact: boolean;
|
|
1550
|
+
impact: 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW' | null;
|
|
1551
|
+
impactReason: string | null;
|
|
1552
|
+
issue: Theme.Issue | null;
|
|
1553
|
+
lifecycle: 'NEW' | 'PERSISTENT' | 'IMPROVING' | 'FIXED' | null;
|
|
1554
|
+
memberConversationIds: Array<string>;
|
|
1555
|
+
metricDefinitionIds: Array<string>;
|
|
1556
|
+
prevalence: 'WIDESPREAD' | 'RECURRING' | 'ISOLATED' | null;
|
|
1557
|
+
rootCauseChannel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL' | null;
|
|
1558
|
+
severity: 'HIGH' | 'MEDIUM' | 'LOW';
|
|
1559
|
+
slug: string;
|
|
1560
|
+
title: string;
|
|
1561
|
+
totalConversationCount: number;
|
|
1562
|
+
memberCalls?: Array<Theme.MemberCall>;
|
|
1563
|
+
}
|
|
1564
|
+
namespace Theme {
|
|
1565
|
+
interface CollectorQuote {
|
|
1566
|
+
conversationId: string;
|
|
1567
|
+
metricName: string;
|
|
1568
|
+
quote: string;
|
|
1569
|
+
}
|
|
1570
|
+
interface Excerpt {
|
|
1571
|
+
callId: string | null;
|
|
1572
|
+
caption: string | null;
|
|
1573
|
+
conversationId: string;
|
|
1574
|
+
personaName: string | null;
|
|
1575
|
+
scenarioName: string | null;
|
|
1576
|
+
turns: Array<Excerpt.Turn>;
|
|
1577
|
+
}
|
|
1578
|
+
namespace Excerpt {
|
|
1579
|
+
interface Turn {
|
|
1580
|
+
flagNote: string | null;
|
|
1581
|
+
flagged: boolean;
|
|
1582
|
+
offsetMs: number | null;
|
|
1583
|
+
role: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER';
|
|
1584
|
+
text: string;
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
interface Issue {
|
|
1588
|
+
id: string;
|
|
1589
|
+
firstSeenAtIso: string | null;
|
|
1590
|
+
status: string;
|
|
1591
|
+
title: string;
|
|
1592
|
+
}
|
|
1593
|
+
interface MemberCall {
|
|
1594
|
+
callId: string | null;
|
|
1595
|
+
conversationId: string;
|
|
1596
|
+
cueMs: number | null;
|
|
1597
|
+
personaName: string | null;
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
interface Volume {
|
|
1601
|
+
conversationCount: number;
|
|
1602
|
+
deltaPct: number | null;
|
|
1603
|
+
endings: Array<Volume.Ending>;
|
|
1604
|
+
previousConversationCount: number | null;
|
|
1605
|
+
series: Array<Volume.Sery>;
|
|
1606
|
+
}
|
|
1607
|
+
namespace Volume {
|
|
1608
|
+
interface Ending {
|
|
1609
|
+
count: number;
|
|
1610
|
+
label: string;
|
|
1611
|
+
sharePct: number;
|
|
1612
|
+
value: string;
|
|
1613
|
+
}
|
|
1614
|
+
interface Sery {
|
|
1615
|
+
date: string;
|
|
1616
|
+
sampleSize: number | null;
|
|
1617
|
+
value: number | null;
|
|
1618
|
+
}
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
export interface LiveReportCreateParams {
|
|
1624
|
+
name: string;
|
|
1625
|
+
agentId?: string | null;
|
|
1626
|
+
cadence?: 'DAILY' | 'WEEKLY' | 'MONTHLY';
|
|
1627
|
+
dashboardId?: string | null;
|
|
1628
|
+
deliveryHour?: number;
|
|
1629
|
+
description?: string | null;
|
|
1630
|
+
filters?: Array<LiveReportCreateParams.Filter>;
|
|
1631
|
+
/**
|
|
1632
|
+
* Write the report for the latest closed period right away. Default true.
|
|
1633
|
+
*/
|
|
1634
|
+
generateNow?: boolean;
|
|
1635
|
+
includeTranscriptExcerpts?: boolean;
|
|
1636
|
+
notifications?: LiveReportCreateParams.Notifications;
|
|
1637
|
+
status?: 'ACTIVE' | 'PAUSED';
|
|
1638
|
+
targets?: Array<LiveReportCreateParams.Target>;
|
|
1639
|
+
timezone?: string;
|
|
1640
|
+
}
|
|
1641
|
+
export declare namespace LiveReportCreateParams {
|
|
1642
|
+
interface Filter {
|
|
1643
|
+
/**
|
|
1644
|
+
* What the filter narrows on. GET /v1/analytics/schema lists each type.
|
|
1645
|
+
*/
|
|
1646
|
+
type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE';
|
|
1647
|
+
/**
|
|
1648
|
+
* Defaults to EQUALS. IS_SET / IS_NOT_SET (CALL_PROPERTY only) keep conversations
|
|
1649
|
+
* where the property is set, whatever the value, or missing (never sent, sent as
|
|
1650
|
+
* null, or removed); they take no value.
|
|
1651
|
+
*/
|
|
1652
|
+
operator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO' | 'CONTAINS' | 'STARTS_WITH' | 'IS_SET' | 'IS_NOT_SET';
|
|
1653
|
+
/**
|
|
1654
|
+
* The property to compare. Required for CALL_PROPERTY and METRIC_PROPERTY; may be
|
|
1655
|
+
* omitted for AGENT_PROPERTY, DATASET, MODALITY and CALL_ID.
|
|
1656
|
+
*/
|
|
1657
|
+
property?: string;
|
|
1658
|
+
/**
|
|
1659
|
+
* The value to compare against (an agent id, "call" / "chat", a property value).
|
|
1660
|
+
* Required except with IS_SET / IS_NOT_SET.
|
|
1661
|
+
*/
|
|
1662
|
+
value?: string | number | boolean;
|
|
1663
|
+
}
|
|
1664
|
+
interface Notifications {
|
|
1665
|
+
email: Notifications.Email;
|
|
1666
|
+
slack: Array<Notifications.Slack>;
|
|
1667
|
+
}
|
|
1668
|
+
namespace Notifications {
|
|
1669
|
+
interface Email {
|
|
1670
|
+
enabled: boolean;
|
|
1671
|
+
recipients: Array<string>;
|
|
1672
|
+
}
|
|
1673
|
+
interface Slack {
|
|
1674
|
+
channelId: string;
|
|
1675
|
+
channelName: string;
|
|
1676
|
+
}
|
|
1677
|
+
}
|
|
1678
|
+
interface Target {
|
|
1679
|
+
/**
|
|
1680
|
+
* The metric's slug (e.g. `task_completion`) or id.
|
|
1681
|
+
*/
|
|
1682
|
+
metric: string;
|
|
1683
|
+
/**
|
|
1684
|
+
* The bar, in display units. A PASS_RATE bar is a percentage, 0-100.
|
|
1685
|
+
*/
|
|
1686
|
+
value: number;
|
|
1687
|
+
/**
|
|
1688
|
+
* Defaults to PASS_RATE for thresholds and booleans, AVG for anything numeric.
|
|
1689
|
+
*/
|
|
1690
|
+
aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX';
|
|
1691
|
+
/**
|
|
1692
|
+
* AT_LEAST (default for PASS_RATE) or AT_MOST (default for every other
|
|
1693
|
+
* aggregation).
|
|
1694
|
+
*/
|
|
1695
|
+
comparator?: 'AT_LEAST' | 'AT_MOST';
|
|
1696
|
+
/**
|
|
1697
|
+
* Shown instead of the metric's name.
|
|
1698
|
+
*/
|
|
1699
|
+
label?: string;
|
|
1700
|
+
/**
|
|
1701
|
+
* PASS_RATE on a metric that isn't a threshold: the per-call condition a call
|
|
1702
|
+
* passes on.
|
|
1703
|
+
*/
|
|
1704
|
+
passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO';
|
|
1705
|
+
passValue?: string | number | boolean;
|
|
1706
|
+
/**
|
|
1707
|
+
* Required with PERCENTILE, e.g. 95.
|
|
1708
|
+
*/
|
|
1709
|
+
percentile?: number;
|
|
1710
|
+
}
|
|
1711
|
+
}
|
|
1712
|
+
export interface LiveReportUpdateParams {
|
|
1713
|
+
agentId?: string | null;
|
|
1714
|
+
cadence?: 'DAILY' | 'WEEKLY' | 'MONTHLY';
|
|
1715
|
+
dashboardId?: string | null;
|
|
1716
|
+
deliveryHour?: number;
|
|
1717
|
+
description?: string | null;
|
|
1718
|
+
filters?: Array<LiveReportUpdateParams.Filter>;
|
|
1719
|
+
includeTranscriptExcerpts?: boolean;
|
|
1720
|
+
name?: string;
|
|
1721
|
+
notifications?: LiveReportUpdateParams.Notifications;
|
|
1722
|
+
status?: 'ACTIVE' | 'PAUSED';
|
|
1723
|
+
targets?: Array<LiveReportUpdateParams.Target>;
|
|
1724
|
+
timezone?: string;
|
|
1725
|
+
}
|
|
1726
|
+
export declare namespace LiveReportUpdateParams {
|
|
1727
|
+
interface Filter {
|
|
1728
|
+
/**
|
|
1729
|
+
* What the filter narrows on. GET /v1/analytics/schema lists each type.
|
|
1730
|
+
*/
|
|
1731
|
+
type: 'METRIC_PROPERTY' | 'CALL_PROPERTY' | 'AGENT_PROPERTY' | 'CALL_ID' | 'MODALITY' | 'DATASET' | 'METRIC_VALUE';
|
|
1732
|
+
/**
|
|
1733
|
+
* Defaults to EQUALS. IS_SET / IS_NOT_SET (CALL_PROPERTY only) keep conversations
|
|
1734
|
+
* where the property is set, whatever the value, or missing (never sent, sent as
|
|
1735
|
+
* null, or removed); they take no value.
|
|
1736
|
+
*/
|
|
1737
|
+
operator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO' | 'CONTAINS' | 'STARTS_WITH' | 'IS_SET' | 'IS_NOT_SET';
|
|
1738
|
+
/**
|
|
1739
|
+
* The property to compare. Required for CALL_PROPERTY and METRIC_PROPERTY; may be
|
|
1740
|
+
* omitted for AGENT_PROPERTY, DATASET, MODALITY and CALL_ID.
|
|
1741
|
+
*/
|
|
1742
|
+
property?: string;
|
|
1743
|
+
/**
|
|
1744
|
+
* The value to compare against (an agent id, "call" / "chat", a property value).
|
|
1745
|
+
* Required except with IS_SET / IS_NOT_SET.
|
|
1746
|
+
*/
|
|
1747
|
+
value?: string | number | boolean;
|
|
1748
|
+
}
|
|
1749
|
+
interface Notifications {
|
|
1750
|
+
email: Notifications.Email;
|
|
1751
|
+
slack: Array<Notifications.Slack>;
|
|
1752
|
+
}
|
|
1753
|
+
namespace Notifications {
|
|
1754
|
+
interface Email {
|
|
1755
|
+
enabled: boolean;
|
|
1756
|
+
recipients: Array<string>;
|
|
1757
|
+
}
|
|
1758
|
+
interface Slack {
|
|
1759
|
+
channelId: string;
|
|
1760
|
+
channelName: string;
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
interface Target {
|
|
1764
|
+
/**
|
|
1765
|
+
* The metric's slug (e.g. `task_completion`) or id.
|
|
1766
|
+
*/
|
|
1767
|
+
metric: string;
|
|
1768
|
+
/**
|
|
1769
|
+
* The bar, in display units. A PASS_RATE bar is a percentage, 0-100.
|
|
1770
|
+
*/
|
|
1771
|
+
value: number;
|
|
1772
|
+
/**
|
|
1773
|
+
* Defaults to PASS_RATE for thresholds and booleans, AVG for anything numeric.
|
|
1774
|
+
*/
|
|
1775
|
+
aggregation?: 'PASS_RATE' | 'AVG' | 'MEDIAN' | 'PERCENTILE' | 'MIN' | 'MAX';
|
|
1776
|
+
/**
|
|
1777
|
+
* AT_LEAST (default for PASS_RATE) or AT_MOST (default for every other
|
|
1778
|
+
* aggregation).
|
|
1779
|
+
*/
|
|
1780
|
+
comparator?: 'AT_LEAST' | 'AT_MOST';
|
|
1781
|
+
/**
|
|
1782
|
+
* Shown instead of the metric's name.
|
|
1783
|
+
*/
|
|
1784
|
+
label?: string;
|
|
1785
|
+
/**
|
|
1786
|
+
* PASS_RATE on a metric that isn't a threshold: the per-call condition a call
|
|
1787
|
+
* passes on.
|
|
1788
|
+
*/
|
|
1789
|
+
passOperator?: 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL_TO' | 'LESS_THAN' | 'LESS_THAN_OR_EQUAL_TO';
|
|
1790
|
+
passValue?: string | number | boolean;
|
|
1791
|
+
/**
|
|
1792
|
+
* Required with PERCENTILE, e.g. 95.
|
|
1793
|
+
*/
|
|
1794
|
+
percentile?: number;
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
export interface LiveReportListParams {
|
|
1798
|
+
/**
|
|
1799
|
+
* Page size, at most 100.
|
|
1800
|
+
*/
|
|
1801
|
+
limit?: number;
|
|
1802
|
+
offset?: number;
|
|
1803
|
+
}
|
|
1804
|
+
export interface LiveReportGetDocumentParams {
|
|
1805
|
+
/**
|
|
1806
|
+
* The live report ID
|
|
1807
|
+
*/
|
|
1808
|
+
reportId: string;
|
|
1809
|
+
}
|
|
1810
|
+
export interface LiveReportListDocumentsParams {
|
|
1811
|
+
/**
|
|
1812
|
+
* Page size, at most 100.
|
|
1813
|
+
*/
|
|
1814
|
+
limit?: number;
|
|
1815
|
+
offset?: number;
|
|
1816
|
+
}
|
|
1817
|
+
export interface LiveReportRunParams {
|
|
1818
|
+
/**
|
|
1819
|
+
* ISO 8601 end (exclusive) of a custom window. Requires periodStart.
|
|
1820
|
+
*/
|
|
1821
|
+
periodEnd?: string;
|
|
1822
|
+
/**
|
|
1823
|
+
* ISO 8601 start of a custom window. Omit both for the latest closed period.
|
|
1824
|
+
*/
|
|
1825
|
+
periodStart?: string;
|
|
1826
|
+
}
|
|
1827
|
+
export declare namespace LiveReport {
|
|
1828
|
+
export { type LiveReportCreateResponse as LiveReportCreateResponse, type LiveReportUpdateResponse as LiveReportUpdateResponse, type LiveReportListResponse as LiveReportListResponse, type LiveReportDeleteResponse as LiveReportDeleteResponse, type LiveReportGetByIDResponse as LiveReportGetByIDResponse, type LiveReportGetDocumentResponse as LiveReportGetDocumentResponse, type LiveReportListDocumentsResponse as LiveReportListDocumentsResponse, type LiveReportRunResponse as LiveReportRunResponse, type LiveReportCreateParams as LiveReportCreateParams, type LiveReportUpdateParams as LiveReportUpdateParams, type LiveReportListParams as LiveReportListParams, type LiveReportGetDocumentParams as LiveReportGetDocumentParams, type LiveReportListDocumentsParams as LiveReportListDocumentsParams, type LiveReportRunParams as LiveReportRunParams, };
|
|
1829
|
+
}
|
|
1830
|
+
//# sourceMappingURL=live-report.d.mts.map
|