@roarkanalytics/sdk 6.2.0 → 7.1.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 +28 -0
- package/client.d.mts +9 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +9 -0
- package/client.d.ts.map +1 -1
- package/client.js +9 -0
- package/client.js.map +1 -1
- package/client.mjs +9 -0
- package/client.mjs.map +1 -1
- package/lib/config.d.mts +12 -0
- package/lib/config.d.mts.map +1 -1
- package/lib/config.d.ts +12 -0
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +11 -1
- package/lib/config.js.map +1 -1
- package/lib/config.mjs +9 -0
- package/lib/config.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/calendar-connection.d.mts +897 -0
- package/resources/calendar-connection.d.mts.map +1 -0
- package/resources/calendar-connection.d.ts +897 -0
- package/resources/calendar-connection.d.ts.map +1 -0
- package/resources/calendar-connection.js +143 -0
- package/resources/calendar-connection.js.map +1 -0
- package/resources/calendar-connection.mjs +139 -0
- package/resources/calendar-connection.mjs.map +1 -0
- package/resources/call.d.mts +2 -0
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +2 -0
- package/resources/call.d.ts.map +1 -1
- package/resources/config.d.mts +508 -27
- package/resources/config.d.mts.map +1 -1
- package/resources/config.d.ts +508 -27
- package/resources/config.d.ts.map +1 -1
- package/resources/customer-flow.d.mts +49 -9
- package/resources/customer-flow.d.mts.map +1 -1
- package/resources/customer-flow.d.ts +49 -9
- package/resources/customer-flow.d.ts.map +1 -1
- package/resources/http-request-definition.d.mts +4 -4
- package/resources/http-request-definition.d.mts.map +1 -1
- package/resources/http-request-definition.d.ts +4 -4
- package/resources/http-request-definition.d.ts.map +1 -1
- package/resources/index.d.mts +3 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -1
- package/resources/metric-variant.d.mts +6 -0
- package/resources/metric-variant.d.mts.map +1 -1
- package/resources/metric-variant.d.ts +6 -0
- package/resources/metric-variant.d.ts.map +1 -1
- package/resources/metric.d.mts +93 -0
- package/resources/metric.d.mts.map +1 -1
- package/resources/metric.d.ts +93 -0
- package/resources/metric.d.ts.map +1 -1
- package/resources/simulation-audio-clip.d.mts +44 -0
- package/resources/simulation-audio-clip.d.mts.map +1 -0
- package/resources/simulation-audio-clip.d.ts +44 -0
- package/resources/simulation-audio-clip.d.ts.map +1 -0
- package/resources/simulation-audio-clip.js +23 -0
- package/resources/simulation-audio-clip.js.map +1 -0
- package/resources/simulation-audio-clip.mjs +19 -0
- package/resources/simulation-audio-clip.mjs.map +1 -0
- package/resources/tool.d.mts +671 -0
- package/resources/tool.d.mts.map +1 -0
- package/resources/tool.d.ts +671 -0
- package/resources/tool.d.ts.map +1 -0
- package/resources/tool.js +83 -0
- package/resources/tool.js.map +1 -0
- package/resources/tool.mjs +79 -0
- package/resources/tool.mjs.map +1 -0
- package/src/client.ts +66 -0
- package/src/lib/config.ts +22 -0
- package/src/resources/calendar-connection.ts +1103 -0
- package/src/resources/call.ts +4 -0
- package/src/resources/config.ts +948 -22
- package/src/resources/customer-flow.ts +79 -11
- package/src/resources/http-request-definition.ts +4 -4
- package/src/resources/index.ts +27 -0
- package/src/resources/metric-variant.ts +7 -0
- package/src/resources/metric.ts +111 -0
- package/src/resources/simulation-audio-clip.ts +63 -0
- package/src/resources/tool.ts +884 -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
|
@@ -206,11 +206,26 @@ export class CustomerFlow extends APIResource {
|
|
|
206
206
|
* whoever holds the phone. It sits between turns like a silence, so it may follow
|
|
207
207
|
* either side.
|
|
208
208
|
*
|
|
209
|
+
* A `CUSTOMER_AUDIO` plays audio from the library (`audioClip`, see GET
|
|
210
|
+
* /v1/simulation/audio-clip) on the line for `silenceDurationSeconds` (up to 600,
|
|
211
|
+
* 30 when unset), looping it or cutting it to fit, the way an IVR plays hold
|
|
212
|
+
* music. It plays in a STRICT voice flow only: anywhere else it is a pause of the
|
|
213
|
+
* same length. It sits between turns like a silence.
|
|
214
|
+
*
|
|
209
215
|
* In a STRICT flow an `AGENT_TURN` may carry its own `offScriptPolicy`, which
|
|
210
216
|
* replaces the flow-level one at that step. Omit it (or send null) to follow the
|
|
211
217
|
* flow's policy. Use it where one missed step makes the rest of the call
|
|
212
218
|
* meaningless: an authentication menu, say, with `then: HANG_UP_INVALIDATE`.
|
|
213
219
|
*
|
|
220
|
+
* In a STRICT flow an `AGENT_DTMF` may carry an `offScriptPolicy` too, read
|
|
221
|
+
* differently: `waitSeconds` is how long to wait for the keys (at least 5, and
|
|
222
|
+
* just under the run's silence timeout by default and at most) and `then` what
|
|
223
|
+
* follows (`MOVE_ON`, `HANG_UP` or `HANG_UP_INVALIDATE`). Without one the call
|
|
224
|
+
* hangs up in silence after that wait, whatever the flow-level policy says. Speech
|
|
225
|
+
* does not end the wait. `reaction` is `STAY_SILENT` or `REPEAT`: with `REPEAT`
|
|
226
|
+
* the caller says the line before the step again each time the wait runs out, up
|
|
227
|
+
* to `maxAttempts` waits (at most 5), and `then` follows the last one.
|
|
228
|
+
*
|
|
214
229
|
* Any step may set `stage`, the named phase of the flow it belongs to: the IVR,
|
|
215
230
|
* the login, the scenario itself. Steps in one stage are drawn as a group in the
|
|
216
231
|
* editor, and the name is yours: the reports say it back to you. The stage does
|
|
@@ -248,7 +263,8 @@ export type FlowStep =
|
|
|
248
263
|
| FlowStep.UnionMember6
|
|
249
264
|
| FlowStep.UnionMember7
|
|
250
265
|
| FlowStep.UnionMember8
|
|
251
|
-
| FlowStep.UnionMember9
|
|
266
|
+
| FlowStep.UnionMember9
|
|
267
|
+
| FlowStep.UnionMember10;
|
|
252
268
|
|
|
253
269
|
export namespace FlowStep {
|
|
254
270
|
export interface UnionMember0 {
|
|
@@ -396,9 +412,19 @@ export namespace FlowStep {
|
|
|
396
412
|
}
|
|
397
413
|
|
|
398
414
|
export interface UnionMember5 {
|
|
399
|
-
type: '
|
|
400
|
-
|
|
401
|
-
|
|
415
|
+
type: 'CUSTOMER_AUDIO';
|
|
416
|
+
|
|
417
|
+
audioClip?:
|
|
418
|
+
| 'HOLD_MUSIC_CLASSICAL_PIANO'
|
|
419
|
+
| 'HOLD_MUSIC_CLASSICAL_ORCHESTRA'
|
|
420
|
+
| 'HOLD_MUSIC_STRING_QUARTET'
|
|
421
|
+
| 'HOLD_MUSIC_AMBIENT'
|
|
422
|
+
| 'HOLD_MUSIC_SMOOTH_JAZZ'
|
|
423
|
+
| 'HOLD_MUSIC_SOFT_SYNTH'
|
|
424
|
+
| 'HOLD_BEEP'
|
|
425
|
+
| 'RINGBACK_US'
|
|
426
|
+
| 'RINGBACK_UK'
|
|
427
|
+
| null;
|
|
402
428
|
|
|
403
429
|
mergeIntoNodeIds?: Array<string>;
|
|
404
430
|
|
|
@@ -406,6 +432,8 @@ export namespace FlowStep {
|
|
|
406
432
|
|
|
407
433
|
ref?: string;
|
|
408
434
|
|
|
435
|
+
silenceDurationSeconds?: number | null;
|
|
436
|
+
|
|
409
437
|
stage?: UnionMember5.Stage | null;
|
|
410
438
|
|
|
411
439
|
steps?: Array<CustomerFlowAPI.FlowStep>;
|
|
@@ -422,7 +450,7 @@ export namespace FlowStep {
|
|
|
422
450
|
}
|
|
423
451
|
|
|
424
452
|
export interface UnionMember6 {
|
|
425
|
-
type: '
|
|
453
|
+
type: 'CUSTOMER_DTMF';
|
|
426
454
|
|
|
427
455
|
dtmfDigits?: string | null;
|
|
428
456
|
|
|
@@ -448,12 +476,16 @@ export namespace FlowStep {
|
|
|
448
476
|
}
|
|
449
477
|
|
|
450
478
|
export interface UnionMember7 {
|
|
451
|
-
type: '
|
|
479
|
+
type: 'AGENT_DTMF';
|
|
480
|
+
|
|
481
|
+
dtmfDigits?: string | null;
|
|
452
482
|
|
|
453
483
|
mergeIntoNodeIds?: Array<string>;
|
|
454
484
|
|
|
455
485
|
nodeId?: string;
|
|
456
486
|
|
|
487
|
+
offScriptPolicy?: UnionMember7.OffScriptPolicy | null;
|
|
488
|
+
|
|
457
489
|
ref?: string;
|
|
458
490
|
|
|
459
491
|
stage?: UnionMember7.Stage | null;
|
|
@@ -462,6 +494,18 @@ export namespace FlowStep {
|
|
|
462
494
|
}
|
|
463
495
|
|
|
464
496
|
export namespace UnionMember7 {
|
|
497
|
+
export interface OffScriptPolicy {
|
|
498
|
+
maxAttempts: number;
|
|
499
|
+
|
|
500
|
+
reaction: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY';
|
|
501
|
+
|
|
502
|
+
then: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE';
|
|
503
|
+
|
|
504
|
+
sayLine?: string | null;
|
|
505
|
+
|
|
506
|
+
waitSeconds?: number | null;
|
|
507
|
+
}
|
|
508
|
+
|
|
465
509
|
export interface Stage {
|
|
466
510
|
name: string;
|
|
467
511
|
|
|
@@ -472,9 +516,7 @@ export namespace FlowStep {
|
|
|
472
516
|
}
|
|
473
517
|
|
|
474
518
|
export interface UnionMember8 {
|
|
475
|
-
type: '
|
|
476
|
-
|
|
477
|
-
handoffPersonaId?: string | null;
|
|
519
|
+
type: 'VOICEMAIL';
|
|
478
520
|
|
|
479
521
|
mergeIntoNodeIds?: Array<string>;
|
|
480
522
|
|
|
@@ -498,6 +540,32 @@ export namespace FlowStep {
|
|
|
498
540
|
}
|
|
499
541
|
|
|
500
542
|
export interface UnionMember9 {
|
|
543
|
+
type: 'CUSTOMER_HANDOFF';
|
|
544
|
+
|
|
545
|
+
handoffPersonaId?: string | null;
|
|
546
|
+
|
|
547
|
+
mergeIntoNodeIds?: Array<string>;
|
|
548
|
+
|
|
549
|
+
nodeId?: string;
|
|
550
|
+
|
|
551
|
+
ref?: string;
|
|
552
|
+
|
|
553
|
+
stage?: UnionMember9.Stage | null;
|
|
554
|
+
|
|
555
|
+
steps?: Array<CustomerFlowAPI.FlowStep>;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
export namespace UnionMember9 {
|
|
559
|
+
export interface Stage {
|
|
560
|
+
name: string;
|
|
561
|
+
|
|
562
|
+
analyze?: boolean;
|
|
563
|
+
|
|
564
|
+
required?: boolean;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
export interface UnionMember10 {
|
|
501
569
|
type: 'SCENARIO_LINK';
|
|
502
570
|
|
|
503
571
|
linkedCustomerFlowId?: string | null;
|
|
@@ -510,12 +578,12 @@ export namespace FlowStep {
|
|
|
510
578
|
|
|
511
579
|
ref?: string;
|
|
512
580
|
|
|
513
|
-
stage?:
|
|
581
|
+
stage?: UnionMember10.Stage | null;
|
|
514
582
|
|
|
515
583
|
steps?: Array<CustomerFlowAPI.FlowStep>;
|
|
516
584
|
}
|
|
517
585
|
|
|
518
|
-
export namespace
|
|
586
|
+
export namespace UnionMember10 {
|
|
519
587
|
export interface Stage {
|
|
520
588
|
name: string;
|
|
521
589
|
|
|
@@ -123,7 +123,7 @@ export namespace HTTPRequestDefinitionCreateResponse {
|
|
|
123
123
|
/**
|
|
124
124
|
* HTTP method: POST, PUT, PATCH, or GET
|
|
125
125
|
*/
|
|
126
|
-
method: 'POST' | 'PUT' | 'PATCH' | 'GET';
|
|
126
|
+
method: 'POST' | 'PUT' | 'PATCH' | 'GET' | 'DELETE';
|
|
127
127
|
|
|
128
128
|
/**
|
|
129
129
|
* Parsed body as a JSON object if valid JSON, otherwise the raw string
|
|
@@ -199,7 +199,7 @@ export namespace HTTPRequestDefinitionUpdateResponse {
|
|
|
199
199
|
/**
|
|
200
200
|
* HTTP method: POST, PUT, PATCH, or GET
|
|
201
201
|
*/
|
|
202
|
-
method: 'POST' | 'PUT' | 'PATCH' | 'GET';
|
|
202
|
+
method: 'POST' | 'PUT' | 'PATCH' | 'GET' | 'DELETE';
|
|
203
203
|
|
|
204
204
|
/**
|
|
205
205
|
* Parsed body as a JSON object if valid JSON, otherwise the raw string
|
|
@@ -269,7 +269,7 @@ export namespace HTTPRequestDefinitionListResponse {
|
|
|
269
269
|
/**
|
|
270
270
|
* HTTP method: POST, PUT, PATCH, or GET
|
|
271
271
|
*/
|
|
272
|
-
method: 'POST' | 'PUT' | 'PATCH' | 'GET';
|
|
272
|
+
method: 'POST' | 'PUT' | 'PATCH' | 'GET' | 'DELETE';
|
|
273
273
|
|
|
274
274
|
/**
|
|
275
275
|
* Parsed body as a JSON object if valid JSON, otherwise the raw string
|
|
@@ -357,7 +357,7 @@ export namespace HTTPRequestDefinitionGetByIDResponse {
|
|
|
357
357
|
/**
|
|
358
358
|
* HTTP method: POST, PUT, PATCH, or GET
|
|
359
359
|
*/
|
|
360
|
-
method: 'POST' | 'PUT' | 'PATCH' | 'GET';
|
|
360
|
+
method: 'POST' | 'PUT' | 'PATCH' | 'GET' | 'DELETE';
|
|
361
361
|
|
|
362
362
|
/**
|
|
363
363
|
* Parsed body as a JSON object if valid JSON, otherwise the raw string
|
package/src/resources/index.ts
CHANGED
|
@@ -97,6 +97,21 @@ export {
|
|
|
97
97
|
type BenchmarkListTargetHistoryParams,
|
|
98
98
|
type BenchmarkListTargetScoreSamplesParams,
|
|
99
99
|
} from './benchmark';
|
|
100
|
+
export {
|
|
101
|
+
CalendarConnection,
|
|
102
|
+
type CalendarConnectionCreateResponse,
|
|
103
|
+
type CalendarConnectionUpdateResponse,
|
|
104
|
+
type CalendarConnectionListResponse,
|
|
105
|
+
type CalendarConnectionDeleteResponse,
|
|
106
|
+
type CalendarConnectionCheckResponse,
|
|
107
|
+
type CalendarConnectionGetByIDResponse,
|
|
108
|
+
type CalendarConnectionGetTargetResponse,
|
|
109
|
+
type CalendarConnectionListTargetsResponse,
|
|
110
|
+
type CalendarConnectionCreateParams,
|
|
111
|
+
type CalendarConnectionUpdateParams,
|
|
112
|
+
type CalendarConnectionListParams,
|
|
113
|
+
type CalendarConnectionGetTargetParams,
|
|
114
|
+
} from './calendar-connection';
|
|
100
115
|
export {
|
|
101
116
|
Call,
|
|
102
117
|
type CallCreateResponse,
|
|
@@ -275,6 +290,7 @@ export {
|
|
|
275
290
|
type SimulationMockToolParams,
|
|
276
291
|
type SimulationRunParams,
|
|
277
292
|
} from './simulation';
|
|
293
|
+
export { SimulationAudioClip, type SimulationAudioClipListResponse } from './simulation-audio-clip';
|
|
278
294
|
export {
|
|
279
295
|
SimulationEnvironment,
|
|
280
296
|
type SimulationEnvironmentCreateResponse,
|
|
@@ -361,6 +377,17 @@ export {
|
|
|
361
377
|
type SimulationToolFixtureUpdateParams,
|
|
362
378
|
type SimulationToolFixtureListParams,
|
|
363
379
|
} from './simulation-tool-fixture';
|
|
380
|
+
export {
|
|
381
|
+
Tool,
|
|
382
|
+
type ToolCreateResponse,
|
|
383
|
+
type ToolUpdateResponse,
|
|
384
|
+
type ToolListResponse,
|
|
385
|
+
type ToolDeleteResponse,
|
|
386
|
+
type ToolGetByIDResponse,
|
|
387
|
+
type ToolCreateParams,
|
|
388
|
+
type ToolUpdateParams,
|
|
389
|
+
type ToolListParams,
|
|
390
|
+
} from './tool';
|
|
364
391
|
export { Usage, type UsageGetResponse, type UsageGetParams } from './usage';
|
|
365
392
|
export {
|
|
366
393
|
Webhook,
|
|
@@ -402,6 +402,13 @@ export interface MetricVariantUpdateParams {
|
|
|
402
402
|
*/
|
|
403
403
|
changeReason?: string;
|
|
404
404
|
|
|
405
|
+
/**
|
|
406
|
+
* Body param: Score this metric on a simulated call with fewer than 4 transcript
|
|
407
|
+
* lines or where your agent never spoke (custom metrics only, not ones that judge
|
|
408
|
+
* the audio). Such calls skip every other metric. Default false.
|
|
409
|
+
*/
|
|
410
|
+
gradesShortCalls?: boolean;
|
|
411
|
+
|
|
405
412
|
/**
|
|
406
413
|
* Body param: The rubric this variant applies. LLM judge metrics only.
|
|
407
414
|
*/
|
package/src/resources/metric.ts
CHANGED
|
@@ -122,6 +122,12 @@ export namespace MetricCreateDefinitionResponse {
|
|
|
122
122
|
*/
|
|
123
123
|
evidenceSource: LlmJudgeMetricResponse.EvidenceSource | null;
|
|
124
124
|
|
|
125
|
+
/**
|
|
126
|
+
* Whether a simulation scores this metric on a call with fewer than 4 transcript
|
|
127
|
+
* lines or where your agent never spoke. Such calls skip every metric without it.
|
|
128
|
+
*/
|
|
129
|
+
gradesShortCalls: boolean;
|
|
130
|
+
|
|
125
131
|
/**
|
|
126
132
|
* The rubric this judge applies, as stored. Read it back to confirm which criteria
|
|
127
133
|
* are live after a create or update.
|
|
@@ -273,6 +279,12 @@ export namespace MetricCreateDefinitionResponse {
|
|
|
273
279
|
*/
|
|
274
280
|
formula: FormulaMetricResponse.Formula;
|
|
275
281
|
|
|
282
|
+
/**
|
|
283
|
+
* Whether a simulation scores this metric on a call with fewer than 4 transcript
|
|
284
|
+
* lines or where your agent never spoke. Such calls skip every metric without it.
|
|
285
|
+
*/
|
|
286
|
+
gradesShortCalls: boolean;
|
|
287
|
+
|
|
276
288
|
/**
|
|
277
289
|
* Alias of `slug` retained for backwards compatibility. Same value as `slug`.
|
|
278
290
|
*/
|
|
@@ -430,6 +442,12 @@ export namespace MetricCreateDefinitionResponse {
|
|
|
430
442
|
*/
|
|
431
443
|
evidenceSource: PatternMetricResponse.EvidenceSource | null;
|
|
432
444
|
|
|
445
|
+
/**
|
|
446
|
+
* Whether a simulation scores this metric on a call with fewer than 4 transcript
|
|
447
|
+
* lines or where your agent never spoke. Such calls skip every metric without it.
|
|
448
|
+
*/
|
|
449
|
+
gradesShortCalls: boolean;
|
|
450
|
+
|
|
433
451
|
/**
|
|
434
452
|
* Alias of `slug` retained for backwards compatibility. Same value as `slug`.
|
|
435
453
|
*/
|
|
@@ -643,6 +661,12 @@ export namespace MetricCreateDefinitionResponse {
|
|
|
643
661
|
*/
|
|
644
662
|
evidenceSource: HTTPRequestMetricResponse.EvidenceSource | null;
|
|
645
663
|
|
|
664
|
+
/**
|
|
665
|
+
* Whether a simulation scores this metric on a call with fewer than 4 transcript
|
|
666
|
+
* lines or where your agent never spoke. Such calls skip every metric without it.
|
|
667
|
+
*/
|
|
668
|
+
gradesShortCalls: boolean;
|
|
669
|
+
|
|
646
670
|
/**
|
|
647
671
|
* The request this metric sends.
|
|
648
672
|
*/
|
|
@@ -840,6 +864,12 @@ export namespace MetricListDefinitionsResponse {
|
|
|
840
864
|
*/
|
|
841
865
|
evidenceSource: LlmJudgeMetricResponse.EvidenceSource | null;
|
|
842
866
|
|
|
867
|
+
/**
|
|
868
|
+
* Whether a simulation scores this metric on a call with fewer than 4 transcript
|
|
869
|
+
* lines or where your agent never spoke. Such calls skip every metric without it.
|
|
870
|
+
*/
|
|
871
|
+
gradesShortCalls: boolean;
|
|
872
|
+
|
|
843
873
|
/**
|
|
844
874
|
* The rubric this judge applies, as stored. Read it back to confirm which criteria
|
|
845
875
|
* are live after a create or update.
|
|
@@ -986,6 +1016,12 @@ export namespace MetricListDefinitionsResponse {
|
|
|
986
1016
|
*/
|
|
987
1017
|
evidenceSource: ProviderMetricResponse.EvidenceSource | null;
|
|
988
1018
|
|
|
1019
|
+
/**
|
|
1020
|
+
* Whether a simulation scores this metric on a call with fewer than 4 transcript
|
|
1021
|
+
* lines or where your agent never spoke. Such calls skip every metric without it.
|
|
1022
|
+
*/
|
|
1023
|
+
gradesShortCalls: boolean;
|
|
1024
|
+
|
|
989
1025
|
/**
|
|
990
1026
|
* Alias of `slug` retained for backwards compatibility. Same value as `slug`.
|
|
991
1027
|
*/
|
|
@@ -1126,6 +1162,12 @@ export namespace MetricListDefinitionsResponse {
|
|
|
1126
1162
|
*/
|
|
1127
1163
|
evidenceSource: ThresholdMetricResponse.EvidenceSource | null;
|
|
1128
1164
|
|
|
1165
|
+
/**
|
|
1166
|
+
* Whether a simulation scores this metric on a call with fewer than 4 transcript
|
|
1167
|
+
* lines or where your agent never spoke. Such calls skip every metric without it.
|
|
1168
|
+
*/
|
|
1169
|
+
gradesShortCalls: boolean;
|
|
1170
|
+
|
|
1129
1171
|
/**
|
|
1130
1172
|
* Alias of `slug` retained for backwards compatibility. Same value as `slug`.
|
|
1131
1173
|
*/
|
|
@@ -1301,6 +1343,12 @@ export namespace MetricListDefinitionsResponse {
|
|
|
1301
1343
|
*/
|
|
1302
1344
|
formula: FormulaMetricResponse.Formula;
|
|
1303
1345
|
|
|
1346
|
+
/**
|
|
1347
|
+
* Whether a simulation scores this metric on a call with fewer than 4 transcript
|
|
1348
|
+
* lines or where your agent never spoke. Such calls skip every metric without it.
|
|
1349
|
+
*/
|
|
1350
|
+
gradesShortCalls: boolean;
|
|
1351
|
+
|
|
1304
1352
|
/**
|
|
1305
1353
|
* Alias of `slug` retained for backwards compatibility. Same value as `slug`.
|
|
1306
1354
|
*/
|
|
@@ -1458,6 +1506,12 @@ export namespace MetricListDefinitionsResponse {
|
|
|
1458
1506
|
*/
|
|
1459
1507
|
evidenceSource: PatternMetricResponse.EvidenceSource | null;
|
|
1460
1508
|
|
|
1509
|
+
/**
|
|
1510
|
+
* Whether a simulation scores this metric on a call with fewer than 4 transcript
|
|
1511
|
+
* lines or where your agent never spoke. Such calls skip every metric without it.
|
|
1512
|
+
*/
|
|
1513
|
+
gradesShortCalls: boolean;
|
|
1514
|
+
|
|
1461
1515
|
/**
|
|
1462
1516
|
* Alias of `slug` retained for backwards compatibility. Same value as `slug`.
|
|
1463
1517
|
*/
|
|
@@ -1671,6 +1725,12 @@ export namespace MetricListDefinitionsResponse {
|
|
|
1671
1725
|
*/
|
|
1672
1726
|
evidenceSource: HTTPRequestMetricResponse.EvidenceSource | null;
|
|
1673
1727
|
|
|
1728
|
+
/**
|
|
1729
|
+
* Whether a simulation scores this metric on a call with fewer than 4 transcript
|
|
1730
|
+
* lines or where your agent never spoke. Such calls skip every metric without it.
|
|
1731
|
+
*/
|
|
1732
|
+
gradesShortCalls: boolean;
|
|
1733
|
+
|
|
1674
1734
|
/**
|
|
1675
1735
|
* The request this metric sends.
|
|
1676
1736
|
*/
|
|
@@ -1872,6 +1932,12 @@ export namespace MetricUpdateDefinitionResponse {
|
|
|
1872
1932
|
*/
|
|
1873
1933
|
evidenceSource: LlmJudgeMetricResponse.EvidenceSource | null;
|
|
1874
1934
|
|
|
1935
|
+
/**
|
|
1936
|
+
* Whether a simulation scores this metric on a call with fewer than 4 transcript
|
|
1937
|
+
* lines or where your agent never spoke. Such calls skip every metric without it.
|
|
1938
|
+
*/
|
|
1939
|
+
gradesShortCalls: boolean;
|
|
1940
|
+
|
|
1875
1941
|
/**
|
|
1876
1942
|
* The rubric this judge applies, as stored. Read it back to confirm which criteria
|
|
1877
1943
|
* are live after a create or update.
|
|
@@ -2023,6 +2089,12 @@ export namespace MetricUpdateDefinitionResponse {
|
|
|
2023
2089
|
*/
|
|
2024
2090
|
formula: FormulaMetricResponse.Formula;
|
|
2025
2091
|
|
|
2092
|
+
/**
|
|
2093
|
+
* Whether a simulation scores this metric on a call with fewer than 4 transcript
|
|
2094
|
+
* lines or where your agent never spoke. Such calls skip every metric without it.
|
|
2095
|
+
*/
|
|
2096
|
+
gradesShortCalls: boolean;
|
|
2097
|
+
|
|
2026
2098
|
/**
|
|
2027
2099
|
* Alias of `slug` retained for backwards compatibility. Same value as `slug`.
|
|
2028
2100
|
*/
|
|
@@ -2180,6 +2252,12 @@ export namespace MetricUpdateDefinitionResponse {
|
|
|
2180
2252
|
*/
|
|
2181
2253
|
evidenceSource: PatternMetricResponse.EvidenceSource | null;
|
|
2182
2254
|
|
|
2255
|
+
/**
|
|
2256
|
+
* Whether a simulation scores this metric on a call with fewer than 4 transcript
|
|
2257
|
+
* lines or where your agent never spoke. Such calls skip every metric without it.
|
|
2258
|
+
*/
|
|
2259
|
+
gradesShortCalls: boolean;
|
|
2260
|
+
|
|
2183
2261
|
/**
|
|
2184
2262
|
* Alias of `slug` retained for backwards compatibility. Same value as `slug`.
|
|
2185
2263
|
*/
|
|
@@ -2382,6 +2460,12 @@ export namespace MetricUpdateDefinitionResponse {
|
|
|
2382
2460
|
*/
|
|
2383
2461
|
evidenceSource: ThresholdMetricResponse.EvidenceSource | null;
|
|
2384
2462
|
|
|
2463
|
+
/**
|
|
2464
|
+
* Whether a simulation scores this metric on a call with fewer than 4 transcript
|
|
2465
|
+
* lines or where your agent never spoke. Such calls skip every metric without it.
|
|
2466
|
+
*/
|
|
2467
|
+
gradesShortCalls: boolean;
|
|
2468
|
+
|
|
2385
2469
|
/**
|
|
2386
2470
|
* Alias of `slug` retained for backwards compatibility. Same value as `slug`.
|
|
2387
2471
|
*/
|
|
@@ -2563,6 +2647,12 @@ export namespace MetricUpdateDefinitionResponse {
|
|
|
2563
2647
|
*/
|
|
2564
2648
|
evidenceSource: HTTPRequestMetricResponse.EvidenceSource | null;
|
|
2565
2649
|
|
|
2650
|
+
/**
|
|
2651
|
+
* Whether a simulation scores this metric on a call with fewer than 4 transcript
|
|
2652
|
+
* lines or where your agent never spoke. Such calls skip every metric without it.
|
|
2653
|
+
*/
|
|
2654
|
+
gradesShortCalls: boolean;
|
|
2655
|
+
|
|
2566
2656
|
/**
|
|
2567
2657
|
* The request this metric sends.
|
|
2568
2658
|
*/
|
|
@@ -2751,6 +2841,13 @@ export declare namespace MetricCreateDefinitionParams {
|
|
|
2751
2841
|
*/
|
|
2752
2842
|
classificationOptions?: Array<PromptMetricInput.ClassificationOption>;
|
|
2753
2843
|
|
|
2844
|
+
/**
|
|
2845
|
+
* Score this metric on a simulated call with fewer than 4 transcript lines or
|
|
2846
|
+
* where your agent never spoke (custom metrics only, not ones that judge the
|
|
2847
|
+
* audio). Such calls skip every other metric. Default false.
|
|
2848
|
+
*/
|
|
2849
|
+
gradesShortCalls?: boolean;
|
|
2850
|
+
|
|
2754
2851
|
/**
|
|
2755
2852
|
* LLM prompt/criteria for evaluating this metric. Required for BOOLEAN, NUMERIC,
|
|
2756
2853
|
* TEXT, and SCALE types.
|
|
@@ -3070,6 +3167,13 @@ export declare namespace MetricCreateDefinitionParams {
|
|
|
3070
3167
|
*/
|
|
3071
3168
|
booleanTrueLabel?: string;
|
|
3072
3169
|
|
|
3170
|
+
/**
|
|
3171
|
+
* Score this metric on a simulated call with fewer than 4 transcript lines or
|
|
3172
|
+
* where your agent never spoke (custom metrics only, not ones that judge the
|
|
3173
|
+
* audio). Such calls skip every other metric. Default false.
|
|
3174
|
+
*/
|
|
3175
|
+
gradesShortCalls?: boolean;
|
|
3176
|
+
|
|
3073
3177
|
/**
|
|
3074
3178
|
* Alias of `slug` accepted for backwards compatibility. Use `slug` for new
|
|
3075
3179
|
* integrations.
|
|
@@ -3152,6 +3256,13 @@ export interface MetricUpdateDefinitionParams {
|
|
|
3152
3256
|
*/
|
|
3153
3257
|
formula?: string;
|
|
3154
3258
|
|
|
3259
|
+
/**
|
|
3260
|
+
* Score this metric on a simulated call with fewer than 4 transcript lines or
|
|
3261
|
+
* where your agent never spoke (custom metrics only, not ones that judge the
|
|
3262
|
+
* audio). Such calls skip every other metric. Default false.
|
|
3263
|
+
*/
|
|
3264
|
+
gradesShortCalls?: boolean;
|
|
3265
|
+
|
|
3155
3266
|
/**
|
|
3156
3267
|
* Replacement request (HTTP_REQUEST only). Send the whole request; omitted headers
|
|
3157
3268
|
* are removed.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
|
|
7
|
+
export class SimulationAudioClip extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Returns the audio a CUSTOMER_AUDIO step can play: hold music, hold tones and
|
|
10
|
+
* ringback. Name one as the step's `audioClip`. A fixed catalogue, so it is not
|
|
11
|
+
* paginated.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const simulationAudioClips =
|
|
16
|
+
* await client.simulationAudioClip.list();
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
list(options?: RequestOptions): APIPromise<SimulationAudioClipListResponse> {
|
|
20
|
+
return this._client.get('/v1/simulation/audio-clip', options);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface SimulationAudioClipListResponse {
|
|
25
|
+
data: Array<SimulationAudioClipListResponse.Data>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export namespace SimulationAudioClipListResponse {
|
|
29
|
+
export interface Data {
|
|
30
|
+
/**
|
|
31
|
+
* The kind of audio this is
|
|
32
|
+
*/
|
|
33
|
+
category: 'HOLD_MUSIC' | 'HOLD_TONE' | 'RINGBACK';
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* What a CUSTOMER_AUDIO step names as its `audioClip`
|
|
37
|
+
*/
|
|
38
|
+
clip:
|
|
39
|
+
| 'HOLD_MUSIC_CLASSICAL_PIANO'
|
|
40
|
+
| 'HOLD_MUSIC_CLASSICAL_ORCHESTRA'
|
|
41
|
+
| 'HOLD_MUSIC_STRING_QUARTET'
|
|
42
|
+
| 'HOLD_MUSIC_AMBIENT'
|
|
43
|
+
| 'HOLD_MUSIC_SMOOTH_JAZZ'
|
|
44
|
+
| 'HOLD_MUSIC_SOFT_SYNTH'
|
|
45
|
+
| 'HOLD_BEEP'
|
|
46
|
+
| 'RINGBACK_US'
|
|
47
|
+
| 'RINGBACK_UK';
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* What it sounds like
|
|
51
|
+
*/
|
|
52
|
+
description: string;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* What the clip is called
|
|
56
|
+
*/
|
|
57
|
+
name: string;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export declare namespace SimulationAudioClip {
|
|
62
|
+
export { type SimulationAudioClipListResponse as SimulationAudioClipListResponse };
|
|
63
|
+
}
|