package auditlog

const (
	HeaderAuthorizationGRPC = "authorization"
	TokenTypeBearer         = "bearer"
	HeaderAuthorizationGIN  = "Authorization"
	HeaderXForwardedFor     = "X-Forwarded-For"
	HeaderXAuthType         = "X-Auth-Type"
	HeaderXAuthContent      = "X-Auth-Content"
)

const (
	EventBusAppName = "auditlog"
	EventBusGroup   = "consumer"

	EventBusEventType = "auditlog"
)

const (
	OperatorTypeUnknown OperatorType = iota
	OperatorTypeUser
	OperatorTypeAPIKey
)

const (
	ResultUnknown Result = iota
	ResultSuccess
	ResultFailed
)

const (
	ClusterTypeUnknown ClusterType = iota
	ClusterTypeServerless
	ClusterTypeDedicated
)

// types defined in doc: https://pingcap.feishu.cn/wiki/wikcnNLaLvAkEJ3DPOGTPXImKAd
// !!! notice：The new event must be at the end
const (
	EventUnknown EventType = iota
	EventRegistration
	EventActivation
	EventForgotPassword
	EventResetPassword
	EventLogin
	EventLogout
	EventUpdateProfile
	EventSetMFA
	EventChangePassword
	EventCreateOrg
	EventLoginOrg
	EventSwitchOrg
	EventLogoutOrg
	EventInviteUserToOrg
	EventDeleteInvitationToOrg
	EventResendInvitationToOrg
	EventConfirmJoinOrg
	EventDeleteUserFromOrg
	EventUpdateUserRole
	EventCreateAPIKey
	EventEditAPIKey
	EventDeleteAPIKey
	EventUpdateTimezone
	EventShowBill
	EventDownloadBill
	EventShowCredits
	EventAddPaymentCard
	EventUpdatePaymentCard
	EventDeletePaymentCard
	EventSetDefaultPaymentCard
	EventEditBillingProfile
	EventContractAction
	EventEnableConsoleAuditLog
	EventShowConsoleAuditLog
	EventInviteUserToProject
	EventDeleteInvitationToProject
	EventResendInvitationToProject
	EventConfirmJoinProject
	EventDeleteUserFromProject
	EventCreateProject
	EventCreateProjectCIDR
	EventCreateAWSVPCPeering
	EventDeleteAWSVPCPeering
	EventCreateGCPVPCPeering
	EventDeleteGCPVPCPeering
	EventCreatePrivateEndpoint
	EventEditPrivateEndpoint
	EventDeletePrivateEndpoint
	EventSubscribeAlerts
	EventUnsubscribeAlerts
	EventCreateDatadogIntegration
	EventDeleteDatadogIntegration
	CreateVercelIntegration
	DeleteVercelIntegration
	CreatePrometheusIntegration
	DeletePrometheusIntegration
	EventCreateCluster
	EventCreateAWSDedicatedCluster // Deprecated
	EventCreateGCPDedicatedCluster // Deprecated
	EventDeleteCluster
	EventPauseCluster
	EventResumeCluster
	EventScaleCluster
	EventDownloadTiDBClusterCA
	EventOpenWebSQLConsole
	EventSetRootPassword
	EventUpdateIPAccessList
	EventDeleteAccessList
	EventSetAutoBackup
	EventDoManualBackup
	EventDeleteBackupTask
	EventDeleteBackup
	EventRecoverFromBackup
	EventRecoverFromTrash
	EventImportDataFromAWS
	EventImportDataFromGCP
	EventCreateMigrationJob
	EventSuspendMigrationJob
	EventResumeMigrationJob
	EventDeleteMigrationJob
	EventShowDiagnose
	EventDBAuditLogAction
	EventAddDBAuditFilter
	EventDeleteDBAuditFilter
	EventEditProject
	EventDeleteProject
	EventBindSupportPlan
	EventCancelSupportPlan
	EventUpdateOrgName
	EventCreatePrivateEndpointService
	EventDeletePrivateEndpointService
	EventImportDataFromLocal
	EventCreateNewrelicIntegration
	EventDeleteNewrelicIntegration
	EventUpdateAlertRule
	EventSetServerlessSpendLimit
	EventUpdateMaintenanceWindow
	EventDeferMaintenanceTask
	EventEnableCloudOrganizationSSO
	EventEnableAuthenticationMethod
	EventDisableAuthenticationMethod
	EventUpdateAuthenticationMethod
	EventEnterChat2Query
	EventConsoleChat2SQLFromChat2Query
	EventConsoleQuerySQLFromChat2Query
	EventCreateSQLFileFromChat2Query
	EventDeleteSQLFileFromChat2Query
	EventCreateBranch
	EventDeleteBranch
	EventSetBranchRootPassword
	EventCreateSQLUser
	EventUpdateSQLUser
	EventDeleteSQLUser
	EventConnectBranchGitHub
	EventDisconnectBranchGitHub
	EventUpdateCluster
	EventCreateAccesspoint
	EventUpdateAccesspoint
	EventDeleteAccesspoint
	EventRestoreFromPITR
	EventUpdateProjectCIDR
	EventDeleteProjectCIDR
	EventResetBranch
	EventUpdateBranch
