@cognigy/rest-api-client
Version:
Cognigy REST-Client
35 lines • 1.05 kB
JavaScript
import { __awaiter } from "tslib";
/* Custom modules */
import { createNodeDescriptor } from "../../createNodeDescriptor";
/**
* Node name: 'mergeProfile'
*
* Purpose:
* Attempts to merge a profile with another
*/
export const MERGE_PROFILE = createNodeDescriptor({
type: "mergeProfile",
defaultLabel: "Merge Profile",
summary: "UI__NODE_EDITOR__MERGE_PROFILE__SUMMARY",
appearance: {
showIcon: false
},
fields: [
{
key: "contactId",
type: "cognigyText",
label: "UI__NODE_EDITOR__MERGE_PROFILE__CONTACT_ID__LABEL",
params: {
required: true
}
}
],
tags: ["analytics", "profile"],
function: ({ cognigy, config }) => __awaiter(void 0, void 0, void 0, function* () {
const { api } = cognigy;
const { contactId } = config;
yield api.mergeProfile(contactId);
api.logDebugMessage(`UI__DEBUG_MODE__MERGE_PROFILE__MESSAGE '${contactId}'`);
})
});
//# sourceMappingURL=mergeProfile.js.map