import { MessageStatus, ErrorCategory } from '../enums'; /** * Engraving line output format * Used when generating the output JSON file */ export interface EngravingLineOutput { [key: string]: string; } /** * Message Entity * Represents an engraving job message in the domain with business logic. * * Input format (from queue): * { sku, template, lines: ["text1", "text2"], target_folder } * * Output format (generated JSON file): * { sku, template, Engraving: [{Line1: "text1"}, {Line2: "text2"}] } */ export declare class MessageEntity { id: string; pgmq_message_id: number; sku: string; template: string; lines: string[]; target_folder: string; status: MessageStatus; received_at: Date; processing_started_at?: Date; processing_completed_at?: Date; total_duration_ms?: number; output_file_path?: string; error_message?: string; error_category?: ErrorCategory; retry_count?: number; created_at?: Date; updated_at?: Date; deleted_from_queue_at?: Date; processed_by_instance_id?: string; processed_by_instance_name?: string; processed_by_hostname?: string; processed_by_platform?: string; constructor(id: string, pgmq_message_id: number, sku: string, template: string, lines: string[], target_folder: string, status: MessageStatus, received_at: Date, instanceId?: string, instanceName?: string, hostname?: string, platform?: string); /** * Marks the message as processing */ markAsProcessing(): void; /** * Marks the message as completed * @param outputFilePath - Path where the JSON file was created (optional) */ markAsCompleted(outputFilePath?: string): void; /** * Transforms the lines array into the engraving output format. * Converts ["text1", "text2"] to {Line1: "text1", Line2: "text2"} * @returns Single object with all lines as Line1, Line2, etc. properties */ getEngravingOutput(): EngravingLineOutput; /** * Generates the complete output object for JSON file creation. * Output format: { sku, template, Engraving: [{Line1: "...", Line2: "..."}] } * @returns Object matching the output JSON format */ getOutputJson(): { sku: string; template: string; Engraving: EngravingLineOutput[]; }; /** * Marks the message as failed with error details * @param errorMessage - Error message * @param errorCategory - Category of the error */ markAsFailed(errorMessage: string, errorCategory: ErrorCategory): void; /** * Marks the message as deleted from the queue */ markAsDeletedFromQueue(): void; /** * Checks if the message is completed * @returns true if completed, false otherwise */ isCompleted(): boolean; /** * Checks if the message failed * @returns true if failed, false otherwise */ isFailed(): boolean; } //# sourceMappingURL=message.entity.d.ts.map