@cognigy/rest-api-client 2025.23.0 → 2025.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/build/shared/charts/descriptors/index.js +6 -1
  3. package/build/shared/charts/descriptors/nlu/matchPattern.js +1 -0
  4. package/build/shared/charts/descriptors/placeholder.js +3 -0
  5. package/build/shared/charts/descriptors/service/agentTools/handoverToAiAgentTool.js +192 -0
  6. package/build/shared/charts/descriptors/service/agentTools/knowledgeTool.js +1 -1
  7. package/build/shared/charts/descriptors/service/agentTools/sendEmailTool.js +243 -0
  8. package/build/shared/charts/descriptors/service/aiAgent/aiAgentJob.js +1 -1
  9. package/build/shared/charts/descriptors/service/aiAgent/helpers/createToolDefinitions.js +37 -3
  10. package/build/shared/charts/descriptors/service/cxone/knowledgehub/CXoneKnowledgehub.js +198 -0
  11. package/build/shared/charts/descriptors/service/cxone/knowledgehub/CXoneKnowledgehubConnection.js +16 -0
  12. package/build/shared/charts/descriptors/service/cxone/knowledgehub/CXoneKnowledgehubForm.js +300 -0
  13. package/build/shared/charts/descriptors/service/cxone/knowledgehub/CXoneKnowledgehubProviderModule.js +16 -0
  14. package/build/shared/charts/descriptors/service/handoverConnections.js +9 -1
  15. package/build/shared/charts/descriptors/service/index.js +6 -1
  16. package/build/shared/charts/descriptors/service/llmPrompt/LLMPromptV2.js +1 -1
  17. package/build/shared/charts/descriptors/voice/mappers/setSessionConfig.mapper.js +12 -16
  18. package/build/shared/constants.js +2 -1
  19. package/build/shared/interfaces/IOrganisation.js +1 -0
  20. package/build/shared/interfaces/IProfile.js +1 -0
  21. package/build/shared/interfaces/cxone/knowledgehub/CXoneKnowledgehubAPI.js +3 -0
  22. package/build/shared/interfaces/resources/IAuditEvent.js +1 -0
  23. package/build/shared/interfaces/resources/TRestChannelType.js +2 -2
  24. package/build/shared/interfaces/restAPI/simulation/simulationRun/ISimulationRunRest_2_0.js +15 -1
  25. package/build/shared/interfaces/restAPI/simulation/simulationRunBatch/ISimulationRunBatchRest_2_0.js +6 -1
  26. package/dist/esm/shared/charts/descriptors/index.js +5 -1
  27. package/dist/esm/shared/charts/descriptors/nlu/matchPattern.js +1 -0
  28. package/dist/esm/shared/charts/descriptors/placeholder.js +3 -0
  29. package/dist/esm/shared/charts/descriptors/service/agentTools/handoverToAiAgentTool.js +190 -0
  30. package/dist/esm/shared/charts/descriptors/service/agentTools/knowledgeTool.js +1 -1
  31. package/dist/esm/shared/charts/descriptors/service/agentTools/sendEmailTool.js +241 -0
  32. package/dist/esm/shared/charts/descriptors/service/aiAgent/aiAgentJob.js +1 -1
  33. package/dist/esm/shared/charts/descriptors/service/aiAgent/helpers/createToolDefinitions.js +35 -2
  34. package/dist/esm/shared/charts/descriptors/service/cxone/knowledgehub/CXoneKnowledgehub.js +196 -0
  35. package/dist/esm/shared/charts/descriptors/service/cxone/knowledgehub/CXoneKnowledgehubConnection.js +13 -0
  36. package/dist/esm/shared/charts/descriptors/service/cxone/knowledgehub/CXoneKnowledgehubForm.js +297 -0
  37. package/dist/esm/shared/charts/descriptors/service/cxone/knowledgehub/CXoneKnowledgehubProviderModule.js +13 -0
  38. package/dist/esm/shared/charts/descriptors/service/handoverConnections.js +8 -0
  39. package/dist/esm/shared/charts/descriptors/service/index.js +3 -1
  40. package/dist/esm/shared/charts/descriptors/service/llmPrompt/LLMPromptV2.js +1 -1
  41. package/dist/esm/shared/charts/descriptors/voice/mappers/setSessionConfig.mapper.js +12 -16
  42. package/dist/esm/shared/constants.js +1 -0
  43. package/dist/esm/shared/interfaces/IOrganisation.js +1 -0
  44. package/dist/esm/shared/interfaces/IProfile.js +1 -0
  45. package/dist/esm/shared/interfaces/cxone/knowledgehub/CXoneKnowledgehubAPI.js +2 -0
  46. package/dist/esm/shared/interfaces/resources/IAuditEvent.js +1 -0
  47. package/dist/esm/shared/interfaces/resources/TRestChannelType.js +2 -2
  48. package/dist/esm/shared/interfaces/restAPI/simulation/simulationRun/ISimulationRunRest_2_0.js +14 -0
  49. package/dist/esm/shared/interfaces/restAPI/simulation/simulationRunBatch/ISimulationRunBatchRest_2_0.js +5 -0
  50. package/package.json +1 -1
  51. package/types/index.d.ts +204 -22
@@ -0,0 +1,196 @@
1
+ import { __awaiter } from "tslib";
2
+ /* Node modules */
3
+ import * as crypto from "crypto";
4
+ /* Custom modules */
5
+ import { createNodeDescriptor } from "../../../../createNodeDescriptor";
6
+ import { GO_TO } from "../../../logic";
7
+ import { fields, sections, form } from "./CXoneKnowledgehubForm";
8
+ import { InternalServerError, InvalidArgumentError } from "../../../../../errors";
9
+ const DEFAULT_NICE_CXONE_ENDPOINT_URL = "https://cxone.niceincontact.com/";
10
+ export const NICE_CXONE_KNOWLEDGEHUB = createNodeDescriptor({
11
+ type: "niceCXoneKnowledgehub",
12
+ defaultLabel: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__LABEL",
13
+ summary: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__DESCRIPTION",
14
+ behavior: {
15
+ entrypoint: true
16
+ },
17
+ fields,
18
+ sections,
19
+ form,
20
+ appearance: {
21
+ color: "#252525",
22
+ },
23
+ preview: {
24
+ key: "query",
25
+ type: "text"
26
+ },
27
+ tags: ["ai"],
28
+ function: ({ cognigy, config, nodeId }) => __awaiter(void 0, void 0, void 0, function* () {
29
+ var _a, _b, _c, _d, _e, _f, _g, _h;
30
+ const { api, input } = cognigy;
31
+ const { query, queryPersona, queryLanguage, knowledgehubConnection, filters, promptEditorProfileId, answersMaxWords, linksMax, knowledgeHubId, awsBedrockKbId, maxKernels, prompt, modelArn, storeLocation, inputKey, contextKey, logErrorToSystem, errorHandling = "continue", errorHandlingGotoTarget, errorMessage, debugLogRequestBody, debugLogRequestLatency } = config;
32
+ const { traceId, sessionId } = input;
33
+ try {
34
+ // Set default value of knowledgehubConnection.endpointUrl if not provided.
35
+ if (!knowledgehubConnection.endpointUrl || knowledgehubConnection.endpointUrl.trim().length === 0) {
36
+ knowledgehubConnection.endpointUrl = DEFAULT_NICE_CXONE_ENDPOINT_URL;
37
+ }
38
+ // Validate that both prompt and model ARN are provided if either is used.
39
+ const isPromptTemplateUsed = ((prompt && prompt.trim().length > 0) ||
40
+ (modelArn && modelArn.trim().length > 0));
41
+ if (isPromptTemplateUsed && (!prompt || !modelArn)) {
42
+ throw new InvalidArgumentError("Both Prompt and Model ARN are required when using a custom prompt template.");
43
+ }
44
+ // Construct request body.
45
+ const requestBody = {
46
+ timestamp: new Date().toISOString(),
47
+ meta: {
48
+ tenantId: undefined,
49
+ contactNumber: uuidToSafeInt64String(sessionId),
50
+ agentUid: undefined,
51
+ provider: "Cognigy",
52
+ },
53
+ query: {
54
+ uid: crypto.randomUUID(),
55
+ text: query,
56
+ persona: queryPersona || undefined,
57
+ language: queryLanguage || undefined,
58
+ },
59
+ kbFiltering: {
60
+ filters
61
+ },
62
+ config: {
63
+ kbAnswers: {
64
+ promptEditorProfileId: promptEditorProfileId || undefined,
65
+ answers: {
66
+ enabled: true,
67
+ maxWords: answersMaxWords !== null && answersMaxWords !== void 0 ? answersMaxWords : 100
68
+ },
69
+ // It was agreed to keep images disabled for now.
70
+ images: {
71
+ enabled: false,
72
+ maxImages: 5
73
+ },
74
+ links: {
75
+ enabled: true,
76
+ maxLinks: linksMax !== null && linksMax !== void 0 ? linksMax : 5
77
+ }
78
+ },
79
+ // It was agreed to keep process steps disabled for now.
80
+ kbProcessSteps: {
81
+ enabled: false,
82
+ maxSteps: 5,
83
+ maxTitleWords: 8,
84
+ maxStepWords: 10
85
+ },
86
+ awsBedrock: {
87
+ knowledgeHubId,
88
+ awsBedrockKbId,
89
+ maxKernels: maxKernels !== null && maxKernels !== void 0 ? maxKernels : 5,
90
+ shareable: false,
91
+ promptTemplate: isPromptTemplateUsed ? {
92
+ textPromptTemplate: prompt,
93
+ modelArn: modelArn
94
+ } : undefined
95
+ }
96
+ }
97
+ };
98
+ // Start measuring node latency.
99
+ const startTime = debugLogRequestLatency ? Date.now() : 0;
100
+ // Execute the request against the CXone Knowledgehub API.
101
+ // A result means successful communication with the API, not necessarily that something was found.
102
+ // An error is always thrown and handled by the catch block.
103
+ const result = yield api.executeNiceCxoneKnowledgehubApiRequest(knowledgehubConnection, requestBody);
104
+ // We log the request body after the actual request to include any modifications made by the API function.
105
+ if (debugLogRequestBody) {
106
+ // Create a filtered copy of requestBody for logging, excluding sensitive fields
107
+ const filteredRequestBody = Object.assign(Object.assign({}, requestBody), { kbFiltering: Object.assign(Object.assign({}, requestBody.kbFiltering), { conversationContextRefId: undefined }), config: Object.assign(Object.assign({}, requestBody.config), { awsBedrock: Object.assign(Object.assign({}, requestBody.config.awsBedrock), { awsBedrockKbId: undefined }) }) });
108
+ const debugMessage = `UI__DEBUG_MODE__NICE_CXONE_KNOWLEDGEHUB__REQUEST_BODY__LABEL: ${JSON.stringify(filteredRequestBody, null, 2)}`;
109
+ (_a = api.logDebugMessage) === null || _a === void 0 ? void 0 : _a.call(api, debugMessage, "UI__DEBUG_MODE__NICE_CXONE_KNOWLEDGEHUB__REQUEST_BODY__HEADER");
110
+ }
111
+ if (debugLogRequestLatency) {
112
+ const llmLatencyMs = Date.now() - startTime;
113
+ const debugMessage = `UI__DEBUG_MODE__NICE_CXONE_KNOWLEDGEHUB__REQEUEST_LATENCY__LABEL: ${llmLatencyMs}ms`;
114
+ (_b = api.logDebugMessage) === null || _b === void 0 ? void 0 : _b.call(api, debugMessage, "UI__DEBUG_MODE__NICE_CXONE_KNOWLEDGEHUB__REQEUEST_LATENCY__HEADER");
115
+ }
116
+ // Save result to input or context based on configuration.
117
+ switch (storeLocation) {
118
+ case "context":
119
+ (_c = api.addToContext) === null || _c === void 0 ? void 0 : _c.call(api, contextKey, result, "simple");
120
+ break;
121
+ default:
122
+ api.addToInput(inputKey, result);
123
+ }
124
+ }
125
+ catch (error) {
126
+ const errorDetails = {
127
+ name: error === null || error === void 0 ? void 0 : error.name,
128
+ code: (error === null || error === void 0 ? void 0 : error.code) || (error === null || error === void 0 ? void 0 : error.httpStatusCode),
129
+ message: error === null || error === void 0 ? void 0 : error.message,
130
+ };
131
+ // Debug log to console.
132
+ (_d = api.logDebugError) === null || _d === void 0 ? void 0 : _d.call(api, errorDetails, "UI__DEBUG_MODE__NICE_CXONE_KNOWLEDGEHUB__ERROR");
133
+ // Log to system if configured.
134
+ if (logErrorToSystem) {
135
+ (_e = api.log) === null || _e === void 0 ? void 0 : _e.call(api, "error", JSON.stringify(errorDetails));
136
+ }
137
+ // Store error details either in input or context.
138
+ switch (storeLocation) {
139
+ case "context":
140
+ (_f = api.addToContext) === null || _f === void 0 ? void 0 : _f.call(api, contextKey, errorDetails, "simple");
141
+ break;
142
+ default:
143
+ api.addToInput(inputKey, errorDetails);
144
+ }
145
+ // Handle the error based on the configured error handling approach.
146
+ if (errorHandling === "continue") {
147
+ if (errorMessage) {
148
+ yield ((_g = api.output) === null || _g === void 0 ? void 0 : _g.call(api, errorMessage, null));
149
+ }
150
+ }
151
+ else if (errorHandling === "goto") {
152
+ if (!errorHandlingGotoTarget) {
153
+ throw new InvalidArgumentError("GoTo Target is required");
154
+ }
155
+ const gotoParams = {
156
+ cognigy,
157
+ childConfigs: [],
158
+ nodeId,
159
+ config: {
160
+ flowNode: {
161
+ flow: errorHandlingGotoTarget.flow,
162
+ node: errorHandlingGotoTarget.node,
163
+ },
164
+ injectedText: input.text,
165
+ injectedData: input.data,
166
+ executionMode: "continue",
167
+ absorbContext: false
168
+ }
169
+ };
170
+ yield ((_h = GO_TO.function) === null || _h === void 0 ? void 0 : _h.call(GO_TO, gotoParams));
171
+ }
172
+ else {
173
+ throw new InternalServerError(error === null || error === void 0 ? void 0 : error.message, { traceId });
174
+ }
175
+ }
176
+ })
177
+ });
178
+ /**
179
+ * Converts a UUID string to a safe int64 string using the lower 53 bits of SHA-256 hash.
180
+ * Always returns a string representing a safe integer in the range [0, 2^53-1].
181
+ * @param uuid - The UUID string to convert.
182
+ * @returns A string representation of a safe int64 value.
183
+ */
184
+ function uuidToSafeInt64String(uuid) {
185
+ const hash = crypto.createHash("sha256").update(uuid).digest();
186
+ // Use the lower 53 bits from the first 7 bytes
187
+ // 53 bits = 6 full bytes + 5 bits from the 7th byte
188
+ let value = 0;
189
+ for (let i = 0; i < 6; i++) {
190
+ value = (value << 8) | hash[i];
191
+ }
192
+ // Add lower 5 bits of the 7th byte
193
+ value = (value << 5) | (hash[6] >> 3);
194
+ return value.toString();
195
+ }
196
+ //# sourceMappingURL=CXoneKnowledgehub.js.map
@@ -0,0 +1,13 @@
1
+ /* JWT Secret Connection */
2
+ export const NICE_CXONE_KNOWLEDGEHUB_CONNECTION = {
3
+ type: "niceCXoneKnowledgehub",
4
+ label: "UI__CONNECTION_EDITOR__NICE_CXONE_KNOWLEDGEHUB__TITLE",
5
+ fields: [
6
+ { fieldName: "accessKey", label: "UI__CONNECTION_EDITOR__FIELD_ACCESS_KEY", required: true },
7
+ { fieldName: "secretKey", label: "UI__CONNECTION_EDITOR__FIELD_SECRET_KEY", required: true },
8
+ { fieldName: "clientId", label: "UI__CONNECTION_EDITOR__FIELD_CLIENT_ID", required: false, description: "UI__CONNECTION_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__CLIENT_ID__DESCRIPTION" },
9
+ { fieldName: "clientSecret", label: "UI__CONNECTION_EDITOR__FIELD_CLIENT_SECRET", required: false, description: "UI__CONNECTION_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__CLIENT_SECRET__DESCRIPTION" },
10
+ { fieldName: "endpointUrl", label: "UI__CONNECTION_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__URL__LABEL", required: false, description: "UI__CONNECTION_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__URL__DESCRIPTION" },
11
+ ],
12
+ };
13
+ //# sourceMappingURL=CXoneKnowledgehubConnection.js.map
@@ -0,0 +1,297 @@
1
+ import { NICE_CXONE_KNOWLEDGEHUB_CONNECTION } from "./CXoneKnowledgehubConnection";
2
+ export const fields = [
3
+ {
4
+ key: "query",
5
+ type: "cognigyText",
6
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__QUERY__LABEL",
7
+ description: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__QUERY__DESCRIPTION",
8
+ params: {
9
+ required: true,
10
+ }
11
+ },
12
+ {
13
+ key: "queryPersona",
14
+ type: "cognigyText",
15
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__QUERYPERSONA__LABEL",
16
+ description: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__QUERYPERSONA__DESCRIPTION",
17
+ params: {
18
+ required: false,
19
+ }
20
+ },
21
+ {
22
+ key: "queryLanguage",
23
+ type: "cognigyText",
24
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__QUERYLANGUAGE__LABEL",
25
+ description: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__QUERYLANGUAGE__DESCRIPTION",
26
+ params: {
27
+ required: false,
28
+ },
29
+ defaultValue: "en-US"
30
+ },
31
+ {
32
+ key: "knowledgehubConnection",
33
+ type: "connection",
34
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__CONNECTION__LABEL",
35
+ description: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__CONNECTION__DESCRIPTION",
36
+ params: {
37
+ required: true,
38
+ connectionType: NICE_CXONE_KNOWLEDGEHUB_CONNECTION.type
39
+ }
40
+ },
41
+ {
42
+ key: "filters",
43
+ type: "json",
44
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__FILTERS__LABEL",
45
+ description: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__FILTERS__DESCRIPTION",
46
+ params: {
47
+ required: false,
48
+ },
49
+ defaultValue: "{}",
50
+ },
51
+ {
52
+ key: "promptEditorProfileId",
53
+ type: "cognigyText",
54
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__PROMPTEDITORPROFILEID__LABEL",
55
+ description: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__PROMPTEDITORPROFILEID__DESCRIPTION",
56
+ params: {
57
+ required: false,
58
+ }
59
+ },
60
+ {
61
+ key: "answersMaxWords",
62
+ type: "number",
63
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__ANSWERSMAXWORDS__LABEL",
64
+ description: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__ANSWERSMAXWORDS__DESCRIPTION",
65
+ params: {
66
+ required: true,
67
+ },
68
+ defaultValue: 100,
69
+ },
70
+ {
71
+ key: "linksMax",
72
+ type: "number",
73
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__MAXLINKS__LABEL",
74
+ description: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__MAXLINKS__DESCRIPTION",
75
+ params: {
76
+ required: true,
77
+ },
78
+ defaultValue: 5,
79
+ },
80
+ {
81
+ key: "knowledgeHubId",
82
+ type: "cognigyText",
83
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__KNOWLEDGEHUBID__LABEL",
84
+ description: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__KNOWLEDGEHUBID__DESCRIPTION",
85
+ params: {
86
+ required: true,
87
+ }
88
+ },
89
+ {
90
+ key: "maxKernels",
91
+ type: "number",
92
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__MAXKERNELS__LABEL",
93
+ description: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__MAXKERNELS__DESCRIPTION",
94
+ params: {
95
+ required: true,
96
+ },
97
+ defaultValue: 5,
98
+ },
99
+ {
100
+ key: "prompt",
101
+ type: "cognigyLLMText",
102
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__PROMPT__LABEL",
103
+ description: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__PROMPT__DESCRIPTION",
104
+ params: {
105
+ required: false,
106
+ multiline: true,
107
+ rows: 5,
108
+ },
109
+ defaultValue: "",
110
+ },
111
+ {
112
+ key: "modelArn",
113
+ type: "cognigyText",
114
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__MODELARN__LABEL",
115
+ description: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__MODELARN__DESCRIPTION",
116
+ params: {
117
+ required: false,
118
+ }
119
+ },
120
+ {
121
+ key: "storeLocation",
122
+ type: "select",
123
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__STORAGE__LABEL",
124
+ description: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__STORAGE__DESCRIPTION",
125
+ defaultValue: "input",
126
+ params: {
127
+ options: [
128
+ {
129
+ label: "Input",
130
+ value: "input"
131
+ },
132
+ {
133
+ label: "Context",
134
+ value: "context"
135
+ }
136
+ ],
137
+ required: true
138
+ },
139
+ },
140
+ {
141
+ key: "inputKey",
142
+ type: "cognigyText",
143
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__STORAGEVARIABLE__LABEL",
144
+ description: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__STORAGEVARIABLE__DESCRIPTION",
145
+ defaultValue: "knowledgehub",
146
+ condition: {
147
+ key: "storeLocation",
148
+ value: "input",
149
+ }
150
+ },
151
+ {
152
+ key: "contextKey",
153
+ type: "cognigyText",
154
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__STORAGEVARIABLE__LABEL",
155
+ description: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__STORAGEVARIABLE__DESCRIPTION",
156
+ defaultValue: "knowledgehub",
157
+ condition: {
158
+ key: "storeLocation",
159
+ value: "context",
160
+ }
161
+ },
162
+ {
163
+ key: "logErrorToSystem",
164
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__LOGERRORTOSYSTEM__LABEL",
165
+ description: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__LOGERRORTOSYSTEM__DESCRIPTION",
166
+ type: "toggle",
167
+ defaultValue: false,
168
+ },
169
+ {
170
+ key: "errorHandling",
171
+ type: "select",
172
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__ERRORHANDLING__LABEL",
173
+ description: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__ERRORHANDLING__DESCRIPTION",
174
+ defaultValue: "continue",
175
+ params: {
176
+ options: [
177
+ {
178
+ label: "UI__NODE_EDITOR__FIELDS__HANDLE_SERVICE_ERROR__OPTIONS__STOP__LABEL",
179
+ value: "stop"
180
+ },
181
+ {
182
+ label: "UI__NODE_EDITOR__FIELDS__HANDLE_SERVICE_ERROR__OPTIONS__CONTINUE__LABEL",
183
+ value: "continue"
184
+ },
185
+ {
186
+ label: "UI__NODE_EDITOR__FIELDS__HANDLE_SERVICE_ERROR__OPTIONS__GOTO__LABEL",
187
+ value: "goto"
188
+ },
189
+ ]
190
+ }
191
+ },
192
+ {
193
+ key: "errorHandlingGotoTarget",
194
+ type: "flowNode",
195
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__ERRORGOTO__LABEL",
196
+ condition: {
197
+ key: "errorHandling",
198
+ value: "goto"
199
+ }
200
+ },
201
+ {
202
+ key: "errorMessage",
203
+ type: "cognigyText",
204
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__ERRORMESSAGE__LABEL",
205
+ description: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__ERRORMESSAGE__DESCRIPTION",
206
+ defaultValue: "",
207
+ condition: {
208
+ key: "errorHandling",
209
+ value: "continue"
210
+ }
211
+ },
212
+ {
213
+ key: "debugDescription",
214
+ type: "description",
215
+ label: " ",
216
+ params: {
217
+ text: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__DEBUG__DESCRIPTION"
218
+ }
219
+ },
220
+ {
221
+ key: "debugLogRequestBody",
222
+ type: "toggle",
223
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__DEBUGLOGREQUESTBODY__LABEL",
224
+ description: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__DEBUGLOGREQUESTBODY__DESCRIPTION",
225
+ defaultValue: false
226
+ },
227
+ {
228
+ key: "debugLogRequestLatency",
229
+ type: "toggle",
230
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__DEBUGLOGREQUESTLATENCY__LABEL",
231
+ description: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__DEBUGLOGREQUESTLATENCY__DESCRIPTION",
232
+ defaultValue: false
233
+ }
234
+ ];
235
+ export const sections = [
236
+ {
237
+ key: "query",
238
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__QUERY__SECTION_TITLE",
239
+ defaultCollapsed: true,
240
+ fields: ["queryPersona", "queryLanguage"],
241
+ },
242
+ {
243
+ key: "kbAnswers",
244
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__GENERATIVEAI__SECTION_TITLE",
245
+ defaultCollapsed: true,
246
+ fields: ["promptEditorProfileId", "answersMaxWords", "linksMax"],
247
+ },
248
+ {
249
+ key: "KnowledgeHub",
250
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__AWSBEDROCK__SECTION_TITLE",
251
+ defaultCollapsed: true,
252
+ fields: ["filters", "maxKernels", "prompt", "modelArn"],
253
+ },
254
+ {
255
+ key: "storage",
256
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__STORAGE__SECTION_TITLE",
257
+ defaultCollapsed: true,
258
+ fields: [
259
+ "storeLocation",
260
+ "inputKey",
261
+ "contextKey",
262
+ ]
263
+ },
264
+ {
265
+ key: "errorHandling",
266
+ label: "UI__NODE_EDITOR__NICE_CXONE_KNOWLEDGEHUB__FIELDS__ERRORHANDLING__SECTION_TITLE",
267
+ defaultCollapsed: true,
268
+ fields: [
269
+ "logErrorToSystem",
270
+ "errorHandling",
271
+ "errorMessage",
272
+ "errorHandlingGotoTarget",
273
+ ]
274
+ },
275
+ {
276
+ key: "debugging",
277
+ label: "UI__NODE_EDITOR__SECTIONS__DEBUG_SETTINGS__LABEL",
278
+ defaultCollapsed: true,
279
+ fields: [
280
+ "debugDescription",
281
+ "debugLogRequestBody",
282
+ "debugLogRequestLatency",
283
+ ]
284
+ },
285
+ ];
286
+ export const form = [
287
+ { type: "field", key: "knowledgehubConnection" },
288
+ { type: "field", key: "knowledgeHubId" },
289
+ { type: "field", key: "query" },
290
+ { type: "section", key: "query" },
291
+ { type: "section", key: "KnowledgeHub" },
292
+ { type: "section", key: "kbAnswers" },
293
+ { type: "section", key: "storage" },
294
+ { type: "section", key: "errorHandling" },
295
+ { type: "section", key: "debugging" },
296
+ ];
297
+ //# sourceMappingURL=CXoneKnowledgehubForm.js.map
@@ -0,0 +1,13 @@
1
+ /* Custom modules */
2
+ import { createExtension } from "../../../../createNodeDescriptor";
3
+ import { NICE_CXONE_KNOWLEDGEHUB } from "./CXoneKnowledgehub";
4
+ import { NICE_CXONE_KNOWLEDGEHUB_CONNECTION } from "./CXoneKnowledgehubConnection";
5
+ export const niceCXoneKnowledgehubProviderModule = createExtension({
6
+ nodes: [
7
+ NICE_CXONE_KNOWLEDGEHUB
8
+ ],
9
+ connections: [
10
+ NICE_CXONE_KNOWLEDGEHUB_CONNECTION
11
+ ]
12
+ });
13
+ //# sourceMappingURL=CXoneKnowledgehubProviderModule.js.map
@@ -45,4 +45,12 @@ export const GENESYS_CLOUD_CONNECTION_OM = {
45
45
  { fieldName: "webhookSecret", label: "UI__HANDOVER_PROVIDER_EDITOR__HANDOVER_FORM__GENESYS_CLOUD__WEBHOOK_SECRET__LABEL" }
46
46
  ]
47
47
  };
48
+ export const STORM_CONNECTION = {
49
+ type: "storm",
50
+ label: "UI__HANDOVER_PROVIDER_EDITOR__HANDOVER_FORM__STORM_CONNECTION_AUTHENTICATION__LABEL",
51
+ fields: [
52
+ { fieldName: "apiSecret", label: "UI__HANDOVER_PROVIDER_EDITOR__HANDOVER_FORM__STORM__API_SECRET__LABEL" },
53
+ { fieldName: "apiKey", label: "UI__HANDOVER_PROVIDER_EDITOR__HANDOVER_FORM__STORM__API_KEY__LABEL" }
54
+ ]
55
+ };
48
56
  //# sourceMappingURL=handoverConnections.js.map
@@ -29,8 +29,10 @@ 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
31
  export { KNOWLEDGE_TOOL } from "./agentTools/knowledgeTool";
32
+ export { HANDOVER_TO_AI_AGENT_TOOL } from "./agentTools/handoverToAiAgentTool";
33
+ export { SEND_EMAIL_TOOL } from "./agentTools/sendEmailTool";
32
34
  export { LOAD_AI_AGENT } from "./aiAgent/loadAiAgent";
33
- export { LIVE_AGENT_CONNECTION, RINGCENTRAL_ENGAGE_CONNECTION, CHATWOOT_CONNECTION, EIGHT_BY_EIGHT_CONNECTION, GENESYS_CLOUD_CONNECTION, GENESYS_CLOUD_CONNECTION_OM } from "./handoverConnections";
35
+ export { LIVE_AGENT_CONNECTION, RINGCENTRAL_ENGAGE_CONNECTION, CHATWOOT_CONNECTION, EIGHT_BY_EIGHT_CONNECTION, GENESYS_CLOUD_CONNECTION, GENESYS_CLOUD_CONNECTION_OM, STORM_CONNECTION } from "./handoverConnections";
34
36
  export { NICECXONEAAH_AUTHENTICATION_CONNECTION } from "./niceCXOneAAHAuthenticationConnection";
35
37
  export { AIOPS_CENTER_WEBHOOKS_CONNECTION } from "./aiOpsCenterConnection";
36
38
  //# sourceMappingURL=index.js.map
@@ -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", "knowledgeTool"],
19
+ whitelist: ["llmPromptDefault", "llmPromptTool", "llmPromptMCPTool", "knowledgeTool", "handoverToAiAgentTool", "sendEmailTool"],
20
20
  },
21
21
  },
22
22
  },
@@ -162,22 +162,17 @@ class SessionConfigMapper extends BaseMapper {
162
162
  const { vendor: spVendor, language: spLanguage, voice: spVoice, label: spLabel, model: spModel, azureServiceEndpoint: spAzureServiceEndpoint } = sessionParamsTts || {};
163
163
  const { azureServiceEndpoint, ttsLabel, ttsLanguage, ttsModel, ttsVendor, ttsVoice } = tts || {};
164
164
  const synthesizer = {};
165
- if (this.has(tts) || this.has(sessionParamsTts)) {
166
- synthesizer.vendor = spVendor || ttsVendor;
167
- synthesizer.language = spLanguage || ttsLanguage;
168
- synthesizer.voice = spVoice || ttsVoice;
169
- synthesizer.label = spLabel || ttsLabel;
170
- synthesizer.azureServiceEndpoint = "";
171
- if (spAzureServiceEndpoint || azureServiceEndpoint) {
172
- synthesizer.azureServiceEndpoint = spAzureServiceEndpoint || azureServiceEndpoint;
173
- }
174
- if (spModel || ttsModel) {
175
- synthesizer.options = {
176
- model_id: spModel || ttsModel
177
- };
178
- }
179
- return synthesizer;
165
+ synthesizer.vendor = spVendor || ttsVendor || undefined;
166
+ synthesizer.language = spLanguage || ttsLanguage || undefined;
167
+ synthesizer.voice = spVoice || ttsVoice || undefined;
168
+ synthesizer.label = spLabel || ttsLabel || undefined;
169
+ synthesizer.azureServiceEndpoint = spAzureServiceEndpoint || azureServiceEndpoint || "";
170
+ if (spModel || ttsModel) {
171
+ synthesizer.options = {
172
+ model_id: spModel || ttsModel
173
+ };
180
174
  }
175
+ return synthesizer;
181
176
  }
182
177
  buildRecognizer(sessionParams, stt, vad, azureConfig) {
183
178
  var _a, _b, _c;
@@ -513,11 +508,12 @@ export const setSessionConfig = {
513
508
  var _a;
514
509
  const { bargeIn, continuousAsr, stt, tts, userNoInput, dtmf, vad, azureConfig, atmosphereNoise, silenceOverlay, flowNoInput } = voiceSettings;
515
510
  try {
511
+ const synthesizer = mapper.buildSynthesizer(sessionParams, tts) || undefined;
516
512
  const recognizer = mapper.buildRecognizer(sessionParams, stt, vad, azureConfig) || undefined;
517
513
  mapper.recognizerApplyContinuousAsr(sessionParams, recognizer, continuousAsr);
518
514
  // Check if there are configs for synthesizer, recognizer and bargeIn
519
515
  const voiceConfig = {
520
- synthesizer: mapper.buildSynthesizer(sessionParams, tts) || undefined,
516
+ synthesizer,
521
517
  recognizer,
522
518
  bargeIn: mapper.buildBarge(sessionParams, dtmf, bargeIn) || undefined,
523
519
  fillerNoise: mapper.buildFillerNoise(sessionParams, silenceOverlay) || undefined,
@@ -21,6 +21,7 @@ export const GENERATIVE_AI_PROVIDER_EXTENSION = "@cognigy/generative-ai-provider
21
21
  export const AUDIO_PREVIEW_PROVIDER_EXTENSION = "@cognigy/audio-preview-provider";
22
22
  export const TRANSLATION_PROVIDER_EXTENSION = "@cognigy/translation-provider";
23
23
  export const DOCUMENT_PARSER_PROVIDER_EXTENSION = "@cognigy/document-parser-provider";
24
+ export const NICE_CXONE_KNOWLEDGEHUB_EXTENSION = "@cognigy/nice-cxone-knowledgehub";
24
25
  export const COGNIGY_LIVE_AGENT_DESCRIPTOR_FIELDS = {
25
26
  ESCALATE_INTENTS_HANDOVER_LIVE_AGENT_INBOX_ID: "escalateIntentsHandoverLiveAgentInboxId",
26
27
  ESCALATE_INTENTS_AGENT_ASSIST_INIT_MESSAGE: "escalateIntentsAgentAssistInitMessage",
@@ -57,6 +57,7 @@ export const organisationDataSchema = {
57
57
  disabled: { type: "boolean" },
58
58
  name: { type: "string", minLength: 1, format: "resource-name" },
59
59
  businessUnitId: { type: "string" },
60
+ tenantId: { type: "string" },
60
61
  passwordPolicy: organisationPasswordPolicySchema,
61
62
  quotaMaxChannelsPerProject: { type: "integer", minimum: 0 },
62
63
  quotaMaxMessagesPerDay: { type: "integer", minimum: 0 },
@@ -5,6 +5,7 @@ import { entityMetaSchema } from "./resources/IEntityMeta";
5
5
  ;
6
6
  export const profileTypes = [
7
7
  "simulator",
8
+ "regular" // profiles that are not simulator. In db they will not have a type field for backward compatibility reasons.
8
9
  ];
9
10
  export const profileDataSchema = {
10
11
  title: "profileDataSchema",
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=CXoneKnowledgehubAPI.js.map
@@ -114,6 +114,7 @@ export const actionTypes = [
114
114
  "loginFailed",
115
115
  "loginError",
116
116
  "unauthorized",
117
+ "disableCreditCardRedaction",
117
118
  ];
118
119
  export const auditEventSchema = {
119
120
  title: "auditEventSchema",
@@ -76,11 +76,11 @@ export const restChannelDisplayNames = [
76
76
  },
77
77
  {
78
78
  channel: "niceCXOne",
79
- displayName: "NICE CXone"
79
+ displayName: "NiCE CXone"
80
80
  },
81
81
  {
82
82
  channel: "niceCXOneAAH",
83
- displayName: "NICE CXone AAH"
83
+ displayName: "NiCE CXone AAH"
84
84
  },
85
85
  {
86
86
  channel: "zoomContactCenter",