attachment.ts 1006 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. export const AttachmentType = {
  2. BRAND_LOGO: 'BRAND_LOGO',
  3. WIKI_PAGE: 'WIKI_PAGE',
  4. PROFILE_IMAGE: 'PROFILE_IMAGE',
  5. PAGE_BULK_EXPORT: 'PAGE_BULK_EXPORT',
  6. } as const;
  7. export type AttachmentType = typeof AttachmentType[keyof typeof AttachmentType];
  8. export type ExpressHttpHeader<Field = string> = {
  9. field: Field,
  10. value: string | string[]
  11. };
  12. export type IContentHeaders = {
  13. contentType?: ExpressHttpHeader<'Content-Type'>;
  14. contentLength?: ExpressHttpHeader<'Content-Length'>;
  15. contentSecurityPolicy?: ExpressHttpHeader<'Content-Security-Policy'>;
  16. contentDisposition?: ExpressHttpHeader<'Content-Disposition'>;
  17. }
  18. export type RespondOptions = {
  19. download?: boolean,
  20. }
  21. export const ResponseMode = {
  22. RELAY: 'relay',
  23. REDIRECT: 'redirect',
  24. DELEGATE: 'delegate',
  25. } as const;
  26. export type ResponseMode = typeof ResponseMode[keyof typeof ResponseMode];
  27. export const FilePathOnStoragePrefix = {
  28. attachment: 'attachment',
  29. user: 'user',
  30. pageBulkExport: 'page-bulk-export',
  31. } as const;