@cognigy/rest-api-client 0.18.0 → 0.19.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 (136) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/apigroups/AdministrationAPIGroup_2_0.js +3 -1
  3. package/build/apigroups/MetricsAPIGroup_2_0.js +5 -0
  4. package/build/apigroups/ResourcesAPIGroup_2_0.js +9 -6
  5. package/build/shared/charts/descriptors/agentAssist/helpers/determineMetadata.js +15 -0
  6. package/build/shared/charts/descriptors/agentAssist/helpers/knowledgeSearch/answerExtraction.helper.js +1 -1
  7. package/build/shared/charts/descriptors/agentAssist/helpers/knowledgeSearch/followUpDetection.helper.js +2 -2
  8. package/build/shared/charts/descriptors/agentAssist/identityAssist.js +1 -1
  9. package/build/shared/charts/descriptors/agentAssist/knowledgeAssist.js +1 -1
  10. package/build/shared/charts/descriptors/agentAssist/nextActionAssist.js +4 -5
  11. package/build/shared/charts/descriptors/agentAssist/sentimentAssist.js +1 -1
  12. package/build/shared/charts/descriptors/agentAssist/setAdaptiveCardTile.js +2 -0
  13. package/build/shared/charts/descriptors/agentAssist/setAgentAssistGrid.js +2 -1
  14. package/build/shared/charts/descriptors/agentAssist/setHtmlTile.js +5 -3
  15. package/build/shared/charts/descriptors/agentAssist/setIframeTile.js +5 -3
  16. package/build/shared/charts/descriptors/agentAssist/setSecureFormsTile.js +2 -2
  17. package/build/shared/charts/descriptors/agentAssist/transcriptAssist.js +2 -1
  18. package/build/shared/charts/descriptors/analytics/activateProfile.js +1 -0
  19. package/build/shared/charts/descriptors/analytics/blindMode.js +2 -0
  20. package/build/shared/charts/descriptors/analytics/completeGoal.js +1 -0
  21. package/build/shared/charts/descriptors/analytics/deactivateProfile.js +1 -0
  22. package/build/shared/charts/descriptors/analytics/deleteProfile.js +1 -0
  23. package/build/shared/charts/descriptors/analytics/index.js +3 -1
  24. package/build/shared/charts/descriptors/analytics/mergeProfile.js +1 -0
  25. package/build/shared/charts/descriptors/analytics/overwriteAnalytics.js +9 -0
  26. package/build/shared/charts/descriptors/analytics/setRating.js +4 -2
  27. package/build/shared/charts/descriptors/analytics/trackMilestone.js +95 -0
  28. package/build/shared/charts/descriptors/analytics/updateProfile.js +1 -0
  29. package/build/shared/charts/descriptors/apps/initAppSession.js +1 -0
  30. package/build/shared/charts/descriptors/apps/setAdaptiveCardAppState.js +35 -10
  31. package/build/shared/charts/descriptors/apps/setHtmlAppState.js +25 -2
  32. package/build/shared/charts/descriptors/apps/utils/getXAppsOverlaySettings.js +54 -0
  33. package/build/shared/charts/descriptors/connectionNodes/documentParserProviders/azureAIDocumentIntelligenceConnection.js +12 -0
  34. package/build/shared/charts/descriptors/connectionNodes/documentParserProviders/index.js +13 -0
  35. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/awsBedrockProviderConnection.js +12 -0
  36. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/azureOpenAIProviderConnection.js +4 -3
  37. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/azureOpenAIProviderConnectionV2.js +3 -3
  38. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/azureOpenAIProviderOauth2Connection.js +14 -0
  39. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/index.js +16 -8
  40. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/openAIProviderConnection.js +3 -3
  41. package/build/shared/charts/descriptors/data/addToContext.js +7 -0
  42. package/build/shared/charts/descriptors/data/copyDataToContext.js +3 -0
  43. package/build/shared/charts/descriptors/data/copySlotsToContext.js +3 -0
  44. package/build/shared/charts/descriptors/data/debugMessage.js +73 -0
  45. package/build/shared/charts/descriptors/data/index.js +3 -1
  46. package/build/shared/charts/descriptors/data/removeFromContext.js +9 -1
  47. package/build/shared/charts/descriptors/data/resetContext.js +1 -0
  48. package/build/shared/charts/descriptors/index.js +7 -1
  49. package/build/shared/charts/descriptors/knowledgeSearch/searchExtractOutput.js +35 -10
  50. package/build/shared/charts/descriptors/logic/resetState.js +1 -0
  51. package/build/shared/charts/descriptors/logic/setState.js +2 -1
  52. package/build/shared/charts/descriptors/logic/setTranslation.js +3 -1
  53. package/build/shared/charts/descriptors/logic/switchLocale.js +1 -0
  54. package/build/shared/charts/descriptors/logic/think.js +3 -1
  55. package/build/shared/charts/descriptors/logic/thinkV2.js +2 -0
  56. package/build/shared/charts/descriptors/message/question/question.js +50 -5
  57. package/build/shared/charts/descriptors/message/question/utils/validateQuestionAnswer.js +4 -2
  58. package/build/shared/charts/descriptors/nlu/cleanText.js +1 -0
  59. package/build/shared/charts/descriptors/nlu/fuzzySearch.js +23 -1
  60. package/build/shared/charts/descriptors/nlu/generativeSlotFiller/prompt.js +19 -9
  61. package/build/shared/charts/descriptors/service/GPTPrompt.js +59 -24
  62. package/build/shared/charts/descriptors/service/LLMEntityExtract.js +11 -2
  63. package/build/shared/charts/descriptors/service/handoverV2.js +84 -1
  64. package/build/shared/charts/descriptors/service/httpRequest.js +35 -2
  65. package/build/shared/charts/descriptors/voice/mappers/setSessionConfig.mapper.js +96 -17
  66. package/build/shared/charts/descriptors/voice/nodes/bargeIn.js +2 -0
  67. package/build/shared/charts/descriptors/voice/nodes/continuousAsr.js +2 -0
  68. package/build/shared/charts/descriptors/voice/nodes/dtmf.js +2 -0
  69. package/build/shared/charts/descriptors/voice/nodes/muteSpeechInput.js +1 -0
  70. package/build/shared/charts/descriptors/voice/nodes/noUserInput.js +2 -0
  71. package/build/shared/charts/descriptors/voice/nodes/sessionSpeechParameters.js +2 -0
  72. package/build/shared/charts/descriptors/voice/nodes/transfer.js +2 -0
  73. package/build/shared/charts/descriptors/voicegateway2/nodes/dtmf.js +2 -0
  74. package/build/shared/charts/descriptors/voicegateway2/nodes/hangup.js +2 -0
  75. package/build/shared/charts/descriptors/voicegateway2/nodes/muteSpeechInput.js +3 -0
  76. package/build/shared/charts/descriptors/voicegateway2/nodes/play.js +1 -0
  77. package/build/shared/charts/descriptors/voicegateway2/nodes/record.js +1 -0
  78. package/build/shared/charts/descriptors/voicegateway2/nodes/refer.js +1 -0
  79. package/build/shared/charts/descriptors/voicegateway2/nodes/sendMetadata.js +1 -0
  80. package/build/shared/charts/descriptors/voicegateway2/nodes/setSessionConfig.js +298 -8
  81. package/build/shared/charts/descriptors/voicegateway2/nodes/transfer.js +10 -6
  82. package/build/shared/charts/descriptors/voicegateway2/utils/helper.js +2 -2
  83. package/build/shared/charts/helpers/generativeAI/rephraseSentenceWithAi.js +4 -2
  84. package/build/shared/constants.js +10 -1
  85. package/build/shared/handoverClients/interfaces/THandoverEventType.js +1 -0
  86. package/build/shared/helper/logFullConfigToDebugMode.js +30 -0
  87. package/build/shared/helper/nlu/textCleaner.js +3 -1
  88. package/build/shared/interfaces/IOrganisation.js +1 -0
  89. package/build/shared/interfaces/IProfile.js +1 -0
  90. package/build/shared/interfaces/IProfileSchema.js +3 -0
  91. package/build/shared/interfaces/analytics/IAnalyticsSourceData.js +20 -20
  92. package/build/shared/interfaces/{restAPI/resources/journey/v2.0/IJourneyStep_2_0.js → analytics/IMilestoneAnalytics.js} +1 -1
  93. package/build/shared/interfaces/{restAPI/resources/journey/v2.0/IJourneyProgress_2_0.js → appsession/ISetAppStateOptions.js} +1 -1
  94. package/build/shared/interfaces/{restAPI/resources/journey/v2.0/IJourneyIndexItem_2_0.js → appsession/ISetAppStateOverlaySettings.js} +1 -1
  95. package/build/shared/interfaces/appsession/ISetAppStateOverlaySettingsMetaData.js +3 -0
  96. package/build/shared/interfaces/{restAPI/resources/journey/v2.0/IIndexJourneysRest_2_0.js → debugEvents/TDebugEventMessagePayload.js} +1 -1
  97. package/build/shared/interfaces/debugEvents/TDebugEventType.js +2 -0
  98. package/build/shared/interfaces/generativeAI/IGenerativeAIModels.js +33 -69
  99. package/build/shared/interfaces/handover.js +42 -1
  100. package/build/shared/interfaces/license.js +3 -2
  101. package/build/shared/interfaces/license.js.map +1 -1
  102. package/build/shared/interfaces/messageAPI/endpoints.js +2 -0
  103. package/build/shared/interfaces/messageAPI/handover.js +20 -1
  104. package/build/shared/interfaces/resources/IConnection.js +1 -0
  105. package/build/shared/interfaces/resources/IEndpoint.js +1 -2
  106. package/build/shared/interfaces/resources/ILargeLanguageModel.js +25 -4
  107. package/build/shared/interfaces/resources/IMilestone.js +1 -1
  108. package/build/shared/interfaces/resources/INodeDescriptorSet.js +12 -0
  109. package/build/shared/interfaces/resources/knowledgeStore/IKnowledgeSource.js +1 -1
  110. package/build/shared/interfaces/resources/settings/IAgentSettings.js +12 -7
  111. package/build/shared/interfaces/resources/settings/IGenerativeAISettings.js +4 -0
  112. package/build/shared/interfaces/resources/settings/IKnowledgeAISettings.js +18 -0
  113. package/build/shared/interfaces/resources/settings/index.js +4 -1
  114. package/build/shared/interfaces/restAPI/administration/organisations/v2.0/IReadCollectionsToBeDeletedRest_2_0.js +0 -1
  115. package/build/shared/interfaces/restAPI/administration/organisations/v2.0/IReadOrganisationKnowledgeChunksCountRest_2_0.js +3 -0
  116. package/build/shared/interfaces/restAPI/operations/nlu/v2.0/IGenerateNluScoresRest_2_0.js +57 -0
  117. package/build/shared/interfaces/restAPI/{resources/journey/v2.0/IJourney_2_0.js → operations/nlu/v2.0/index.js} +1 -1
  118. package/build/shared/interfaces/restAPI/resources/largeLanguageModel/v2.0/IAvailableModelsForLLMProvider_2_0 .js +18 -0
  119. package/build/shared/interfaces/restAPI/resources/largeLanguageModel/v2.0/IGetAvailableModelsForLLMRest_2_0 .js +3 -0
  120. package/build/shared/interfaces/security/IRole.js +2 -0
  121. package/build/shared/interfaces/security/ISystemCapabilities.js +3 -0
  122. package/build/shared/interfaces/security/index.js +1 -1
  123. package/build/shared/interfaces/trainer/ITrainerRecord.js +2 -2
  124. package/build/shared/interfaces/user.js +1 -1
  125. package/package.json +2 -2
  126. package/types/index.d.ts +1254 -670
  127. package/build/shared/interfaces/journeys/IJourney.js +0 -83
  128. package/build/shared/interfaces/journeys/IJourneyProgress.js +0 -40
  129. package/build/shared/interfaces/journeys/IJourneyTrackEvent.js +0 -35
  130. package/build/shared/interfaces/journeys/index.js +0 -14
  131. package/build/shared/interfaces/restAPI/resources/journey/v2.0/IJourneyTrackEvents_2_0.js +0 -3
  132. package/build/shared/interfaces/restAPI/resources/journey/v2.0/IReadJourneyProgressRest_2_0.js +0 -3
  133. package/build/shared/interfaces/restAPI/resources/journey/v2.0/IReadJourneyRest_2_0.js +0 -3
  134. package/build/shared/interfaces/restAPI/resources/journey/v2.0/ITrackJourneyEventRest_2_0.js +0 -3
  135. package/build/shared/interfaces/restAPI/resources/journey/v2.0/IUpdateSelectedJourneyRest_2_0.js +0 -3
  136. /package/build/shared/interfaces/restAPI/{resources/journey/v2.0 → operations}/index.js +0 -0
@@ -28,9 +28,9 @@ exports.GPT_PROMPT = (0, createNodeDescriptor_1.createNodeDescriptor)({
28
28
  params: {
29
29
  multiline: true,
30
30
  rows: 5,
31
- required: true
31
+ required: false
32
32
  },
33
- defaultValue: ""
33
+ defaultValue: undefined
34
34
  },
35
35
  {
36
36
  key: "chatTranscriptSteps",
@@ -250,7 +250,18 @@ exports.GPT_PROMPT = (0, createNodeDescriptor_1.createNodeDescriptor)({
250
250
  type: "textArray",
251
251
  label: "UI__NODE_EDITOR__SERVICE__GPT_PROMPT__FIELDS__STREAM_STOP_TOKENS__LABEL",
252
252
  description: "UI__NODE_EDITOR__SERVICE__GPT_PROMPT__FIELDS__STREAM_STOP_TOKENS__DESCRIPTION",
253
- defaultValue: [".", "!", "?"],
253
+ defaultValue: [".", "!", "?", "\\n"],
254
+ condition: {
255
+ key: "storeLocation",
256
+ value: "stream",
257
+ }
258
+ },
259
+ {
260
+ key: "streamStopTokenOverrides",
261
+ type: "textArray",
262
+ label: "UI__NODE_EDITOR__SERVICE__GPT_PROMPT__FIELDS__STREAM_STOP_TOKEN_OVERRIDES__LABEL",
263
+ description: "UI__NODE_EDITOR__SERVICE__GPT_PROMPT__FIELDS__STREAM_STOP_TOKEN_OVERRIDES__DESCRIPTION",
264
+ defaultValue: ["\d+\."],
254
265
  condition: {
255
266
  key: "storeLocation",
256
267
  value: "stream",
@@ -473,6 +484,7 @@ exports.GPT_PROMPT = (0, createNodeDescriptor_1.createNodeDescriptor)({
473
484
  "contextKey",
474
485
  "immediateOutput",
475
486
  "streamStopTokens",
487
+ "streamStopTokenOverrides",
476
488
  "streamStoreCopyInInput",
477
489
  "detailedResults"
478
490
  ]
@@ -488,22 +500,22 @@ exports.GPT_PROMPT = (0, createNodeDescriptor_1.createNodeDescriptor)({
488
500
  ]
489
501
  },
490
502
  {
491
- key: "debugging",
492
- label: "UI__NODE_EDITOR__SERVICE__GPT_PROMPT__SECTIONS__DEBUGGING__LABEL",
503
+ key: "customOptions",
504
+ label: "UI__NODE_EDITOR__SERVICE__GPT_PROMPT__SECTIONS__CUSTOM_OPTIONS__LABEL",
493
505
  defaultCollapsed: true,
494
506
  fields: [
495
- "debugDescription",
496
- "debugLogTokenCount",
497
- "debugLogRequestAndCompletion"
507
+ "customModelOptions",
508
+ "customRequestOptions"
498
509
  ]
499
510
  },
500
511
  {
501
- key: "customOptions",
502
- label: "UI__NODE_EDITOR__SERVICE__GPT_PROMPT__SECTIONS__CUSTOM_OPTIONS__LABEL",
512
+ key: "debugging",
513
+ label: "UI__NODE_EDITOR__SECTIONS__DEBUG_SETTINGS__LABEL",
503
514
  defaultCollapsed: true,
504
515
  fields: [
505
- "customModelOptions",
506
- "customRequestOptions"
516
+ "debugDescription",
517
+ "debugLogTokenCount",
518
+ "debugLogRequestAndCompletion"
507
519
  ]
508
520
  }
509
521
  ],
@@ -515,15 +527,15 @@ exports.GPT_PROMPT = (0, createNodeDescriptor_1.createNodeDescriptor)({
515
527
  { type: "section", key: "advanced" },
516
528
  { type: "section", key: "storage" },
517
529
  { type: "section", key: "errorHandling" },
530
+ { type: "section", key: "customOptions" },
518
531
  { type: "section", key: "debugging" },
519
- { type: "section", key: "customOptions" }
520
532
  ],
521
533
  appearance: {},
522
534
  tags: ["service", "llm", "gpt", "generative ai", "openai", "azure", "prompt"],
523
535
  function: async ({ cognigy, config, nodeId }) => {
524
- var _a;
536
+ var _a, _b, _c;
525
537
  const { api, input } = cognigy;
526
- const { temperature, maxTokens, topP, presencePenalty, frequencyPenalty, useStop, stop, storeLocation, contextKey, inputKey, timeout, streamStopTokens, debugLogTokenCount, debugLogRequestAndCompletion, llmProviderReferenceId, useChatMode, chatTranscriptSteps, responseFormat, streamStoreCopyInInput, detailedResults, seed, immediateOutput, customModelOptions, customRequestOptions, errorHandling = "continue", // default behavior for LLM Prompt node was, continue its execution even though an error occurred (deviating it from the SEO node) & do not output an error message on UI explicitly. However, error is always stored in the input or context object. We can use an extra "say" node to output it.
538
+ const { temperature, maxTokens, topP, presencePenalty, frequencyPenalty, useStop, stop, storeLocation, contextKey, inputKey, timeout, streamStopTokens, streamStopTokenOverrides, debugLogTokenCount, debugLogRequestAndCompletion, llmProviderReferenceId, useChatMode, chatTranscriptSteps, responseFormat, streamStoreCopyInInput, detailedResults, seed, immediateOutput, customModelOptions, customRequestOptions, errorHandling = "continue", // default behavior for LLM Prompt node was, continue its execution even though an error occurred (deviating it from the SEO node) & do not output an error message on UI explicitly. However, error is always stored in the input or context object. We can use an extra "say" node to output it.
527
539
  errorHandlingGotoTarget, errorMessage, } = config;
528
540
  let prompt = config.prompt;
529
541
  const { traceId } = input;
@@ -549,13 +561,17 @@ exports.GPT_PROMPT = (0, createNodeDescriptor_1.createNodeDescriptor)({
549
561
  }
550
562
  // handle errors from external services, depending on the settings
551
563
  const handleServiceError = async (error) => {
552
- var _a;
564
+ var _a, _b, _c;
553
565
  const compactError = {
554
566
  name: error === null || error === void 0 ? void 0 : error.name,
555
567
  code: error === null || error === void 0 ? void 0 : error.code,
556
568
  message: (error === null || error === void 0 ? void 0 : error.message) || error
557
569
  };
558
- if ((_a = error === null || error === void 0 ? void 0 : error.originalErrorDetails) === null || _a === void 0 ? void 0 : _a.code) {
570
+ // return the requestId if it exist in the error obj.
571
+ if ((_a = error === null || error === void 0 ? void 0 : error.meta) === null || _a === void 0 ? void 0 : _a.requestId) {
572
+ compactError["requestId"] = (_b = error === null || error === void 0 ? void 0 : error.meta) === null || _b === void 0 ? void 0 : _b.requestId;
573
+ }
574
+ if ((_c = error === null || error === void 0 ? void 0 : error.originalErrorDetails) === null || _c === void 0 ? void 0 : _c.code) {
559
575
  compactError.code = error.originalErrorDetails.code;
560
576
  }
561
577
  const errorResponse = {
@@ -619,6 +635,7 @@ exports.GPT_PROMPT = (0, createNodeDescriptor_1.createNodeDescriptor)({
619
635
  }
620
636
  },
621
637
  streamStopTokens,
638
+ streamStopTokenOverrides,
622
639
  detailedResults,
623
640
  seed: Number(seed) ? Number(seed) : undefined,
624
641
  customModelOptions,
@@ -641,15 +658,24 @@ exports.GPT_PROMPT = (0, createNodeDescriptor_1.createNodeDescriptor)({
641
658
  debugPrompt = JSON.stringify(data["chat"]);
642
659
  }
643
660
  const response = await api.runGenerativeAIPrompt(data, "gptPromptNode");
644
- // if we're in adminconsole, process debugging options
645
- input.channel === "adminconsole" && (0, prompt_1.writeLLMDebugLogs)("LLM Prompt", debugPrompt, response, debugLogTokenCount, debugLogRequestAndCompletion, cognigy);
661
+ const isFollowSessionActive = api.getMetadata().isFollowSessionActive;
646
662
  if (detailedResults) {
647
- // if the api didn't return native usage results, compute them
648
- if (!response.usage) {
663
+ if ((response === null || response === void 0 ? void 0 : response.usage) && response.usage.promptTokens && response.usage.completionTokens) {
664
+ // the api has usage results, but in Azure format - reformat to OpenAI format
665
+ const u = response.usage;
666
+ response.usage = {
667
+ prompt_tokens: u.promptTokens,
668
+ completion_tokens: u.completionTokens,
669
+ total_tokens: u.promptTokens + u.completionTokens,
670
+ calculation_method: "api"
671
+ };
672
+ }
673
+ else if (!response.usage) {
674
+ // if the api didn't return native usage results, compute them
649
675
  const promptContent = (response.messages) ? JSON.stringify(response.messages) : prompt;
650
676
  delete response.messages;
651
677
  const prompt_tokens = await api.countGPTTokens(promptContent);
652
- const completion_tokens = await api.countGPTTokens(response.result);
678
+ const completion_tokens = await api.countGPTTokens((typeof response.result === "object") ? JSON.stringify(response.result) : response.result);
653
679
  response.usage = {
654
680
  prompt_tokens,
655
681
  completion_tokens,
@@ -658,6 +684,8 @@ exports.GPT_PROMPT = (0, createNodeDescriptor_1.createNodeDescriptor)({
658
684
  };
659
685
  }
660
686
  }
687
+ // if we're in adminconsole or following a session, process debugging options
688
+ (input.endpointType === "adminconsole" || isFollowSessionActive) && (0, prompt_1.writeLLMDebugLogs)("LLM Prompt", debugPrompt, response, debugLogTokenCount, debugLogRequestAndCompletion, cognigy);
661
689
  if (storeLocation === "context") {
662
690
  api.addToContext(contextKey, response, "simple");
663
691
  // output result immediately if toggle is set
@@ -678,12 +706,19 @@ exports.GPT_PROMPT = (0, createNodeDescriptor_1.createNodeDescriptor)({
678
706
  }
679
707
  }
680
708
  catch (error) {
681
- const errorDetails = {
709
+ const errorDetailsBase = {
682
710
  name: error === null || error === void 0 ? void 0 : error.name,
683
711
  code: (error === null || error === void 0 ? void 0 : error.code) || (error === null || error === void 0 ? void 0 : error.httpStatusCode),
684
712
  message: (error === null || error === void 0 ? void 0 : error.message) || ((_a = error.originalErrorDetails) === null || _a === void 0 ? void 0 : _a.message),
685
- originalErrorDetails: error === null || error === void 0 ? void 0 : error.originalErrorDetails
686
713
  };
714
+ const errorDetails = Object.assign(Object.assign({}, errorDetailsBase), { originalErrorDetails: error === null || error === void 0 ? void 0 : error.originalErrorDetails });
715
+ // return the requestId if it exist in the error obj.
716
+ if ((_b = error.meta) === null || _b === void 0 ? void 0 : _b.requestId) {
717
+ errorDetails["meta"] = {
718
+ requestId: (_c = error.meta) === null || _c === void 0 ? void 0 : _c.requestId
719
+ };
720
+ }
721
+ api.logDebugError(errorDetailsBase, "UI__DEBUG_MODE__LLM_PROMPT__ERROR");
687
722
  await handleServiceError(errorDetails);
688
723
  return;
689
724
  }
@@ -228,8 +228,7 @@ exports.LLM_ENTITY_EXTRACT = (0, createNodeDescriptor_1.createNodeDescriptor)({
228
228
  }
229
229
  options["chat"] = (0, prompt_1.createLastConversationChatObject)(cognigy.lastConversationEntries, (0, generativeAIPrompts_1.getLLMEntityExtractSystemMessage)(entityName, entityDescription, examples), 3, true);
230
230
  const response = await api.runGenerativeAIPrompt(options, "gptPromptNode");
231
- // if we're in adminconsole, process debugging options
232
- input.channel === "adminconsole" && (0, prompt_1.writeLLMDebugLogs)("LLM Entity Extract", prompt, response, debugLogTokenCount, debugLogRequestAndCompletion, cognigy);
231
+ (0, prompt_1.writeLLMDebugLogs)("LLM Entity Extract", prompt, response, debugLogTokenCount, debugLogRequestAndCompletion, cognigy);
233
232
  // find the entity in the response
234
233
  let result = (_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a[entityName];
235
234
  if (!result) {
@@ -248,10 +247,19 @@ exports.LLM_ENTITY_EXTRACT = (0, createNodeDescriptor_1.createNodeDescriptor)({
248
247
  }
249
248
  if (storeLocation === "context") {
250
249
  api.addToContext(contextKey, result, "simple");
250
+ if (result) {
251
+ api.logDebugMessage(`context.${contextKey} = '${result}'`);
252
+ }
251
253
  }
252
254
  else if (storeLocation === "input") {
253
255
  // @ts-ignore
254
256
  api.addToInput(inputKey, result);
257
+ if (result) {
258
+ api.logDebugMessage(`input.${inputKey} = '${result}'`);
259
+ }
260
+ }
261
+ if (!result) {
262
+ api.logDebugMessage(`UI__DEBUG_MODE__LLM_ENTITY_EXTRACT__MESSAGE`);
255
263
  }
256
264
  }
257
265
  catch (error) {
@@ -260,6 +268,7 @@ exports.LLM_ENTITY_EXTRACT = (0, createNodeDescriptor_1.createNodeDescriptor)({
260
268
  code: error.code,
261
269
  message: error.message || ((_b = error.originalErrorDetails) === null || _b === void 0 ? void 0 : _b.message),
262
270
  };
271
+ api.logDebugError(errorDetails);
263
272
  if (storeLocation === "context") {
264
273
  api.addToContext(contextKey, { error: errorDetails }, "simple");
265
274
  }
@@ -235,6 +235,77 @@ exports.HANDOVER_V2 = (0, createNodeDescriptor_1.createNodeDescriptor)({
235
235
  label: "UI__NODE_EDITOR__SERVICE__HANDOVER_TO_AGENT__FIELDS__SEND_ON_ACTIVE_EVENT__LABEL",
236
236
  description: "UI__NODE_EDITOR__SERVICE__HANDOVER_TO_AGENT__FIELDS__SEND_ON_ACTIVE_EVENT__DESCRIPTION",
237
237
  },
238
+ {
239
+ key: "getQueuePosition",
240
+ type: "toggle",
241
+ label: "UI__NODE_EDITOR__SERVICE__HANDOVER_TO_AGENT__FIELDS__LIVE_AGENT_GET_QUEUE_POSITION__LABEL",
242
+ description: "UI__NODE_EDITOR__SERVICE__HANDOVER_TO_AGENT__FIELDS__LIVE_AGENT_GET_QUEUE_POSITION__DESCRIPTION",
243
+ defaultValue: false,
244
+ },
245
+ {
246
+ key: "updateIntervalQueuePosition",
247
+ type: "number",
248
+ label: "UI__NODE_EDITOR__SERVICE__HANDOVER_TO_AGENT__FIELDS__LIVE_AGENT_UPDATE_INTERVAL__LABEL",
249
+ description: "UI__NODE_EDITOR__SERVICE__HANDOVER_TO_AGENT__FIELDS__LIVE_AGENT_UPDATE_INTERVAL__DESCRIPTION",
250
+ condition: {
251
+ key: "getQueuePosition",
252
+ value: true
253
+ },
254
+ },
255
+ {
256
+ key: "getEstimatedWaitTime",
257
+ type: "toggle",
258
+ label: "UI__NODE_EDITOR__SERVICE__HANDOVER_TO_AGENT__FIELDS__LIVE_AGENT_GET_ESTIMATED_WAIT_TIME__LABEL",
259
+ description: "UI__NODE_EDITOR__SERVICE__HANDOVER_TO_AGENT__FIELDS__LIVE_AGENT_GET_ESTIMATED_WAIT_TIME__DESCRIPTION",
260
+ defaultValue: false,
261
+ },
262
+ {
263
+ key: "updateIntervalEstimatedWaitTime",
264
+ type: "number",
265
+ label: "UI__NODE_EDITOR__SERVICE__HANDOVER_TO_AGENT__FIELDS__LIVE_AGENT_UPDATE_INTERVAL__LABEL",
266
+ description: "UI__NODE_EDITOR__SERVICE__HANDOVER_TO_AGENT__FIELDS__LIVE_AGENT_UPDATE_INTERVAL__DESCRIPTION",
267
+ condition: {
268
+ key: "getEstimatedWaitTime",
269
+ value: true
270
+ },
271
+ },
272
+ {
273
+ key: "alternativeUpdate",
274
+ type: "toggle",
275
+ label: "UI__NODE_EDITOR__SERVICE__HANDOVER_TO_AGENT__FIELDS__LIVE_AGENT_ALTERNATIVE_UPDATE__LABEL",
276
+ description: "UI__NODE_EDITOR__SERVICE__HANDOVER_TO_AGENT__FIELDS__LIVE_AGENT_ALTERNATIVE_UPDATE__DESCRIPTION",
277
+ defaultValue: false,
278
+ },
279
+ {
280
+ key: "maximumQueuePosition",
281
+ type: "number",
282
+ label: "UI__NODE_EDITOR__SERVICE__HANDOVER_TO_AGENT__FIELDS__LIVE_AGENT_MAXIMUM_QUEUE_POSITION__LABEL",
283
+ description: "UI__NODE_EDITOR__SERVICE__HANDOVER_TO_AGENT__FIELDS__LIVE_AGENT_MAXIMUM_QUEUE_POSITION__DESCRIPTION",
284
+ condition: {
285
+ key: "alternativeUpdate",
286
+ value: true,
287
+ },
288
+ },
289
+ {
290
+ key: "maximumEstimatedWaitTime",
291
+ type: "number",
292
+ label: "UI__NODE_EDITOR__SERVICE__HANDOVER_TO_AGENT__FIELDS__LIVE_AGENT_MAXIMUM_ESTIMATED_WAIT_TIME__LABEL",
293
+ description: "UI__NODE_EDITOR__SERVICE__HANDOVER_TO_AGENT__FIELDS__LIVE_AGENT_MAXIMUM_ESTIMATED_WAIT_TIME__DESCRIPTION",
294
+ condition: {
295
+ key: "alternativeUpdate",
296
+ value: true,
297
+ },
298
+ },
299
+ {
300
+ key: "alternativeText",
301
+ type: "cognigyText",
302
+ label: "UI__NODE_EDITOR__SERVICE__HANDOVER_TO_AGENT__FIELDS__LIVE_AGENT_ALTERNATIVE_TEXT__LABEL",
303
+ description: "UI__NODE_EDITOR__SERVICE__HANDOVER_TO_AGENT__FIELDS__LIVE_AGENT_ALTERNATIVE_TEXT__DESCRIPTION",
304
+ condition: {
305
+ key: "alternativeUpdate",
306
+ value: true,
307
+ },
308
+ },
238
309
  ],
239
310
  sections: [
240
311
  {
@@ -266,7 +337,19 @@ exports.HANDOVER_V2 = (0, createNodeDescriptor_1.createNodeDescriptor)({
266
337
  constants_1.COGNIGY_LIVE_AGENT_DESCRIPTOR_FIELDS.LIVE_AGENT_PRIORITY,
267
338
  constants_1.COGNIGY_LIVE_AGENT_DESCRIPTOR_FIELDS.AGENT_ASSIST_INIT_MESSAGE,
268
339
  constants_1.COGNIGY_LIVE_AGENT_DESCRIPTOR_FIELDS.ALLOW_AGENT_INJECT,
269
- ]
340
+ ...(process.env.FEATURE_USE_QUEUE_UPDATE_EVENTS === "true"
341
+ ? [
342
+ constants_1.COGNIGY_LIVE_AGENT_DESCRIPTOR_FIELDS.GET_QUEUE_POSITION,
343
+ constants_1.COGNIGY_LIVE_AGENT_DESCRIPTOR_FIELDS.UPDATE_INTERVAL_QUEUE_POSITION,
344
+ constants_1.COGNIGY_LIVE_AGENT_DESCRIPTOR_FIELDS.GET_ESTIMATED_WAIT_TIME,
345
+ constants_1.COGNIGY_LIVE_AGENT_DESCRIPTOR_FIELDS.UPDATE_INTERVAL_ESTIMATED_WAIT_TIME,
346
+ constants_1.COGNIGY_LIVE_AGENT_DESCRIPTOR_FIELDS.ALTERNATIVE_UPDATE,
347
+ constants_1.COGNIGY_LIVE_AGENT_DESCRIPTOR_FIELDS.MAXIMUM_QUEUE_POSITION,
348
+ constants_1.COGNIGY_LIVE_AGENT_DESCRIPTOR_FIELDS.MAXIMUM_ESTIMATED_WAIT_TIME,
349
+ constants_1.COGNIGY_LIVE_AGENT_DESCRIPTOR_FIELDS.ALTERNATIVE_TEXT,
350
+ ]
351
+ : [])
352
+ ],
270
353
  },
271
354
  {
272
355
  key: "chatwootSettings",
@@ -234,6 +234,10 @@ exports.HTTP_REQUEST = (0, createNodeDescriptor_1.createNodeDescriptor)({
234
234
  value: "apiKeyXKey"
235
235
  }
236
236
  ]
237
+ },
238
+ resetOption: {
239
+ lookupValue: "none",
240
+ fieldsToReset: ["basicConnection", "apiKeyAuthKeyConnection", "apiKeyXKeyConnection", "oAuth2Connection"]
237
241
  }
238
242
  },
239
243
  {
@@ -376,6 +380,34 @@ exports.HTTP_REQUEST = (0, createNodeDescriptor_1.createNodeDescriptor)({
376
380
  ]
377
381
  }
378
382
  },
383
+ {
384
+ key: "debugLogging",
385
+ type: "select",
386
+ label: "UI__NODE_EDITOR__SERVICE__HTTP_REQUEST__FIELDS__DEBUG_LOGGING__LABEL",
387
+ description: "UI__NODE_EDITOR__SERVICE__HTTP_REQUEST__FIELDS__DEBUG_LOGGING__DESCRIPTION",
388
+ defaultValue: "none",
389
+ params: {
390
+ required: true,
391
+ options: [
392
+ {
393
+ label: "UI__NODE_EDITOR__SERVICE__HTTP_REQUEST__FIELDS__DEBUG_LOGGING__OPTIONS__NONE__LABEL",
394
+ value: "none"
395
+ },
396
+ {
397
+ label: "UI__NODE_EDITOR__SERVICE__HTTP_REQUEST__FIELDS__DEBUG_LOGGING__OPTIONS__REQUEST__LABEL",
398
+ value: "request"
399
+ },
400
+ {
401
+ label: "UI__NODE_EDITOR__SERVICE__HTTP_REQUEST__FIELDS__DEBUG_LOGGING__OPTIONS__RESPONSE__LABEL",
402
+ value: "response"
403
+ },
404
+ {
405
+ label: "UI__NODE_EDITOR__SERVICE__HTTP_REQUEST__FIELDS__DEBUG_LOGGING__OPTIONS__FULL__LABEL",
406
+ value: "full"
407
+ }
408
+ ]
409
+ }
410
+ },
379
411
  {
380
412
  key: "abortOnError",
381
413
  type: "toggle",
@@ -394,7 +426,7 @@ exports.HTTP_REQUEST = (0, createNodeDescriptor_1.createNodeDescriptor)({
394
426
  key: "errorLogging",
395
427
  value: "full"
396
428
  }
397
- },
429
+ }
398
430
  ],
399
431
  sections: [
400
432
  {
@@ -470,7 +502,8 @@ exports.HTTP_REQUEST = (0, createNodeDescriptor_1.createNodeDescriptor)({
470
502
  fields: [
471
503
  "errorLogging",
472
504
  "logWarning",
473
- "abortOnError"
505
+ "abortOnError",
506
+ "debugLogging"
474
507
  ]
475
508
  }
476
509
  ],
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.setSessionConfig = exports.vg2PayloadToActivityParams = exports.voiceConfigParamsToVoiceSettings = void 0;
4
+ /* Node modules */
5
+ const path_1 = require("path");
4
6
  const strip_nulls_1 = require("../../voicegateway2/utils/strip-nulls");
5
7
  const helper_1 = require("../utils/helper");
6
8
  function voiceConfigParamsToVoiceSettings(config, api) {
7
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
9
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
8
10
  let voiceSettings = {};
9
11
  if (config.sttVendor === 'none') {
10
12
  delete config.sttVendor;
@@ -102,13 +104,26 @@ function voiceConfigParamsToVoiceSettings(config, api) {
102
104
  userNoInputRetries: config.userNoInputRetries,
103
105
  userNoInputSpeech: config.userNoInputSpeech,
104
106
  userNoInputUrl: config.userNoInputUrl,
107
+ userNoInputTimeoutEnable: config.userNoInputTimeoutEnable
105
108
  };
109
+ voiceSettings.flowNoInput = {
110
+ flowNoInputMode: config.flowNoInputMode,
111
+ flowNoInputTimeout: config.flowNoInputTimeout,
112
+ flowNoInputRetries: config.flowNoInputRetries,
113
+ flowNoInputSpeech: config.flowNoInputSpeech,
114
+ flowNoInputUrl: config.flowNoInputUrl,
115
+ flowNoInputTimeoutEnable: config.flowNoInputTimeoutEnable
116
+ };
117
+ // Check if userNoInputTimeout has a value and userNoInputTimeoutEnable is null or undefined to cover generic nodes
118
+ if (((_j = voiceSettings === null || voiceSettings === void 0 ? void 0 : voiceSettings.userNoInput) === null || _j === void 0 ? void 0 : _j.userNoInputTimeout) && (voiceSettings.userNoInput.userNoInputTimeoutEnable === null || voiceSettings.userNoInput.userNoInputTimeoutEnable === undefined)) {
119
+ voiceSettings.userNoInput.userNoInputTimeoutEnable = true;
120
+ }
106
121
  voiceSettings.dtmf = {
107
122
  dtmfEnable: config.dtmfEnable,
108
123
  dtmfInterDigitTimeout: config.dtmfInterDigitTimeout,
109
124
  dtmfMaxDigits: config.dtmfMaxDigits,
110
125
  dtmfMinDigits: config.dtmfMinDigits,
111
- dtmfSubmitDigit: (_j = config.dtmfSubmitDigit) === null || _j === void 0 ? void 0 : _j.trim(),
126
+ dtmfSubmitDigit: (_k = config.dtmfSubmitDigit) === null || _k === void 0 ? void 0 : _k.trim(),
112
127
  };
113
128
  if (config === null || config === void 0 ? void 0 : config.dtmfEnable) {
114
129
  if (voiceSettings.dtmf.dtmfSubmitDigit &&
@@ -152,6 +167,32 @@ function voiceConfigParamsToVoiceSettings(config, api) {
152
167
  azureEnableAudioLogging: config.azureEnableAudioLogging || undefined
153
168
  };
154
169
  }
170
+ // atmosphere sounds
171
+ if (config.atmosphereAction) {
172
+ if ((_l = config.atmosphereUrl) === null || _l === void 0 ? void 0 : _l.length) {
173
+ if (!(0, helper_1.isValidUrl)(config.atmosphereUrl)) {
174
+ throw new Error(`Audio file URL is invalid ${config.atmosphereUrl}`);
175
+ }
176
+ const extension = (0, path_1.extname)(config.atmosphereUrl);
177
+ if ([".mp3"].indexOf(extension) === -1) {
178
+ throw new Error(`Audio file must be from type .mp3 Extension was: ${extension}`);
179
+ }
180
+ }
181
+ voiceSettings.atmosphereNoise = {
182
+ action: config.atmosphereAction,
183
+ url: config.atmosphereUrl || undefined,
184
+ volume: config.atmosphereVolume || undefined,
185
+ loop: config.atmosphereLoop || undefined
186
+ };
187
+ }
188
+ // silence overlay
189
+ if (typeof config.silenceOverlayAction === "boolean") {
190
+ voiceSettings.silenceOverlay = {
191
+ enable: config.silenceOverlayAction,
192
+ url: config.silenceOverlayURL || undefined,
193
+ startDelaySecs: config.silenceOverlayDelay || undefined
194
+ };
195
+ }
155
196
  return (0, strip_nulls_1.stripNulls)(voiceSettings);
156
197
  }
157
198
  exports.voiceConfigParamsToVoiceSettings = voiceConfigParamsToVoiceSettings;
@@ -181,8 +222,9 @@ exports.setSessionConfig = {
181
222
  },
182
223
  handleVGInput(voiceSettings, sessionParams, api) {
183
224
  var _a, _b;
184
- const { bargeIn, continuousAsr, stt, tts, userNoInput, dtmf, vad, azureConfig, } = voiceSettings;
225
+ const { bargeIn, continuousAsr, stt, tts, userNoInput, dtmf, vad, azureConfig, atmosphereNoise, silenceOverlay, flowNoInput } = voiceSettings;
185
226
  const user = {};
227
+ const flow = {};
186
228
  const synthesizer = {};
187
229
  const recognizer = {};
188
230
  //verify if there are STT Configs to set
@@ -235,22 +277,52 @@ exports.setSessionConfig = {
235
277
  }
236
278
  //verify if there are No User Input Configs to set
237
279
  if (userNoInput) {
238
- const { userNoInputRetries, userNoInputMode, userNoInputSpeech, userNoInputTimeout, userNoInputUrl } = userNoInput || {};
239
- user.noInputMode = userNoInputMode;
240
- if (userNoInputMode === "speech" && userNoInputSpeech)
241
- user.noInputSpeech = userNoInputSpeech;
242
- if (userNoInputMode === "play" && userNoInputUrl)
243
- user.noInputUrl = userNoInputUrl;
244
- /* User No Input Retries. min: 0, max: 999*/
245
- if (userNoInputRetries < 0 || userNoInputRetries > 999) {
246
- user.noInputRetries = 1;
280
+ const { userNoInputRetries, userNoInputMode, userNoInputSpeech, userNoInputTimeout, userNoInputUrl, userNoInputTimeoutEnable } = userNoInput || {};
281
+ if (userNoInputTimeoutEnable === true) {
282
+ user.noInputMode = userNoInputMode;
283
+ if (userNoInputMode === "speech" && userNoInputSpeech)
284
+ user.noInputSpeech = userNoInputSpeech;
285
+ if (userNoInputMode === "play" && userNoInputUrl)
286
+ user.noInputUrl = userNoInputUrl;
287
+ /* User No Input Retries. min: 0, max: 999*/
288
+ if (userNoInputRetries < 0 || userNoInputRetries > 999) {
289
+ user.noInputRetries = 1;
290
+ }
291
+ else {
292
+ user.noInputRetries = userNoInputRetries !== null && userNoInputRetries !== void 0 ? userNoInputRetries : 1;
293
+ }
294
+ user.noInputTimeout = userNoInputTimeout
295
+ ? userNoInputTimeout / 1000
296
+ : 10;
247
297
  }
248
- else {
249
- user.noInputRetries = userNoInputRetries !== null && userNoInputRetries !== void 0 ? userNoInputRetries : 1;
298
+ else if (userNoInputTimeoutEnable === false) {
299
+ user.noInputTimeout = 0;
300
+ }
301
+ }
302
+ //verify if there are No Flow Input Configs to set
303
+ if (flowNoInput) {
304
+ const { flowNoInputMode, flowNoInputRetries, flowNoInputSpeech, flowNoInputTimeout, flowNoInputTimeoutEnable, flowNoInputUrl } = flowNoInput || {};
305
+ flow.flowNoInputEnable = flowNoInputTimeoutEnable;
306
+ if (flowNoInputTimeoutEnable === true) {
307
+ flow.flowNoInputMode = flowNoInputMode;
308
+ if (flowNoInputMode === "speech" && flowNoInputSpeech)
309
+ flow.flowNoInputSpeech = flowNoInputSpeech;
310
+ if (flowNoInputMode === "play" && flowNoInputUrl)
311
+ flow.flowNoInputUrl = flowNoInputUrl;
312
+ /* User No Input Retries. min: 0, max: 999*/
313
+ if (flowNoInputRetries < 0 || flowNoInputRetries > 999) {
314
+ flow.flowNoInputRetries = 1;
315
+ }
316
+ else {
317
+ flow.flowNoInputRetries = flowNoInputRetries !== null && flowNoInputRetries !== void 0 ? flowNoInputRetries : 1;
318
+ }
319
+ flow.flowNoInputTimeout = flowNoInputTimeout
320
+ ? flowNoInputTimeout / 1000
321
+ : 10;
322
+ }
323
+ else if (flowNoInputTimeoutEnable === false) {
324
+ flow.flowNoInputTimeout = undefined;
250
325
  }
251
- user.noInputTimeout = userNoInputTimeout
252
- ? userNoInputTimeout / 1000
253
- : 10;
254
326
  }
255
327
  // verify if there are Continuous ASR Configs to set
256
328
  if (continuousAsr === null || continuousAsr === void 0 ? void 0 : continuousAsr.asrEnabled) {
@@ -310,6 +382,9 @@ exports.setSessionConfig = {
310
382
  if (voiceConfig.recognizer && !voiceConfig.recognizer.azureSttEndpointId) {
311
383
  voiceConfig.recognizer.azureSttEndpointId = "";
312
384
  }
385
+ if (silenceOverlay) {
386
+ voiceConfig.fillerNoise = (0, strip_nulls_1.stripNulls)(silenceOverlay);
387
+ }
313
388
  (0, strip_nulls_1.stripNulls)(voiceConfig);
314
389
  /* As the last step we check the session params JSON for valid properties */
315
390
  if (sessionParams) {
@@ -318,6 +393,7 @@ exports.setSessionConfig = {
318
393
  // Check if there are configs for No User Input and DTMF
319
394
  const cognigyConfig = {
320
395
  user: user || undefined,
396
+ flow: flow || undefined,
321
397
  dtmf: enableDTMF,
322
398
  };
323
399
  if (tts && typeof tts.ttsDisableCache === "boolean") {
@@ -332,6 +408,9 @@ exports.setSessionConfig = {
332
408
  ? voiceConfig
333
409
  : undefined,
334
410
  };
411
+ if (atmosphereNoise) {
412
+ prePayload.voiceGateway2Atmosphere = (0, strip_nulls_1.stripNulls)(atmosphereNoise);
413
+ }
335
414
  if (prePayload.cognigyConfig === undefined) {
336
415
  delete prePayload.cognigyConfig;
337
416
  }
@@ -7,6 +7,7 @@ const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
7
7
  const setSessionConfig_mapper_1 = require("../mappers/setSessionConfig.mapper");
8
8
  const design_1 = require("../utils/design");
9
9
  const setSessionConfig_mapper_2 = require("../mappers/setSessionConfig.mapper");
10
+ const logFullConfigToDebugMode_1 = require("../../../../helper/logFullConfigToDebugMode");
10
11
  exports.BARGE_IN = (0, createNodeDescriptor_1.createNodeDescriptor)({
11
12
  type: "bargeIn",
12
13
  defaultLabel: "Barge In - Config",
@@ -98,6 +99,7 @@ exports.BARGE_IN = (0, createNodeDescriptor_1.createNodeDescriptor)({
98
99
  api.say(null, {
99
100
  _cognigy: payload,
100
101
  });
102
+ (0, logFullConfigToDebugMode_1.logFullConfigToDebugMode)(cognigy, config);
101
103
  }
102
104
  catch (error) {
103
105
  throw new Error(`Error on Barge In node. Error message: ${error.message}`);
@@ -7,6 +7,7 @@ const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
7
7
  const setSessionConfig_mapper_1 = require("../mappers/setSessionConfig.mapper");
8
8
  const design_1 = require("../utils/design");
9
9
  const setSessionConfig_mapper_2 = require("../mappers/setSessionConfig.mapper");
10
+ const logFullConfigToDebugMode_1 = require("../../../../helper/logFullConfigToDebugMode");
10
11
  exports.CONTINUOUS_ASR = (0, createNodeDescriptor_1.createNodeDescriptor)({
11
12
  type: "continuousASR",
12
13
  defaultLabel: "Continuous ASR - Config",
@@ -63,6 +64,7 @@ exports.CONTINUOUS_ASR = (0, createNodeDescriptor_1.createNodeDescriptor)({
63
64
  api.say(null, {
64
65
  _cognigy: payload,
65
66
  });
67
+ (0, logFullConfigToDebugMode_1.logFullConfigToDebugMode)(cognigy, config);
66
68
  }
67
69
  catch (error) {
68
70
  throw new Error(`Error on Continuous ASR node. Error message: ${error.message}`);
@@ -7,6 +7,7 @@ const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
7
7
  const setSessionConfig_mapper_1 = require("../mappers/setSessionConfig.mapper");
8
8
  const design_1 = require("../utils/design");
9
9
  const setSessionConfig_mapper_2 = require("../mappers/setSessionConfig.mapper");
10
+ const logFullConfigToDebugMode_1 = require("../../../../helper/logFullConfigToDebugMode");
10
11
  exports.DTMF = (0, createNodeDescriptor_1.createNodeDescriptor)({
11
12
  type: "dtmf",
12
13
  defaultLabel: "DTMF Collect - Config",
@@ -71,6 +72,7 @@ exports.DTMF = (0, createNodeDescriptor_1.createNodeDescriptor)({
71
72
  api.say(null, {
72
73
  _cognigy: payload,
73
74
  });
75
+ (0, logFullConfigToDebugMode_1.logFullConfigToDebugMode)(cognigy, config);
74
76
  }
75
77
  catch (error) {
76
78
  throw new Error(`Error on DTMF node. Error message: ${error.message}`);
@@ -43,6 +43,7 @@ exports.MUTE_SPEECH_INPUT = (0, createNodeDescriptor_1.createNodeDescriptor)({
43
43
  api.say(null, {
44
44
  _cognigy: payload
45
45
  });
46
+ api.logDebugMessage(`UI__DEBUG_MODE__MUTE_SPEECH__MESSAGE ${config.muteSpeechInput}`);
46
47
  }
47
48
  catch (error) {
48
49
  throw new Error(`Error in muteSpeechInput node. Error message: ${error.message}`);
@@ -7,6 +7,7 @@ const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
7
7
  const setSessionConfig_mapper_1 = require("../mappers/setSessionConfig.mapper");
8
8
  const design_1 = require("../utils/design");
9
9
  const setSessionConfig_mapper_2 = require("../mappers/setSessionConfig.mapper");
10
+ const logFullConfigToDebugMode_1 = require("../../../../helper/logFullConfigToDebugMode");
10
11
  exports.USER_INPUT_TIMEOUT = (0, createNodeDescriptor_1.createNodeDescriptor)({
11
12
  type: "noUserInput",
12
13
  defaultLabel: "User Input Timeout - Config",
@@ -97,6 +98,7 @@ exports.USER_INPUT_TIMEOUT = (0, createNodeDescriptor_1.createNodeDescriptor)({
97
98
  api.say(null, {
98
99
  _cognigy: payload,
99
100
  });
101
+ (0, logFullConfigToDebugMode_1.logFullConfigToDebugMode)(cognigy, config);
100
102
  }
101
103
  catch (error) {
102
104
  throw new Error(`Error on User Input Timeout node. Error message: ${error.message}`);
@@ -7,6 +7,7 @@ const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
7
7
  const setSessionConfig_mapper_1 = require("../mappers/setSessionConfig.mapper");
8
8
  const design_1 = require("../utils/design");
9
9
  const vgConstants_1 = require("../utils/vgConstants");
10
+ const logFullConfigToDebugMode_1 = require("../../../../helper/logFullConfigToDebugMode");
10
11
  exports.voiceConfigFields = [
11
12
  {
12
13
  key: "sttHints",
@@ -332,6 +333,7 @@ exports.SESSION_SPEECH_PARAMETERS = (0, createNodeDescriptor_1.createNodeDescrip
332
333
  api.say(null, {
333
334
  _cognigy: payload,
334
335
  });
336
+ (0, logFullConfigToDebugMode_1.logFullConfigToDebugMode)(cognigy, config);
335
337
  }
336
338
  catch (error) {
337
339
  throw new Error(`Error on Session Speech Parameters node. Error message: ${error.message}`);