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.

82 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(
  15. filter: String
  16. orderBy: String
  17. ): [StorageTarget] @auth(requires: ["manage:system"])
  18. status: [StorageStatus] @auth(requires: ["manage:system"])
  19. }
  20. # -----------------------------------------------
  21. # MUTATIONS
  22. # -----------------------------------------------
  23. type StorageMutation {
  24. updateTargets(
  25. targets: [StorageTargetInput]!
  26. ): DefaultResponse @auth(requires: ["manage:system"])
  27. executeAction(
  28. targetKey: String!
  29. handler: String!
  30. ): DefaultResponse @auth(requires: ["manage:system"])
  31. }
  32. # -----------------------------------------------
  33. # TYPES
  34. # -----------------------------------------------
  35. type StorageTarget {
  36. isAvailable: Boolean!
  37. isEnabled: Boolean!
  38. key: String!
  39. title: String!
  40. description: String
  41. logo: String
  42. website: String
  43. supportedModes: [String]
  44. mode: String
  45. hasSchedule: Boolean!
  46. syncInterval: String
  47. syncIntervalDefault: String
  48. config: [KeyValuePair]
  49. actions: [StorageTargetAction]
  50. }
  51. input StorageTargetInput {
  52. isEnabled: Boolean!
  53. key: String!
  54. mode: String!
  55. syncInterval: String
  56. config: [KeyValuePairInput]
  57. }
  58. type StorageStatus {
  59. key: String!
  60. title: String!
  61. status: String!
  62. message: String!
  63. lastAttempt: String!
  64. }
  65. type StorageTargetAction {
  66. handler: String!
  67. label: String!
  68. hint: String!
  69. }