activity.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. "user__toggle_activity_watch",
  17. /** Songs */
  18. "song__report",
  19. "song__like",
  20. "song__dislike",
  21. "song__unlike",
  22. "song__undislike",
  23. /** Stations */
  24. "station__favorite",
  25. "station__unfavorite",
  26. "station__create",
  27. "station__remove",
  28. "station__edit_name",
  29. "station__edit_display_name",
  30. "station__edit_description",
  31. "station__edit_theme",
  32. "station__edit_privacy",
  33. "station__edit_genres",
  34. "station__edit_blacklisted_genres",
  35. /** Playlists */
  36. "playlist__create",
  37. "playlist__remove",
  38. "playlist__remove_song",
  39. "playlist__remove_songs",
  40. "playlist__add_song",
  41. "playlist__add_songs",
  42. "playlist__edit_privacy",
  43. "playlist__edit_display_name",
  44. "playlist__import_playlist"
  45. ],
  46. required: true
  47. },
  48. payload: {
  49. message: { type: String, default: "", required: true },
  50. thumbnail: { type: String, required: false },
  51. mediaSource: { type: String, required: false },
  52. stationId: { type: String, required: false },
  53. playlistId: { type: String, required: false },
  54. reportId: { type: String, required: false }
  55. },
  56. documentVersion: { type: Number, default: 3, required: true }
  57. };