@cognigy/rest-api-client 4.93.0 → 4.95.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.
- package/CHANGELOG.md +5 -0
- package/build/authentication/AuthenticationAPI.js +1 -1
- package/build/shared/charts/descriptors/agentAssist/helpers/knowledgeSearch/errorHandler.helper.js +1 -1
- package/build/shared/charts/descriptors/agentAssist/knowledgeAssist.js +1 -1
- package/build/shared/charts/descriptors/agentAssist/nextActionAssist.js +1 -1
- package/build/shared/charts/descriptors/analytics/overwriteAnalytics.js +1 -1
- package/build/shared/charts/descriptors/analytics/requestRating.js +1 -1
- package/build/shared/charts/descriptors/knowledgeSearch/searchExtractOutput.js +6 -6
- package/build/shared/charts/descriptors/liveAgent/assistInfo.js +1 -1
- package/build/shared/charts/descriptors/logic/thinkV2.js +1 -1
- package/build/shared/charts/descriptors/message/checkChannelChange/checkChannelChange.js +2 -2
- package/build/shared/charts/descriptors/message/say.js +2 -2
- package/build/shared/charts/descriptors/message/sendText.js +1 -1
- package/build/shared/charts/descriptors/microsoft/getToken.js +1 -1
- package/build/shared/charts/descriptors/microsoft/invalidateToken.js +1 -1
- package/build/shared/charts/descriptors/service/GPTConversation.js +14 -14
- package/build/shared/charts/descriptors/service/GPTPrompt.js +4 -4
- package/build/shared/charts/descriptors/service/aiAgent/aiAgentJob.js +4 -4
- package/build/shared/charts/descriptors/service/handover.js +1 -1
- package/build/shared/charts/descriptors/service/jwtSecret.js +5 -3
- package/build/shared/charts/descriptors/voice/nodes/bargeIn.js +1 -1
- package/build/shared/charts/descriptors/voice/nodes/continuousAsr.js +1 -1
- package/build/shared/charts/descriptors/voice/nodes/dtmf.js +1 -1
- package/build/shared/charts/descriptors/voice/nodes/hangup.js +1 -1
- package/build/shared/charts/descriptors/voice/nodes/muteSpeechInput.js +1 -1
- package/build/shared/charts/descriptors/voice/nodes/noUserInput.js +1 -1
- package/build/shared/charts/descriptors/voice/nodes/play.js +1 -1
- package/build/shared/charts/descriptors/voice/nodes/sendMetadata.js +1 -1
- package/build/shared/charts/descriptors/voice/nodes/sessionSpeechParameters.js +1 -1
- package/build/shared/charts/descriptors/voice/nodes/transfer.js +2 -2
- package/build/shared/charts/descriptors/voicegateway/nodes/agentAssist.js +1 -1
- package/build/shared/charts/descriptors/voicegateway/nodes/callRecording.js +2 -2
- package/build/shared/charts/descriptors/voicegateway/nodes/handover.js +2 -2
- package/build/shared/charts/descriptors/voicegateway/nodes/hangup.js +1 -1
- package/build/shared/charts/descriptors/voicegateway/nodes/playURL.js +1 -1
- package/build/shared/charts/descriptors/voicegateway/nodes/sendMessage.js +3 -2
- package/build/shared/charts/descriptors/voicegateway/nodes/sendMetaData.js +1 -1
- package/build/shared/charts/descriptors/voicegateway/nodes/setSessionParams.js +2 -2
- package/build/shared/charts/descriptors/voicegateway2/nodes/dtmf.js +1 -1
- package/build/shared/charts/descriptors/voicegateway2/nodes/hangup.js +1 -1
- package/build/shared/charts/descriptors/voicegateway2/nodes/muteSpeechInput.js +1 -1
- package/build/shared/charts/descriptors/voicegateway2/nodes/play.js +1 -1
- package/build/shared/charts/descriptors/voicegateway2/nodes/record.js +3 -3
- package/build/shared/charts/descriptors/voicegateway2/nodes/refer.js +2 -2
- package/build/shared/charts/descriptors/voicegateway2/nodes/sendMetadata.js +1 -1
- package/build/shared/charts/descriptors/voicegateway2/nodes/setSessionConfig.js +1 -1
- package/build/shared/charts/descriptors/voicegateway2/nodes/transfer.js +2 -2
- package/build/shared/interfaces/IProfile.js +1 -0
- package/build/shared/interfaces/IProfileSchema.js +5 -0
- package/build/shared/interfaces/handover.js +2 -1
- package/build/shared/interfaces/messageAPI/endpoints.js +1 -0
- package/build/shared/interfaces/resources/IConnection.js +3 -2
- package/build/shared/interfaces/resources/IGlobalResource.js +3 -0
- package/build/shared/interfaces/resources/ILargeLanguageModel.js +10 -1
- package/build/shared/interfaces/resources/INodeDescriptorSet.js +2 -1
- package/build/shared/interfaces/resources/TRestChannelType.js +7 -2
- package/dist/esm/authentication/AuthenticationAPI.js +1 -1
- package/dist/esm/shared/charts/descriptors/agentAssist/helpers/knowledgeSearch/errorHandler.helper.js +1 -1
- package/dist/esm/shared/charts/descriptors/agentAssist/knowledgeAssist.js +1 -1
- package/dist/esm/shared/charts/descriptors/agentAssist/nextActionAssist.js +1 -1
- package/dist/esm/shared/charts/descriptors/analytics/overwriteAnalytics.js +1 -1
- package/dist/esm/shared/charts/descriptors/analytics/requestRating.js +1 -1
- package/dist/esm/shared/charts/descriptors/knowledgeSearch/searchExtractOutput.js +6 -6
- package/dist/esm/shared/charts/descriptors/liveAgent/assistInfo.js +1 -1
- package/dist/esm/shared/charts/descriptors/logic/thinkV2.js +1 -1
- package/dist/esm/shared/charts/descriptors/message/checkChannelChange/checkChannelChange.js +2 -2
- package/dist/esm/shared/charts/descriptors/message/say.js +2 -2
- package/dist/esm/shared/charts/descriptors/message/sendText.js +1 -1
- package/dist/esm/shared/charts/descriptors/microsoft/getToken.js +1 -1
- package/dist/esm/shared/charts/descriptors/microsoft/invalidateToken.js +1 -1
- package/dist/esm/shared/charts/descriptors/service/GPTConversation.js +15 -15
- package/dist/esm/shared/charts/descriptors/service/GPTPrompt.js +4 -4
- package/dist/esm/shared/charts/descriptors/service/aiAgent/aiAgentJob.js +4 -4
- package/dist/esm/shared/charts/descriptors/service/handover.js +1 -1
- package/dist/esm/shared/charts/descriptors/service/jwtSecret.js +5 -3
- package/dist/esm/shared/charts/descriptors/voice/nodes/bargeIn.js +1 -1
- package/dist/esm/shared/charts/descriptors/voice/nodes/continuousAsr.js +1 -1
- package/dist/esm/shared/charts/descriptors/voice/nodes/dtmf.js +1 -1
- package/dist/esm/shared/charts/descriptors/voice/nodes/hangup.js +1 -1
- package/dist/esm/shared/charts/descriptors/voice/nodes/muteSpeechInput.js +1 -1
- package/dist/esm/shared/charts/descriptors/voice/nodes/noUserInput.js +1 -1
- package/dist/esm/shared/charts/descriptors/voice/nodes/play.js +1 -1
- package/dist/esm/shared/charts/descriptors/voice/nodes/sendMetadata.js +1 -1
- package/dist/esm/shared/charts/descriptors/voice/nodes/sessionSpeechParameters.js +1 -1
- package/dist/esm/shared/charts/descriptors/voice/nodes/transfer.js +2 -2
- package/dist/esm/shared/charts/descriptors/voicegateway/nodes/agentAssist.js +1 -1
- package/dist/esm/shared/charts/descriptors/voicegateway/nodes/callRecording.js +2 -2
- package/dist/esm/shared/charts/descriptors/voicegateway/nodes/handover.js +2 -2
- package/dist/esm/shared/charts/descriptors/voicegateway/nodes/hangup.js +1 -1
- package/dist/esm/shared/charts/descriptors/voicegateway/nodes/playURL.js +1 -1
- package/dist/esm/shared/charts/descriptors/voicegateway/nodes/sendMessage.js +3 -2
- package/dist/esm/shared/charts/descriptors/voicegateway/nodes/sendMetaData.js +1 -1
- package/dist/esm/shared/charts/descriptors/voicegateway/nodes/setSessionParams.js +2 -2
- package/dist/esm/shared/charts/descriptors/voicegateway2/nodes/dtmf.js +1 -1
- package/dist/esm/shared/charts/descriptors/voicegateway2/nodes/hangup.js +1 -1
- package/dist/esm/shared/charts/descriptors/voicegateway2/nodes/muteSpeechInput.js +1 -1
- package/dist/esm/shared/charts/descriptors/voicegateway2/nodes/play.js +1 -1
- package/dist/esm/shared/charts/descriptors/voicegateway2/nodes/record.js +3 -3
- package/dist/esm/shared/charts/descriptors/voicegateway2/nodes/refer.js +2 -2
- package/dist/esm/shared/charts/descriptors/voicegateway2/nodes/sendMetadata.js +1 -1
- package/dist/esm/shared/charts/descriptors/voicegateway2/nodes/setSessionConfig.js +1 -1
- package/dist/esm/shared/charts/descriptors/voicegateway2/nodes/transfer.js +2 -2
- package/dist/esm/shared/interfaces/IProfile.js +1 -0
- package/dist/esm/shared/interfaces/IProfileSchema.js +5 -0
- package/dist/esm/shared/interfaces/handover.js +2 -1
- package/dist/esm/shared/interfaces/messageAPI/endpoints.js +1 -0
- package/dist/esm/shared/interfaces/resources/IConnection.js +3 -2
- package/dist/esm/shared/interfaces/resources/IGlobalResource.js +2 -0
- package/dist/esm/shared/interfaces/resources/ILargeLanguageModel.js +10 -1
- package/dist/esm/shared/interfaces/resources/INodeDescriptorSet.js +2 -1
- package/dist/esm/shared/interfaces/resources/TRestChannelType.js +7 -2
- package/package.json +3 -2
- package/types/index.d.ts +201 -94
- package/build/shared/interfaces/license.js.map +0 -1
- package/build/test.js +0 -1
- package/dist/esm/shared/interfaces/license.js.map +0 -1
- package/dist/esm/test.js +0 -1
|
@@ -766,11 +766,11 @@ export const AI_AGENT_JOB = createNodeDescriptor({
|
|
|
766
766
|
const generated_buffer_phrase = (_h = (_g = lastToolCall === null || lastToolCall === void 0 ? void 0 : lastToolCall.function) === null || _g === void 0 ? void 0 : _g.arguments) === null || _h === void 0 ? void 0 : _h.generated_buffer_phrase;
|
|
767
767
|
if (generated_buffer_phrase) {
|
|
768
768
|
// output the generated buffer phrase. Don't add it to the transcript, else the LLM will repeat it next time.
|
|
769
|
-
(_j = api.output) === null || _j === void 0 ? void 0 : _j.call(api, generated_buffer_phrase, {
|
|
769
|
+
yield ((_j = api.output) === null || _j === void 0 ? void 0 : _j.call(api, generated_buffer_phrase, {
|
|
770
770
|
_cognigy: {
|
|
771
771
|
_preventTranscript: true
|
|
772
772
|
}
|
|
773
|
-
});
|
|
773
|
+
}));
|
|
774
774
|
}
|
|
775
775
|
}
|
|
776
776
|
if (knowledgeSearchTags && knowledgeSearchTags.length > 0) {
|
|
@@ -1076,7 +1076,7 @@ export const AI_AGENT_JOB = createNodeDescriptor({
|
|
|
1076
1076
|
}
|
|
1077
1077
|
// Optionally output the result immediately
|
|
1078
1078
|
if (llmResult.result && outputImmediately && !llmPromptOptions.stream) {
|
|
1079
|
-
(_2 = api.output) === null || _2 === void 0 ? void 0 : _2.call(api, llmResult.result, {});
|
|
1079
|
+
yield ((_2 = api.output) === null || _2 === void 0 ? void 0 : _2.call(api, llmResult.result, {}));
|
|
1080
1080
|
}
|
|
1081
1081
|
// If we are streaming and we got a result, also store it into the transcript, since streamed chunks are not stored there
|
|
1082
1082
|
if (llmResult.result && llmPromptOptions.stream) {
|
|
@@ -1122,7 +1122,7 @@ export const AI_AGENT_JOB = createNodeDescriptor({
|
|
|
1122
1122
|
if (errorHandling === "continue") {
|
|
1123
1123
|
// output the timeout message
|
|
1124
1124
|
if (errorMessage) {
|
|
1125
|
-
(_8 = api.output) === null || _8 === void 0 ? void 0 : _8.call(api, errorMessage, null);
|
|
1125
|
+
yield ((_8 = api.output) === null || _8 === void 0 ? void 0 : _8.call(api, errorMessage, null));
|
|
1126
1126
|
}
|
|
1127
1127
|
// Set default node as next node
|
|
1128
1128
|
const defaultChild = childConfigs.find(child => child.type === "aiAgentJobDefault");
|
|
@@ -99,7 +99,7 @@ export const HANDOVER = createNodeDescriptor({
|
|
|
99
99
|
function: ({ cognigy, config, childConfigs, nodeId }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
100
100
|
const { api, input } = cognigy;
|
|
101
101
|
if (input.channel === "adminconsole") {
|
|
102
|
-
api.output("You are using the deprecated Handover Node. Please find the new Handover to Agent Node in the Node Selection Menu.", null);
|
|
102
|
+
yield api.output("You are using the deprecated Handover Node. Please find the new Handover to Agent Node in the Node Selection Menu.", null);
|
|
103
103
|
}
|
|
104
104
|
yield api.handover({ cognigy, config, nodeId, childConfigs });
|
|
105
105
|
})
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/* JWT Secret Connection */
|
|
2
2
|
export const JWT_SECRET_CONNECTION = {
|
|
3
|
-
type: "
|
|
4
|
-
label: "
|
|
5
|
-
fields: [
|
|
3
|
+
type: "AgentCopilotAuthentication",
|
|
4
|
+
label: "UI__NODE_EDITOR__AGENT_COPILOT_AUTHENTICATION_SECRET__LABEL",
|
|
5
|
+
fields: [
|
|
6
|
+
{ fieldName: "jwtSecret", label: "UI__CONNECTION_EDITOR__FIELD_JWT SECRET" },
|
|
7
|
+
],
|
|
6
8
|
};
|
|
7
9
|
//# sourceMappingURL=jwtSecret.js.map
|
|
@@ -94,7 +94,7 @@ export const BARGE_IN = createNodeDescriptor({
|
|
|
94
94
|
const payload = setSessionConfig.handleInput(endpointType, voiceConfigParamsToVoiceSettings(config, api));
|
|
95
95
|
/* we need to store this for the DTMF Collect - Config node */
|
|
96
96
|
api.setSystemContext("vgSettings", { bargeInOnDtmf: config.bargeInOnDtmf });
|
|
97
|
-
api.say(null, {
|
|
97
|
+
yield api.say(null, {
|
|
98
98
|
_cognigy: payload,
|
|
99
99
|
});
|
|
100
100
|
logFullConfigToDebugMode(cognigy, config);
|
|
@@ -58,7 +58,7 @@ export const CONTINUOUS_ASR = createNodeDescriptor({
|
|
|
58
58
|
const { endpointType } = input;
|
|
59
59
|
try {
|
|
60
60
|
const payload = setSessionConfig.handleInput(endpointType, voiceConfigParamsToVoiceSettings(config, api));
|
|
61
|
-
api.say(null, {
|
|
61
|
+
yield api.say(null, {
|
|
62
62
|
_cognigy: payload,
|
|
63
63
|
});
|
|
64
64
|
logFullConfigToDebugMode(cognigy, config);
|
|
@@ -67,7 +67,7 @@ export const DTMF = createNodeDescriptor({
|
|
|
67
67
|
const { endpointType } = input;
|
|
68
68
|
try {
|
|
69
69
|
const payload = setSessionConfig.handleInput(endpointType, voiceConfigParamsToVoiceSettings(config, api));
|
|
70
|
-
api.say(null, {
|
|
70
|
+
yield api.say(null, {
|
|
71
71
|
_cognigy: payload,
|
|
72
72
|
});
|
|
73
73
|
logFullConfigToDebugMode(cognigy, config);
|
|
@@ -38,7 +38,7 @@ export const MUTE_SPEECH_INPUT = createNodeDescriptor({
|
|
|
38
38
|
try {
|
|
39
39
|
mapper.endpointType = endpointType;
|
|
40
40
|
const payload = mapper.handleInput(config, api);
|
|
41
|
-
api.say(null, {
|
|
41
|
+
yield api.say(null, {
|
|
42
42
|
_cognigy: payload
|
|
43
43
|
});
|
|
44
44
|
api.logDebugMessage(`UI__DEBUG_MODE__MUTE_SPEECH__MESSAGE ${config.muteSpeechInput}`);
|
|
@@ -93,7 +93,7 @@ export const USER_INPUT_TIMEOUT = createNodeDescriptor({
|
|
|
93
93
|
const { endpointType } = input;
|
|
94
94
|
try {
|
|
95
95
|
const payload = setSessionConfig.handleInput(endpointType, voiceConfigParamsToVoiceSettings(config, api));
|
|
96
|
-
api.say(null, {
|
|
96
|
+
yield api.say(null, {
|
|
97
97
|
_cognigy: payload,
|
|
98
98
|
});
|
|
99
99
|
logFullConfigToDebugMode(cognigy, config);
|
|
@@ -328,7 +328,7 @@ export const SESSION_SPEECH_PARAMETERS = createNodeDescriptor({
|
|
|
328
328
|
const { endpointType } = input;
|
|
329
329
|
try {
|
|
330
330
|
const payload = setSessionConfig.handleInput(endpointType, voiceConfigParamsToVoiceSettings(config, api));
|
|
331
|
-
api.say(null, {
|
|
331
|
+
yield api.say(null, {
|
|
332
332
|
_cognigy: payload,
|
|
333
333
|
});
|
|
334
334
|
logFullConfigToDebugMode(cognigy, config);
|
|
@@ -95,7 +95,7 @@ export const TRANSFER_VOICE = createNodeDescriptor({
|
|
|
95
95
|
const { endpointType } = input;
|
|
96
96
|
try {
|
|
97
97
|
if (input.channel === "adminconsole") {
|
|
98
|
-
api.say("Transferring a call is not supported in the Interaction Panel.", null);
|
|
98
|
+
yield api.say("Transferring a call is not supported in the Interaction Panel.", null);
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
101
|
const transferParams = {
|
|
@@ -113,7 +113,7 @@ export const TRANSFER_VOICE = createNodeDescriptor({
|
|
|
113
113
|
api.log("error", "Invalid JSON in Transfer SIP Headers");
|
|
114
114
|
}
|
|
115
115
|
const payload = transfer.handleInput(endpointType, transferParams, true);
|
|
116
|
-
api.say(null, {
|
|
116
|
+
yield api.say(null, {
|
|
117
117
|
_cognigy: payload,
|
|
118
118
|
});
|
|
119
119
|
logFullConfigToDebugMode(cognigy, config);
|
|
@@ -107,11 +107,11 @@ export const callRecordingNode = createNodeDescriptor({
|
|
|
107
107
|
}
|
|
108
108
|
const { isFeatureAccmEnabled } = api.getEndpointSettings();
|
|
109
109
|
if (isFeatureAccmEnabled) {
|
|
110
|
-
return api.say(null, {
|
|
110
|
+
return yield api.say(null, {
|
|
111
111
|
_cognigy: buildPayloadAccm("callRecording", config, nodeId)
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
api.output(null, {
|
|
114
|
+
yield api.output(null, {
|
|
115
115
|
_cognigy: {
|
|
116
116
|
_voiceGateway: {
|
|
117
117
|
json: {
|
|
@@ -129,12 +129,12 @@ export const handoverNode = createNodeDescriptor({
|
|
|
129
129
|
};
|
|
130
130
|
try {
|
|
131
131
|
if (input.channel === "adminconsole") {
|
|
132
|
-
api.say("Transferring a call is not supported in the Interaction Panel, please use the AudioCodes endpoint.", null);
|
|
132
|
+
yield api.say("Transferring a call is not supported in the Interaction Panel, please use the AudioCodes endpoint.", null);
|
|
133
133
|
return;
|
|
134
134
|
}
|
|
135
135
|
const { isFeatureAccmEnabled } = api.getEndpointSettings();
|
|
136
136
|
const payload = isFeatureAccmEnabled ? buildPayloadAccm("handover", transferParams, nodeId) : transfer.handleInput("audioCodes", transferParams);
|
|
137
|
-
api.say(null, {
|
|
137
|
+
yield api.say(null, {
|
|
138
138
|
_cognigy: payload
|
|
139
139
|
});
|
|
140
140
|
}
|
|
@@ -36,7 +36,7 @@ export const hangupNode = createNodeDescriptor({
|
|
|
36
36
|
try {
|
|
37
37
|
const { isFeatureAccmEnabled } = api.getEndpointSettings();
|
|
38
38
|
const payload = isFeatureAccmEnabled ? buildPayloadAccm("hangup", config, nodeId) : hangUp.handleInput("audioCodes", hangupReason);
|
|
39
|
-
api.say(null, {
|
|
39
|
+
yield api.say(null, {
|
|
40
40
|
_cognigy: payload
|
|
41
41
|
});
|
|
42
42
|
}
|
|
@@ -117,7 +117,7 @@ export const playURLNode = createNodeDescriptor({
|
|
|
117
117
|
try {
|
|
118
118
|
const { isFeatureAccmEnabled } = api.getEndpointSettings();
|
|
119
119
|
const payload = isFeatureAccmEnabled ? buildPayloadAccm("playURL", config, nodeId) : play.handleInput({ endpointType: 'audioCodes', config });
|
|
120
|
-
api.say(null, {
|
|
120
|
+
yield api.say(null, {
|
|
121
121
|
_cognigy: payload
|
|
122
122
|
});
|
|
123
123
|
}
|
|
@@ -248,16 +248,17 @@ export const sendMessageNode = createNodeDescriptor({
|
|
|
248
248
|
const { text, activityParams, setActivityParams } = config;
|
|
249
249
|
const { isFeatureAccmEnabled } = api.getEndpointSettings();
|
|
250
250
|
if (isFeatureAccmEnabled && text) {
|
|
251
|
-
|
|
251
|
+
yield api.say(null, {
|
|
252
252
|
_cognigy: buildPayloadAccm("sendMessage", config, nodeId)
|
|
253
253
|
});
|
|
254
|
+
return;
|
|
254
255
|
}
|
|
255
256
|
let compiledParams = activityParams || {};
|
|
256
257
|
if (setActivityParams) {
|
|
257
258
|
compileParams(config, compiledParams);
|
|
258
259
|
}
|
|
259
260
|
if (text) {
|
|
260
|
-
api.output(null, {
|
|
261
|
+
yield api.output(null, {
|
|
261
262
|
"_cognigy": {
|
|
262
263
|
"_voiceGateway": {
|
|
263
264
|
"json": {
|
|
@@ -35,7 +35,7 @@ export const sendMetaDataNode = createNodeDescriptor({
|
|
|
35
35
|
try {
|
|
36
36
|
const { isFeatureAccmEnabled } = api.getEndpointSettings();
|
|
37
37
|
const payload = isFeatureAccmEnabled ? buildPayloadAccm("sendMetadata", config, nodeId) : sendMetadata.handleInput("audioCodes", config.metaData);
|
|
38
|
-
api.output(null, {
|
|
38
|
+
yield api.output(null, {
|
|
39
39
|
_cognigy: payload
|
|
40
40
|
});
|
|
41
41
|
}
|
|
@@ -51,14 +51,14 @@ export const setSessionParamsNode = createNodeDescriptor({
|
|
|
51
51
|
const { sessionParams } = config;
|
|
52
52
|
const { isFeatureAccmEnabled } = api.getEndpointSettings();
|
|
53
53
|
if (isFeatureAccmEnabled) {
|
|
54
|
-
return api.say(null, {
|
|
54
|
+
return yield api.say(null, {
|
|
55
55
|
_cognigy: buildPayloadAccm("setSessionParams", config, nodeId)
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
let compiledParams = sessionParams || {};
|
|
59
59
|
compileParams(config, compiledParams);
|
|
60
60
|
// output the activity to the voice gateway
|
|
61
|
-
api.output(null, {
|
|
61
|
+
yield api.output(null, {
|
|
62
62
|
"_cognigy": {
|
|
63
63
|
"_voiceGateway": {
|
|
64
64
|
"json": {
|
|
@@ -32,7 +32,7 @@ export const hangupNode = createNodeDescriptor({
|
|
|
32
32
|
const { hangupReason } = config;
|
|
33
33
|
try {
|
|
34
34
|
const payload = hangUp.handleInput("voiceGateway2", hangupReason);
|
|
35
|
-
api.say(null, {
|
|
35
|
+
yield api.say(null, {
|
|
36
36
|
_cognigy: payload
|
|
37
37
|
});
|
|
38
38
|
api.logDebugMessage(`UI__DEBUG_MODE__HANGUP__MESSAGE ${hangupReason}`);
|
|
@@ -48,7 +48,7 @@ export const muteSpeechInputNode = createNodeDescriptor({
|
|
|
48
48
|
const { api } = cognigy;
|
|
49
49
|
try {
|
|
50
50
|
const payload = mapper.handleInput(config, api);
|
|
51
|
-
api.say(null, {
|
|
51
|
+
yield api.say(null, {
|
|
52
52
|
_cognigy: payload
|
|
53
53
|
});
|
|
54
54
|
logFullConfigToDebugMode(cognigy, config);
|
|
@@ -52,7 +52,7 @@ export const recordNode = createNodeDescriptor({
|
|
|
52
52
|
label: "UI__NODE_EDITOR__VOICEGATEWAY2__FIELDS__SIPREC_SERVER_URL__LABEL",
|
|
53
53
|
type: "cognigyText",
|
|
54
54
|
description: "UI__NODE_EDITOR__VOICEGATEWAY2__FIELDS__SIPREC_SERVER_URL__DESCRIPTION",
|
|
55
|
-
defaultValue:
|
|
55
|
+
defaultValue: "",
|
|
56
56
|
condition: {
|
|
57
57
|
key: "action",
|
|
58
58
|
value: "startCallRecording"
|
|
@@ -63,7 +63,7 @@ export const recordNode = createNodeDescriptor({
|
|
|
63
63
|
label: "UI__NODE_EDITOR__VOICEGATEWAY2__FIELDS__RECORDING_ID__LABEL",
|
|
64
64
|
type: "cognigyText",
|
|
65
65
|
description: "UI__NODE_EDITOR__VOICEGATEWAY2__FIELDS__RECORDING_ID__DESCRIPTION",
|
|
66
|
-
defaultValue:
|
|
66
|
+
defaultValue: "",
|
|
67
67
|
condition: {
|
|
68
68
|
key: "action",
|
|
69
69
|
value: "startCallRecording"
|
|
@@ -95,7 +95,7 @@ export const recordNode = createNodeDescriptor({
|
|
|
95
95
|
};
|
|
96
96
|
try {
|
|
97
97
|
const payload = mapper.handleInput(recordInput, api, false);
|
|
98
|
-
api.say(null, {
|
|
98
|
+
yield api.say(null, {
|
|
99
99
|
_cognigy: payload
|
|
100
100
|
});
|
|
101
101
|
}
|
|
@@ -86,10 +86,10 @@ export const referNode = createNodeDescriptor({
|
|
|
86
86
|
try {
|
|
87
87
|
const payload = transfer.handleInput("voiceGateway2", transferParams, false);
|
|
88
88
|
if (input.channel === "adminconsole") {
|
|
89
|
-
api.output('You are using the deprecated Refer Node. Please replace it with new Transfer Node in the Node Selection Menu.', null);
|
|
89
|
+
yield api.output('You are using the deprecated Refer Node. Please replace it with new Transfer Node in the Node Selection Menu.', null);
|
|
90
90
|
}
|
|
91
91
|
api.log('error', 'You are using the deprecated Refer Node. Please replace it with new Transfer Node in the Node Selection Menu.');
|
|
92
|
-
api.say(null, {
|
|
92
|
+
yield api.say(null, {
|
|
93
93
|
_cognigy: payload
|
|
94
94
|
});
|
|
95
95
|
}
|
|
@@ -1074,7 +1074,7 @@ export const setSessionConfigNode = createNodeDescriptor({
|
|
|
1074
1074
|
try {
|
|
1075
1075
|
const voiceSettings = voiceConfigParamsToVoiceSettings(config, api);
|
|
1076
1076
|
const payload = setSessionConfig.handleVGInput(voiceSettings, sessionParams, api);
|
|
1077
|
-
api.say(null, {
|
|
1077
|
+
yield api.say(null, {
|
|
1078
1078
|
_cognigy: payload,
|
|
1079
1079
|
});
|
|
1080
1080
|
logFullConfigToDebugMode(cognigy, voiceSettings);
|
|
@@ -506,7 +506,7 @@ export const transferNode = createNodeDescriptor({
|
|
|
506
506
|
if (agentAssistEnabled && !dialTranscriptionWebhook) {
|
|
507
507
|
textWarningAdminChannel = `${textWarningAdminChannel + "\n"} Copilot is enabled but no transcription webhook is configured. Please configure a transcription webhook in the Transfer node.`;
|
|
508
508
|
}
|
|
509
|
-
api.say(textWarningAdminChannel, null);
|
|
509
|
+
yield api.say(textWarningAdminChannel, null);
|
|
510
510
|
return;
|
|
511
511
|
}
|
|
512
512
|
if (agentAssistEnabled && dialTranscriptionWebhook) {
|
|
@@ -545,7 +545,7 @@ export const transferNode = createNodeDescriptor({
|
|
|
545
545
|
api.log("error", "Invalid JSON in Transfer SIP Headers");
|
|
546
546
|
}
|
|
547
547
|
const payload = transfer.handleInput("voiceGateway2", transferParams, false, recognitionChannel, sttVendor, sttLanguage, googleModel, sttDeepgramModel, sttDisablePunctuation, deepgramEndpointing, deepgramEndpointingValue, deepgramSmartFormatting, anchorMedia);
|
|
548
|
-
api.say(null, {
|
|
548
|
+
yield api.say(null, {
|
|
549
549
|
_cognigy: payload,
|
|
550
550
|
});
|
|
551
551
|
api.logDebugMessage(`${transferType} UI__DEBUG_MODE__TRANSFER__MESSAGE ${transferTarget}`);
|
|
@@ -10,6 +10,7 @@ export const profileDataSchema = {
|
|
|
10
10
|
properties: {
|
|
11
11
|
active: { type: "boolean" },
|
|
12
12
|
contactIds: { type: "array", items: { type: "string" }, additionalItems: false, minItems: 1 },
|
|
13
|
+
contactIdsHash: { type: "string" },
|
|
13
14
|
expiresAt: { type: "object" },
|
|
14
15
|
profile: {},
|
|
15
16
|
},
|
|
@@ -21,6 +21,11 @@ export const profileSchemaSchema = {
|
|
|
21
21
|
},
|
|
22
22
|
} }),
|
|
23
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* WARNING!!
|
|
26
|
+
* make sure to update the default values for the profile mongoose model in the models/profiles.ts file
|
|
27
|
+
* when changing the profile schema and the default profile object below
|
|
28
|
+
*/
|
|
24
29
|
export const defaultProfile = {
|
|
25
30
|
firstname: "",
|
|
26
31
|
lastname: "",
|
|
@@ -98,7 +98,8 @@ export const handoverSettingsSchema = {
|
|
|
98
98
|
enableTranscriptTile: { type: "boolean" },
|
|
99
99
|
enableTranscriptTileChatInput: { type: "boolean" },
|
|
100
100
|
redactTranscriptTileMessages: { type: "boolean" },
|
|
101
|
-
|
|
101
|
+
enableAgentCopilotAuthentication: { type: "boolean" },
|
|
102
|
+
agentCopilotAuthentication: { type: "string" },
|
|
102
103
|
}
|
|
103
104
|
}
|
|
104
105
|
}
|
|
@@ -8,7 +8,7 @@ export const connectionFieldReturnFormat = [
|
|
|
8
8
|
];
|
|
9
9
|
export const generateConnectionsRedisKey = (data) => {
|
|
10
10
|
return [
|
|
11
|
-
`organisationId:${data.organisationReference}
|
|
11
|
+
`organisationId:${data.organisationReference}:${data.projectReference ? `projectId:${data.projectReference}:` : ''}connection:${data.referenceId}`
|
|
12
12
|
];
|
|
13
13
|
};
|
|
14
14
|
export const connectionFieldDataSchema = {
|
|
@@ -50,7 +50,8 @@ export const connectionDataSchema = {
|
|
|
50
50
|
},
|
|
51
51
|
extension: { type: "string", format: "package-name" },
|
|
52
52
|
type: { type: "string", format: "resource-name" },
|
|
53
|
-
isDeprecated: { type: "boolean" }
|
|
53
|
+
isDeprecated: { type: "boolean" },
|
|
54
|
+
resourceLevel: { type: "string", enum: ["organisation", "project"] }
|
|
54
55
|
}
|
|
55
56
|
};
|
|
56
57
|
export const connectionSchema = {
|
|
@@ -119,7 +119,16 @@ export const largeLanguageModelDataSchema = {
|
|
|
119
119
|
alephAlpha: alephAlphaMetaSchema,
|
|
120
120
|
anthropic: anthropicMetaSchema,
|
|
121
121
|
awsBedrock: awsBedrockMetaSchema,
|
|
122
|
-
fallbacks: llmFallbackSchema
|
|
122
|
+
fallbacks: llmFallbackSchema,
|
|
123
|
+
resourceLevel: { type: "string", enum: ["organisation", "project"] },
|
|
124
|
+
assignedToProjects: {
|
|
125
|
+
type: "array",
|
|
126
|
+
uniqueItems: true,
|
|
127
|
+
items: {
|
|
128
|
+
type: "string",
|
|
129
|
+
format: "mongo-id"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
123
132
|
}
|
|
124
133
|
};
|
|
125
134
|
export const largeLanguageModelSchema = {
|
|
@@ -95,6 +95,7 @@ export const nodeFieldTypes = [
|
|
|
95
95
|
"checkbox",
|
|
96
96
|
"chipInput",
|
|
97
97
|
"code",
|
|
98
|
+
"cognigyLLMText",
|
|
98
99
|
"cognigyText",
|
|
99
100
|
"cognigyTextArray",
|
|
100
101
|
"condition",
|
|
@@ -137,7 +138,7 @@ export const nodeFieldTypes = [
|
|
|
137
138
|
"toggle",
|
|
138
139
|
"ttsSelect",
|
|
139
140
|
"typescript",
|
|
140
|
-
"xml"
|
|
141
|
+
"xml"
|
|
141
142
|
];
|
|
142
143
|
export const searchableNodeFieldTypes = [
|
|
143
144
|
"text",
|
|
@@ -13,7 +13,8 @@ export const restChannelTypes = [
|
|
|
13
13
|
"nonConversational",
|
|
14
14
|
"amazonLex",
|
|
15
15
|
"genesysBotConnector",
|
|
16
|
-
"niceCXOne"
|
|
16
|
+
"niceCXOne",
|
|
17
|
+
"niceCXOneAAH",
|
|
17
18
|
];
|
|
18
19
|
export const restChannelDisplayNames = [
|
|
19
20
|
{
|
|
@@ -75,6 +76,10 @@ export const restChannelDisplayNames = [
|
|
|
75
76
|
{
|
|
76
77
|
channel: "niceCXOne",
|
|
77
78
|
displayName: "NICE CXone"
|
|
78
|
-
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
channel: "niceCXOneAAH",
|
|
82
|
+
displayName: "NICE CXone AAH"
|
|
83
|
+
},
|
|
79
84
|
];
|
|
80
85
|
//# sourceMappingURL=TRestChannelType.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cognigy/rest-api-client",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.95.0",
|
|
4
4
|
"description": "Cognigy REST-Client",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -73,7 +73,8 @@
|
|
|
73
73
|
"typescript": "4.7.4"
|
|
74
74
|
},
|
|
75
75
|
"engines": {
|
|
76
|
-
"node": ">=
|
|
76
|
+
"node": ">=22.1.0",
|
|
77
|
+
"npm": ">=10.1.0",
|
|
77
78
|
"vscode": "^1.22.0"
|
|
78
79
|
}
|
|
79
80
|
}
|