@cognigy/rest-api-client 0.12.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/build/GenericAPIFn.js +3 -3
- package/build/GenericUploadFn.js +8 -5
- package/build/PluginBase.js +1 -1
- package/build/RestAPIClient.js +1 -1
- package/build/apigroups/AdministrationAPIGroup_2_0.js +53 -47
- package/build/apigroups/AnalyticsAPIGroup_2_0.js +1 -1
- package/build/apigroups/ExternalAPIGroup_2_0.js +5 -5
- package/build/apigroups/InsightsAPIGroup_2_0.js +17 -12
- 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 +238 -186
- package/build/apigroups/SessionsAPIGroup_2_0.js +7 -7
- package/build/authentication/ApiKey/ApiKeyAuthentication.js +1 -1
- package/build/authentication/AuthenticationAPI.js +2 -2
- package/build/authentication/BasicAuthentication/BasicAuthentication.js +2 -2
- package/build/authentication/OAuth2/IOAuth2ErrorResponse.js +1 -1
- package/build/authentication/OAuth2/OAuth2Authentication.js +34 -27
- 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/debugEvents/TSessionStateEmitParams.js → api/liveAgent/liveAgentInterfaces.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 +0 -0
- package/build/shared/charts/descriptors/{profile → analytics}/mergeProfile.js +2 -2
- package/build/shared/charts/descriptors/{profile → analytics}/overwriteAnalytics.js +6 -3
- package/build/shared/charts/descriptors/{profile → analytics}/requestRating.js +2 -2
- package/build/shared/charts/descriptors/{profile → analytics}/setRating.js +2 -2
- 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 +7 -1
- package/build/shared/charts/descriptors/apps/initAppSession.js +467 -12
- package/build/shared/charts/descriptors/apps/setAdaptiveCardAppState.js +79 -0
- package/build/shared/charts/descriptors/apps/setAppState.js +13 -15
- 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 +2 -2
- package/build/shared/charts/descriptors/connectionNodes/smtp/index.js +1 -1
- package/build/shared/charts/descriptors/connectionNodes/smtp/sendEmail.js +2 -2
- 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 +1 -1
- package/build/shared/charts/descriptors/index.js +25 -16
- 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 +1 -1
- package/build/shared/charts/descriptors/logic/if/else.js +1 -1
- package/build/shared/charts/descriptors/logic/if/if.js +1 -1
- package/build/shared/charts/descriptors/logic/if/then.js +1 -1
- package/build/shared/charts/descriptors/logic/interval/elseInterval.js +1 -1
- package/build/shared/charts/descriptors/logic/interval/interval.js +1 -1
- package/build/shared/charts/descriptors/logic/interval/onInterval.js +1 -1
- package/build/shared/charts/descriptors/logic/once/afterwards.js +1 -1
- package/build/shared/charts/descriptors/logic/once/onFirstExecution.js +1 -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 +1 -1
- 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 +1 -1
- package/build/shared/charts/descriptors/logic/switch/default.js +1 -1
- package/build/shared/charts/descriptors/logic/switch/switch.js +22 -8
- package/build/shared/charts/descriptors/logic/switchLocale.js +1 -1
- package/build/shared/charts/descriptors/logic/think.js +1 -1
- package/build/shared/charts/descriptors/logic/thinkV2.js +1 -1
- package/build/shared/charts/descriptors/logic/wait.js +1 -1
- package/build/shared/charts/descriptors/message/checkChannelChange/checkChannelChange.js +1 -1
- package/build/shared/charts/descriptors/message/checkChannelChange/onNo.js +1 -1
- package/build/shared/charts/descriptors/message/checkChannelChange/onYes.js +1 -1
- package/build/shared/charts/descriptors/message/checkChannelChange/unchanged.js +1 -1
- package/build/shared/charts/descriptors/message/datePicker.js +5 -5
- package/build/shared/charts/descriptors/message/question/onAnswer.js +1 -1
- package/build/shared/charts/descriptors/message/question/onQuestion.js +1 -1
- package/build/shared/charts/descriptors/message/question/optionalQuestion.js +2 -2
- package/build/shared/charts/descriptors/message/question/question.js +201 -24
- package/build/shared/charts/descriptors/message/question/utils/datepickerUtils.js +31 -2
- package/build/shared/charts/descriptors/message/question/utils/evaluateQuestionAnswer.js +4 -1
- package/build/shared/charts/descriptors/message/question/utils/questionHandover.js +13 -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 +1 -1
- package/build/shared/charts/descriptors/microsoft/index.js +1 -1
- package/build/shared/charts/descriptors/microsoft/invalidateToken.js +1 -1
- package/build/shared/charts/descriptors/microsoft/tokenStatus/index.js +1 -1
- package/build/shared/charts/descriptors/microsoft/tokenStatus/tokenGranted.js +1 -1
- package/build/shared/charts/descriptors/microsoft/tokenStatus/tokenNotGranted.js +1 -1
- package/build/shared/charts/descriptors/nlu/addLexiconKeyphrase.js +1 -1
- package/build/shared/charts/descriptors/nlu/executeCognigyNLU.js +18 -3
- package/build/shared/charts/descriptors/nlu/extractAnswer.js +1 -1
- package/build/shared/charts/descriptors/nlu/fuzzySearch.js +2 -2
- package/build/shared/charts/descriptors/nlu/matchPattern.js +13 -4
- package/build/shared/charts/descriptors/nlu/regexSlotFiller.js +1 -1
- package/build/shared/charts/descriptors/nlu/utils/patternMatcher.js +129 -61
- 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 +1 -1
- package/build/shared/charts/descriptors/service/handoverV2.js +66 -3
- package/build/shared/charts/descriptors/service/httpRequest.js +16 -5
- package/build/shared/charts/descriptors/service/index.js +3 -1
- package/build/shared/charts/descriptors/service/triggerFunction/onScheduled.js +1 -1
- package/build/shared/charts/descriptors/service/triggerFunction/onSchedulingError.js +1 -1
- package/build/shared/charts/descriptors/service/triggerFunction/triggerFunction.js +1 -1
- package/build/shared/charts/descriptors/start.js +1 -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 +1 -1
- package/build/shared/charts/descriptors/voicegateway/nodes/handover.js +18 -32
- package/build/shared/charts/descriptors/voicegateway/nodes/hangup.js +11 -20
- package/build/shared/charts/descriptors/voicegateway/nodes/playURL.js +14 -29
- package/build/shared/charts/descriptors/voicegateway/nodes/sendMessage.js +4 -4
- 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 +25 -5
- package/build/shared/charts/descriptors/voicegateway2/index.js +6 -2
- package/build/shared/charts/descriptors/voicegateway2/nodes/dtmf.js +9 -5
- package/build/shared/charts/descriptors/voicegateway2/nodes/hangup.js +17 -19
- package/build/shared/charts/descriptors/voicegateway2/nodes/play.js +19 -105
- package/build/shared/charts/descriptors/voicegateway2/nodes/refer.js +73 -14
- package/build/shared/charts/descriptors/voicegateway2/nodes/sendMetadata.js +64 -0
- package/build/shared/charts/descriptors/voicegateway2/nodes/setSessionConfig.js +95 -325
- 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/helper.js +39 -0
- package/build/shared/constants.js +3 -1
- package/build/shared/errors/baseError.js +2 -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/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/IOrganisation.js +21 -2
- package/build/shared/interfaces/IProfile.js +1 -1
- package/build/shared/interfaces/ISayNodeSettings.js +3 -0
- package/build/shared/interfaces/ai.js +0 -1
- package/build/shared/interfaces/amazonLexV2Interface.js +3 -0
- package/build/shared/interfaces/amqpInterface.js +1 -1
- package/build/shared/interfaces/analytics/IAnalyticsRating.js +13 -0
- package/build/shared/interfaces/analytics/IStepEvent.js +2 -0
- package/build/shared/interfaces/fileStorage.js +23 -0
- package/build/shared/interfaces/handover.js +74 -4
- package/build/shared/interfaces/journeys/IJourney.js +1 -1
- package/build/shared/interfaces/management/deleteOrganisation/deleteOrganisationTypes.js +3 -0
- package/build/shared/interfaces/messageAPI/analytics.js +3 -0
- package/build/shared/interfaces/messageAPI/endpoints.js +89 -3
- 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 +25 -2
- package/build/shared/interfaces/resources/IChart.js +2 -1
- package/build/shared/interfaces/resources/IChartNode.js +3 -2
- 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 +2 -0
- 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 +1 -1
- package/build/shared/interfaces/resources/ILexiconEntry.js +1 -1
- package/build/shared/interfaces/resources/INodeDescriptorSet.js +5 -1
- package/build/shared/interfaces/resources/IOrganisationDeletion.js +10 -0
- package/build/shared/interfaces/resources/IPlaybookRun.js +7 -7
- package/build/shared/interfaces/resources/IProject.js +14 -1
- package/build/shared/interfaces/resources/IRemoveDuplicatedSlotsAndUpdateLexionEntries.js +3 -0
- package/build/shared/interfaces/resources/TNLUConnectorType.js +1 -0
- package/build/shared/interfaces/resources/TRestChannelType.js +5 -0
- package/build/shared/interfaces/resources/TSocketChannelType.js +5 -5
- package/build/shared/interfaces/resources/TWebhookChannelType.js +10 -0
- package/build/shared/interfaces/resources/intent/IIntent.js +26 -8
- package/build/shared/interfaces/resources/intent/IIntentTrainGroup.js +19 -1
- package/build/shared/interfaces/resources/settings/IAgentSettings.js +47 -6
- 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/IUpdateCognigyLiveAgentInboxRest_2_0.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/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/publish/IPublishAnalyticsRestDataBody.js +4 -0
- package/build/shared/interfaces/restAPI/management/organisations/v2.0/IDeleteOrganisationRest_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/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/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/{flow/v2.0/intent → locales/v2.0/yesNoIntents}/ITrainYesNoIntentsRest_2_0.js +0 -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 +2 -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 +4 -0
- package/build/shared/interfaces/security/IRole.js +13 -1
- package/build/shared/interfaces/trainer/ITrainerRecord.js +1 -1
- package/build/shared/interfaces/user.js +1 -1
- package/package.json +40 -31
- package/types/index.d.ts +1734 -501
|
@@ -9,38 +9,36 @@ const createNodeDescriptor_1 = require("../../createNodeDescriptor");
|
|
|
9
9
|
* Purpose:
|
|
10
10
|
* Set the state of a Cognigy App Template.
|
|
11
11
|
*/
|
|
12
|
-
exports.SET_APP_STATE = createNodeDescriptor_1.createNodeDescriptor({
|
|
12
|
+
exports.SET_APP_STATE = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
13
13
|
type: "setAppState",
|
|
14
14
|
defaultLabel: "Set App State",
|
|
15
|
-
summary:
|
|
15
|
+
summary: "Set the state of an App Template.",
|
|
16
16
|
appearance: {
|
|
17
|
-
showIcon: false
|
|
17
|
+
showIcon: false,
|
|
18
18
|
},
|
|
19
19
|
fields: [
|
|
20
20
|
{
|
|
21
21
|
key: "appTemplateId",
|
|
22
|
-
type: "
|
|
22
|
+
type: "cognigyText",
|
|
23
23
|
label: "App Template",
|
|
24
|
+
description: "Select which App Template should be used",
|
|
24
25
|
params: {
|
|
25
|
-
required: true
|
|
26
|
-
}
|
|
26
|
+
required: true,
|
|
27
|
+
},
|
|
27
28
|
},
|
|
28
29
|
{
|
|
29
30
|
key: "appTemplateData",
|
|
30
|
-
type: "
|
|
31
|
+
type: "json",
|
|
31
32
|
label: "App Template Data",
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
description: "Select which data should be provided to the App Template",
|
|
34
|
+
defaultValue: "{}",
|
|
35
|
+
},
|
|
34
36
|
],
|
|
35
|
-
|
|
36
|
-
key: "key",
|
|
37
|
-
type: "text",
|
|
38
|
-
},
|
|
39
|
-
tags: ["basic"],
|
|
37
|
+
tags: ["basic", "apps"],
|
|
40
38
|
function: async ({ cognigy, config }) => {
|
|
41
39
|
const { api } = cognigy;
|
|
42
40
|
const { appTemplateId, appTemplateData } = config;
|
|
43
41
|
api.setAppState(appTemplateId, appTemplateData);
|
|
44
|
-
}
|
|
42
|
+
},
|
|
45
43
|
});
|
|
46
44
|
//# sourceMappingURL=setAppState.js.map
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SET_HTML_APP_STATE = void 0;
|
|
4
|
+
/* Custom modules */
|
|
5
|
+
const createNodeDescriptor_1 = require("../../createNodeDescriptor");
|
|
6
|
+
const getEasyHtmlValue = (body) => `<!DOCTYPE html>
|
|
7
|
+
<html lang="en">
|
|
8
|
+
<head>
|
|
9
|
+
<script>
|
|
10
|
+
var d=Object.defineProperty;var c=(a,e,s)=>e in a?d(a,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[e]=s;var t=(a,e,s)=>(c(a,typeof e!="symbol"?e+"":e,s),s);const u=a=>({__INTER_FRAME_SOCKET_MESSAGE:!0,appEvent:a}),l=(a,e)=>({type:a,payload:e}),h=a=>{var e;return!!((e=a.data)!=null&&e.__INTER_FRAME_SOCKET_MESSAGE)};class p{constructor(e,s){t(this,"unsubscribers",new Set);t(this,"emit",(e,s)=>{const n=l(e,s),o=u(n);this.targetWindow.postMessage(o,"*")});t(this,"on",(e,s)=>{const n=r=>{if(r.source===this.targetWindow&&!!h(r)&&r.data.appEvent.type===e)try{s(r.data.appEvent)}catch{}};this.sourceWindow.addEventListener("message",n);const o=()=>{this.sourceWindow.removeEventListener("message",n),this.unsubscribers.delete(o)};return this.unsubscribers.add(o),o});t(this,"once",(e,s)=>{const n=this.on(e,o=>{s(o),n()});return n});t(this,"cleanup",()=>{for(const e of this.unsubscribers)e()});this.sourceWindow=e,this.targetWindow=s}}class i{constructor(){t(this,"appTemplateData");t(this,"_ready",!1);t(this,"_loaded",!1);t(this,"_customReadyCheckRequested",!1);t(this,"_customReadyCheckDone",!1);t(this,"_appTemplateDataInitialized",!1);t(this,"socket",new p(window,window.parent));t(this,"sendReady",()=>{this._ready||(this.socket.emit("ready"),i.log("ready!"),this._ready=!0)});t(this,"doReadinessCheck",()=>{if(!this._ready){if(!this._appTemplateDataInitialized){i.log("not yet ready: initial app template data missing");return}if(!this._customReadyCheckRequested&&!this._loaded){i.log("not yet ready: page not loaded, yet");return}if(this._customReadyCheckRequested&&!this._customReadyCheckDone){i.log("not yet ready: custom readiness check not called");return}this.sendReady()}});t(this,"getCustomReadyHandler",()=>(i.log("switching to 'manual ready check'"),this._customReadyCheckRequested=!0,()=>{i.log("'manual ready check' done"),this._customReadyCheckDone=!0,this.doReadinessCheck()}));t(this,"onAppTemplateData",e=>this.socket.on("appTemplateData",s=>{e(s.payload)}));t(this,"getAppTemplateData",async()=>this._appTemplateDataInitialized?this.appTemplateData:new Promise(e=>{const s=this.onAppTemplateData(n=>{s(),e(n)})}));t(this,"submit",e=>{this.socket.emit("submit",e)});window.addEventListener("load",()=>{this._loaded=!0,this.doReadinessCheck()}),this.onAppTemplateData(e=>{this._appTemplateDataInitialized=!0,this.appTemplateData=e,i.log("received data from shell page",e),this.doReadinessCheck()}),this.socket.emit("sdk-loaded"),i.log("initialized")}static log(...e){console.log("[AppPageSDK]",...e)}}window.SDK=new i;
|
|
11
|
+
</script>
|
|
12
|
+
<script>
|
|
13
|
+
window.addEventListener("load", () => {
|
|
14
|
+
const form = document.querySelector('form');
|
|
15
|
+
form.onsubmit = e => {
|
|
16
|
+
e.preventDefault();
|
|
17
|
+
e.stopPropagation();
|
|
18
|
+
const formData = new FormData(form);
|
|
19
|
+
const values = [...formData.entries()].reduce((obj, [key, value]) => {
|
|
20
|
+
obj[key] = value;
|
|
21
|
+
return obj;
|
|
22
|
+
}, {});
|
|
23
|
+
|
|
24
|
+
SDK.submit(values);
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
</script>
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
${body}
|
|
31
|
+
</body>
|
|
32
|
+
</html>`;
|
|
33
|
+
const defaultBody = `<form>
|
|
34
|
+
<input
|
|
35
|
+
name="nickname"
|
|
36
|
+
placeholder="your nickname"
|
|
37
|
+
/>
|
|
38
|
+
<button>submit</button>
|
|
39
|
+
</form>`;
|
|
40
|
+
const defaultFullHTMLDocument = getEasyHtmlValue("");
|
|
41
|
+
/**
|
|
42
|
+
* Node name: 'setHTMLAppState'
|
|
43
|
+
*
|
|
44
|
+
* Purpose:
|
|
45
|
+
* Set the state of an HTML App.
|
|
46
|
+
*/
|
|
47
|
+
exports.SET_HTML_APP_STATE = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
48
|
+
type: "setHTMLAppState",
|
|
49
|
+
defaultLabel: "Set HTML App State",
|
|
50
|
+
summary: "Set the HTML Code of a Generic HTML App.",
|
|
51
|
+
appearance: {
|
|
52
|
+
showIcon: false,
|
|
53
|
+
},
|
|
54
|
+
fields: [
|
|
55
|
+
{
|
|
56
|
+
key: "mode",
|
|
57
|
+
type: "select",
|
|
58
|
+
label: "Content",
|
|
59
|
+
defaultValue: "body",
|
|
60
|
+
params: {
|
|
61
|
+
options: [
|
|
62
|
+
{
|
|
63
|
+
label: "HTML Body only",
|
|
64
|
+
value: "body",
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
label: "Full HTML Document",
|
|
68
|
+
value: "full",
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
key: "html",
|
|
75
|
+
type: "xml",
|
|
76
|
+
label: "HTML Document",
|
|
77
|
+
defaultValue: defaultFullHTMLDocument,
|
|
78
|
+
condition: {
|
|
79
|
+
key: "mode",
|
|
80
|
+
value: "body",
|
|
81
|
+
negate: true,
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
key: "body",
|
|
86
|
+
type: "xml",
|
|
87
|
+
label: "HTML Body",
|
|
88
|
+
defaultValue: defaultBody,
|
|
89
|
+
condition: {
|
|
90
|
+
key: "mode",
|
|
91
|
+
value: "body",
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
tags: ["basic", "apps"],
|
|
96
|
+
function: async ({ cognigy, config }) => {
|
|
97
|
+
const { api } = cognigy;
|
|
98
|
+
const { html, body, mode } = config;
|
|
99
|
+
const htmlDocument = (() => {
|
|
100
|
+
if (mode !== "full") {
|
|
101
|
+
return getEasyHtmlValue(body);
|
|
102
|
+
}
|
|
103
|
+
return html;
|
|
104
|
+
})();
|
|
105
|
+
api.setAppState("generic-html", { html: htmlDocument });
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
//# sourceMappingURL=setHtmlAppState.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AMAZON_STORAGE_PROVIDER_CONNECTION = void 0;
|
|
4
|
+
exports.AMAZON_STORAGE_PROVIDER_CONNECTION = {
|
|
5
|
+
type: "AmazonStorageProvider",
|
|
6
|
+
label: "A Connection to an Amazon S3 Bucket",
|
|
7
|
+
fields: [
|
|
8
|
+
{ fieldName: "accessKeyId" },
|
|
9
|
+
{ fieldName: "secretAccessKey" },
|
|
10
|
+
{ fieldName: "region" },
|
|
11
|
+
{ fieldName: "bucketName" },
|
|
12
|
+
]
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=amazonStorageProviderConnection.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AZURE_BLOB_STORAGE_PROVIDER_CONNECTION = void 0;
|
|
4
|
+
exports.AZURE_BLOB_STORAGE_PROVIDER_CONNECTION = {
|
|
5
|
+
type: "AzureBlobStorageProvider",
|
|
6
|
+
label: "A Connection to a Azure Blob Storage Container",
|
|
7
|
+
fields: [
|
|
8
|
+
{ fieldName: "containerName" },
|
|
9
|
+
{ fieldName: "account" },
|
|
10
|
+
{ fieldName: "accountKey" },
|
|
11
|
+
]
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=azureBlobStorageProviderConnection.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GOOGLE_CLOUD_STORAGE_PROVIDER_CONNECTION = void 0;
|
|
4
|
+
exports.GOOGLE_CLOUD_STORAGE_PROVIDER_CONNECTION = {
|
|
5
|
+
type: "GoogleCloudStorageProvider",
|
|
6
|
+
label: "A Connection to a Google Cloud Storage Bucket",
|
|
7
|
+
fields: [
|
|
8
|
+
{ fieldName: "bucketName" },
|
|
9
|
+
{ fieldName: "clientEmail" },
|
|
10
|
+
{ fieldName: "privateKey" },
|
|
11
|
+
]
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=googleCloudStorageProviderConnection.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cognigyInternalStorageProviderModule = exports.GOOGLE_CLOUD_STORAGE_PROVIDER_CONNECTION = exports.AZURE_BLOB_STORAGE_PROVIDER_CONNECTION = exports.AMAZON_STORAGE_PROVIDER_CONNECTION = void 0;
|
|
4
|
+
/* Custom modules */
|
|
5
|
+
const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
6
|
+
const amazonStorageProviderConnection_1 = require("./amazonStorageProviderConnection");
|
|
7
|
+
const azureBlobStorageProviderConnection_1 = require("./azureBlobStorageProviderConnection");
|
|
8
|
+
const googleCloudStorageProviderConnection_1 = require("./googleCloudStorageProviderConnection");
|
|
9
|
+
var amazonStorageProviderConnection_2 = require("./amazonStorageProviderConnection");
|
|
10
|
+
Object.defineProperty(exports, "AMAZON_STORAGE_PROVIDER_CONNECTION", { enumerable: true, get: function () { return amazonStorageProviderConnection_2.AMAZON_STORAGE_PROVIDER_CONNECTION; } });
|
|
11
|
+
var azureBlobStorageProviderConnection_2 = require("./azureBlobStorageProviderConnection");
|
|
12
|
+
Object.defineProperty(exports, "AZURE_BLOB_STORAGE_PROVIDER_CONNECTION", { enumerable: true, get: function () { return azureBlobStorageProviderConnection_2.AZURE_BLOB_STORAGE_PROVIDER_CONNECTION; } });
|
|
13
|
+
var googleCloudStorageProviderConnection_2 = require("./googleCloudStorageProviderConnection");
|
|
14
|
+
Object.defineProperty(exports, "GOOGLE_CLOUD_STORAGE_PROVIDER_CONNECTION", { enumerable: true, get: function () { return googleCloudStorageProviderConnection_2.GOOGLE_CLOUD_STORAGE_PROVIDER_CONNECTION; } });
|
|
15
|
+
exports.cognigyInternalStorageProviderModule = (0, createNodeDescriptor_1.createExtension)({
|
|
16
|
+
nodes: [],
|
|
17
|
+
connections: [
|
|
18
|
+
amazonStorageProviderConnection_1.AMAZON_STORAGE_PROVIDER_CONNECTION,
|
|
19
|
+
azureBlobStorageProviderConnection_1.AZURE_BLOB_STORAGE_PROVIDER_CONNECTION,
|
|
20
|
+
googleCloudStorageProviderConnection_1.GOOGLE_CLOUD_STORAGE_PROVIDER_CONNECTION,
|
|
21
|
+
]
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -5,7 +5,7 @@ exports.MONGO_AGGREGATE = void 0;
|
|
|
5
5
|
const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
6
6
|
const mongoDBConnection_1 = require("./mongoDBConnection");
|
|
7
7
|
const errors_1 = require("../../../../errors");
|
|
8
|
-
exports.MONGO_AGGREGATE = createNodeDescriptor_1.createNodeDescriptor({
|
|
8
|
+
exports.MONGO_AGGREGATE = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
9
9
|
type: "mongoAggregate",
|
|
10
10
|
defaultLabel: 'MongoDB Aggregate',
|
|
11
11
|
summary: "Runs a MongoDB aggregate operation and stores the result",
|
|
@@ -5,7 +5,7 @@ exports.MONGO_FIND = void 0;
|
|
|
5
5
|
const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
6
6
|
const mongoDBConnection_1 = require("./mongoDBConnection");
|
|
7
7
|
const errors_1 = require("../../../../errors");
|
|
8
|
-
exports.MONGO_FIND = createNodeDescriptor_1.createNodeDescriptor({
|
|
8
|
+
exports.MONGO_FIND = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
9
9
|
type: "mongoFind",
|
|
10
10
|
defaultLabel: 'Find',
|
|
11
11
|
summary: "Runs a MongoDB find operation and stores the result",
|
|
@@ -5,7 +5,7 @@ exports.MONGO_FIND_ONE = void 0;
|
|
|
5
5
|
const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
6
6
|
const mongoDBConnection_1 = require("./mongoDBConnection");
|
|
7
7
|
const errors_1 = require("../../../../errors");
|
|
8
|
-
exports.MONGO_FIND_ONE = createNodeDescriptor_1.createNodeDescriptor({
|
|
8
|
+
exports.MONGO_FIND_ONE = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
9
9
|
type: "mongoFindOne",
|
|
10
10
|
defaultLabel: 'Find One',
|
|
11
11
|
summary: "Runs a MongoDB findone operation and stores the result",
|
|
@@ -11,7 +11,7 @@ const updateMany_1 = require("./updateMany");
|
|
|
11
11
|
const remove_1 = require("./remove");
|
|
12
12
|
const aggregate_1 = require("./aggregate");
|
|
13
13
|
const mongoDBConnection_1 = require("./mongoDBConnection");
|
|
14
|
-
exports.cognigyMongoDBModule = createNodeDescriptor_1.createExtension({
|
|
14
|
+
exports.cognigyMongoDBModule = (0, createNodeDescriptor_1.createExtension)({
|
|
15
15
|
nodes: [
|
|
16
16
|
find_1.MONGO_FIND,
|
|
17
17
|
findOne_1.MONGO_FIND_ONE,
|
|
@@ -5,7 +5,7 @@ exports.MONGO_INSERT = void 0;
|
|
|
5
5
|
const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
6
6
|
const mongoDBConnection_1 = require("./mongoDBConnection");
|
|
7
7
|
const errors_1 = require("../../../../errors");
|
|
8
|
-
exports.MONGO_INSERT = createNodeDescriptor_1.createNodeDescriptor({
|
|
8
|
+
exports.MONGO_INSERT = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
9
9
|
type: "mongoInsert",
|
|
10
10
|
defaultLabel: 'Insert',
|
|
11
11
|
summary: "Runs a MongoDB insert operation",
|
|
@@ -5,7 +5,7 @@ exports.MONGO_REMOVE = void 0;
|
|
|
5
5
|
const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
6
6
|
const mongoDBConnection_1 = require("./mongoDBConnection");
|
|
7
7
|
const errors_1 = require("../../../../errors");
|
|
8
|
-
exports.MONGO_REMOVE = createNodeDescriptor_1.createNodeDescriptor({
|
|
8
|
+
exports.MONGO_REMOVE = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
9
9
|
type: "mongoRemove",
|
|
10
10
|
defaultLabel: 'Remove',
|
|
11
11
|
summary: "Runs a MongoDB remove operation",
|
|
@@ -5,7 +5,7 @@ exports.MONGO_UPDATE_MANY = void 0;
|
|
|
5
5
|
const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
6
6
|
const mongoDBConnection_1 = require("./mongoDBConnection");
|
|
7
7
|
const errors_1 = require("../../../../errors");
|
|
8
|
-
exports.MONGO_UPDATE_MANY = createNodeDescriptor_1.createNodeDescriptor({
|
|
8
|
+
exports.MONGO_UPDATE_MANY = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
9
9
|
type: "mongoUpdateMany",
|
|
10
10
|
defaultLabel: 'Update Many',
|
|
11
11
|
summary: "Runs a MongoDB updatemany operation and stores the result",
|
|
@@ -5,7 +5,7 @@ exports.MONGO_UPDATE_ONE = void 0;
|
|
|
5
5
|
const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
6
6
|
const mongoDBConnection_1 = require("./mongoDBConnection");
|
|
7
7
|
const errors_1 = require("../../../../errors");
|
|
8
|
-
exports.MONGO_UPDATE_ONE = createNodeDescriptor_1.createNodeDescriptor({
|
|
8
|
+
exports.MONGO_UPDATE_ONE = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
9
9
|
type: "mongoUpdateOne",
|
|
10
10
|
defaultLabel: 'Update One',
|
|
11
11
|
summary: "Runs a MongoDB updateone operation and stores the result",
|
|
@@ -5,7 +5,7 @@ exports.EMAIL_NOTIFICATION = exports.EMAIL_NOTIFICATION_ERROR = void 0;
|
|
|
5
5
|
const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
6
6
|
const errors_1 = require("../../../../errors");
|
|
7
7
|
exports.EMAIL_NOTIFICATION_ERROR = "Email Notifcations have not yet been configured for this environment. Please contact your system administrator to enable this feature";
|
|
8
|
-
exports.EMAIL_NOTIFICATION = createNodeDescriptor_1.createNodeDescriptor({
|
|
8
|
+
exports.EMAIL_NOTIFICATION = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
9
9
|
type: "emailNotification",
|
|
10
10
|
defaultLabel: "Email Notification",
|
|
11
11
|
summary: "Sends an email via default SMTP configurations",
|
|
@@ -172,7 +172,7 @@ exports.EMAIL_NOTIFICATION = createNodeDescriptor_1.createNodeDescriptor({
|
|
|
172
172
|
key: "recipient",
|
|
173
173
|
type: "text"
|
|
174
174
|
},
|
|
175
|
-
tags: ["data", "service", "mail", "email"
|
|
175
|
+
tags: ["data", "service", "mail", "email"],
|
|
176
176
|
function: async ({ cognigy, config, nodeId, childConfigs }) => {
|
|
177
177
|
const { api } = cognigy;
|
|
178
178
|
const { recipient, message, storeLocation, inputKey, contextKey, stopOnError } = config;
|
|
@@ -7,7 +7,7 @@ const sendEmail_1 = require("./sendEmail");
|
|
|
7
7
|
const emailNotification_1 = require("./emailNotification");
|
|
8
8
|
const smtpConnection_1 = require("./smtpConnection");
|
|
9
9
|
const serviceConnection_1 = require("./serviceConnection");
|
|
10
|
-
exports.cognigySMTPModule = createNodeDescriptor_1.createExtension({
|
|
10
|
+
exports.cognigySMTPModule = (0, createNodeDescriptor_1.createExtension)({
|
|
11
11
|
nodes: [
|
|
12
12
|
sendEmail_1.SEND_EMAIL,
|
|
13
13
|
emailNotification_1.EMAIL_NOTIFICATION
|
|
@@ -6,7 +6,7 @@ const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
|
6
6
|
const errors_1 = require("../../../../errors");
|
|
7
7
|
const smtpConnection_1 = require("./smtpConnection");
|
|
8
8
|
const serviceConnection_1 = require("./serviceConnection");
|
|
9
|
-
exports.SEND_EMAIL = createNodeDescriptor_1.createNodeDescriptor({
|
|
9
|
+
exports.SEND_EMAIL = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
10
10
|
type: "sendEmail",
|
|
11
11
|
defaultLabel: "Send SMTP Email",
|
|
12
12
|
summary: "Sends an email via SMTP",
|
|
@@ -444,7 +444,7 @@ Hello world!`,
|
|
|
444
444
|
key: "recipient",
|
|
445
445
|
type: "text"
|
|
446
446
|
},
|
|
447
|
-
tags: ["data", "service", "mail", "email"
|
|
447
|
+
tags: ["data", "service", "mail", "email"],
|
|
448
448
|
function: async ({ cognigy, config, nodeId, childConfigs }) => {
|
|
449
449
|
const { api } = cognigy;
|
|
450
450
|
const { connection, serviceConnection, recipient, subject, message, storeLocation, inputKey, contextKey, stopOnError } = config;
|
|
@@ -7,7 +7,7 @@ const runQuery_1 = require("./runQuery");
|
|
|
7
7
|
const runTransaction_1 = require("./runTransaction");
|
|
8
8
|
const runStoredProcedure_1 = require("./runStoredProcedure");
|
|
9
9
|
const sqlConnection_1 = require("./sqlConnection");
|
|
10
|
-
exports.cognigySQLModule = createNodeDescriptor_1.createExtension({
|
|
10
|
+
exports.cognigySQLModule = (0, createNodeDescriptor_1.createExtension)({
|
|
11
11
|
nodes: [
|
|
12
12
|
runQuery_1.SQL_RUN_QUERY,
|
|
13
13
|
runStoredProcedure_1.SQL_RUN_STORED_PROCEDURE,
|
|
@@ -5,7 +5,7 @@ exports.SQL_RUN_QUERY = void 0;
|
|
|
5
5
|
const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
6
6
|
const errors_1 = require("../../../../errors");
|
|
7
7
|
const sqlConnection_1 = require("./sqlConnection");
|
|
8
|
-
exports.SQL_RUN_QUERY = createNodeDescriptor_1.createNodeDescriptor({
|
|
8
|
+
exports.SQL_RUN_QUERY = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
9
9
|
type: "sqlRunQuery",
|
|
10
10
|
defaultLabel: 'Run SQL Query',
|
|
11
11
|
summary: "Runs a query on SQL Server",
|
|
@@ -5,7 +5,7 @@ exports.SQL_RUN_STORED_PROCEDURE = void 0;
|
|
|
5
5
|
const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
6
6
|
const errors_1 = require("../../../../errors");
|
|
7
7
|
const sqlConnection_1 = require("./sqlConnection");
|
|
8
|
-
exports.SQL_RUN_STORED_PROCEDURE = createNodeDescriptor_1.createNodeDescriptor({
|
|
8
|
+
exports.SQL_RUN_STORED_PROCEDURE = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
9
9
|
type: "sqlRunStoredProcedure",
|
|
10
10
|
defaultLabel: "Run StoredProcedure",
|
|
11
11
|
summary: "Runs a stored procedure on SQL Server",
|
|
@@ -5,7 +5,7 @@ exports.SQL_RUN_TRANSACTION = void 0;
|
|
|
5
5
|
const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
6
6
|
const errors_1 = require("../../../../errors");
|
|
7
7
|
const sqlConnection_1 = require("./sqlConnection");
|
|
8
|
-
exports.SQL_RUN_TRANSACTION = createNodeDescriptor_1.createNodeDescriptor({
|
|
8
|
+
exports.SQL_RUN_TRANSACTION = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
9
9
|
type: "sqlRunTransaction",
|
|
10
10
|
defaultLabel: "Run Transaction",
|
|
11
11
|
summary: "Runs a transaction on SQL Server",
|
|
@@ -9,7 +9,7 @@ const createNodeDescriptor_1 = require("../../createNodeDescriptor");
|
|
|
9
9
|
* Purpose:
|
|
10
10
|
* Adds a new value to the Cognigy context object.
|
|
11
11
|
*/
|
|
12
|
-
exports.ADD_TO_CONTEXT = createNodeDescriptor_1.createNodeDescriptor({
|
|
12
|
+
exports.ADD_TO_CONTEXT = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
13
13
|
type: "addToContext",
|
|
14
14
|
defaultLabel: "Add To Context",
|
|
15
15
|
summary: 'Adds a new value to the Context',
|
|
@@ -9,7 +9,7 @@ const createNodeDescriptor_1 = require("../../createNodeDescriptor");
|
|
|
9
9
|
* Purpose:
|
|
10
10
|
* Executes custom TypeScript code
|
|
11
11
|
*/
|
|
12
|
-
exports.CODE = createNodeDescriptor_1.createNodeDescriptor({
|
|
12
|
+
exports.CODE = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
13
13
|
type: "code",
|
|
14
14
|
defaultLabel: "Code",
|
|
15
15
|
summary: 'Executes custom TypeScript/JavaScript code',
|
|
@@ -9,7 +9,7 @@ const createNodeDescriptor_1 = require("../../createNodeDescriptor");
|
|
|
9
9
|
* Purpose:
|
|
10
10
|
* Takes all data inputs and copies them to the context
|
|
11
11
|
*/
|
|
12
|
-
exports.COPY_DATA_TO_CONTEXT = createNodeDescriptor_1.createNodeDescriptor({
|
|
12
|
+
exports.COPY_DATA_TO_CONTEXT = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
13
13
|
type: "copyDataToContext",
|
|
14
14
|
defaultLabel: "Copy Data To Context",
|
|
15
15
|
summary: 'Takes all data inputs and copies them to the context',
|
|
@@ -13,7 +13,7 @@ const createNodeDescriptor_1 = require("../../createNodeDescriptor");
|
|
|
13
13
|
* @param mode what mode to execute. Array adds the value to an array
|
|
14
14
|
* @param useNeg if true, positive elements will be added, negative elements will be deleted
|
|
15
15
|
*/
|
|
16
|
-
exports.COPY_SLOTS_TO_CONTEXT = createNodeDescriptor_1.createNodeDescriptor({
|
|
16
|
+
exports.COPY_SLOTS_TO_CONTEXT = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
17
17
|
type: "copySlotsToContext",
|
|
18
18
|
defaultLabel: "Copy Slots To Context",
|
|
19
19
|
summary: 'Moves Slots to the Context',
|
|
@@ -9,7 +9,7 @@ const createNodeDescriptor_1 = require("../../createNodeDescriptor");
|
|
|
9
9
|
* Purpose:
|
|
10
10
|
* Writes a message to the Agent Logs
|
|
11
11
|
*/
|
|
12
|
-
exports.LOG = createNodeDescriptor_1.createNodeDescriptor({
|
|
12
|
+
exports.LOG = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
13
13
|
type: "log",
|
|
14
14
|
defaultLabel: "Log Message",
|
|
15
15
|
summary: "Writes a message into the agent logs",
|
|
@@ -9,7 +9,7 @@ const createNodeDescriptor_1 = require("../../createNodeDescriptor");
|
|
|
9
9
|
* Purpose:
|
|
10
10
|
* Removes a context variable
|
|
11
11
|
*/
|
|
12
|
-
exports.REMOVE_FROM_CONTEXT = createNodeDescriptor_1.createNodeDescriptor({
|
|
12
|
+
exports.REMOVE_FROM_CONTEXT = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
13
13
|
type: "removeFromContext",
|
|
14
14
|
defaultLabel: "Remove From Context",
|
|
15
15
|
summary: 'Removes a variable from the Context',
|
|
@@ -9,7 +9,7 @@ const createNodeDescriptor_1 = require("../../createNodeDescriptor");
|
|
|
9
9
|
* Purpose:
|
|
10
10
|
* Resets the context of the current brain to default
|
|
11
11
|
*/
|
|
12
|
-
exports.RESET_CONTEXT = createNodeDescriptor_1.createNodeDescriptor({
|
|
12
|
+
exports.RESET_CONTEXT = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
13
13
|
type: "resetContext",
|
|
14
14
|
defaultLabel: "Reset Context",
|
|
15
15
|
summary: "Resets the Context to the default Context",
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.END = void 0;
|
|
4
4
|
/* Custom modules */
|
|
5
5
|
const createNodeDescriptor_1 = require("../createNodeDescriptor");
|
|
6
|
-
exports.END = createNodeDescriptor_1.createNodeDescriptor({
|
|
6
|
+
exports.END = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
7
7
|
type: "end",
|
|
8
8
|
defaultLabel: "End",
|
|
9
9
|
appearance: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cognigyVoiceGateway2Module = exports.cognigyMicrosoftModule = exports.cognigyVoiceGatewayModule = exports.cognigySMTPModule = exports.cognigySQLModule = exports.cognigyMongoDBModule = exports.cognigyBasicModule = void 0;
|
|
3
|
+
exports.cognigyInternalStorageProviderModule = exports.cognigyVoiceGateway2Module = exports.cognigyMicrosoftModule = exports.cognigyVoiceGatewayModule = exports.cognigySMTPModule = exports.cognigySQLModule = exports.cognigyMongoDBModule = exports.cognigyBasicModule = void 0;
|
|
4
4
|
/* Custom modules */
|
|
5
5
|
const createNodeDescriptor_1 = require("../createNodeDescriptor");
|
|
6
6
|
/* Nodes */
|
|
@@ -11,9 +11,11 @@ const data_1 = require("./data");
|
|
|
11
11
|
const logic_1 = require("./logic");
|
|
12
12
|
const message_1 = require("./message");
|
|
13
13
|
const nlu_1 = require("./nlu");
|
|
14
|
-
const
|
|
14
|
+
const voice_1 = require("./voice");
|
|
15
|
+
const analytics_1 = require("./analytics");
|
|
15
16
|
const service_1 = require("./service");
|
|
16
17
|
const apps_1 = require("./apps");
|
|
18
|
+
const liveAgent_1 = require("./liveAgent");
|
|
17
19
|
// import { REQUIRED_FIELDS } from "./requiredFields";
|
|
18
20
|
// import { ALL_FIELDS } from "./allFields";
|
|
19
21
|
const nodes = [
|
|
@@ -51,14 +53,12 @@ const nodes = [
|
|
|
51
53
|
logic_1.SWITCH_LOCALE,
|
|
52
54
|
logic_1.SET_TRANSLATION,
|
|
53
55
|
message_1.SAY,
|
|
54
|
-
//SEND_IMAGE,
|
|
55
56
|
message_1.SEND_TEXT,
|
|
56
57
|
message_1.DATE_PICKER,
|
|
57
58
|
message_1.OPTIONAL_QUESTION,
|
|
58
59
|
message_1.QUESTION,
|
|
59
60
|
message_1.ON_ANSWER,
|
|
60
61
|
message_1.ON_QUESTION,
|
|
61
|
-
//CHECK_CHANNEL_CHANGE,
|
|
62
62
|
message_1.ON_NO,
|
|
63
63
|
message_1.ON_YES,
|
|
64
64
|
message_1.UNCHANGED,
|
|
@@ -67,16 +67,17 @@ const nodes = [
|
|
|
67
67
|
nlu_1.ADD_LEXICON_KEYPHRASE,
|
|
68
68
|
nlu_1.FUZZY_SEARCH,
|
|
69
69
|
nlu_1.MATCH_PATTERN,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
70
|
+
analytics_1.ACTIVATE_PROFILE,
|
|
71
|
+
analytics_1.COMPLETE_GOAL,
|
|
72
|
+
analytics_1.DEACTIVATE_PROFILE,
|
|
73
|
+
analytics_1.DELETE_PROFILE,
|
|
74
|
+
analytics_1.MERGE_PROFILE,
|
|
75
|
+
analytics_1.UPDATE_PROFILE,
|
|
76
|
+
analytics_1.BLIND_MODE,
|
|
77
|
+
analytics_1.OVERWRITE_ANALYTICS,
|
|
78
78
|
service_1.HANDOVER,
|
|
79
79
|
service_1.HANDOVER_V2,
|
|
80
|
+
service_1.CHECK_AGENT_AVAILABILITY,
|
|
80
81
|
service_1.HTTP_REQUEST,
|
|
81
82
|
service_1.TRIGGER_FUNCTION,
|
|
82
83
|
service_1.ON_SCHEDULING_ERROR,
|
|
@@ -86,23 +87,29 @@ const nodes = [
|
|
|
86
87
|
logic_1.ENABLE_SLOT_FILLERS,
|
|
87
88
|
logic_1.DISABLE_SLOT_FILLERS,
|
|
88
89
|
];
|
|
90
|
+
if (process.env.FEATURE_USE_COGNIGY_LIVE_AGENT === "true") {
|
|
91
|
+
nodes.push(liveAgent_1.ASSIST_INFO);
|
|
92
|
+
}
|
|
89
93
|
if (process.env.FEATURE_USE_COGNIGY_APPS === "true") {
|
|
90
|
-
nodes.push(apps_1.INIT_APP_SESSION, apps_1.SET_APP_STATE);
|
|
94
|
+
nodes.push(apps_1.INIT_APP_SESSION, apps_1.SET_APP_STATE, apps_1.GET_APP_SESSION_PIN, apps_1.SET_HTML_APP_STATE, apps_1.SET_ADAPTIVE_CARD_APP_STATE);
|
|
95
|
+
}
|
|
96
|
+
if (process.env.FEATURE_TMP_ENABLE_GENERIC_VOICE_NODES === "true") {
|
|
97
|
+
nodes.push(voice_1.HANG_UP, voice_1.PLAY, voice_1.TRANSFER_VOICE, voice_1.BARGE_IN, voice_1.CONTINUOUS_ASR, voice_1.DTMF, voice_1.USER_INPUT_TIMEOUT, voice_1.SESSION_SPEECH_PARAMETERS);
|
|
91
98
|
}
|
|
92
99
|
if (process.env.FEATURE_DISABLE_INSIGHTS !== "true") {
|
|
93
|
-
nodes.push(
|
|
100
|
+
nodes.push(analytics_1.SET_RATING, analytics_1.REQUEST_RATING);
|
|
94
101
|
}
|
|
95
102
|
if (process.env.FEATURE_ENABLE_EXTRACT_ANSWER === "true") {
|
|
96
103
|
nodes.push(nlu_1.EXTRACT_ANSWER);
|
|
97
104
|
}
|
|
98
|
-
exports.cognigyBasicModule = createNodeDescriptor_1.createExtension({
|
|
105
|
+
exports.cognigyBasicModule = (0, createNodeDescriptor_1.createExtension)({
|
|
99
106
|
nodes,
|
|
100
107
|
connections: [
|
|
101
108
|
service_1.HTTP_CONNECTION_BASIC,
|
|
102
109
|
service_1.HTTP_CONNECTION_APIKEYAUTHKEY,
|
|
103
110
|
service_1.HTTP_CONNECTION_APIKEYXKEY,
|
|
104
111
|
service_1.HTTP_CONNECTION_OAUTH2,
|
|
105
|
-
]
|
|
112
|
+
],
|
|
106
113
|
});
|
|
107
114
|
var mongoDB_1 = require("./connectionNodes/mongoDB");
|
|
108
115
|
Object.defineProperty(exports, "cognigyMongoDBModule", { enumerable: true, get: function () { return mongoDB_1.cognigyMongoDBModule; } });
|
|
@@ -116,4 +123,6 @@ var microsoft_1 = require("./microsoft");
|
|
|
116
123
|
Object.defineProperty(exports, "cognigyMicrosoftModule", { enumerable: true, get: function () { return microsoft_1.cognigyMicrosoftModule; } });
|
|
117
124
|
var voicegateway2_1 = require("./voicegateway2");
|
|
118
125
|
Object.defineProperty(exports, "cognigyVoiceGateway2Module", { enumerable: true, get: function () { return voicegateway2_1.cognigyVoiceGateway2Module; } });
|
|
126
|
+
var internalStorageProviders_1 = require("./connectionNodes/internalStorageProviders");
|
|
127
|
+
Object.defineProperty(exports, "cognigyInternalStorageProviderModule", { enumerable: true, get: function () { return internalStorageProviders_1.cognigyInternalStorageProviderModule; } });
|
|
119
128
|
//# sourceMappingURL=index.js.map
|