package com.cameleer.server.app.alerting.dto;

import com.cameleer.server.core.alerting.WebhookBinding;

import java.util.Map;
import java.util.UUID;

public record WebhookBindingResponse(
        UUID id,
        UUID outboundConnectionId,
        String bodyOverride,
        Map<String, String> headerOverrides
) {
    public static WebhookBindingResponse from(WebhookBinding wb) {
        return new WebhookBindingResponse(
                wb.id(), wb.outboundConnectionId(), wb.bodyOverride(), wb.headerOverrides());
    }
}
