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.

78 lines
1.6 KiB

  1. # ===============================================
  2. # STORAGE
  3. # ===============================================
  4. extend type Query {
  5. storage: StorageQuery
  6. }
  7. extend type Mutation {
  8. storage: StorageMutation
  9. }
  10. # -----------------------------------------------
  11. # QUERIES
  12. # -----------------------------------------------
  13. type StorageQuery {
  14. targets: [StorageTarget] @auth(requires: ["manage:system"])
  15. status: [StorageStatus] @auth(requires: ["manage:system"])
  16. }
  17. # -----------------------------------------------
  18. # MUTATIONS
  19. # -----------------------------------------------
  20. type StorageMutation {
  21. updateTargets(
  22. targets: [StorageTargetInput]!
  23. ): DefaultResponse @auth(requires: ["manage:system"])
  24. executeAction(
  25. targetKey: String!
  26. handler: String!
  27. ): DefaultResponse @auth(requires: ["manage:system"])
  28. }
  29. # -----------------------------------------------
  30. # TYPES
  31. # -----------------------------------------------
  32. type StorageTarget {
  33. isAvailable: Boolean!
  34. isEnabled: Boolean!
  35. key: String!
  36. title: String!
  37. description: String
  38. logo: String
  39. website: String
  40. supportedModes: [String]
  41. mode: String
  42. hasSchedule: Boolean!
  43. syncInterval: String
  44. syncIntervalDefault: String
  45. config: [KeyValuePair]
  46. actions: [StorageTargetAction]
  47. }
  48. input StorageTargetInput {
  49. isEnabled: Boolean!
  50. key: String!
  51. mode: String!
  52. syncInterval: String
  53. config: [KeyValuePairInput]
  54. }
  55. type StorageStatus {
  56. key: String!
  57. title: String!
  58. status: String!
  59. message: String!
  60. lastAttempt: String!
  61. }
  62. type StorageTargetAction {
  63. handler: String!
  64. label: String!
  65. hint: String!
  66. }