files.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import { BinaryFile } from '@/features/file-view/types/binary-file'
  2. export const textFile: BinaryFile<'project_file'> = {
  3. _id: 'text-file',
  4. id: 'text-file',
  5. name: 'example.tex',
  6. linkedFileData: {
  7. v1_source_doc_id: 'v1-source-id',
  8. source_project_id: 'source-project-id',
  9. source_entity_path: '/source-entity-path.ext',
  10. provider: 'project_file',
  11. },
  12. hash: '012345678901234567890123',
  13. created: new Date(2021, 1, 17, 3, 24).toISOString(),
  14. type: 'file',
  15. selected: true,
  16. }
  17. export const imageFile: BinaryFile<'project_file'> = {
  18. _id: '60097ca20454610027c442a8',
  19. id: '60097ca20454610027c442a8',
  20. name: 'file.jpg',
  21. linkedFileData: {
  22. source_project_id: 'source-project-id',
  23. source_entity_path: '/source-entity-path',
  24. provider: 'project_file',
  25. },
  26. hash: '012345678901234567890123',
  27. created: new Date(2021, 1, 17, 3, 24).toISOString(),
  28. type: 'file',
  29. selected: true,
  30. }
  31. export const urlFile: BinaryFile<'url'> = {
  32. _id: 'url-file',
  33. id: 'url-file',
  34. name: 'example.tex',
  35. linkedFileData: {
  36. url: 'https://overleaf.com',
  37. provider: 'url',
  38. },
  39. created: new Date(2021, 1, 17, 3, 24).toISOString(),
  40. hash: 'some-hash',
  41. type: 'file',
  42. selected: true,
  43. }
  44. export const projectOutputFile: BinaryFile<'project_output_file'> = {
  45. _id: 'project-output-file',
  46. id: 'project-output-file',
  47. name: 'example.pdf',
  48. linkedFileData: {
  49. v1_source_doc_id: 'v1-source-id',
  50. source_output_file_path: '/source-entity-path.ext',
  51. provider: 'project_output_file',
  52. source_project_id: 'source-project-id',
  53. },
  54. created: new Date(2021, 1, 17, 3, 24).toISOString(),
  55. hash: 'some-hash',
  56. type: 'file',
  57. selected: true,
  58. }