import { BehaviorSubject } from "rxjs/internal/BehaviorSubject"; import { Subject, Subscription } from "rxjs"; import { FileViewer } from '../../models/common/fileViewer'; import { Contact } from "../contact.model"; /** * @enum * @name FileStorageType * @description This enum is used to represent the type of the storage (Rainbow or External) */ export declare enum FileStorageType { RAINBOW = "Rainbow", OWNCLOUD = "OwnCloud", NEXTCLOUD = "NextCloud" } export declare enum FileState { DELETED = "deleted", UPLOADING = "uploading", UPLOADED = "uploaded", NOT_UPLOADED = "not_uploaded", DOWNLOADING = "downloading", UPLOADERROR = "uploadError", UNKNOWN = "unknown" } declare class ThumbnailPlaceholder { icon: string; style: string; type: string; constructor(icon: string, style: string, type: string); } interface IThumbnail { availableThumbnail: boolean; md5sum: string; size: number; wantThumbnailDate: Date; isThumbnailAvailable(): boolean; } /** * This class is used to represent a File Descriptor or a Short File Descriptor which describes a file shared in a conversation (one-to-one or bubble). */ export declare class FileDescriptor { /** * @public * @property {string} id The file descriptor ID (File Descriptor only) * @readonly */ id: string; /** * @public * @property {string} path The file descriptor path * @readonly */ path: string; /** * @public * @property {string} type The file descriptor type (file or directory) * @readonly */ type: string; /** * @public * @property {string} url The file descriptor url (File Descriptor only) * @readonly */ url: string; /** * @public * @property {string} ownerId The ID of the owner (File Descriptor only) * @readonly */ ownerId: string; /** * @public * @property {string} owner The owner's contact (File Descriptor only) * @readonly */ owner: Contact; /** * @public * @property {string} fileName The name of the file * @readonly */ fileName: string; /** * @public * @property {string} fileNameToFilter The name of the file avfter dyacritis * @readonly */ fileNameToFilter: string; /** * @public * @property {string} extension The extension of the file * @readonly */ extension: string; /** * @public * @property {string} typeMIME The mime type of the file ('mime' in Short File Descriptor) * @readonly */ typeMIME: string; /** * @public * @property {string} size The size of the file (octets) * @readonly */ size: number; /** * @public * @property {object} registrationDate The creation date (File Descriptor only) * @readonly */ registrationDate: Date; /** * @public * @property {object} uploadedDate The upload date (File Descriptor only) * @readonly */ uploadedDate: Date; /** * @private * @property {object} dateToSort The date to sort (?) * @readonly */ dateToSort: Date; /** * @private * @property {boolean} externalStorage True if this fileDescriptor is linked to external storage * @readonly */ externalStorage: boolean; /** * @public * @property {string} transcriptionStatus the state of transcription * @readonly */ transcriptionStatus: string; /** * @public * @property {string} transcription the text of the transcription * @readonly */ transcription: string; /** * @public * @property {boolean} transcriptionAlreadyActivated To know if the transcription has been launched * @readonly */ transcriptionAlreadyActivated: boolean; /** * @private * @property {any[]} viewers The list of viewers (File Descriptor only) * @readonly */ private _viewers; get viewers(): FileViewer[]; set viewers(value: FileViewer[]); viewersSubject: BehaviorSubject; state: FileState; stateSubject: BehaviorSubject; fileToSend?: File; previewBlob?: Blob; previewBlobSubject: BehaviorSubject; blobOrientation?: any; blobOrientationSubject: BehaviorSubject; /** * @public * @property {number} original_h original image height * @description height of original image (for image only) */ original_h: number; /** * @public * @property {number} original_w original image width * @description weight of original image (for image only) */ original_w: number; /** * @private * @property {object} tags data for visual voice mails * @readonly */ tags: any; time: number; displayDate: any; /** * @public * @property {Subject} progressSubject Observable for download progress * @readonly */ progressSubject: Subject; /** * @public * @property {any} localURL ???? * @readonly */ localURL: any; cancelTransfertDefer: any; abortTransferController: AbortController; abortXMLHttpRequestArray: Function[]; fileTransferSubscription: Subscription; loadingRef: number[]; chunkTotalNumber: number; chunkPerformedPercent: number; chunkPercentArray: number[]; chunkPerformed: number; publicUrl: string; publicUrlExpirationDate: Date; chunkWrittenInDisk: number; writeStream: any; thumbnail: IThumbnail; /** * @public * @property {ThumbnailPlaceholder} thumbnailPlaceholder The thumbnail icon placeholder info * @readonly */ thumbnailPlaceholder: ThumbnailPlaceholder; /** * @public * @property {number} orientation image orientation * @description * There are four possible values for orientation and the image should be rotated acording to this value. * 1 -> rotate(0deg), * 3 -> rotate(180deg), * 6 -> rotate(90deg), * 8 -> rotate(270deg). */ orientation: number; /** * @public * @property {string} virusScanState Result of virus scan * @readonly */ virusScanState: string; /** * @public * @property {boolean} voiceMessage True when the file is a voice message * @readonly */ voiceMessage: boolean; /** * @public * @property {boolean} recordingFile Property indicating whether the file is a part of a recording file batch * @readonly */ recordingFile: boolean; /** * @public * @property {string} recordingConferenceId ID of the recording conference. If the file is a recording file it indicates the ID of the conference * @readonly */ recordingConferenceId: string; /** * @public * @property {boolean} voiceMessage True when the preview is downloaded * @readonly */ previewDownloaded: boolean; private constructor(); static create(id: string, url: string, ownerId: string, fileName: string, extension: string, mime: string, size: number, registrationDate: Date, uploadedDate: Date, dateToSort: Date, viewers: any, state: FileState, thumbnail: IThumbnail, orientation: number, original_w: number, original_h: number, tags: any, virusScanState: any, voiceMessage: any, recordingFile: boolean, recordingConferenceId: string, transcriptionStatus: string, transcription: string): FileDescriptor; static createFromExternalStorageData(data: any): FileDescriptor; isMicrosoftFile(): boolean; isRainbowStorage(): boolean; isThumbnailPossible(): boolean; isJavaScript(): boolean; isText(): boolean; isLog(): boolean; isMarkdown(): boolean; isPDF(): boolean; isVideo(): boolean; isSVG(): boolean; isImage(): boolean; isAudioVideo(): boolean; isUploaded(): boolean; isPublicUrlExpired(): boolean; isAlreadyFileViewer(viewerId: string): boolean; getDisplayName(): string; getDisplayNameTruncated(): string[]; getExtension(): string; getDuration(): number; getThumbnailPlaceholderFromMimetype(mime: string): ThumbnailPlaceholder; releaseURL(): void; setState(newState: FileState): void; setOriginalImageDimensions(width: number, height: number): void; update(fd: FileDescriptor): void; getDate(): Date; private refreshFilePercent; updateProgressInfo(): void; isInfected(): boolean; isSoleFileViewer(fileViewerId: string): boolean; } export {}; //# sourceMappingURL=fileDescriptor.d.ts.map