@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
@@ -57,6 +57,22 @@ export declare class CustomerFlow extends APIResource {
57
57
  * ```
58
58
  */
59
59
  delete(flowID: string, options?: RequestOptions): APIPromise<CustomerFlowDeleteResponse>;
60
+ /**
61
+ * Deep-copies a flow into a new project-owned flow. The copy carries the source's
62
+ * description, branching mode, linked agents, flow-level expectations and
63
+ * flow-owned metrics. A scripted flow copies its whole step graph; an improv flow
64
+ * copies its variants (personas, briefs, expectations). Duplicating a
65
+ * Roark-managed flow is how you customise it. Voicemail flows are Roark-managed
66
+ * and cannot be duplicated.
67
+ *
68
+ * @example
69
+ * ```ts
70
+ * const response = await client.customerFlow.duplicate(
71
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
72
+ * );
73
+ * ```
74
+ */
75
+ duplicate(flowID: string, body?: CustomerFlowDuplicateParams | null | undefined, options?: RequestOptions): APIPromise<CustomerFlowDuplicateResponse>;
60
76
  /**
61
77
  * Returns a customer flow with its happy path, edge cases, expectations and linked
62
78
  * agents. Scripted flows also carry their step graph.
@@ -125,23 +141,44 @@ export declare class CustomerFlow extends APIResource {
125
141
  * step is a root wired straight from the start of the flow, so a merge target
126
142
  * parked there would also be reachable directly.
127
143
  *
144
+ * A `CUSTOMER_TURN` describes what the simulated customer says and the persona
145
+ * phrases it; a `CUSTOMER_VERBATIM_TURN` is said word for word, and one placed as
146
+ * a top-level step opens the call the moment it connects, before the agent speaks.
147
+ * `CUSTOMER_FIRST_MESSAGE` is the retired name for that opening case: still
148
+ * accepted, stored and returned as `CUSTOMER_VERBATIM_TURN`.
149
+ *
128
150
  * The two DTMF types are mirror images and both require `dtmfDigits`.
129
151
  * `CUSTOMER_DTMF` is keys the simulated caller presses while navigating your
130
152
  * agent. `AGENT_DTMF` is keys your agent under test is expected to press while
131
153
  * navigating a menu the simulation is playing, so its digits are an assertion the
132
154
  * run is graded against rather than an instruction, and it counts as an agent turn
133
155
  * for role alternation.
156
+ *
157
+ * In a STRICT flow an `AGENT_TURN` may carry its own `offScriptPolicy`, which
158
+ * replaces the flow-level one at that step. Omit it (or send null) to follow the
159
+ * flow's policy. Use it where one missed step makes the rest of the call
160
+ * meaningless: an authentication menu, say, with `then: HANG_UP_INVALIDATE`.
134
161
  */
135
- export type FlowStep = FlowStep.UnionMember0 | FlowStep.UnionMember1 | FlowStep.UnionMember2 | FlowStep.UnionMember3 | FlowStep.UnionMember4 | FlowStep.UnionMember5 | FlowStep.UnionMember6 | FlowStep.UnionMember7;
162
+ export type FlowStep = FlowStep.UnionMember0 | FlowStep.UnionMember1 | FlowStep.UnionMember2 | FlowStep.UnionMember3 | FlowStep.UnionMember4 | FlowStep.UnionMember5 | FlowStep.UnionMember6 | FlowStep.UnionMember7 | FlowStep.UnionMember8;
136
163
  export declare namespace FlowStep {
137
164
  interface UnionMember0 {
138
165
  type: 'AGENT_TURN';
139
166
  content?: string | null;
140
167
  mergeIntoNodeIds?: Array<string>;
141
168
  nodeId?: string;
169
+ offScriptPolicy?: UnionMember0.OffScriptPolicy | null;
142
170
  ref?: string;
143
171
  steps?: Array<CustomerFlowAPI.FlowStep>;
144
172
  }
173
+ namespace UnionMember0 {
174
+ interface OffScriptPolicy {
175
+ maxAttempts: number;
176
+ reaction: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY';
177
+ then: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE';
178
+ sayLine?: string | null;
179
+ waitSeconds?: number | null;
180
+ }
181
+ }
145
182
  interface UnionMember1 {
146
183
  type: 'CUSTOMER_TURN';
147
184
  content?: string | null;
@@ -159,6 +196,14 @@ export declare namespace FlowStep {
159
196
  steps?: Array<CustomerFlowAPI.FlowStep>;
160
197
  }
161
198
  interface UnionMember3 {
199
+ type: 'CUSTOMER_VERBATIM_TURN';
200
+ content?: string | null;
201
+ mergeIntoNodeIds?: Array<string>;
202
+ nodeId?: string;
203
+ ref?: string;
204
+ steps?: Array<CustomerFlowAPI.FlowStep>;
205
+ }
206
+ interface UnionMember4 {
162
207
  type: 'CUSTOMER_SILENCE';
163
208
  mergeIntoNodeIds?: Array<string>;
164
209
  nodeId?: string;
@@ -166,7 +211,7 @@ export declare namespace FlowStep {
166
211
  silenceDurationSeconds?: number | null;
167
212
  steps?: Array<CustomerFlowAPI.FlowStep>;
168
213
  }
169
- interface UnionMember4 {
214
+ interface UnionMember5 {
170
215
  type: 'CUSTOMER_DTMF';
171
216
  dtmfDigits?: string | null;
172
217
  mergeIntoNodeIds?: Array<string>;
@@ -174,7 +219,7 @@ export declare namespace FlowStep {
174
219
  ref?: string;
175
220
  steps?: Array<CustomerFlowAPI.FlowStep>;
176
221
  }
177
- interface UnionMember5 {
222
+ interface UnionMember6 {
178
223
  type: 'AGENT_DTMF';
179
224
  dtmfDigits?: string | null;
180
225
  mergeIntoNodeIds?: Array<string>;
@@ -182,14 +227,14 @@ export declare namespace FlowStep {
182
227
  ref?: string;
183
228
  steps?: Array<CustomerFlowAPI.FlowStep>;
184
229
  }
185
- interface UnionMember6 {
230
+ interface UnionMember7 {
186
231
  type: 'VOICEMAIL';
187
232
  mergeIntoNodeIds?: Array<string>;
188
233
  nodeId?: string;
189
234
  ref?: string;
190
235
  steps?: Array<CustomerFlowAPI.FlowStep>;
191
236
  }
192
- interface UnionMember7 {
237
+ interface UnionMember8 {
193
238
  type: 'SCENARIO_LINK';
194
239
  linkedCustomerFlowId?: string | null;
195
240
  linkedCustomerFlowVariantId?: string | null;
@@ -199,13 +244,1440 @@ export declare namespace FlowStep {
199
244
  steps?: Array<CustomerFlowAPI.FlowStep>;
200
245
  }
201
246
  }
202
- export interface CustomerFlowCreateResponse {
247
+ export interface CustomerFlowCreateResponse {
248
+ /**
249
+ * The conversation a simulated customer has with the agent under test.
250
+ */
251
+ data: CustomerFlowCreateResponse.ScriptedCustomerFlow | CustomerFlowCreateResponse.ImprovCustomerFlow | CustomerFlowCreateResponse.VoicemailCustomerFlow;
252
+ }
253
+ export declare namespace CustomerFlowCreateResponse {
254
+ /**
255
+ * A flow whose conversation is written out as a graph of turns.
256
+ */
257
+ interface ScriptedCustomerFlow {
258
+ id: string;
259
+ agentExpectations: Array<ScriptedCustomerFlow.AgentExpectation>;
260
+ /**
261
+ * The agents this flow is run against.
262
+ */
263
+ agents: Array<ScriptedCustomerFlow.Agent>;
264
+ /**
265
+ * How a run walks the graph. DETERMINISTIC ("Simulate every path" in the app)
266
+ * places one call per variant, each following its path exactly whatever the agent
267
+ * says. ADAPTIVE ("Adapt to your agent") collapses the paths into one call PER
268
+ * PERSONA, on which the simulated customer picks a branch from what the agent
269
+ * actually said. Both modes speak the exact authored lines, and neither changes
270
+ * how metrics or expectations grade.
271
+ */
272
+ branchingMode: 'DETERMINISTIC' | 'ADAPTIVE';
273
+ /**
274
+ * Creation timestamp in ISO 8601 format
275
+ */
276
+ createdAt: string;
277
+ /**
278
+ * Every other way of running this flow.
279
+ */
280
+ edgeCases: Array<ScriptedCustomerFlow.EdgeCase>;
281
+ /**
282
+ * One path through a scripted flow. The path engine owns which paths exist, so
283
+ * editing the graph is what creates and removes these.
284
+ */
285
+ happyPath: ScriptedCustomerFlow.HappyPath | null;
286
+ /**
287
+ * STRICT only. What the simulated customer does when your agent does not say the
288
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
289
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
290
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
291
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
292
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
293
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
294
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
295
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
296
+ * AGENT_TURN step can carry its own.
297
+ */
298
+ offScriptPolicy: ScriptedCustomerFlow.OffScriptPolicy | null;
299
+ /**
300
+ * How closely a run follows the script. LOOSE (default) hands the whole script to
301
+ * the simulated customer as one prompt; it keeps the call moving whatever your
302
+ * agent says. STRICT runs the script as a state machine on the agent service: at
303
+ * every agent step the simulated customer waits, silent, until your agent has said
304
+ * the expected line, and only then moves on. Scripted flows only; STRICT needs the
305
+ * agent-service transport and is not available on realtime models.
306
+ */
307
+ scriptAdherence: 'LOOSE' | 'STRICT';
308
+ source: 'SYSTEM' | 'CUSTOM';
309
+ title: string;
310
+ type: 'SCRIPTED';
311
+ /**
312
+ * Last update timestamp in ISO 8601 format
313
+ */
314
+ updatedAt: string;
315
+ description?: string | null;
316
+ /**
317
+ * The conversation, as a graph of steps. Present on a single flow; omitted from
318
+ * the list, where reading it would mean walking the project step graph once per
319
+ * row.
320
+ */
321
+ graph?: Array<CustomerFlowAPI.FlowStep>;
322
+ }
323
+ namespace ScriptedCustomerFlow {
324
+ /**
325
+ * One thing the agent under test is graded against.
326
+ */
327
+ interface AgentExpectation {
328
+ id: string;
329
+ /**
330
+ * What the agent under test is graded against.
331
+ */
332
+ prompt: string;
333
+ }
334
+ interface Agent {
335
+ /**
336
+ * Unique identifier of the agent
337
+ */
338
+ id: string;
339
+ /**
340
+ * Creation timestamp in ISO 8601 format
341
+ */
342
+ createdAt: string;
343
+ /**
344
+ * Custom identifier for the agent
345
+ */
346
+ customId: string | null;
347
+ /**
348
+ * Description of the agent
349
+ */
350
+ description: string | null;
351
+ /**
352
+ * Name of the agent
353
+ */
354
+ name: string;
355
+ /**
356
+ * Last update timestamp in ISO 8601 format
357
+ */
358
+ updatedAt: string;
359
+ }
360
+ /**
361
+ * One path through a scripted flow. The path engine owns which paths exist, so
362
+ * editing the graph is what creates and removes these.
363
+ */
364
+ interface EdgeCase {
365
+ id: string;
366
+ /**
367
+ * Graded on top of the flow's own expectations, for this variant only.
368
+ */
369
+ additionalExpectations: Array<EdgeCase.AdditionalExpectation>;
370
+ /**
371
+ * Creation timestamp in ISO 8601 format
372
+ */
373
+ createdAt: string;
374
+ /**
375
+ * A simulation environment: the ambient conditions a customer flow variant runs
376
+ * under. The list includes both your own and the ones Roark curates for every
377
+ * project.
378
+ */
379
+ environment: EdgeCase.Environment | null;
380
+ isGenerated: boolean;
381
+ /**
382
+ * The persona this runs as instead of the happy path's. Null means it inherits.
383
+ */
384
+ personaOverride: EdgeCase.PersonaOverride | null;
385
+ precededByCustomerFlowId: string | null;
386
+ precededByCustomerFlowVariantId: string | null;
387
+ /**
388
+ * The one path through the graph this variant runs, in order. Linear by
389
+ * construction, so these steps never nest.
390
+ */
391
+ steps: Array<CustomerFlowAPI.FlowStep>;
392
+ title: string;
393
+ type: 'SCRIPTED';
394
+ /**
395
+ * Last update timestamp in ISO 8601 format
396
+ */
397
+ updatedAt: string;
398
+ systemKey?: string | null;
399
+ }
400
+ namespace EdgeCase {
401
+ /**
402
+ * One thing the agent under test is graded against.
403
+ */
404
+ interface AdditionalExpectation {
405
+ id: string;
406
+ /**
407
+ * What the agent under test is graded against.
408
+ */
409
+ prompt: string;
410
+ }
411
+ /**
412
+ * A simulation environment: the ambient conditions a customer flow variant runs
413
+ * under. The list includes both your own and the ones Roark curates for every
414
+ * project.
415
+ */
416
+ interface Environment {
417
+ id: string;
418
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
419
+ backgroundNoiseVolume: number;
420
+ /**
421
+ * Creation timestamp in ISO 8601 format
422
+ */
423
+ createdAt: string;
424
+ name: string;
425
+ /**
426
+ * Last update timestamp in ISO 8601 format
427
+ */
428
+ updatedAt: string;
429
+ description?: string | null;
430
+ }
431
+ /**
432
+ * The persona this runs as instead of the happy path's. Null means it inherits.
433
+ */
434
+ interface PersonaOverride {
435
+ /**
436
+ * Unique identifier of the persona
437
+ */
438
+ id: string;
439
+ /**
440
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
441
+ * optional variants
442
+ */
443
+ accent: 'US' | 'US_X_SOUTH' | 'GB' | 'ES' | 'DE' | 'IN' | 'FR' | 'NL' | 'SA' | 'GR' | 'AU' | 'IT' | 'ID' | 'TH' | 'JP' | 'NZ' | 'PH' | 'SG' | 'MY' | 'HK' | 'TR' | 'PT' | 'IL';
444
+ /**
445
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
446
+ * voice for are accepted; defaults to ADULT, which every accent supports.
447
+ */
448
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
449
+ /**
450
+ * Background noise setting
451
+ */
452
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
453
+ /**
454
+ * Base emotional state of the persona
455
+ */
456
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
457
+ /**
458
+ * How the persona confirms information
459
+ */
460
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
461
+ /**
462
+ * Creation timestamp
463
+ */
464
+ createdAt: string;
465
+ /**
466
+ * Gender of the persona
467
+ */
468
+ gender: 'MALE' | 'FEMALE';
469
+ /**
470
+ * Whether the persona uses filler words like "um" and "uh"
471
+ */
472
+ hasDisfluencies: boolean;
473
+ /**
474
+ * Maximum number of idle messages the persona will send before giving up
475
+ */
476
+ idleMessageMaxSpokenCount: number;
477
+ /**
478
+ * Whether the idle message counter resets when the agent speaks
479
+ */
480
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
481
+ /**
482
+ * Messages the persona will say when the agent goes silent during a call. null =
483
+ * "Automatic": language-appropriate defaults are used at call time.
484
+ */
485
+ idleMessages: Array<string> | null;
486
+ /**
487
+ * Seconds of silence before the persona sends an idle message
488
+ */
489
+ idleTimeoutSeconds: number;
490
+ /**
491
+ * How clearly the persona expresses their intentions
492
+ */
493
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
494
+ /**
495
+ * Primary language ISO 639-1 code for the persona
496
+ */
497
+ language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE';
498
+ /**
499
+ * How reliable the persona's memory is
500
+ */
501
+ memoryReliability: 'HIGH' | 'LOW';
502
+ /**
503
+ * The name the agent will identify as during conversations
504
+ */
505
+ name: string;
506
+ /**
507
+ * Additional custom properties about the persona
508
+ */
509
+ properties: {
510
+ [key: string]: unknown;
511
+ };
512
+ /**
513
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
514
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
515
+ * for several seconds.
516
+ */
517
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
518
+ /**
519
+ * Speech clarity of the persona
520
+ */
521
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
522
+ /**
523
+ * Speech pace of the persona
524
+ */
525
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
526
+ /**
527
+ * Languages the persona can understand. Multilingual combinations are limited by
528
+ * multilingual speech recognition support.
529
+ */
530
+ understoodLanguages: Array<'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE'>;
531
+ /**
532
+ * Last update timestamp
533
+ */
534
+ updatedAt: string;
535
+ /**
536
+ * Background story and behavioral patterns for the persona
537
+ */
538
+ backstoryPrompt?: string | null;
539
+ /**
540
+ * Human-readable description of the persona
541
+ */
542
+ description?: string | null;
543
+ /**
544
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
545
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
546
+ * or set null to display the name itself.
547
+ */
548
+ displayName?: string | null;
549
+ /**
550
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
551
+ */
552
+ secondaryLanguage?: 'EN' | null;
553
+ }
554
+ }
555
+ /**
556
+ * One path through a scripted flow. The path engine owns which paths exist, so
557
+ * editing the graph is what creates and removes these.
558
+ */
559
+ interface HappyPath {
560
+ id: string;
561
+ /**
562
+ * Graded on top of the flow's own expectations, for this variant only.
563
+ */
564
+ additionalExpectations: Array<HappyPath.AdditionalExpectation>;
565
+ /**
566
+ * Creation timestamp in ISO 8601 format
567
+ */
568
+ createdAt: string;
569
+ /**
570
+ * A simulation environment: the ambient conditions a customer flow variant runs
571
+ * under. The list includes both your own and the ones Roark curates for every
572
+ * project.
573
+ */
574
+ environment: HappyPath.Environment | null;
575
+ isGenerated: boolean;
576
+ /**
577
+ * The persona this runs as instead of the happy path's. Null means it inherits.
578
+ */
579
+ personaOverride: HappyPath.PersonaOverride | null;
580
+ precededByCustomerFlowId: string | null;
581
+ precededByCustomerFlowVariantId: string | null;
582
+ /**
583
+ * The one path through the graph this variant runs, in order. Linear by
584
+ * construction, so these steps never nest.
585
+ */
586
+ steps: Array<CustomerFlowAPI.FlowStep>;
587
+ title: string;
588
+ type: 'SCRIPTED';
589
+ /**
590
+ * Last update timestamp in ISO 8601 format
591
+ */
592
+ updatedAt: string;
593
+ systemKey?: string | null;
594
+ }
595
+ namespace HappyPath {
596
+ /**
597
+ * One thing the agent under test is graded against.
598
+ */
599
+ interface AdditionalExpectation {
600
+ id: string;
601
+ /**
602
+ * What the agent under test is graded against.
603
+ */
604
+ prompt: string;
605
+ }
606
+ /**
607
+ * A simulation environment: the ambient conditions a customer flow variant runs
608
+ * under. The list includes both your own and the ones Roark curates for every
609
+ * project.
610
+ */
611
+ interface Environment {
612
+ id: string;
613
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
614
+ backgroundNoiseVolume: number;
615
+ /**
616
+ * Creation timestamp in ISO 8601 format
617
+ */
618
+ createdAt: string;
619
+ name: string;
620
+ /**
621
+ * Last update timestamp in ISO 8601 format
622
+ */
623
+ updatedAt: string;
624
+ description?: string | null;
625
+ }
626
+ /**
627
+ * The persona this runs as instead of the happy path's. Null means it inherits.
628
+ */
629
+ interface PersonaOverride {
630
+ /**
631
+ * Unique identifier of the persona
632
+ */
633
+ id: string;
634
+ /**
635
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
636
+ * optional variants
637
+ */
638
+ accent: 'US' | 'US_X_SOUTH' | 'GB' | 'ES' | 'DE' | 'IN' | 'FR' | 'NL' | 'SA' | 'GR' | 'AU' | 'IT' | 'ID' | 'TH' | 'JP' | 'NZ' | 'PH' | 'SG' | 'MY' | 'HK' | 'TR' | 'PT' | 'IL';
639
+ /**
640
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
641
+ * voice for are accepted; defaults to ADULT, which every accent supports.
642
+ */
643
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
644
+ /**
645
+ * Background noise setting
646
+ */
647
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
648
+ /**
649
+ * Base emotional state of the persona
650
+ */
651
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
652
+ /**
653
+ * How the persona confirms information
654
+ */
655
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
656
+ /**
657
+ * Creation timestamp
658
+ */
659
+ createdAt: string;
660
+ /**
661
+ * Gender of the persona
662
+ */
663
+ gender: 'MALE' | 'FEMALE';
664
+ /**
665
+ * Whether the persona uses filler words like "um" and "uh"
666
+ */
667
+ hasDisfluencies: boolean;
668
+ /**
669
+ * Maximum number of idle messages the persona will send before giving up
670
+ */
671
+ idleMessageMaxSpokenCount: number;
672
+ /**
673
+ * Whether the idle message counter resets when the agent speaks
674
+ */
675
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
676
+ /**
677
+ * Messages the persona will say when the agent goes silent during a call. null =
678
+ * "Automatic": language-appropriate defaults are used at call time.
679
+ */
680
+ idleMessages: Array<string> | null;
681
+ /**
682
+ * Seconds of silence before the persona sends an idle message
683
+ */
684
+ idleTimeoutSeconds: number;
685
+ /**
686
+ * How clearly the persona expresses their intentions
687
+ */
688
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
689
+ /**
690
+ * Primary language ISO 639-1 code for the persona
691
+ */
692
+ language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE';
693
+ /**
694
+ * How reliable the persona's memory is
695
+ */
696
+ memoryReliability: 'HIGH' | 'LOW';
697
+ /**
698
+ * The name the agent will identify as during conversations
699
+ */
700
+ name: string;
701
+ /**
702
+ * Additional custom properties about the persona
703
+ */
704
+ properties: {
705
+ [key: string]: unknown;
706
+ };
707
+ /**
708
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
709
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
710
+ * for several seconds.
711
+ */
712
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
713
+ /**
714
+ * Speech clarity of the persona
715
+ */
716
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
717
+ /**
718
+ * Speech pace of the persona
719
+ */
720
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
721
+ /**
722
+ * Languages the persona can understand. Multilingual combinations are limited by
723
+ * multilingual speech recognition support.
724
+ */
725
+ understoodLanguages: Array<'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE'>;
726
+ /**
727
+ * Last update timestamp
728
+ */
729
+ updatedAt: string;
730
+ /**
731
+ * Background story and behavioral patterns for the persona
732
+ */
733
+ backstoryPrompt?: string | null;
734
+ /**
735
+ * Human-readable description of the persona
736
+ */
737
+ description?: string | null;
738
+ /**
739
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
740
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
741
+ * or set null to display the name itself.
742
+ */
743
+ displayName?: string | null;
744
+ /**
745
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
746
+ */
747
+ secondaryLanguage?: 'EN' | null;
748
+ }
749
+ }
750
+ /**
751
+ * STRICT only. What the simulated customer does when your agent does not say the
752
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
753
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
754
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
755
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
756
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
757
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
758
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
759
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
760
+ * AGENT_TURN step can carry its own.
761
+ */
762
+ interface OffScriptPolicy {
763
+ maxAttempts: number;
764
+ reaction: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY';
765
+ then: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE';
766
+ sayLine?: string | null;
767
+ waitSeconds?: number | null;
768
+ }
769
+ }
770
+ /**
771
+ * A flow whose conversation is not written out: each variant gives the simulated
772
+ * customer a brief and lets it improvise.
773
+ */
774
+ interface ImprovCustomerFlow {
775
+ id: string;
776
+ agentExpectations: Array<ImprovCustomerFlow.AgentExpectation>;
777
+ /**
778
+ * The agents this flow is run against.
779
+ */
780
+ agents: Array<ImprovCustomerFlow.Agent>;
781
+ /**
782
+ * Creation timestamp in ISO 8601 format
783
+ */
784
+ createdAt: string;
785
+ /**
786
+ * Every other way of running this flow.
787
+ */
788
+ edgeCases: Array<ImprovCustomerFlow.EdgeCase>;
789
+ /**
790
+ * One brief to run an improv flow with.
791
+ */
792
+ happyPath: ImprovCustomerFlow.HappyPath | null;
793
+ source: 'SYSTEM' | 'CUSTOM';
794
+ title: string;
795
+ type: 'IMPROV';
796
+ /**
797
+ * Last update timestamp in ISO 8601 format
798
+ */
799
+ updatedAt: string;
800
+ description?: string | null;
801
+ }
802
+ namespace ImprovCustomerFlow {
803
+ /**
804
+ * One thing the agent under test is graded against.
805
+ */
806
+ interface AgentExpectation {
807
+ id: string;
808
+ /**
809
+ * What the agent under test is graded against.
810
+ */
811
+ prompt: string;
812
+ }
813
+ interface Agent {
814
+ /**
815
+ * Unique identifier of the agent
816
+ */
817
+ id: string;
818
+ /**
819
+ * Creation timestamp in ISO 8601 format
820
+ */
821
+ createdAt: string;
822
+ /**
823
+ * Custom identifier for the agent
824
+ */
825
+ customId: string | null;
826
+ /**
827
+ * Description of the agent
828
+ */
829
+ description: string | null;
830
+ /**
831
+ * Name of the agent
832
+ */
833
+ name: string;
834
+ /**
835
+ * Last update timestamp in ISO 8601 format
836
+ */
837
+ updatedAt: string;
838
+ }
839
+ /**
840
+ * One brief to run an improv flow with.
841
+ */
842
+ interface EdgeCase {
843
+ id: string;
844
+ /**
845
+ * Graded on top of the flow's own expectations, for this variant only.
846
+ */
847
+ additionalExpectations: Array<EdgeCase.AdditionalExpectation>;
848
+ /**
849
+ * Creation timestamp in ISO 8601 format
850
+ */
851
+ createdAt: string;
852
+ /**
853
+ * A simulation environment: the ambient conditions a customer flow variant runs
854
+ * under. The list includes both your own and the ones Roark curates for every
855
+ * project.
856
+ */
857
+ environment: EdgeCase.Environment | null;
858
+ isGenerated: boolean;
859
+ /**
860
+ * The persona this runs as instead of the happy path's. Null means it inherits.
861
+ */
862
+ personaOverride: EdgeCase.PersonaOverride | null;
863
+ precededByCustomerFlowId: string | null;
864
+ precededByCustomerFlowVariantId: string | null;
865
+ title: string;
866
+ type: 'IMPROV';
867
+ /**
868
+ * Last update timestamp in ISO 8601 format
869
+ */
870
+ updatedAt: string;
871
+ /**
872
+ * The brief the simulated customer improvises from.
873
+ */
874
+ prompt?: string | null;
875
+ systemKey?: string | null;
876
+ }
877
+ namespace EdgeCase {
878
+ /**
879
+ * One thing the agent under test is graded against.
880
+ */
881
+ interface AdditionalExpectation {
882
+ id: string;
883
+ /**
884
+ * What the agent under test is graded against.
885
+ */
886
+ prompt: string;
887
+ }
888
+ /**
889
+ * A simulation environment: the ambient conditions a customer flow variant runs
890
+ * under. The list includes both your own and the ones Roark curates for every
891
+ * project.
892
+ */
893
+ interface Environment {
894
+ id: string;
895
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
896
+ backgroundNoiseVolume: number;
897
+ /**
898
+ * Creation timestamp in ISO 8601 format
899
+ */
900
+ createdAt: string;
901
+ name: string;
902
+ /**
903
+ * Last update timestamp in ISO 8601 format
904
+ */
905
+ updatedAt: string;
906
+ description?: string | null;
907
+ }
908
+ /**
909
+ * The persona this runs as instead of the happy path's. Null means it inherits.
910
+ */
911
+ interface PersonaOverride {
912
+ /**
913
+ * Unique identifier of the persona
914
+ */
915
+ id: string;
916
+ /**
917
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
918
+ * optional variants
919
+ */
920
+ accent: 'US' | 'US_X_SOUTH' | 'GB' | 'ES' | 'DE' | 'IN' | 'FR' | 'NL' | 'SA' | 'GR' | 'AU' | 'IT' | 'ID' | 'TH' | 'JP' | 'NZ' | 'PH' | 'SG' | 'MY' | 'HK' | 'TR' | 'PT' | 'IL';
921
+ /**
922
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
923
+ * voice for are accepted; defaults to ADULT, which every accent supports.
924
+ */
925
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
926
+ /**
927
+ * Background noise setting
928
+ */
929
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
930
+ /**
931
+ * Base emotional state of the persona
932
+ */
933
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
934
+ /**
935
+ * How the persona confirms information
936
+ */
937
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
938
+ /**
939
+ * Creation timestamp
940
+ */
941
+ createdAt: string;
942
+ /**
943
+ * Gender of the persona
944
+ */
945
+ gender: 'MALE' | 'FEMALE';
946
+ /**
947
+ * Whether the persona uses filler words like "um" and "uh"
948
+ */
949
+ hasDisfluencies: boolean;
950
+ /**
951
+ * Maximum number of idle messages the persona will send before giving up
952
+ */
953
+ idleMessageMaxSpokenCount: number;
954
+ /**
955
+ * Whether the idle message counter resets when the agent speaks
956
+ */
957
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
958
+ /**
959
+ * Messages the persona will say when the agent goes silent during a call. null =
960
+ * "Automatic": language-appropriate defaults are used at call time.
961
+ */
962
+ idleMessages: Array<string> | null;
963
+ /**
964
+ * Seconds of silence before the persona sends an idle message
965
+ */
966
+ idleTimeoutSeconds: number;
967
+ /**
968
+ * How clearly the persona expresses their intentions
969
+ */
970
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
971
+ /**
972
+ * Primary language ISO 639-1 code for the persona
973
+ */
974
+ language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE';
975
+ /**
976
+ * How reliable the persona's memory is
977
+ */
978
+ memoryReliability: 'HIGH' | 'LOW';
979
+ /**
980
+ * The name the agent will identify as during conversations
981
+ */
982
+ name: string;
983
+ /**
984
+ * Additional custom properties about the persona
985
+ */
986
+ properties: {
987
+ [key: string]: unknown;
988
+ };
989
+ /**
990
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
991
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
992
+ * for several seconds.
993
+ */
994
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
995
+ /**
996
+ * Speech clarity of the persona
997
+ */
998
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
999
+ /**
1000
+ * Speech pace of the persona
1001
+ */
1002
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
1003
+ /**
1004
+ * Languages the persona can understand. Multilingual combinations are limited by
1005
+ * multilingual speech recognition support.
1006
+ */
1007
+ understoodLanguages: Array<'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE'>;
1008
+ /**
1009
+ * Last update timestamp
1010
+ */
1011
+ updatedAt: string;
1012
+ /**
1013
+ * Background story and behavioral patterns for the persona
1014
+ */
1015
+ backstoryPrompt?: string | null;
1016
+ /**
1017
+ * Human-readable description of the persona
1018
+ */
1019
+ description?: string | null;
1020
+ /**
1021
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
1022
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
1023
+ * or set null to display the name itself.
1024
+ */
1025
+ displayName?: string | null;
1026
+ /**
1027
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
1028
+ */
1029
+ secondaryLanguage?: 'EN' | null;
1030
+ }
1031
+ }
1032
+ /**
1033
+ * One brief to run an improv flow with.
1034
+ */
1035
+ interface HappyPath {
1036
+ id: string;
1037
+ /**
1038
+ * Graded on top of the flow's own expectations, for this variant only.
1039
+ */
1040
+ additionalExpectations: Array<HappyPath.AdditionalExpectation>;
1041
+ /**
1042
+ * Creation timestamp in ISO 8601 format
1043
+ */
1044
+ createdAt: string;
1045
+ /**
1046
+ * A simulation environment: the ambient conditions a customer flow variant runs
1047
+ * under. The list includes both your own and the ones Roark curates for every
1048
+ * project.
1049
+ */
1050
+ environment: HappyPath.Environment | null;
1051
+ isGenerated: boolean;
1052
+ /**
1053
+ * The persona this runs as instead of the happy path's. Null means it inherits.
1054
+ */
1055
+ personaOverride: HappyPath.PersonaOverride | null;
1056
+ precededByCustomerFlowId: string | null;
1057
+ precededByCustomerFlowVariantId: string | null;
1058
+ title: string;
1059
+ type: 'IMPROV';
1060
+ /**
1061
+ * Last update timestamp in ISO 8601 format
1062
+ */
1063
+ updatedAt: string;
1064
+ /**
1065
+ * The brief the simulated customer improvises from.
1066
+ */
1067
+ prompt?: string | null;
1068
+ systemKey?: string | null;
1069
+ }
1070
+ namespace HappyPath {
1071
+ /**
1072
+ * One thing the agent under test is graded against.
1073
+ */
1074
+ interface AdditionalExpectation {
1075
+ id: string;
1076
+ /**
1077
+ * What the agent under test is graded against.
1078
+ */
1079
+ prompt: string;
1080
+ }
1081
+ /**
1082
+ * A simulation environment: the ambient conditions a customer flow variant runs
1083
+ * under. The list includes both your own and the ones Roark curates for every
1084
+ * project.
1085
+ */
1086
+ interface Environment {
1087
+ id: string;
1088
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
1089
+ backgroundNoiseVolume: number;
1090
+ /**
1091
+ * Creation timestamp in ISO 8601 format
1092
+ */
1093
+ createdAt: string;
1094
+ name: string;
1095
+ /**
1096
+ * Last update timestamp in ISO 8601 format
1097
+ */
1098
+ updatedAt: string;
1099
+ description?: string | null;
1100
+ }
1101
+ /**
1102
+ * The persona this runs as instead of the happy path's. Null means it inherits.
1103
+ */
1104
+ interface PersonaOverride {
1105
+ /**
1106
+ * Unique identifier of the persona
1107
+ */
1108
+ id: string;
1109
+ /**
1110
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
1111
+ * optional variants
1112
+ */
1113
+ accent: 'US' | 'US_X_SOUTH' | 'GB' | 'ES' | 'DE' | 'IN' | 'FR' | 'NL' | 'SA' | 'GR' | 'AU' | 'IT' | 'ID' | 'TH' | 'JP' | 'NZ' | 'PH' | 'SG' | 'MY' | 'HK' | 'TR' | 'PT' | 'IL';
1114
+ /**
1115
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
1116
+ * voice for are accepted; defaults to ADULT, which every accent supports.
1117
+ */
1118
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
1119
+ /**
1120
+ * Background noise setting
1121
+ */
1122
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
1123
+ /**
1124
+ * Base emotional state of the persona
1125
+ */
1126
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
1127
+ /**
1128
+ * How the persona confirms information
1129
+ */
1130
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
1131
+ /**
1132
+ * Creation timestamp
1133
+ */
1134
+ createdAt: string;
1135
+ /**
1136
+ * Gender of the persona
1137
+ */
1138
+ gender: 'MALE' | 'FEMALE';
1139
+ /**
1140
+ * Whether the persona uses filler words like "um" and "uh"
1141
+ */
1142
+ hasDisfluencies: boolean;
1143
+ /**
1144
+ * Maximum number of idle messages the persona will send before giving up
1145
+ */
1146
+ idleMessageMaxSpokenCount: number;
1147
+ /**
1148
+ * Whether the idle message counter resets when the agent speaks
1149
+ */
1150
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
1151
+ /**
1152
+ * Messages the persona will say when the agent goes silent during a call. null =
1153
+ * "Automatic": language-appropriate defaults are used at call time.
1154
+ */
1155
+ idleMessages: Array<string> | null;
1156
+ /**
1157
+ * Seconds of silence before the persona sends an idle message
1158
+ */
1159
+ idleTimeoutSeconds: number;
1160
+ /**
1161
+ * How clearly the persona expresses their intentions
1162
+ */
1163
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
1164
+ /**
1165
+ * Primary language ISO 639-1 code for the persona
1166
+ */
1167
+ language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE';
1168
+ /**
1169
+ * How reliable the persona's memory is
1170
+ */
1171
+ memoryReliability: 'HIGH' | 'LOW';
1172
+ /**
1173
+ * The name the agent will identify as during conversations
1174
+ */
1175
+ name: string;
1176
+ /**
1177
+ * Additional custom properties about the persona
1178
+ */
1179
+ properties: {
1180
+ [key: string]: unknown;
1181
+ };
1182
+ /**
1183
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
1184
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
1185
+ * for several seconds.
1186
+ */
1187
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
1188
+ /**
1189
+ * Speech clarity of the persona
1190
+ */
1191
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
1192
+ /**
1193
+ * Speech pace of the persona
1194
+ */
1195
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
1196
+ /**
1197
+ * Languages the persona can understand. Multilingual combinations are limited by
1198
+ * multilingual speech recognition support.
1199
+ */
1200
+ understoodLanguages: Array<'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE'>;
1201
+ /**
1202
+ * Last update timestamp
1203
+ */
1204
+ updatedAt: string;
1205
+ /**
1206
+ * Background story and behavioral patterns for the persona
1207
+ */
1208
+ backstoryPrompt?: string | null;
1209
+ /**
1210
+ * Human-readable description of the persona
1211
+ */
1212
+ description?: string | null;
1213
+ /**
1214
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
1215
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
1216
+ * or set null to display the name itself.
1217
+ */
1218
+ displayName?: string | null;
1219
+ /**
1220
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
1221
+ */
1222
+ secondaryLanguage?: 'EN' | null;
1223
+ }
1224
+ }
1225
+ }
1226
+ /**
1227
+ * A flow that leaves a voicemail. Curated by Roark, read-only.
1228
+ */
1229
+ interface VoicemailCustomerFlow {
1230
+ id: string;
1231
+ agentExpectations: Array<VoicemailCustomerFlow.AgentExpectation>;
1232
+ /**
1233
+ * The agents this flow is run against.
1234
+ */
1235
+ agents: Array<VoicemailCustomerFlow.Agent>;
1236
+ /**
1237
+ * Creation timestamp in ISO 8601 format
1238
+ */
1239
+ createdAt: string;
1240
+ /**
1241
+ * Every other way of running this flow.
1242
+ */
1243
+ edgeCases: Array<VoicemailCustomerFlow.EdgeCase>;
1244
+ /**
1245
+ * One voicemail greeting.
1246
+ */
1247
+ happyPath: VoicemailCustomerFlow.HappyPath | null;
1248
+ source: 'SYSTEM' | 'CUSTOM';
1249
+ title: string;
1250
+ type: 'VOICEMAIL';
1251
+ /**
1252
+ * Last update timestamp in ISO 8601 format
1253
+ */
1254
+ updatedAt: string;
1255
+ description?: string | null;
1256
+ }
1257
+ namespace VoicemailCustomerFlow {
1258
+ /**
1259
+ * One thing the agent under test is graded against.
1260
+ */
1261
+ interface AgentExpectation {
1262
+ id: string;
1263
+ /**
1264
+ * What the agent under test is graded against.
1265
+ */
1266
+ prompt: string;
1267
+ }
1268
+ interface Agent {
1269
+ /**
1270
+ * Unique identifier of the agent
1271
+ */
1272
+ id: string;
1273
+ /**
1274
+ * Creation timestamp in ISO 8601 format
1275
+ */
1276
+ createdAt: string;
1277
+ /**
1278
+ * Custom identifier for the agent
1279
+ */
1280
+ customId: string | null;
1281
+ /**
1282
+ * Description of the agent
1283
+ */
1284
+ description: string | null;
1285
+ /**
1286
+ * Name of the agent
1287
+ */
1288
+ name: string;
1289
+ /**
1290
+ * Last update timestamp in ISO 8601 format
1291
+ */
1292
+ updatedAt: string;
1293
+ }
1294
+ /**
1295
+ * One voicemail greeting.
1296
+ */
1297
+ interface EdgeCase {
1298
+ id: string;
1299
+ /**
1300
+ * Graded on top of the flow's own expectations, for this variant only.
1301
+ */
1302
+ additionalExpectations: Array<EdgeCase.AdditionalExpectation>;
1303
+ /**
1304
+ * Creation timestamp in ISO 8601 format
1305
+ */
1306
+ createdAt: string;
1307
+ /**
1308
+ * A simulation environment: the ambient conditions a customer flow variant runs
1309
+ * under. The list includes both your own and the ones Roark curates for every
1310
+ * project.
1311
+ */
1312
+ environment: EdgeCase.Environment | null;
1313
+ isGenerated: boolean;
1314
+ /**
1315
+ * The persona this runs as instead of the happy path's. Null means it inherits.
1316
+ */
1317
+ personaOverride: EdgeCase.PersonaOverride | null;
1318
+ precededByCustomerFlowId: string | null;
1319
+ precededByCustomerFlowVariantId: string | null;
1320
+ title: string;
1321
+ type: 'VOICEMAIL';
1322
+ /**
1323
+ * Last update timestamp in ISO 8601 format
1324
+ */
1325
+ updatedAt: string;
1326
+ systemKey?: string | null;
1327
+ }
1328
+ namespace EdgeCase {
1329
+ /**
1330
+ * One thing the agent under test is graded against.
1331
+ */
1332
+ interface AdditionalExpectation {
1333
+ id: string;
1334
+ /**
1335
+ * What the agent under test is graded against.
1336
+ */
1337
+ prompt: string;
1338
+ }
1339
+ /**
1340
+ * A simulation environment: the ambient conditions a customer flow variant runs
1341
+ * under. The list includes both your own and the ones Roark curates for every
1342
+ * project.
1343
+ */
1344
+ interface Environment {
1345
+ id: string;
1346
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
1347
+ backgroundNoiseVolume: number;
1348
+ /**
1349
+ * Creation timestamp in ISO 8601 format
1350
+ */
1351
+ createdAt: string;
1352
+ name: string;
1353
+ /**
1354
+ * Last update timestamp in ISO 8601 format
1355
+ */
1356
+ updatedAt: string;
1357
+ description?: string | null;
1358
+ }
1359
+ /**
1360
+ * The persona this runs as instead of the happy path's. Null means it inherits.
1361
+ */
1362
+ interface PersonaOverride {
1363
+ /**
1364
+ * Unique identifier of the persona
1365
+ */
1366
+ id: string;
1367
+ /**
1368
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
1369
+ * optional variants
1370
+ */
1371
+ accent: 'US' | 'US_X_SOUTH' | 'GB' | 'ES' | 'DE' | 'IN' | 'FR' | 'NL' | 'SA' | 'GR' | 'AU' | 'IT' | 'ID' | 'TH' | 'JP' | 'NZ' | 'PH' | 'SG' | 'MY' | 'HK' | 'TR' | 'PT' | 'IL';
1372
+ /**
1373
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
1374
+ * voice for are accepted; defaults to ADULT, which every accent supports.
1375
+ */
1376
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
1377
+ /**
1378
+ * Background noise setting
1379
+ */
1380
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
1381
+ /**
1382
+ * Base emotional state of the persona
1383
+ */
1384
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
1385
+ /**
1386
+ * How the persona confirms information
1387
+ */
1388
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
1389
+ /**
1390
+ * Creation timestamp
1391
+ */
1392
+ createdAt: string;
1393
+ /**
1394
+ * Gender of the persona
1395
+ */
1396
+ gender: 'MALE' | 'FEMALE';
1397
+ /**
1398
+ * Whether the persona uses filler words like "um" and "uh"
1399
+ */
1400
+ hasDisfluencies: boolean;
1401
+ /**
1402
+ * Maximum number of idle messages the persona will send before giving up
1403
+ */
1404
+ idleMessageMaxSpokenCount: number;
1405
+ /**
1406
+ * Whether the idle message counter resets when the agent speaks
1407
+ */
1408
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
1409
+ /**
1410
+ * Messages the persona will say when the agent goes silent during a call. null =
1411
+ * "Automatic": language-appropriate defaults are used at call time.
1412
+ */
1413
+ idleMessages: Array<string> | null;
1414
+ /**
1415
+ * Seconds of silence before the persona sends an idle message
1416
+ */
1417
+ idleTimeoutSeconds: number;
1418
+ /**
1419
+ * How clearly the persona expresses their intentions
1420
+ */
1421
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
1422
+ /**
1423
+ * Primary language ISO 639-1 code for the persona
1424
+ */
1425
+ language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE';
1426
+ /**
1427
+ * How reliable the persona's memory is
1428
+ */
1429
+ memoryReliability: 'HIGH' | 'LOW';
1430
+ /**
1431
+ * The name the agent will identify as during conversations
1432
+ */
1433
+ name: string;
1434
+ /**
1435
+ * Additional custom properties about the persona
1436
+ */
1437
+ properties: {
1438
+ [key: string]: unknown;
1439
+ };
1440
+ /**
1441
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
1442
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
1443
+ * for several seconds.
1444
+ */
1445
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
1446
+ /**
1447
+ * Speech clarity of the persona
1448
+ */
1449
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
1450
+ /**
1451
+ * Speech pace of the persona
1452
+ */
1453
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
1454
+ /**
1455
+ * Languages the persona can understand. Multilingual combinations are limited by
1456
+ * multilingual speech recognition support.
1457
+ */
1458
+ understoodLanguages: Array<'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE'>;
1459
+ /**
1460
+ * Last update timestamp
1461
+ */
1462
+ updatedAt: string;
1463
+ /**
1464
+ * Background story and behavioral patterns for the persona
1465
+ */
1466
+ backstoryPrompt?: string | null;
1467
+ /**
1468
+ * Human-readable description of the persona
1469
+ */
1470
+ description?: string | null;
1471
+ /**
1472
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
1473
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
1474
+ * or set null to display the name itself.
1475
+ */
1476
+ displayName?: string | null;
1477
+ /**
1478
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
1479
+ */
1480
+ secondaryLanguage?: 'EN' | null;
1481
+ }
1482
+ }
1483
+ /**
1484
+ * One voicemail greeting.
1485
+ */
1486
+ interface HappyPath {
1487
+ id: string;
1488
+ /**
1489
+ * Graded on top of the flow's own expectations, for this variant only.
1490
+ */
1491
+ additionalExpectations: Array<HappyPath.AdditionalExpectation>;
1492
+ /**
1493
+ * Creation timestamp in ISO 8601 format
1494
+ */
1495
+ createdAt: string;
1496
+ /**
1497
+ * A simulation environment: the ambient conditions a customer flow variant runs
1498
+ * under. The list includes both your own and the ones Roark curates for every
1499
+ * project.
1500
+ */
1501
+ environment: HappyPath.Environment | null;
1502
+ isGenerated: boolean;
1503
+ /**
1504
+ * The persona this runs as instead of the happy path's. Null means it inherits.
1505
+ */
1506
+ personaOverride: HappyPath.PersonaOverride | null;
1507
+ precededByCustomerFlowId: string | null;
1508
+ precededByCustomerFlowVariantId: string | null;
1509
+ title: string;
1510
+ type: 'VOICEMAIL';
1511
+ /**
1512
+ * Last update timestamp in ISO 8601 format
1513
+ */
1514
+ updatedAt: string;
1515
+ systemKey?: string | null;
1516
+ }
1517
+ namespace HappyPath {
1518
+ /**
1519
+ * One thing the agent under test is graded against.
1520
+ */
1521
+ interface AdditionalExpectation {
1522
+ id: string;
1523
+ /**
1524
+ * What the agent under test is graded against.
1525
+ */
1526
+ prompt: string;
1527
+ }
1528
+ /**
1529
+ * A simulation environment: the ambient conditions a customer flow variant runs
1530
+ * under. The list includes both your own and the ones Roark curates for every
1531
+ * project.
1532
+ */
1533
+ interface Environment {
1534
+ id: string;
1535
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
1536
+ backgroundNoiseVolume: number;
1537
+ /**
1538
+ * Creation timestamp in ISO 8601 format
1539
+ */
1540
+ createdAt: string;
1541
+ name: string;
1542
+ /**
1543
+ * Last update timestamp in ISO 8601 format
1544
+ */
1545
+ updatedAt: string;
1546
+ description?: string | null;
1547
+ }
1548
+ /**
1549
+ * The persona this runs as instead of the happy path's. Null means it inherits.
1550
+ */
1551
+ interface PersonaOverride {
1552
+ /**
1553
+ * Unique identifier of the persona
1554
+ */
1555
+ id: string;
1556
+ /**
1557
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
1558
+ * optional variants
1559
+ */
1560
+ accent: 'US' | 'US_X_SOUTH' | 'GB' | 'ES' | 'DE' | 'IN' | 'FR' | 'NL' | 'SA' | 'GR' | 'AU' | 'IT' | 'ID' | 'TH' | 'JP' | 'NZ' | 'PH' | 'SG' | 'MY' | 'HK' | 'TR' | 'PT' | 'IL';
1561
+ /**
1562
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
1563
+ * voice for are accepted; defaults to ADULT, which every accent supports.
1564
+ */
1565
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
1566
+ /**
1567
+ * Background noise setting
1568
+ */
1569
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
1570
+ /**
1571
+ * Base emotional state of the persona
1572
+ */
1573
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
1574
+ /**
1575
+ * How the persona confirms information
1576
+ */
1577
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
1578
+ /**
1579
+ * Creation timestamp
1580
+ */
1581
+ createdAt: string;
1582
+ /**
1583
+ * Gender of the persona
1584
+ */
1585
+ gender: 'MALE' | 'FEMALE';
1586
+ /**
1587
+ * Whether the persona uses filler words like "um" and "uh"
1588
+ */
1589
+ hasDisfluencies: boolean;
1590
+ /**
1591
+ * Maximum number of idle messages the persona will send before giving up
1592
+ */
1593
+ idleMessageMaxSpokenCount: number;
1594
+ /**
1595
+ * Whether the idle message counter resets when the agent speaks
1596
+ */
1597
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
1598
+ /**
1599
+ * Messages the persona will say when the agent goes silent during a call. null =
1600
+ * "Automatic": language-appropriate defaults are used at call time.
1601
+ */
1602
+ idleMessages: Array<string> | null;
1603
+ /**
1604
+ * Seconds of silence before the persona sends an idle message
1605
+ */
1606
+ idleTimeoutSeconds: number;
1607
+ /**
1608
+ * How clearly the persona expresses their intentions
1609
+ */
1610
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
1611
+ /**
1612
+ * Primary language ISO 639-1 code for the persona
1613
+ */
1614
+ language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE';
1615
+ /**
1616
+ * How reliable the persona's memory is
1617
+ */
1618
+ memoryReliability: 'HIGH' | 'LOW';
1619
+ /**
1620
+ * The name the agent will identify as during conversations
1621
+ */
1622
+ name: string;
1623
+ /**
1624
+ * Additional custom properties about the persona
1625
+ */
1626
+ properties: {
1627
+ [key: string]: unknown;
1628
+ };
1629
+ /**
1630
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
1631
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
1632
+ * for several seconds.
1633
+ */
1634
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
1635
+ /**
1636
+ * Speech clarity of the persona
1637
+ */
1638
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
1639
+ /**
1640
+ * Speech pace of the persona
1641
+ */
1642
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
1643
+ /**
1644
+ * Languages the persona can understand. Multilingual combinations are limited by
1645
+ * multilingual speech recognition support.
1646
+ */
1647
+ understoodLanguages: Array<'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE'>;
1648
+ /**
1649
+ * Last update timestamp
1650
+ */
1651
+ updatedAt: string;
1652
+ /**
1653
+ * Background story and behavioral patterns for the persona
1654
+ */
1655
+ backstoryPrompt?: string | null;
1656
+ /**
1657
+ * Human-readable description of the persona
1658
+ */
1659
+ description?: string | null;
1660
+ /**
1661
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
1662
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
1663
+ * or set null to display the name itself.
1664
+ */
1665
+ displayName?: string | null;
1666
+ /**
1667
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
1668
+ */
1669
+ secondaryLanguage?: 'EN' | null;
1670
+ }
1671
+ }
1672
+ }
1673
+ }
1674
+ export interface CustomerFlowUpdateResponse {
203
1675
  /**
204
1676
  * The conversation a simulated customer has with the agent under test.
205
1677
  */
206
- data: CustomerFlowCreateResponse.ScriptedCustomerFlow | CustomerFlowCreateResponse.ImprovCustomerFlow | CustomerFlowCreateResponse.VoicemailCustomerFlow;
1678
+ data: CustomerFlowUpdateResponse.ScriptedCustomerFlow | CustomerFlowUpdateResponse.ImprovCustomerFlow | CustomerFlowUpdateResponse.VoicemailCustomerFlow;
207
1679
  }
208
- export declare namespace CustomerFlowCreateResponse {
1680
+ export declare namespace CustomerFlowUpdateResponse {
209
1681
  /**
210
1682
  * A flow whose conversation is written out as a graph of turns.
211
1683
  */
@@ -238,6 +1710,28 @@ export declare namespace CustomerFlowCreateResponse {
238
1710
  * editing the graph is what creates and removes these.
239
1711
  */
240
1712
  happyPath: ScriptedCustomerFlow.HappyPath | null;
1713
+ /**
1714
+ * STRICT only. What the simulated customer does when your agent does not say the
1715
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
1716
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
1717
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
1718
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
1719
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
1720
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
1721
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
1722
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
1723
+ * AGENT_TURN step can carry its own.
1724
+ */
1725
+ offScriptPolicy: ScriptedCustomerFlow.OffScriptPolicy | null;
1726
+ /**
1727
+ * How closely a run follows the script. LOOSE (default) hands the whole script to
1728
+ * the simulated customer as one prompt; it keeps the call moving whatever your
1729
+ * agent says. STRICT runs the script as a state machine on the agent service: at
1730
+ * every agent step the simulated customer waits, silent, until your agent has said
1731
+ * the expected line, and only then moves on. Scripted flows only; STRICT needs the
1732
+ * agent-service transport and is not available on realtime models.
1733
+ */
1734
+ scriptAdherence: 'LOOSE' | 'STRICT';
241
1735
  source: 'SYSTEM' | 'CUSTOM';
242
1736
  title: string;
243
1737
  type: 'SCRIPTED';
@@ -349,6 +1843,7 @@ export declare namespace CustomerFlowCreateResponse {
349
1843
  interface Environment {
350
1844
  id: string;
351
1845
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
1846
+ backgroundNoiseVolume: number;
352
1847
  /**
353
1848
  * Creation timestamp in ISO 8601 format
354
1849
  */
@@ -385,7 +1880,7 @@ export declare namespace CustomerFlowCreateResponse {
385
1880
  /**
386
1881
  * Base emotional state of the persona
387
1882
  */
388
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
1883
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
389
1884
  /**
390
1885
  * How the persona confirms information
391
1886
  */
@@ -443,9 +1938,10 @@ export declare namespace CustomerFlowCreateResponse {
443
1938
  };
444
1939
  /**
445
1940
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
446
- * NORMAL, RELAXED)
1941
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
1942
+ * for several seconds.
447
1943
  */
448
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
1944
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
449
1945
  /**
450
1946
  * Speech clarity of the persona
451
1947
  */
@@ -471,6 +1967,12 @@ export declare namespace CustomerFlowCreateResponse {
471
1967
  * Human-readable description of the persona
472
1968
  */
473
1969
  description?: string | null;
1970
+ /**
1971
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
1972
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
1973
+ * or set null to display the name itself.
1974
+ */
1975
+ displayName?: string | null;
474
1976
  /**
475
1977
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
476
1978
  */
@@ -536,6 +2038,7 @@ export declare namespace CustomerFlowCreateResponse {
536
2038
  interface Environment {
537
2039
  id: string;
538
2040
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
2041
+ backgroundNoiseVolume: number;
539
2042
  /**
540
2043
  * Creation timestamp in ISO 8601 format
541
2044
  */
@@ -572,7 +2075,7 @@ export declare namespace CustomerFlowCreateResponse {
572
2075
  /**
573
2076
  * Base emotional state of the persona
574
2077
  */
575
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
2078
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
576
2079
  /**
577
2080
  * How the persona confirms information
578
2081
  */
@@ -630,9 +2133,10 @@ export declare namespace CustomerFlowCreateResponse {
630
2133
  };
631
2134
  /**
632
2135
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
633
- * NORMAL, RELAXED)
2136
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
2137
+ * for several seconds.
634
2138
  */
635
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
2139
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
636
2140
  /**
637
2141
  * Speech clarity of the persona
638
2142
  */
@@ -658,12 +2162,37 @@ export declare namespace CustomerFlowCreateResponse {
658
2162
  * Human-readable description of the persona
659
2163
  */
660
2164
  description?: string | null;
2165
+ /**
2166
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
2167
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
2168
+ * or set null to display the name itself.
2169
+ */
2170
+ displayName?: string | null;
661
2171
  /**
662
2172
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
663
2173
  */
664
2174
  secondaryLanguage?: 'EN' | null;
665
2175
  }
666
2176
  }
2177
+ /**
2178
+ * STRICT only. What the simulated customer does when your agent does not say the
2179
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
2180
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
2181
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
2182
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
2183
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
2184
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
2185
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
2186
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
2187
+ * AGENT_TURN step can carry its own.
2188
+ */
2189
+ interface OffScriptPolicy {
2190
+ maxAttempts: number;
2191
+ reaction: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY';
2192
+ then: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE';
2193
+ sayLine?: string | null;
2194
+ waitSeconds?: number | null;
2195
+ }
667
2196
  }
668
2197
  /**
669
2198
  * A flow whose conversation is not written out: each variant gives the simulated
@@ -791,6 +2320,7 @@ export declare namespace CustomerFlowCreateResponse {
791
2320
  interface Environment {
792
2321
  id: string;
793
2322
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
2323
+ backgroundNoiseVolume: number;
794
2324
  /**
795
2325
  * Creation timestamp in ISO 8601 format
796
2326
  */
@@ -827,7 +2357,7 @@ export declare namespace CustomerFlowCreateResponse {
827
2357
  /**
828
2358
  * Base emotional state of the persona
829
2359
  */
830
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
2360
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
831
2361
  /**
832
2362
  * How the persona confirms information
833
2363
  */
@@ -885,9 +2415,10 @@ export declare namespace CustomerFlowCreateResponse {
885
2415
  };
886
2416
  /**
887
2417
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
888
- * NORMAL, RELAXED)
2418
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
2419
+ * for several seconds.
889
2420
  */
890
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
2421
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
891
2422
  /**
892
2423
  * Speech clarity of the persona
893
2424
  */
@@ -913,6 +2444,12 @@ export declare namespace CustomerFlowCreateResponse {
913
2444
  * Human-readable description of the persona
914
2445
  */
915
2446
  description?: string | null;
2447
+ /**
2448
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
2449
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
2450
+ * or set null to display the name itself.
2451
+ */
2452
+ displayName?: string | null;
916
2453
  /**
917
2454
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
918
2455
  */
@@ -976,6 +2513,7 @@ export declare namespace CustomerFlowCreateResponse {
976
2513
  interface Environment {
977
2514
  id: string;
978
2515
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
2516
+ backgroundNoiseVolume: number;
979
2517
  /**
980
2518
  * Creation timestamp in ISO 8601 format
981
2519
  */
@@ -1012,7 +2550,7 @@ export declare namespace CustomerFlowCreateResponse {
1012
2550
  /**
1013
2551
  * Base emotional state of the persona
1014
2552
  */
1015
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
2553
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
1016
2554
  /**
1017
2555
  * How the persona confirms information
1018
2556
  */
@@ -1070,9 +2608,10 @@ export declare namespace CustomerFlowCreateResponse {
1070
2608
  };
1071
2609
  /**
1072
2610
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
1073
- * NORMAL, RELAXED)
2611
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
2612
+ * for several seconds.
1074
2613
  */
1075
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
2614
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
1076
2615
  /**
1077
2616
  * Speech clarity of the persona
1078
2617
  */
@@ -1098,6 +2637,12 @@ export declare namespace CustomerFlowCreateResponse {
1098
2637
  * Human-readable description of the persona
1099
2638
  */
1100
2639
  description?: string | null;
2640
+ /**
2641
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
2642
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
2643
+ * or set null to display the name itself.
2644
+ */
2645
+ displayName?: string | null;
1101
2646
  /**
1102
2647
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
1103
2648
  */
@@ -1226,6 +2771,7 @@ export declare namespace CustomerFlowCreateResponse {
1226
2771
  interface Environment {
1227
2772
  id: string;
1228
2773
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
2774
+ backgroundNoiseVolume: number;
1229
2775
  /**
1230
2776
  * Creation timestamp in ISO 8601 format
1231
2777
  */
@@ -1262,7 +2808,7 @@ export declare namespace CustomerFlowCreateResponse {
1262
2808
  /**
1263
2809
  * Base emotional state of the persona
1264
2810
  */
1265
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
2811
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
1266
2812
  /**
1267
2813
  * How the persona confirms information
1268
2814
  */
@@ -1320,9 +2866,10 @@ export declare namespace CustomerFlowCreateResponse {
1320
2866
  };
1321
2867
  /**
1322
2868
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
1323
- * NORMAL, RELAXED)
2869
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
2870
+ * for several seconds.
1324
2871
  */
1325
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
2872
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
1326
2873
  /**
1327
2874
  * Speech clarity of the persona
1328
2875
  */
@@ -1348,6 +2895,12 @@ export declare namespace CustomerFlowCreateResponse {
1348
2895
  * Human-readable description of the persona
1349
2896
  */
1350
2897
  description?: string | null;
2898
+ /**
2899
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
2900
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
2901
+ * or set null to display the name itself.
2902
+ */
2903
+ displayName?: string | null;
1351
2904
  /**
1352
2905
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
1353
2906
  */
@@ -1407,6 +2960,7 @@ export declare namespace CustomerFlowCreateResponse {
1407
2960
  interface Environment {
1408
2961
  id: string;
1409
2962
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
2963
+ backgroundNoiseVolume: number;
1410
2964
  /**
1411
2965
  * Creation timestamp in ISO 8601 format
1412
2966
  */
@@ -1443,7 +2997,7 @@ export declare namespace CustomerFlowCreateResponse {
1443
2997
  /**
1444
2998
  * Base emotional state of the persona
1445
2999
  */
1446
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
3000
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
1447
3001
  /**
1448
3002
  * How the persona confirms information
1449
3003
  */
@@ -1501,9 +3055,10 @@ export declare namespace CustomerFlowCreateResponse {
1501
3055
  };
1502
3056
  /**
1503
3057
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
1504
- * NORMAL, RELAXED)
3058
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
3059
+ * for several seconds.
1505
3060
  */
1506
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
3061
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
1507
3062
  /**
1508
3063
  * Speech clarity of the persona
1509
3064
  */
@@ -1529,6 +3084,12 @@ export declare namespace CustomerFlowCreateResponse {
1529
3084
  * Human-readable description of the persona
1530
3085
  */
1531
3086
  description?: string | null;
3087
+ /**
3088
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
3089
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
3090
+ * or set null to display the name itself.
3091
+ */
3092
+ displayName?: string | null;
1532
3093
  /**
1533
3094
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
1534
3095
  */
@@ -1537,13 +3098,14 @@ export declare namespace CustomerFlowCreateResponse {
1537
3098
  }
1538
3099
  }
1539
3100
  }
1540
- export interface CustomerFlowUpdateResponse {
1541
- /**
1542
- * The conversation a simulated customer has with the agent under test.
1543
- */
1544
- data: CustomerFlowUpdateResponse.ScriptedCustomerFlow | CustomerFlowUpdateResponse.ImprovCustomerFlow | CustomerFlowUpdateResponse.VoicemailCustomerFlow;
3101
+ /**
3102
+ * Paginated list of customer flows
3103
+ */
3104
+ export interface CustomerFlowListResponse {
3105
+ data: Array<CustomerFlowListResponse.ScriptedCustomerFlow | CustomerFlowListResponse.ImprovCustomerFlow | CustomerFlowListResponse.VoicemailCustomerFlow>;
3106
+ pagination: CustomerFlowListResponse.Pagination;
1545
3107
  }
1546
- export declare namespace CustomerFlowUpdateResponse {
3108
+ export declare namespace CustomerFlowListResponse {
1547
3109
  /**
1548
3110
  * A flow whose conversation is written out as a graph of turns.
1549
3111
  */
@@ -1576,6 +3138,28 @@ export declare namespace CustomerFlowUpdateResponse {
1576
3138
  * editing the graph is what creates and removes these.
1577
3139
  */
1578
3140
  happyPath: ScriptedCustomerFlow.HappyPath | null;
3141
+ /**
3142
+ * STRICT only. What the simulated customer does when your agent does not say the
3143
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
3144
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
3145
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
3146
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
3147
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
3148
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
3149
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
3150
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
3151
+ * AGENT_TURN step can carry its own.
3152
+ */
3153
+ offScriptPolicy: ScriptedCustomerFlow.OffScriptPolicy | null;
3154
+ /**
3155
+ * How closely a run follows the script. LOOSE (default) hands the whole script to
3156
+ * the simulated customer as one prompt; it keeps the call moving whatever your
3157
+ * agent says. STRICT runs the script as a state machine on the agent service: at
3158
+ * every agent step the simulated customer waits, silent, until your agent has said
3159
+ * the expected line, and only then moves on. Scripted flows only; STRICT needs the
3160
+ * agent-service transport and is not available on realtime models.
3161
+ */
3162
+ scriptAdherence: 'LOOSE' | 'STRICT';
1579
3163
  source: 'SYSTEM' | 'CUSTOM';
1580
3164
  title: string;
1581
3165
  type: 'SCRIPTED';
@@ -1687,6 +3271,7 @@ export declare namespace CustomerFlowUpdateResponse {
1687
3271
  interface Environment {
1688
3272
  id: string;
1689
3273
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
3274
+ backgroundNoiseVolume: number;
1690
3275
  /**
1691
3276
  * Creation timestamp in ISO 8601 format
1692
3277
  */
@@ -1723,7 +3308,7 @@ export declare namespace CustomerFlowUpdateResponse {
1723
3308
  /**
1724
3309
  * Base emotional state of the persona
1725
3310
  */
1726
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
3311
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
1727
3312
  /**
1728
3313
  * How the persona confirms information
1729
3314
  */
@@ -1781,9 +3366,10 @@ export declare namespace CustomerFlowUpdateResponse {
1781
3366
  };
1782
3367
  /**
1783
3368
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
1784
- * NORMAL, RELAXED)
3369
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
3370
+ * for several seconds.
1785
3371
  */
1786
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
3372
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
1787
3373
  /**
1788
3374
  * Speech clarity of the persona
1789
3375
  */
@@ -1809,6 +3395,12 @@ export declare namespace CustomerFlowUpdateResponse {
1809
3395
  * Human-readable description of the persona
1810
3396
  */
1811
3397
  description?: string | null;
3398
+ /**
3399
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
3400
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
3401
+ * or set null to display the name itself.
3402
+ */
3403
+ displayName?: string | null;
1812
3404
  /**
1813
3405
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
1814
3406
  */
@@ -1874,6 +3466,7 @@ export declare namespace CustomerFlowUpdateResponse {
1874
3466
  interface Environment {
1875
3467
  id: string;
1876
3468
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
3469
+ backgroundNoiseVolume: number;
1877
3470
  /**
1878
3471
  * Creation timestamp in ISO 8601 format
1879
3472
  */
@@ -1910,7 +3503,7 @@ export declare namespace CustomerFlowUpdateResponse {
1910
3503
  /**
1911
3504
  * Base emotional state of the persona
1912
3505
  */
1913
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
3506
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
1914
3507
  /**
1915
3508
  * How the persona confirms information
1916
3509
  */
@@ -1968,9 +3561,10 @@ export declare namespace CustomerFlowUpdateResponse {
1968
3561
  };
1969
3562
  /**
1970
3563
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
1971
- * NORMAL, RELAXED)
3564
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
3565
+ * for several seconds.
1972
3566
  */
1973
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
3567
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
1974
3568
  /**
1975
3569
  * Speech clarity of the persona
1976
3570
  */
@@ -1996,12 +3590,37 @@ export declare namespace CustomerFlowUpdateResponse {
1996
3590
  * Human-readable description of the persona
1997
3591
  */
1998
3592
  description?: string | null;
3593
+ /**
3594
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
3595
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
3596
+ * or set null to display the name itself.
3597
+ */
3598
+ displayName?: string | null;
1999
3599
  /**
2000
3600
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
2001
3601
  */
2002
3602
  secondaryLanguage?: 'EN' | null;
2003
3603
  }
2004
3604
  }
3605
+ /**
3606
+ * STRICT only. What the simulated customer does when your agent does not say the
3607
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
3608
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
3609
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
3610
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
3611
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
3612
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
3613
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
3614
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
3615
+ * AGENT_TURN step can carry its own.
3616
+ */
3617
+ interface OffScriptPolicy {
3618
+ maxAttempts: number;
3619
+ reaction: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY';
3620
+ then: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE';
3621
+ sayLine?: string | null;
3622
+ waitSeconds?: number | null;
3623
+ }
2005
3624
  }
2006
3625
  /**
2007
3626
  * A flow whose conversation is not written out: each variant gives the simulated
@@ -2129,6 +3748,7 @@ export declare namespace CustomerFlowUpdateResponse {
2129
3748
  interface Environment {
2130
3749
  id: string;
2131
3750
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
3751
+ backgroundNoiseVolume: number;
2132
3752
  /**
2133
3753
  * Creation timestamp in ISO 8601 format
2134
3754
  */
@@ -2165,7 +3785,7 @@ export declare namespace CustomerFlowUpdateResponse {
2165
3785
  /**
2166
3786
  * Base emotional state of the persona
2167
3787
  */
2168
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
3788
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
2169
3789
  /**
2170
3790
  * How the persona confirms information
2171
3791
  */
@@ -2223,9 +3843,10 @@ export declare namespace CustomerFlowUpdateResponse {
2223
3843
  };
2224
3844
  /**
2225
3845
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
2226
- * NORMAL, RELAXED)
3846
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
3847
+ * for several seconds.
2227
3848
  */
2228
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
3849
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
2229
3850
  /**
2230
3851
  * Speech clarity of the persona
2231
3852
  */
@@ -2251,6 +3872,12 @@ export declare namespace CustomerFlowUpdateResponse {
2251
3872
  * Human-readable description of the persona
2252
3873
  */
2253
3874
  description?: string | null;
3875
+ /**
3876
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
3877
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
3878
+ * or set null to display the name itself.
3879
+ */
3880
+ displayName?: string | null;
2254
3881
  /**
2255
3882
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
2256
3883
  */
@@ -2314,6 +3941,7 @@ export declare namespace CustomerFlowUpdateResponse {
2314
3941
  interface Environment {
2315
3942
  id: string;
2316
3943
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
3944
+ backgroundNoiseVolume: number;
2317
3945
  /**
2318
3946
  * Creation timestamp in ISO 8601 format
2319
3947
  */
@@ -2350,7 +3978,7 @@ export declare namespace CustomerFlowUpdateResponse {
2350
3978
  /**
2351
3979
  * Base emotional state of the persona
2352
3980
  */
2353
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
3981
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
2354
3982
  /**
2355
3983
  * How the persona confirms information
2356
3984
  */
@@ -2408,9 +4036,10 @@ export declare namespace CustomerFlowUpdateResponse {
2408
4036
  };
2409
4037
  /**
2410
4038
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
2411
- * NORMAL, RELAXED)
4039
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
4040
+ * for several seconds.
2412
4041
  */
2413
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
4042
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
2414
4043
  /**
2415
4044
  * Speech clarity of the persona
2416
4045
  */
@@ -2436,6 +4065,12 @@ export declare namespace CustomerFlowUpdateResponse {
2436
4065
  * Human-readable description of the persona
2437
4066
  */
2438
4067
  description?: string | null;
4068
+ /**
4069
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
4070
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
4071
+ * or set null to display the name itself.
4072
+ */
4073
+ displayName?: string | null;
2439
4074
  /**
2440
4075
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
2441
4076
  */
@@ -2564,6 +4199,7 @@ export declare namespace CustomerFlowUpdateResponse {
2564
4199
  interface Environment {
2565
4200
  id: string;
2566
4201
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
4202
+ backgroundNoiseVolume: number;
2567
4203
  /**
2568
4204
  * Creation timestamp in ISO 8601 format
2569
4205
  */
@@ -2600,7 +4236,7 @@ export declare namespace CustomerFlowUpdateResponse {
2600
4236
  /**
2601
4237
  * Base emotional state of the persona
2602
4238
  */
2603
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
4239
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
2604
4240
  /**
2605
4241
  * How the persona confirms information
2606
4242
  */
@@ -2658,9 +4294,10 @@ export declare namespace CustomerFlowUpdateResponse {
2658
4294
  };
2659
4295
  /**
2660
4296
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
2661
- * NORMAL, RELAXED)
4297
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
4298
+ * for several seconds.
2662
4299
  */
2663
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
4300
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
2664
4301
  /**
2665
4302
  * Speech clarity of the persona
2666
4303
  */
@@ -2686,6 +4323,12 @@ export declare namespace CustomerFlowUpdateResponse {
2686
4323
  * Human-readable description of the persona
2687
4324
  */
2688
4325
  description?: string | null;
4326
+ /**
4327
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
4328
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
4329
+ * or set null to display the name itself.
4330
+ */
4331
+ displayName?: string | null;
2689
4332
  /**
2690
4333
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
2691
4334
  */
@@ -2745,6 +4388,7 @@ export declare namespace CustomerFlowUpdateResponse {
2745
4388
  interface Environment {
2746
4389
  id: string;
2747
4390
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
4391
+ backgroundNoiseVolume: number;
2748
4392
  /**
2749
4393
  * Creation timestamp in ISO 8601 format
2750
4394
  */
@@ -2781,7 +4425,7 @@ export declare namespace CustomerFlowUpdateResponse {
2781
4425
  /**
2782
4426
  * Base emotional state of the persona
2783
4427
  */
2784
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
4428
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
2785
4429
  /**
2786
4430
  * How the persona confirms information
2787
4431
  */
@@ -2839,9 +4483,10 @@ export declare namespace CustomerFlowUpdateResponse {
2839
4483
  };
2840
4484
  /**
2841
4485
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
2842
- * NORMAL, RELAXED)
4486
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
4487
+ * for several seconds.
2843
4488
  */
2844
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
4489
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
2845
4490
  /**
2846
4491
  * Speech clarity of the persona
2847
4492
  */
@@ -2867,6 +4512,12 @@ export declare namespace CustomerFlowUpdateResponse {
2867
4512
  * Human-readable description of the persona
2868
4513
  */
2869
4514
  description?: string | null;
4515
+ /**
4516
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
4517
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
4518
+ * or set null to display the name itself.
4519
+ */
4520
+ displayName?: string | null;
2870
4521
  /**
2871
4522
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
2872
4523
  */
@@ -2874,15 +4525,39 @@ export declare namespace CustomerFlowUpdateResponse {
2874
4525
  }
2875
4526
  }
2876
4527
  }
4528
+ interface Pagination {
4529
+ /**
4530
+ * Whether there are more items to fetch
4531
+ */
4532
+ hasMore: boolean;
4533
+ /**
4534
+ * Cursor for the next page of items
4535
+ */
4536
+ nextCursor: string | null;
4537
+ /**
4538
+ * Total number of items
4539
+ */
4540
+ total: number;
4541
+ }
2877
4542
  }
2878
- /**
2879
- * Paginated list of customer flows
2880
- */
2881
- export interface CustomerFlowListResponse {
2882
- data: Array<CustomerFlowListResponse.ScriptedCustomerFlow | CustomerFlowListResponse.ImprovCustomerFlow | CustomerFlowListResponse.VoicemailCustomerFlow>;
2883
- pagination: CustomerFlowListResponse.Pagination;
4543
+ export interface CustomerFlowDeleteResponse {
4544
+ data: CustomerFlowDeleteResponse.Data;
2884
4545
  }
2885
- export declare namespace CustomerFlowListResponse {
4546
+ export declare namespace CustomerFlowDeleteResponse {
4547
+ interface Data {
4548
+ /**
4549
+ * Whether the flow was deleted
4550
+ */
4551
+ deleted: boolean;
4552
+ }
4553
+ }
4554
+ export interface CustomerFlowDuplicateResponse {
4555
+ /**
4556
+ * The conversation a simulated customer has with the agent under test.
4557
+ */
4558
+ data: CustomerFlowDuplicateResponse.ScriptedCustomerFlow | CustomerFlowDuplicateResponse.ImprovCustomerFlow | CustomerFlowDuplicateResponse.VoicemailCustomerFlow;
4559
+ }
4560
+ export declare namespace CustomerFlowDuplicateResponse {
2886
4561
  /**
2887
4562
  * A flow whose conversation is written out as a graph of turns.
2888
4563
  */
@@ -2915,6 +4590,28 @@ export declare namespace CustomerFlowListResponse {
2915
4590
  * editing the graph is what creates and removes these.
2916
4591
  */
2917
4592
  happyPath: ScriptedCustomerFlow.HappyPath | null;
4593
+ /**
4594
+ * STRICT only. What the simulated customer does when your agent does not say the
4595
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
4596
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
4597
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
4598
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
4599
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
4600
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
4601
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
4602
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
4603
+ * AGENT_TURN step can carry its own.
4604
+ */
4605
+ offScriptPolicy: ScriptedCustomerFlow.OffScriptPolicy | null;
4606
+ /**
4607
+ * How closely a run follows the script. LOOSE (default) hands the whole script to
4608
+ * the simulated customer as one prompt; it keeps the call moving whatever your
4609
+ * agent says. STRICT runs the script as a state machine on the agent service: at
4610
+ * every agent step the simulated customer waits, silent, until your agent has said
4611
+ * the expected line, and only then moves on. Scripted flows only; STRICT needs the
4612
+ * agent-service transport and is not available on realtime models.
4613
+ */
4614
+ scriptAdherence: 'LOOSE' | 'STRICT';
2918
4615
  source: 'SYSTEM' | 'CUSTOM';
2919
4616
  title: string;
2920
4617
  type: 'SCRIPTED';
@@ -3026,6 +4723,7 @@ export declare namespace CustomerFlowListResponse {
3026
4723
  interface Environment {
3027
4724
  id: string;
3028
4725
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
4726
+ backgroundNoiseVolume: number;
3029
4727
  /**
3030
4728
  * Creation timestamp in ISO 8601 format
3031
4729
  */
@@ -3062,7 +4760,7 @@ export declare namespace CustomerFlowListResponse {
3062
4760
  /**
3063
4761
  * Base emotional state of the persona
3064
4762
  */
3065
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
4763
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
3066
4764
  /**
3067
4765
  * How the persona confirms information
3068
4766
  */
@@ -3120,9 +4818,10 @@ export declare namespace CustomerFlowListResponse {
3120
4818
  };
3121
4819
  /**
3122
4820
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
3123
- * NORMAL, RELAXED)
4821
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
4822
+ * for several seconds.
3124
4823
  */
3125
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
4824
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
3126
4825
  /**
3127
4826
  * Speech clarity of the persona
3128
4827
  */
@@ -3148,6 +4847,12 @@ export declare namespace CustomerFlowListResponse {
3148
4847
  * Human-readable description of the persona
3149
4848
  */
3150
4849
  description?: string | null;
4850
+ /**
4851
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
4852
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
4853
+ * or set null to display the name itself.
4854
+ */
4855
+ displayName?: string | null;
3151
4856
  /**
3152
4857
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
3153
4858
  */
@@ -3213,6 +4918,7 @@ export declare namespace CustomerFlowListResponse {
3213
4918
  interface Environment {
3214
4919
  id: string;
3215
4920
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
4921
+ backgroundNoiseVolume: number;
3216
4922
  /**
3217
4923
  * Creation timestamp in ISO 8601 format
3218
4924
  */
@@ -3249,7 +4955,7 @@ export declare namespace CustomerFlowListResponse {
3249
4955
  /**
3250
4956
  * Base emotional state of the persona
3251
4957
  */
3252
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
4958
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
3253
4959
  /**
3254
4960
  * How the persona confirms information
3255
4961
  */
@@ -3307,9 +5013,10 @@ export declare namespace CustomerFlowListResponse {
3307
5013
  };
3308
5014
  /**
3309
5015
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
3310
- * NORMAL, RELAXED)
5016
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
5017
+ * for several seconds.
3311
5018
  */
3312
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
5019
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
3313
5020
  /**
3314
5021
  * Speech clarity of the persona
3315
5022
  */
@@ -3335,12 +5042,37 @@ export declare namespace CustomerFlowListResponse {
3335
5042
  * Human-readable description of the persona
3336
5043
  */
3337
5044
  description?: string | null;
5045
+ /**
5046
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
5047
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
5048
+ * or set null to display the name itself.
5049
+ */
5050
+ displayName?: string | null;
3338
5051
  /**
3339
5052
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
3340
5053
  */
3341
5054
  secondaryLanguage?: 'EN' | null;
3342
5055
  }
3343
5056
  }
5057
+ /**
5058
+ * STRICT only. What the simulated customer does when your agent does not say the
5059
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
5060
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
5061
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
5062
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
5063
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
5064
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
5065
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
5066
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
5067
+ * AGENT_TURN step can carry its own.
5068
+ */
5069
+ interface OffScriptPolicy {
5070
+ maxAttempts: number;
5071
+ reaction: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY';
5072
+ then: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE';
5073
+ sayLine?: string | null;
5074
+ waitSeconds?: number | null;
5075
+ }
3344
5076
  }
3345
5077
  /**
3346
5078
  * A flow whose conversation is not written out: each variant gives the simulated
@@ -3468,6 +5200,7 @@ export declare namespace CustomerFlowListResponse {
3468
5200
  interface Environment {
3469
5201
  id: string;
3470
5202
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
5203
+ backgroundNoiseVolume: number;
3471
5204
  /**
3472
5205
  * Creation timestamp in ISO 8601 format
3473
5206
  */
@@ -3504,7 +5237,7 @@ export declare namespace CustomerFlowListResponse {
3504
5237
  /**
3505
5238
  * Base emotional state of the persona
3506
5239
  */
3507
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
5240
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
3508
5241
  /**
3509
5242
  * How the persona confirms information
3510
5243
  */
@@ -3562,9 +5295,10 @@ export declare namespace CustomerFlowListResponse {
3562
5295
  };
3563
5296
  /**
3564
5297
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
3565
- * NORMAL, RELAXED)
5298
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
5299
+ * for several seconds.
3566
5300
  */
3567
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
5301
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
3568
5302
  /**
3569
5303
  * Speech clarity of the persona
3570
5304
  */
@@ -3590,6 +5324,12 @@ export declare namespace CustomerFlowListResponse {
3590
5324
  * Human-readable description of the persona
3591
5325
  */
3592
5326
  description?: string | null;
5327
+ /**
5328
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
5329
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
5330
+ * or set null to display the name itself.
5331
+ */
5332
+ displayName?: string | null;
3593
5333
  /**
3594
5334
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
3595
5335
  */
@@ -3653,6 +5393,7 @@ export declare namespace CustomerFlowListResponse {
3653
5393
  interface Environment {
3654
5394
  id: string;
3655
5395
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
5396
+ backgroundNoiseVolume: number;
3656
5397
  /**
3657
5398
  * Creation timestamp in ISO 8601 format
3658
5399
  */
@@ -3689,7 +5430,7 @@ export declare namespace CustomerFlowListResponse {
3689
5430
  /**
3690
5431
  * Base emotional state of the persona
3691
5432
  */
3692
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
5433
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
3693
5434
  /**
3694
5435
  * How the persona confirms information
3695
5436
  */
@@ -3747,9 +5488,10 @@ export declare namespace CustomerFlowListResponse {
3747
5488
  };
3748
5489
  /**
3749
5490
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
3750
- * NORMAL, RELAXED)
5491
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
5492
+ * for several seconds.
3751
5493
  */
3752
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
5494
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
3753
5495
  /**
3754
5496
  * Speech clarity of the persona
3755
5497
  */
@@ -3775,6 +5517,12 @@ export declare namespace CustomerFlowListResponse {
3775
5517
  * Human-readable description of the persona
3776
5518
  */
3777
5519
  description?: string | null;
5520
+ /**
5521
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
5522
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
5523
+ * or set null to display the name itself.
5524
+ */
5525
+ displayName?: string | null;
3778
5526
  /**
3779
5527
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
3780
5528
  */
@@ -3903,6 +5651,7 @@ export declare namespace CustomerFlowListResponse {
3903
5651
  interface Environment {
3904
5652
  id: string;
3905
5653
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
5654
+ backgroundNoiseVolume: number;
3906
5655
  /**
3907
5656
  * Creation timestamp in ISO 8601 format
3908
5657
  */
@@ -3939,7 +5688,7 @@ export declare namespace CustomerFlowListResponse {
3939
5688
  /**
3940
5689
  * Base emotional state of the persona
3941
5690
  */
3942
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
5691
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
3943
5692
  /**
3944
5693
  * How the persona confirms information
3945
5694
  */
@@ -3997,9 +5746,10 @@ export declare namespace CustomerFlowListResponse {
3997
5746
  };
3998
5747
  /**
3999
5748
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
4000
- * NORMAL, RELAXED)
5749
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
5750
+ * for several seconds.
4001
5751
  */
4002
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
5752
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
4003
5753
  /**
4004
5754
  * Speech clarity of the persona
4005
5755
  */
@@ -4025,6 +5775,12 @@ export declare namespace CustomerFlowListResponse {
4025
5775
  * Human-readable description of the persona
4026
5776
  */
4027
5777
  description?: string | null;
5778
+ /**
5779
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
5780
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
5781
+ * or set null to display the name itself.
5782
+ */
5783
+ displayName?: string | null;
4028
5784
  /**
4029
5785
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
4030
5786
  */
@@ -4084,6 +5840,7 @@ export declare namespace CustomerFlowListResponse {
4084
5840
  interface Environment {
4085
5841
  id: string;
4086
5842
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
5843
+ backgroundNoiseVolume: number;
4087
5844
  /**
4088
5845
  * Creation timestamp in ISO 8601 format
4089
5846
  */
@@ -4120,7 +5877,7 @@ export declare namespace CustomerFlowListResponse {
4120
5877
  /**
4121
5878
  * Base emotional state of the persona
4122
5879
  */
4123
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
5880
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
4124
5881
  /**
4125
5882
  * How the persona confirms information
4126
5883
  */
@@ -4178,9 +5935,10 @@ export declare namespace CustomerFlowListResponse {
4178
5935
  };
4179
5936
  /**
4180
5937
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
4181
- * NORMAL, RELAXED)
5938
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
5939
+ * for several seconds.
4182
5940
  */
4183
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
5941
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
4184
5942
  /**
4185
5943
  * Speech clarity of the persona
4186
5944
  */
@@ -4206,6 +5964,12 @@ export declare namespace CustomerFlowListResponse {
4206
5964
  * Human-readable description of the persona
4207
5965
  */
4208
5966
  description?: string | null;
5967
+ /**
5968
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
5969
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
5970
+ * or set null to display the name itself.
5971
+ */
5972
+ displayName?: string | null;
4209
5973
  /**
4210
5974
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
4211
5975
  */
@@ -4213,31 +5977,6 @@ export declare namespace CustomerFlowListResponse {
4213
5977
  }
4214
5978
  }
4215
5979
  }
4216
- interface Pagination {
4217
- /**
4218
- * Whether there are more items to fetch
4219
- */
4220
- hasMore: boolean;
4221
- /**
4222
- * Cursor for the next page of items
4223
- */
4224
- nextCursor: string | null;
4225
- /**
4226
- * Total number of items
4227
- */
4228
- total: number;
4229
- }
4230
- }
4231
- export interface CustomerFlowDeleteResponse {
4232
- data: CustomerFlowDeleteResponse.Data;
4233
- }
4234
- export declare namespace CustomerFlowDeleteResponse {
4235
- interface Data {
4236
- /**
4237
- * Whether the flow was deleted
4238
- */
4239
- deleted: boolean;
4240
- }
4241
5980
  }
4242
5981
  export interface CustomerFlowGetByIDResponse {
4243
5982
  /**
@@ -4278,6 +6017,28 @@ export declare namespace CustomerFlowGetByIDResponse {
4278
6017
  * editing the graph is what creates and removes these.
4279
6018
  */
4280
6019
  happyPath: ScriptedCustomerFlow.HappyPath | null;
6020
+ /**
6021
+ * STRICT only. What the simulated customer does when your agent does not say the
6022
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
6023
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
6024
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
6025
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
6026
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
6027
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
6028
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
6029
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
6030
+ * AGENT_TURN step can carry its own.
6031
+ */
6032
+ offScriptPolicy: ScriptedCustomerFlow.OffScriptPolicy | null;
6033
+ /**
6034
+ * How closely a run follows the script. LOOSE (default) hands the whole script to
6035
+ * the simulated customer as one prompt; it keeps the call moving whatever your
6036
+ * agent says. STRICT runs the script as a state machine on the agent service: at
6037
+ * every agent step the simulated customer waits, silent, until your agent has said
6038
+ * the expected line, and only then moves on. Scripted flows only; STRICT needs the
6039
+ * agent-service transport and is not available on realtime models.
6040
+ */
6041
+ scriptAdherence: 'LOOSE' | 'STRICT';
4281
6042
  source: 'SYSTEM' | 'CUSTOM';
4282
6043
  title: string;
4283
6044
  type: 'SCRIPTED';
@@ -4389,6 +6150,7 @@ export declare namespace CustomerFlowGetByIDResponse {
4389
6150
  interface Environment {
4390
6151
  id: string;
4391
6152
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
6153
+ backgroundNoiseVolume: number;
4392
6154
  /**
4393
6155
  * Creation timestamp in ISO 8601 format
4394
6156
  */
@@ -4425,7 +6187,7 @@ export declare namespace CustomerFlowGetByIDResponse {
4425
6187
  /**
4426
6188
  * Base emotional state of the persona
4427
6189
  */
4428
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
6190
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
4429
6191
  /**
4430
6192
  * How the persona confirms information
4431
6193
  */
@@ -4483,9 +6245,10 @@ export declare namespace CustomerFlowGetByIDResponse {
4483
6245
  };
4484
6246
  /**
4485
6247
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
4486
- * NORMAL, RELAXED)
6248
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
6249
+ * for several seconds.
4487
6250
  */
4488
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
6251
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
4489
6252
  /**
4490
6253
  * Speech clarity of the persona
4491
6254
  */
@@ -4511,6 +6274,12 @@ export declare namespace CustomerFlowGetByIDResponse {
4511
6274
  * Human-readable description of the persona
4512
6275
  */
4513
6276
  description?: string | null;
6277
+ /**
6278
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
6279
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
6280
+ * or set null to display the name itself.
6281
+ */
6282
+ displayName?: string | null;
4514
6283
  /**
4515
6284
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
4516
6285
  */
@@ -4576,6 +6345,7 @@ export declare namespace CustomerFlowGetByIDResponse {
4576
6345
  interface Environment {
4577
6346
  id: string;
4578
6347
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
6348
+ backgroundNoiseVolume: number;
4579
6349
  /**
4580
6350
  * Creation timestamp in ISO 8601 format
4581
6351
  */
@@ -4612,7 +6382,7 @@ export declare namespace CustomerFlowGetByIDResponse {
4612
6382
  /**
4613
6383
  * Base emotional state of the persona
4614
6384
  */
4615
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
6385
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
4616
6386
  /**
4617
6387
  * How the persona confirms information
4618
6388
  */
@@ -4670,9 +6440,10 @@ export declare namespace CustomerFlowGetByIDResponse {
4670
6440
  };
4671
6441
  /**
4672
6442
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
4673
- * NORMAL, RELAXED)
6443
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
6444
+ * for several seconds.
4674
6445
  */
4675
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
6446
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
4676
6447
  /**
4677
6448
  * Speech clarity of the persona
4678
6449
  */
@@ -4698,12 +6469,37 @@ export declare namespace CustomerFlowGetByIDResponse {
4698
6469
  * Human-readable description of the persona
4699
6470
  */
4700
6471
  description?: string | null;
6472
+ /**
6473
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
6474
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
6475
+ * or set null to display the name itself.
6476
+ */
6477
+ displayName?: string | null;
4701
6478
  /**
4702
6479
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
4703
6480
  */
4704
6481
  secondaryLanguage?: 'EN' | null;
4705
6482
  }
4706
6483
  }
6484
+ /**
6485
+ * STRICT only. What the simulated customer does when your agent does not say the
6486
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
6487
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
6488
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
6489
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
6490
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
6491
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
6492
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
6493
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
6494
+ * AGENT_TURN step can carry its own.
6495
+ */
6496
+ interface OffScriptPolicy {
6497
+ maxAttempts: number;
6498
+ reaction: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY';
6499
+ then: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE';
6500
+ sayLine?: string | null;
6501
+ waitSeconds?: number | null;
6502
+ }
4707
6503
  }
4708
6504
  /**
4709
6505
  * A flow whose conversation is not written out: each variant gives the simulated
@@ -4831,6 +6627,7 @@ export declare namespace CustomerFlowGetByIDResponse {
4831
6627
  interface Environment {
4832
6628
  id: string;
4833
6629
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
6630
+ backgroundNoiseVolume: number;
4834
6631
  /**
4835
6632
  * Creation timestamp in ISO 8601 format
4836
6633
  */
@@ -4867,7 +6664,7 @@ export declare namespace CustomerFlowGetByIDResponse {
4867
6664
  /**
4868
6665
  * Base emotional state of the persona
4869
6666
  */
4870
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
6667
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
4871
6668
  /**
4872
6669
  * How the persona confirms information
4873
6670
  */
@@ -4925,9 +6722,10 @@ export declare namespace CustomerFlowGetByIDResponse {
4925
6722
  };
4926
6723
  /**
4927
6724
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
4928
- * NORMAL, RELAXED)
6725
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
6726
+ * for several seconds.
4929
6727
  */
4930
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
6728
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
4931
6729
  /**
4932
6730
  * Speech clarity of the persona
4933
6731
  */
@@ -4953,6 +6751,12 @@ export declare namespace CustomerFlowGetByIDResponse {
4953
6751
  * Human-readable description of the persona
4954
6752
  */
4955
6753
  description?: string | null;
6754
+ /**
6755
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
6756
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
6757
+ * or set null to display the name itself.
6758
+ */
6759
+ displayName?: string | null;
4956
6760
  /**
4957
6761
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
4958
6762
  */
@@ -5016,6 +6820,7 @@ export declare namespace CustomerFlowGetByIDResponse {
5016
6820
  interface Environment {
5017
6821
  id: string;
5018
6822
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
6823
+ backgroundNoiseVolume: number;
5019
6824
  /**
5020
6825
  * Creation timestamp in ISO 8601 format
5021
6826
  */
@@ -5052,7 +6857,7 @@ export declare namespace CustomerFlowGetByIDResponse {
5052
6857
  /**
5053
6858
  * Base emotional state of the persona
5054
6859
  */
5055
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
6860
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
5056
6861
  /**
5057
6862
  * How the persona confirms information
5058
6863
  */
@@ -5110,9 +6915,10 @@ export declare namespace CustomerFlowGetByIDResponse {
5110
6915
  };
5111
6916
  /**
5112
6917
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
5113
- * NORMAL, RELAXED)
6918
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
6919
+ * for several seconds.
5114
6920
  */
5115
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
6921
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
5116
6922
  /**
5117
6923
  * Speech clarity of the persona
5118
6924
  */
@@ -5138,6 +6944,12 @@ export declare namespace CustomerFlowGetByIDResponse {
5138
6944
  * Human-readable description of the persona
5139
6945
  */
5140
6946
  description?: string | null;
6947
+ /**
6948
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
6949
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
6950
+ * or set null to display the name itself.
6951
+ */
6952
+ displayName?: string | null;
5141
6953
  /**
5142
6954
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
5143
6955
  */
@@ -5266,6 +7078,7 @@ export declare namespace CustomerFlowGetByIDResponse {
5266
7078
  interface Environment {
5267
7079
  id: string;
5268
7080
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
7081
+ backgroundNoiseVolume: number;
5269
7082
  /**
5270
7083
  * Creation timestamp in ISO 8601 format
5271
7084
  */
@@ -5302,7 +7115,7 @@ export declare namespace CustomerFlowGetByIDResponse {
5302
7115
  /**
5303
7116
  * Base emotional state of the persona
5304
7117
  */
5305
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
7118
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
5306
7119
  /**
5307
7120
  * How the persona confirms information
5308
7121
  */
@@ -5360,9 +7173,10 @@ export declare namespace CustomerFlowGetByIDResponse {
5360
7173
  };
5361
7174
  /**
5362
7175
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
5363
- * NORMAL, RELAXED)
7176
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
7177
+ * for several seconds.
5364
7178
  */
5365
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
7179
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
5366
7180
  /**
5367
7181
  * Speech clarity of the persona
5368
7182
  */
@@ -5388,6 +7202,12 @@ export declare namespace CustomerFlowGetByIDResponse {
5388
7202
  * Human-readable description of the persona
5389
7203
  */
5390
7204
  description?: string | null;
7205
+ /**
7206
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
7207
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
7208
+ * or set null to display the name itself.
7209
+ */
7210
+ displayName?: string | null;
5391
7211
  /**
5392
7212
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
5393
7213
  */
@@ -5447,6 +7267,7 @@ export declare namespace CustomerFlowGetByIDResponse {
5447
7267
  interface Environment {
5448
7268
  id: string;
5449
7269
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
7270
+ backgroundNoiseVolume: number;
5450
7271
  /**
5451
7272
  * Creation timestamp in ISO 8601 format
5452
7273
  */
@@ -5483,7 +7304,7 @@ export declare namespace CustomerFlowGetByIDResponse {
5483
7304
  /**
5484
7305
  * Base emotional state of the persona
5485
7306
  */
5486
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
7307
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
5487
7308
  /**
5488
7309
  * How the persona confirms information
5489
7310
  */
@@ -5541,9 +7362,10 @@ export declare namespace CustomerFlowGetByIDResponse {
5541
7362
  };
5542
7363
  /**
5543
7364
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
5544
- * NORMAL, RELAXED)
7365
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
7366
+ * for several seconds.
5545
7367
  */
5546
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
7368
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
5547
7369
  /**
5548
7370
  * Speech clarity of the persona
5549
7371
  */
@@ -5569,6 +7391,12 @@ export declare namespace CustomerFlowGetByIDResponse {
5569
7391
  * Human-readable description of the persona
5570
7392
  */
5571
7393
  description?: string | null;
7394
+ /**
7395
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
7396
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
7397
+ * or set null to display the name itself.
7398
+ */
7399
+ displayName?: string | null;
5572
7400
  /**
5573
7401
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
5574
7402
  */
@@ -5658,6 +7486,7 @@ export declare namespace CustomerFlowReplaceGraphResponse {
5658
7486
  interface Environment {
5659
7487
  id: string;
5660
7488
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
7489
+ backgroundNoiseVolume: number;
5661
7490
  /**
5662
7491
  * Creation timestamp in ISO 8601 format
5663
7492
  */
@@ -5694,7 +7523,7 @@ export declare namespace CustomerFlowReplaceGraphResponse {
5694
7523
  /**
5695
7524
  * Base emotional state of the persona
5696
7525
  */
5697
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
7526
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
5698
7527
  /**
5699
7528
  * How the persona confirms information
5700
7529
  */
@@ -5752,9 +7581,10 @@ export declare namespace CustomerFlowReplaceGraphResponse {
5752
7581
  };
5753
7582
  /**
5754
7583
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
5755
- * NORMAL, RELAXED)
7584
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
7585
+ * for several seconds.
5756
7586
  */
5757
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
7587
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
5758
7588
  /**
5759
7589
  * Speech clarity of the persona
5760
7590
  */
@@ -5780,6 +7610,12 @@ export declare namespace CustomerFlowReplaceGraphResponse {
5780
7610
  * Human-readable description of the persona
5781
7611
  */
5782
7612
  description?: string | null;
7613
+ /**
7614
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
7615
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
7616
+ * or set null to display the name itself.
7617
+ */
7618
+ displayName?: string | null;
5783
7619
  /**
5784
7620
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
5785
7621
  */
@@ -5843,6 +7679,7 @@ export declare namespace CustomerFlowReplaceGraphResponse {
5843
7679
  interface Environment {
5844
7680
  id: string;
5845
7681
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
7682
+ backgroundNoiseVolume: number;
5846
7683
  /**
5847
7684
  * Creation timestamp in ISO 8601 format
5848
7685
  */
@@ -5879,7 +7716,7 @@ export declare namespace CustomerFlowReplaceGraphResponse {
5879
7716
  /**
5880
7717
  * Base emotional state of the persona
5881
7718
  */
5882
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
7719
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
5883
7720
  /**
5884
7721
  * How the persona confirms information
5885
7722
  */
@@ -5937,9 +7774,10 @@ export declare namespace CustomerFlowReplaceGraphResponse {
5937
7774
  };
5938
7775
  /**
5939
7776
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
5940
- * NORMAL, RELAXED)
7777
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
7778
+ * for several seconds.
5941
7779
  */
5942
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
7780
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
5943
7781
  /**
5944
7782
  * Speech clarity of the persona
5945
7783
  */
@@ -5965,6 +7803,12 @@ export declare namespace CustomerFlowReplaceGraphResponse {
5965
7803
  * Human-readable description of the persona
5966
7804
  */
5967
7805
  description?: string | null;
7806
+ /**
7807
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
7808
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
7809
+ * or set null to display the name itself.
7810
+ */
7811
+ displayName?: string | null;
5968
7812
  /**
5969
7813
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
5970
7814
  */
@@ -6024,6 +7868,7 @@ export declare namespace CustomerFlowReplaceGraphResponse {
6024
7868
  interface Environment {
6025
7869
  id: string;
6026
7870
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
7871
+ backgroundNoiseVolume: number;
6027
7872
  /**
6028
7873
  * Creation timestamp in ISO 8601 format
6029
7874
  */
@@ -6060,7 +7905,7 @@ export declare namespace CustomerFlowReplaceGraphResponse {
6060
7905
  /**
6061
7906
  * Base emotional state of the persona
6062
7907
  */
6063
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
7908
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
6064
7909
  /**
6065
7910
  * How the persona confirms information
6066
7911
  */
@@ -6118,9 +7963,10 @@ export declare namespace CustomerFlowReplaceGraphResponse {
6118
7963
  };
6119
7964
  /**
6120
7965
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
6121
- * NORMAL, RELAXED)
7966
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
7967
+ * for several seconds.
6122
7968
  */
6123
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
7969
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
6124
7970
  /**
6125
7971
  * Speech clarity of the persona
6126
7972
  */
@@ -6146,6 +7992,12 @@ export declare namespace CustomerFlowReplaceGraphResponse {
6146
7992
  * Human-readable description of the persona
6147
7993
  */
6148
7994
  description?: string | null;
7995
+ /**
7996
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
7997
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
7998
+ * or set null to display the name itself.
7999
+ */
8000
+ displayName?: string | null;
6149
8001
  /**
6150
8002
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
6151
8003
  */
@@ -6220,6 +8072,7 @@ export declare namespace CustomerFlowUpdateHappyPathResponse {
6220
8072
  interface Environment {
6221
8073
  id: string;
6222
8074
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
8075
+ backgroundNoiseVolume: number;
6223
8076
  /**
6224
8077
  * Creation timestamp in ISO 8601 format
6225
8078
  */
@@ -6256,7 +8109,7 @@ export declare namespace CustomerFlowUpdateHappyPathResponse {
6256
8109
  /**
6257
8110
  * Base emotional state of the persona
6258
8111
  */
6259
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
8112
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
6260
8113
  /**
6261
8114
  * How the persona confirms information
6262
8115
  */
@@ -6314,9 +8167,10 @@ export declare namespace CustomerFlowUpdateHappyPathResponse {
6314
8167
  };
6315
8168
  /**
6316
8169
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
6317
- * NORMAL, RELAXED)
8170
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
8171
+ * for several seconds.
6318
8172
  */
6319
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
8173
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
6320
8174
  /**
6321
8175
  * Speech clarity of the persona
6322
8176
  */
@@ -6342,6 +8196,12 @@ export declare namespace CustomerFlowUpdateHappyPathResponse {
6342
8196
  * Human-readable description of the persona
6343
8197
  */
6344
8198
  description?: string | null;
8199
+ /**
8200
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
8201
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
8202
+ * or set null to display the name itself.
8203
+ */
8204
+ displayName?: string | null;
6345
8205
  /**
6346
8206
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
6347
8207
  */
@@ -6405,6 +8265,7 @@ export declare namespace CustomerFlowUpdateHappyPathResponse {
6405
8265
  interface Environment {
6406
8266
  id: string;
6407
8267
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
8268
+ backgroundNoiseVolume: number;
6408
8269
  /**
6409
8270
  * Creation timestamp in ISO 8601 format
6410
8271
  */
@@ -6441,7 +8302,7 @@ export declare namespace CustomerFlowUpdateHappyPathResponse {
6441
8302
  /**
6442
8303
  * Base emotional state of the persona
6443
8304
  */
6444
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
8305
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
6445
8306
  /**
6446
8307
  * How the persona confirms information
6447
8308
  */
@@ -6499,9 +8360,10 @@ export declare namespace CustomerFlowUpdateHappyPathResponse {
6499
8360
  };
6500
8361
  /**
6501
8362
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
6502
- * NORMAL, RELAXED)
8363
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
8364
+ * for several seconds.
6503
8365
  */
6504
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
8366
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
6505
8367
  /**
6506
8368
  * Speech clarity of the persona
6507
8369
  */
@@ -6527,6 +8389,12 @@ export declare namespace CustomerFlowUpdateHappyPathResponse {
6527
8389
  * Human-readable description of the persona
6528
8390
  */
6529
8391
  description?: string | null;
8392
+ /**
8393
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
8394
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
8395
+ * or set null to display the name itself.
8396
+ */
8397
+ displayName?: string | null;
6530
8398
  /**
6531
8399
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
6532
8400
  */
@@ -6586,6 +8454,7 @@ export declare namespace CustomerFlowUpdateHappyPathResponse {
6586
8454
  interface Environment {
6587
8455
  id: string;
6588
8456
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'DRIVING' | 'OFFICE' | 'THUNDERSTORM';
8457
+ backgroundNoiseVolume: number;
6589
8458
  /**
6590
8459
  * Creation timestamp in ISO 8601 format
6591
8460
  */
@@ -6622,7 +8491,7 @@ export declare namespace CustomerFlowUpdateHappyPathResponse {
6622
8491
  /**
6623
8492
  * Base emotional state of the persona
6624
8493
  */
6625
- baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED';
8494
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
6626
8495
  /**
6627
8496
  * How the persona confirms information
6628
8497
  */
@@ -6680,9 +8549,10 @@ export declare namespace CustomerFlowUpdateHappyPathResponse {
6680
8549
  };
6681
8550
  /**
6682
8551
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
6683
- * NORMAL, RELAXED)
8552
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
8553
+ * for several seconds.
6684
8554
  */
6685
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
8555
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
6686
8556
  /**
6687
8557
  * Speech clarity of the persona
6688
8558
  */
@@ -6708,6 +8578,12 @@ export declare namespace CustomerFlowUpdateHappyPathResponse {
6708
8578
  * Human-readable description of the persona
6709
8579
  */
6710
8580
  description?: string | null;
8581
+ /**
8582
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
8583
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
8584
+ * or set null to display the name itself.
8585
+ */
8586
+ displayName?: string | null;
6711
8587
  /**
6712
8588
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
6713
8589
  */
@@ -6721,7 +8597,8 @@ export declare namespace CustomerFlowCreateParams {
6721
8597
  /**
6722
8598
  * The conversation, as a graph of steps. At most 100 steps across at most 25
6723
8599
  * paths. The variants come from the graph: one per path, so they are not sent
6724
- * here.
8600
+ * here. A CUSTOMER_TURN describes what the simulated customer says and the persona
8601
+ * phrases it; a CUSTOMER_VERBATIM_TURN is said word for word.
6725
8602
  */
6726
8603
  graph: Array<FlowStep>;
6727
8604
  title: string;
@@ -6741,6 +8618,29 @@ export declare namespace CustomerFlowCreateParams {
6741
8618
  */
6742
8619
  branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE';
6743
8620
  description?: string | null;
8621
+ /**
8622
+ * STRICT only. What the simulated customer does when your agent does not say the
8623
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
8624
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
8625
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
8626
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
8627
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
8628
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
8629
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
8630
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
8631
+ * AGENT_TURN step can carry its own.
8632
+ */
8633
+ offScriptPolicy?: CreateScriptedCustomerFlowInput.OffScriptPolicy | null;
8634
+ /**
8635
+ * How closely a run follows the script. LOOSE (default) hands the whole script to
8636
+ * the simulated customer as one prompt; it keeps the call moving whatever your
8637
+ * agent says. STRICT runs the script as a state machine on the agent service: at
8638
+ * every agent step the simulated customer waits, silent, until your agent has said
8639
+ * the expected line, and only then moves on. Scripted flows only; STRICT needs the
8640
+ * agent-service transport and is not available on realtime models. (LOOSE is the
8641
+ * default.)
8642
+ */
8643
+ scriptAdherence?: 'LOOSE' | 'STRICT';
6744
8644
  }
6745
8645
  namespace CreateScriptedCustomerFlowInput {
6746
8646
  interface AgentExpectation {
@@ -6749,6 +8649,25 @@ export declare namespace CustomerFlowCreateParams {
6749
8649
  */
6750
8650
  prompt: string;
6751
8651
  }
8652
+ /**
8653
+ * STRICT only. What the simulated customer does when your agent does not say the
8654
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
8655
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
8656
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
8657
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
8658
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
8659
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
8660
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
8661
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
8662
+ * AGENT_TURN step can carry its own.
8663
+ */
8664
+ interface OffScriptPolicy {
8665
+ maxAttempts: number;
8666
+ reaction: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY';
8667
+ then: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE';
8668
+ sayLine?: string | null;
8669
+ waitSeconds?: number | null;
8670
+ }
6752
8671
  }
6753
8672
  interface CreateImprovCustomerFlowInput {
6754
8673
  /**
@@ -6827,6 +8746,29 @@ export interface CustomerFlowUpdateParams {
6827
8746
  */
6828
8747
  branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE';
6829
8748
  description?: string | null;
8749
+ /**
8750
+ * STRICT only. What the simulated customer does when your agent does not say the
8751
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
8752
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
8753
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
8754
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
8755
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
8756
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
8757
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
8758
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
8759
+ * AGENT_TURN step can carry its own.
8760
+ */
8761
+ offScriptPolicy?: CustomerFlowUpdateParams.OffScriptPolicy | null;
8762
+ /**
8763
+ * Scripted flows only. How closely a run follows the script. LOOSE (default) hands
8764
+ * the whole script to the simulated customer as one prompt; it keeps the call
8765
+ * moving whatever your agent says. STRICT runs the script as a state machine on
8766
+ * the agent service: at every agent step the simulated customer waits, silent,
8767
+ * until your agent has said the expected line, and only then moves on. Scripted
8768
+ * flows only; STRICT needs the agent-service transport and is not available on
8769
+ * realtime models.
8770
+ */
8771
+ scriptAdherence?: 'LOOSE' | 'STRICT';
6830
8772
  title?: string;
6831
8773
  }
6832
8774
  export declare namespace CustomerFlowUpdateParams {
@@ -6836,6 +8778,25 @@ export declare namespace CustomerFlowUpdateParams {
6836
8778
  */
6837
8779
  prompt: string;
6838
8780
  }
8781
+ /**
8782
+ * STRICT only. What the simulated customer does when your agent does not say the
8783
+ * expected line. Each unmatched agent utterance is an attempt: `reaction` runs per
8784
+ * attempt (STAY_SILENT, REPEAT its last scripted line, RESPOND once in character
8785
+ * without moving on, or SAY `sayLine`), and `then` runs when attempts reach
8786
+ * `maxAttempts` or your agent stays silent for `waitSeconds` (HANG_UP ends the
8787
+ * call with ended reason SCRIPT_DIVERGED, HANG_UP_INVALIDATE ends it the same way
8788
+ * and invalidates the run so it is scored by nothing and counted nowhere, MOVE_ON
8789
+ * advances anyway, ADAPT hands the rest of the call to loose behaviour). Null:
8790
+ * stay silent, 3 attempts, hang up. The default for every agent step; an
8791
+ * AGENT_TURN step can carry its own.
8792
+ */
8793
+ interface OffScriptPolicy {
8794
+ maxAttempts: number;
8795
+ reaction: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY';
8796
+ then: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE';
8797
+ sayLine?: string | null;
8798
+ waitSeconds?: number | null;
8799
+ }
6839
8800
  }
6840
8801
  export interface CustomerFlowListParams {
6841
8802
  after?: string;
@@ -6844,6 +8805,17 @@ export interface CustomerFlowListParams {
6844
8805
  searchText?: string;
6845
8806
  type?: 'SCRIPTED' | 'IMPROV' | 'VOICEMAIL';
6846
8807
  }
8808
+ export interface CustomerFlowDuplicateParams {
8809
+ /**
8810
+ * Agents to link on the copy. Omit to carry the source flow's agents over.
8811
+ * Required when the source is a Roark-managed flow with no agents of its own.
8812
+ */
8813
+ agentIds?: Array<string>;
8814
+ /**
8815
+ * Title for the copy. Defaults to "Copy of" the source flow.
8816
+ */
8817
+ title?: string;
8818
+ }
6847
8819
  export interface CustomerFlowReplaceGraphParams {
6848
8820
  /**
6849
8821
  * The complete graph. This replaces the flow's existing steps rather than merging
@@ -6884,6 +8856,6 @@ export declare namespace CustomerFlowUpdateHappyPathParams {
6884
8856
  }
6885
8857
  }
6886
8858
  export declare namespace CustomerFlow {
6887
- export { type FlowStep as FlowStep, type CustomerFlowCreateResponse as CustomerFlowCreateResponse, type CustomerFlowUpdateResponse as CustomerFlowUpdateResponse, type CustomerFlowListResponse as CustomerFlowListResponse, type CustomerFlowDeleteResponse as CustomerFlowDeleteResponse, type CustomerFlowGetByIDResponse as CustomerFlowGetByIDResponse, type CustomerFlowReplaceGraphResponse as CustomerFlowReplaceGraphResponse, type CustomerFlowUpdateHappyPathResponse as CustomerFlowUpdateHappyPathResponse, type CustomerFlowCreateParams as CustomerFlowCreateParams, type CustomerFlowUpdateParams as CustomerFlowUpdateParams, type CustomerFlowListParams as CustomerFlowListParams, type CustomerFlowReplaceGraphParams as CustomerFlowReplaceGraphParams, type CustomerFlowUpdateHappyPathParams as CustomerFlowUpdateHappyPathParams, };
8859
+ export { type FlowStep as FlowStep, type CustomerFlowCreateResponse as CustomerFlowCreateResponse, type CustomerFlowUpdateResponse as CustomerFlowUpdateResponse, type CustomerFlowListResponse as CustomerFlowListResponse, type CustomerFlowDeleteResponse as CustomerFlowDeleteResponse, type CustomerFlowDuplicateResponse as CustomerFlowDuplicateResponse, type CustomerFlowGetByIDResponse as CustomerFlowGetByIDResponse, type CustomerFlowReplaceGraphResponse as CustomerFlowReplaceGraphResponse, type CustomerFlowUpdateHappyPathResponse as CustomerFlowUpdateHappyPathResponse, type CustomerFlowCreateParams as CustomerFlowCreateParams, type CustomerFlowUpdateParams as CustomerFlowUpdateParams, type CustomerFlowListParams as CustomerFlowListParams, type CustomerFlowDuplicateParams as CustomerFlowDuplicateParams, type CustomerFlowReplaceGraphParams as CustomerFlowReplaceGraphParams, type CustomerFlowUpdateHappyPathParams as CustomerFlowUpdateHappyPathParams, };
6888
8860
  }
6889
8861
  //# sourceMappingURL=customer-flow.d.mts.map