@cognigy/rest-api-client
Version:
Cognigy REST-Client
26 lines • 785 B
JavaScript
import { __awaiter } from "tslib";
/* Custom modules */
import { createNodeDescriptor } from "../../createNodeDescriptor";
/**
* Node name: 'resetState'
*
* Purpose:
* Resets the state of the current brain to default
*/
export const RESET_STATE = createNodeDescriptor({
type: "resetState",
defaultLabel: "Reset State",
summary: "UI__NODE_EDITOR__RESET_STATE__SUMMARY",
appearance: {
showIcon: false
},
fields: [],
tags: ["logic"],
function: ({ cognigy }) => __awaiter(void 0, void 0, void 0, function* () {
const { api, input } = cognigy;
const state = yield api.resetState();
input.state = state;
api.logDebugMessage(`UI__DEBUG_MODE__RESET_STATE__MESSAGE`);
})
});
//# sourceMappingURL=resetState.js.map