@roarkanalytics/sdk 3.14.0 → 3.16.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 (37) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/package.json +1 -1
  3. package/resources/config.d.mts +47 -6
  4. package/resources/config.d.mts.map +1 -1
  5. package/resources/config.d.ts +47 -6
  6. package/resources/config.d.ts.map +1 -1
  7. package/resources/customer-flow-edge-case.d.mts +384 -3
  8. package/resources/customer-flow-edge-case.d.mts.map +1 -1
  9. package/resources/customer-flow-edge-case.d.ts +384 -3
  10. package/resources/customer-flow-edge-case.d.ts.map +1 -1
  11. package/resources/customer-flow.d.mts +1576 -39
  12. package/resources/customer-flow.d.mts.map +1 -1
  13. package/resources/customer-flow.d.ts +1576 -39
  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-run-plan.d.mts +44 -0
  20. package/resources/simulation-run-plan.d.mts.map +1 -1
  21. package/resources/simulation-run-plan.d.ts +44 -0
  22. package/resources/simulation-run-plan.d.ts.map +1 -1
  23. package/resources/simulation.d.mts +14 -0
  24. package/resources/simulation.d.mts.map +1 -1
  25. package/resources/simulation.d.ts +14 -0
  26. package/resources/simulation.d.ts.map +1 -1
  27. package/src/resources/config.ts +87 -3
  28. package/src/resources/customer-flow-edge-case.ts +909 -204
  29. package/src/resources/customer-flow.ts +4334 -1494
  30. package/src/resources/http-request-definition.ts +28 -0
  31. package/src/resources/simulation-run-plan.ts +50 -0
  32. package/src/resources/simulation.ts +15 -0
  33. package/src/version.ts +1 -1
  34. package/version.d.mts +1 -1
  35. package/version.d.ts +1 -1
  36. package/version.js +1 -1
  37. package/version.mjs +1 -1
@@ -154,12 +154,17 @@ export declare class CustomerFlow extends APIResource {
154
154
  * run is graded against rather than an instruction, and it counts as an agent turn
155
155
  * for role alternation.
156
156
  *
157
+ * A `CUSTOMER_HANDOFF` hands the phone to another persona (`handoffPersonaId`), or
158
+ * back to the flow's own persona when it is null. The steps after it are spoken by
159
+ * whoever holds the phone. It sits between turns like a silence, so it may follow
160
+ * either side.
161
+ *
157
162
  * In a STRICT flow an `AGENT_TURN` may carry its own `offScriptPolicy`, which
158
163
  * replaces the flow-level one at that step. Omit it (or send null) to follow the
159
164
  * flow's policy. Use it where one missed step makes the rest of the call
160
165
  * meaningless: an authentication menu, say, with `then: HANG_UP_INVALIDATE`.
161
166
  */
162
- export type FlowStep = FlowStep.UnionMember0 | FlowStep.UnionMember1 | FlowStep.UnionMember2 | FlowStep.UnionMember3 | FlowStep.UnionMember4 | FlowStep.UnionMember5 | FlowStep.UnionMember6 | FlowStep.UnionMember7 | FlowStep.UnionMember8;
167
+ export type FlowStep = FlowStep.UnionMember0 | FlowStep.UnionMember1 | FlowStep.UnionMember2 | FlowStep.UnionMember3 | FlowStep.UnionMember4 | FlowStep.UnionMember5 | FlowStep.UnionMember6 | FlowStep.UnionMember7 | FlowStep.UnionMember8 | FlowStep.UnionMember9;
163
168
  export declare namespace FlowStep {
164
169
  interface UnionMember0 {
165
170
  type: 'AGENT_TURN';
@@ -235,6 +240,14 @@ export declare namespace FlowStep {
235
240
  steps?: Array<CustomerFlowAPI.FlowStep>;
236
241
  }
237
242
  interface UnionMember8 {
243
+ type: 'CUSTOMER_HANDOFF';
244
+ handoffPersonaId?: string | null;
245
+ mergeIntoNodeIds?: Array<string>;
246
+ nodeId?: string;
247
+ ref?: string;
248
+ steps?: Array<CustomerFlowAPI.FlowStep>;
249
+ }
250
+ interface UnionMember9 {
238
251
  type: 'SCENARIO_LINK';
239
252
  linkedCustomerFlowId?: string | null;
240
253
  linkedCustomerFlowVariantId?: string | null;
@@ -855,6 +868,11 @@ export declare namespace CustomerFlowCreateResponse {
855
868
  * project.
856
869
  */
857
870
  environment: EdgeCase.Environment | null;
871
+ /**
872
+ * The personas this brief hands the phone to, in order of first mention. Empty
873
+ * when the brief inherits the happy path's: read the happy path's list.
874
+ */
875
+ handoffPersonas: Array<EdgeCase.HandoffPersona>;
858
876
  isGenerated: boolean;
859
877
  /**
860
878
  * The persona this runs as instead of the happy path's. Null means it inherits.
@@ -869,7 +887,9 @@ export declare namespace CustomerFlowCreateResponse {
869
887
  */
870
888
  updatedAt: string;
871
889
  /**
872
- * The brief the simulated customer improvises from.
890
+ * The brief the simulated customer improvises from. A `@{persona:<id>}` mention
891
+ * hands the phone to that persona mid-call; the sentences around the mention say
892
+ * when.
873
893
  */
874
894
  prompt?: string | null;
875
895
  systemKey?: string | null;
@@ -905,6 +925,126 @@ export declare namespace CustomerFlowCreateResponse {
905
925
  updatedAt: string;
906
926
  description?: string | null;
907
927
  }
928
+ interface HandoffPersona {
929
+ /**
930
+ * Unique identifier of the persona
931
+ */
932
+ id: string;
933
+ /**
934
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
935
+ * optional variants
936
+ */
937
+ accent: 'US' | 'US_X_SOUTH' | 'GB' | 'ES' | 'DE' | 'IN' | 'FR' | 'NL' | 'SA' | 'GR' | 'AU' | 'IT' | 'ID' | 'TH' | 'JP' | 'NZ' | 'PH' | 'SG' | 'MY' | 'HK' | 'TR' | 'PT' | 'IL';
938
+ /**
939
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
940
+ * voice for are accepted; defaults to ADULT, which every accent supports.
941
+ */
942
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
943
+ /**
944
+ * Background noise setting
945
+ */
946
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'CONSTRUCTION' | 'CRYING_BABY' | 'DRIVING' | 'LIBRARY' | 'OFFICE' | 'THUNDERSTORM' | 'TRAIN';
947
+ /**
948
+ * Base emotional state of the persona
949
+ */
950
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
951
+ /**
952
+ * How the persona confirms information
953
+ */
954
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
955
+ /**
956
+ * Creation timestamp
957
+ */
958
+ createdAt: string;
959
+ /**
960
+ * Gender of the persona
961
+ */
962
+ gender: 'MALE' | 'FEMALE';
963
+ /**
964
+ * Whether the persona uses filler words like "um" and "uh"
965
+ */
966
+ hasDisfluencies: boolean;
967
+ /**
968
+ * Maximum number of idle messages the persona will send before giving up
969
+ */
970
+ idleMessageMaxSpokenCount: number;
971
+ /**
972
+ * Whether the idle message counter resets when the agent speaks
973
+ */
974
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
975
+ /**
976
+ * Messages the persona will say when the agent goes silent during a call. null =
977
+ * "Automatic": language-appropriate defaults are used at call time.
978
+ */
979
+ idleMessages: Array<string> | null;
980
+ /**
981
+ * Seconds of silence before the persona sends an idle message
982
+ */
983
+ idleTimeoutSeconds: number;
984
+ /**
985
+ * How clearly the persona expresses their intentions
986
+ */
987
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
988
+ /**
989
+ * Primary language ISO 639-1 code for the persona
990
+ */
991
+ language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE';
992
+ /**
993
+ * How reliable the persona's memory is
994
+ */
995
+ memoryReliability: 'HIGH' | 'LOW';
996
+ /**
997
+ * The name the agent will identify as during conversations
998
+ */
999
+ name: string;
1000
+ /**
1001
+ * Additional custom properties about the persona
1002
+ */
1003
+ properties: {
1004
+ [key: string]: unknown;
1005
+ };
1006
+ /**
1007
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
1008
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
1009
+ * for several seconds.
1010
+ */
1011
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
1012
+ /**
1013
+ * Speech clarity of the persona
1014
+ */
1015
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
1016
+ /**
1017
+ * Speech pace of the persona
1018
+ */
1019
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
1020
+ /**
1021
+ * Languages the persona can understand. Multilingual combinations are limited by
1022
+ * multilingual speech recognition support.
1023
+ */
1024
+ understoodLanguages: Array<'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE'>;
1025
+ /**
1026
+ * Last update timestamp
1027
+ */
1028
+ updatedAt: string;
1029
+ /**
1030
+ * Background story and behavioral patterns for the persona
1031
+ */
1032
+ backstoryPrompt?: string | null;
1033
+ /**
1034
+ * Human-readable description of the persona
1035
+ */
1036
+ description?: string | null;
1037
+ /**
1038
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
1039
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
1040
+ * or set null to display the name itself.
1041
+ */
1042
+ displayName?: string | null;
1043
+ /**
1044
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
1045
+ */
1046
+ secondaryLanguage?: 'EN' | null;
1047
+ }
908
1048
  /**
909
1049
  * The persona this runs as instead of the happy path's. Null means it inherits.
910
1050
  */
@@ -1048,6 +1188,11 @@ export declare namespace CustomerFlowCreateResponse {
1048
1188
  * project.
1049
1189
  */
1050
1190
  environment: HappyPath.Environment | null;
1191
+ /**
1192
+ * The personas this brief hands the phone to, in order of first mention. Empty
1193
+ * when the brief inherits the happy path's: read the happy path's list.
1194
+ */
1195
+ handoffPersonas: Array<HappyPath.HandoffPersona>;
1051
1196
  isGenerated: boolean;
1052
1197
  /**
1053
1198
  * The persona this runs as instead of the happy path's. Null means it inherits.
@@ -1062,7 +1207,9 @@ export declare namespace CustomerFlowCreateResponse {
1062
1207
  */
1063
1208
  updatedAt: string;
1064
1209
  /**
1065
- * The brief the simulated customer improvises from.
1210
+ * The brief the simulated customer improvises from. A `@{persona:<id>}` mention
1211
+ * hands the phone to that persona mid-call; the sentences around the mention say
1212
+ * when.
1066
1213
  */
1067
1214
  prompt?: string | null;
1068
1215
  systemKey?: string | null;
@@ -1098,6 +1245,126 @@ export declare namespace CustomerFlowCreateResponse {
1098
1245
  updatedAt: string;
1099
1246
  description?: string | null;
1100
1247
  }
1248
+ interface HandoffPersona {
1249
+ /**
1250
+ * Unique identifier of the persona
1251
+ */
1252
+ id: string;
1253
+ /**
1254
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
1255
+ * optional variants
1256
+ */
1257
+ accent: 'US' | 'US_X_SOUTH' | 'GB' | 'ES' | 'DE' | 'IN' | 'FR' | 'NL' | 'SA' | 'GR' | 'AU' | 'IT' | 'ID' | 'TH' | 'JP' | 'NZ' | 'PH' | 'SG' | 'MY' | 'HK' | 'TR' | 'PT' | 'IL';
1258
+ /**
1259
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
1260
+ * voice for are accepted; defaults to ADULT, which every accent supports.
1261
+ */
1262
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
1263
+ /**
1264
+ * Background noise setting
1265
+ */
1266
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'CONSTRUCTION' | 'CRYING_BABY' | 'DRIVING' | 'LIBRARY' | 'OFFICE' | 'THUNDERSTORM' | 'TRAIN';
1267
+ /**
1268
+ * Base emotional state of the persona
1269
+ */
1270
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
1271
+ /**
1272
+ * How the persona confirms information
1273
+ */
1274
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
1275
+ /**
1276
+ * Creation timestamp
1277
+ */
1278
+ createdAt: string;
1279
+ /**
1280
+ * Gender of the persona
1281
+ */
1282
+ gender: 'MALE' | 'FEMALE';
1283
+ /**
1284
+ * Whether the persona uses filler words like "um" and "uh"
1285
+ */
1286
+ hasDisfluencies: boolean;
1287
+ /**
1288
+ * Maximum number of idle messages the persona will send before giving up
1289
+ */
1290
+ idleMessageMaxSpokenCount: number;
1291
+ /**
1292
+ * Whether the idle message counter resets when the agent speaks
1293
+ */
1294
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
1295
+ /**
1296
+ * Messages the persona will say when the agent goes silent during a call. null =
1297
+ * "Automatic": language-appropriate defaults are used at call time.
1298
+ */
1299
+ idleMessages: Array<string> | null;
1300
+ /**
1301
+ * Seconds of silence before the persona sends an idle message
1302
+ */
1303
+ idleTimeoutSeconds: number;
1304
+ /**
1305
+ * How clearly the persona expresses their intentions
1306
+ */
1307
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
1308
+ /**
1309
+ * Primary language ISO 639-1 code for the persona
1310
+ */
1311
+ language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE';
1312
+ /**
1313
+ * How reliable the persona's memory is
1314
+ */
1315
+ memoryReliability: 'HIGH' | 'LOW';
1316
+ /**
1317
+ * The name the agent will identify as during conversations
1318
+ */
1319
+ name: string;
1320
+ /**
1321
+ * Additional custom properties about the persona
1322
+ */
1323
+ properties: {
1324
+ [key: string]: unknown;
1325
+ };
1326
+ /**
1327
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
1328
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
1329
+ * for several seconds.
1330
+ */
1331
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
1332
+ /**
1333
+ * Speech clarity of the persona
1334
+ */
1335
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
1336
+ /**
1337
+ * Speech pace of the persona
1338
+ */
1339
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
1340
+ /**
1341
+ * Languages the persona can understand. Multilingual combinations are limited by
1342
+ * multilingual speech recognition support.
1343
+ */
1344
+ understoodLanguages: Array<'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE'>;
1345
+ /**
1346
+ * Last update timestamp
1347
+ */
1348
+ updatedAt: string;
1349
+ /**
1350
+ * Background story and behavioral patterns for the persona
1351
+ */
1352
+ backstoryPrompt?: string | null;
1353
+ /**
1354
+ * Human-readable description of the persona
1355
+ */
1356
+ description?: string | null;
1357
+ /**
1358
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
1359
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
1360
+ * or set null to display the name itself.
1361
+ */
1362
+ displayName?: string | null;
1363
+ /**
1364
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
1365
+ */
1366
+ secondaryLanguage?: 'EN' | null;
1367
+ }
1101
1368
  /**
1102
1369
  * The persona this runs as instead of the happy path's. Null means it inherits.
1103
1370
  */
@@ -2282,6 +2549,11 @@ export declare namespace CustomerFlowUpdateResponse {
2282
2549
  * project.
2283
2550
  */
2284
2551
  environment: EdgeCase.Environment | null;
2552
+ /**
2553
+ * The personas this brief hands the phone to, in order of first mention. Empty
2554
+ * when the brief inherits the happy path's: read the happy path's list.
2555
+ */
2556
+ handoffPersonas: Array<EdgeCase.HandoffPersona>;
2285
2557
  isGenerated: boolean;
2286
2558
  /**
2287
2559
  * The persona this runs as instead of the happy path's. Null means it inherits.
@@ -2296,7 +2568,9 @@ export declare namespace CustomerFlowUpdateResponse {
2296
2568
  */
2297
2569
  updatedAt: string;
2298
2570
  /**
2299
- * The brief the simulated customer improvises from.
2571
+ * The brief the simulated customer improvises from. A `@{persona:<id>}` mention
2572
+ * hands the phone to that persona mid-call; the sentences around the mention say
2573
+ * when.
2300
2574
  */
2301
2575
  prompt?: string | null;
2302
2576
  systemKey?: string | null;
@@ -2332,10 +2606,7 @@ export declare namespace CustomerFlowUpdateResponse {
2332
2606
  updatedAt: string;
2333
2607
  description?: string | null;
2334
2608
  }
2335
- /**
2336
- * The persona this runs as instead of the happy path's. Null means it inherits.
2337
- */
2338
- interface PersonaOverride {
2609
+ interface HandoffPersona {
2339
2610
  /**
2340
2611
  * Unique identifier of the persona
2341
2612
  */
@@ -2455,8 +2726,131 @@ export declare namespace CustomerFlowUpdateResponse {
2455
2726
  */
2456
2727
  secondaryLanguage?: 'EN' | null;
2457
2728
  }
2458
- }
2459
- /**
2729
+ /**
2730
+ * The persona this runs as instead of the happy path's. Null means it inherits.
2731
+ */
2732
+ interface PersonaOverride {
2733
+ /**
2734
+ * Unique identifier of the persona
2735
+ */
2736
+ id: string;
2737
+ /**
2738
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
2739
+ * optional variants
2740
+ */
2741
+ accent: 'US' | 'US_X_SOUTH' | 'GB' | 'ES' | 'DE' | 'IN' | 'FR' | 'NL' | 'SA' | 'GR' | 'AU' | 'IT' | 'ID' | 'TH' | 'JP' | 'NZ' | 'PH' | 'SG' | 'MY' | 'HK' | 'TR' | 'PT' | 'IL';
2742
+ /**
2743
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
2744
+ * voice for are accepted; defaults to ADULT, which every accent supports.
2745
+ */
2746
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
2747
+ /**
2748
+ * Background noise setting
2749
+ */
2750
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'CONSTRUCTION' | 'CRYING_BABY' | 'DRIVING' | 'LIBRARY' | 'OFFICE' | 'THUNDERSTORM' | 'TRAIN';
2751
+ /**
2752
+ * Base emotional state of the persona
2753
+ */
2754
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
2755
+ /**
2756
+ * How the persona confirms information
2757
+ */
2758
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
2759
+ /**
2760
+ * Creation timestamp
2761
+ */
2762
+ createdAt: string;
2763
+ /**
2764
+ * Gender of the persona
2765
+ */
2766
+ gender: 'MALE' | 'FEMALE';
2767
+ /**
2768
+ * Whether the persona uses filler words like "um" and "uh"
2769
+ */
2770
+ hasDisfluencies: boolean;
2771
+ /**
2772
+ * Maximum number of idle messages the persona will send before giving up
2773
+ */
2774
+ idleMessageMaxSpokenCount: number;
2775
+ /**
2776
+ * Whether the idle message counter resets when the agent speaks
2777
+ */
2778
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
2779
+ /**
2780
+ * Messages the persona will say when the agent goes silent during a call. null =
2781
+ * "Automatic": language-appropriate defaults are used at call time.
2782
+ */
2783
+ idleMessages: Array<string> | null;
2784
+ /**
2785
+ * Seconds of silence before the persona sends an idle message
2786
+ */
2787
+ idleTimeoutSeconds: number;
2788
+ /**
2789
+ * How clearly the persona expresses their intentions
2790
+ */
2791
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
2792
+ /**
2793
+ * Primary language ISO 639-1 code for the persona
2794
+ */
2795
+ language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE';
2796
+ /**
2797
+ * How reliable the persona's memory is
2798
+ */
2799
+ memoryReliability: 'HIGH' | 'LOW';
2800
+ /**
2801
+ * The name the agent will identify as during conversations
2802
+ */
2803
+ name: string;
2804
+ /**
2805
+ * Additional custom properties about the persona
2806
+ */
2807
+ properties: {
2808
+ [key: string]: unknown;
2809
+ };
2810
+ /**
2811
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
2812
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
2813
+ * for several seconds.
2814
+ */
2815
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
2816
+ /**
2817
+ * Speech clarity of the persona
2818
+ */
2819
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
2820
+ /**
2821
+ * Speech pace of the persona
2822
+ */
2823
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
2824
+ /**
2825
+ * Languages the persona can understand. Multilingual combinations are limited by
2826
+ * multilingual speech recognition support.
2827
+ */
2828
+ understoodLanguages: Array<'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE'>;
2829
+ /**
2830
+ * Last update timestamp
2831
+ */
2832
+ updatedAt: string;
2833
+ /**
2834
+ * Background story and behavioral patterns for the persona
2835
+ */
2836
+ backstoryPrompt?: string | null;
2837
+ /**
2838
+ * Human-readable description of the persona
2839
+ */
2840
+ description?: string | null;
2841
+ /**
2842
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
2843
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
2844
+ * or set null to display the name itself.
2845
+ */
2846
+ displayName?: string | null;
2847
+ /**
2848
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
2849
+ */
2850
+ secondaryLanguage?: 'EN' | null;
2851
+ }
2852
+ }
2853
+ /**
2460
2854
  * One brief to run an improv flow with.
2461
2855
  */
2462
2856
  interface HappyPath {
@@ -2475,6 +2869,11 @@ export declare namespace CustomerFlowUpdateResponse {
2475
2869
  * project.
2476
2870
  */
2477
2871
  environment: HappyPath.Environment | null;
2872
+ /**
2873
+ * The personas this brief hands the phone to, in order of first mention. Empty
2874
+ * when the brief inherits the happy path's: read the happy path's list.
2875
+ */
2876
+ handoffPersonas: Array<HappyPath.HandoffPersona>;
2478
2877
  isGenerated: boolean;
2479
2878
  /**
2480
2879
  * The persona this runs as instead of the happy path's. Null means it inherits.
@@ -2489,7 +2888,9 @@ export declare namespace CustomerFlowUpdateResponse {
2489
2888
  */
2490
2889
  updatedAt: string;
2491
2890
  /**
2492
- * The brief the simulated customer improvises from.
2891
+ * The brief the simulated customer improvises from. A `@{persona:<id>}` mention
2892
+ * hands the phone to that persona mid-call; the sentences around the mention say
2893
+ * when.
2493
2894
  */
2494
2895
  prompt?: string | null;
2495
2896
  systemKey?: string | null;
@@ -2525,6 +2926,126 @@ export declare namespace CustomerFlowUpdateResponse {
2525
2926
  updatedAt: string;
2526
2927
  description?: string | null;
2527
2928
  }
2929
+ interface HandoffPersona {
2930
+ /**
2931
+ * Unique identifier of the persona
2932
+ */
2933
+ id: string;
2934
+ /**
2935
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
2936
+ * optional variants
2937
+ */
2938
+ accent: 'US' | 'US_X_SOUTH' | 'GB' | 'ES' | 'DE' | 'IN' | 'FR' | 'NL' | 'SA' | 'GR' | 'AU' | 'IT' | 'ID' | 'TH' | 'JP' | 'NZ' | 'PH' | 'SG' | 'MY' | 'HK' | 'TR' | 'PT' | 'IL';
2939
+ /**
2940
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
2941
+ * voice for are accepted; defaults to ADULT, which every accent supports.
2942
+ */
2943
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
2944
+ /**
2945
+ * Background noise setting
2946
+ */
2947
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'CONSTRUCTION' | 'CRYING_BABY' | 'DRIVING' | 'LIBRARY' | 'OFFICE' | 'THUNDERSTORM' | 'TRAIN';
2948
+ /**
2949
+ * Base emotional state of the persona
2950
+ */
2951
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
2952
+ /**
2953
+ * How the persona confirms information
2954
+ */
2955
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
2956
+ /**
2957
+ * Creation timestamp
2958
+ */
2959
+ createdAt: string;
2960
+ /**
2961
+ * Gender of the persona
2962
+ */
2963
+ gender: 'MALE' | 'FEMALE';
2964
+ /**
2965
+ * Whether the persona uses filler words like "um" and "uh"
2966
+ */
2967
+ hasDisfluencies: boolean;
2968
+ /**
2969
+ * Maximum number of idle messages the persona will send before giving up
2970
+ */
2971
+ idleMessageMaxSpokenCount: number;
2972
+ /**
2973
+ * Whether the idle message counter resets when the agent speaks
2974
+ */
2975
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
2976
+ /**
2977
+ * Messages the persona will say when the agent goes silent during a call. null =
2978
+ * "Automatic": language-appropriate defaults are used at call time.
2979
+ */
2980
+ idleMessages: Array<string> | null;
2981
+ /**
2982
+ * Seconds of silence before the persona sends an idle message
2983
+ */
2984
+ idleTimeoutSeconds: number;
2985
+ /**
2986
+ * How clearly the persona expresses their intentions
2987
+ */
2988
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
2989
+ /**
2990
+ * Primary language ISO 639-1 code for the persona
2991
+ */
2992
+ language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE';
2993
+ /**
2994
+ * How reliable the persona's memory is
2995
+ */
2996
+ memoryReliability: 'HIGH' | 'LOW';
2997
+ /**
2998
+ * The name the agent will identify as during conversations
2999
+ */
3000
+ name: string;
3001
+ /**
3002
+ * Additional custom properties about the persona
3003
+ */
3004
+ properties: {
3005
+ [key: string]: unknown;
3006
+ };
3007
+ /**
3008
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
3009
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
3010
+ * for several seconds.
3011
+ */
3012
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
3013
+ /**
3014
+ * Speech clarity of the persona
3015
+ */
3016
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
3017
+ /**
3018
+ * Speech pace of the persona
3019
+ */
3020
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
3021
+ /**
3022
+ * Languages the persona can understand. Multilingual combinations are limited by
3023
+ * multilingual speech recognition support.
3024
+ */
3025
+ understoodLanguages: Array<'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE'>;
3026
+ /**
3027
+ * Last update timestamp
3028
+ */
3029
+ updatedAt: string;
3030
+ /**
3031
+ * Background story and behavioral patterns for the persona
3032
+ */
3033
+ backstoryPrompt?: string | null;
3034
+ /**
3035
+ * Human-readable description of the persona
3036
+ */
3037
+ description?: string | null;
3038
+ /**
3039
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
3040
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
3041
+ * or set null to display the name itself.
3042
+ */
3043
+ displayName?: string | null;
3044
+ /**
3045
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
3046
+ */
3047
+ secondaryLanguage?: 'EN' | null;
3048
+ }
2528
3049
  /**
2529
3050
  * The persona this runs as instead of the happy path's. Null means it inherits.
2530
3051
  */
@@ -3710,6 +4231,11 @@ export declare namespace CustomerFlowListResponse {
3710
4231
  * project.
3711
4232
  */
3712
4233
  environment: EdgeCase.Environment | null;
4234
+ /**
4235
+ * The personas this brief hands the phone to, in order of first mention. Empty
4236
+ * when the brief inherits the happy path's: read the happy path's list.
4237
+ */
4238
+ handoffPersonas: Array<EdgeCase.HandoffPersona>;
3713
4239
  isGenerated: boolean;
3714
4240
  /**
3715
4241
  * The persona this runs as instead of the happy path's. Null means it inherits.
@@ -3724,7 +4250,9 @@ export declare namespace CustomerFlowListResponse {
3724
4250
  */
3725
4251
  updatedAt: string;
3726
4252
  /**
3727
- * The brief the simulated customer improvises from.
4253
+ * The brief the simulated customer improvises from. A `@{persona:<id>}` mention
4254
+ * hands the phone to that persona mid-call; the sentences around the mention say
4255
+ * when.
3728
4256
  */
3729
4257
  prompt?: string | null;
3730
4258
  systemKey?: string | null;
@@ -3760,10 +4288,7 @@ export declare namespace CustomerFlowListResponse {
3760
4288
  updatedAt: string;
3761
4289
  description?: string | null;
3762
4290
  }
3763
- /**
3764
- * The persona this runs as instead of the happy path's. Null means it inherits.
3765
- */
3766
- interface PersonaOverride {
4291
+ interface HandoffPersona {
3767
4292
  /**
3768
4293
  * Unique identifier of the persona
3769
4294
  */
@@ -3883,10 +4408,133 @@ export declare namespace CustomerFlowListResponse {
3883
4408
  */
3884
4409
  secondaryLanguage?: 'EN' | null;
3885
4410
  }
3886
- }
3887
- /**
3888
- * One brief to run an improv flow with.
3889
- */
4411
+ /**
4412
+ * The persona this runs as instead of the happy path's. Null means it inherits.
4413
+ */
4414
+ interface PersonaOverride {
4415
+ /**
4416
+ * Unique identifier of the persona
4417
+ */
4418
+ id: string;
4419
+ /**
4420
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
4421
+ * optional variants
4422
+ */
4423
+ accent: 'US' | 'US_X_SOUTH' | 'GB' | 'ES' | 'DE' | 'IN' | 'FR' | 'NL' | 'SA' | 'GR' | 'AU' | 'IT' | 'ID' | 'TH' | 'JP' | 'NZ' | 'PH' | 'SG' | 'MY' | 'HK' | 'TR' | 'PT' | 'IL';
4424
+ /**
4425
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
4426
+ * voice for are accepted; defaults to ADULT, which every accent supports.
4427
+ */
4428
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
4429
+ /**
4430
+ * Background noise setting
4431
+ */
4432
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'CONSTRUCTION' | 'CRYING_BABY' | 'DRIVING' | 'LIBRARY' | 'OFFICE' | 'THUNDERSTORM' | 'TRAIN';
4433
+ /**
4434
+ * Base emotional state of the persona
4435
+ */
4436
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
4437
+ /**
4438
+ * How the persona confirms information
4439
+ */
4440
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
4441
+ /**
4442
+ * Creation timestamp
4443
+ */
4444
+ createdAt: string;
4445
+ /**
4446
+ * Gender of the persona
4447
+ */
4448
+ gender: 'MALE' | 'FEMALE';
4449
+ /**
4450
+ * Whether the persona uses filler words like "um" and "uh"
4451
+ */
4452
+ hasDisfluencies: boolean;
4453
+ /**
4454
+ * Maximum number of idle messages the persona will send before giving up
4455
+ */
4456
+ idleMessageMaxSpokenCount: number;
4457
+ /**
4458
+ * Whether the idle message counter resets when the agent speaks
4459
+ */
4460
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
4461
+ /**
4462
+ * Messages the persona will say when the agent goes silent during a call. null =
4463
+ * "Automatic": language-appropriate defaults are used at call time.
4464
+ */
4465
+ idleMessages: Array<string> | null;
4466
+ /**
4467
+ * Seconds of silence before the persona sends an idle message
4468
+ */
4469
+ idleTimeoutSeconds: number;
4470
+ /**
4471
+ * How clearly the persona expresses their intentions
4472
+ */
4473
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
4474
+ /**
4475
+ * Primary language ISO 639-1 code for the persona
4476
+ */
4477
+ language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE';
4478
+ /**
4479
+ * How reliable the persona's memory is
4480
+ */
4481
+ memoryReliability: 'HIGH' | 'LOW';
4482
+ /**
4483
+ * The name the agent will identify as during conversations
4484
+ */
4485
+ name: string;
4486
+ /**
4487
+ * Additional custom properties about the persona
4488
+ */
4489
+ properties: {
4490
+ [key: string]: unknown;
4491
+ };
4492
+ /**
4493
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
4494
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
4495
+ * for several seconds.
4496
+ */
4497
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
4498
+ /**
4499
+ * Speech clarity of the persona
4500
+ */
4501
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
4502
+ /**
4503
+ * Speech pace of the persona
4504
+ */
4505
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
4506
+ /**
4507
+ * Languages the persona can understand. Multilingual combinations are limited by
4508
+ * multilingual speech recognition support.
4509
+ */
4510
+ understoodLanguages: Array<'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE'>;
4511
+ /**
4512
+ * Last update timestamp
4513
+ */
4514
+ updatedAt: string;
4515
+ /**
4516
+ * Background story and behavioral patterns for the persona
4517
+ */
4518
+ backstoryPrompt?: string | null;
4519
+ /**
4520
+ * Human-readable description of the persona
4521
+ */
4522
+ description?: string | null;
4523
+ /**
4524
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
4525
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
4526
+ * or set null to display the name itself.
4527
+ */
4528
+ displayName?: string | null;
4529
+ /**
4530
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
4531
+ */
4532
+ secondaryLanguage?: 'EN' | null;
4533
+ }
4534
+ }
4535
+ /**
4536
+ * One brief to run an improv flow with.
4537
+ */
3890
4538
  interface HappyPath {
3891
4539
  id: string;
3892
4540
  /**
@@ -3903,6 +4551,11 @@ export declare namespace CustomerFlowListResponse {
3903
4551
  * project.
3904
4552
  */
3905
4553
  environment: HappyPath.Environment | null;
4554
+ /**
4555
+ * The personas this brief hands the phone to, in order of first mention. Empty
4556
+ * when the brief inherits the happy path's: read the happy path's list.
4557
+ */
4558
+ handoffPersonas: Array<HappyPath.HandoffPersona>;
3906
4559
  isGenerated: boolean;
3907
4560
  /**
3908
4561
  * The persona this runs as instead of the happy path's. Null means it inherits.
@@ -3917,7 +4570,9 @@ export declare namespace CustomerFlowListResponse {
3917
4570
  */
3918
4571
  updatedAt: string;
3919
4572
  /**
3920
- * The brief the simulated customer improvises from.
4573
+ * The brief the simulated customer improvises from. A `@{persona:<id>}` mention
4574
+ * hands the phone to that persona mid-call; the sentences around the mention say
4575
+ * when.
3921
4576
  */
3922
4577
  prompt?: string | null;
3923
4578
  systemKey?: string | null;
@@ -3953,6 +4608,126 @@ export declare namespace CustomerFlowListResponse {
3953
4608
  updatedAt: string;
3954
4609
  description?: string | null;
3955
4610
  }
4611
+ interface HandoffPersona {
4612
+ /**
4613
+ * Unique identifier of the persona
4614
+ */
4615
+ id: string;
4616
+ /**
4617
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
4618
+ * optional variants
4619
+ */
4620
+ accent: 'US' | 'US_X_SOUTH' | 'GB' | 'ES' | 'DE' | 'IN' | 'FR' | 'NL' | 'SA' | 'GR' | 'AU' | 'IT' | 'ID' | 'TH' | 'JP' | 'NZ' | 'PH' | 'SG' | 'MY' | 'HK' | 'TR' | 'PT' | 'IL';
4621
+ /**
4622
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
4623
+ * voice for are accepted; defaults to ADULT, which every accent supports.
4624
+ */
4625
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
4626
+ /**
4627
+ * Background noise setting
4628
+ */
4629
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'CONSTRUCTION' | 'CRYING_BABY' | 'DRIVING' | 'LIBRARY' | 'OFFICE' | 'THUNDERSTORM' | 'TRAIN';
4630
+ /**
4631
+ * Base emotional state of the persona
4632
+ */
4633
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
4634
+ /**
4635
+ * How the persona confirms information
4636
+ */
4637
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
4638
+ /**
4639
+ * Creation timestamp
4640
+ */
4641
+ createdAt: string;
4642
+ /**
4643
+ * Gender of the persona
4644
+ */
4645
+ gender: 'MALE' | 'FEMALE';
4646
+ /**
4647
+ * Whether the persona uses filler words like "um" and "uh"
4648
+ */
4649
+ hasDisfluencies: boolean;
4650
+ /**
4651
+ * Maximum number of idle messages the persona will send before giving up
4652
+ */
4653
+ idleMessageMaxSpokenCount: number;
4654
+ /**
4655
+ * Whether the idle message counter resets when the agent speaks
4656
+ */
4657
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
4658
+ /**
4659
+ * Messages the persona will say when the agent goes silent during a call. null =
4660
+ * "Automatic": language-appropriate defaults are used at call time.
4661
+ */
4662
+ idleMessages: Array<string> | null;
4663
+ /**
4664
+ * Seconds of silence before the persona sends an idle message
4665
+ */
4666
+ idleTimeoutSeconds: number;
4667
+ /**
4668
+ * How clearly the persona expresses their intentions
4669
+ */
4670
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
4671
+ /**
4672
+ * Primary language ISO 639-1 code for the persona
4673
+ */
4674
+ language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE';
4675
+ /**
4676
+ * How reliable the persona's memory is
4677
+ */
4678
+ memoryReliability: 'HIGH' | 'LOW';
4679
+ /**
4680
+ * The name the agent will identify as during conversations
4681
+ */
4682
+ name: string;
4683
+ /**
4684
+ * Additional custom properties about the persona
4685
+ */
4686
+ properties: {
4687
+ [key: string]: unknown;
4688
+ };
4689
+ /**
4690
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
4691
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
4692
+ * for several seconds.
4693
+ */
4694
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
4695
+ /**
4696
+ * Speech clarity of the persona
4697
+ */
4698
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
4699
+ /**
4700
+ * Speech pace of the persona
4701
+ */
4702
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
4703
+ /**
4704
+ * Languages the persona can understand. Multilingual combinations are limited by
4705
+ * multilingual speech recognition support.
4706
+ */
4707
+ understoodLanguages: Array<'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE'>;
4708
+ /**
4709
+ * Last update timestamp
4710
+ */
4711
+ updatedAt: string;
4712
+ /**
4713
+ * Background story and behavioral patterns for the persona
4714
+ */
4715
+ backstoryPrompt?: string | null;
4716
+ /**
4717
+ * Human-readable description of the persona
4718
+ */
4719
+ description?: string | null;
4720
+ /**
4721
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
4722
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
4723
+ * or set null to display the name itself.
4724
+ */
4725
+ displayName?: string | null;
4726
+ /**
4727
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
4728
+ */
4729
+ secondaryLanguage?: 'EN' | null;
4730
+ }
3956
4731
  /**
3957
4732
  * The persona this runs as instead of the happy path's. Null means it inherits.
3958
4733
  */
@@ -5162,6 +5937,11 @@ export declare namespace CustomerFlowDuplicateResponse {
5162
5937
  * project.
5163
5938
  */
5164
5939
  environment: EdgeCase.Environment | null;
5940
+ /**
5941
+ * The personas this brief hands the phone to, in order of first mention. Empty
5942
+ * when the brief inherits the happy path's: read the happy path's list.
5943
+ */
5944
+ handoffPersonas: Array<EdgeCase.HandoffPersona>;
5165
5945
  isGenerated: boolean;
5166
5946
  /**
5167
5947
  * The persona this runs as instead of the happy path's. Null means it inherits.
@@ -5176,7 +5956,9 @@ export declare namespace CustomerFlowDuplicateResponse {
5176
5956
  */
5177
5957
  updatedAt: string;
5178
5958
  /**
5179
- * The brief the simulated customer improvises from.
5959
+ * The brief the simulated customer improvises from. A `@{persona:<id>}` mention
5960
+ * hands the phone to that persona mid-call; the sentences around the mention say
5961
+ * when.
5180
5962
  */
5181
5963
  prompt?: string | null;
5182
5964
  systemKey?: string | null;
@@ -5212,10 +5994,7 @@ export declare namespace CustomerFlowDuplicateResponse {
5212
5994
  updatedAt: string;
5213
5995
  description?: string | null;
5214
5996
  }
5215
- /**
5216
- * The persona this runs as instead of the happy path's. Null means it inherits.
5217
- */
5218
- interface PersonaOverride {
5997
+ interface HandoffPersona {
5219
5998
  /**
5220
5999
  * Unique identifier of the persona
5221
6000
  */
@@ -5335,8 +6114,131 @@ export declare namespace CustomerFlowDuplicateResponse {
5335
6114
  */
5336
6115
  secondaryLanguage?: 'EN' | null;
5337
6116
  }
5338
- }
5339
- /**
6117
+ /**
6118
+ * The persona this runs as instead of the happy path's. Null means it inherits.
6119
+ */
6120
+ interface PersonaOverride {
6121
+ /**
6122
+ * Unique identifier of the persona
6123
+ */
6124
+ id: string;
6125
+ /**
6126
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
6127
+ * optional variants
6128
+ */
6129
+ accent: 'US' | 'US_X_SOUTH' | 'GB' | 'ES' | 'DE' | 'IN' | 'FR' | 'NL' | 'SA' | 'GR' | 'AU' | 'IT' | 'ID' | 'TH' | 'JP' | 'NZ' | 'PH' | 'SG' | 'MY' | 'HK' | 'TR' | 'PT' | 'IL';
6130
+ /**
6131
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
6132
+ * voice for are accepted; defaults to ADULT, which every accent supports.
6133
+ */
6134
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
6135
+ /**
6136
+ * Background noise setting
6137
+ */
6138
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'CONSTRUCTION' | 'CRYING_BABY' | 'DRIVING' | 'LIBRARY' | 'OFFICE' | 'THUNDERSTORM' | 'TRAIN';
6139
+ /**
6140
+ * Base emotional state of the persona
6141
+ */
6142
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
6143
+ /**
6144
+ * How the persona confirms information
6145
+ */
6146
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
6147
+ /**
6148
+ * Creation timestamp
6149
+ */
6150
+ createdAt: string;
6151
+ /**
6152
+ * Gender of the persona
6153
+ */
6154
+ gender: 'MALE' | 'FEMALE';
6155
+ /**
6156
+ * Whether the persona uses filler words like "um" and "uh"
6157
+ */
6158
+ hasDisfluencies: boolean;
6159
+ /**
6160
+ * Maximum number of idle messages the persona will send before giving up
6161
+ */
6162
+ idleMessageMaxSpokenCount: number;
6163
+ /**
6164
+ * Whether the idle message counter resets when the agent speaks
6165
+ */
6166
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
6167
+ /**
6168
+ * Messages the persona will say when the agent goes silent during a call. null =
6169
+ * "Automatic": language-appropriate defaults are used at call time.
6170
+ */
6171
+ idleMessages: Array<string> | null;
6172
+ /**
6173
+ * Seconds of silence before the persona sends an idle message
6174
+ */
6175
+ idleTimeoutSeconds: number;
6176
+ /**
6177
+ * How clearly the persona expresses their intentions
6178
+ */
6179
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
6180
+ /**
6181
+ * Primary language ISO 639-1 code for the persona
6182
+ */
6183
+ language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE';
6184
+ /**
6185
+ * How reliable the persona's memory is
6186
+ */
6187
+ memoryReliability: 'HIGH' | 'LOW';
6188
+ /**
6189
+ * The name the agent will identify as during conversations
6190
+ */
6191
+ name: string;
6192
+ /**
6193
+ * Additional custom properties about the persona
6194
+ */
6195
+ properties: {
6196
+ [key: string]: unknown;
6197
+ };
6198
+ /**
6199
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
6200
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
6201
+ * for several seconds.
6202
+ */
6203
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
6204
+ /**
6205
+ * Speech clarity of the persona
6206
+ */
6207
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
6208
+ /**
6209
+ * Speech pace of the persona
6210
+ */
6211
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
6212
+ /**
6213
+ * Languages the persona can understand. Multilingual combinations are limited by
6214
+ * multilingual speech recognition support.
6215
+ */
6216
+ understoodLanguages: Array<'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE'>;
6217
+ /**
6218
+ * Last update timestamp
6219
+ */
6220
+ updatedAt: string;
6221
+ /**
6222
+ * Background story and behavioral patterns for the persona
6223
+ */
6224
+ backstoryPrompt?: string | null;
6225
+ /**
6226
+ * Human-readable description of the persona
6227
+ */
6228
+ description?: string | null;
6229
+ /**
6230
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
6231
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
6232
+ * or set null to display the name itself.
6233
+ */
6234
+ displayName?: string | null;
6235
+ /**
6236
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
6237
+ */
6238
+ secondaryLanguage?: 'EN' | null;
6239
+ }
6240
+ }
6241
+ /**
5340
6242
  * One brief to run an improv flow with.
5341
6243
  */
5342
6244
  interface HappyPath {
@@ -5355,6 +6257,11 @@ export declare namespace CustomerFlowDuplicateResponse {
5355
6257
  * project.
5356
6258
  */
5357
6259
  environment: HappyPath.Environment | null;
6260
+ /**
6261
+ * The personas this brief hands the phone to, in order of first mention. Empty
6262
+ * when the brief inherits the happy path's: read the happy path's list.
6263
+ */
6264
+ handoffPersonas: Array<HappyPath.HandoffPersona>;
5358
6265
  isGenerated: boolean;
5359
6266
  /**
5360
6267
  * The persona this runs as instead of the happy path's. Null means it inherits.
@@ -5369,7 +6276,9 @@ export declare namespace CustomerFlowDuplicateResponse {
5369
6276
  */
5370
6277
  updatedAt: string;
5371
6278
  /**
5372
- * The brief the simulated customer improvises from.
6279
+ * The brief the simulated customer improvises from. A `@{persona:<id>}` mention
6280
+ * hands the phone to that persona mid-call; the sentences around the mention say
6281
+ * when.
5373
6282
  */
5374
6283
  prompt?: string | null;
5375
6284
  systemKey?: string | null;
@@ -5405,6 +6314,126 @@ export declare namespace CustomerFlowDuplicateResponse {
5405
6314
  updatedAt: string;
5406
6315
  description?: string | null;
5407
6316
  }
6317
+ interface HandoffPersona {
6318
+ /**
6319
+ * Unique identifier of the persona
6320
+ */
6321
+ id: string;
6322
+ /**
6323
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
6324
+ * optional variants
6325
+ */
6326
+ accent: 'US' | 'US_X_SOUTH' | 'GB' | 'ES' | 'DE' | 'IN' | 'FR' | 'NL' | 'SA' | 'GR' | 'AU' | 'IT' | 'ID' | 'TH' | 'JP' | 'NZ' | 'PH' | 'SG' | 'MY' | 'HK' | 'TR' | 'PT' | 'IL';
6327
+ /**
6328
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
6329
+ * voice for are accepted; defaults to ADULT, which every accent supports.
6330
+ */
6331
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
6332
+ /**
6333
+ * Background noise setting
6334
+ */
6335
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'CONSTRUCTION' | 'CRYING_BABY' | 'DRIVING' | 'LIBRARY' | 'OFFICE' | 'THUNDERSTORM' | 'TRAIN';
6336
+ /**
6337
+ * Base emotional state of the persona
6338
+ */
6339
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
6340
+ /**
6341
+ * How the persona confirms information
6342
+ */
6343
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
6344
+ /**
6345
+ * Creation timestamp
6346
+ */
6347
+ createdAt: string;
6348
+ /**
6349
+ * Gender of the persona
6350
+ */
6351
+ gender: 'MALE' | 'FEMALE';
6352
+ /**
6353
+ * Whether the persona uses filler words like "um" and "uh"
6354
+ */
6355
+ hasDisfluencies: boolean;
6356
+ /**
6357
+ * Maximum number of idle messages the persona will send before giving up
6358
+ */
6359
+ idleMessageMaxSpokenCount: number;
6360
+ /**
6361
+ * Whether the idle message counter resets when the agent speaks
6362
+ */
6363
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
6364
+ /**
6365
+ * Messages the persona will say when the agent goes silent during a call. null =
6366
+ * "Automatic": language-appropriate defaults are used at call time.
6367
+ */
6368
+ idleMessages: Array<string> | null;
6369
+ /**
6370
+ * Seconds of silence before the persona sends an idle message
6371
+ */
6372
+ idleTimeoutSeconds: number;
6373
+ /**
6374
+ * How clearly the persona expresses their intentions
6375
+ */
6376
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
6377
+ /**
6378
+ * Primary language ISO 639-1 code for the persona
6379
+ */
6380
+ language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE';
6381
+ /**
6382
+ * How reliable the persona's memory is
6383
+ */
6384
+ memoryReliability: 'HIGH' | 'LOW';
6385
+ /**
6386
+ * The name the agent will identify as during conversations
6387
+ */
6388
+ name: string;
6389
+ /**
6390
+ * Additional custom properties about the persona
6391
+ */
6392
+ properties: {
6393
+ [key: string]: unknown;
6394
+ };
6395
+ /**
6396
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
6397
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
6398
+ * for several seconds.
6399
+ */
6400
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
6401
+ /**
6402
+ * Speech clarity of the persona
6403
+ */
6404
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
6405
+ /**
6406
+ * Speech pace of the persona
6407
+ */
6408
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
6409
+ /**
6410
+ * Languages the persona can understand. Multilingual combinations are limited by
6411
+ * multilingual speech recognition support.
6412
+ */
6413
+ understoodLanguages: Array<'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE'>;
6414
+ /**
6415
+ * Last update timestamp
6416
+ */
6417
+ updatedAt: string;
6418
+ /**
6419
+ * Background story and behavioral patterns for the persona
6420
+ */
6421
+ backstoryPrompt?: string | null;
6422
+ /**
6423
+ * Human-readable description of the persona
6424
+ */
6425
+ description?: string | null;
6426
+ /**
6427
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
6428
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
6429
+ * or set null to display the name itself.
6430
+ */
6431
+ displayName?: string | null;
6432
+ /**
6433
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
6434
+ */
6435
+ secondaryLanguage?: 'EN' | null;
6436
+ }
5408
6437
  /**
5409
6438
  * The persona this runs as instead of the happy path's. Null means it inherits.
5410
6439
  */
@@ -6589,6 +7618,11 @@ export declare namespace CustomerFlowGetByIDResponse {
6589
7618
  * project.
6590
7619
  */
6591
7620
  environment: EdgeCase.Environment | null;
7621
+ /**
7622
+ * The personas this brief hands the phone to, in order of first mention. Empty
7623
+ * when the brief inherits the happy path's: read the happy path's list.
7624
+ */
7625
+ handoffPersonas: Array<EdgeCase.HandoffPersona>;
6592
7626
  isGenerated: boolean;
6593
7627
  /**
6594
7628
  * The persona this runs as instead of the happy path's. Null means it inherits.
@@ -6603,7 +7637,9 @@ export declare namespace CustomerFlowGetByIDResponse {
6603
7637
  */
6604
7638
  updatedAt: string;
6605
7639
  /**
6606
- * The brief the simulated customer improvises from.
7640
+ * The brief the simulated customer improvises from. A `@{persona:<id>}` mention
7641
+ * hands the phone to that persona mid-call; the sentences around the mention say
7642
+ * when.
6607
7643
  */
6608
7644
  prompt?: string | null;
6609
7645
  systemKey?: string | null;
@@ -6639,6 +7675,126 @@ export declare namespace CustomerFlowGetByIDResponse {
6639
7675
  updatedAt: string;
6640
7676
  description?: string | null;
6641
7677
  }
7678
+ interface HandoffPersona {
7679
+ /**
7680
+ * Unique identifier of the persona
7681
+ */
7682
+ id: string;
7683
+ /**
7684
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
7685
+ * optional variants
7686
+ */
7687
+ accent: 'US' | 'US_X_SOUTH' | 'GB' | 'ES' | 'DE' | 'IN' | 'FR' | 'NL' | 'SA' | 'GR' | 'AU' | 'IT' | 'ID' | 'TH' | 'JP' | 'NZ' | 'PH' | 'SG' | 'MY' | 'HK' | 'TR' | 'PT' | 'IL';
7688
+ /**
7689
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
7690
+ * voice for are accepted; defaults to ADULT, which every accent supports.
7691
+ */
7692
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
7693
+ /**
7694
+ * Background noise setting
7695
+ */
7696
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'CONSTRUCTION' | 'CRYING_BABY' | 'DRIVING' | 'LIBRARY' | 'OFFICE' | 'THUNDERSTORM' | 'TRAIN';
7697
+ /**
7698
+ * Base emotional state of the persona
7699
+ */
7700
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
7701
+ /**
7702
+ * How the persona confirms information
7703
+ */
7704
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
7705
+ /**
7706
+ * Creation timestamp
7707
+ */
7708
+ createdAt: string;
7709
+ /**
7710
+ * Gender of the persona
7711
+ */
7712
+ gender: 'MALE' | 'FEMALE';
7713
+ /**
7714
+ * Whether the persona uses filler words like "um" and "uh"
7715
+ */
7716
+ hasDisfluencies: boolean;
7717
+ /**
7718
+ * Maximum number of idle messages the persona will send before giving up
7719
+ */
7720
+ idleMessageMaxSpokenCount: number;
7721
+ /**
7722
+ * Whether the idle message counter resets when the agent speaks
7723
+ */
7724
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
7725
+ /**
7726
+ * Messages the persona will say when the agent goes silent during a call. null =
7727
+ * "Automatic": language-appropriate defaults are used at call time.
7728
+ */
7729
+ idleMessages: Array<string> | null;
7730
+ /**
7731
+ * Seconds of silence before the persona sends an idle message
7732
+ */
7733
+ idleTimeoutSeconds: number;
7734
+ /**
7735
+ * How clearly the persona expresses their intentions
7736
+ */
7737
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
7738
+ /**
7739
+ * Primary language ISO 639-1 code for the persona
7740
+ */
7741
+ language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE';
7742
+ /**
7743
+ * How reliable the persona's memory is
7744
+ */
7745
+ memoryReliability: 'HIGH' | 'LOW';
7746
+ /**
7747
+ * The name the agent will identify as during conversations
7748
+ */
7749
+ name: string;
7750
+ /**
7751
+ * Additional custom properties about the persona
7752
+ */
7753
+ properties: {
7754
+ [key: string]: unknown;
7755
+ };
7756
+ /**
7757
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
7758
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
7759
+ * for several seconds.
7760
+ */
7761
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
7762
+ /**
7763
+ * Speech clarity of the persona
7764
+ */
7765
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
7766
+ /**
7767
+ * Speech pace of the persona
7768
+ */
7769
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
7770
+ /**
7771
+ * Languages the persona can understand. Multilingual combinations are limited by
7772
+ * multilingual speech recognition support.
7773
+ */
7774
+ understoodLanguages: Array<'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE'>;
7775
+ /**
7776
+ * Last update timestamp
7777
+ */
7778
+ updatedAt: string;
7779
+ /**
7780
+ * Background story and behavioral patterns for the persona
7781
+ */
7782
+ backstoryPrompt?: string | null;
7783
+ /**
7784
+ * Human-readable description of the persona
7785
+ */
7786
+ description?: string | null;
7787
+ /**
7788
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
7789
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
7790
+ * or set null to display the name itself.
7791
+ */
7792
+ displayName?: string | null;
7793
+ /**
7794
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
7795
+ */
7796
+ secondaryLanguage?: 'EN' | null;
7797
+ }
6642
7798
  /**
6643
7799
  * The persona this runs as instead of the happy path's. Null means it inherits.
6644
7800
  */
@@ -6782,6 +7938,11 @@ export declare namespace CustomerFlowGetByIDResponse {
6782
7938
  * project.
6783
7939
  */
6784
7940
  environment: HappyPath.Environment | null;
7941
+ /**
7942
+ * The personas this brief hands the phone to, in order of first mention. Empty
7943
+ * when the brief inherits the happy path's: read the happy path's list.
7944
+ */
7945
+ handoffPersonas: Array<HappyPath.HandoffPersona>;
6785
7946
  isGenerated: boolean;
6786
7947
  /**
6787
7948
  * The persona this runs as instead of the happy path's. Null means it inherits.
@@ -6796,7 +7957,9 @@ export declare namespace CustomerFlowGetByIDResponse {
6796
7957
  */
6797
7958
  updatedAt: string;
6798
7959
  /**
6799
- * The brief the simulated customer improvises from.
7960
+ * The brief the simulated customer improvises from. A `@{persona:<id>}` mention
7961
+ * hands the phone to that persona mid-call; the sentences around the mention say
7962
+ * when.
6800
7963
  */
6801
7964
  prompt?: string | null;
6802
7965
  systemKey?: string | null;
@@ -6822,15 +7985,135 @@ export declare namespace CustomerFlowGetByIDResponse {
6822
7985
  backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'CONSTRUCTION' | 'CRYING_BABY' | 'DRIVING' | 'LIBRARY' | 'OFFICE' | 'THUNDERSTORM' | 'TRAIN';
6823
7986
  backgroundNoiseVolume: number;
6824
7987
  /**
6825
- * Creation timestamp in ISO 8601 format
7988
+ * Creation timestamp in ISO 8601 format
7989
+ */
7990
+ createdAt: string;
7991
+ name: string;
7992
+ /**
7993
+ * Last update timestamp in ISO 8601 format
7994
+ */
7995
+ updatedAt: string;
7996
+ description?: string | null;
7997
+ }
7998
+ interface HandoffPersona {
7999
+ /**
8000
+ * Unique identifier of the persona
8001
+ */
8002
+ id: string;
8003
+ /**
8004
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
8005
+ * optional variants
8006
+ */
8007
+ accent: 'US' | 'US_X_SOUTH' | 'GB' | 'ES' | 'DE' | 'IN' | 'FR' | 'NL' | 'SA' | 'GR' | 'AU' | 'IT' | 'ID' | 'TH' | 'JP' | 'NZ' | 'PH' | 'SG' | 'MY' | 'HK' | 'TR' | 'PT' | 'IL';
8008
+ /**
8009
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
8010
+ * voice for are accepted; defaults to ADULT, which every accent supports.
8011
+ */
8012
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
8013
+ /**
8014
+ * Background noise setting
8015
+ */
8016
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'CONSTRUCTION' | 'CRYING_BABY' | 'DRIVING' | 'LIBRARY' | 'OFFICE' | 'THUNDERSTORM' | 'TRAIN';
8017
+ /**
8018
+ * Base emotional state of the persona
8019
+ */
8020
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
8021
+ /**
8022
+ * How the persona confirms information
8023
+ */
8024
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
8025
+ /**
8026
+ * Creation timestamp
8027
+ */
8028
+ createdAt: string;
8029
+ /**
8030
+ * Gender of the persona
8031
+ */
8032
+ gender: 'MALE' | 'FEMALE';
8033
+ /**
8034
+ * Whether the persona uses filler words like "um" and "uh"
8035
+ */
8036
+ hasDisfluencies: boolean;
8037
+ /**
8038
+ * Maximum number of idle messages the persona will send before giving up
8039
+ */
8040
+ idleMessageMaxSpokenCount: number;
8041
+ /**
8042
+ * Whether the idle message counter resets when the agent speaks
8043
+ */
8044
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
8045
+ /**
8046
+ * Messages the persona will say when the agent goes silent during a call. null =
8047
+ * "Automatic": language-appropriate defaults are used at call time.
8048
+ */
8049
+ idleMessages: Array<string> | null;
8050
+ /**
8051
+ * Seconds of silence before the persona sends an idle message
8052
+ */
8053
+ idleTimeoutSeconds: number;
8054
+ /**
8055
+ * How clearly the persona expresses their intentions
8056
+ */
8057
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
8058
+ /**
8059
+ * Primary language ISO 639-1 code for the persona
8060
+ */
8061
+ language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE';
8062
+ /**
8063
+ * How reliable the persona's memory is
8064
+ */
8065
+ memoryReliability: 'HIGH' | 'LOW';
8066
+ /**
8067
+ * The name the agent will identify as during conversations
8068
+ */
8069
+ name: string;
8070
+ /**
8071
+ * Additional custom properties about the persona
8072
+ */
8073
+ properties: {
8074
+ [key: string]: unknown;
8075
+ };
8076
+ /**
8077
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
8078
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
8079
+ * for several seconds.
8080
+ */
8081
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
8082
+ /**
8083
+ * Speech clarity of the persona
8084
+ */
8085
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
8086
+ /**
8087
+ * Speech pace of the persona
8088
+ */
8089
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
8090
+ /**
8091
+ * Languages the persona can understand. Multilingual combinations are limited by
8092
+ * multilingual speech recognition support.
8093
+ */
8094
+ understoodLanguages: Array<'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE'>;
8095
+ /**
8096
+ * Last update timestamp
8097
+ */
8098
+ updatedAt: string;
8099
+ /**
8100
+ * Background story and behavioral patterns for the persona
8101
+ */
8102
+ backstoryPrompt?: string | null;
8103
+ /**
8104
+ * Human-readable description of the persona
8105
+ */
8106
+ description?: string | null;
8107
+ /**
8108
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
8109
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
8110
+ * or set null to display the name itself.
6826
8111
  */
6827
- createdAt: string;
6828
- name: string;
8112
+ displayName?: string | null;
6829
8113
  /**
6830
- * Last update timestamp in ISO 8601 format
8114
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
6831
8115
  */
6832
- updatedAt: string;
6833
- description?: string | null;
8116
+ secondaryLanguage?: 'EN' | null;
6834
8117
  }
6835
8118
  /**
6836
8119
  * The persona this runs as instead of the happy path's. Null means it inherits.
@@ -7641,6 +8924,11 @@ export declare namespace CustomerFlowReplaceGraphResponse {
7641
8924
  * project.
7642
8925
  */
7643
8926
  environment: ImprovFlowVariant.Environment | null;
8927
+ /**
8928
+ * The personas this brief hands the phone to, in order of first mention. Empty
8929
+ * when the brief inherits the happy path's: read the happy path's list.
8930
+ */
8931
+ handoffPersonas: Array<ImprovFlowVariant.HandoffPersona>;
7644
8932
  isGenerated: boolean;
7645
8933
  /**
7646
8934
  * The persona this runs as instead of the happy path's. Null means it inherits.
@@ -7655,7 +8943,9 @@ export declare namespace CustomerFlowReplaceGraphResponse {
7655
8943
  */
7656
8944
  updatedAt: string;
7657
8945
  /**
7658
- * The brief the simulated customer improvises from.
8946
+ * The brief the simulated customer improvises from. A `@{persona:<id>}` mention
8947
+ * hands the phone to that persona mid-call; the sentences around the mention say
8948
+ * when.
7659
8949
  */
7660
8950
  prompt?: string | null;
7661
8951
  systemKey?: string | null;
@@ -7691,6 +8981,126 @@ export declare namespace CustomerFlowReplaceGraphResponse {
7691
8981
  updatedAt: string;
7692
8982
  description?: string | null;
7693
8983
  }
8984
+ interface HandoffPersona {
8985
+ /**
8986
+ * Unique identifier of the persona
8987
+ */
8988
+ id: string;
8989
+ /**
8990
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
8991
+ * optional variants
8992
+ */
8993
+ accent: 'US' | 'US_X_SOUTH' | 'GB' | 'ES' | 'DE' | 'IN' | 'FR' | 'NL' | 'SA' | 'GR' | 'AU' | 'IT' | 'ID' | 'TH' | 'JP' | 'NZ' | 'PH' | 'SG' | 'MY' | 'HK' | 'TR' | 'PT' | 'IL';
8994
+ /**
8995
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
8996
+ * voice for are accepted; defaults to ADULT, which every accent supports.
8997
+ */
8998
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
8999
+ /**
9000
+ * Background noise setting
9001
+ */
9002
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'CONSTRUCTION' | 'CRYING_BABY' | 'DRIVING' | 'LIBRARY' | 'OFFICE' | 'THUNDERSTORM' | 'TRAIN';
9003
+ /**
9004
+ * Base emotional state of the persona
9005
+ */
9006
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
9007
+ /**
9008
+ * How the persona confirms information
9009
+ */
9010
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
9011
+ /**
9012
+ * Creation timestamp
9013
+ */
9014
+ createdAt: string;
9015
+ /**
9016
+ * Gender of the persona
9017
+ */
9018
+ gender: 'MALE' | 'FEMALE';
9019
+ /**
9020
+ * Whether the persona uses filler words like "um" and "uh"
9021
+ */
9022
+ hasDisfluencies: boolean;
9023
+ /**
9024
+ * Maximum number of idle messages the persona will send before giving up
9025
+ */
9026
+ idleMessageMaxSpokenCount: number;
9027
+ /**
9028
+ * Whether the idle message counter resets when the agent speaks
9029
+ */
9030
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
9031
+ /**
9032
+ * Messages the persona will say when the agent goes silent during a call. null =
9033
+ * "Automatic": language-appropriate defaults are used at call time.
9034
+ */
9035
+ idleMessages: Array<string> | null;
9036
+ /**
9037
+ * Seconds of silence before the persona sends an idle message
9038
+ */
9039
+ idleTimeoutSeconds: number;
9040
+ /**
9041
+ * How clearly the persona expresses their intentions
9042
+ */
9043
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
9044
+ /**
9045
+ * Primary language ISO 639-1 code for the persona
9046
+ */
9047
+ language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE';
9048
+ /**
9049
+ * How reliable the persona's memory is
9050
+ */
9051
+ memoryReliability: 'HIGH' | 'LOW';
9052
+ /**
9053
+ * The name the agent will identify as during conversations
9054
+ */
9055
+ name: string;
9056
+ /**
9057
+ * Additional custom properties about the persona
9058
+ */
9059
+ properties: {
9060
+ [key: string]: unknown;
9061
+ };
9062
+ /**
9063
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
9064
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
9065
+ * for several seconds.
9066
+ */
9067
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
9068
+ /**
9069
+ * Speech clarity of the persona
9070
+ */
9071
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
9072
+ /**
9073
+ * Speech pace of the persona
9074
+ */
9075
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
9076
+ /**
9077
+ * Languages the persona can understand. Multilingual combinations are limited by
9078
+ * multilingual speech recognition support.
9079
+ */
9080
+ understoodLanguages: Array<'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE'>;
9081
+ /**
9082
+ * Last update timestamp
9083
+ */
9084
+ updatedAt: string;
9085
+ /**
9086
+ * Background story and behavioral patterns for the persona
9087
+ */
9088
+ backstoryPrompt?: string | null;
9089
+ /**
9090
+ * Human-readable description of the persona
9091
+ */
9092
+ description?: string | null;
9093
+ /**
9094
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
9095
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
9096
+ * or set null to display the name itself.
9097
+ */
9098
+ displayName?: string | null;
9099
+ /**
9100
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
9101
+ */
9102
+ secondaryLanguage?: 'EN' | null;
9103
+ }
7694
9104
  /**
7695
9105
  * The persona this runs as instead of the happy path's. Null means it inherits.
7696
9106
  */
@@ -8227,6 +9637,11 @@ export declare namespace CustomerFlowUpdateHappyPathResponse {
8227
9637
  * project.
8228
9638
  */
8229
9639
  environment: ImprovFlowVariant.Environment | null;
9640
+ /**
9641
+ * The personas this brief hands the phone to, in order of first mention. Empty
9642
+ * when the brief inherits the happy path's: read the happy path's list.
9643
+ */
9644
+ handoffPersonas: Array<ImprovFlowVariant.HandoffPersona>;
8230
9645
  isGenerated: boolean;
8231
9646
  /**
8232
9647
  * The persona this runs as instead of the happy path's. Null means it inherits.
@@ -8241,7 +9656,9 @@ export declare namespace CustomerFlowUpdateHappyPathResponse {
8241
9656
  */
8242
9657
  updatedAt: string;
8243
9658
  /**
8244
- * The brief the simulated customer improvises from.
9659
+ * The brief the simulated customer improvises from. A `@{persona:<id>}` mention
9660
+ * hands the phone to that persona mid-call; the sentences around the mention say
9661
+ * when.
8245
9662
  */
8246
9663
  prompt?: string | null;
8247
9664
  systemKey?: string | null;
@@ -8277,6 +9694,126 @@ export declare namespace CustomerFlowUpdateHappyPathResponse {
8277
9694
  updatedAt: string;
8278
9695
  description?: string | null;
8279
9696
  }
9697
+ interface HandoffPersona {
9698
+ /**
9699
+ * Unique identifier of the persona
9700
+ */
9701
+ id: string;
9702
+ /**
9703
+ * Accent of the persona, defined using ISO 3166-1 alpha-2 country codes with
9704
+ * optional variants
9705
+ */
9706
+ accent: 'US' | 'US_X_SOUTH' | 'GB' | 'ES' | 'DE' | 'IN' | 'FR' | 'NL' | 'SA' | 'GR' | 'AU' | 'IT' | 'ID' | 'TH' | 'JP' | 'NZ' | 'PH' | 'SG' | 'MY' | 'HK' | 'TR' | 'PT' | 'IL';
9707
+ /**
9708
+ * How old the caller sounds and behaves. Only ages the persona's accent has a
9709
+ * voice for are accepted; defaults to ADULT, which every accent supports.
9710
+ */
9711
+ age: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
9712
+ /**
9713
+ * Background noise setting
9714
+ */
9715
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'CONSTRUCTION' | 'CRYING_BABY' | 'DRIVING' | 'LIBRARY' | 'OFFICE' | 'THUNDERSTORM' | 'TRAIN';
9716
+ /**
9717
+ * Base emotional state of the persona
9718
+ */
9719
+ baseEmotion: 'NEUTRAL' | 'CHEERFUL' | 'CONFUSED' | 'FRUSTRATED' | 'SKEPTICAL' | 'RUSHED' | 'DISTRACTED' | 'ANGRY' | 'ANXIOUS' | 'SAD';
9720
+ /**
9721
+ * How the persona confirms information
9722
+ */
9723
+ confirmationStyle: 'EXPLICIT' | 'VAGUE';
9724
+ /**
9725
+ * Creation timestamp
9726
+ */
9727
+ createdAt: string;
9728
+ /**
9729
+ * Gender of the persona
9730
+ */
9731
+ gender: 'MALE' | 'FEMALE';
9732
+ /**
9733
+ * Whether the persona uses filler words like "um" and "uh"
9734
+ */
9735
+ hasDisfluencies: boolean;
9736
+ /**
9737
+ * Maximum number of idle messages the persona will send before giving up
9738
+ */
9739
+ idleMessageMaxSpokenCount: number;
9740
+ /**
9741
+ * Whether the idle message counter resets when the agent speaks
9742
+ */
9743
+ idleMessageResetCountOnUserSpeechEnabled: boolean;
9744
+ /**
9745
+ * Messages the persona will say when the agent goes silent during a call. null =
9746
+ * "Automatic": language-appropriate defaults are used at call time.
9747
+ */
9748
+ idleMessages: Array<string> | null;
9749
+ /**
9750
+ * Seconds of silence before the persona sends an idle message
9751
+ */
9752
+ idleTimeoutSeconds: number;
9753
+ /**
9754
+ * How clearly the persona expresses their intentions
9755
+ */
9756
+ intentClarity: 'CLEAR' | 'INDIRECT' | 'VAGUE';
9757
+ /**
9758
+ * Primary language ISO 639-1 code for the persona
9759
+ */
9760
+ language: 'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE';
9761
+ /**
9762
+ * How reliable the persona's memory is
9763
+ */
9764
+ memoryReliability: 'HIGH' | 'LOW';
9765
+ /**
9766
+ * The name the agent will identify as during conversations
9767
+ */
9768
+ name: string;
9769
+ /**
9770
+ * Additional custom properties about the persona
9771
+ */
9772
+ properties: {
9773
+ [key: string]: unknown;
9774
+ };
9775
+ /**
9776
+ * Controls how quickly the persona responds to pauses in conversation (QUICK,
9777
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
9778
+ * for several seconds.
9779
+ */
9780
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
9781
+ /**
9782
+ * Speech clarity of the persona
9783
+ */
9784
+ speechClarity: 'CLEAR' | 'VAGUE' | 'RAMBLING';
9785
+ /**
9786
+ * Speech pace of the persona
9787
+ */
9788
+ speechPace: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
9789
+ /**
9790
+ * Languages the persona can understand. Multilingual combinations are limited by
9791
+ * multilingual speech recognition support.
9792
+ */
9793
+ understoodLanguages: Array<'EN' | 'ES' | 'DE' | 'HI' | 'FR' | 'NL' | 'AR' | 'EL' | 'IT' | 'ID' | 'TH' | 'JA' | 'TL' | 'MS' | 'ZH' | 'TR' | 'PT' | 'HE'>;
9794
+ /**
9795
+ * Last update timestamp
9796
+ */
9797
+ updatedAt: string;
9798
+ /**
9799
+ * Background story and behavioral patterns for the persona
9800
+ */
9801
+ backstoryPrompt?: string | null;
9802
+ /**
9803
+ * Human-readable description of the persona
9804
+ */
9805
+ description?: string | null;
9806
+ /**
9807
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
9808
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
9809
+ * or set null to display the name itself.
9810
+ */
9811
+ displayName?: string | null;
9812
+ /**
9813
+ * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
9814
+ */
9815
+ secondaryLanguage?: 'EN' | null;
9816
+ }
8280
9817
  /**
8281
9818
  * The persona this runs as instead of the happy path's. Null means it inherits.
8282
9819
  */