package dto

import "github.com/tidbcloud/AgentTeam/internal/trigger"

// TriggerMutationRequest creates or updates a browser-facing trigger.
type TriggerMutationRequest struct {
	Name                  string                        `json:"name"`
	Source                trigger.SourceInput           `json:"source"`
	Target                trigger.TargetInput           `json:"target"`
	MessageTemplate       string                        `json:"messageTemplate"`
	Mentions              []MessageMentionHint          `json:"mentions,omitempty"`
	HumanNotificationMode trigger.HumanNotificationMode `json:"humanNotificationMode,omitempty"`
}

// TriggerValidateRequest validates a trigger mutation, optionally against an existing trigger.
type TriggerValidateRequest struct {
	TriggerID string `json:"triggerId"`
	TriggerMutationRequest
}

// TriggerListResponse returns trigger definitions.
type TriggerListResponse []trigger.TriggerView

// TriggerRunListResponse returns trigger run history.
type TriggerRunListResponse []trigger.RunView

// TriggerDeleteResponse reports a deleted trigger.
type TriggerDeleteResponse struct {
	Deleted bool `json:"deleted"`
}
