project.ts 691 B

1234567891011121314151617181920212223242526272829303132
  1. import { MongoUser } from './user'
  2. import { Folder } from './folder'
  3. export type ProjectMember = {
  4. _id: string
  5. type: 'user'
  6. privileges: 'readOnly' | 'readAndWrite'
  7. name: string
  8. email: string
  9. }
  10. type ProjectInvite = {
  11. _id: string
  12. privileges: 'readOnly' | 'readAndWrite'
  13. name: string
  14. email: string
  15. }
  16. export type Project = {
  17. _id: string
  18. name: string
  19. features: Record<string, unknown>
  20. publicAccesLevel?: string
  21. tokens: Record<string, unknown>
  22. owner: MongoUser
  23. members: ProjectMember[]
  24. invites: ProjectInvite[]
  25. // `rootDoc_id` in the backend; `rootDocId` in the frontend
  26. rootDocId?: string
  27. rootFolder?: Folder[]
  28. deletedByExternalDataSource?: boolean
  29. }