mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-09-06 20:16:56 +00:00
170 lines
2.9 KiB
GraphQL
170 lines
2.9 KiB
GraphQL
scalar DateTime
|
|
|
|
type Alert {
|
|
severity: Severity!
|
|
title: String!
|
|
message: String!
|
|
timestamp: DateTime
|
|
}
|
|
|
|
type StorageVolume {
|
|
freeSpace: String!
|
|
model: String!
|
|
name: String!
|
|
root: Boolean!
|
|
serial: String!
|
|
totalSpace: String!
|
|
type: String!
|
|
usedSpace: String!
|
|
}
|
|
|
|
type Storage {
|
|
volumes: [StorageVolume!]!
|
|
}
|
|
|
|
type Api {
|
|
version: String!
|
|
devices: [ApiDevice!]!
|
|
recoveryKey: ApiRecoveryKeyStatus!
|
|
}
|
|
|
|
type ApiDevice {
|
|
name: String!
|
|
creationDate: DateTime!
|
|
isCaller: Boolean!
|
|
}
|
|
|
|
type ApiKeyMutationReturn implements MutationReturnInterface {
|
|
success: Boolean!
|
|
message: String!
|
|
code: Int!
|
|
key: String
|
|
}
|
|
|
|
type ApiRecoveryKeyStatus {
|
|
exists: Boolean!
|
|
valid: Boolean!
|
|
creationDate: DateTime
|
|
expirationDate: DateTime
|
|
usesLeft: Int
|
|
}
|
|
|
|
type AutoUpgradeOptions {
|
|
enable: Boolean!
|
|
allowReboot: Boolean!
|
|
}
|
|
|
|
type DeviceApiTokenMutationReturn implements MutationReturnInterface {
|
|
success: Boolean!
|
|
message: String!
|
|
code: Int!
|
|
token: String
|
|
}
|
|
|
|
enum DnsProvider {
|
|
CLOUDFLARE
|
|
}
|
|
|
|
type DnsRecord {
|
|
recordType: String!
|
|
name: String!
|
|
content: String!
|
|
ttl: Int!
|
|
priority: Int
|
|
}
|
|
|
|
type GenericMutationReturn implements MutationReturnInterface {
|
|
success: Boolean!
|
|
message: String!
|
|
code: Int!
|
|
}
|
|
|
|
type Mutation {
|
|
getNewRecoveryApiKey(limits: RecoveryKeyLimitsInput!): ApiKeyMutationReturn!
|
|
useRecoveryApiKey(input: UseRecoveryKeyInput!): DeviceApiTokenMutationReturn!
|
|
refreshDeviceApiToken: DeviceApiTokenMutationReturn!
|
|
deleteDeviceApiToken(device: String!): GenericMutationReturn!
|
|
getNewDeviceApiKey: ApiKeyMutationReturn!
|
|
invalidateNewDeviceApiKey: GenericMutationReturn!
|
|
authorizeWithNewDeviceApiKey(input: UseNewDeviceKeyInput!): DeviceApiTokenMutationReturn!
|
|
resizeVolume(name: String!): GenericMutationReturn!
|
|
unmountVolume(name: String!): GenericMutationReturn!
|
|
mountVolume(name: String!): GenericMutationReturn!
|
|
}
|
|
|
|
interface MutationReturnInterface {
|
|
success: Boolean!
|
|
message: String!
|
|
code: Int!
|
|
}
|
|
|
|
type Query {
|
|
system: System!
|
|
storage: Storage!
|
|
api: Api!
|
|
}
|
|
|
|
input RecoveryKeyLimitsInput {
|
|
expirationDate: DateTime
|
|
uses: Int
|
|
}
|
|
|
|
enum ServerProvider {
|
|
HETZNER
|
|
}
|
|
|
|
enum Severity {
|
|
INFO
|
|
WARNING
|
|
ERROR
|
|
CRITICAL
|
|
SUCCESS
|
|
}
|
|
|
|
type SshSettings {
|
|
enable: Boolean!
|
|
passwordAuthentication: Boolean!
|
|
rootSshKeys: [String!]!
|
|
}
|
|
|
|
type System {
|
|
status: Alert!
|
|
domain: SystemDomainInfo!
|
|
settings: SystemSettings!
|
|
info: SystemInfo!
|
|
provider: SystemProviderInfo!
|
|
busy: Boolean!
|
|
}
|
|
|
|
type SystemDomainInfo {
|
|
domain: String!
|
|
hostname: String!
|
|
provider: DnsProvider!
|
|
requiredDnsRecords: [DnsRecord!]!
|
|
}
|
|
|
|
type SystemInfo {
|
|
systemVersion: String!
|
|
pythonVersion: String!
|
|
}
|
|
|
|
type SystemProviderInfo {
|
|
provider: ServerProvider!
|
|
id: String!
|
|
}
|
|
|
|
type SystemSettings {
|
|
autoUpgrade: AutoUpgradeOptions!
|
|
ssh: SshSettings!
|
|
timezone: String!
|
|
}
|
|
|
|
input UseNewDeviceKeyInput {
|
|
key: String!
|
|
deviceName: String!
|
|
}
|
|
|
|
input UseRecoveryKeyInput {
|
|
key: String!
|
|
deviceName: String!
|
|
} |