@roarkanalytics/sdk 3.11.0 → 3.13.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.
Files changed (110) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/client.d.mts +12 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +12 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/agent-prompt.d.mts +129 -0
  12. package/resources/agent-prompt.d.mts.map +1 -0
  13. package/resources/agent-prompt.d.ts +129 -0
  14. package/resources/agent-prompt.d.ts.map +1 -0
  15. package/resources/agent-prompt.js +58 -0
  16. package/resources/agent-prompt.js.map +1 -0
  17. package/resources/agent-prompt.mjs +54 -0
  18. package/resources/agent-prompt.mjs.map +1 -0
  19. package/resources/benchmark.d.mts +547 -0
  20. package/resources/benchmark.d.mts.map +1 -0
  21. package/resources/benchmark.d.ts +547 -0
  22. package/resources/benchmark.d.ts.map +1 -0
  23. package/resources/benchmark.js +110 -0
  24. package/resources/benchmark.js.map +1 -0
  25. package/resources/benchmark.mjs +106 -0
  26. package/resources/benchmark.mjs.map +1 -0
  27. package/resources/call.d.mts +1 -1
  28. package/resources/call.d.mts.map +1 -1
  29. package/resources/call.d.ts +1 -1
  30. package/resources/call.d.ts.map +1 -1
  31. package/resources/config.d.mts +169 -21
  32. package/resources/config.d.mts.map +1 -1
  33. package/resources/config.d.ts +169 -21
  34. package/resources/config.d.ts.map +1 -1
  35. package/resources/customer-flow-edge-case.d.mts +99 -27
  36. package/resources/customer-flow-edge-case.d.mts.map +1 -1
  37. package/resources/customer-flow-edge-case.d.ts +99 -27
  38. package/resources/customer-flow-edge-case.d.ts.map +1 -1
  39. package/resources/customer-flow.d.mts +2110 -138
  40. package/resources/customer-flow.d.mts.map +1 -1
  41. package/resources/customer-flow.d.ts +2110 -138
  42. package/resources/customer-flow.d.ts.map +1 -1
  43. package/resources/customer-flow.js +18 -0
  44. package/resources/customer-flow.js.map +1 -1
  45. package/resources/customer-flow.mjs +18 -0
  46. package/resources/customer-flow.mjs.map +1 -1
  47. package/resources/index.d.mts +5 -3
  48. package/resources/index.d.mts.map +1 -1
  49. package/resources/index.d.ts +5 -3
  50. package/resources/index.d.ts.map +1 -1
  51. package/resources/index.js +5 -1
  52. package/resources/index.js.map +1 -1
  53. package/resources/index.mjs +2 -0
  54. package/resources/index.mjs.map +1 -1
  55. package/resources/simulation-environment.d.mts +163 -1
  56. package/resources/simulation-environment.d.mts.map +1 -1
  57. package/resources/simulation-environment.d.ts +163 -1
  58. package/resources/simulation-environment.d.ts.map +1 -1
  59. package/resources/simulation-environment.js +51 -0
  60. package/resources/simulation-environment.js.map +1 -1
  61. package/resources/simulation-environment.mjs +51 -0
  62. package/resources/simulation-environment.mjs.map +1 -1
  63. package/resources/simulation-job.d.mts +68 -6
  64. package/resources/simulation-job.d.mts.map +1 -1
  65. package/resources/simulation-job.d.ts +68 -6
  66. package/resources/simulation-job.d.ts.map +1 -1
  67. package/resources/simulation-persona.d.mts +60 -18
  68. package/resources/simulation-persona.d.mts.map +1 -1
  69. package/resources/simulation-persona.d.ts +60 -18
  70. package/resources/simulation-persona.d.ts.map +1 -1
  71. package/resources/simulation-run-plan-job.d.mts +172 -4
  72. package/resources/simulation-run-plan-job.d.mts.map +1 -1
  73. package/resources/simulation-run-plan-job.d.ts +172 -4
  74. package/resources/simulation-run-plan-job.d.ts.map +1 -1
  75. package/resources/simulation-run-plan-job.js +16 -0
  76. package/resources/simulation-run-plan-job.js.map +1 -1
  77. package/resources/simulation-run-plan-job.mjs +16 -0
  78. package/resources/simulation-run-plan-job.mjs.map +1 -1
  79. package/resources/simulation-run-plan.d.mts +102 -0
  80. package/resources/simulation-run-plan.d.mts.map +1 -1
  81. package/resources/simulation-run-plan.d.ts +102 -0
  82. package/resources/simulation-run-plan.d.ts.map +1 -1
  83. package/resources/simulation-template.d.mts +10 -0
  84. package/resources/simulation-template.d.mts.map +1 -1
  85. package/resources/simulation-template.d.ts +10 -0
  86. package/resources/simulation-template.d.ts.map +1 -1
  87. package/resources/simulation.d.mts +26 -1
  88. package/resources/simulation.d.mts.map +1 -1
  89. package/resources/simulation.d.ts +26 -1
  90. package/resources/simulation.d.ts.map +1 -1
  91. package/src/client.ts +66 -0
  92. package/src/resources/agent-prompt.ts +183 -0
  93. package/src/resources/benchmark.ts +740 -0
  94. package/src/resources/call.ts +1 -1
  95. package/src/resources/config.ts +313 -23
  96. package/src/resources/customer-flow-edge-case.ts +207 -27
  97. package/src/resources/customer-flow.ts +3198 -123
  98. package/src/resources/index.ts +30 -0
  99. package/src/resources/simulation-environment.ts +244 -0
  100. package/src/resources/simulation-job.ts +98 -6
  101. package/src/resources/simulation-persona.ts +126 -18
  102. package/src/resources/simulation-run-plan-job.ts +240 -3
  103. package/src/resources/simulation-run-plan.ts +118 -0
  104. package/src/resources/simulation-template.ts +11 -0
  105. package/src/resources/simulation.ts +28 -1
  106. package/src/version.ts +1 -1
  107. package/version.d.mts +1 -1
  108. package/version.d.ts +1 -1
  109. package/version.js +1 -1
  110. package/version.mjs +1 -1
@@ -80,6 +80,29 @@ export class CustomerFlow extends APIResource {
80
80
  return this._client.delete(path`/v1/customer-flow/${flowID}`, options);
81
81
  }
82
82
 
83
+ /**
84
+ * Deep-copies a flow into a new project-owned flow. The copy carries the source's
85
+ * description, branching mode, linked agents, flow-level expectations and
86
+ * flow-owned metrics. A scripted flow copies its whole step graph; an improv flow
87
+ * copies its variants (personas, briefs, expectations). Duplicating a
88
+ * Roark-managed flow is how you customise it. Voicemail flows are Roark-managed
89
+ * and cannot be duplicated.
90
+ *
91
+ * @example
92
+ * ```ts
93
+ * const response = await client.customerFlow.duplicate(
94
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
95
+ * );
96
+ * ```
97
+ */
98
+ duplicate(
99
+ flowID: string,
100
+ body: CustomerFlowDuplicateParams | null | undefined = {},
101
+ options?: RequestOptions,
102
+ ): APIPromise<CustomerFlowDuplicateResponse> {
103
+ return this._client.post(path`/v1/customer-flow/${flowID}/duplicate`, { body, ...options });
104
+ }
105
+
83
106
  /**
84
107
  * Returns a customer flow with its happy path, edge cases, expectations and linked
85
108
  * agents. Scripted flows also carry their step graph.
@@ -165,12 +188,23 @@ export class CustomerFlow extends APIResource {
165
188
  * step is a root wired straight from the start of the flow, so a merge target
166
189
  * parked there would also be reachable directly.
167
190
  *
191
+ * A `CUSTOMER_TURN` describes what the simulated customer says and the persona
192
+ * phrases it; a `CUSTOMER_VERBATIM_TURN` is said word for word, and one placed as
193
+ * a top-level step opens the call the moment it connects, before the agent speaks.
194
+ * `CUSTOMER_FIRST_MESSAGE` is the retired name for that opening case: still
195
+ * accepted, stored and returned as `CUSTOMER_VERBATIM_TURN`.
196
+ *
168
197
  * The two DTMF types are mirror images and both require `dtmfDigits`.
169
198
  * `CUSTOMER_DTMF` is keys the simulated caller presses while navigating your
170
199
  * agent. `AGENT_DTMF` is keys your agent under test is expected to press while
171
200
  * navigating a menu the simulation is playing, so its digits are an assertion the
172
201
  * run is graded against rather than an instruction, and it counts as an agent turn
173
202
  * for role alternation.
203
+ *
204
+ * In a STRICT flow an `AGENT_TURN` may carry its own `offScriptPolicy`, which
205
+ * replaces the flow-level one at that step. Omit it (or send null) to follow the
206
+ * flow's policy. Use it where one missed step makes the rest of the call
207
+ * meaningless: an authentication menu, say, with `then: HANG_UP_INVALIDATE`.
174
208
  */
175
209
  export type FlowStep =
176
210
  | FlowStep.UnionMember0
@@ -180,7 +214,8 @@ export type FlowStep =
180
214
  | FlowStep.UnionMember4
181
215
  | FlowStep.UnionMember5
182
216
  | FlowStep.UnionMember6
183
- | FlowStep.UnionMember7;
217
+ | FlowStep.UnionMember7
218
+ | FlowStep.UnionMember8;
184
219
 
185
220
  export namespace FlowStep {
186
221
  export interface UnionMember0 {
@@ -192,11 +227,27 @@ export namespace FlowStep {
192
227
 
193
228
  nodeId?: string;
194
229
 
230
+ offScriptPolicy?: UnionMember0.OffScriptPolicy | null;
231
+
195
232
  ref?: string;
196
233
 
197
234
  steps?: Array<CustomerFlowAPI.FlowStep>;
198
235
  }
199
236
 
237
+ export namespace UnionMember0 {
238
+ export interface OffScriptPolicy {
239
+ maxAttempts: number;
240
+
241
+ reaction: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY';
242
+
243
+ then: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE';
244
+
245
+ sayLine?: string | null;
246
+
247
+ waitSeconds?: number | null;
248
+ }
249
+ }
250
+
200
251
  export interface UnionMember1 {
201
252
  type: 'CUSTOMER_TURN';
202
253
 
@@ -226,6 +277,20 @@ export namespace FlowStep {
226
277
  }
227
278
 
228
279
  export interface UnionMember3 {
280
+ type: 'CUSTOMER_VERBATIM_TURN';
281
+
282
+ content?: string | null;
283
+
284
+ mergeIntoNodeIds?: Array<string>;
285
+
286
+ nodeId?: string;
287
+
288
+ ref?: string;
289
+
290
+ steps?: Array<CustomerFlowAPI.FlowStep>;
291
+ }
292
+
293
+ export interface UnionMember4 {
229
294
  type: 'CUSTOMER_SILENCE';
230
295
 
231
296
  mergeIntoNodeIds?: Array<string>;
@@ -239,7 +304,7 @@ export namespace FlowStep {
239
304
  steps?: Array<CustomerFlowAPI.FlowStep>;
240
305
  }
241
306
 
242
- export interface UnionMember4 {
307
+ export interface UnionMember5 {
243
308
  type: 'CUSTOMER_DTMF';
244
309
 
245
310
  dtmfDigits?: string | null;
@@ -253,7 +318,7 @@ export namespace FlowStep {
253
318
  steps?: Array<CustomerFlowAPI.FlowStep>;
254
319
  }
255
320
 
256
- export interface UnionMember5 {
321
+ export interface UnionMember6 {
257
322
  type: 'AGENT_DTMF';
258
323
 
259
324
  dtmfDigits?: string | null;
@@ -267,7 +332,7 @@ export namespace FlowStep {
267
332
  steps?: Array<CustomerFlowAPI.FlowStep>;
268
333
  }
269
334
 
270
- export interface UnionMember6 {
335
+ export interface UnionMember7 {
271
336
  type: 'VOICEMAIL';
272
337
 
273
338
  mergeIntoNodeIds?: Array<string>;
@@ -279,7 +344,7 @@ export namespace FlowStep {
279
344
  steps?: Array<CustomerFlowAPI.FlowStep>;
280
345
  }
281
346
 
282
- export interface UnionMember7 {
347
+ export interface UnionMember8 {
283
348
  type: 'SCENARIO_LINK';
284
349
 
285
350
  linkedCustomerFlowId?: string | null;
@@ -346,6 +411,30 @@ export namespace CustomerFlowCreateResponse {
346
411
  */
347
412
  happyPath: ScriptedCustomerFlow.HappyPath | null;
348
413
 
414
+ /**
415
+ * STRICT only. What the simulated customer does when your agent does not say the
416
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
417
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
418
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
419
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
420
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
421
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
422
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
423
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
424
+ * AGENT_TURN step can carry its own.
425
+ */
426
+ offScriptPolicy: ScriptedCustomerFlow.OffScriptPolicy | null;
427
+
428
+ /**
429
+ * How closely a run follows the script. LOOSE (default) hands the whole script to
430
+ * the simulated customer as one prompt; it keeps the call moving whatever your
431
+ * agent says. STRICT runs the script as a state machine on the agent service: at
432
+ * every agent step the simulated customer waits, silent, until your agent has said
433
+ * the expected line, and only then moves on. Scripted flows only; STRICT needs the
434
+ * agent-service transport and is not available on realtime models.
435
+ */
436
+ scriptAdherence: 'LOOSE' | 'STRICT';
437
+
349
438
  source: 'SYSTEM' | 'CUSTOM';
350
439
 
351
440
  title: string;
@@ -496,6 +585,8 @@ export namespace CustomerFlowCreateResponse {
496
585
  | 'OFFICE'
497
586
  | 'THUNDERSTORM';
498
587
 
588
+ backgroundNoiseVolume: number;
589
+
499
590
  /**
500
591
  * Creation timestamp in ISO 8601 format
501
592
  */
@@ -578,7 +669,10 @@ export namespace CustomerFlowCreateResponse {
578
669
  | 'FRUSTRATED'
579
670
  | 'SKEPTICAL'
580
671
  | 'RUSHED'
581
- | 'DISTRACTED';
672
+ | 'DISTRACTED'
673
+ | 'ANGRY'
674
+ | 'ANXIOUS'
675
+ | 'SAD';
582
676
 
583
677
  /**
584
678
  * How the persona confirms information
@@ -666,9 +760,10 @@ export namespace CustomerFlowCreateResponse {
666
760
 
667
761
  /**
668
762
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
669
- * NORMAL, RELAXED)
763
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
764
+ * for several seconds.
670
765
  */
671
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
766
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
672
767
 
673
768
  /**
674
769
  * Speech clarity of the persona
@@ -720,6 +815,13 @@ export namespace CustomerFlowCreateResponse {
720
815
  */
721
816
  description?: string | null;
722
817
 
818
+ /**
819
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
820
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
821
+ * or set null to display the name itself.
822
+ */
823
+ displayName?: string | null;
824
+
723
825
  /**
724
826
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
725
827
  */
@@ -811,6 +913,8 @@ export namespace CustomerFlowCreateResponse {
811
913
  | 'OFFICE'
812
914
  | 'THUNDERSTORM';
813
915
 
916
+ backgroundNoiseVolume: number;
917
+
814
918
  /**
815
919
  * Creation timestamp in ISO 8601 format
816
920
  */
@@ -893,7 +997,10 @@ export namespace CustomerFlowCreateResponse {
893
997
  | 'FRUSTRATED'
894
998
  | 'SKEPTICAL'
895
999
  | 'RUSHED'
896
- | 'DISTRACTED';
1000
+ | 'DISTRACTED'
1001
+ | 'ANGRY'
1002
+ | 'ANXIOUS'
1003
+ | 'SAD';
897
1004
 
898
1005
  /**
899
1006
  * How the persona confirms information
@@ -981,9 +1088,10 @@ export namespace CustomerFlowCreateResponse {
981
1088
 
982
1089
  /**
983
1090
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
984
- * NORMAL, RELAXED)
1091
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
1092
+ * for several seconds.
985
1093
  */
986
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
1094
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
987
1095
 
988
1096
  /**
989
1097
  * Speech clarity of the persona
@@ -1035,12 +1143,43 @@ export namespace CustomerFlowCreateResponse {
1035
1143
  */
1036
1144
  description?: string | null;
1037
1145
 
1146
+ /**
1147
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
1148
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
1149
+ * or set null to display the name itself.
1150
+ */
1151
+ displayName?: string | null;
1152
+
1038
1153
  /**
1039
1154
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
1040
1155
  */
1041
1156
  secondaryLanguage?: 'EN' | null;
1042
1157
  }
1043
1158
  }
1159
+
1160
+ /**
1161
+ * STRICT only. What the simulated customer does when your agent does not say the
1162
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
1163
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
1164
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
1165
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
1166
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
1167
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
1168
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
1169
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
1170
+ * AGENT_TURN step can carry its own.
1171
+ */
1172
+ export interface OffScriptPolicy {
1173
+ maxAttempts: number;
1174
+
1175
+ reaction: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY';
1176
+
1177
+ then: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE';
1178
+
1179
+ sayLine?: string | null;
1180
+
1181
+ waitSeconds?: number | null;
1182
+ }
1044
1183
  }
1045
1184
 
1046
1185
  /**
@@ -1213,6 +1352,8 @@ export namespace CustomerFlowCreateResponse {
1213
1352
  | 'OFFICE'
1214
1353
  | 'THUNDERSTORM';
1215
1354
 
1355
+ backgroundNoiseVolume: number;
1356
+
1216
1357
  /**
1217
1358
  * Creation timestamp in ISO 8601 format
1218
1359
  */
@@ -1295,7 +1436,10 @@ export namespace CustomerFlowCreateResponse {
1295
1436
  | 'FRUSTRATED'
1296
1437
  | 'SKEPTICAL'
1297
1438
  | 'RUSHED'
1298
- | 'DISTRACTED';
1439
+ | 'DISTRACTED'
1440
+ | 'ANGRY'
1441
+ | 'ANXIOUS'
1442
+ | 'SAD';
1299
1443
 
1300
1444
  /**
1301
1445
  * How the persona confirms information
@@ -1383,9 +1527,10 @@ export namespace CustomerFlowCreateResponse {
1383
1527
 
1384
1528
  /**
1385
1529
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
1386
- * NORMAL, RELAXED)
1530
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
1531
+ * for several seconds.
1387
1532
  */
1388
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
1533
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
1389
1534
 
1390
1535
  /**
1391
1536
  * Speech clarity of the persona
@@ -1437,6 +1582,13 @@ export namespace CustomerFlowCreateResponse {
1437
1582
  */
1438
1583
  description?: string | null;
1439
1584
 
1585
+ /**
1586
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
1587
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
1588
+ * or set null to display the name itself.
1589
+ */
1590
+ displayName?: string | null;
1591
+
1440
1592
  /**
1441
1593
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
1442
1594
  */
@@ -1526,6 +1678,8 @@ export namespace CustomerFlowCreateResponse {
1526
1678
  | 'OFFICE'
1527
1679
  | 'THUNDERSTORM';
1528
1680
 
1681
+ backgroundNoiseVolume: number;
1682
+
1529
1683
  /**
1530
1684
  * Creation timestamp in ISO 8601 format
1531
1685
  */
@@ -1608,7 +1762,10 @@ export namespace CustomerFlowCreateResponse {
1608
1762
  | 'FRUSTRATED'
1609
1763
  | 'SKEPTICAL'
1610
1764
  | 'RUSHED'
1611
- | 'DISTRACTED';
1765
+ | 'DISTRACTED'
1766
+ | 'ANGRY'
1767
+ | 'ANXIOUS'
1768
+ | 'SAD';
1612
1769
 
1613
1770
  /**
1614
1771
  * How the persona confirms information
@@ -1696,9 +1853,10 @@ export namespace CustomerFlowCreateResponse {
1696
1853
 
1697
1854
  /**
1698
1855
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
1699
- * NORMAL, RELAXED)
1856
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
1857
+ * for several seconds.
1700
1858
  */
1701
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
1859
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
1702
1860
 
1703
1861
  /**
1704
1862
  * Speech clarity of the persona
@@ -1750,6 +1908,13 @@ export namespace CustomerFlowCreateResponse {
1750
1908
  */
1751
1909
  description?: string | null;
1752
1910
 
1911
+ /**
1912
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
1913
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
1914
+ * or set null to display the name itself.
1915
+ */
1916
+ displayName?: string | null;
1917
+
1753
1918
  /**
1754
1919
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
1755
1920
  */
@@ -1922,6 +2087,8 @@ export namespace CustomerFlowCreateResponse {
1922
2087
  | 'OFFICE'
1923
2088
  | 'THUNDERSTORM';
1924
2089
 
2090
+ backgroundNoiseVolume: number;
2091
+
1925
2092
  /**
1926
2093
  * Creation timestamp in ISO 8601 format
1927
2094
  */
@@ -2004,7 +2171,10 @@ export namespace CustomerFlowCreateResponse {
2004
2171
  | 'FRUSTRATED'
2005
2172
  | 'SKEPTICAL'
2006
2173
  | 'RUSHED'
2007
- | 'DISTRACTED';
2174
+ | 'DISTRACTED'
2175
+ | 'ANGRY'
2176
+ | 'ANXIOUS'
2177
+ | 'SAD';
2008
2178
 
2009
2179
  /**
2010
2180
  * How the persona confirms information
@@ -2092,9 +2262,10 @@ export namespace CustomerFlowCreateResponse {
2092
2262
 
2093
2263
  /**
2094
2264
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
2095
- * NORMAL, RELAXED)
2265
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
2266
+ * for several seconds.
2096
2267
  */
2097
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
2268
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
2098
2269
 
2099
2270
  /**
2100
2271
  * Speech clarity of the persona
@@ -2146,6 +2317,13 @@ export namespace CustomerFlowCreateResponse {
2146
2317
  */
2147
2318
  description?: string | null;
2148
2319
 
2320
+ /**
2321
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
2322
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
2323
+ * or set null to display the name itself.
2324
+ */
2325
+ displayName?: string | null;
2326
+
2149
2327
  /**
2150
2328
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
2151
2329
  */
@@ -2230,6 +2408,8 @@ export namespace CustomerFlowCreateResponse {
2230
2408
  | 'OFFICE'
2231
2409
  | 'THUNDERSTORM';
2232
2410
 
2411
+ backgroundNoiseVolume: number;
2412
+
2233
2413
  /**
2234
2414
  * Creation timestamp in ISO 8601 format
2235
2415
  */
@@ -2312,7 +2492,10 @@ export namespace CustomerFlowCreateResponse {
2312
2492
  | 'FRUSTRATED'
2313
2493
  | 'SKEPTICAL'
2314
2494
  | 'RUSHED'
2315
- | 'DISTRACTED';
2495
+ | 'DISTRACTED'
2496
+ | 'ANGRY'
2497
+ | 'ANXIOUS'
2498
+ | 'SAD';
2316
2499
 
2317
2500
  /**
2318
2501
  * How the persona confirms information
@@ -2400,9 +2583,10 @@ export namespace CustomerFlowCreateResponse {
2400
2583
 
2401
2584
  /**
2402
2585
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
2403
- * NORMAL, RELAXED)
2586
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
2587
+ * for several seconds.
2404
2588
  */
2405
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
2589
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
2406
2590
 
2407
2591
  /**
2408
2592
  * Speech clarity of the persona
@@ -2454,6 +2638,13 @@ export namespace CustomerFlowCreateResponse {
2454
2638
  */
2455
2639
  description?: string | null;
2456
2640
 
2641
+ /**
2642
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
2643
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
2644
+ * or set null to display the name itself.
2645
+ */
2646
+ displayName?: string | null;
2647
+
2457
2648
  /**
2458
2649
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
2459
2650
  */
@@ -2513,6 +2704,30 @@ export namespace CustomerFlowUpdateResponse {
2513
2704
  */
2514
2705
  happyPath: ScriptedCustomerFlow.HappyPath | null;
2515
2706
 
2707
+ /**
2708
+ * STRICT only. What the simulated customer does when your agent does not say the
2709
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
2710
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
2711
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
2712
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
2713
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
2714
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
2715
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
2716
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
2717
+ * AGENT_TURN step can carry its own.
2718
+ */
2719
+ offScriptPolicy: ScriptedCustomerFlow.OffScriptPolicy | null;
2720
+
2721
+ /**
2722
+ * How closely a run follows the script. LOOSE (default) hands the whole script to
2723
+ * the simulated customer as one prompt; it keeps the call moving whatever your
2724
+ * agent says. STRICT runs the script as a state machine on the agent service: at
2725
+ * every agent step the simulated customer waits, silent, until your agent has said
2726
+ * the expected line, and only then moves on. Scripted flows only; STRICT needs the
2727
+ * agent-service transport and is not available on realtime models.
2728
+ */
2729
+ scriptAdherence: 'LOOSE' | 'STRICT';
2730
+
2516
2731
  source: 'SYSTEM' | 'CUSTOM';
2517
2732
 
2518
2733
  title: string;
@@ -2663,6 +2878,8 @@ export namespace CustomerFlowUpdateResponse {
2663
2878
  | 'OFFICE'
2664
2879
  | 'THUNDERSTORM';
2665
2880
 
2881
+ backgroundNoiseVolume: number;
2882
+
2666
2883
  /**
2667
2884
  * Creation timestamp in ISO 8601 format
2668
2885
  */
@@ -2745,7 +2962,10 @@ export namespace CustomerFlowUpdateResponse {
2745
2962
  | 'FRUSTRATED'
2746
2963
  | 'SKEPTICAL'
2747
2964
  | 'RUSHED'
2748
- | 'DISTRACTED';
2965
+ | 'DISTRACTED'
2966
+ | 'ANGRY'
2967
+ | 'ANXIOUS'
2968
+ | 'SAD';
2749
2969
 
2750
2970
  /**
2751
2971
  * How the persona confirms information
@@ -2833,9 +3053,10 @@ export namespace CustomerFlowUpdateResponse {
2833
3053
 
2834
3054
  /**
2835
3055
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
2836
- * NORMAL, RELAXED)
3056
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
3057
+ * for several seconds.
2837
3058
  */
2838
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
3059
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
2839
3060
 
2840
3061
  /**
2841
3062
  * Speech clarity of the persona
@@ -2887,6 +3108,13 @@ export namespace CustomerFlowUpdateResponse {
2887
3108
  */
2888
3109
  description?: string | null;
2889
3110
 
3111
+ /**
3112
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
3113
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
3114
+ * or set null to display the name itself.
3115
+ */
3116
+ displayName?: string | null;
3117
+
2890
3118
  /**
2891
3119
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
2892
3120
  */
@@ -2978,6 +3206,8 @@ export namespace CustomerFlowUpdateResponse {
2978
3206
  | 'OFFICE'
2979
3207
  | 'THUNDERSTORM';
2980
3208
 
3209
+ backgroundNoiseVolume: number;
3210
+
2981
3211
  /**
2982
3212
  * Creation timestamp in ISO 8601 format
2983
3213
  */
@@ -3060,7 +3290,10 @@ export namespace CustomerFlowUpdateResponse {
3060
3290
  | 'FRUSTRATED'
3061
3291
  | 'SKEPTICAL'
3062
3292
  | 'RUSHED'
3063
- | 'DISTRACTED';
3293
+ | 'DISTRACTED'
3294
+ | 'ANGRY'
3295
+ | 'ANXIOUS'
3296
+ | 'SAD';
3064
3297
 
3065
3298
  /**
3066
3299
  * How the persona confirms information
@@ -3148,9 +3381,10 @@ export namespace CustomerFlowUpdateResponse {
3148
3381
 
3149
3382
  /**
3150
3383
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
3151
- * NORMAL, RELAXED)
3384
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
3385
+ * for several seconds.
3152
3386
  */
3153
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
3387
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
3154
3388
 
3155
3389
  /**
3156
3390
  * Speech clarity of the persona
@@ -3202,12 +3436,43 @@ export namespace CustomerFlowUpdateResponse {
3202
3436
  */
3203
3437
  description?: string | null;
3204
3438
 
3439
+ /**
3440
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
3441
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
3442
+ * or set null to display the name itself.
3443
+ */
3444
+ displayName?: string | null;
3445
+
3205
3446
  /**
3206
3447
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
3207
3448
  */
3208
3449
  secondaryLanguage?: 'EN' | null;
3209
3450
  }
3210
3451
  }
3452
+
3453
+ /**
3454
+ * STRICT only. What the simulated customer does when your agent does not say the
3455
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
3456
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
3457
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
3458
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
3459
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
3460
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
3461
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
3462
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
3463
+ * AGENT_TURN step can carry its own.
3464
+ */
3465
+ export interface OffScriptPolicy {
3466
+ maxAttempts: number;
3467
+
3468
+ reaction: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY';
3469
+
3470
+ then: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE';
3471
+
3472
+ sayLine?: string | null;
3473
+
3474
+ waitSeconds?: number | null;
3475
+ }
3211
3476
  }
3212
3477
 
3213
3478
  /**
@@ -3380,6 +3645,8 @@ export namespace CustomerFlowUpdateResponse {
3380
3645
  | 'OFFICE'
3381
3646
  | 'THUNDERSTORM';
3382
3647
 
3648
+ backgroundNoiseVolume: number;
3649
+
3383
3650
  /**
3384
3651
  * Creation timestamp in ISO 8601 format
3385
3652
  */
@@ -3462,7 +3729,10 @@ export namespace CustomerFlowUpdateResponse {
3462
3729
  | 'FRUSTRATED'
3463
3730
  | 'SKEPTICAL'
3464
3731
  | 'RUSHED'
3465
- | 'DISTRACTED';
3732
+ | 'DISTRACTED'
3733
+ | 'ANGRY'
3734
+ | 'ANXIOUS'
3735
+ | 'SAD';
3466
3736
 
3467
3737
  /**
3468
3738
  * How the persona confirms information
@@ -3550,9 +3820,10 @@ export namespace CustomerFlowUpdateResponse {
3550
3820
 
3551
3821
  /**
3552
3822
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
3553
- * NORMAL, RELAXED)
3823
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
3824
+ * for several seconds.
3554
3825
  */
3555
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
3826
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
3556
3827
 
3557
3828
  /**
3558
3829
  * Speech clarity of the persona
@@ -3604,6 +3875,13 @@ export namespace CustomerFlowUpdateResponse {
3604
3875
  */
3605
3876
  description?: string | null;
3606
3877
 
3878
+ /**
3879
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
3880
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
3881
+ * or set null to display the name itself.
3882
+ */
3883
+ displayName?: string | null;
3884
+
3607
3885
  /**
3608
3886
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
3609
3887
  */
@@ -3693,6 +3971,8 @@ export namespace CustomerFlowUpdateResponse {
3693
3971
  | 'OFFICE'
3694
3972
  | 'THUNDERSTORM';
3695
3973
 
3974
+ backgroundNoiseVolume: number;
3975
+
3696
3976
  /**
3697
3977
  * Creation timestamp in ISO 8601 format
3698
3978
  */
@@ -3775,7 +4055,10 @@ export namespace CustomerFlowUpdateResponse {
3775
4055
  | 'FRUSTRATED'
3776
4056
  | 'SKEPTICAL'
3777
4057
  | 'RUSHED'
3778
- | 'DISTRACTED';
4058
+ | 'DISTRACTED'
4059
+ | 'ANGRY'
4060
+ | 'ANXIOUS'
4061
+ | 'SAD';
3779
4062
 
3780
4063
  /**
3781
4064
  * How the persona confirms information
@@ -3863,9 +4146,10 @@ export namespace CustomerFlowUpdateResponse {
3863
4146
 
3864
4147
  /**
3865
4148
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
3866
- * NORMAL, RELAXED)
4149
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
4150
+ * for several seconds.
3867
4151
  */
3868
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
4152
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
3869
4153
 
3870
4154
  /**
3871
4155
  * Speech clarity of the persona
@@ -3917,6 +4201,13 @@ export namespace CustomerFlowUpdateResponse {
3917
4201
  */
3918
4202
  description?: string | null;
3919
4203
 
4204
+ /**
4205
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
4206
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
4207
+ * or set null to display the name itself.
4208
+ */
4209
+ displayName?: string | null;
4210
+
3920
4211
  /**
3921
4212
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
3922
4213
  */
@@ -4089,6 +4380,8 @@ export namespace CustomerFlowUpdateResponse {
4089
4380
  | 'OFFICE'
4090
4381
  | 'THUNDERSTORM';
4091
4382
 
4383
+ backgroundNoiseVolume: number;
4384
+
4092
4385
  /**
4093
4386
  * Creation timestamp in ISO 8601 format
4094
4387
  */
@@ -4171,7 +4464,10 @@ export namespace CustomerFlowUpdateResponse {
4171
4464
  | 'FRUSTRATED'
4172
4465
  | 'SKEPTICAL'
4173
4466
  | 'RUSHED'
4174
- | 'DISTRACTED';
4467
+ | 'DISTRACTED'
4468
+ | 'ANGRY'
4469
+ | 'ANXIOUS'
4470
+ | 'SAD';
4175
4471
 
4176
4472
  /**
4177
4473
  * How the persona confirms information
@@ -4259,9 +4555,10 @@ export namespace CustomerFlowUpdateResponse {
4259
4555
 
4260
4556
  /**
4261
4557
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
4262
- * NORMAL, RELAXED)
4558
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
4559
+ * for several seconds.
4263
4560
  */
4264
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
4561
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
4265
4562
 
4266
4563
  /**
4267
4564
  * Speech clarity of the persona
@@ -4313,6 +4610,13 @@ export namespace CustomerFlowUpdateResponse {
4313
4610
  */
4314
4611
  description?: string | null;
4315
4612
 
4613
+ /**
4614
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
4615
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
4616
+ * or set null to display the name itself.
4617
+ */
4618
+ displayName?: string | null;
4619
+
4316
4620
  /**
4317
4621
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
4318
4622
  */
@@ -4397,6 +4701,8 @@ export namespace CustomerFlowUpdateResponse {
4397
4701
  | 'OFFICE'
4398
4702
  | 'THUNDERSTORM';
4399
4703
 
4704
+ backgroundNoiseVolume: number;
4705
+
4400
4706
  /**
4401
4707
  * Creation timestamp in ISO 8601 format
4402
4708
  */
@@ -4479,7 +4785,10 @@ export namespace CustomerFlowUpdateResponse {
4479
4785
  | 'FRUSTRATED'
4480
4786
  | 'SKEPTICAL'
4481
4787
  | 'RUSHED'
4482
- | 'DISTRACTED';
4788
+ | 'DISTRACTED'
4789
+ | 'ANGRY'
4790
+ | 'ANXIOUS'
4791
+ | 'SAD';
4483
4792
 
4484
4793
  /**
4485
4794
  * How the persona confirms information
@@ -4567,9 +4876,10 @@ export namespace CustomerFlowUpdateResponse {
4567
4876
 
4568
4877
  /**
4569
4878
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
4570
- * NORMAL, RELAXED)
4879
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
4880
+ * for several seconds.
4571
4881
  */
4572
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
4882
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
4573
4883
 
4574
4884
  /**
4575
4885
  * Speech clarity of the persona
@@ -4621,6 +4931,13 @@ export namespace CustomerFlowUpdateResponse {
4621
4931
  */
4622
4932
  description?: string | null;
4623
4933
 
4934
+ /**
4935
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
4936
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
4937
+ * or set null to display the name itself.
4938
+ */
4939
+ displayName?: string | null;
4940
+
4624
4941
  /**
4625
4942
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
4626
4943
  */
@@ -4683,6 +5000,30 @@ export namespace CustomerFlowListResponse {
4683
5000
  */
4684
5001
  happyPath: ScriptedCustomerFlow.HappyPath | null;
4685
5002
 
5003
+ /**
5004
+ * STRICT only. What the simulated customer does when your agent does not say the
5005
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
5006
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
5007
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
5008
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
5009
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
5010
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
5011
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
5012
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
5013
+ * AGENT_TURN step can carry its own.
5014
+ */
5015
+ offScriptPolicy: ScriptedCustomerFlow.OffScriptPolicy | null;
5016
+
5017
+ /**
5018
+ * How closely a run follows the script. LOOSE (default) hands the whole script to
5019
+ * the simulated customer as one prompt; it keeps the call moving whatever your
5020
+ * agent says. STRICT runs the script as a state machine on the agent service: at
5021
+ * every agent step the simulated customer waits, silent, until your agent has said
5022
+ * the expected line, and only then moves on. Scripted flows only; STRICT needs the
5023
+ * agent-service transport and is not available on realtime models.
5024
+ */
5025
+ scriptAdherence: 'LOOSE' | 'STRICT';
5026
+
4686
5027
  source: 'SYSTEM' | 'CUSTOM';
4687
5028
 
4688
5029
  title: string;
@@ -4833,6 +5174,8 @@ export namespace CustomerFlowListResponse {
4833
5174
  | 'OFFICE'
4834
5175
  | 'THUNDERSTORM';
4835
5176
 
5177
+ backgroundNoiseVolume: number;
5178
+
4836
5179
  /**
4837
5180
  * Creation timestamp in ISO 8601 format
4838
5181
  */
@@ -4915,7 +5258,10 @@ export namespace CustomerFlowListResponse {
4915
5258
  | 'FRUSTRATED'
4916
5259
  | 'SKEPTICAL'
4917
5260
  | 'RUSHED'
4918
- | 'DISTRACTED';
5261
+ | 'DISTRACTED'
5262
+ | 'ANGRY'
5263
+ | 'ANXIOUS'
5264
+ | 'SAD';
4919
5265
 
4920
5266
  /**
4921
5267
  * How the persona confirms information
@@ -5003,9 +5349,10 @@ export namespace CustomerFlowListResponse {
5003
5349
 
5004
5350
  /**
5005
5351
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
5006
- * NORMAL, RELAXED)
5352
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
5353
+ * for several seconds.
5007
5354
  */
5008
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
5355
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
5009
5356
 
5010
5357
  /**
5011
5358
  * Speech clarity of the persona
@@ -5057,6 +5404,13 @@ export namespace CustomerFlowListResponse {
5057
5404
  */
5058
5405
  description?: string | null;
5059
5406
 
5407
+ /**
5408
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
5409
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
5410
+ * or set null to display the name itself.
5411
+ */
5412
+ displayName?: string | null;
5413
+
5060
5414
  /**
5061
5415
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
5062
5416
  */
@@ -5148,6 +5502,8 @@ export namespace CustomerFlowListResponse {
5148
5502
  | 'OFFICE'
5149
5503
  | 'THUNDERSTORM';
5150
5504
 
5505
+ backgroundNoiseVolume: number;
5506
+
5151
5507
  /**
5152
5508
  * Creation timestamp in ISO 8601 format
5153
5509
  */
@@ -5230,7 +5586,10 @@ export namespace CustomerFlowListResponse {
5230
5586
  | 'FRUSTRATED'
5231
5587
  | 'SKEPTICAL'
5232
5588
  | 'RUSHED'
5233
- | 'DISTRACTED';
5589
+ | 'DISTRACTED'
5590
+ | 'ANGRY'
5591
+ | 'ANXIOUS'
5592
+ | 'SAD';
5234
5593
 
5235
5594
  /**
5236
5595
  * How the persona confirms information
@@ -5318,9 +5677,10 @@ export namespace CustomerFlowListResponse {
5318
5677
 
5319
5678
  /**
5320
5679
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
5321
- * NORMAL, RELAXED)
5680
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
5681
+ * for several seconds.
5322
5682
  */
5323
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
5683
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
5324
5684
 
5325
5685
  /**
5326
5686
  * Speech clarity of the persona
@@ -5372,12 +5732,43 @@ export namespace CustomerFlowListResponse {
5372
5732
  */
5373
5733
  description?: string | null;
5374
5734
 
5735
+ /**
5736
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
5737
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
5738
+ * or set null to display the name itself.
5739
+ */
5740
+ displayName?: string | null;
5741
+
5375
5742
  /**
5376
5743
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
5377
5744
  */
5378
5745
  secondaryLanguage?: 'EN' | null;
5379
5746
  }
5380
5747
  }
5748
+
5749
+ /**
5750
+ * STRICT only. What the simulated customer does when your agent does not say the
5751
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
5752
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
5753
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
5754
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
5755
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
5756
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
5757
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
5758
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
5759
+ * AGENT_TURN step can carry its own.
5760
+ */
5761
+ export interface OffScriptPolicy {
5762
+ maxAttempts: number;
5763
+
5764
+ reaction: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY';
5765
+
5766
+ then: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE';
5767
+
5768
+ sayLine?: string | null;
5769
+
5770
+ waitSeconds?: number | null;
5771
+ }
5381
5772
  }
5382
5773
 
5383
5774
  /**
@@ -5550,6 +5941,8 @@ export namespace CustomerFlowListResponse {
5550
5941
  | 'OFFICE'
5551
5942
  | 'THUNDERSTORM';
5552
5943
 
5944
+ backgroundNoiseVolume: number;
5945
+
5553
5946
  /**
5554
5947
  * Creation timestamp in ISO 8601 format
5555
5948
  */
@@ -5632,7 +6025,10 @@ export namespace CustomerFlowListResponse {
5632
6025
  | 'FRUSTRATED'
5633
6026
  | 'SKEPTICAL'
5634
6027
  | 'RUSHED'
5635
- | 'DISTRACTED';
6028
+ | 'DISTRACTED'
6029
+ | 'ANGRY'
6030
+ | 'ANXIOUS'
6031
+ | 'SAD';
5636
6032
 
5637
6033
  /**
5638
6034
  * How the persona confirms information
@@ -5720,9 +6116,10 @@ export namespace CustomerFlowListResponse {
5720
6116
 
5721
6117
  /**
5722
6118
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
5723
- * NORMAL, RELAXED)
6119
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
6120
+ * for several seconds.
5724
6121
  */
5725
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
6122
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
5726
6123
 
5727
6124
  /**
5728
6125
  * Speech clarity of the persona
@@ -5774,6 +6171,13 @@ export namespace CustomerFlowListResponse {
5774
6171
  */
5775
6172
  description?: string | null;
5776
6173
 
6174
+ /**
6175
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
6176
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
6177
+ * or set null to display the name itself.
6178
+ */
6179
+ displayName?: string | null;
6180
+
5777
6181
  /**
5778
6182
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
5779
6183
  */
@@ -5863,6 +6267,8 @@ export namespace CustomerFlowListResponse {
5863
6267
  | 'OFFICE'
5864
6268
  | 'THUNDERSTORM';
5865
6269
 
6270
+ backgroundNoiseVolume: number;
6271
+
5866
6272
  /**
5867
6273
  * Creation timestamp in ISO 8601 format
5868
6274
  */
@@ -5945,7 +6351,10 @@ export namespace CustomerFlowListResponse {
5945
6351
  | 'FRUSTRATED'
5946
6352
  | 'SKEPTICAL'
5947
6353
  | 'RUSHED'
5948
- | 'DISTRACTED';
6354
+ | 'DISTRACTED'
6355
+ | 'ANGRY'
6356
+ | 'ANXIOUS'
6357
+ | 'SAD';
5949
6358
 
5950
6359
  /**
5951
6360
  * How the persona confirms information
@@ -6033,9 +6442,10 @@ export namespace CustomerFlowListResponse {
6033
6442
 
6034
6443
  /**
6035
6444
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
6036
- * NORMAL, RELAXED)
6445
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
6446
+ * for several seconds.
6037
6447
  */
6038
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
6448
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
6039
6449
 
6040
6450
  /**
6041
6451
  * Speech clarity of the persona
@@ -6087,6 +6497,13 @@ export namespace CustomerFlowListResponse {
6087
6497
  */
6088
6498
  description?: string | null;
6089
6499
 
6500
+ /**
6501
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
6502
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
6503
+ * or set null to display the name itself.
6504
+ */
6505
+ displayName?: string | null;
6506
+
6090
6507
  /**
6091
6508
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
6092
6509
  */
@@ -6259,6 +6676,8 @@ export namespace CustomerFlowListResponse {
6259
6676
  | 'OFFICE'
6260
6677
  | 'THUNDERSTORM';
6261
6678
 
6679
+ backgroundNoiseVolume: number;
6680
+
6262
6681
  /**
6263
6682
  * Creation timestamp in ISO 8601 format
6264
6683
  */
@@ -6341,7 +6760,10 @@ export namespace CustomerFlowListResponse {
6341
6760
  | 'FRUSTRATED'
6342
6761
  | 'SKEPTICAL'
6343
6762
  | 'RUSHED'
6344
- | 'DISTRACTED';
6763
+ | 'DISTRACTED'
6764
+ | 'ANGRY'
6765
+ | 'ANXIOUS'
6766
+ | 'SAD';
6345
6767
 
6346
6768
  /**
6347
6769
  * How the persona confirms information
@@ -6429,9 +6851,10 @@ export namespace CustomerFlowListResponse {
6429
6851
 
6430
6852
  /**
6431
6853
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
6432
- * NORMAL, RELAXED)
6854
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
6855
+ * for several seconds.
6433
6856
  */
6434
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
6857
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
6435
6858
 
6436
6859
  /**
6437
6860
  * Speech clarity of the persona
@@ -6483,6 +6906,13 @@ export namespace CustomerFlowListResponse {
6483
6906
  */
6484
6907
  description?: string | null;
6485
6908
 
6909
+ /**
6910
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
6911
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
6912
+ * or set null to display the name itself.
6913
+ */
6914
+ displayName?: string | null;
6915
+
6486
6916
  /**
6487
6917
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
6488
6918
  */
@@ -6567,6 +6997,8 @@ export namespace CustomerFlowListResponse {
6567
6997
  | 'OFFICE'
6568
6998
  | 'THUNDERSTORM';
6569
6999
 
7000
+ backgroundNoiseVolume: number;
7001
+
6570
7002
  /**
6571
7003
  * Creation timestamp in ISO 8601 format
6572
7004
  */
@@ -6649,7 +7081,10 @@ export namespace CustomerFlowListResponse {
6649
7081
  | 'FRUSTRATED'
6650
7082
  | 'SKEPTICAL'
6651
7083
  | 'RUSHED'
6652
- | 'DISTRACTED';
7084
+ | 'DISTRACTED'
7085
+ | 'ANGRY'
7086
+ | 'ANXIOUS'
7087
+ | 'SAD';
6653
7088
 
6654
7089
  /**
6655
7090
  * How the persona confirms information
@@ -6737,9 +7172,10 @@ export namespace CustomerFlowListResponse {
6737
7172
 
6738
7173
  /**
6739
7174
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
6740
- * NORMAL, RELAXED)
7175
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
7176
+ * for several seconds.
6741
7177
  */
6742
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
7178
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
6743
7179
 
6744
7180
  /**
6745
7181
  * Speech clarity of the persona
@@ -6791,6 +7227,13 @@ export namespace CustomerFlowListResponse {
6791
7227
  */
6792
7228
  description?: string | null;
6793
7229
 
7230
+ /**
7231
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
7232
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
7233
+ * or set null to display the name itself.
7234
+ */
7235
+ displayName?: string | null;
7236
+
6794
7237
  /**
6795
7238
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
6796
7239
  */
@@ -6830,17 +7273,17 @@ export namespace CustomerFlowDeleteResponse {
6830
7273
  }
6831
7274
  }
6832
7275
 
6833
- export interface CustomerFlowGetByIDResponse {
7276
+ export interface CustomerFlowDuplicateResponse {
6834
7277
  /**
6835
7278
  * The conversation a simulated customer has with the agent under test.
6836
7279
  */
6837
7280
  data:
6838
- | CustomerFlowGetByIDResponse.ScriptedCustomerFlow
6839
- | CustomerFlowGetByIDResponse.ImprovCustomerFlow
6840
- | CustomerFlowGetByIDResponse.VoicemailCustomerFlow;
7281
+ | CustomerFlowDuplicateResponse.ScriptedCustomerFlow
7282
+ | CustomerFlowDuplicateResponse.ImprovCustomerFlow
7283
+ | CustomerFlowDuplicateResponse.VoicemailCustomerFlow;
6841
7284
  }
6842
7285
 
6843
- export namespace CustomerFlowGetByIDResponse {
7286
+ export namespace CustomerFlowDuplicateResponse {
6844
7287
  /**
6845
7288
  * A flow whose conversation is written out as a graph of turns.
6846
7289
  */
@@ -6880,6 +7323,30 @@ export namespace CustomerFlowGetByIDResponse {
6880
7323
  */
6881
7324
  happyPath: ScriptedCustomerFlow.HappyPath | null;
6882
7325
 
7326
+ /**
7327
+ * STRICT only. What the simulated customer does when your agent does not say the
7328
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
7329
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
7330
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
7331
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
7332
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
7333
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
7334
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
7335
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
7336
+ * AGENT_TURN step can carry its own.
7337
+ */
7338
+ offScriptPolicy: ScriptedCustomerFlow.OffScriptPolicy | null;
7339
+
7340
+ /**
7341
+ * How closely a run follows the script. LOOSE (default) hands the whole script to
7342
+ * the simulated customer as one prompt; it keeps the call moving whatever your
7343
+ * agent says. STRICT runs the script as a state machine on the agent service: at
7344
+ * every agent step the simulated customer waits, silent, until your agent has said
7345
+ * the expected line, and only then moves on. Scripted flows only; STRICT needs the
7346
+ * agent-service transport and is not available on realtime models.
7347
+ */
7348
+ scriptAdherence: 'LOOSE' | 'STRICT';
7349
+
6883
7350
  source: 'SYSTEM' | 'CUSTOM';
6884
7351
 
6885
7352
  title: string;
@@ -7030,6 +7497,8 @@ export namespace CustomerFlowGetByIDResponse {
7030
7497
  | 'OFFICE'
7031
7498
  | 'THUNDERSTORM';
7032
7499
 
7500
+ backgroundNoiseVolume: number;
7501
+
7033
7502
  /**
7034
7503
  * Creation timestamp in ISO 8601 format
7035
7504
  */
@@ -7112,7 +7581,10 @@ export namespace CustomerFlowGetByIDResponse {
7112
7581
  | 'FRUSTRATED'
7113
7582
  | 'SKEPTICAL'
7114
7583
  | 'RUSHED'
7115
- | 'DISTRACTED';
7584
+ | 'DISTRACTED'
7585
+ | 'ANGRY'
7586
+ | 'ANXIOUS'
7587
+ | 'SAD';
7116
7588
 
7117
7589
  /**
7118
7590
  * How the persona confirms information
@@ -7200,9 +7672,10 @@ export namespace CustomerFlowGetByIDResponse {
7200
7672
 
7201
7673
  /**
7202
7674
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
7203
- * NORMAL, RELAXED)
7675
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
7676
+ * for several seconds.
7204
7677
  */
7205
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
7678
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
7206
7679
 
7207
7680
  /**
7208
7681
  * Speech clarity of the persona
@@ -7254,6 +7727,13 @@ export namespace CustomerFlowGetByIDResponse {
7254
7727
  */
7255
7728
  description?: string | null;
7256
7729
 
7730
+ /**
7731
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
7732
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
7733
+ * or set null to display the name itself.
7734
+ */
7735
+ displayName?: string | null;
7736
+
7257
7737
  /**
7258
7738
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
7259
7739
  */
@@ -7345,6 +7825,8 @@ export namespace CustomerFlowGetByIDResponse {
7345
7825
  | 'OFFICE'
7346
7826
  | 'THUNDERSTORM';
7347
7827
 
7828
+ backgroundNoiseVolume: number;
7829
+
7348
7830
  /**
7349
7831
  * Creation timestamp in ISO 8601 format
7350
7832
  */
@@ -7427,7 +7909,10 @@ export namespace CustomerFlowGetByIDResponse {
7427
7909
  | 'FRUSTRATED'
7428
7910
  | 'SKEPTICAL'
7429
7911
  | 'RUSHED'
7430
- | 'DISTRACTED';
7912
+ | 'DISTRACTED'
7913
+ | 'ANGRY'
7914
+ | 'ANXIOUS'
7915
+ | 'SAD';
7431
7916
 
7432
7917
  /**
7433
7918
  * How the persona confirms information
@@ -7515,9 +8000,10 @@ export namespace CustomerFlowGetByIDResponse {
7515
8000
 
7516
8001
  /**
7517
8002
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
7518
- * NORMAL, RELAXED)
8003
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
8004
+ * for several seconds.
7519
8005
  */
7520
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
8006
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
7521
8007
 
7522
8008
  /**
7523
8009
  * Speech clarity of the persona
@@ -7569,12 +8055,43 @@ export namespace CustomerFlowGetByIDResponse {
7569
8055
  */
7570
8056
  description?: string | null;
7571
8057
 
8058
+ /**
8059
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
8060
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
8061
+ * or set null to display the name itself.
8062
+ */
8063
+ displayName?: string | null;
8064
+
7572
8065
  /**
7573
8066
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
7574
8067
  */
7575
8068
  secondaryLanguage?: 'EN' | null;
7576
8069
  }
7577
8070
  }
8071
+
8072
+ /**
8073
+ * STRICT only. What the simulated customer does when your agent does not say the
8074
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
8075
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
8076
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
8077
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
8078
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
8079
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
8080
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
8081
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
8082
+ * AGENT_TURN step can carry its own.
8083
+ */
8084
+ export interface OffScriptPolicy {
8085
+ maxAttempts: number;
8086
+
8087
+ reaction: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY';
8088
+
8089
+ then: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE';
8090
+
8091
+ sayLine?: string | null;
8092
+
8093
+ waitSeconds?: number | null;
8094
+ }
7578
8095
  }
7579
8096
 
7580
8097
  /**
@@ -7747,6 +8264,8 @@ export namespace CustomerFlowGetByIDResponse {
7747
8264
  | 'OFFICE'
7748
8265
  | 'THUNDERSTORM';
7749
8266
 
8267
+ backgroundNoiseVolume: number;
8268
+
7750
8269
  /**
7751
8270
  * Creation timestamp in ISO 8601 format
7752
8271
  */
@@ -7829,7 +8348,10 @@ export namespace CustomerFlowGetByIDResponse {
7829
8348
  | 'FRUSTRATED'
7830
8349
  | 'SKEPTICAL'
7831
8350
  | 'RUSHED'
7832
- | 'DISTRACTED';
8351
+ | 'DISTRACTED'
8352
+ | 'ANGRY'
8353
+ | 'ANXIOUS'
8354
+ | 'SAD';
7833
8355
 
7834
8356
  /**
7835
8357
  * How the persona confirms information
@@ -7917,9 +8439,10 @@ export namespace CustomerFlowGetByIDResponse {
7917
8439
 
7918
8440
  /**
7919
8441
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
7920
- * NORMAL, RELAXED)
8442
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
8443
+ * for several seconds.
7921
8444
  */
7922
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
8445
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
7923
8446
 
7924
8447
  /**
7925
8448
  * Speech clarity of the persona
@@ -7971,6 +8494,13 @@ export namespace CustomerFlowGetByIDResponse {
7971
8494
  */
7972
8495
  description?: string | null;
7973
8496
 
8497
+ /**
8498
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
8499
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
8500
+ * or set null to display the name itself.
8501
+ */
8502
+ displayName?: string | null;
8503
+
7974
8504
  /**
7975
8505
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
7976
8506
  */
@@ -8060,6 +8590,8 @@ export namespace CustomerFlowGetByIDResponse {
8060
8590
  | 'OFFICE'
8061
8591
  | 'THUNDERSTORM';
8062
8592
 
8593
+ backgroundNoiseVolume: number;
8594
+
8063
8595
  /**
8064
8596
  * Creation timestamp in ISO 8601 format
8065
8597
  */
@@ -8142,7 +8674,10 @@ export namespace CustomerFlowGetByIDResponse {
8142
8674
  | 'FRUSTRATED'
8143
8675
  | 'SKEPTICAL'
8144
8676
  | 'RUSHED'
8145
- | 'DISTRACTED';
8677
+ | 'DISTRACTED'
8678
+ | 'ANGRY'
8679
+ | 'ANXIOUS'
8680
+ | 'SAD';
8146
8681
 
8147
8682
  /**
8148
8683
  * How the persona confirms information
@@ -8230,9 +8765,10 @@ export namespace CustomerFlowGetByIDResponse {
8230
8765
 
8231
8766
  /**
8232
8767
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
8233
- * NORMAL, RELAXED)
8768
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
8769
+ * for several seconds.
8234
8770
  */
8235
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
8771
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
8236
8772
 
8237
8773
  /**
8238
8774
  * Speech clarity of the persona
@@ -8284,6 +8820,13 @@ export namespace CustomerFlowGetByIDResponse {
8284
8820
  */
8285
8821
  description?: string | null;
8286
8822
 
8823
+ /**
8824
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
8825
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
8826
+ * or set null to display the name itself.
8827
+ */
8828
+ displayName?: string | null;
8829
+
8287
8830
  /**
8288
8831
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
8289
8832
  */
@@ -8456,6 +8999,8 @@ export namespace CustomerFlowGetByIDResponse {
8456
8999
  | 'OFFICE'
8457
9000
  | 'THUNDERSTORM';
8458
9001
 
9002
+ backgroundNoiseVolume: number;
9003
+
8459
9004
  /**
8460
9005
  * Creation timestamp in ISO 8601 format
8461
9006
  */
@@ -8538,7 +9083,10 @@ export namespace CustomerFlowGetByIDResponse {
8538
9083
  | 'FRUSTRATED'
8539
9084
  | 'SKEPTICAL'
8540
9085
  | 'RUSHED'
8541
- | 'DISTRACTED';
9086
+ | 'DISTRACTED'
9087
+ | 'ANGRY'
9088
+ | 'ANXIOUS'
9089
+ | 'SAD';
8542
9090
 
8543
9091
  /**
8544
9092
  * How the persona confirms information
@@ -8626,9 +9174,10 @@ export namespace CustomerFlowGetByIDResponse {
8626
9174
 
8627
9175
  /**
8628
9176
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
8629
- * NORMAL, RELAXED)
9177
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
9178
+ * for several seconds.
8630
9179
  */
8631
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
9180
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
8632
9181
 
8633
9182
  /**
8634
9183
  * Speech clarity of the persona
@@ -8680,6 +9229,13 @@ export namespace CustomerFlowGetByIDResponse {
8680
9229
  */
8681
9230
  description?: string | null;
8682
9231
 
9232
+ /**
9233
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
9234
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
9235
+ * or set null to display the name itself.
9236
+ */
9237
+ displayName?: string | null;
9238
+
8683
9239
  /**
8684
9240
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
8685
9241
  */
@@ -8764,6 +9320,8 @@ export namespace CustomerFlowGetByIDResponse {
8764
9320
  | 'OFFICE'
8765
9321
  | 'THUNDERSTORM';
8766
9322
 
9323
+ backgroundNoiseVolume: number;
9324
+
8767
9325
  /**
8768
9326
  * Creation timestamp in ISO 8601 format
8769
9327
  */
@@ -8846,7 +9404,10 @@ export namespace CustomerFlowGetByIDResponse {
8846
9404
  | 'FRUSTRATED'
8847
9405
  | 'SKEPTICAL'
8848
9406
  | 'RUSHED'
8849
- | 'DISTRACTED';
9407
+ | 'DISTRACTED'
9408
+ | 'ANGRY'
9409
+ | 'ANXIOUS'
9410
+ | 'SAD';
8850
9411
 
8851
9412
  /**
8852
9413
  * How the persona confirms information
@@ -8934,9 +9495,10 @@ export namespace CustomerFlowGetByIDResponse {
8934
9495
 
8935
9496
  /**
8936
9497
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
8937
- * NORMAL, RELAXED)
9498
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
9499
+ * for several seconds.
8938
9500
  */
8939
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
9501
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
8940
9502
 
8941
9503
  /**
8942
9504
  * Speech clarity of the persona
@@ -8988,6 +9550,13 @@ export namespace CustomerFlowGetByIDResponse {
8988
9550
  */
8989
9551
  description?: string | null;
8990
9552
 
9553
+ /**
9554
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
9555
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
9556
+ * or set null to display the name itself.
9557
+ */
9558
+ displayName?: string | null;
9559
+
8991
9560
  /**
8992
9561
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
8993
9562
  */
@@ -8997,45 +9566,2338 @@ export namespace CustomerFlowGetByIDResponse {
8997
9566
  }
8998
9567
  }
8999
9568
 
9000
- export interface CustomerFlowReplaceGraphResponse {
9001
- data: CustomerFlowReplaceGraphResponse.Data;
9569
+ export interface CustomerFlowGetByIDResponse {
9570
+ /**
9571
+ * The conversation a simulated customer has with the agent under test.
9572
+ */
9573
+ data:
9574
+ | CustomerFlowGetByIDResponse.ScriptedCustomerFlow
9575
+ | CustomerFlowGetByIDResponse.ImprovCustomerFlow
9576
+ | CustomerFlowGetByIDResponse.VoicemailCustomerFlow;
9002
9577
  }
9003
9578
 
9004
- export namespace CustomerFlowReplaceGraphResponse {
9005
- export interface Data {
9579
+ export namespace CustomerFlowGetByIDResponse {
9580
+ /**
9581
+ * A flow whose conversation is written out as a graph of turns.
9582
+ */
9583
+ export interface ScriptedCustomerFlow {
9584
+ id: string;
9585
+
9586
+ agentExpectations: Array<ScriptedCustomerFlow.AgentExpectation>;
9587
+
9006
9588
  /**
9007
- * The edge cases after the write.
9589
+ * The agents this flow is run against.
9008
9590
  */
9009
- edgeCases: Array<Data.ScriptedFlowVariant | Data.ImprovFlowVariant | Data.VoicemailFlowVariant>;
9010
-
9011
- graph: Array<CustomerFlowAPI.FlowStep>;
9591
+ agents: Array<ScriptedCustomerFlow.Agent>;
9012
9592
 
9013
9593
  /**
9014
- * The way a customer flow is meant to go.
9594
+ * How a run walks the graph. DETERMINISTIC ("Simulate every path" in the app)
9595
+ * places one call per variant, each following its path exactly whatever the agent
9596
+ * says. ADAPTIVE ("Adapt to your agent") collapses the paths into one call PER
9597
+ * PERSONA, on which the simulated customer picks a branch from what the agent
9598
+ * actually said. Both modes speak the exact authored lines, and neither changes
9599
+ * how metrics or expectations grade.
9015
9600
  */
9016
- happyPath: Data.ScriptedFlowVariant | Data.ImprovFlowVariant | Data.VoicemailFlowVariant | null;
9601
+ branchingMode: 'DETERMINISTIC' | 'ADAPTIVE';
9017
9602
 
9018
9603
  /**
9019
- * True when the write changed the set of paths, so the flow's variants were
9020
- * re-seeded and any variant id you were holding may no longer exist.
9604
+ * Creation timestamp in ISO 8601 format
9021
9605
  */
9022
- variantsReshaped: boolean;
9606
+ createdAt: string;
9023
9607
 
9024
- warnings: Array<string>;
9025
- }
9608
+ /**
9609
+ * Every other way of running this flow.
9610
+ */
9611
+ edgeCases: Array<ScriptedCustomerFlow.EdgeCase>;
9026
9612
 
9027
- export namespace Data {
9028
9613
  /**
9029
9614
  * One path through a scripted flow. The path engine owns which paths exist, so
9030
9615
  * editing the graph is what creates and removes these.
9031
9616
  */
9032
- export interface ScriptedFlowVariant {
9033
- id: string;
9617
+ happyPath: ScriptedCustomerFlow.HappyPath | null;
9034
9618
 
9035
- /**
9036
- * Graded on top of the flow's own expectations, for this variant only.
9037
- */
9038
- additionalExpectations: Array<ScriptedFlowVariant.AdditionalExpectation>;
9619
+ /**
9620
+ * STRICT only. What the simulated customer does when your agent does not say the
9621
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
9622
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
9623
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
9624
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
9625
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
9626
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
9627
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
9628
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
9629
+ * AGENT_TURN step can carry its own.
9630
+ */
9631
+ offScriptPolicy: ScriptedCustomerFlow.OffScriptPolicy | null;
9632
+
9633
+ /**
9634
+ * How closely a run follows the script. LOOSE (default) hands the whole script to
9635
+ * the simulated customer as one prompt; it keeps the call moving whatever your
9636
+ * agent says. STRICT runs the script as a state machine on the agent service: at
9637
+ * every agent step the simulated customer waits, silent, until your agent has said
9638
+ * the expected line, and only then moves on. Scripted flows only; STRICT needs the
9639
+ * agent-service transport and is not available on realtime models.
9640
+ */
9641
+ scriptAdherence: 'LOOSE' | 'STRICT';
9642
+
9643
+ source: 'SYSTEM' | 'CUSTOM';
9644
+
9645
+ title: string;
9646
+
9647
+ type: 'SCRIPTED';
9648
+
9649
+ /**
9650
+ * Last update timestamp in ISO 8601 format
9651
+ */
9652
+ updatedAt: string;
9653
+
9654
+ description?: string | null;
9655
+
9656
+ /**
9657
+ * The conversation, as a graph of steps. Present on a single flow; omitted from
9658
+ * the list, where reading it would mean walking the project step graph once per
9659
+ * row.
9660
+ */
9661
+ graph?: Array<CustomerFlowAPI.FlowStep>;
9662
+ }
9663
+
9664
+ export namespace ScriptedCustomerFlow {
9665
+ /**
9666
+ * One thing the agent under test is graded against.
9667
+ */
9668
+ export interface AgentExpectation {
9669
+ id: string;
9670
+
9671
+ /**
9672
+ * What the agent under test is graded against.
9673
+ */
9674
+ prompt: string;
9675
+ }
9676
+
9677
+ export interface Agent {
9678
+ /**
9679
+ * Unique identifier of the agent
9680
+ */
9681
+ id: string;
9682
+
9683
+ /**
9684
+ * Creation timestamp in ISO 8601 format
9685
+ */
9686
+ createdAt: string;
9687
+
9688
+ /**
9689
+ * Custom identifier for the agent
9690
+ */
9691
+ customId: string | null;
9692
+
9693
+ /**
9694
+ * Description of the agent
9695
+ */
9696
+ description: string | null;
9697
+
9698
+ /**
9699
+ * Name of the agent
9700
+ */
9701
+ name: string;
9702
+
9703
+ /**
9704
+ * Last update timestamp in ISO 8601 format
9705
+ */
9706
+ updatedAt: string;
9707
+ }
9708
+
9709
+ /**
9710
+ * One path through a scripted flow. The path engine owns which paths exist, so
9711
+ * editing the graph is what creates and removes these.
9712
+ */
9713
+ export interface EdgeCase {
9714
+ id: string;
9715
+
9716
+ /**
9717
+ * Graded on top of the flow's own expectations, for this variant only.
9718
+ */
9719
+ additionalExpectations: Array<EdgeCase.AdditionalExpectation>;
9720
+
9721
+ /**
9722
+ * Creation timestamp in ISO 8601 format
9723
+ */
9724
+ createdAt: string;
9725
+
9726
+ /**
9727
+ * A simulation environment: the ambient conditions a customer flow variant runs
9728
+ * under. The list includes both your own and the ones Roark curates for every
9729
+ * project.
9730
+ */
9731
+ environment: EdgeCase.Environment | null;
9732
+
9733
+ isGenerated: boolean;
9734
+
9735
+ /**
9736
+ * The persona this runs as instead of the happy path's. Null means it inherits.
9737
+ */
9738
+ personaOverride: EdgeCase.PersonaOverride | null;
9739
+
9740
+ precededByCustomerFlowId: string | null;
9741
+
9742
+ precededByCustomerFlowVariantId: string | null;
9743
+
9744
+ /**
9745
+ * The one path through the graph this variant runs, in order. Linear by
9746
+ * construction, so these steps never nest.
9747
+ */
9748
+ steps: Array<CustomerFlowAPI.FlowStep>;
9749
+
9750
+ title: string;
9751
+
9752
+ type: 'SCRIPTED';
9753
+
9754
+ /**
9755
+ * Last update timestamp in ISO 8601 format
9756
+ */
9757
+ updatedAt: string;
9758
+
9759
+ systemKey?: string | null;
9760
+ }
9761
+
9762
+ export namespace EdgeCase {
9763
+ /**
9764
+ * One thing the agent under test is graded against.
9765
+ */
9766
+ export interface AdditionalExpectation {
9767
+ id: string;
9768
+
9769
+ /**
9770
+ * What the agent under test is graded against.
9771
+ */
9772
+ prompt: string;
9773
+ }
9774
+
9775
+ /**
9776
+ * A simulation environment: the ambient conditions a customer flow variant runs
9777
+ * under. The list includes both your own and the ones Roark curates for every
9778
+ * project.
9779
+ */
9780
+ export interface Environment {
9781
+ id: string;
9782
+
9783
+ backgroundNoise:
9784
+ | 'NONE'
9785
+ | 'AIRPORT'
9786
+ | 'CHILDREN_PLAYING'
9787
+ | 'CITY'
9788
+ | 'COFFEE_SHOP'
9789
+ | 'DRIVING'
9790
+ | 'OFFICE'
9791
+ | 'THUNDERSTORM';
9792
+
9793
+ backgroundNoiseVolume: number;
9794
+
9795
+ /**
9796
+ * Creation timestamp in ISO 8601 format
9797
+ */
9798
+ createdAt: string;
9799
+
9800
+ name: string;
9801
+
9802
+ /**
9803
+ * Last update timestamp in ISO 8601 format
9804
+ */
9805
+ updatedAt: string;
9806
+
9807
+ description?: string | null;
9808
+ }
9809
+
9810
+ /**
9811
+ * The persona this runs as instead of the happy path's. Null means it inherits.
9812
+ */
9813
+ export interface PersonaOverride {
9814
+ /**
9815
+ * Unique identifier of the persona
9816
+ */
9817
+ id: string;
9818
+
9819
+ /**
9820
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
9821
+ * optional variants
9822
+ */
9823
+ accent:
9824
+ | 'US'
9825
+ | 'US_X_SOUTH'
9826
+ | 'GB'
9827
+ | 'ES'
9828
+ | 'DE'
9829
+ | 'IN'
9830
+ | 'FR'
9831
+ | 'NL'
9832
+ | 'SA'
9833
+ | 'GR'
9834
+ | 'AU'
9835
+ | 'IT'
9836
+ | 'ID'
9837
+ | 'TH'
9838
+ | 'JP'
9839
+ | 'NZ'
9840
+ | 'PH'
9841
+ | 'SG'
9842
+ | 'MY'
9843
+ | 'HK'
9844
+ | 'TR'
9845
+ | 'PT'
9846
+ | 'IL';
9847
+
9848
+ /**
9849
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
9850
+ * voice for are accepted; defaults to ADULT, which every accent supports.
9851
+ */
9852
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
9853
+
9854
+ /**
9855
+ * Background noise setting
9856
+ */
9857
+ backgroundNoise:
9858
+ | 'NONE'
9859
+ | 'AIRPORT'
9860
+ | 'CHILDREN_PLAYING'
9861
+ | 'CITY'
9862
+ | 'COFFEE_SHOP'
9863
+ | 'DRIVING'
9864
+ | 'OFFICE'
9865
+ | 'THUNDERSTORM';
9866
+
9867
+ /**
9868
+ * Base emotional state of the persona
9869
+ */
9870
+ baseEmotion:
9871
+ | 'NEUTRAL'
9872
+ | 'CHEERFUL'
9873
+ | 'CONFUSED'
9874
+ | 'FRUSTRATED'
9875
+ | 'SKEPTICAL'
9876
+ | 'RUSHED'
9877
+ | 'DISTRACTED'
9878
+ | 'ANGRY'
9879
+ | 'ANXIOUS'
9880
+ | 'SAD';
9881
+
9882
+ /**
9883
+ * How the persona confirms information
9884
+ */
9885
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
9886
+
9887
+ /**
9888
+ * Creation timestamp
9889
+ */
9890
+ createdAt: string;
9891
+
9892
+ /**
9893
+ * Gender of the persona
9894
+ */
9895
+ gender: 'MALE' | 'FEMALE';
9896
+
9897
+ /**
9898
+ * Whether the persona uses filler words like "um" and "uh"
9899
+ */
9900
+ hasDisfluencies: boolean;
9901
+
9902
+ /**
9903
+ * Maximum number of idle messages the persona will send before giving up
9904
+ */
9905
+ idleMessageMaxSpokenCount: number;
9906
+
9907
+ /**
9908
+ * Whether the idle message counter resets when the agent speaks
9909
+ */
9910
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
9911
+
9912
+ /**
9913
+ * Messages the persona will say when the agent goes silent during a call. null =
9914
+ * "Automatic": language-appropriate defaults are used at call time.
9915
+ */
9916
+ idleMessages: Array<string> | null;
9917
+
9918
+ /**
9919
+ * Seconds of silence before the persona sends an idle message
9920
+ */
9921
+ idleTimeoutSeconds: number;
9922
+
9923
+ /**
9924
+ * How clearly the persona expresses their intentions
9925
+ */
9926
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
9927
+
9928
+ /**
9929
+ * Primary language ISO 639-1 code for the persona
9930
+ */
9931
+ language:
9932
+ | 'EN'
9933
+ | 'ES'
9934
+ | 'DE'
9935
+ | 'HI'
9936
+ | 'FR'
9937
+ | 'NL'
9938
+ | 'AR'
9939
+ | 'EL'
9940
+ | 'IT'
9941
+ | 'ID'
9942
+ | 'TH'
9943
+ | 'JA'
9944
+ | 'TL'
9945
+ | 'MS'
9946
+ | 'ZH'
9947
+ | 'TR'
9948
+ | 'PT'
9949
+ | 'HE';
9950
+
9951
+ /**
9952
+ * How reliable the persona's memory is
9953
+ */
9954
+ memoryReliability: 'HIGH' | 'LOW';
9955
+
9956
+ /**
9957
+ * The name the agent will identify as during conversations
9958
+ */
9959
+ name: string;
9960
+
9961
+ /**
9962
+ * Additional custom properties about the persona
9963
+ */
9964
+ properties: { [key: string]: unknown };
9965
+
9966
+ /**
9967
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
9968
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
9969
+ * for several seconds.
9970
+ */
9971
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
9972
+
9973
+ /**
9974
+ * Speech clarity of the persona
9975
+ */
9976
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
9977
+
9978
+ /**
9979
+ * Speech pace of the persona
9980
+ */
9981
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
9982
+
9983
+ /**
9984
+ * Languages the persona can understand. Multilingual combinations are limited by
9985
+ * multilingual speech recognition support.
9986
+ */
9987
+ understoodLanguages: Array<
9988
+ | 'EN'
9989
+ | 'ES'
9990
+ | 'DE'
9991
+ | 'HI'
9992
+ | 'FR'
9993
+ | 'NL'
9994
+ | 'AR'
9995
+ | 'EL'
9996
+ | 'IT'
9997
+ | 'ID'
9998
+ | 'TH'
9999
+ | 'JA'
10000
+ | 'TL'
10001
+ | 'MS'
10002
+ | 'ZH'
10003
+ | 'TR'
10004
+ | 'PT'
10005
+ | 'HE'
10006
+ >;
10007
+
10008
+ /**
10009
+ * Last update timestamp
10010
+ */
10011
+ updatedAt: string;
10012
+
10013
+ /**
10014
+ * Background story and behavioral patterns for the persona
10015
+ */
10016
+ backstoryPrompt?: string | null;
10017
+
10018
+ /**
10019
+ * Human-readable description of the persona
10020
+ */
10021
+ description?: string | null;
10022
+
10023
+ /**
10024
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
10025
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
10026
+ * or set null to display the name itself.
10027
+ */
10028
+ displayName?: string | null;
10029
+
10030
+ /**
10031
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
10032
+ */
10033
+ secondaryLanguage?: 'EN' | null;
10034
+ }
10035
+ }
10036
+
10037
+ /**
10038
+ * One path through a scripted flow. The path engine owns which paths exist, so
10039
+ * editing the graph is what creates and removes these.
10040
+ */
10041
+ export interface HappyPath {
10042
+ id: string;
10043
+
10044
+ /**
10045
+ * Graded on top of the flow's own expectations, for this variant only.
10046
+ */
10047
+ additionalExpectations: Array<HappyPath.AdditionalExpectation>;
10048
+
10049
+ /**
10050
+ * Creation timestamp in ISO 8601 format
10051
+ */
10052
+ createdAt: string;
10053
+
10054
+ /**
10055
+ * A simulation environment: the ambient conditions a customer flow variant runs
10056
+ * under. The list includes both your own and the ones Roark curates for every
10057
+ * project.
10058
+ */
10059
+ environment: HappyPath.Environment | null;
10060
+
10061
+ isGenerated: boolean;
10062
+
10063
+ /**
10064
+ * The persona this runs as instead of the happy path's. Null means it inherits.
10065
+ */
10066
+ personaOverride: HappyPath.PersonaOverride | null;
10067
+
10068
+ precededByCustomerFlowId: string | null;
10069
+
10070
+ precededByCustomerFlowVariantId: string | null;
10071
+
10072
+ /**
10073
+ * The one path through the graph this variant runs, in order. Linear by
10074
+ * construction, so these steps never nest.
10075
+ */
10076
+ steps: Array<CustomerFlowAPI.FlowStep>;
10077
+
10078
+ title: string;
10079
+
10080
+ type: 'SCRIPTED';
10081
+
10082
+ /**
10083
+ * Last update timestamp in ISO 8601 format
10084
+ */
10085
+ updatedAt: string;
10086
+
10087
+ systemKey?: string | null;
10088
+ }
10089
+
10090
+ export namespace HappyPath {
10091
+ /**
10092
+ * One thing the agent under test is graded against.
10093
+ */
10094
+ export interface AdditionalExpectation {
10095
+ id: string;
10096
+
10097
+ /**
10098
+ * What the agent under test is graded against.
10099
+ */
10100
+ prompt: string;
10101
+ }
10102
+
10103
+ /**
10104
+ * A simulation environment: the ambient conditions a customer flow variant runs
10105
+ * under. The list includes both your own and the ones Roark curates for every
10106
+ * project.
10107
+ */
10108
+ export interface Environment {
10109
+ id: string;
10110
+
10111
+ backgroundNoise:
10112
+ | 'NONE'
10113
+ | 'AIRPORT'
10114
+ | 'CHILDREN_PLAYING'
10115
+ | 'CITY'
10116
+ | 'COFFEE_SHOP'
10117
+ | 'DRIVING'
10118
+ | 'OFFICE'
10119
+ | 'THUNDERSTORM';
10120
+
10121
+ backgroundNoiseVolume: number;
10122
+
10123
+ /**
10124
+ * Creation timestamp in ISO 8601 format
10125
+ */
10126
+ createdAt: string;
10127
+
10128
+ name: string;
10129
+
10130
+ /**
10131
+ * Last update timestamp in ISO 8601 format
10132
+ */
10133
+ updatedAt: string;
10134
+
10135
+ description?: string | null;
10136
+ }
10137
+
10138
+ /**
10139
+ * The persona this runs as instead of the happy path's. Null means it inherits.
10140
+ */
10141
+ export interface PersonaOverride {
10142
+ /**
10143
+ * Unique identifier of the persona
10144
+ */
10145
+ id: string;
10146
+
10147
+ /**
10148
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
10149
+ * optional variants
10150
+ */
10151
+ accent:
10152
+ | 'US'
10153
+ | 'US_X_SOUTH'
10154
+ | 'GB'
10155
+ | 'ES'
10156
+ | 'DE'
10157
+ | 'IN'
10158
+ | 'FR'
10159
+ | 'NL'
10160
+ | 'SA'
10161
+ | 'GR'
10162
+ | 'AU'
10163
+ | 'IT'
10164
+ | 'ID'
10165
+ | 'TH'
10166
+ | 'JP'
10167
+ | 'NZ'
10168
+ | 'PH'
10169
+ | 'SG'
10170
+ | 'MY'
10171
+ | 'HK'
10172
+ | 'TR'
10173
+ | 'PT'
10174
+ | 'IL';
10175
+
10176
+ /**
10177
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
10178
+ * voice for are accepted; defaults to ADULT, which every accent supports.
10179
+ */
10180
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
10181
+
10182
+ /**
10183
+ * Background noise setting
10184
+ */
10185
+ backgroundNoise:
10186
+ | 'NONE'
10187
+ | 'AIRPORT'
10188
+ | 'CHILDREN_PLAYING'
10189
+ | 'CITY'
10190
+ | 'COFFEE_SHOP'
10191
+ | 'DRIVING'
10192
+ | 'OFFICE'
10193
+ | 'THUNDERSTORM';
10194
+
10195
+ /**
10196
+ * Base emotional state of the persona
10197
+ */
10198
+ baseEmotion:
10199
+ | 'NEUTRAL'
10200
+ | 'CHEERFUL'
10201
+ | 'CONFUSED'
10202
+ | 'FRUSTRATED'
10203
+ | 'SKEPTICAL'
10204
+ | 'RUSHED'
10205
+ | 'DISTRACTED'
10206
+ | 'ANGRY'
10207
+ | 'ANXIOUS'
10208
+ | 'SAD';
10209
+
10210
+ /**
10211
+ * How the persona confirms information
10212
+ */
10213
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
10214
+
10215
+ /**
10216
+ * Creation timestamp
10217
+ */
10218
+ createdAt: string;
10219
+
10220
+ /**
10221
+ * Gender of the persona
10222
+ */
10223
+ gender: 'MALE' | 'FEMALE';
10224
+
10225
+ /**
10226
+ * Whether the persona uses filler words like "um" and "uh"
10227
+ */
10228
+ hasDisfluencies: boolean;
10229
+
10230
+ /**
10231
+ * Maximum number of idle messages the persona will send before giving up
10232
+ */
10233
+ idleMessageMaxSpokenCount: number;
10234
+
10235
+ /**
10236
+ * Whether the idle message counter resets when the agent speaks
10237
+ */
10238
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
10239
+
10240
+ /**
10241
+ * Messages the persona will say when the agent goes silent during a call. null =
10242
+ * "Automatic": language-appropriate defaults are used at call time.
10243
+ */
10244
+ idleMessages: Array<string> | null;
10245
+
10246
+ /**
10247
+ * Seconds of silence before the persona sends an idle message
10248
+ */
10249
+ idleTimeoutSeconds: number;
10250
+
10251
+ /**
10252
+ * How clearly the persona expresses their intentions
10253
+ */
10254
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
10255
+
10256
+ /**
10257
+ * Primary language ISO 639-1 code for the persona
10258
+ */
10259
+ language:
10260
+ | 'EN'
10261
+ | 'ES'
10262
+ | 'DE'
10263
+ | 'HI'
10264
+ | 'FR'
10265
+ | 'NL'
10266
+ | 'AR'
10267
+ | 'EL'
10268
+ | 'IT'
10269
+ | 'ID'
10270
+ | 'TH'
10271
+ | 'JA'
10272
+ | 'TL'
10273
+ | 'MS'
10274
+ | 'ZH'
10275
+ | 'TR'
10276
+ | 'PT'
10277
+ | 'HE';
10278
+
10279
+ /**
10280
+ * How reliable the persona's memory is
10281
+ */
10282
+ memoryReliability: 'HIGH' | 'LOW';
10283
+
10284
+ /**
10285
+ * The name the agent will identify as during conversations
10286
+ */
10287
+ name: string;
10288
+
10289
+ /**
10290
+ * Additional custom properties about the persona
10291
+ */
10292
+ properties: { [key: string]: unknown };
10293
+
10294
+ /**
10295
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
10296
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
10297
+ * for several seconds.
10298
+ */
10299
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
10300
+
10301
+ /**
10302
+ * Speech clarity of the persona
10303
+ */
10304
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
10305
+
10306
+ /**
10307
+ * Speech pace of the persona
10308
+ */
10309
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
10310
+
10311
+ /**
10312
+ * Languages the persona can understand. Multilingual combinations are limited by
10313
+ * multilingual speech recognition support.
10314
+ */
10315
+ understoodLanguages: Array<
10316
+ | 'EN'
10317
+ | 'ES'
10318
+ | 'DE'
10319
+ | 'HI'
10320
+ | 'FR'
10321
+ | 'NL'
10322
+ | 'AR'
10323
+ | 'EL'
10324
+ | 'IT'
10325
+ | 'ID'
10326
+ | 'TH'
10327
+ | 'JA'
10328
+ | 'TL'
10329
+ | 'MS'
10330
+ | 'ZH'
10331
+ | 'TR'
10332
+ | 'PT'
10333
+ | 'HE'
10334
+ >;
10335
+
10336
+ /**
10337
+ * Last update timestamp
10338
+ */
10339
+ updatedAt: string;
10340
+
10341
+ /**
10342
+ * Background story and behavioral patterns for the persona
10343
+ */
10344
+ backstoryPrompt?: string | null;
10345
+
10346
+ /**
10347
+ * Human-readable description of the persona
10348
+ */
10349
+ description?: string | null;
10350
+
10351
+ /**
10352
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
10353
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
10354
+ * or set null to display the name itself.
10355
+ */
10356
+ displayName?: string | null;
10357
+
10358
+ /**
10359
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
10360
+ */
10361
+ secondaryLanguage?: 'EN' | null;
10362
+ }
10363
+ }
10364
+
10365
+ /**
10366
+ * STRICT only. What the simulated customer does when your agent does not say the
10367
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
10368
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
10369
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
10370
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
10371
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
10372
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
10373
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
10374
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
10375
+ * AGENT_TURN step can carry its own.
10376
+ */
10377
+ export interface OffScriptPolicy {
10378
+ maxAttempts: number;
10379
+
10380
+ reaction: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY';
10381
+
10382
+ then: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE';
10383
+
10384
+ sayLine?: string | null;
10385
+
10386
+ waitSeconds?: number | null;
10387
+ }
10388
+ }
10389
+
10390
+ /**
10391
+ * A flow whose conversation is not written out: each variant gives the simulated
10392
+ * customer a brief and lets it improvise.
10393
+ */
10394
+ export interface ImprovCustomerFlow {
10395
+ id: string;
10396
+
10397
+ agentExpectations: Array<ImprovCustomerFlow.AgentExpectation>;
10398
+
10399
+ /**
10400
+ * The agents this flow is run against.
10401
+ */
10402
+ agents: Array<ImprovCustomerFlow.Agent>;
10403
+
10404
+ /**
10405
+ * Creation timestamp in ISO 8601 format
10406
+ */
10407
+ createdAt: string;
10408
+
10409
+ /**
10410
+ * Every other way of running this flow.
10411
+ */
10412
+ edgeCases: Array<ImprovCustomerFlow.EdgeCase>;
10413
+
10414
+ /**
10415
+ * One brief to run an improv flow with.
10416
+ */
10417
+ happyPath: ImprovCustomerFlow.HappyPath | null;
10418
+
10419
+ source: 'SYSTEM' | 'CUSTOM';
10420
+
10421
+ title: string;
10422
+
10423
+ type: 'IMPROV';
10424
+
10425
+ /**
10426
+ * Last update timestamp in ISO 8601 format
10427
+ */
10428
+ updatedAt: string;
10429
+
10430
+ description?: string | null;
10431
+ }
10432
+
10433
+ export namespace ImprovCustomerFlow {
10434
+ /**
10435
+ * One thing the agent under test is graded against.
10436
+ */
10437
+ export interface AgentExpectation {
10438
+ id: string;
10439
+
10440
+ /**
10441
+ * What the agent under test is graded against.
10442
+ */
10443
+ prompt: string;
10444
+ }
10445
+
10446
+ export interface Agent {
10447
+ /**
10448
+ * Unique identifier of the agent
10449
+ */
10450
+ id: string;
10451
+
10452
+ /**
10453
+ * Creation timestamp in ISO 8601 format
10454
+ */
10455
+ createdAt: string;
10456
+
10457
+ /**
10458
+ * Custom identifier for the agent
10459
+ */
10460
+ customId: string | null;
10461
+
10462
+ /**
10463
+ * Description of the agent
10464
+ */
10465
+ description: string | null;
10466
+
10467
+ /**
10468
+ * Name of the agent
10469
+ */
10470
+ name: string;
10471
+
10472
+ /**
10473
+ * Last update timestamp in ISO 8601 format
10474
+ */
10475
+ updatedAt: string;
10476
+ }
10477
+
10478
+ /**
10479
+ * One brief to run an improv flow with.
10480
+ */
10481
+ export interface EdgeCase {
10482
+ id: string;
10483
+
10484
+ /**
10485
+ * Graded on top of the flow's own expectations, for this variant only.
10486
+ */
10487
+ additionalExpectations: Array<EdgeCase.AdditionalExpectation>;
10488
+
10489
+ /**
10490
+ * Creation timestamp in ISO 8601 format
10491
+ */
10492
+ createdAt: string;
10493
+
10494
+ /**
10495
+ * A simulation environment: the ambient conditions a customer flow variant runs
10496
+ * under. The list includes both your own and the ones Roark curates for every
10497
+ * project.
10498
+ */
10499
+ environment: EdgeCase.Environment | null;
10500
+
10501
+ isGenerated: boolean;
10502
+
10503
+ /**
10504
+ * The persona this runs as instead of the happy path's. Null means it inherits.
10505
+ */
10506
+ personaOverride: EdgeCase.PersonaOverride | null;
10507
+
10508
+ precededByCustomerFlowId: string | null;
10509
+
10510
+ precededByCustomerFlowVariantId: string | null;
10511
+
10512
+ title: string;
10513
+
10514
+ type: 'IMPROV';
10515
+
10516
+ /**
10517
+ * Last update timestamp in ISO 8601 format
10518
+ */
10519
+ updatedAt: string;
10520
+
10521
+ /**
10522
+ * The brief the simulated customer improvises from.
10523
+ */
10524
+ prompt?: string | null;
10525
+
10526
+ systemKey?: string | null;
10527
+ }
10528
+
10529
+ export namespace EdgeCase {
10530
+ /**
10531
+ * One thing the agent under test is graded against.
10532
+ */
10533
+ export interface AdditionalExpectation {
10534
+ id: string;
10535
+
10536
+ /**
10537
+ * What the agent under test is graded against.
10538
+ */
10539
+ prompt: string;
10540
+ }
10541
+
10542
+ /**
10543
+ * A simulation environment: the ambient conditions a customer flow variant runs
10544
+ * under. The list includes both your own and the ones Roark curates for every
10545
+ * project.
10546
+ */
10547
+ export interface Environment {
10548
+ id: string;
10549
+
10550
+ backgroundNoise:
10551
+ | 'NONE'
10552
+ | 'AIRPORT'
10553
+ | 'CHILDREN_PLAYING'
10554
+ | 'CITY'
10555
+ | 'COFFEE_SHOP'
10556
+ | 'DRIVING'
10557
+ | 'OFFICE'
10558
+ | 'THUNDERSTORM';
10559
+
10560
+ backgroundNoiseVolume: number;
10561
+
10562
+ /**
10563
+ * Creation timestamp in ISO 8601 format
10564
+ */
10565
+ createdAt: string;
10566
+
10567
+ name: string;
10568
+
10569
+ /**
10570
+ * Last update timestamp in ISO 8601 format
10571
+ */
10572
+ updatedAt: string;
10573
+
10574
+ description?: string | null;
10575
+ }
10576
+
10577
+ /**
10578
+ * The persona this runs as instead of the happy path's. Null means it inherits.
10579
+ */
10580
+ export interface PersonaOverride {
10581
+ /**
10582
+ * Unique identifier of the persona
10583
+ */
10584
+ id: string;
10585
+
10586
+ /**
10587
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
10588
+ * optional variants
10589
+ */
10590
+ accent:
10591
+ | 'US'
10592
+ | 'US_X_SOUTH'
10593
+ | 'GB'
10594
+ | 'ES'
10595
+ | 'DE'
10596
+ | 'IN'
10597
+ | 'FR'
10598
+ | 'NL'
10599
+ | 'SA'
10600
+ | 'GR'
10601
+ | 'AU'
10602
+ | 'IT'
10603
+ | 'ID'
10604
+ | 'TH'
10605
+ | 'JP'
10606
+ | 'NZ'
10607
+ | 'PH'
10608
+ | 'SG'
10609
+ | 'MY'
10610
+ | 'HK'
10611
+ | 'TR'
10612
+ | 'PT'
10613
+ | 'IL';
10614
+
10615
+ /**
10616
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
10617
+ * voice for are accepted; defaults to ADULT, which every accent supports.
10618
+ */
10619
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
10620
+
10621
+ /**
10622
+ * Background noise setting
10623
+ */
10624
+ backgroundNoise:
10625
+ | 'NONE'
10626
+ | 'AIRPORT'
10627
+ | 'CHILDREN_PLAYING'
10628
+ | 'CITY'
10629
+ | 'COFFEE_SHOP'
10630
+ | 'DRIVING'
10631
+ | 'OFFICE'
10632
+ | 'THUNDERSTORM';
10633
+
10634
+ /**
10635
+ * Base emotional state of the persona
10636
+ */
10637
+ baseEmotion:
10638
+ | 'NEUTRAL'
10639
+ | 'CHEERFUL'
10640
+ | 'CONFUSED'
10641
+ | 'FRUSTRATED'
10642
+ | 'SKEPTICAL'
10643
+ | 'RUSHED'
10644
+ | 'DISTRACTED'
10645
+ | 'ANGRY'
10646
+ | 'ANXIOUS'
10647
+ | 'SAD';
10648
+
10649
+ /**
10650
+ * How the persona confirms information
10651
+ */
10652
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
10653
+
10654
+ /**
10655
+ * Creation timestamp
10656
+ */
10657
+ createdAt: string;
10658
+
10659
+ /**
10660
+ * Gender of the persona
10661
+ */
10662
+ gender: 'MALE' | 'FEMALE';
10663
+
10664
+ /**
10665
+ * Whether the persona uses filler words like "um" and "uh"
10666
+ */
10667
+ hasDisfluencies: boolean;
10668
+
10669
+ /**
10670
+ * Maximum number of idle messages the persona will send before giving up
10671
+ */
10672
+ idleMessageMaxSpokenCount: number;
10673
+
10674
+ /**
10675
+ * Whether the idle message counter resets when the agent speaks
10676
+ */
10677
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
10678
+
10679
+ /**
10680
+ * Messages the persona will say when the agent goes silent during a call. null =
10681
+ * "Automatic": language-appropriate defaults are used at call time.
10682
+ */
10683
+ idleMessages: Array<string> | null;
10684
+
10685
+ /**
10686
+ * Seconds of silence before the persona sends an idle message
10687
+ */
10688
+ idleTimeoutSeconds: number;
10689
+
10690
+ /**
10691
+ * How clearly the persona expresses their intentions
10692
+ */
10693
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
10694
+
10695
+ /**
10696
+ * Primary language ISO 639-1 code for the persona
10697
+ */
10698
+ language:
10699
+ | 'EN'
10700
+ | 'ES'
10701
+ | 'DE'
10702
+ | 'HI'
10703
+ | 'FR'
10704
+ | 'NL'
10705
+ | 'AR'
10706
+ | 'EL'
10707
+ | 'IT'
10708
+ | 'ID'
10709
+ | 'TH'
10710
+ | 'JA'
10711
+ | 'TL'
10712
+ | 'MS'
10713
+ | 'ZH'
10714
+ | 'TR'
10715
+ | 'PT'
10716
+ | 'HE';
10717
+
10718
+ /**
10719
+ * How reliable the persona's memory is
10720
+ */
10721
+ memoryReliability: 'HIGH' | 'LOW';
10722
+
10723
+ /**
10724
+ * The name the agent will identify as during conversations
10725
+ */
10726
+ name: string;
10727
+
10728
+ /**
10729
+ * Additional custom properties about the persona
10730
+ */
10731
+ properties: { [key: string]: unknown };
10732
+
10733
+ /**
10734
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
10735
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
10736
+ * for several seconds.
10737
+ */
10738
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
10739
+
10740
+ /**
10741
+ * Speech clarity of the persona
10742
+ */
10743
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
10744
+
10745
+ /**
10746
+ * Speech pace of the persona
10747
+ */
10748
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
10749
+
10750
+ /**
10751
+ * Languages the persona can understand. Multilingual combinations are limited by
10752
+ * multilingual speech recognition support.
10753
+ */
10754
+ understoodLanguages: Array<
10755
+ | 'EN'
10756
+ | 'ES'
10757
+ | 'DE'
10758
+ | 'HI'
10759
+ | 'FR'
10760
+ | 'NL'
10761
+ | 'AR'
10762
+ | 'EL'
10763
+ | 'IT'
10764
+ | 'ID'
10765
+ | 'TH'
10766
+ | 'JA'
10767
+ | 'TL'
10768
+ | 'MS'
10769
+ | 'ZH'
10770
+ | 'TR'
10771
+ | 'PT'
10772
+ | 'HE'
10773
+ >;
10774
+
10775
+ /**
10776
+ * Last update timestamp
10777
+ */
10778
+ updatedAt: string;
10779
+
10780
+ /**
10781
+ * Background story and behavioral patterns for the persona
10782
+ */
10783
+ backstoryPrompt?: string | null;
10784
+
10785
+ /**
10786
+ * Human-readable description of the persona
10787
+ */
10788
+ description?: string | null;
10789
+
10790
+ /**
10791
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
10792
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
10793
+ * or set null to display the name itself.
10794
+ */
10795
+ displayName?: string | null;
10796
+
10797
+ /**
10798
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
10799
+ */
10800
+ secondaryLanguage?: 'EN' | null;
10801
+ }
10802
+ }
10803
+
10804
+ /**
10805
+ * One brief to run an improv flow with.
10806
+ */
10807
+ export interface HappyPath {
10808
+ id: string;
10809
+
10810
+ /**
10811
+ * Graded on top of the flow's own expectations, for this variant only.
10812
+ */
10813
+ additionalExpectations: Array<HappyPath.AdditionalExpectation>;
10814
+
10815
+ /**
10816
+ * Creation timestamp in ISO 8601 format
10817
+ */
10818
+ createdAt: string;
10819
+
10820
+ /**
10821
+ * A simulation environment: the ambient conditions a customer flow variant runs
10822
+ * under. The list includes both your own and the ones Roark curates for every
10823
+ * project.
10824
+ */
10825
+ environment: HappyPath.Environment | null;
10826
+
10827
+ isGenerated: boolean;
10828
+
10829
+ /**
10830
+ * The persona this runs as instead of the happy path's. Null means it inherits.
10831
+ */
10832
+ personaOverride: HappyPath.PersonaOverride | null;
10833
+
10834
+ precededByCustomerFlowId: string | null;
10835
+
10836
+ precededByCustomerFlowVariantId: string | null;
10837
+
10838
+ title: string;
10839
+
10840
+ type: 'IMPROV';
10841
+
10842
+ /**
10843
+ * Last update timestamp in ISO 8601 format
10844
+ */
10845
+ updatedAt: string;
10846
+
10847
+ /**
10848
+ * The brief the simulated customer improvises from.
10849
+ */
10850
+ prompt?: string | null;
10851
+
10852
+ systemKey?: string | null;
10853
+ }
10854
+
10855
+ export namespace HappyPath {
10856
+ /**
10857
+ * One thing the agent under test is graded against.
10858
+ */
10859
+ export interface AdditionalExpectation {
10860
+ id: string;
10861
+
10862
+ /**
10863
+ * What the agent under test is graded against.
10864
+ */
10865
+ prompt: string;
10866
+ }
10867
+
10868
+ /**
10869
+ * A simulation environment: the ambient conditions a customer flow variant runs
10870
+ * under. The list includes both your own and the ones Roark curates for every
10871
+ * project.
10872
+ */
10873
+ export interface Environment {
10874
+ id: string;
10875
+
10876
+ backgroundNoise:
10877
+ | 'NONE'
10878
+ | 'AIRPORT'
10879
+ | 'CHILDREN_PLAYING'
10880
+ | 'CITY'
10881
+ | 'COFFEE_SHOP'
10882
+ | 'DRIVING'
10883
+ | 'OFFICE'
10884
+ | 'THUNDERSTORM';
10885
+
10886
+ backgroundNoiseVolume: number;
10887
+
10888
+ /**
10889
+ * Creation timestamp in ISO 8601 format
10890
+ */
10891
+ createdAt: string;
10892
+
10893
+ name: string;
10894
+
10895
+ /**
10896
+ * Last update timestamp in ISO 8601 format
10897
+ */
10898
+ updatedAt: string;
10899
+
10900
+ description?: string | null;
10901
+ }
10902
+
10903
+ /**
10904
+ * The persona this runs as instead of the happy path's. Null means it inherits.
10905
+ */
10906
+ export interface PersonaOverride {
10907
+ /**
10908
+ * Unique identifier of the persona
10909
+ */
10910
+ id: string;
10911
+
10912
+ /**
10913
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
10914
+ * optional variants
10915
+ */
10916
+ accent:
10917
+ | 'US'
10918
+ | 'US_X_SOUTH'
10919
+ | 'GB'
10920
+ | 'ES'
10921
+ | 'DE'
10922
+ | 'IN'
10923
+ | 'FR'
10924
+ | 'NL'
10925
+ | 'SA'
10926
+ | 'GR'
10927
+ | 'AU'
10928
+ | 'IT'
10929
+ | 'ID'
10930
+ | 'TH'
10931
+ | 'JP'
10932
+ | 'NZ'
10933
+ | 'PH'
10934
+ | 'SG'
10935
+ | 'MY'
10936
+ | 'HK'
10937
+ | 'TR'
10938
+ | 'PT'
10939
+ | 'IL';
10940
+
10941
+ /**
10942
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
10943
+ * voice for are accepted; defaults to ADULT, which every accent supports.
10944
+ */
10945
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
10946
+
10947
+ /**
10948
+ * Background noise setting
10949
+ */
10950
+ backgroundNoise:
10951
+ | 'NONE'
10952
+ | 'AIRPORT'
10953
+ | 'CHILDREN_PLAYING'
10954
+ | 'CITY'
10955
+ | 'COFFEE_SHOP'
10956
+ | 'DRIVING'
10957
+ | 'OFFICE'
10958
+ | 'THUNDERSTORM';
10959
+
10960
+ /**
10961
+ * Base emotional state of the persona
10962
+ */
10963
+ baseEmotion:
10964
+ | 'NEUTRAL'
10965
+ | 'CHEERFUL'
10966
+ | 'CONFUSED'
10967
+ | 'FRUSTRATED'
10968
+ | 'SKEPTICAL'
10969
+ | 'RUSHED'
10970
+ | 'DISTRACTED'
10971
+ | 'ANGRY'
10972
+ | 'ANXIOUS'
10973
+ | 'SAD';
10974
+
10975
+ /**
10976
+ * How the persona confirms information
10977
+ */
10978
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
10979
+
10980
+ /**
10981
+ * Creation timestamp
10982
+ */
10983
+ createdAt: string;
10984
+
10985
+ /**
10986
+ * Gender of the persona
10987
+ */
10988
+ gender: 'MALE' | 'FEMALE';
10989
+
10990
+ /**
10991
+ * Whether the persona uses filler words like "um" and "uh"
10992
+ */
10993
+ hasDisfluencies: boolean;
10994
+
10995
+ /**
10996
+ * Maximum number of idle messages the persona will send before giving up
10997
+ */
10998
+ idleMessageMaxSpokenCount: number;
10999
+
11000
+ /**
11001
+ * Whether the idle message counter resets when the agent speaks
11002
+ */
11003
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
11004
+
11005
+ /**
11006
+ * Messages the persona will say when the agent goes silent during a call. null =
11007
+ * "Automatic": language-appropriate defaults are used at call time.
11008
+ */
11009
+ idleMessages: Array<string> | null;
11010
+
11011
+ /**
11012
+ * Seconds of silence before the persona sends an idle message
11013
+ */
11014
+ idleTimeoutSeconds: number;
11015
+
11016
+ /**
11017
+ * How clearly the persona expresses their intentions
11018
+ */
11019
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
11020
+
11021
+ /**
11022
+ * Primary language ISO 639-1 code for the persona
11023
+ */
11024
+ language:
11025
+ | 'EN'
11026
+ | 'ES'
11027
+ | 'DE'
11028
+ | 'HI'
11029
+ | 'FR'
11030
+ | 'NL'
11031
+ | 'AR'
11032
+ | 'EL'
11033
+ | 'IT'
11034
+ | 'ID'
11035
+ | 'TH'
11036
+ | 'JA'
11037
+ | 'TL'
11038
+ | 'MS'
11039
+ | 'ZH'
11040
+ | 'TR'
11041
+ | 'PT'
11042
+ | 'HE';
11043
+
11044
+ /**
11045
+ * How reliable the persona's memory is
11046
+ */
11047
+ memoryReliability: 'HIGH' | 'LOW';
11048
+
11049
+ /**
11050
+ * The name the agent will identify as during conversations
11051
+ */
11052
+ name: string;
11053
+
11054
+ /**
11055
+ * Additional custom properties about the persona
11056
+ */
11057
+ properties: { [key: string]: unknown };
11058
+
11059
+ /**
11060
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
11061
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
11062
+ * for several seconds.
11063
+ */
11064
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
11065
+
11066
+ /**
11067
+ * Speech clarity of the persona
11068
+ */
11069
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
11070
+
11071
+ /**
11072
+ * Speech pace of the persona
11073
+ */
11074
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
11075
+
11076
+ /**
11077
+ * Languages the persona can understand. Multilingual combinations are limited by
11078
+ * multilingual speech recognition support.
11079
+ */
11080
+ understoodLanguages: Array<
11081
+ | 'EN'
11082
+ | 'ES'
11083
+ | 'DE'
11084
+ | 'HI'
11085
+ | 'FR'
11086
+ | 'NL'
11087
+ | 'AR'
11088
+ | 'EL'
11089
+ | 'IT'
11090
+ | 'ID'
11091
+ | 'TH'
11092
+ | 'JA'
11093
+ | 'TL'
11094
+ | 'MS'
11095
+ | 'ZH'
11096
+ | 'TR'
11097
+ | 'PT'
11098
+ | 'HE'
11099
+ >;
11100
+
11101
+ /**
11102
+ * Last update timestamp
11103
+ */
11104
+ updatedAt: string;
11105
+
11106
+ /**
11107
+ * Background story and behavioral patterns for the persona
11108
+ */
11109
+ backstoryPrompt?: string | null;
11110
+
11111
+ /**
11112
+ * Human-readable description of the persona
11113
+ */
11114
+ description?: string | null;
11115
+
11116
+ /**
11117
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
11118
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
11119
+ * or set null to display the name itself.
11120
+ */
11121
+ displayName?: string | null;
11122
+
11123
+ /**
11124
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
11125
+ */
11126
+ secondaryLanguage?: 'EN' | null;
11127
+ }
11128
+ }
11129
+ }
11130
+
11131
+ /**
11132
+ * A flow that leaves a voicemail. Curated by Roark, read-only.
11133
+ */
11134
+ export interface VoicemailCustomerFlow {
11135
+ id: string;
11136
+
11137
+ agentExpectations: Array<VoicemailCustomerFlow.AgentExpectation>;
11138
+
11139
+ /**
11140
+ * The agents this flow is run against.
11141
+ */
11142
+ agents: Array<VoicemailCustomerFlow.Agent>;
11143
+
11144
+ /**
11145
+ * Creation timestamp in ISO 8601 format
11146
+ */
11147
+ createdAt: string;
11148
+
11149
+ /**
11150
+ * Every other way of running this flow.
11151
+ */
11152
+ edgeCases: Array<VoicemailCustomerFlow.EdgeCase>;
11153
+
11154
+ /**
11155
+ * One voicemail greeting.
11156
+ */
11157
+ happyPath: VoicemailCustomerFlow.HappyPath | null;
11158
+
11159
+ source: 'SYSTEM' | 'CUSTOM';
11160
+
11161
+ title: string;
11162
+
11163
+ type: 'VOICEMAIL';
11164
+
11165
+ /**
11166
+ * Last update timestamp in ISO 8601 format
11167
+ */
11168
+ updatedAt: string;
11169
+
11170
+ description?: string | null;
11171
+ }
11172
+
11173
+ export namespace VoicemailCustomerFlow {
11174
+ /**
11175
+ * One thing the agent under test is graded against.
11176
+ */
11177
+ export interface AgentExpectation {
11178
+ id: string;
11179
+
11180
+ /**
11181
+ * What the agent under test is graded against.
11182
+ */
11183
+ prompt: string;
11184
+ }
11185
+
11186
+ export interface Agent {
11187
+ /**
11188
+ * Unique identifier of the agent
11189
+ */
11190
+ id: string;
11191
+
11192
+ /**
11193
+ * Creation timestamp in ISO 8601 format
11194
+ */
11195
+ createdAt: string;
11196
+
11197
+ /**
11198
+ * Custom identifier for the agent
11199
+ */
11200
+ customId: string | null;
11201
+
11202
+ /**
11203
+ * Description of the agent
11204
+ */
11205
+ description: string | null;
11206
+
11207
+ /**
11208
+ * Name of the agent
11209
+ */
11210
+ name: string;
11211
+
11212
+ /**
11213
+ * Last update timestamp in ISO 8601 format
11214
+ */
11215
+ updatedAt: string;
11216
+ }
11217
+
11218
+ /**
11219
+ * One voicemail greeting.
11220
+ */
11221
+ export interface EdgeCase {
11222
+ id: string;
11223
+
11224
+ /**
11225
+ * Graded on top of the flow's own expectations, for this variant only.
11226
+ */
11227
+ additionalExpectations: Array<EdgeCase.AdditionalExpectation>;
11228
+
11229
+ /**
11230
+ * Creation timestamp in ISO 8601 format
11231
+ */
11232
+ createdAt: string;
11233
+
11234
+ /**
11235
+ * A simulation environment: the ambient conditions a customer flow variant runs
11236
+ * under. The list includes both your own and the ones Roark curates for every
11237
+ * project.
11238
+ */
11239
+ environment: EdgeCase.Environment | null;
11240
+
11241
+ isGenerated: boolean;
11242
+
11243
+ /**
11244
+ * The persona this runs as instead of the happy path's. Null means it inherits.
11245
+ */
11246
+ personaOverride: EdgeCase.PersonaOverride | null;
11247
+
11248
+ precededByCustomerFlowId: string | null;
11249
+
11250
+ precededByCustomerFlowVariantId: string | null;
11251
+
11252
+ title: string;
11253
+
11254
+ type: 'VOICEMAIL';
11255
+
11256
+ /**
11257
+ * Last update timestamp in ISO 8601 format
11258
+ */
11259
+ updatedAt: string;
11260
+
11261
+ systemKey?: string | null;
11262
+ }
11263
+
11264
+ export namespace EdgeCase {
11265
+ /**
11266
+ * One thing the agent under test is graded against.
11267
+ */
11268
+ export interface AdditionalExpectation {
11269
+ id: string;
11270
+
11271
+ /**
11272
+ * What the agent under test is graded against.
11273
+ */
11274
+ prompt: string;
11275
+ }
11276
+
11277
+ /**
11278
+ * A simulation environment: the ambient conditions a customer flow variant runs
11279
+ * under. The list includes both your own and the ones Roark curates for every
11280
+ * project.
11281
+ */
11282
+ export interface Environment {
11283
+ id: string;
11284
+
11285
+ backgroundNoise:
11286
+ | 'NONE'
11287
+ | 'AIRPORT'
11288
+ | 'CHILDREN_PLAYING'
11289
+ | 'CITY'
11290
+ | 'COFFEE_SHOP'
11291
+ | 'DRIVING'
11292
+ | 'OFFICE'
11293
+ | 'THUNDERSTORM';
11294
+
11295
+ backgroundNoiseVolume: number;
11296
+
11297
+ /**
11298
+ * Creation timestamp in ISO 8601 format
11299
+ */
11300
+ createdAt: string;
11301
+
11302
+ name: string;
11303
+
11304
+ /**
11305
+ * Last update timestamp in ISO 8601 format
11306
+ */
11307
+ updatedAt: string;
11308
+
11309
+ description?: string | null;
11310
+ }
11311
+
11312
+ /**
11313
+ * The persona this runs as instead of the happy path's. Null means it inherits.
11314
+ */
11315
+ export interface PersonaOverride {
11316
+ /**
11317
+ * Unique identifier of the persona
11318
+ */
11319
+ id: string;
11320
+
11321
+ /**
11322
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
11323
+ * optional variants
11324
+ */
11325
+ accent:
11326
+ | 'US'
11327
+ | 'US_X_SOUTH'
11328
+ | 'GB'
11329
+ | 'ES'
11330
+ | 'DE'
11331
+ | 'IN'
11332
+ | 'FR'
11333
+ | 'NL'
11334
+ | 'SA'
11335
+ | 'GR'
11336
+ | 'AU'
11337
+ | 'IT'
11338
+ | 'ID'
11339
+ | 'TH'
11340
+ | 'JP'
11341
+ | 'NZ'
11342
+ | 'PH'
11343
+ | 'SG'
11344
+ | 'MY'
11345
+ | 'HK'
11346
+ | 'TR'
11347
+ | 'PT'
11348
+ | 'IL';
11349
+
11350
+ /**
11351
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
11352
+ * voice for are accepted; defaults to ADULT, which every accent supports.
11353
+ */
11354
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
11355
+
11356
+ /**
11357
+ * Background noise setting
11358
+ */
11359
+ backgroundNoise:
11360
+ | 'NONE'
11361
+ | 'AIRPORT'
11362
+ | 'CHILDREN_PLAYING'
11363
+ | 'CITY'
11364
+ | 'COFFEE_SHOP'
11365
+ | 'DRIVING'
11366
+ | 'OFFICE'
11367
+ | 'THUNDERSTORM';
11368
+
11369
+ /**
11370
+ * Base emotional state of the persona
11371
+ */
11372
+ baseEmotion:
11373
+ | 'NEUTRAL'
11374
+ | 'CHEERFUL'
11375
+ | 'CONFUSED'
11376
+ | 'FRUSTRATED'
11377
+ | 'SKEPTICAL'
11378
+ | 'RUSHED'
11379
+ | 'DISTRACTED'
11380
+ | 'ANGRY'
11381
+ | 'ANXIOUS'
11382
+ | 'SAD';
11383
+
11384
+ /**
11385
+ * How the persona confirms information
11386
+ */
11387
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
11388
+
11389
+ /**
11390
+ * Creation timestamp
11391
+ */
11392
+ createdAt: string;
11393
+
11394
+ /**
11395
+ * Gender of the persona
11396
+ */
11397
+ gender: 'MALE' | 'FEMALE';
11398
+
11399
+ /**
11400
+ * Whether the persona uses filler words like "um" and "uh"
11401
+ */
11402
+ hasDisfluencies: boolean;
11403
+
11404
+ /**
11405
+ * Maximum number of idle messages the persona will send before giving up
11406
+ */
11407
+ idleMessageMaxSpokenCount: number;
11408
+
11409
+ /**
11410
+ * Whether the idle message counter resets when the agent speaks
11411
+ */
11412
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
11413
+
11414
+ /**
11415
+ * Messages the persona will say when the agent goes silent during a call. null =
11416
+ * "Automatic": language-appropriate defaults are used at call time.
11417
+ */
11418
+ idleMessages: Array<string> | null;
11419
+
11420
+ /**
11421
+ * Seconds of silence before the persona sends an idle message
11422
+ */
11423
+ idleTimeoutSeconds: number;
11424
+
11425
+ /**
11426
+ * How clearly the persona expresses their intentions
11427
+ */
11428
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
11429
+
11430
+ /**
11431
+ * Primary language ISO 639-1 code for the persona
11432
+ */
11433
+ language:
11434
+ | 'EN'
11435
+ | 'ES'
11436
+ | 'DE'
11437
+ | 'HI'
11438
+ | 'FR'
11439
+ | 'NL'
11440
+ | 'AR'
11441
+ | 'EL'
11442
+ | 'IT'
11443
+ | 'ID'
11444
+ | 'TH'
11445
+ | 'JA'
11446
+ | 'TL'
11447
+ | 'MS'
11448
+ | 'ZH'
11449
+ | 'TR'
11450
+ | 'PT'
11451
+ | 'HE';
11452
+
11453
+ /**
11454
+ * How reliable the persona's memory is
11455
+ */
11456
+ memoryReliability: 'HIGH' | 'LOW';
11457
+
11458
+ /**
11459
+ * The name the agent will identify as during conversations
11460
+ */
11461
+ name: string;
11462
+
11463
+ /**
11464
+ * Additional custom properties about the persona
11465
+ */
11466
+ properties: { [key: string]: unknown };
11467
+
11468
+ /**
11469
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
11470
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
11471
+ * for several seconds.
11472
+ */
11473
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
11474
+
11475
+ /**
11476
+ * Speech clarity of the persona
11477
+ */
11478
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
11479
+
11480
+ /**
11481
+ * Speech pace of the persona
11482
+ */
11483
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
11484
+
11485
+ /**
11486
+ * Languages the persona can understand. Multilingual combinations are limited by
11487
+ * multilingual speech recognition support.
11488
+ */
11489
+ understoodLanguages: Array<
11490
+ | 'EN'
11491
+ | 'ES'
11492
+ | 'DE'
11493
+ | 'HI'
11494
+ | 'FR'
11495
+ | 'NL'
11496
+ | 'AR'
11497
+ | 'EL'
11498
+ | 'IT'
11499
+ | 'ID'
11500
+ | 'TH'
11501
+ | 'JA'
11502
+ | 'TL'
11503
+ | 'MS'
11504
+ | 'ZH'
11505
+ | 'TR'
11506
+ | 'PT'
11507
+ | 'HE'
11508
+ >;
11509
+
11510
+ /**
11511
+ * Last update timestamp
11512
+ */
11513
+ updatedAt: string;
11514
+
11515
+ /**
11516
+ * Background story and behavioral patterns for the persona
11517
+ */
11518
+ backstoryPrompt?: string | null;
11519
+
11520
+ /**
11521
+ * Human-readable description of the persona
11522
+ */
11523
+ description?: string | null;
11524
+
11525
+ /**
11526
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
11527
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
11528
+ * or set null to display the name itself.
11529
+ */
11530
+ displayName?: string | null;
11531
+
11532
+ /**
11533
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
11534
+ */
11535
+ secondaryLanguage?: 'EN' | null;
11536
+ }
11537
+ }
11538
+
11539
+ /**
11540
+ * One voicemail greeting.
11541
+ */
11542
+ export interface HappyPath {
11543
+ id: string;
11544
+
11545
+ /**
11546
+ * Graded on top of the flow's own expectations, for this variant only.
11547
+ */
11548
+ additionalExpectations: Array<HappyPath.AdditionalExpectation>;
11549
+
11550
+ /**
11551
+ * Creation timestamp in ISO 8601 format
11552
+ */
11553
+ createdAt: string;
11554
+
11555
+ /**
11556
+ * A simulation environment: the ambient conditions a customer flow variant runs
11557
+ * under. The list includes both your own and the ones Roark curates for every
11558
+ * project.
11559
+ */
11560
+ environment: HappyPath.Environment | null;
11561
+
11562
+ isGenerated: boolean;
11563
+
11564
+ /**
11565
+ * The persona this runs as instead of the happy path's. Null means it inherits.
11566
+ */
11567
+ personaOverride: HappyPath.PersonaOverride | null;
11568
+
11569
+ precededByCustomerFlowId: string | null;
11570
+
11571
+ precededByCustomerFlowVariantId: string | null;
11572
+
11573
+ title: string;
11574
+
11575
+ type: 'VOICEMAIL';
11576
+
11577
+ /**
11578
+ * Last update timestamp in ISO 8601 format
11579
+ */
11580
+ updatedAt: string;
11581
+
11582
+ systemKey?: string | null;
11583
+ }
11584
+
11585
+ export namespace HappyPath {
11586
+ /**
11587
+ * One thing the agent under test is graded against.
11588
+ */
11589
+ export interface AdditionalExpectation {
11590
+ id: string;
11591
+
11592
+ /**
11593
+ * What the agent under test is graded against.
11594
+ */
11595
+ prompt: string;
11596
+ }
11597
+
11598
+ /**
11599
+ * A simulation environment: the ambient conditions a customer flow variant runs
11600
+ * under. The list includes both your own and the ones Roark curates for every
11601
+ * project.
11602
+ */
11603
+ export interface Environment {
11604
+ id: string;
11605
+
11606
+ backgroundNoise:
11607
+ | 'NONE'
11608
+ | 'AIRPORT'
11609
+ | 'CHILDREN_PLAYING'
11610
+ | 'CITY'
11611
+ | 'COFFEE_SHOP'
11612
+ | 'DRIVING'
11613
+ | 'OFFICE'
11614
+ | 'THUNDERSTORM';
11615
+
11616
+ backgroundNoiseVolume: number;
11617
+
11618
+ /**
11619
+ * Creation timestamp in ISO 8601 format
11620
+ */
11621
+ createdAt: string;
11622
+
11623
+ name: string;
11624
+
11625
+ /**
11626
+ * Last update timestamp in ISO 8601 format
11627
+ */
11628
+ updatedAt: string;
11629
+
11630
+ description?: string | null;
11631
+ }
11632
+
11633
+ /**
11634
+ * The persona this runs as instead of the happy path's. Null means it inherits.
11635
+ */
11636
+ export interface PersonaOverride {
11637
+ /**
11638
+ * Unique identifier of the persona
11639
+ */
11640
+ id: string;
11641
+
11642
+ /**
11643
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
11644
+ * optional variants
11645
+ */
11646
+ accent:
11647
+ | 'US'
11648
+ | 'US_X_SOUTH'
11649
+ | 'GB'
11650
+ | 'ES'
11651
+ | 'DE'
11652
+ | 'IN'
11653
+ | 'FR'
11654
+ | 'NL'
11655
+ | 'SA'
11656
+ | 'GR'
11657
+ | 'AU'
11658
+ | 'IT'
11659
+ | 'ID'
11660
+ | 'TH'
11661
+ | 'JP'
11662
+ | 'NZ'
11663
+ | 'PH'
11664
+ | 'SG'
11665
+ | 'MY'
11666
+ | 'HK'
11667
+ | 'TR'
11668
+ | 'PT'
11669
+ | 'IL';
11670
+
11671
+ /**
11672
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
11673
+ * voice for are accepted; defaults to ADULT, which every accent supports.
11674
+ */
11675
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
11676
+
11677
+ /**
11678
+ * Background noise setting
11679
+ */
11680
+ backgroundNoise:
11681
+ | 'NONE'
11682
+ | 'AIRPORT'
11683
+ | 'CHILDREN_PLAYING'
11684
+ | 'CITY'
11685
+ | 'COFFEE_SHOP'
11686
+ | 'DRIVING'
11687
+ | 'OFFICE'
11688
+ | 'THUNDERSTORM';
11689
+
11690
+ /**
11691
+ * Base emotional state of the persona
11692
+ */
11693
+ baseEmotion:
11694
+ | 'NEUTRAL'
11695
+ | 'CHEERFUL'
11696
+ | 'CONFUSED'
11697
+ | 'FRUSTRATED'
11698
+ | 'SKEPTICAL'
11699
+ | 'RUSHED'
11700
+ | 'DISTRACTED'
11701
+ | 'ANGRY'
11702
+ | 'ANXIOUS'
11703
+ | 'SAD';
11704
+
11705
+ /**
11706
+ * How the persona confirms information
11707
+ */
11708
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
11709
+
11710
+ /**
11711
+ * Creation timestamp
11712
+ */
11713
+ createdAt: string;
11714
+
11715
+ /**
11716
+ * Gender of the persona
11717
+ */
11718
+ gender: 'MALE' | 'FEMALE';
11719
+
11720
+ /**
11721
+ * Whether the persona uses filler words like "um" and "uh"
11722
+ */
11723
+ hasDisfluencies: boolean;
11724
+
11725
+ /**
11726
+ * Maximum number of idle messages the persona will send before giving up
11727
+ */
11728
+ idleMessageMaxSpokenCount: number;
11729
+
11730
+ /**
11731
+ * Whether the idle message counter resets when the agent speaks
11732
+ */
11733
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
11734
+
11735
+ /**
11736
+ * Messages the persona will say when the agent goes silent during a call. null =
11737
+ * "Automatic": language-appropriate defaults are used at call time.
11738
+ */
11739
+ idleMessages: Array<string> | null;
11740
+
11741
+ /**
11742
+ * Seconds of silence before the persona sends an idle message
11743
+ */
11744
+ idleTimeoutSeconds: number;
11745
+
11746
+ /**
11747
+ * How clearly the persona expresses their intentions
11748
+ */
11749
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
11750
+
11751
+ /**
11752
+ * Primary language ISO 639-1 code for the persona
11753
+ */
11754
+ language:
11755
+ | 'EN'
11756
+ | 'ES'
11757
+ | 'DE'
11758
+ | 'HI'
11759
+ | 'FR'
11760
+ | 'NL'
11761
+ | 'AR'
11762
+ | 'EL'
11763
+ | 'IT'
11764
+ | 'ID'
11765
+ | 'TH'
11766
+ | 'JA'
11767
+ | 'TL'
11768
+ | 'MS'
11769
+ | 'ZH'
11770
+ | 'TR'
11771
+ | 'PT'
11772
+ | 'HE';
11773
+
11774
+ /**
11775
+ * How reliable the persona's memory is
11776
+ */
11777
+ memoryReliability: 'HIGH' | 'LOW';
11778
+
11779
+ /**
11780
+ * The name the agent will identify as during conversations
11781
+ */
11782
+ name: string;
11783
+
11784
+ /**
11785
+ * Additional custom properties about the persona
11786
+ */
11787
+ properties: { [key: string]: unknown };
11788
+
11789
+ /**
11790
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
11791
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
11792
+ * for several seconds.
11793
+ */
11794
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
11795
+
11796
+ /**
11797
+ * Speech clarity of the persona
11798
+ */
11799
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
11800
+
11801
+ /**
11802
+ * Speech pace of the persona
11803
+ */
11804
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
11805
+
11806
+ /**
11807
+ * Languages the persona can understand. Multilingual combinations are limited by
11808
+ * multilingual speech recognition support.
11809
+ */
11810
+ understoodLanguages: Array<
11811
+ | 'EN'
11812
+ | 'ES'
11813
+ | 'DE'
11814
+ | 'HI'
11815
+ | 'FR'
11816
+ | 'NL'
11817
+ | 'AR'
11818
+ | 'EL'
11819
+ | 'IT'
11820
+ | 'ID'
11821
+ | 'TH'
11822
+ | 'JA'
11823
+ | 'TL'
11824
+ | 'MS'
11825
+ | 'ZH'
11826
+ | 'TR'
11827
+ | 'PT'
11828
+ | 'HE'
11829
+ >;
11830
+
11831
+ /**
11832
+ * Last update timestamp
11833
+ */
11834
+ updatedAt: string;
11835
+
11836
+ /**
11837
+ * Background story and behavioral patterns for the persona
11838
+ */
11839
+ backstoryPrompt?: string | null;
11840
+
11841
+ /**
11842
+ * Human-readable description of the persona
11843
+ */
11844
+ description?: string | null;
11845
+
11846
+ /**
11847
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
11848
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
11849
+ * or set null to display the name itself.
11850
+ */
11851
+ displayName?: string | null;
11852
+
11853
+ /**
11854
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
11855
+ */
11856
+ secondaryLanguage?: 'EN' | null;
11857
+ }
11858
+ }
11859
+ }
11860
+ }
11861
+
11862
+ export interface CustomerFlowReplaceGraphResponse {
11863
+ data: CustomerFlowReplaceGraphResponse.Data;
11864
+ }
11865
+
11866
+ export namespace CustomerFlowReplaceGraphResponse {
11867
+ export interface Data {
11868
+ /**
11869
+ * The edge cases after the write.
11870
+ */
11871
+ edgeCases: Array<Data.ScriptedFlowVariant | Data.ImprovFlowVariant | Data.VoicemailFlowVariant>;
11872
+
11873
+ graph: Array<CustomerFlowAPI.FlowStep>;
11874
+
11875
+ /**
11876
+ * The way a customer flow is meant to go.
11877
+ */
11878
+ happyPath: Data.ScriptedFlowVariant | Data.ImprovFlowVariant | Data.VoicemailFlowVariant | null;
11879
+
11880
+ /**
11881
+ * True when the write changed the set of paths, so the flow's variants were
11882
+ * re-seeded and any variant id you were holding may no longer exist.
11883
+ */
11884
+ variantsReshaped: boolean;
11885
+
11886
+ warnings: Array<string>;
11887
+ }
11888
+
11889
+ export namespace Data {
11890
+ /**
11891
+ * One path through a scripted flow. The path engine owns which paths exist, so
11892
+ * editing the graph is what creates and removes these.
11893
+ */
11894
+ export interface ScriptedFlowVariant {
11895
+ id: string;
11896
+
11897
+ /**
11898
+ * Graded on top of the flow's own expectations, for this variant only.
11899
+ */
11900
+ additionalExpectations: Array<ScriptedFlowVariant.AdditionalExpectation>;
9039
11901
 
9040
11902
  /**
9041
11903
  * Creation timestamp in ISO 8601 format
@@ -9109,6 +11971,8 @@ export namespace CustomerFlowReplaceGraphResponse {
9109
11971
  | 'OFFICE'
9110
11972
  | 'THUNDERSTORM';
9111
11973
 
11974
+ backgroundNoiseVolume: number;
11975
+
9112
11976
  /**
9113
11977
  * Creation timestamp in ISO 8601 format
9114
11978
  */
@@ -9191,7 +12055,10 @@ export namespace CustomerFlowReplaceGraphResponse {
9191
12055
  | 'FRUSTRATED'
9192
12056
  | 'SKEPTICAL'
9193
12057
  | 'RUSHED'
9194
- | 'DISTRACTED';
12058
+ | 'DISTRACTED'
12059
+ | 'ANGRY'
12060
+ | 'ANXIOUS'
12061
+ | 'SAD';
9195
12062
 
9196
12063
  /**
9197
12064
  * How the persona confirms information
@@ -9279,9 +12146,10 @@ export namespace CustomerFlowReplaceGraphResponse {
9279
12146
 
9280
12147
  /**
9281
12148
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
9282
- * NORMAL, RELAXED)
12149
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
12150
+ * for several seconds.
9283
12151
  */
9284
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
12152
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
9285
12153
 
9286
12154
  /**
9287
12155
  * Speech clarity of the persona
@@ -9333,6 +12201,13 @@ export namespace CustomerFlowReplaceGraphResponse {
9333
12201
  */
9334
12202
  description?: string | null;
9335
12203
 
12204
+ /**
12205
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
12206
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
12207
+ * or set null to display the name itself.
12208
+ */
12209
+ displayName?: string | null;
12210
+
9336
12211
  /**
9337
12212
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
9338
12213
  */
@@ -9422,6 +12297,8 @@ export namespace CustomerFlowReplaceGraphResponse {
9422
12297
  | 'OFFICE'
9423
12298
  | 'THUNDERSTORM';
9424
12299
 
12300
+ backgroundNoiseVolume: number;
12301
+
9425
12302
  /**
9426
12303
  * Creation timestamp in ISO 8601 format
9427
12304
  */
@@ -9504,7 +12381,10 @@ export namespace CustomerFlowReplaceGraphResponse {
9504
12381
  | 'FRUSTRATED'
9505
12382
  | 'SKEPTICAL'
9506
12383
  | 'RUSHED'
9507
- | 'DISTRACTED';
12384
+ | 'DISTRACTED'
12385
+ | 'ANGRY'
12386
+ | 'ANXIOUS'
12387
+ | 'SAD';
9508
12388
 
9509
12389
  /**
9510
12390
  * How the persona confirms information
@@ -9592,9 +12472,10 @@ export namespace CustomerFlowReplaceGraphResponse {
9592
12472
 
9593
12473
  /**
9594
12474
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
9595
- * NORMAL, RELAXED)
12475
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
12476
+ * for several seconds.
9596
12477
  */
9597
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
12478
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
9598
12479
 
9599
12480
  /**
9600
12481
  * Speech clarity of the persona
@@ -9646,6 +12527,13 @@ export namespace CustomerFlowReplaceGraphResponse {
9646
12527
  */
9647
12528
  description?: string | null;
9648
12529
 
12530
+ /**
12531
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
12532
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
12533
+ * or set null to display the name itself.
12534
+ */
12535
+ displayName?: string | null;
12536
+
9649
12537
  /**
9650
12538
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
9651
12539
  */
@@ -9730,6 +12618,8 @@ export namespace CustomerFlowReplaceGraphResponse {
9730
12618
  | 'OFFICE'
9731
12619
  | 'THUNDERSTORM';
9732
12620
 
12621
+ backgroundNoiseVolume: number;
12622
+
9733
12623
  /**
9734
12624
  * Creation timestamp in ISO 8601 format
9735
12625
  */
@@ -9812,7 +12702,10 @@ export namespace CustomerFlowReplaceGraphResponse {
9812
12702
  | 'FRUSTRATED'
9813
12703
  | 'SKEPTICAL'
9814
12704
  | 'RUSHED'
9815
- | 'DISTRACTED';
12705
+ | 'DISTRACTED'
12706
+ | 'ANGRY'
12707
+ | 'ANXIOUS'
12708
+ | 'SAD';
9816
12709
 
9817
12710
  /**
9818
12711
  * How the persona confirms information
@@ -9900,9 +12793,10 @@ export namespace CustomerFlowReplaceGraphResponse {
9900
12793
 
9901
12794
  /**
9902
12795
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
9903
- * NORMAL, RELAXED)
12796
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
12797
+ * for several seconds.
9904
12798
  */
9905
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
12799
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
9906
12800
 
9907
12801
  /**
9908
12802
  * Speech clarity of the persona
@@ -9954,6 +12848,13 @@ export namespace CustomerFlowReplaceGraphResponse {
9954
12848
  */
9955
12849
  description?: string | null;
9956
12850
 
12851
+ /**
12852
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
12853
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
12854
+ * or set null to display the name itself.
12855
+ */
12856
+ displayName?: string | null;
12857
+
9957
12858
  /**
9958
12859
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
9959
12860
  */
@@ -10058,6 +12959,8 @@ export namespace CustomerFlowUpdateHappyPathResponse {
10058
12959
  | 'OFFICE'
10059
12960
  | 'THUNDERSTORM';
10060
12961
 
12962
+ backgroundNoiseVolume: number;
12963
+
10061
12964
  /**
10062
12965
  * Creation timestamp in ISO 8601 format
10063
12966
  */
@@ -10133,7 +13036,17 @@ export namespace CustomerFlowUpdateHappyPathResponse {
10133
13036
  /**
10134
13037
  * Base emotional state of the persona
10135
13038
  */
10136
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
13039
+ baseEmotion:
13040
+ | 'NEUTRAL'
13041
+ | 'CHEERFUL'
13042
+ | 'CONFUSED'
13043
+ | 'FRUSTRATED'
13044
+ | 'SKEPTICAL'
13045
+ | 'RUSHED'
13046
+ | 'DISTRACTED'
13047
+ | 'ANGRY'
13048
+ | 'ANXIOUS'
13049
+ | 'SAD';
10137
13050
 
10138
13051
  /**
10139
13052
  * How the persona confirms information
@@ -10221,9 +13134,10 @@ export namespace CustomerFlowUpdateHappyPathResponse {
10221
13134
 
10222
13135
  /**
10223
13136
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
10224
- * NORMAL, RELAXED)
13137
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
13138
+ * for several seconds.
10225
13139
  */
10226
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
13140
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
10227
13141
 
10228
13142
  /**
10229
13143
  * Speech clarity of the persona
@@ -10275,6 +13189,13 @@ export namespace CustomerFlowUpdateHappyPathResponse {
10275
13189
  */
10276
13190
  description?: string | null;
10277
13191
 
13192
+ /**
13193
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
13194
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
13195
+ * or set null to display the name itself.
13196
+ */
13197
+ displayName?: string | null;
13198
+
10278
13199
  /**
10279
13200
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
10280
13201
  */
@@ -10364,6 +13285,8 @@ export namespace CustomerFlowUpdateHappyPathResponse {
10364
13285
  | 'OFFICE'
10365
13286
  | 'THUNDERSTORM';
10366
13287
 
13288
+ backgroundNoiseVolume: number;
13289
+
10367
13290
  /**
10368
13291
  * Creation timestamp in ISO 8601 format
10369
13292
  */
@@ -10439,7 +13362,17 @@ export namespace CustomerFlowUpdateHappyPathResponse {
10439
13362
  /**
10440
13363
  * Base emotional state of the persona
10441
13364
  */
10442
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
13365
+ baseEmotion:
13366
+ | 'NEUTRAL'
13367
+ | 'CHEERFUL'
13368
+ | 'CONFUSED'
13369
+ | 'FRUSTRATED'
13370
+ | 'SKEPTICAL'
13371
+ | 'RUSHED'
13372
+ | 'DISTRACTED'
13373
+ | 'ANGRY'
13374
+ | 'ANXIOUS'
13375
+ | 'SAD';
10443
13376
 
10444
13377
  /**
10445
13378
  * How the persona confirms information
@@ -10527,9 +13460,10 @@ export namespace CustomerFlowUpdateHappyPathResponse {
10527
13460
 
10528
13461
  /**
10529
13462
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
10530
- * NORMAL, RELAXED)
13463
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
13464
+ * for several seconds.
10531
13465
  */
10532
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
13466
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
10533
13467
 
10534
13468
  /**
10535
13469
  * Speech clarity of the persona
@@ -10581,6 +13515,13 @@ export namespace CustomerFlowUpdateHappyPathResponse {
10581
13515
  */
10582
13516
  description?: string | null;
10583
13517
 
13518
+ /**
13519
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
13520
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
13521
+ * or set null to display the name itself.
13522
+ */
13523
+ displayName?: string | null;
13524
+
10584
13525
  /**
10585
13526
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
10586
13527
  */
@@ -10665,6 +13606,8 @@ export namespace CustomerFlowUpdateHappyPathResponse {
10665
13606
  | 'OFFICE'
10666
13607
  | 'THUNDERSTORM';
10667
13608
 
13609
+ backgroundNoiseVolume: number;
13610
+
10668
13611
  /**
10669
13612
  * Creation timestamp in ISO 8601 format
10670
13613
  */
@@ -10740,7 +13683,17 @@ export namespace CustomerFlowUpdateHappyPathResponse {
10740
13683
  /**
10741
13684
  * Base emotional state of the persona
10742
13685
  */
10743
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
13686
+ baseEmotion:
13687
+ | 'NEUTRAL'
13688
+ | 'CHEERFUL'
13689
+ | 'CONFUSED'
13690
+ | 'FRUSTRATED'
13691
+ | 'SKEPTICAL'
13692
+ | 'RUSHED'
13693
+ | 'DISTRACTED'
13694
+ | 'ANGRY'
13695
+ | 'ANXIOUS'
13696
+ | 'SAD';
10744
13697
 
10745
13698
  /**
10746
13699
  * How the persona confirms information
@@ -10828,9 +13781,10 @@ export namespace CustomerFlowUpdateHappyPathResponse {
10828
13781
 
10829
13782
  /**
10830
13783
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
10831
- * NORMAL, RELAXED)
13784
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
13785
+ * for several seconds.
10832
13786
  */
10833
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
13787
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
10834
13788
 
10835
13789
  /**
10836
13790
  * Speech clarity of the persona
@@ -10882,6 +13836,13 @@ export namespace CustomerFlowUpdateHappyPathResponse {
10882
13836
  */
10883
13837
  description?: string | null;
10884
13838
 
13839
+ /**
13840
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
13841
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
13842
+ * or set null to display the name itself.
13843
+ */
13844
+ displayName?: string | null;
13845
+
10885
13846
  /**
10886
13847
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
10887
13848
  */
@@ -10899,7 +13860,8 @@ export declare namespace CustomerFlowCreateParams {
10899
13860
  /**
10900
13861
  * The conversation, as a graph of steps. At most 100 steps across at most 25
10901
13862
  * paths. The variants come from the graph: one per path, so they are not sent
10902
- * here.
13863
+ * here. A CUSTOMER_TURN describes what the simulated customer says and the persona
13864
+ * phrases it; a CUSTOMER_VERBATIM_TURN is said word for word.
10903
13865
  */
10904
13866
  graph: Array<FlowStep>;
10905
13867
 
@@ -10925,6 +13887,31 @@ export declare namespace CustomerFlowCreateParams {
10925
13887
  branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE';
10926
13888
 
10927
13889
  description?: string | null;
13890
+
13891
+ /**
13892
+ * STRICT only. What the simulated customer does when your agent does not say the
13893
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
13894
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
13895
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
13896
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
13897
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
13898
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
13899
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
13900
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
13901
+ * AGENT_TURN step can carry its own.
13902
+ */
13903
+ offScriptPolicy?: CreateScriptedCustomerFlowInput.OffScriptPolicy | null;
13904
+
13905
+ /**
13906
+ * How closely a run follows the script. LOOSE (default) hands the whole script to
13907
+ * the simulated customer as one prompt; it keeps the call moving whatever your
13908
+ * agent says. STRICT runs the script as a state machine on the agent service: at
13909
+ * every agent step the simulated customer waits, silent, until your agent has said
13910
+ * the expected line, and only then moves on. Scripted flows only; STRICT needs the
13911
+ * agent-service transport and is not available on realtime models. (LOOSE is the
13912
+ * default.)
13913
+ */
13914
+ scriptAdherence?: 'LOOSE' | 'STRICT';
10928
13915
  }
10929
13916
 
10930
13917
  export namespace CreateScriptedCustomerFlowInput {
@@ -10934,6 +13921,30 @@ export declare namespace CustomerFlowCreateParams {
10934
13921
  */
10935
13922
  prompt: string;
10936
13923
  }
13924
+
13925
+ /**
13926
+ * STRICT only. What the simulated customer does when your agent does not say the
13927
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
13928
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
13929
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
13930
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
13931
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
13932
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
13933
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
13934
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
13935
+ * AGENT_TURN step can carry its own.
13936
+ */
13937
+ export interface OffScriptPolicy {
13938
+ maxAttempts: number;
13939
+
13940
+ reaction: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY';
13941
+
13942
+ then: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE';
13943
+
13944
+ sayLine?: string | null;
13945
+
13946
+ waitSeconds?: number | null;
13947
+ }
10937
13948
  }
10938
13949
 
10939
13950
  export interface CreateImprovCustomerFlowInput {
@@ -11037,6 +14048,31 @@ export interface CustomerFlowUpdateParams {
11037
14048
 
11038
14049
  description?: string | null;
11039
14050
 
14051
+ /**
14052
+ * STRICT only. What the simulated customer does when your agent does not say the
14053
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
14054
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
14055
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
14056
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
14057
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
14058
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
14059
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
14060
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
14061
+ * AGENT_TURN step can carry its own.
14062
+ */
14063
+ offScriptPolicy?: CustomerFlowUpdateParams.OffScriptPolicy | null;
14064
+
14065
+ /**
14066
+ * Scripted flows only. How closely a run follows the script. LOOSE (default) hands
14067
+ * the whole script to the simulated customer as one prompt; it keeps the call
14068
+ * moving whatever your agent says. STRICT runs the script as a state machine on
14069
+ * the agent service: at every agent step the simulated customer waits, silent,
14070
+ * until your agent has said the expected line, and only then moves on. Scripted
14071
+ * flows only; STRICT needs the agent-service transport and is not available on
14072
+ * realtime models.
14073
+ */
14074
+ scriptAdherence?: 'LOOSE' | 'STRICT';
14075
+
11040
14076
  title?: string;
11041
14077
  }
11042
14078
 
@@ -11047,6 +14083,30 @@ export namespace CustomerFlowUpdateParams {
11047
14083
  */
11048
14084
  prompt: string;
11049
14085
  }
14086
+
14087
+ /**
14088
+ * STRICT only. What the simulated customer does when your agent does not say the
14089
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
14090
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
14091
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
14092
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
14093
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
14094
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
14095
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
14096
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
14097
+ * AGENT_TURN step can carry its own.
14098
+ */
14099
+ export interface OffScriptPolicy {
14100
+ maxAttempts: number;
14101
+
14102
+ reaction: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY';
14103
+
14104
+ then: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE';
14105
+
14106
+ sayLine?: string | null;
14107
+
14108
+ waitSeconds?: number | null;
14109
+ }
11050
14110
  }
11051
14111
 
11052
14112
  export interface CustomerFlowListParams {
@@ -11061,6 +14121,19 @@ export interface CustomerFlowListParams {
11061
14121
  type?: 'SCRIPTED' | 'IMPROV' | 'VOICEMAIL';
11062
14122
  }
11063
14123
 
14124
+ export interface CustomerFlowDuplicateParams {
14125
+ /**
14126
+ * Agents to link on the copy. Omit to carry the source flow's agents over.
14127
+ * Required when the source is a Roark-managed flow with no agents of its own.
14128
+ */
14129
+ agentIds?: Array<string>;
14130
+
14131
+ /**
14132
+ * Title for the copy. Defaults to "Copy of" the source flow.
14133
+ */
14134
+ title?: string;
14135
+ }
14136
+
11064
14137
  export interface CustomerFlowReplaceGraphParams {
11065
14138
  /**
11066
14139
  * The complete graph. This replaces the flow's existing steps rather than merging
@@ -11117,12 +14190,14 @@ export declare namespace CustomerFlow {
11117
14190
  type CustomerFlowUpdateResponse as CustomerFlowUpdateResponse,
11118
14191
  type CustomerFlowListResponse as CustomerFlowListResponse,
11119
14192
  type CustomerFlowDeleteResponse as CustomerFlowDeleteResponse,
14193
+ type CustomerFlowDuplicateResponse as CustomerFlowDuplicateResponse,
11120
14194
  type CustomerFlowGetByIDResponse as CustomerFlowGetByIDResponse,
11121
14195
  type CustomerFlowReplaceGraphResponse as CustomerFlowReplaceGraphResponse,
11122
14196
  type CustomerFlowUpdateHappyPathResponse as CustomerFlowUpdateHappyPathResponse,
11123
14197
  type CustomerFlowCreateParams as CustomerFlowCreateParams,
11124
14198
  type CustomerFlowUpdateParams as CustomerFlowUpdateParams,
11125
14199
  type CustomerFlowListParams as CustomerFlowListParams,
14200
+ type CustomerFlowDuplicateParams as CustomerFlowDuplicateParams,
11126
14201
  type CustomerFlowReplaceGraphParams as CustomerFlowReplaceGraphParams,
11127
14202
  type CustomerFlowUpdateHappyPathParams as CustomerFlowUpdateHappyPathParams,
11128
14203
  };