import type { CompleteMultipartUploadOutput } from '@aws-sdk/client-s3'; import { AptlyDocumentAccess, AptlyDocumentType } from '../enums/index.js'; import { AptlyBaseSchema, AptlyDBCrawlerCleaner } from './extends.js'; import { AptlyProductSchema } from './product.js'; import { AptlyOrganizationSchema } from './organization'; export type AptlyDocument = AptlyDocumentSchema; export interface AptlyDocumentSchema extends Omit, 'archived'>, AptlyDBCrawlerCleaner { mime: string; access?: AptlyDocumentAccess; _type: AptlyDocumentType; data: string; organization: ID | AptlyOrganizationSchema | null; project: ID | null; unit: ID | null; product: ID | AptlyProductSchema | null; text?: string; size: number; thirdPartyUploader: string | null; thirdPartyId: string | null; public_id?: string; external_url?: string; uploadSignature?: string; boligmappaStatus?: AptlyDocumentSchemaBoligmappaStatusSchema[]; chunks?: (AptlyDocumentSchema | ID)[]; s3: AptlyDocumentS3; previews: AptlyDocumentPreviewSchema[]; isPasswordProtected?: boolean; expires?: DATE | null; downloadToken?: string; previewUrl?: string; created: DATE; } export interface AptlyDocumentPreviewSchema { _id: ID; contentType: string; name: string; height: number; width: number; size: number; s3: AptlyDocumentS3; createdAt: DATE; } export type AptlyDocumentS3 = Pick & { ETag?: string; }; export type AptlyDocumentSchemaBoligmappaStatus = AptlyDocumentSchemaBoligmappaStatusSchema; export interface AptlyDocumentSchemaBoligmappaStatusSchema { _id: ID; unit: ID; id?: number; errorCode?: number; }