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.

134 lines
2.7 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. }
  28. # Filter for logs query
  29. input LogsFilter {
  30. # Channels to limit results to (inclusive)
  31. channels: [String!]
  32. # Events to limit results to (inclusive)
  33. events: [String!]
  34. # Characters to limit results to (exclusive)
  35. characters: [String!]
  36. # Search post content
  37. search: String
  38. # Limit by whether it's open or not
  39. open: Boolean
  40. # Limit the amount of results you get back
  41. limit: Int
  42. }
  43. # Input for addLog mutation
  44. input LogAddInput {
  45. # The date of the log.
  46. date: Time!
  47. # The channel where the log is set
  48. channel: String!
  49. # Optional: The log title
  50. title: String
  51. # Optional: Whether the log is open
  52. open: Boolean
  53. # Optional: The log event name
  54. event: String
  55. # Optional: A short description of the log
  56. description: String
  57. }
  58. # Input for addLog mutation
  59. input LogEditInput {
  60. # The id of the log
  61. id: String!
  62. # The log title
  63. title: String
  64. # The log event name
  65. event: String
  66. # A short description of the log
  67. description: String
  68. # Open/close the log
  69. open: Boolean
  70. }
  71. # Input for removeLog mutation
  72. input LogRemoveInput {
  73. # The id of the log to remove
  74. id: String!
  75. }
  76. """
  77. Input for importLog mutation.
  78. """
  79. input LogImportInput {
  80. "The channel of the log, alwyas required."
  81. channelName: String!
  82. "Which importer to use."
  83. importer: LogImporter!
  84. "The timezone of the import, all log and post dates will be treated as it. It will be UTC if none is specified."
  85. timezone: String
  86. "The date of the log, if not provided in the log body."
  87. date: Time
  88. "The log body itself."
  89. data: String!
  90. }
  91. enum LogImporter {
  92. """
  93. mIRC-like: This importer parses logs that copied from mIRC posts without spaces.
  94. """
  95. MircLike
  96. """
  97. Forum log: This importer parses the format on the forum. The displayed log, not the post source.
  98. """
  99. ForumLog
  100. }