@cognigy/rest-api-client 0.11.0 → 0.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.
- package/.eslintignore +15 -0
- package/.eslintrc.json +28 -0
- package/.prettierrc.json +7 -0
- package/.snyk +1 -1
- package/build/GenericAPIFn.js +3 -3
- package/build/GenericUploadFn.js +8 -5
- package/build/PluginBase.js +1 -1
- package/build/RestAPIClient.js +15 -1
- package/build/apigroups/AdministrationAPIGroup_2_0.js +68 -40
- package/build/apigroups/AnalyticsAPIGroup_2_0.js +12 -0
- package/build/apigroups/ExternalAPIGroup_2_0.js +5 -5
- package/build/apigroups/InsightsAPIGroup_2_0.js +58 -0
- package/build/apigroups/ManagementAPIGroup_2_0.js +19 -15
- package/build/apigroups/MetricsAPIGroup_2_0.js +29 -29
- package/build/apigroups/ResourcesAPIGroup_2_0.js +250 -177
- package/build/apigroups/SessionsAPIGroup_2_0.js +7 -7
- package/build/apigroups/index.js +5 -1
- package/build/authentication/ApiKey/ApiKeyAuthentication.js +1 -1
- package/build/authentication/AuthenticationAPI.js +2 -2
- package/build/authentication/BasicAuthentication/BasicAuthentication.js +9 -2
- package/build/authentication/OAuth2/ILoginByClientCredentialsParameters.js +3 -0
- package/build/authentication/OAuth2/IOAuth2ClientCredentialsGrantAccessTokenRequest.js +11 -0
- package/build/authentication/OAuth2/IOAuth2ErrorResponse.js +1 -1
- package/build/authentication/OAuth2/OAuth2Authentication.js +67 -34
- package/build/connector/AxiosAdapter.js +28 -24
- package/build/connector/isRetryAllowed.js +0 -1
- package/build/connector/retryAfterDelay.js +3 -3
- package/build/shared/{interfaces/restAPI/administration/user/v2.0/IDeleteUserMeRest_2_0.js → api/liveAgent/liveAgentInterfaces.js} +1 -1
- package/build/shared/charts/createNodeDescriptor.js +1 -1
- package/build/shared/charts/descriptors/allFields.js +1 -1
- package/build/shared/charts/descriptors/{profile → analytics}/activateProfile.js +2 -2
- package/build/shared/charts/descriptors/{profile → analytics}/blindMode.js +11 -4
- package/build/shared/charts/descriptors/{profile → analytics}/completeGoal.js +2 -2
- package/build/shared/charts/descriptors/{profile → analytics}/deactivateProfile.js +2 -2
- package/build/shared/charts/descriptors/{profile → analytics}/deleteProfile.js +2 -2
- package/build/shared/charts/descriptors/{profile → analytics}/index.js +5 -1
- package/build/shared/charts/descriptors/{profile → analytics}/mergeProfile.js +2 -2
- package/build/shared/charts/descriptors/{profile → analytics}/overwriteAnalytics.js +59 -4
- package/build/shared/charts/descriptors/analytics/requestRating.js +57 -0
- package/build/shared/charts/descriptors/analytics/setRating.js +39 -0
- package/build/shared/charts/descriptors/{profile → analytics}/updateProfile.js +2 -2
- package/build/shared/charts/descriptors/apps/getAppSessionPin.js +46 -0
- package/build/shared/charts/descriptors/apps/index.js +14 -0
- package/build/shared/charts/descriptors/apps/initAppSession.js +488 -0
- package/build/shared/charts/descriptors/apps/setAdaptiveCardAppState.js +79 -0
- package/build/shared/charts/descriptors/apps/setAppState.js +44 -0
- package/build/shared/charts/descriptors/apps/setHtmlAppState.js +108 -0
- package/build/shared/charts/descriptors/connectionNodes/internalStorageProviders/amazonStorageProviderConnection.js +14 -0
- package/build/shared/charts/descriptors/connectionNodes/internalStorageProviders/azureBlobStorageProviderConnection.js +13 -0
- package/build/shared/charts/descriptors/connectionNodes/internalStorageProviders/googleCloudStorageProviderConnection.js +13 -0
- package/build/shared/charts/descriptors/connectionNodes/internalStorageProviders/index.js +23 -0
- package/build/shared/charts/descriptors/connectionNodes/mongoDB/aggregate.js +1 -1
- package/build/shared/charts/descriptors/connectionNodes/mongoDB/find.js +1 -1
- package/build/shared/charts/descriptors/connectionNodes/mongoDB/findOne.js +1 -1
- package/build/shared/charts/descriptors/connectionNodes/mongoDB/index.js +1 -1
- package/build/shared/charts/descriptors/connectionNodes/mongoDB/insert.js +1 -1
- package/build/shared/charts/descriptors/connectionNodes/mongoDB/remove.js +1 -1
- package/build/shared/charts/descriptors/connectionNodes/mongoDB/updateMany.js +1 -1
- package/build/shared/charts/descriptors/connectionNodes/mongoDB/updateOne.js +1 -1
- package/build/shared/charts/descriptors/connectionNodes/smtp/emailNotification.js +8 -6
- package/build/shared/charts/descriptors/connectionNodes/smtp/index.js +1 -1
- package/build/shared/charts/descriptors/connectionNodes/smtp/sendEmail.js +4 -4
- package/build/shared/charts/descriptors/connectionNodes/sql/index.js +1 -1
- package/build/shared/charts/descriptors/connectionNodes/sql/runQuery.js +1 -1
- package/build/shared/charts/descriptors/connectionNodes/sql/runStoredProcedure.js +1 -1
- package/build/shared/charts/descriptors/connectionNodes/sql/runTransaction.js +1 -1
- package/build/shared/charts/descriptors/data/addToContext.js +1 -1
- package/build/shared/charts/descriptors/data/code.js +1 -1
- package/build/shared/charts/descriptors/data/copyDataToContext.js +1 -1
- package/build/shared/charts/descriptors/data/copySlotsToContext.js +1 -1
- package/build/shared/charts/descriptors/data/log.js +1 -1
- package/build/shared/charts/descriptors/data/removeFromContext.js +1 -1
- package/build/shared/charts/descriptors/data/resetContext.js +1 -1
- package/build/shared/charts/descriptors/end.js +2 -1
- package/build/shared/charts/descriptors/index.js +98 -70
- package/build/shared/charts/descriptors/liveAgent/assistInfo.js +195 -0
- package/build/shared/charts/descriptors/liveAgent/index.js +6 -0
- package/build/shared/charts/descriptors/liveAgent/utils/buildCognigyWhisperAssistResponse.js +135 -0
- package/build/shared/charts/descriptors/liveAgent/utils/index.js +6 -0
- package/build/shared/charts/descriptors/logic/disableSlotFillers.js +1 -1
- package/build/shared/charts/descriptors/logic/enableSlotFillers.js +1 -1
- package/build/shared/charts/descriptors/logic/executeFlow.js +1 -1
- package/build/shared/charts/descriptors/logic/goTo.js +2 -1
- package/build/shared/charts/descriptors/logic/if/else.js +3 -1
- package/build/shared/charts/descriptors/logic/if/if.js +3 -2
- package/build/shared/charts/descriptors/logic/if/then.js +3 -1
- package/build/shared/charts/descriptors/logic/index.js +5 -3
- package/build/shared/charts/descriptors/logic/interval/elseInterval.js +2 -1
- package/build/shared/charts/descriptors/logic/interval/interval.js +1 -1
- package/build/shared/charts/descriptors/logic/interval/onInterval.js +2 -1
- package/build/shared/charts/descriptors/logic/once/afterwards.js +2 -1
- package/build/shared/charts/descriptors/logic/once/onFirstExecution.js +2 -1
- package/build/shared/charts/descriptors/logic/once/once.js +1 -1
- package/build/shared/charts/descriptors/logic/resetState.js +1 -1
- package/build/shared/charts/descriptors/logic/setState.js +1 -1
- package/build/shared/charts/descriptors/logic/setTranslation.js +88 -0
- package/build/shared/charts/descriptors/logic/sleep.js +1 -1
- package/build/shared/charts/descriptors/logic/stop.js +1 -1
- package/build/shared/charts/descriptors/logic/switch/case.js +3 -1
- package/build/shared/charts/descriptors/logic/switch/default.js +3 -1
- package/build/shared/charts/descriptors/logic/switch/switch.js +74 -12
- package/build/shared/charts/descriptors/logic/switchLocale.js +31 -3
- package/build/shared/charts/descriptors/logic/think.js +8 -4
- package/build/shared/charts/descriptors/logic/thinkV2.js +104 -0
- package/build/shared/charts/descriptors/logic/wait.js +3 -10
- package/build/shared/charts/descriptors/message/checkChannelChange/checkChannelChange.js +2 -1
- package/build/shared/charts/descriptors/message/checkChannelChange/onNo.js +4 -2
- package/build/shared/charts/descriptors/message/checkChannelChange/onYes.js +4 -2
- package/build/shared/charts/descriptors/message/checkChannelChange/unchanged.js +4 -2
- package/build/shared/charts/descriptors/message/datePicker.js +5 -5
- package/build/shared/charts/descriptors/message/question/onAnswer.js +4 -2
- package/build/shared/charts/descriptors/message/question/onQuestion.js +4 -2
- package/build/shared/charts/descriptors/message/question/optionalQuestion.js +2 -2
- package/build/shared/charts/descriptors/message/question/question.js +655 -60
- package/build/shared/charts/descriptors/message/question/utils/datepickerUtils.js +32 -2
- package/build/shared/charts/descriptors/message/question/utils/evaluateQuestionAnswer.js +12 -3
- package/build/shared/charts/descriptors/message/question/utils/generateAnswerShortForm.js +37 -0
- package/build/shared/charts/descriptors/message/question/utils/getQuestionText.js +36 -0
- package/build/shared/charts/descriptors/message/question/utils/questionHandover.js +13 -0
- package/build/shared/charts/descriptors/message/question/utils/resetNodeState.js +12 -0
- package/build/shared/charts/descriptors/message/question/utils/storeQuestionAnswer.js +30 -0
- package/build/shared/charts/descriptors/message/question/utils/validateQuestionAnswer.js +22 -0
- package/build/shared/charts/descriptors/message/say.js +10 -4
- package/build/shared/charts/descriptors/message/sendImage.js +1 -1
- package/build/shared/charts/descriptors/message/sendText.js +1 -1
- package/build/shared/charts/descriptors/microsoft/getToken.js +34 -0
- package/build/shared/charts/descriptors/microsoft/index.js +22 -0
- package/build/shared/charts/descriptors/microsoft/invalidateToken.js +29 -0
- package/build/shared/charts/descriptors/microsoft/tokenStatus/index.js +51 -0
- package/build/shared/charts/descriptors/microsoft/tokenStatus/tokenGranted.js +24 -0
- package/build/shared/charts/descriptors/microsoft/tokenStatus/tokenNotGranted.js +24 -0
- package/build/shared/charts/descriptors/microsoft/utils/design.js +5 -0
- package/build/shared/charts/descriptors/nlu/addLexiconKeyphrase.js +1 -1
- package/build/shared/charts/descriptors/nlu/executeCognigyNLU.js +23 -3
- package/build/shared/charts/descriptors/nlu/extractAnswer.js +115 -0
- package/build/shared/charts/descriptors/nlu/fuzzySearch.js +270 -0
- package/build/shared/charts/descriptors/nlu/index.js +7 -1
- package/build/shared/charts/descriptors/nlu/matchPattern.js +113 -0
- package/build/shared/charts/descriptors/nlu/regexSlotFiller.js +1 -1
- package/build/shared/charts/descriptors/nlu/utils/patternMatcher.js +265 -0
- package/build/shared/charts/descriptors/placeholder.js +1 -1
- package/build/shared/charts/descriptors/requiredFields.js +1 -1
- package/build/shared/charts/descriptors/service/checkAgentAvailability.js +203 -0
- package/build/shared/charts/descriptors/service/handover.js +30 -3
- package/build/shared/charts/descriptors/service/handoverV2.js +192 -0
- package/build/shared/charts/descriptors/service/httpRequest.js +40 -10
- package/build/shared/charts/descriptors/service/index.js +5 -1
- package/build/shared/charts/descriptors/service/triggerFunction/onScheduled.js +3 -1
- package/build/shared/charts/descriptors/service/triggerFunction/onSchedulingError.js +3 -1
- package/build/shared/charts/descriptors/service/triggerFunction/triggerFunction.js +1 -1
- package/build/shared/charts/descriptors/start.js +2 -1
- package/build/shared/charts/descriptors/voice/index.js +20 -0
- package/build/shared/charts/descriptors/voice/interface/IAudioCodes.js +3 -0
- package/build/shared/charts/descriptors/voice/interface/IVoiceGateway2.js +3 -0
- package/build/shared/charts/descriptors/voice/mappers/hangup.mapper.js +59 -0
- package/build/shared/charts/descriptors/voice/mappers/play.mapper.js +99 -0
- package/build/shared/charts/descriptors/voice/mappers/setSessionConfig.mapper.js +296 -0
- package/build/shared/charts/descriptors/voice/mappers/transfer.mapper.js +86 -0
- package/build/shared/charts/descriptors/voice/nodes/bargeIn.js +60 -0
- package/build/shared/charts/descriptors/voice/nodes/continuousAsr.js +72 -0
- package/build/shared/charts/descriptors/voice/nodes/dtmf.js +86 -0
- package/build/shared/charts/descriptors/voice/nodes/hangup.js +48 -0
- package/build/shared/charts/descriptors/voice/nodes/noUserInput.js +105 -0
- package/build/shared/charts/descriptors/voice/nodes/play.js +95 -0
- package/build/shared/charts/descriptors/voice/nodes/sessionSpeechParameters.js +105 -0
- package/build/shared/charts/descriptors/voice/nodes/transfer.js +114 -0
- package/build/shared/charts/descriptors/voice/utils/constants.js +8 -0
- package/build/shared/charts/descriptors/voice/utils/design.js +5 -0
- package/build/shared/charts/descriptors/voice/utils/helper.js +11 -0
- package/build/shared/charts/descriptors/voicegateway/index.js +1 -1
- package/build/shared/charts/descriptors/voicegateway/nodes/agentAssist.js +1 -1
- package/build/shared/charts/descriptors/voicegateway/nodes/callRecording.js +37 -17
- package/build/shared/charts/descriptors/voicegateway/nodes/handover.js +20 -34
- package/build/shared/charts/descriptors/voicegateway/nodes/hangup.js +11 -20
- package/build/shared/charts/descriptors/voicegateway/nodes/playURL.js +23 -29
- package/build/shared/charts/descriptors/voicegateway/nodes/sendMessage.js +5 -5
- package/build/shared/charts/descriptors/voicegateway/nodes/sendMetaData.js +1 -1
- package/build/shared/charts/descriptors/voicegateway/nodes/setSessionParams.js +4 -4
- package/build/shared/charts/descriptors/voicegateway/utils/paramUtils.js +34 -6
- package/build/shared/charts/descriptors/voicegateway2/index.js +25 -0
- package/build/shared/charts/descriptors/voicegateway2/nodes/dtmf.js +60 -0
- package/build/shared/charts/descriptors/voicegateway2/nodes/hangup.js +46 -0
- package/build/shared/charts/descriptors/voicegateway2/nodes/play.js +113 -0
- package/build/shared/charts/descriptors/voicegateway2/nodes/refer.js +103 -0
- package/build/shared/charts/descriptors/voicegateway2/nodes/sendMetadata.js +64 -0
- package/build/shared/charts/descriptors/voicegateway2/nodes/setSessionConfig.js +354 -0
- package/build/shared/charts/descriptors/voicegateway2/nodes/transfer.js +99 -0
- package/build/shared/charts/descriptors/voicegateway2/utils/constants.js +7 -0
- package/build/shared/charts/descriptors/voicegateway2/utils/design.js +5 -0
- package/build/shared/charts/descriptors/voicegateway2/utils/helper.js +39 -0
- package/build/shared/charts/descriptors/voicegateway2/utils/strip-nulls.js +19 -0
- package/build/shared/constants.js +11 -1
- package/build/shared/errors/baseError.js +35 -2
- package/build/shared/handoverClients/interfaces/TAnyProviderResponse.js +3 -0
- package/build/shared/handoverClients/interfaces/THandoverEventType.js +12 -0
- package/build/shared/helper/BaseContext.js +1 -1
- package/build/shared/helper/defaultDatepickerFunction.js +13 -0
- package/build/shared/helper/rest/array.js +19 -0
- package/build/shared/helper/rest/boolean.js +5 -1
- package/build/shared/helper/rest/index.js +4 -1
- package/build/shared/helper/rest/query-string/index.js +5 -5
- package/build/shared/helper/rest/query.js +0 -0
- package/build/shared/interfaces/IApiKey.js +1 -1
- package/build/shared/interfaces/IEndpointTranslationSettings.js +32 -0
- package/build/shared/interfaces/IHandoverRequestStatus.js +3 -0
- package/build/shared/interfaces/IHttpRequest.js +3 -0
- package/build/shared/interfaces/IOrganisation.js +22 -3
- package/build/shared/interfaces/IProfile.js +1 -1
- package/build/shared/interfaces/ISayNodeSettings.js +3 -0
- package/build/shared/interfaces/TEntrypointType.js +2 -0
- package/build/shared/interfaces/ai.js +0 -1
- package/build/shared/interfaces/amazonLexV2Interface.js +3 -0
- package/build/shared/interfaces/amqpInterface.js +4 -1
- package/build/shared/interfaces/analytics/IAnalyticsFlowHistoryData.js +3 -0
- package/build/shared/interfaces/analytics/IAnalyticsRating.js +13 -0
- package/build/shared/interfaces/analytics/IAnalyticsSourceData.js +196 -45
- package/build/shared/interfaces/analytics/IStepEvent.js +4 -1
- package/build/shared/interfaces/analytics/TAnalyticsMode.js +10 -0
- package/build/shared/interfaces/analytics/TAnalyticsType.js +5 -0
- package/build/shared/interfaces/debugEvents/IErrorEventPayload.js +3 -0
- package/build/shared/interfaces/debugEvents/TDebugEndpointEvent.js +1 -0
- package/build/shared/interfaces/debugEvents/TDebugEventType.js +2 -1
- package/build/shared/interfaces/fileStorage.js +23 -0
- package/build/shared/interfaces/handover.js +151 -3
- package/build/shared/interfaces/journeys/IJourney.js +1 -1
- package/build/shared/interfaces/license.js +34 -0
- package/build/shared/interfaces/license.js.map +1 -0
- package/build/shared/interfaces/management/deleteOrganisation/deleteOrganisationTypes.js +3 -0
- package/build/shared/interfaces/messageAPI/ai.js +15 -1
- package/build/shared/interfaces/messageAPI/analytics.js +3 -0
- package/build/shared/interfaces/messageAPI/endpoints.js +361 -11
- package/build/shared/interfaces/messageAPI/handover.js +270 -0
- package/build/shared/interfaces/resources/IAppTemplate.js +24 -0
- package/build/shared/interfaces/resources/IAuditEvent.js +39 -3
- package/build/shared/interfaces/resources/IChart.js +2 -1
- package/build/shared/interfaces/resources/IChartNode.js +58 -11
- package/build/shared/interfaces/resources/IConnection.js +1 -1
- package/build/shared/interfaces/resources/IConnectionSchema.js +1 -1
- package/build/shared/interfaces/resources/IEndpoint.js +7 -2
- package/build/shared/interfaces/resources/IExtension.js +17 -0
- package/build/shared/interfaces/resources/IFile.js +1 -1
- package/build/shared/interfaces/resources/IFlow.js +10 -2
- package/build/shared/interfaces/resources/IFlowState.js +1 -1
- package/build/shared/interfaces/resources/IFunctionInstance.js +1 -1
- package/build/shared/interfaces/resources/IHandoverConfiguration.js +13 -0
- package/build/shared/interfaces/resources/ILexicon.js +9 -3
- package/build/shared/interfaces/resources/ILexiconEntry.js +1 -1
- package/build/shared/interfaces/resources/INLUConnector.js +15 -2
- package/build/shared/interfaces/resources/INodeDescriptorSet.js +169 -53
- package/build/shared/interfaces/resources/IOptionsResolverFunction.js +18 -0
- package/build/shared/interfaces/resources/IOrganisationDeletion.js +10 -0
- package/build/shared/interfaces/resources/IPlaybookRun.js +61 -0
- package/build/shared/interfaces/resources/IProject.js +20 -1
- package/build/shared/interfaces/resources/IRemoveDuplicatedSlotsAndUpdateLexionEntries.js +3 -0
- package/build/shared/interfaces/resources/ISlotFiller.js +38 -21
- package/build/shared/interfaces/resources/ISnapshot.js +1 -1
- package/build/shared/interfaces/resources/ITrackAnalyticsStepsArguments.js +3 -0
- package/build/shared/interfaces/resources/TNLUConnectorType.js +3 -1
- package/build/shared/interfaces/resources/TResourceType.js +1 -0
- package/build/shared/interfaces/resources/TRestChannelType.js +10 -0
- package/build/shared/interfaces/resources/TSocketChannelType.js +9 -5
- package/build/shared/interfaces/resources/TWebhookChannelType.js +10 -0
- package/build/shared/interfaces/resources/chart/IChartExecutable.js +3 -2
- package/build/shared/interfaces/resources/chart/IChartExecutableNode.js +1 -0
- package/build/shared/interfaces/resources/intent/IIntent.js +26 -6
- package/build/shared/interfaces/resources/intent/IIntentTrainGroup.js +22 -2
- package/build/shared/interfaces/resources/intent/ISentence.js +32 -8
- package/build/shared/interfaces/resources/settings/IAgentSettings.js +81 -2
- package/build/shared/interfaces/resources/settings/IFlowSettings.js +20 -2
- package/build/shared/interfaces/resources/settings/ISharedSettings.js +5 -1
- package/build/shared/interfaces/resources/yesNoIntent/IYesNoItem.js +9 -0
- package/build/shared/interfaces/resources/yesNoIntent/index.js +3 -0
- package/build/shared/interfaces/restAPI/administration/liveAgent/v2.0/IReadLiveAgentAccountRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/administration/liveAgent/v2.0/IReadProjectInboxRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/administration/liveAgent/v2.0/ISetupCognigyLiveAgentInboxRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/administration/liveAgent/v2.0/ISetupCognigyLiveAgentRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/administration/liveAgent/v2.0/IUpdateCognigyLiveAgentInboxRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/administration/liveAgent/v2.0/index.js +3 -0
- package/build/shared/interfaces/restAPI/administration/organisations/v2.0/IReadCollectionsToBeDeletedRest_2_0.js +21 -0
- package/build/shared/interfaces/restAPI/administration/organisations/v2.0/IRequestOrganisationDeletionRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/administration/organisations/v2.0/index.js +3 -0
- package/build/shared/interfaces/restAPI/analytics/IDeleteAnalyticsRecordsRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/analytics/IUpdateAnalyticsRecordProperties_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/analytics/IUpdateAnalyticsRecordsRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/audio/v2.0/IAudioPreviewLanguages_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/audio/v2.0/IAudioPreviewRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/audio/v2.0/IIndexAudioPreviewLanguages_2_0.js +4 -0
- package/build/shared/interfaces/restAPI/audio/v2.0/ITestVoiceProviderRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/audio/v2.0/ITestVoiceProvider_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/audio/v2.0/IVGCallSettings_2_0.js +4 -0
- package/build/shared/interfaces/restAPI/audio/v2.0/IVoicePrepareCallRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/audio/v2.0/IVoicePrepareCall_2_0.js +4 -0
- package/build/shared/interfaces/restAPI/audio/v2.0/index.js +3 -0
- package/build/shared/interfaces/restAPI/insights/IAnalyticsQueryFilter_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/insights/TAnalyticsQueryFilterOperator_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/insights/messages/IGenerateMessagesRest_2_0.js +5 -0
- package/build/shared/interfaces/restAPI/insights/messages/ILoadMessagesReportByQueryHashResponse_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/insights/messages/ILoadMessagesReportByQueryHashRestData_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/insights/messages/ITopNMessages_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/insights/publish/IPublishAnalyticsRestDataBody.js +4 -0
- package/build/shared/interfaces/restAPI/insights/reports/IGenerateReportResponse_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/insights/reports/IGenerateReportRest_2_0.js +41 -0
- package/build/shared/interfaces/restAPI/insights/reports/ILoadReportByQueryHashResponse_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/insights/reports/ILoadReportByQueryHashRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/insights/steps/IGenerateStepReportRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/insights/steps/IIndexStepsRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/insights/steps/ILoadStepReportByQueryHashResponse_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/insights/steps/ILoadStepReportByQueryHashRestData_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/insights/steps/IStepIndexItem_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/insights/steps/IStepReport_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/insights/steps/IStep_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/insights/transcripts/IGenerateTranscriptsRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/insights/transcripts/ILoadTranscriptsReportByQueryHashResponse_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/insights/transcripts/ILoadTranscriptsReportByQueryHashRestData_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/insights/transcripts/IStepPath_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/management/organisations/v2.0/IDeleteOrganisationRest_2_0.js +4 -0
- package/build/shared/interfaces/restAPI/resources/chart/v2.0/ISearchChartNodesRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/extension/v2.0/IUpdateExtensionPackageRest_2_0.js +4 -0
- package/build/shared/interfaces/restAPI/resources/file/v2.0/IUploadFileRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/file/v2.0/index.js +3 -0
- package/build/shared/interfaces/restAPI/resources/flow/v2.0/ICloneFlowRest_2_0.js +4 -0
- package/build/shared/interfaces/restAPI/resources/flow/v2.0/ICreateFlowFromChildrenRest_2_0.js +4 -0
- package/build/shared/interfaces/restAPI/resources/flow/v2.0/sentence/IYesNoSentence_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/flow/v2.0/settings/ILocaleSettings_2_0.js +16 -0
- package/build/shared/interfaces/restAPI/resources/lexicon/v2.0/IComposeLexiconDownloadLinkRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/locales/v2.0/yesNoIntents/IDeleteYesNoIntentRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/locales/v2.0/yesNoIntents/IReadYesNoIntentsRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/locales/v2.0/yesNoIntents/ITrainYesNoIntentsRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/locales/v2.0/yesNoIntents/IUpdateYesNoIntentRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/locales/v2.0/yesNoIntents/IYesNoIntentItem_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/locales/v2.0/yesNoIntents/IYesNoIntentMetaData_2_0.js +4 -0
- package/build/shared/interfaces/restAPI/resources/locales/v2.0/yesNoIntents/IYesNoIntents_2_0.js +8 -0
- package/build/shared/interfaces/restAPI/resources/locales/v2.0/yesNoIntents/index.js +3 -0
- package/build/shared/interfaces/restAPI/resources/locales/v2.0/yesNoSentence/ICreateYesNoSentenceRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/locales/v2.0/yesNoSentence/IDeleteYesNoSentenceRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/locales/v2.0/yesNoSentence/IIndexYesNoSentencesRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/locales/v2.0/yesNoSentence/IReadYesNoSentenceRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/locales/v2.0/yesNoSentence/IUpdateYesNoSentenceRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/locales/v2.0/yesNoSentence/index.js +3 -0
- package/build/shared/interfaces/restAPI/resources/nluconnector/v2.0/TNLUConnectorType_2_0.js +5 -1
- package/build/shared/interfaces/restAPI/resources/nodedescriptorsets/v2.0/IOptionsResolverRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/playbook/v2.0/IDeletePlaybookRunRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/playbook/v2.0/IIndexPlaybookRunsRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/playbook/v2.0/IPlaybookRunIndexItem_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/playbook/v2.0/IPlaybookRun_2_0.js +7 -0
- package/build/shared/interfaces/restAPI/resources/playbook/v2.0/IReadPlaybookRunRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/playbook/v2.0/ISchedulePlaybookRunRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/project/v2.0/ICreateProjectRest_2_0.js +1 -0
- package/build/shared/interfaces/restAPI/resources/project/v2.0/ITrainAllProjectFlowsRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/project/v2.0/settings/ITestTranslationSettingsRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/resources/project/v2.0/settings/ITestTranslationSettings_2_0.js +3 -0
- package/build/shared/interfaces/security/IACL.js +1 -1
- package/build/shared/interfaces/security/IPermission.js +10 -0
- package/build/shared/interfaces/security/IRole.js +21 -3
- package/build/shared/interfaces/sessionstate/ISessionState.js +3 -0
- package/build/shared/interfaces/sessionstate/index.js +3 -0
- package/build/shared/interfaces/trainer/ITrainerRecord.js +5 -1
- package/build/shared/interfaces/translation.js +11 -0
- package/build/shared/interfaces/user.js +1 -1
- package/package.json +40 -31
- package/types/index.d.ts +12527 -8567
- package/build/shared/charts/descriptors/logic/checkFrustration.js +0 -82
|
@@ -4,9 +4,10 @@ exports.playURLNode = void 0;
|
|
|
4
4
|
/** Custom Modules */
|
|
5
5
|
const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
6
6
|
/** Helper Modules */
|
|
7
|
+
const play_mapper_1 = require("../../voice/mappers/play.mapper");
|
|
7
8
|
const design_1 = require("../utils/design");
|
|
8
9
|
const paramUtils_1 = require("../utils/paramUtils");
|
|
9
|
-
exports.playURLNode = createNodeDescriptor_1.createNodeDescriptor({
|
|
10
|
+
exports.playURLNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
10
11
|
type: "playURL",
|
|
11
12
|
defaultLabel: "Play URL",
|
|
12
13
|
summary: "Plays an audio prompt from a file url",
|
|
@@ -25,6 +26,7 @@ exports.playURLNode = createNodeDescriptor_1.createNodeDescriptor({
|
|
|
25
26
|
label: "Media Format",
|
|
26
27
|
type: "select",
|
|
27
28
|
defaultValue: "wav/lpcm16",
|
|
29
|
+
description: "Either Mu-Law (8 bit, 8 kHz) or Linear PCM (16 bit, 16 kHz) encoded with or without a WAV header",
|
|
28
30
|
params: {
|
|
29
31
|
options: [
|
|
30
32
|
{
|
|
@@ -34,6 +36,14 @@ exports.playURLNode = createNodeDescriptor_1.createNodeDescriptor({
|
|
|
34
36
|
{
|
|
35
37
|
label: "raw/lpcm16",
|
|
36
38
|
value: "raw/lpcm16"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
label: "wav/mulaw",
|
|
42
|
+
value: "wav/mulaw"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
label: "raw/mulaw",
|
|
46
|
+
value: "raw/mulaw"
|
|
37
47
|
}
|
|
38
48
|
]
|
|
39
49
|
}
|
|
@@ -63,7 +73,7 @@ exports.playURLNode = createNodeDescriptor_1.createNodeDescriptor({
|
|
|
63
73
|
type: "json",
|
|
64
74
|
defaultValue: "{}"
|
|
65
75
|
}
|
|
66
|
-
].concat(paramUtils_1.getParameterFields()),
|
|
76
|
+
].concat((0, paramUtils_1.getParameterFields)()),
|
|
67
77
|
sections: [
|
|
68
78
|
{
|
|
69
79
|
key: "advanced",
|
|
@@ -77,7 +87,7 @@ exports.playURLNode = createNodeDescriptor_1.createNodeDescriptor({
|
|
|
77
87
|
value: true
|
|
78
88
|
}
|
|
79
89
|
}
|
|
80
|
-
].concat(paramUtils_1.getParamSections({ key: "setActivityParams", value: true })),
|
|
90
|
+
].concat((0, paramUtils_1.getParamSections)({ key: "setActivityParams", value: true })),
|
|
81
91
|
form: [
|
|
82
92
|
{ type: "field", key: "playUrlUrl" },
|
|
83
93
|
{ type: "field", key: "playUrlMediaFormat" },
|
|
@@ -103,34 +113,18 @@ exports.playURLNode = createNodeDescriptor_1.createNodeDescriptor({
|
|
|
103
113
|
},
|
|
104
114
|
function: async ({ cognigy, config }) => {
|
|
105
115
|
const { api } = cognigy;
|
|
106
|
-
const { playUrlUrl, playUrlMediaFormat
|
|
116
|
+
const { playUrlUrl, playUrlMediaFormat } = config;
|
|
107
117
|
if (playUrlUrl && playUrlMediaFormat) {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
compiledParams["playUrlAltText"] = playUrlAltText;
|
|
114
|
-
if (playUrlCaching !== null)
|
|
115
|
-
compiledParams["playUrlCaching"] = !!playUrlCaching;
|
|
116
|
-
if (setActivityParams) {
|
|
117
|
-
paramUtils_1.compileParams(config, compiledParams);
|
|
118
|
+
try {
|
|
119
|
+
const payload = play_mapper_1.play.handleInput('audioCodes', config);
|
|
120
|
+
api.say(null, {
|
|
121
|
+
_cognigy: payload
|
|
122
|
+
});
|
|
118
123
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
"activities": [
|
|
124
|
-
{
|
|
125
|
-
"type": "event",
|
|
126
|
-
"name": "playUrl",
|
|
127
|
-
"activityParams": compiledParams
|
|
128
|
-
}
|
|
129
|
-
]
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
});
|
|
124
|
+
catch (error) {
|
|
125
|
+
throw new Error(`Error on play node. Error message: ${error.message}`);
|
|
126
|
+
}
|
|
127
|
+
;
|
|
134
128
|
}
|
|
135
129
|
}
|
|
136
130
|
});
|
|
@@ -6,7 +6,7 @@ const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
|
6
6
|
/** Helper Modules */
|
|
7
7
|
const design_1 = require("../utils/design");
|
|
8
8
|
const paramUtils_1 = require("../utils/paramUtils");
|
|
9
|
-
exports.sendMessageNode = createNodeDescriptor_1.createNodeDescriptor({
|
|
9
|
+
exports.sendMessageNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
10
10
|
type: "sendMessage",
|
|
11
11
|
defaultLabel: "Send Message",
|
|
12
12
|
summary: "Sends a prompt via VG",
|
|
@@ -208,7 +208,7 @@ exports.sendMessageNode = createNodeDescriptor_1.createNodeDescriptor({
|
|
|
208
208
|
type: "json",
|
|
209
209
|
defaultValue: "{}"
|
|
210
210
|
}
|
|
211
|
-
].concat(paramUtils_1.getParameterFields()),
|
|
211
|
+
].concat((0, paramUtils_1.getParameterFields)()),
|
|
212
212
|
sections: [
|
|
213
213
|
{
|
|
214
214
|
key: "advanced",
|
|
@@ -222,7 +222,7 @@ exports.sendMessageNode = createNodeDescriptor_1.createNodeDescriptor({
|
|
|
222
222
|
value: true
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
].concat(paramUtils_1.getParamSections({ key: "setActivityParams", value: true })),
|
|
225
|
+
].concat((0, paramUtils_1.getParamSections)({ key: "setActivityParams", value: true })),
|
|
226
226
|
form: [
|
|
227
227
|
{ type: "field", key: "text" },
|
|
228
228
|
{ type: "field", key: "setActivityParams" },
|
|
@@ -249,10 +249,10 @@ exports.sendMessageNode = createNodeDescriptor_1.createNodeDescriptor({
|
|
|
249
249
|
const { text, activityParams, setActivityParams } = config;
|
|
250
250
|
let compiledParams = activityParams || {};
|
|
251
251
|
if (setActivityParams) {
|
|
252
|
-
paramUtils_1.compileParams(config, compiledParams);
|
|
252
|
+
(0, paramUtils_1.compileParams)(config, compiledParams);
|
|
253
253
|
}
|
|
254
254
|
if (text) {
|
|
255
|
-
api.output(
|
|
255
|
+
api.output(null, {
|
|
256
256
|
"_cognigy": {
|
|
257
257
|
"_voiceGateway": {
|
|
258
258
|
"json": {
|
|
@@ -5,7 +5,7 @@ exports.sendMetaDataNode = void 0;
|
|
|
5
5
|
const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
6
6
|
/** Helper Modules */
|
|
7
7
|
const design_1 = require("../utils/design");
|
|
8
|
-
exports.sendMetaDataNode = createNodeDescriptor_1.createNodeDescriptor({
|
|
8
|
+
exports.sendMetaDataNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
9
9
|
type: "sendMetaData",
|
|
10
10
|
defaultLabel: "Send Meta Data",
|
|
11
11
|
summary: "Sends meta data via SIP INFO messages",
|
|
@@ -6,7 +6,7 @@ const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
|
6
6
|
/** Helper Modules */
|
|
7
7
|
const design_1 = require("../utils/design");
|
|
8
8
|
const paramUtils_1 = require("../utils/paramUtils");
|
|
9
|
-
exports.setSessionParamsNode = createNodeDescriptor_1.createNodeDescriptor({
|
|
9
|
+
exports.setSessionParamsNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
10
10
|
type: "setSessionParams",
|
|
11
11
|
defaultLabel: "Set Session Parameters",
|
|
12
12
|
summary: "Sets VG configuration settings for the session",
|
|
@@ -21,7 +21,7 @@ exports.setSessionParamsNode = createNodeDescriptor_1.createNodeDescriptor({
|
|
|
21
21
|
required: true
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
].concat(paramUtils_1.getParameterFields()),
|
|
24
|
+
].concat((0, paramUtils_1.getParameterFields)()),
|
|
25
25
|
sections: [
|
|
26
26
|
{
|
|
27
27
|
key: "advanced",
|
|
@@ -31,7 +31,7 @@ exports.setSessionParamsNode = createNodeDescriptor_1.createNodeDescriptor({
|
|
|
31
31
|
"sessionParams",
|
|
32
32
|
]
|
|
33
33
|
}
|
|
34
|
-
].concat(paramUtils_1.getParamSections()),
|
|
34
|
+
].concat((0, paramUtils_1.getParamSections)()),
|
|
35
35
|
appearance: {
|
|
36
36
|
color: design_1.nodeColor
|
|
37
37
|
},
|
|
@@ -51,7 +51,7 @@ exports.setSessionParamsNode = createNodeDescriptor_1.createNodeDescriptor({
|
|
|
51
51
|
const { api } = cognigy;
|
|
52
52
|
const { sessionParams } = config;
|
|
53
53
|
let compiledParams = sessionParams || {};
|
|
54
|
-
paramUtils_1.compileParams(config, compiledParams);
|
|
54
|
+
(0, paramUtils_1.compileParams)(config, compiledParams);
|
|
55
55
|
// output the activity to the voice gateway
|
|
56
56
|
api.output(null, {
|
|
57
57
|
"_cognigy": {
|
|
@@ -9,6 +9,7 @@ exports.getParamSections = exports.getParameterFields = exports.compileParams =
|
|
|
9
9
|
const compileParams = (config, compiledParams) => {
|
|
10
10
|
const EXCLUDEDKEYS = ["activityParams", "text", "setActivityParams", "sttContextBoostAzure", "sttContextBoost", "azureUseContextPhrases"];
|
|
11
11
|
Object.keys(config).forEach((key) => {
|
|
12
|
+
var _a;
|
|
12
13
|
if (EXCLUDEDKEYS.indexOf(key) === -1) {
|
|
13
14
|
if (!key.startsWith("dtmfCollect") || (key.startsWith("dtmfCollect") && config["dtmfCollect"])) {
|
|
14
15
|
switch (typeof config[key]) {
|
|
@@ -38,7 +39,7 @@ const compileParams = (config, compiledParams) => {
|
|
|
38
39
|
break;
|
|
39
40
|
case "number":
|
|
40
41
|
case "string":
|
|
41
|
-
if (config[key])
|
|
42
|
+
if (config[key] || ((_a = config[key]) === null || _a === void 0 ? void 0 : _a.toString()) === '0')
|
|
42
43
|
compiledParams[key] = config[key];
|
|
43
44
|
break;
|
|
44
45
|
case "boolean":
|
|
@@ -84,6 +85,13 @@ const getParameterFields = () => [
|
|
|
84
85
|
description: "Azure's Custom Speech model ID",
|
|
85
86
|
defaultValue: ""
|
|
86
87
|
},
|
|
88
|
+
{
|
|
89
|
+
key: "ttsDeploymentId",
|
|
90
|
+
type: "cognigyText",
|
|
91
|
+
label: "Azure TTS Deployment ID",
|
|
92
|
+
description: "Azure's Custom Speech model deployment ID",
|
|
93
|
+
defaultValue: ""
|
|
94
|
+
},
|
|
87
95
|
{
|
|
88
96
|
key: "azureEnableAudioLogging",
|
|
89
97
|
type: "toggle",
|
|
@@ -120,10 +128,10 @@ const getParameterFields = () => [
|
|
|
120
128
|
key: "bargeInMinWordCount",
|
|
121
129
|
type: "slider",
|
|
122
130
|
label: "Barge In Minimum Words",
|
|
123
|
-
description: "Defines the minimum number of words that the user must say for the Voice Gateway to consider it a barge
|
|
124
|
-
defaultValue:
|
|
131
|
+
description: "Defines the minimum number of words that the user must say for the Voice Gateway to consider it a barge in",
|
|
132
|
+
defaultValue: 1,
|
|
125
133
|
params: {
|
|
126
|
-
min:
|
|
134
|
+
min: 1,
|
|
127
135
|
max: 5,
|
|
128
136
|
step: 1,
|
|
129
137
|
},
|
|
@@ -181,7 +189,7 @@ const getParameterFields = () => [
|
|
|
181
189
|
key: "userNoInputRetries",
|
|
182
190
|
type: "number",
|
|
183
191
|
label: "No User Input Retries",
|
|
184
|
-
description: "Defines the maximum number of allowed timeouts for no user input",
|
|
192
|
+
description: "Defines the maximum number of allowed timeouts for no user input.",
|
|
185
193
|
defaultValue: 0,
|
|
186
194
|
},
|
|
187
195
|
{
|
|
@@ -191,6 +199,17 @@ const getParameterFields = () => [
|
|
|
191
199
|
description: "Send an data input to the Flow if there is no user input",
|
|
192
200
|
defaultValue: false,
|
|
193
201
|
},
|
|
202
|
+
{
|
|
203
|
+
key: "userNoInputAutoHangup",
|
|
204
|
+
type: "toggle",
|
|
205
|
+
label: "Hangup after all retries",
|
|
206
|
+
description: "Automatically hangup if there is still no user input after all retries",
|
|
207
|
+
defaultValue: false,
|
|
208
|
+
condition: {
|
|
209
|
+
key: "userNoInputSendEvent",
|
|
210
|
+
value: true
|
|
211
|
+
}
|
|
212
|
+
},
|
|
194
213
|
{
|
|
195
214
|
key: "userNoInputSpeech",
|
|
196
215
|
type: "cognigyText",
|
|
@@ -232,10 +251,14 @@ const getParameterFields = () => [
|
|
|
232
251
|
type: "number",
|
|
233
252
|
label: "Continuous ASR Timeout",
|
|
234
253
|
description: "Defines the automatic speech recognition (ASR) timeout (in milliseconds)",
|
|
235
|
-
defaultValue:
|
|
254
|
+
defaultValue: 3000,
|
|
236
255
|
condition: {
|
|
237
256
|
key: "continuousASR",
|
|
238
257
|
value: true
|
|
258
|
+
},
|
|
259
|
+
params: {
|
|
260
|
+
min: 500,
|
|
261
|
+
max: 60000
|
|
239
262
|
}
|
|
240
263
|
},
|
|
241
264
|
{
|
|
@@ -310,6 +333,9 @@ const getParameterFields = () => [
|
|
|
310
333
|
condition: {
|
|
311
334
|
key: "dtmfCollect",
|
|
312
335
|
value: true
|
|
336
|
+
},
|
|
337
|
+
params: {
|
|
338
|
+
min: 1
|
|
313
339
|
}
|
|
314
340
|
},
|
|
315
341
|
{
|
|
@@ -391,6 +417,7 @@ const getParamSections = (condition) => [
|
|
|
391
417
|
"azureUseContextPhrases",
|
|
392
418
|
"sttContextPhrasesAzure",
|
|
393
419
|
"sttContextBoostAzure",
|
|
420
|
+
"ttsDeploymentId",
|
|
394
421
|
"azureEnableAudioLogging",
|
|
395
422
|
],
|
|
396
423
|
condition
|
|
@@ -427,6 +454,7 @@ const getParamSections = (condition) => [
|
|
|
427
454
|
"userNoInputTimeoutMS",
|
|
428
455
|
"userNoInputRetries",
|
|
429
456
|
"userNoInputSendEvent",
|
|
457
|
+
"userNoInputAutoHangup",
|
|
430
458
|
"userNoInputSpeech",
|
|
431
459
|
"userNoInputUrl",
|
|
432
460
|
],
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cognigyVoiceGateway2Module = void 0;
|
|
4
|
+
/** Cognigy Modules */
|
|
5
|
+
const createNodeDescriptor_1 = require("../../createNodeDescriptor");
|
|
6
|
+
const dtmf_1 = require("./nodes/dtmf");
|
|
7
|
+
const hangup_1 = require("./nodes/hangup");
|
|
8
|
+
const play_1 = require("./nodes/play");
|
|
9
|
+
const refer_1 = require("./nodes/refer");
|
|
10
|
+
const transfer_1 = require("./nodes/transfer");
|
|
11
|
+
const setSessionConfig_1 = require("./nodes/setSessionConfig");
|
|
12
|
+
const sendMetadata_1 = require("./nodes/sendMetadata");
|
|
13
|
+
exports.cognigyVoiceGateway2Module = (0, createNodeDescriptor_1.createExtension)({
|
|
14
|
+
nodes: [
|
|
15
|
+
setSessionConfig_1.setSessionConfigNode,
|
|
16
|
+
dtmf_1.dtmfNode,
|
|
17
|
+
hangup_1.hangupNode,
|
|
18
|
+
play_1.playNode,
|
|
19
|
+
refer_1.referNode,
|
|
20
|
+
transfer_1.transferNode,
|
|
21
|
+
sendMetadata_1.sendMetadataNode
|
|
22
|
+
],
|
|
23
|
+
connections: []
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dtmfNode = void 0;
|
|
4
|
+
/** Custom Modules */
|
|
5
|
+
const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
6
|
+
/** Helper Modules */
|
|
7
|
+
const design_1 = require("../utils/design");
|
|
8
|
+
exports.dtmfNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
9
|
+
type: "dtmf",
|
|
10
|
+
defaultLabel: "DTMF",
|
|
11
|
+
summary: "Plays DTMF digits to the caller",
|
|
12
|
+
preview: {
|
|
13
|
+
key: "dtmf",
|
|
14
|
+
type: "text"
|
|
15
|
+
},
|
|
16
|
+
appearance: {
|
|
17
|
+
color: design_1.nodeColor
|
|
18
|
+
},
|
|
19
|
+
fields: [
|
|
20
|
+
{
|
|
21
|
+
key: "dtmf",
|
|
22
|
+
label: "Digit Sequence",
|
|
23
|
+
description: "Digit sequence to play to the caller",
|
|
24
|
+
type: "cognigyText",
|
|
25
|
+
params: {
|
|
26
|
+
required: true
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
key: "duration",
|
|
31
|
+
label: "Pause Time",
|
|
32
|
+
description: "Pause time in ms between digits",
|
|
33
|
+
type: "slider",
|
|
34
|
+
defaultValue: 500,
|
|
35
|
+
params: {
|
|
36
|
+
min: 500,
|
|
37
|
+
max: 1000,
|
|
38
|
+
step: 50
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
function: async ({ cognigy, config }) => {
|
|
43
|
+
const { api } = cognigy;
|
|
44
|
+
const { dtmf, duration } = config;
|
|
45
|
+
const voiceGateway2Payload = {
|
|
46
|
+
dtmf: {
|
|
47
|
+
dtmf,
|
|
48
|
+
duration
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
api.say(null, {
|
|
52
|
+
_cognigy: {
|
|
53
|
+
_voiceGateway2: {
|
|
54
|
+
json: voiceGateway2Payload
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=dtmf.js.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hangupNode = void 0;
|
|
4
|
+
/** Custom Modules */
|
|
5
|
+
const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
6
|
+
/** Helper Modules */
|
|
7
|
+
const constants_1 = require("../utils/constants");
|
|
8
|
+
const design_1 = require("../utils/design");
|
|
9
|
+
const hangup_mapper_1 = require("../../voice/mappers/hangup.mapper");
|
|
10
|
+
exports.hangupNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
11
|
+
type: "hangup",
|
|
12
|
+
defaultLabel: "Hang Up",
|
|
13
|
+
preview: {
|
|
14
|
+
key: "hangupReason",
|
|
15
|
+
type: "text"
|
|
16
|
+
},
|
|
17
|
+
appearance: {
|
|
18
|
+
color: design_1.nodeColor
|
|
19
|
+
},
|
|
20
|
+
summary: "Hangs up the call",
|
|
21
|
+
fields: [
|
|
22
|
+
{
|
|
23
|
+
key: "hangupReason",
|
|
24
|
+
label: "Reason for hang up",
|
|
25
|
+
type: "cognigyText",
|
|
26
|
+
defaultValue: "Bot ended the call",
|
|
27
|
+
params: {
|
|
28
|
+
required: true
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
function: async ({ cognigy, config }) => {
|
|
33
|
+
const { api } = cognigy;
|
|
34
|
+
const { hangupReason } = config;
|
|
35
|
+
try {
|
|
36
|
+
const payload = hangup_mapper_1.hangUp.handleInput(constants_1.ENDPOINTS.VOICE_GATEWAY, hangupReason);
|
|
37
|
+
api.say(null, {
|
|
38
|
+
_cognigy: payload
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
throw new Error(`Error on hangup node. Error message: ${error.message}`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
//# sourceMappingURL=hangup.js.map
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.playNode = void 0;
|
|
4
|
+
/** Custom Modules */
|
|
5
|
+
const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
6
|
+
/** Helper Modules */
|
|
7
|
+
const play_mapper_1 = require("../../voice/mappers/play.mapper");
|
|
8
|
+
const constants_1 = require("../utils/constants");
|
|
9
|
+
const design_1 = require("../utils/design");
|
|
10
|
+
const setSessionConfig_1 = require("./setSessionConfig");
|
|
11
|
+
exports.playNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
12
|
+
type: "play",
|
|
13
|
+
defaultLabel: "Play",
|
|
14
|
+
summary: "Streams a media file into the call with the ability to loop it",
|
|
15
|
+
preview: {
|
|
16
|
+
key: "url",
|
|
17
|
+
type: "text"
|
|
18
|
+
},
|
|
19
|
+
appearance: {
|
|
20
|
+
color: design_1.nodeColor
|
|
21
|
+
},
|
|
22
|
+
fields: [
|
|
23
|
+
{
|
|
24
|
+
key: "url",
|
|
25
|
+
label: "Media URL",
|
|
26
|
+
type: "cognigyText",
|
|
27
|
+
description: "You can use MP3 or WAV encoded files",
|
|
28
|
+
params: {
|
|
29
|
+
required: true
|
|
30
|
+
},
|
|
31
|
+
defaultValue: "https://www2.cs.uic.edu/~i101/SoundFiles/PinkPanther30.wav"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
key: "loop",
|
|
35
|
+
label: "Loop count",
|
|
36
|
+
description: "Number of times the media will be looped",
|
|
37
|
+
type: "number",
|
|
38
|
+
defaultValue: 1,
|
|
39
|
+
params: {
|
|
40
|
+
min: 1,
|
|
41
|
+
max: 10,
|
|
42
|
+
step: 1
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
key: "setActivityParams",
|
|
47
|
+
label: "Set Activity Parameters",
|
|
48
|
+
type: "toggle",
|
|
49
|
+
defaultValue: false
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
key: "activityParams",
|
|
53
|
+
label: "Other Activity Params",
|
|
54
|
+
type: "json",
|
|
55
|
+
defaultValue: "{}"
|
|
56
|
+
},
|
|
57
|
+
...setSessionConfig_1.voiceConfigFields
|
|
58
|
+
],
|
|
59
|
+
sections: [
|
|
60
|
+
{
|
|
61
|
+
key: "params_stt",
|
|
62
|
+
label: "Recognizer (STT)",
|
|
63
|
+
defaultCollapsed: true,
|
|
64
|
+
fields: ["sttLanguage", "sttVendor", "sttHints", "sttVadEnabled", "sttVadMode", "sttVadVoiceMs"],
|
|
65
|
+
condition: {
|
|
66
|
+
key: "setActivityParams",
|
|
67
|
+
value: true
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
key: "params_bargein",
|
|
72
|
+
label: "Barge In",
|
|
73
|
+
defaultCollapsed: true,
|
|
74
|
+
fields: ["bargeInOnSpeech", "bargeInOnDtmf", "bargeInMinWordCount"],
|
|
75
|
+
condition: {
|
|
76
|
+
key: "setActivityParams",
|
|
77
|
+
value: true
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
key: "params_dtmf",
|
|
82
|
+
label: "DTMF",
|
|
83
|
+
defaultCollapsed: true,
|
|
84
|
+
fields: ["dtmfEnable", "dtmfInterDigitTimeout", "dtmfMaxDigits", "dtmfMinDigits", "dtmfSubmitDigit"],
|
|
85
|
+
condition: {
|
|
86
|
+
key: "setActivityParams",
|
|
87
|
+
value: true
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
form: [
|
|
92
|
+
{ type: "field", key: "url" },
|
|
93
|
+
{ type: "field", key: "loop" },
|
|
94
|
+
{ type: "field", key: "setActivityParams" },
|
|
95
|
+
{ type: "section", key: "params_stt" },
|
|
96
|
+
{ type: "section", key: "params_bargein" },
|
|
97
|
+
{ type: "section", key: "params_dtmf" },
|
|
98
|
+
],
|
|
99
|
+
function: async ({ cognigy, config }) => {
|
|
100
|
+
const { api } = cognigy;
|
|
101
|
+
try {
|
|
102
|
+
const payload = play_mapper_1.play.handleInput(constants_1.ENDPOINTS.VOICE_GATEWAY, config);
|
|
103
|
+
api.say(null, {
|
|
104
|
+
_cognigy: payload
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
throw new Error(`Error on play node. Error message: ${error.message}`);
|
|
109
|
+
}
|
|
110
|
+
;
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
//# sourceMappingURL=play.js.map
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.referNode = void 0;
|
|
4
|
+
/** Custom Modules */
|
|
5
|
+
const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
6
|
+
/** Helper Modules */
|
|
7
|
+
const transfer_mapper_1 = require("../../voice/mappers/transfer.mapper");
|
|
8
|
+
const constants_1 = require("../utils/constants");
|
|
9
|
+
const design_1 = require("../utils/design");
|
|
10
|
+
const helper_1 = require("../utils/helper");
|
|
11
|
+
exports.referNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
12
|
+
type: "refer",
|
|
13
|
+
defaultLabel: "Refer",
|
|
14
|
+
summary: "Transfer the call to another target",
|
|
15
|
+
preview: {
|
|
16
|
+
key: "referTo",
|
|
17
|
+
type: "text"
|
|
18
|
+
},
|
|
19
|
+
appearance: {
|
|
20
|
+
color: design_1.nodeColor
|
|
21
|
+
},
|
|
22
|
+
constraints: {
|
|
23
|
+
placement: {},
|
|
24
|
+
creatable: false,
|
|
25
|
+
},
|
|
26
|
+
fields: [
|
|
27
|
+
{
|
|
28
|
+
key: "referTo",
|
|
29
|
+
label: "Target",
|
|
30
|
+
type: "text",
|
|
31
|
+
params: {
|
|
32
|
+
required: true
|
|
33
|
+
},
|
|
34
|
+
description: "E.164 syntax or a SIP URI are supported",
|
|
35
|
+
defaultValue: "+49176123456789"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
key: "useTransferSipHeaders",
|
|
39
|
+
label: "Custom Transfer SIP Headers",
|
|
40
|
+
type: "toggle",
|
|
41
|
+
description: "Add data to be sent as SIP headers in the generated SIP message",
|
|
42
|
+
defaultValue: false
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
key: "transferSipHeaders",
|
|
46
|
+
label: "Transfer SIP Headers",
|
|
47
|
+
type: "json",
|
|
48
|
+
description: "The data to be sent as SIP headers in the generated SIP message",
|
|
49
|
+
defaultValue: {
|
|
50
|
+
"X-Custom-Header": "YourValue"
|
|
51
|
+
},
|
|
52
|
+
condition: {
|
|
53
|
+
key: "useTransferSipHeaders",
|
|
54
|
+
value: true
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
sections: [
|
|
59
|
+
{
|
|
60
|
+
key: "advanced",
|
|
61
|
+
label: "Advanced",
|
|
62
|
+
defaultCollapsed: true,
|
|
63
|
+
fields: [
|
|
64
|
+
"useTransferSipHeaders",
|
|
65
|
+
"transferSipHeaders",
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
form: [
|
|
70
|
+
{
|
|
71
|
+
type: "field",
|
|
72
|
+
key: "referTo"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
type: "section",
|
|
76
|
+
key: "advanced"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
function: async ({ cognigy, config }) => {
|
|
80
|
+
const { api, input } = cognigy;
|
|
81
|
+
const { referTo, useTransferSipHeaders, transferSipHeaders } = config;
|
|
82
|
+
const transferParams = {
|
|
83
|
+
transferReason: '',
|
|
84
|
+
transferTarget: (0, helper_1.cleanTarget)(referTo),
|
|
85
|
+
useTransferSipHeaders,
|
|
86
|
+
transferSipHeaders
|
|
87
|
+
};
|
|
88
|
+
try {
|
|
89
|
+
const payload = transfer_mapper_1.transfer.handleInput(constants_1.ENDPOINTS.VOICE_GATEWAY, transferParams, false);
|
|
90
|
+
if (input.channel === "adminconsole") {
|
|
91
|
+
api.output('You are using the deprecated Refer Node. Please replace it with new Transfer Node in the Node Selection Menu.', null);
|
|
92
|
+
}
|
|
93
|
+
api.log('error', 'You are using the deprecated Refer Node. Please replace it with new Transfer Node in the Node Selection Menu.');
|
|
94
|
+
api.say(null, {
|
|
95
|
+
_cognigy: payload
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
throw new Error(`Error on Refer node. Error message: ${error.message}`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
//# sourceMappingURL=refer.js.map
|