n8n
Version:
n8n Workflow Automation Tool
30 lines • 1.09 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.EventMessageGeneric = exports.eventMessageGenericDestinationTestEvent = void 0;
const AbstractEventMessage_1 = require("./AbstractEventMessage");
exports.eventMessageGenericDestinationTestEvent = 'n8n.destination.test';
class EventMessageGeneric extends AbstractEventMessage_1.AbstractEventMessage {
constructor(options) {
super(options);
this.__type = "$$EventMessage";
if (options.payload)
this.setPayload(options.payload);
if (options.anonymize) {
this.anonymize();
}
}
setPayload(payload) {
this.payload = payload;
return this;
}
deserialize(data) {
if ((0, AbstractEventMessage_1.isEventMessageOptionsWithType)(data, this.__type)) {
this.setOptionsOrDefault(data);
if (data.payload)
this.setPayload(data.payload);
}
return this;
}
}
exports.EventMessageGeneric = EventMessageGeneric;
//# sourceMappingURL=EventMessageGeneric.js.map
;