activity.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. export default {
  2. createdAt: { type: Date, default: Date.now, required: true },
  3. hidden: { type: Boolean, default: false, required: true },
  4. userId: { type: String, required: true },
  5. type: {
  6. type: String,
  7. enum: [
  8. /** User */
  9. "user__joined",
  10. "user__edit_bio",
  11. "user__edit_avatar",
  12. "user__edit_name",
  13. "user__edit_location",
  14. "user__toggle_nightmode",
  15. "user__toggle_autoskip_disliked_songs",
  16. /** Songs */
  17. "song__report",
  18. "song__like",
  19. "song__dislike",
  20. "song__unlike",
  21. "song__undislike",
  22. /** Stations */
  23. "station__favorite",
  24. "station__unfavorite",
  25. "station__create",
  26. "station__remove",
  27. "station__edit_name",
  28. "station__edit_display_name",
  29. "station__edit_description",
  30. "station__edit_theme",
  31. "station__edit_privacy",
  32. "station__edit_genres",
  33. "station__edit_blacklisted_genres",
  34. /** Playlists */
  35. "playlist__create",
  36. "playlist__remove",
  37. "playlist__remove_song",
  38. "playlist__remove_songs",
  39. "playlist__add_song",
  40. "playlist__add_songs",
  41. "playlist__edit_privacy",
  42. "playlist__edit_display_name",
  43. "playlist__import_playlist"
  44. ],
  45. required: true
  46. },
  47. payload: {
  48. message: { type: String, default: "", required: true },
  49. thumbnail: { type: String, required: false },
  50. songId: { type: String, required: false },
  51. stationId: { type: String, required: false },
  52. playlistId: { type: String, required: false }
  53. },
  54. documentVersion: { type: Number, default: 1, required: true }
  55. };