wikijs-fork/server/graph/schemas/storage.graphql

79 lines
1.6 KiB
GraphQL
Raw Normal View History

2018-06-26 02:04:47 +00:00
# ===============================================
# STORAGE
# ===============================================
extend type Query {
storage: StorageQuery
}
extend type Mutation {
storage: StorageMutation
}
# -----------------------------------------------
# QUERIES
# -----------------------------------------------
type StorageQuery {
targets: [StorageTarget] @auth(requires: ["manage:system"])
2019-02-17 06:32:35 +00:00
status: [StorageStatus] @auth(requires: ["manage:system"])
2018-06-26 02:04:47 +00:00
}
# -----------------------------------------------
# MUTATIONS
# -----------------------------------------------
type StorageMutation {
updateTargets(
2019-02-17 06:32:35 +00:00
targets: [StorageTargetInput]!
2018-10-14 21:38:39 +00:00
): DefaultResponse @auth(requires: ["manage:system"])
executeAction(
targetKey: String!
handler: String!
): DefaultResponse @auth(requires: ["manage:system"])
2018-06-26 02:04:47 +00:00
}
# -----------------------------------------------
# TYPES
# -----------------------------------------------
type StorageTarget {
2019-02-03 22:08:06 +00:00
isAvailable: Boolean!
2018-06-26 02:04:47 +00:00
isEnabled: Boolean!
key: String!
title: String!
description: String
logo: String
website: String
2019-02-03 22:08:06 +00:00
supportedModes: [String]
2018-06-26 02:04:47 +00:00
mode: String
2019-02-17 06:32:35 +00:00
hasSchedule: Boolean!
syncInterval: String
syncIntervalDefault: String
2018-06-26 02:04:47 +00:00
config: [KeyValuePair]
actions: [StorageTargetAction]
2018-06-26 02:04:47 +00:00
}
input StorageTargetInput {
isEnabled: Boolean!
key: String!
mode: String!
2019-02-17 06:32:35 +00:00
syncInterval: String
2018-06-26 02:04:47 +00:00
config: [KeyValuePairInput]
}
2019-02-17 06:32:35 +00:00
type StorageStatus {
key: String!
title: String!
status: String!
2019-02-25 04:48:28 +00:00
message: String!
lastAttempt: String!
2019-02-17 06:32:35 +00:00
}
type StorageTargetAction {
handler: String!
label: String!
hint: String!
}