import type { createDatabase } from "@prodobit/database"; import type { CreateAssetIssueRequest, UpdateAssetIssueRequest, AssetIssueQuery } from "@prodobit/types"; export declare class AssetIssueService { private db; constructor(db: ReturnType); /** * Get all asset issues for a tenant with optional filters */ getAssetIssues(tenantId: string, query?: AssetIssueQuery): Promise<{ id: string; description: string; status: string; insertedAt: Date; updatedAt: Date; deletedAt: Date | null; tenantId: string; category: string; location: string | null; assetId: string; assignedTo: string | null; title: string; severity: string; reportedBy: string; relatedTaskId: string | null; reportedAt: Date; acknowledgedAt: Date | null; resolvedAt: Date | null; closedAt: Date | null; estimatedResolutionTime: number | null; actualResolutionTime: number | null; resolutionNotes: string | null; rootCause: string | null; correctiveActions: string | null; preventiveActions: string | null; imageIds: string[] | null; documentIds: string[] | null; impactDescription: string | null; downtime: boolean | null; reportedByUser: { id: string; displayName: string | null; }; assignedToUser: { id: string; displayName: string | null; } | null; }[]>; /** * Get a single asset issue by ID */ getAssetIssueById(id: string, tenantId: string): Promise<{ id: string; description: string; status: string; insertedAt: Date; updatedAt: Date; deletedAt: Date | null; tenantId: string; category: string; location: string | null; assetId: string; assignedTo: string | null; title: string; severity: string; reportedBy: string; relatedTaskId: string | null; reportedAt: Date; acknowledgedAt: Date | null; resolvedAt: Date | null; closedAt: Date | null; estimatedResolutionTime: number | null; actualResolutionTime: number | null; resolutionNotes: string | null; rootCause: string | null; correctiveActions: string | null; preventiveActions: string | null; imageIds: string[] | null; documentIds: string[] | null; impactDescription: string | null; downtime: boolean | null; reportedByUser: { id: string; displayName: string | null; }; assignedToUser: { id: string; displayName: string | null; } | null; } | undefined>; /** * Create a new asset issue */ createAssetIssue(data: CreateAssetIssueRequest, tenantId: string, reportedBy: string): Promise<{ id: string; description: string; status: string; insertedAt: Date; updatedAt: Date; deletedAt: Date | null; tenantId: string; category: string; location: string | null; assetId: string; assignedTo: string | null; title: string; severity: string; reportedBy: string; relatedTaskId: string | null; reportedAt: Date; acknowledgedAt: Date | null; resolvedAt: Date | null; closedAt: Date | null; estimatedResolutionTime: number | null; actualResolutionTime: number | null; resolutionNotes: string | null; rootCause: string | null; correctiveActions: string | null; preventiveActions: string | null; imageIds: string[] | null; documentIds: string[] | null; impactDescription: string | null; downtime: boolean | null; }>; /** * Update an asset issue */ updateAssetIssue(id: string, tenantId: string, data: UpdateAssetIssueRequest): Promise<{ id: string; tenantId: string; assetId: string; title: string; description: string; category: string; severity: string; status: string; reportedBy: string; assignedTo: string | null; relatedTaskId: string | null; reportedAt: Date; acknowledgedAt: Date | null; resolvedAt: Date | null; closedAt: Date | null; estimatedResolutionTime: number | null; actualResolutionTime: number | null; resolutionNotes: string | null; rootCause: string | null; correctiveActions: string | null; preventiveActions: string | null; imageIds: string[] | null; documentIds: string[] | null; location: string | null; impactDescription: string | null; downtime: boolean | null; insertedAt: Date; updatedAt: Date; deletedAt: Date | null; }>; /** * Delete (soft delete) an asset issue */ deleteAssetIssue(id: string, tenantId: string): Promise<{ id: string; tenantId: string; assetId: string; title: string; description: string; category: string; severity: string; status: string; reportedBy: string; assignedTo: string | null; relatedTaskId: string | null; reportedAt: Date; acknowledgedAt: Date | null; resolvedAt: Date | null; closedAt: Date | null; estimatedResolutionTime: number | null; actualResolutionTime: number | null; resolutionNotes: string | null; rootCause: string | null; correctiveActions: string | null; preventiveActions: string | null; imageIds: string[] | null; documentIds: string[] | null; location: string | null; impactDescription: string | null; downtime: boolean | null; insertedAt: Date; updatedAt: Date; deletedAt: Date | null; }>; /** * Get issues by asset ID */ getIssuesByAsset(assetId: string, tenantId: string): Promise<{ id: string; description: string; status: string; insertedAt: Date; updatedAt: Date; deletedAt: Date | null; tenantId: string; category: string; location: string | null; assetId: string; assignedTo: string | null; title: string; severity: string; reportedBy: string; relatedTaskId: string | null; reportedAt: Date; acknowledgedAt: Date | null; resolvedAt: Date | null; closedAt: Date | null; estimatedResolutionTime: number | null; actualResolutionTime: number | null; resolutionNotes: string | null; rootCause: string | null; correctiveActions: string | null; preventiveActions: string | null; imageIds: string[] | null; documentIds: string[] | null; impactDescription: string | null; downtime: boolean | null; reportedByUser: { id: string; displayName: string | null; }; assignedToUser: { id: string; displayName: string | null; } | null; }[]>; /** * Get critical/high severity open issues */ getCriticalIssues(tenantId: string): Promise<{ id: string; description: string; status: string; insertedAt: Date; updatedAt: Date; deletedAt: Date | null; tenantId: string; category: string; location: string | null; assetId: string; assignedTo: string | null; title: string; severity: string; reportedBy: string; relatedTaskId: string | null; reportedAt: Date; acknowledgedAt: Date | null; resolvedAt: Date | null; closedAt: Date | null; estimatedResolutionTime: number | null; actualResolutionTime: number | null; resolutionNotes: string | null; rootCause: string | null; correctiveActions: string | null; preventiveActions: string | null; imageIds: string[] | null; documentIds: string[] | null; impactDescription: string | null; downtime: boolean | null; reportedByUser: { id: string; displayName: string | null; }; assignedToUser: { id: string; displayName: string | null; } | null; }[]>; /** * Get issue statistics for a tenant */ getIssueStatistics(tenantId: string): Promise<{ status: string; severity: string; count: number; }[]>; } //# sourceMappingURL=service.d.ts.map