import type { PaginatedResult } from '../../types/pagination';
export interface TicketAssigneeDto {
    userId: string;
    email: string;
    fullName: string;
    isPrimary: boolean;
    assignedViaGroupId?: string;
    assignedViaGroupName?: string;
    assignedAt?: string;
}
export interface TicketListDto {
    id: string;
    ticketNumber: string;
    title: string;
    type: string;
    status: string;
    priority: string;
    createdByUserId: string;
    createdByName?: string;
    assignedToUserId?: string;
    assignedToName?: string;
    commentCount: number;
    assigneeCount: number;
    createdAt: string;
    updatedAt?: string;
    slaResponseDueAt?: string;
    slaResolutionDueAt?: string;
    slaResponseBreached?: boolean;
    slaResolutionBreached?: boolean;
    escalationLevel?: string;
    tenantId?: string;
    tenantName?: string;
    tenantSlug?: string;
    externalProvider?: string;
    externalId?: string;
    externalUrl?: string;
    isExternallyManaged?: boolean;
}
export interface TicketDetailDto {
    id: string;
    ticketNumber: string;
    title: string;
    description: string;
    type: string;
    status: string;
    priority: string;
    createdBy?: UserInfoDto;
    assignedTo?: UserInfoDto;
    resolution?: string;
    resolvedAt?: string;
    closedAt?: string;
    comments: CommentDto[];
    attachments: AttachmentDto[];
    assignees?: TicketAssigneeDto[];
    createdAt: string;
    updatedAt?: string;
    clientContext?: ClientContextDto;
    tenantId?: string;
    tenantName?: string;
    tenantSlug?: string;
    externalProvider?: string;
    externalId?: string;
    externalUrl?: string;
    isExternallyManaged?: boolean;
}
export interface TicketingProviderInfoDto {
    provider: string;
    isConfigured: boolean;
    glpiBaseUrl?: string;
}
export interface UserInfoDto {
    id: string;
    email: string;
    fullName: string;
}
export interface CommentDto {
    id: string;
    userId: string;
    userName: string;
    content: string;
    isInternal: boolean;
    isEdited: boolean;
    createdAt: string;
    updatedAt?: string;
}
export interface AttachmentDto {
    id: string;
    fileName: string;
    contentType: string;
    fileSize: number;
    createdAt: string;
}
export interface TicketActivityDto {
    id: string;
    action: TicketActivityAction;
    fieldChanged?: string;
    oldValue?: string;
    newValue?: string;
    changedByUserId?: string;
    changedByUserName?: string;
    createdAt: string;
}
export type TicketActivityAction = 'Created' | 'StatusChanged' | 'PriorityChanged' | 'Assigned' | 'Unassigned' | 'Commented' | 'InternalCommented' | 'AttachmentAdded' | 'AttachmentRemoved' | 'Resolved' | 'Closed' | 'Reopened' | 'Rejected' | 'SlaResponseBreached' | 'SlaResolutionBreached' | 'Escalated' | 'TitleChanged' | 'DescriptionChanged' | 'TypeChanged' | 'SatisfactionSubmitted';
export interface TicketStatsDto {
    total: number;
    open: number;
    inProgress: number;
    onHold: number;
    resolved: number;
    closed: number;
    critical: number;
    highPriority: number;
}
export interface GlpiSyncStatsDto {
    syncEnabled: boolean;
    syncIntervalMinutes: number;
    lastSyncAt: string | null;
    lastSyncError: string | null;
    totalMappedTickets: number;
    ticketsWithSyncErrors: number;
    ticketsSyncedOk: number;
    successRate: number;
}
export interface ClientContextDto {
    sourceUrl?: string;
    browser?: BrowserInfoDto;
    os?: OsInfoDto;
    device?: DeviceInfoDto;
    recentErrors?: ErrorInfoDto[];
    screenshotAttachmentId?: string;
}
export interface BrowserInfoDto {
    name?: string;
    version?: string;
    language?: string;
}
export interface OsInfoDto {
    name?: string;
    version?: string;
}
export interface DeviceInfoDto {
    type?: string;
    screenResolution?: string;
}
export interface ErrorInfoDto {
    message?: string;
    stack?: string;
    component?: string;
    timestamp?: string;
}
export interface CreateTicketRequest {
    title: string;
    description: string;
    type: TicketType;
    priority: TicketPriority;
    createdByUserId?: string;
    assignedToUserId?: string;
    clientContext?: ClientContextDto;
}
export interface UpdateTicketRequest {
    title: string;
    description: string;
    priority: TicketPriority;
}
export interface AddCommentRequest {
    content: string;
    isInternal?: boolean;
}
export type TicketType = 'Bug' | 'FeatureRequest' | 'Suggestion' | 'ApplicationRequest' | 'Support' | 'Question';
export type TicketStatus = 'Open' | 'InProgress' | 'OnHold' | 'Resolved' | 'Closed' | 'Rejected';
export type TicketPriority = 'Low' | 'Medium' | 'High' | 'Critical';
export interface GetTicketsParams {
    page?: number;
    pageSize?: number;
    search?: string;
    status?: TicketStatus;
    type?: TicketType;
    priority?: TicketPriority;
    assignedToUserId?: string;
    tenantId?: string;
}
export declare const supportApi: {
    tickets: {
        getAll: (params?: GetTicketsParams) => Promise<PaginatedResult<TicketListDto>>;
        getMyTickets: (params?: GetTicketsParams) => Promise<PaginatedResult<TicketListDto>>;
        getById: (id: string) => Promise<TicketDetailDto>;
        create: (data: CreateTicketRequest) => Promise<TicketDetailDto>;
        update: (id: string, data: UpdateTicketRequest) => Promise<TicketDetailDto>;
        updateStatus: (id: string, status: TicketStatus) => Promise<unknown>;
        assign: (id: string, assignedToUserId: string | null, userIds?: string[], groupIds?: string[]) => Promise<unknown>;
        resolve: (id: string, resolution: string) => Promise<unknown>;
        close: (id: string) => Promise<unknown>;
        reopen: (id: string) => Promise<unknown>;
        addComment: (id: string, data: AddCommentRequest) => Promise<CommentDto>;
        delete: (id: string) => Promise<unknown>;
        getStats: (tenantId?: string) => Promise<TicketStatsDto>;
        getMyAssignedStats: () => Promise<TicketStatsDto>;
        getAttachmentUrl: (ticketId: string, attachmentId: string) => string;
        downloadAttachment: (ticketId: string, attachmentId: string) => Promise<Blob>;
        uploadAttachment: (ticketId: string, file: File) => Promise<AttachmentDto>;
        getActivities: (ticketId: string, limit?: number) => Promise<TicketActivityDto[]>;
        getTicketingProvider: () => Promise<TicketingProviderInfoDto>;
        getGlpiSyncStats: () => Promise<GlpiSyncStatsDto | null>;
    };
};
export interface MyTicketListDto {
    id: string;
    ticketNumber: string;
    title: string;
    type: string;
    status: string;
    priority: string;
    commentCount: number;
    createdAt: string;
    updatedAt?: string;
    tenantId?: string;
    tenantName?: string;
    externalUrl?: string;
    isExternallyManaged?: boolean;
}
export interface MyTicketDetailDto {
    id: string;
    ticketNumber: string;
    title: string;
    description: string;
    type: string;
    status: string;
    priority: string;
    resolution?: string;
    resolvedAt?: string;
    closedAt?: string;
    comments: MyCommentDto[];
    attachments: MyAttachmentDto[];
    createdAt: string;
    updatedAt?: string;
    tenantId?: string;
    tenantName?: string;
}
export interface MyCommentDto {
    id: string;
    userName: string;
    content: string;
    isEdited: boolean;
    createdAt: string;
}
export interface MyAttachmentDto {
    id: string;
    fileName: string;
    fileSize: number;
    createdAt: string;
}
export interface MyTicketActivityDto {
    id: string;
    action: string;
    fieldChanged?: string;
    oldValue?: string;
    newValue?: string;
    createdAt: string;
}
export interface MyTicketStatsDto {
    total: number;
    open: number;
    inProgress: number;
    resolved: number;
    closed: number;
}
export interface MySatisfactionDto {
    id: string;
    rating: number;
    comment?: string;
    submittedAt: string;
}
export interface SubmitSatisfactionRequest {
    rating: number;
    comment?: string;
}
export interface CreateMyTicketRequest {
    title: string;
    description: string;
    type: TicketType;
    priority?: TicketPriority;
    clientContext?: ClientContextDto;
}
export interface UpdateMyTicketRequest {
    title: string;
    description: string;
    priority: TicketPriority;
}
export interface GetMyTicketsParams {
    page?: number;
    pageSize?: number;
    search?: string;
    status?: TicketStatus;
    type?: TicketType;
}
export declare const myTicketsApi: {
    getAll: (params?: GetMyTicketsParams) => Promise<PaginatedResult<MyTicketListDto>>;
    getById: (id: string) => Promise<MyTicketDetailDto>;
    create: (data: CreateMyTicketRequest) => Promise<MyTicketDetailDto>;
    update: (id: string, data: UpdateMyTicketRequest) => Promise<MyTicketDetailDto>;
    addComment: (id: string, content: string) => Promise<MyCommentDto>;
    getStats: () => Promise<MyTicketStatsDto>;
    uploadAttachment: (ticketId: string, file: File) => Promise<MyAttachmentDto>;
    downloadAttachment: (ticketId: string, attachmentId: string) => Promise<Blob>;
    deleteAttachment: (ticketId: string, attachmentId: string) => Promise<unknown>;
    getActivities: (ticketId: string, limit?: number) => Promise<MyTicketActivityDto[]>;
    getAttachmentUrl: (ticketId: string, attachmentId: string) => string;
    submitSatisfaction: (ticketId: string, data: SubmitSatisfactionRequest) => Promise<MySatisfactionDto>;
    getSatisfaction: (ticketId: string) => Promise<MySatisfactionDto | null>;
};
//# sourceMappingURL=ticketApi.d.ts.map