@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AIOPS_CENTER_WEBHOOKS_CONNECTION = exports.NICECXONEAAH_AUTHENTICATION_CONNECTION = exports.GENESYS_CLOUD_CONNECTION_OM = exports.GENESYS_CLOUD_CONNECTION = exports.EIGHT_BY_EIGHT_CONNECTION = exports.CHATWOOT_CONNECTION = exports.RINGCENTRAL_ENGAGE_CONNECTION = exports.LIVE_AGENT_CONNECTION = exports.LOAD_AI_AGENT = exports.AI_AGENT_JOB_CALL_MCP_TOOL = exports.AI_AGENT_HANDOVER = exports.AI_AGENT_TOOL_ANSWER = exports.AI_AGENT_JOB_MCP_TOOL = exports.AI_AGENT_JOB_TOOL = exports.AI_AGENT_JOB_DEFAULT = exports.AI_AGENT_JOB = exports.LLM_MODERATE = exports.LLM_ENTITY_EXTRACT = exports.GPT_CONVERSATION_SUMMARY = exports.GPT_CONVERSATION = exports.HANDOVER_INACTIVITY_TIMER = exports.CLOSE_HANDOVER = exports.LLM_PROMPT_TOOL = exports.LLM_PROMPT_MCP_TOOL = exports.LLM_PROMPT_DEFAULT = exports.LLM_PROMPT_V2 = exports.GPT_PROMPT = exports.ON_SCHEDULING_ERROR = exports.ON_SCHEDULED = exports.TRIGGER_FUNCTION = exports.JWT_SECRET_CONNECTION = exports.HTTP_CONNECTION_OAUTH2 = exports.HTTP_CONNECTION_APIKEYXKEY = exports.HTTP_CONNECTION_APIKEYAUTHKEY = exports.HTTP_CONNECTION_BASIC = exports.HTTP_REQUEST = exports.CHECK_AGENT_AVAILABILITY = exports.HANDOVER_V2 = exports.HANDOVER = void 0;
|
|
3
|
+
exports.AIOPS_CENTER_WEBHOOKS_CONNECTION = exports.NICECXONEAAH_AUTHENTICATION_CONNECTION = exports.GENESYS_CLOUD_CONNECTION_OM = exports.GENESYS_CLOUD_CONNECTION = exports.EIGHT_BY_EIGHT_CONNECTION = exports.CHATWOOT_CONNECTION = exports.RINGCENTRAL_ENGAGE_CONNECTION = exports.LIVE_AGENT_CONNECTION = exports.LOAD_AI_AGENT = exports.KNOWLEDGE_TOOL = exports.AI_AGENT_JOB_CALL_MCP_TOOL = exports.AI_AGENT_HANDOVER = exports.AI_AGENT_TOOL_ANSWER = exports.AI_AGENT_JOB_MCP_TOOL = exports.AI_AGENT_JOB_TOOL = exports.AI_AGENT_JOB_DEFAULT = exports.AI_AGENT_JOB = exports.LLM_MODERATE = exports.LLM_ENTITY_EXTRACT = exports.GPT_CONVERSATION_SUMMARY = exports.GPT_CONVERSATION = exports.HANDOVER_INACTIVITY_TIMER = exports.CLOSE_HANDOVER = exports.LLM_PROMPT_TOOL = exports.LLM_PROMPT_MCP_TOOL = exports.LLM_PROMPT_DEFAULT = exports.LLM_PROMPT_V2 = exports.GPT_PROMPT = exports.ON_SCHEDULING_ERROR = exports.ON_SCHEDULED = exports.TRIGGER_FUNCTION = exports.JWT_SECRET_CONNECTION = exports.HTTP_CONNECTION_OAUTH2 = exports.HTTP_CONNECTION_APIKEYXKEY = exports.HTTP_CONNECTION_APIKEYAUTHKEY = exports.HTTP_CONNECTION_BASIC = exports.HTTP_REQUEST = exports.CHECK_AGENT_AVAILABILITY = exports.HANDOVER_V2 = exports.HANDOVER = void 0;
|
|
4
4
|
var handover_1 = require("./handover");
|
|
5
5
|
Object.defineProperty(exports, "HANDOVER", { enumerable: true, get: function () { return handover_1.HANDOVER; } });
|
|
6
6
|
var handoverV2_1 = require("./handoverV2");
|
|
@@ -59,6 +59,8 @@ var aiAgentHandover_1 = require("./aiAgent/aiAgentHandover");
|
|
|
59
59
|
Object.defineProperty(exports, "AI_AGENT_HANDOVER", { enumerable: true, get: function () { return aiAgentHandover_1.AI_AGENT_HANDOVER; } });
|
|
60
60
|
var aiAgentJobCallMCPTool_1 = require("./aiAgent/aiAgentJobCallMCPTool");
|
|
61
61
|
Object.defineProperty(exports, "AI_AGENT_JOB_CALL_MCP_TOOL", { enumerable: true, get: function () { return aiAgentJobCallMCPTool_1.AI_AGENT_JOB_CALL_MCP_TOOL; } });
|
|
62
|
+
var knowledgeTool_1 = require("./agentTools/knowledgeTool");
|
|
63
|
+
Object.defineProperty(exports, "KNOWLEDGE_TOOL", { enumerable: true, get: function () { return knowledgeTool_1.KNOWLEDGE_TOOL; } });
|
|
62
64
|
var loadAiAgent_1 = require("./aiAgent/loadAiAgent");
|
|
63
65
|
Object.defineProperty(exports, "LOAD_AI_AGENT", { enumerable: true, get: function () { return loadAiAgent_1.LOAD_AI_AGENT; } });
|
|
64
66
|
var handoverConnections_1 = require("./handoverConnections");
|
|
@@ -12,11 +12,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.LLM_PROMPT_V2 = void 0;
|
|
15
|
+
/* Npm modules */
|
|
16
|
+
const crypto = require("crypto");
|
|
15
17
|
/* Custom modules */
|
|
16
18
|
const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
17
19
|
const logic_1 = require("../../logic");
|
|
18
20
|
const createToolDefinitions_1 = require("../aiAgent/helpers/createToolDefinitions");
|
|
19
|
-
const uuid_1 = require("uuid");
|
|
20
21
|
const prompt_1 = require("../../nlu/generativeSlotFiller/prompt");
|
|
21
22
|
const errors_1 = require("../../../../errors");
|
|
22
23
|
const transcripts_1 = require("../../../../interfaces/transcripts/transcripts");
|
|
@@ -28,7 +29,7 @@ exports.LLM_PROMPT_V2 = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
28
29
|
collapsable: true,
|
|
29
30
|
placement: {
|
|
30
31
|
children: {
|
|
31
|
-
whitelist: ["llmPromptDefault", "llmPromptTool", "llmPromptMCPTool"],
|
|
32
|
+
whitelist: ["llmPromptDefault", "llmPromptTool", "llmPromptMCPTool", "knowledgeTool"],
|
|
32
33
|
},
|
|
33
34
|
},
|
|
34
35
|
},
|
|
@@ -791,8 +792,8 @@ exports.LLM_PROMPT_V2 = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
791
792
|
}
|
|
792
793
|
};
|
|
793
794
|
try {
|
|
794
|
-
const isStreamingChannel = input.
|
|
795
|
-
const _messageId =
|
|
795
|
+
const isStreamingChannel = input.endpointType === "webchat3" || input.channel === "adminconsole";
|
|
796
|
+
const _messageId = crypto.randomUUID();
|
|
796
797
|
// Start measuring LLM latency and time to first output if debug flag is enabled
|
|
797
798
|
let firstOutputTime = null;
|
|
798
799
|
/**
|
|
@@ -855,6 +856,7 @@ exports.LLM_PROMPT_V2 = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
855
856
|
rolesWhiteList: [transcripts_1.TranscriptRole.USER, transcripts_1.TranscriptRole.ASSISTANT, transcripts_1.TranscriptRole.TOOL],
|
|
856
857
|
excludeDataOnlyMessagesFilter: [transcripts_1.TranscriptRole.ASSISTANT],
|
|
857
858
|
useTextAlternativeForLLM,
|
|
859
|
+
excludeUserEventMessages: true,
|
|
858
860
|
});
|
|
859
861
|
llmPromptOptions["transcript"] = transcript;
|
|
860
862
|
llmPromptOptions["chat"] = [{
|
|
@@ -900,7 +902,7 @@ exports.LLM_PROMPT_V2 = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
900
902
|
// Find the child node with the toolId of the tool call
|
|
901
903
|
let toolChild = undefined;
|
|
902
904
|
for (const child of childConfigs) {
|
|
903
|
-
if (child.type
|
|
905
|
+
if (!["llmPromptDefault", "llmPromptMCPTool"].includes(child.type) && ((_e = child.config) === null || _e === void 0 ? void 0 : _e.toolId) && await api.parseCognigyScriptText((_f = child.config) === null || _f === void 0 ? void 0 : _f.toolId) === mainToolCall.function.name) {
|
|
904
906
|
toolChild = child;
|
|
905
907
|
break;
|
|
906
908
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.msTeamsTransfer = void 0;
|
|
4
|
+
exports.msTeamsTransfer = {
|
|
5
|
+
handleInput(endpointType, params) {
|
|
6
|
+
try {
|
|
7
|
+
return this.handleVGInput(params);
|
|
8
|
+
}
|
|
9
|
+
catch (error) {
|
|
10
|
+
throw Error(error.message);
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
handleVGInput(transferParam) {
|
|
14
|
+
const { transferTarget, callerName, topic, context, callSentiment, suggestedActions, } = transferParam;
|
|
15
|
+
const payload = {
|
|
16
|
+
_voiceGateway2: {
|
|
17
|
+
json: {}
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
let headers = {
|
|
21
|
+
"X-MS-TEAMS-CALLER-NAME": callerName,
|
|
22
|
+
"X-MS-TEAMS-CALL-TOPIC": topic,
|
|
23
|
+
"X-MS-TEAMS-CALL-CONTEXT": context,
|
|
24
|
+
"X-MS-TEAMS-CALL-CALL-SENTIMENT": callSentiment,
|
|
25
|
+
"X-MS-TEAMS-SUGGESTED-ACTIONS": suggestedActions,
|
|
26
|
+
};
|
|
27
|
+
const referVerb = {
|
|
28
|
+
"referTo": transferTarget,
|
|
29
|
+
"actionHook": 'refer',
|
|
30
|
+
headers
|
|
31
|
+
};
|
|
32
|
+
payload._voiceGateway2.json["sip:refer"] = referVerb;
|
|
33
|
+
return payload;
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=msTeamsTransfer.mapper.js.map
|
|
@@ -8,22 +8,27 @@ const hangup_1 = require("./nodes/hangup");
|
|
|
8
8
|
const play_1 = require("./nodes/play");
|
|
9
9
|
const refer_1 = require("./nodes/refer");
|
|
10
10
|
const transfer_1 = require("./nodes/transfer");
|
|
11
|
+
const msTeamsTransfer_1 = require("./nodes/msTeamsTransfer");
|
|
11
12
|
const setSessionConfig_1 = require("./nodes/setSessionConfig");
|
|
12
13
|
const sendMetadata_1 = require("./nodes/sendMetadata");
|
|
13
14
|
const record_1 = require("./nodes/record");
|
|
14
15
|
const muteSpeechInput_1 = require("./nodes/muteSpeechInput");
|
|
16
|
+
const nodes = [
|
|
17
|
+
setSessionConfig_1.setSessionConfigNode,
|
|
18
|
+
dtmf_1.dtmfNode,
|
|
19
|
+
hangup_1.hangupNode,
|
|
20
|
+
play_1.playNode,
|
|
21
|
+
refer_1.referNode,
|
|
22
|
+
transfer_1.transferNode,
|
|
23
|
+
sendMetadata_1.sendMetadataNode,
|
|
24
|
+
record_1.recordNode,
|
|
25
|
+
muteSpeechInput_1.muteSpeechInputNode,
|
|
26
|
+
];
|
|
27
|
+
if (process.env.FEATURE_DISABLE_MS_TEAMS_TRANSFER_NODE !== "true") {
|
|
28
|
+
nodes.push(msTeamsTransfer_1.msTeamsTransferNode);
|
|
29
|
+
}
|
|
15
30
|
exports.cognigyVoiceGateway2Module = (0, createNodeDescriptor_1.createExtension)({
|
|
16
|
-
nodes
|
|
17
|
-
setSessionConfig_1.setSessionConfigNode,
|
|
18
|
-
dtmf_1.dtmfNode,
|
|
19
|
-
hangup_1.hangupNode,
|
|
20
|
-
play_1.playNode,
|
|
21
|
-
refer_1.referNode,
|
|
22
|
-
transfer_1.transferNode,
|
|
23
|
-
sendMetadata_1.sendMetadataNode,
|
|
24
|
-
record_1.recordNode,
|
|
25
|
-
muteSpeechInput_1.muteSpeechInputNode,
|
|
26
|
-
],
|
|
31
|
+
nodes,
|
|
27
32
|
connections: []
|
|
28
33
|
});
|
|
29
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.msTeamsTransferNode = void 0;
|
|
4
|
+
/** Custom Modules */
|
|
5
|
+
const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
6
|
+
/** Helper Modules */
|
|
7
|
+
const msTeamsTransfer_mapper_1 = require("../../voice/mappers/msTeamsTransfer.mapper");
|
|
8
|
+
const design_1 = require("../utils/design");
|
|
9
|
+
const customHeaderDefaultValue = "X-Custom-Header";
|
|
10
|
+
exports.msTeamsTransferNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
11
|
+
type: "msTeamsTransfer",
|
|
12
|
+
defaultLabel: "MS Teams Transfer",
|
|
13
|
+
preview: {
|
|
14
|
+
key: "transferTarget",
|
|
15
|
+
type: "text",
|
|
16
|
+
},
|
|
17
|
+
appearance: {
|
|
18
|
+
color: design_1.nodeColor,
|
|
19
|
+
},
|
|
20
|
+
tags: ["voice"],
|
|
21
|
+
fields: [
|
|
22
|
+
{
|
|
23
|
+
key: "transferTarget",
|
|
24
|
+
label: "UI__NODE_EDITOR__VOICEGATEWAY2__TRANSFER__FIELDS__TRANSFER_TARGET__LABEL",
|
|
25
|
+
type: "cognigyText",
|
|
26
|
+
params: {
|
|
27
|
+
required: true,
|
|
28
|
+
},
|
|
29
|
+
description: "UI__NODE_EDITOR__VOICEGATEWAY2__TRANSFER__FIELDS__TRANSFER_TARGET__DESCRIPTION",
|
|
30
|
+
defaultValue: "+49123456789",
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
key: "callerName",
|
|
34
|
+
label: "UI__NODE_EDITOR__VOICEGATEWAY2__MSTEAMS_TRANSFER__FIELDS__CALLER_NAME__LABEL",
|
|
35
|
+
type: "cognigyText",
|
|
36
|
+
description: "UI__NODE_EDITOR__VOICEGATEWAY2__MSTEAMS_TRANSFER__FIELDS__CALLER_NAME__DESCRIPTION",
|
|
37
|
+
defaultValue: "",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
key: "topic",
|
|
41
|
+
label: "UI__NODE_EDITOR__VOICEGATEWAY2__MSTEAMS_TRANSFER__FIELDS__TOPIC__LABEL",
|
|
42
|
+
type: "cognigyText",
|
|
43
|
+
description: "UI__NODE_EDITOR__VOICEGATEWAY2__MSTEAMS_TRANSFER__FIELDS__TOPIC__DESCRIPTION",
|
|
44
|
+
defaultValue: "",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
key: "context",
|
|
48
|
+
label: "UI__NODE_EDITOR__VOICEGATEWAY2__MSTEAMS_TRANSFER__FIELDS__CONTEXT__LABEL",
|
|
49
|
+
type: "cognigyText",
|
|
50
|
+
description: "UI__NODE_EDITOR__VOICEGATEWAY2__MSTEAMS_TRANSFER__FIELDS__CONTEXT__DESCRIPTION",
|
|
51
|
+
defaultValue: "My context",
|
|
52
|
+
params: {
|
|
53
|
+
required: true,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
key: "callSentiment",
|
|
58
|
+
label: "UI__NODE_EDITOR__VOICEGATEWAY2__MSTEAMS_TRANSFER__FIELDS__CALL_SENTIMENT__LABEL",
|
|
59
|
+
type: "cognigyText",
|
|
60
|
+
description: "UI__NODE_EDITOR__VOICEGATEWAY2__MSTEAMS_TRANSFER__FIELDS__CALL_SENTIMENT__DESCRIPTION",
|
|
61
|
+
defaultValue: "",
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
key: "suggestedActions",
|
|
65
|
+
label: "UI__NODE_EDITOR__VOICEGATEWAY2__MSTEAMS_TRANSFER__FIELDS__SUGGESTED_ACTIONS__LABEL",
|
|
66
|
+
type: "cognigyText",
|
|
67
|
+
description: "UI__NODE_EDITOR__VOICEGATEWAY2__MSTEAMS_TRANSFER__FIELDS__SUGGESTED_ACTIONS__DESCRIPTION",
|
|
68
|
+
defaultValue: "",
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
form: [
|
|
72
|
+
{
|
|
73
|
+
type: "field",
|
|
74
|
+
key: "transferTarget"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
type: "field",
|
|
78
|
+
key: "callerName"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
type: "field",
|
|
82
|
+
key: "topic"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
type: "field",
|
|
86
|
+
key: "context"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
type: "field",
|
|
90
|
+
key: "callSentiment"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
type: "field",
|
|
94
|
+
key: "suggestedActions"
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
summary: "UI__NODE_EDITOR__VOICEGATEWAY2__TRANSFER__SUMMARY",
|
|
98
|
+
function: async ({ cognigy, config, }) => {
|
|
99
|
+
const { api, input } = cognigy;
|
|
100
|
+
const { transferTarget, callerName, topic, context, callSentiment, suggestedActions, } = config;
|
|
101
|
+
const transferParams = {
|
|
102
|
+
transferTarget,
|
|
103
|
+
callerName,
|
|
104
|
+
topic,
|
|
105
|
+
context,
|
|
106
|
+
callSentiment,
|
|
107
|
+
suggestedActions,
|
|
108
|
+
};
|
|
109
|
+
try {
|
|
110
|
+
if (input.channel === "adminconsole") {
|
|
111
|
+
let textWarningAdminChannel = "Transferring a call is not supported in the Interaction Panel, please use the VoiceGateway endpoint.";
|
|
112
|
+
await api.say(textWarningAdminChannel, null);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
const payload = msTeamsTransfer_mapper_1.msTeamsTransfer.handleInput("voiceGateway2", transferParams);
|
|
116
|
+
await api.say(null, {
|
|
117
|
+
_cognigy: payload,
|
|
118
|
+
});
|
|
119
|
+
api.logDebugMessage(`UI__DEBUG_MODE__MS_TEAMS__TRANSFER__MESSAGE ${transferTarget}`);
|
|
120
|
+
}
|
|
121
|
+
catch (error) {
|
|
122
|
+
throw new Error(`Error on Transfer node type:. Error message: ${error.message}`);
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
//# sourceMappingURL=msTeamsTransfer.js.map
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.profileQuerySchema = exports.profileSchema = exports.profileDataSchema = void 0;
|
|
3
|
+
exports.profileQuerySchema = exports.profileSchema = exports.profileDataSchema = exports.profileTypes = void 0;
|
|
4
4
|
/* Custom Modules */
|
|
5
5
|
const createQuerySchema_1 = require("../helper/createQuerySchema");
|
|
6
6
|
const IEntityMeta_1 = require("./resources/IEntityMeta");
|
|
7
7
|
;
|
|
8
8
|
;
|
|
9
|
+
exports.profileTypes = [
|
|
10
|
+
"simulator",
|
|
11
|
+
];
|
|
9
12
|
exports.profileDataSchema = {
|
|
10
13
|
title: "profileDataSchema",
|
|
11
14
|
type: "object",
|
|
12
15
|
additionalProperties: false,
|
|
13
16
|
properties: {
|
|
14
17
|
active: { type: "boolean" },
|
|
18
|
+
type: { type: "string", enum: [...exports.profileTypes] },
|
|
15
19
|
contactIds: { type: "array", items: { type: "string" }, additionalItems: false, minItems: 1 },
|
|
16
20
|
contactIdsHash: { type: "string" },
|
|
17
21
|
expiresAt: { type: "object" },
|
|
@@ -46,6 +46,9 @@ exports.generativeAIModels = [
|
|
|
46
46
|
"gemini-1.5-flash",
|
|
47
47
|
"gemini-2.0-flash",
|
|
48
48
|
"gemini-2.0-flash-lite",
|
|
49
|
+
"gemini-2.5-pro",
|
|
50
|
+
"gemini-2.5-flash",
|
|
51
|
+
"gemini-2.5-flash-lite",
|
|
49
52
|
"amazon.nova-lite-v1:0",
|
|
50
53
|
"amazon.nova-pro-v1:0",
|
|
51
54
|
"amazon.nova-micro-v1:0",
|
|
@@ -7,7 +7,8 @@ exports.auditEventTypes = [
|
|
|
7
7
|
"replace",
|
|
8
8
|
"patch",
|
|
9
9
|
"delete",
|
|
10
|
-
"
|
|
10
|
+
"authentication",
|
|
11
|
+
"authorization",
|
|
11
12
|
];
|
|
12
13
|
exports.actionTypes = [
|
|
13
14
|
"acceptTermsOfService",
|
|
@@ -112,6 +113,10 @@ exports.actionTypes = [
|
|
|
112
113
|
"updateObservationConfig",
|
|
113
114
|
"resolveAiOpsCenterError",
|
|
114
115
|
"odataRequest",
|
|
116
|
+
"loginSucceeded",
|
|
117
|
+
"loginFailed",
|
|
118
|
+
"loginError",
|
|
119
|
+
"unauthorized",
|
|
115
120
|
];
|
|
116
121
|
exports.auditEventSchema = {
|
|
117
122
|
title: "auditEventSchema",
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.nodeQuerySchema = exports.nodeSchema = exports.updateNodeDataSchema = exports.nodeDataSchema = exports.nodeInDBSchema = exports.searchableNodeFields = exports.defaultNodeFields = void 0;
|
|
3
|
+
exports.nodeQuerySchema = exports.nodeSchema = exports.updateNodeDataSchema = exports.nodeDataSchema = exports.nodeInDBSchema = exports.searchableNodeFields = exports.defaultNodeFields = exports.ConvertActionType = void 0;
|
|
4
4
|
/* Custom Modules */
|
|
5
5
|
const createQuerySchema_1 = require("../../helper/createQuerySchema");
|
|
6
|
+
var ConvertActionType;
|
|
7
|
+
(function (ConvertActionType) {
|
|
8
|
+
ConvertActionType["ADDED"] = "added";
|
|
9
|
+
ConvertActionType["REMOVED"] = "removed";
|
|
10
|
+
ConvertActionType["UPDATED"] = "updated";
|
|
11
|
+
})(ConvertActionType = exports.ConvertActionType || (exports.ConvertActionType = {}));
|
|
6
12
|
exports.defaultNodeFields = [
|
|
7
13
|
"label",
|
|
8
14
|
"comment",
|
|
@@ -372,7 +372,17 @@ exports.nodeDescriptorSchema = {
|
|
|
372
372
|
properties: {
|
|
373
373
|
_id: { type: "string", format: "mongo-id" },
|
|
374
374
|
type: { type: "string", minLength: 1, maxLength: 200 },
|
|
375
|
-
parentType: {
|
|
375
|
+
parentType: {
|
|
376
|
+
oneOf: [
|
|
377
|
+
{ type: "null" },
|
|
378
|
+
{ type: "string", minLength: 1, maxLength: 200 },
|
|
379
|
+
{
|
|
380
|
+
type: "array",
|
|
381
|
+
items: { type: "string", minLength: 1, maxLength: 200 },
|
|
382
|
+
minItems: 1
|
|
383
|
+
}
|
|
384
|
+
]
|
|
385
|
+
},
|
|
376
386
|
defaultLabel: {
|
|
377
387
|
oneOf: [
|
|
378
388
|
{ type: "string", minLength: 1, maxLength: 200 },
|
|
@@ -7,6 +7,7 @@ const IGenerativeAISettings_1 = require("./IGenerativeAISettings");
|
|
|
7
7
|
const IAudioPreviewSettings_1 = require("./IAudioPreviewSettings");
|
|
8
8
|
const ITranslationSettings_1 = require("./ITranslationSettings");
|
|
9
9
|
const IKnowledgeAISettings_1 = require("./IKnowledgeAISettings");
|
|
10
|
+
const IPiiDataRedactionSettings_1 = require("./IPiiDataRedactionSettings");
|
|
10
11
|
exports.agentSettingsDataSchema = {
|
|
11
12
|
title: "agentSettingsDataSchema",
|
|
12
13
|
type: "object",
|
|
@@ -14,31 +15,35 @@ exports.agentSettingsDataSchema = {
|
|
|
14
15
|
properties: Object.assign(Object.assign({}, ISharedSettings_1.sharedSettingsSchema.properties), { trackDataOnlyInputs: { type: "boolean" }, collectAnalytics: { type: "boolean" }, timezone: { type: "string", format: "timezone" }, useCaseSensitiveIntentMapping: { type: "boolean" }, translationSettings: {
|
|
15
16
|
type: ["object", "null"],
|
|
16
17
|
additionalProperties: false,
|
|
17
|
-
properties: Object.assign({}, ITranslationSettings_1.translationSettingsDataSchema.properties)
|
|
18
|
+
properties: Object.assign({}, ITranslationSettings_1.translationSettingsDataSchema.properties),
|
|
18
19
|
}, audioPreviewSettings: {
|
|
19
20
|
type: ["object", "null"],
|
|
20
21
|
additionalProperties: false,
|
|
21
|
-
properties: Object.assign({}, IAudioPreviewSettings_1.audioPreviewSettingsDataSchema.properties)
|
|
22
|
+
properties: Object.assign({}, IAudioPreviewSettings_1.audioPreviewSettingsDataSchema.properties),
|
|
22
23
|
}, generativeAISettings: {
|
|
23
24
|
type: ["object", "null"],
|
|
24
25
|
additionalProperties: false,
|
|
25
|
-
properties: Object.assign({}, IGenerativeAISettings_1.generativeAISettingsDataSchema.properties)
|
|
26
|
+
properties: Object.assign({}, IGenerativeAISettings_1.generativeAISettingsDataSchema.properties),
|
|
26
27
|
}, currencySettings: {
|
|
27
28
|
type: ["object", "null"],
|
|
28
29
|
additionalProperties: false,
|
|
29
30
|
properties: {
|
|
30
31
|
currency: { type: "string", format: "currency-code" },
|
|
31
|
-
}
|
|
32
|
+
},
|
|
32
33
|
}, knowledgeAISettings: {
|
|
33
34
|
type: ["object", "null"],
|
|
34
35
|
additionalProperties: false,
|
|
35
|
-
properties: Object.assign({}, IKnowledgeAISettings_1.knowledgeAISettingsDataSchema.properties)
|
|
36
|
-
}
|
|
36
|
+
properties: Object.assign({}, IKnowledgeAISettings_1.knowledgeAISettingsDataSchema.properties),
|
|
37
|
+
}, piiDataRedactionSettings: {
|
|
38
|
+
type: ["object", "null"],
|
|
39
|
+
additionalProperties: false,
|
|
40
|
+
properties: Object.assign({}, IPiiDataRedactionSettings_1.piiDataRedactionSettingsSchema.properties),
|
|
41
|
+
} }),
|
|
37
42
|
};
|
|
38
43
|
exports.agentSettingsSchema = {
|
|
39
44
|
title: "agentSettingsSchema",
|
|
40
45
|
type: "object",
|
|
41
46
|
additionalProperties: false,
|
|
42
|
-
properties: Object.assign(Object.assign(Object.assign({}, IEntityMeta_1.entityMetaSchema.properties), exports.agentSettingsDataSchema.properties), { projectReference: { type: "string", format: "mongo-id" }, organisationReference: { type: "string", format: "mongo-id" } })
|
|
47
|
+
properties: Object.assign(Object.assign(Object.assign({}, IEntityMeta_1.entityMetaSchema.properties), exports.agentSettingsDataSchema.properties), { projectReference: { type: "string", format: "mongo-id" }, organisationReference: { type: "string", format: "mongo-id" } }),
|
|
43
48
|
};
|
|
44
49
|
//# sourceMappingURL=IAgentSettings.js.map
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.piiDataRedactionSettingsSchema = exports.customPatternSettingsSchema = exports.piiFieldSettingsSchema = exports.EPiiBehaviorType = void 0;
|
|
4
|
+
var EPiiBehaviorType;
|
|
5
|
+
(function (EPiiBehaviorType) {
|
|
6
|
+
EPiiBehaviorType["PREDEFINED_ALIAS"] = "predefined-alias";
|
|
7
|
+
EPiiBehaviorType["CUSTOM_ALIAS"] = "custom-alias";
|
|
8
|
+
})(EPiiBehaviorType = exports.EPiiBehaviorType || (exports.EPiiBehaviorType = {}));
|
|
9
|
+
exports.piiFieldSettingsSchema = {
|
|
10
|
+
title: "piiFieldSettingsSchema",
|
|
11
|
+
type: "object",
|
|
12
|
+
additionalProperties: false,
|
|
13
|
+
required: ["enabled", "name"],
|
|
14
|
+
properties: {
|
|
15
|
+
enabled: { type: "boolean" },
|
|
16
|
+
behavior: {
|
|
17
|
+
oneOf: [
|
|
18
|
+
{
|
|
19
|
+
type: "object",
|
|
20
|
+
additionalProperties: false,
|
|
21
|
+
required: ["type"],
|
|
22
|
+
properties: {
|
|
23
|
+
type: {
|
|
24
|
+
type: "string",
|
|
25
|
+
enum: [EPiiBehaviorType.PREDEFINED_ALIAS],
|
|
26
|
+
},
|
|
27
|
+
customAlias: { type: "null" },
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
type: "object",
|
|
32
|
+
additionalProperties: false,
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
required: ["type", "customAlias"],
|
|
35
|
+
properties: {
|
|
36
|
+
type: {
|
|
37
|
+
type: "string",
|
|
38
|
+
enum: [EPiiBehaviorType.CUSTOM_ALIAS],
|
|
39
|
+
},
|
|
40
|
+
customAlias: {
|
|
41
|
+
type: "string",
|
|
42
|
+
minLength: 3,
|
|
43
|
+
maxLength: 100
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
scope: {
|
|
50
|
+
type: ["object", "null"],
|
|
51
|
+
additionalProperties: false,
|
|
52
|
+
required: ["logs", "analytics"],
|
|
53
|
+
properties: {
|
|
54
|
+
logs: { type: "boolean" },
|
|
55
|
+
analytics: { type: "boolean" },
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
name: { type: "string", minLength: 3, maxLength: 100, pattern: "^[a-zA-Z0-9_\\s]+$" },
|
|
59
|
+
},
|
|
60
|
+
if: {
|
|
61
|
+
properties: {
|
|
62
|
+
enabled: { const: true }
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
then: {
|
|
66
|
+
required: ["enabled", "name", "behavior", "scope"]
|
|
67
|
+
},
|
|
68
|
+
else: {
|
|
69
|
+
required: ["enabled", "name"]
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
exports.customPatternSettingsSchema = {
|
|
73
|
+
title: "customPatternSettingsSchema",
|
|
74
|
+
type: "object",
|
|
75
|
+
additionalProperties: false,
|
|
76
|
+
required: ["name", "regex", "behavior", "scope"],
|
|
77
|
+
properties: {
|
|
78
|
+
regex: {
|
|
79
|
+
type: "string",
|
|
80
|
+
minLength: 1,
|
|
81
|
+
maxLength: 1000
|
|
82
|
+
},
|
|
83
|
+
behavior: {
|
|
84
|
+
type: "object",
|
|
85
|
+
additionalProperties: false,
|
|
86
|
+
// @ts-ignore
|
|
87
|
+
required: ["type", "customAlias"],
|
|
88
|
+
properties: {
|
|
89
|
+
type: {
|
|
90
|
+
type: "string",
|
|
91
|
+
enum: [EPiiBehaviorType.CUSTOM_ALIAS],
|
|
92
|
+
},
|
|
93
|
+
customAlias: {
|
|
94
|
+
type: "string",
|
|
95
|
+
minLength: 3,
|
|
96
|
+
maxLength: 100
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
scope: {
|
|
101
|
+
type: ["object", "null"],
|
|
102
|
+
additionalProperties: false,
|
|
103
|
+
required: ["logs", "analytics"],
|
|
104
|
+
properties: {
|
|
105
|
+
logs: { type: "boolean" },
|
|
106
|
+
analytics: { type: "boolean" },
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
name: {
|
|
110
|
+
type: "string",
|
|
111
|
+
minLength: 3,
|
|
112
|
+
maxLength: 100,
|
|
113
|
+
pattern: "^[a-zA-Z0-9_\\s]+$"
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
exports.piiDataRedactionSettingsSchema = {
|
|
118
|
+
title: "piiDataRedactionSettingsSchema",
|
|
119
|
+
type: "object",
|
|
120
|
+
additionalProperties: false,
|
|
121
|
+
required: [
|
|
122
|
+
"emailAddress",
|
|
123
|
+
"phoneNumber",
|
|
124
|
+
"creditCard",
|
|
125
|
+
"ssn",
|
|
126
|
+
"ipAddressV4",
|
|
127
|
+
"ipAddressV6",
|
|
128
|
+
],
|
|
129
|
+
properties: {
|
|
130
|
+
emailAddress: exports.piiFieldSettingsSchema,
|
|
131
|
+
phoneNumber: exports.piiFieldSettingsSchema,
|
|
132
|
+
creditCard: exports.piiFieldSettingsSchema,
|
|
133
|
+
ssn: exports.piiFieldSettingsSchema,
|
|
134
|
+
ipAddressV4: exports.piiFieldSettingsSchema,
|
|
135
|
+
ipAddressV6: exports.piiFieldSettingsSchema,
|
|
136
|
+
customTypes: {
|
|
137
|
+
type: ["object", "null"],
|
|
138
|
+
additionalProperties: exports.customPatternSettingsSchema
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
};
|
|
142
|
+
//# sourceMappingURL=IPiiDataRedactionSettings.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fileExtractorOptions = exports.knowledgeAISettingsDataSchema = exports.translationProviders = exports.translationSettingsDataSchema = exports.audioPreviewProviders = exports.audioPreviewSettingsDataSchema = exports.generativeAISettingsDataSchema = exports.sharedSettingsSchema = exports.flowSettingsSchema = exports.flowSettingsDataSchema = exports.flowIntentMappingOrderType = exports.agentSettingsSchema = exports.agentSettingsDataSchema = void 0;
|
|
3
|
+
exports.piiDataRedactionSettingsSchema = exports.EPiiBehaviorType = exports.fileExtractorOptions = exports.knowledgeAISettingsDataSchema = exports.translationProviders = exports.translationSettingsDataSchema = exports.audioPreviewProviders = exports.audioPreviewSettingsDataSchema = exports.generativeAISettingsDataSchema = exports.sharedSettingsSchema = exports.flowSettingsSchema = exports.flowSettingsDataSchema = exports.flowIntentMappingOrderType = exports.agentSettingsSchema = exports.agentSettingsDataSchema = void 0;
|
|
4
4
|
var IAgentSettings_1 = require("./IAgentSettings");
|
|
5
5
|
Object.defineProperty(exports, "agentSettingsDataSchema", { enumerable: true, get: function () { return IAgentSettings_1.agentSettingsDataSchema; } });
|
|
6
6
|
Object.defineProperty(exports, "agentSettingsSchema", { enumerable: true, get: function () { return IAgentSettings_1.agentSettingsSchema; } });
|
|
@@ -21,4 +21,7 @@ Object.defineProperty(exports, "translationProviders", { enumerable: true, get:
|
|
|
21
21
|
var IKnowledgeAISettings_1 = require("./IKnowledgeAISettings");
|
|
22
22
|
Object.defineProperty(exports, "knowledgeAISettingsDataSchema", { enumerable: true, get: function () { return IKnowledgeAISettings_1.knowledgeAISettingsDataSchema; } });
|
|
23
23
|
Object.defineProperty(exports, "fileExtractorOptions", { enumerable: true, get: function () { return IKnowledgeAISettings_1.fileExtractorOptions; } });
|
|
24
|
+
var IPiiDataRedactionSettings_1 = require("./IPiiDataRedactionSettings");
|
|
25
|
+
Object.defineProperty(exports, "EPiiBehaviorType", { enumerable: true, get: function () { return IPiiDataRedactionSettings_1.EPiiBehaviorType; } });
|
|
26
|
+
Object.defineProperty(exports, "piiDataRedactionSettingsSchema", { enumerable: true, get: function () { return IPiiDataRedactionSettings_1.piiDataRedactionSettingsSchema; } });
|
|
24
27
|
//# sourceMappingURL=index.js.map
|