schema.graphql 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. # -----------------------------------------------
  2. # !!! THIS FILE WAS GENERATED BY TYPE-GRAPHQL !!!
  3. # !!! DO NOT MODIFY THIS FILE BY YOURSELF !!!
  4. # -----------------------------------------------
  5. type Admin {
  6. isKilled: Boolean!
  7. }
  8. type CategoryFeaturedVideos {
  9. categoryFeaturedVideos: [FeaturedVideo!]!
  10. categoryId: ID!
  11. }
  12. type ChannelFollowsInfo {
  13. follows: Int!
  14. id: ID!
  15. }
  16. type ChannelReportInfo {
  17. channelId: ID!
  18. createdAt: DateTime!
  19. id: ID!
  20. rationale: String!
  21. reporterIp: String!
  22. }
  23. enum ChannelReportOrderByInput {
  24. createdAt_ASC
  25. createdAt_DESC
  26. }
  27. input ChannelReportsWhereInput {
  28. channelId: ID
  29. createdAt_gt: DateTime
  30. createdAt_lt: DateTime
  31. reporterIp: String
  32. }
  33. """
  34. The javascript `Date` as string. Type represents date and time as the ISO Date string.
  35. """
  36. scalar DateTime
  37. type EntityViewsInfo {
  38. id: ID!
  39. views: Int!
  40. }
  41. type FeaturedVideo {
  42. videoCutUrl: String
  43. videoId: ID!
  44. }
  45. input FeaturedVideoInput {
  46. videoCutUrl: String
  47. videoId: ID!
  48. }
  49. type GeneratedSignature {
  50. """App signature converted to hexadecimal string."""
  51. signature: String!
  52. }
  53. type Mutation {
  54. """Add a single view to the target video's count"""
  55. addVideoView(categoryId: ID, channelId: ID!, videoId: ID!): EntityViewsInfo!
  56. """Add a single follow to the target channel"""
  57. followChannel(channelId: ID!): ChannelFollowsInfo!
  58. """Report a channel"""
  59. reportChannel(channelId: ID!, rationale: String!): ChannelReportInfo!
  60. """Report a video"""
  61. reportVideo(rationale: String!, videoId: ID!): VideoReportInfo!
  62. setCategoryFeaturedVideos(categoryId: ID!, videos: [FeaturedVideoInput!]!): [FeaturedVideo!]!
  63. setKillSwitch(isKilled: Boolean!): Admin!
  64. setVideoHero(newVideoHero: VideoHeroInput!): VideoHero!
  65. signAppActionCommitment(assets: String!, creatorId: String!, rawAction: String!, rawAppActionMetadata: String!): GeneratedSignature!
  66. """Remove a single follow from the target channel"""
  67. unfollowChannel(channelId: ID!): ChannelFollowsInfo!
  68. }
  69. type Query {
  70. """Set killed instance"""
  71. admin: Admin!
  72. """Get featured videos for all categories"""
  73. allCategoriesFeaturedVideos(videosLimit: Int!): [CategoryFeaturedVideos!]!
  74. """Get featured videos for a given video category"""
  75. categoryFeaturedVideos(categoryId: ID!): [FeaturedVideo!]!
  76. """Get list of most viewed categories in a given time period"""
  77. mostViewedCategories(
  78. limit: Int
  79. """timePeriodDays must take one of the following values: 7, 30"""
  80. timePeriodDays: Int!
  81. ): [EntityViewsInfo!]
  82. """Get list of most viewed categories of all time"""
  83. mostViewedCategoriesAllTime(limit: Int!): [EntityViewsInfo!]
  84. reportedChannels(limit: Int = 30, orderBy: ChannelReportOrderByInput = createdAt_DESC, skip: Int, where: ChannelReportsWhereInput): [ChannelReportInfo!]!
  85. reportedVideos(limit: Int = 30, orderBy: VideoReportOrderByInput = createdAt_DESC, skip: Int, where: VideoReportsWhereInput): [VideoReportInfo!]!
  86. """Get current video hero"""
  87. videoHero: VideoHero!
  88. }
  89. type VideoHero {
  90. heroPosterUrl: String!
  91. heroTitle: String!
  92. heroVideoCutUrl: String!
  93. videoId: ID!
  94. }
  95. input VideoHeroInput {
  96. heroPosterUrl: String!
  97. heroTitle: String!
  98. heroVideoCutUrl: String!
  99. videoId: ID!
  100. }
  101. type VideoReportInfo {
  102. createdAt: DateTime!
  103. id: ID!
  104. rationale: String!
  105. reporterIp: String!
  106. videoId: ID!
  107. }
  108. enum VideoReportOrderByInput {
  109. createdAt_ASC
  110. createdAt_DESC
  111. }
  112. input VideoReportsWhereInput {
  113. createdAt_gt: DateTime
  114. createdAt_lt: DateTime
  115. reporterIp: String
  116. videoId: ID
  117. }