mirror of
https://github.com/unraid/api.git
synced 2026-01-15 21:19:53 -06:00
35
app/graphql/schema/types/scopes/scope.graphql
Normal file
35
app/graphql/schema/types/scopes/scope.graphql
Normal file
@@ -0,0 +1,35 @@
|
||||
input scopesInput {
|
||||
apiKey: String!
|
||||
}
|
||||
|
||||
type Query {
|
||||
scopes: JSON @func(module: "get-scopes")
|
||||
}
|
||||
|
||||
input addScopeInput {
|
||||
"""Scope name"""
|
||||
name: String!
|
||||
"""Scope description"""
|
||||
description: String
|
||||
}
|
||||
|
||||
input addScopeToApiKeyInput {
|
||||
"""Scope name"""
|
||||
name: String!
|
||||
apiKey: String!
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
"""Add a new permission scope"""
|
||||
addScope(input: addScopeInput!): Scope @func(module: "add-scope")
|
||||
"""Add a new permission scope to apiKey"""
|
||||
addScopeToApiKey(input: addScopeToApiKeyInput!): Scope @func(module: "apikeys/name/add-scope")
|
||||
}
|
||||
|
||||
"""A permission scope"""
|
||||
type Scope {
|
||||
"""A unique name for the scope"""
|
||||
name: String
|
||||
"""A user friendly description"""
|
||||
description: String
|
||||
}
|
||||
Reference in New Issue
Block a user