@cognigy/rest-api-client 0.18.0 → 0.19.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/CHANGELOG.md +6 -0
- package/build/apigroups/AdministrationAPIGroup_2_0.js +3 -1
- package/build/apigroups/MetricsAPIGroup_2_0.js +5 -0
- package/build/apigroups/ResourcesAPIGroup_2_0.js +9 -6
- package/build/shared/charts/descriptors/agentAssist/helpers/determineMetadata.js +15 -0
- package/build/shared/charts/descriptors/agentAssist/helpers/knowledgeSearch/answerExtraction.helper.js +1 -1
- package/build/shared/charts/descriptors/agentAssist/helpers/knowledgeSearch/followUpDetection.helper.js +2 -2
- package/build/shared/charts/descriptors/agentAssist/identityAssist.js +1 -1
- package/build/shared/charts/descriptors/agentAssist/knowledgeAssist.js +1 -1
- package/build/shared/charts/descriptors/agentAssist/nextActionAssist.js +4 -5
- package/build/shared/charts/descriptors/agentAssist/sentimentAssist.js +1 -1
- package/build/shared/charts/descriptors/agentAssist/setAdaptiveCardTile.js +2 -0
- package/build/shared/charts/descriptors/agentAssist/setAgentAssistGrid.js +2 -1
- package/build/shared/charts/descriptors/agentAssist/setHtmlTile.js +5 -3
- package/build/shared/charts/descriptors/agentAssist/setIframeTile.js +5 -3
- package/build/shared/charts/descriptors/agentAssist/setSecureFormsTile.js +2 -2
- package/build/shared/charts/descriptors/agentAssist/transcriptAssist.js +2 -1
- package/build/shared/charts/descriptors/analytics/activateProfile.js +1 -0
- package/build/shared/charts/descriptors/analytics/blindMode.js +2 -0
- package/build/shared/charts/descriptors/analytics/completeGoal.js +1 -0
- package/build/shared/charts/descriptors/analytics/deactivateProfile.js +1 -0
- package/build/shared/charts/descriptors/analytics/deleteProfile.js +1 -0
- package/build/shared/charts/descriptors/analytics/index.js +3 -1
- package/build/shared/charts/descriptors/analytics/mergeProfile.js +1 -0
- package/build/shared/charts/descriptors/analytics/overwriteAnalytics.js +9 -0
- package/build/shared/charts/descriptors/analytics/setRating.js +4 -2
- package/build/shared/charts/descriptors/analytics/trackMilestone.js +95 -0
- package/build/shared/charts/descriptors/analytics/updateProfile.js +1 -0
- package/build/shared/charts/descriptors/apps/initAppSession.js +1 -0
- package/build/shared/charts/descriptors/apps/setAdaptiveCardAppState.js +35 -10
- package/build/shared/charts/descriptors/apps/setHtmlAppState.js +25 -2
- package/build/shared/charts/descriptors/apps/utils/getXAppsOverlaySettings.js +54 -0
- package/build/shared/charts/descriptors/connectionNodes/documentParserProviders/azureAIDocumentIntelligenceConnection.js +12 -0
- package/build/shared/charts/descriptors/connectionNodes/documentParserProviders/index.js +13 -0
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/awsBedrockProviderConnection.js +12 -0
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/azureOpenAIProviderConnection.js +4 -3
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/azureOpenAIProviderConnectionV2.js +3 -3
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/azureOpenAIProviderOauth2Connection.js +14 -0
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/index.js +16 -8
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/openAIProviderConnection.js +3 -3
- package/build/shared/charts/descriptors/data/addToContext.js +7 -0
- package/build/shared/charts/descriptors/data/copyDataToContext.js +3 -0
- package/build/shared/charts/descriptors/data/copySlotsToContext.js +3 -0
- package/build/shared/charts/descriptors/data/debugMessage.js +73 -0
- package/build/shared/charts/descriptors/data/index.js +3 -1
- package/build/shared/charts/descriptors/data/removeFromContext.js +9 -1
- package/build/shared/charts/descriptors/data/resetContext.js +1 -0
- package/build/shared/charts/descriptors/index.js +7 -1
- package/build/shared/charts/descriptors/knowledgeSearch/searchExtractOutput.js +35 -10
- package/build/shared/charts/descriptors/logic/resetState.js +1 -0
- package/build/shared/charts/descriptors/logic/setState.js +2 -1
- package/build/shared/charts/descriptors/logic/setTranslation.js +3 -1
- package/build/shared/charts/descriptors/logic/switchLocale.js +1 -0
- package/build/shared/charts/descriptors/logic/think.js +3 -1
- package/build/shared/charts/descriptors/logic/thinkV2.js +2 -0
- package/build/shared/charts/descriptors/message/question/question.js +50 -5
- package/build/shared/charts/descriptors/message/question/utils/validateQuestionAnswer.js +4 -2
- package/build/shared/charts/descriptors/nlu/cleanText.js +1 -0
- package/build/shared/charts/descriptors/nlu/fuzzySearch.js +23 -1
- package/build/shared/charts/descriptors/nlu/generativeSlotFiller/prompt.js +19 -9
- package/build/shared/charts/descriptors/service/GPTPrompt.js +59 -24
- package/build/shared/charts/descriptors/service/LLMEntityExtract.js +11 -2
- package/build/shared/charts/descriptors/service/handoverV2.js +84 -1
- package/build/shared/charts/descriptors/service/httpRequest.js +35 -2
- package/build/shared/charts/descriptors/voice/mappers/setSessionConfig.mapper.js +96 -17
- package/build/shared/charts/descriptors/voice/nodes/bargeIn.js +2 -0
- package/build/shared/charts/descriptors/voice/nodes/continuousAsr.js +2 -0
- package/build/shared/charts/descriptors/voice/nodes/dtmf.js +2 -0
- package/build/shared/charts/descriptors/voice/nodes/muteSpeechInput.js +1 -0
- package/build/shared/charts/descriptors/voice/nodes/noUserInput.js +2 -0
- package/build/shared/charts/descriptors/voice/nodes/sessionSpeechParameters.js +2 -0
- package/build/shared/charts/descriptors/voice/nodes/transfer.js +2 -0
- package/build/shared/charts/descriptors/voicegateway2/nodes/dtmf.js +2 -0
- package/build/shared/charts/descriptors/voicegateway2/nodes/hangup.js +2 -0
- package/build/shared/charts/descriptors/voicegateway2/nodes/muteSpeechInput.js +3 -0
- package/build/shared/charts/descriptors/voicegateway2/nodes/play.js +1 -0
- package/build/shared/charts/descriptors/voicegateway2/nodes/record.js +1 -0
- package/build/shared/charts/descriptors/voicegateway2/nodes/refer.js +1 -0
- package/build/shared/charts/descriptors/voicegateway2/nodes/sendMetadata.js +1 -0
- package/build/shared/charts/descriptors/voicegateway2/nodes/setSessionConfig.js +298 -8
- package/build/shared/charts/descriptors/voicegateway2/nodes/transfer.js +10 -6
- package/build/shared/charts/descriptors/voicegateway2/utils/helper.js +2 -2
- package/build/shared/charts/helpers/generativeAI/rephraseSentenceWithAi.js +4 -2
- package/build/shared/constants.js +10 -1
- package/build/shared/handoverClients/interfaces/THandoverEventType.js +1 -0
- package/build/shared/helper/logFullConfigToDebugMode.js +30 -0
- package/build/shared/helper/nlu/textCleaner.js +3 -1
- package/build/shared/interfaces/IOrganisation.js +1 -0
- package/build/shared/interfaces/IProfile.js +1 -0
- package/build/shared/interfaces/IProfileSchema.js +3 -0
- package/build/shared/interfaces/analytics/IAnalyticsSourceData.js +20 -20
- package/build/shared/interfaces/{restAPI/resources/journey/v2.0/IJourneyStep_2_0.js → analytics/IMilestoneAnalytics.js} +1 -1
- package/build/shared/interfaces/{restAPI/resources/journey/v2.0/IJourneyProgress_2_0.js → appsession/ISetAppStateOptions.js} +1 -1
- package/build/shared/interfaces/{restAPI/resources/journey/v2.0/IJourneyIndexItem_2_0.js → appsession/ISetAppStateOverlaySettings.js} +1 -1
- package/build/shared/interfaces/appsession/ISetAppStateOverlaySettingsMetaData.js +3 -0
- package/build/shared/interfaces/{restAPI/resources/journey/v2.0/IIndexJourneysRest_2_0.js → debugEvents/TDebugEventMessagePayload.js} +1 -1
- package/build/shared/interfaces/debugEvents/TDebugEventType.js +2 -0
- package/build/shared/interfaces/generativeAI/IGenerativeAIModels.js +33 -69
- package/build/shared/interfaces/handover.js +42 -1
- package/build/shared/interfaces/license.js +3 -2
- package/build/shared/interfaces/license.js.map +1 -1
- package/build/shared/interfaces/messageAPI/endpoints.js +2 -0
- package/build/shared/interfaces/messageAPI/handover.js +20 -1
- package/build/shared/interfaces/resources/IConnection.js +1 -0
- package/build/shared/interfaces/resources/IEndpoint.js +1 -2
- package/build/shared/interfaces/resources/ILargeLanguageModel.js +25 -4
- package/build/shared/interfaces/resources/IMilestone.js +1 -1
- package/build/shared/interfaces/resources/INodeDescriptorSet.js +12 -0
- package/build/shared/interfaces/resources/knowledgeStore/IKnowledgeSource.js +1 -1
- package/build/shared/interfaces/resources/settings/IAgentSettings.js +12 -7
- package/build/shared/interfaces/resources/settings/IGenerativeAISettings.js +4 -0
- package/build/shared/interfaces/resources/settings/IKnowledgeAISettings.js +18 -0
- package/build/shared/interfaces/resources/settings/index.js +4 -1
- package/build/shared/interfaces/restAPI/administration/organisations/v2.0/IReadCollectionsToBeDeletedRest_2_0.js +0 -1
- package/build/shared/interfaces/restAPI/administration/organisations/v2.0/IReadOrganisationKnowledgeChunksCountRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/operations/nlu/v2.0/IGenerateNluScoresRest_2_0.js +57 -0
- package/build/shared/interfaces/restAPI/{resources/journey/v2.0/IJourney_2_0.js → operations/nlu/v2.0/index.js} +1 -1
- package/build/shared/interfaces/restAPI/resources/largeLanguageModel/v2.0/IAvailableModelsForLLMProvider_2_0 .js +18 -0
- package/build/shared/interfaces/restAPI/resources/largeLanguageModel/v2.0/IGetAvailableModelsForLLMRest_2_0 .js +3 -0
- package/build/shared/interfaces/security/IRole.js +2 -0
- package/build/shared/interfaces/security/ISystemCapabilities.js +3 -0
- package/build/shared/interfaces/security/index.js +1 -1
- package/build/shared/interfaces/trainer/ITrainerRecord.js +2 -2
- package/build/shared/interfaces/user.js +1 -1
- package/package.json +2 -2
- package/types/index.d.ts +1254 -670
- package/build/shared/interfaces/journeys/IJourney.js +0 -83
- package/build/shared/interfaces/journeys/IJourneyProgress.js +0 -40
- package/build/shared/interfaces/journeys/IJourneyTrackEvent.js +0 -35
- package/build/shared/interfaces/journeys/index.js +0 -14
- package/build/shared/interfaces/restAPI/resources/journey/v2.0/IJourneyTrackEvents_2_0.js +0 -3
- package/build/shared/interfaces/restAPI/resources/journey/v2.0/IReadJourneyProgressRest_2_0.js +0 -3
- package/build/shared/interfaces/restAPI/resources/journey/v2.0/IReadJourneyRest_2_0.js +0 -3
- package/build/shared/interfaces/restAPI/resources/journey/v2.0/ITrackJourneyEventRest_2_0.js +0 -3
- package/build/shared/interfaces/restAPI/resources/journey/v2.0/IUpdateSelectedJourneyRest_2_0.js +0 -3
- /package/build/shared/interfaces/restAPI/{resources/journey/v2.0 → operations}/index.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -113,7 +113,9 @@ function AdministrationAPIGroup_2_0(instance) {
|
|
|
113
113
|
requestOrganisationDeletion: (options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/organisations/requestdeletion", "POST", self)(undefined, options),
|
|
114
114
|
readCollectionsToBeDeleted: (options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/organisations/collections", "GET", self)(undefined, options),
|
|
115
115
|
setupVoiceGatewayAccount: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/organisations/voicegateway/account", "POST", self)(args, options),
|
|
116
|
-
readVoiceGatewayAccount: (options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/organisations/voicegateway/account", "GET", self)(undefined, options)
|
|
116
|
+
readVoiceGatewayAccount: (options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/organisations/voicegateway/account", "GET", self)(undefined, options),
|
|
117
|
+
readOrganisationPolicies: (options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/organisations/policy", "GET", self)(undefined, options),
|
|
118
|
+
readOrganisationKnowledgeChunksCount: (options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/organisations/chunkcount", "GET", self)(undefined, options)
|
|
117
119
|
};
|
|
118
120
|
}
|
|
119
121
|
exports.AdministrationAPIGroup_2_0 = AdministrationAPIGroup_2_0;
|
|
@@ -64,6 +64,11 @@ function MetricsAPIGroup_2_0(instance) {
|
|
|
64
64
|
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/projects/${projectId}/conversationcounter?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options);
|
|
65
65
|
},
|
|
66
66
|
getConversationCounterOrganisation: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/conversationcounter?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options),
|
|
67
|
+
getKnowledgeQueryCounter: (_a, options) => {
|
|
68
|
+
var { projectId } = _a, args = __rest(_a, ["projectId"]);
|
|
69
|
+
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/projects/${projectId}/knowledgequerycounter?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options);
|
|
70
|
+
},
|
|
71
|
+
getKnowledgeQueryCounterOrganisation: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/knowledgequerycounter?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options),
|
|
67
72
|
indexConversations: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/conversations?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options),
|
|
68
73
|
readConversation: (_a, options) => {
|
|
69
74
|
var { sessionId } = _a, args = __rest(_a, ["sessionId"]);
|
|
@@ -459,11 +459,6 @@ const ResourcesAPIGroup_2_0 = (instance) => {
|
|
|
459
459
|
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/locales/${localeId}`, "PATCH", self)(args, options);
|
|
460
460
|
},
|
|
461
461
|
deleteLocale: ({ localeId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/locales/${localeId}`, "DELETE", self)(undefined, options),
|
|
462
|
-
indexJourneys: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/journeys?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options),
|
|
463
|
-
readJourney: ({ journeyReferenceId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/journeys/${journeyReferenceId}`, "GET", self)(undefined, options),
|
|
464
|
-
readJourneyProgress: (options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/users/me/journey/current", "GET", self)(undefined, options),
|
|
465
|
-
updateSelectedJourney: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/users/me/journey", "POST", self)(args, options),
|
|
466
|
-
trackJourneyEvent: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/users/me/journey/track", "POST", self)(args, options),
|
|
467
462
|
indexFunctions: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/functions?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options),
|
|
468
463
|
createFunction: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/functions", "POST", self)(args, options),
|
|
469
464
|
readFunction: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/functions/${args.functionId}`, "GET", self)(undefined, options),
|
|
@@ -562,6 +557,10 @@ const ResourcesAPIGroup_2_0 = (instance) => {
|
|
|
562
557
|
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/largelanguagemodels/${largeLanguageModelId}/clone`, "POST", self)(args, options);
|
|
563
558
|
},
|
|
564
559
|
testLargeLanguageModel: ({ largeLanguageModelId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/largelanguagemodels/${largeLanguageModelId}/test`, "POST", self)(undefined, options),
|
|
560
|
+
getAvailableModelsForLLM: (_a, options) => {
|
|
561
|
+
var { largeLanguageModelId } = _a, args = __rest(_a, ["largeLanguageModelId"]);
|
|
562
|
+
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/largelanguagemodels/${largeLanguageModelId}/availablemodels?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options);
|
|
563
|
+
},
|
|
565
564
|
indexKnowledgeStores: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/knowledgestores?${(0, query_1.stringifyQuery)(args)}`, "GET", self)(undefined, options),
|
|
566
565
|
createKnowledgeStore: (args, options) => (0, GenericAPIFn_1.GenericAPIFn)("/new/v2.0/knowledgestores", "POST", self)(args, options),
|
|
567
566
|
readKnowledgeStore: ({ knowledgeStoreId }, options) => (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/knowledgestores/${knowledgeStoreId}`, "GET", self)(undefined, options),
|
|
@@ -603,7 +602,11 @@ const ResourcesAPIGroup_2_0 = (instance) => {
|
|
|
603
602
|
var { knowledgeStoreId, sourceId, chunkId } = _a, args = __rest(_a, ["knowledgeStoreId", "sourceId", "chunkId"]);
|
|
604
603
|
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/knowledgestores/${knowledgeStoreId}/sources/${sourceId}/chunks/${chunkId}`, "PATCH", self)(args, options);
|
|
605
604
|
},
|
|
606
|
-
uploadResumable: (args) => (0, GenericTusFn_1.GenericTusFn)("/new/v2.0/uploads", self)(args)
|
|
605
|
+
uploadResumable: (args) => (0, GenericTusFn_1.GenericTusFn)("/new/v2.0/uploads", self)(args),
|
|
606
|
+
generateNluScores: (_a) => {
|
|
607
|
+
var { projectId } = _a, args = __rest(_a, ["projectId"]);
|
|
608
|
+
return (0, GenericAPIFn_1.GenericAPIFn)(`/new/v2.0/projects/${projectId}/nlu/scores`, "POST", self)(args);
|
|
609
|
+
}
|
|
607
610
|
};
|
|
608
611
|
};
|
|
609
612
|
exports.ResourcesAPIGroup_2_0 = ResourcesAPIGroup_2_0;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.determineMetadata = void 0;
|
|
4
|
+
const determineMetadata = (jsonData) => {
|
|
5
|
+
// Check if jsonData is undefined or null and return an empty object if so
|
|
6
|
+
if (jsonData === undefined || jsonData === null) {
|
|
7
|
+
return {};
|
|
8
|
+
}
|
|
9
|
+
// Determine if jsonData is an array or an object and return the metadata object accordingly
|
|
10
|
+
return Array.isArray(jsonData)
|
|
11
|
+
? jsonData.length > 0 ? { metadata: jsonData } : {}
|
|
12
|
+
: Object.keys(jsonData).length > 0 ? { metadata: jsonData } : {};
|
|
13
|
+
};
|
|
14
|
+
exports.determineMetadata = determineMetadata;
|
|
15
|
+
//# sourceMappingURL=determineMetadata.js.map
|
|
@@ -40,7 +40,7 @@ async function extractAnswer({ api, config, knowledgeSearchResponseData, userInp
|
|
|
40
40
|
promptData["stop"] = stop;
|
|
41
41
|
}
|
|
42
42
|
try {
|
|
43
|
-
promptResponse = await ((_b = api.runGenerativeAIPrompt) === null || _b === void 0 ? void 0 : _b.call(api, promptData, "
|
|
43
|
+
promptResponse = await ((_b = api.runGenerativeAIPrompt) === null || _b === void 0 ? void 0 : _b.call(api, promptData, "answerExtraction"));
|
|
44
44
|
if (searchStoreLocation === "context") {
|
|
45
45
|
(_c = api.addToContext) === null || _c === void 0 ? void 0 : _c.call(api, contextKey, promptResponse, "simple");
|
|
46
46
|
}
|
|
@@ -47,14 +47,14 @@ async function detectFollowUp({ value, cognigy, followUpDetectionSteps, }) {
|
|
|
47
47
|
value,
|
|
48
48
|
});
|
|
49
49
|
try {
|
|
50
|
-
promptResponse = await ((_c = api.runGenerativeAIPrompt) === null || _c === void 0 ? void 0 : _c.call(api, { prompt }, "
|
|
50
|
+
promptResponse = await ((_c = api.runGenerativeAIPrompt) === null || _c === void 0 ? void 0 : _c.call(api, { prompt }, "answerExtraction"));
|
|
51
51
|
// check if LLM thinks the input was a follow up question and rewrite it
|
|
52
52
|
if (promptResponse === null || promptResponse === void 0 ? void 0 : promptResponse.toLowerCase().includes("true")) {
|
|
53
53
|
prompt = getFollowUpPrompt({
|
|
54
54
|
lastRoundTrip,
|
|
55
55
|
value,
|
|
56
56
|
});
|
|
57
|
-
promptResponse = await ((_d = api.runGenerativeAIPrompt) === null || _d === void 0 ? void 0 : _d.call(api, { prompt }, "
|
|
57
|
+
promptResponse = await ((_d = api.runGenerativeAIPrompt) === null || _d === void 0 ? void 0 : _d.call(api, { prompt }, "answerExtraction"));
|
|
58
58
|
}
|
|
59
59
|
else {
|
|
60
60
|
// if there is no question to rewrite, no response is provided to not override original input
|
|
@@ -482,7 +482,7 @@ exports.KNOWLEDGE_ASSIST = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
482
482
|
else {
|
|
483
483
|
api.log("error", `received error of unknown format: ${error}`);
|
|
484
484
|
}
|
|
485
|
-
api.
|
|
485
|
+
api.logDebugError(error, "Copilot: Knowledge Tile Error");
|
|
486
486
|
return;
|
|
487
487
|
}
|
|
488
488
|
},
|
|
@@ -427,7 +427,6 @@ exports.NEXT_ACTION_ASSIST = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
427
427
|
{ type: "section", key: "uiPreferences" },
|
|
428
428
|
].filter((element) => !!element),
|
|
429
429
|
function: async (params) => {
|
|
430
|
-
var _a, _b, _c;
|
|
431
430
|
const { cognigy, config, nodeId } = params;
|
|
432
431
|
const { api, input } = cognigy;
|
|
433
432
|
if (!api || !api.log) {
|
|
@@ -438,7 +437,7 @@ exports.NEXT_ACTION_ASSIST = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
438
437
|
let nextActionText = config.text;
|
|
439
438
|
let lastCustomerInput = input.text;
|
|
440
439
|
if (!lastCustomerInput) {
|
|
441
|
-
api.
|
|
440
|
+
api.logDebugError("No input text found.", "Copilot: Next Action Tile Error");
|
|
442
441
|
return;
|
|
443
442
|
}
|
|
444
443
|
// timeout message name not changed because of legacy compatibility
|
|
@@ -518,7 +517,7 @@ exports.NEXT_ACTION_ASSIST = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
518
517
|
}
|
|
519
518
|
else {
|
|
520
519
|
if (!nextActionText) {
|
|
521
|
-
|
|
520
|
+
api.logDebugError("Please provide a text in the text field.", "Copilot: Next Action Tile Error");
|
|
522
521
|
return;
|
|
523
522
|
}
|
|
524
523
|
}
|
|
@@ -540,10 +539,10 @@ exports.NEXT_ACTION_ASSIST = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
540
539
|
}
|
|
541
540
|
catch (error) {
|
|
542
541
|
if (error instanceof SyntaxError) {
|
|
543
|
-
|
|
542
|
+
api.logDebugError("Please provide a valid JSON in the JSON Data field.", "Copilot: Next Action Tile Error");
|
|
544
543
|
}
|
|
545
544
|
else {
|
|
546
|
-
|
|
545
|
+
api.logDebugError(error, "Copilot: Next Action Tile Error");
|
|
547
546
|
}
|
|
548
547
|
}
|
|
549
548
|
return;
|
|
@@ -46,6 +46,7 @@ exports.SET_ADAPTIVE_CARD_TILE = (0, createNodeDescriptor_1.createNodeDescriptor
|
|
|
46
46
|
description: "UI__NODE_EDITOR__SET_ADAPTIVE_CARD_TILE__CARD__DESCRIPTION",
|
|
47
47
|
params: {
|
|
48
48
|
required: true,
|
|
49
|
+
showPromtByDefault: true,
|
|
49
50
|
},
|
|
50
51
|
defaultValue: sampleAdaptiveCard,
|
|
51
52
|
},
|
|
@@ -68,6 +69,7 @@ exports.SET_ADAPTIVE_CARD_TILE = (0, createNodeDescriptor_1.createNodeDescriptor
|
|
|
68
69
|
type: "card",
|
|
69
70
|
data: card,
|
|
70
71
|
} }));
|
|
72
|
+
api.logDebugMessage(`UI__DEBUG_MODE__SET_ADAPTIVE_CARD_TILE__MESSAGE '${config.tileId}`);
|
|
71
73
|
return;
|
|
72
74
|
},
|
|
73
75
|
});
|
|
@@ -110,10 +110,11 @@ exports.SET_AGENT_ASSIST_GRID = (0, createNodeDescriptor_1.createNodeDescriptor)
|
|
|
110
110
|
const agentAssistConfig = config[configKey];
|
|
111
111
|
const background = config[backgroundSelectorKey];
|
|
112
112
|
if (!checkAgentAssistKeys(agentAssistConfig)) {
|
|
113
|
-
api.
|
|
113
|
+
api.logDebugError("A valid AI Copilot configuration was not provided", "Copilot: Set Grid Error");
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
116
|
cognigy.api.sendConfigUpdateToAgentAssistWorkspace(Object.assign(Object.assign({}, params), { agentAssistConfig: Object.assign(Object.assign({}, agentAssistConfig), { background: background === null || background === void 0 ? void 0 : background.data }) }));
|
|
117
|
+
api.logDebugMessage(`UI__DEBUG_MODE__SET_AGENT_ASSIST_GRID__MESSAGE`);
|
|
117
118
|
return;
|
|
118
119
|
},
|
|
119
120
|
});
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SET_HTML_TILE = exports.formExampleHTML = void 0;
|
|
4
4
|
/* Custom modules */
|
|
5
5
|
const createNodeDescriptor_1 = require("../../createNodeDescriptor");
|
|
6
|
+
const determineMetadata_1 = require("./helpers/determineMetadata");
|
|
6
7
|
const htmlContentKey = "htmlContent";
|
|
7
8
|
const htmlJsonKey = "htmlJSON";
|
|
8
9
|
exports.formExampleHTML = `<!DOCTYPE html>
|
|
@@ -77,19 +78,20 @@ exports.SET_HTML_TILE = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
77
78
|
return;
|
|
78
79
|
}
|
|
79
80
|
try {
|
|
80
|
-
const data = Object.assign({ html: htmlContent }, (
|
|
81
|
+
const data = Object.assign({ html: htmlContent }, (0, determineMetadata_1.determineMetadata)(jsonData));
|
|
81
82
|
cognigy.api.sendTileUpdateToAgentAssistWorkspace(Object.assign(Object.assign({}, params), { tile: {
|
|
82
83
|
id: config.tileId,
|
|
83
84
|
type: "html",
|
|
84
85
|
data,
|
|
85
86
|
} }));
|
|
87
|
+
api.logDebugMessage("Successfully set HTML Tile content");
|
|
86
88
|
}
|
|
87
89
|
catch (error) {
|
|
88
90
|
if (error instanceof SyntaxError) {
|
|
89
|
-
api.
|
|
91
|
+
api.logDebugError("Please provide a valid JSON in the JSON Data field", "Copilot: HTML Tile Error");
|
|
90
92
|
}
|
|
91
93
|
else {
|
|
92
|
-
api.
|
|
94
|
+
api.logDebugError(error, "Copilot: HTML Tile Error");
|
|
93
95
|
}
|
|
94
96
|
}
|
|
95
97
|
return;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SET_IFRAME_TILE = void 0;
|
|
4
4
|
/* Custom modules */
|
|
5
5
|
const createNodeDescriptor_1 = require("../../createNodeDescriptor");
|
|
6
|
+
const determineMetadata_1 = require("./helpers/determineMetadata");
|
|
6
7
|
const iframeUrlKey = "iframeUrl";
|
|
7
8
|
const iframeJsonKey = "iframeJSON";
|
|
8
9
|
const urlRegex = new RegExp(/^(https?:\/\/)?[\w\-]+(\.[\w\-]+)+[/#?]?.*$/i);
|
|
@@ -65,19 +66,20 @@ exports.SET_IFRAME_TILE = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
65
66
|
return;
|
|
66
67
|
}
|
|
67
68
|
try {
|
|
68
|
-
const data = Object.assign({ url }, (
|
|
69
|
+
const data = Object.assign({ url }, (0, determineMetadata_1.determineMetadata)(jsonData));
|
|
69
70
|
cognigy.api.sendTileUpdateToAgentAssistWorkspace(Object.assign(Object.assign({}, params), { tile: {
|
|
70
71
|
id: config.tileId,
|
|
71
72
|
type: "iframe",
|
|
72
73
|
data,
|
|
73
74
|
} }));
|
|
75
|
+
api.logDebugMessage(`UI__DEBUG_MODE__SET_IFRAME_TILE__MESSAGE`);
|
|
74
76
|
}
|
|
75
77
|
catch (error) {
|
|
76
78
|
if (error instanceof SyntaxError) {
|
|
77
|
-
api.
|
|
79
|
+
api.logDebugError("Please provide a valid JSON in the JSON Data field", "Copilot: IFrame Tile Error");
|
|
78
80
|
}
|
|
79
81
|
else {
|
|
80
|
-
api.
|
|
82
|
+
api.logDebugError(error, "Copilot: IFrame Tile Error");
|
|
81
83
|
}
|
|
82
84
|
}
|
|
83
85
|
return;
|
|
@@ -72,14 +72,14 @@ exports.SET_SECURE_FORMS_TILE = (0, createNodeDescriptor_1.createNodeDescriptor)
|
|
|
72
72
|
const { cognigy, config } = params;
|
|
73
73
|
const { api, input } = cognigy;
|
|
74
74
|
if (!config.tileId) {
|
|
75
|
-
api.
|
|
75
|
+
api.logDebugError("Missing required parameter: 'tileId'", "Copilot: SecureForms Tile");
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
78
|
const updateAgentTile = agentAssistTile(params);
|
|
79
79
|
const contextKey = "secureForms";
|
|
80
80
|
let contextVal = api.getSystemContext(contextKey);
|
|
81
81
|
function handleError(error) {
|
|
82
|
-
api.
|
|
82
|
+
api.logDebugError(error, "SecureForms Tile Error", "Copilot: SecureForms Tile Error");
|
|
83
83
|
updateAgentTile(3, { error });
|
|
84
84
|
}
|
|
85
85
|
/**
|
|
@@ -100,9 +100,10 @@ exports.TRANSCRIPT_ASSIST = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
100
100
|
type: "html",
|
|
101
101
|
data,
|
|
102
102
|
} }));
|
|
103
|
+
api.logDebugMessage(`UI__DEBUG_MODE__TRANSCRIPT_ASSIST__MESSAGE`);
|
|
103
104
|
}
|
|
104
105
|
catch (error) {
|
|
105
|
-
api.
|
|
106
|
+
api.logDebugError(error, "Copilot: Transcript Tile Error");
|
|
106
107
|
}
|
|
107
108
|
return;
|
|
108
109
|
},
|
|
@@ -21,6 +21,7 @@ exports.ACTIVATE_PROFILE = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
21
21
|
function: async ({ cognigy }) => {
|
|
22
22
|
const { api } = cognigy;
|
|
23
23
|
await api.activateProfile();
|
|
24
|
+
api.logDebugMessage(`UI__DEBUG_MODE__ACTIVATE_PROFILE__MESSAGE`);
|
|
24
25
|
}
|
|
25
26
|
});
|
|
26
27
|
//# sourceMappingURL=activateProfile.js.map
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BLIND_MODE = void 0;
|
|
4
4
|
/* Custom modules */
|
|
5
5
|
const createNodeDescriptor_1 = require("../../createNodeDescriptor");
|
|
6
|
+
const logFullConfigToDebugMode_1 = require("../../../helper/logFullConfigToDebugMode");
|
|
6
7
|
/**
|
|
7
8
|
* Node name: 'blindMode'
|
|
8
9
|
*
|
|
@@ -52,6 +53,7 @@ exports.BLIND_MODE = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
52
53
|
disableConversations,
|
|
53
54
|
disableIntentTrainer,
|
|
54
55
|
}, input.traceId);
|
|
56
|
+
(0, logFullConfigToDebugMode_1.logFullConfigToDebugMode)(cognigy, config);
|
|
55
57
|
}
|
|
56
58
|
});
|
|
57
59
|
//# sourceMappingURL=blindMode.js.map
|
|
@@ -28,6 +28,7 @@ exports.DEACTIVATE_PROFILE = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
28
28
|
const { api } = cognigy;
|
|
29
29
|
const { deleteData } = config;
|
|
30
30
|
await api.deactivateProfile(deleteData);
|
|
31
|
+
api.logDebugMessage(`UI__DEBUG_MODE__DEACTIVATE_PROFILE__MESSAGE`);
|
|
31
32
|
}
|
|
32
33
|
});
|
|
33
34
|
//# sourceMappingURL=deactivateProfile.js.map
|
|
@@ -21,6 +21,7 @@ exports.DELETE_PROFILE = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
21
21
|
function: async ({ cognigy }) => {
|
|
22
22
|
const { api } = cognigy;
|
|
23
23
|
await api.deleteProfile();
|
|
24
|
+
api.logDebugMessage(`UI__DEBUG_MODE__DELETE_PROFILE__MESSAGE`);
|
|
24
25
|
}
|
|
25
26
|
});
|
|
26
27
|
//# sourceMappingURL=deleteProfile.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.REQUEST_RATING = exports.SET_RATING = exports.OVERWRITE_ANALYTICS = exports.BLIND_MODE = exports.UPDATE_PROFILE = exports.MERGE_PROFILE = exports.DELETE_PROFILE = exports.DEACTIVATE_PROFILE = exports.COMPLETE_GOAL = exports.ACTIVATE_PROFILE = void 0;
|
|
3
|
+
exports.TRACK_MILESTONE = exports.REQUEST_RATING = exports.SET_RATING = exports.OVERWRITE_ANALYTICS = exports.BLIND_MODE = exports.UPDATE_PROFILE = exports.MERGE_PROFILE = exports.DELETE_PROFILE = exports.DEACTIVATE_PROFILE = exports.COMPLETE_GOAL = exports.ACTIVATE_PROFILE = void 0;
|
|
4
4
|
var activateProfile_1 = require("./activateProfile");
|
|
5
5
|
Object.defineProperty(exports, "ACTIVATE_PROFILE", { enumerable: true, get: function () { return activateProfile_1.ACTIVATE_PROFILE; } });
|
|
6
6
|
var completeGoal_1 = require("./completeGoal");
|
|
@@ -21,4 +21,6 @@ var setRating_1 = require("./setRating");
|
|
|
21
21
|
Object.defineProperty(exports, "SET_RATING", { enumerable: true, get: function () { return setRating_1.SET_RATING; } });
|
|
22
22
|
var requestRating_1 = require("./requestRating");
|
|
23
23
|
Object.defineProperty(exports, "REQUEST_RATING", { enumerable: true, get: function () { return requestRating_1.REQUEST_RATING; } });
|
|
24
|
+
var trackMilestone_1 = require("./trackMilestone");
|
|
25
|
+
Object.defineProperty(exports, "TRACK_MILESTONE", { enumerable: true, get: function () { return trackMilestone_1.TRACK_MILESTONE; } });
|
|
24
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -31,6 +31,7 @@ exports.MERGE_PROFILE = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
31
31
|
const { api } = cognigy;
|
|
32
32
|
const { contactId } = config;
|
|
33
33
|
await api.mergeProfile(contactId);
|
|
34
|
+
api.logDebugMessage(`UI__DEBUG_MODE__MERGE_PROFILE__MESSAGE '${contactId}'`);
|
|
34
35
|
}
|
|
35
36
|
});
|
|
36
37
|
//# sourceMappingURL=mergeProfile.js.map
|
|
@@ -196,11 +196,13 @@ exports.OVERWRITE_ANALYTICS = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
196
196
|
tags: ["analytics", "customize"],
|
|
197
197
|
function: async ({ cognigy, config }) => {
|
|
198
198
|
const { api } = cognigy;
|
|
199
|
+
let stringUpdateValue = "";
|
|
199
200
|
for (let key of Object.keys(config)) {
|
|
200
201
|
if (key === "handoverEscalations") {
|
|
201
202
|
const parsedHandoverEscalations = parseInt(config[key]);
|
|
202
203
|
if (!isNaN(parsedHandoverEscalations)) {
|
|
203
204
|
api.setAnalyticsData(key, parsedHandoverEscalations);
|
|
205
|
+
stringUpdateValue += `${key}: ${parsedHandoverEscalations}<br>`;
|
|
204
206
|
}
|
|
205
207
|
continue;
|
|
206
208
|
}
|
|
@@ -208,6 +210,7 @@ exports.OVERWRITE_ANALYTICS = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
208
210
|
case "string":
|
|
209
211
|
if (config[key] && config[key].length > 0 && config[key] !== "cUndefined") {
|
|
210
212
|
api.setAnalyticsData(key, config[key]);
|
|
213
|
+
stringUpdateValue += `${key}: ${config[key]}<br>`;
|
|
211
214
|
}
|
|
212
215
|
break;
|
|
213
216
|
case "object":
|
|
@@ -217,10 +220,15 @@ exports.OVERWRITE_ANALYTICS = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
217
220
|
else if (config[key] && Object.keys(config[key]).length > 0) {
|
|
218
221
|
api.setAnalyticsData(key, config[key]);
|
|
219
222
|
}
|
|
223
|
+
try {
|
|
224
|
+
stringUpdateValue += `${key}: ${JSON.stringify(config[key])}<br>`;
|
|
225
|
+
}
|
|
226
|
+
catch (err) { }
|
|
220
227
|
break;
|
|
221
228
|
case "number":
|
|
222
229
|
if (config[key] && Number(config[key])) {
|
|
223
230
|
api.setAnalyticsData(key, config[key]);
|
|
231
|
+
stringUpdateValue += `${key}: ${config[key]}<br>`;
|
|
224
232
|
}
|
|
225
233
|
break;
|
|
226
234
|
}
|
|
@@ -228,6 +236,7 @@ exports.OVERWRITE_ANALYTICS = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
228
236
|
api.setAnalyticsData("understood", null);
|
|
229
237
|
}
|
|
230
238
|
}
|
|
239
|
+
api.logDebugMessage(stringUpdateValue);
|
|
231
240
|
}
|
|
232
241
|
});
|
|
233
242
|
//# sourceMappingURL=overwriteAnalytics.js.map
|
|
@@ -30,10 +30,12 @@ exports.SET_RATING = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
30
30
|
tags: ["analytics", "rating", "success"],
|
|
31
31
|
function: async ({ cognigy, config }) => {
|
|
32
32
|
const { api } = cognigy;
|
|
33
|
+
const { rating, ratingComment } = config;
|
|
33
34
|
api.setRating({
|
|
34
|
-
rating:
|
|
35
|
-
comment:
|
|
35
|
+
rating: rating,
|
|
36
|
+
comment: ratingComment
|
|
36
37
|
});
|
|
38
|
+
api.logDebugMessage(`UI__DEBUG_MODE__SET_RATING__MESSAGE_1 ${rating}<br>UI__DEBUG_MODE__SET_RATING__MESSAGE_2 ${ratingComment}`);
|
|
37
39
|
}
|
|
38
40
|
});
|
|
39
41
|
//# sourceMappingURL=setRating.js.map
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TRACK_MILESTONE = void 0;
|
|
4
|
+
/* Custom modules */
|
|
5
|
+
const createNodeDescriptor_1 = require("../../createNodeDescriptor");
|
|
6
|
+
/* Npm modules */
|
|
7
|
+
const uuid_1 = require("uuid");
|
|
8
|
+
/**
|
|
9
|
+
* Node name: 'trackMilestone'
|
|
10
|
+
*
|
|
11
|
+
* Purpose:
|
|
12
|
+
* Track a milestone with steps
|
|
13
|
+
* @param milestoneReferenceId the reference id of the milestone to track
|
|
14
|
+
*/
|
|
15
|
+
exports.TRACK_MILESTONE = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
16
|
+
type: "trackMilestone",
|
|
17
|
+
defaultLabel: "Track Milestone",
|
|
18
|
+
summary: 'UI__NODE_EDITOR__TRACK_MILESTONE__SUMMARY',
|
|
19
|
+
appearance: {
|
|
20
|
+
showIcon: false
|
|
21
|
+
},
|
|
22
|
+
fields: [
|
|
23
|
+
{
|
|
24
|
+
key: "milestone",
|
|
25
|
+
type: "milestoneAndStepsSelect",
|
|
26
|
+
label: "UI__NODE_EDITOR__MILESTONES__CHOOSE_MILESTONE__LABEL",
|
|
27
|
+
defaultValue: {
|
|
28
|
+
milestoneReferenceId: "",
|
|
29
|
+
stepIds: []
|
|
30
|
+
},
|
|
31
|
+
params: {
|
|
32
|
+
required: true
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
preview: {
|
|
37
|
+
key: "milestone",
|
|
38
|
+
type: "text"
|
|
39
|
+
},
|
|
40
|
+
tags: ["analytics"],
|
|
41
|
+
function: async ({ cognigy, config, projectId, organisationId, }) => {
|
|
42
|
+
var _a;
|
|
43
|
+
const { api } = cognigy;
|
|
44
|
+
if (!(config === null || config === void 0 ? void 0 : config.milestone)) {
|
|
45
|
+
api.log("error", `Invalid config for 'trackMilestone' Node`);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const sessionState = api.getSessionStateCopy();
|
|
49
|
+
const { selectedSteps, version, name, milestoneId, } = config.milestone;
|
|
50
|
+
const activeCycleIds = ((_a = sessionState.analytics) === null || _a === void 0 ? void 0 : _a.milestoneCycleIds) || {};
|
|
51
|
+
let cycleId = activeCycleIds[milestoneId];
|
|
52
|
+
const hasStartStep = selectedSteps.some(step => step.type === "start");
|
|
53
|
+
if (!cycleId && !hasStartStep) {
|
|
54
|
+
api.log("warn", `No start step found for milestone ${name} (${milestoneId}). Ignoring milestone tracking.`);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
// Create a new cycle id if there is a start step
|
|
58
|
+
if (hasStartStep) {
|
|
59
|
+
cycleId = (0, uuid_1.v4)();
|
|
60
|
+
activeCycleIds[milestoneId] = cycleId;
|
|
61
|
+
const sessionStateAnalyticsUpdate = Object.assign(Object.assign({}, sessionState.analytics), { milestoneCycleIds: activeCycleIds });
|
|
62
|
+
api.setSessionState("analytics", sessionStateAnalyticsUpdate);
|
|
63
|
+
}
|
|
64
|
+
const { sessionId, endpointUrlToken, endpointName, channel, endpointType, localeName, localeReferenceId, traceId, snapshotId, snapshotName, contactId } = api.getMetadata();
|
|
65
|
+
for (const step of selectedSteps) {
|
|
66
|
+
const payload = {
|
|
67
|
+
data: {
|
|
68
|
+
traceId: traceId,
|
|
69
|
+
disableSensitiveLogging: false,
|
|
70
|
+
},
|
|
71
|
+
analyticsdata: {
|
|
72
|
+
projectId,
|
|
73
|
+
organisationId,
|
|
74
|
+
sessionId,
|
|
75
|
+
version,
|
|
76
|
+
timestamp: new Date(),
|
|
77
|
+
milestoneCycleId: cycleId,
|
|
78
|
+
milestoneId,
|
|
79
|
+
stepId: step.stepId,
|
|
80
|
+
endpointUrlToken,
|
|
81
|
+
endpointName,
|
|
82
|
+
endpointType,
|
|
83
|
+
channel,
|
|
84
|
+
localeName,
|
|
85
|
+
localeReferenceId,
|
|
86
|
+
snapshotId,
|
|
87
|
+
snapshotName,
|
|
88
|
+
contactId
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
await api.sendTrackMilestone(payload);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
//# sourceMappingURL=trackMilestone.js.map
|
|
@@ -40,6 +40,7 @@ exports.UPDATE_PROFILE = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
40
40
|
const { key, value } = config;
|
|
41
41
|
const { api } = cognigy;
|
|
42
42
|
await api.updateProfile(key, value);
|
|
43
|
+
api.logDebugMessage(`UI__DEBUG_MODE__UPDATE_PROFILE__MESSAGE '${key}' UI__DEBUG_MODE__UPDATE_PROFILE__MESSAGE_2 '${value}'`);
|
|
43
44
|
}
|
|
44
45
|
});
|
|
45
46
|
//# sourceMappingURL=updateProfile.js.map
|
|
@@ -478,6 +478,7 @@ exports.INIT_APP_SESSION = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
478
478
|
const finalUrl = (0, buildAppUrl_1.buildAppUrl)(input.apps.baseUrl, (_a = input.apps.session) === null || _a === void 0 ? void 0 : _a.token);
|
|
479
479
|
api.addToInput("apps.url", finalUrl);
|
|
480
480
|
api.addToInput("apps.customization", customization || null);
|
|
481
|
+
api.logDebugMessage(`Token: ${input.apps.session.token}<br>URL: <a href="${input.apps.url} " target="_blank">${input.apps.url}</a>`);
|
|
481
482
|
},
|
|
482
483
|
});
|
|
483
484
|
//# sourceMappingURL=initAppSession.js.map
|