import { Query } from '@nestjs/cqrs'; import { AttachmentReadModel } from '@task-stream/api/tracker/domain'; import type { Readable } from 'node:stream'; export interface AttachmentDownload { attachment: AttachmentReadModel; content: Readable; } /** A ticket's file, for whoever can read the ticket. */ export class GetAttachmentQuery extends Query { constructor( /** Null: anonymous (public projects only). */ public readonly viewerId: string | null, public readonly issueId: string, public readonly attachmentId: string, ) { super(); } }