lldap/schema.graphql

136 lines
2.8 KiB
GraphQL
Raw Normal View History

type AttributeValue {
name: String!
value: [String!]!
}
type Mutation {
2021-09-01 10:00:51 +02:00
createUser(user: CreateUserInput!): User!
createGroup(name: String!): Group!
2021-09-01 10:00:51 +02:00
updateUser(user: UpdateUserInput!): Success!
updateGroup(group: UpdateGroupInput!): Success!
addUserToGroup(userId: String!, groupId: Int!): Success!
removeUserFromGroup(userId: String!, groupId: Int!): Success!
2021-09-24 09:14:18 +02:00
deleteUser(userId: String!): Success!
deleteGroup(groupId: Int!): Success!
addUserAttribute(name: String!, attributeType: AttributeType!, isList: Boolean!, isVisible: Boolean!, isEditable: Boolean!): Success!
addGroupAttribute(name: String!, attributeType: AttributeType!, isList: Boolean!, isVisible: Boolean!, isEditable: Boolean!): Success!
deleteUserAttribute(name: String!): Success!
deleteGroupAttribute(name: String!): Success!
}
type Group {
2021-09-16 09:26:31 +02:00
id: Int!
displayName: String!
creationDate: DateTimeUtc!
uuid: String!
"User-defined attributes."
attributes: [AttributeValue!]!
"The groups to which this user belongs."
users: [User!]!
}
"""
A filter for requests, specifying a boolean expression based on field constraints. Only one of
the fields can be set at a time.
"""
input RequestFilter {
any: [RequestFilter!]
all: [RequestFilter!]
not: RequestFilter
eq: EqualityConstraint
2021-09-24 22:35:31 +02:00
memberOf: String
memberOfId: Int
}
2021-08-30 08:48:06 +02:00
"DateTime"
scalar DateTimeUtc
2021-09-16 09:26:31 +02:00
type Query {
apiVersion: String!
user(userId: String!): User!
users(filters: RequestFilter): [User!]!
groups: [Group!]!
group(groupId: Int!): Group!
schema: Schema!
2021-09-16 09:26:31 +02:00
}
"The details required to create a user."
2021-09-01 10:00:51 +02:00
input CreateUserInput {
id: String!
email: String!
displayName: String
firstName: String
lastName: String
avatar: String
}
type AttributeSchema {
name: String!
attributeType: AttributeType!
isList: Boolean!
isVisible: Boolean!
isEditable: Boolean!
isHardcoded: Boolean!
}
"The fields that can be updated for a user."
input UpdateUserInput {
id: String!
email: String
displayName: String
firstName: String
lastName: String
avatar: String
}
input EqualityConstraint {
field: String!
value: String!
}
type Schema {
userSchema: AttributeList!
groupSchema: AttributeList!
}
"The fields that can be updated for a group."
input UpdateGroupInput {
id: Int!
displayName: String
}
type User {
id: String!
email: String!
displayName: String!
firstName: String!
lastName: String!
2022-11-21 09:13:25 +01:00
avatar: String
2021-08-30 08:48:06 +02:00
creationDate: DateTimeUtc!
uuid: String!
"User-defined attributes."
attributes: [AttributeValue!]!
"The groups to which this user belongs."
groups: [Group!]!
}
type AttributeList {
attributes: [AttributeSchema!]!
}
enum AttributeType {
STRING
INTEGER
JPEG_PHOTO
DATE_TIME
}
2021-09-01 10:00:51 +02:00
type Success {
ok: Boolean!
}
schema {
query: Query
mutation: Mutation
}