@cognigy/rest-api-client 2025.22.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 +5 -0
- package/build/apigroups/SimulationAPIGroup_2_0.js +2 -1
- 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/service/agentTools/knowledgeTool.js +340 -0
- package/build/shared/charts/descriptors/service/aiAgent/aiAgentJob.js +3 -2
- package/build/shared/charts/descriptors/service/aiAgent/helpers/createToolDefinitions.js +28 -29
- package/build/shared/charts/descriptors/service/index.js +3 -1
- package/build/shared/charts/descriptors/service/llmPrompt/LLMPromptV2.js +3 -2
- package/build/shared/interfaces/IProfile.js +5 -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/dist/esm/apigroups/SimulationAPIGroup_2_0.js +2 -1
- 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/service/agentTools/knowledgeTool.js +338 -0
- package/dist/esm/shared/charts/descriptors/service/aiAgent/aiAgentJob.js +3 -2
- package/dist/esm/shared/charts/descriptors/service/aiAgent/helpers/createToolDefinitions.js +28 -29
- package/dist/esm/shared/charts/descriptors/service/index.js +1 -0
- package/dist/esm/shared/charts/descriptors/service/llmPrompt/LLMPromptV2.js +3 -2
- package/dist/esm/shared/interfaces/IProfile.js +4 -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/package.json +1 -1
- package/types/index.d.ts +241 -15
|
@@ -11,7 +11,7 @@ import { generateSearchPrompt } from "./helpers/generateSearchPrompt";
|
|
|
11
11
|
import { getUserMemory } from "./helpers/getUserMemory";
|
|
12
12
|
import { createToolDefinitions } from "./helpers/createToolDefinitions";
|
|
13
13
|
import { TranscriptEntryType, TranscriptRole } from "../../../../interfaces/transcripts/transcripts";
|
|
14
|
-
export const AI_AGENT_TOOLS_WHITELIST = ["aiAgentJobDefault", "aiAgentJobTool", "aiAgentJobMCPTool"];
|
|
14
|
+
export const AI_AGENT_TOOLS_WHITELIST = ["aiAgentJobDefault", "aiAgentJobTool", "aiAgentJobMCPTool", "knowledgeTool"];
|
|
15
15
|
export const AI_AGENT_JOB = createNodeDescriptor({
|
|
16
16
|
type: "aiAgentJob",
|
|
17
17
|
defaultLabel: "AI Agent",
|
|
@@ -1195,6 +1195,7 @@ export const AI_AGENT_JOB = createNodeDescriptor({
|
|
|
1195
1195
|
rolesWhiteList: [TranscriptRole.USER, TranscriptRole.ASSISTANT, TranscriptRole.TOOL],
|
|
1196
1196
|
excludeDataOnlyMessagesFilter: [TranscriptRole.ASSISTANT],
|
|
1197
1197
|
useTextAlternativeForLLM,
|
|
1198
|
+
excludeUserEventMessages: true,
|
|
1198
1199
|
});
|
|
1199
1200
|
// For knowledgeSearch "always", we enhance the user input with the knowledge search response data
|
|
1200
1201
|
if (knowledgeSearchBehavior === "always" &&
|
|
@@ -1284,7 +1285,7 @@ export const AI_AGENT_JOB = createNodeDescriptor({
|
|
|
1284
1285
|
// Find the child node with the toolId of the tool call
|
|
1285
1286
|
let toolChild = undefined;
|
|
1286
1287
|
for (const child of childConfigs) {
|
|
1287
|
-
if (child.type
|
|
1288
|
+
if (!["aiAgentJobDefault", "aiAgentJobMCPTool"].includes(child.type) && ((_5 = child.config) === null || _5 === void 0 ? void 0 : _5.toolId) && (yield api.parseCognigyScriptText((_6 = child.config) === null || _6 === void 0 ? void 0 : _6.toolId)) === mainToolCall.function.name) {
|
|
1288
1289
|
toolChild = child;
|
|
1289
1290
|
break;
|
|
1290
1291
|
}
|
|
@@ -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) {
|
|
@@ -166,6 +137,34 @@ export const createToolDefinitions = (childConfigs, api, useStrict) => __awaiter
|
|
|
166
137
|
tools.push(...structuredMcpTools);
|
|
167
138
|
}
|
|
168
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
|
+
}
|
|
169
168
|
}
|
|
170
169
|
;
|
|
171
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";
|
|
@@ -16,7 +16,7 @@ export const LLM_PROMPT_V2 = createNodeDescriptor({
|
|
|
16
16
|
collapsable: true,
|
|
17
17
|
placement: {
|
|
18
18
|
children: {
|
|
19
|
-
whitelist: ["llmPromptDefault", "llmPromptTool", "llmPromptMCPTool"],
|
|
19
|
+
whitelist: ["llmPromptDefault", "llmPromptTool", "llmPromptMCPTool", "knowledgeTool"],
|
|
20
20
|
},
|
|
21
21
|
},
|
|
22
22
|
},
|
|
@@ -843,6 +843,7 @@ export const LLM_PROMPT_V2 = createNodeDescriptor({
|
|
|
843
843
|
rolesWhiteList: [TranscriptRole.USER, TranscriptRole.ASSISTANT, TranscriptRole.TOOL],
|
|
844
844
|
excludeDataOnlyMessagesFilter: [TranscriptRole.ASSISTANT],
|
|
845
845
|
useTextAlternativeForLLM,
|
|
846
|
+
excludeUserEventMessages: true,
|
|
846
847
|
});
|
|
847
848
|
llmPromptOptions["transcript"] = transcript;
|
|
848
849
|
llmPromptOptions["chat"] = [{
|
|
@@ -888,7 +889,7 @@ export const LLM_PROMPT_V2 = createNodeDescriptor({
|
|
|
888
889
|
// Find the child node with the toolId of the tool call
|
|
889
890
|
let toolChild = undefined;
|
|
890
891
|
for (const child of childConfigs) {
|
|
891
|
-
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) {
|
|
892
893
|
toolChild = child;
|
|
893
894
|
break;
|
|
894
895
|
}
|
|
@@ -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" },
|
|
@@ -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
|
package/dist/esm/shared/interfaces/restAPI/resources/project/v2.0/settings/IAgentSettings_2_0.js
CHANGED
|
@@ -1,2 +1,104 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @openapi
|
|
3
|
+
*
|
|
4
|
+
* components:
|
|
5
|
+
* schemas:
|
|
6
|
+
* EPiiBehaviorType:
|
|
7
|
+
* type: string
|
|
8
|
+
* description: PII redaction behavior types
|
|
9
|
+
* enum:
|
|
10
|
+
* - predefined-alias
|
|
11
|
+
* - custom-alias
|
|
12
|
+
*
|
|
13
|
+
* IRedactionBehavior:
|
|
14
|
+
* oneOf:
|
|
15
|
+
* - type: object
|
|
16
|
+
* properties:
|
|
17
|
+
* type:
|
|
18
|
+
* type: string
|
|
19
|
+
* enum: [predefined-alias]
|
|
20
|
+
* customAlias:
|
|
21
|
+
* type: string
|
|
22
|
+
* nullable: true
|
|
23
|
+
* required: [type, customAlias]
|
|
24
|
+
* - type: object
|
|
25
|
+
* properties:
|
|
26
|
+
* type:
|
|
27
|
+
* type: string
|
|
28
|
+
* enum: [custom-alias]
|
|
29
|
+
* customAlias:
|
|
30
|
+
* type: string
|
|
31
|
+
* description: Custom alias to replace PII data with
|
|
32
|
+
* required: [type, customAlias]
|
|
33
|
+
*
|
|
34
|
+
* IRedactionScope:
|
|
35
|
+
* type: object
|
|
36
|
+
* properties:
|
|
37
|
+
* logs:
|
|
38
|
+
* type: boolean
|
|
39
|
+
* description: Whether to redact PII in logs
|
|
40
|
+
* analytics:
|
|
41
|
+
* type: boolean
|
|
42
|
+
* description: Whether to redact PII in analytics
|
|
43
|
+
* required: [logs, analytics]
|
|
44
|
+
*
|
|
45
|
+
* IPiiFieldSettings:
|
|
46
|
+
* type: object
|
|
47
|
+
* properties:
|
|
48
|
+
* enabled:
|
|
49
|
+
* type: boolean
|
|
50
|
+
* description: Whether PII redaction is enabled for this field type
|
|
51
|
+
* behavior:
|
|
52
|
+
* $ref: '#/components/schemas/IRedactionBehavior'
|
|
53
|
+
* scope:
|
|
54
|
+
* $ref: '#/components/schemas/IRedactionScope'
|
|
55
|
+
* name:
|
|
56
|
+
* type: string
|
|
57
|
+
* description: Display name for the PII field type
|
|
58
|
+
* required: [enabled, behavior, scope, name]
|
|
59
|
+
*
|
|
60
|
+
* ICustomPatternSettings:
|
|
61
|
+
* type: object
|
|
62
|
+
* properties:
|
|
63
|
+
* behavior:
|
|
64
|
+
* $ref: '#/components/schemas/IRedactionBehavior'
|
|
65
|
+
* scope:
|
|
66
|
+
* $ref: '#/components/schemas/IRedactionScope'
|
|
67
|
+
* name:
|
|
68
|
+
* type: string
|
|
69
|
+
* description: Display name for the custom PII field type
|
|
70
|
+
* regex:
|
|
71
|
+
* type: string
|
|
72
|
+
* description: Regular expression pattern to match custom PII data (RE2 syntax)
|
|
73
|
+
* minLength: 1
|
|
74
|
+
* maxLength: 2000
|
|
75
|
+
* required: [behavior, scope, name, regex]
|
|
76
|
+
*
|
|
77
|
+
* IPiiDataRedactionSettings_2_0:
|
|
78
|
+
* type: object
|
|
79
|
+
* properties:
|
|
80
|
+
* emailAddress:
|
|
81
|
+
* $ref: '#/components/schemas/IPiiFieldSettings'
|
|
82
|
+
* phoneNumber:
|
|
83
|
+
* $ref: '#/components/schemas/IPiiFieldSettings'
|
|
84
|
+
* creditCard:
|
|
85
|
+
* $ref: '#/components/schemas/IPiiFieldSettings'
|
|
86
|
+
* ssn:
|
|
87
|
+
* $ref: '#/components/schemas/IPiiFieldSettings'
|
|
88
|
+
* ipAddressV4:
|
|
89
|
+
* $ref: '#/components/schemas/IPiiFieldSettings'
|
|
90
|
+
* ipAddressV6:
|
|
91
|
+
* $ref: '#/components/schemas/IPiiFieldSettings'
|
|
92
|
+
* customTypes:
|
|
93
|
+
* type: object
|
|
94
|
+
* additionalProperties:
|
|
95
|
+
* $ref: '#/components/schemas/ICustomPatternSettings'
|
|
96
|
+
* description: User-defined custom PII patterns with regex matching
|
|
97
|
+
* required: [emailAddress, phoneNumber, creditCard, ssn, ipAddressV4, ipAddressV6]
|
|
98
|
+
*/
|
|
99
|
+
export var EPiiBehaviorType;
|
|
100
|
+
(function (EPiiBehaviorType) {
|
|
101
|
+
EPiiBehaviorType["PREDEFINED_ALIAS"] = "predefined-alias";
|
|
102
|
+
EPiiBehaviorType["CUSTOM_ALIAS"] = "custom-alias";
|
|
103
|
+
})(EPiiBehaviorType || (EPiiBehaviorType = {}));
|
|
2
104
|
//# sourceMappingURL=IAgentSettings_2_0.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* POST /testing/beta/personas/from-transcript
|
|
3
|
+
*
|
|
4
|
+
* Create a scenario draft by analyzing a conversation transcript. The system uses LLM to extract user intent,
|
|
5
|
+
* conversation goals, and user characteristics from the transcript, then generates an appropriate persona package.
|
|
6
|
+
*
|
|
7
|
+
* The endpoint supports:
|
|
8
|
+
* - Fetching transcript via sessionId from analytics service (RPC call)
|
|
9
|
+
* - Direct transcript content via transcriptContent
|
|
10
|
+
* - Optional flow context for enhanced persona generation
|
|
11
|
+
* - Content safety validation (warnings only, non-blocking)
|
|
12
|
+
*
|
|
13
|
+
* Priority: If both sessionId and transcriptContent are provided, sessionId takes precedence.
|
|
14
|
+
*
|
|
15
|
+
* operationId: createScenarioFromTranscript
|
|
16
|
+
* tags: Personas
|
|
17
|
+
*/
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=IGeneratePersonaFromTranscriptRest_2_0.js.map
|