attachment.ts 830 B

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