@cognigy/rest-api-client
Version:
Cognigy REST-Client
40 lines • 1.42 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DELETE_PROFILE = void 0;
/* Custom modules */
const createNodeDescriptor_1 = require("../../createNodeDescriptor");
/**
* Node name: 'deleteProfile'
*
* Purpose:
* Deletes contact profile information and all their conversations
*/
exports.DELETE_PROFILE = (0, createNodeDescriptor_1.createNodeDescriptor)({
type: "deleteProfile",
defaultLabel: "Delete Profile",
summary: "UI__NODE_EDITOR__DELETE_PROFILE__SUMMARY",
appearance: {
showIcon: false
},
fields: [
...(process.env.FEATURE_MASK_AND_KEEP_ANALYTICS !== "false"
? [
{
key: "maskAndKeepAnalytics",
type: "checkbox",
label: "UI__NODE_EDITOR__DELETE_PROFILE__MASK_AND_KEEP_ANALYTICS__LABEL",
defaultValue: false,
}
]
: [])
],
tags: ["analytics", "profile"],
function: async ({ cognigy, config }) => {
var _a;
const { api } = cognigy;
const { maskAndKeepAnalytics } = config !== null && config !== void 0 ? config : {};
await api.deleteProfile(maskAndKeepAnalytics);
(_a = api.logDebugMessage) === null || _a === void 0 ? void 0 : _a.call(api, `UI__DEBUG_MODE__DELETE_PROFILE__MESSAGE`);
}
});
//# sourceMappingURL=deleteProfile.js.map