@cognigy/rest-api-client 4.100.0 → 2025.10.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 (21) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/awsBedrockIAMProviderConnection.js +11 -0
  3. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/index.js +5 -1
  4. package/build/shared/charts/descriptors/message/question/question.js +11 -7
  5. package/build/shared/charts/descriptors/message/say.js +10 -7
  6. package/build/shared/charts/descriptors/voice/mappers/setSessionConfig.mapper.js +7 -4
  7. package/build/shared/interfaces/handover.js +21 -5
  8. package/build/shared/interfaces/messageAPI/handover.js +34 -6
  9. package/build/shared/interfaces/resources/IEndpoint.js +1 -0
  10. package/build/shared/interfaces/resources/IWebrtcWidgetConfig.js +1 -0
  11. package/dist/esm/shared/charts/descriptors/connectionNodes/generativeAIProviders/awsBedrockIAMProviderConnection.js +8 -0
  12. package/dist/esm/shared/charts/descriptors/connectionNodes/generativeAIProviders/index.js +3 -0
  13. package/dist/esm/shared/charts/descriptors/message/question/question.js +11 -7
  14. package/dist/esm/shared/charts/descriptors/message/say.js +10 -7
  15. package/dist/esm/shared/charts/descriptors/voice/mappers/setSessionConfig.mapper.js +7 -4
  16. package/dist/esm/shared/interfaces/handover.js +21 -5
  17. package/dist/esm/shared/interfaces/messageAPI/handover.js +34 -6
  18. package/dist/esm/shared/interfaces/resources/IEndpoint.js +1 -0
  19. package/dist/esm/shared/interfaces/resources/IWebrtcWidgetConfig.js +1 -0
  20. package/package.json +1 -1
  21. package/types/index.d.ts +19 -5
package/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 2025.10.0
2
+ Released: May 13th, 2025
3
+
4
+ Released state of package up to date with Cognigy.AI v2025.10.0
5
+
1
6
  # 4.100.0
2
7
  Released: April 29th, 2025
3
8
 
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AWS_BEDROCK_IAM_PROVIDER_CONNECTION = void 0;
4
+ exports.AWS_BEDROCK_IAM_PROVIDER_CONNECTION = {
5
+ type: "AwsBedrockProviderIamRole",
6
+ label: "UI__NODE_EDITOR__AWS_BEDROCK_PROVIDER_IAM_ROLE_CONNECTION__LABEL",
7
+ fields: [
8
+ { fieldName: "roleArn", label: "UI__CONNECTION_EDITOR__FIELD_ROLE_ARN" },
9
+ ]
10
+ };
11
+ //# sourceMappingURL=awsBedrockIAMProviderConnection.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.cognigyGenerativeAIProviderModule = exports.MISTRAL_PROVIDER_CONNECTION = exports.OPEN_AI_COMPATIBLE_PROVIDER_CONNECTION = exports.AWS_BEDROCK_PROVIDER_CONNECTION = exports.ALEPH_ALPHA_PROVIDER_CONNECTION = exports.GOOGLE_VERTEXAI_PROVIDER_CONNECTION = exports.ANTHROPIC_PROVIDER_CONNECTION = exports.AZURE_OPEN_AI_OAUTH2_PROVIDER_CONNECTION = exports.AZURE_OPEN_AI_V2_PROVIDER_CONNECTION = exports.AZURE_OPEN_AI_PROVIDER_CONNECTION = exports.OPEN_AI_PROVIDER_CONNECTION = void 0;
3
+ exports.cognigyGenerativeAIProviderModule = exports.MISTRAL_PROVIDER_CONNECTION = exports.OPEN_AI_COMPATIBLE_PROVIDER_CONNECTION = exports.AWS_BEDROCK_IAM_PROVIDER_CONNECTION = exports.AWS_BEDROCK_PROVIDER_CONNECTION = exports.ALEPH_ALPHA_PROVIDER_CONNECTION = exports.GOOGLE_VERTEXAI_PROVIDER_CONNECTION = exports.ANTHROPIC_PROVIDER_CONNECTION = exports.AZURE_OPEN_AI_OAUTH2_PROVIDER_CONNECTION = exports.AZURE_OPEN_AI_V2_PROVIDER_CONNECTION = exports.AZURE_OPEN_AI_PROVIDER_CONNECTION = exports.OPEN_AI_PROVIDER_CONNECTION = void 0;
4
4
  /* Custom modules */
5
5
  const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
6
6
  const openAIProviderConnection_1 = require("./openAIProviderConnection");
@@ -11,6 +11,7 @@ const anthropicProviderConnection_1 = require("./anthropicProviderConnection");
11
11
  const googleVertexAIProviderConnection_1 = require("./googleVertexAIProviderConnection");
12
12
  const alephAlphaProviderConnection_1 = require("./alephAlphaProviderConnection");
13
13
  const awsBedrockProviderConnection_1 = require("./awsBedrockProviderConnection");
14
+ const awsBedrockIAMProviderConnection_1 = require("./awsBedrockIAMProviderConnection");
14
15
  const openAICompatibleProviderConnection_1 = require("./openAICompatibleProviderConnection");
15
16
  const mistralProviderConnection_1 = require("./mistralProviderConnection");
16
17
  var openAIProviderConnection_2 = require("./openAIProviderConnection");
@@ -29,6 +30,8 @@ var alephAlphaProviderConnection_2 = require("./alephAlphaProviderConnection");
29
30
  Object.defineProperty(exports, "ALEPH_ALPHA_PROVIDER_CONNECTION", { enumerable: true, get: function () { return alephAlphaProviderConnection_2.ALEPH_ALPHA_PROVIDER_CONNECTION; } });
30
31
  var awsBedrockProviderConnection_2 = require("./awsBedrockProviderConnection");
31
32
  Object.defineProperty(exports, "AWS_BEDROCK_PROVIDER_CONNECTION", { enumerable: true, get: function () { return awsBedrockProviderConnection_2.AWS_BEDROCK_PROVIDER_CONNECTION; } });
33
+ var awsBedrockIAMProviderConnection_2 = require("./awsBedrockIAMProviderConnection");
34
+ Object.defineProperty(exports, "AWS_BEDROCK_IAM_PROVIDER_CONNECTION", { enumerable: true, get: function () { return awsBedrockIAMProviderConnection_2.AWS_BEDROCK_IAM_PROVIDER_CONNECTION; } });
32
35
  var openAICompatibleProviderConnection_2 = require("./openAICompatibleProviderConnection");
33
36
  Object.defineProperty(exports, "OPEN_AI_COMPATIBLE_PROVIDER_CONNECTION", { enumerable: true, get: function () { return openAICompatibleProviderConnection_2.OPEN_AI_COMPATIBLE_PROVIDER_CONNECTION; } });
34
37
  var mistralProviderConnection_2 = require("./mistralProviderConnection");
@@ -44,6 +47,7 @@ exports.cognigyGenerativeAIProviderModule = (0, createNodeDescriptor_1.createExt
44
47
  googleVertexAIProviderConnection_1.GOOGLE_VERTEXAI_PROVIDER_CONNECTION,
45
48
  alephAlphaProviderConnection_1.ALEPH_ALPHA_PROVIDER_CONNECTION,
46
49
  awsBedrockProviderConnection_1.AWS_BEDROCK_PROVIDER_CONNECTION,
50
+ awsBedrockIAMProviderConnection_1.AWS_BEDROCK_IAM_PROVIDER_CONNECTION,
47
51
  openAICompatibleProviderConnection_1.OPEN_AI_COMPATIBLE_PROVIDER_CONNECTION,
48
52
  mistralProviderConnection_1.MISTRAL_PROVIDER_CONNECTION
49
53
  ]
@@ -1983,11 +1983,11 @@ DO NOT talk about other topics. Do not offer general assistance.`,
1983
1983
  }
1984
1984
  // output reconfirmation reprompt
1985
1985
  if (reconfirmationQuestionReprompt) {
1986
- await say_1.SAY.function({ cognigy, childConfigs: [], nodeId, organisationId, config: { handoverOutput, preventTranscript, say: { type: "text", text: [reconfirmationQuestionReprompt] } } });
1986
+ await say_1.SAY.function({ nodeType: "question.reconfirmation.reprompt", cognigy, childConfigs: [], nodeId, organisationId, config: { handoverOutput, preventTranscript, say: { type: "text", text: [reconfirmationQuestionReprompt] } } });
1987
1987
  }
1988
1988
  // output reconfirmationQuestion
1989
1989
  const tentativeAnswerShortform = (activeQuestion === null || activeQuestion === void 0 ? void 0 : activeQuestion.tentativeAnswerShortform) || "";
1990
- await say_1.SAY.function({ cognigy, childConfigs: [], nodeId, organisationId, config: { handoverOutput, preventTranscript, say: { type: "text", text: [reconfirmationQuestion.replace("[ANSWER]", tentativeAnswerShortform)] } } });
1990
+ await say_1.SAY.function({ nodeType: "question.reconfirmation", cognigy, childConfigs: [], nodeId, organisationId, config: { handoverOutput, preventTranscript, say: { type: "text", text: [reconfirmationQuestion.replace("[ANSWER]", tentativeAnswerShortform)] } } });
1991
1991
  // set myself as next node and stop
1992
1992
  api.setNextNode(nodeId);
1993
1993
  api.stopExecution();
@@ -2053,7 +2053,7 @@ DO NOT talk about other topics. Do not offer general assistance.`,
2053
2053
  if (isFirstExecution && !parseResultOnEntry) {
2054
2054
  rephraseWithAIParams.promptType = "question";
2055
2055
  rephraseWithAIParams.questionType = config.type;
2056
- await say_1.SAY.function({ cognigy, childConfigs: [], nodeId, organisationId, config: Object.assign({ preventTranscript, say }, rephraseWithAIParams) });
2056
+ await say_1.SAY.function({ nodeType: "question.initial", cognigy, childConfigs: [], nodeId, organisationId, config: Object.assign({ preventTranscript, say }, rephraseWithAIParams) });
2057
2057
  if (config.type === "date" && !config.datepicker_hidePicker) {
2058
2058
  (0, datepickerUtils_1.showDatePicker)(cognigy, config);
2059
2059
  }
@@ -2091,7 +2091,7 @@ DO NOT talk about other topics. Do not offer general assistance.`,
2091
2091
  // remember a shortform of the given answer in the activeQuestion object
2092
2092
  activeQuestion.tentativeAnswerShortform = (0, generateAnswerShortForm_1.generateAnswerShortForm)(type, result, cognigy.input.text);
2093
2093
  // Output reconfirmationQuestion
2094
- await say_1.SAY.function({ cognigy, childConfigs: [], nodeId, organisationId, config: { handoverOutput, preventTranscript, say: { type: "text", text: [reconfirmationQuestion.replace("[ANSWER]", activeQuestion.tentativeAnswerShortform)] } } });
2094
+ await say_1.SAY.function({ nodeType: "question.reconfirmation", cognigy, childConfigs: [], nodeId, organisationId, config: { handoverOutput, preventTranscript, say: { type: "text", text: [reconfirmationQuestion.replace("[ANSWER]", activeQuestion.tentativeAnswerShortform)] } } });
2095
2095
  // remember that we are in reconfirmation mode and stop
2096
2096
  api.setSystemContext("reconfirmationQuestionInProgress", true);
2097
2097
  // we need to store the input, to be able to restore it afterwards
@@ -2212,6 +2212,7 @@ DO NOT talk about other topics. Do not offer general assistance.`,
2212
2212
  return;
2213
2213
  case "text":
2214
2214
  await say_1.SAY.function({
2215
+ nodeType: "question.escalation",
2215
2216
  cognigy,
2216
2217
  childConfigs: [],
2217
2218
  nodeId,
@@ -2361,6 +2362,7 @@ DO NOT talk about other topics. Do not offer general assistance.`,
2361
2362
  return;
2362
2363
  case "text":
2363
2364
  await say_1.SAY.function({
2365
+ nodeType: "question.escalation",
2364
2366
  cognigy,
2365
2367
  childConfigs: [],
2366
2368
  nodeId,
@@ -2443,7 +2445,7 @@ DO NOT talk about other topics. Do not offer general assistance.`,
2443
2445
  if (sayReprompt) {
2444
2446
  switch (repromptType) {
2445
2447
  case "say":
2446
- await say_1.SAY.function(Object.assign({ cognigy, childConfigs: [], nodeId, organisationId, config: { preventTranscript, say: repromptSay } }, rephraseWithAIParams));
2448
+ await say_1.SAY.function(Object.assign({ nodeType: "question.reprompt", cognigy, childConfigs: [], nodeId, organisationId, config: { preventTranscript, say: repromptSay } }, rephraseWithAIParams));
2447
2449
  break;
2448
2450
  case "execute":
2449
2451
  // if a question reprompt is set to execute flow and we have just executed
@@ -2492,11 +2494,11 @@ DO NOT talk about other topics. Do not offer general assistance.`,
2492
2494
  }
2493
2495
  const repromptMessage = await api.runGenerativeAIPrompt(data, "gptPromptNode");
2494
2496
  if (!repromptLLMStream) {
2495
- await say_1.SAY.function({ cognigy, childConfigs: [], nodeId, organisationId, config: Object.assign({ preventTranscript, handoverOutput, say: { type: "text", text: [repromptMessage] } }, rephraseWithAIParams) });
2497
+ await say_1.SAY.function({ nodeType: "question.reprompt", cognigy, childConfigs: [], nodeId, organisationId, config: Object.assign({ preventTranscript, handoverOutput, say: { type: "text", text: [repromptMessage] } }, rephraseWithAIParams) });
2496
2498
  }
2497
2499
  break;
2498
2500
  default: // this is also "text"
2499
- await say_1.SAY.function({ cognigy, childConfigs: [], nodeId, organisationId, config: Object.assign({ preventTranscript, handoverOutput, say: { type: "text", text: [validationMessage] } }, rephraseWithAIParams) });
2501
+ await say_1.SAY.function({ nodeType: "question.reprompt", cognigy, childConfigs: [], nodeId, organisationId, config: Object.assign({ preventTranscript, handoverOutput, say: { type: "text", text: [validationMessage] } }, rephraseWithAIParams) });
2500
2502
  }
2501
2503
  }
2502
2504
  /* If repeat toggle is on, also output question (and maybe datepicker) again */
@@ -2504,6 +2506,7 @@ DO NOT talk about other topics. Do not offer general assistance.`,
2504
2506
  rephraseWithAIParams.promptType = "question";
2505
2507
  rephraseWithAIParams.questionType = config.type;
2506
2508
  await say_1.SAY.function({
2509
+ nodeType: "question.repeat",
2507
2510
  cognigy,
2508
2511
  childConfigs: [],
2509
2512
  nodeId,
@@ -2520,6 +2523,7 @@ DO NOT talk about other topics. Do not offer general assistance.`,
2520
2523
  rephraseWithAIParams.promptType = "question";
2521
2524
  rephraseWithAIParams.questionType = config.type;
2522
2525
  await say_1.SAY.function({
2526
+ nodeType: "question.initial",
2523
2527
  cognigy,
2524
2528
  childConfigs: [],
2525
2529
  nodeId,
@@ -88,8 +88,8 @@ exports.SAY = (0, createNodeDescriptor_1.createNodeDescriptor)({
88
88
  type: "sayNode",
89
89
  },
90
90
  tags: ["basic", "message"],
91
- function: async ({ cognigy, config, nodeId, organisationId }) => {
92
- var _a, _b, _c, _d, _e, _f;
91
+ function: async ({ cognigy, config, nodeId, organisationId, nodeType }) => {
92
+ var _a, _b, _c, _d, _e, _f, _g;
93
93
  const { api } = cognigy;
94
94
  const { text, loop, linear, type, _data } = config.say;
95
95
  /*Say nodes are always forwardable */
@@ -145,28 +145,31 @@ exports.SAY = (0, createNodeDescriptor_1.createNodeDescriptor)({
145
145
  sayData._cognigy = sayData._cognigy || {};
146
146
  sayData._cognigy._preventTranscript = true;
147
147
  }
148
+ if (((_b = cognigy === null || cognigy === void 0 ? void 0 : cognigy.input) === null || _b === void 0 ? void 0 : _b.channel) === "voiceGateway2") {
149
+ sayData = Object.assign(Object.assign({}, sayData), { nodeType });
150
+ }
148
151
  outputText = await (0, rephraseSentenceWithAi_1.rephraseSentenceWithAI)(outputText, config, api, organisationId);
149
152
  await api.say(outputText, sayData, settings);
150
153
  }
151
154
  else {
152
- const _cognigyDefault = (_b = _data === null || _data === void 0 ? void 0 : _data._cognigy) === null || _b === void 0 ? void 0 : _b._default;
155
+ const _cognigyDefault = (_c = _data === null || _data === void 0 ? void 0 : _data._cognigy) === null || _c === void 0 ? void 0 : _c._default;
153
156
  const typeKey = "_" + type;
154
157
  if (type === "quickReplies" || type === "buttons") {
155
- if (((_c = _cognigyDefault === null || _cognigyDefault === void 0 ? void 0 : _cognigyDefault[typeKey]) === null || _c === void 0 ? void 0 : _c.text) && (_cognigyDefault === null || _cognigyDefault === void 0 ? void 0 : _cognigyDefault[typeKey].fallbackText)) {
158
+ if (((_d = _cognigyDefault === null || _cognigyDefault === void 0 ? void 0 : _cognigyDefault[typeKey]) === null || _d === void 0 ? void 0 : _d.text) && (_cognigyDefault === null || _cognigyDefault === void 0 ? void 0 : _cognigyDefault[typeKey].fallbackText)) {
156
159
  const result = await (0, rephraseSentenceWithAi_1.rephraseMultipleSentencesWithAI)([_cognigyDefault[typeKey].text, _cognigyDefault[typeKey].fallbackText], config, api, organisationId);
157
160
  if (result.length === 2) {
158
161
  _cognigyDefault[typeKey].text = result[0];
159
162
  _cognigyDefault[typeKey].fallbackText = result[1];
160
163
  }
161
164
  }
162
- else if ((_d = _cognigyDefault === null || _cognigyDefault === void 0 ? void 0 : _cognigyDefault[typeKey]) === null || _d === void 0 ? void 0 : _d.text) {
165
+ else if ((_e = _cognigyDefault === null || _cognigyDefault === void 0 ? void 0 : _cognigyDefault[typeKey]) === null || _e === void 0 ? void 0 : _e.text) {
163
166
  _cognigyDefault[typeKey].text = await (0, rephraseSentenceWithAi_1.rephraseSentenceWithAI)(_cognigyDefault[typeKey].text, config, api, organisationId);
164
167
  }
165
- else if ((_e = _cognigyDefault === null || _cognigyDefault === void 0 ? void 0 : _cognigyDefault[typeKey]) === null || _e === void 0 ? void 0 : _e.fallbackText) {
168
+ else if ((_f = _cognigyDefault === null || _cognigyDefault === void 0 ? void 0 : _cognigyDefault[typeKey]) === null || _f === void 0 ? void 0 : _f.fallbackText) {
166
169
  _cognigyDefault[typeKey].fallbackText = await (0, rephraseSentenceWithAi_1.rephraseSentenceWithAI)(_cognigyDefault[typeKey].fallbackText, config, api, organisationId);
167
170
  }
168
171
  }
169
- else if ((_f = _cognigyDefault === null || _cognigyDefault === void 0 ? void 0 : _cognigyDefault[typeKey]) === null || _f === void 0 ? void 0 : _f.fallbackText) {
172
+ else if ((_g = _cognigyDefault === null || _cognigyDefault === void 0 ? void 0 : _cognigyDefault[typeKey]) === null || _g === void 0 ? void 0 : _g.fallbackText) {
170
173
  _cognigyDefault[typeKey].fallbackText = await (0, rephraseSentenceWithAi_1.rephraseSentenceWithAI)(_cognigyDefault[typeKey].fallbackText, config, api, organisationId);
171
174
  }
172
175
  const data = config.say;
@@ -297,7 +297,7 @@ class SessionConfigMapper extends base_mapper_1.BaseMapper {
297
297
  }
298
298
  const mapper = new SessionConfigMapper("voiceGateway2");
299
299
  function voiceConfigParamsToVoiceSettings(config, api) {
300
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
300
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
301
301
  let voiceSettings = {};
302
302
  if (config.sttVendor === 'none') {
303
303
  delete config.sttVendor;
@@ -352,6 +352,7 @@ function voiceConfigParamsToVoiceSettings(config, api) {
352
352
  sttDeepgramModel: (_h = config.sttDeepgramModel) !== null && _h !== void 0 ? _h : "nova-2",
353
353
  deepgramSmartFormatting: (_j = config.deepgramSmartFormatting) !== null && _j !== void 0 ? _j : undefined,
354
354
  deepgramShortUtterance,
355
+ listenDuringPrompt: (_k = config.sttListenDuringPrompt) !== null && _k !== void 0 ? _k : undefined,
355
356
  };
356
357
  // tts (synthesizer)
357
358
  voiceSettings.tts = {
@@ -418,7 +419,7 @@ function voiceConfigParamsToVoiceSettings(config, api) {
418
419
  flowNoInputFail: config.flowNoInputFail
419
420
  };
420
421
  // Check if userNoInputTimeout has a value and userNoInputTimeoutEnable is null or undefined to cover generic nodes
421
- if (((_k = voiceSettings === null || voiceSettings === void 0 ? void 0 : voiceSettings.userNoInput) === null || _k === void 0 ? void 0 : _k.userNoInputTimeout) && (voiceSettings.userNoInput.userNoInputTimeoutEnable === null || voiceSettings.userNoInput.userNoInputTimeoutEnable === undefined)) {
422
+ if (((_l = voiceSettings === null || voiceSettings === void 0 ? void 0 : voiceSettings.userNoInput) === null || _l === void 0 ? void 0 : _l.userNoInputTimeout) && (voiceSettings.userNoInput.userNoInputTimeoutEnable === null || voiceSettings.userNoInput.userNoInputTimeoutEnable === undefined)) {
422
423
  voiceSettings.userNoInput.userNoInputTimeoutEnable = true;
423
424
  }
424
425
  voiceSettings.dtmf = {
@@ -426,7 +427,7 @@ function voiceConfigParamsToVoiceSettings(config, api) {
426
427
  dtmfInterDigitTimeout: config.dtmfInterDigitTimeout,
427
428
  dtmfMaxDigits: config.dtmfMaxDigits,
428
429
  dtmfMinDigits: config.dtmfMinDigits,
429
- dtmfSubmitDigit: (_l = config.dtmfSubmitDigit) === null || _l === void 0 ? void 0 : _l.trim(),
430
+ dtmfSubmitDigit: (_m = config.dtmfSubmitDigit) === null || _m === void 0 ? void 0 : _m.trim(),
430
431
  };
431
432
  if (config === null || config === void 0 ? void 0 : config.dtmfEnable) {
432
433
  if (voiceSettings.dtmf.dtmfSubmitDigit &&
@@ -463,7 +464,7 @@ function voiceConfigParamsToVoiceSettings(config, api) {
463
464
  }
464
465
  // atmosphere sounds
465
466
  if (config.atmosphereAction) {
466
- if ((_m = config.atmosphereUrl) === null || _m === void 0 ? void 0 : _m.length) {
467
+ if ((_o = config.atmosphereUrl) === null || _o === void 0 ? void 0 : _o.length) {
467
468
  if (!(0, helper_1.isValidUrl)(config.atmosphereUrl)) {
468
469
  throw new Error(`Audio file URL is invalid ${config.atmosphereUrl}`);
469
470
  }
@@ -511,6 +512,7 @@ exports.setSessionConfig = {
511
512
  }
512
513
  },
513
514
  handleVGInput(voiceSettings, sessionParams, api) {
515
+ var _a;
514
516
  const { bargeIn, continuousAsr, stt, tts, userNoInput, dtmf, vad, azureConfig, atmosphereNoise, silenceOverlay, flowNoInput } = voiceSettings;
515
517
  try {
516
518
  const recognizer = mapper.buildRecognizer(sessionParams, stt, vad, azureConfig) || undefined;
@@ -529,6 +531,7 @@ exports.setSessionConfig = {
529
531
  flow: mapper.buildFlow(sessionParams, flowNoInput) || undefined,
530
532
  dtmf: mapper.isDtmfEnabled(sessionParams, dtmf),
531
533
  disableTtsCache: mapper.disableTtsCache(sessionParams, tts),
534
+ listenDuringPrompt: (_a = stt === null || stt === void 0 ? void 0 : stt.listenDuringPrompt) !== null && _a !== void 0 ? _a : undefined,
532
535
  };
533
536
  (0, strip_nulls_1.stripNulls)(cognigyConfig);
534
537
  const prePayload = {
@@ -1,4 +1,11 @@
1
1
  "use strict";
2
+ /**
3
+ * IMPORTANT: This file exists in two places:
4
+ * - cognigy/services/service-handover/src/old_shared/interfaces/handover.ts
5
+ * - cognigy/shared/interfaces/handover.ts
6
+ *
7
+ * Please keep both files in sync.
8
+ */
2
9
  Object.defineProperty(exports, "__esModule", { value: true });
3
10
  exports.genesysCloudOMSettingsSchema = exports.genesysCloudSettingsSchema = exports.liveAgentSettingsSchema = exports.salesforceMIAWSettingsSchema = exports.salesforceSettingsSchema = exports.chatwootSettingsSchema = exports.handoverAgentReplySchema = exports.queueUpdateOptionsSchema = exports.eightByEightSettingsSchema = exports.rceSettingsSchema = exports.foreignSessionDataSchema = exports.handoverRequestSettingsSchema = exports.handoverSettingsSchema = exports.copilotType = exports.whisperAssistConfigurations = exports.handoverProviders = exports.internalHandoverProviders = exports.externalHandoverProviders = void 0;
4
11
  exports.externalHandoverProviders = [
@@ -10,6 +17,7 @@ exports.externalHandoverProviders = [
10
17
  "genesysCloud",
11
18
  "genesysCloudOM",
12
19
  "eightByEight",
20
+ "salesforceMIAW"
13
21
  ];
14
22
  exports.internalHandoverProviders = [
15
23
  "cognigy",
@@ -54,7 +62,8 @@ exports.handoverSettingsSchema = {
54
62
  oneOf: [
55
63
  {
56
64
  type: "object",
57
- additionalProperties: false,
65
+ // Temporary due to handover provider changes
66
+ additionalProperties: true,
58
67
  properties: {
59
68
  accountId: { type: "string" },
60
69
  baseUrl: { type: "string" },
@@ -145,6 +154,7 @@ exports.foreignSessionDataSchema = {
145
154
  clientPollTimeout: { type: "number" },
146
155
  accessToken: { type: "string" },
147
156
  lastEventId: { type: "string" },
157
+ apiKey: { type: "string" }
148
158
  }
149
159
  };
150
160
  exports.rceSettingsSchema = {
@@ -226,7 +236,7 @@ exports.eightByEightSettingsSchema = {
226
236
  exports.queueUpdateOptionsSchema = {
227
237
  "title": "queueUpdateOptionsSchema",
228
238
  "type": "object",
229
- "additionalProperties": false,
239
+ "additionalProperties": true,
230
240
  "required": [],
231
241
  "properties": {
232
242
  "getQueuePosition": {
@@ -245,10 +255,16 @@ exports.queueUpdateOptionsSchema = {
245
255
  "type": "boolean"
246
256
  },
247
257
  "maximumQueuePosition": {
248
- "type": ["number", "null"]
258
+ "anyOf": [
259
+ { "type": "number" },
260
+ { "type": "string", "const": "" }
261
+ ]
249
262
  },
250
263
  "maximumEstimatedWaitTime": {
251
- "type": ["number", "null"]
264
+ "anyOf": [
265
+ { "type": "number" },
266
+ { "type": "string", "const": "" }
267
+ ]
252
268
  },
253
269
  "alternativeText": {
254
270
  "type": ["string", "null"]
@@ -380,7 +396,7 @@ exports.salesforceMIAWSettingsSchema = {
380
396
  },
381
397
  forwardUnknownEventsToFlow: {
382
398
  type: "boolean"
383
- }
399
+ },
384
400
  }
385
401
  };
386
402
  exports.liveAgentSettingsSchema = {
@@ -1,4 +1,11 @@
1
1
  "use strict";
2
+ /**
3
+ * IMPORTANT: This file exists in two places:
4
+ * - cognigy/services/service-handover/src/old_shared/interfaces/messageAPI/handover.ts
5
+ * - cognigy/shared/interfaces/messageAPI/handover.ts
6
+ *
7
+ * Please keep both files in sync.
8
+ */
2
9
  Object.defineProperty(exports, "__esModule", { value: true });
3
10
  exports.getQueueUpdateEventsSchema = exports.handleHandoverRpcEventSchema = exports.pollEventSchema = exports.activateHandoverConversationSchema = exports.sendMessageToProviderSchema = exports.getHandoverRequestDataSchema = exports.createHandoverRequestDataSchema = void 0;
4
11
  const handover_1 = require("../handover");
@@ -13,7 +20,7 @@ exports.createHandoverRequestDataSchema = {
13
20
  "flowReferenceId",
14
21
  "URLToken"
15
22
  ],
16
- "additionalProperties": false,
23
+ "additionalProperties": true,
17
24
  "properties": {
18
25
  "projectId": {
19
26
  "type": "string",
@@ -86,10 +93,6 @@ exports.createHandoverRequestDataSchema = {
86
93
  "liveAgentAllowAgentInject": {
87
94
  "type": "boolean"
88
95
  },
89
- // Temporary field for live agent
90
- "allowAgentInject": {
91
- "type": "boolean"
92
- },
93
96
  "sendTranscriptAsFirstMessage": {
94
97
  "type": "boolean"
95
98
  },
@@ -102,6 +105,31 @@ exports.createHandoverRequestDataSchema = {
102
105
  salesforcePrechatEntities: {
103
106
  type: ["object", "array", "number", "string"],
104
107
  },
108
+ salesforceMIAWRoutingAttributes: {
109
+ // @ts-ignore - not working properly with the type
110
+ type: ["object", "array", "number", "string"],
111
+ },
112
+ salesforceMIAWCustomerIdentityToken: {
113
+ type: "string"
114
+ },
115
+ enableHandoverDisconnectMessageLiveAgent: {
116
+ type: "boolean"
117
+ },
118
+ enableHandoverConnectMessageLiveAgent: {
119
+ type: "boolean"
120
+ },
121
+ enableHandoverDisconnectMessageGenesys: {
122
+ type: "boolean"
123
+ },
124
+ enableHandoverConnectMessageGenesys: {
125
+ type: "boolean"
126
+ },
127
+ enableHandoverDisconnectMessageRingCentralEngage: {
128
+ type: "boolean"
129
+ },
130
+ enableHandoverConnectMessageRingCentralEngage: {
131
+ type: "boolean"
132
+ },
105
133
  "notifySessionId": {
106
134
  "type": "string",
107
135
  },
@@ -299,7 +327,7 @@ exports.handleHandoverRpcEventSchema = {
299
327
  exports.getQueueUpdateEventsSchema = {
300
328
  title: "getQueueUpdateEventsSchema",
301
329
  type: "object",
302
- additionalProperties: false,
330
+ additionalProperties: true,
303
331
  required: [
304
332
  "handoverSettings",
305
333
  "foreignSessionData",
@@ -71,6 +71,7 @@ exports.endpointDataSchema = {
71
71
  type: "object",
72
72
  properties: {
73
73
  label: { type: "string" },
74
+ active: { type: "boolean" },
74
75
  },
75
76
  },
76
77
  },
@@ -6,6 +6,7 @@ exports.webrtcWidgetConfigSchema = {
6
6
  type: "object",
7
7
  properties: {
8
8
  label: { type: "string" },
9
+ active: { type: "boolean" },
9
10
  },
10
11
  };
11
12
  //# sourceMappingURL=IWebrtcWidgetConfig.js.map
@@ -0,0 +1,8 @@
1
+ export const AWS_BEDROCK_IAM_PROVIDER_CONNECTION = {
2
+ type: "AwsBedrockProviderIamRole",
3
+ label: "UI__NODE_EDITOR__AWS_BEDROCK_PROVIDER_IAM_ROLE_CONNECTION__LABEL",
4
+ fields: [
5
+ { fieldName: "roleArn", label: "UI__CONNECTION_EDITOR__FIELD_ROLE_ARN" },
6
+ ]
7
+ };
8
+ //# sourceMappingURL=awsBedrockIAMProviderConnection.js.map
@@ -8,6 +8,7 @@ import { ANTHROPIC_PROVIDER_CONNECTION } from "./anthropicProviderConnection";
8
8
  import { GOOGLE_VERTEXAI_PROVIDER_CONNECTION } from "./googleVertexAIProviderConnection";
9
9
  import { ALEPH_ALPHA_PROVIDER_CONNECTION } from "./alephAlphaProviderConnection";
10
10
  import { AWS_BEDROCK_PROVIDER_CONNECTION } from "./awsBedrockProviderConnection";
11
+ import { AWS_BEDROCK_IAM_PROVIDER_CONNECTION } from "./awsBedrockIAMProviderConnection";
11
12
  import { OPEN_AI_COMPATIBLE_PROVIDER_CONNECTION } from "./openAICompatibleProviderConnection";
12
13
  import { MISTRAL_PROVIDER_CONNECTION } from "./mistralProviderConnection";
13
14
  export { OPEN_AI_PROVIDER_CONNECTION } from "./openAIProviderConnection";
@@ -18,6 +19,7 @@ export { ANTHROPIC_PROVIDER_CONNECTION } from "./anthropicProviderConnection";
18
19
  export { GOOGLE_VERTEXAI_PROVIDER_CONNECTION } from "./googleVertexAIProviderConnection";
19
20
  export { ALEPH_ALPHA_PROVIDER_CONNECTION } from "./alephAlphaProviderConnection";
20
21
  export { AWS_BEDROCK_PROVIDER_CONNECTION } from "./awsBedrockProviderConnection";
22
+ export { AWS_BEDROCK_IAM_PROVIDER_CONNECTION } from "./awsBedrockIAMProviderConnection";
21
23
  export { OPEN_AI_COMPATIBLE_PROVIDER_CONNECTION } from "./openAICompatibleProviderConnection";
22
24
  export { MISTRAL_PROVIDER_CONNECTION } from "./mistralProviderConnection";
23
25
  export const cognigyGenerativeAIProviderModule = createExtension({
@@ -31,6 +33,7 @@ export const cognigyGenerativeAIProviderModule = createExtension({
31
33
  GOOGLE_VERTEXAI_PROVIDER_CONNECTION,
32
34
  ALEPH_ALPHA_PROVIDER_CONNECTION,
33
35
  AWS_BEDROCK_PROVIDER_CONNECTION,
36
+ AWS_BEDROCK_IAM_PROVIDER_CONNECTION,
34
37
  OPEN_AI_COMPATIBLE_PROVIDER_CONNECTION,
35
38
  MISTRAL_PROVIDER_CONNECTION
36
39
  ]
@@ -1981,11 +1981,11 @@ DO NOT talk about other topics. Do not offer general assistance.`,
1981
1981
  }
1982
1982
  // output reconfirmation reprompt
1983
1983
  if (reconfirmationQuestionReprompt) {
1984
- yield SAY.function({ cognigy, childConfigs: [], nodeId, organisationId, config: { handoverOutput, preventTranscript, say: { type: "text", text: [reconfirmationQuestionReprompt] } } });
1984
+ yield SAY.function({ nodeType: "question.reconfirmation.reprompt", cognigy, childConfigs: [], nodeId, organisationId, config: { handoverOutput, preventTranscript, say: { type: "text", text: [reconfirmationQuestionReprompt] } } });
1985
1985
  }
1986
1986
  // output reconfirmationQuestion
1987
1987
  const tentativeAnswerShortform = (activeQuestion === null || activeQuestion === void 0 ? void 0 : activeQuestion.tentativeAnswerShortform) || "";
1988
- yield SAY.function({ cognigy, childConfigs: [], nodeId, organisationId, config: { handoverOutput, preventTranscript, say: { type: "text", text: [reconfirmationQuestion.replace("[ANSWER]", tentativeAnswerShortform)] } } });
1988
+ yield SAY.function({ nodeType: "question.reconfirmation", cognigy, childConfigs: [], nodeId, organisationId, config: { handoverOutput, preventTranscript, say: { type: "text", text: [reconfirmationQuestion.replace("[ANSWER]", tentativeAnswerShortform)] } } });
1989
1989
  // set myself as next node and stop
1990
1990
  api.setNextNode(nodeId);
1991
1991
  api.stopExecution();
@@ -2051,7 +2051,7 @@ DO NOT talk about other topics. Do not offer general assistance.`,
2051
2051
  if (isFirstExecution && !parseResultOnEntry) {
2052
2052
  rephraseWithAIParams.promptType = "question";
2053
2053
  rephraseWithAIParams.questionType = config.type;
2054
- yield SAY.function({ cognigy, childConfigs: [], nodeId, organisationId, config: Object.assign({ preventTranscript, say }, rephraseWithAIParams) });
2054
+ yield SAY.function({ nodeType: "question.initial", cognigy, childConfigs: [], nodeId, organisationId, config: Object.assign({ preventTranscript, say }, rephraseWithAIParams) });
2055
2055
  if (config.type === "date" && !config.datepicker_hidePicker) {
2056
2056
  showDatePicker(cognigy, config);
2057
2057
  }
@@ -2089,7 +2089,7 @@ DO NOT talk about other topics. Do not offer general assistance.`,
2089
2089
  // remember a shortform of the given answer in the activeQuestion object
2090
2090
  activeQuestion.tentativeAnswerShortform = generateAnswerShortForm(type, result, cognigy.input.text);
2091
2091
  // Output reconfirmationQuestion
2092
- yield SAY.function({ cognigy, childConfigs: [], nodeId, organisationId, config: { handoverOutput, preventTranscript, say: { type: "text", text: [reconfirmationQuestion.replace("[ANSWER]", activeQuestion.tentativeAnswerShortform)] } } });
2092
+ yield SAY.function({ nodeType: "question.reconfirmation", cognigy, childConfigs: [], nodeId, organisationId, config: { handoverOutput, preventTranscript, say: { type: "text", text: [reconfirmationQuestion.replace("[ANSWER]", activeQuestion.tentativeAnswerShortform)] } } });
2093
2093
  // remember that we are in reconfirmation mode and stop
2094
2094
  api.setSystemContext("reconfirmationQuestionInProgress", true);
2095
2095
  // we need to store the input, to be able to restore it afterwards
@@ -2210,6 +2210,7 @@ DO NOT talk about other topics. Do not offer general assistance.`,
2210
2210
  return;
2211
2211
  case "text":
2212
2212
  yield SAY.function({
2213
+ nodeType: "question.escalation",
2213
2214
  cognigy,
2214
2215
  childConfigs: [],
2215
2216
  nodeId,
@@ -2359,6 +2360,7 @@ DO NOT talk about other topics. Do not offer general assistance.`,
2359
2360
  return;
2360
2361
  case "text":
2361
2362
  yield SAY.function({
2363
+ nodeType: "question.escalation",
2362
2364
  cognigy,
2363
2365
  childConfigs: [],
2364
2366
  nodeId,
@@ -2441,7 +2443,7 @@ DO NOT talk about other topics. Do not offer general assistance.`,
2441
2443
  if (sayReprompt) {
2442
2444
  switch (repromptType) {
2443
2445
  case "say":
2444
- yield SAY.function(Object.assign({ cognigy, childConfigs: [], nodeId, organisationId, config: { preventTranscript, say: repromptSay } }, rephraseWithAIParams));
2446
+ yield SAY.function(Object.assign({ nodeType: "question.reprompt", cognigy, childConfigs: [], nodeId, organisationId, config: { preventTranscript, say: repromptSay } }, rephraseWithAIParams));
2445
2447
  break;
2446
2448
  case "execute":
2447
2449
  // if a question reprompt is set to execute flow and we have just executed
@@ -2490,11 +2492,11 @@ DO NOT talk about other topics. Do not offer general assistance.`,
2490
2492
  }
2491
2493
  const repromptMessage = yield api.runGenerativeAIPrompt(data, "gptPromptNode");
2492
2494
  if (!repromptLLMStream) {
2493
- yield SAY.function({ cognigy, childConfigs: [], nodeId, organisationId, config: Object.assign({ preventTranscript, handoverOutput, say: { type: "text", text: [repromptMessage] } }, rephraseWithAIParams) });
2495
+ yield SAY.function({ nodeType: "question.reprompt", cognigy, childConfigs: [], nodeId, organisationId, config: Object.assign({ preventTranscript, handoverOutput, say: { type: "text", text: [repromptMessage] } }, rephraseWithAIParams) });
2494
2496
  }
2495
2497
  break;
2496
2498
  default: // this is also "text"
2497
- yield SAY.function({ cognigy, childConfigs: [], nodeId, organisationId, config: Object.assign({ preventTranscript, handoverOutput, say: { type: "text", text: [validationMessage] } }, rephraseWithAIParams) });
2499
+ yield SAY.function({ nodeType: "question.reprompt", cognigy, childConfigs: [], nodeId, organisationId, config: Object.assign({ preventTranscript, handoverOutput, say: { type: "text", text: [validationMessage] } }, rephraseWithAIParams) });
2498
2500
  }
2499
2501
  }
2500
2502
  /* If repeat toggle is on, also output question (and maybe datepicker) again */
@@ -2502,6 +2504,7 @@ DO NOT talk about other topics. Do not offer general assistance.`,
2502
2504
  rephraseWithAIParams.promptType = "question";
2503
2505
  rephraseWithAIParams.questionType = config.type;
2504
2506
  yield SAY.function({
2507
+ nodeType: "question.repeat",
2505
2508
  cognigy,
2506
2509
  childConfigs: [],
2507
2510
  nodeId,
@@ -2518,6 +2521,7 @@ DO NOT talk about other topics. Do not offer general assistance.`,
2518
2521
  rephraseWithAIParams.promptType = "question";
2519
2522
  rephraseWithAIParams.questionType = config.type;
2520
2523
  yield SAY.function({
2524
+ nodeType: "question.initial",
2521
2525
  cognigy,
2522
2526
  childConfigs: [],
2523
2527
  nodeId,
@@ -86,8 +86,8 @@ export const SAY = createNodeDescriptor({
86
86
  type: "sayNode",
87
87
  },
88
88
  tags: ["basic", "message"],
89
- function: ({ cognigy, config, nodeId, organisationId }) => __awaiter(void 0, void 0, void 0, function* () {
90
- var _a, _b, _c, _d, _e, _f;
89
+ function: ({ cognigy, config, nodeId, organisationId, nodeType }) => __awaiter(void 0, void 0, void 0, function* () {
90
+ var _a, _b, _c, _d, _e, _f, _g;
91
91
  const { api } = cognigy;
92
92
  const { text, loop, linear, type, _data } = config.say;
93
93
  /*Say nodes are always forwardable */
@@ -143,28 +143,31 @@ export const SAY = createNodeDescriptor({
143
143
  sayData._cognigy = sayData._cognigy || {};
144
144
  sayData._cognigy._preventTranscript = true;
145
145
  }
146
+ if (((_b = cognigy === null || cognigy === void 0 ? void 0 : cognigy.input) === null || _b === void 0 ? void 0 : _b.channel) === "voiceGateway2") {
147
+ sayData = Object.assign(Object.assign({}, sayData), { nodeType });
148
+ }
146
149
  outputText = yield rephraseSentenceWithAI(outputText, config, api, organisationId);
147
150
  yield api.say(outputText, sayData, settings);
148
151
  }
149
152
  else {
150
- const _cognigyDefault = (_b = _data === null || _data === void 0 ? void 0 : _data._cognigy) === null || _b === void 0 ? void 0 : _b._default;
153
+ const _cognigyDefault = (_c = _data === null || _data === void 0 ? void 0 : _data._cognigy) === null || _c === void 0 ? void 0 : _c._default;
151
154
  const typeKey = "_" + type;
152
155
  if (type === "quickReplies" || type === "buttons") {
153
- if (((_c = _cognigyDefault === null || _cognigyDefault === void 0 ? void 0 : _cognigyDefault[typeKey]) === null || _c === void 0 ? void 0 : _c.text) && (_cognigyDefault === null || _cognigyDefault === void 0 ? void 0 : _cognigyDefault[typeKey].fallbackText)) {
156
+ if (((_d = _cognigyDefault === null || _cognigyDefault === void 0 ? void 0 : _cognigyDefault[typeKey]) === null || _d === void 0 ? void 0 : _d.text) && (_cognigyDefault === null || _cognigyDefault === void 0 ? void 0 : _cognigyDefault[typeKey].fallbackText)) {
154
157
  const result = yield rephraseMultipleSentencesWithAI([_cognigyDefault[typeKey].text, _cognigyDefault[typeKey].fallbackText], config, api, organisationId);
155
158
  if (result.length === 2) {
156
159
  _cognigyDefault[typeKey].text = result[0];
157
160
  _cognigyDefault[typeKey].fallbackText = result[1];
158
161
  }
159
162
  }
160
- else if ((_d = _cognigyDefault === null || _cognigyDefault === void 0 ? void 0 : _cognigyDefault[typeKey]) === null || _d === void 0 ? void 0 : _d.text) {
163
+ else if ((_e = _cognigyDefault === null || _cognigyDefault === void 0 ? void 0 : _cognigyDefault[typeKey]) === null || _e === void 0 ? void 0 : _e.text) {
161
164
  _cognigyDefault[typeKey].text = yield rephraseSentenceWithAI(_cognigyDefault[typeKey].text, config, api, organisationId);
162
165
  }
163
- else if ((_e = _cognigyDefault === null || _cognigyDefault === void 0 ? void 0 : _cognigyDefault[typeKey]) === null || _e === void 0 ? void 0 : _e.fallbackText) {
166
+ else if ((_f = _cognigyDefault === null || _cognigyDefault === void 0 ? void 0 : _cognigyDefault[typeKey]) === null || _f === void 0 ? void 0 : _f.fallbackText) {
164
167
  _cognigyDefault[typeKey].fallbackText = yield rephraseSentenceWithAI(_cognigyDefault[typeKey].fallbackText, config, api, organisationId);
165
168
  }
166
169
  }
167
- else if ((_f = _cognigyDefault === null || _cognigyDefault === void 0 ? void 0 : _cognigyDefault[typeKey]) === null || _f === void 0 ? void 0 : _f.fallbackText) {
170
+ else if ((_g = _cognigyDefault === null || _cognigyDefault === void 0 ? void 0 : _cognigyDefault[typeKey]) === null || _g === void 0 ? void 0 : _g.fallbackText) {
168
171
  _cognigyDefault[typeKey].fallbackText = yield rephraseSentenceWithAI(_cognigyDefault[typeKey].fallbackText, config, api, organisationId);
169
172
  }
170
173
  const data = config.say;
@@ -294,7 +294,7 @@ class SessionConfigMapper extends BaseMapper {
294
294
  }
295
295
  const mapper = new SessionConfigMapper("voiceGateway2");
296
296
  export function voiceConfigParamsToVoiceSettings(config, api) {
297
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
297
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
298
298
  let voiceSettings = {};
299
299
  if (config.sttVendor === 'none') {
300
300
  delete config.sttVendor;
@@ -349,6 +349,7 @@ export function voiceConfigParamsToVoiceSettings(config, api) {
349
349
  sttDeepgramModel: (_h = config.sttDeepgramModel) !== null && _h !== void 0 ? _h : "nova-2",
350
350
  deepgramSmartFormatting: (_j = config.deepgramSmartFormatting) !== null && _j !== void 0 ? _j : undefined,
351
351
  deepgramShortUtterance,
352
+ listenDuringPrompt: (_k = config.sttListenDuringPrompt) !== null && _k !== void 0 ? _k : undefined,
352
353
  };
353
354
  // tts (synthesizer)
354
355
  voiceSettings.tts = {
@@ -415,7 +416,7 @@ export function voiceConfigParamsToVoiceSettings(config, api) {
415
416
  flowNoInputFail: config.flowNoInputFail
416
417
  };
417
418
  // Check if userNoInputTimeout has a value and userNoInputTimeoutEnable is null or undefined to cover generic nodes
418
- if (((_k = voiceSettings === null || voiceSettings === void 0 ? void 0 : voiceSettings.userNoInput) === null || _k === void 0 ? void 0 : _k.userNoInputTimeout) && (voiceSettings.userNoInput.userNoInputTimeoutEnable === null || voiceSettings.userNoInput.userNoInputTimeoutEnable === undefined)) {
419
+ if (((_l = voiceSettings === null || voiceSettings === void 0 ? void 0 : voiceSettings.userNoInput) === null || _l === void 0 ? void 0 : _l.userNoInputTimeout) && (voiceSettings.userNoInput.userNoInputTimeoutEnable === null || voiceSettings.userNoInput.userNoInputTimeoutEnable === undefined)) {
419
420
  voiceSettings.userNoInput.userNoInputTimeoutEnable = true;
420
421
  }
421
422
  voiceSettings.dtmf = {
@@ -423,7 +424,7 @@ export function voiceConfigParamsToVoiceSettings(config, api) {
423
424
  dtmfInterDigitTimeout: config.dtmfInterDigitTimeout,
424
425
  dtmfMaxDigits: config.dtmfMaxDigits,
425
426
  dtmfMinDigits: config.dtmfMinDigits,
426
- dtmfSubmitDigit: (_l = config.dtmfSubmitDigit) === null || _l === void 0 ? void 0 : _l.trim(),
427
+ dtmfSubmitDigit: (_m = config.dtmfSubmitDigit) === null || _m === void 0 ? void 0 : _m.trim(),
427
428
  };
428
429
  if (config === null || config === void 0 ? void 0 : config.dtmfEnable) {
429
430
  if (voiceSettings.dtmf.dtmfSubmitDigit &&
@@ -460,7 +461,7 @@ export function voiceConfigParamsToVoiceSettings(config, api) {
460
461
  }
461
462
  // atmosphere sounds
462
463
  if (config.atmosphereAction) {
463
- if ((_m = config.atmosphereUrl) === null || _m === void 0 ? void 0 : _m.length) {
464
+ if ((_o = config.atmosphereUrl) === null || _o === void 0 ? void 0 : _o.length) {
464
465
  if (!isValidUrl(config.atmosphereUrl)) {
465
466
  throw new Error(`Audio file URL is invalid ${config.atmosphereUrl}`);
466
467
  }
@@ -506,6 +507,7 @@ export const setSessionConfig = {
506
507
  }
507
508
  },
508
509
  handleVGInput(voiceSettings, sessionParams, api) {
510
+ var _a;
509
511
  const { bargeIn, continuousAsr, stt, tts, userNoInput, dtmf, vad, azureConfig, atmosphereNoise, silenceOverlay, flowNoInput } = voiceSettings;
510
512
  try {
511
513
  const recognizer = mapper.buildRecognizer(sessionParams, stt, vad, azureConfig) || undefined;
@@ -524,6 +526,7 @@ export const setSessionConfig = {
524
526
  flow: mapper.buildFlow(sessionParams, flowNoInput) || undefined,
525
527
  dtmf: mapper.isDtmfEnabled(sessionParams, dtmf),
526
528
  disableTtsCache: mapper.disableTtsCache(sessionParams, tts),
529
+ listenDuringPrompt: (_a = stt === null || stt === void 0 ? void 0 : stt.listenDuringPrompt) !== null && _a !== void 0 ? _a : undefined,
527
530
  };
528
531
  stripNulls(cognigyConfig);
529
532
  const prePayload = {
@@ -1,3 +1,10 @@
1
+ /**
2
+ * IMPORTANT: This file exists in two places:
3
+ * - cognigy/services/service-handover/src/old_shared/interfaces/handover.ts
4
+ * - cognigy/shared/interfaces/handover.ts
5
+ *
6
+ * Please keep both files in sync.
7
+ */
1
8
  export const externalHandoverProviders = [
2
9
  "rce",
3
10
  "chatwoot",
@@ -7,6 +14,7 @@ export const externalHandoverProviders = [
7
14
  "genesysCloud",
8
15
  "genesysCloudOM",
9
16
  "eightByEight",
17
+ "salesforceMIAW"
10
18
  ];
11
19
  export const internalHandoverProviders = [
12
20
  "cognigy",
@@ -51,7 +59,8 @@ export const handoverSettingsSchema = {
51
59
  oneOf: [
52
60
  {
53
61
  type: "object",
54
- additionalProperties: false,
62
+ // Temporary due to handover provider changes
63
+ additionalProperties: true,
55
64
  properties: {
56
65
  accountId: { type: "string" },
57
66
  baseUrl: { type: "string" },
@@ -142,6 +151,7 @@ export const foreignSessionDataSchema = {
142
151
  clientPollTimeout: { type: "number" },
143
152
  accessToken: { type: "string" },
144
153
  lastEventId: { type: "string" },
154
+ apiKey: { type: "string" }
145
155
  }
146
156
  };
147
157
  export const rceSettingsSchema = {
@@ -223,7 +233,7 @@ export const eightByEightSettingsSchema = {
223
233
  export const queueUpdateOptionsSchema = {
224
234
  "title": "queueUpdateOptionsSchema",
225
235
  "type": "object",
226
- "additionalProperties": false,
236
+ "additionalProperties": true,
227
237
  "required": [],
228
238
  "properties": {
229
239
  "getQueuePosition": {
@@ -242,10 +252,16 @@ export const queueUpdateOptionsSchema = {
242
252
  "type": "boolean"
243
253
  },
244
254
  "maximumQueuePosition": {
245
- "type": ["number", "null"]
255
+ "anyOf": [
256
+ { "type": "number" },
257
+ { "type": "string", "const": "" }
258
+ ]
246
259
  },
247
260
  "maximumEstimatedWaitTime": {
248
- "type": ["number", "null"]
261
+ "anyOf": [
262
+ { "type": "number" },
263
+ { "type": "string", "const": "" }
264
+ ]
249
265
  },
250
266
  "alternativeText": {
251
267
  "type": ["string", "null"]
@@ -377,7 +393,7 @@ export const salesforceMIAWSettingsSchema = {
377
393
  },
378
394
  forwardUnknownEventsToFlow: {
379
395
  type: "boolean"
380
- }
396
+ },
381
397
  }
382
398
  };
383
399
  export const liveAgentSettingsSchema = {
@@ -1,3 +1,10 @@
1
+ /**
2
+ * IMPORTANT: This file exists in two places:
3
+ * - cognigy/services/service-handover/src/old_shared/interfaces/messageAPI/handover.ts
4
+ * - cognigy/shared/interfaces/messageAPI/handover.ts
5
+ *
6
+ * Please keep both files in sync.
7
+ */
1
8
  import { foreignSessionDataSchema, handoverSettingsSchema, queueUpdateOptionsSchema } from "../handover";
2
9
  export const createHandoverRequestDataSchema = {
3
10
  title: "createHandoverRequestDataSchema",
@@ -10,7 +17,7 @@ export const createHandoverRequestDataSchema = {
10
17
  "flowReferenceId",
11
18
  "URLToken"
12
19
  ],
13
- "additionalProperties": false,
20
+ "additionalProperties": true,
14
21
  "properties": {
15
22
  "projectId": {
16
23
  "type": "string",
@@ -83,10 +90,6 @@ export const createHandoverRequestDataSchema = {
83
90
  "liveAgentAllowAgentInject": {
84
91
  "type": "boolean"
85
92
  },
86
- // Temporary field for live agent
87
- "allowAgentInject": {
88
- "type": "boolean"
89
- },
90
93
  "sendTranscriptAsFirstMessage": {
91
94
  "type": "boolean"
92
95
  },
@@ -99,6 +102,31 @@ export const createHandoverRequestDataSchema = {
99
102
  salesforcePrechatEntities: {
100
103
  type: ["object", "array", "number", "string"],
101
104
  },
105
+ salesforceMIAWRoutingAttributes: {
106
+ // @ts-ignore - not working properly with the type
107
+ type: ["object", "array", "number", "string"],
108
+ },
109
+ salesforceMIAWCustomerIdentityToken: {
110
+ type: "string"
111
+ },
112
+ enableHandoverDisconnectMessageLiveAgent: {
113
+ type: "boolean"
114
+ },
115
+ enableHandoverConnectMessageLiveAgent: {
116
+ type: "boolean"
117
+ },
118
+ enableHandoverDisconnectMessageGenesys: {
119
+ type: "boolean"
120
+ },
121
+ enableHandoverConnectMessageGenesys: {
122
+ type: "boolean"
123
+ },
124
+ enableHandoverDisconnectMessageRingCentralEngage: {
125
+ type: "boolean"
126
+ },
127
+ enableHandoverConnectMessageRingCentralEngage: {
128
+ type: "boolean"
129
+ },
102
130
  "notifySessionId": {
103
131
  "type": "string",
104
132
  },
@@ -296,7 +324,7 @@ export const handleHandoverRpcEventSchema = {
296
324
  export const getQueueUpdateEventsSchema = {
297
325
  title: "getQueueUpdateEventsSchema",
298
326
  type: "object",
299
- additionalProperties: false,
327
+ additionalProperties: true,
300
328
  required: [
301
329
  "handoverSettings",
302
330
  "foreignSessionData",
@@ -68,6 +68,7 @@ export const endpointDataSchema = {
68
68
  type: "object",
69
69
  properties: {
70
70
  label: { type: "string" },
71
+ active: { type: "boolean" },
71
72
  },
72
73
  },
73
74
  },
@@ -3,6 +3,7 @@ export const webrtcWidgetConfigSchema = {
3
3
  type: "object",
4
4
  properties: {
5
5
  label: { type: "string" },
6
+ active: { type: "boolean" },
6
7
  },
7
8
  };
8
9
  //# sourceMappingURL=IWebrtcWidgetConfig.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cognigy/rest-api-client",
3
- "version": "4.100.0",
3
+ "version": "2025.10.0",
4
4
  "description": "Cognigy REST-Client",
5
5
  "main": "build/index.js",
6
6
  "module": "dist/esm/index.js",
package/types/index.d.ts CHANGED
@@ -2114,7 +2114,8 @@ declare const handoverProviders: readonly [
2114
2114
  "liveAgent",
2115
2115
  "genesysCloud",
2116
2116
  "genesysCloudOM",
2117
- "eightByEight"
2117
+ "eightByEight",
2118
+ "salesforceMIAW"
2118
2119
  ];
2119
2120
  export declare type THandoverProvider = typeof handoverProviders[number];
2120
2121
  export interface IHandoverSettings {
@@ -2491,6 +2492,7 @@ export interface IEndpoint extends IEntityMeta {
2491
2492
  /** The label of the webrtc widget */
2492
2493
  webrtcWidgetConfig?: {
2493
2494
  label: string;
2495
+ active: boolean;
2494
2496
  };
2495
2497
  }
2496
2498
  export interface IGraphEndpoint {
@@ -2685,6 +2687,12 @@ export interface IVoiceGatewayEndpointSettings extends IEndpointSessionSettings
2685
2687
  failover?: ICallEventFailoverSettings;
2686
2688
  genericSettings?: IVGGenericSettings;
2687
2689
  isFeatureAccmEnabled?: boolean;
2690
+ /**
2691
+ * Control the privacy notice of the Webrtc Widget
2692
+ */
2693
+ privacyNotice: Omit<IWebchat3EndpointPrivacyNoticeSettings, "title"> & {
2694
+ cancelButtonText: string;
2695
+ };
2688
2696
  }
2689
2697
  export declare type AnyEndpointSettings = IFacebookEndpointSettings | IWorkplaceEndpointSettings | ISlackEndpointSettings | IGenericEndpointSettings | IAlexaEndpointSettings | IWebchat2EndpointSettings | IWebchat3EndpointSettings | ILineEndpointSettings | ITwilioEndpointSettings | ITwilioSmsEndpointSettings | IIntercomEndpointSettings | IRealtimeEndpointSettings | ISunshineConversationsEndpointSettings | IAvayaEndpointSettings | IUserlikeEndpointSettings | IBandwidthEndpointSettings | IAudioCodesEndpointSettings | IWhatsAppEndpointSettings | IAmazonLexEndpointSettings | IEightByEightEndpointSettings | IMicrosoftBotFrameworkEndpointSettings | IVoiceGatewayEndpointSettings | IGenesysBotConnectorEndpointSettings | INiceCXOneEndpointSettings | INiceCXOneAAHEndpointSettings | IAgentAssistVoiceEndpointSettings | {};
2690
2698
  export declare type TAvayaVoice = "man" | "woman" | string;
@@ -6801,6 +6809,10 @@ export interface IIndexEndpointsRestData_2_0 extends IRestPagination<IEndpointIn
6801
6809
  }
6802
6810
  export interface IIndexEndpointsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue<IEndpointIndexItem_2_0> {
6803
6811
  }
6812
+ export interface IWebrtcWidgetConfig {
6813
+ label: string;
6814
+ active: boolean;
6815
+ }
6804
6816
  /**
6805
6817
  * @openapi
6806
6818
  *
@@ -7260,9 +7272,7 @@ export interface IEndpoint_2_0 {
7260
7272
  webrtcClient?: boolean;
7261
7273
  sipConnectivityInfo?: ISipConnectivityInfo;
7262
7274
  /** The label of the webrtc widget */
7263
- webrtcWidgetConfig?: {
7264
- label: string;
7265
- };
7275
+ webrtcWidgetConfig?: IWebrtcWidgetConfig;
7266
7276
  }
7267
7277
  export interface ITransformerFunction_2_0 {
7268
7278
  /**
@@ -10304,6 +10314,9 @@ export interface IAwsBedrockProviderFields {
10304
10314
  accessKeyId: string;
10305
10315
  secretAccessKey: string;
10306
10316
  }
10317
+ export interface IAwsBedrockIamProviderFields {
10318
+ roleArn: string;
10319
+ }
10307
10320
  export interface IParams {
10308
10321
  [key: string]: any;
10309
10322
  }
@@ -10336,7 +10349,7 @@ export interface IProviderOauth2Fields extends IAzureOpenAIProviderOauth2Fields
10336
10349
  }
10337
10350
  export interface ISearchLLMCredentials {
10338
10351
  provider: TGenerativeAIProviders;
10339
- connectionFields: IAzureOpenAIProviderFieldsV2 | IProviderOauth2Fields | IAwsBedrockProviderFields | IAlephAlphaProviderFields;
10352
+ connectionFields: IAzureOpenAIProviderFieldsV2 | IProviderOauth2Fields | IAwsBedrockProviderFields | IAwsBedrockIamProviderFields | IAlephAlphaProviderFields;
10340
10353
  providerMetaData: IAzureOpenAIMeta;
10341
10354
  }
10342
10355
  export interface ISearchTagsData {
@@ -16119,6 +16132,7 @@ export interface IVoiceConfigParams {
16119
16132
  sttVadMode: number;
16120
16133
  sttVadVoiceMs: number;
16121
16134
  sttLabel: string;
16135
+ sttListenDuringPrompt: boolean;
16122
16136
  ttsDisableCache: boolean;
16123
16137
  ttsVoice: string;
16124
16138
  ttsLanguage: string;