@cognigy/rest-api-client 2025.21.0 → 2025.23.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 +15 -0
- package/build/apigroups/SimulationAPIGroup_2_0.js +6 -1
- package/build/shared/charts/descriptors/analytics/trackGoal.js +2 -2
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/azureOpenAIProviderOauth2Connection.js +3 -1
- package/build/shared/charts/descriptors/index.js +1 -0
- package/build/shared/charts/descriptors/knowledgeSearch/searchExtractOutput.js +5 -5
- package/build/shared/charts/descriptors/service/GPTPrompt.js +4 -4
- package/build/shared/charts/descriptors/service/agentTools/knowledgeTool.js +340 -0
- package/build/shared/charts/descriptors/service/aiAgent/aiAgentJob.js +7 -5
- package/build/shared/charts/descriptors/service/aiAgent/helpers/createToolDefinitions.js +35 -32
- package/build/shared/charts/descriptors/service/index.js +3 -1
- package/build/shared/charts/descriptors/service/llmPrompt/LLMPromptV2.js +7 -5
- package/build/shared/charts/descriptors/voice/mappers/msTeamsTransfer.mapper.js +36 -0
- package/build/shared/charts/descriptors/voicegateway2/index.js +16 -11
- package/build/shared/charts/descriptors/voicegateway2/nodes/msTeamsTransfer.js +126 -0
- package/build/shared/interfaces/IProfile.js +5 -1
- package/build/shared/interfaces/generativeAI/IGenerativeAIModels.js +3 -0
- package/build/shared/interfaces/resources/IAuditEvent.js +6 -1
- package/build/shared/interfaces/resources/IChartNode.js +7 -1
- package/build/shared/interfaces/resources/INodeDescriptorSet.js +11 -1
- package/build/shared/interfaces/resources/settings/IAgentSettings.js +12 -7
- package/build/shared/interfaces/resources/settings/IPiiDataRedactionSettings.js +142 -0
- package/build/shared/interfaces/resources/settings/index.js +4 -1
- package/build/shared/interfaces/restAPI/resources/project/v2.0/settings/IAgentSettings_2_0.js +104 -0
- package/build/shared/interfaces/restAPI/simulation/persona/IGeneratePersonaFromTranscriptRest_2_0.js +20 -0
- package/build/shared/interfaces/restAPI/simulation/simulation/ICloneSimulationRest_2_0.js +3 -0
- package/dist/esm/apigroups/SimulationAPIGroup_2_0.js +6 -1
- package/dist/esm/shared/charts/descriptors/analytics/trackGoal.js +2 -2
- package/dist/esm/shared/charts/descriptors/connectionNodes/generativeAIProviders/azureOpenAIProviderOauth2Connection.js +3 -1
- package/dist/esm/shared/charts/descriptors/index.js +2 -1
- package/dist/esm/shared/charts/descriptors/knowledgeSearch/searchExtractOutput.js +5 -5
- package/dist/esm/shared/charts/descriptors/service/GPTPrompt.js +4 -4
- package/dist/esm/shared/charts/descriptors/service/agentTools/knowledgeTool.js +338 -0
- package/dist/esm/shared/charts/descriptors/service/aiAgent/aiAgentJob.js +7 -5
- package/dist/esm/shared/charts/descriptors/service/aiAgent/helpers/createToolDefinitions.js +35 -32
- package/dist/esm/shared/charts/descriptors/service/index.js +1 -0
- package/dist/esm/shared/charts/descriptors/service/llmPrompt/LLMPromptV2.js +7 -5
- package/dist/esm/shared/charts/descriptors/voice/mappers/msTeamsTransfer.mapper.js +33 -0
- package/dist/esm/shared/charts/descriptors/voicegateway2/index.js +16 -11
- package/dist/esm/shared/charts/descriptors/voicegateway2/nodes/msTeamsTransfer.js +124 -0
- package/dist/esm/shared/interfaces/IProfile.js +4 -0
- package/dist/esm/shared/interfaces/generativeAI/IGenerativeAIModels.js +3 -0
- package/dist/esm/shared/interfaces/resources/IAuditEvent.js +6 -1
- package/dist/esm/shared/interfaces/resources/IChartNode.js +6 -0
- package/dist/esm/shared/interfaces/resources/INodeDescriptorSet.js +11 -1
- package/dist/esm/shared/interfaces/resources/settings/IAgentSettings.js +16 -11
- package/dist/esm/shared/interfaces/resources/settings/IPiiDataRedactionSettings.js +139 -0
- package/dist/esm/shared/interfaces/resources/settings/index.js +5 -4
- package/dist/esm/shared/interfaces/restAPI/resources/project/v2.0/settings/IAgentSettings_2_0.js +103 -1
- package/dist/esm/shared/interfaces/restAPI/simulation/persona/IGeneratePersonaFromTranscriptRest_2_0.js +19 -0
- package/dist/esm/shared/interfaces/restAPI/simulation/simulation/ICloneSimulationRest_2_0.js +2 -0
- package/package.json +1 -1
- package/types/index.d.ts +317 -36
|
@@ -33,35 +33,6 @@ export const createToolDefinitions = (childConfigs, api, useStrict) => __awaiter
|
|
|
33
33
|
continue;
|
|
34
34
|
}
|
|
35
35
|
const toolId = child.config.toolId;
|
|
36
|
-
if ((child.type === "aiAgentJobTool" || child.type === "llmPromptTool") &&
|
|
37
|
-
(!child.config.condition || !!(yield api.parseCognigyScriptCondition(child.config.condition)))) {
|
|
38
|
-
if (!toolId) {
|
|
39
|
-
throw new Error(`Tool ID is missing in Tool Node configuration.`);
|
|
40
|
-
}
|
|
41
|
-
const parsedToolId = yield api.parseCognigyScriptText(toolId);
|
|
42
|
-
if (!validateToolId(parsedToolId)) {
|
|
43
|
-
throw new Error(`Tool ID ${parsedToolId} is not valid. Please use only alphanumeric characters, dashes and underscores.`);
|
|
44
|
-
}
|
|
45
|
-
if (toolIds.includes(parsedToolId)) {
|
|
46
|
-
throw new Error(`Tool ID ${parsedToolId} is not unique. Please ensure each tool has a unique id.`);
|
|
47
|
-
}
|
|
48
|
-
toolIds.push(parsedToolId);
|
|
49
|
-
toolNames.push(parsedToolId);
|
|
50
|
-
const tool = {
|
|
51
|
-
type: "function",
|
|
52
|
-
function: {
|
|
53
|
-
name: parsedToolId,
|
|
54
|
-
description: yield api.parseCognigyScriptText(child.config.description),
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
if (useStrict) {
|
|
58
|
-
tool.function.strict = true;
|
|
59
|
-
}
|
|
60
|
-
if (child.config.useParameters) {
|
|
61
|
-
tool.function.parameters = child.config.parameters;
|
|
62
|
-
}
|
|
63
|
-
tools.push(tool);
|
|
64
|
-
}
|
|
65
36
|
if ((child.type === "aiAgentJobMCPTool" || child.type === "llmPromptMCPTool") &&
|
|
66
37
|
(!child.config.condition || !!(yield api.parseCognigyScriptCondition(child.config.condition)))) {
|
|
67
38
|
if (!child.config.mcpServerUrl) {
|
|
@@ -74,13 +45,16 @@ export const createToolDefinitions = (childConfigs, api, useStrict) => __awaiter
|
|
|
74
45
|
const toolFilter = child.config.toolFilter;
|
|
75
46
|
const mcpHeaders = child.config.mcpHeaders;
|
|
76
47
|
let mcpTools = null;
|
|
48
|
+
let fetchedFromCache = null;
|
|
77
49
|
try {
|
|
78
|
-
|
|
50
|
+
const fetched = yield api.fetchMcpTools({
|
|
79
51
|
mcpServerUrl,
|
|
80
52
|
timeout,
|
|
81
53
|
cacheTools,
|
|
82
54
|
mcpHeaders,
|
|
83
55
|
});
|
|
56
|
+
mcpTools = fetched.tools;
|
|
57
|
+
fetchedFromCache = fetched.fromCache;
|
|
84
58
|
}
|
|
85
59
|
catch (error) {
|
|
86
60
|
const errorDetails = error instanceof Error
|
|
@@ -93,11 +67,12 @@ export const createToolDefinitions = (childConfigs, api, useStrict) => __awaiter
|
|
|
93
67
|
}
|
|
94
68
|
if (mcpTools) {
|
|
95
69
|
if (sendDebug) {
|
|
70
|
+
const sourceLabel = fetchedFromCache ? "from cache" : "from MCP server";
|
|
96
71
|
if (mcpTools.length === 0) {
|
|
97
|
-
(_b = api.logDebugMessage) === null || _b === void 0 ? void 0 : _b.call(api, `No tools fetched from MCP Tool "${child.config.name}".`, "MCP Tool");
|
|
72
|
+
(_b = api.logDebugMessage) === null || _b === void 0 ? void 0 : _b.call(api, `No tools fetched from MCP Tool "${child.config.name}" (${sourceLabel}).`, "MCP Tool");
|
|
98
73
|
}
|
|
99
74
|
if (mcpTools.length > 0) {
|
|
100
|
-
const messageLines = [`Fetched tools from MCP Tool "${child.config.name}"`];
|
|
75
|
+
const messageLines = [`Fetched tools from MCP Tool "${child.config.name}" (${sourceLabel})`];
|
|
101
76
|
mcpTools.forEach((tool) => {
|
|
102
77
|
messageLines.push(`<br>- <b>${tool.name}</b>: ${tool.description}`);
|
|
103
78
|
if (child.config.debugMessageParameters && tool.inputSchema) {
|
|
@@ -162,6 +137,34 @@ export const createToolDefinitions = (childConfigs, api, useStrict) => __awaiter
|
|
|
162
137
|
tools.push(...structuredMcpTools);
|
|
163
138
|
}
|
|
164
139
|
}
|
|
140
|
+
if (!["llmPromptMCPTool", "aiAgentJobMCPTool"].includes(child.type) && (!child.config.condition || !!(yield api.parseCognigyScriptCondition(child.config.condition)))) {
|
|
141
|
+
if (!toolId) {
|
|
142
|
+
throw new Error(`Tool ID is missing in Tool Node configuration.`);
|
|
143
|
+
}
|
|
144
|
+
const parsedToolId = yield api.parseCognigyScriptText(toolId);
|
|
145
|
+
if (!validateToolId(parsedToolId)) {
|
|
146
|
+
throw new Error(`Tool ID ${parsedToolId} is not valid. Please use only alphanumeric characters, dashes and underscores.`);
|
|
147
|
+
}
|
|
148
|
+
if (toolIds.includes(parsedToolId)) {
|
|
149
|
+
throw new Error(`Tool ID ${parsedToolId} is not unique. Please ensure each tool has a unique id.`);
|
|
150
|
+
}
|
|
151
|
+
toolIds.push(parsedToolId);
|
|
152
|
+
toolNames.push(parsedToolId);
|
|
153
|
+
const tool = {
|
|
154
|
+
type: "function",
|
|
155
|
+
function: {
|
|
156
|
+
name: parsedToolId,
|
|
157
|
+
description: yield api.parseCognigyScriptText(child.config.description),
|
|
158
|
+
},
|
|
159
|
+
};
|
|
160
|
+
if (useStrict) {
|
|
161
|
+
tool.function.strict = true;
|
|
162
|
+
}
|
|
163
|
+
if (child.config.useParameters) {
|
|
164
|
+
tool.function.parameters = child.config.parameters;
|
|
165
|
+
}
|
|
166
|
+
tools.push(tool);
|
|
167
|
+
}
|
|
165
168
|
}
|
|
166
169
|
;
|
|
167
170
|
return {
|
|
@@ -28,6 +28,7 @@ export { AI_AGENT_JOB_MCP_TOOL } from "./aiAgent/aiAgentJobMCPTool";
|
|
|
28
28
|
export { AI_AGENT_TOOL_ANSWER } from "./aiAgent/aiAgentToolAnswer";
|
|
29
29
|
export { AI_AGENT_HANDOVER } from "./aiAgent/aiAgentHandover";
|
|
30
30
|
export { AI_AGENT_JOB_CALL_MCP_TOOL } from "./aiAgent/aiAgentJobCallMCPTool";
|
|
31
|
+
export { KNOWLEDGE_TOOL } from "./agentTools/knowledgeTool";
|
|
31
32
|
export { LOAD_AI_AGENT } from "./aiAgent/loadAiAgent";
|
|
32
33
|
export { LIVE_AGENT_CONNECTION, RINGCENTRAL_ENGAGE_CONNECTION, CHATWOOT_CONNECTION, EIGHT_BY_EIGHT_CONNECTION, GENESYS_CLOUD_CONNECTION, GENESYS_CLOUD_CONNECTION_OM } from "./handoverConnections";
|
|
33
34
|
export { NICECXONEAAH_AUTHENTICATION_CONNECTION } from "./niceCXOneAAHAuthenticationConnection";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { __awaiter, __rest } from "tslib";
|
|
2
|
+
/* Npm modules */
|
|
3
|
+
import * as crypto from "crypto";
|
|
2
4
|
/* Custom modules */
|
|
3
5
|
import { createNodeDescriptor } from "../../../createNodeDescriptor";
|
|
4
6
|
import { GO_TO } from "../../logic";
|
|
5
7
|
import { createToolDefinitions } from "../aiAgent/helpers/createToolDefinitions";
|
|
6
|
-
import { v4 as randomUUID } from "uuid";
|
|
7
8
|
import { createLastConverationString, createLastUserInputString, writeLLMDebugLogs } from "../../nlu/generativeSlotFiller/prompt";
|
|
8
9
|
import { InternalServerError } from "../../../../errors";
|
|
9
10
|
import { TranscriptEntryType, TranscriptRole } from "../../../../interfaces/transcripts/transcripts";
|
|
@@ -15,7 +16,7 @@ export const LLM_PROMPT_V2 = createNodeDescriptor({
|
|
|
15
16
|
collapsable: true,
|
|
16
17
|
placement: {
|
|
17
18
|
children: {
|
|
18
|
-
whitelist: ["llmPromptDefault", "llmPromptTool", "llmPromptMCPTool"],
|
|
19
|
+
whitelist: ["llmPromptDefault", "llmPromptTool", "llmPromptMCPTool", "knowledgeTool"],
|
|
19
20
|
},
|
|
20
21
|
},
|
|
21
22
|
},
|
|
@@ -778,8 +779,8 @@ export const LLM_PROMPT_V2 = createNodeDescriptor({
|
|
|
778
779
|
}
|
|
779
780
|
});
|
|
780
781
|
try {
|
|
781
|
-
const isStreamingChannel = input.
|
|
782
|
-
const _messageId = randomUUID();
|
|
782
|
+
const isStreamingChannel = input.endpointType === "webchat3" || input.channel === "adminconsole";
|
|
783
|
+
const _messageId = crypto.randomUUID();
|
|
783
784
|
// Start measuring LLM latency and time to first output if debug flag is enabled
|
|
784
785
|
let firstOutputTime = null;
|
|
785
786
|
/**
|
|
@@ -842,6 +843,7 @@ export const LLM_PROMPT_V2 = createNodeDescriptor({
|
|
|
842
843
|
rolesWhiteList: [TranscriptRole.USER, TranscriptRole.ASSISTANT, TranscriptRole.TOOL],
|
|
843
844
|
excludeDataOnlyMessagesFilter: [TranscriptRole.ASSISTANT],
|
|
844
845
|
useTextAlternativeForLLM,
|
|
846
|
+
excludeUserEventMessages: true,
|
|
845
847
|
});
|
|
846
848
|
llmPromptOptions["transcript"] = transcript;
|
|
847
849
|
llmPromptOptions["chat"] = [{
|
|
@@ -887,7 +889,7 @@ export const LLM_PROMPT_V2 = createNodeDescriptor({
|
|
|
887
889
|
// Find the child node with the toolId of the tool call
|
|
888
890
|
let toolChild = undefined;
|
|
889
891
|
for (const child of childConfigs) {
|
|
890
|
-
if (child.type
|
|
892
|
+
if (!["llmPromptDefault", "llmPromptMCPTool"].includes(child.type) && ((_e = child.config) === null || _e === void 0 ? void 0 : _e.toolId) && (yield api.parseCognigyScriptText((_f = child.config) === null || _f === void 0 ? void 0 : _f.toolId)) === mainToolCall.function.name) {
|
|
891
893
|
toolChild = child;
|
|
892
894
|
break;
|
|
893
895
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export const msTeamsTransfer = {
|
|
2
|
+
handleInput(endpointType, params) {
|
|
3
|
+
try {
|
|
4
|
+
return this.handleVGInput(params);
|
|
5
|
+
}
|
|
6
|
+
catch (error) {
|
|
7
|
+
throw Error(error.message);
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
handleVGInput(transferParam) {
|
|
11
|
+
const { transferTarget, callerName, topic, context, callSentiment, suggestedActions, } = transferParam;
|
|
12
|
+
const payload = {
|
|
13
|
+
_voiceGateway2: {
|
|
14
|
+
json: {}
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
let headers = {
|
|
18
|
+
"X-MS-TEAMS-CALLER-NAME": callerName,
|
|
19
|
+
"X-MS-TEAMS-CALL-TOPIC": topic,
|
|
20
|
+
"X-MS-TEAMS-CALL-CONTEXT": context,
|
|
21
|
+
"X-MS-TEAMS-CALL-CALL-SENTIMENT": callSentiment,
|
|
22
|
+
"X-MS-TEAMS-SUGGESTED-ACTIONS": suggestedActions,
|
|
23
|
+
};
|
|
24
|
+
const referVerb = {
|
|
25
|
+
"referTo": transferTarget,
|
|
26
|
+
"actionHook": 'refer',
|
|
27
|
+
headers
|
|
28
|
+
};
|
|
29
|
+
payload._voiceGateway2.json["sip:refer"] = referVerb;
|
|
30
|
+
return payload;
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=msTeamsTransfer.mapper.js.map
|
|
@@ -5,22 +5,27 @@ import { hangupNode } from "./nodes/hangup";
|
|
|
5
5
|
import { playNode } from "./nodes/play";
|
|
6
6
|
import { referNode } from "./nodes/refer";
|
|
7
7
|
import { transferNode } from "./nodes/transfer";
|
|
8
|
+
import { msTeamsTransferNode } from "./nodes/msTeamsTransfer";
|
|
8
9
|
import { setSessionConfigNode } from "./nodes/setSessionConfig";
|
|
9
10
|
import { sendMetadataNode } from "./nodes/sendMetadata";
|
|
10
11
|
import { recordNode } from "./nodes/record";
|
|
11
12
|
import { muteSpeechInputNode } from "./nodes/muteSpeechInput";
|
|
13
|
+
const nodes = [
|
|
14
|
+
setSessionConfigNode,
|
|
15
|
+
dtmfNode,
|
|
16
|
+
hangupNode,
|
|
17
|
+
playNode,
|
|
18
|
+
referNode,
|
|
19
|
+
transferNode,
|
|
20
|
+
sendMetadataNode,
|
|
21
|
+
recordNode,
|
|
22
|
+
muteSpeechInputNode,
|
|
23
|
+
];
|
|
24
|
+
if (process.env.FEATURE_DISABLE_MS_TEAMS_TRANSFER_NODE !== "true") {
|
|
25
|
+
nodes.push(msTeamsTransferNode);
|
|
26
|
+
}
|
|
12
27
|
export const cognigyVoiceGateway2Module = createExtension({
|
|
13
|
-
nodes
|
|
14
|
-
setSessionConfigNode,
|
|
15
|
-
dtmfNode,
|
|
16
|
-
hangupNode,
|
|
17
|
-
playNode,
|
|
18
|
-
referNode,
|
|
19
|
-
transferNode,
|
|
20
|
-
sendMetadataNode,
|
|
21
|
-
recordNode,
|
|
22
|
-
muteSpeechInputNode,
|
|
23
|
-
],
|
|
28
|
+
nodes,
|
|
24
29
|
connections: []
|
|
25
30
|
});
|
|
26
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
/** Custom Modules */
|
|
3
|
+
import { createNodeDescriptor } from "../../../createNodeDescriptor";
|
|
4
|
+
/** Helper Modules */
|
|
5
|
+
import { msTeamsTransfer } from "../../voice/mappers/msTeamsTransfer.mapper";
|
|
6
|
+
import { nodeColor } from "../utils/design";
|
|
7
|
+
const customHeaderDefaultValue = "X-Custom-Header";
|
|
8
|
+
export const msTeamsTransferNode = createNodeDescriptor({
|
|
9
|
+
type: "msTeamsTransfer",
|
|
10
|
+
defaultLabel: "MS Teams Transfer",
|
|
11
|
+
preview: {
|
|
12
|
+
key: "transferTarget",
|
|
13
|
+
type: "text",
|
|
14
|
+
},
|
|
15
|
+
appearance: {
|
|
16
|
+
color: nodeColor,
|
|
17
|
+
},
|
|
18
|
+
tags: ["voice"],
|
|
19
|
+
fields: [
|
|
20
|
+
{
|
|
21
|
+
key: "transferTarget",
|
|
22
|
+
label: "UI__NODE_EDITOR__VOICEGATEWAY2__TRANSFER__FIELDS__TRANSFER_TARGET__LABEL",
|
|
23
|
+
type: "cognigyText",
|
|
24
|
+
params: {
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
description: "UI__NODE_EDITOR__VOICEGATEWAY2__TRANSFER__FIELDS__TRANSFER_TARGET__DESCRIPTION",
|
|
28
|
+
defaultValue: "+49123456789",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
key: "callerName",
|
|
32
|
+
label: "UI__NODE_EDITOR__VOICEGATEWAY2__MSTEAMS_TRANSFER__FIELDS__CALLER_NAME__LABEL",
|
|
33
|
+
type: "cognigyText",
|
|
34
|
+
description: "UI__NODE_EDITOR__VOICEGATEWAY2__MSTEAMS_TRANSFER__FIELDS__CALLER_NAME__DESCRIPTION",
|
|
35
|
+
defaultValue: "",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
key: "topic",
|
|
39
|
+
label: "UI__NODE_EDITOR__VOICEGATEWAY2__MSTEAMS_TRANSFER__FIELDS__TOPIC__LABEL",
|
|
40
|
+
type: "cognigyText",
|
|
41
|
+
description: "UI__NODE_EDITOR__VOICEGATEWAY2__MSTEAMS_TRANSFER__FIELDS__TOPIC__DESCRIPTION",
|
|
42
|
+
defaultValue: "",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
key: "context",
|
|
46
|
+
label: "UI__NODE_EDITOR__VOICEGATEWAY2__MSTEAMS_TRANSFER__FIELDS__CONTEXT__LABEL",
|
|
47
|
+
type: "cognigyText",
|
|
48
|
+
description: "UI__NODE_EDITOR__VOICEGATEWAY2__MSTEAMS_TRANSFER__FIELDS__CONTEXT__DESCRIPTION",
|
|
49
|
+
defaultValue: "My context",
|
|
50
|
+
params: {
|
|
51
|
+
required: true,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
key: "callSentiment",
|
|
56
|
+
label: "UI__NODE_EDITOR__VOICEGATEWAY2__MSTEAMS_TRANSFER__FIELDS__CALL_SENTIMENT__LABEL",
|
|
57
|
+
type: "cognigyText",
|
|
58
|
+
description: "UI__NODE_EDITOR__VOICEGATEWAY2__MSTEAMS_TRANSFER__FIELDS__CALL_SENTIMENT__DESCRIPTION",
|
|
59
|
+
defaultValue: "",
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
key: "suggestedActions",
|
|
63
|
+
label: "UI__NODE_EDITOR__VOICEGATEWAY2__MSTEAMS_TRANSFER__FIELDS__SUGGESTED_ACTIONS__LABEL",
|
|
64
|
+
type: "cognigyText",
|
|
65
|
+
description: "UI__NODE_EDITOR__VOICEGATEWAY2__MSTEAMS_TRANSFER__FIELDS__SUGGESTED_ACTIONS__DESCRIPTION",
|
|
66
|
+
defaultValue: "",
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
form: [
|
|
70
|
+
{
|
|
71
|
+
type: "field",
|
|
72
|
+
key: "transferTarget"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
type: "field",
|
|
76
|
+
key: "callerName"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
type: "field",
|
|
80
|
+
key: "topic"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
type: "field",
|
|
84
|
+
key: "context"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
type: "field",
|
|
88
|
+
key: "callSentiment"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
type: "field",
|
|
92
|
+
key: "suggestedActions"
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
summary: "UI__NODE_EDITOR__VOICEGATEWAY2__TRANSFER__SUMMARY",
|
|
96
|
+
function: ({ cognigy, config, }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
97
|
+
const { api, input } = cognigy;
|
|
98
|
+
const { transferTarget, callerName, topic, context, callSentiment, suggestedActions, } = config;
|
|
99
|
+
const transferParams = {
|
|
100
|
+
transferTarget,
|
|
101
|
+
callerName,
|
|
102
|
+
topic,
|
|
103
|
+
context,
|
|
104
|
+
callSentiment,
|
|
105
|
+
suggestedActions,
|
|
106
|
+
};
|
|
107
|
+
try {
|
|
108
|
+
if (input.channel === "adminconsole") {
|
|
109
|
+
let textWarningAdminChannel = "Transferring a call is not supported in the Interaction Panel, please use the VoiceGateway endpoint.";
|
|
110
|
+
yield api.say(textWarningAdminChannel, null);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
const payload = msTeamsTransfer.handleInput("voiceGateway2", transferParams);
|
|
114
|
+
yield api.say(null, {
|
|
115
|
+
_cognigy: payload,
|
|
116
|
+
});
|
|
117
|
+
api.logDebugMessage(`UI__DEBUG_MODE__MS_TEAMS__TRANSFER__MESSAGE ${transferTarget}`);
|
|
118
|
+
}
|
|
119
|
+
catch (error) {
|
|
120
|
+
throw new Error(`Error on Transfer node type:. Error message: ${error.message}`);
|
|
121
|
+
}
|
|
122
|
+
}),
|
|
123
|
+
});
|
|
124
|
+
//# sourceMappingURL=msTeamsTransfer.js.map
|
|
@@ -3,12 +3,16 @@ import { createQuerySchema } from "../helper/createQuerySchema";
|
|
|
3
3
|
import { entityMetaSchema } from "./resources/IEntityMeta";
|
|
4
4
|
;
|
|
5
5
|
;
|
|
6
|
+
export const profileTypes = [
|
|
7
|
+
"simulator",
|
|
8
|
+
];
|
|
6
9
|
export const profileDataSchema = {
|
|
7
10
|
title: "profileDataSchema",
|
|
8
11
|
type: "object",
|
|
9
12
|
additionalProperties: false,
|
|
10
13
|
properties: {
|
|
11
14
|
active: { type: "boolean" },
|
|
15
|
+
type: { type: "string", enum: [...profileTypes] },
|
|
12
16
|
contactIds: { type: "array", items: { type: "string" }, additionalItems: false, minItems: 1 },
|
|
13
17
|
contactIdsHash: { type: "string" },
|
|
14
18
|
expiresAt: { type: "object" },
|
|
@@ -43,6 +43,9 @@ export const generativeAIModels = [
|
|
|
43
43
|
"gemini-1.5-flash",
|
|
44
44
|
"gemini-2.0-flash",
|
|
45
45
|
"gemini-2.0-flash-lite",
|
|
46
|
+
"gemini-2.5-pro",
|
|
47
|
+
"gemini-2.5-flash",
|
|
48
|
+
"gemini-2.5-flash-lite",
|
|
46
49
|
"amazon.nova-lite-v1:0",
|
|
47
50
|
"amazon.nova-pro-v1:0",
|
|
48
51
|
"amazon.nova-micro-v1:0",
|
|
@@ -4,7 +4,8 @@ export const auditEventTypes = [
|
|
|
4
4
|
"replace",
|
|
5
5
|
"patch",
|
|
6
6
|
"delete",
|
|
7
|
-
"
|
|
7
|
+
"authentication",
|
|
8
|
+
"authorization",
|
|
8
9
|
];
|
|
9
10
|
export const actionTypes = [
|
|
10
11
|
"acceptTermsOfService",
|
|
@@ -109,6 +110,10 @@ export const actionTypes = [
|
|
|
109
110
|
"updateObservationConfig",
|
|
110
111
|
"resolveAiOpsCenterError",
|
|
111
112
|
"odataRequest",
|
|
113
|
+
"loginSucceeded",
|
|
114
|
+
"loginFailed",
|
|
115
|
+
"loginError",
|
|
116
|
+
"unauthorized",
|
|
112
117
|
];
|
|
113
118
|
export const auditEventSchema = {
|
|
114
119
|
title: "auditEventSchema",
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
/* Custom Modules */
|
|
2
2
|
import { createQuerySchema } from "../../helper/createQuerySchema";
|
|
3
|
+
export var ConvertActionType;
|
|
4
|
+
(function (ConvertActionType) {
|
|
5
|
+
ConvertActionType["ADDED"] = "added";
|
|
6
|
+
ConvertActionType["REMOVED"] = "removed";
|
|
7
|
+
ConvertActionType["UPDATED"] = "updated";
|
|
8
|
+
})(ConvertActionType || (ConvertActionType = {}));
|
|
3
9
|
export const defaultNodeFields = [
|
|
4
10
|
"label",
|
|
5
11
|
"comment",
|
|
@@ -369,7 +369,17 @@ export const nodeDescriptorSchema = {
|
|
|
369
369
|
properties: {
|
|
370
370
|
_id: { type: "string", format: "mongo-id" },
|
|
371
371
|
type: { type: "string", minLength: 1, maxLength: 200 },
|
|
372
|
-
parentType: {
|
|
372
|
+
parentType: {
|
|
373
|
+
oneOf: [
|
|
374
|
+
{ type: "null" },
|
|
375
|
+
{ type: "string", minLength: 1, maxLength: 200 },
|
|
376
|
+
{
|
|
377
|
+
type: "array",
|
|
378
|
+
items: { type: "string", minLength: 1, maxLength: 200 },
|
|
379
|
+
minItems: 1
|
|
380
|
+
}
|
|
381
|
+
]
|
|
382
|
+
},
|
|
373
383
|
defaultLabel: {
|
|
374
384
|
oneOf: [
|
|
375
385
|
{ type: "string", minLength: 1, maxLength: 200 },
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { entityMetaSchema } from "../IEntityMeta";
|
|
2
2
|
import { sharedSettingsSchema } from "./ISharedSettings";
|
|
3
|
-
import { generativeAISettingsDataSchema } from "./IGenerativeAISettings";
|
|
4
|
-
import { audioPreviewSettingsDataSchema } from "./IAudioPreviewSettings";
|
|
5
|
-
import { translationSettingsDataSchema } from "./ITranslationSettings";
|
|
6
|
-
import { knowledgeAISettingsDataSchema } from "./IKnowledgeAISettings";
|
|
3
|
+
import { generativeAISettingsDataSchema, } from "./IGenerativeAISettings";
|
|
4
|
+
import { audioPreviewSettingsDataSchema, } from "./IAudioPreviewSettings";
|
|
5
|
+
import { translationSettingsDataSchema, } from "./ITranslationSettings";
|
|
6
|
+
import { knowledgeAISettingsDataSchema, } from "./IKnowledgeAISettings";
|
|
7
|
+
import { piiDataRedactionSettingsSchema, } from "./IPiiDataRedactionSettings";
|
|
7
8
|
export const agentSettingsDataSchema = {
|
|
8
9
|
title: "agentSettingsDataSchema",
|
|
9
10
|
type: "object",
|
|
@@ -11,31 +12,35 @@ export const agentSettingsDataSchema = {
|
|
|
11
12
|
properties: Object.assign(Object.assign({}, sharedSettingsSchema.properties), { trackDataOnlyInputs: { type: "boolean" }, collectAnalytics: { type: "boolean" }, timezone: { type: "string", format: "timezone" }, useCaseSensitiveIntentMapping: { type: "boolean" }, translationSettings: {
|
|
12
13
|
type: ["object", "null"],
|
|
13
14
|
additionalProperties: false,
|
|
14
|
-
properties: Object.assign({}, translationSettingsDataSchema.properties)
|
|
15
|
+
properties: Object.assign({}, translationSettingsDataSchema.properties),
|
|
15
16
|
}, audioPreviewSettings: {
|
|
16
17
|
type: ["object", "null"],
|
|
17
18
|
additionalProperties: false,
|
|
18
|
-
properties: Object.assign({}, audioPreviewSettingsDataSchema.properties)
|
|
19
|
+
properties: Object.assign({}, audioPreviewSettingsDataSchema.properties),
|
|
19
20
|
}, generativeAISettings: {
|
|
20
21
|
type: ["object", "null"],
|
|
21
22
|
additionalProperties: false,
|
|
22
|
-
properties: Object.assign({}, generativeAISettingsDataSchema.properties)
|
|
23
|
+
properties: Object.assign({}, generativeAISettingsDataSchema.properties),
|
|
23
24
|
}, currencySettings: {
|
|
24
25
|
type: ["object", "null"],
|
|
25
26
|
additionalProperties: false,
|
|
26
27
|
properties: {
|
|
27
28
|
currency: { type: "string", format: "currency-code" },
|
|
28
|
-
}
|
|
29
|
+
},
|
|
29
30
|
}, knowledgeAISettings: {
|
|
30
31
|
type: ["object", "null"],
|
|
31
32
|
additionalProperties: false,
|
|
32
|
-
properties: Object.assign({}, knowledgeAISettingsDataSchema.properties)
|
|
33
|
-
}
|
|
33
|
+
properties: Object.assign({}, knowledgeAISettingsDataSchema.properties),
|
|
34
|
+
}, piiDataRedactionSettings: {
|
|
35
|
+
type: ["object", "null"],
|
|
36
|
+
additionalProperties: false,
|
|
37
|
+
properties: Object.assign({}, piiDataRedactionSettingsSchema.properties),
|
|
38
|
+
} }),
|
|
34
39
|
};
|
|
35
40
|
export const agentSettingsSchema = {
|
|
36
41
|
title: "agentSettingsSchema",
|
|
37
42
|
type: "object",
|
|
38
43
|
additionalProperties: false,
|
|
39
|
-
properties: Object.assign(Object.assign(Object.assign({}, entityMetaSchema.properties), agentSettingsDataSchema.properties), { projectReference: { type: "string", format: "mongo-id" }, organisationReference: { type: "string", format: "mongo-id" } })
|
|
44
|
+
properties: Object.assign(Object.assign(Object.assign({}, entityMetaSchema.properties), agentSettingsDataSchema.properties), { projectReference: { type: "string", format: "mongo-id" }, organisationReference: { type: "string", format: "mongo-id" } }),
|
|
40
45
|
};
|
|
41
46
|
//# sourceMappingURL=IAgentSettings.js.map
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
export var EPiiBehaviorType;
|
|
2
|
+
(function (EPiiBehaviorType) {
|
|
3
|
+
EPiiBehaviorType["PREDEFINED_ALIAS"] = "predefined-alias";
|
|
4
|
+
EPiiBehaviorType["CUSTOM_ALIAS"] = "custom-alias";
|
|
5
|
+
})(EPiiBehaviorType || (EPiiBehaviorType = {}));
|
|
6
|
+
export const piiFieldSettingsSchema = {
|
|
7
|
+
title: "piiFieldSettingsSchema",
|
|
8
|
+
type: "object",
|
|
9
|
+
additionalProperties: false,
|
|
10
|
+
required: ["enabled", "name"],
|
|
11
|
+
properties: {
|
|
12
|
+
enabled: { type: "boolean" },
|
|
13
|
+
behavior: {
|
|
14
|
+
oneOf: [
|
|
15
|
+
{
|
|
16
|
+
type: "object",
|
|
17
|
+
additionalProperties: false,
|
|
18
|
+
required: ["type"],
|
|
19
|
+
properties: {
|
|
20
|
+
type: {
|
|
21
|
+
type: "string",
|
|
22
|
+
enum: [EPiiBehaviorType.PREDEFINED_ALIAS],
|
|
23
|
+
},
|
|
24
|
+
customAlias: { type: "null" },
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
type: "object",
|
|
29
|
+
additionalProperties: false,
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
required: ["type", "customAlias"],
|
|
32
|
+
properties: {
|
|
33
|
+
type: {
|
|
34
|
+
type: "string",
|
|
35
|
+
enum: [EPiiBehaviorType.CUSTOM_ALIAS],
|
|
36
|
+
},
|
|
37
|
+
customAlias: {
|
|
38
|
+
type: "string",
|
|
39
|
+
minLength: 3,
|
|
40
|
+
maxLength: 100
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
scope: {
|
|
47
|
+
type: ["object", "null"],
|
|
48
|
+
additionalProperties: false,
|
|
49
|
+
required: ["logs", "analytics"],
|
|
50
|
+
properties: {
|
|
51
|
+
logs: { type: "boolean" },
|
|
52
|
+
analytics: { type: "boolean" },
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
name: { type: "string", minLength: 3, maxLength: 100, pattern: "^[a-zA-Z0-9_\\s]+$" },
|
|
56
|
+
},
|
|
57
|
+
if: {
|
|
58
|
+
properties: {
|
|
59
|
+
enabled: { const: true }
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
then: {
|
|
63
|
+
required: ["enabled", "name", "behavior", "scope"]
|
|
64
|
+
},
|
|
65
|
+
else: {
|
|
66
|
+
required: ["enabled", "name"]
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
export const customPatternSettingsSchema = {
|
|
70
|
+
title: "customPatternSettingsSchema",
|
|
71
|
+
type: "object",
|
|
72
|
+
additionalProperties: false,
|
|
73
|
+
required: ["name", "regex", "behavior", "scope"],
|
|
74
|
+
properties: {
|
|
75
|
+
regex: {
|
|
76
|
+
type: "string",
|
|
77
|
+
minLength: 1,
|
|
78
|
+
maxLength: 1000
|
|
79
|
+
},
|
|
80
|
+
behavior: {
|
|
81
|
+
type: "object",
|
|
82
|
+
additionalProperties: false,
|
|
83
|
+
// @ts-ignore
|
|
84
|
+
required: ["type", "customAlias"],
|
|
85
|
+
properties: {
|
|
86
|
+
type: {
|
|
87
|
+
type: "string",
|
|
88
|
+
enum: [EPiiBehaviorType.CUSTOM_ALIAS],
|
|
89
|
+
},
|
|
90
|
+
customAlias: {
|
|
91
|
+
type: "string",
|
|
92
|
+
minLength: 3,
|
|
93
|
+
maxLength: 100
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
scope: {
|
|
98
|
+
type: ["object", "null"],
|
|
99
|
+
additionalProperties: false,
|
|
100
|
+
required: ["logs", "analytics"],
|
|
101
|
+
properties: {
|
|
102
|
+
logs: { type: "boolean" },
|
|
103
|
+
analytics: { type: "boolean" },
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
name: {
|
|
107
|
+
type: "string",
|
|
108
|
+
minLength: 3,
|
|
109
|
+
maxLength: 100,
|
|
110
|
+
pattern: "^[a-zA-Z0-9_\\s]+$"
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
export const piiDataRedactionSettingsSchema = {
|
|
115
|
+
title: "piiDataRedactionSettingsSchema",
|
|
116
|
+
type: "object",
|
|
117
|
+
additionalProperties: false,
|
|
118
|
+
required: [
|
|
119
|
+
"emailAddress",
|
|
120
|
+
"phoneNumber",
|
|
121
|
+
"creditCard",
|
|
122
|
+
"ssn",
|
|
123
|
+
"ipAddressV4",
|
|
124
|
+
"ipAddressV6",
|
|
125
|
+
],
|
|
126
|
+
properties: {
|
|
127
|
+
emailAddress: piiFieldSettingsSchema,
|
|
128
|
+
phoneNumber: piiFieldSettingsSchema,
|
|
129
|
+
creditCard: piiFieldSettingsSchema,
|
|
130
|
+
ssn: piiFieldSettingsSchema,
|
|
131
|
+
ipAddressV4: piiFieldSettingsSchema,
|
|
132
|
+
ipAddressV6: piiFieldSettingsSchema,
|
|
133
|
+
customTypes: {
|
|
134
|
+
type: ["object", "null"],
|
|
135
|
+
additionalProperties: customPatternSettingsSchema
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
//# sourceMappingURL=IPiiDataRedactionSettings.js.map
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export { agentSettingsDataSchema, agentSettingsSchema, } from "./IAgentSettings";
|
|
2
|
-
export { flowIntentMappingOrderType, flowSettingsDataSchema, flowSettingsSchema } from "./IFlowSettings";
|
|
2
|
+
export { flowIntentMappingOrderType, flowSettingsDataSchema, flowSettingsSchema, } from "./IFlowSettings";
|
|
3
3
|
export { sharedSettingsSchema } from "./ISharedSettings";
|
|
4
|
-
export { generativeAISettingsDataSchema } from "./IGenerativeAISettings";
|
|
5
|
-
export { audioPreviewSettingsDataSchema, audioPreviewProviders } from "./IAudioPreviewSettings";
|
|
6
|
-
export { translationSettingsDataSchema, translationProviders } from "./ITranslationSettings";
|
|
4
|
+
export { generativeAISettingsDataSchema, } from "./IGenerativeAISettings";
|
|
5
|
+
export { audioPreviewSettingsDataSchema, audioPreviewProviders, } from "./IAudioPreviewSettings";
|
|
6
|
+
export { translationSettingsDataSchema, translationProviders, } from "./ITranslationSettings";
|
|
7
7
|
export { knowledgeAISettingsDataSchema, fileExtractorOptions, } from "./IKnowledgeAISettings";
|
|
8
|
+
export { EPiiBehaviorType, piiDataRedactionSettingsSchema, } from "./IPiiDataRedactionSettings";
|
|
8
9
|
//# sourceMappingURL=index.js.map
|