@roarkanalytics/sdk 3.13.0 → 3.15.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 (47) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/package.json +1 -1
  3. package/resources/config.d.mts +50 -9
  4. package/resources/config.d.mts.map +1 -1
  5. package/resources/config.d.ts +50 -9
  6. package/resources/config.d.ts.map +1 -1
  7. package/resources/customer-flow-edge-case.d.mts +402 -21
  8. package/resources/customer-flow-edge-case.d.mts.map +1 -1
  9. package/resources/customer-flow-edge-case.d.ts +402 -21
  10. package/resources/customer-flow-edge-case.d.ts.map +1 -1
  11. package/resources/customer-flow.d.mts +1653 -116
  12. package/resources/customer-flow.d.mts.map +1 -1
  13. package/resources/customer-flow.d.ts +1653 -116
  14. package/resources/customer-flow.d.ts.map +1 -1
  15. package/resources/http-request-definition.d.mts +24 -0
  16. package/resources/http-request-definition.d.mts.map +1 -1
  17. package/resources/http-request-definition.d.ts +24 -0
  18. package/resources/http-request-definition.d.ts.map +1 -1
  19. package/resources/simulation-environment.d.mts +6 -6
  20. package/resources/simulation-environment.d.mts.map +1 -1
  21. package/resources/simulation-environment.d.ts +6 -6
  22. package/resources/simulation-environment.d.ts.map +1 -1
  23. package/resources/simulation-job.d.mts +2 -2
  24. package/resources/simulation-job.d.mts.map +1 -1
  25. package/resources/simulation-job.d.ts +2 -2
  26. package/resources/simulation-job.d.ts.map +1 -1
  27. package/resources/simulation-persona.d.mts +6 -6
  28. package/resources/simulation-persona.d.mts.map +1 -1
  29. package/resources/simulation-persona.d.ts +6 -6
  30. package/resources/simulation-persona.d.ts.map +1 -1
  31. package/resources/simulation-run-plan-job.d.mts +1 -1
  32. package/resources/simulation-run-plan-job.d.mts.map +1 -1
  33. package/resources/simulation-run-plan-job.d.ts +1 -1
  34. package/resources/simulation-run-plan-job.d.ts.map +1 -1
  35. package/src/resources/config.ts +102 -6
  36. package/src/resources/customer-flow-edge-case.ts +999 -222
  37. package/src/resources/customer-flow.ts +4583 -1455
  38. package/src/resources/http-request-definition.ts +28 -0
  39. package/src/resources/simulation-environment.ts +30 -6
  40. package/src/resources/simulation-job.ts +10 -2
  41. package/src/resources/simulation-persona.ts +30 -6
  42. package/src/resources/simulation-run-plan-job.ts +5 -1
  43. package/src/version.ts +1 -1
  44. package/version.d.mts +1 -1
  45. package/version.d.ts +1 -1
  46. package/version.js +1 -1
  47. package/version.mjs +1 -1
@@ -193,9 +193,13 @@ export namespace CustomerFlowEdgeCaseUpdateResponse {
193
193
  | 'CHILDREN_PLAYING'
194
194
  | 'CITY'
195
195
  | 'COFFEE_SHOP'
196
+ | 'CONSTRUCTION'
197
+ | 'CRYING_BABY'
196
198
  | 'DRIVING'
199
+ | 'LIBRARY'
197
200
  | 'OFFICE'
198
- | 'THUNDERSTORM';
201
+ | 'THUNDERSTORM'
202
+ | 'TRAIN';
199
203
 
200
204
  backgroundNoiseVolume: number;
201
205
 
@@ -267,9 +271,13 @@ export namespace CustomerFlowEdgeCaseUpdateResponse {
267
271
  | 'CHILDREN_PLAYING'
268
272
  | 'CITY'
269
273
  | 'COFFEE_SHOP'
274
+ | 'CONSTRUCTION'
275
+ | 'CRYING_BABY'
270
276
  | 'DRIVING'
277
+ | 'LIBRARY'
271
278
  | 'OFFICE'
272
- | 'THUNDERSTORM';
279
+ | 'THUNDERSTORM'
280
+ | 'TRAIN';
273
281
 
274
282
  /**
275
283
  * Base emotional state of the persona
@@ -464,6 +472,12 @@ export namespace CustomerFlowEdgeCaseUpdateResponse {
464
472
  */
465
473
  environment: ImprovFlowVariant.Environment | null;
466
474
 
475
+ /**
476
+ * The personas this brief hands the phone to, in order of first mention. Empty
477
+ * when the brief inherits the happy path's: read the happy path's list.
478
+ */
479
+ handoffPersonas: Array<ImprovFlowVariant.HandoffPersona>;
480
+
467
481
  isGenerated: boolean;
468
482
 
469
483
  /**
@@ -485,7 +499,9 @@ export namespace CustomerFlowEdgeCaseUpdateResponse {
485
499
  updatedAt: string;
486
500
 
487
501
  /**
488
- * The brief the simulated customer improvises from.
502
+ * The brief the simulated customer improvises from. A `@{persona:<id>}` mention
503
+ * hands the phone to that persona mid-call; the sentences around the mention say
504
+ * when.
489
505
  */
490
506
  prompt?: string | null;
491
507
 
@@ -519,9 +535,13 @@ export namespace CustomerFlowEdgeCaseUpdateResponse {
519
535
  | 'CHILDREN_PLAYING'
520
536
  | 'CITY'
521
537
  | 'COFFEE_SHOP'
538
+ | 'CONSTRUCTION'
539
+ | 'CRYING_BABY'
522
540
  | 'DRIVING'
541
+ | 'LIBRARY'
523
542
  | 'OFFICE'
524
- | 'THUNDERSTORM';
543
+ | 'THUNDERSTORM'
544
+ | 'TRAIN';
525
545
 
526
546
  backgroundNoiseVolume: number;
527
547
 
@@ -540,10 +560,7 @@ export namespace CustomerFlowEdgeCaseUpdateResponse {
540
560
  description?: string | null;
541
561
  }
542
562
 
543
- /**
544
- * The persona this runs as instead of the happy path's. Null means it inherits.
545
- */
546
- export interface PersonaOverride {
563
+ export interface HandoffPersona {
547
564
  /**
548
565
  * Unique identifier of the persona
549
566
  */
@@ -593,9 +610,13 @@ export namespace CustomerFlowEdgeCaseUpdateResponse {
593
610
  | 'CHILDREN_PLAYING'
594
611
  | 'CITY'
595
612
  | 'COFFEE_SHOP'
613
+ | 'CONSTRUCTION'
614
+ | 'CRYING_BABY'
596
615
  | 'DRIVING'
616
+ | 'LIBRARY'
597
617
  | 'OFFICE'
598
- | 'THUNDERSTORM';
618
+ | 'THUNDERSTORM'
619
+ | 'TRAIN';
599
620
 
600
621
  /**
601
622
  * Base emotional state of the persona
@@ -765,101 +786,6 @@ export namespace CustomerFlowEdgeCaseUpdateResponse {
765
786
  */
766
787
  secondaryLanguage?: 'EN' | null;
767
788
  }
768
- }
769
-
770
- /**
771
- * One voicemail greeting.
772
- */
773
- export interface VoicemailFlowVariant {
774
- id: string;
775
-
776
- /**
777
- * Graded on top of the flow's own expectations, for this variant only.
778
- */
779
- additionalExpectations: Array<VoicemailFlowVariant.AdditionalExpectation>;
780
-
781
- /**
782
- * Creation timestamp in ISO 8601 format
783
- */
784
- createdAt: string;
785
-
786
- /**
787
- * A simulation environment: the ambient conditions a customer flow variant runs
788
- * under. The list includes both your own and the ones Roark curates for every
789
- * project.
790
- */
791
- environment: VoicemailFlowVariant.Environment | null;
792
-
793
- isGenerated: boolean;
794
-
795
- /**
796
- * The persona this runs as instead of the happy path's. Null means it inherits.
797
- */
798
- personaOverride: VoicemailFlowVariant.PersonaOverride | null;
799
-
800
- precededByCustomerFlowId: string | null;
801
-
802
- precededByCustomerFlowVariantId: string | null;
803
-
804
- title: string;
805
-
806
- type: 'VOICEMAIL';
807
-
808
- /**
809
- * Last update timestamp in ISO 8601 format
810
- */
811
- updatedAt: string;
812
-
813
- systemKey?: string | null;
814
- }
815
-
816
- export namespace VoicemailFlowVariant {
817
- /**
818
- * One thing the agent under test is graded against.
819
- */
820
- export interface AdditionalExpectation {
821
- id: string;
822
-
823
- /**
824
- * What the agent under test is graded against.
825
- */
826
- prompt: string;
827
- }
828
-
829
- /**
830
- * A simulation environment: the ambient conditions a customer flow variant runs
831
- * under. The list includes both your own and the ones Roark curates for every
832
- * project.
833
- */
834
- export interface Environment {
835
- id: string;
836
-
837
- backgroundNoise:
838
- | 'NONE'
839
- | 'AIRPORT'
840
- | 'CHILDREN_PLAYING'
841
- | 'CITY'
842
- | 'COFFEE_SHOP'
843
- | 'DRIVING'
844
- | 'OFFICE'
845
- | 'THUNDERSTORM';
846
-
847
- backgroundNoiseVolume: number;
848
-
849
- /**
850
- * Creation timestamp in ISO 8601 format
851
- */
852
- createdAt: string;
853
-
854
- name: string;
855
-
856
- /**
857
- * Last update timestamp in ISO 8601 format
858
- */
859
- updatedAt: string;
860
-
861
- description?: string | null;
862
- }
863
789
 
864
790
  /**
865
791
  * The persona this runs as instead of the happy path's. Null means it inherits.
@@ -914,9 +840,13 @@ export namespace CustomerFlowEdgeCaseUpdateResponse {
914
840
  | 'CHILDREN_PLAYING'
915
841
  | 'CITY'
916
842
  | 'COFFEE_SHOP'
843
+ | 'CONSTRUCTION'
844
+ | 'CRYING_BABY'
917
845
  | 'DRIVING'
846
+ | 'LIBRARY'
918
847
  | 'OFFICE'
919
- | 'THUNDERSTORM';
848
+ | 'THUNDERSTORM'
849
+ | 'TRAIN';
920
850
 
921
851
  /**
922
852
  * Base emotional state of the persona
@@ -1087,30 +1017,17 @@ export namespace CustomerFlowEdgeCaseUpdateResponse {
1087
1017
  secondaryLanguage?: 'EN' | null;
1088
1018
  }
1089
1019
  }
1090
- }
1091
-
1092
- export interface CustomerFlowEdgeCaseAddResponse {
1093
- /**
1094
- * One way of running a customer flow.
1095
- */
1096
- data:
1097
- | CustomerFlowEdgeCaseAddResponse.ScriptedFlowVariant
1098
- | CustomerFlowEdgeCaseAddResponse.ImprovFlowVariant
1099
- | CustomerFlowEdgeCaseAddResponse.VoicemailFlowVariant;
1100
- }
1101
1020
 
1102
- export namespace CustomerFlowEdgeCaseAddResponse {
1103
1021
  /**
1104
- * One path through a scripted flow. The path engine owns which paths exist, so
1105
- * editing the graph is what creates and removes these.
1022
+ * One voicemail greeting.
1106
1023
  */
1107
- export interface ScriptedFlowVariant {
1024
+ export interface VoicemailFlowVariant {
1108
1025
  id: string;
1109
1026
 
1110
1027
  /**
1111
1028
  * Graded on top of the flow's own expectations, for this variant only.
1112
1029
  */
1113
- additionalExpectations: Array<ScriptedFlowVariant.AdditionalExpectation>;
1030
+ additionalExpectations: Array<VoicemailFlowVariant.AdditionalExpectation>;
1114
1031
 
1115
1032
  /**
1116
1033
  * Creation timestamp in ISO 8601 format
@@ -1122,28 +1039,22 @@ export namespace CustomerFlowEdgeCaseAddResponse {
1122
1039
  * under. The list includes both your own and the ones Roark curates for every
1123
1040
  * project.
1124
1041
  */
1125
- environment: ScriptedFlowVariant.Environment | null;
1042
+ environment: VoicemailFlowVariant.Environment | null;
1126
1043
 
1127
1044
  isGenerated: boolean;
1128
1045
 
1129
1046
  /**
1130
1047
  * The persona this runs as instead of the happy path's. Null means it inherits.
1131
1048
  */
1132
- personaOverride: ScriptedFlowVariant.PersonaOverride | null;
1049
+ personaOverride: VoicemailFlowVariant.PersonaOverride | null;
1133
1050
 
1134
1051
  precededByCustomerFlowId: string | null;
1135
1052
 
1136
1053
  precededByCustomerFlowVariantId: string | null;
1137
1054
 
1138
- /**
1139
- * The one path through the graph this variant runs, in order. Linear by
1140
- * construction, so these steps never nest.
1141
- */
1142
- steps: Array<CustomerFlowAPI.FlowStep>;
1143
-
1144
1055
  title: string;
1145
1056
 
1146
- type: 'SCRIPTED';
1057
+ type: 'VOICEMAIL';
1147
1058
 
1148
1059
  /**
1149
1060
  * Last update timestamp in ISO 8601 format
@@ -1153,7 +1064,7 @@ export namespace CustomerFlowEdgeCaseAddResponse {
1153
1064
  systemKey?: string | null;
1154
1065
  }
1155
1066
 
1156
- export namespace ScriptedFlowVariant {
1067
+ export namespace VoicemailFlowVariant {
1157
1068
  /**
1158
1069
  * One thing the agent under test is graded against.
1159
1070
  */
@@ -1180,9 +1091,13 @@ export namespace CustomerFlowEdgeCaseAddResponse {
1180
1091
  | 'CHILDREN_PLAYING'
1181
1092
  | 'CITY'
1182
1093
  | 'COFFEE_SHOP'
1094
+ | 'CONSTRUCTION'
1095
+ | 'CRYING_BABY'
1183
1096
  | 'DRIVING'
1097
+ | 'LIBRARY'
1184
1098
  | 'OFFICE'
1185
- | 'THUNDERSTORM';
1099
+ | 'THUNDERSTORM'
1100
+ | 'TRAIN';
1186
1101
 
1187
1102
  backgroundNoiseVolume: number;
1188
1103
 
@@ -1254,9 +1169,13 @@ export namespace CustomerFlowEdgeCaseAddResponse {
1254
1169
  | 'CHILDREN_PLAYING'
1255
1170
  | 'CITY'
1256
1171
  | 'COFFEE_SHOP'
1172
+ | 'CONSTRUCTION'
1173
+ | 'CRYING_BABY'
1257
1174
  | 'DRIVING'
1175
+ | 'LIBRARY'
1258
1176
  | 'OFFICE'
1259
- | 'THUNDERSTORM';
1177
+ | 'THUNDERSTORM'
1178
+ | 'TRAIN';
1260
1179
 
1261
1180
  /**
1262
1181
  * Base emotional state of the persona
@@ -1427,17 +1346,30 @@ export namespace CustomerFlowEdgeCaseAddResponse {
1427
1346
  secondaryLanguage?: 'EN' | null;
1428
1347
  }
1429
1348
  }
1349
+ }
1430
1350
 
1351
+ export interface CustomerFlowEdgeCaseAddResponse {
1431
1352
  /**
1432
- * One brief to run an improv flow with.
1353
+ * One way of running a customer flow.
1433
1354
  */
1434
- export interface ImprovFlowVariant {
1355
+ data:
1356
+ | CustomerFlowEdgeCaseAddResponse.ScriptedFlowVariant
1357
+ | CustomerFlowEdgeCaseAddResponse.ImprovFlowVariant
1358
+ | CustomerFlowEdgeCaseAddResponse.VoicemailFlowVariant;
1359
+ }
1360
+
1361
+ export namespace CustomerFlowEdgeCaseAddResponse {
1362
+ /**
1363
+ * One path through a scripted flow. The path engine owns which paths exist, so
1364
+ * editing the graph is what creates and removes these.
1365
+ */
1366
+ export interface ScriptedFlowVariant {
1435
1367
  id: string;
1436
1368
 
1437
1369
  /**
1438
1370
  * Graded on top of the flow's own expectations, for this variant only.
1439
1371
  */
1440
- additionalExpectations: Array<ImprovFlowVariant.AdditionalExpectation>;
1372
+ additionalExpectations: Array<ScriptedFlowVariant.AdditionalExpectation>;
1441
1373
 
1442
1374
  /**
1443
1375
  * Creation timestamp in ISO 8601 format
@@ -1449,37 +1381,38 @@ export namespace CustomerFlowEdgeCaseAddResponse {
1449
1381
  * under. The list includes both your own and the ones Roark curates for every
1450
1382
  * project.
1451
1383
  */
1452
- environment: ImprovFlowVariant.Environment | null;
1384
+ environment: ScriptedFlowVariant.Environment | null;
1453
1385
 
1454
1386
  isGenerated: boolean;
1455
1387
 
1456
1388
  /**
1457
1389
  * The persona this runs as instead of the happy path's. Null means it inherits.
1458
1390
  */
1459
- personaOverride: ImprovFlowVariant.PersonaOverride | null;
1391
+ personaOverride: ScriptedFlowVariant.PersonaOverride | null;
1460
1392
 
1461
1393
  precededByCustomerFlowId: string | null;
1462
1394
 
1463
1395
  precededByCustomerFlowVariantId: string | null;
1464
1396
 
1397
+ /**
1398
+ * The one path through the graph this variant runs, in order. Linear by
1399
+ * construction, so these steps never nest.
1400
+ */
1401
+ steps: Array<CustomerFlowAPI.FlowStep>;
1402
+
1465
1403
  title: string;
1466
1404
 
1467
- type: 'IMPROV';
1405
+ type: 'SCRIPTED';
1468
1406
 
1469
1407
  /**
1470
1408
  * Last update timestamp in ISO 8601 format
1471
1409
  */
1472
1410
  updatedAt: string;
1473
1411
 
1474
- /**
1475
- * The brief the simulated customer improvises from.
1476
- */
1477
- prompt?: string | null;
1478
-
1479
1412
  systemKey?: string | null;
1480
1413
  }
1481
1414
 
1482
- export namespace ImprovFlowVariant {
1415
+ export namespace ScriptedFlowVariant {
1483
1416
  /**
1484
1417
  * One thing the agent under test is graded against.
1485
1418
  */
@@ -1506,9 +1439,13 @@ export namespace CustomerFlowEdgeCaseAddResponse {
1506
1439
  | 'CHILDREN_PLAYING'
1507
1440
  | 'CITY'
1508
1441
  | 'COFFEE_SHOP'
1442
+ | 'CONSTRUCTION'
1443
+ | 'CRYING_BABY'
1509
1444
  | 'DRIVING'
1445
+ | 'LIBRARY'
1510
1446
  | 'OFFICE'
1511
- | 'THUNDERSTORM';
1447
+ | 'THUNDERSTORM'
1448
+ | 'TRAIN';
1512
1449
 
1513
1450
  backgroundNoiseVolume: number;
1514
1451
 
@@ -1580,9 +1517,13 @@ export namespace CustomerFlowEdgeCaseAddResponse {
1580
1517
  | 'CHILDREN_PLAYING'
1581
1518
  | 'CITY'
1582
1519
  | 'COFFEE_SHOP'
1520
+ | 'CONSTRUCTION'
1521
+ | 'CRYING_BABY'
1583
1522
  | 'DRIVING'
1523
+ | 'LIBRARY'
1584
1524
  | 'OFFICE'
1585
- | 'THUNDERSTORM';
1525
+ | 'THUNDERSTORM'
1526
+ | 'TRAIN';
1586
1527
 
1587
1528
  /**
1588
1529
  * Base emotional state of the persona
@@ -1755,15 +1696,15 @@ export namespace CustomerFlowEdgeCaseAddResponse {
1755
1696
  }
1756
1697
 
1757
1698
  /**
1758
- * One voicemail greeting.
1699
+ * One brief to run an improv flow with.
1759
1700
  */
1760
- export interface VoicemailFlowVariant {
1701
+ export interface ImprovFlowVariant {
1761
1702
  id: string;
1762
1703
 
1763
1704
  /**
1764
1705
  * Graded on top of the flow's own expectations, for this variant only.
1765
1706
  */
1766
- additionalExpectations: Array<VoicemailFlowVariant.AdditionalExpectation>;
1707
+ additionalExpectations: Array<ImprovFlowVariant.AdditionalExpectation>;
1767
1708
 
1768
1709
  /**
1769
1710
  * Creation timestamp in ISO 8601 format
@@ -1775,14 +1716,20 @@ export namespace CustomerFlowEdgeCaseAddResponse {
1775
1716
  * under. The list includes both your own and the ones Roark curates for every
1776
1717
  * project.
1777
1718
  */
1778
- environment: VoicemailFlowVariant.Environment | null;
1719
+ environment: ImprovFlowVariant.Environment | null;
1720
+
1721
+ /**
1722
+ * The personas this brief hands the phone to, in order of first mention. Empty
1723
+ * when the brief inherits the happy path's: read the happy path's list.
1724
+ */
1725
+ handoffPersonas: Array<ImprovFlowVariant.HandoffPersona>;
1779
1726
 
1780
1727
  isGenerated: boolean;
1781
1728
 
1782
1729
  /**
1783
1730
  * The persona this runs as instead of the happy path's. Null means it inherits.
1784
1731
  */
1785
- personaOverride: VoicemailFlowVariant.PersonaOverride | null;
1732
+ personaOverride: ImprovFlowVariant.PersonaOverride | null;
1786
1733
 
1787
1734
  precededByCustomerFlowId: string | null;
1788
1735
 
@@ -1790,17 +1737,24 @@ export namespace CustomerFlowEdgeCaseAddResponse {
1790
1737
 
1791
1738
  title: string;
1792
1739
 
1793
- type: 'VOICEMAIL';
1740
+ type: 'IMPROV';
1794
1741
 
1795
1742
  /**
1796
1743
  * Last update timestamp in ISO 8601 format
1797
1744
  */
1798
1745
  updatedAt: string;
1799
1746
 
1747
+ /**
1748
+ * The brief the simulated customer improvises from. A `@{persona:<id>}` mention
1749
+ * hands the phone to that persona mid-call; the sentences around the mention say
1750
+ * when.
1751
+ */
1752
+ prompt?: string | null;
1753
+
1800
1754
  systemKey?: string | null;
1801
1755
  }
1802
1756
 
1803
- export namespace VoicemailFlowVariant {
1757
+ export namespace ImprovFlowVariant {
1804
1758
  /**
1805
1759
  * One thing the agent under test is graded against.
1806
1760
  */
@@ -1827,9 +1781,13 @@ export namespace CustomerFlowEdgeCaseAddResponse {
1827
1781
  | 'CHILDREN_PLAYING'
1828
1782
  | 'CITY'
1829
1783
  | 'COFFEE_SHOP'
1784
+ | 'CONSTRUCTION'
1785
+ | 'CRYING_BABY'
1830
1786
  | 'DRIVING'
1787
+ | 'LIBRARY'
1831
1788
  | 'OFFICE'
1832
- | 'THUNDERSTORM';
1789
+ | 'THUNDERSTORM'
1790
+ | 'TRAIN';
1833
1791
 
1834
1792
  backgroundNoiseVolume: number;
1835
1793
 
@@ -1848,10 +1806,7 @@ export namespace CustomerFlowEdgeCaseAddResponse {
1848
1806
  description?: string | null;
1849
1807
  }
1850
1808
 
1851
- /**
1852
- * The persona this runs as instead of the happy path's. Null means it inherits.
1853
- */
1854
- export interface PersonaOverride {
1809
+ export interface HandoffPersona {
1855
1810
  /**
1856
1811
  * Unique identifier of the persona
1857
1812
  */
@@ -1901,9 +1856,13 @@ export namespace CustomerFlowEdgeCaseAddResponse {
1901
1856
  | 'CHILDREN_PLAYING'
1902
1857
  | 'CITY'
1903
1858
  | 'COFFEE_SHOP'
1859
+ | 'CONSTRUCTION'
1860
+ | 'CRYING_BABY'
1904
1861
  | 'DRIVING'
1862
+ | 'LIBRARY'
1905
1863
  | 'OFFICE'
1906
- | 'THUNDERSTORM';
1864
+ | 'THUNDERSTORM'
1865
+ | 'TRAIN';
1907
1866
 
1908
1867
  /**
1909
1868
  * Base emotional state of the persona
@@ -2073,66 +2032,625 @@ export namespace CustomerFlowEdgeCaseAddResponse {
2073
2032
  */
2074
2033
  secondaryLanguage?: 'EN' | null;
2075
2034
  }
2076
- }
2077
- }
2078
-
2079
- export interface CustomerFlowEdgeCasePromoteResponse {
2080
- /**
2081
- * One way of running a customer flow.
2082
- */
2083
- data:
2084
- | CustomerFlowEdgeCasePromoteResponse.ScriptedFlowVariant
2085
- | CustomerFlowEdgeCasePromoteResponse.ImprovFlowVariant
2086
- | CustomerFlowEdgeCasePromoteResponse.VoicemailFlowVariant;
2087
- }
2088
-
2089
- export namespace CustomerFlowEdgeCasePromoteResponse {
2090
- /**
2091
- * One path through a scripted flow. The path engine owns which paths exist, so
2092
- * editing the graph is what creates and removes these.
2093
- */
2094
- export interface ScriptedFlowVariant {
2095
- id: string;
2096
-
2097
- /**
2098
- * Graded on top of the flow's own expectations, for this variant only.
2099
- */
2100
- additionalExpectations: Array<ScriptedFlowVariant.AdditionalExpectation>;
2101
-
2102
- /**
2103
- * Creation timestamp in ISO 8601 format
2104
- */
2105
- createdAt: string;
2106
-
2107
- /**
2108
- * A simulation environment: the ambient conditions a customer flow variant runs
2109
- * under. The list includes both your own and the ones Roark curates for every
2110
- * project.
2111
- */
2112
- environment: ScriptedFlowVariant.Environment | null;
2113
-
2114
- isGenerated: boolean;
2115
2035
 
2116
2036
  /**
2117
2037
  * The persona this runs as instead of the happy path's. Null means it inherits.
2118
2038
  */
2119
- personaOverride: ScriptedFlowVariant.PersonaOverride | null;
2120
-
2121
- precededByCustomerFlowId: string | null;
2122
-
2123
- precededByCustomerFlowVariantId: string | null;
2124
-
2125
- /**
2126
- * The one path through the graph this variant runs, in order. Linear by
2127
- * construction, so these steps never nest.
2128
- */
2129
- steps: Array<CustomerFlowAPI.FlowStep>;
2130
-
2131
- title: string;
2132
-
2133
- type: 'SCRIPTED';
2039
+ export interface PersonaOverride {
2040
+ /**
2041
+ * Unique identifier of the persona
2042
+ */
2043
+ id: string;
2134
2044
 
2135
- /**
2045
+ /**
2046
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
2047
+ * optional variants
2048
+ */
2049
+ accent:
2050
+ | 'US'
2051
+ | 'US_X_SOUTH'
2052
+ | 'GB'
2053
+ | 'ES'
2054
+ | 'DE'
2055
+ | 'IN'
2056
+ | 'FR'
2057
+ | 'NL'
2058
+ | 'SA'
2059
+ | 'GR'
2060
+ | 'AU'
2061
+ | 'IT'
2062
+ | 'ID'
2063
+ | 'TH'
2064
+ | 'JP'
2065
+ | 'NZ'
2066
+ | 'PH'
2067
+ | 'SG'
2068
+ | 'MY'
2069
+ | 'HK'
2070
+ | 'TR'
2071
+ | 'PT'
2072
+ | 'IL';
2073
+
2074
+ /**
2075
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
2076
+ * voice for are accepted; defaults to ADULT, which every accent supports.
2077
+ */
2078
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
2079
+
2080
+ /**
2081
+ * Background noise setting
2082
+ */
2083
+ backgroundNoise:
2084
+ | 'NONE'
2085
+ | 'AIRPORT'
2086
+ | 'CHILDREN_PLAYING'
2087
+ | 'CITY'
2088
+ | 'COFFEE_SHOP'
2089
+ | 'CONSTRUCTION'
2090
+ | 'CRYING_BABY'
2091
+ | 'DRIVING'
2092
+ | 'LIBRARY'
2093
+ | 'OFFICE'
2094
+ | 'THUNDERSTORM'
2095
+ | 'TRAIN';
2096
+
2097
+ /**
2098
+ * Base emotional state of the persona
2099
+ */
2100
+ baseEmotion:
2101
+ | 'NEUTRAL'
2102
+ | 'CHEERFUL'
2103
+ | 'CONFUSED'
2104
+ | 'FRUSTRATED'
2105
+ | 'SKEPTICAL'
2106
+ | 'RUSHED'
2107
+ | 'DISTRACTED'
2108
+ | 'ANGRY'
2109
+ | 'ANXIOUS'
2110
+ | 'SAD';
2111
+
2112
+ /**
2113
+ * How the persona confirms information
2114
+ */
2115
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
2116
+
2117
+ /**
2118
+ * Creation timestamp
2119
+ */
2120
+ createdAt: string;
2121
+
2122
+ /**
2123
+ * Gender of the persona
2124
+ */
2125
+ gender: 'MALE' | 'FEMALE';
2126
+
2127
+ /**
2128
+ * Whether the persona uses filler words like "um" and "uh"
2129
+ */
2130
+ hasDisfluencies: boolean;
2131
+
2132
+ /**
2133
+ * Maximum number of idle messages the persona will send before giving up
2134
+ */
2135
+ idleMessageMaxSpokenCount: number;
2136
+
2137
+ /**
2138
+ * Whether the idle message counter resets when the agent speaks
2139
+ */
2140
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
2141
+
2142
+ /**
2143
+ * Messages the persona will say when the agent goes silent during a call. null =
2144
+ * "Automatic": language-appropriate defaults are used at call time.
2145
+ */
2146
+ idleMessages: Array<string> | null;
2147
+
2148
+ /**
2149
+ * Seconds of silence before the persona sends an idle message
2150
+ */
2151
+ idleTimeoutSeconds: number;
2152
+
2153
+ /**
2154
+ * How clearly the persona expresses their intentions
2155
+ */
2156
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
2157
+
2158
+ /**
2159
+ * Primary language ISO 639-1 code for the persona
2160
+ */
2161
+ language:
2162
+ | 'EN'
2163
+ | 'ES'
2164
+ | 'DE'
2165
+ | 'HI'
2166
+ | 'FR'
2167
+ | 'NL'
2168
+ | 'AR'
2169
+ | 'EL'
2170
+ | 'IT'
2171
+ | 'ID'
2172
+ | 'TH'
2173
+ | 'JA'
2174
+ | 'TL'
2175
+ | 'MS'
2176
+ | 'ZH'
2177
+ | 'TR'
2178
+ | 'PT'
2179
+ | 'HE';
2180
+
2181
+ /**
2182
+ * How reliable the persona's memory is
2183
+ */
2184
+ memoryReliability: 'HIGH' | 'LOW';
2185
+
2186
+ /**
2187
+ * The name the agent will identify as during conversations
2188
+ */
2189
+ name: string;
2190
+
2191
+ /**
2192
+ * Additional custom properties about the persona
2193
+ */
2194
+ properties: { [key: string]: unknown };
2195
+
2196
+ /**
2197
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
2198
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
2199
+ * for several seconds.
2200
+ */
2201
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
2202
+
2203
+ /**
2204
+ * Speech clarity of the persona
2205
+ */
2206
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
2207
+
2208
+ /**
2209
+ * Speech pace of the persona
2210
+ */
2211
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
2212
+
2213
+ /**
2214
+ * Languages the persona can understand. Multilingual combinations are limited by
2215
+ * multilingual speech recognition support.
2216
+ */
2217
+ understoodLanguages: Array<
2218
+ | 'EN'
2219
+ | 'ES'
2220
+ | 'DE'
2221
+ | 'HI'
2222
+ | 'FR'
2223
+ | 'NL'
2224
+ | 'AR'
2225
+ | 'EL'
2226
+ | 'IT'
2227
+ | 'ID'
2228
+ | 'TH'
2229
+ | 'JA'
2230
+ | 'TL'
2231
+ | 'MS'
2232
+ | 'ZH'
2233
+ | 'TR'
2234
+ | 'PT'
2235
+ | 'HE'
2236
+ >;
2237
+
2238
+ /**
2239
+ * Last update timestamp
2240
+ */
2241
+ updatedAt: string;
2242
+
2243
+ /**
2244
+ * Background story and behavioral patterns for the persona
2245
+ */
2246
+ backstoryPrompt?: string | null;
2247
+
2248
+ /**
2249
+ * Human-readable description of the persona
2250
+ */
2251
+ description?: string | null;
2252
+
2253
+ /**
2254
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
2255
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
2256
+ * or set null to display the name itself.
2257
+ */
2258
+ displayName?: string | null;
2259
+
2260
+ /**
2261
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
2262
+ */
2263
+ secondaryLanguage?: 'EN' | null;
2264
+ }
2265
+ }
2266
+
2267
+ /**
2268
+ * One voicemail greeting.
2269
+ */
2270
+ export interface VoicemailFlowVariant {
2271
+ id: string;
2272
+
2273
+ /**
2274
+ * Graded on top of the flow's own expectations, for this variant only.
2275
+ */
2276
+ additionalExpectations: Array<VoicemailFlowVariant.AdditionalExpectation>;
2277
+
2278
+ /**
2279
+ * Creation timestamp in ISO 8601 format
2280
+ */
2281
+ createdAt: string;
2282
+
2283
+ /**
2284
+ * A simulation environment: the ambient conditions a customer flow variant runs
2285
+ * under. The list includes both your own and the ones Roark curates for every
2286
+ * project.
2287
+ */
2288
+ environment: VoicemailFlowVariant.Environment | null;
2289
+
2290
+ isGenerated: boolean;
2291
+
2292
+ /**
2293
+ * The persona this runs as instead of the happy path's. Null means it inherits.
2294
+ */
2295
+ personaOverride: VoicemailFlowVariant.PersonaOverride | null;
2296
+
2297
+ precededByCustomerFlowId: string | null;
2298
+
2299
+ precededByCustomerFlowVariantId: string | null;
2300
+
2301
+ title: string;
2302
+
2303
+ type: 'VOICEMAIL';
2304
+
2305
+ /**
2306
+ * Last update timestamp in ISO 8601 format
2307
+ */
2308
+ updatedAt: string;
2309
+
2310
+ systemKey?: string | null;
2311
+ }
2312
+
2313
+ export namespace VoicemailFlowVariant {
2314
+ /**
2315
+ * One thing the agent under test is graded against.
2316
+ */
2317
+ export interface AdditionalExpectation {
2318
+ id: string;
2319
+
2320
+ /**
2321
+ * What the agent under test is graded against.
2322
+ */
2323
+ prompt: string;
2324
+ }
2325
+
2326
+ /**
2327
+ * A simulation environment: the ambient conditions a customer flow variant runs
2328
+ * under. The list includes both your own and the ones Roark curates for every
2329
+ * project.
2330
+ */
2331
+ export interface Environment {
2332
+ id: string;
2333
+
2334
+ backgroundNoise:
2335
+ | 'NONE'
2336
+ | 'AIRPORT'
2337
+ | 'CHILDREN_PLAYING'
2338
+ | 'CITY'
2339
+ | 'COFFEE_SHOP'
2340
+ | 'CONSTRUCTION'
2341
+ | 'CRYING_BABY'
2342
+ | 'DRIVING'
2343
+ | 'LIBRARY'
2344
+ | 'OFFICE'
2345
+ | 'THUNDERSTORM'
2346
+ | 'TRAIN';
2347
+
2348
+ backgroundNoiseVolume: number;
2349
+
2350
+ /**
2351
+ * Creation timestamp in ISO 8601 format
2352
+ */
2353
+ createdAt: string;
2354
+
2355
+ name: string;
2356
+
2357
+ /**
2358
+ * Last update timestamp in ISO 8601 format
2359
+ */
2360
+ updatedAt: string;
2361
+
2362
+ description?: string | null;
2363
+ }
2364
+
2365
+ /**
2366
+ * The persona this runs as instead of the happy path's. Null means it inherits.
2367
+ */
2368
+ export interface PersonaOverride {
2369
+ /**
2370
+ * Unique identifier of the persona
2371
+ */
2372
+ id: string;
2373
+
2374
+ /**
2375
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
2376
+ * optional variants
2377
+ */
2378
+ accent:
2379
+ | 'US'
2380
+ | 'US_X_SOUTH'
2381
+ | 'GB'
2382
+ | 'ES'
2383
+ | 'DE'
2384
+ | 'IN'
2385
+ | 'FR'
2386
+ | 'NL'
2387
+ | 'SA'
2388
+ | 'GR'
2389
+ | 'AU'
2390
+ | 'IT'
2391
+ | 'ID'
2392
+ | 'TH'
2393
+ | 'JP'
2394
+ | 'NZ'
2395
+ | 'PH'
2396
+ | 'SG'
2397
+ | 'MY'
2398
+ | 'HK'
2399
+ | 'TR'
2400
+ | 'PT'
2401
+ | 'IL';
2402
+
2403
+ /**
2404
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
2405
+ * voice for are accepted; defaults to ADULT, which every accent supports.
2406
+ */
2407
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
2408
+
2409
+ /**
2410
+ * Background noise setting
2411
+ */
2412
+ backgroundNoise:
2413
+ | 'NONE'
2414
+ | 'AIRPORT'
2415
+ | 'CHILDREN_PLAYING'
2416
+ | 'CITY'
2417
+ | 'COFFEE_SHOP'
2418
+ | 'CONSTRUCTION'
2419
+ | 'CRYING_BABY'
2420
+ | 'DRIVING'
2421
+ | 'LIBRARY'
2422
+ | 'OFFICE'
2423
+ | 'THUNDERSTORM'
2424
+ | 'TRAIN';
2425
+
2426
+ /**
2427
+ * Base emotional state of the persona
2428
+ */
2429
+ baseEmotion:
2430
+ | 'NEUTRAL'
2431
+ | 'CHEERFUL'
2432
+ | 'CONFUSED'
2433
+ | 'FRUSTRATED'
2434
+ | 'SKEPTICAL'
2435
+ | 'RUSHED'
2436
+ | 'DISTRACTED'
2437
+ | 'ANGRY'
2438
+ | 'ANXIOUS'
2439
+ | 'SAD';
2440
+
2441
+ /**
2442
+ * How the persona confirms information
2443
+ */
2444
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
2445
+
2446
+ /**
2447
+ * Creation timestamp
2448
+ */
2449
+ createdAt: string;
2450
+
2451
+ /**
2452
+ * Gender of the persona
2453
+ */
2454
+ gender: 'MALE' | 'FEMALE';
2455
+
2456
+ /**
2457
+ * Whether the persona uses filler words like "um" and "uh"
2458
+ */
2459
+ hasDisfluencies: boolean;
2460
+
2461
+ /**
2462
+ * Maximum number of idle messages the persona will send before giving up
2463
+ */
2464
+ idleMessageMaxSpokenCount: number;
2465
+
2466
+ /**
2467
+ * Whether the idle message counter resets when the agent speaks
2468
+ */
2469
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
2470
+
2471
+ /**
2472
+ * Messages the persona will say when the agent goes silent during a call. null =
2473
+ * "Automatic": language-appropriate defaults are used at call time.
2474
+ */
2475
+ idleMessages: Array<string> | null;
2476
+
2477
+ /**
2478
+ * Seconds of silence before the persona sends an idle message
2479
+ */
2480
+ idleTimeoutSeconds: number;
2481
+
2482
+ /**
2483
+ * How clearly the persona expresses their intentions
2484
+ */
2485
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
2486
+
2487
+ /**
2488
+ * Primary language ISO 639-1 code for the persona
2489
+ */
2490
+ language:
2491
+ | 'EN'
2492
+ | 'ES'
2493
+ | 'DE'
2494
+ | 'HI'
2495
+ | 'FR'
2496
+ | 'NL'
2497
+ | 'AR'
2498
+ | 'EL'
2499
+ | 'IT'
2500
+ | 'ID'
2501
+ | 'TH'
2502
+ | 'JA'
2503
+ | 'TL'
2504
+ | 'MS'
2505
+ | 'ZH'
2506
+ | 'TR'
2507
+ | 'PT'
2508
+ | 'HE';
2509
+
2510
+ /**
2511
+ * How reliable the persona's memory is
2512
+ */
2513
+ memoryReliability: 'HIGH' | 'LOW';
2514
+
2515
+ /**
2516
+ * The name the agent will identify as during conversations
2517
+ */
2518
+ name: string;
2519
+
2520
+ /**
2521
+ * Additional custom properties about the persona
2522
+ */
2523
+ properties: { [key: string]: unknown };
2524
+
2525
+ /**
2526
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
2527
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
2528
+ * for several seconds.
2529
+ */
2530
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
2531
+
2532
+ /**
2533
+ * Speech clarity of the persona
2534
+ */
2535
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
2536
+
2537
+ /**
2538
+ * Speech pace of the persona
2539
+ */
2540
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
2541
+
2542
+ /**
2543
+ * Languages the persona can understand. Multilingual combinations are limited by
2544
+ * multilingual speech recognition support.
2545
+ */
2546
+ understoodLanguages: Array<
2547
+ | 'EN'
2548
+ | 'ES'
2549
+ | 'DE'
2550
+ | 'HI'
2551
+ | 'FR'
2552
+ | 'NL'
2553
+ | 'AR'
2554
+ | 'EL'
2555
+ | 'IT'
2556
+ | 'ID'
2557
+ | 'TH'
2558
+ | 'JA'
2559
+ | 'TL'
2560
+ | 'MS'
2561
+ | 'ZH'
2562
+ | 'TR'
2563
+ | 'PT'
2564
+ | 'HE'
2565
+ >;
2566
+
2567
+ /**
2568
+ * Last update timestamp
2569
+ */
2570
+ updatedAt: string;
2571
+
2572
+ /**
2573
+ * Background story and behavioral patterns for the persona
2574
+ */
2575
+ backstoryPrompt?: string | null;
2576
+
2577
+ /**
2578
+ * Human-readable description of the persona
2579
+ */
2580
+ description?: string | null;
2581
+
2582
+ /**
2583
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
2584
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
2585
+ * or set null to display the name itself.
2586
+ */
2587
+ displayName?: string | null;
2588
+
2589
+ /**
2590
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
2591
+ */
2592
+ secondaryLanguage?: 'EN' | null;
2593
+ }
2594
+ }
2595
+ }
2596
+
2597
+ export interface CustomerFlowEdgeCasePromoteResponse {
2598
+ /**
2599
+ * One way of running a customer flow.
2600
+ */
2601
+ data:
2602
+ | CustomerFlowEdgeCasePromoteResponse.ScriptedFlowVariant
2603
+ | CustomerFlowEdgeCasePromoteResponse.ImprovFlowVariant
2604
+ | CustomerFlowEdgeCasePromoteResponse.VoicemailFlowVariant;
2605
+ }
2606
+
2607
+ export namespace CustomerFlowEdgeCasePromoteResponse {
2608
+ /**
2609
+ * One path through a scripted flow. The path engine owns which paths exist, so
2610
+ * editing the graph is what creates and removes these.
2611
+ */
2612
+ export interface ScriptedFlowVariant {
2613
+ id: string;
2614
+
2615
+ /**
2616
+ * Graded on top of the flow's own expectations, for this variant only.
2617
+ */
2618
+ additionalExpectations: Array<ScriptedFlowVariant.AdditionalExpectation>;
2619
+
2620
+ /**
2621
+ * Creation timestamp in ISO 8601 format
2622
+ */
2623
+ createdAt: string;
2624
+
2625
+ /**
2626
+ * A simulation environment: the ambient conditions a customer flow variant runs
2627
+ * under. The list includes both your own and the ones Roark curates for every
2628
+ * project.
2629
+ */
2630
+ environment: ScriptedFlowVariant.Environment | null;
2631
+
2632
+ isGenerated: boolean;
2633
+
2634
+ /**
2635
+ * The persona this runs as instead of the happy path's. Null means it inherits.
2636
+ */
2637
+ personaOverride: ScriptedFlowVariant.PersonaOverride | null;
2638
+
2639
+ precededByCustomerFlowId: string | null;
2640
+
2641
+ precededByCustomerFlowVariantId: string | null;
2642
+
2643
+ /**
2644
+ * The one path through the graph this variant runs, in order. Linear by
2645
+ * construction, so these steps never nest.
2646
+ */
2647
+ steps: Array<CustomerFlowAPI.FlowStep>;
2648
+
2649
+ title: string;
2650
+
2651
+ type: 'SCRIPTED';
2652
+
2653
+ /**
2136
2654
  * Last update timestamp in ISO 8601 format
2137
2655
  */
2138
2656
  updatedAt: string;
@@ -2167,9 +2685,13 @@ export namespace CustomerFlowEdgeCasePromoteResponse {
2167
2685
  | 'CHILDREN_PLAYING'
2168
2686
  | 'CITY'
2169
2687
  | 'COFFEE_SHOP'
2688
+ | 'CONSTRUCTION'
2689
+ | 'CRYING_BABY'
2170
2690
  | 'DRIVING'
2691
+ | 'LIBRARY'
2171
2692
  | 'OFFICE'
2172
- | 'THUNDERSTORM';
2693
+ | 'THUNDERSTORM'
2694
+ | 'TRAIN';
2173
2695
 
2174
2696
  backgroundNoiseVolume: number;
2175
2697
 
@@ -2241,9 +2763,13 @@ export namespace CustomerFlowEdgeCasePromoteResponse {
2241
2763
  | 'CHILDREN_PLAYING'
2242
2764
  | 'CITY'
2243
2765
  | 'COFFEE_SHOP'
2766
+ | 'CONSTRUCTION'
2767
+ | 'CRYING_BABY'
2244
2768
  | 'DRIVING'
2769
+ | 'LIBRARY'
2245
2770
  | 'OFFICE'
2246
- | 'THUNDERSTORM';
2771
+ | 'THUNDERSTORM'
2772
+ | 'TRAIN';
2247
2773
 
2248
2774
  /**
2249
2775
  * Base emotional state of the persona
@@ -2438,6 +2964,12 @@ export namespace CustomerFlowEdgeCasePromoteResponse {
2438
2964
  */
2439
2965
  environment: ImprovFlowVariant.Environment | null;
2440
2966
 
2967
+ /**
2968
+ * The personas this brief hands the phone to, in order of first mention. Empty
2969
+ * when the brief inherits the happy path's: read the happy path's list.
2970
+ */
2971
+ handoffPersonas: Array<ImprovFlowVariant.HandoffPersona>;
2972
+
2441
2973
  isGenerated: boolean;
2442
2974
 
2443
2975
  /**
@@ -2459,7 +2991,9 @@ export namespace CustomerFlowEdgeCasePromoteResponse {
2459
2991
  updatedAt: string;
2460
2992
 
2461
2993
  /**
2462
- * The brief the simulated customer improvises from.
2994
+ * The brief the simulated customer improvises from. A `@{persona:<id>}` mention
2995
+ * hands the phone to that persona mid-call; the sentences around the mention say
2996
+ * when.
2463
2997
  */
2464
2998
  prompt?: string | null;
2465
2999
 
@@ -2493,9 +3027,13 @@ export namespace CustomerFlowEdgeCasePromoteResponse {
2493
3027
  | 'CHILDREN_PLAYING'
2494
3028
  | 'CITY'
2495
3029
  | 'COFFEE_SHOP'
3030
+ | 'CONSTRUCTION'
3031
+ | 'CRYING_BABY'
2496
3032
  | 'DRIVING'
3033
+ | 'LIBRARY'
2497
3034
  | 'OFFICE'
2498
- | 'THUNDERSTORM';
3035
+ | 'THUNDERSTORM'
3036
+ | 'TRAIN';
2499
3037
 
2500
3038
  backgroundNoiseVolume: number;
2501
3039
 
@@ -2514,6 +3052,233 @@ export namespace CustomerFlowEdgeCasePromoteResponse {
2514
3052
  description?: string | null;
2515
3053
  }
2516
3054
 
3055
+ export interface HandoffPersona {
3056
+ /**
3057
+ * Unique identifier of the persona
3058
+ */
3059
+ id: string;
3060
+
3061
+ /**
3062
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
3063
+ * optional variants
3064
+ */
3065
+ accent:
3066
+ | 'US'
3067
+ | 'US_X_SOUTH'
3068
+ | 'GB'
3069
+ | 'ES'
3070
+ | 'DE'
3071
+ | 'IN'
3072
+ | 'FR'
3073
+ | 'NL'
3074
+ | 'SA'
3075
+ | 'GR'
3076
+ | 'AU'
3077
+ | 'IT'
3078
+ | 'ID'
3079
+ | 'TH'
3080
+ | 'JP'
3081
+ | 'NZ'
3082
+ | 'PH'
3083
+ | 'SG'
3084
+ | 'MY'
3085
+ | 'HK'
3086
+ | 'TR'
3087
+ | 'PT'
3088
+ | 'IL';
3089
+
3090
+ /**
3091
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
3092
+ * voice for are accepted; defaults to ADULT, which every accent supports.
3093
+ */
3094
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
3095
+
3096
+ /**
3097
+ * Background noise setting
3098
+ */
3099
+ backgroundNoise:
3100
+ | 'NONE'
3101
+ | 'AIRPORT'
3102
+ | 'CHILDREN_PLAYING'
3103
+ | 'CITY'
3104
+ | 'COFFEE_SHOP'
3105
+ | 'CONSTRUCTION'
3106
+ | 'CRYING_BABY'
3107
+ | 'DRIVING'
3108
+ | 'LIBRARY'
3109
+ | 'OFFICE'
3110
+ | 'THUNDERSTORM'
3111
+ | 'TRAIN';
3112
+
3113
+ /**
3114
+ * Base emotional state of the persona
3115
+ */
3116
+ baseEmotion:
3117
+ | 'NEUTRAL'
3118
+ | 'CHEERFUL'
3119
+ | 'CONFUSED'
3120
+ | 'FRUSTRATED'
3121
+ | 'SKEPTICAL'
3122
+ | 'RUSHED'
3123
+ | 'DISTRACTED'
3124
+ | 'ANGRY'
3125
+ | 'ANXIOUS'
3126
+ | 'SAD';
3127
+
3128
+ /**
3129
+ * How the persona confirms information
3130
+ */
3131
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
3132
+
3133
+ /**
3134
+ * Creation timestamp
3135
+ */
3136
+ createdAt: string;
3137
+
3138
+ /**
3139
+ * Gender of the persona
3140
+ */
3141
+ gender: 'MALE' | 'FEMALE';
3142
+
3143
+ /**
3144
+ * Whether the persona uses filler words like "um" and "uh"
3145
+ */
3146
+ hasDisfluencies: boolean;
3147
+
3148
+ /**
3149
+ * Maximum number of idle messages the persona will send before giving up
3150
+ */
3151
+ idleMessageMaxSpokenCount: number;
3152
+
3153
+ /**
3154
+ * Whether the idle message counter resets when the agent speaks
3155
+ */
3156
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
3157
+
3158
+ /**
3159
+ * Messages the persona will say when the agent goes silent during a call. null =
3160
+ * "Automatic": language-appropriate defaults are used at call time.
3161
+ */
3162
+ idleMessages: Array<string> | null;
3163
+
3164
+ /**
3165
+ * Seconds of silence before the persona sends an idle message
3166
+ */
3167
+ idleTimeoutSeconds: number;
3168
+
3169
+ /**
3170
+ * How clearly the persona expresses their intentions
3171
+ */
3172
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
3173
+
3174
+ /**
3175
+ * Primary language ISO 639-1 code for the persona
3176
+ */
3177
+ language:
3178
+ | 'EN'
3179
+ | 'ES'
3180
+ | 'DE'
3181
+ | 'HI'
3182
+ | 'FR'
3183
+ | 'NL'
3184
+ | 'AR'
3185
+ | 'EL'
3186
+ | 'IT'
3187
+ | 'ID'
3188
+ | 'TH'
3189
+ | 'JA'
3190
+ | 'TL'
3191
+ | 'MS'
3192
+ | 'ZH'
3193
+ | 'TR'
3194
+ | 'PT'
3195
+ | 'HE';
3196
+
3197
+ /**
3198
+ * How reliable the persona's memory is
3199
+ */
3200
+ memoryReliability: 'HIGH' | 'LOW';
3201
+
3202
+ /**
3203
+ * The name the agent will identify as during conversations
3204
+ */
3205
+ name: string;
3206
+
3207
+ /**
3208
+ * Additional custom properties about the persona
3209
+ */
3210
+ properties: { [key: string]: unknown };
3211
+
3212
+ /**
3213
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
3214
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
3215
+ * for several seconds.
3216
+ */
3217
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
3218
+
3219
+ /**
3220
+ * Speech clarity of the persona
3221
+ */
3222
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
3223
+
3224
+ /**
3225
+ * Speech pace of the persona
3226
+ */
3227
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
3228
+
3229
+ /**
3230
+ * Languages the persona can understand. Multilingual combinations are limited by
3231
+ * multilingual speech recognition support.
3232
+ */
3233
+ understoodLanguages: Array<
3234
+ | 'EN'
3235
+ | 'ES'
3236
+ | 'DE'
3237
+ | 'HI'
3238
+ | 'FR'
3239
+ | 'NL'
3240
+ | 'AR'
3241
+ | 'EL'
3242
+ | 'IT'
3243
+ | 'ID'
3244
+ | 'TH'
3245
+ | 'JA'
3246
+ | 'TL'
3247
+ | 'MS'
3248
+ | 'ZH'
3249
+ | 'TR'
3250
+ | 'PT'
3251
+ | 'HE'
3252
+ >;
3253
+
3254
+ /**
3255
+ * Last update timestamp
3256
+ */
3257
+ updatedAt: string;
3258
+
3259
+ /**
3260
+ * Background story and behavioral patterns for the persona
3261
+ */
3262
+ backstoryPrompt?: string | null;
3263
+
3264
+ /**
3265
+ * Human-readable description of the persona
3266
+ */
3267
+ description?: string | null;
3268
+
3269
+ /**
3270
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
3271
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
3272
+ * or set null to display the name itself.
3273
+ */
3274
+ displayName?: string | null;
3275
+
3276
+ /**
3277
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
3278
+ */
3279
+ secondaryLanguage?: 'EN' | null;
3280
+ }
3281
+
2517
3282
  /**
2518
3283
  * The persona this runs as instead of the happy path's. Null means it inherits.
2519
3284
  */
@@ -2567,9 +3332,13 @@ export namespace CustomerFlowEdgeCasePromoteResponse {
2567
3332
  | 'CHILDREN_PLAYING'
2568
3333
  | 'CITY'
2569
3334
  | 'COFFEE_SHOP'
3335
+ | 'CONSTRUCTION'
3336
+ | 'CRYING_BABY'
2570
3337
  | 'DRIVING'
3338
+ | 'LIBRARY'
2571
3339
  | 'OFFICE'
2572
- | 'THUNDERSTORM';
3340
+ | 'THUNDERSTORM'
3341
+ | 'TRAIN';
2573
3342
 
2574
3343
  /**
2575
3344
  * Base emotional state of the persona
@@ -2814,9 +3583,13 @@ export namespace CustomerFlowEdgeCasePromoteResponse {
2814
3583
  | 'CHILDREN_PLAYING'
2815
3584
  | 'CITY'
2816
3585
  | 'COFFEE_SHOP'
3586
+ | 'CONSTRUCTION'
3587
+ | 'CRYING_BABY'
2817
3588
  | 'DRIVING'
3589
+ | 'LIBRARY'
2818
3590
  | 'OFFICE'
2819
- | 'THUNDERSTORM';
3591
+ | 'THUNDERSTORM'
3592
+ | 'TRAIN';
2820
3593
 
2821
3594
  backgroundNoiseVolume: number;
2822
3595
 
@@ -2888,9 +3661,13 @@ export namespace CustomerFlowEdgeCasePromoteResponse {
2888
3661
  | 'CHILDREN_PLAYING'
2889
3662
  | 'CITY'
2890
3663
  | 'COFFEE_SHOP'
3664
+ | 'CONSTRUCTION'
3665
+ | 'CRYING_BABY'
2891
3666
  | 'DRIVING'
3667
+ | 'LIBRARY'
2892
3668
  | 'OFFICE'
2893
- | 'THUNDERSTORM';
3669
+ | 'THUNDERSTORM'
3670
+ | 'TRAIN';
2894
3671
 
2895
3672
  /**
2896
3673
  * Base emotional state of the persona