Files
speckle-server/modules/auth/graph/schemas/apps.graphql
T
2020-09-18 23:12:43 +01:00

87 lines
1.8 KiB
GraphQL

extend type Query {
"""
Gets a specific app from the server.
"""
app( id: String! ): ServerApp
"""
Returns all the publicly available apps on this server.
"""
apps: [ServerApp]
}
type ServerApp {
id: String!
secret: String!
name: String!
description: String
termsAndConditionsLink: String
logo: String
trustByDefault: Boolean
author: AppAuthor
createdAt: String!
redirectUrl: String!
scopes: [Scope]!
}
type AppAuthor {
name: String
id: String
}
extend type User {
"""
Returns the apps you have authorized.
"""
authorizedApps: [ServerApp]
@hasRole(role: "server:user")
@hasScope(scope: "apps:read")
"""
Returns the apps you have created.
"""
createdApps: [ServerApp]
@hasRole(role: "server:user")
@hasScope(scope: "apps:read")
}
extend type Mutation {
"""
Register a new third party application.
"""
appCreate(app: AppCreateUpdateInput): String!
@hasRole(role: "server:user")
@hasScope(scope: "apps:write")
"""
Update an existing third party application. **Note: This will invalidate all existing tokens, refresh tokens and access codes and will require existing users to re-authorize it.**
"""
appUpdate(app: AppCreateUpdateInput): Boolean!
@hasRole(role: "server:user")
@hasScope(scope: "apps:write")
"""
Deletes a thirty party application.
"""
appDelete(appId: String!): Boolean!
@hasRole(role: "server:user")
@hasScope(scope: "apps:write")
"""
Revokes (de-authorizes) an application that you have previously authorized.
"""
appRevokeAccess(appId: String!): Boolean
@hasRole(role: "server:user")
@hasScope(scope: "apps:write")
}
input AppCreateUpdateInput {
name: String!
description: String!
termsAndConditionsLink: String
logo: String
redirectUrl: String!
scopes: [String]!
}