import { MessageType } from "../support/MessageType";
import { EventType } from "./EventType";
var EventFactory = /** @class */ (function () {
    function EventFactory(channelId) {
        this.channelId = channelId;
    }
    EventFactory.prototype.getRatingEvent = function (nodeToBeRated, score, attributes) {
        var eventType = EventType.withChannelId(EventType.PUBLISH, this.channelId);
        var payload = Object.assign(nodeToBeRated, { score: score });
        var type = MessageType.RATING;
        var eventPayload = { attributes: attributes, type: type, payload: payload };
        return { type: eventType, payload: eventPayload };
    };
    return EventFactory;
}());
export { EventFactory };
//# sourceMappingURL=EventFactory.js.map