Express TS project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 line
1.1 KiB

  1. export type IWord = {
  2. name: string,
  3. pronounciation: {
  4. text: string,
  5. audio: string, // URL for the audio file
  6. },
  7. similarWords: Array<IWord>,
  8. gramaticalDetails: Array<{
  9. type: 'NOUN' | 'PRONOUN' | 'ADJECTIVE' | 'VERB' | 'ADVERB' | 'PREPOSITION' | 'CONJUNCTION' | 'INTERJECTION',
  10. description: string,
  11. examples: Array<string>,
  12. }>
  13. }
  14. export type IShelf = {
  15. name: string,
  16. description: string,
  17. viewType: 'PUBLIC' | 'PRIVATE' | 'FRIENDS' | 'FOLLOWERS',
  18. isArchived: boolean,
  19. addedWords: Array<{
  20. word: IWord,
  21. notes: Array<string>,
  22. isFavourite: boolean,
  23. nextRevisionDateTime: Date,
  24. revisionHistory : Array<{
  25. day: Date,
  26. wasRecallSuccessful: boolean,
  27. }>
  28. }>
  29. }
  30. export type ICategory = {
  31. name: string,
  32. icon: string,
  33. shelves: Array<IShelf>,
  34. isArchived: boolean,
  35. }
  36. export type IUser = {
  37. // For Auth purposes
  38. _id: string,
  39. name: string,
  40. email: string,
  41. password: string,
  42. isVerified: boolean,
  43. otp: number,
  44. // Other records
  45. categories: Array<ICategory>
  46. }