attachment.ts 661 B

12345678910111213141516171819202122232425
  1. import type { Ref } from './common';
  2. import { HasObjectId } from './has-object-id';
  3. import type { IPage } from './page';
  4. import type { IUser } from './user';
  5. export type IAttachment = {
  6. page?: Ref<IPage>,
  7. creator?: Ref<IUser>,
  8. filePath?: string, // DEPRECATED: remains for backward compatibility for v3.3.x or below
  9. fileName: string,
  10. fileFormat: string,
  11. fileSize: number,
  12. originalName: string,
  13. temporaryUrlCached?: string,
  14. temporaryUrlExpiredAt?: Date,
  15. attachmentType: string,
  16. createdAt: Date,
  17. // virtual property
  18. filePathProxied: string,
  19. downloadPathProxied: string,
  20. };
  21. export type IAttachmentHasId = IAttachment & HasObjectId;