@cognigy/rest-api-client 2025.11.0 → 2025.13.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 (103) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/build/RestAPIClient.js +7 -0
  3. package/build/apigroups/ResourcesAPIGroup_2_0.js +4 -0
  4. package/build/apigroups/SimulationAPIGroup_2_0.js +58 -0
  5. package/build/apigroups/index.js +3 -1
  6. package/build/shared/charts/descriptors/analytics/trackGoal.js +3 -1
  7. package/build/shared/charts/descriptors/index.js +7 -1
  8. package/build/shared/charts/descriptors/knowledgeSearch/searchExtractOutput.js +4 -2
  9. package/build/shared/charts/descriptors/message/question/question.js +24 -5
  10. package/build/shared/charts/descriptors/service/GPTPrompt.js +15 -1
  11. package/build/shared/charts/descriptors/service/aiAgent/aiAgentJob.js +32 -173
  12. package/build/shared/charts/descriptors/service/aiAgent/aiAgentJobTool.js +2 -2
  13. package/build/shared/charts/descriptors/service/aiAgent/helpers/createToolDefinitions.js +175 -0
  14. package/build/shared/charts/descriptors/service/aiAgent/loadAiAgent.js +194 -0
  15. package/build/shared/charts/descriptors/service/aiOpsCenterConnection.js +12 -0
  16. package/build/shared/charts/descriptors/service/handoverV2.js +1 -1
  17. package/build/shared/charts/descriptors/service/index.js +13 -1
  18. package/build/shared/charts/descriptors/service/llmPrompt/LLMPromptV2.js +922 -0
  19. package/build/shared/charts/descriptors/service/llmPrompt/llmPromptDefault.js +31 -0
  20. package/build/shared/charts/descriptors/service/llmPrompt/llmPromptMCPTool.js +196 -0
  21. package/build/shared/charts/descriptors/service/llmPrompt/llmPromptTool.js +139 -0
  22. package/build/shared/charts/descriptors/voicegateway2/nodes/setSessionConfig.js +2 -2
  23. package/build/shared/constants.js +1 -5
  24. package/build/shared/interfaces/debugEvents/IGoalCompletedEventPayload.js +3 -0
  25. package/build/shared/interfaces/debugEvents/TDebugEventType.js +1 -0
  26. package/build/shared/interfaces/generativeAI/IGenerativeAIModels.js +12 -1
  27. package/build/shared/interfaces/resources/IAuditEvent.js +3 -0
  28. package/build/shared/interfaces/resources/ILargeLanguageModel.js +1 -0
  29. package/build/shared/interfaces/resources/TResourceType.js +2 -0
  30. package/build/shared/interfaces/resources/TRestChannelType.js +5 -0
  31. package/build/shared/interfaces/resources/knowledgeStore/IKnowledgeChunk.js +2 -1
  32. package/build/shared/interfaces/resources/settings/IGenerativeAISettings.js +5 -18
  33. package/build/shared/interfaces/restAPI/operations/generateOutput/v2.0/index.js +3 -0
  34. package/build/shared/interfaces/restAPI/opsCenter/observationConfig/IOpsCenterObservationConfig.js +1 -1
  35. package/build/shared/interfaces/restAPI/simulation/simulation/ICreateSimulationRest_2_0.js +3 -0
  36. package/build/shared/interfaces/restAPI/simulation/simulation/IDeleteSimulationRest_2_0.js +3 -0
  37. package/build/shared/interfaces/restAPI/simulation/simulation/IIndexSimulationRest_2_0.js +3 -0
  38. package/build/shared/interfaces/restAPI/simulation/simulation/IReadSimulationRest_2_0.js +3 -0
  39. package/build/shared/interfaces/restAPI/simulation/simulation/IScheduleSimulationRest_2_0.js +3 -0
  40. package/build/shared/interfaces/restAPI/simulation/simulation/ISimulationRest_2_0.js +9 -0
  41. package/build/shared/interfaces/restAPI/simulation/simulation/IUpdateSimulationRest_2_0.js +3 -0
  42. package/build/shared/interfaces/restAPI/simulation/simulationRun/IIndexSimulationRunRest_2_0.js +3 -0
  43. package/build/shared/interfaces/restAPI/simulation/simulationRun/IReadSimulationRunRest_2_0.js +3 -0
  44. package/build/shared/interfaces/restAPI/simulation/simulationRun/ISimulationRunRest_2_0.js +19 -0
  45. package/build/shared/interfaces/restAPI/simulation/simulationRunBatch/IGetAllSimulationRunBatchRest_2_0.js +3 -0
  46. package/build/shared/interfaces/restAPI/simulation/simulationRunBatch/IIndexSimulationRunBatchRest_2_0.js +3 -0
  47. package/build/shared/interfaces/restAPI/simulation/simulationRunBatch/IReadSimulationRunBatchRest_2_0.js +3 -0
  48. package/build/shared/interfaces/restAPI/simulation/simulationRunBatch/ISimulationRunBatchRest_2_0.js +9 -0
  49. package/build/shared/interfaces/security/IPermission.js +2 -0
  50. package/build/shared/interfaces/security/IRole.js +3 -1
  51. package/build/shared/interfaces/security/index.js +1 -1
  52. package/dist/esm/RestAPIClient.js +7 -0
  53. package/dist/esm/apigroups/ResourcesAPIGroup_2_0.js +4 -0
  54. package/dist/esm/apigroups/SimulationAPIGroup_2_0.js +44 -0
  55. package/dist/esm/apigroups/index.js +1 -0
  56. package/dist/esm/shared/charts/descriptors/analytics/trackGoal.js +3 -1
  57. package/dist/esm/shared/charts/descriptors/index.js +8 -2
  58. package/dist/esm/shared/charts/descriptors/knowledgeSearch/searchExtractOutput.js +4 -2
  59. package/dist/esm/shared/charts/descriptors/message/question/question.js +24 -5
  60. package/dist/esm/shared/charts/descriptors/service/GPTPrompt.js +15 -1
  61. package/dist/esm/shared/charts/descriptors/service/aiAgent/aiAgentJob.js +33 -174
  62. package/dist/esm/shared/charts/descriptors/service/aiAgent/aiAgentJobTool.js +2 -2
  63. package/dist/esm/shared/charts/descriptors/service/aiAgent/helpers/createToolDefinitions.js +172 -0
  64. package/dist/esm/shared/charts/descriptors/service/aiAgent/loadAiAgent.js +192 -0
  65. package/dist/esm/shared/charts/descriptors/service/aiOpsCenterConnection.js +9 -0
  66. package/dist/esm/shared/charts/descriptors/service/handoverV2.js +1 -1
  67. package/dist/esm/shared/charts/descriptors/service/index.js +6 -0
  68. package/dist/esm/shared/charts/descriptors/service/llmPrompt/LLMPromptV2.js +909 -0
  69. package/dist/esm/shared/charts/descriptors/service/llmPrompt/llmPromptDefault.js +28 -0
  70. package/dist/esm/shared/charts/descriptors/service/llmPrompt/llmPromptMCPTool.js +193 -0
  71. package/dist/esm/shared/charts/descriptors/service/llmPrompt/llmPromptTool.js +136 -0
  72. package/dist/esm/shared/charts/descriptors/voicegateway2/nodes/setSessionConfig.js +2 -2
  73. package/dist/esm/shared/constants.js +1 -5
  74. package/dist/esm/shared/interfaces/debugEvents/IGoalCompletedEventPayload.js +2 -0
  75. package/dist/esm/shared/interfaces/debugEvents/TDebugEventType.js +1 -0
  76. package/dist/esm/shared/interfaces/generativeAI/IGenerativeAIModels.js +12 -1
  77. package/dist/esm/shared/interfaces/resources/IAuditEvent.js +3 -0
  78. package/dist/esm/shared/interfaces/resources/ILargeLanguageModel.js +1 -0
  79. package/dist/esm/shared/interfaces/resources/TResourceType.js +2 -0
  80. package/dist/esm/shared/interfaces/resources/TRestChannelType.js +5 -0
  81. package/dist/esm/shared/interfaces/resources/knowledgeStore/IKnowledgeChunk.js +2 -1
  82. package/dist/esm/shared/interfaces/resources/settings/IGenerativeAISettings.js +4 -17
  83. package/dist/esm/shared/interfaces/restAPI/operations/generateOutput/v2.0/index.js +2 -0
  84. package/dist/esm/shared/interfaces/restAPI/opsCenter/observationConfig/IOpsCenterObservationConfig.js +1 -1
  85. package/dist/esm/shared/interfaces/restAPI/simulation/simulation/ICreateSimulationRest_2_0.js +2 -0
  86. package/dist/esm/shared/interfaces/restAPI/simulation/simulation/IDeleteSimulationRest_2_0.js +2 -0
  87. package/dist/esm/shared/interfaces/restAPI/simulation/simulation/IIndexSimulationRest_2_0.js +2 -0
  88. package/dist/esm/shared/interfaces/restAPI/simulation/simulation/IReadSimulationRest_2_0.js +2 -0
  89. package/dist/esm/shared/interfaces/restAPI/simulation/simulation/IScheduleSimulationRest_2_0.js +2 -0
  90. package/dist/esm/shared/interfaces/restAPI/simulation/simulation/ISimulationRest_2_0.js +6 -0
  91. package/dist/esm/shared/interfaces/restAPI/simulation/simulation/IUpdateSimulationRest_2_0.js +2 -0
  92. package/dist/esm/shared/interfaces/restAPI/simulation/simulationRun/IIndexSimulationRunRest_2_0.js +2 -0
  93. package/dist/esm/shared/interfaces/restAPI/simulation/simulationRun/IReadSimulationRunRest_2_0.js +2 -0
  94. package/dist/esm/shared/interfaces/restAPI/simulation/simulationRun/ISimulationRunRest_2_0.js +16 -0
  95. package/dist/esm/shared/interfaces/restAPI/simulation/simulationRunBatch/IGetAllSimulationRunBatchRest_2_0.js +2 -0
  96. package/dist/esm/shared/interfaces/restAPI/simulation/simulationRunBatch/IIndexSimulationRunBatchRest_2_0.js +2 -0
  97. package/dist/esm/shared/interfaces/restAPI/simulation/simulationRunBatch/IReadSimulationRunBatchRest_2_0.js +2 -0
  98. package/dist/esm/shared/interfaces/restAPI/simulation/simulationRunBatch/ISimulationRunBatchRest_2_0.js +6 -0
  99. package/dist/esm/shared/interfaces/security/IPermission.js +2 -0
  100. package/dist/esm/shared/interfaces/security/IRole.js +3 -1
  101. package/dist/esm/shared/interfaces/security/index.js +1 -1
  102. package/package.json +1 -1
  103. package/types/index.d.ts +394 -45
@@ -0,0 +1,192 @@
1
+ import { __awaiter } from "tslib";
2
+ /* Custom modules */
3
+ import { createNodeDescriptor } from "../../../createNodeDescriptor";
4
+ /**
5
+ * Node name: 'loadAiAigent'
6
+ *
7
+ * Purpose:
8
+ * Loads the AI Agent configuration and stores it to context/input.
9
+ */
10
+ export const LOAD_AI_AGENT = createNodeDescriptor({
11
+ type: "loadAiAigent",
12
+ defaultLabel: "Load AI Agent",
13
+ summary: "UI__NODE_EDITOR__LOAD_AI_AGENT__SUMMARY",
14
+ appearance: {
15
+ showIcon: false
16
+ },
17
+ fields: [
18
+ {
19
+ key: "aiAgent",
20
+ type: "aiAgentSelect",
21
+ label: "UI__NODE_EDITOR__LOAD_AI_AGENT__AI_AGENT_SELECTOR__LABEL",
22
+ description: "UI__NODE_EDITOR__AI_AGENT__AI_AGENT_SELECTOR__DESCRIPTION",
23
+ params: {
24
+ required: true
25
+ },
26
+ },
27
+ {
28
+ key: "storeLocation",
29
+ type: "select",
30
+ label: "UI__NODE_EDITOR__LOAD_AI_AGENT__FIELDS__STORE_LOCATION__LABEL",
31
+ description: "UI__NODE_EDITOR__LOAD_AI_AGENT__FIELDS__STORE_LOCATION__DESCRIPTION",
32
+ defaultValue: "context",
33
+ params: {
34
+ options: [
35
+ {
36
+ label: "UI__NODE_EDITOR__LOAD_AI_AGENT__FIELDS__STORE_LOCATION__OPTIONS__INPUT__LABEL",
37
+ value: "input"
38
+ },
39
+ {
40
+ label: "UI__NODE_EDITOR__LOAD_AI_AGENT__FIELDS__STORE_LOCATION__OPTIONS__CONTEXT__LABEL",
41
+ value: "context"
42
+ }
43
+ ],
44
+ required: true
45
+ },
46
+ },
47
+ {
48
+ key: "inputKey",
49
+ type: "cognigyText",
50
+ label: "UI__NODE_EDITOR__LOAD_AI_AGENT__FIELDS__INPUT_KEY__LABEL",
51
+ description: "UI__NODE_EDITOR__LOAD_AI_AGENT__FIELDS__INPUT_KEY__DESCRIPTION",
52
+ defaultValue: "aiAgentConfiguration",
53
+ condition: {
54
+ or: [
55
+ {
56
+ key: "storeLocation",
57
+ value: "input",
58
+ }
59
+ ]
60
+ }
61
+ },
62
+ {
63
+ key: "contextKey",
64
+ type: "cognigyText",
65
+ label: "UI__NODE_EDITOR__LOAD_AI_AGENT__FIELDS__CONTEXT_KEY__LABEL",
66
+ description: "UI__NODE_EDITOR__LOAD_AI_AGENT__FIELDS__CONTEXT_KEY__DESCRIPTION",
67
+ defaultValue: "aiAgentConfiguration",
68
+ condition: {
69
+ key: "storeLocation",
70
+ value: "context",
71
+ }
72
+ },
73
+ {
74
+ key: "keyWarning",
75
+ type: "description",
76
+ label: " ",
77
+ params: {
78
+ text: "UI__NODE_EDITOR__LOAD_AI_AGENT__FIELDS__KEY_WARNING__TEXT"
79
+ },
80
+ condition: {
81
+ or: [
82
+ {
83
+ and: [
84
+ {
85
+ key: "storeLocation",
86
+ value: "input",
87
+ },
88
+ {
89
+ key: "inputKey",
90
+ value: "aiAgentConfiguration",
91
+ negate: true
92
+ }
93
+ ]
94
+ },
95
+ {
96
+ and: [
97
+ {
98
+ key: "storeLocation",
99
+ value: "context",
100
+ },
101
+ {
102
+ key: "contextKey",
103
+ value: "aiAgentConfiguration",
104
+ negate: true
105
+ }
106
+ ]
107
+ }
108
+ ]
109
+ }
110
+ }
111
+ ],
112
+ preview: {
113
+ key: "storeLocation",
114
+ type: "text",
115
+ },
116
+ form: [
117
+ { type: "field", key: "aiAgent" },
118
+ { type: "field", key: "storeLocation" },
119
+ { type: "field", key: "inputKey" },
120
+ { type: "field", key: "contextKey" },
121
+ { type: "field", key: "keyWarning" }
122
+ ],
123
+ tags: ["ai", "aiagent", "llm"],
124
+ tokens: [
125
+ {
126
+ label: "AI Agent Reference ID",
127
+ type: "input",
128
+ script: "(input.aiAgentConfiguration || context.aiAgentConfiguration)?.referenceId",
129
+ },
130
+ {
131
+ label: "AI Agent Name",
132
+ type: "input",
133
+ script: "(input.aiAgentConfiguration || context.aiAgentConfiguration)?.name",
134
+ },
135
+ {
136
+ label: "AI Agent Description",
137
+ type: "input",
138
+ script: "(input.aiAgentConfiguration || context.aiAgentConfiguration)?.description",
139
+ },
140
+ {
141
+ label: "AI Agent Instructions",
142
+ type: "input",
143
+ script: "(input.aiAgentConfiguration || context.aiAgentConfiguration)?.instructions",
144
+ },
145
+ {
146
+ label: "AI Agent Image URL",
147
+ type: "input",
148
+ script: "(input.aiAgentConfiguration || context.aiAgentConfiguration)?.image",
149
+ },
150
+ {
151
+ label: "AI Agent Knowledge Store ID",
152
+ type: "input",
153
+ script: "(input.aiAgentConfiguration || context.aiAgentConfiguration)?.knowledgeReferenceId",
154
+ },
155
+ ],
156
+ function: ({ cognigy, config }) => __awaiter(void 0, void 0, void 0, function* () {
157
+ const { api } = cognigy;
158
+ const { aiAgent, storeLocation, contextKey, inputKey } = config;
159
+ if (storeLocation === "input" && !inputKey) {
160
+ throw new Error("Unable to add value to input. No input key was defined.");
161
+ }
162
+ if (storeLocation === "context" && !contextKey) {
163
+ throw new Error("Unable to add value to context. No context key was defined.");
164
+ }
165
+ if (!aiAgent) {
166
+ throw new Error("Unable to load AI Agent values. No AI agent was defined.");
167
+ }
168
+ const aiAgentData = {
169
+ referenceId: aiAgent.referenceId,
170
+ name: aiAgent.name,
171
+ description: aiAgent.description,
172
+ instructions: aiAgent.instructions,
173
+ image: aiAgent.image,
174
+ speakingStyle: aiAgent.speakingStyle,
175
+ safetySettings: aiAgent.safetySettings,
176
+ contactProfilesOption: aiAgent.contactProfilesOption,
177
+ contactProfilesSelected: aiAgent.contactProfilesSelected,
178
+ knowledgeReferenceId: aiAgent.knowledgeReferenceId,
179
+ enableVoiceConfigs: aiAgent.enableVoiceConfigs,
180
+ voiceConfigs: aiAgent.voiceConfigs,
181
+ };
182
+ switch (storeLocation) {
183
+ case "context":
184
+ // @ts-ignore
185
+ api.addToContext(contextKey, aiAgentData, "simple");
186
+ break;
187
+ default:
188
+ api.addToInput(inputKey, aiAgentData);
189
+ }
190
+ })
191
+ });
192
+ //# sourceMappingURL=loadAiAgent.js.map
@@ -0,0 +1,9 @@
1
+ export const AIOPS_CENTER_WEBHOOKS_CONNECTION = {
2
+ type: "AIOpsCenterWebhookBasicAuth",
3
+ label: "UI__CONNECTION_EDITOR__FIELD_AIOPS_CENTER_WEBHOOKS_CONNECTION__LABEL",
4
+ fields: [
5
+ { fieldName: "username", label: "UI__CONNECTION_EDITOR__FIELD_AIOPS_CENTER_WEBHOOKS_CONNECTION_USERNAME__LABEL" },
6
+ { fieldName: "password", label: "UI__CONNECTION_EDITOR__FIELD_AIOPS_CENTER_WEBHOOKS_CONNECTION_PASSWORD__LABEL" },
7
+ ],
8
+ };
9
+ //# sourceMappingURL=aiOpsCenterConnection.js.map
@@ -84,7 +84,7 @@ export const HANDOVER_V2 = createNodeDescriptor({
84
84
  label: "UI__NODE_EDITOR__SERVICE__HANDOVER_TO_AGENT__FIELDS__HANDOVER_PROVIDER__LABEL",
85
85
  type: "json",
86
86
  description: "UI__NODE_EDITOR__SERVICE__HANDOVER_TO_AGENT__FIELDS__HANDOVER_PROVIDER__DESCRIPTION",
87
- defaultValue: {},
87
+ defaultValue: { liveAgentPriority: "none" },
88
88
  params: {
89
89
  required: true,
90
90
  },
@@ -11,6 +11,10 @@ export { TRIGGER_FUNCTION } from "./triggerFunction/triggerFunction";
11
11
  export { ON_SCHEDULED } from "./triggerFunction/onScheduled";
12
12
  export { ON_SCHEDULING_ERROR } from "./triggerFunction/onSchedulingError";
13
13
  export { GPT_PROMPT } from "./GPTPrompt";
14
+ export { LLM_PROMPT_V2 } from "./llmPrompt/LLMPromptV2";
15
+ export { LLM_PROMPT_DEFAULT } from "./llmPrompt/llmPromptDefault";
16
+ export { LLM_PROMPT_MCP_TOOL } from "./llmPrompt/llmPromptMCPTool";
17
+ export { LLM_PROMPT_TOOL } from "./llmPrompt/llmPromptTool";
14
18
  export { CLOSE_HANDOVER } from "./closeHandover";
15
19
  export { HANDOVER_INACTIVITY_TIMER } from "./handoverInactivityTimer";
16
20
  export { GPT_CONVERSATION } from "./GPTConversation";
@@ -24,6 +28,8 @@ export { AI_AGENT_JOB_MCP_TOOL } from "./aiAgent/aiAgentJobMCPTool";
24
28
  export { AI_AGENT_TOOL_ANSWER } from "./aiAgent/aiAgentToolAnswer";
25
29
  export { AI_AGENT_HANDOVER } from "./aiAgent/aiAgentHandover";
26
30
  export { AI_AGENT_JOB_CALL_MCP_TOOL } from "./aiAgent/aiAgentJobCallMCPTool";
31
+ export { LOAD_AI_AGENT } from "./aiAgent/loadAiAgent";
27
32
  export { LIVE_AGENT_CONNECTION, RINGCENTRAL_ENGAGE_CONNECTION, CHATWOOT_CONNECTION, EIGHT_BY_EIGHT_CONNECTION, GENESYS_CLOUD_CONNECTION, GENESYS_CLOUD_CONNECTION_OM } from "./handoverConnections";
28
33
  export { NICECXONEAAH_AUTHENTICATION_CONNECTION } from "./niceCXOneAAHAuthenticationConnection";
34
+ export { AIOPS_CENTER_WEBHOOKS_CONNECTION } from "./aiOpsCenterConnection";
29
35
  //# sourceMappingURL=index.js.map