@cognigy/rest-api-client 4.97.0 → 4.98.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 (25) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/build/shared/charts/descriptors/analytics/completeGoal.js +2 -2
  3. package/build/shared/charts/descriptors/logic/think.js +2 -4
  4. package/build/shared/charts/descriptors/message/say.js +6 -3
  5. package/build/shared/charts/descriptors/service/aiAgent/aiAgentJob.js +41 -3
  6. package/build/shared/constants.js +8 -1
  7. package/build/shared/interfaces/IProfileSchema.js +1 -1
  8. package/build/shared/interfaces/generativeAI/IGenerativeAIModels.js +1 -0
  9. package/build/shared/interfaces/messageAPI/endpoints.js +6 -1
  10. package/build/shared/interfaces/messageAPI/handover.js +6 -1
  11. package/build/shared/interfaces/resources/IAiAgent.js +3 -1
  12. package/build/shared/interfaces/resources/settings/IGenerativeAISettings.js +4 -0
  13. package/dist/esm/shared/charts/descriptors/analytics/completeGoal.js +2 -2
  14. package/dist/esm/shared/charts/descriptors/logic/think.js +2 -4
  15. package/dist/esm/shared/charts/descriptors/message/say.js +6 -3
  16. package/dist/esm/shared/charts/descriptors/service/aiAgent/aiAgentJob.js +41 -3
  17. package/dist/esm/shared/constants.js +7 -0
  18. package/dist/esm/shared/interfaces/IProfileSchema.js +1 -1
  19. package/dist/esm/shared/interfaces/generativeAI/IGenerativeAIModels.js +1 -0
  20. package/dist/esm/shared/interfaces/messageAPI/endpoints.js +6 -1
  21. package/dist/esm/shared/interfaces/messageAPI/handover.js +6 -1
  22. package/dist/esm/shared/interfaces/resources/IAiAgent.js +3 -1
  23. package/dist/esm/shared/interfaces/resources/settings/IGenerativeAISettings.js +4 -0
  24. package/package.json +2 -2
  25. package/types/index.d.ts +27 -4
package/CHANGELOG.md CHANGED
@@ -1,8 +1,17 @@
1
+ # 4.98.0
2
+ Released: April 01st, 2025
3
+
4
+ Released state of package up to date with Cognigy.AI v4.98.0
5
+
1
6
  # 4.97.0
2
7
  Released: March 18th, 2025
3
8
 
4
9
  Released state of package up to date with Cognigy.AI v4.97.0
5
10
 
11
+ # 4.96.0
12
+ Released: March 11th, 2025
13
+ Released state of package up to date with Cognigy.AI v4.96.0
14
+
6
15
  # 4.95.0
7
16
  Released: February 19th, 2025
8
17
 
@@ -7,7 +7,7 @@ const createNodeDescriptor_1 = require("../../createNodeDescriptor");
7
7
  * Node name: 'completeGoal'
8
8
  *
9
9
  * Purpose:
10
- * Sets a goal as complete
10
+ * Sets a goal as complete (new name: tasks)
11
11
  * @param goal the name of the goal to add to completedGoals array
12
12
  */
13
13
  exports.COMPLETE_GOAL = (0, createNodeDescriptor_1.createNodeDescriptor)({
@@ -39,7 +39,7 @@ exports.COMPLETE_GOAL = (0, createNodeDescriptor_1.createNodeDescriptor)({
39
39
  if (goal) {
40
40
  api.completeGoal(goal);
41
41
  input.completedGoals.push(goal);
42
- (_a = api.logDebugMessage) === null || _a === void 0 ? void 0 : _a.call(api, `Goal: ${goal}`);
42
+ (_a = api.logDebugMessage) === null || _a === void 0 ? void 0 : _a.call(api, `Task: ${goal}`);
43
43
  }
44
44
  }
45
45
  });
@@ -5,10 +5,8 @@ exports.THINK = void 0;
5
5
  const createNodeDescriptor_1 = require("../../createNodeDescriptor");
6
6
  const logFullConfigToDebugMode_1 = require("../../../helper/logFullConfigToDebugMode");
7
7
  /**
8
- * Node name: 'think'
9
- *
10
- * Purpose:
11
- * Thinks a message into the Flow
8
+ * @deprecated since 4.98.0.
9
+ * Use THINK_V2 instead
12
10
  */
13
11
  exports.THINK = (0, createNodeDescriptor_1.createNodeDescriptor)({
14
12
  type: "think",
@@ -139,11 +139,14 @@ exports.SAY = (0, createNodeDescriptor_1.createNodeDescriptor)({
139
139
  if ((_a = _data === null || _data === void 0 ? void 0 : _data._cognigy) === null || _a === void 0 ? void 0 : _a._default) {
140
140
  delete _data._cognigy._default;
141
141
  }
142
+ let sayData = _data;
142
143
  if (config.preventTranscript) {
143
- _data._cognigy = Object.assign(Object.assign({}, _data._cognigy), { _preventTranscript: true });
144
+ sayData = sayData || {};
145
+ sayData._cognigy = sayData._cognigy || {};
146
+ sayData._cognigy._preventTranscript = true;
144
147
  }
145
148
  outputText = await (0, rephraseSentenceWithAi_1.rephraseSentenceWithAI)(outputText, config, api, organisationId);
146
- await api.say(outputText, _data, settings);
149
+ await api.say(outputText, sayData, settings);
147
150
  }
148
151
  else {
149
152
  const _cognigyDefault = (_b = _data === null || _data === void 0 ? void 0 : _data._cognigy) === null || _b === void 0 ? void 0 : _b._default;
@@ -168,7 +171,7 @@ exports.SAY = (0, createNodeDescriptor_1.createNodeDescriptor)({
168
171
  }
169
172
  const data = config.say;
170
173
  if (config.preventTranscript) {
171
- data._cognigy = Object.assign(Object.assign({}, data._cognigy), { _preventTranscript: true });
174
+ data._cognigy = Object.assign(Object.assign({}, (data._cognigy || {})), { _preventTranscript: true });
172
175
  }
173
176
  /**
174
177
  * This is a say node which is set to a type other than 'text' -
@@ -652,11 +652,10 @@ exports.AI_AGENT_JOB = (0, createNodeDescriptor_1.createNodeDescriptor)({
652
652
  defaultValue: "",
653
653
  type: "ttsSelect",
654
654
  label: "_unused_",
655
- description: "_unused_",
656
655
  params: {
657
656
  languageKey: "config.ttsLanguage",
658
657
  modelKey: "config.ttsModel",
659
- voiceKey: "config.ttsVoice"
658
+ voiceKey: "config.ttsVoice",
660
659
  },
661
660
  condition: {
662
661
  key: "voiceSetting",
@@ -681,6 +680,37 @@ exports.AI_AGENT_JOB = (0, createNodeDescriptor_1.createNodeDescriptor)({
681
680
  type: "ttsSelect",
682
681
  defaultValue: "",
683
682
  label: "_unused_",
683
+ },
684
+ {
685
+ key: "ttsLabel",
686
+ type: "cognigyText",
687
+ defaultValue: "",
688
+ label: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__TTS_LABEL__LABEL",
689
+ description: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__TTS_LABEL__DESCRIPTION",
690
+ condition: {
691
+ and: [
692
+ {
693
+ negate: true,
694
+ key: "ttsVendor",
695
+ value: "", // We show the field for all vendors as soon as it is defined
696
+ },
697
+ {
698
+ key: "voiceSetting",
699
+ value: "jobVoice"
700
+ }
701
+ ]
702
+ },
703
+ },
704
+ {
705
+ key: "ttsDisableCache",
706
+ type: "toggle",
707
+ defaultValue: false,
708
+ label: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__TTS_DISABLE_CACHE__LABEL",
709
+ description: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__TTS_DISABLE_CACHE__DESCRIPTION",
710
+ condition: {
711
+ key: "voiceSetting",
712
+ value: "jobVoice"
713
+ },
684
714
  }
685
715
  ],
686
716
  sections: [
@@ -731,6 +761,8 @@ exports.AI_AGENT_JOB = (0, createNodeDescriptor_1.createNodeDescriptor)({
731
761
  fields: [
732
762
  "voiceSetting",
733
763
  "ttsVendor",
764
+ "ttsLabel",
765
+ "ttsDisableCache",
734
766
  ],
735
767
  },
736
768
  {
@@ -819,6 +851,8 @@ exports.AI_AGENT_JOB = (0, createNodeDescriptor_1.createNodeDescriptor)({
819
851
  ttsLanguage: aiAgent.voiceConfigs.ttsLanguage,
820
852
  ttsModel: aiAgent.voiceConfigs.ttsModel,
821
853
  ttsVoice: aiAgent.voiceConfigs.ttsVoice,
854
+ ttsLabel: aiAgent.voiceConfigs.ttsLabel,
855
+ ttsDisableCache: aiAgent.voiceConfigs.ttsDisableCache,
822
856
  });
823
857
  }
824
858
  else {
@@ -828,6 +862,8 @@ exports.AI_AGENT_JOB = (0, createNodeDescriptor_1.createNodeDescriptor)({
828
862
  ttsLanguage: "",
829
863
  ttsModel: "",
830
864
  ttsVoice: "",
865
+ ttsLabel: "",
866
+ ttsDisableCache: false,
831
867
  });
832
868
  }
833
869
  }
@@ -1069,6 +1105,8 @@ exports.AI_AGENT_JOB = (0, createNodeDescriptor_1.createNodeDescriptor)({
1069
1105
  messageLines.push(`UI__DEBUG_MODE__AI_AGENT_JOB__CONFIGURATION__VOICE_SETTING__TTS_LANGUAGE ${config.ttsLanguage || 'UI__DEBUG_MODE__AI_AGENT_JOB__CONFIGURATION__VOICE_SETTING__NOT_SET'}`);
1070
1106
  messageLines.push(`UI__DEBUG_MODE__AI_AGENT_JOB__CONFIGURATION__VOICE_SETTING__TTS_MODEL ${config.ttsModel || 'UI__DEBUG_MODE__AI_AGENT_JOB__CONFIGURATION__VOICE_SETTING__NOT_SET'}`);
1071
1107
  messageLines.push(`UI__DEBUG_MODE__AI_AGENT_JOB__CONFIGURATION__VOICE_SETTING__TTS_VOICE ${config.ttsVoice || 'UI__DEBUG_MODE__AI_AGENT_JOB__CONFIGURATION__VOICE_SETTING__NOT_SET'}`);
1108
+ messageLines.push(`UI__DEBUG_MODE__AI_AGENT_JOB__CONFIGURATION__VOICE_SETTING__TTS_LABEL ${config.ttsLabel || 'UI__DEBUG_MODE__AI_AGENT_JOB__CONFIGURATION__VOICE_SETTING__NOT_SET'}`);
1109
+ messageLines.push(`UI__DEBUG_MODE__AI_AGENT_JOB__CONFIGURATION__VOICE_SETTING__TTS_DISABLE_CACHE ${config.ttsDisableCache || 'UI__DEBUG_MODE__AI_AGENT_JOB__CONFIGURATION__VOICE_SETTING__NOT_SET'}`);
1072
1110
  (_t = api.logDebugMessage) === null || _t === void 0 ? void 0 : _t.call(api, messageLines.join("\n"), "UI__DEBUG_MODE__AI_AGENT_JOB__CONFIGURATION__HEADER");
1073
1111
  }
1074
1112
  // keep this after the debug message since the "retrieve_knowledge" tool is implicit
@@ -1160,7 +1198,7 @@ exports.AI_AGENT_JOB = (0, createNodeDescriptor_1.createNodeDescriptor)({
1160
1198
  const mainToolCall = llmResult.toolCalls[0];
1161
1199
  // Find the child node with the toolId of the tool call
1162
1200
  const toolChild = childConfigs.find(child => { var _a, _b; return child.type === "aiAgentJobTool" && ((_a = child.config) === null || _a === void 0 ? void 0 : _a.toolId) && api.parseCognigyScriptText((_b = child.config) === null || _b === void 0 ? void 0 : _b.toolId) === mainToolCall.function.name; });
1163
- if (toolChild === undefined) {
1201
+ if (mainToolCall.function.name !== "retrieve_knowledge" && toolChild === undefined) {
1164
1202
  (_z = api.logDebugError) === null || _z === void 0 ? void 0 : _z.call(api, `UI__DEBUG_MODE__AI_AGENT_JOB__TOOL_CALL__ERROR__BODY <b>${mainToolCall.function.name}</b>`, "UI__DEBUG_MODE__AI_AGENT_JOB__TOOL_CALL__ERROR__HEADER");
1165
1203
  }
1166
1204
  // Add last tool call to session state for loading it from Tool Answer Node
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PLATFORM_PROVIDED_LLM_CONNECTION_ID = exports.PLATFORM_PROVIDED_LLM_ID = exports.PLATFORM_PROVIDED_LLM_USE_CASES = exports.SECONDS_PER_MINUTE = exports.IP_NOT_AVAILABLE = exports.COGNIGY_LIVE_AGENT_DESCRIPTOR_FIELDS = exports.DOCUMENT_PARSER_PROVIDER_EXTENSION = exports.TRANSLATION_PROVIDER_EXTENSION = exports.AUDIO_PREVIEW_PROVIDER_EXTENSION = exports.GENERATIVE_AI_PROVIDER_EXTENSION = exports.ADMIN_CONSOLE_URL_TOKEN = exports.X_COGNIGY_ORIGIN = exports.EMBEDDED_EXTENSION = exports.INTERNAL_STORAGE_PROVIDER_EXTENSION = exports.VOICE_GATEWAY_2_EXTENSION = exports.MICROSOFT_EXTENSION = exports.VOICE_GATEWAY_EXTENSION = exports.SMTP_EXTENSION = exports.SQL_EXTENSION = exports.MONGO_DB_EXTENSION = exports.BASIC_EXTENSION = exports.MAX_INT32 = exports.PASSWORD_RESET_TOKEN_TTL_IN_SECONDS = exports.SCOPED_USER = exports.SYSTEM_EMAIL = exports.SYSTEM = exports.CREATED_BY_SSO = void 0;
3
+ exports.PLATFORM_PROVIDED_LLM_CONNECTION_ID = exports.PLATFORM_PROVIDED_LLM_ID = exports.DEPRECATED_GENAI_USE_CASES = exports.PLATFORM_PROVIDED_LLM_USE_CASES = exports.SECONDS_PER_MINUTE = exports.IP_NOT_AVAILABLE = exports.COGNIGY_LIVE_AGENT_DESCRIPTOR_FIELDS = exports.DOCUMENT_PARSER_PROVIDER_EXTENSION = exports.TRANSLATION_PROVIDER_EXTENSION = exports.AUDIO_PREVIEW_PROVIDER_EXTENSION = exports.GENERATIVE_AI_PROVIDER_EXTENSION = exports.ADMIN_CONSOLE_URL_TOKEN = exports.X_COGNIGY_ORIGIN = exports.EMBEDDED_EXTENSION = exports.INTERNAL_STORAGE_PROVIDER_EXTENSION = exports.VOICE_GATEWAY_2_EXTENSION = exports.MICROSOFT_EXTENSION = exports.VOICE_GATEWAY_EXTENSION = exports.SMTP_EXTENSION = exports.SQL_EXTENSION = exports.MONGO_DB_EXTENSION = exports.BASIC_EXTENSION = exports.MAX_INT32 = exports.PASSWORD_RESET_TOKEN_TTL_IN_SECONDS = exports.SCOPED_USER = exports.SYSTEM_EMAIL = exports.SYSTEM = exports.CREATED_BY_SSO = void 0;
4
4
  exports.CREATED_BY_SSO = "000000000000000000000550";
5
5
  exports.SYSTEM = "000000000000000000000000";
6
6
  exports.SYSTEM_EMAIL = "system@mail.com";
@@ -59,6 +59,13 @@ exports.PLATFORM_PROVIDED_LLM_USE_CASES = [
59
59
  "flowGeneration",
60
60
  "lexiconGeneration",
61
61
  "generateNodeOutput",
62
+ "designTimeGeneration",
63
+ ];
64
+ exports.DEPRECATED_GENAI_USE_CASES = [
65
+ "intentSentenceGeneration",
66
+ "flowGeneration",
67
+ "lexiconGeneration",
68
+ "generateNodeOutput",
62
69
  ];
63
70
  exports.PLATFORM_PROVIDED_LLM_ID = "aaaaaaaa-aaaa-aaaa-aaaa-000000000000";
64
71
  exports.PLATFORM_PROVIDED_LLM_CONNECTION_ID = "aaaaaaaa-aaaa-aaaa-aaaa-000000000001";
@@ -43,7 +43,7 @@ exports.defaultProfile = {
43
43
  privacy_policy: {
44
44
  accepted: false
45
45
  },
46
- goals: [],
46
+ tasks: [],
47
47
  memories: [],
48
48
  };
49
49
  //# sourceMappingURL=IProfileSchema.js.map
@@ -71,6 +71,7 @@ exports.generativeAIUseCases = [
71
71
  "gptPromptNode",
72
72
  "aiEnhancedOutputs",
73
73
  "sentimentAnalysis",
74
+ "designTimeGeneration",
74
75
  "intentSentenceGeneration",
75
76
  "flowGeneration",
76
77
  "generateNodeOutput",
@@ -428,7 +428,12 @@ exports.anyEndpointSettingsSchema = {
428
428
  timeout: { type: "integer" },
429
429
  updateContactProfileWithFacebookProfile: { type: "boolean" },
430
430
  voice: { type: "string" },
431
- webhookUrl: { type: "string", format: "uri" },
431
+ webhookUrl: {
432
+ oneOf: [
433
+ { type: "string", format: "uri" },
434
+ { type: "string", enum: [""] }
435
+ ]
436
+ },
432
437
  enableConnectionStatusIndicator: { type: "boolean" },
433
438
  enableUnreadMessageTitleIndicator: { type: "boolean" },
434
439
  showEngagementMessagesInChat: { type: "boolean" },
@@ -266,7 +266,12 @@ exports.pollEventSchema = {
266
266
  disableSensitiveLogging: { type: "boolean" },
267
267
  pollingTimeoutAt: { type: "number" },
268
268
  sequence: { type: "number" },
269
- lastEventId: { type: "string" }
269
+ lastEventId: { type: "string" },
270
+ projectId: { type: "string" },
271
+ URLToken: { type: "string" },
272
+ userId: { type: "string" },
273
+ channel: { type: "string" },
274
+ retryCount: { type: "number" }
270
275
  },
271
276
  };
272
277
  exports.handleHandoverRpcEventSchema = {
@@ -28,7 +28,9 @@ exports.aiAgentDataSchema = {
28
28
  ttsVoice: { type: "string" },
29
29
  ttsLanguage: { type: "string" },
30
30
  ttsVendor: { type: "string" },
31
- ttsModel: { type: "string" }
31
+ ttsModel: { type: "string" },
32
+ ttsLabel: { type: "string" },
33
+ ttsDisableCache: { type: "boolean" }
32
34
  }
33
35
  },
34
36
  enableVoiceConfigs: { type: "boolean" },
@@ -30,6 +30,10 @@ exports.generativeAISettingsDataSchema = {
30
30
  type: "object",
31
31
  additionalProperties: false,
32
32
  properties: {
33
+ designTimeGeneration: {
34
+ type: "object",
35
+ properties: Object.assign({}, exports.generativeAIUseCaseDataSchema.properties)
36
+ },
33
37
  intentSentenceGeneration: {
34
38
  type: "object",
35
39
  properties: Object.assign({}, exports.generativeAIUseCaseDataSchema.properties)
@@ -5,7 +5,7 @@ import { createNodeDescriptor } from "../../createNodeDescriptor";
5
5
  * Node name: 'completeGoal'
6
6
  *
7
7
  * Purpose:
8
- * Sets a goal as complete
8
+ * Sets a goal as complete (new name: tasks)
9
9
  * @param goal the name of the goal to add to completedGoals array
10
10
  */
11
11
  export const COMPLETE_GOAL = createNodeDescriptor({
@@ -37,7 +37,7 @@ export const COMPLETE_GOAL = createNodeDescriptor({
37
37
  if (goal) {
38
38
  api.completeGoal(goal);
39
39
  input.completedGoals.push(goal);
40
- (_a = api.logDebugMessage) === null || _a === void 0 ? void 0 : _a.call(api, `Goal: ${goal}`);
40
+ (_a = api.logDebugMessage) === null || _a === void 0 ? void 0 : _a.call(api, `Task: ${goal}`);
41
41
  }
42
42
  })
43
43
  });
@@ -3,10 +3,8 @@ import { __awaiter } from "tslib";
3
3
  import { createNodeDescriptor } from "../../createNodeDescriptor";
4
4
  import { logFullConfigToDebugMode } from "../../../helper/logFullConfigToDebugMode";
5
5
  /**
6
- * Node name: 'think'
7
- *
8
- * Purpose:
9
- * Thinks a message into the Flow
6
+ * @deprecated since 4.98.0.
7
+ * Use THINK_V2 instead
10
8
  */
11
9
  export const THINK = createNodeDescriptor({
12
10
  type: "think",
@@ -137,11 +137,14 @@ export const SAY = createNodeDescriptor({
137
137
  if ((_a = _data === null || _data === void 0 ? void 0 : _data._cognigy) === null || _a === void 0 ? void 0 : _a._default) {
138
138
  delete _data._cognigy._default;
139
139
  }
140
+ let sayData = _data;
140
141
  if (config.preventTranscript) {
141
- _data._cognigy = Object.assign(Object.assign({}, _data._cognigy), { _preventTranscript: true });
142
+ sayData = sayData || {};
143
+ sayData._cognigy = sayData._cognigy || {};
144
+ sayData._cognigy._preventTranscript = true;
142
145
  }
143
146
  outputText = yield rephraseSentenceWithAI(outputText, config, api, organisationId);
144
- yield api.say(outputText, _data, settings);
147
+ yield api.say(outputText, sayData, settings);
145
148
  }
146
149
  else {
147
150
  const _cognigyDefault = (_b = _data === null || _data === void 0 ? void 0 : _data._cognigy) === null || _b === void 0 ? void 0 : _b._default;
@@ -166,7 +169,7 @@ export const SAY = createNodeDescriptor({
166
169
  }
167
170
  const data = config.say;
168
171
  if (config.preventTranscript) {
169
- data._cognigy = Object.assign(Object.assign({}, data._cognigy), { _preventTranscript: true });
172
+ data._cognigy = Object.assign(Object.assign({}, (data._cognigy || {})), { _preventTranscript: true });
170
173
  }
171
174
  /**
172
175
  * This is a say node which is set to a type other than 'text' -
@@ -639,11 +639,10 @@ export const AI_AGENT_JOB = createNodeDescriptor({
639
639
  defaultValue: "",
640
640
  type: "ttsSelect",
641
641
  label: "_unused_",
642
- description: "_unused_",
643
642
  params: {
644
643
  languageKey: "config.ttsLanguage",
645
644
  modelKey: "config.ttsModel",
646
- voiceKey: "config.ttsVoice"
645
+ voiceKey: "config.ttsVoice",
647
646
  },
648
647
  condition: {
649
648
  key: "voiceSetting",
@@ -668,6 +667,37 @@ export const AI_AGENT_JOB = createNodeDescriptor({
668
667
  type: "ttsSelect",
669
668
  defaultValue: "",
670
669
  label: "_unused_",
670
+ },
671
+ {
672
+ key: "ttsLabel",
673
+ type: "cognigyText",
674
+ defaultValue: "",
675
+ label: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__TTS_LABEL__LABEL",
676
+ description: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__TTS_LABEL__DESCRIPTION",
677
+ condition: {
678
+ and: [
679
+ {
680
+ negate: true,
681
+ key: "ttsVendor",
682
+ value: "", // We show the field for all vendors as soon as it is defined
683
+ },
684
+ {
685
+ key: "voiceSetting",
686
+ value: "jobVoice"
687
+ }
688
+ ]
689
+ },
690
+ },
691
+ {
692
+ key: "ttsDisableCache",
693
+ type: "toggle",
694
+ defaultValue: false,
695
+ label: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__TTS_DISABLE_CACHE__LABEL",
696
+ description: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__TTS_DISABLE_CACHE__DESCRIPTION",
697
+ condition: {
698
+ key: "voiceSetting",
699
+ value: "jobVoice"
700
+ },
671
701
  }
672
702
  ],
673
703
  sections: [
@@ -718,6 +748,8 @@ export const AI_AGENT_JOB = createNodeDescriptor({
718
748
  fields: [
719
749
  "voiceSetting",
720
750
  "ttsVendor",
751
+ "ttsLabel",
752
+ "ttsDisableCache",
721
753
  ],
722
754
  },
723
755
  {
@@ -806,6 +838,8 @@ export const AI_AGENT_JOB = createNodeDescriptor({
806
838
  ttsLanguage: aiAgent.voiceConfigs.ttsLanguage,
807
839
  ttsModel: aiAgent.voiceConfigs.ttsModel,
808
840
  ttsVoice: aiAgent.voiceConfigs.ttsVoice,
841
+ ttsLabel: aiAgent.voiceConfigs.ttsLabel,
842
+ ttsDisableCache: aiAgent.voiceConfigs.ttsDisableCache,
809
843
  });
810
844
  }
811
845
  else {
@@ -815,6 +849,8 @@ export const AI_AGENT_JOB = createNodeDescriptor({
815
849
  ttsLanguage: "",
816
850
  ttsModel: "",
817
851
  ttsVoice: "",
852
+ ttsLabel: "",
853
+ ttsDisableCache: false,
818
854
  });
819
855
  }
820
856
  }
@@ -1056,6 +1092,8 @@ export const AI_AGENT_JOB = createNodeDescriptor({
1056
1092
  messageLines.push(`UI__DEBUG_MODE__AI_AGENT_JOB__CONFIGURATION__VOICE_SETTING__TTS_LANGUAGE ${config.ttsLanguage || 'UI__DEBUG_MODE__AI_AGENT_JOB__CONFIGURATION__VOICE_SETTING__NOT_SET'}`);
1057
1093
  messageLines.push(`UI__DEBUG_MODE__AI_AGENT_JOB__CONFIGURATION__VOICE_SETTING__TTS_MODEL ${config.ttsModel || 'UI__DEBUG_MODE__AI_AGENT_JOB__CONFIGURATION__VOICE_SETTING__NOT_SET'}`);
1058
1094
  messageLines.push(`UI__DEBUG_MODE__AI_AGENT_JOB__CONFIGURATION__VOICE_SETTING__TTS_VOICE ${config.ttsVoice || 'UI__DEBUG_MODE__AI_AGENT_JOB__CONFIGURATION__VOICE_SETTING__NOT_SET'}`);
1095
+ messageLines.push(`UI__DEBUG_MODE__AI_AGENT_JOB__CONFIGURATION__VOICE_SETTING__TTS_LABEL ${config.ttsLabel || 'UI__DEBUG_MODE__AI_AGENT_JOB__CONFIGURATION__VOICE_SETTING__NOT_SET'}`);
1096
+ messageLines.push(`UI__DEBUG_MODE__AI_AGENT_JOB__CONFIGURATION__VOICE_SETTING__TTS_DISABLE_CACHE ${config.ttsDisableCache || 'UI__DEBUG_MODE__AI_AGENT_JOB__CONFIGURATION__VOICE_SETTING__NOT_SET'}`);
1059
1097
  (_t = api.logDebugMessage) === null || _t === void 0 ? void 0 : _t.call(api, messageLines.join("\n"), "UI__DEBUG_MODE__AI_AGENT_JOB__CONFIGURATION__HEADER");
1060
1098
  }
1061
1099
  // keep this after the debug message since the "retrieve_knowledge" tool is implicit
@@ -1147,7 +1185,7 @@ export const AI_AGENT_JOB = createNodeDescriptor({
1147
1185
  const mainToolCall = llmResult.toolCalls[0];
1148
1186
  // Find the child node with the toolId of the tool call
1149
1187
  const toolChild = childConfigs.find(child => { var _a, _b; return child.type === "aiAgentJobTool" && ((_a = child.config) === null || _a === void 0 ? void 0 : _a.toolId) && api.parseCognigyScriptText((_b = child.config) === null || _b === void 0 ? void 0 : _b.toolId) === mainToolCall.function.name; });
1150
- if (toolChild === undefined) {
1188
+ if (mainToolCall.function.name !== "retrieve_knowledge" && toolChild === undefined) {
1151
1189
  (_z = api.logDebugError) === null || _z === void 0 ? void 0 : _z.call(api, `UI__DEBUG_MODE__AI_AGENT_JOB__TOOL_CALL__ERROR__BODY <b>${mainToolCall.function.name}</b>`, "UI__DEBUG_MODE__AI_AGENT_JOB__TOOL_CALL__ERROR__HEADER");
1152
1190
  }
1153
1191
  // Add last tool call to session state for loading it from Tool Answer Node
@@ -56,6 +56,13 @@ export const PLATFORM_PROVIDED_LLM_USE_CASES = [
56
56
  "flowGeneration",
57
57
  "lexiconGeneration",
58
58
  "generateNodeOutput",
59
+ "designTimeGeneration",
60
+ ];
61
+ export const DEPRECATED_GENAI_USE_CASES = [
62
+ "intentSentenceGeneration",
63
+ "flowGeneration",
64
+ "lexiconGeneration",
65
+ "generateNodeOutput",
59
66
  ];
60
67
  export const PLATFORM_PROVIDED_LLM_ID = "aaaaaaaa-aaaa-aaaa-aaaa-000000000000";
61
68
  export const PLATFORM_PROVIDED_LLM_CONNECTION_ID = "aaaaaaaa-aaaa-aaaa-aaaa-000000000001";
@@ -40,7 +40,7 @@ export const defaultProfile = {
40
40
  privacy_policy: {
41
41
  accepted: false
42
42
  },
43
- goals: [],
43
+ tasks: [],
44
44
  memories: [],
45
45
  };
46
46
  //# sourceMappingURL=IProfileSchema.js.map
@@ -68,6 +68,7 @@ export const generativeAIUseCases = [
68
68
  "gptPromptNode",
69
69
  "aiEnhancedOutputs",
70
70
  "sentimentAnalysis",
71
+ "designTimeGeneration",
71
72
  "intentSentenceGeneration",
72
73
  "flowGeneration",
73
74
  "generateNodeOutput",
@@ -425,7 +425,12 @@ export const anyEndpointSettingsSchema = {
425
425
  timeout: { type: "integer" },
426
426
  updateContactProfileWithFacebookProfile: { type: "boolean" },
427
427
  voice: { type: "string" },
428
- webhookUrl: { type: "string", format: "uri" },
428
+ webhookUrl: {
429
+ oneOf: [
430
+ { type: "string", format: "uri" },
431
+ { type: "string", enum: [""] }
432
+ ]
433
+ },
429
434
  enableConnectionStatusIndicator: { type: "boolean" },
430
435
  enableUnreadMessageTitleIndicator: { type: "boolean" },
431
436
  showEngagementMessagesInChat: { type: "boolean" },
@@ -263,7 +263,12 @@ export const pollEventSchema = {
263
263
  disableSensitiveLogging: { type: "boolean" },
264
264
  pollingTimeoutAt: { type: "number" },
265
265
  sequence: { type: "number" },
266
- lastEventId: { type: "string" }
266
+ lastEventId: { type: "string" },
267
+ projectId: { type: "string" },
268
+ URLToken: { type: "string" },
269
+ userId: { type: "string" },
270
+ channel: { type: "string" },
271
+ retryCount: { type: "number" }
267
272
  },
268
273
  };
269
274
  export const handleHandoverRpcEventSchema = {
@@ -25,7 +25,9 @@ export const aiAgentDataSchema = {
25
25
  ttsVoice: { type: "string" },
26
26
  ttsLanguage: { type: "string" },
27
27
  ttsVendor: { type: "string" },
28
- ttsModel: { type: "string" }
28
+ ttsModel: { type: "string" },
29
+ ttsLabel: { type: "string" },
30
+ ttsDisableCache: { type: "boolean" }
29
31
  }
30
32
  },
31
33
  enableVoiceConfigs: { type: "boolean" },
@@ -27,6 +27,10 @@ export const generativeAISettingsDataSchema = {
27
27
  type: "object",
28
28
  additionalProperties: false,
29
29
  properties: {
30
+ designTimeGeneration: {
31
+ type: "object",
32
+ properties: Object.assign({}, generativeAIUseCaseDataSchema.properties)
33
+ },
30
34
  intentSentenceGeneration: {
31
35
  type: "object",
32
36
  properties: Object.assign({}, generativeAIUseCaseDataSchema.properties)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cognigy/rest-api-client",
3
- "version": "4.97.0",
3
+ "version": "4.98.0",
4
4
  "description": "Cognigy REST-Client",
5
5
  "main": "build/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -31,7 +31,7 @@
31
31
  "license": "Cognigy Proprietary License",
32
32
  "dependencies": {
33
33
  "ajv": "6.12.6",
34
- "axios": "1.7.9",
34
+ "axios": "1.8.3",
35
35
  "form-data": "4.0.0",
36
36
  "tus-js-client": "^3.1.1",
37
37
  "uuidv4": "6.2.13"
package/types/index.d.ts CHANGED
@@ -4369,6 +4369,7 @@ declare const generativeAIUseCases: readonly [
4369
4369
  "gptPromptNode",
4370
4370
  "aiEnhancedOutputs",
4371
4371
  "sentimentAnalysis",
4372
+ "designTimeGeneration",
4372
4373
  "intentSentenceGeneration",
4373
4374
  "flowGeneration",
4374
4375
  "generateNodeOutput",
@@ -5240,6 +5241,8 @@ export declare type TGenerativeAIProviders_2_0 = TGenerativeAIProviders;
5240
5241
  * useCasesSettings:
5241
5242
  * type: object
5242
5243
  * properties:
5244
+ * designTimeGeneration:
5245
+ * $ref: '#/components/schemas/IGenerativeAIMeta_2_0'
5243
5246
  * intentSentenceGeneration:
5244
5247
  * $ref: '#/components/schemas/IGenerativeAIMeta_2_0'
5245
5248
  * aiEnhancedOutputs:
@@ -7518,6 +7521,7 @@ export interface ICreatePlaybookRestDataQuery_2_0 {
7518
7521
  resourceId?: string;
7519
7522
  }
7520
7523
  export interface ICreatePlaybookRestDataBody_2_0 extends IProjectScope, Partial<Omit<IPlaybook_2_0, keyof IEntityMeta>> {
7524
+ resourceType?: TResourceType;
7521
7525
  }
7522
7526
  export interface ICreatePlaybookRestData_2_0 extends ICreatePlaybookRestDataBody_2_0, ICreatePlaybookRestDataQuery_2_0 {
7523
7527
  }
@@ -9045,6 +9049,7 @@ export declare type TAudioPreviewProvider = typeof audioPreviewProviders[number]
9045
9049
  * properties:
9046
9050
  * useCase:
9047
9051
  * enum:
9052
+ * - designTimeGeneration
9048
9053
  * - intentSentenceGeneration
9049
9054
  * - aiEnhancedOutputs
9050
9055
  * - lexiconGeneration
@@ -9442,6 +9447,8 @@ export interface IVoiceConfigParams {
9442
9447
  ttsLanguage: string;
9443
9448
  ttsVendor: TVoiceGateway2TTSVendor | "none";
9444
9449
  ttsModel: string;
9450
+ ttsLabel: string;
9451
+ ttsDisableCache: boolean;
9445
9452
  }
9446
9453
  declare const contactProfileOptions: readonly [
9447
9454
  "none",
@@ -10533,6 +10540,10 @@ export interface IActions {
10533
10540
  setTimezoneOffset?: (offset: number | string) => void;
10534
10541
  setTranslationSettings?: (translationSettings: IEndpointTranslationSettings) => void;
10535
10542
  switchFlow?: (id: string, text: string, data: any, version?: number, absorbContext?: boolean) => void;
10543
+ /**
10544
+ * @deprecated since 4.98.0
10545
+ * Use thinkV2 instead
10546
+ * */
10536
10547
  think?: (nodeId: string) => (text: string, data: any) => void;
10537
10548
  thinkV2?: (nodeId: string) => (text: string, data: any) => void;
10538
10549
  trackAnalyticsStep?: (stepLabel: string) => (trackArgs?: ITrackAnalyticsStepsArguments) => void;
@@ -11034,6 +11045,10 @@ export interface ISetStateNodeParams extends INodeFunctionBaseParams {
11034
11045
  };
11035
11046
  };
11036
11047
  }
11048
+ /**
11049
+ * @deprecated since 4.98.0.
11050
+ * Use THINK_V2 instead
11051
+ */
11037
11052
  export interface IThinkNodeParams extends INodeFunctionBaseParams {
11038
11053
  config: {
11039
11054
  thinkType: "default" | "intent";
@@ -11086,6 +11101,10 @@ export interface INodeExecutionAPI extends Omit<IActions, "parseCognigyScriptCon
11086
11101
  parseCognigyScriptText: (text: string) => string;
11087
11102
  parseCognigyScriptResultLocation?: (text: string) => any;
11088
11103
  evaluateRule: (rule: IRule) => boolean;
11104
+ /**
11105
+ * @deprecated since 4.98.0.
11106
+ * Use thinkV2 instead
11107
+ * */
11089
11108
  think: (text: string, data: {
11090
11109
  [key: string]: any;
11091
11110
  }) => void;
@@ -18326,7 +18345,11 @@ export interface IGenerateNluScoresRestReturnValue_2_0 {
18326
18345
  * type: string
18327
18346
  * ttsModel:
18328
18347
  * type: string
18329
- * example: { "ttsVoice": "Xb7hH8MSUJpSbSDYk0k2", "ttsLanguage": "zh", "ttsVendor": "Elevenlabs", "ttsModel": "eleven_multilingual_v2" }
18348
+ * ttsLabel:
18349
+ * type: string
18350
+ * ttsDisableCache:
18351
+ * type: boolean
18352
+ * example: { "ttsVoice": "Xb7hH8MSUJpSbSDYk0k2", "ttsLanguage": "zh", "ttsVendor": "Elevenlabs", "ttsModel": "eleven_multilingual_v2", "ttsLabel": "microsoft US", "ttsDisableCache": false }
18330
18353
  * enableVoiceConfigs:
18331
18354
  * type: boolean
18332
18355
  * description: Enables the use of voice configuration.
@@ -19397,7 +19420,7 @@ export interface IProfile_2_0 {
19397
19420
  * type: boolean
19398
19421
  * privacy_policy:
19399
19422
  * type: object
19400
- * goals:
19423
+ * tasks:
19401
19424
  * type: array
19402
19425
  * items:
19403
19426
  * type: string
@@ -19424,7 +19447,7 @@ export interface IFlattenedProfile_2_0 {
19424
19447
  prevent_data_collection: boolean;
19425
19448
  accepted_gdpr: boolean;
19426
19449
  privacy_policy: IProfilePrivacyPolicy;
19427
- goals?: string[];
19450
+ tasks?: string[];
19428
19451
  memories?: IMemory[];
19429
19452
  firstname?: string;
19430
19453
  lastname?: string;
@@ -19530,7 +19553,7 @@ export interface IProfileSchema_2_0 {
19530
19553
  prevent_data_collection: "boolean";
19531
19554
  accepted_gdpr: "boolean";
19532
19555
  privacy_policy: "object";
19533
- goals: "object";
19556
+ tasks: "object";
19534
19557
  memories: "object";
19535
19558
  [key: string]: "string" | "boolean" | "number" | "object";
19536
19559
  };