@roarkanalytics/sdk 7.8.0 → 8.0.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 (205) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/client.d.mts +20 -5
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +20 -5
  5. package/client.d.ts.map +1 -1
  6. package/client.js +18 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +18 -3
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/agent-connection.d.mts +1952 -0
  12. package/resources/agent-connection.d.mts.map +1 -0
  13. package/resources/agent-connection.d.ts +1952 -0
  14. package/resources/agent-connection.d.ts.map +1 -0
  15. package/resources/agent-connection.js +173 -0
  16. package/resources/agent-connection.js.map +1 -0
  17. package/resources/agent-connection.mjs +169 -0
  18. package/resources/agent-connection.mjs.map +1 -0
  19. package/resources/agent-conversation.d.mts +110 -0
  20. package/resources/agent-conversation.d.mts.map +1 -0
  21. package/resources/agent-conversation.d.ts +110 -0
  22. package/resources/agent-conversation.d.ts.map +1 -0
  23. package/resources/agent-conversation.js +41 -0
  24. package/resources/agent-conversation.js.map +1 -0
  25. package/resources/agent-conversation.mjs +37 -0
  26. package/resources/agent-conversation.mjs.map +1 -0
  27. package/resources/agent-draft.d.mts +101 -35
  28. package/resources/agent-draft.d.mts.map +1 -1
  29. package/resources/agent-draft.d.ts +101 -35
  30. package/resources/agent-draft.d.ts.map +1 -1
  31. package/resources/agent-endpoint.d.mts +4 -4
  32. package/resources/agent-endpoint.d.mts.map +1 -1
  33. package/resources/agent-endpoint.d.ts +4 -4
  34. package/resources/agent-endpoint.d.ts.map +1 -1
  35. package/resources/agent-setup.d.mts +1057 -0
  36. package/resources/agent-setup.d.mts.map +1 -0
  37. package/resources/agent-setup.d.ts +1057 -0
  38. package/resources/agent-setup.d.ts.map +1 -0
  39. package/resources/agent-setup.js +113 -0
  40. package/resources/agent-setup.js.map +1 -0
  41. package/resources/agent-setup.mjs +109 -0
  42. package/resources/agent-setup.mjs.map +1 -0
  43. package/resources/agent-version.d.mts +57 -18
  44. package/resources/agent-version.d.mts.map +1 -1
  45. package/resources/agent-version.d.ts +57 -18
  46. package/resources/agent-version.d.ts.map +1 -1
  47. package/resources/agent.d.mts +263 -4
  48. package/resources/agent.d.mts.map +1 -1
  49. package/resources/agent.d.ts +263 -4
  50. package/resources/agent.d.ts.map +1 -1
  51. package/resources/calendar-connection.d.mts +834 -56
  52. package/resources/calendar-connection.d.mts.map +1 -1
  53. package/resources/calendar-connection.d.ts +834 -56
  54. package/resources/calendar-connection.d.ts.map +1 -1
  55. package/resources/calendar-connection.js +127 -8
  56. package/resources/calendar-connection.js.map +1 -1
  57. package/resources/calendar-connection.mjs +127 -8
  58. package/resources/calendar-connection.mjs.map +1 -1
  59. package/resources/call.d.mts +2 -2
  60. package/resources/call.d.mts.map +1 -1
  61. package/resources/call.d.ts +2 -2
  62. package/resources/call.d.ts.map +1 -1
  63. package/resources/config.d.mts +78 -36
  64. package/resources/config.d.mts.map +1 -1
  65. package/resources/config.d.ts +78 -36
  66. package/resources/config.d.ts.map +1 -1
  67. package/resources/conversation.d.mts +156 -0
  68. package/resources/conversation.d.mts.map +1 -0
  69. package/resources/conversation.d.ts +156 -0
  70. package/resources/conversation.d.ts.map +1 -0
  71. package/resources/conversation.js +40 -0
  72. package/resources/conversation.js.map +1 -0
  73. package/resources/conversation.mjs +36 -0
  74. package/resources/conversation.mjs.map +1 -0
  75. package/resources/customer-flow-edge-case.d.mts +637 -40
  76. package/resources/customer-flow-edge-case.d.mts.map +1 -1
  77. package/resources/customer-flow-edge-case.d.ts +637 -40
  78. package/resources/customer-flow-edge-case.d.ts.map +1 -1
  79. package/resources/customer-flow.d.mts +2583 -156
  80. package/resources/customer-flow.d.mts.map +1 -1
  81. package/resources/customer-flow.d.ts +2583 -156
  82. package/resources/customer-flow.d.ts.map +1 -1
  83. package/resources/{customer-profile.d.mts → customer.d.mts} +287 -98
  84. package/resources/customer.d.mts.map +1 -0
  85. package/resources/{customer-profile.d.ts → customer.d.ts} +287 -98
  86. package/resources/customer.d.ts.map +1 -0
  87. package/resources/customer.js +180 -0
  88. package/resources/customer.js.map +1 -0
  89. package/resources/customer.mjs +176 -0
  90. package/resources/customer.mjs.map +1 -0
  91. package/resources/index.d.mts +7 -2
  92. package/resources/index.d.mts.map +1 -1
  93. package/resources/index.d.ts +7 -2
  94. package/resources/index.d.ts.map +1 -1
  95. package/resources/index.js +13 -3
  96. package/resources/index.js.map +1 -1
  97. package/resources/index.mjs +6 -1
  98. package/resources/index.mjs.map +1 -1
  99. package/resources/mcp-server.d.mts +588 -0
  100. package/resources/mcp-server.d.mts.map +1 -0
  101. package/resources/mcp-server.d.ts +588 -0
  102. package/resources/mcp-server.d.ts.map +1 -0
  103. package/resources/mcp-server.js +109 -0
  104. package/resources/mcp-server.js.map +1 -0
  105. package/resources/mcp-server.mjs +105 -0
  106. package/resources/mcp-server.mjs.map +1 -0
  107. package/resources/metric-policy.d.mts +5 -4
  108. package/resources/metric-policy.d.mts.map +1 -1
  109. package/resources/metric-policy.d.ts +5 -4
  110. package/resources/metric-policy.d.ts.map +1 -1
  111. package/resources/metric-policy.js +1 -1
  112. package/resources/metric-policy.mjs +1 -1
  113. package/resources/metric-variant.d.mts +4 -1
  114. package/resources/metric-variant.d.mts.map +1 -1
  115. package/resources/metric-variant.d.ts +4 -1
  116. package/resources/metric-variant.d.ts.map +1 -1
  117. package/resources/metric.d.mts +7 -2
  118. package/resources/metric.d.mts.map +1 -1
  119. package/resources/metric.d.ts +7 -2
  120. package/resources/metric.d.ts.map +1 -1
  121. package/resources/simulation-environment.d.mts +366 -0
  122. package/resources/simulation-environment.d.mts.map +1 -1
  123. package/resources/simulation-environment.d.ts +366 -0
  124. package/resources/simulation-environment.d.ts.map +1 -1
  125. package/resources/simulation-job.d.mts +12 -8
  126. package/resources/simulation-job.d.mts.map +1 -1
  127. package/resources/simulation-job.d.ts +12 -8
  128. package/resources/simulation-job.d.ts.map +1 -1
  129. package/resources/simulation-persona.d.mts +25 -15
  130. package/resources/simulation-persona.d.mts.map +1 -1
  131. package/resources/simulation-persona.d.ts +25 -15
  132. package/resources/simulation-persona.d.ts.map +1 -1
  133. package/resources/simulation-run-plan-job.d.mts +32 -6
  134. package/resources/simulation-run-plan-job.d.mts.map +1 -1
  135. package/resources/simulation-run-plan-job.d.ts +32 -6
  136. package/resources/simulation-run-plan-job.d.ts.map +1 -1
  137. package/resources/simulation-run-plan.d.mts +126 -13
  138. package/resources/simulation-run-plan.d.mts.map +1 -1
  139. package/resources/simulation-run-plan.d.ts +126 -13
  140. package/resources/simulation-run-plan.d.ts.map +1 -1
  141. package/resources/simulation-template.d.mts +1 -1
  142. package/resources/simulation-template.d.mts.map +1 -1
  143. package/resources/simulation-template.d.ts +1 -1
  144. package/resources/simulation-template.d.ts.map +1 -1
  145. package/resources/simulation.d.mts +35 -3
  146. package/resources/simulation.d.mts.map +1 -1
  147. package/resources/simulation.d.ts +35 -3
  148. package/resources/simulation.d.ts.map +1 -1
  149. package/resources/tool.d.mts +565 -6
  150. package/resources/tool.d.mts.map +1 -1
  151. package/resources/tool.d.ts +565 -6
  152. package/resources/tool.d.ts.map +1 -1
  153. package/resources/tool.js +9 -6
  154. package/resources/tool.js.map +1 -1
  155. package/resources/tool.mjs +9 -6
  156. package/resources/tool.mjs.map +1 -1
  157. package/resources/usage.d.mts +1 -1
  158. package/resources/usage.d.mts.map +1 -1
  159. package/resources/usage.d.ts +1 -1
  160. package/resources/usage.d.ts.map +1 -1
  161. package/resources/webhook.d.mts +4 -4
  162. package/resources/webhook.d.mts.map +1 -1
  163. package/resources/webhook.d.ts +4 -4
  164. package/resources/webhook.d.ts.map +1 -1
  165. package/src/client.ts +197 -34
  166. package/src/resources/agent-connection.ts +2523 -0
  167. package/src/resources/agent-conversation.ts +139 -0
  168. package/src/resources/agent-draft.ts +239 -35
  169. package/src/resources/agent-endpoint.ts +8 -4
  170. package/src/resources/agent-setup.ts +1685 -0
  171. package/src/resources/agent-version.ts +126 -18
  172. package/src/resources/agent.ts +506 -4
  173. package/src/resources/calendar-connection.ts +1035 -63
  174. package/src/resources/call.ts +12 -2
  175. package/src/resources/config.ts +198 -36
  176. package/src/resources/conversation.ts +205 -0
  177. package/src/resources/customer-flow-edge-case.ts +709 -40
  178. package/src/resources/customer-flow.ts +3141 -156
  179. package/src/resources/{customer-profile.ts → customer.ts} +406 -306
  180. package/src/resources/index.ts +91 -17
  181. package/src/resources/mcp-server.ts +786 -0
  182. package/src/resources/metric-policy.ts +5 -4
  183. package/src/resources/metric-variant.ts +4 -1
  184. package/src/resources/metric.ts +7 -2
  185. package/src/resources/simulation-environment.ts +414 -0
  186. package/src/resources/simulation-job.ts +14 -8
  187. package/src/resources/simulation-persona.ts +25 -15
  188. package/src/resources/simulation-run-plan-job.ts +47 -6
  189. package/src/resources/simulation-run-plan.ts +140 -0
  190. package/src/resources/simulation-template.ts +1 -0
  191. package/src/resources/simulation.ts +39 -0
  192. package/src/resources/tool.ts +697 -6
  193. package/src/resources/usage.ts +6 -1
  194. package/src/resources/webhook.ts +8 -0
  195. package/src/version.ts +1 -1
  196. package/version.d.mts +1 -1
  197. package/version.d.ts +1 -1
  198. package/version.js +1 -1
  199. package/version.mjs +1 -1
  200. package/resources/customer-profile.d.mts.map +0 -1
  201. package/resources/customer-profile.d.ts.map +0 -1
  202. package/resources/customer-profile.js +0 -141
  203. package/resources/customer-profile.js.map +0 -1
  204. package/resources/customer-profile.mjs +0 -137
  205. package/resources/customer-profile.mjs.map +0 -1
@@ -145,6 +145,20 @@ export declare namespace CustomerFlowEdgeCaseUpdateResponse {
145
145
  * Creation timestamp in ISO 8601 format
146
146
  */
147
147
  createdAt: string;
148
+ /**
149
+ * The per-direction loss of a CUSTOM line.
150
+ */
151
+ lineCustom: Environment.LineCustom | null;
152
+ /**
153
+ * The phone line the simulated caller is on: packet loss applied to its 20 ms
154
+ * audio packets, per direction. The loss pattern is seeded per call, so a redial
155
+ * loses the same packets. CLEAR: No loss. MINOR_LOSS: 1% random, both ways.
156
+ * CELL_EDGE: 5% in 80 ms gaps, both ways. POOR_CONNECTION: 10% in 120 ms gaps,
157
+ * both ways. ONE_WAY_DEGRADED: 8% in 80 ms gaps, toward the agent only. CUSTOM:
158
+ * the per-direction loss in `lineCustom`, up to 20% in 0.5 steps, with a mean
159
+ * burst of up to 10 packets (omit it for random loss).
160
+ */
161
+ lineQuality: 'CLEAR' | 'MINOR_LOSS' | 'CELL_EDGE' | 'POOR_CONNECTION' | 'ONE_WAY_DEGRADED' | 'CUSTOM';
148
162
  name: string;
149
163
  /**
150
164
  * Last update timestamp in ISO 8601 format
@@ -152,6 +166,53 @@ export declare namespace CustomerFlowEdgeCaseUpdateResponse {
152
166
  updatedAt: string;
153
167
  description?: string | null;
154
168
  }
169
+ namespace Environment {
170
+ /**
171
+ * The per-direction loss of a CUSTOM line.
172
+ */
173
+ interface LineCustom {
174
+ /**
175
+ * The agent's audio on its way to the caller: what the caller hears. Omit for no
176
+ * loss.
177
+ */
178
+ fromAgent?: LineCustom.FromAgent;
179
+ /**
180
+ * The caller's audio on its way to the agent: what the agent hears. Omit for no
181
+ * loss.
182
+ */
183
+ toAgent?: LineCustom.ToAgent;
184
+ }
185
+ namespace LineCustom {
186
+ /**
187
+ * The agent's audio on its way to the caller: what the caller hears. Omit for no
188
+ * loss.
189
+ */
190
+ interface FromAgent {
191
+ /**
192
+ * Share of packets lost, 0 to 20 in steps of 0.5.
193
+ */
194
+ packetLossPercent: number;
195
+ /**
196
+ * Mean length of a loss gap in 20 ms packets, 2 to 10. Omit for random loss.
197
+ */
198
+ meanBurstPackets?: number;
199
+ }
200
+ /**
201
+ * The caller's audio on its way to the agent: what the agent hears. Omit for no
202
+ * loss.
203
+ */
204
+ interface ToAgent {
205
+ /**
206
+ * Share of packets lost, 0 to 20 in steps of 0.5.
207
+ */
208
+ packetLossPercent: number;
209
+ /**
210
+ * Mean length of a loss gap in 20 ms packets, 2 to 10. Omit for random loss.
211
+ */
212
+ meanBurstPackets?: number;
213
+ }
214
+ }
215
+ }
155
216
  /**
156
217
  * The persona this runs as instead of the happy path's. Null means it inherits.
157
218
  */
@@ -219,9 +280,11 @@ export declare namespace CustomerFlowEdgeCaseUpdateResponse {
219
280
  * How much the persona talks over the agent while it is still speaking. OFF waits
220
281
  * its turn. BACKCHANNEL makes listening noises ("mm-hm") over the agent without
221
282
  * taking the floor, which tests whether the agent wrongly stops for them.
222
- * OCCASIONAL adds cutting in on some long agent turns, HEAVY on most of them.
223
- * Timing is randomised per turn, so two runs of the same persona do not interrupt
224
- * at identical moments.
283
+ * OCCASIONAL also cuts in where a caller like this plausibly would, and HEAVY does
284
+ * so readily, though never on every turn. The moments are chosen from what the
285
+ * agent is saying, such as reading back a number or starting a long explanation,
286
+ * not on a timer. A customer flow can also say exactly when to cut in, which
287
+ * applies at any level.
225
288
  */
226
289
  interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY';
227
290
  /**
@@ -347,7 +410,11 @@ export declare namespace CustomerFlowEdgeCaseUpdateResponse {
347
410
  /**
348
411
  * The brief the simulated customer improvises from. A `@{persona:<id>}` mention
349
412
  * hands the phone to that persona mid-call; the sentences around the mention say
350
- * when.
413
+ * when. Caller cues steer the caller from that point in the brief:
414
+ * `#{emotion:<emotion>}`, `#{language:<ISO 639-1 code>}`,
415
+ * `#{noise:<environmentId>}`, and `#{interrupt}`, whose sentence says when to cut
416
+ * in on your agent. Cues are voice only. See "Caller cues" in the customer flows
417
+ * concept.
351
418
  */
352
419
  prompt?: string | null;
353
420
  systemKey?: string | null;
@@ -376,6 +443,20 @@ export declare namespace CustomerFlowEdgeCaseUpdateResponse {
376
443
  * Creation timestamp in ISO 8601 format
377
444
  */
378
445
  createdAt: string;
446
+ /**
447
+ * The per-direction loss of a CUSTOM line.
448
+ */
449
+ lineCustom: Environment.LineCustom | null;
450
+ /**
451
+ * The phone line the simulated caller is on: packet loss applied to its 20 ms
452
+ * audio packets, per direction. The loss pattern is seeded per call, so a redial
453
+ * loses the same packets. CLEAR: No loss. MINOR_LOSS: 1% random, both ways.
454
+ * CELL_EDGE: 5% in 80 ms gaps, both ways. POOR_CONNECTION: 10% in 120 ms gaps,
455
+ * both ways. ONE_WAY_DEGRADED: 8% in 80 ms gaps, toward the agent only. CUSTOM:
456
+ * the per-direction loss in `lineCustom`, up to 20% in 0.5 steps, with a mean
457
+ * burst of up to 10 packets (omit it for random loss).
458
+ */
459
+ lineQuality: 'CLEAR' | 'MINOR_LOSS' | 'CELL_EDGE' | 'POOR_CONNECTION' | 'ONE_WAY_DEGRADED' | 'CUSTOM';
379
460
  name: string;
380
461
  /**
381
462
  * Last update timestamp in ISO 8601 format
@@ -383,6 +464,53 @@ export declare namespace CustomerFlowEdgeCaseUpdateResponse {
383
464
  updatedAt: string;
384
465
  description?: string | null;
385
466
  }
467
+ namespace Environment {
468
+ /**
469
+ * The per-direction loss of a CUSTOM line.
470
+ */
471
+ interface LineCustom {
472
+ /**
473
+ * The agent's audio on its way to the caller: what the caller hears. Omit for no
474
+ * loss.
475
+ */
476
+ fromAgent?: LineCustom.FromAgent;
477
+ /**
478
+ * The caller's audio on its way to the agent: what the agent hears. Omit for no
479
+ * loss.
480
+ */
481
+ toAgent?: LineCustom.ToAgent;
482
+ }
483
+ namespace LineCustom {
484
+ /**
485
+ * The agent's audio on its way to the caller: what the caller hears. Omit for no
486
+ * loss.
487
+ */
488
+ interface FromAgent {
489
+ /**
490
+ * Share of packets lost, 0 to 20 in steps of 0.5.
491
+ */
492
+ packetLossPercent: number;
493
+ /**
494
+ * Mean length of a loss gap in 20 ms packets, 2 to 10. Omit for random loss.
495
+ */
496
+ meanBurstPackets?: number;
497
+ }
498
+ /**
499
+ * The caller's audio on its way to the agent: what the agent hears. Omit for no
500
+ * loss.
501
+ */
502
+ interface ToAgent {
503
+ /**
504
+ * Share of packets lost, 0 to 20 in steps of 0.5.
505
+ */
506
+ packetLossPercent: number;
507
+ /**
508
+ * Mean length of a loss gap in 20 ms packets, 2 to 10. Omit for random loss.
509
+ */
510
+ meanBurstPackets?: number;
511
+ }
512
+ }
513
+ }
386
514
  interface HandoffPersona {
387
515
  /**
388
516
  * Unique identifier of the persona
@@ -447,9 +575,11 @@ export declare namespace CustomerFlowEdgeCaseUpdateResponse {
447
575
  * How much the persona talks over the agent while it is still speaking. OFF waits
448
576
  * its turn. BACKCHANNEL makes listening noises ("mm-hm") over the agent without
449
577
  * taking the floor, which tests whether the agent wrongly stops for them.
450
- * OCCASIONAL adds cutting in on some long agent turns, HEAVY on most of them.
451
- * Timing is randomised per turn, so two runs of the same persona do not interrupt
452
- * at identical moments.
578
+ * OCCASIONAL also cuts in where a caller like this plausibly would, and HEAVY does
579
+ * so readily, though never on every turn. The moments are chosen from what the
580
+ * agent is saying, such as reading back a number or starting a long explanation,
581
+ * not on a timer. A customer flow can also say exactly when to cut in, which
582
+ * applies at any level.
453
583
  */
454
584
  interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY';
455
585
  /**
@@ -588,9 +718,11 @@ export declare namespace CustomerFlowEdgeCaseUpdateResponse {
588
718
  * How much the persona talks over the agent while it is still speaking. OFF waits
589
719
  * its turn. BACKCHANNEL makes listening noises ("mm-hm") over the agent without
590
720
  * taking the floor, which tests whether the agent wrongly stops for them.
591
- * OCCASIONAL adds cutting in on some long agent turns, HEAVY on most of them.
592
- * Timing is randomised per turn, so two runs of the same persona do not interrupt
593
- * at identical moments.
721
+ * OCCASIONAL also cuts in where a caller like this plausibly would, and HEAVY does
722
+ * so readily, though never on every turn. The moments are chosen from what the
723
+ * agent is saying, such as reading back a number or starting a long explanation,
724
+ * not on a timer. A customer flow can also say exactly when to cut in, which
725
+ * applies at any level.
594
726
  */
595
727
  interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY';
596
728
  /**
@@ -728,6 +860,20 @@ export declare namespace CustomerFlowEdgeCaseUpdateResponse {
728
860
  * Creation timestamp in ISO 8601 format
729
861
  */
730
862
  createdAt: string;
863
+ /**
864
+ * The per-direction loss of a CUSTOM line.
865
+ */
866
+ lineCustom: Environment.LineCustom | null;
867
+ /**
868
+ * The phone line the simulated caller is on: packet loss applied to its 20 ms
869
+ * audio packets, per direction. The loss pattern is seeded per call, so a redial
870
+ * loses the same packets. CLEAR: No loss. MINOR_LOSS: 1% random, both ways.
871
+ * CELL_EDGE: 5% in 80 ms gaps, both ways. POOR_CONNECTION: 10% in 120 ms gaps,
872
+ * both ways. ONE_WAY_DEGRADED: 8% in 80 ms gaps, toward the agent only. CUSTOM:
873
+ * the per-direction loss in `lineCustom`, up to 20% in 0.5 steps, with a mean
874
+ * burst of up to 10 packets (omit it for random loss).
875
+ */
876
+ lineQuality: 'CLEAR' | 'MINOR_LOSS' | 'CELL_EDGE' | 'POOR_CONNECTION' | 'ONE_WAY_DEGRADED' | 'CUSTOM';
731
877
  name: string;
732
878
  /**
733
879
  * Last update timestamp in ISO 8601 format
@@ -735,6 +881,53 @@ export declare namespace CustomerFlowEdgeCaseUpdateResponse {
735
881
  updatedAt: string;
736
882
  description?: string | null;
737
883
  }
884
+ namespace Environment {
885
+ /**
886
+ * The per-direction loss of a CUSTOM line.
887
+ */
888
+ interface LineCustom {
889
+ /**
890
+ * The agent's audio on its way to the caller: what the caller hears. Omit for no
891
+ * loss.
892
+ */
893
+ fromAgent?: LineCustom.FromAgent;
894
+ /**
895
+ * The caller's audio on its way to the agent: what the agent hears. Omit for no
896
+ * loss.
897
+ */
898
+ toAgent?: LineCustom.ToAgent;
899
+ }
900
+ namespace LineCustom {
901
+ /**
902
+ * The agent's audio on its way to the caller: what the caller hears. Omit for no
903
+ * loss.
904
+ */
905
+ interface FromAgent {
906
+ /**
907
+ * Share of packets lost, 0 to 20 in steps of 0.5.
908
+ */
909
+ packetLossPercent: number;
910
+ /**
911
+ * Mean length of a loss gap in 20 ms packets, 2 to 10. Omit for random loss.
912
+ */
913
+ meanBurstPackets?: number;
914
+ }
915
+ /**
916
+ * The caller's audio on its way to the agent: what the agent hears. Omit for no
917
+ * loss.
918
+ */
919
+ interface ToAgent {
920
+ /**
921
+ * Share of packets lost, 0 to 20 in steps of 0.5.
922
+ */
923
+ packetLossPercent: number;
924
+ /**
925
+ * Mean length of a loss gap in 20 ms packets, 2 to 10. Omit for random loss.
926
+ */
927
+ meanBurstPackets?: number;
928
+ }
929
+ }
930
+ }
738
931
  /**
739
932
  * The persona this runs as instead of the happy path's. Null means it inherits.
740
933
  */
@@ -802,9 +995,11 @@ export declare namespace CustomerFlowEdgeCaseUpdateResponse {
802
995
  * How much the persona talks over the agent while it is still speaking. OFF waits
803
996
  * its turn. BACKCHANNEL makes listening noises ("mm-hm") over the agent without
804
997
  * taking the floor, which tests whether the agent wrongly stops for them.
805
- * OCCASIONAL adds cutting in on some long agent turns, HEAVY on most of them.
806
- * Timing is randomised per turn, so two runs of the same persona do not interrupt
807
- * at identical moments.
998
+ * OCCASIONAL also cuts in where a caller like this plausibly would, and HEAVY does
999
+ * so readily, though never on every turn. The moments are chosen from what the
1000
+ * agent is saying, such as reading back a number or starting a long explanation,
1001
+ * not on a timer. A customer flow can also say exactly when to cut in, which
1002
+ * applies at any level.
808
1003
  */
809
1004
  interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY';
810
1005
  /**
@@ -956,6 +1151,20 @@ export declare namespace CustomerFlowEdgeCaseAddResponse {
956
1151
  * Creation timestamp in ISO 8601 format
957
1152
  */
958
1153
  createdAt: string;
1154
+ /**
1155
+ * The per-direction loss of a CUSTOM line.
1156
+ */
1157
+ lineCustom: Environment.LineCustom | null;
1158
+ /**
1159
+ * The phone line the simulated caller is on: packet loss applied to its 20 ms
1160
+ * audio packets, per direction. The loss pattern is seeded per call, so a redial
1161
+ * loses the same packets. CLEAR: No loss. MINOR_LOSS: 1% random, both ways.
1162
+ * CELL_EDGE: 5% in 80 ms gaps, both ways. POOR_CONNECTION: 10% in 120 ms gaps,
1163
+ * both ways. ONE_WAY_DEGRADED: 8% in 80 ms gaps, toward the agent only. CUSTOM:
1164
+ * the per-direction loss in `lineCustom`, up to 20% in 0.5 steps, with a mean
1165
+ * burst of up to 10 packets (omit it for random loss).
1166
+ */
1167
+ lineQuality: 'CLEAR' | 'MINOR_LOSS' | 'CELL_EDGE' | 'POOR_CONNECTION' | 'ONE_WAY_DEGRADED' | 'CUSTOM';
959
1168
  name: string;
960
1169
  /**
961
1170
  * Last update timestamp in ISO 8601 format
@@ -963,6 +1172,53 @@ export declare namespace CustomerFlowEdgeCaseAddResponse {
963
1172
  updatedAt: string;
964
1173
  description?: string | null;
965
1174
  }
1175
+ namespace Environment {
1176
+ /**
1177
+ * The per-direction loss of a CUSTOM line.
1178
+ */
1179
+ interface LineCustom {
1180
+ /**
1181
+ * The agent's audio on its way to the caller: what the caller hears. Omit for no
1182
+ * loss.
1183
+ */
1184
+ fromAgent?: LineCustom.FromAgent;
1185
+ /**
1186
+ * The caller's audio on its way to the agent: what the agent hears. Omit for no
1187
+ * loss.
1188
+ */
1189
+ toAgent?: LineCustom.ToAgent;
1190
+ }
1191
+ namespace LineCustom {
1192
+ /**
1193
+ * The agent's audio on its way to the caller: what the caller hears. Omit for no
1194
+ * loss.
1195
+ */
1196
+ interface FromAgent {
1197
+ /**
1198
+ * Share of packets lost, 0 to 20 in steps of 0.5.
1199
+ */
1200
+ packetLossPercent: number;
1201
+ /**
1202
+ * Mean length of a loss gap in 20 ms packets, 2 to 10. Omit for random loss.
1203
+ */
1204
+ meanBurstPackets?: number;
1205
+ }
1206
+ /**
1207
+ * The caller's audio on its way to the agent: what the agent hears. Omit for no
1208
+ * loss.
1209
+ */
1210
+ interface ToAgent {
1211
+ /**
1212
+ * Share of packets lost, 0 to 20 in steps of 0.5.
1213
+ */
1214
+ packetLossPercent: number;
1215
+ /**
1216
+ * Mean length of a loss gap in 20 ms packets, 2 to 10. Omit for random loss.
1217
+ */
1218
+ meanBurstPackets?: number;
1219
+ }
1220
+ }
1221
+ }
966
1222
  /**
967
1223
  * The persona this runs as instead of the happy path's. Null means it inherits.
968
1224
  */
@@ -1030,9 +1286,11 @@ export declare namespace CustomerFlowEdgeCaseAddResponse {
1030
1286
  * How much the persona talks over the agent while it is still speaking. OFF waits
1031
1287
  * its turn. BACKCHANNEL makes listening noises ("mm-hm") over the agent without
1032
1288
  * taking the floor, which tests whether the agent wrongly stops for them.
1033
- * OCCASIONAL adds cutting in on some long agent turns, HEAVY on most of them.
1034
- * Timing is randomised per turn, so two runs of the same persona do not interrupt
1035
- * at identical moments.
1289
+ * OCCASIONAL also cuts in where a caller like this plausibly would, and HEAVY does
1290
+ * so readily, though never on every turn. The moments are chosen from what the
1291
+ * agent is saying, such as reading back a number or starting a long explanation,
1292
+ * not on a timer. A customer flow can also say exactly when to cut in, which
1293
+ * applies at any level.
1036
1294
  */
1037
1295
  interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY';
1038
1296
  /**
@@ -1158,7 +1416,11 @@ export declare namespace CustomerFlowEdgeCaseAddResponse {
1158
1416
  /**
1159
1417
  * The brief the simulated customer improvises from. A `@{persona:<id>}` mention
1160
1418
  * hands the phone to that persona mid-call; the sentences around the mention say
1161
- * when.
1419
+ * when. Caller cues steer the caller from that point in the brief:
1420
+ * `#{emotion:<emotion>}`, `#{language:<ISO 639-1 code>}`,
1421
+ * `#{noise:<environmentId>}`, and `#{interrupt}`, whose sentence says when to cut
1422
+ * in on your agent. Cues are voice only. See "Caller cues" in the customer flows
1423
+ * concept.
1162
1424
  */
1163
1425
  prompt?: string | null;
1164
1426
  systemKey?: string | null;
@@ -1187,6 +1449,20 @@ export declare namespace CustomerFlowEdgeCaseAddResponse {
1187
1449
  * Creation timestamp in ISO 8601 format
1188
1450
  */
1189
1451
  createdAt: string;
1452
+ /**
1453
+ * The per-direction loss of a CUSTOM line.
1454
+ */
1455
+ lineCustom: Environment.LineCustom | null;
1456
+ /**
1457
+ * The phone line the simulated caller is on: packet loss applied to its 20 ms
1458
+ * audio packets, per direction. The loss pattern is seeded per call, so a redial
1459
+ * loses the same packets. CLEAR: No loss. MINOR_LOSS: 1% random, both ways.
1460
+ * CELL_EDGE: 5% in 80 ms gaps, both ways. POOR_CONNECTION: 10% in 120 ms gaps,
1461
+ * both ways. ONE_WAY_DEGRADED: 8% in 80 ms gaps, toward the agent only. CUSTOM:
1462
+ * the per-direction loss in `lineCustom`, up to 20% in 0.5 steps, with a mean
1463
+ * burst of up to 10 packets (omit it for random loss).
1464
+ */
1465
+ lineQuality: 'CLEAR' | 'MINOR_LOSS' | 'CELL_EDGE' | 'POOR_CONNECTION' | 'ONE_WAY_DEGRADED' | 'CUSTOM';
1190
1466
  name: string;
1191
1467
  /**
1192
1468
  * Last update timestamp in ISO 8601 format
@@ -1194,6 +1470,53 @@ export declare namespace CustomerFlowEdgeCaseAddResponse {
1194
1470
  updatedAt: string;
1195
1471
  description?: string | null;
1196
1472
  }
1473
+ namespace Environment {
1474
+ /**
1475
+ * The per-direction loss of a CUSTOM line.
1476
+ */
1477
+ interface LineCustom {
1478
+ /**
1479
+ * The agent's audio on its way to the caller: what the caller hears. Omit for no
1480
+ * loss.
1481
+ */
1482
+ fromAgent?: LineCustom.FromAgent;
1483
+ /**
1484
+ * The caller's audio on its way to the agent: what the agent hears. Omit for no
1485
+ * loss.
1486
+ */
1487
+ toAgent?: LineCustom.ToAgent;
1488
+ }
1489
+ namespace LineCustom {
1490
+ /**
1491
+ * The agent's audio on its way to the caller: what the caller hears. Omit for no
1492
+ * loss.
1493
+ */
1494
+ interface FromAgent {
1495
+ /**
1496
+ * Share of packets lost, 0 to 20 in steps of 0.5.
1497
+ */
1498
+ packetLossPercent: number;
1499
+ /**
1500
+ * Mean length of a loss gap in 20 ms packets, 2 to 10. Omit for random loss.
1501
+ */
1502
+ meanBurstPackets?: number;
1503
+ }
1504
+ /**
1505
+ * The caller's audio on its way to the agent: what the agent hears. Omit for no
1506
+ * loss.
1507
+ */
1508
+ interface ToAgent {
1509
+ /**
1510
+ * Share of packets lost, 0 to 20 in steps of 0.5.
1511
+ */
1512
+ packetLossPercent: number;
1513
+ /**
1514
+ * Mean length of a loss gap in 20 ms packets, 2 to 10. Omit for random loss.
1515
+ */
1516
+ meanBurstPackets?: number;
1517
+ }
1518
+ }
1519
+ }
1197
1520
  interface HandoffPersona {
1198
1521
  /**
1199
1522
  * Unique identifier of the persona
@@ -1258,9 +1581,11 @@ export declare namespace CustomerFlowEdgeCaseAddResponse {
1258
1581
  * How much the persona talks over the agent while it is still speaking. OFF waits
1259
1582
  * its turn. BACKCHANNEL makes listening noises ("mm-hm") over the agent without
1260
1583
  * taking the floor, which tests whether the agent wrongly stops for them.
1261
- * OCCASIONAL adds cutting in on some long agent turns, HEAVY on most of them.
1262
- * Timing is randomised per turn, so two runs of the same persona do not interrupt
1263
- * at identical moments.
1584
+ * OCCASIONAL also cuts in where a caller like this plausibly would, and HEAVY does
1585
+ * so readily, though never on every turn. The moments are chosen from what the
1586
+ * agent is saying, such as reading back a number or starting a long explanation,
1587
+ * not on a timer. A customer flow can also say exactly when to cut in, which
1588
+ * applies at any level.
1264
1589
  */
1265
1590
  interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY';
1266
1591
  /**
@@ -1399,9 +1724,11 @@ export declare namespace CustomerFlowEdgeCaseAddResponse {
1399
1724
  * How much the persona talks over the agent while it is still speaking. OFF waits
1400
1725
  * its turn. BACKCHANNEL makes listening noises ("mm-hm") over the agent without
1401
1726
  * taking the floor, which tests whether the agent wrongly stops for them.
1402
- * OCCASIONAL adds cutting in on some long agent turns, HEAVY on most of them.
1403
- * Timing is randomised per turn, so two runs of the same persona do not interrupt
1404
- * at identical moments.
1727
+ * OCCASIONAL also cuts in where a caller like this plausibly would, and HEAVY does
1728
+ * so readily, though never on every turn. The moments are chosen from what the
1729
+ * agent is saying, such as reading back a number or starting a long explanation,
1730
+ * not on a timer. A customer flow can also say exactly when to cut in, which
1731
+ * applies at any level.
1405
1732
  */
1406
1733
  interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY';
1407
1734
  /**
@@ -1539,6 +1866,20 @@ export declare namespace CustomerFlowEdgeCaseAddResponse {
1539
1866
  * Creation timestamp in ISO 8601 format
1540
1867
  */
1541
1868
  createdAt: string;
1869
+ /**
1870
+ * The per-direction loss of a CUSTOM line.
1871
+ */
1872
+ lineCustom: Environment.LineCustom | null;
1873
+ /**
1874
+ * The phone line the simulated caller is on: packet loss applied to its 20 ms
1875
+ * audio packets, per direction. The loss pattern is seeded per call, so a redial
1876
+ * loses the same packets. CLEAR: No loss. MINOR_LOSS: 1% random, both ways.
1877
+ * CELL_EDGE: 5% in 80 ms gaps, both ways. POOR_CONNECTION: 10% in 120 ms gaps,
1878
+ * both ways. ONE_WAY_DEGRADED: 8% in 80 ms gaps, toward the agent only. CUSTOM:
1879
+ * the per-direction loss in `lineCustom`, up to 20% in 0.5 steps, with a mean
1880
+ * burst of up to 10 packets (omit it for random loss).
1881
+ */
1882
+ lineQuality: 'CLEAR' | 'MINOR_LOSS' | 'CELL_EDGE' | 'POOR_CONNECTION' | 'ONE_WAY_DEGRADED' | 'CUSTOM';
1542
1883
  name: string;
1543
1884
  /**
1544
1885
  * Last update timestamp in ISO 8601 format
@@ -1546,6 +1887,53 @@ export declare namespace CustomerFlowEdgeCaseAddResponse {
1546
1887
  updatedAt: string;
1547
1888
  description?: string | null;
1548
1889
  }
1890
+ namespace Environment {
1891
+ /**
1892
+ * The per-direction loss of a CUSTOM line.
1893
+ */
1894
+ interface LineCustom {
1895
+ /**
1896
+ * The agent's audio on its way to the caller: what the caller hears. Omit for no
1897
+ * loss.
1898
+ */
1899
+ fromAgent?: LineCustom.FromAgent;
1900
+ /**
1901
+ * The caller's audio on its way to the agent: what the agent hears. Omit for no
1902
+ * loss.
1903
+ */
1904
+ toAgent?: LineCustom.ToAgent;
1905
+ }
1906
+ namespace LineCustom {
1907
+ /**
1908
+ * The agent's audio on its way to the caller: what the caller hears. Omit for no
1909
+ * loss.
1910
+ */
1911
+ interface FromAgent {
1912
+ /**
1913
+ * Share of packets lost, 0 to 20 in steps of 0.5.
1914
+ */
1915
+ packetLossPercent: number;
1916
+ /**
1917
+ * Mean length of a loss gap in 20 ms packets, 2 to 10. Omit for random loss.
1918
+ */
1919
+ meanBurstPackets?: number;
1920
+ }
1921
+ /**
1922
+ * The caller's audio on its way to the agent: what the agent hears. Omit for no
1923
+ * loss.
1924
+ */
1925
+ interface ToAgent {
1926
+ /**
1927
+ * Share of packets lost, 0 to 20 in steps of 0.5.
1928
+ */
1929
+ packetLossPercent: number;
1930
+ /**
1931
+ * Mean length of a loss gap in 20 ms packets, 2 to 10. Omit for random loss.
1932
+ */
1933
+ meanBurstPackets?: number;
1934
+ }
1935
+ }
1936
+ }
1549
1937
  /**
1550
1938
  * The persona this runs as instead of the happy path's. Null means it inherits.
1551
1939
  */
@@ -1613,9 +2001,11 @@ export declare namespace CustomerFlowEdgeCaseAddResponse {
1613
2001
  * How much the persona talks over the agent while it is still speaking. OFF waits
1614
2002
  * its turn. BACKCHANNEL makes listening noises ("mm-hm") over the agent without
1615
2003
  * taking the floor, which tests whether the agent wrongly stops for them.
1616
- * OCCASIONAL adds cutting in on some long agent turns, HEAVY on most of them.
1617
- * Timing is randomised per turn, so two runs of the same persona do not interrupt
1618
- * at identical moments.
2004
+ * OCCASIONAL also cuts in where a caller like this plausibly would, and HEAVY does
2005
+ * so readily, though never on every turn. The moments are chosen from what the
2006
+ * agent is saying, such as reading back a number or starting a long explanation,
2007
+ * not on a timer. A customer flow can also say exactly when to cut in, which
2008
+ * applies at any level.
1619
2009
  */
1620
2010
  interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY';
1621
2011
  /**
@@ -1767,6 +2157,20 @@ export declare namespace CustomerFlowEdgeCasePromoteResponse {
1767
2157
  * Creation timestamp in ISO 8601 format
1768
2158
  */
1769
2159
  createdAt: string;
2160
+ /**
2161
+ * The per-direction loss of a CUSTOM line.
2162
+ */
2163
+ lineCustom: Environment.LineCustom | null;
2164
+ /**
2165
+ * The phone line the simulated caller is on: packet loss applied to its 20 ms
2166
+ * audio packets, per direction. The loss pattern is seeded per call, so a redial
2167
+ * loses the same packets. CLEAR: No loss. MINOR_LOSS: 1% random, both ways.
2168
+ * CELL_EDGE: 5% in 80 ms gaps, both ways. POOR_CONNECTION: 10% in 120 ms gaps,
2169
+ * both ways. ONE_WAY_DEGRADED: 8% in 80 ms gaps, toward the agent only. CUSTOM:
2170
+ * the per-direction loss in `lineCustom`, up to 20% in 0.5 steps, with a mean
2171
+ * burst of up to 10 packets (omit it for random loss).
2172
+ */
2173
+ lineQuality: 'CLEAR' | 'MINOR_LOSS' | 'CELL_EDGE' | 'POOR_CONNECTION' | 'ONE_WAY_DEGRADED' | 'CUSTOM';
1770
2174
  name: string;
1771
2175
  /**
1772
2176
  * Last update timestamp in ISO 8601 format
@@ -1774,6 +2178,53 @@ export declare namespace CustomerFlowEdgeCasePromoteResponse {
1774
2178
  updatedAt: string;
1775
2179
  description?: string | null;
1776
2180
  }
2181
+ namespace Environment {
2182
+ /**
2183
+ * The per-direction loss of a CUSTOM line.
2184
+ */
2185
+ interface LineCustom {
2186
+ /**
2187
+ * The agent's audio on its way to the caller: what the caller hears. Omit for no
2188
+ * loss.
2189
+ */
2190
+ fromAgent?: LineCustom.FromAgent;
2191
+ /**
2192
+ * The caller's audio on its way to the agent: what the agent hears. Omit for no
2193
+ * loss.
2194
+ */
2195
+ toAgent?: LineCustom.ToAgent;
2196
+ }
2197
+ namespace LineCustom {
2198
+ /**
2199
+ * The agent's audio on its way to the caller: what the caller hears. Omit for no
2200
+ * loss.
2201
+ */
2202
+ interface FromAgent {
2203
+ /**
2204
+ * Share of packets lost, 0 to 20 in steps of 0.5.
2205
+ */
2206
+ packetLossPercent: number;
2207
+ /**
2208
+ * Mean length of a loss gap in 20 ms packets, 2 to 10. Omit for random loss.
2209
+ */
2210
+ meanBurstPackets?: number;
2211
+ }
2212
+ /**
2213
+ * The caller's audio on its way to the agent: what the agent hears. Omit for no
2214
+ * loss.
2215
+ */
2216
+ interface ToAgent {
2217
+ /**
2218
+ * Share of packets lost, 0 to 20 in steps of 0.5.
2219
+ */
2220
+ packetLossPercent: number;
2221
+ /**
2222
+ * Mean length of a loss gap in 20 ms packets, 2 to 10. Omit for random loss.
2223
+ */
2224
+ meanBurstPackets?: number;
2225
+ }
2226
+ }
2227
+ }
1777
2228
  /**
1778
2229
  * The persona this runs as instead of the happy path's. Null means it inherits.
1779
2230
  */
@@ -1841,9 +2292,11 @@ export declare namespace CustomerFlowEdgeCasePromoteResponse {
1841
2292
  * How much the persona talks over the agent while it is still speaking. OFF waits
1842
2293
  * its turn. BACKCHANNEL makes listening noises ("mm-hm") over the agent without
1843
2294
  * taking the floor, which tests whether the agent wrongly stops for them.
1844
- * OCCASIONAL adds cutting in on some long agent turns, HEAVY on most of them.
1845
- * Timing is randomised per turn, so two runs of the same persona do not interrupt
1846
- * at identical moments.
2295
+ * OCCASIONAL also cuts in where a caller like this plausibly would, and HEAVY does
2296
+ * so readily, though never on every turn. The moments are chosen from what the
2297
+ * agent is saying, such as reading back a number or starting a long explanation,
2298
+ * not on a timer. A customer flow can also say exactly when to cut in, which
2299
+ * applies at any level.
1847
2300
  */
1848
2301
  interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY';
1849
2302
  /**
@@ -1969,7 +2422,11 @@ export declare namespace CustomerFlowEdgeCasePromoteResponse {
1969
2422
  /**
1970
2423
  * The brief the simulated customer improvises from. A `@{persona:<id>}` mention
1971
2424
  * hands the phone to that persona mid-call; the sentences around the mention say
1972
- * when.
2425
+ * when. Caller cues steer the caller from that point in the brief:
2426
+ * `#{emotion:<emotion>}`, `#{language:<ISO 639-1 code>}`,
2427
+ * `#{noise:<environmentId>}`, and `#{interrupt}`, whose sentence says when to cut
2428
+ * in on your agent. Cues are voice only. See "Caller cues" in the customer flows
2429
+ * concept.
1973
2430
  */
1974
2431
  prompt?: string | null;
1975
2432
  systemKey?: string | null;
@@ -1998,6 +2455,20 @@ export declare namespace CustomerFlowEdgeCasePromoteResponse {
1998
2455
  * Creation timestamp in ISO 8601 format
1999
2456
  */
2000
2457
  createdAt: string;
2458
+ /**
2459
+ * The per-direction loss of a CUSTOM line.
2460
+ */
2461
+ lineCustom: Environment.LineCustom | null;
2462
+ /**
2463
+ * The phone line the simulated caller is on: packet loss applied to its 20 ms
2464
+ * audio packets, per direction. The loss pattern is seeded per call, so a redial
2465
+ * loses the same packets. CLEAR: No loss. MINOR_LOSS: 1% random, both ways.
2466
+ * CELL_EDGE: 5% in 80 ms gaps, both ways. POOR_CONNECTION: 10% in 120 ms gaps,
2467
+ * both ways. ONE_WAY_DEGRADED: 8% in 80 ms gaps, toward the agent only. CUSTOM:
2468
+ * the per-direction loss in `lineCustom`, up to 20% in 0.5 steps, with a mean
2469
+ * burst of up to 10 packets (omit it for random loss).
2470
+ */
2471
+ lineQuality: 'CLEAR' | 'MINOR_LOSS' | 'CELL_EDGE' | 'POOR_CONNECTION' | 'ONE_WAY_DEGRADED' | 'CUSTOM';
2001
2472
  name: string;
2002
2473
  /**
2003
2474
  * Last update timestamp in ISO 8601 format
@@ -2005,6 +2476,53 @@ export declare namespace CustomerFlowEdgeCasePromoteResponse {
2005
2476
  updatedAt: string;
2006
2477
  description?: string | null;
2007
2478
  }
2479
+ namespace Environment {
2480
+ /**
2481
+ * The per-direction loss of a CUSTOM line.
2482
+ */
2483
+ interface LineCustom {
2484
+ /**
2485
+ * The agent's audio on its way to the caller: what the caller hears. Omit for no
2486
+ * loss.
2487
+ */
2488
+ fromAgent?: LineCustom.FromAgent;
2489
+ /**
2490
+ * The caller's audio on its way to the agent: what the agent hears. Omit for no
2491
+ * loss.
2492
+ */
2493
+ toAgent?: LineCustom.ToAgent;
2494
+ }
2495
+ namespace LineCustom {
2496
+ /**
2497
+ * The agent's audio on its way to the caller: what the caller hears. Omit for no
2498
+ * loss.
2499
+ */
2500
+ interface FromAgent {
2501
+ /**
2502
+ * Share of packets lost, 0 to 20 in steps of 0.5.
2503
+ */
2504
+ packetLossPercent: number;
2505
+ /**
2506
+ * Mean length of a loss gap in 20 ms packets, 2 to 10. Omit for random loss.
2507
+ */
2508
+ meanBurstPackets?: number;
2509
+ }
2510
+ /**
2511
+ * The caller's audio on its way to the agent: what the agent hears. Omit for no
2512
+ * loss.
2513
+ */
2514
+ interface ToAgent {
2515
+ /**
2516
+ * Share of packets lost, 0 to 20 in steps of 0.5.
2517
+ */
2518
+ packetLossPercent: number;
2519
+ /**
2520
+ * Mean length of a loss gap in 20 ms packets, 2 to 10. Omit for random loss.
2521
+ */
2522
+ meanBurstPackets?: number;
2523
+ }
2524
+ }
2525
+ }
2008
2526
  interface HandoffPersona {
2009
2527
  /**
2010
2528
  * Unique identifier of the persona
@@ -2069,9 +2587,11 @@ export declare namespace CustomerFlowEdgeCasePromoteResponse {
2069
2587
  * How much the persona talks over the agent while it is still speaking. OFF waits
2070
2588
  * its turn. BACKCHANNEL makes listening noises ("mm-hm") over the agent without
2071
2589
  * taking the floor, which tests whether the agent wrongly stops for them.
2072
- * OCCASIONAL adds cutting in on some long agent turns, HEAVY on most of them.
2073
- * Timing is randomised per turn, so two runs of the same persona do not interrupt
2074
- * at identical moments.
2590
+ * OCCASIONAL also cuts in where a caller like this plausibly would, and HEAVY does
2591
+ * so readily, though never on every turn. The moments are chosen from what the
2592
+ * agent is saying, such as reading back a number or starting a long explanation,
2593
+ * not on a timer. A customer flow can also say exactly when to cut in, which
2594
+ * applies at any level.
2075
2595
  */
2076
2596
  interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY';
2077
2597
  /**
@@ -2210,9 +2730,11 @@ export declare namespace CustomerFlowEdgeCasePromoteResponse {
2210
2730
  * How much the persona talks over the agent while it is still speaking. OFF waits
2211
2731
  * its turn. BACKCHANNEL makes listening noises ("mm-hm") over the agent without
2212
2732
  * taking the floor, which tests whether the agent wrongly stops for them.
2213
- * OCCASIONAL adds cutting in on some long agent turns, HEAVY on most of them.
2214
- * Timing is randomised per turn, so two runs of the same persona do not interrupt
2215
- * at identical moments.
2733
+ * OCCASIONAL also cuts in where a caller like this plausibly would, and HEAVY does
2734
+ * so readily, though never on every turn. The moments are chosen from what the
2735
+ * agent is saying, such as reading back a number or starting a long explanation,
2736
+ * not on a timer. A customer flow can also say exactly when to cut in, which
2737
+ * applies at any level.
2216
2738
  */
2217
2739
  interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY';
2218
2740
  /**
@@ -2350,6 +2872,20 @@ export declare namespace CustomerFlowEdgeCasePromoteResponse {
2350
2872
  * Creation timestamp in ISO 8601 format
2351
2873
  */
2352
2874
  createdAt: string;
2875
+ /**
2876
+ * The per-direction loss of a CUSTOM line.
2877
+ */
2878
+ lineCustom: Environment.LineCustom | null;
2879
+ /**
2880
+ * The phone line the simulated caller is on: packet loss applied to its 20 ms
2881
+ * audio packets, per direction. The loss pattern is seeded per call, so a redial
2882
+ * loses the same packets. CLEAR: No loss. MINOR_LOSS: 1% random, both ways.
2883
+ * CELL_EDGE: 5% in 80 ms gaps, both ways. POOR_CONNECTION: 10% in 120 ms gaps,
2884
+ * both ways. ONE_WAY_DEGRADED: 8% in 80 ms gaps, toward the agent only. CUSTOM:
2885
+ * the per-direction loss in `lineCustom`, up to 20% in 0.5 steps, with a mean
2886
+ * burst of up to 10 packets (omit it for random loss).
2887
+ */
2888
+ lineQuality: 'CLEAR' | 'MINOR_LOSS' | 'CELL_EDGE' | 'POOR_CONNECTION' | 'ONE_WAY_DEGRADED' | 'CUSTOM';
2353
2889
  name: string;
2354
2890
  /**
2355
2891
  * Last update timestamp in ISO 8601 format
@@ -2357,6 +2893,53 @@ export declare namespace CustomerFlowEdgeCasePromoteResponse {
2357
2893
  updatedAt: string;
2358
2894
  description?: string | null;
2359
2895
  }
2896
+ namespace Environment {
2897
+ /**
2898
+ * The per-direction loss of a CUSTOM line.
2899
+ */
2900
+ interface LineCustom {
2901
+ /**
2902
+ * The agent's audio on its way to the caller: what the caller hears. Omit for no
2903
+ * loss.
2904
+ */
2905
+ fromAgent?: LineCustom.FromAgent;
2906
+ /**
2907
+ * The caller's audio on its way to the agent: what the agent hears. Omit for no
2908
+ * loss.
2909
+ */
2910
+ toAgent?: LineCustom.ToAgent;
2911
+ }
2912
+ namespace LineCustom {
2913
+ /**
2914
+ * The agent's audio on its way to the caller: what the caller hears. Omit for no
2915
+ * loss.
2916
+ */
2917
+ interface FromAgent {
2918
+ /**
2919
+ * Share of packets lost, 0 to 20 in steps of 0.5.
2920
+ */
2921
+ packetLossPercent: number;
2922
+ /**
2923
+ * Mean length of a loss gap in 20 ms packets, 2 to 10. Omit for random loss.
2924
+ */
2925
+ meanBurstPackets?: number;
2926
+ }
2927
+ /**
2928
+ * The caller's audio on its way to the agent: what the agent hears. Omit for no
2929
+ * loss.
2930
+ */
2931
+ interface ToAgent {
2932
+ /**
2933
+ * Share of packets lost, 0 to 20 in steps of 0.5.
2934
+ */
2935
+ packetLossPercent: number;
2936
+ /**
2937
+ * Mean length of a loss gap in 20 ms packets, 2 to 10. Omit for random loss.
2938
+ */
2939
+ meanBurstPackets?: number;
2940
+ }
2941
+ }
2942
+ }
2360
2943
  /**
2361
2944
  * The persona this runs as instead of the happy path's. Null means it inherits.
2362
2945
  */
@@ -2424,9 +3007,11 @@ export declare namespace CustomerFlowEdgeCasePromoteResponse {
2424
3007
  * How much the persona talks over the agent while it is still speaking. OFF waits
2425
3008
  * its turn. BACKCHANNEL makes listening noises ("mm-hm") over the agent without
2426
3009
  * taking the floor, which tests whether the agent wrongly stops for them.
2427
- * OCCASIONAL adds cutting in on some long agent turns, HEAVY on most of them.
2428
- * Timing is randomised per turn, so two runs of the same persona do not interrupt
2429
- * at identical moments.
3010
+ * OCCASIONAL also cuts in where a caller like this plausibly would, and HEAVY does
3011
+ * so readily, though never on every turn. The moments are chosen from what the
3012
+ * agent is saying, such as reading back a number or starting a long explanation,
3013
+ * not on a timer. A customer flow can also say exactly when to cut in, which
3014
+ * applies at any level.
2430
3015
  */
2431
3016
  interruption: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY';
2432
3017
  /**
@@ -2552,7 +3137,12 @@ export interface CustomerFlowEdgeCaseUpdateParams {
2552
3137
  */
2553
3138
  precededByCustomerFlowVariantId?: string | null;
2554
3139
  /**
2555
- * Body param
3140
+ * Body param: Improv flows only. The brief the simulated customer improvises from.
3141
+ * Caller cues steer the caller from that point in the brief:
3142
+ * `#{emotion:<emotion>}`, `#{language:<ISO 639-1 code>}`,
3143
+ * `#{noise:<environmentId>}`, and `#{interrupt}`, whose sentence says when to cut
3144
+ * in on your agent. Cues are voice only. See "Caller cues" in the customer flows
3145
+ * concept.
2556
3146
  */
2557
3147
  prompt?: string | null;
2558
3148
  /**
@@ -2592,6 +3182,13 @@ export interface CustomerFlowEdgeCaseAddParams {
2592
3182
  personaOverrideId?: string | null;
2593
3183
  precededByCustomerFlowId?: string | null;
2594
3184
  precededByCustomerFlowVariantId?: string | null;
3185
+ /**
3186
+ * The brief the simulated customer improvises from. Caller cues steer the caller
3187
+ * from that point in the brief: `#{emotion:<emotion>}`,
3188
+ * `#{language:<ISO 639-1 code>}`, `#{noise:<environmentId>}`, and `#{interrupt}`,
3189
+ * whose sentence says when to cut in on your agent. Cues are voice only. See
3190
+ * "Caller cues" in the customer flows concept.
3191
+ */
2595
3192
  prompt?: string | null;
2596
3193
  }
2597
3194
  export declare namespace CustomerFlowEdgeCaseAddParams {