@cognigy/rest-api-client 0.14.0 → 0.15.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 (274) hide show
  1. package/build/RestAPIClient.js +4 -0
  2. package/build/apigroups/AdministrationAPIGroup_2_1.js +13 -0
  3. package/build/apigroups/ResourcesAPIGroup_2_0.js +69 -9
  4. package/build/apigroups/index.js +3 -1
  5. package/build/connector/AxiosAdapter.js +1 -1
  6. package/build/shared/api/eightByEight/eightByEightInterfaces.js +3 -0
  7. package/build/shared/charts/descriptors/agentAssist/index.js +10 -0
  8. package/build/shared/charts/descriptors/agentAssist/setAdaptiveCardTile.js +74 -0
  9. package/build/shared/charts/descriptors/agentAssist/setHtmlTile.js +98 -0
  10. package/build/shared/charts/descriptors/agentAssist/setIframeTile.js +86 -0
  11. package/build/shared/charts/descriptors/analytics/activateProfile.js +1 -1
  12. package/build/shared/charts/descriptors/analytics/blindMode.js +5 -5
  13. package/build/shared/charts/descriptors/analytics/completeGoal.js +2 -2
  14. package/build/shared/charts/descriptors/analytics/deactivateProfile.js +2 -2
  15. package/build/shared/charts/descriptors/analytics/deleteProfile.js +1 -1
  16. package/build/shared/charts/descriptors/analytics/mergeProfile.js +2 -2
  17. package/build/shared/charts/descriptors/analytics/overwriteAnalytics.js +34 -27
  18. package/build/shared/charts/descriptors/analytics/requestRating.js +5 -5
  19. package/build/shared/charts/descriptors/analytics/setRating.js +4 -4
  20. package/build/shared/charts/descriptors/analytics/updateProfile.js +3 -3
  21. package/build/shared/charts/descriptors/apps/getAppSessionPin.js +7 -14
  22. package/build/shared/charts/descriptors/apps/initAppSession.js +99 -87
  23. package/build/shared/charts/descriptors/apps/setAdaptiveCardAppState.js +101 -19
  24. package/build/shared/charts/descriptors/apps/setAppState.js +7 -7
  25. package/build/shared/charts/descriptors/apps/setHtmlAppState.js +141 -99
  26. package/build/shared/charts/descriptors/apps/utils/buildAppUrl.js +2 -6
  27. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/anthropicProviderConnection.js +11 -0
  28. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/azureOpenAIProviderConnection.js +4 -1
  29. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/azureOpenAIProviderConnectionV2.js +11 -0
  30. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/googleVertexAIProviderConnection.js +16 -0
  31. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/index.js +14 -2
  32. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/openAIProviderConnection.js +1 -1
  33. package/build/shared/charts/descriptors/connectionNodes/internalStorageProviders/amazonStorageProviderConnection.js +1 -1
  34. package/build/shared/charts/descriptors/connectionNodes/internalStorageProviders/azureBlobStorageProviderConnection.js +1 -1
  35. package/build/shared/charts/descriptors/connectionNodes/internalStorageProviders/googleCloudStorageProviderConnection.js +1 -1
  36. package/build/shared/charts/descriptors/connectionNodes/mongoDB/aggregate.js +13 -13
  37. package/build/shared/charts/descriptors/connectionNodes/mongoDB/find.js +18 -18
  38. package/build/shared/charts/descriptors/connectionNodes/mongoDB/findOne.js +17 -17
  39. package/build/shared/charts/descriptors/connectionNodes/mongoDB/insert.js +13 -13
  40. package/build/shared/charts/descriptors/connectionNodes/mongoDB/mongoDBConnection.js +1 -1
  41. package/build/shared/charts/descriptors/connectionNodes/mongoDB/remove.js +13 -13
  42. package/build/shared/charts/descriptors/connectionNodes/mongoDB/updateMany.js +15 -15
  43. package/build/shared/charts/descriptors/connectionNodes/mongoDB/updateOne.js +15 -15
  44. package/build/shared/charts/descriptors/connectionNodes/smtp/emailNotification.js +28 -28
  45. package/build/shared/charts/descriptors/connectionNodes/smtp/index.js +3 -1
  46. package/build/shared/charts/descriptors/connectionNodes/smtp/oAuth2Connection.js +18 -0
  47. package/build/shared/charts/descriptors/connectionNodes/smtp/sendEmail.js +102 -70
  48. package/build/shared/charts/descriptors/connectionNodes/smtp/serviceConnection.js +1 -1
  49. package/build/shared/charts/descriptors/connectionNodes/smtp/smtpConnection.js +1 -1
  50. package/build/shared/charts/descriptors/connectionNodes/speechProviders/awsSpeechProviderConnection.js +14 -0
  51. package/build/shared/charts/descriptors/connectionNodes/speechProviders/googleSpeechProviderConnection.js +16 -0
  52. package/build/shared/charts/descriptors/connectionNodes/speechProviders/index.js +23 -0
  53. package/build/shared/charts/descriptors/connectionNodes/speechProviders/microsoftSpeechProviderConnection.js +12 -0
  54. package/build/shared/charts/descriptors/connectionNodes/sql/runQuery.js +11 -11
  55. package/build/shared/charts/descriptors/connectionNodes/sql/runStoredProcedure.js +13 -13
  56. package/build/shared/charts/descriptors/connectionNodes/sql/runTransaction.js +11 -11
  57. package/build/shared/charts/descriptors/connectionNodes/sql/sqlConnection.js +1 -1
  58. package/build/shared/charts/descriptors/data/addToContext.js +7 -7
  59. package/build/shared/charts/descriptors/data/code.js +3 -3
  60. package/build/shared/charts/descriptors/data/copyDataToContext.js +1 -1
  61. package/build/shared/charts/descriptors/data/copySlotsToContext.js +9 -9
  62. package/build/shared/charts/descriptors/data/log.js +7 -7
  63. package/build/shared/charts/descriptors/data/removeFromContext.js +7 -7
  64. package/build/shared/charts/descriptors/data/resetContext.js +2 -2
  65. package/build/shared/charts/descriptors/index.js +36 -12
  66. package/build/shared/charts/descriptors/knowledgeSearch/index.js +6 -0
  67. package/build/shared/charts/descriptors/knowledgeSearch/knowledgeSearch.js +149 -0
  68. package/build/shared/charts/descriptors/liveAgent/assistInfo.js +25 -25
  69. package/build/shared/charts/descriptors/logic/disableSlotFillers.js +4 -4
  70. package/build/shared/charts/descriptors/logic/enableSlotFillers.js +3 -3
  71. package/build/shared/charts/descriptors/logic/executeFlow.js +9 -9
  72. package/build/shared/charts/descriptors/logic/goTo.js +17 -17
  73. package/build/shared/charts/descriptors/logic/if/if.js +3 -3
  74. package/build/shared/charts/descriptors/logic/interval/interval.js +3 -3
  75. package/build/shared/charts/descriptors/logic/once/once.js +1 -1
  76. package/build/shared/charts/descriptors/logic/resetState.js +1 -1
  77. package/build/shared/charts/descriptors/logic/setState.js +4 -4
  78. package/build/shared/charts/descriptors/logic/setTranslation.js +15 -15
  79. package/build/shared/charts/descriptors/logic/sleep.js +2 -2
  80. package/build/shared/charts/descriptors/logic/stop.js +1 -1
  81. package/build/shared/charts/descriptors/logic/switch/case.js +1 -1
  82. package/build/shared/charts/descriptors/logic/switch/default.js +1 -1
  83. package/build/shared/charts/descriptors/logic/switch/switch.js +28 -19
  84. package/build/shared/charts/descriptors/logic/switchLocale.js +5 -5
  85. package/build/shared/charts/descriptors/logic/think.js +11 -11
  86. package/build/shared/charts/descriptors/logic/thinkV2.js +11 -11
  87. package/build/shared/charts/descriptors/logic/wait.js +1 -1
  88. package/build/shared/charts/descriptors/message/checkChannelChange/checkChannelChange.js +4 -4
  89. package/build/shared/charts/descriptors/message/datePicker.js +1 -1
  90. package/build/shared/charts/descriptors/message/question/optionalQuestion.js +66 -34
  91. package/build/shared/charts/descriptors/message/question/question.js +583 -204
  92. package/build/shared/charts/descriptors/message/question/utils/cleanTextUtils.js +191 -0
  93. package/build/shared/charts/descriptors/message/question/utils/datepickerUtils.js +40 -40
  94. package/build/shared/charts/descriptors/message/question/utils/evaluateQuestionAnswer.js +37 -27
  95. package/build/shared/charts/descriptors/message/say.js +37 -4
  96. package/build/shared/charts/descriptors/message/sendImage.js +1 -1
  97. package/build/shared/charts/descriptors/message/sendText.js +2 -2
  98. package/build/shared/charts/descriptors/microsoft/getToken.js +1 -1
  99. package/build/shared/charts/descriptors/microsoft/invalidateToken.js +1 -1
  100. package/build/shared/charts/descriptors/microsoft/tokenStatus/index.js +1 -1
  101. package/build/shared/charts/descriptors/nlu/addLexiconKeyphrase.js +5 -5
  102. package/build/shared/charts/descriptors/nlu/cleanText.js +103 -0
  103. package/build/shared/charts/descriptors/nlu/executeCognigyNLU.js +15 -15
  104. package/build/shared/charts/descriptors/nlu/extractAnswer.js +11 -11
  105. package/build/shared/charts/descriptors/nlu/fuzzySearch.js +33 -33
  106. package/build/shared/charts/descriptors/nlu/generativeSlotFiller/generativeSlotFiller.js +270 -0
  107. package/build/shared/charts/descriptors/nlu/generativeSlotFiller/generativeSlotFillerFallback.js +27 -0
  108. package/build/shared/charts/descriptors/nlu/generativeSlotFiller/generativeSlotFillerSuccess.js +27 -0
  109. package/build/shared/charts/descriptors/nlu/generativeSlotFiller/prompt.js +76 -0
  110. package/build/shared/charts/descriptors/nlu/index.js +9 -1
  111. package/build/shared/charts/descriptors/nlu/matchPattern.js +16 -16
  112. package/build/shared/charts/descriptors/nlu/regexSlotFiller.js +5 -5
  113. package/build/shared/charts/descriptors/placeholder.js +3 -3
  114. package/build/shared/charts/descriptors/service/GPTConversation.js +678 -0
  115. package/build/shared/charts/descriptors/service/GPTPrompt.js +258 -0
  116. package/build/shared/charts/descriptors/service/checkAgentAvailability.js +34 -33
  117. package/build/shared/charts/descriptors/service/closeHandover.js +34 -0
  118. package/build/shared/charts/descriptors/service/conversationSummary.js +148 -0
  119. package/build/shared/charts/descriptors/service/handover.js +18 -17
  120. package/build/shared/charts/descriptors/service/handoverInactivityTimer.js +37 -0
  121. package/build/shared/charts/descriptors/service/handoverV2.js +134 -51
  122. package/build/shared/charts/descriptors/service/httpRequest.js +52 -52
  123. package/build/shared/charts/descriptors/service/index.js +11 -3
  124. package/build/shared/charts/descriptors/service/triggerFunction/triggerFunction.js +3 -3
  125. package/build/shared/charts/descriptors/voice/index.js +5 -1
  126. package/build/shared/charts/descriptors/voice/mappers/base.mapper.js +83 -0
  127. package/build/shared/charts/descriptors/voice/mappers/hangup.mapper.js +6 -9
  128. package/build/shared/charts/descriptors/voice/mappers/muteSpeechInput.mapper.js +52 -0
  129. package/build/shared/charts/descriptors/voice/mappers/play.mapper.js +19 -19
  130. package/build/shared/charts/descriptors/voice/mappers/record.mapper.js +96 -0
  131. package/build/shared/charts/descriptors/voice/mappers/sendMetadata.mapper.js +53 -0
  132. package/build/shared/charts/descriptors/voice/mappers/setSessionConfig.mapper.js +127 -65
  133. package/build/shared/charts/descriptors/voice/mappers/transfer.mapper.js +41 -11
  134. package/build/shared/charts/descriptors/voice/nodes/bargeIn.js +14 -20
  135. package/build/shared/charts/descriptors/voice/nodes/continuousAsr.js +7 -7
  136. package/build/shared/charts/descriptors/voice/nodes/dtmf.js +10 -18
  137. package/build/shared/charts/descriptors/voice/nodes/hangup.js +2 -2
  138. package/build/shared/charts/descriptors/voice/nodes/muteSpeechInput.js +52 -0
  139. package/build/shared/charts/descriptors/voice/nodes/noUserInput.js +15 -14
  140. package/build/shared/charts/descriptors/voice/nodes/play.js +12 -8
  141. package/build/shared/charts/descriptors/voice/nodes/sendMetadata.js +51 -0
  142. package/build/shared/charts/descriptors/voice/nodes/sessionSpeechParameters.js +84 -20
  143. package/build/shared/charts/descriptors/voice/nodes/transfer.js +10 -10
  144. package/build/shared/charts/descriptors/voicegateway/nodes/agentAssist.js +10 -10
  145. package/build/shared/charts/descriptors/voicegateway/nodes/callRecording.js +64 -62
  146. package/build/shared/charts/descriptors/voicegateway/nodes/handover.js +14 -14
  147. package/build/shared/charts/descriptors/voicegateway/nodes/hangup.js +2 -2
  148. package/build/shared/charts/descriptors/voicegateway/nodes/playURL.js +18 -15
  149. package/build/shared/charts/descriptors/voicegateway/nodes/sendMessage.js +41 -41
  150. package/build/shared/charts/descriptors/voicegateway/nodes/sendMetaData.js +15 -19
  151. package/build/shared/charts/descriptors/voicegateway/nodes/setSessionParams.js +3 -3
  152. package/build/shared/charts/descriptors/voicegateway/utils/paramUtils.js +117 -97
  153. package/build/shared/charts/descriptors/voicegateway2/index.js +5 -1
  154. package/build/shared/charts/descriptors/voicegateway2/nodes/dtmf.js +5 -5
  155. package/build/shared/charts/descriptors/voicegateway2/nodes/hangup.js +3 -4
  156. package/build/shared/charts/descriptors/voicegateway2/nodes/muteSpeechInput.js +49 -0
  157. package/build/shared/charts/descriptors/voicegateway2/nodes/play.js +36 -18
  158. package/build/shared/charts/descriptors/voicegateway2/nodes/record.js +108 -0
  159. package/build/shared/charts/descriptors/voicegateway2/nodes/refer.js +9 -10
  160. package/build/shared/charts/descriptors/voicegateway2/nodes/sendMetadata.js +14 -29
  161. package/build/shared/charts/descriptors/voicegateway2/nodes/setSessionConfig.js +276 -74
  162. package/build/shared/charts/descriptors/voicegateway2/nodes/transfer.js +139 -27
  163. package/build/shared/charts/descriptors/voicegateway2/utils/helper.js +3 -3
  164. package/build/shared/charts/descriptors/voicegateway2/utils/strip-nulls.js +4 -0
  165. package/build/shared/charts/helpers/generativeAI/getRephraseWithAIFields.js +8 -8
  166. package/build/shared/constants.js +14 -1
  167. package/build/shared/errors/ErrorCode.js +1 -0
  168. package/build/shared/errors/TooManyRequestsError.js +59 -0
  169. package/build/shared/errors/baseError.js +6 -2
  170. package/build/shared/errors/codes.js +2 -1
  171. package/build/shared/errors/index.js +3 -1
  172. package/build/shared/helper/BaseContext.js +56 -3
  173. package/build/shared/helper/nlu/dicts/dicts.js +691 -0
  174. package/build/shared/helper/nlu/textCleaner.js +391 -0
  175. package/build/shared/interfaces/IApiKey.js +2 -7
  176. package/build/shared/interfaces/IOrganisation.js +2 -7
  177. package/build/shared/interfaces/IProfileSchema.js +1 -7
  178. package/build/shared/interfaces/agentAssist/ISendTileUpdateParams.js +3 -0
  179. package/build/shared/interfaces/agentAssist/ISendTileUpdateReferenceParams.js +3 -0
  180. package/build/shared/interfaces/agentAssist/index.js +3 -0
  181. package/build/shared/interfaces/ai.js +0 -16
  182. package/build/shared/interfaces/amqpInterface.js +7 -1
  183. package/build/shared/interfaces/generativeAI/IGenerativeAIModels.js +72 -0
  184. package/build/shared/interfaces/generativeAI/IGenerativeAIPrompts.js +3 -0
  185. package/build/shared/interfaces/generativeAI/IRunGenerativeAIPromptOptions.js +3 -0
  186. package/build/shared/interfaces/handover.js +14 -2
  187. package/build/shared/interfaces/knowledgesearch/search.js +3 -0
  188. package/build/shared/interfaces/messageAPI/ai.js +2 -1
  189. package/build/shared/interfaces/messageAPI/endpoints.js +91 -2
  190. package/build/shared/interfaces/messageAPI/handover.js +4 -1
  191. package/build/shared/interfaces/resources/IAgentAssistConfig.js +26 -20
  192. package/build/shared/interfaces/resources/IAuditEvent.js +8 -1
  193. package/build/shared/interfaces/resources/IChart.js +1 -10
  194. package/build/shared/interfaces/resources/IConnection.js +7 -1
  195. package/build/shared/interfaces/resources/IEndpoint.js +2 -14
  196. package/build/shared/interfaces/resources/IFlow.js +15 -10
  197. package/build/shared/interfaces/resources/IFunction.js +1 -7
  198. package/build/shared/interfaces/resources/IGenerateNodeOutput.js +3 -0
  199. package/build/shared/interfaces/resources/ILargeLanguageModel.js +54 -0
  200. package/build/shared/interfaces/resources/ILexicon.js +2 -7
  201. package/build/shared/interfaces/resources/INodeDescriptorSet.js +32 -29
  202. package/build/shared/interfaces/resources/IPackage.js +1 -7
  203. package/build/shared/interfaces/resources/IPlaybookRun.js +2 -1
  204. package/build/shared/interfaces/resources/IProject.js +1 -7
  205. package/build/shared/interfaces/resources/ISnapshot.js +2 -14
  206. package/build/shared/interfaces/resources/TNLUConnectorType.js +2 -1
  207. package/build/shared/interfaces/resources/TResourceType.js +16 -5
  208. package/build/shared/interfaces/resources/chart/IChartExecutable.js +1 -7
  209. package/build/shared/interfaces/resources/knowledgeStore/IKnowledgeChunk.js +32 -0
  210. package/build/shared/interfaces/resources/knowledgeStore/IKnowledgeSource.js +31 -0
  211. package/build/shared/interfaces/resources/knowledgeStore/IKnowledgeStore.js +26 -0
  212. package/build/shared/interfaces/resources/settings/IAgentSettings.js +4 -47
  213. package/build/shared/interfaces/resources/settings/IAudioPreviewSettings.js +36 -0
  214. package/build/shared/interfaces/resources/settings/IGenerativeAISettings.js +23 -90
  215. package/build/shared/interfaces/resources/settings/IGenerativeAIUseCase.js +3 -0
  216. package/build/shared/interfaces/resources/settings/ISharedSettings.js +2 -2
  217. package/build/shared/interfaces/resources/settings/index.js +4 -5
  218. package/build/shared/interfaces/restAPI/administration/user/v2.1/IApiKeyIndexItem_2_1.js +3 -0
  219. package/build/shared/interfaces/restAPI/administration/user/v2.1/IApiKey_2_1.js +3 -0
  220. package/build/shared/interfaces/restAPI/administration/user/v2.1/ICreateApiKeyRest_2_1.js +3 -0
  221. package/build/shared/interfaces/restAPI/administration/user/v2.1/IIndexApiKeysMeRest_2_1.js +3 -0
  222. package/build/shared/interfaces/restAPI/administration/user/v2.1/index.js +3 -0
  223. package/build/shared/interfaces/restAPI/insights/reports/IGenerateReportRest_2_0.js +0 -2
  224. package/build/shared/interfaces/restAPI/resources/agentAssist/v2.0/IReadAgentAssistSessionDataRest_2_0.js +3 -0
  225. package/build/shared/interfaces/restAPI/resources/chart/v2.0/IGenerateNodeOutputRest_2_0.js +3 -0
  226. package/build/shared/interfaces/restAPI/resources/knowledgeSearchIndex/v2.0/ICreateKnowledgeSearchIndexRest_2_0.js +3 -0
  227. package/build/shared/interfaces/restAPI/resources/knowledgeSearchIndex/v2.0/IDeleteKnowledgeSearchIndexRest_2_0.js +3 -0
  228. package/build/shared/interfaces/restAPI/resources/knowledgeSearchIndex/v2.0/index.js +3 -0
  229. package/build/shared/interfaces/restAPI/resources/knowledgeStore/v2.0/ICreateKnowledgeStoreRest_2_0.js +3 -0
  230. package/build/shared/interfaces/restAPI/resources/knowledgeStore/v2.0/IDeleteKnowledgeStoreRest_2_0.js +3 -0
  231. package/build/shared/interfaces/restAPI/resources/knowledgeStore/v2.0/IIndexKnowledgeStoresRest_2_0.js +3 -0
  232. package/build/shared/interfaces/restAPI/resources/knowledgeStore/v2.0/IIngestKnowledgeStoreRest_2_0.js +3 -0
  233. package/build/shared/interfaces/restAPI/resources/knowledgeStore/v2.0/IKnowledgeStore_2_0.js +3 -0
  234. package/build/shared/interfaces/restAPI/resources/knowledgeStore/v2.0/IReadKnowledgeStoreRest_2_0.js +3 -0
  235. package/build/shared/interfaces/restAPI/resources/knowledgeStore/v2.0/IUpdateKnowledgeStoreRest_2_0.js +3 -0
  236. package/build/shared/interfaces/restAPI/resources/knowledgeStore/v2.0/index.js +3 -0
  237. package/build/shared/interfaces/restAPI/resources/knowledgeStore/v2.0/source/ICreateKnowledgeSourceRest_2_0.js +3 -0
  238. package/build/shared/interfaces/restAPI/resources/knowledgeStore/v2.0/source/IDeleteKnowledgeSourceRest_2_0.js +3 -0
  239. package/build/shared/interfaces/restAPI/resources/knowledgeStore/v2.0/source/IIndexKnowledgeSourcesRest_2_0.js +3 -0
  240. package/build/shared/interfaces/restAPI/resources/knowledgeStore/v2.0/source/IKnowledgeSource_2_0.js +3 -0
  241. package/build/shared/interfaces/restAPI/resources/knowledgeStore/v2.0/source/IReadKnowledgeSourceRest_2_0.js +3 -0
  242. package/build/shared/interfaces/restAPI/resources/knowledgeStore/v2.0/source/IUpdateKnowledgeSourceRest_2_0.js +3 -0
  243. package/build/shared/interfaces/restAPI/resources/knowledgeStore/v2.0/source/IUploadKnowledgeSourceFileRest_2_0.js +4 -0
  244. package/build/shared/interfaces/restAPI/resources/knowledgeStore/v2.0/source/chunk/ICreateKnowledgeChunkRest_2_0.js +3 -0
  245. package/build/shared/interfaces/restAPI/resources/knowledgeStore/v2.0/source/chunk/IDeleteKnowledgeChunkRest_2_0.js +3 -0
  246. package/build/shared/interfaces/restAPI/resources/knowledgeStore/v2.0/source/chunk/IIndexKnowledgeChunksRest_2_0.js +3 -0
  247. package/build/shared/interfaces/restAPI/resources/knowledgeStore/v2.0/source/chunk/IKnowledgeChunk_2_0.js +3 -0
  248. package/build/shared/interfaces/restAPI/resources/knowledgeStore/v2.0/source/chunk/IReadKnowledgeChunkRest_2_0.js +3 -0
  249. package/build/shared/interfaces/restAPI/resources/knowledgeStore/v2.0/source/chunk/IUpdateKnowledgeChunkRest_2_0.js +3 -0
  250. package/build/shared/interfaces/restAPI/resources/largeLanguageModel/v2.0/ICloneLargeLanguageModelRest_2_0.js +4 -0
  251. package/build/shared/interfaces/restAPI/resources/largeLanguageModel/v2.0/ICreateLargeLanguageModelRest_2_0.js +3 -0
  252. package/build/shared/interfaces/restAPI/resources/largeLanguageModel/v2.0/IDeleteLargeLanguageModelRest_2_0.js +3 -0
  253. package/build/shared/interfaces/restAPI/resources/largeLanguageModel/v2.0/IIndexLargeLanguageModelsRest_2_0.js +3 -0
  254. package/build/shared/interfaces/restAPI/resources/largeLanguageModel/v2.0/ILargeLanguageModelIndexItem_2_0.js +3 -0
  255. package/build/shared/interfaces/restAPI/resources/largeLanguageModel/v2.0/ILargeLanguageModel_2_0.js +3 -0
  256. package/build/shared/interfaces/restAPI/resources/largeLanguageModel/v2.0/IReadLargeLanguageModelRest_2_0.js +3 -0
  257. package/build/shared/interfaces/restAPI/resources/largeLanguageModel/v2.0/ITestLargeLanguageModelRest_2_0.js +3 -0
  258. package/build/shared/interfaces/restAPI/resources/largeLanguageModel/v2.0/IUpdateLargeLanguageModelRest_2_0.js +3 -0
  259. package/build/shared/interfaces/restAPI/resources/largeLanguageModel/v2.0/index.js +3 -0
  260. package/build/shared/interfaces/restAPI/resources/nluconnector/v2.0/TNLUConnectorType_2_0.js +3 -1
  261. package/build/shared/interfaces/restAPI/resources/project/v2.0/settings/ISetupCognigyGenerativeAIRest_2_0.js +4 -0
  262. package/build/shared/interfaces/security/IACL.js +1 -7
  263. package/build/shared/interfaces/security/IIdentityProvider.js +1 -7
  264. package/build/shared/interfaces/security/IPermission.js +6 -2
  265. package/build/shared/interfaces/security/IRole.js +3 -1
  266. package/build/shared/interfaces/security/index.js +1 -2
  267. package/build/shared/interfaces/taskmanager/ITask.js +1 -0
  268. package/build/shared/interfaces/trainer/ITrainerRecord.js +1 -1
  269. package/build/shared/interfaces/user.js +1 -9
  270. package/package.json +1 -1
  271. package/types/index.d.ts +10043 -8554
  272. package/build/shared/charts/descriptors/service/completeText.js +0 -316
  273. package/build/shared/charts/descriptors/voice/utils/constants.js +0 -8
  274. package/build/shared/charts/descriptors/voicegateway2/utils/constants.js +0 -7
@@ -0,0 +1,270 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.filterConversationEntries = exports.GENERATIVE_SLOT_FILLER = void 0;
4
+ /* Custom modules */
5
+ const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
6
+ const prompt_1 = require("./prompt");
7
+ const logger_1 = require("../../../../helper/logger");
8
+ const message_1 = require("../../message");
9
+ exports.GENERATIVE_SLOT_FILLER = (0, createNodeDescriptor_1.createNodeDescriptor)({
10
+ type: "generativeSlotFiller",
11
+ defaultLabel: "Generative Slot Filler",
12
+ summary: "UI__NODE_EDITOR__NLU__GENERATIVE_SLOT_FILLER__SUMMARY__DEFAULT",
13
+ dependencies: {
14
+ children: ["generativeSlotFillerFallback", "generativeSlotFillerSuccess"],
15
+ },
16
+ fields: [
17
+ {
18
+ key: "slotsConfig",
19
+ type: "json",
20
+ label: "UI__NODE_EDITOR__NLU__GENERATIVE_SLOT_FILLER__FIELDS__SLOT_CONFIG__DEFAULT_LABEL",
21
+ },
22
+ {
23
+ key: "amountOfLastUserInputs",
24
+ type: "slider",
25
+ label: "UI__NODE_EDITOR__NLU__GENERATIVE_SLOT_FILLER__FIELDS__AMOUNT_OF_LAST_USERS_INPUTS__LABEL",
26
+ params: {
27
+ min: 1,
28
+ max: 10,
29
+ step: 1,
30
+ },
31
+ defaultValue: 5
32
+ },
33
+ {
34
+ key: "maxQuestions",
35
+ label: "UI__NODE_EDITOR__NLU__GENERATIVE_MAX_QUESTIONS__DEFAULT_LABEL",
36
+ type: "slider",
37
+ defaultValue: 5,
38
+ params: {
39
+ min: 0,
40
+ max: 10,
41
+ step: 1
42
+ },
43
+ },
44
+ {
45
+ key: "temperature",
46
+ label: "UI__NODE_EDITOR__NLU__GENERATIVE_TEMPERATURE__DEFAULT_LABEL",
47
+ type: "slider",
48
+ description: "UI__NODE_EDITOR__NLU__GENERATIVE_SLIDER__DEFAULT_LABEL",
49
+ defaultValue: 1,
50
+ params: {
51
+ min: 0,
52
+ max: 1,
53
+ step: 0.1
54
+ },
55
+ },
56
+ {
57
+ key: "timeout",
58
+ label: "UI__NODE_EDITOR__NLU__GENERATIVE_TIMEOUT__DEFAULT_LABEL",
59
+ defaultValue: 6000,
60
+ type: "number",
61
+ description: "UI__NODE_EDITOR__NLU__GENERATIVE_TIMEOUT__DESCRIPTION",
62
+ },
63
+ {
64
+ key: "storeLocation",
65
+ type: "select",
66
+ label: "UI__NODE_EDITOR__NLU__GENERATIVE_STORE_LOCATION__DEFAULT_LABEL",
67
+ defaultValue: "context",
68
+ params: {
69
+ options: [
70
+ {
71
+ label: "UI__NODE_EDITOR__NLU__GENERATIVE_STORE_LOCATION__OPTIONS__INPUT__LABEL",
72
+ value: "input"
73
+ },
74
+ {
75
+ label: "UI__NODE_EDITOR__NLU__GENERATIVE_STORE_LOCATION__OPTIONS__CONTEXT__LABEL",
76
+ value: "context"
77
+ }
78
+ ],
79
+ required: true
80
+ },
81
+ },
82
+ {
83
+ key: "inputKey",
84
+ type: "cognigyText",
85
+ label: "UI__NODE_EDITOR__NLU__GENERATIVE_INPUT_KEY__DEFAULT_LABEL",
86
+ defaultValue: "generativeSlotFiller",
87
+ condition: {
88
+ key: "storeLocation",
89
+ value: "input",
90
+ }
91
+ },
92
+ {
93
+ key: "contextKey",
94
+ type: "cognigyText",
95
+ label: "UI__NODE_EDITOR__NLU__GENERATIVE_CONTEXT_KEY__DEFAULT_LABEL",
96
+ defaultValue: "generativeSlotFiller",
97
+ condition: {
98
+ key: "storeLocation",
99
+ value: "context",
100
+ }
101
+ },
102
+ ],
103
+ sections: [
104
+ {
105
+ key: "advanced",
106
+ label: "UI__NODE_EDITOR__NLU__GENERATIVE_SLOT_FILLER__SECTIONS__ADVANCED__DEFAULT_LABEL",
107
+ defaultCollapsed: true,
108
+ fields: [
109
+ "temperature",
110
+ "timeout",
111
+ ]
112
+ },
113
+ {
114
+ key: "storage",
115
+ label: "UI__NODE_EDITOR__NLU__GENERATIVE_SLOT_FILLER__SECTIONS__STORAGE__DEFAULT_LABEL",
116
+ defaultCollapsed: true,
117
+ fields: [
118
+ "storeLocation",
119
+ "inputKey",
120
+ "contextKey",
121
+ ]
122
+ }
123
+ ],
124
+ form: [
125
+ { type: "field", key: "slotsConfig" },
126
+ { type: "field", key: "amountOfLastUserInputs" },
127
+ { type: "field", key: "maxQuestions" },
128
+ { type: "section", key: "advanced" },
129
+ { type: "section", key: "storage" },
130
+ ],
131
+ appearance: {},
132
+ tags: ["nlu"],
133
+ function: async ({ cognigy, config, childConfigs, nodeId, organisationId }) => {
134
+ var _a;
135
+ const { api, lastConversationEntries } = cognigy;
136
+ const { slotsConfig, amountOfLastUserInputs, maxQuestions, temperature, storeLocation, contextKey, inputKey, timeout, } = config;
137
+ const fallBackChild = childConfigs.find(child => child.type === "generativeSlotFillerFallback");
138
+ if ((slotsConfig === null || slotsConfig === void 0 ? void 0 : slotsConfig.length) < 1 || (lastConversationEntries === null || lastConversationEntries === void 0 ? void 0 : lastConversationEntries.length) < 1) {
139
+ api.setNextNode(fallBackChild.id);
140
+ return;
141
+ }
142
+ try {
143
+ // the filled slots that were found in the previous execution
144
+ const filledSlots = storeLocation === "context" ? cognigy.context[contextKey] : cognigy.input[inputKey];
145
+ const slots = [...slotsConfig];
146
+ if (filledSlots) {
147
+ for (const filledSlot of Object.keys(filledSlots)) {
148
+ const slot = slots.find(slot => slot.tag === filledSlot);
149
+ slot.value = filledSlots[filledSlot];
150
+ // remove the validation, so that the slot is not validated again
151
+ delete slot.validation;
152
+ }
153
+ }
154
+ const questionCountKey = `generativeSlotFiller_${nodeId}_questionCount`;
155
+ const questionCount = api.getSystemContext(questionCountKey) || 0;
156
+ // for questions, we only use the last user input
157
+ const extractionEntries = questionCount > 0 ? (0, exports.filterConversationEntries)(lastConversationEntries, 1) : (0, exports.filterConversationEntries)(lastConversationEntries, amountOfLastUserInputs);
158
+ const extractEntitiesprompt = (0, prompt_1.createExtractionPrompt)(slots, extractionEntries);
159
+ const data = {
160
+ prompt: extractEntitiesprompt,
161
+ temperature,
162
+ timeoutInMs: timeout,
163
+ useCase: "slotExtraction",
164
+ };
165
+ // TODO: Create a new useCase for this feature and use it here instead
166
+ const response = await api.runGenerativeAIPrompt(data, "gptConversation");
167
+ const parsed = JSON.parse(response);
168
+ const slotsWithLexiconValidations = [];
169
+ slots.forEach(slot => {
170
+ if (parsed[slot.tag]) {
171
+ if (slot.validation && slot.validation.type === "slot") {
172
+ slotsWithLexiconValidations.push(slot);
173
+ }
174
+ slot.value = parsed[slot.tag];
175
+ }
176
+ });
177
+ for (const slot of slotsWithLexiconValidations) {
178
+ const nlu = await api.executeCognigyNLU(parsed[slot.tag], null, "TODO", {
179
+ parseIntents: false,
180
+ });
181
+ if ((_a = nlu === null || nlu === void 0 ? void 0 : nlu.slots) === null || _a === void 0 ? void 0 : _a[slot.validation.value]) {
182
+ slot.invalid = false;
183
+ }
184
+ else {
185
+ slot.invalid = true;
186
+ }
187
+ }
188
+ ;
189
+ let complete = true;
190
+ let allValid = true;
191
+ const missingSlots = [];
192
+ const invalidSlots = [];
193
+ const foundSlots = [];
194
+ for (const slot of slots) {
195
+ if (!slot.optional && !slot.value) {
196
+ missingSlots.push(slot);
197
+ }
198
+ else if (slot.invalid) {
199
+ invalidSlots.push(slot);
200
+ }
201
+ else if (slot.value && !slot.invalid) {
202
+ foundSlots.push(slot);
203
+ }
204
+ }
205
+ const slotResult = {};
206
+ foundSlots.forEach(slot => {
207
+ slotResult[slot.tag] = slot.value;
208
+ });
209
+ if (storeLocation === "context") {
210
+ cognigy.context[contextKey] = slotResult;
211
+ }
212
+ else {
213
+ cognigy.input[contextKey] = slotResult;
214
+ }
215
+ if (missingSlots.length > 0) {
216
+ complete = false;
217
+ }
218
+ if (invalidSlots.length > 0) {
219
+ allValid = false;
220
+ }
221
+ if (complete && allValid) {
222
+ const childNode = childConfigs.find(child => child.type === "generativeSlotFillerSuccess");
223
+ api.setNextNode(childNode.id);
224
+ return;
225
+ }
226
+ if (questionCount >= maxQuestions && !(complete && allValid)) {
227
+ const childNode = childConfigs.find(child => child.type === "generativeSlotFillerFallback");
228
+ api.setNextNode(childNode.id);
229
+ return;
230
+ }
231
+ if (questionCount < maxQuestions && !(complete && allValid)) {
232
+ api.setSystemContext(questionCountKey, questionCount + 1);
233
+ const prompt = allValid ? (0, prompt_1.createQuestionPrompt)(foundSlots, missingSlots, extractionEntries) : (0, prompt_1.createInvalidAnswerPrompt)(invalidSlots, extractionEntries);
234
+ const data = {
235
+ prompt,
236
+ temperature,
237
+ timeoutInMs: timeout,
238
+ useCase: "slotExtractionQuestion",
239
+ };
240
+ // TODO: Create a new useCase for this feature and use it here instead
241
+ const question = await api.runGenerativeAIPrompt(data, "gptConversation");
242
+ await message_1.SAY.function({ cognigy, childConfigs: [], nodeId, organisationId, config: { say: { type: "text", text: [question] } } });
243
+ api.stopExecution();
244
+ api.setNextNode(nodeId);
245
+ return;
246
+ }
247
+ }
248
+ catch (error) {
249
+ api.setNextNode(fallBackChild.id);
250
+ logger_1.default.log("error", { traceId: cognigy.input.traceId }, `Error in generativeSlotFiller: ${error.message}`);
251
+ }
252
+ }
253
+ });
254
+ const filterConversationEntries = (lastConversationEntries, amountOfLastUserInputs) => {
255
+ let addedUserInputsCount = 0;
256
+ let lastEntries = [];
257
+ // lastUserInputs is ordered newest -> oldest
258
+ for (const entry of lastConversationEntries) {
259
+ if (entry.source === "user" && addedUserInputsCount >= amountOfLastUserInputs) {
260
+ break;
261
+ }
262
+ lastEntries.push(entry);
263
+ if (entry.source === "user") {
264
+ addedUserInputsCount++;
265
+ }
266
+ }
267
+ return lastEntries;
268
+ };
269
+ exports.filterConversationEntries = filterConversationEntries;
270
+ //# sourceMappingURL=generativeSlotFiller.js.map
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GENERATIVE_SLOT_FILLER_FALLBACK = void 0;
4
+ /* Custom modules */
5
+ const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
6
+ exports.GENERATIVE_SLOT_FILLER_FALLBACK = (0, createNodeDescriptor_1.createNodeDescriptor)({
7
+ type: "generativeSlotFillerFallback",
8
+ parentType: "generativeSlotFillerFallback",
9
+ defaultLabel: "Fallback",
10
+ appearance: {
11
+ color: '#B3A7EA',
12
+ textColor: 'white',
13
+ contrastTextColor: 'black',
14
+ variant: 'mini'
15
+ },
16
+ constraints: {
17
+ editable: false,
18
+ deletable: false,
19
+ collapsable: true,
20
+ childFlowCreatable: true,
21
+ creatable: false,
22
+ movable: false,
23
+ placement: {},
24
+ },
25
+ tags: ["nlu"],
26
+ });
27
+ //# sourceMappingURL=generativeSlotFillerFallback.js.map
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GENERATIVE_SLOT_FILLER_SUCCESS = void 0;
4
+ /* Custom modules */
5
+ const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
6
+ exports.GENERATIVE_SLOT_FILLER_SUCCESS = (0, createNodeDescriptor_1.createNodeDescriptor)({
7
+ type: "generativeSlotFillerSuccess",
8
+ parentType: "generativeSlotFillerSuccess",
9
+ defaultLabel: "Success",
10
+ appearance: {
11
+ color: '#B3A7EA',
12
+ textColor: 'white',
13
+ contrastTextColor: 'black',
14
+ variant: 'mini'
15
+ },
16
+ constraints: {
17
+ editable: false,
18
+ deletable: false,
19
+ collapsable: true,
20
+ childFlowCreatable: true,
21
+ creatable: false,
22
+ movable: false,
23
+ placement: {},
24
+ },
25
+ tags: ["nlu"],
26
+ });
27
+ //# sourceMappingURL=generativeSlotFillerSuccess.js.map
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createLastUserInputString = exports.createLastConverationString = exports.createInvalidAnswerPrompt = exports.createQuestionPrompt = exports.createExtractionPrompt = void 0;
4
+ const createExtractionPrompt = (slots, lastConversationEntries) => {
5
+ const userInput = lastConversationEntries.filter(entry => entry.source === "user").map(entry => "- " + entry.text).join("\n");
6
+ const conversation = (0, exports.createLastConverationString)(lastConversationEntries);
7
+ let slotDescriptions = "";
8
+ let foundSlotDescriptions = "";
9
+ for (const slot of slots) {
10
+ if (!slot.value || slot.invalid) {
11
+ slotDescriptions += `- KEY: ${slot.tag}, DESCRIPTION: ${slot.optional ? "(if explicitly mentioned) " : ""}${slot.description}\n`;
12
+ }
13
+ else {
14
+ foundSlotDescriptions += `- KEY: ${slot.tag}, DESCRIPTION: ${slot.description}, FOUND: ${slot.value}\n`;
15
+ }
16
+ }
17
+ const prompt = `A USER has interacted with a BOT, this is the conversation so far:
18
+ ${conversation}
19
+ ${foundSlotDescriptions.length > 0 ? `\nSo far, the BOT has found the following entities:\n${foundSlotDescriptions}` : ""}
20
+ Try to fill the following entities from the USER input, each entity has to match the given description field. If the value does not strictly match this description, leave the value empty:
21
+ ${slotDescriptions}
22
+ Return the extracted entities as a valid JSON object, where the keys are the entity tags and the values are the extracted values.`;
23
+ return prompt;
24
+ };
25
+ exports.createExtractionPrompt = createExtractionPrompt;
26
+ const createQuestionPrompt = (foundSlots, missingSlots, lastConversationEntries) => {
27
+ const conversation = (0, exports.createLastConverationString)(lastConversationEntries);
28
+ const missingSlotDescriptions = missingSlots.map(slot => `- KEY: ${slot.tag}, DESCRIPTION: ${slot.description}`).join("\n");
29
+ const foundSlotDescriptions = foundSlots.map(slot => `- KEY: ${slot.tag}, DESCRIPTION: ${slot.description}, FOUND: ${slot.value}`).join("\n");
30
+ const prompt = `A user has interacted with a bot, this is the conversation so far:
31
+ ${conversation}
32
+
33
+ ${foundSlots.length > 0 ? `So far, the BOT has found the following entities:\n${foundSlotDescriptions}` : ""}
34
+
35
+ The BOT wants to find the following entities:
36
+ ${missingSlotDescriptions}
37
+
38
+ The BOT asks the user to for this information, based on the conversation so far. The BOT outputs should not be repetitive.
39
+ BOT: `;
40
+ return prompt;
41
+ };
42
+ exports.createQuestionPrompt = createQuestionPrompt;
43
+ const createInvalidAnswerPrompt = (invalidSlots, lastConversationEntries) => {
44
+ const userInput = (0, exports.createLastConverationString)(lastConversationEntries);
45
+ const invalidSlotDescription = `- KEY: ${invalidSlots[0].tag}, DESCRIPTION: ${invalidSlots[0].description}, USER INPUT: ${invalidSlots[0].value}, INVALID BECAUSE: ${invalidSlots[0].validation.invalidReason}\n`;
46
+ const prompt = `A user has interacted with a bot, this is the conversation so far:
47
+ ${userInput}
48
+
49
+ The USER has provided the following entities, but the USER INPUT was INVALID BECAUSE:
50
+ ${invalidSlotDescription}
51
+ The BOT explains the answer why he can't use the answer and asks the USER again for this information, based on the conversation so far. The BOT does not give explicit alternatives.:
52
+ BOT: `;
53
+ invalidSlots[0].invalid = false;
54
+ invalidSlots[0].value = "";
55
+ return prompt;
56
+ };
57
+ exports.createInvalidAnswerPrompt = createInvalidAnswerPrompt;
58
+ /* returns recentConversation as a multiline string:
59
+ - BOT: Hello
60
+ - USER: Hi
61
+ */
62
+ const createLastConverationString = (lastConversationEntries) => {
63
+ const conversation = lastConversationEntries === null || lastConversationEntries === void 0 ? void 0 : lastConversationEntries.map(entry => "- " + (entry.source === "user" ? "USER: " : "BOT: ") + entry.text).reverse().join("\n");
64
+ return conversation || "";
65
+ };
66
+ exports.createLastConverationString = createLastConverationString;
67
+ /* returns recentUserInput as a multiline string:
68
+ - Hi
69
+ - I want to order...
70
+ */
71
+ const createLastUserInputString = (lastConversationEntries) => {
72
+ const userInput = lastConversationEntries.filter(entry => entry.source === "user").map(entry => "- " + entry.text).reverse().join("\n");
73
+ return userInput || "";
74
+ };
75
+ exports.createLastUserInputString = createLastUserInputString;
76
+ //# sourceMappingURL=prompt.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FUZZY_SEARCH = exports.MATCH_PATTERN = exports.REGEX_SLOT_FILLER = exports.EXTRACT_ANSWER = exports.EXECUTE_COGNIGY_NLU = exports.ADD_LEXICON_KEYPHRASE = void 0;
3
+ exports.CLEAN_TEXT = exports.GENERATIVE_SLOT_FILLER_FALLBACK = exports.GENERATIVE_SLOT_FILLER_SUCCESS = exports.GENERATIVE_SLOT_FILLER = exports.FUZZY_SEARCH = exports.MATCH_PATTERN = exports.REGEX_SLOT_FILLER = exports.EXTRACT_ANSWER = exports.EXECUTE_COGNIGY_NLU = exports.ADD_LEXICON_KEYPHRASE = void 0;
4
4
  var addLexiconKeyphrase_1 = require("./addLexiconKeyphrase");
5
5
  Object.defineProperty(exports, "ADD_LEXICON_KEYPHRASE", { enumerable: true, get: function () { return addLexiconKeyphrase_1.ADD_LEXICON_KEYPHRASE; } });
6
6
  var executeCognigyNLU_1 = require("./executeCognigyNLU");
@@ -13,4 +13,12 @@ var matchPattern_1 = require("./matchPattern");
13
13
  Object.defineProperty(exports, "MATCH_PATTERN", { enumerable: true, get: function () { return matchPattern_1.MATCH_PATTERN; } });
14
14
  var fuzzySearch_1 = require("./fuzzySearch");
15
15
  Object.defineProperty(exports, "FUZZY_SEARCH", { enumerable: true, get: function () { return fuzzySearch_1.FUZZY_SEARCH; } });
16
+ var generativeSlotFiller_1 = require("./generativeSlotFiller/generativeSlotFiller");
17
+ Object.defineProperty(exports, "GENERATIVE_SLOT_FILLER", { enumerable: true, get: function () { return generativeSlotFiller_1.GENERATIVE_SLOT_FILLER; } });
18
+ var generativeSlotFillerSuccess_1 = require("./generativeSlotFiller/generativeSlotFillerSuccess");
19
+ Object.defineProperty(exports, "GENERATIVE_SLOT_FILLER_SUCCESS", { enumerable: true, get: function () { return generativeSlotFillerSuccess_1.GENERATIVE_SLOT_FILLER_SUCCESS; } });
20
+ var generativeSlotFillerFallback_1 = require("./generativeSlotFiller/generativeSlotFillerFallback");
21
+ Object.defineProperty(exports, "GENERATIVE_SLOT_FILLER_FALLBACK", { enumerable: true, get: function () { return generativeSlotFillerFallback_1.GENERATIVE_SLOT_FILLER_FALLBACK; } });
22
+ var cleanText_1 = require("./cleanText");
23
+ Object.defineProperty(exports, "CLEAN_TEXT", { enumerable: true, get: function () { return cleanText_1.CLEAN_TEXT; } });
16
24
  //# sourceMappingURL=index.js.map
@@ -10,20 +10,20 @@ exports.MATCH_PATTERN = (0, createNodeDescriptor_1.createNodeDescriptor)({
10
10
  key: "patternGroupName",
11
11
  type: "text"
12
12
  },
13
- summary: "Rule-based pattern matching for compound slot groups",
13
+ summary: "UI__NODE_EDITOR__NLU__MATCH_PATTERN__SUMMARY",
14
14
  tags: ["nlu", "pattern", "patterns"],
15
15
  fields: [
16
16
  {
17
17
  key: "patterns",
18
- label: "Patterns",
18
+ label: "UI__NODE_EDITOR__NLU__MATCH_PATTERN__FIELDS__PATTERNS_LABEL",
19
19
  type: "textArray",
20
- description: "The patterns to match, e.g. 'from @city>origin to @city>destination'. Maximum: 20.",
20
+ description: "UI__NODE_EDITOR__NLU__MATCH_PATTERN__FIELDS__PATTERNS_DESCRIPTION",
21
21
  defaultValue: ["@NUMBER>val1 or @NUMBER>val2"]
22
22
  },
23
23
  {
24
24
  key: "patternGroupName",
25
- label: "Pattern Group Name",
26
- description: "Name for the slot compound group to be found under input.matchedPatterns.groupname",
25
+ label: "UI__NODE_EDITOR__NLU__MATCH_PATTERN__FIELDS__PATTERN_GROUP_NAME_LABEL",
26
+ description: "UI__NODE_EDITOR__NLU__MATCH_PATTERN__FIELDS__PATTERN_GROUP_NAME_DESCRIPTION",
27
27
  type: "cognigyText",
28
28
  defaultValue: "patternGroupName",
29
29
  params: {
@@ -32,35 +32,35 @@ exports.MATCH_PATTERN = (0, createNodeDescriptor_1.createNodeDescriptor)({
32
32
  },
33
33
  {
34
34
  key: "alternateInput",
35
- label: "Alternate Input",
36
- description: "The input text to use instead of the current input text",
35
+ label: "UI__NODE_EDITOR__NLU__MATCH_PATTERN__FIELDS__ALTERNATE_INPUT_LABEL",
36
+ description: "UI__NODE_EDITOR__NLU__MATCH_PATTERN__FIELDS__ALTERNATE_INPUT_DESCRIPTION",
37
37
  type: "cognigyText",
38
38
  },
39
39
  {
40
40
  key: "detailedCompoundSlots",
41
- label: "Detailed Match Results",
42
- description: "Whether to store detailed results for the matched patterns or not",
41
+ label: "UI__NODE_EDITOR__NLU__MATCH_PATTERN__FIELDS__DETAILED_COMPOUND_SLOTS_LABEL",
42
+ description: "UI__NODE_EDITOR__NLU__MATCH_PATTERN__FIELDS__DETAILED_COMPOUND_SLOTS_DESCRIPTION",
43
43
  type: "toggle",
44
44
  defaultValue: false
45
45
  },
46
46
  {
47
47
  key: "createNewSlots",
48
- label: "Create New Slots",
49
- description: "Whether to create new slots from tags or not",
48
+ label: "UI__NODE_EDITOR__NLU__MATCH_PATTERN__FIELDS__CREATE_NEW_SLOTS_LABEL",
49
+ description: "UI__NODE_EDITOR__NLU__MATCH_PATTERN__FIELDS__CREATE_NEW_SLOTS_DESCRIPTION",
50
50
  type: "toggle",
51
51
  defaultValue: false
52
52
  },
53
53
  {
54
54
  key: "tagExistingSlots",
55
- label: "Tag Existing Slots",
56
- description: "Whether to tag existing slots or not",
55
+ label: "UI__NODE_EDITOR__NLU__MATCH_PATTERN__FIELDS__TAG_EXISTING_SLOTS_LABEL",
56
+ description: "UI__NODE_EDITOR__NLU__MATCH_PATTERN__FIELDS__TAG_EXISTING_SLOTS_DESCRIPTION",
57
57
  type: "toggle",
58
58
  defaultValue: true
59
59
  },
60
60
  {
61
61
  key: "useFullSystemslotText",
62
- label: "Replace system slots with full text",
63
- description: "Match the full system slot text and use detailed values",
62
+ label: "UI__NODE_EDITOR__NLU__MATCH_PATTERN__FIELDS__USE_FULL_SYSTEM_SLOT_TEXT_LABEL",
63
+ description: "UI__NODE_EDITOR__NLU__MATCH_PATTERN__FIELDS__USE_FULL_SYSTEM_SLOT_TEXT_DESCRIPTION",
64
64
  type: "toggle",
65
65
  defaultValue: true,
66
66
  }
@@ -68,7 +68,7 @@ exports.MATCH_PATTERN = (0, createNodeDescriptor_1.createNodeDescriptor)({
68
68
  sections: [
69
69
  {
70
70
  key: "advanced",
71
- label: "Advanced",
71
+ label: "UI__NODE_EDITOR__NLU__MATCH_PATTERN__SECTIONS__ADVANCED__LABEL",
72
72
  defaultCollapsed: true,
73
73
  fields: [
74
74
  "createNewSlots",
@@ -12,7 +12,7 @@ const createNodeDescriptor_1 = require("../../createNodeDescriptor");
12
12
  exports.REGEX_SLOT_FILLER = (0, createNodeDescriptor_1.createNodeDescriptor)({
13
13
  type: "regexSlotFiller",
14
14
  defaultLabel: "Regex Slot Filler",
15
- summary: "Fills Slots dynamically by evaluating a custom regular expression",
15
+ summary: "UI__NODE_EDITOR__NLU__REGEX_SLOT_FILLER__SUMMARY",
16
16
  appearance: {
17
17
  showIcon: false
18
18
  },
@@ -20,20 +20,20 @@ exports.REGEX_SLOT_FILLER = (0, createNodeDescriptor_1.createNodeDescriptor)({
20
20
  {
21
21
  key: "regex",
22
22
  type: "cognigyText",
23
- label: "Regular Expression",
24
- description: "The Regular Expression, without leading and trailing slash",
23
+ label: "UI__NODE_EDITOR__NLU__REGEX_SLOT_FILLER__FIELDS__REGEX__LABEL",
24
+ description: "UI__NODE_EDITOR__NLU__REGEX_SLOT_FILLER__FIELDS__REGEX__DESCRIPTION",
25
25
  defaultValue: ".*"
26
26
  },
27
27
  {
28
28
  key: "flags",
29
29
  type: "cognigyText",
30
- label: "Flags",
30
+ label: "UI__NODE_EDITOR__NLU__REGEX_SLOT_FILLER__FIELDS__FLAGS__LABEL",
31
31
  defaultValue: "gi"
32
32
  },
33
33
  {
34
34
  key: "slot",
35
35
  type: "cognigyText",
36
- label: "Slot Name"
36
+ label: "UI__NODE_EDITOR__NLU__REGEX_SLOT_FILLER__FIELDS__SLOT__LABEL"
37
37
  },
38
38
  ],
39
39
  tags: ["nlu", "regular", "expression", "slot"],
@@ -6,7 +6,7 @@ const createNodeDescriptor_1 = require("../createNodeDescriptor");
6
6
  exports.PLACEHOLDER = (0, createNodeDescriptor_1.createNodeDescriptor)({
7
7
  type: "placeholder",
8
8
  defaultLabel: "Placeholder",
9
- summary: "This node is used as a Placeholder.",
9
+ summary: "UI__NODE_EDITOR__PLACEHOLDER__SUMMARY",
10
10
  behavior: {
11
11
  stopping: false,
12
12
  },
@@ -17,12 +17,12 @@ exports.PLACEHOLDER = (0, createNodeDescriptor_1.createNodeDescriptor)({
17
17
  fields: [
18
18
  {
19
19
  key: "text",
20
- label: "text placeholder",
20
+ label: "UI__NODE_EDITOR__PLACEHOLDER__FIELDS__TEXT__LABEL",
21
21
  type: "text",
22
22
  },
23
23
  {
24
24
  key: "data",
25
- label: "data placeholder",
25
+ label: "UI__NODE_EDITOR__PLACEHOLDER__FIELDS__DATA__LABEL",
26
26
  type: "json",
27
27
  },
28
28
  ],