@roarkanalytics/sdk 2.30.0 → 2.33.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 (245) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/api-promise.d.mts +1 -0
  3. package/api-promise.d.mts.map +1 -1
  4. package/api-promise.d.ts +1 -0
  5. package/api-promise.d.ts.map +1 -1
  6. package/api-promise.mjs +1 -0
  7. package/api-promise.mjs.map +1 -1
  8. package/client.d.mts +17 -5
  9. package/client.d.mts.map +1 -1
  10. package/client.d.ts +17 -5
  11. package/client.d.ts.map +1 -1
  12. package/client.js +35 -4
  13. package/client.js.map +1 -1
  14. package/client.mjs +35 -4
  15. package/client.mjs.map +1 -1
  16. package/core/api-promise.d.mts.map +1 -1
  17. package/core/api-promise.d.ts.map +1 -1
  18. package/core/api-promise.mjs.map +1 -1
  19. package/core/error.mjs.map +1 -1
  20. package/core/resource.d.mts.map +1 -1
  21. package/core/resource.d.ts.map +1 -1
  22. package/core/uploads.d.mts.map +1 -1
  23. package/core/uploads.d.ts.map +1 -1
  24. package/core/uploads.mjs.map +1 -1
  25. package/error.d.mts +1 -0
  26. package/error.d.mts.map +1 -1
  27. package/error.d.ts +1 -0
  28. package/error.d.ts.map +1 -1
  29. package/error.mjs +1 -0
  30. package/error.mjs.map +1 -1
  31. package/index.d.mts.map +1 -1
  32. package/index.d.ts.map +1 -1
  33. package/index.mjs.map +1 -1
  34. package/internal/detect-platform.mjs.map +1 -1
  35. package/internal/headers.mjs.map +1 -1
  36. package/internal/parse.d.mts.map +1 -1
  37. package/internal/parse.d.ts.map +1 -1
  38. package/internal/parse.mjs.map +1 -1
  39. package/internal/qs/formats.d.mts.map +1 -1
  40. package/internal/qs/formats.d.ts.map +1 -1
  41. package/internal/qs/index.d.mts +2 -2
  42. package/internal/qs/index.d.mts.map +1 -1
  43. package/internal/qs/index.d.ts +2 -2
  44. package/internal/qs/index.d.ts.map +1 -1
  45. package/internal/qs/index.mjs.map +1 -1
  46. package/internal/qs/stringify.d.mts.map +1 -1
  47. package/internal/qs/stringify.d.ts.map +1 -1
  48. package/internal/qs/stringify.mjs.map +1 -1
  49. package/internal/qs/utils.d.mts.map +1 -1
  50. package/internal/qs/utils.d.ts.map +1 -1
  51. package/internal/qs/utils.mjs.map +1 -1
  52. package/internal/request-options.d.mts.map +1 -1
  53. package/internal/request-options.d.ts.map +1 -1
  54. package/internal/shims.d.mts +6 -0
  55. package/internal/shims.d.mts.map +1 -1
  56. package/internal/shims.d.ts +6 -0
  57. package/internal/shims.d.ts.map +1 -1
  58. package/internal/to-file.d.mts.map +1 -1
  59. package/internal/to-file.d.ts.map +1 -1
  60. package/internal/to-file.mjs.map +1 -1
  61. package/internal/types.d.mts +10 -10
  62. package/internal/types.d.mts.map +1 -1
  63. package/internal/types.d.ts +10 -10
  64. package/internal/types.d.ts.map +1 -1
  65. package/internal/uploads.d.mts.map +1 -1
  66. package/internal/uploads.d.ts.map +1 -1
  67. package/internal/uploads.mjs.map +1 -1
  68. package/internal/utils/base64.mjs.map +1 -1
  69. package/internal/utils/log.d.mts.map +1 -1
  70. package/internal/utils/log.d.ts.map +1 -1
  71. package/internal/utils/log.js +2 -0
  72. package/internal/utils/log.js.map +1 -1
  73. package/internal/utils/log.mjs +2 -0
  74. package/internal/utils/log.mjs.map +1 -1
  75. package/internal/utils/path.mjs.map +1 -1
  76. package/internal/utils/query.mjs.map +1 -1
  77. package/internal/utils/values.mjs.map +1 -1
  78. package/internal/utils.d.mts.map +1 -1
  79. package/internal/utils.d.ts.map +1 -1
  80. package/internal/utils.mjs.map +1 -1
  81. package/package.json +1 -1
  82. package/resource.d.mts +1 -0
  83. package/resource.d.mts.map +1 -1
  84. package/resource.d.ts +1 -0
  85. package/resource.d.ts.map +1 -1
  86. package/resource.mjs +1 -0
  87. package/resource.mjs.map +1 -1
  88. package/resources/agent-endpoint.d.mts +4 -4
  89. package/resources/agent-endpoint.d.mts.map +1 -1
  90. package/resources/agent-endpoint.d.ts +4 -4
  91. package/resources/agent-endpoint.d.ts.map +1 -1
  92. package/resources/agent-endpoint.mjs.map +1 -1
  93. package/resources/agent.d.mts.map +1 -1
  94. package/resources/agent.d.ts.map +1 -1
  95. package/resources/agent.mjs.map +1 -1
  96. package/resources/call.d.mts +310 -162
  97. package/resources/call.d.mts.map +1 -1
  98. package/resources/call.d.ts +310 -162
  99. package/resources/call.d.ts.map +1 -1
  100. package/resources/call.js +6 -7
  101. package/resources/call.js.map +1 -1
  102. package/resources/call.mjs +6 -7
  103. package/resources/call.mjs.map +1 -1
  104. package/resources/config.d.mts +535 -0
  105. package/resources/config.d.mts.map +1 -0
  106. package/resources/config.d.ts +535 -0
  107. package/resources/config.d.ts.map +1 -0
  108. package/resources/config.js +28 -0
  109. package/resources/config.js.map +1 -0
  110. package/resources/config.mjs +24 -0
  111. package/resources/config.mjs.map +1 -0
  112. package/resources/customer-flow-edge-case.d.mts +1742 -0
  113. package/resources/customer-flow-edge-case.d.mts.map +1 -0
  114. package/resources/customer-flow-edge-case.d.ts +1742 -0
  115. package/resources/customer-flow-edge-case.d.ts.map +1 -0
  116. package/resources/customer-flow-edge-case.js +50 -0
  117. package/resources/customer-flow-edge-case.js.map +1 -0
  118. package/resources/customer-flow-edge-case.mjs +46 -0
  119. package/resources/customer-flow-edge-case.mjs.map +1 -0
  120. package/resources/customer-flow.d.mts +7163 -0
  121. package/resources/customer-flow.d.mts.map +1 -0
  122. package/resources/customer-flow.d.ts +7163 -0
  123. package/resources/customer-flow.d.ts.map +1 -0
  124. package/resources/customer-flow.js +87 -0
  125. package/resources/customer-flow.js.map +1 -0
  126. package/resources/customer-flow.mjs +83 -0
  127. package/resources/customer-flow.mjs.map +1 -0
  128. package/resources/health.d.mts.map +1 -1
  129. package/resources/health.d.ts.map +1 -1
  130. package/resources/health.mjs.map +1 -1
  131. package/resources/http-request-definition.d.mts.map +1 -1
  132. package/resources/http-request-definition.d.ts.map +1 -1
  133. package/resources/http-request-definition.mjs.map +1 -1
  134. package/resources/index.d.mts +6 -2
  135. package/resources/index.d.mts.map +1 -1
  136. package/resources/index.d.ts +6 -2
  137. package/resources/index.d.ts.map +1 -1
  138. package/resources/index.js +11 -3
  139. package/resources/index.js.map +1 -1
  140. package/resources/index.mjs +5 -1
  141. package/resources/index.mjs.map +1 -1
  142. package/resources/metric-collection-job.d.mts +5 -3
  143. package/resources/metric-collection-job.d.mts.map +1 -1
  144. package/resources/metric-collection-job.d.ts +5 -3
  145. package/resources/metric-collection-job.d.ts.map +1 -1
  146. package/resources/metric-collection-job.mjs.map +1 -1
  147. package/resources/metric-policy.d.mts.map +1 -1
  148. package/resources/metric-policy.d.ts.map +1 -1
  149. package/resources/metric-policy.mjs.map +1 -1
  150. package/resources/metric.d.mts +804 -109
  151. package/resources/metric.d.mts.map +1 -1
  152. package/resources/metric.d.ts +804 -109
  153. package/resources/metric.d.ts.map +1 -1
  154. package/resources/metric.js +6 -7
  155. package/resources/metric.js.map +1 -1
  156. package/resources/metric.mjs +6 -7
  157. package/resources/metric.mjs.map +1 -1
  158. package/resources/simulation-environment.d.mts +95 -0
  159. package/resources/simulation-environment.d.mts.map +1 -0
  160. package/resources/simulation-environment.d.ts +95 -0
  161. package/resources/simulation-environment.d.ts.map +1 -0
  162. package/resources/simulation-environment.js +24 -0
  163. package/resources/simulation-environment.js.map +1 -0
  164. package/resources/simulation-environment.mjs +20 -0
  165. package/resources/simulation-environment.mjs.map +1 -0
  166. package/resources/simulation-job.d.mts +58 -10
  167. package/resources/simulation-job.d.mts.map +1 -1
  168. package/resources/simulation-job.d.ts +58 -10
  169. package/resources/simulation-job.d.ts.map +1 -1
  170. package/resources/simulation-job.mjs.map +1 -1
  171. package/resources/simulation-persona.d.mts +60 -24
  172. package/resources/simulation-persona.d.mts.map +1 -1
  173. package/resources/simulation-persona.d.ts +60 -24
  174. package/resources/simulation-persona.d.ts.map +1 -1
  175. package/resources/simulation-persona.mjs.map +1 -1
  176. package/resources/simulation-run-plan-job.d.mts +73 -32
  177. package/resources/simulation-run-plan-job.d.mts.map +1 -1
  178. package/resources/simulation-run-plan-job.d.ts +73 -32
  179. package/resources/simulation-run-plan-job.d.ts.map +1 -1
  180. package/resources/simulation-run-plan-job.js +7 -8
  181. package/resources/simulation-run-plan-job.js.map +1 -1
  182. package/resources/simulation-run-plan-job.mjs +7 -8
  183. package/resources/simulation-run-plan-job.mjs.map +1 -1
  184. package/resources/simulation-run-plan.d.mts +408 -39
  185. package/resources/simulation-run-plan.d.mts.map +1 -1
  186. package/resources/simulation-run-plan.d.ts +408 -39
  187. package/resources/simulation-run-plan.d.ts.map +1 -1
  188. package/resources/simulation-run-plan.js +6 -11
  189. package/resources/simulation-run-plan.js.map +1 -1
  190. package/resources/simulation-run-plan.mjs +6 -11
  191. package/resources/simulation-run-plan.mjs.map +1 -1
  192. package/resources/simulation.d.mts +379 -0
  193. package/resources/simulation.d.mts.map +1 -0
  194. package/resources/simulation.d.ts +379 -0
  195. package/resources/simulation.d.ts.map +1 -0
  196. package/resources/simulation.js +33 -0
  197. package/resources/simulation.js.map +1 -0
  198. package/resources/simulation.mjs +29 -0
  199. package/resources/simulation.mjs.map +1 -0
  200. package/resources/webhook.d.mts +4 -4
  201. package/resources/webhook.d.mts.map +1 -1
  202. package/resources/webhook.d.ts +4 -4
  203. package/resources/webhook.d.ts.map +1 -1
  204. package/resources/webhook.mjs.map +1 -1
  205. package/resources.d.mts.map +1 -1
  206. package/resources.d.ts.map +1 -1
  207. package/resources.mjs.map +1 -1
  208. package/src/client.ts +124 -28
  209. package/src/internal/types.ts +6 -8
  210. package/src/internal/utils/log.ts +2 -0
  211. package/src/resources/agent-endpoint.ts +36 -4
  212. package/src/resources/call.ts +333 -176
  213. package/src/resources/config.ts +1162 -0
  214. package/src/resources/customer-flow-edge-case.ts +2884 -0
  215. package/src/resources/customer-flow.ts +11713 -0
  216. package/src/resources/index.ts +42 -12
  217. package/src/resources/metric-collection-job.ts +5 -3
  218. package/src/resources/metric.ts +1057 -115
  219. package/src/resources/simulation-environment.ts +147 -0
  220. package/src/resources/simulation-job.ts +122 -10
  221. package/src/resources/simulation-persona.ts +192 -24
  222. package/src/resources/simulation-run-plan-job.ts +109 -27
  223. package/src/resources/simulation-run-plan.ts +445 -40
  224. package/src/resources/simulation.ts +444 -0
  225. package/src/resources/webhook.ts +8 -0
  226. package/src/version.ts +1 -1
  227. package/uploads.d.mts +1 -0
  228. package/uploads.d.mts.map +1 -1
  229. package/uploads.d.ts +1 -0
  230. package/uploads.d.ts.map +1 -1
  231. package/uploads.mjs +1 -0
  232. package/uploads.mjs.map +1 -1
  233. package/version.d.mts +1 -1
  234. package/version.d.ts +1 -1
  235. package/version.js +1 -1
  236. package/version.mjs +1 -1
  237. package/resources/simulation-scenario.d.mts +0 -424
  238. package/resources/simulation-scenario.d.mts.map +0 -1
  239. package/resources/simulation-scenario.d.ts +0 -424
  240. package/resources/simulation-scenario.d.ts.map +0 -1
  241. package/resources/simulation-scenario.js +0 -40
  242. package/resources/simulation-scenario.js.map +0 -1
  243. package/resources/simulation-scenario.mjs +0 -36
  244. package/resources/simulation-scenario.mjs.map +0 -1
  245. package/src/resources/simulation-scenario.ts +0 -602
@@ -112,7 +112,8 @@ export namespace SimulationPersonaCreateResponse {
112
112
  | 'MY'
113
113
  | 'HK'
114
114
  | 'TR'
115
- | 'PT';
115
+ | 'PT'
116
+ | 'IL';
116
117
 
117
118
  /**
118
119
  * Background noise setting
@@ -163,9 +164,10 @@ export namespace SimulationPersonaCreateResponse {
163
164
  idleMessageResetCountOnUserSpeechEnabled: boolean;
164
165
 
165
166
  /**
166
- * Messages the persona will say when the agent goes silent during a call
167
+ * Messages the persona will say when the agent goes silent during a call. null =
168
+ * "Automatic": language-appropriate defaults are used at call time.
167
169
  */
168
- idleMessages: Array<string>;
170
+ idleMessages: Array<string> | null;
169
171
 
170
172
  /**
171
173
  * Seconds of silence before the persona sends an idle message
@@ -197,7 +199,8 @@ export namespace SimulationPersonaCreateResponse {
197
199
  | 'MS'
198
200
  | 'ZH'
199
201
  | 'TR'
200
- | 'PT';
202
+ | 'PT'
203
+ | 'HE';
201
204
 
202
205
  /**
203
206
  * How reliable the persona's memory is
@@ -230,6 +233,31 @@ export namespace SimulationPersonaCreateResponse {
230
233
  */
231
234
  speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
232
235
 
236
+ /**
237
+ * Languages the persona can understand. Multilingual combinations are limited by
238
+ * multilingual speech recognition support.
239
+ */
240
+ understoodLanguages: Array<
241
+ | 'EN'
242
+ | 'ES'
243
+ | 'DE'
244
+ | 'HI'
245
+ | 'FR'
246
+ | 'NL'
247
+ | 'AR'
248
+ | 'EL'
249
+ | 'IT'
250
+ | 'ID'
251
+ | 'TH'
252
+ | 'JA'
253
+ | 'TL'
254
+ | 'MS'
255
+ | 'ZH'
256
+ | 'TR'
257
+ | 'PT'
258
+ | 'HE'
259
+ >;
260
+
233
261
  /**
234
262
  * Last update timestamp
235
263
  */
@@ -289,7 +317,8 @@ export namespace SimulationPersonaUpdateResponse {
289
317
  | 'MY'
290
318
  | 'HK'
291
319
  | 'TR'
292
- | 'PT';
320
+ | 'PT'
321
+ | 'IL';
293
322
 
294
323
  /**
295
324
  * Background noise setting
@@ -340,9 +369,10 @@ export namespace SimulationPersonaUpdateResponse {
340
369
  idleMessageResetCountOnUserSpeechEnabled: boolean;
341
370
 
342
371
  /**
343
- * Messages the persona will say when the agent goes silent during a call
372
+ * Messages the persona will say when the agent goes silent during a call. null =
373
+ * "Automatic": language-appropriate defaults are used at call time.
344
374
  */
345
- idleMessages: Array<string>;
375
+ idleMessages: Array<string> | null;
346
376
 
347
377
  /**
348
378
  * Seconds of silence before the persona sends an idle message
@@ -374,7 +404,8 @@ export namespace SimulationPersonaUpdateResponse {
374
404
  | 'MS'
375
405
  | 'ZH'
376
406
  | 'TR'
377
- | 'PT';
407
+ | 'PT'
408
+ | 'HE';
378
409
 
379
410
  /**
380
411
  * How reliable the persona's memory is
@@ -407,6 +438,31 @@ export namespace SimulationPersonaUpdateResponse {
407
438
  */
408
439
  speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
409
440
 
441
+ /**
442
+ * Languages the persona can understand. Multilingual combinations are limited by
443
+ * multilingual speech recognition support.
444
+ */
445
+ understoodLanguages: Array<
446
+ | 'EN'
447
+ | 'ES'
448
+ | 'DE'
449
+ | 'HI'
450
+ | 'FR'
451
+ | 'NL'
452
+ | 'AR'
453
+ | 'EL'
454
+ | 'IT'
455
+ | 'ID'
456
+ | 'TH'
457
+ | 'JA'
458
+ | 'TL'
459
+ | 'MS'
460
+ | 'ZH'
461
+ | 'TR'
462
+ | 'PT'
463
+ | 'HE'
464
+ >;
465
+
410
466
  /**
411
467
  * Last update timestamp
412
468
  */
@@ -468,7 +524,8 @@ export namespace SimulationPersonaListResponse {
468
524
  | 'MY'
469
525
  | 'HK'
470
526
  | 'TR'
471
- | 'PT';
527
+ | 'PT'
528
+ | 'IL';
472
529
 
473
530
  /**
474
531
  * Background noise setting
@@ -519,9 +576,10 @@ export namespace SimulationPersonaListResponse {
519
576
  idleMessageResetCountOnUserSpeechEnabled: boolean;
520
577
 
521
578
  /**
522
- * Messages the persona will say when the agent goes silent during a call
579
+ * Messages the persona will say when the agent goes silent during a call. null =
580
+ * "Automatic": language-appropriate defaults are used at call time.
523
581
  */
524
- idleMessages: Array<string>;
582
+ idleMessages: Array<string> | null;
525
583
 
526
584
  /**
527
585
  * Seconds of silence before the persona sends an idle message
@@ -553,7 +611,8 @@ export namespace SimulationPersonaListResponse {
553
611
  | 'MS'
554
612
  | 'ZH'
555
613
  | 'TR'
556
- | 'PT';
614
+ | 'PT'
615
+ | 'HE';
557
616
 
558
617
  /**
559
618
  * How reliable the persona's memory is
@@ -586,6 +645,31 @@ export namespace SimulationPersonaListResponse {
586
645
  */
587
646
  speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
588
647
 
648
+ /**
649
+ * Languages the persona can understand. Multilingual combinations are limited by
650
+ * multilingual speech recognition support.
651
+ */
652
+ understoodLanguages: Array<
653
+ | 'EN'
654
+ | 'ES'
655
+ | 'DE'
656
+ | 'HI'
657
+ | 'FR'
658
+ | 'NL'
659
+ | 'AR'
660
+ | 'EL'
661
+ | 'IT'
662
+ | 'ID'
663
+ | 'TH'
664
+ | 'JA'
665
+ | 'TL'
666
+ | 'MS'
667
+ | 'ZH'
668
+ | 'TR'
669
+ | 'PT'
670
+ | 'HE'
671
+ >;
672
+
589
673
  /**
590
674
  * Last update timestamp
591
675
  */
@@ -662,7 +746,8 @@ export namespace SimulationPersonaGetByIDResponse {
662
746
  | 'MY'
663
747
  | 'HK'
664
748
  | 'TR'
665
- | 'PT';
749
+ | 'PT'
750
+ | 'IL';
666
751
 
667
752
  /**
668
753
  * Background noise setting
@@ -713,9 +798,10 @@ export namespace SimulationPersonaGetByIDResponse {
713
798
  idleMessageResetCountOnUserSpeechEnabled: boolean;
714
799
 
715
800
  /**
716
- * Messages the persona will say when the agent goes silent during a call
801
+ * Messages the persona will say when the agent goes silent during a call. null =
802
+ * "Automatic": language-appropriate defaults are used at call time.
717
803
  */
718
- idleMessages: Array<string>;
804
+ idleMessages: Array<string> | null;
719
805
 
720
806
  /**
721
807
  * Seconds of silence before the persona sends an idle message
@@ -747,7 +833,8 @@ export namespace SimulationPersonaGetByIDResponse {
747
833
  | 'MS'
748
834
  | 'ZH'
749
835
  | 'TR'
750
- | 'PT';
836
+ | 'PT'
837
+ | 'HE';
751
838
 
752
839
  /**
753
840
  * How reliable the persona's memory is
@@ -780,6 +867,31 @@ export namespace SimulationPersonaGetByIDResponse {
780
867
  */
781
868
  speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
782
869
 
870
+ /**
871
+ * Languages the persona can understand. Multilingual combinations are limited by
872
+ * multilingual speech recognition support.
873
+ */
874
+ understoodLanguages: Array<
875
+ | 'EN'
876
+ | 'ES'
877
+ | 'DE'
878
+ | 'HI'
879
+ | 'FR'
880
+ | 'NL'
881
+ | 'AR'
882
+ | 'EL'
883
+ | 'IT'
884
+ | 'ID'
885
+ | 'TH'
886
+ | 'JA'
887
+ | 'TL'
888
+ | 'MS'
889
+ | 'ZH'
890
+ | 'TR'
891
+ | 'PT'
892
+ | 'HE'
893
+ >;
894
+
783
895
  /**
784
896
  * Last update timestamp
785
897
  */
@@ -829,7 +941,8 @@ export interface SimulationPersonaCreateParams {
829
941
  | 'MY'
830
942
  | 'HK'
831
943
  | 'TR'
832
- | 'PT';
944
+ | 'PT'
945
+ | 'IL';
833
946
 
834
947
  /**
835
948
  * Gender of the persona
@@ -856,7 +969,8 @@ export interface SimulationPersonaCreateParams {
856
969
  | 'MS'
857
970
  | 'ZH'
858
971
  | 'TR'
859
- | 'PT';
972
+ | 'PT'
973
+ | 'HE';
860
974
 
861
975
  /**
862
976
  * The name the agent will identify as during conversations
@@ -912,9 +1026,10 @@ export interface SimulationPersonaCreateParams {
912
1026
  idleMessageResetCountOnUserSpeechEnabled?: boolean;
913
1027
 
914
1028
  /**
915
- * Messages the persona will say when the agent goes silent during a call
1029
+ * Messages the persona will say when the agent goes silent during a call. Defaults
1030
+ * to language-appropriate phrases when omitted or sent as null.
916
1031
  */
917
- idleMessages?: Array<string>;
1032
+ idleMessages?: Array<string> | null;
918
1033
 
919
1034
  /**
920
1035
  * Seconds of silence before the persona sends an idle message
@@ -956,6 +1071,31 @@ export interface SimulationPersonaCreateParams {
956
1071
  * Speech pace of the persona
957
1072
  */
958
1073
  speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
1074
+
1075
+ /**
1076
+ * Languages the persona can understand. Defaults to the languages the persona
1077
+ * speaks.
1078
+ */
1079
+ understoodLanguages?: Array<
1080
+ | 'EN'
1081
+ | 'ES'
1082
+ | 'DE'
1083
+ | 'HI'
1084
+ | 'FR'
1085
+ | 'NL'
1086
+ | 'AR'
1087
+ | 'EL'
1088
+ | 'IT'
1089
+ | 'ID'
1090
+ | 'TH'
1091
+ | 'JA'
1092
+ | 'TL'
1093
+ | 'MS'
1094
+ | 'ZH'
1095
+ | 'TR'
1096
+ | 'PT'
1097
+ | 'HE'
1098
+ >;
959
1099
  }
960
1100
 
961
1101
  export interface SimulationPersonaUpdateParams {
@@ -985,7 +1125,8 @@ export interface SimulationPersonaUpdateParams {
985
1125
  | 'MY'
986
1126
  | 'HK'
987
1127
  | 'TR'
988
- | 'PT';
1128
+ | 'PT'
1129
+ | 'IL';
989
1130
 
990
1131
  /**
991
1132
  * Background noise setting
@@ -1041,9 +1182,10 @@ export interface SimulationPersonaUpdateParams {
1041
1182
  idleMessageResetCountOnUserSpeechEnabled?: boolean;
1042
1183
 
1043
1184
  /**
1044
- * Messages the persona will say when the agent goes silent during a call
1185
+ * Messages the persona will say when the agent goes silent during a call. null =
1186
+ * "Automatic": language-appropriate defaults are used at call time.
1045
1187
  */
1046
- idleMessages?: Array<string>;
1188
+ idleMessages?: Array<string> | null;
1047
1189
 
1048
1190
  /**
1049
1191
  * Seconds of silence before the persona sends an idle message
@@ -1075,7 +1217,8 @@ export interface SimulationPersonaUpdateParams {
1075
1217
  | 'MS'
1076
1218
  | 'ZH'
1077
1219
  | 'TR'
1078
- | 'PT';
1220
+ | 'PT'
1221
+ | 'HE';
1079
1222
 
1080
1223
  /**
1081
1224
  * How reliable the persona's memory is
@@ -1112,6 +1255,31 @@ export interface SimulationPersonaUpdateParams {
1112
1255
  * Speech pace of the persona
1113
1256
  */
1114
1257
  speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
1258
+
1259
+ /**
1260
+ * Languages the persona can understand. Multilingual combinations are limited by
1261
+ * multilingual speech recognition support.
1262
+ */
1263
+ understoodLanguages?: Array<
1264
+ | 'EN'
1265
+ | 'ES'
1266
+ | 'DE'
1267
+ | 'HI'
1268
+ | 'FR'
1269
+ | 'NL'
1270
+ | 'AR'
1271
+ | 'EL'
1272
+ | 'IT'
1273
+ | 'ID'
1274
+ | 'TH'
1275
+ | 'JA'
1276
+ | 'TL'
1277
+ | 'MS'
1278
+ | 'ZH'
1279
+ | 'TR'
1280
+ | 'PT'
1281
+ | 'HE'
1282
+ >;
1115
1283
  }
1116
1284
 
1117
1285
  export interface SimulationPersonaListParams {
@@ -39,15 +39,14 @@ export class SimulationRunPlanJob extends APIResource {
39
39
  }
40
40
 
41
41
  /**
42
- * Create and execute a job for an existing simulation run plan. Optionally provide
43
- * runtime variables to override plan-defined variables.
42
+ * Deprecated: use POST /v1/simulation/run, which does the same thing and can also
43
+ * take the plan configuration inline, so a one-off run does not have to create a
44
+ * plan first.
44
45
  *
45
- * @example
46
- * ```ts
47
- * const response = await client.simulationRunPlanJob.start(
48
- * '7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f',
49
- * );
50
- * ```
46
+ * Creates and executes a job for an existing simulation run plan. Optionally
47
+ * provide runtime variables to override plan-defined variables.
48
+ *
49
+ * @deprecated
51
50
  */
52
51
  start(
53
52
  planID: unknown,
@@ -92,6 +91,7 @@ export namespace SimulationRunPlanJobListResponse {
92
91
  | 'QUEUED'
93
92
  | 'CREATING_SNAPSHOTS'
94
93
  | 'CREATING_SIMULATIONS'
94
+ | 'PREPARING_CAPACITY'
95
95
  | 'RUNNING_SIMULATIONS'
96
96
  | 'COMPLETED'
97
97
  | 'FAILED'
@@ -102,9 +102,11 @@ export namespace SimulationRunPlanJobListResponse {
102
102
 
103
103
  /**
104
104
  * How the job was triggered (SCHEDULED, USER_TRIGGERED_FROM_UI,
105
- * TRIGGERED_FROM_API, or RE_RUN)
105
+ * TRIGGERED_FROM_API, RE_RUN, or SYSTEM). SYSTEM is used when the job was started
106
+ * by an internal admin acting on behalf of the project (the original user identity
107
+ * is not exposed).
106
108
  */
107
- triggeredBy: 'SCHEDULED' | 'USER_TRIGGERED_FROM_UI' | 'RE_RUN' | 'TRIGGERED_FROM_API';
109
+ triggeredBy: 'SCHEDULED' | 'USER_TRIGGERED_FROM_UI' | 'RE_RUN' | 'TRIGGERED_FROM_API' | 'SYSTEM';
108
110
 
109
111
  /**
110
112
  * When the job ended
@@ -175,6 +177,7 @@ export namespace SimulationRunPlanJobGetByIDResponse {
175
177
  | 'QUEUED'
176
178
  | 'CREATING_SNAPSHOTS'
177
179
  | 'CREATING_SIMULATIONS'
180
+ | 'PREPARING_CAPACITY'
178
181
  | 'RUNNING_SIMULATIONS'
179
182
  | 'COMPLETED'
180
183
  | 'FAILED'
@@ -209,14 +212,16 @@ export namespace SimulationRunPlanJobGetByIDResponse {
209
212
  persona: SimulationJob.Persona;
210
213
 
211
214
  /**
212
- * Processing status
215
+ * Processing status. PENDING until the job starts connecting.
213
216
  */
214
217
  processingStatus:
218
+ | 'PENDING'
215
219
  | 'CONNECTING'
216
220
  | 'WAITING_FOR_OUTBOUND_CALL'
217
221
  | 'SIMULATING'
218
222
  | 'ENDING'
219
223
  | 'ANALYZING'
224
+ | 'WAITING_FOR_LIVE_CONVERSATION'
220
225
  | 'EVALUATING'
221
226
  | 'COLLECTING_METRICS'
222
227
  | 'COMPLETED';
@@ -290,7 +295,15 @@ export namespace SimulationRunPlanJobGetByIDResponse {
290
295
  /**
291
296
  * Agent endpoint type
292
297
  */
293
- type: 'PHONE' | 'WEBSOCKET' | 'LIVEKIT' | 'SMALL_WEBRTC' | 'ELEVENLABS_WS' | 'KORE' | 'GOOGLE_CES';
298
+ type:
299
+ | 'PHONE'
300
+ | 'WEBSOCKET'
301
+ | 'LIVEKIT'
302
+ | 'SMALL_WEBRTC'
303
+ | 'ELEVENLABS_WS'
304
+ | 'KORE'
305
+ | 'GOOGLE_CES'
306
+ | 'DAILY';
294
307
  }
295
308
 
296
309
  export interface Persona {
@@ -325,7 +338,8 @@ export namespace SimulationRunPlanJobGetByIDResponse {
325
338
  | 'MY'
326
339
  | 'HK'
327
340
  | 'TR'
328
- | 'PT';
341
+ | 'PT'
342
+ | 'IL';
329
343
 
330
344
  /**
331
345
  * Background noise setting
@@ -383,9 +397,10 @@ export namespace SimulationRunPlanJobGetByIDResponse {
383
397
  idleMessageResetCountOnUserSpeechEnabled: boolean;
384
398
 
385
399
  /**
386
- * Messages the persona will say when the agent goes silent during a call
400
+ * Messages the persona will say when the agent goes silent during a call. null =
401
+ * "Automatic": language-appropriate defaults are used at call time.
387
402
  */
388
- idleMessages: Array<string>;
403
+ idleMessages: Array<string> | null;
389
404
 
390
405
  /**
391
406
  * Seconds of silence before the persona sends an idle message
@@ -417,7 +432,8 @@ export namespace SimulationRunPlanJobGetByIDResponse {
417
432
  | 'MS'
418
433
  | 'ZH'
419
434
  | 'TR'
420
- | 'PT';
435
+ | 'PT'
436
+ | 'HE';
421
437
 
422
438
  /**
423
439
  * How reliable the persona's memory is
@@ -450,6 +466,31 @@ export namespace SimulationRunPlanJobGetByIDResponse {
450
466
  */
451
467
  speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
452
468
 
469
+ /**
470
+ * Languages the persona can understand. Multilingual combinations are limited by
471
+ * multilingual speech recognition support.
472
+ */
473
+ understoodLanguages: Array<
474
+ | 'EN'
475
+ | 'ES'
476
+ | 'DE'
477
+ | 'HI'
478
+ | 'FR'
479
+ | 'NL'
480
+ | 'AR'
481
+ | 'EL'
482
+ | 'IT'
483
+ | 'ID'
484
+ | 'TH'
485
+ | 'JA'
486
+ | 'TL'
487
+ | 'MS'
488
+ | 'ZH'
489
+ | 'TR'
490
+ | 'PT'
491
+ | 'HE'
492
+ >;
493
+
453
494
  /**
454
495
  * Last update timestamp
455
496
  */
@@ -524,6 +565,7 @@ export namespace SimulationRunPlanJobStartResponse {
524
565
  | 'QUEUED'
525
566
  | 'CREATING_SNAPSHOTS'
526
567
  | 'CREATING_SIMULATIONS'
568
+ | 'PREPARING_CAPACITY'
527
569
  | 'RUNNING_SIMULATIONS'
528
570
  | 'COMPLETED'
529
571
  | 'FAILED'
@@ -562,15 +604,16 @@ export interface SimulationRunPlanJobListParams {
562
604
  simulationRunPlanId?: string;
563
605
 
564
606
  /**
565
- * Filter by plan job status (PENDING, CREATING_SNAPSHOTS, CREATING_SIMULATIONS,
566
- * RUNNING_SIMULATIONS, ENDING_SIMULATIONS, COMPLETED, FAILED, TIMED_OUT,
567
- * CANCELLED, CANCELLING)
607
+ * Filter by plan job status (PENDING, QUEUED, CREATING_SNAPSHOTS,
608
+ * CREATING_SIMULATIONS, PREPARING_CAPACITY, RUNNING_SIMULATIONS, COMPLETED,
609
+ * FAILED, TIMED_OUT, CANCELLED, CANCELLING, ENDING_SIMULATIONS)
568
610
  */
569
611
  status?:
570
612
  | 'PENDING'
571
613
  | 'QUEUED'
572
614
  | 'CREATING_SNAPSHOTS'
573
615
  | 'CREATING_SIMULATIONS'
616
+ | 'PREPARING_CAPACITY'
574
617
  | 'RUNNING_SIMULATIONS'
575
618
  | 'COMPLETED'
576
619
  | 'FAILED'
@@ -582,21 +625,60 @@ export interface SimulationRunPlanJobListParams {
582
625
 
583
626
  export interface SimulationRunPlanJobStartParams {
584
627
  /**
585
- * Runtime variables that override plan-defined scenario variables. Accepts one of
586
- * two formats:
628
+ * Values for the {{variables}} the run resolves, overriding whatever the plan has
629
+ * pinned.
630
+ *
631
+ * An object applies them to the whole run:
632
+ *
633
+ * { "orderNumber": "12345", "tier": "gold" }
587
634
  *
588
- * Option 1 Global (flat key-value object, applies to ALL scenarios): {
589
- * "orderNumber": "12345", "environment": "staging" }
635
+ * An array applies them per flow, or to just its happy path or one of its edge
636
+ * cases, when a single set will not do. Each entry carries what it applies to:
590
637
  *
591
- * Option 2 Per-scenario (array of objects with scenarioId + variables): [ {
592
- * "scenarioId": "550e8400-...", "variables": { "orderNumber": "12345" } }, {
593
- * "scenarioId": "7a3d2e1f-...", "variables": { "orderNumber": "67890" } } ]
638
+ * [ { "flowId": "550e8400-...", "variables": { "orderNumber": "12345" } }, {
639
+ * "flowId": "550e8400-...", "happyPath": true, "variables": { "orderNumber":
640
+ * "55555" } }, { "flowId": "550e8400-...", "edgeCaseId": "7a3d2e1f-...",
641
+ * "variables": { "orderNumber": "67890" } } ]
642
+ *
643
+ * An entry that narrows to neither covers everything that flow resolves. A flow
644
+ * this plan does not attach, or an edge case that does not belong to the flow, is
645
+ * rejected rather than ignored.
646
+ *
647
+ * A plan built on scenarios rather than customer flows targets them the same way,
648
+ * with `scenarioId` in place of `flowId`. That form is deprecated alongside
649
+ * scenarios themselves, and still accepted so runs against those plans keep
650
+ * working.
594
651
  */
595
- variables?: { [key: string]: string } | Array<SimulationRunPlanJobStartParams.UnionMember1>;
652
+ variables?:
653
+ | { [key: string]: string }
654
+ | Array<SimulationRunPlanJobStartParams.UnionMember1>
655
+ | Array<SimulationRunPlanJobStartParams.UnionMember2>;
596
656
  }
597
657
 
598
658
  export namespace SimulationRunPlanJobStartParams {
599
659
  export interface UnionMember1 {
660
+ /**
661
+ * A customer flow this plan runs.
662
+ */
663
+ flowId: string;
664
+
665
+ /**
666
+ * The values to apply.
667
+ */
668
+ variables: { [key: string]: string };
669
+
670
+ /**
671
+ * Narrow to one edge case of that flow.
672
+ */
673
+ edgeCaseId?: string;
674
+
675
+ /**
676
+ * Narrow to the flow's happy path.
677
+ */
678
+ happyPath?: true;
679
+ }
680
+
681
+ export interface UnionMember2 {
600
682
  /**
601
683
  * ID of the scenario to apply variables to
602
684
  */