package dispatch

import triageent "github.com/tidbcloud/aisupport/packages/sdk-go/contracts/entity/ticket-manager/triage"

type DispatchContext struct {
	IssueKey                    string                      `json:"issue_key"`
	Assignee                    string                      `json:"assignee"`
	AssigneeL2                  string                      `json:"assignee_l2"`
	Triage                      *triageent.Result           `json:"triage,omitempty"`
	TriageIssueUpdatedAt        *int64                      `json:"triage_issue_updated_at,omitempty"`
	TriageExecutionID           *uint64                     `json:"triage_execution_id,omitempty"`
	AssignmentNotificationState AssignmentNotificationState `json:"assignment_notification_state,omitempty"`
}

type AssignmentNotificationState struct {
	Assignee   *AssignmentNotificationRoleState `json:"assignee,omitempty"`
	L2Assignee *AssignmentNotificationRoleState `json:"l2_assignee,omitempty"`
}

type AssignmentNotificationRoleState struct {
	EscalationIntent         *AssignmentEscalationIntent `json:"escalation_intent,omitempty"`
	AutoEscalatedToAccountID string                      `json:"auto_escalated_to_account_id,omitempty"`
}

type AssignmentEscalationIntent struct {
	OwnerExecutionID uint64 `json:"owner_execution_id"`
	FromAccountID    string `json:"from_account_id"`
	ToAccountID      string `json:"to_account_id"`
	ToEmail          string `json:"to_email"`
	State            string `json:"state"`
}
