// reports.models.ts /** Enum, backend ile birebir (0..4) */ export enum ReportParameterType { Text = 0, Number = 1, Date = 2, Email = 3, Url = 4, } /** ---- API MODELLERİ (Raw JSON) ---- */ /** Not: Tarihler API’den ISO string olarak gelir (Date değil) */ export interface ReportParameterDto { id: string reportTemplateId: string name: string placeholder?: string type: ReportParameterType // enum (0..4) defaultValue?: string required: boolean description?: string } export interface ReportTemplateDto { id: string name: string description?: string htmlContent: string category?: string tags: string[] parameters: ReportParameterDto[] // FullAuditedEntityDto alanları creationTime: string // ISO lastModificationTime?: string // ISO | undefined creatorId?: string lastModifierId?: string } export interface GeneratedReportDto { id: string templateId?: string | null templateName: string generatedContent: string parameters: Record generatedAt: string // ISO // FullAuditedEntityDto alanları creationTime: string // ISO lastModificationTime?: string // ISO | undefined creatorId?: string lastModifierId?: string template?: ReportTemplateDto // dolu gelebilir } /** Create / Update input’ları */ export interface CreateReportParameterDto { name: string placeholder?: string type: ReportParameterType defaultValue?: string required: boolean description?: string } export interface UpdateReportParameterDto extends CreateReportParameterDto { id?: string // opsiyonel } export interface CreateReportTemplateDto { name: string description?: string htmlContent: string category?: string tags?: string[] parameters: CreateReportParameterDto[] } export interface UpdateReportTemplateDto { name: string description?: string htmlContent: string category?: string tags?: string[] parameters: UpdateReportParameterDto[] } /** Generate input’u */ export interface GenerateReportDto { templateId: string parameters: Record } /** List input’ları (query string) */ export interface GetReportTemplatesInput { skipCount?: number maxResultCount?: number sorting?: string filter?: string category?: string } export interface GetGeneratedReportsInput { skipCount?: number maxResultCount?: number sorting?: string filter?: string templateId?: string } /** (Opsiyonel) Paged wrapper — projende zaten varsa bunu kullanmana gerek yok */ export interface PagedResultDto { items: T[] totalCount: number }