Code Docs


Pluvo Developers Docs


Back to website:

Dutch: Pluvo.nl

English: Pluvo.eu

Schema index

schema {
  query: Query
  mutation: Mutations
}

type AbsoluteDateCondition implements Condition {
  id: UUID!
  fulfilled: Boolean!
  comparison: DateConditionComparisonEnum!
  date: DateTime!
}

type AddUsersToGroup {
  addedIds: [UUID]
  addedRefs: [String]
  alreadyAddedIds: [UUID]
  alreadyAddedRefs: [String]
  failedIds: [UUID]
  failedRefs: [String]
}

type AddUsersToTraining {
  addedIds: [UUID]
  addedRefs: [String]
  alreadyAddedIds: [UUID]
  alreadyAddedRefs: [String]
  failedIds: [UUID]
  failedRefs: [String]
}

interface Condition {
  id: UUID!
  fulfilled: Boolean!
}

type CreateGroup {
  group: Group
}

input CreateGroupInput {
  name: String!
  enableChat: Boolean = false
  ref: String
}

type CreateTraining {
  training: Training
}

input CreateTrainingInput {
  title: String!
  isActive: Boolean
  subtitle: String
  introduction: String
  startDate: Date
  endDate: Date
  showParticipants: Boolean
  showSharedFiles: Boolean
  enableChat: Boolean
  ref: String
}

type CreateUser {
  user: User
}

input CreateUserInput {
  isActive: Boolean
  email: String!
  name: String!
  roles: [Role!]
  ref: String
  extraFields: JSONString
}

type Course {
  publishedVersionNumber: Int
  draftVersionNumber: Int
  archived: Boolean!
  title: String!
  id: UUID!
  description: String
  thumbnail: File
  image: File
  trainingCount: Int
  offerCount: Int
  owner: User
}

scalar Date

enum DateConditionComparisonEnum {
  START
  END
}

scalar DateTime

type File {
  id: UUID!
  url: String
  name: String
  uploaded: Boolean
  uploadDate: DateTime
  owner: User
}

type Group {
  id: UUID!
  name: String!
  users: [User!]!
  enableChat: Boolean!
  ref: String
}

scalar JSONString

enum Language {
  EN
  NL
}

type Location {
  description: String!
  id: UUID!
  title: String!
  location: String
  numberOfTrainings: Int
}

type Mutations {
  createUser(sendInvite: Boolean = true, user: CreateUserInput!): CreateUser
  updateUser(ref: String, id: UUID, user: UpdateUserInput!): UpdateUser
  updateOrCreateUser(email: String, ref: String, user: UpdateOrCreateUserInput!): UpdateOrCreateUser
  createGroup(group: CreateGroupInput!): CreateGroup
  updateGroup(ref: String, group: UpdateGroupInput!, id: UUID): UpdateGroup
  addUsersToGroup(groupRef: String, groupId: UUID, userRefs: [String!], userIds: [UUID!]): AddUsersToGroup
  removeUsersFromGroup(groupRef: String, groupId: UUID, userRefs: [String!], userIds: [UUID!]): RemoveUsersFromGroup
  createTraining(training: CreateTrainingInput!): CreateTraining
  updateTraining(ref: String, training: UpdateTrainingInput!, id: UUID): UpdateTraining
  addUsersToTraining(role: TrainingRole = participant, sendInvites: Boolean = true, trainingRef: String, trainingId: UUID, userRefs: [String!], userIds: [UUID!]): AddUsersToTraining
  enrollInOffer(offerEvent: UUID!, users: [UUID!]): EnrollInOffer
  unenrollInOffer(offerEvent: UUID!, users: [UUID!]): UnenrollInOffer
  updateOffer(ref: String, offer: UpdateOfferInput!, id: UUID): UpdateOffer
  removeUsersFromTraining(role: TrainingRole = participant, trainingRef: String, trainingId: UUID, userRefs: [String!], userIds: [UUID!]): RemoveUsersFromTraining
}

type Offer {
  id: UUID!
  ref: String
  title: String!
  description: JSONString!
  titleColor: Color
  hasDetailPage: Boolean!
  subscriptionStatus: OfferEventSubscriptionStatus
  types: [OfferEventType!]!
  firstDate: OfferEventDate
  eventCount: Int!
  owner: User
  image: File
  overviewImage: File
  detailEventId: UUID
}

type OffersSearchConnection {
  pageInfo: PageInfo!
  edges: [OffersSearchEdge]!
  count: Int
}

type OffersSearchEdge {
  node: OfferSearch
  cursor: String!
}

enum OfferEventSubscriptionStatus {
  REQUESTED
  ENROLLED
  DENIED
  FULL
}

enum OfferEventType {
  MEETING
  WEBINAR
  TRAINING
  ELEARNING
  COURSE
}

type OfferEventDate {
  startDate: DateTime!
  endDate: DateTime!
  locationString: String!
  webinarLink: String!
  id: UUID!
  location: Location
}

type OfferSubscriptionEdge {
  node: User
  cursor: String!
  id: UUID!
  status: OfferEventSubscriptionStatus!
  reason: String
  waitingListNumber: Int
}

type OfferSubscriptionConnection {
  pageInfo: PageInfo!
  edges: [OfferSubscriptionEdge]!
  count: Int
}

type OfferEvent {
  id: UUID!
  ref: String
  price: Decimal!
  trainerApproval: Boolean!
  maxSubscriptions: Int!
  closingDate: DateTime
  waitingList: Boolean!
  descriptionBeforeSubscription: String!
  descriptionAfterSubscription: String!
  showParticipantList: Boolean!
  publish: Boolean!
  type: OfferEventType!
  offer: Offer!
  spotsLeft: Int
  subscriptionStatus: OfferEventSubscriptionStatus
  dateCount: Int!
  firstDate: OfferEventDate
  firstTraining: Training
  trainingCount: Int
  subscribedUsers(offset: Int, before: String, after: String, first: Int, last: Int, lastLogin_Gt: DateTime, lastLogin_Lt: DateTime, archived: Boolean, isActive: Boolean, q: String, extraFields: JSONString): OfferSubscriptionConnection
  currentUserSubscription: OfferSubscriptionEdge
  closingDateExpired: Boolean!
  image: File
  dates: [OfferEventDate!]!
  minSubscriptions: Int!
}

type EnrollInOffer {
  offerEvent: OfferEvent
}

type Query {
  course(id: UUID!): Course
  group(id: UUID, ref: String): Group
  groups: [Group]
  user(id: UUID, ref: String): User
  users(active: Boolean): [User]
  offer(id: UUID!): Offer
  offers(q: String, forRoles: [OfferRole!], extraCategories: [ExtraCategoryFilterInput!], types: [OfferEventType!], offset: Int, after: String, first: Int): OffersSearchConnection
  offerEvents(offerId: UUID, offerRef: String, expired: Boolean): [OfferEvent!]!
  training(id: UUID, ref: String): Training
  trainings(active: Boolean, archived: Boolean = false, query: String, extraFields: JSONString): [Training!]
}

type RelativeDateCondition implements Condition {
  id: UUID!
  fulfilled: Boolean!
  comparison: DateConditionComparisonEnum!
  offset: TimeDelta!
}

type RemoveUsersFromGroup {
  removedIds: [UUID]
  removedRefs: [String]
  alreadyRemovedIds: [UUID]
  alreadyRemovedRefs: [String]
  failedIds: [UUID]
  failedRefs: [String]
}

type RemoveUsersFromTraining {
  removedIds: [UUID]
  removedRefs: [String]
  alreadyRemovedIds: [UUID]
  alreadyRemovedRefs: [String]
  failedIds: [UUID]
  failedRefs: [String]
}

enum Role {
  MANAGER
  PLANNER
  AUTHOR
}

type TimeDelta {
  days: Int!
  seconds: Int!
  microseconds: Int!
}

type Training {
  id: UUID!
  isActive: Boolean!
  title: String!
  subtitle: String!
  introduction: String!
  image: File
  startDate: Date @deprecated(reason: "Replaced by the AbsoluteDateCondition")
  endDate: Date @deprecated(reason: "Replaced by the AbsoluteDateCondition")
  users: [User!]!
  groups: [Group!]!
  showParticipants: Boolean!
  showSharedFiles: Boolean!
  enableChat: Boolean!
  ref: String
  rolesForCurrentUser: [TrainingRole!]
  allConditionsFulfilled: Boolean!
  conditions: [Condition!]!
  nextEvent: DateTime
  progress: Float
}

enum TrainingRole {
  PARTICIPANT
  TRAINER
  MENTOR
}

scalar UUID

type UnenrollInOffer {
  ok: Boolean!
}

type UpdateArticle {
  article: Article
}

type UpdateCollection {
  collection: Collection
}

type UpdateGroup {
  group: Group
}

input UpdateGroupInput {
  name: String
  enableChat: Boolean
  ref: String
}

type UpdateOffer {
  offer: Offer
}

input UpdateOfferInput {
  title: String
  description: String
  imageId: UUID
  titleColor: Color
  overviewImageId: UUID
  ref: String
}

type UpdateOrCreateUser {
  user: User
  created: Boolean
}

input UpdateOrCreateUserInput {
  isActive: Boolean
  email: String
  name: String
  roles: [Role!]
  ref: String
  extraFields: JSONString
}

type UpdateTraining {
  training: Training
}

input UpdateTrainingInput {
  title: String
  isActive: Boolean
  subtitle: String
  introduction: String
  startDate: Date
  endDate: Date
  showParticipants: Boolean
  showSharedFiles: Boolean
  enableChat: Boolean
  ref: String
}

type UpdateUser {
  user: User
}

input UpdateUserInput {
  isActive: Boolean
  email: String
  name: String
  roles: [Role!]
  ref: String
  extraFields: JSONString
}

type User {
  id: UUID!
  isActive: Boolean!
  email: String!
  name: String!
  ref: String
  roles: [Role]
  profileImage: String!
  language: Language!
  extraFields: JSONString!
}

type UsersAndGroupsCondition implements Condition {
  id: UUID!
  fulfilled: Boolean!
  openRegistration: Boolean!
  users: [User!]
  groups: [Group!]
}