import { ITicketAuditedEntity } from './Common'; export declare enum TicketApprovalMode { SEQUENTIAL = "SEQUENTIAL", PARALLEL = "PARALLEL" } export declare enum TicketApprovalStatus { PENDING = "PENDING", IN_PROGRESS = "IN_PROGRESS", APPROVED = "APPROVED", REJECTED = "REJECTED", CANCELLED = "CANCELLED", EXPIRED = "EXPIRED" } export declare enum TicketApprovalDecisionType { APPROVE = "APPROVE", REJECT = "REJECT", ABSTAIN = "ABSTAIN" } export declare enum TicketApprovalQuorumType { ALL = "ALL", ANY = "ANY", COUNT = "COUNT", PERCENTAGE = "PERCENTAGE" } export interface ITicketApprovalQuorum { type: TicketApprovalQuorumType; requiredCount?: number; requiredPercentage?: number; rejectOnAnyRejection?: boolean; } export type ITicketApprover = { type: 'USER'; userId: string; } | { type: 'GROUP'; groupId: string; } | { type: 'ROLE'; roleId: string; }; export interface ITicketApprovalStepDefinition { id: string; name: string; order: number; approvers: ITicketApprover[]; quorum: ITicketApprovalQuorum; expiresAfterMinutes?: number; allowDelegation: boolean; escalationPolicyId?: string; } export interface ITicketApprovalProcessDefinition extends ITicketAuditedEntity { name: string; description?: string; categoryIds?: string[]; mode: TicketApprovalMode; steps: ITicketApprovalStepDefinition[]; enabled: boolean; } export interface ITicketApprovalStep extends ITicketApprovalStepDefinition { status: TicketApprovalStatus; startedAt?: Date; expiresAt?: Date; completedAt?: Date; } export interface ITicketApprovalProcess { id: string; spaceId: string; ticketId: string; definitionId?: string; definitionVersion?: number; name: string; mode: TicketApprovalMode; status: TicketApprovalStatus; steps: ITicketApprovalStep[]; currentStepId?: string; requestedAt: Date; requestedBy: string; completedAt?: Date; cancelledAt?: Date; } export interface ITicketApprovalDecision { id: string; spaceId: string; ticketId: string; processId: string; stepId: string; approverId: string; decision: TicketApprovalDecisionType; comment?: string; attachmentIds?: string[]; decidedAt: Date; delegatedFromUserId?: string; } export interface ITicketApprovalDelegation { id: string; spaceId: string; ticketId: string; processId: string; stepId: string; fromUserId: string; toUserId: string; reason?: string; delegatedAt: Date; expiresAt?: Date; revokedAt?: Date; } export interface ITicketApprovalSummary { pending: number; approved: number; rejected: number; expired: number; currentProcessId?: string; } export interface IStartTicketApprovalDto { expectedVersion: number; definitionId: string; comment?: string; } export interface IDecideTicketApprovalDto { expectedVersion: number; processId: string; stepId: string; decision: TicketApprovalDecisionType; comment?: string; attachmentIds?: string[]; } export interface IDelegateTicketApprovalDto { expectedVersion: number; processId: string; stepId: string; toUserId: string; reason?: string; expiresAt?: Date; } export interface ICancelTicketApprovalDto { expectedVersion: number; processId: string; reason: string; }