GraphQL API and utilities for the rpdata 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.

173 lines
3.3 KiB

  1. # A Log is the "file" of an RP session
  2. type Log {
  3. # A unique identifier for the log.
  4. id: String!
  5. # A secondary unique identifier for the log. This is a lot shorter and more suitable for storage when
  6. # the link doesn't need to be as expressive.
  7. shortId: String!
  8. # The date for a log.
  9. date: Time!
  10. # The channel of a log.
  11. channelName: String!
  12. # Information about the channel this log is in.
  13. channel: Channel!
  14. # The session's title.
  15. title: String!
  16. # The log's event, which is the same as the tags in the previous logbot site.
  17. # Empty string means that it's no event.
  18. eventName: String!
  19. # The description of a session, which is empty if unset.
  20. description: String!
  21. # Whether the log session is open.
  22. open: Boolean!
  23. # The characters involved in the log file.
  24. characters: [Character!]!
  25. # The posts of the logfile, which can be filtered by kinds.
  26. posts(kinds:[String!]): [Post!]!
  27. # Suggested next logs.
  28. nextLogs: [LogSuggestion!]!
  29. # Suggested previous logs.
  30. prevLogs: [LogSuggestion!]!
  31. }
  32. # Suggested log
  33. type LogSuggestion {
  34. log: Log!
  35. hasEvent: Boolean!
  36. hasChannel: Boolean!
  37. characters: [Character!]!
  38. }
  39. # Filter for logs query
  40. input LogsFilter {
  41. # Channels to limit results to (inclusive)
  42. channels: [String!]
  43. # Events to limit results to (inclusive)
  44. events: [String!]
  45. # Characters to limit results to (exclusive)
  46. characters: [String!]
  47. # Search post content
  48. search: String
  49. # Limit by whether it's open or not
  50. open: Boolean
  51. # Limit the amount of results you get back
  52. limit: Int
  53. }
  54. # Input for addLog mutation
  55. input LogAddInput {
  56. # The date of the log.
  57. date: Time!
  58. # The channel where the log is set
  59. channel: String!
  60. # Optional: The log title
  61. title: String
  62. # Optional: Whether the log is open
  63. open: Boolean
  64. # Optional: The log event name
  65. event: String
  66. # Optional: A short description of the log
  67. description: String
  68. }
  69. # Input for addLog mutation
  70. input LogEditInput {
  71. # The id of the log
  72. id: String!
  73. # The log title
  74. title: String
  75. # The log event name
  76. event: String
  77. # A short description of the log
  78. description: String
  79. # Open/close the log
  80. open: Boolean
  81. }
  82. # Input for removeLog mutation
  83. input LogRemoveInput {
  84. # The id of the log to remove
  85. id: String!
  86. }
  87. """
  88. Input for importLog mutation.
  89. """
  90. input LogImportInput {
  91. "The channel of the log, alwyas required."
  92. channelName: String!
  93. "Which importer to use."
  94. importer: LogImporter!
  95. "The timezone of the import, all log and post dates will be treated as it. It will be UTC if none is specified."
  96. timezone: String
  97. "The date of the log, if not provided in the log body."
  98. date: Time
  99. "The log body itself."
  100. data: String!
  101. }
  102. """
  103. Input for splitLog mutation.
  104. """
  105. input LogSplitInput {
  106. "Log ID"
  107. logId: String!
  108. "Split out all posts from and including the post with this ID"
  109. startPostId: String!
  110. }
  111. """
  112. Input for mergeLog mutation.
  113. """
  114. input LogMergeInput {
  115. "Target log ID"
  116. targetLogId: String!
  117. "Source log ID"
  118. sourceLogId: String!
  119. "Remove the source log after merging"
  120. removeAfter: Boolean
  121. }
  122. enum LogImporter {
  123. """
  124. mIRC-like: This importer parses logs that copied from mIRC posts without spaces.
  125. """
  126. MircLike
  127. """
  128. Forum log: This importer parses the format on the forum. The displayed log, not the post source.
  129. """
  130. ForumLog
  131. }