package document import ( "time" "queryorchestration/internal/serviceconfig" "github.com/google/uuid" ) // DocumentSummary contains minimal document identification info. type DocumentSummary struct { ID uuid.UUID ClientID string Hash string } // DocumentExternal contains document info for external API responses. // Note: Query functionality (Fields) has been removed. See remove_query_plan.md for details. type DocumentExternal struct { Id uuid.UUID ClientID string Hash string } // DocumentEnriched contains full document details including metadata, labels, and optionally text record. // Used by GET /document/{id} endpoint. // Note: Query functionality (Fields) has been removed. See remove_query_plan.md for details. type DocumentEnriched struct { ID uuid.UUID ClientID string Hash string HasTextRecord bool FolderID *uuid.UUID Filename *string OriginalPath *string Labels []LabelRecord TextRecord *TextRecord // Only populated when includeTextRecord=true FileSizeBytes *int64 // File size in bytes (nil for legacy documents) } // LabelRecord represents a label applied to a document. type LabelRecord struct { ID uuid.UUID DocumentID uuid.UUID Label string AppliedBy string AppliedAt time.Time } // TextRecord represents the field extraction response for a document. // This mirrors the FieldExtractionResponse from the API. type TextRecord struct { ID uuid.UUID DocumentID uuid.UUID Version int32 SingleFields interface{} ArrayFields interface{} CreatedAt time.Time CreatedBy string } // Service provides document-related operations. type Service struct { cfg serviceconfig.ConfigProvider } // New creates a new Document service instance. func New(cfg serviceconfig.ConfigProvider) *Service { return &Service{ cfg, } }