@roarkanalytics/sdk 4.14.0 → 4.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.
@@ -7,10 +7,12 @@ import { RequestOptions } from '../internal/request-options';
7
7
 
8
8
  export class Config extends APIResource {
9
9
  /**
10
- * Reconcile a config-as-code bundle into the project. Submit the full desired set
11
- * of resources; resources already managed by config are updated, new ones created,
12
- * and (unless prune is false) config-managed resources absent from the bundle are
13
- * deleted. Identity is by name — no ids in the bundle.
10
+ * Reconcile a config-as-code bundle. With a PROJECT API key, submit project-scoped
11
+ * resources (agents, personas, flows, collectors, metrics, ...). With an
12
+ * ORGANIZATION API key, submit `kind: project` resources, each optionally carrying
13
+ * its members and its own nested `resources`. Submit the full desired set; managed
14
+ * resources are updated, new ones created, and (unless prune is false) managed
15
+ * resources absent from the bundle are deleted. Identity is by name.
14
16
  *
15
17
  * @example
16
18
  * ```ts
@@ -24,10 +26,9 @@ export class Config extends APIResource {
24
26
  }
25
27
 
26
28
  /**
27
- * Dry run for a config-as-code apply: returns the projected changes (create /
28
- * update / delete) for the submitted bundle without writing anything. Submit the
29
- * full desired set of resources; identity is by name — no ids in the bundle. Run
30
- * this before apply to preview what would change.
29
+ * Dry run for an apply: returns the projected changes (create / update / delete)
30
+ * for the submitted bundle without writing anything. Works for both project and
31
+ * organization keys.
31
32
  *
32
33
  * @example
33
34
  * ```ts
@@ -54,6 +55,7 @@ export interface Bundle {
54
55
  | Bundle.QaSimulationPlanConfig
55
56
  | Bundle.AlertConfig
56
57
  | Bundle.ToolConfig
58
+ | Bundle.ProjectConfig
57
59
  >;
58
60
 
59
61
  prune?: boolean;
@@ -656,188 +658,2103 @@ export namespace Bundle {
656
658
 
657
659
  parameters?: { [key: string]: 'string' | 'number' | 'boolean' };
658
660
  }
661
+
662
+ export interface ProjectConfig {
663
+ kind: 'project';
664
+
665
+ name: string;
666
+
667
+ category?:
668
+ | 'HEALTHCARE'
669
+ | 'FINANCIAL'
670
+ | 'RETAIL'
671
+ | 'HOSPITALITY'
672
+ | 'AUTOMOTIVE'
673
+ | 'GOVERNMENT'
674
+ | 'EDUCATION'
675
+ | 'REAL_ESTATE'
676
+ | 'OTHER';
677
+
678
+ dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1';
679
+
680
+ description?: string;
681
+
682
+ displayName?: string;
683
+
684
+ members?: Array<ProjectConfig.Member>;
685
+
686
+ resources?: Array<
687
+ | ProjectConfig.AgentConfig
688
+ | ProjectConfig.HTTPRequestDefinitionConfig
689
+ | ProjectConfig.PersonaConfig
690
+ | ProjectConfig.ImprovFlowConfig
691
+ | ProjectConfig.ScriptedFlowConfig
692
+ | ProjectConfig.CollectorConfig
693
+ | ProjectConfig.MetricConfig
694
+ | ProjectConfig.SimulationPlanConfig
695
+ | ProjectConfig.QaSimulationPlanConfig
696
+ | ProjectConfig.AlertConfig
697
+ | ProjectConfig.ToolConfig
698
+ >;
699
+ }
700
+
701
+ export namespace ProjectConfig {
702
+ export interface Member {
703
+ email: string;
704
+
705
+ role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER';
706
+ }
707
+
708
+ export interface AgentConfig {
709
+ kind: 'agent';
710
+
711
+ name: string;
712
+
713
+ customId?: string | null;
714
+
715
+ description?: string | null;
716
+
717
+ displayName?: string;
718
+
719
+ endpoints?: Array<AgentConfig.Endpoint>;
720
+
721
+ prompt?: string | null;
722
+ }
723
+
724
+ export namespace AgentConfig {
725
+ export interface Endpoint {
726
+ value: string;
727
+
728
+ direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING';
729
+
730
+ environment?: string;
731
+
732
+ outboundDialHttpRequestDefinition?: string;
733
+
734
+ outboundDialType?: 'NONE' | 'HTTP_REQUEST';
735
+
736
+ type?: 'PHONE' | 'WEBSOCKET';
737
+ }
738
+ }
739
+
740
+ export interface HTTPRequestDefinitionConfig {
741
+ kind: 'httpRequestDefinition';
742
+
743
+ name: string;
744
+
745
+ url: string;
746
+
747
+ body?: string;
748
+
749
+ description?: string | null;
750
+
751
+ headers?: { [key: string]: string };
752
+
753
+ method?: 'POST' | 'PUT' | 'PATCH' | 'GET';
754
+ }
755
+
756
+ export interface PersonaConfig {
757
+ accent:
758
+ | 'US'
759
+ | 'US_X_SOUTH'
760
+ | 'GB'
761
+ | 'ES'
762
+ | 'DE'
763
+ | 'IN'
764
+ | 'FR'
765
+ | 'NL'
766
+ | 'SA'
767
+ | 'GR'
768
+ | 'AU'
769
+ | 'IT'
770
+ | 'ID'
771
+ | 'TH'
772
+ | 'JP'
773
+ | 'NZ'
774
+ | 'PH'
775
+ | 'SG'
776
+ | 'MY'
777
+ | 'HK'
778
+ | 'TR'
779
+ | 'PT'
780
+ | 'IL';
781
+
782
+ gender: 'MALE' | 'FEMALE';
783
+
784
+ kind: 'persona';
785
+
786
+ language:
787
+ | 'EN'
788
+ | 'ES'
789
+ | 'DE'
790
+ | 'HI'
791
+ | 'FR'
792
+ | 'NL'
793
+ | 'AR'
794
+ | 'EL'
795
+ | 'IT'
796
+ | 'ID'
797
+ | 'TH'
798
+ | 'JA'
799
+ | 'TL'
800
+ | 'MS'
801
+ | 'ZH'
802
+ | 'TR'
803
+ | 'PT'
804
+ | 'HE';
805
+
806
+ name: string;
807
+
808
+ age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
809
+
810
+ backgroundNoise?:
811
+ | 'NONE'
812
+ | 'AIRPORT'
813
+ | 'CHILDREN_PLAYING'
814
+ | 'CITY'
815
+ | 'COFFEE_SHOP'
816
+ | 'CONSTRUCTION'
817
+ | 'CRYING_BABY'
818
+ | 'DRIVING'
819
+ | 'LIBRARY'
820
+ | 'OFFICE'
821
+ | 'THUNDERSTORM'
822
+ | 'TRAIN';
823
+
824
+ backstoryPrompt?: string | null;
825
+
826
+ baseEmotion?:
827
+ | 'NEUTRAL'
828
+ | 'CHEERFUL'
829
+ | 'CONFUSED'
830
+ | 'FRUSTRATED'
831
+ | 'SKEPTICAL'
832
+ | 'RUSHED'
833
+ | 'DISTRACTED'
834
+ | 'ANGRY'
835
+ | 'ANXIOUS'
836
+ | 'SAD';
837
+
838
+ confirmationStyle?: 'EXPLICIT' | 'VAGUE';
839
+
840
+ description?: string | null;
841
+
842
+ displayName?: string;
843
+
844
+ hasDisfluencies?: boolean;
845
+
846
+ idleMessageMaxSpokenCount?: number;
847
+
848
+ idleMessageResetCountOnUserSpeechEnabled?: boolean;
849
+
850
+ idleMessages?: Array<string> | null;
851
+
852
+ idleTimeoutSeconds?: number;
853
+
854
+ intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE';
855
+
856
+ interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY';
857
+
858
+ memoryReliability?: 'HIGH' | 'LOW';
859
+
860
+ properties?: { [key: string]: unknown };
861
+
862
+ responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
863
+
864
+ secondaryLanguage?: 'EN';
865
+
866
+ speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING';
867
+
868
+ speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
869
+
870
+ understoodLanguages?: Array<
871
+ | 'EN'
872
+ | 'ES'
873
+ | 'DE'
874
+ | 'HI'
875
+ | 'FR'
876
+ | 'NL'
877
+ | 'AR'
878
+ | 'EL'
879
+ | 'IT'
880
+ | 'ID'
881
+ | 'TH'
882
+ | 'JA'
883
+ | 'TL'
884
+ | 'MS'
885
+ | 'ZH'
886
+ | 'TR'
887
+ | 'PT'
888
+ | 'HE'
889
+ >;
890
+ }
891
+
892
+ export interface ImprovFlowConfig {
893
+ agents: Array<string>;
894
+
895
+ happyPath: ImprovFlowConfig.HappyPath;
896
+
897
+ kind: 'flow';
898
+
899
+ name: string;
900
+
901
+ type: 'improv';
902
+
903
+ description?: string | null;
904
+
905
+ edgeCases?: Array<ImprovFlowConfig.EdgeCase>;
906
+
907
+ expectations?: Array<string>;
908
+
909
+ title?: string;
910
+ }
911
+
912
+ export namespace ImprovFlowConfig {
913
+ export interface HappyPath {
914
+ environment: string;
915
+
916
+ persona: string;
917
+
918
+ expectations?: Array<string>;
919
+
920
+ prompt?: string;
921
+
922
+ title?: string;
923
+ }
924
+
925
+ export interface EdgeCase {
926
+ name: string;
927
+
928
+ environment?: string;
929
+
930
+ expectations?: Array<string>;
931
+
932
+ persona?: string;
933
+
934
+ prompt?: string;
935
+
936
+ title?: string;
937
+ }
938
+ }
939
+
940
+ export interface ScriptedFlowConfig {
941
+ graph: Array<ConfigAPI.ConfigFlowStep>;
942
+
943
+ kind: 'flow';
944
+
945
+ name: string;
946
+
947
+ type: 'scripted';
948
+
949
+ adherence?: 'LOOSE' | 'STRICT';
950
+
951
+ agents?: Array<string>;
952
+
953
+ branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE';
954
+
955
+ description?: string | null;
956
+
957
+ expectations?: Array<string>;
958
+
959
+ offScript?: ScriptedFlowConfig.OffScript;
960
+
961
+ title?: string;
962
+ }
963
+
964
+ export namespace ScriptedFlowConfig {
965
+ export interface OffScript {
966
+ maxAttempts?: number;
967
+
968
+ reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY';
969
+
970
+ sayLine?: string;
971
+
972
+ then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE';
973
+
974
+ waitSeconds?: number;
975
+ }
976
+ }
977
+
978
+ export interface CollectorConfig {
979
+ kind: 'collector';
980
+
981
+ metrics: Array<string>;
982
+
983
+ modality: 'call' | 'chat';
984
+
985
+ name: string;
986
+
987
+ displayName?: string;
988
+
989
+ filters?: Array<CollectorConfig.Filter>;
990
+
991
+ status?: 'ACTIVE' | 'INACTIVE';
992
+ }
993
+
994
+ export namespace CollectorConfig {
995
+ export interface Filter {
996
+ conditions: Array<Filter.Condition>;
997
+ }
998
+
999
+ export namespace Filter {
1000
+ export interface Condition {
1001
+ key: string;
1002
+
1003
+ type: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION';
1004
+
1005
+ operator?:
1006
+ | 'EQUALS'
1007
+ | 'NOT_EQUALS'
1008
+ | 'CONTAINS'
1009
+ | 'STARTS_WITH'
1010
+ | 'GREATER_THAN'
1011
+ | 'LESS_THAN'
1012
+ | 'GREATER_THAN_OR_EQUALS'
1013
+ | 'LESS_THAN_OR_EQUALS';
1014
+
1015
+ value?: string;
1016
+ }
1017
+ }
1018
+ }
1019
+
1020
+ export interface MetricConfig {
1021
+ kind: 'metric';
1022
+
1023
+ name: string;
1024
+
1025
+ prompt: string;
1026
+
1027
+ type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION';
1028
+
1029
+ contexts?: Array<'CALL' | 'SEGMENT' | 'TURN'>;
1030
+
1031
+ displayName?: string;
1032
+
1033
+ falseLabel?: string;
1034
+
1035
+ maxSelections?: number;
1036
+
1037
+ options?: Array<MetricConfig.Option>;
1038
+
1039
+ participantRole?: 'AGENT' | 'CUSTOMER';
1040
+
1041
+ scaleLabels?: Array<MetricConfig.ScaleLabel>;
1042
+
1043
+ scaleMax?: number;
1044
+
1045
+ scaleMin?: number;
1046
+
1047
+ scope?: 'GLOBAL' | 'PER_PARTICIPANT';
1048
+
1049
+ trueLabel?: string;
1050
+ }
1051
+
1052
+ export namespace MetricConfig {
1053
+ export interface Option {
1054
+ displayOrder: number;
1055
+
1056
+ label: string;
1057
+
1058
+ description?: string;
1059
+ }
1060
+
1061
+ export interface ScaleLabel {
1062
+ displayOrder: number;
1063
+
1064
+ label: string;
1065
+
1066
+ rangeMax: number;
1067
+
1068
+ rangeMin: number;
1069
+
1070
+ colorHex?: string;
1071
+
1072
+ description?: string;
1073
+ }
1074
+ }
1075
+
1076
+ export interface SimulationPlanConfig {
1077
+ agentEndpoints: Array<SimulationPlanConfig.AgentEndpoint>;
1078
+
1079
+ direction: 'INBOUND' | 'OUTBOUND';
1080
+
1081
+ flows: Array<SimulationPlanConfig.Flow>;
1082
+
1083
+ kind: 'simulationPlan';
1084
+
1085
+ maxDurationSeconds: number;
1086
+
1087
+ metrics: Array<string>;
1088
+
1089
+ name: string;
1090
+
1091
+ description?: string | null;
1092
+
1093
+ endCallPhrases?: Array<string>;
1094
+
1095
+ endCallReasons?: Array<string>;
1096
+
1097
+ enrichWithLiveConversation?: boolean;
1098
+
1099
+ executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT';
1100
+
1101
+ includeAutomaticMetrics?: boolean;
1102
+
1103
+ includeFlowMetrics?: boolean;
1104
+
1105
+ iterations?: number;
1106
+
1107
+ maxConcurrentJobs?: number;
1108
+
1109
+ silenceTimeoutSeconds?: number;
1110
+
1111
+ template?: 'manual';
1112
+ }
1113
+
1114
+ export namespace SimulationPlanConfig {
1115
+ export interface AgentEndpoint {
1116
+ agent: string;
1117
+
1118
+ direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING';
1119
+
1120
+ value?: string;
1121
+ }
1122
+
1123
+ export interface Flow {
1124
+ edgeCases?: Array<string>;
1125
+
1126
+ flow?: string;
1127
+
1128
+ happyPath?: boolean;
1129
+
1130
+ personaOverride?: string;
1131
+
1132
+ system?: string;
1133
+ }
1134
+ }
1135
+
1136
+ export interface QaSimulationPlanConfig {
1137
+ agentEndpoints: Array<QaSimulationPlanConfig.AgentEndpoint>;
1138
+
1139
+ direction: 'INBOUND' | 'OUTBOUND';
1140
+
1141
+ environment: string;
1142
+
1143
+ kind: 'simulationPlan';
1144
+
1145
+ maxDurationSeconds: number;
1146
+
1147
+ name: string;
1148
+
1149
+ persona: string;
1150
+
1151
+ questions: Array<QaSimulationPlanConfig.Question>;
1152
+
1153
+ template: 'question-answer-check';
1154
+
1155
+ description?: string | null;
1156
+
1157
+ endCallPhrases?: Array<string>;
1158
+
1159
+ endCallReasons?: Array<string>;
1160
+
1161
+ enrichWithLiveConversation?: boolean;
1162
+
1163
+ executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT';
1164
+
1165
+ gradeWithKnowledgeBase?: boolean;
1166
+
1167
+ includeAutomaticMetrics?: boolean;
1168
+
1169
+ includeFlowMetrics?: boolean;
1170
+
1171
+ iterations?: number;
1172
+
1173
+ maxConcurrentJobs?: number;
1174
+
1175
+ metrics?: Array<string>;
1176
+
1177
+ silenceTimeoutSeconds?: number;
1178
+ }
1179
+
1180
+ export namespace QaSimulationPlanConfig {
1181
+ export interface AgentEndpoint {
1182
+ agent: string;
1183
+
1184
+ direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING';
1185
+
1186
+ value?: string;
1187
+ }
1188
+
1189
+ export interface Question {
1190
+ ask: string;
1191
+
1192
+ expect?: string;
1193
+
1194
+ name?: string;
1195
+ }
1196
+ }
1197
+
1198
+ export interface AlertConfig {
1199
+ kind: 'alert';
1200
+
1201
+ name: string;
1202
+
1203
+ trigger:
1204
+ | AlertConfig.AlertThresholdTrigger
1205
+ | AlertConfig.AlertEventTrigger
1206
+ | AlertConfig.AlertSimulationTrigger;
1207
+
1208
+ actions?: AlertConfig.Actions;
1209
+
1210
+ displayName?: string;
1211
+
1212
+ enabled?: boolean;
1213
+ }
1214
+
1215
+ export namespace AlertConfig {
1216
+ export interface AlertThresholdTrigger {
1217
+ aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN';
1218
+
1219
+ metric: string;
1220
+
1221
+ operator: 'GT' | 'GTE' | 'LT' | 'LTE';
1222
+
1223
+ thresholdValue: number;
1224
+
1225
+ type: 'threshold';
1226
+
1227
+ windowMinutes: number;
1228
+
1229
+ consecutiveOpen?: number;
1230
+
1231
+ consecutiveResolve?: number;
1232
+
1233
+ grouping?: 'NONE' | 'BY_AGENT';
1234
+
1235
+ metricVariant?: string;
1236
+
1237
+ minSampleSize?: number;
1238
+ }
1239
+
1240
+ export interface AlertEventTrigger {
1241
+ events: Array<
1242
+ | 'CALL_ANALYSIS_COMPLETED'
1243
+ | 'CALL_ANALYSIS_FAILED'
1244
+ | 'CALL_ANALYSIS_CANCELLED'
1245
+ | 'SIMULATION_RUN_PLAN_JOB_STARTED'
1246
+ | 'SIMULATION_RUN_PLAN_JOB_COMPLETED'
1247
+ | 'SIMULATION_RUN_PLAN_JOB_FAILED'
1248
+ | 'SIMULATION_RUN_PLAN_JOB_CANCELLED'
1249
+ | 'SIMULATION_JOB_STARTED'
1250
+ | 'SIMULATION_JOB_COMPLETED'
1251
+ | 'SIMULATION_JOB_FAILED'
1252
+ | 'SIMULATION_JOB_CANCELLED'
1253
+ | 'METRIC_COLLECTION_JOB_COMPLETED'
1254
+ | 'METRIC_COLLECTION_JOB_FAILED'
1255
+ | 'CHAT_ANALYSIS_COMPLETED'
1256
+ | 'CHAT_ANALYSIS_FAILED'
1257
+ | 'ISSUE_OPENED'
1258
+ | 'ISSUE_RESOLVED'
1259
+ >;
1260
+
1261
+ type: 'event';
1262
+ }
1263
+
1264
+ export interface AlertSimulationTrigger {
1265
+ conditions: Array<'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'>;
1266
+
1267
+ type: 'simulation';
1268
+
1269
+ deliveryFormat?: 'MESSAGE' | 'PDF';
1270
+
1271
+ plan?: string;
1272
+ }
1273
+
1274
+ export interface Actions {
1275
+ slack?: Array<Actions.Slack>;
1276
+
1277
+ webhooks?: Array<string>;
1278
+ }
1279
+
1280
+ export namespace Actions {
1281
+ export interface Slack {
1282
+ channelId: string;
1283
+
1284
+ channelName: string;
1285
+ }
1286
+ }
1287
+ }
1288
+
1289
+ export interface ToolConfig {
1290
+ kind: 'tool';
1291
+
1292
+ name: string;
1293
+
1294
+ agent?: string;
1295
+
1296
+ description?: string | null;
1297
+
1298
+ expectedResult?: string | null;
1299
+
1300
+ invocationCriteria?: string | null;
1301
+
1302
+ parameters?: { [key: string]: 'string' | 'number' | 'boolean' };
1303
+ }
1304
+ }
1305
+ }
1306
+
1307
+ export interface ConfigFlowStep {
1308
+ type:
1309
+ | 'AGENT_TURN'
1310
+ | 'CUSTOMER_TURN'
1311
+ | 'CUSTOMER_FIRST_MESSAGE'
1312
+ | 'CUSTOMER_VERBATIM_TURN'
1313
+ | 'CUSTOMER_SILENCE'
1314
+ | 'CUSTOMER_DTMF'
1315
+ | 'AGENT_DTMF'
1316
+ | 'VOICEMAIL'
1317
+ | 'SCENARIO_LINK'
1318
+ | 'CUSTOMER_HANDOFF';
1319
+
1320
+ content?: string;
1321
+
1322
+ dtmfDigits?: string;
1323
+
1324
+ flow?: string;
1325
+
1326
+ handoffPersona?: string;
1327
+
1328
+ mergeInto?: Array<string>;
1329
+
1330
+ offScript?: ConfigFlowStep.OffScript;
1331
+
1332
+ ref?: string;
1333
+
1334
+ /**
1335
+ * Removed. Use `stage` with `required: true`.
1336
+ */
1337
+ requiredForValidRun?: boolean;
1338
+
1339
+ silenceDurationSeconds?: number;
1340
+
1341
+ stage?: string | ConfigFlowStep.UnionMember1;
1342
+
1343
+ steps?: Array<ConfigAPI.ConfigFlowStep>;
1344
+ }
1345
+
1346
+ export namespace ConfigFlowStep {
1347
+ export interface OffScript {
1348
+ maxAttempts?: number;
1349
+
1350
+ reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY';
1351
+
1352
+ sayLine?: string;
1353
+
1354
+ then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE';
1355
+
1356
+ waitSeconds?: number;
1357
+ }
1358
+
1359
+ export interface UnionMember1 {
1360
+ name: string;
1361
+
1362
+ analyze?: boolean;
1363
+
1364
+ required?: boolean;
1365
+ }
1366
+ }
1367
+
1368
+ export interface ConfigApplyResponse {
1369
+ data: ConfigApplyResponse.Data;
1370
+ }
1371
+
1372
+ export namespace ConfigApplyResponse {
1373
+ export interface Data {
1374
+ changes: Array<Data.Change>;
1375
+
1376
+ summary: Data.Summary;
1377
+ }
1378
+
1379
+ export namespace Data {
1380
+ export interface Change {
1381
+ configKey: string;
1382
+
1383
+ kind:
1384
+ | 'agent'
1385
+ | 'persona'
1386
+ | 'httpRequestDefinition'
1387
+ | 'flow'
1388
+ | 'collector'
1389
+ | 'metric'
1390
+ | 'simulationPlan'
1391
+ | 'alert'
1392
+ | 'tool'
1393
+ | 'project'
1394
+ | 'member';
1395
+
1396
+ name: string;
1397
+
1398
+ op: 'create' | 'update' | 'delete' | 'noop';
1399
+
1400
+ status: 'applied' | 'skipped' | 'failed';
1401
+
1402
+ id?: string;
1403
+
1404
+ detail?: string;
1405
+
1406
+ error?: string;
1407
+
1408
+ project?: string;
1409
+
1410
+ signingSecret?: string;
1411
+ }
1412
+
1413
+ export interface Summary {
1414
+ create: number;
1415
+
1416
+ delete: number;
1417
+
1418
+ failed: number;
1419
+
1420
+ noop: number;
1421
+
1422
+ update: number;
1423
+ }
1424
+ }
1425
+ }
1426
+
1427
+ export interface ConfigDiffResponse {
1428
+ data: ConfigDiffResponse.Data;
1429
+ }
1430
+
1431
+ export namespace ConfigDiffResponse {
1432
+ export interface Data {
1433
+ changes: Array<Data.Change>;
1434
+
1435
+ summary: Data.Summary;
1436
+ }
1437
+
1438
+ export namespace Data {
1439
+ export interface Change {
1440
+ configKey: string;
1441
+
1442
+ kind:
1443
+ | 'agent'
1444
+ | 'persona'
1445
+ | 'httpRequestDefinition'
1446
+ | 'flow'
1447
+ | 'collector'
1448
+ | 'metric'
1449
+ | 'simulationPlan'
1450
+ | 'alert'
1451
+ | 'tool'
1452
+ | 'project'
1453
+ | 'member';
1454
+
1455
+ name: string;
1456
+
1457
+ op: 'create' | 'update' | 'delete' | 'noop';
1458
+
1459
+ detail?: string;
1460
+
1461
+ project?: string;
1462
+ }
1463
+
1464
+ export interface Summary {
1465
+ create: number;
1466
+
1467
+ delete: number;
1468
+
1469
+ noop: number;
1470
+
1471
+ update: number;
1472
+ }
1473
+ }
1474
+ }
1475
+
1476
+ export interface ConfigApplyParams {
1477
+ resources: Array<
1478
+ | ConfigApplyParams.AgentConfig
1479
+ | ConfigApplyParams.HTTPRequestDefinitionConfig
1480
+ | ConfigApplyParams.PersonaConfig
1481
+ | ConfigApplyParams.ImprovFlowConfig
1482
+ | ConfigApplyParams.ScriptedFlowConfig
1483
+ | ConfigApplyParams.CollectorConfig
1484
+ | ConfigApplyParams.MetricConfig
1485
+ | ConfigApplyParams.SimulationPlanConfig
1486
+ | ConfigApplyParams.QaSimulationPlanConfig
1487
+ | ConfigApplyParams.AlertConfig
1488
+ | ConfigApplyParams.ToolConfig
1489
+ | ConfigApplyParams.ProjectConfig
1490
+ >;
1491
+
1492
+ prune?: boolean;
659
1493
  }
660
1494
 
661
- export interface ConfigFlowStep {
662
- type:
663
- | 'AGENT_TURN'
664
- | 'CUSTOMER_TURN'
665
- | 'CUSTOMER_FIRST_MESSAGE'
666
- | 'CUSTOMER_VERBATIM_TURN'
667
- | 'CUSTOMER_SILENCE'
668
- | 'CUSTOMER_DTMF'
669
- | 'AGENT_DTMF'
670
- | 'VOICEMAIL'
671
- | 'SCENARIO_LINK'
672
- | 'CUSTOMER_HANDOFF';
1495
+ export namespace ConfigApplyParams {
1496
+ export interface AgentConfig {
1497
+ kind: 'agent';
1498
+
1499
+ name: string;
1500
+
1501
+ customId?: string | null;
1502
+
1503
+ description?: string | null;
1504
+
1505
+ displayName?: string;
1506
+
1507
+ endpoints?: Array<AgentConfig.Endpoint>;
1508
+
1509
+ prompt?: string | null;
1510
+ }
1511
+
1512
+ export namespace AgentConfig {
1513
+ export interface Endpoint {
1514
+ value: string;
1515
+
1516
+ direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING';
1517
+
1518
+ environment?: string;
1519
+
1520
+ outboundDialHttpRequestDefinition?: string;
1521
+
1522
+ outboundDialType?: 'NONE' | 'HTTP_REQUEST';
1523
+
1524
+ type?: 'PHONE' | 'WEBSOCKET';
1525
+ }
1526
+ }
1527
+
1528
+ export interface HTTPRequestDefinitionConfig {
1529
+ kind: 'httpRequestDefinition';
1530
+
1531
+ name: string;
1532
+
1533
+ url: string;
1534
+
1535
+ body?: string;
1536
+
1537
+ description?: string | null;
1538
+
1539
+ headers?: { [key: string]: string };
1540
+
1541
+ method?: 'POST' | 'PUT' | 'PATCH' | 'GET';
1542
+ }
1543
+
1544
+ export interface PersonaConfig {
1545
+ accent:
1546
+ | 'US'
1547
+ | 'US_X_SOUTH'
1548
+ | 'GB'
1549
+ | 'ES'
1550
+ | 'DE'
1551
+ | 'IN'
1552
+ | 'FR'
1553
+ | 'NL'
1554
+ | 'SA'
1555
+ | 'GR'
1556
+ | 'AU'
1557
+ | 'IT'
1558
+ | 'ID'
1559
+ | 'TH'
1560
+ | 'JP'
1561
+ | 'NZ'
1562
+ | 'PH'
1563
+ | 'SG'
1564
+ | 'MY'
1565
+ | 'HK'
1566
+ | 'TR'
1567
+ | 'PT'
1568
+ | 'IL';
1569
+
1570
+ gender: 'MALE' | 'FEMALE';
1571
+
1572
+ kind: 'persona';
1573
+
1574
+ language:
1575
+ | 'EN'
1576
+ | 'ES'
1577
+ | 'DE'
1578
+ | 'HI'
1579
+ | 'FR'
1580
+ | 'NL'
1581
+ | 'AR'
1582
+ | 'EL'
1583
+ | 'IT'
1584
+ | 'ID'
1585
+ | 'TH'
1586
+ | 'JA'
1587
+ | 'TL'
1588
+ | 'MS'
1589
+ | 'ZH'
1590
+ | 'TR'
1591
+ | 'PT'
1592
+ | 'HE';
1593
+
1594
+ name: string;
1595
+
1596
+ age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
1597
+
1598
+ backgroundNoise?:
1599
+ | 'NONE'
1600
+ | 'AIRPORT'
1601
+ | 'CHILDREN_PLAYING'
1602
+ | 'CITY'
1603
+ | 'COFFEE_SHOP'
1604
+ | 'CONSTRUCTION'
1605
+ | 'CRYING_BABY'
1606
+ | 'DRIVING'
1607
+ | 'LIBRARY'
1608
+ | 'OFFICE'
1609
+ | 'THUNDERSTORM'
1610
+ | 'TRAIN';
1611
+
1612
+ backstoryPrompt?: string | null;
1613
+
1614
+ baseEmotion?:
1615
+ | 'NEUTRAL'
1616
+ | 'CHEERFUL'
1617
+ | 'CONFUSED'
1618
+ | 'FRUSTRATED'
1619
+ | 'SKEPTICAL'
1620
+ | 'RUSHED'
1621
+ | 'DISTRACTED'
1622
+ | 'ANGRY'
1623
+ | 'ANXIOUS'
1624
+ | 'SAD';
1625
+
1626
+ confirmationStyle?: 'EXPLICIT' | 'VAGUE';
1627
+
1628
+ description?: string | null;
1629
+
1630
+ displayName?: string;
1631
+
1632
+ hasDisfluencies?: boolean;
1633
+
1634
+ idleMessageMaxSpokenCount?: number;
1635
+
1636
+ idleMessageResetCountOnUserSpeechEnabled?: boolean;
1637
+
1638
+ idleMessages?: Array<string> | null;
1639
+
1640
+ idleTimeoutSeconds?: number;
1641
+
1642
+ intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE';
1643
+
1644
+ interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY';
1645
+
1646
+ memoryReliability?: 'HIGH' | 'LOW';
1647
+
1648
+ properties?: { [key: string]: unknown };
1649
+
1650
+ responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
1651
+
1652
+ secondaryLanguage?: 'EN';
1653
+
1654
+ speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING';
1655
+
1656
+ speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
1657
+
1658
+ understoodLanguages?: Array<
1659
+ | 'EN'
1660
+ | 'ES'
1661
+ | 'DE'
1662
+ | 'HI'
1663
+ | 'FR'
1664
+ | 'NL'
1665
+ | 'AR'
1666
+ | 'EL'
1667
+ | 'IT'
1668
+ | 'ID'
1669
+ | 'TH'
1670
+ | 'JA'
1671
+ | 'TL'
1672
+ | 'MS'
1673
+ | 'ZH'
1674
+ | 'TR'
1675
+ | 'PT'
1676
+ | 'HE'
1677
+ >;
1678
+ }
1679
+
1680
+ export interface ImprovFlowConfig {
1681
+ agents: Array<string>;
1682
+
1683
+ happyPath: ImprovFlowConfig.HappyPath;
1684
+
1685
+ kind: 'flow';
1686
+
1687
+ name: string;
1688
+
1689
+ type: 'improv';
1690
+
1691
+ description?: string | null;
1692
+
1693
+ edgeCases?: Array<ImprovFlowConfig.EdgeCase>;
1694
+
1695
+ expectations?: Array<string>;
1696
+
1697
+ title?: string;
1698
+ }
1699
+
1700
+ export namespace ImprovFlowConfig {
1701
+ export interface HappyPath {
1702
+ environment: string;
1703
+
1704
+ persona: string;
1705
+
1706
+ expectations?: Array<string>;
1707
+
1708
+ prompt?: string;
1709
+
1710
+ title?: string;
1711
+ }
1712
+
1713
+ export interface EdgeCase {
1714
+ name: string;
1715
+
1716
+ environment?: string;
1717
+
1718
+ expectations?: Array<string>;
1719
+
1720
+ persona?: string;
1721
+
1722
+ prompt?: string;
1723
+
1724
+ title?: string;
1725
+ }
1726
+ }
1727
+
1728
+ export interface ScriptedFlowConfig {
1729
+ graph: Array<ConfigFlowStep>;
1730
+
1731
+ kind: 'flow';
1732
+
1733
+ name: string;
1734
+
1735
+ type: 'scripted';
1736
+
1737
+ adherence?: 'LOOSE' | 'STRICT';
1738
+
1739
+ agents?: Array<string>;
1740
+
1741
+ branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE';
1742
+
1743
+ description?: string | null;
1744
+
1745
+ expectations?: Array<string>;
1746
+
1747
+ offScript?: ScriptedFlowConfig.OffScript;
1748
+
1749
+ title?: string;
1750
+ }
1751
+
1752
+ export namespace ScriptedFlowConfig {
1753
+ export interface OffScript {
1754
+ maxAttempts?: number;
1755
+
1756
+ reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY';
1757
+
1758
+ sayLine?: string;
1759
+
1760
+ then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE';
1761
+
1762
+ waitSeconds?: number;
1763
+ }
1764
+ }
1765
+
1766
+ export interface CollectorConfig {
1767
+ kind: 'collector';
1768
+
1769
+ metrics: Array<string>;
1770
+
1771
+ modality: 'call' | 'chat';
1772
+
1773
+ name: string;
1774
+
1775
+ displayName?: string;
1776
+
1777
+ filters?: Array<CollectorConfig.Filter>;
1778
+
1779
+ status?: 'ACTIVE' | 'INACTIVE';
1780
+ }
1781
+
1782
+ export namespace CollectorConfig {
1783
+ export interface Filter {
1784
+ conditions: Array<Filter.Condition>;
1785
+ }
1786
+
1787
+ export namespace Filter {
1788
+ export interface Condition {
1789
+ key: string;
1790
+
1791
+ type: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION';
1792
+
1793
+ operator?:
1794
+ | 'EQUALS'
1795
+ | 'NOT_EQUALS'
1796
+ | 'CONTAINS'
1797
+ | 'STARTS_WITH'
1798
+ | 'GREATER_THAN'
1799
+ | 'LESS_THAN'
1800
+ | 'GREATER_THAN_OR_EQUALS'
1801
+ | 'LESS_THAN_OR_EQUALS';
1802
+
1803
+ value?: string;
1804
+ }
1805
+ }
1806
+ }
1807
+
1808
+ export interface MetricConfig {
1809
+ kind: 'metric';
1810
+
1811
+ name: string;
1812
+
1813
+ prompt: string;
1814
+
1815
+ type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION';
1816
+
1817
+ contexts?: Array<'CALL' | 'SEGMENT' | 'TURN'>;
1818
+
1819
+ displayName?: string;
1820
+
1821
+ falseLabel?: string;
1822
+
1823
+ maxSelections?: number;
1824
+
1825
+ options?: Array<MetricConfig.Option>;
1826
+
1827
+ participantRole?: 'AGENT' | 'CUSTOMER';
1828
+
1829
+ scaleLabels?: Array<MetricConfig.ScaleLabel>;
1830
+
1831
+ scaleMax?: number;
1832
+
1833
+ scaleMin?: number;
1834
+
1835
+ scope?: 'GLOBAL' | 'PER_PARTICIPANT';
1836
+
1837
+ trueLabel?: string;
1838
+ }
1839
+
1840
+ export namespace MetricConfig {
1841
+ export interface Option {
1842
+ displayOrder: number;
1843
+
1844
+ label: string;
1845
+
1846
+ description?: string;
1847
+ }
1848
+
1849
+ export interface ScaleLabel {
1850
+ displayOrder: number;
1851
+
1852
+ label: string;
1853
+
1854
+ rangeMax: number;
1855
+
1856
+ rangeMin: number;
1857
+
1858
+ colorHex?: string;
1859
+
1860
+ description?: string;
1861
+ }
1862
+ }
1863
+
1864
+ export interface SimulationPlanConfig {
1865
+ agentEndpoints: Array<SimulationPlanConfig.AgentEndpoint>;
1866
+
1867
+ direction: 'INBOUND' | 'OUTBOUND';
1868
+
1869
+ flows: Array<SimulationPlanConfig.Flow>;
1870
+
1871
+ kind: 'simulationPlan';
1872
+
1873
+ maxDurationSeconds: number;
1874
+
1875
+ metrics: Array<string>;
1876
+
1877
+ name: string;
1878
+
1879
+ description?: string | null;
1880
+
1881
+ endCallPhrases?: Array<string>;
1882
+
1883
+ endCallReasons?: Array<string>;
1884
+
1885
+ enrichWithLiveConversation?: boolean;
1886
+
1887
+ executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT';
1888
+
1889
+ includeAutomaticMetrics?: boolean;
1890
+
1891
+ includeFlowMetrics?: boolean;
1892
+
1893
+ iterations?: number;
1894
+
1895
+ maxConcurrentJobs?: number;
1896
+
1897
+ silenceTimeoutSeconds?: number;
1898
+
1899
+ template?: 'manual';
1900
+ }
1901
+
1902
+ export namespace SimulationPlanConfig {
1903
+ export interface AgentEndpoint {
1904
+ agent: string;
1905
+
1906
+ direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING';
1907
+
1908
+ value?: string;
1909
+ }
1910
+
1911
+ export interface Flow {
1912
+ edgeCases?: Array<string>;
1913
+
1914
+ flow?: string;
1915
+
1916
+ happyPath?: boolean;
1917
+
1918
+ personaOverride?: string;
1919
+
1920
+ system?: string;
1921
+ }
1922
+ }
1923
+
1924
+ export interface QaSimulationPlanConfig {
1925
+ agentEndpoints: Array<QaSimulationPlanConfig.AgentEndpoint>;
1926
+
1927
+ direction: 'INBOUND' | 'OUTBOUND';
1928
+
1929
+ environment: string;
1930
+
1931
+ kind: 'simulationPlan';
1932
+
1933
+ maxDurationSeconds: number;
1934
+
1935
+ name: string;
1936
+
1937
+ persona: string;
1938
+
1939
+ questions: Array<QaSimulationPlanConfig.Question>;
1940
+
1941
+ template: 'question-answer-check';
1942
+
1943
+ description?: string | null;
1944
+
1945
+ endCallPhrases?: Array<string>;
1946
+
1947
+ endCallReasons?: Array<string>;
1948
+
1949
+ enrichWithLiveConversation?: boolean;
1950
+
1951
+ executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT';
1952
+
1953
+ gradeWithKnowledgeBase?: boolean;
1954
+
1955
+ includeAutomaticMetrics?: boolean;
1956
+
1957
+ includeFlowMetrics?: boolean;
1958
+
1959
+ iterations?: number;
1960
+
1961
+ maxConcurrentJobs?: number;
1962
+
1963
+ metrics?: Array<string>;
1964
+
1965
+ silenceTimeoutSeconds?: number;
1966
+ }
1967
+
1968
+ export namespace QaSimulationPlanConfig {
1969
+ export interface AgentEndpoint {
1970
+ agent: string;
1971
+
1972
+ direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING';
1973
+
1974
+ value?: string;
1975
+ }
1976
+
1977
+ export interface Question {
1978
+ ask: string;
1979
+
1980
+ expect?: string;
1981
+
1982
+ name?: string;
1983
+ }
1984
+ }
1985
+
1986
+ export interface AlertConfig {
1987
+ kind: 'alert';
1988
+
1989
+ name: string;
1990
+
1991
+ trigger:
1992
+ | AlertConfig.AlertThresholdTrigger
1993
+ | AlertConfig.AlertEventTrigger
1994
+ | AlertConfig.AlertSimulationTrigger;
1995
+
1996
+ actions?: AlertConfig.Actions;
1997
+
1998
+ displayName?: string;
1999
+
2000
+ enabled?: boolean;
2001
+ }
2002
+
2003
+ export namespace AlertConfig {
2004
+ export interface AlertThresholdTrigger {
2005
+ aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN';
2006
+
2007
+ metric: string;
2008
+
2009
+ operator: 'GT' | 'GTE' | 'LT' | 'LTE';
2010
+
2011
+ thresholdValue: number;
2012
+
2013
+ type: 'threshold';
2014
+
2015
+ windowMinutes: number;
2016
+
2017
+ consecutiveOpen?: number;
2018
+
2019
+ consecutiveResolve?: number;
2020
+
2021
+ grouping?: 'NONE' | 'BY_AGENT';
2022
+
2023
+ metricVariant?: string;
2024
+
2025
+ minSampleSize?: number;
2026
+ }
2027
+
2028
+ export interface AlertEventTrigger {
2029
+ events: Array<
2030
+ | 'CALL_ANALYSIS_COMPLETED'
2031
+ | 'CALL_ANALYSIS_FAILED'
2032
+ | 'CALL_ANALYSIS_CANCELLED'
2033
+ | 'SIMULATION_RUN_PLAN_JOB_STARTED'
2034
+ | 'SIMULATION_RUN_PLAN_JOB_COMPLETED'
2035
+ | 'SIMULATION_RUN_PLAN_JOB_FAILED'
2036
+ | 'SIMULATION_RUN_PLAN_JOB_CANCELLED'
2037
+ | 'SIMULATION_JOB_STARTED'
2038
+ | 'SIMULATION_JOB_COMPLETED'
2039
+ | 'SIMULATION_JOB_FAILED'
2040
+ | 'SIMULATION_JOB_CANCELLED'
2041
+ | 'METRIC_COLLECTION_JOB_COMPLETED'
2042
+ | 'METRIC_COLLECTION_JOB_FAILED'
2043
+ | 'CHAT_ANALYSIS_COMPLETED'
2044
+ | 'CHAT_ANALYSIS_FAILED'
2045
+ | 'ISSUE_OPENED'
2046
+ | 'ISSUE_RESOLVED'
2047
+ >;
2048
+
2049
+ type: 'event';
2050
+ }
2051
+
2052
+ export interface AlertSimulationTrigger {
2053
+ conditions: Array<'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'>;
2054
+
2055
+ type: 'simulation';
2056
+
2057
+ deliveryFormat?: 'MESSAGE' | 'PDF';
2058
+
2059
+ plan?: string;
2060
+ }
2061
+
2062
+ export interface Actions {
2063
+ slack?: Array<Actions.Slack>;
2064
+
2065
+ webhooks?: Array<string>;
2066
+ }
2067
+
2068
+ export namespace Actions {
2069
+ export interface Slack {
2070
+ channelId: string;
2071
+
2072
+ channelName: string;
2073
+ }
2074
+ }
2075
+ }
2076
+
2077
+ export interface ToolConfig {
2078
+ kind: 'tool';
2079
+
2080
+ name: string;
2081
+
2082
+ agent?: string;
2083
+
2084
+ description?: string | null;
2085
+
2086
+ expectedResult?: string | null;
2087
+
2088
+ invocationCriteria?: string | null;
2089
+
2090
+ parameters?: { [key: string]: 'string' | 'number' | 'boolean' };
2091
+ }
2092
+
2093
+ export interface ProjectConfig {
2094
+ kind: 'project';
2095
+
2096
+ name: string;
2097
+
2098
+ category?:
2099
+ | 'HEALTHCARE'
2100
+ | 'FINANCIAL'
2101
+ | 'RETAIL'
2102
+ | 'HOSPITALITY'
2103
+ | 'AUTOMOTIVE'
2104
+ | 'GOVERNMENT'
2105
+ | 'EDUCATION'
2106
+ | 'REAL_ESTATE'
2107
+ | 'OTHER';
2108
+
2109
+ dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1';
2110
+
2111
+ description?: string;
2112
+
2113
+ displayName?: string;
2114
+
2115
+ members?: Array<ProjectConfig.Member>;
2116
+
2117
+ resources?: Array<
2118
+ | ProjectConfig.AgentConfig
2119
+ | ProjectConfig.HTTPRequestDefinitionConfig
2120
+ | ProjectConfig.PersonaConfig
2121
+ | ProjectConfig.ImprovFlowConfig
2122
+ | ProjectConfig.ScriptedFlowConfig
2123
+ | ProjectConfig.CollectorConfig
2124
+ | ProjectConfig.MetricConfig
2125
+ | ProjectConfig.SimulationPlanConfig
2126
+ | ProjectConfig.QaSimulationPlanConfig
2127
+ | ProjectConfig.AlertConfig
2128
+ | ProjectConfig.ToolConfig
2129
+ >;
2130
+ }
2131
+
2132
+ export namespace ProjectConfig {
2133
+ export interface Member {
2134
+ email: string;
2135
+
2136
+ role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER';
2137
+ }
2138
+
2139
+ export interface AgentConfig {
2140
+ kind: 'agent';
2141
+
2142
+ name: string;
2143
+
2144
+ customId?: string | null;
2145
+
2146
+ description?: string | null;
2147
+
2148
+ displayName?: string;
2149
+
2150
+ endpoints?: Array<AgentConfig.Endpoint>;
2151
+
2152
+ prompt?: string | null;
2153
+ }
2154
+
2155
+ export namespace AgentConfig {
2156
+ export interface Endpoint {
2157
+ value: string;
2158
+
2159
+ direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING';
2160
+
2161
+ environment?: string;
2162
+
2163
+ outboundDialHttpRequestDefinition?: string;
2164
+
2165
+ outboundDialType?: 'NONE' | 'HTTP_REQUEST';
2166
+
2167
+ type?: 'PHONE' | 'WEBSOCKET';
2168
+ }
2169
+ }
2170
+
2171
+ export interface HTTPRequestDefinitionConfig {
2172
+ kind: 'httpRequestDefinition';
673
2173
 
674
- content?: string;
2174
+ name: string;
675
2175
 
676
- dtmfDigits?: string;
2176
+ url: string;
677
2177
 
678
- flow?: string;
2178
+ body?: string;
679
2179
 
680
- handoffPersona?: string;
2180
+ description?: string | null;
681
2181
 
682
- mergeInto?: Array<string>;
2182
+ headers?: { [key: string]: string };
683
2183
 
684
- offScript?: ConfigFlowStep.OffScript;
2184
+ method?: 'POST' | 'PUT' | 'PATCH' | 'GET';
2185
+ }
685
2186
 
686
- ref?: string;
2187
+ export interface PersonaConfig {
2188
+ accent:
2189
+ | 'US'
2190
+ | 'US_X_SOUTH'
2191
+ | 'GB'
2192
+ | 'ES'
2193
+ | 'DE'
2194
+ | 'IN'
2195
+ | 'FR'
2196
+ | 'NL'
2197
+ | 'SA'
2198
+ | 'GR'
2199
+ | 'AU'
2200
+ | 'IT'
2201
+ | 'ID'
2202
+ | 'TH'
2203
+ | 'JP'
2204
+ | 'NZ'
2205
+ | 'PH'
2206
+ | 'SG'
2207
+ | 'MY'
2208
+ | 'HK'
2209
+ | 'TR'
2210
+ | 'PT'
2211
+ | 'IL';
2212
+
2213
+ gender: 'MALE' | 'FEMALE';
2214
+
2215
+ kind: 'persona';
2216
+
2217
+ language:
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';
687
2236
 
688
- /**
689
- * Removed. Use `stage` with `required: true`.
690
- */
691
- requiredForValidRun?: boolean;
2237
+ name: string;
692
2238
 
693
- silenceDurationSeconds?: number;
2239
+ age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
694
2240
 
695
- stage?: string | ConfigFlowStep.UnionMember1;
2241
+ backgroundNoise?:
2242
+ | 'NONE'
2243
+ | 'AIRPORT'
2244
+ | 'CHILDREN_PLAYING'
2245
+ | 'CITY'
2246
+ | 'COFFEE_SHOP'
2247
+ | 'CONSTRUCTION'
2248
+ | 'CRYING_BABY'
2249
+ | 'DRIVING'
2250
+ | 'LIBRARY'
2251
+ | 'OFFICE'
2252
+ | 'THUNDERSTORM'
2253
+ | 'TRAIN';
696
2254
 
697
- steps?: Array<ConfigAPI.ConfigFlowStep>;
698
- }
2255
+ backstoryPrompt?: string | null;
699
2256
 
700
- export namespace ConfigFlowStep {
701
- export interface OffScript {
702
- maxAttempts?: number;
2257
+ baseEmotion?:
2258
+ | 'NEUTRAL'
2259
+ | 'CHEERFUL'
2260
+ | 'CONFUSED'
2261
+ | 'FRUSTRATED'
2262
+ | 'SKEPTICAL'
2263
+ | 'RUSHED'
2264
+ | 'DISTRACTED'
2265
+ | 'ANGRY'
2266
+ | 'ANXIOUS'
2267
+ | 'SAD';
703
2268
 
704
- reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY';
2269
+ confirmationStyle?: 'EXPLICIT' | 'VAGUE';
705
2270
 
706
- sayLine?: string;
2271
+ description?: string | null;
707
2272
 
708
- then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE';
2273
+ displayName?: string;
709
2274
 
710
- waitSeconds?: number;
711
- }
2275
+ hasDisfluencies?: boolean;
712
2276
 
713
- export interface UnionMember1 {
714
- name: string;
2277
+ idleMessageMaxSpokenCount?: number;
715
2278
 
716
- analyze?: boolean;
2279
+ idleMessageResetCountOnUserSpeechEnabled?: boolean;
717
2280
 
718
- required?: boolean;
719
- }
720
- }
2281
+ idleMessages?: Array<string> | null;
721
2282
 
722
- export interface ConfigApplyResponse {
723
- data: ConfigApplyResponse.Data;
724
- }
2283
+ idleTimeoutSeconds?: number;
725
2284
 
726
- export namespace ConfigApplyResponse {
727
- export interface Data {
728
- changes: Array<Data.Change>;
2285
+ intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE';
729
2286
 
730
- summary: Data.Summary;
731
- }
2287
+ interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY';
732
2288
 
733
- export namespace Data {
734
- export interface Change {
735
- configKey: string;
2289
+ memoryReliability?: 'HIGH' | 'LOW';
736
2290
 
737
- kind:
738
- | 'agent'
739
- | 'persona'
740
- | 'httpRequestDefinition'
741
- | 'flow'
742
- | 'collector'
743
- | 'metric'
744
- | 'simulationPlan'
745
- | 'alert'
746
- | 'tool';
2291
+ properties?: { [key: string]: unknown };
2292
+
2293
+ responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
2294
+
2295
+ secondaryLanguage?: 'EN';
2296
+
2297
+ speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING';
2298
+
2299
+ speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
2300
+
2301
+ understoodLanguages?: Array<
2302
+ | 'EN'
2303
+ | 'ES'
2304
+ | 'DE'
2305
+ | 'HI'
2306
+ | 'FR'
2307
+ | 'NL'
2308
+ | 'AR'
2309
+ | 'EL'
2310
+ | 'IT'
2311
+ | 'ID'
2312
+ | 'TH'
2313
+ | 'JA'
2314
+ | 'TL'
2315
+ | 'MS'
2316
+ | 'ZH'
2317
+ | 'TR'
2318
+ | 'PT'
2319
+ | 'HE'
2320
+ >;
2321
+ }
2322
+
2323
+ export interface ImprovFlowConfig {
2324
+ agents: Array<string>;
2325
+
2326
+ happyPath: ImprovFlowConfig.HappyPath;
2327
+
2328
+ kind: 'flow';
747
2329
 
748
2330
  name: string;
749
2331
 
750
- op: 'create' | 'update' | 'delete' | 'noop';
2332
+ type: 'improv';
751
2333
 
752
- status: 'applied' | 'skipped' | 'failed';
2334
+ description?: string | null;
753
2335
 
754
- id?: string;
2336
+ edgeCases?: Array<ImprovFlowConfig.EdgeCase>;
755
2337
 
756
- detail?: string;
2338
+ expectations?: Array<string>;
757
2339
 
758
- error?: string;
2340
+ title?: string;
2341
+ }
759
2342
 
760
- signingSecret?: string;
2343
+ export namespace ImprovFlowConfig {
2344
+ export interface HappyPath {
2345
+ environment: string;
2346
+
2347
+ persona: string;
2348
+
2349
+ expectations?: Array<string>;
2350
+
2351
+ prompt?: string;
2352
+
2353
+ title?: string;
2354
+ }
2355
+
2356
+ export interface EdgeCase {
2357
+ name: string;
2358
+
2359
+ environment?: string;
2360
+
2361
+ expectations?: Array<string>;
2362
+
2363
+ persona?: string;
2364
+
2365
+ prompt?: string;
2366
+
2367
+ title?: string;
2368
+ }
761
2369
  }
762
2370
 
763
- export interface Summary {
764
- create: number;
2371
+ export interface ScriptedFlowConfig {
2372
+ graph: Array<ConfigFlowStep>;
765
2373
 
766
- delete: number;
2374
+ kind: 'flow';
767
2375
 
768
- failed: number;
2376
+ name: string;
769
2377
 
770
- noop: number;
2378
+ type: 'scripted';
771
2379
 
772
- update: number;
2380
+ adherence?: 'LOOSE' | 'STRICT';
2381
+
2382
+ agents?: Array<string>;
2383
+
2384
+ branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE';
2385
+
2386
+ description?: string | null;
2387
+
2388
+ expectations?: Array<string>;
2389
+
2390
+ offScript?: ScriptedFlowConfig.OffScript;
2391
+
2392
+ title?: string;
773
2393
  }
774
- }
775
- }
776
2394
 
777
- export interface ConfigDiffResponse {
778
- data: ConfigDiffResponse.Data;
779
- }
2395
+ export namespace ScriptedFlowConfig {
2396
+ export interface OffScript {
2397
+ maxAttempts?: number;
2398
+
2399
+ reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY';
2400
+
2401
+ sayLine?: string;
2402
+
2403
+ then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE';
2404
+
2405
+ waitSeconds?: number;
2406
+ }
2407
+ }
2408
+
2409
+ export interface CollectorConfig {
2410
+ kind: 'collector';
2411
+
2412
+ metrics: Array<string>;
2413
+
2414
+ modality: 'call' | 'chat';
2415
+
2416
+ name: string;
2417
+
2418
+ displayName?: string;
2419
+
2420
+ filters?: Array<CollectorConfig.Filter>;
2421
+
2422
+ status?: 'ACTIVE' | 'INACTIVE';
2423
+ }
2424
+
2425
+ export namespace CollectorConfig {
2426
+ export interface Filter {
2427
+ conditions: Array<Filter.Condition>;
2428
+ }
2429
+
2430
+ export namespace Filter {
2431
+ export interface Condition {
2432
+ key: string;
2433
+
2434
+ type: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION';
2435
+
2436
+ operator?:
2437
+ | 'EQUALS'
2438
+ | 'NOT_EQUALS'
2439
+ | 'CONTAINS'
2440
+ | 'STARTS_WITH'
2441
+ | 'GREATER_THAN'
2442
+ | 'LESS_THAN'
2443
+ | 'GREATER_THAN_OR_EQUALS'
2444
+ | 'LESS_THAN_OR_EQUALS';
2445
+
2446
+ value?: string;
2447
+ }
2448
+ }
2449
+ }
2450
+
2451
+ export interface MetricConfig {
2452
+ kind: 'metric';
2453
+
2454
+ name: string;
2455
+
2456
+ prompt: string;
2457
+
2458
+ type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION';
2459
+
2460
+ contexts?: Array<'CALL' | 'SEGMENT' | 'TURN'>;
2461
+
2462
+ displayName?: string;
2463
+
2464
+ falseLabel?: string;
2465
+
2466
+ maxSelections?: number;
2467
+
2468
+ options?: Array<MetricConfig.Option>;
2469
+
2470
+ participantRole?: 'AGENT' | 'CUSTOMER';
2471
+
2472
+ scaleLabels?: Array<MetricConfig.ScaleLabel>;
2473
+
2474
+ scaleMax?: number;
2475
+
2476
+ scaleMin?: number;
2477
+
2478
+ scope?: 'GLOBAL' | 'PER_PARTICIPANT';
2479
+
2480
+ trueLabel?: string;
2481
+ }
2482
+
2483
+ export namespace MetricConfig {
2484
+ export interface Option {
2485
+ displayOrder: number;
2486
+
2487
+ label: string;
2488
+
2489
+ description?: string;
2490
+ }
2491
+
2492
+ export interface ScaleLabel {
2493
+ displayOrder: number;
2494
+
2495
+ label: string;
2496
+
2497
+ rangeMax: number;
2498
+
2499
+ rangeMin: number;
2500
+
2501
+ colorHex?: string;
2502
+
2503
+ description?: string;
2504
+ }
2505
+ }
2506
+
2507
+ export interface SimulationPlanConfig {
2508
+ agentEndpoints: Array<SimulationPlanConfig.AgentEndpoint>;
2509
+
2510
+ direction: 'INBOUND' | 'OUTBOUND';
2511
+
2512
+ flows: Array<SimulationPlanConfig.Flow>;
2513
+
2514
+ kind: 'simulationPlan';
2515
+
2516
+ maxDurationSeconds: number;
2517
+
2518
+ metrics: Array<string>;
2519
+
2520
+ name: string;
2521
+
2522
+ description?: string | null;
2523
+
2524
+ endCallPhrases?: Array<string>;
2525
+
2526
+ endCallReasons?: Array<string>;
2527
+
2528
+ enrichWithLiveConversation?: boolean;
2529
+
2530
+ executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT';
2531
+
2532
+ includeAutomaticMetrics?: boolean;
2533
+
2534
+ includeFlowMetrics?: boolean;
2535
+
2536
+ iterations?: number;
2537
+
2538
+ maxConcurrentJobs?: number;
2539
+
2540
+ silenceTimeoutSeconds?: number;
2541
+
2542
+ template?: 'manual';
2543
+ }
2544
+
2545
+ export namespace SimulationPlanConfig {
2546
+ export interface AgentEndpoint {
2547
+ agent: string;
2548
+
2549
+ direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING';
2550
+
2551
+ value?: string;
2552
+ }
2553
+
2554
+ export interface Flow {
2555
+ edgeCases?: Array<string>;
2556
+
2557
+ flow?: string;
2558
+
2559
+ happyPath?: boolean;
2560
+
2561
+ personaOverride?: string;
2562
+
2563
+ system?: string;
2564
+ }
2565
+ }
2566
+
2567
+ export interface QaSimulationPlanConfig {
2568
+ agentEndpoints: Array<QaSimulationPlanConfig.AgentEndpoint>;
2569
+
2570
+ direction: 'INBOUND' | 'OUTBOUND';
2571
+
2572
+ environment: string;
2573
+
2574
+ kind: 'simulationPlan';
2575
+
2576
+ maxDurationSeconds: number;
2577
+
2578
+ name: string;
2579
+
2580
+ persona: string;
2581
+
2582
+ questions: Array<QaSimulationPlanConfig.Question>;
2583
+
2584
+ template: 'question-answer-check';
2585
+
2586
+ description?: string | null;
2587
+
2588
+ endCallPhrases?: Array<string>;
2589
+
2590
+ endCallReasons?: Array<string>;
2591
+
2592
+ enrichWithLiveConversation?: boolean;
2593
+
2594
+ executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT';
2595
+
2596
+ gradeWithKnowledgeBase?: boolean;
2597
+
2598
+ includeAutomaticMetrics?: boolean;
2599
+
2600
+ includeFlowMetrics?: boolean;
2601
+
2602
+ iterations?: number;
2603
+
2604
+ maxConcurrentJobs?: number;
2605
+
2606
+ metrics?: Array<string>;
2607
+
2608
+ silenceTimeoutSeconds?: number;
2609
+ }
2610
+
2611
+ export namespace QaSimulationPlanConfig {
2612
+ export interface AgentEndpoint {
2613
+ agent: string;
2614
+
2615
+ direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING';
2616
+
2617
+ value?: string;
2618
+ }
2619
+
2620
+ export interface Question {
2621
+ ask: string;
2622
+
2623
+ expect?: string;
2624
+
2625
+ name?: string;
2626
+ }
2627
+ }
2628
+
2629
+ export interface AlertConfig {
2630
+ kind: 'alert';
2631
+
2632
+ name: string;
2633
+
2634
+ trigger:
2635
+ | AlertConfig.AlertThresholdTrigger
2636
+ | AlertConfig.AlertEventTrigger
2637
+ | AlertConfig.AlertSimulationTrigger;
2638
+
2639
+ actions?: AlertConfig.Actions;
2640
+
2641
+ displayName?: string;
2642
+
2643
+ enabled?: boolean;
2644
+ }
2645
+
2646
+ export namespace AlertConfig {
2647
+ export interface AlertThresholdTrigger {
2648
+ aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN';
2649
+
2650
+ metric: string;
2651
+
2652
+ operator: 'GT' | 'GTE' | 'LT' | 'LTE';
2653
+
2654
+ thresholdValue: number;
2655
+
2656
+ type: 'threshold';
2657
+
2658
+ windowMinutes: number;
2659
+
2660
+ consecutiveOpen?: number;
2661
+
2662
+ consecutiveResolve?: number;
2663
+
2664
+ grouping?: 'NONE' | 'BY_AGENT';
2665
+
2666
+ metricVariant?: string;
2667
+
2668
+ minSampleSize?: number;
2669
+ }
2670
+
2671
+ export interface AlertEventTrigger {
2672
+ events: Array<
2673
+ | 'CALL_ANALYSIS_COMPLETED'
2674
+ | 'CALL_ANALYSIS_FAILED'
2675
+ | 'CALL_ANALYSIS_CANCELLED'
2676
+ | 'SIMULATION_RUN_PLAN_JOB_STARTED'
2677
+ | 'SIMULATION_RUN_PLAN_JOB_COMPLETED'
2678
+ | 'SIMULATION_RUN_PLAN_JOB_FAILED'
2679
+ | 'SIMULATION_RUN_PLAN_JOB_CANCELLED'
2680
+ | 'SIMULATION_JOB_STARTED'
2681
+ | 'SIMULATION_JOB_COMPLETED'
2682
+ | 'SIMULATION_JOB_FAILED'
2683
+ | 'SIMULATION_JOB_CANCELLED'
2684
+ | 'METRIC_COLLECTION_JOB_COMPLETED'
2685
+ | 'METRIC_COLLECTION_JOB_FAILED'
2686
+ | 'CHAT_ANALYSIS_COMPLETED'
2687
+ | 'CHAT_ANALYSIS_FAILED'
2688
+ | 'ISSUE_OPENED'
2689
+ | 'ISSUE_RESOLVED'
2690
+ >;
2691
+
2692
+ type: 'event';
2693
+ }
780
2694
 
781
- export namespace ConfigDiffResponse {
782
- export interface Data {
783
- changes: Array<Data.Change>;
2695
+ export interface AlertSimulationTrigger {
2696
+ conditions: Array<'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'>;
784
2697
 
785
- summary: Data.Summary;
786
- }
2698
+ type: 'simulation';
787
2699
 
788
- export namespace Data {
789
- export interface Change {
790
- configKey: string;
2700
+ deliveryFormat?: 'MESSAGE' | 'PDF';
791
2701
 
792
- kind:
793
- | 'agent'
794
- | 'persona'
795
- | 'httpRequestDefinition'
796
- | 'flow'
797
- | 'collector'
798
- | 'metric'
799
- | 'simulationPlan'
800
- | 'alert'
801
- | 'tool';
2702
+ plan?: string;
2703
+ }
802
2704
 
803
- name: string;
2705
+ export interface Actions {
2706
+ slack?: Array<Actions.Slack>;
804
2707
 
805
- op: 'create' | 'update' | 'delete' | 'noop';
2708
+ webhooks?: Array<string>;
2709
+ }
806
2710
 
807
- detail?: string;
2711
+ export namespace Actions {
2712
+ export interface Slack {
2713
+ channelId: string;
2714
+
2715
+ channelName: string;
2716
+ }
2717
+ }
808
2718
  }
809
2719
 
810
- export interface Summary {
811
- create: number;
2720
+ export interface ToolConfig {
2721
+ kind: 'tool';
812
2722
 
813
- delete: number;
2723
+ name: string;
814
2724
 
815
- noop: number;
2725
+ agent?: string;
816
2726
 
817
- update: number;
2727
+ description?: string | null;
2728
+
2729
+ expectedResult?: string | null;
2730
+
2731
+ invocationCriteria?: string | null;
2732
+
2733
+ parameters?: { [key: string]: 'string' | 'number' | 'boolean' };
818
2734
  }
819
2735
  }
820
2736
  }
821
2737
 
822
- export interface ConfigApplyParams {
2738
+ export interface ConfigDiffParams {
823
2739
  resources: Array<
824
- | ConfigApplyParams.AgentConfig
825
- | ConfigApplyParams.HTTPRequestDefinitionConfig
826
- | ConfigApplyParams.PersonaConfig
827
- | ConfigApplyParams.ImprovFlowConfig
828
- | ConfigApplyParams.ScriptedFlowConfig
829
- | ConfigApplyParams.CollectorConfig
830
- | ConfigApplyParams.MetricConfig
831
- | ConfigApplyParams.SimulationPlanConfig
832
- | ConfigApplyParams.QaSimulationPlanConfig
833
- | ConfigApplyParams.AlertConfig
834
- | ConfigApplyParams.ToolConfig
2740
+ | ConfigDiffParams.AgentConfig
2741
+ | ConfigDiffParams.HTTPRequestDefinitionConfig
2742
+ | ConfigDiffParams.PersonaConfig
2743
+ | ConfigDiffParams.ImprovFlowConfig
2744
+ | ConfigDiffParams.ScriptedFlowConfig
2745
+ | ConfigDiffParams.CollectorConfig
2746
+ | ConfigDiffParams.MetricConfig
2747
+ | ConfigDiffParams.SimulationPlanConfig
2748
+ | ConfigDiffParams.QaSimulationPlanConfig
2749
+ | ConfigDiffParams.AlertConfig
2750
+ | ConfigDiffParams.ToolConfig
2751
+ | ConfigDiffParams.ProjectConfig
835
2752
  >;
836
2753
 
837
2754
  prune?: boolean;
838
2755
  }
839
2756
 
840
- export namespace ConfigApplyParams {
2757
+ export namespace ConfigDiffParams {
841
2758
  export interface AgentConfig {
842
2759
  kind: 'agent';
843
2760
 
@@ -1434,622 +3351,649 @@ export namespace ConfigApplyParams {
1434
3351
 
1435
3352
  parameters?: { [key: string]: 'string' | 'number' | 'boolean' };
1436
3353
  }
1437
- }
1438
-
1439
- export interface ConfigDiffParams {
1440
- resources: Array<
1441
- | ConfigDiffParams.AgentConfig
1442
- | ConfigDiffParams.HTTPRequestDefinitionConfig
1443
- | ConfigDiffParams.PersonaConfig
1444
- | ConfigDiffParams.ImprovFlowConfig
1445
- | ConfigDiffParams.ScriptedFlowConfig
1446
- | ConfigDiffParams.CollectorConfig
1447
- | ConfigDiffParams.MetricConfig
1448
- | ConfigDiffParams.SimulationPlanConfig
1449
- | ConfigDiffParams.QaSimulationPlanConfig
1450
- | ConfigDiffParams.AlertConfig
1451
- | ConfigDiffParams.ToolConfig
1452
- >;
1453
-
1454
- prune?: boolean;
1455
- }
1456
3354
 
1457
- export namespace ConfigDiffParams {
1458
- export interface AgentConfig {
1459
- kind: 'agent';
3355
+ export interface ProjectConfig {
3356
+ kind: 'project';
1460
3357
 
1461
3358
  name: string;
1462
3359
 
1463
- customId?: string | null;
3360
+ category?:
3361
+ | 'HEALTHCARE'
3362
+ | 'FINANCIAL'
3363
+ | 'RETAIL'
3364
+ | 'HOSPITALITY'
3365
+ | 'AUTOMOTIVE'
3366
+ | 'GOVERNMENT'
3367
+ | 'EDUCATION'
3368
+ | 'REAL_ESTATE'
3369
+ | 'OTHER';
1464
3370
 
1465
- description?: string | null;
3371
+ dataStorageRegion?: 'US_EAST_1' | 'EU_WEST_1';
1466
3372
 
1467
- displayName?: string;
3373
+ description?: string;
1468
3374
 
1469
- endpoints?: Array<AgentConfig.Endpoint>;
3375
+ displayName?: string;
1470
3376
 
1471
- prompt?: string | null;
3377
+ members?: Array<ProjectConfig.Member>;
3378
+
3379
+ resources?: Array<
3380
+ | ProjectConfig.AgentConfig
3381
+ | ProjectConfig.HTTPRequestDefinitionConfig
3382
+ | ProjectConfig.PersonaConfig
3383
+ | ProjectConfig.ImprovFlowConfig
3384
+ | ProjectConfig.ScriptedFlowConfig
3385
+ | ProjectConfig.CollectorConfig
3386
+ | ProjectConfig.MetricConfig
3387
+ | ProjectConfig.SimulationPlanConfig
3388
+ | ProjectConfig.QaSimulationPlanConfig
3389
+ | ProjectConfig.AlertConfig
3390
+ | ProjectConfig.ToolConfig
3391
+ >;
1472
3392
  }
1473
3393
 
1474
- export namespace AgentConfig {
1475
- export interface Endpoint {
1476
- value: string;
3394
+ export namespace ProjectConfig {
3395
+ export interface Member {
3396
+ email: string;
1477
3397
 
1478
- direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING';
3398
+ role: 'OWNER' | 'ADMIN' | 'MEMBER' | 'VIEWER';
3399
+ }
1479
3400
 
1480
- environment?: string;
3401
+ export interface AgentConfig {
3402
+ kind: 'agent';
1481
3403
 
1482
- outboundDialHttpRequestDefinition?: string;
3404
+ name: string;
1483
3405
 
1484
- outboundDialType?: 'NONE' | 'HTTP_REQUEST';
3406
+ customId?: string | null;
1485
3407
 
1486
- type?: 'PHONE' | 'WEBSOCKET';
1487
- }
1488
- }
3408
+ description?: string | null;
1489
3409
 
1490
- export interface HTTPRequestDefinitionConfig {
1491
- kind: 'httpRequestDefinition';
3410
+ displayName?: string;
1492
3411
 
1493
- name: string;
3412
+ endpoints?: Array<AgentConfig.Endpoint>;
1494
3413
 
1495
- url: string;
3414
+ prompt?: string | null;
3415
+ }
1496
3416
 
1497
- body?: string;
3417
+ export namespace AgentConfig {
3418
+ export interface Endpoint {
3419
+ value: string;
1498
3420
 
1499
- description?: string | null;
3421
+ direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING';
1500
3422
 
1501
- headers?: { [key: string]: string };
3423
+ environment?: string;
1502
3424
 
1503
- method?: 'POST' | 'PUT' | 'PATCH' | 'GET';
1504
- }
3425
+ outboundDialHttpRequestDefinition?: string;
1505
3426
 
1506
- export interface PersonaConfig {
1507
- accent:
1508
- | 'US'
1509
- | 'US_X_SOUTH'
1510
- | 'GB'
1511
- | 'ES'
1512
- | 'DE'
1513
- | 'IN'
1514
- | 'FR'
1515
- | 'NL'
1516
- | 'SA'
1517
- | 'GR'
1518
- | 'AU'
1519
- | 'IT'
1520
- | 'ID'
1521
- | 'TH'
1522
- | 'JP'
1523
- | 'NZ'
1524
- | 'PH'
1525
- | 'SG'
1526
- | 'MY'
1527
- | 'HK'
1528
- | 'TR'
1529
- | 'PT'
1530
- | 'IL';
3427
+ outboundDialType?: 'NONE' | 'HTTP_REQUEST';
1531
3428
 
1532
- gender: 'MALE' | 'FEMALE';
3429
+ type?: 'PHONE' | 'WEBSOCKET';
3430
+ }
3431
+ }
1533
3432
 
1534
- kind: 'persona';
3433
+ export interface HTTPRequestDefinitionConfig {
3434
+ kind: 'httpRequestDefinition';
1535
3435
 
1536
- language:
1537
- | 'EN'
1538
- | 'ES'
1539
- | 'DE'
1540
- | 'HI'
1541
- | 'FR'
1542
- | 'NL'
1543
- | 'AR'
1544
- | 'EL'
1545
- | 'IT'
1546
- | 'ID'
1547
- | 'TH'
1548
- | 'JA'
1549
- | 'TL'
1550
- | 'MS'
1551
- | 'ZH'
1552
- | 'TR'
1553
- | 'PT'
1554
- | 'HE';
3436
+ name: string;
1555
3437
 
1556
- name: string;
3438
+ url: string;
1557
3439
 
1558
- age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
3440
+ body?: string;
1559
3441
 
1560
- backgroundNoise?:
1561
- | 'NONE'
1562
- | 'AIRPORT'
1563
- | 'CHILDREN_PLAYING'
1564
- | 'CITY'
1565
- | 'COFFEE_SHOP'
1566
- | 'CONSTRUCTION'
1567
- | 'CRYING_BABY'
1568
- | 'DRIVING'
1569
- | 'LIBRARY'
1570
- | 'OFFICE'
1571
- | 'THUNDERSTORM'
1572
- | 'TRAIN';
3442
+ description?: string | null;
1573
3443
 
1574
- backstoryPrompt?: string | null;
3444
+ headers?: { [key: string]: string };
1575
3445
 
1576
- baseEmotion?:
1577
- | 'NEUTRAL'
1578
- | 'CHEERFUL'
1579
- | 'CONFUSED'
1580
- | 'FRUSTRATED'
1581
- | 'SKEPTICAL'
1582
- | 'RUSHED'
1583
- | 'DISTRACTED'
1584
- | 'ANGRY'
1585
- | 'ANXIOUS'
1586
- | 'SAD';
3446
+ method?: 'POST' | 'PUT' | 'PATCH' | 'GET';
3447
+ }
1587
3448
 
1588
- confirmationStyle?: 'EXPLICIT' | 'VAGUE';
3449
+ export interface PersonaConfig {
3450
+ accent:
3451
+ | 'US'
3452
+ | 'US_X_SOUTH'
3453
+ | 'GB'
3454
+ | 'ES'
3455
+ | 'DE'
3456
+ | 'IN'
3457
+ | 'FR'
3458
+ | 'NL'
3459
+ | 'SA'
3460
+ | 'GR'
3461
+ | 'AU'
3462
+ | 'IT'
3463
+ | 'ID'
3464
+ | 'TH'
3465
+ | 'JP'
3466
+ | 'NZ'
3467
+ | 'PH'
3468
+ | 'SG'
3469
+ | 'MY'
3470
+ | 'HK'
3471
+ | 'TR'
3472
+ | 'PT'
3473
+ | 'IL';
3474
+
3475
+ gender: 'MALE' | 'FEMALE';
3476
+
3477
+ kind: 'persona';
3478
+
3479
+ language:
3480
+ | 'EN'
3481
+ | 'ES'
3482
+ | 'DE'
3483
+ | 'HI'
3484
+ | 'FR'
3485
+ | 'NL'
3486
+ | 'AR'
3487
+ | 'EL'
3488
+ | 'IT'
3489
+ | 'ID'
3490
+ | 'TH'
3491
+ | 'JA'
3492
+ | 'TL'
3493
+ | 'MS'
3494
+ | 'ZH'
3495
+ | 'TR'
3496
+ | 'PT'
3497
+ | 'HE';
1589
3498
 
1590
- description?: string | null;
3499
+ name: string;
1591
3500
 
1592
- displayName?: string;
3501
+ age?: 'CHILD' | 'TEENAGER' | 'ADULT' | 'ELDERLY';
1593
3502
 
1594
- hasDisfluencies?: boolean;
3503
+ backgroundNoise?:
3504
+ | 'NONE'
3505
+ | 'AIRPORT'
3506
+ | 'CHILDREN_PLAYING'
3507
+ | 'CITY'
3508
+ | 'COFFEE_SHOP'
3509
+ | 'CONSTRUCTION'
3510
+ | 'CRYING_BABY'
3511
+ | 'DRIVING'
3512
+ | 'LIBRARY'
3513
+ | 'OFFICE'
3514
+ | 'THUNDERSTORM'
3515
+ | 'TRAIN';
1595
3516
 
1596
- idleMessageMaxSpokenCount?: number;
3517
+ backstoryPrompt?: string | null;
1597
3518
 
1598
- idleMessageResetCountOnUserSpeechEnabled?: boolean;
3519
+ baseEmotion?:
3520
+ | 'NEUTRAL'
3521
+ | 'CHEERFUL'
3522
+ | 'CONFUSED'
3523
+ | 'FRUSTRATED'
3524
+ | 'SKEPTICAL'
3525
+ | 'RUSHED'
3526
+ | 'DISTRACTED'
3527
+ | 'ANGRY'
3528
+ | 'ANXIOUS'
3529
+ | 'SAD';
1599
3530
 
1600
- idleMessages?: Array<string> | null;
3531
+ confirmationStyle?: 'EXPLICIT' | 'VAGUE';
1601
3532
 
1602
- idleTimeoutSeconds?: number;
3533
+ description?: string | null;
1603
3534
 
1604
- intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE';
3535
+ displayName?: string;
1605
3536
 
1606
- interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY';
3537
+ hasDisfluencies?: boolean;
1607
3538
 
1608
- memoryReliability?: 'HIGH' | 'LOW';
3539
+ idleMessageMaxSpokenCount?: number;
1609
3540
 
1610
- properties?: { [key: string]: unknown };
3541
+ idleMessageResetCountOnUserSpeechEnabled?: boolean;
1611
3542
 
1612
- responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
3543
+ idleMessages?: Array<string> | null;
1613
3544
 
1614
- secondaryLanguage?: 'EN';
3545
+ idleTimeoutSeconds?: number;
1615
3546
 
1616
- speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING';
3547
+ intentClarity?: 'CLEAR' | 'INDIRECT' | 'VAGUE';
1617
3548
 
1618
- speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
3549
+ interruption?: 'OFF' | 'BACKCHANNEL' | 'OCCASIONAL' | 'HEAVY';
1619
3550
 
1620
- understoodLanguages?: Array<
1621
- | 'EN'
1622
- | 'ES'
1623
- | 'DE'
1624
- | 'HI'
1625
- | 'FR'
1626
- | 'NL'
1627
- | 'AR'
1628
- | 'EL'
1629
- | 'IT'
1630
- | 'ID'
1631
- | 'TH'
1632
- | 'JA'
1633
- | 'TL'
1634
- | 'MS'
1635
- | 'ZH'
1636
- | 'TR'
1637
- | 'PT'
1638
- | 'HE'
1639
- >;
1640
- }
3551
+ memoryReliability?: 'HIGH' | 'LOW';
1641
3552
 
1642
- export interface ImprovFlowConfig {
1643
- agents: Array<string>;
3553
+ properties?: { [key: string]: unknown };
1644
3554
 
1645
- happyPath: ImprovFlowConfig.HappyPath;
3555
+ responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
1646
3556
 
1647
- kind: 'flow';
3557
+ secondaryLanguage?: 'EN';
1648
3558
 
1649
- name: string;
3559
+ speechClarity?: 'CLEAR' | 'VAGUE' | 'RAMBLING';
1650
3560
 
1651
- type: 'improv';
3561
+ speechPace?: 'SUPER_SLOW' | 'SLOW' | 'NORMAL' | 'FAST' | 'SUPER_FAST';
1652
3562
 
1653
- description?: string | null;
3563
+ understoodLanguages?: Array<
3564
+ | 'EN'
3565
+ | 'ES'
3566
+ | 'DE'
3567
+ | 'HI'
3568
+ | 'FR'
3569
+ | 'NL'
3570
+ | 'AR'
3571
+ | 'EL'
3572
+ | 'IT'
3573
+ | 'ID'
3574
+ | 'TH'
3575
+ | 'JA'
3576
+ | 'TL'
3577
+ | 'MS'
3578
+ | 'ZH'
3579
+ | 'TR'
3580
+ | 'PT'
3581
+ | 'HE'
3582
+ >;
3583
+ }
1654
3584
 
1655
- edgeCases?: Array<ImprovFlowConfig.EdgeCase>;
3585
+ export interface ImprovFlowConfig {
3586
+ agents: Array<string>;
1656
3587
 
1657
- expectations?: Array<string>;
3588
+ happyPath: ImprovFlowConfig.HappyPath;
1658
3589
 
1659
- title?: string;
1660
- }
3590
+ kind: 'flow';
1661
3591
 
1662
- export namespace ImprovFlowConfig {
1663
- export interface HappyPath {
1664
- environment: string;
3592
+ name: string;
1665
3593
 
1666
- persona: string;
3594
+ type: 'improv';
1667
3595
 
1668
- expectations?: Array<string>;
3596
+ description?: string | null;
1669
3597
 
1670
- prompt?: string;
3598
+ edgeCases?: Array<ImprovFlowConfig.EdgeCase>;
3599
+
3600
+ expectations?: Array<string>;
1671
3601
 
1672
3602
  title?: string;
1673
3603
  }
1674
3604
 
1675
- export interface EdgeCase {
1676
- name: string;
3605
+ export namespace ImprovFlowConfig {
3606
+ export interface HappyPath {
3607
+ environment: string;
1677
3608
 
1678
- environment?: string;
3609
+ persona: string;
3610
+
3611
+ expectations?: Array<string>;
3612
+
3613
+ prompt?: string;
3614
+
3615
+ title?: string;
3616
+ }
3617
+
3618
+ export interface EdgeCase {
3619
+ name: string;
3620
+
3621
+ environment?: string;
1679
3622
 
1680
- expectations?: Array<string>;
3623
+ expectations?: Array<string>;
1681
3624
 
1682
- persona?: string;
3625
+ persona?: string;
1683
3626
 
1684
- prompt?: string;
3627
+ prompt?: string;
1685
3628
 
1686
- title?: string;
3629
+ title?: string;
3630
+ }
1687
3631
  }
1688
- }
1689
3632
 
1690
- export interface ScriptedFlowConfig {
1691
- graph: Array<ConfigFlowStep>;
3633
+ export interface ScriptedFlowConfig {
3634
+ graph: Array<ConfigFlowStep>;
1692
3635
 
1693
- kind: 'flow';
3636
+ kind: 'flow';
1694
3637
 
1695
- name: string;
3638
+ name: string;
1696
3639
 
1697
- type: 'scripted';
3640
+ type: 'scripted';
1698
3641
 
1699
- adherence?: 'LOOSE' | 'STRICT';
3642
+ adherence?: 'LOOSE' | 'STRICT';
1700
3643
 
1701
- agents?: Array<string>;
3644
+ agents?: Array<string>;
1702
3645
 
1703
- branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE';
3646
+ branchingMode?: 'DETERMINISTIC' | 'ADAPTIVE';
1704
3647
 
1705
- description?: string | null;
3648
+ description?: string | null;
1706
3649
 
1707
- expectations?: Array<string>;
3650
+ expectations?: Array<string>;
1708
3651
 
1709
- offScript?: ScriptedFlowConfig.OffScript;
3652
+ offScript?: ScriptedFlowConfig.OffScript;
1710
3653
 
1711
- title?: string;
1712
- }
3654
+ title?: string;
3655
+ }
1713
3656
 
1714
- export namespace ScriptedFlowConfig {
1715
- export interface OffScript {
1716
- maxAttempts?: number;
3657
+ export namespace ScriptedFlowConfig {
3658
+ export interface OffScript {
3659
+ maxAttempts?: number;
1717
3660
 
1718
- reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY';
3661
+ reaction?: 'STAY_SILENT' | 'REPEAT' | 'RESPOND' | 'SAY';
1719
3662
 
1720
- sayLine?: string;
3663
+ sayLine?: string;
1721
3664
 
1722
- then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE';
3665
+ then?: 'HANG_UP' | 'MOVE_ON' | 'ADAPT' | 'HANG_UP_INVALIDATE';
1723
3666
 
1724
- waitSeconds?: number;
3667
+ waitSeconds?: number;
3668
+ }
1725
3669
  }
1726
- }
1727
3670
 
1728
- export interface CollectorConfig {
1729
- kind: 'collector';
1730
-
1731
- metrics: Array<string>;
3671
+ export interface CollectorConfig {
3672
+ kind: 'collector';
1732
3673
 
1733
- modality: 'call' | 'chat';
3674
+ metrics: Array<string>;
1734
3675
 
1735
- name: string;
3676
+ modality: 'call' | 'chat';
1736
3677
 
1737
- displayName?: string;
3678
+ name: string;
1738
3679
 
1739
- filters?: Array<CollectorConfig.Filter>;
3680
+ displayName?: string;
1740
3681
 
1741
- status?: 'ACTIVE' | 'INACTIVE';
1742
- }
3682
+ filters?: Array<CollectorConfig.Filter>;
1743
3683
 
1744
- export namespace CollectorConfig {
1745
- export interface Filter {
1746
- conditions: Array<Filter.Condition>;
3684
+ status?: 'ACTIVE' | 'INACTIVE';
1747
3685
  }
1748
3686
 
1749
- export namespace Filter {
1750
- export interface Condition {
1751
- key: string;
3687
+ export namespace CollectorConfig {
3688
+ export interface Filter {
3689
+ conditions: Array<Filter.Condition>;
3690
+ }
1752
3691
 
1753
- type: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION';
3692
+ export namespace Filter {
3693
+ export interface Condition {
3694
+ key: string;
1754
3695
 
1755
- operator?:
1756
- | 'EQUALS'
1757
- | 'NOT_EQUALS'
1758
- | 'CONTAINS'
1759
- | 'STARTS_WITH'
1760
- | 'GREATER_THAN'
1761
- | 'LESS_THAN'
1762
- | 'GREATER_THAN_OR_EQUALS'
1763
- | 'LESS_THAN_OR_EQUALS';
3696
+ type: 'AGENT' | 'CALL_SOURCE' | 'CALL_PROPERTY' | 'INTEGRATION';
1764
3697
 
1765
- value?: string;
3698
+ operator?:
3699
+ | 'EQUALS'
3700
+ | 'NOT_EQUALS'
3701
+ | 'CONTAINS'
3702
+ | 'STARTS_WITH'
3703
+ | 'GREATER_THAN'
3704
+ | 'LESS_THAN'
3705
+ | 'GREATER_THAN_OR_EQUALS'
3706
+ | 'LESS_THAN_OR_EQUALS';
3707
+
3708
+ value?: string;
3709
+ }
1766
3710
  }
1767
3711
  }
1768
- }
1769
3712
 
1770
- export interface MetricConfig {
1771
- kind: 'metric';
3713
+ export interface MetricConfig {
3714
+ kind: 'metric';
1772
3715
 
1773
- name: string;
3716
+ name: string;
1774
3717
 
1775
- prompt: string;
3718
+ prompt: string;
1776
3719
 
1777
- type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION';
3720
+ type: 'BOOLEAN' | 'SCALE' | 'NUMERIC' | 'TEXT' | 'CLASSIFICATION';
1778
3721
 
1779
- contexts?: Array<'CALL' | 'SEGMENT' | 'TURN'>;
3722
+ contexts?: Array<'CALL' | 'SEGMENT' | 'TURN'>;
1780
3723
 
1781
- displayName?: string;
3724
+ displayName?: string;
1782
3725
 
1783
- falseLabel?: string;
3726
+ falseLabel?: string;
1784
3727
 
1785
- maxSelections?: number;
3728
+ maxSelections?: number;
1786
3729
 
1787
- options?: Array<MetricConfig.Option>;
3730
+ options?: Array<MetricConfig.Option>;
1788
3731
 
1789
- participantRole?: 'AGENT' | 'CUSTOMER';
3732
+ participantRole?: 'AGENT' | 'CUSTOMER';
1790
3733
 
1791
- scaleLabels?: Array<MetricConfig.ScaleLabel>;
3734
+ scaleLabels?: Array<MetricConfig.ScaleLabel>;
1792
3735
 
1793
- scaleMax?: number;
3736
+ scaleMax?: number;
1794
3737
 
1795
- scaleMin?: number;
3738
+ scaleMin?: number;
1796
3739
 
1797
- scope?: 'GLOBAL' | 'PER_PARTICIPANT';
3740
+ scope?: 'GLOBAL' | 'PER_PARTICIPANT';
1798
3741
 
1799
- trueLabel?: string;
1800
- }
3742
+ trueLabel?: string;
3743
+ }
1801
3744
 
1802
- export namespace MetricConfig {
1803
- export interface Option {
1804
- displayOrder: number;
3745
+ export namespace MetricConfig {
3746
+ export interface Option {
3747
+ displayOrder: number;
1805
3748
 
1806
- label: string;
3749
+ label: string;
1807
3750
 
1808
- description?: string;
1809
- }
3751
+ description?: string;
3752
+ }
1810
3753
 
1811
- export interface ScaleLabel {
1812
- displayOrder: number;
3754
+ export interface ScaleLabel {
3755
+ displayOrder: number;
1813
3756
 
1814
- label: string;
3757
+ label: string;
1815
3758
 
1816
- rangeMax: number;
3759
+ rangeMax: number;
1817
3760
 
1818
- rangeMin: number;
3761
+ rangeMin: number;
1819
3762
 
1820
- colorHex?: string;
3763
+ colorHex?: string;
1821
3764
 
1822
- description?: string;
3765
+ description?: string;
3766
+ }
1823
3767
  }
1824
- }
1825
3768
 
1826
- export interface SimulationPlanConfig {
1827
- agentEndpoints: Array<SimulationPlanConfig.AgentEndpoint>;
3769
+ export interface SimulationPlanConfig {
3770
+ agentEndpoints: Array<SimulationPlanConfig.AgentEndpoint>;
1828
3771
 
1829
- direction: 'INBOUND' | 'OUTBOUND';
3772
+ direction: 'INBOUND' | 'OUTBOUND';
1830
3773
 
1831
- flows: Array<SimulationPlanConfig.Flow>;
3774
+ flows: Array<SimulationPlanConfig.Flow>;
1832
3775
 
1833
- kind: 'simulationPlan';
3776
+ kind: 'simulationPlan';
1834
3777
 
1835
- maxDurationSeconds: number;
3778
+ maxDurationSeconds: number;
1836
3779
 
1837
- metrics: Array<string>;
3780
+ metrics: Array<string>;
1838
3781
 
1839
- name: string;
3782
+ name: string;
1840
3783
 
1841
- description?: string | null;
3784
+ description?: string | null;
1842
3785
 
1843
- endCallPhrases?: Array<string>;
3786
+ endCallPhrases?: Array<string>;
1844
3787
 
1845
- endCallReasons?: Array<string>;
3788
+ endCallReasons?: Array<string>;
1846
3789
 
1847
- enrichWithLiveConversation?: boolean;
3790
+ enrichWithLiveConversation?: boolean;
1848
3791
 
1849
- executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT';
3792
+ executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT';
1850
3793
 
1851
- includeAutomaticMetrics?: boolean;
3794
+ includeAutomaticMetrics?: boolean;
1852
3795
 
1853
- includeFlowMetrics?: boolean;
3796
+ includeFlowMetrics?: boolean;
1854
3797
 
1855
- iterations?: number;
3798
+ iterations?: number;
1856
3799
 
1857
- maxConcurrentJobs?: number;
3800
+ maxConcurrentJobs?: number;
1858
3801
 
1859
- silenceTimeoutSeconds?: number;
3802
+ silenceTimeoutSeconds?: number;
1860
3803
 
1861
- template?: 'manual';
1862
- }
3804
+ template?: 'manual';
3805
+ }
1863
3806
 
1864
- export namespace SimulationPlanConfig {
1865
- export interface AgentEndpoint {
1866
- agent: string;
3807
+ export namespace SimulationPlanConfig {
3808
+ export interface AgentEndpoint {
3809
+ agent: string;
1867
3810
 
1868
- direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING';
3811
+ direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING';
1869
3812
 
1870
- value?: string;
1871
- }
3813
+ value?: string;
3814
+ }
1872
3815
 
1873
- export interface Flow {
1874
- edgeCases?: Array<string>;
3816
+ export interface Flow {
3817
+ edgeCases?: Array<string>;
1875
3818
 
1876
- flow?: string;
3819
+ flow?: string;
1877
3820
 
1878
- happyPath?: boolean;
3821
+ happyPath?: boolean;
1879
3822
 
1880
- personaOverride?: string;
3823
+ personaOverride?: string;
1881
3824
 
1882
- system?: string;
3825
+ system?: string;
3826
+ }
1883
3827
  }
1884
- }
1885
3828
 
1886
- export interface QaSimulationPlanConfig {
1887
- agentEndpoints: Array<QaSimulationPlanConfig.AgentEndpoint>;
3829
+ export interface QaSimulationPlanConfig {
3830
+ agentEndpoints: Array<QaSimulationPlanConfig.AgentEndpoint>;
1888
3831
 
1889
- direction: 'INBOUND' | 'OUTBOUND';
3832
+ direction: 'INBOUND' | 'OUTBOUND';
1890
3833
 
1891
- environment: string;
3834
+ environment: string;
1892
3835
 
1893
- kind: 'simulationPlan';
3836
+ kind: 'simulationPlan';
1894
3837
 
1895
- maxDurationSeconds: number;
3838
+ maxDurationSeconds: number;
1896
3839
 
1897
- name: string;
3840
+ name: string;
1898
3841
 
1899
- persona: string;
3842
+ persona: string;
1900
3843
 
1901
- questions: Array<QaSimulationPlanConfig.Question>;
3844
+ questions: Array<QaSimulationPlanConfig.Question>;
1902
3845
 
1903
- template: 'question-answer-check';
3846
+ template: 'question-answer-check';
1904
3847
 
1905
- description?: string | null;
3848
+ description?: string | null;
1906
3849
 
1907
- endCallPhrases?: Array<string>;
3850
+ endCallPhrases?: Array<string>;
1908
3851
 
1909
- endCallReasons?: Array<string>;
3852
+ endCallReasons?: Array<string>;
1910
3853
 
1911
- enrichWithLiveConversation?: boolean;
3854
+ enrichWithLiveConversation?: boolean;
1912
3855
 
1913
- executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT';
3856
+ executionMode?: 'PARALLEL' | 'SEQUENTIAL_SAME_RUN_PLAN' | 'SEQUENTIAL_PROJECT';
1914
3857
 
1915
- gradeWithKnowledgeBase?: boolean;
3858
+ gradeWithKnowledgeBase?: boolean;
1916
3859
 
1917
- includeAutomaticMetrics?: boolean;
3860
+ includeAutomaticMetrics?: boolean;
1918
3861
 
1919
- includeFlowMetrics?: boolean;
3862
+ includeFlowMetrics?: boolean;
1920
3863
 
1921
- iterations?: number;
3864
+ iterations?: number;
1922
3865
 
1923
- maxConcurrentJobs?: number;
3866
+ maxConcurrentJobs?: number;
1924
3867
 
1925
- metrics?: Array<string>;
3868
+ metrics?: Array<string>;
1926
3869
 
1927
- silenceTimeoutSeconds?: number;
1928
- }
3870
+ silenceTimeoutSeconds?: number;
3871
+ }
1929
3872
 
1930
- export namespace QaSimulationPlanConfig {
1931
- export interface AgentEndpoint {
1932
- agent: string;
3873
+ export namespace QaSimulationPlanConfig {
3874
+ export interface AgentEndpoint {
3875
+ agent: string;
1933
3876
 
1934
- direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING';
3877
+ direction?: 'INCOMING' | 'OUTGOING' | 'INCOMING_AND_OUTGOING';
1935
3878
 
1936
- value?: string;
1937
- }
3879
+ value?: string;
3880
+ }
1938
3881
 
1939
- export interface Question {
1940
- ask: string;
3882
+ export interface Question {
3883
+ ask: string;
1941
3884
 
1942
- expect?: string;
3885
+ expect?: string;
1943
3886
 
1944
- name?: string;
3887
+ name?: string;
3888
+ }
1945
3889
  }
1946
- }
1947
-
1948
- export interface AlertConfig {
1949
- kind: 'alert';
1950
3890
 
1951
- name: string;
3891
+ export interface AlertConfig {
3892
+ kind: 'alert';
1952
3893
 
1953
- trigger:
1954
- | AlertConfig.AlertThresholdTrigger
1955
- | AlertConfig.AlertEventTrigger
1956
- | AlertConfig.AlertSimulationTrigger;
3894
+ name: string;
1957
3895
 
1958
- actions?: AlertConfig.Actions;
3896
+ trigger:
3897
+ | AlertConfig.AlertThresholdTrigger
3898
+ | AlertConfig.AlertEventTrigger
3899
+ | AlertConfig.AlertSimulationTrigger;
1959
3900
 
1960
- displayName?: string;
3901
+ actions?: AlertConfig.Actions;
1961
3902
 
1962
- enabled?: boolean;
1963
- }
3903
+ displayName?: string;
1964
3904
 
1965
- export namespace AlertConfig {
1966
- export interface AlertThresholdTrigger {
1967
- aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN';
3905
+ enabled?: boolean;
3906
+ }
1968
3907
 
1969
- metric: string;
3908
+ export namespace AlertConfig {
3909
+ export interface AlertThresholdTrigger {
3910
+ aggregation: 'COUNT' | 'RATE_PER_MINUTE' | 'MEAN';
1970
3911
 
1971
- operator: 'GT' | 'GTE' | 'LT' | 'LTE';
3912
+ metric: string;
1972
3913
 
1973
- thresholdValue: number;
3914
+ operator: 'GT' | 'GTE' | 'LT' | 'LTE';
1974
3915
 
1975
- type: 'threshold';
3916
+ thresholdValue: number;
1976
3917
 
1977
- windowMinutes: number;
3918
+ type: 'threshold';
1978
3919
 
1979
- consecutiveOpen?: number;
3920
+ windowMinutes: number;
1980
3921
 
1981
- consecutiveResolve?: number;
3922
+ consecutiveOpen?: number;
1982
3923
 
1983
- grouping?: 'NONE' | 'BY_AGENT';
3924
+ consecutiveResolve?: number;
1984
3925
 
1985
- metricVariant?: string;
3926
+ grouping?: 'NONE' | 'BY_AGENT';
1986
3927
 
1987
- minSampleSize?: number;
1988
- }
3928
+ metricVariant?: string;
1989
3929
 
1990
- export interface AlertEventTrigger {
1991
- events: Array<
1992
- | 'CALL_ANALYSIS_COMPLETED'
1993
- | 'CALL_ANALYSIS_FAILED'
1994
- | 'CALL_ANALYSIS_CANCELLED'
1995
- | 'SIMULATION_RUN_PLAN_JOB_STARTED'
1996
- | 'SIMULATION_RUN_PLAN_JOB_COMPLETED'
1997
- | 'SIMULATION_RUN_PLAN_JOB_FAILED'
1998
- | 'SIMULATION_RUN_PLAN_JOB_CANCELLED'
1999
- | 'SIMULATION_JOB_STARTED'
2000
- | 'SIMULATION_JOB_COMPLETED'
2001
- | 'SIMULATION_JOB_FAILED'
2002
- | 'SIMULATION_JOB_CANCELLED'
2003
- | 'METRIC_COLLECTION_JOB_COMPLETED'
2004
- | 'METRIC_COLLECTION_JOB_FAILED'
2005
- | 'CHAT_ANALYSIS_COMPLETED'
2006
- | 'CHAT_ANALYSIS_FAILED'
2007
- | 'ISSUE_OPENED'
2008
- | 'ISSUE_RESOLVED'
2009
- >;
3930
+ minSampleSize?: number;
3931
+ }
2010
3932
 
2011
- type: 'event';
2012
- }
3933
+ export interface AlertEventTrigger {
3934
+ events: Array<
3935
+ | 'CALL_ANALYSIS_COMPLETED'
3936
+ | 'CALL_ANALYSIS_FAILED'
3937
+ | 'CALL_ANALYSIS_CANCELLED'
3938
+ | 'SIMULATION_RUN_PLAN_JOB_STARTED'
3939
+ | 'SIMULATION_RUN_PLAN_JOB_COMPLETED'
3940
+ | 'SIMULATION_RUN_PLAN_JOB_FAILED'
3941
+ | 'SIMULATION_RUN_PLAN_JOB_CANCELLED'
3942
+ | 'SIMULATION_JOB_STARTED'
3943
+ | 'SIMULATION_JOB_COMPLETED'
3944
+ | 'SIMULATION_JOB_FAILED'
3945
+ | 'SIMULATION_JOB_CANCELLED'
3946
+ | 'METRIC_COLLECTION_JOB_COMPLETED'
3947
+ | 'METRIC_COLLECTION_JOB_FAILED'
3948
+ | 'CHAT_ANALYSIS_COMPLETED'
3949
+ | 'CHAT_ANALYSIS_FAILED'
3950
+ | 'ISSUE_OPENED'
3951
+ | 'ISSUE_RESOLVED'
3952
+ >;
3953
+
3954
+ type: 'event';
3955
+ }
2013
3956
 
2014
- export interface AlertSimulationTrigger {
2015
- conditions: Array<'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'>;
3957
+ export interface AlertSimulationTrigger {
3958
+ conditions: Array<'SUCCESS' | 'FAILURE' | 'THRESHOLD_FAILED'>;
2016
3959
 
2017
- type: 'simulation';
3960
+ type: 'simulation';
2018
3961
 
2019
- deliveryFormat?: 'MESSAGE' | 'PDF';
3962
+ deliveryFormat?: 'MESSAGE' | 'PDF';
2020
3963
 
2021
- plan?: string;
2022
- }
3964
+ plan?: string;
3965
+ }
2023
3966
 
2024
- export interface Actions {
2025
- slack?: Array<Actions.Slack>;
3967
+ export interface Actions {
3968
+ slack?: Array<Actions.Slack>;
2026
3969
 
2027
- webhooks?: Array<string>;
2028
- }
3970
+ webhooks?: Array<string>;
3971
+ }
2029
3972
 
2030
- export namespace Actions {
2031
- export interface Slack {
2032
- channelId: string;
3973
+ export namespace Actions {
3974
+ export interface Slack {
3975
+ channelId: string;
2033
3976
 
2034
- channelName: string;
3977
+ channelName: string;
3978
+ }
2035
3979
  }
2036
3980
  }
2037
- }
2038
3981
 
2039
- export interface ToolConfig {
2040
- kind: 'tool';
3982
+ export interface ToolConfig {
3983
+ kind: 'tool';
2041
3984
 
2042
- name: string;
3985
+ name: string;
2043
3986
 
2044
- agent?: string;
3987
+ agent?: string;
2045
3988
 
2046
- description?: string | null;
3989
+ description?: string | null;
2047
3990
 
2048
- expectedResult?: string | null;
3991
+ expectedResult?: string | null;
2049
3992
 
2050
- invocationCriteria?: string | null;
3993
+ invocationCriteria?: string | null;
2051
3994
 
2052
- parameters?: { [key: string]: 'string' | 'number' | 'boolean' };
3995
+ parameters?: { [key: string]: 'string' | 'number' | 'boolean' };
3996
+ }
2053
3997
  }
2054
3998
  }
2055
3999