@cognigy/rest-api-client 0.16.0 → 0.17.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 (27) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/shared/charts/descriptors/agentAssist/htmlTemplates/knowledgeAssistTemplate.js +39 -23
  3. package/build/shared/charts/descriptors/agentAssist/setAgentAssistGrid.js +31 -16
  4. package/build/shared/charts/descriptors/allFields.js +6 -0
  5. package/build/shared/charts/descriptors/logic/goTo.js +3 -3
  6. package/build/shared/charts/descriptors/nlu/generativeSlotFiller/prompt.js +8 -4
  7. package/build/shared/charts/descriptors/voice/mappers/setSessionConfig.mapper.js +18 -12
  8. package/build/shared/charts/descriptors/voice/mappers/transfer.mapper.js +11 -7
  9. package/build/shared/charts/descriptors/voice/nodes/sessionSpeechParameters.js +8 -31
  10. package/build/shared/charts/descriptors/voicegateway2/nodes/setSessionConfig.js +7 -32
  11. package/build/shared/helper/BaseContext.js +31 -0
  12. package/build/shared/interfaces/generativeAI/IGenerativeAIModels.js +2 -0
  13. package/build/shared/interfaces/messageAPI/endpoints.js +2 -0
  14. package/build/shared/interfaces/messageAPI/handover.js +4 -4
  15. package/build/shared/interfaces/resources/INodeDescriptorSet.js +1 -0
  16. package/build/shared/interfaces/resources/TSocketChannelType.js +5 -1
  17. package/build/shared/interfaces/restAPI/metrics/callCounter/v2.0/ICallCounterAggregatedValue_2_0.js +3 -0
  18. package/build/shared/interfaces/restAPI/metrics/callCounter/v2.0/IGetCallCounterOrganisationRest_2_0.js +3 -0
  19. package/build/shared/interfaces/restAPI/metrics/callCounter/v2.0/IGetCallCounterRest_2_0.js +3 -0
  20. package/build/shared/interfaces/restAPI/metrics/callCounter/v2.0/index.js +3 -0
  21. package/build/shared/interfaces/security/ICallCounterAggregatedValue.js +3 -0
  22. package/build/shared/interfaces/security/IPermission.js +1 -0
  23. package/build/shared/interfaces/security/IRole.js +6 -0
  24. package/build/shared/interfaces/security/index.js +2 -1
  25. package/build/shared/interfaces/trainer/ITrainerRecord.js +2 -0
  26. package/package.json +2 -2
  27. package/types/index.d.ts +245 -14
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 0.17.0
2
+ Released: February 2nd, 2024
3
+
4
+ Released state of package up to date with Cognigy.AI v4.68.0
5
+ Updated axios package to fix vulnerabilities
6
+
1
7
  # 0.16.0
2
8
  Released: December 6th, 2023
3
9
 
@@ -48,7 +48,7 @@ const renderResults = (data, promptResponse) => {
48
48
  const hasSource = result.sourceMetaData.sourceName;
49
49
  return `
50
50
  <div class="flex-grow">
51
- <div class="flex items-center justify-center mt-2 h-full">
51
+ <div id="resultContainer" class="flex items-center justify-center mt-2 h-full">
52
52
  <textarea id="textArea" class="w-full h-full rounded-md border p-2" rows="5" placeholder="Your search results will be displayed here">${promptResponse}</textarea>
53
53
  <div id="loader" class="w-2 hidden h-30 rounded-full border-t-4 border-gray-300 border-solid animate-spin" style="border-width: 16px; border-top-color: #3498db;"></div>
54
54
  </div>
@@ -80,24 +80,25 @@ const renderResults = (data, promptResponse) => {
80
80
  /**
81
81
  * Helper function to dynamically render the sources section based on the data provided by the search.
82
82
  *
83
- * @param sources
83
+ * @param source
84
84
  * @returns
85
85
  */
86
86
  const sourcesElements = (source) => {
87
- if (!source) {
87
+ var _a;
88
+ if (!source || !source.url) {
88
89
  return "";
89
90
  }
90
91
  return `
91
- <div class="mt-4">
92
- <div class="text-sm font-semibold uppercase tracking-wide text-indigo-500">Source</div>
93
- <div class="mt-2">
94
- <div class="flex flex-col flex-wrap gap-2">
95
- <a href="${source.url}" target="_blank" class="text-indigo-500 hover:text-indigo-600">${source.title}</a>
96
- <p>${source.sourceType}</p>
97
- </div>
98
- </div>
99
- </div>
100
- `;
92
+ <div class="mt-4">
93
+ <div class="text-sm font-semibold uppercase tracking-wide text-indigo-500">Source</div>
94
+ <div class="mt-2">
95
+ <div class="flex flex-col flex-wrap gap-2">
96
+ <a href="${source.url}" target="_blank" class="text-indigo-500 hover:text-indigo-600">${(_a = source.title) !== null && _a !== void 0 ? _a : source.url}</a>
97
+ ${source.sourceType ? `<p>${source.sourceType}</p>` : ""}
98
+ </div>
99
+ </div>
100
+ </div>
101
+ `;
101
102
  };
102
103
  const postbackScript = (tileId) => `
103
104
  <script>
@@ -141,30 +142,45 @@ const postbackScript = (tileId) => `
141
142
  }
142
143
  window.SDK = new c();
143
144
 
144
- window.document.getElementById('postbackButton').onclick = () => {
145
- // data to be send in postback
145
+ const triggerSearch = () => {
146
146
  const input = document.getElementById('searchInput').value;
147
147
  const data = {searchString: input, tileId: '${tileId}'};
148
148
  window.SDK.postback(data);
149
149
 
150
- window.document.getElementById('searchInput').value = '';
151
-
152
- window.document.getElementById('loader').style.display = 'block';
153
-
154
- window.document.getElementById('textArea').style.display = 'none';
150
+ document.getElementById('searchInput').value = '';
151
+ document.getElementById('loader').style.display = 'block';
152
+ document.getElementById('textArea').style.display = 'none';
153
+ };
154
+
155
+ document.getElementById('postbackButton').onclick = () => {
156
+ triggerSearch();
155
157
  };
156
158
 
159
+ document.getElementById('searchInput').addEventListener('keypress', (event) => {
160
+ if (event.key === 'Enter') {
161
+ event.preventDefault();
162
+ triggerSearch();
163
+ }
164
+ });
165
+
157
166
  let showButton = false;
158
167
 
159
168
  function updateButtonVisibility() {
160
169
  const button = document.getElementById("liveAgentForwardButton");
170
+ const resultContainer = document.getElementById("resultContainer");
171
+
161
172
  if (button) {
162
- button.className = showButton
163
- ? "absolute bottom-0 right-0 flex items-center justify-center"
164
- : "hidden";
173
+ if (showButton) {
174
+ button.className = "absolute bottom-0 right-0 flex items-center justify-center";
175
+ resultContainer.classList.add("pb-5");
176
+ } else {
177
+ button.className = "hidden";
178
+ resultContainer.classList.remove("pb-5");
179
+ }
165
180
  }
166
181
  }
167
182
 
183
+
168
184
  window.addEventListener("message", (event) => {
169
185
  const message = event.data;
170
186
 
@@ -7,45 +7,45 @@ const sampleAgentAssistConfig = {
7
7
  grid: {
8
8
  columns: 5,
9
9
  rows: 10,
10
- gap: 5
10
+ gap: 5,
11
11
  },
12
12
  tiles: {
13
- 'customer-sentiment': {
13
+ "customer-sentiment": {
14
14
  x: 1,
15
15
  y: 1,
16
16
  rows: 3,
17
- columns: 2
17
+ columns: 2,
18
18
  },
19
- 'suggested-reply': {
19
+ "suggested-reply": {
20
20
  x: 3,
21
21
  y: 1,
22
22
  rows: 3,
23
- columns: 3
23
+ columns: 3,
24
24
  },
25
25
  profile: {
26
26
  x: 1,
27
27
  y: 4,
28
28
  rows: 3,
29
- columns: 2
29
+ columns: 2,
30
30
  },
31
- 'user-history': {
31
+ "user-history": {
32
32
  x: 1,
33
33
  y: 7,
34
34
  rows: 4,
35
- columns: 2
35
+ columns: 2,
36
36
  },
37
37
  chat: {
38
38
  x: 3,
39
39
  y: 4,
40
40
  rows: 7,
41
- columns: 3
42
- }
43
- }
41
+ columns: 3,
42
+ },
43
+ },
44
44
  };
45
45
  const checkAgentAssistKeys = (config) => {
46
46
  const { grid, tiles } = config;
47
47
  const configKeys = Object.keys(config);
48
- const validKeys = ["grid", "tiles"];
48
+ const validKeys = ["grid", "tiles", "background"];
49
49
  const invalidKeys = configKeys.filter((key) => !validKeys.includes(key));
50
50
  if (invalidKeys.length > 0 ||
51
51
  configKeys.length > 2 ||
@@ -62,6 +62,7 @@ const checkAgentAssistKeys = (config) => {
62
62
  return true;
63
63
  };
64
64
  const configKey = "agentAssistConfig";
65
+ const backgroundSelectorKey = "backgroundSelector";
65
66
  /**
66
67
  * Node name: "setAgentAssistGrid"
67
68
  *
@@ -85,20 +86,34 @@ exports.SET_AGENT_ASSIST_GRID = (0, createNodeDescriptor_1.createNodeDescriptor)
85
86
  params: {
86
87
  required: true,
87
88
  },
88
- defaultValue: sampleAgentAssistConfig
89
+ defaultValue: sampleAgentAssistConfig,
90
+ },
91
+ {
92
+ key: backgroundSelectorKey,
93
+ label: "UI__NODE_EDITOR__SET_AGENT_ASSIST_GRID__BACKGROUND_SELECTOR__LABEL",
94
+ type: "backgroundSelector",
95
+ description: "UI__NODE_EDITOR__SET_AGENT_ASSIST_GRID__BACKGROUND_SELECTOR__DESCRIPTION",
96
+ params: {
97
+ required: true,
98
+ },
99
+ defaultValue: "default",
89
100
  },
90
101
  ],
91
102
  sections: [],
92
- form: [{ type: "field", key: configKey }].filter((element) => !!element),
103
+ form: [
104
+ { type: "field", key: configKey },
105
+ { type: "field", key: backgroundSelectorKey }
106
+ ].filter((element) => !!element),
93
107
  function: async (params) => {
94
108
  const { cognigy, config } = params;
95
109
  const { api } = cognigy;
96
110
  const agentAssistConfig = config[configKey];
111
+ const background = config[backgroundSelectorKey];
97
112
  if (!checkAgentAssistKeys(agentAssistConfig)) {
98
- api.log("error", "A valid Agent Assist Grid configuration was not provided");
113
+ api.log("error", "A valid AI Copilot configuration was not provided");
99
114
  return;
100
115
  }
101
- cognigy.api.sendConfigUpdateToAgentAssistWorkspace(Object.assign(Object.assign({}, params), { agentAssistConfig }));
116
+ cognigy.api.sendConfigUpdateToAgentAssistWorkspace(Object.assign(Object.assign({}, params), { agentAssistConfig: Object.assign(Object.assign({}, agentAssistConfig), { background: background === null || background === void 0 ? void 0 : background.data }) }));
102
117
  return;
103
118
  },
104
119
  });
@@ -31,6 +31,12 @@ exports.ALL_FIELDS = (0, createNodeDescriptor_1.createNodeDescriptor)({
31
31
  label: "Copilot Config",
32
32
  description: "Create an Copilot Config using this JSON editor",
33
33
  },
34
+ {
35
+ key: "backgroundSelector",
36
+ type: "backgroundSelector",
37
+ label: "Background Selector",
38
+ description: "Give the user the ability to select a background image or color",
39
+ },
34
40
  {
35
41
  key: "date",
36
42
  type: "date",
@@ -135,11 +135,11 @@ exports.GO_TO = (0, createNodeDescriptor_1.createNodeDescriptor)({
135
135
  if (!api.checkThink(thisNodeId)) {
136
136
  api.resetNextNodes();
137
137
  api.setThinkMarker(config.flowNode.flow);
138
- // We always set the next node, not only if executionMode is "wait",
139
- // otherwise we would not go to the new flow if a default reply is triggered without continue after setting
140
- await api.goToNode(config.flowNode);
141
138
  // Check if execution is to wait at Node for Input
142
139
  if (executionMode === "wait") {
140
+ // only set the next node if the execution mode is "wait",
141
+ // otherwise input after the goto node would again go to this node, and not to the start node
142
+ await api.goToNode(config.flowNode);
143
143
  return;
144
144
  }
145
145
  if (injectedText) {
@@ -89,10 +89,14 @@ const createLastConversationChatObject = (lastConversationEntries, systemMessage
89
89
  });
90
90
  }
91
91
  lastConversationEntries === null || lastConversationEntries === void 0 ? void 0 : lastConversationEntries.slice(0, turnLimit).reverse().map(entry => {
92
- conversation.push({
93
- role: entry.source === "user" ? "user" : "assistant",
94
- content: entry.text
95
- });
92
+ // if text exists, add to conversation
93
+ // necessary to prevent data only messages from being added
94
+ if (entry === null || entry === void 0 ? void 0 : entry.text) {
95
+ conversation.push({
96
+ role: entry.source === "user" ? "user" : "assistant",
97
+ content: entry.text
98
+ });
99
+ }
96
100
  });
97
101
  return conversation;
98
102
  };
@@ -6,6 +6,14 @@ const helper_1 = require("../utils/helper");
6
6
  function voiceConfigParamsToVoiceSettings(config, api) {
7
7
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
8
8
  let voiceSettings = {};
9
+ if (config.sttVendor === 'none') {
10
+ delete config.sttVendor;
11
+ delete config.sttLabel;
12
+ }
13
+ if (config.ttsVendor === 'none') {
14
+ delete config.ttsVendor;
15
+ delete config.ttsLabel;
16
+ }
9
17
  if (typeof config.bargeInOnDtmf === 'boolean' || typeof config.bargeInOnSpeech === 'boolean') {
10
18
  voiceSettings.bargeIn = {
11
19
  bargeInEnable: false,
@@ -54,15 +62,9 @@ function voiceConfigParamsToVoiceSettings(config, api) {
54
62
  ttsVendor: config.ttsVendor,
55
63
  ttsLanguage: config.ttsLanguage,
56
64
  ttsVoice: config.ttsVoice,
57
- azureServiceEndpoint: config.azureTtsDeploymentId,
58
65
  ttsDisableCache: config.ttsDisableCache,
59
66
  ttsLabel: config.ttsLabel,
60
67
  };
61
- if (config.ttsVendor === "microsoft") {
62
- if (config.azureTtsDeploymentId) {
63
- voiceSettings.tts.azureServiceEndpoint = config.azureTtsDeploymentId;
64
- }
65
- }
66
68
  if (config.sttVendor === "microsoft") {
67
69
  if (config.recognizeLanguagesAzure) {
68
70
  voiceSettings.stt.altLanguages = [];
@@ -87,6 +89,9 @@ function voiceConfigParamsToVoiceSettings(config, api) {
87
89
  });
88
90
  }
89
91
  }
92
+ if (config.ttsVendor === "elevenlabs") {
93
+ voiceSettings.tts.ttsModel = config.ttsModel;
94
+ }
90
95
  // userNoInput
91
96
  voiceSettings.userNoInput = {
92
97
  userNoInputMode: config.userNoInputMode,
@@ -136,16 +141,12 @@ function voiceConfigParamsToVoiceSettings(config, api) {
136
141
  }
137
142
  }
138
143
  // Azure configurations
139
- if ((config.sttVendor === "microsoft" && config.azureSttContextId) ||
140
- (config.sttVendor === "microsoft" && config.azureTtsDeploymentId)) {
144
+ if ((config.sttVendor === "microsoft" && config.azureSttContextId)) {
141
145
  voiceSettings.azureConfig = {
142
146
  azureSttContextId: config.azureSttContextId
143
147
  ? config.azureSttContextId.trim()
144
148
  : undefined,
145
- azureEnableAudioLogging: config.azureEnableAudioLogging || undefined,
146
- azureTtsDeploymentId: config.azureTtsDeploymentId
147
- ? config.azureTtsDeploymentId.trim()
148
- : undefined,
149
+ azureEnableAudioLogging: config.azureEnableAudioLogging || undefined
149
150
  };
150
151
  }
151
152
  return (0, strip_nulls_1.stripNulls)(voiceSettings);
@@ -222,6 +223,11 @@ exports.setSessionConfig = {
222
223
  synthesizer.voice = tts.ttsVoice;
223
224
  synthesizer.azureServiceEndpoint = tts.azureServiceEndpoint ? tts.azureServiceEndpoint : "";
224
225
  synthesizer.label = tts.ttsLabel;
226
+ if (tts.ttsModel) {
227
+ synthesizer.options = {
228
+ model_id: tts.ttsModel
229
+ };
230
+ }
225
231
  }
226
232
  //verify if there are No User Input Configs to set
227
233
  if (userNoInput) {
@@ -97,7 +97,7 @@ exports.transfer = {
97
97
  transcribeVerb.channel = 2;
98
98
  break;
99
99
  }
100
- if (sttVendor) {
100
+ if (sttVendor !== 'none') {
101
101
  recognizer.vendor = sttVendor;
102
102
  recognizer.language = sttLanguage;
103
103
  recognizer.punctuation = !sttDisablePunctuation;
@@ -113,9 +113,9 @@ exports.transfer = {
113
113
  smartFormatting: deepgramSmartFormatting !== null && deepgramSmartFormatting !== void 0 ? deepgramSmartFormatting : false
114
114
  };
115
115
  }
116
- }
117
- if (sttLabel) {
118
- recognizer.label = sttLabel;
116
+ if (sttLabel) {
117
+ recognizer.label = sttLabel;
118
+ }
119
119
  }
120
120
  }
121
121
  if (Object.keys(transcribeVerb).length > 0) {
@@ -158,7 +158,7 @@ exports.transfer = {
158
158
  return payload;
159
159
  },
160
160
  handleAudioCodesInput(transferParam, endpointType = "audioCodes") {
161
- const { transferReason, transferTarget, useTransferSipHeaders, transferSipHeaders, transferNotifications, transferNotificationsHangupMS, transferReferredByURL } = transferParam;
161
+ const { transferReason, transferTarget, useTransferSipHeaders, transferSipHeaders, transferNotifications, transferNotificationsHangupMS, transferReferredByURL, referredBy } = transferParam;
162
162
  const activities = {
163
163
  "type": "event",
164
164
  "name": "transfer",
@@ -171,6 +171,10 @@ exports.transfer = {
171
171
  activities.activityParams["transferReferredByURL"] = transferReferredByURL;
172
172
  }
173
173
  ;
174
+ if (referredBy) {
175
+ activities.activityParams["transferReferredByURL"] = referredBy;
176
+ }
177
+ ;
174
178
  if (useTransferSipHeaders) {
175
179
  activities.activityParams["transferSipHeaders"] = transferSipHeaders;
176
180
  }
@@ -192,8 +196,8 @@ exports.transfer = {
192
196
  }
193
197
  };
194
198
  const prepareTransferParams = (transferParam) => {
195
- const { transferReason, dialMusic, dialTranscriptionWebhook } = transferParam;
196
- return Object.assign(Object.assign({}, transferParam), { transferReason: transferReason === null || transferReason === void 0 ? void 0 : transferReason.trim(), dialMusic: dialMusic === null || dialMusic === void 0 ? void 0 : dialMusic.trim(), dialTranscriptionWebhook: dialTranscriptionWebhook === null || dialTranscriptionWebhook === void 0 ? void 0 : dialTranscriptionWebhook.trim() });
199
+ const { transferReason, dialMusic, dialTranscriptionWebhook, referredBy } = transferParam;
200
+ return Object.assign(Object.assign({}, transferParam), { transferReason: transferReason === null || transferReason === void 0 ? void 0 : transferReason.trim(), dialMusic: dialMusic === null || dialMusic === void 0 ? void 0 : dialMusic.trim(), dialTranscriptionWebhook: dialTranscriptionWebhook === null || dialTranscriptionWebhook === void 0 ? void 0 : dialTranscriptionWebhook.trim(), referredBy: referredBy === null || referredBy === void 0 ? void 0 : referredBy.trim() });
197
201
  };
198
202
  exports.prepareTransferParams = prepareTransferParams;
199
203
  //# sourceMappingURL=transfer.mapper.js.map
@@ -254,36 +254,6 @@ exports.voiceConfigFields = [
254
254
  ],
255
255
  },
256
256
  },
257
- {
258
- key: "enableAdvancedTTSConfig",
259
- type: "toggle",
260
- label: "UI__NODE_EDITOR__ENABLE_ADVANCED_TTS_CONFIG__LABEL",
261
- description: "UI__NODE_EDITOR__ENABLE_ADVANCED_TTS_CONFIG__DESCRIPTION",
262
- defaultValue: false,
263
- condition: {
264
- key: "ttsVendor",
265
- value: "microsoft"
266
- }
267
- },
268
- {
269
- key: "azureTtsDeploymentId",
270
- type: "cognigyText",
271
- label: "UI__NODE_EDITOR__AZURE_TTS_DEPLOYMENT_ID__LABEL",
272
- description: "UI__NODE_EDITOR__AZURE_TTS_DEPLOYMENT_ID__DESCRIPTION",
273
- defaultValue: "",
274
- condition: {
275
- and: [
276
- {
277
- key: "enableAdvancedTTSConfig",
278
- value: true
279
- },
280
- {
281
- key: "ttsVendor",
282
- value: "microsoft"
283
- }
284
- ]
285
- }
286
- },
287
257
  {
288
258
  key: "ttsVendor",
289
259
  defaultValue: "",
@@ -291,10 +261,17 @@ exports.voiceConfigFields = [
291
261
  label: "_unused_",
292
262
  description: "_unused_",
293
263
  params: {
264
+ modelKey: "config.ttsModel",
294
265
  languageKey: "config.ttsLanguage",
295
266
  voiceKey: "config.ttsVoice"
296
267
  }
297
268
  },
269
+ {
270
+ key: "ttsModel",
271
+ type: "ttsSelect",
272
+ defaultValue: "",
273
+ label: "_unused_"
274
+ },
298
275
  {
299
276
  key: "ttsVoice",
300
277
  type: "ttsSelect",
@@ -341,7 +318,7 @@ exports.SESSION_SPEECH_PARAMETERS = (0, createNodeDescriptor_1.createNodeDescrip
341
318
  key: "params_tts",
342
319
  label: "UI__NODE_EDITOR__SESSION_SPEECH_PARAMETERS__SECTIONS__PARAMS_TTS__LABEL",
343
320
  defaultCollapsed: true,
344
- fields: ["ttsVendor", "enableAdvancedTTSConfig", "azureTtsDeploymentId"],
321
+ fields: ["ttsVendor"],
345
322
  },
346
323
  ],
347
324
  form: [
@@ -283,9 +283,16 @@ exports.voiceConfigFields = [
283
283
  description: "_unused_",
284
284
  params: {
285
285
  languageKey: "config.ttsLanguage",
286
+ modelKey: "config.ttsModel",
286
287
  voiceKey: "config.ttsVoice"
287
288
  }
288
289
  },
290
+ {
291
+ key: "ttsModel",
292
+ type: "ttsSelect",
293
+ defaultValue: "",
294
+ label: "_unused_"
295
+ },
289
296
  {
290
297
  key: "ttsVoice",
291
298
  type: "ttsSelect",
@@ -663,36 +670,6 @@ exports.voiceConfigFields = [
663
670
  ],
664
671
  },
665
672
  },
666
- {
667
- key: "enableAdvancedTTSConfig",
668
- type: "toggle",
669
- label: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__ENABLE_ADVANCED_TTS_CONFIG__LABEL",
670
- description: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__ENABLE_ADVANCED_TTS_CONFIG__DESCRIPTION",
671
- defaultValue: false,
672
- condition: {
673
- key: "ttsVendor",
674
- value: "microsoft",
675
- }
676
- },
677
- {
678
- key: "azureTtsDeploymentId",
679
- type: "cognigyText",
680
- label: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__AZURE_TTS_DEPLOYMENT_ID__LABEL",
681
- description: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__AZURE_TTS_DEPLOYMENT_ID__DESCRIPTION",
682
- defaultValue: "",
683
- condition: {
684
- and: [
685
- {
686
- key: "enableAdvancedTTSConfig",
687
- value: true
688
- },
689
- {
690
- key: "ttsVendor",
691
- value: "microsoft"
692
- }
693
- ]
694
- }
695
- },
696
673
  {
697
674
  key: "sessionParams",
698
675
  label: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__SESSION_PARAMS__LABEL",
@@ -746,8 +723,6 @@ exports.setSessionConfigNode = (0, createNodeDescriptor_1.createNodeDescriptor)(
746
723
  fields: [
747
724
  "ttsVendor",
748
725
  "ttsLabel",
749
- "enableAdvancedTTSConfig",
750
- "azureTtsDeploymentId",
751
726
  "ttsDisableCache",
752
727
  ],
753
728
  },
@@ -34,6 +34,14 @@ class BaseContext {
34
34
  createProxy(initial = {}) {
35
35
  return new Proxy(initial, {
36
36
  set: (obj, prop, value) => {
37
+ if (!prop) {
38
+ logger_1.logger.log("debug", { traceId: this.traceId, disableSensitiveLogging: true }, `Trying to set context with an invalid key '${prop === null || prop === void 0 ? void 0 : prop.toString()}' (context with an invalid key cannot be set).`, {
39
+ key: prop,
40
+ module: "BaseContext.ts",
41
+ function: "set:createProxy"
42
+ });
43
+ return true;
44
+ }
37
45
  if (this.ignoreTrapHandler) {
38
46
  obj[prop] = value;
39
47
  return true;
@@ -123,6 +131,14 @@ class BaseContext {
123
131
  * @memberOf Context
124
132
  */
125
133
  getContext(key) {
134
+ if (!key) {
135
+ logger_1.logger.log("debug", { traceId: this.traceId, disableSensitiveLogging: true }, `Trying to get context with an invalid key '${key}' (context with an invalid key cannot be accessed).`, {
136
+ key,
137
+ module: "BaseContext.ts",
138
+ function: "getContext"
139
+ });
140
+ return undefined;
141
+ }
126
142
  let s = [];
127
143
  if (key.indexOf(".") > -1)
128
144
  s = key.split(".");
@@ -159,6 +175,14 @@ class BaseContext {
159
175
  * @memberOf Context
160
176
  */
161
177
  setContext(key, value, traceId) {
178
+ if (!key) {
179
+ logger_1.logger.log("debug", { traceId, disableSensitiveLogging: true }, `Trying to set context with an invalid key '${key}' (context with an invalid key cannot be set).`, {
180
+ key,
181
+ module: "BaseContext.ts",
182
+ function: "setContext"
183
+ });
184
+ return;
185
+ }
162
186
  this.context[key] = value;
163
187
  }
164
188
  /**
@@ -214,6 +238,13 @@ class BaseContext {
214
238
  * @memberOf Context
215
239
  */
216
240
  delete(key) {
241
+ if (!key) {
242
+ logger_1.logger.log("debug", { traceId: this.traceId, disableSensitiveLogging: true }, `Trying to delete key from the context with an invalid key '${key}' (context with an invalid key cannot be accessed).`, {
243
+ key,
244
+ module: "BaseContext.ts",
245
+ function: "delete"
246
+ });
247
+ }
217
248
  delete this.context[key];
218
249
  }
219
250
  /**
@@ -18,6 +18,7 @@ exports.modeType = exports.generativeAIUseCases = exports.generativeAIProviders
18
18
  * - gpt-4
19
19
  * - text-embedding-ada-002
20
20
  * - luminous-extended-control
21
+ * - luminous-embedding-128
21
22
  * - claude-v1-100k
22
23
  * - claude-instant-v1
23
24
  * - text-bison@001
@@ -33,6 +34,7 @@ exports.generativeAIModels = [
33
34
  "text-davinci-003",
34
35
  "text-embedding-ada-002",
35
36
  "luminous-extended-control",
37
+ "luminous-embedding-128",
36
38
  "claude-v1-100k",
37
39
  "claude-instant-v1",
38
40
  "text-bison@001",
@@ -36,6 +36,7 @@ exports.endpointTypes = [
36
36
  "genesysBotConnector",
37
37
  "niceCXOne",
38
38
  "agentAssistVoice",
39
+ "webchat3"
39
40
  ];
40
41
  const transferTypes = ["dial", "sip:refer"];
41
42
  exports.webchatPersistentMenuSchema = {
@@ -131,6 +132,7 @@ const callFailoverSettingsSchema = {
131
132
  dialTranscribeLabel: { type: "string" },
132
133
  dialTranscribeDeepgramTier: { type: 'string' },
133
134
  dialTranscribeDeepgramModel: { type: 'string' },
135
+ referredBy: { type: "string" },
134
136
  deepgramSmartFormatting: { type: "boolean" },
135
137
  deepgramEndpointing: { type: "boolean" },
136
138
  deepgramEndpointingValue: { type: "number" }
@@ -86,11 +86,11 @@ exports.createHandoverRequestDataSchema = {
86
86
  "buttonId": {
87
87
  "type": "string"
88
88
  },
89
- "salesforcePrechatDetails": {
90
- "type": "array"
89
+ salesforcePrechatDetails: {
90
+ type: ["object", "array", "number", "string"],
91
91
  },
92
- "salesforcePrechatEntities": {
93
- "type": "array"
92
+ salesforcePrechatEntities: {
93
+ type: ["object", "array", "number", "string"],
94
94
  },
95
95
  "notifySessionId": {
96
96
  "type": "string",
@@ -86,6 +86,7 @@ exports.nodeFieldTypes = [
86
86
  "adaptivecard",
87
87
  "agentAssistConfig",
88
88
  "appTemplate",
89
+ "backgroundSelector",
89
90
  "caseNode",
90
91
  "checkbox",
91
92
  "chipInput",
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.socketChannelDisplayNames = exports.socketChannelTypes = void 0;
4
- exports.socketChannelTypes = ["realtime", "webchat2", "admin-webchat", "socket", "voiceGateway2", "liveAgentAssist"];
4
+ exports.socketChannelTypes = ["realtime", "webchat2", "admin-webchat", "socket", "voiceGateway2", "liveAgentAssist", "webchat3"];
5
5
  exports.socketChannelDisplayNames = [
6
6
  {
7
7
  channel: "realtime",
@@ -26,6 +26,10 @@ exports.socketChannelDisplayNames = [
26
26
  {
27
27
  channel: "liveAgentAssist",
28
28
  displayName: "Live Agent Assist"
29
+ },
30
+ {
31
+ channel: "webchat3",
32
+ displayName: "Webchat 3"
29
33
  }
30
34
  ];
31
35
  //# sourceMappingURL=TSocketChannelType.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ICallCounterAggregatedValue_2_0.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IGetCallCounterOrganisationRest_2_0.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IGetCallCounterRest_2_0.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ICallCounterAggregatedValue.js.map
@@ -20,6 +20,7 @@ exports.availablePermissions = exports.projectWidePermissions = exports.organisa
20
20
  exports.organisationWidePermissions = [
21
21
  "analyticsOdata",
22
22
  "apiKeys",
23
+ "assignProject",
23
24
  "liveAgentAccount",
24
25
  "projects",
25
26
  "userDetails",
@@ -12,10 +12,13 @@ exports.projectRolesWithSpecialOrgRights = exports.availableRoles = exports.proj
12
12
  * - admin
13
13
  * - apiKeys
14
14
  * - base_role
15
+ * - basicSupportUser
16
+ * - fullSupportUser
15
17
  * - liveAgentAdmin
16
18
  * - liveAgentAgent
17
19
  * - liveAgentSupervisor
18
20
  * - odata
21
+ * - projectAssigner
19
22
  * - projectManager
20
23
  * - userManager
21
24
  * - userDetailsViewer
@@ -25,11 +28,14 @@ exports.organisationWideRoles = [
25
28
  "admin",
26
29
  "apiKeys",
27
30
  "base_role",
31
+ "basicSupportUser",
32
+ "fullSupportUser",
28
33
  "liveAgentAdmin",
29
34
  "liveAgentAgent",
30
35
  "liveAgentSupervisor",
31
36
  "livechat",
32
37
  "odata",
38
+ "projectAssigner",
33
39
  "projectManager",
34
40
  "userManager",
35
41
  "userDetailsViewer",
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.identityProviderSchema = exports.oidcIdentityProviderDataSchema = exports.samlIdentityProviderDataSchema = exports.CrudOperation = exports.operations = exports.availableRoles = exports.projectWideRoles = exports.organisationWideRoles = exports.availablePermissions = void 0;
3
+ exports.identityProviderSchema = exports.oidcIdentityProviderDataSchema = exports.samlIdentityProviderDataSchema = exports.CrudOperation = exports.operations = exports.availableRoles = exports.projectWideRoles = exports.organisationWideRoles = exports.availablePermissions = exports.COMPUTED_ACL_HASH_VERSION = void 0;
4
+ exports.COMPUTED_ACL_HASH_VERSION = "v11";
4
5
  var IPermission_1 = require("./IPermission");
5
6
  Object.defineProperty(exports, "availablePermissions", { enumerable: true, get: function () { return IPermission_1.availablePermissions; } });
6
7
  var IRole_1 = require("./IRole");
@@ -35,6 +35,7 @@ exports.trainerRecordBulkCreateDataSchema = {
35
35
  properties: {
36
36
  finalIntentName: { type: ["null", "string"] },
37
37
  finalIntentScore: { type: ["null", "number"] },
38
+ highestFlow: { type: ["null", "string"] },
38
39
  },
39
40
  },
40
41
  tokens: { type: "array", items: { type: "string" } },
@@ -73,6 +74,7 @@ exports.trainerRecordDataSchema = {
73
74
  properties: {
74
75
  finalIntentName: { type: ["null", "string"] },
75
76
  finalIntentScore: { type: ["null", "number"] },
77
+ highestFlow: { type: ["null", "string"] },
76
78
  },
77
79
  },
78
80
  tokens: { type: "array", items: { type: "string" } },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cognigy/rest-api-client",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "Cognigy REST-Client",
5
5
  "main": "build/index.js",
6
6
  "module": "dist/rollup-plugin-babel.esm.js",
@@ -31,7 +31,7 @@
31
31
  "license": "Cognigy Proprietary License",
32
32
  "dependencies": {
33
33
  "ajv": "6.12.6",
34
- "axios": "1.6.0",
34
+ "axios": "1.6.4",
35
35
  "form-data": "4.0.0",
36
36
  "tus-js-client": "^3.1.1",
37
37
  "uuidv4": "6.2.13"
package/types/index.d.ts CHANGED
@@ -414,6 +414,7 @@ export interface IGetAuthorizationCodeParameters {
414
414
  declare const organisationWidePermissions: readonly [
415
415
  "analyticsOdata",
416
416
  "apiKeys",
417
+ "assignProject",
417
418
  "liveAgentAccount",
418
419
  "projects",
419
420
  "userDetails",
@@ -914,11 +915,14 @@ declare const organisationWideRoles: readonly [
914
915
  "admin",
915
916
  "apiKeys",
916
917
  "base_role",
918
+ "basicSupportUser",
919
+ "fullSupportUser",
917
920
  "liveAgentAdmin",
918
921
  "liveAgentAgent",
919
922
  "liveAgentSupervisor",
920
923
  "livechat",
921
924
  "odata",
925
+ "projectAssigner",
922
926
  "projectManager",
923
927
  "userManager",
924
928
  "userDetailsViewer",
@@ -1844,7 +1848,8 @@ declare const socketChannelTypes: readonly [
1844
1848
  "admin-webchat",
1845
1849
  "socket",
1846
1850
  "voiceGateway2",
1847
- "liveAgentAssist"
1851
+ "liveAgentAssist",
1852
+ "webchat3"
1848
1853
  ];
1849
1854
  export declare type TSocketChannelType = typeof socketChannelTypes[number];
1850
1855
  export interface IBaseTransformerFunction {
@@ -2382,6 +2387,7 @@ export interface IGraphEndpointDependency {
2382
2387
  * - genesysBotConnector
2383
2388
  * - niceCXOne
2384
2389
  * - agentAssistVoice
2390
+ * - webchat3
2385
2391
  */
2386
2392
  export declare type TChannelType = TWebhookChannelType | TRestChannelType | TSocketChannelType | "inject" | "abstract-rest" | "adminconsole" | "voiceGateway2";
2387
2393
  declare const endpointTypes: readonly [
@@ -2415,7 +2421,8 @@ declare const endpointTypes: readonly [
2415
2421
  "bandwidth",
2416
2422
  "genesysBotConnector",
2417
2423
  "niceCXOne",
2418
- "agentAssistVoice"
2424
+ "agentAssistVoice",
2425
+ "webchat3"
2419
2426
  ];
2420
2427
  export declare type TEndpointType = typeof endpointTypes[number];
2421
2428
  declare const transferTypes: readonly [
@@ -2472,6 +2479,7 @@ export interface ICallEventFailoverSettings {
2472
2479
  dialTranscribeLabel?: string;
2473
2480
  dialTranscribeDeepgramTier?: string;
2474
2481
  dialTranscribeDeepgramModel?: string;
2482
+ referredBy?: string;
2475
2483
  deepgramSmartFormatting?: boolean;
2476
2484
  deepgramEndpointing?: boolean;
2477
2485
  deepgramEndpointingValue?: number;
@@ -2492,11 +2500,21 @@ export interface ICallEvents {
2492
2500
  userBusy?: ICallEventSettings;
2493
2501
  noAnswer?: ICallEventSettings;
2494
2502
  }
2503
+ export interface IVGProsodySettings {
2504
+ outputSpeed?: number;
2505
+ outputPitch?: number;
2506
+ outputVolume?: number;
2507
+ }
2508
+ export interface IVGGenericSettings {
2509
+ prosodySettings?: IVGProsodySettings;
2510
+ showBestTranscriptOnly?: boolean;
2511
+ }
2495
2512
  export interface IVoiceGatewayEndpointSettings extends IEndpointSessionSettings {
2496
2513
  callEvents: ICallEvents;
2497
2514
  failover?: ICallEventFailoverSettings;
2515
+ genericSettings?: IVGGenericSettings;
2498
2516
  }
2499
- export declare type AnyEndpointSettings = IFacebookEndpointSettings | IWorkplaceEndpointSettings | ISlackEndpointSettings | IGenericEndpointSettings | IAlexaEndpointSettings | IWebchat2EndpointSettings | ILineEndpointSettings | ITwilioEndpointSettings | ITwilioSmsEndpointSettings | IIntercomEndpointSettings | IRealtimeEndpointSettings | ISunshineConversationsEndpointSettings | IAvayaEndpointSettings | IUserlikeEndpointSettings | IBandwidthEndpointSettings | IAudioCodesEndpointSettings | IWhatsAppEndpointSettings | IAmazonLexEndpointSettings | IEightByEightEndpointSettings | IMicrosoftBotFrameworkEndpointSettings | IVoiceGatewayEndpointSettings | IGenesysBotConnectorEndpointSettings | INiceCXOneEndpointSettings | IAgentAssistVoiceEndpointSettings | {};
2517
+ 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 | IAgentAssistVoiceEndpointSettings | {};
2500
2518
  export declare type TAvayaVoice = "man" | "woman" | string;
2501
2519
  declare const avayaSttTtsLanguages: readonly [
2502
2520
  "cy-GB",
@@ -3076,6 +3094,203 @@ export interface IWebchat2EndpointSettings extends IWebchatEndpointSharedSetting
3076
3094
  title: string;
3077
3095
  };
3078
3096
  }
3097
+ export interface IWebchat3EndpointSettings extends IWebchatEndpointSharedSettings {
3098
+ /**
3099
+ * List of plugin urls that should be
3100
+ * loaded for the auto-deployed webchat
3101
+ */
3102
+ pluginUrls: string[];
3103
+ /**
3104
+ * The title that will show up on top of
3105
+ * the webchat's Header
3106
+ */
3107
+ title: string;
3108
+ /**
3109
+ * The start behavior of the
3110
+ * webchat, e.g. whether a start button
3111
+ * should be rendered.
3112
+ */
3113
+ startBehavior: TWebchat2StartBehavior;
3114
+ /**
3115
+ * If this is true, the webchat will apply
3116
+ * generic styling to HTML message content.
3117
+ *
3118
+ * This is e.g. useful if we are using HTML generated by Markdown.
3119
+ */
3120
+ enableGenericHTMLStyling: boolean;
3121
+ /**
3122
+ * Setting that decides the display of the rating button in the webchat
3123
+ */
3124
+ enableRating: TWebchatEnableRating;
3125
+ /**
3126
+ * The title displayed in the rating dialog prompt
3127
+ */
3128
+ ratingTitleText: string;
3129
+ /**
3130
+ * The text displayed above the comment field in the rating dialog prompt
3131
+ */
3132
+ ratingCommentText: string;
3133
+ /**
3134
+ * The text displayed in the message history after giving a rating
3135
+ * (text is followed by the icon representing the rating)
3136
+ */
3137
+ ratingMessageHistoryRatingText: string;
3138
+ /**
3139
+ * The text displayed in the message history after giving a rating, if there was a comment sent
3140
+ * (text is followed by the actual comment)
3141
+ */
3142
+ ratingMessageHistoryCommentText: string;
3143
+ /**
3144
+ * This setting is used to decide whether to sanitize HTML content in the Webchat or not
3145
+ */
3146
+ disableHtmlContentSanitization: boolean;
3147
+ /**
3148
+ * This setting is used to decide whether to sanitize JavaScript from URL buttons / Default Actions
3149
+ * in the Webchat or not
3150
+ */
3151
+ disableUrlButtonSanitization: boolean;
3152
+ /**
3153
+ * This setting is used to decide whether a connectivity indicator should be displayed
3154
+ */
3155
+ enableConnectionStatusIndicator: boolean;
3156
+ /**
3157
+ * This setting activates the automatic collation of input messages with a delay for the webchat
3158
+ */
3159
+ enableInputCollation: boolean;
3160
+ /**
3161
+ * This setting configures the delay for the automatic input collation in miliseconds. Defaults to 1000
3162
+ */
3163
+ inputCollationTimeout: number;
3164
+ /**
3165
+ * This setting is used to decide whether unread messages should be indicated in the title of a minimized webchat widget
3166
+ */
3167
+ enableUnreadMessageTitleIndicator: boolean;
3168
+ /**
3169
+ * This setting is used to decide whether engagement messages should be displayed in the chat history
3170
+ */
3171
+ showEngagementMessagesInChat: boolean;
3172
+ /**
3173
+ * The text that should be sent to engage the customer
3174
+ */
3175
+ engagementMessageText: string;
3176
+ /**
3177
+ * This setting is used to decide whether a badge with the number of unread messages should be displayed in the minimized webchat widget
3178
+ */
3179
+ enableUnreadMessageBadge: boolean;
3180
+ /**
3181
+ * This setting is used to decide whether to show a message preview for incoming messages if the webchat widget is minimized
3182
+ */
3183
+ enableUnreadMessagePreview: boolean;
3184
+ /**
3185
+ * This setting is used to decide whether a sound should be triggered for incoming messages if the webchat widget is minimized
3186
+ */
3187
+ enableUnreadMessageSound: boolean;
3188
+ /**
3189
+ * This setting is used to decide whether images should be resized dynamically
3190
+ */
3191
+ dynamicImageAspectRatio: boolean;
3192
+ /**
3193
+ * This setting is used to decide whether the input should be focused right after a postback button is pressed
3194
+ */
3195
+ focusInputAfterPostback: boolean;
3196
+ /**
3197
+ * If this is "true", the webchat will use a regular one-line text input instead of an automatically growing text field
3198
+ */
3199
+ disableInputAutogrow: boolean;
3200
+ /**
3201
+ * Defines the number of line rows the text input will grow to before showing a vertical scrollbar
3202
+ */
3203
+ inputAutogrowMaxRows: number;
3204
+ /**
3205
+ * This setting is used to disable autocomplete for the input as on Samsung smartphones the autosuggestion overlaps the virtual keyboard
3206
+ */
3207
+ disableInputAutocomplete: boolean;
3208
+ /**
3209
+ * This setting is used to enable or disable the "integrated demo webchat" for this endpoint. If this is "off", the Demo Webchat will not be publically accessible.
3210
+ */
3211
+ enableDemoWebchat: boolean;
3212
+ /**
3213
+ * This setting is used to enable or disable branding in webchat.If true, hides "Powered by Cognigy" link.
3214
+ */
3215
+ disableBranding?: boolean;
3216
+ /**
3217
+ * Whether to display the file attachment button
3218
+ */
3219
+ enableFileAttachment: boolean;
3220
+ /**
3221
+ * The maximum allowed size of the attachment
3222
+ */
3223
+ fileAttachmentMaxSize: number;
3224
+ /**
3225
+ * Maintenance mode foncifuration for the Webchat Widget
3226
+ */
3227
+ maintenance: {
3228
+ /**
3229
+ * Whether the Maintenance mode is enabled
3230
+ */
3231
+ enabled: boolean;
3232
+ /**
3233
+ * The maintenance mode. Possible values are:
3234
+ * "hide" - The chat window will be hidden during maintenance
3235
+ * "disable" - The message bubble will be disabled with a mouse over text during maintenance
3236
+ * "inform" - The Webchat Widget will start normally, but show a maintenance mode message
3237
+ */
3238
+ mode: string;
3239
+ /**
3240
+ * The text that is displayed in the mouse over text of the bubble or the maintenance mode message
3241
+ */
3242
+ text: string;
3243
+ /**
3244
+ * The title that is displayed to the user in the information when opening the bot during maintenance
3245
+ */
3246
+ title: string;
3247
+ };
3248
+ /**
3249
+ * Office Hours configuration for the Webchat Widget
3250
+ */
3251
+ businessHours: {
3252
+ /**
3253
+ * Specified hours during which the Webchat Widget should be available
3254
+ */
3255
+ businessHours: {
3256
+ /**
3257
+ * Start time of the business hours, e.g. 09:00
3258
+ */
3259
+ startTime: string;
3260
+ /**
3261
+ * End time of the business hours, e.g. 17:00
3262
+ */
3263
+ endTime: string;
3264
+ /**
3265
+ * Week day of the business hours in lower case, e.g. "monday"
3266
+ */
3267
+ weekDay: string;
3268
+ }[];
3269
+ /**
3270
+ * Whether the Office Hours are enabled
3271
+ */
3272
+ enabled: boolean;
3273
+ /**
3274
+ * The business hours mode. Possible values are:
3275
+ * "hide" - The chat window will be hidden out of business hours
3276
+ * "disable" - The message bubble will be disabled with a mouse over text out of business hours
3277
+ * "inform" - The Webchat Widget will start normally, but show an out of business hours message
3278
+ */
3279
+ mode: string;
3280
+ /**
3281
+ * The text that is displayed in the mouse over text of the bubble or the out of business hours message
3282
+ */
3283
+ text: string;
3284
+ /**
3285
+ * The timezone that is used to calculate of the user is calling out of business hours
3286
+ */
3287
+ timeZone: string;
3288
+ /**
3289
+ * The title that is displayed to the user in the information when opening the bot out of business hours
3290
+ */
3291
+ title: string;
3292
+ };
3293
+ }
3079
3294
  /**
3080
3295
  * Setting to enable rating for the Webchat.
3081
3296
  * Valid types are:
@@ -3312,6 +3527,7 @@ declare const generativeAIModels: readonly [
3312
3527
  "text-davinci-003",
3313
3528
  "text-embedding-ada-002",
3314
3529
  "luminous-extended-control",
3530
+ "luminous-embedding-128",
3315
3531
  "claude-v1-100k",
3316
3532
  "claude-instant-v1",
3317
3533
  "text-bison@001"
@@ -7799,9 +8015,9 @@ export interface IVoiceGateway2VadParams {
7799
8015
  voiceMs?: number;
7800
8016
  mode?: number;
7801
8017
  }
7802
- export declare type TVoiceGateway2TTSVendor = "aws" | "elevenlabs" | "google" | "microsoft" | "nuance" | "default" | "custom";
8018
+ export declare type TVoiceGateway2TTSVendor = "aws" | "deepgram" | "elevenlabs" | "google" | "microsoft" | "nuance" | "default" | "custom";
7803
8019
  export interface IVoiceGateway2SynthesizerParams {
7804
- vendor?: TVoiceGateway2TTSVendor;
8020
+ vendor?: TVoiceGateway2TTSVendor | "default" | "none";
7805
8021
  language?: string;
7806
8022
  voice?: string;
7807
8023
  label?: string;
@@ -7812,11 +8028,12 @@ export interface IVoiceGateway2SynthesizerParams {
7812
8028
  engine?: "standard" | "neural";
7813
8029
  gender?: "MALE" | "FEMALE" | "NEUTRAL";
7814
8030
  azureServiceEndpoint?: string;
8031
+ options?: object;
7815
8032
  }
7816
8033
  export declare type TVoiceGateway2STTVendor = "aws" | "deepgram" | "google" | "microsoft" | "nuance" | "soniox" | "default" | "custom";
7817
8034
  export declare type TVoiceGateway2GoogleModel = "latest_short" | "latest_long" | "command_and_search" | "phone_call" | "video" | "medical_dictation" | "medical_conversation" | "default";
7818
8035
  export interface IVoiceGateway2RecognizerParams {
7819
- vendor?: TVoiceGateway2STTVendor;
8036
+ vendor?: TVoiceGateway2STTVendor | "default" | "none";
7820
8037
  language?: string;
7821
8038
  label?: string;
7822
8039
  fallbackVendor?: string;
@@ -7848,7 +8065,6 @@ export interface IVoiceGateway2RecognizerParams {
7848
8065
  requestSnr?: boolean;
7849
8066
  initialSpeechTimeoutMs?: number;
7850
8067
  azureSttEndpointId?: string;
7851
- azureTtsDeploymentId?: string;
7852
8068
  audioLogging?: boolean;
7853
8069
  asrDtmfTerminationDigit?: string;
7854
8070
  asrTimeout?: number;
@@ -8580,6 +8796,9 @@ export interface IKnowledgeSearchReturnValue {
8580
8796
  ];
8581
8797
  };
8582
8798
  }
8799
+ export interface IGetConversationTranscriptParams {
8800
+ turnLimit: number;
8801
+ }
8583
8802
  export interface ISensitiveLoggingSettings {
8584
8803
  maskLogging: boolean;
8585
8804
  maskAnalytics: boolean;
@@ -8637,6 +8856,7 @@ export interface IActions {
8637
8856
  deleteSystemContext?: (key: string) => void;
8638
8857
  getCache?: (key: string) => void;
8639
8858
  getContext?: (key: string) => any;
8859
+ getConversationTranscript?: (mode: "string" | "json", options: IGetConversationTranscriptParams) => ILastConversationEntry[];
8640
8860
  getLastTopic?: (type: any, age: number) => void;
8641
8861
  getState?: () => string;
8642
8862
  getSystemContext?: (key: string) => any;
@@ -9227,7 +9447,7 @@ export interface ISetTranslationNodeParams extends INodeFunctionBaseParams {
9227
9447
  setInputLanguageOnExecutionCount: number;
9228
9448
  };
9229
9449
  }
9230
- export interface INodeExecutionAPI extends Omit<IActions, "parseCognigyScriptCondition" | "parseCognigyScriptText" | "parseCognigyScriptResultLocation" | "think" | "thinkV2" | "addConditionalEntrypoint" | "addToInput" | "resetCognigyScriptInput" | "trackAnalyticsStep" | "executeCognigyNLU" | "handleIntentDefaultReply" | "completeGoal"> {
9450
+ export interface INodeExecutionAPI extends Omit<IActions, "parseCognigyScriptCondition" | "parseCognigyScriptText" | "parseCognigyScriptResultLocation" | "think" | "thinkV2" | "addConditionalEntrypoint" | "addToInput" | "resetCognigyScriptInput" | "trackAnalyticsStep" | "executeCognigyNLU" | "handleIntentDefaultReply" | "completeGoal" | "getConversationTranscript"> {
9231
9451
  setNextNode: (nodeId: string, newFlowId?: string) => void;
9232
9452
  resetNextNodes: () => void;
9233
9453
  stopExecution: () => void;
@@ -9317,6 +9537,7 @@ export interface INodeExecutionAPI extends Omit<IActions, "parseCognigyScriptCon
9317
9537
  matchPattern: (patternType: IPatternTypes, phrase: string, locale?: string) => IPatternMatchResult;
9318
9538
  getAgentAssistConfigId: () => string;
9319
9539
  countGPTTokens?: (prompt: string) => number;
9540
+ getConversationTranscript?: (mode: string, options?: any) => any;
9320
9541
  }
9321
9542
  export interface INodeExecutionCognigyObject extends IExecutionObjects {
9322
9543
  api: INodeExecutionAPI;
@@ -9485,6 +9706,7 @@ declare const nodeFieldTypes: readonly [
9485
9706
  "adaptivecard",
9486
9707
  "agentAssistConfig",
9487
9708
  "appTemplate",
9709
+ "backgroundSelector",
9488
9710
  "caseNode",
9489
9711
  "checkbox",
9490
9712
  "chipInput",
@@ -9683,7 +9905,9 @@ export interface IAppTemplate extends IEntityMeta {
9683
9905
  organisationReference: TMongoId;
9684
9906
  }
9685
9907
  export declare type IExtensionType = "nodes";
9686
- export interface IExtension extends IExtensionNodePackage, IEntityMeta {
9908
+ export interface IExtension extends IExtensionData, IExtensionNodePackage {
9909
+ }
9910
+ export interface IExtensionData extends IEntityMeta {
9687
9911
  /** The name of the extension */
9688
9912
  name: string;
9689
9913
  /** Optional human readable name of the extension */
@@ -9788,12 +10012,21 @@ export interface IKnowledgeStore extends IEntityMeta {
9788
10012
  projectReference: TMongoId;
9789
10013
  organisationReference: TMongoId;
9790
10014
  }
10015
+ export interface IGraphKnowledgeStoreAttachmentSource {
10016
+ _id: string;
10017
+ type: "attachedSource";
10018
+ }
10019
+ export interface IGraphKnowledgeStoreAttachmentChunk {
10020
+ _id: string;
10021
+ type: "attachedChunk";
10022
+ }
9791
10023
  export interface IGraphKnowledgeStore {
9792
10024
  type: "knowledgeStore";
9793
10025
  _id: TMongoId;
9794
10026
  name: string;
9795
10027
  referenceId: string;
9796
10028
  properties: Pick<IKnowledgeStore, "createdAt" | "createdBy" | "lastChanged" | "lastChangedBy">;
10029
+ dependencies?: (IGraphKnowledgeStoreAttachmentSource | IGraphKnowledgeStoreAttachmentChunk)[];
9797
10030
  }
9798
10031
  export interface ILexicon extends IEntityMeta {
9799
10032
  name: string;
@@ -14123,7 +14356,6 @@ export interface IVoiceConfigParams {
14123
14356
  bargeInOnDtmf: boolean;
14124
14357
  bargeInSticky: boolean;
14125
14358
  enableAdvancedSTTConfig: boolean;
14126
- enableAdvancedTTSConfig: boolean;
14127
14359
  sttLanguage: string;
14128
14360
  sttVendor: string;
14129
14361
  sttHints: string[];
@@ -14136,9 +14368,9 @@ export interface IVoiceConfigParams {
14136
14368
  ttsDisableCache: boolean;
14137
14369
  ttsVoice: string;
14138
14370
  ttsLanguage: string;
14139
- ttsVendor: TVoiceGateway2TTSVendor;
14371
+ ttsModel: string;
14372
+ ttsVendor: TVoiceGateway2TTSVendor | "default" | "none";
14140
14373
  ttsLabel: string;
14141
- azureTtsDeploymentId: string;
14142
14374
  azureSttContextId: string;
14143
14375
  azureSpeechRecognitionMode: string;
14144
14376
  azureEnableAudioLogging: boolean;
@@ -14242,11 +14474,10 @@ export interface IVoiceConfigParams {
14242
14474
  ttsVoice: string;
14243
14475
  ttsLanguage: string;
14244
14476
  ttsVendor: TVoiceGateway2TTSVendor;
14477
+ ttsModel: string;
14245
14478
  sttDisablePunctuation: boolean;
14246
14479
  azureSttContextId: string;
14247
14480
  azureEnableAudioLogging: boolean;
14248
- azureTtsDeploymentId: string;
14249
- enableAdvancedTTSConfig: boolean;
14250
14481
  googleModel: TVoiceGateway2GoogleModel;
14251
14482
  sttDeepgramTier: string;
14252
14483
  sttDeepgramModel: string;