Skip to content
This repository has been archived by the owner on Oct 24, 2019. It is now read-only.

vpapp-team/backend-types

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

backend-types

Greenkeeper badge

TYPEDEFS

General Data
ClassDiscriminator CalendarEvent
LessonDiscriminator Endpoints
LessonRange Error
Range Feedback
Time LastUpdate
UUID Lesson
Version Menu
Room
Stand-in
Teacher
Timetable

General

ClassDiscriminator

extends String
ether a regular format: /([5-9]|10)[a-d]+|11|12/i
or an exception (e.g.: DaZ)

LessonDiscriminator

extends String
can be one of two:

  • regular lesson matching the pattern /^[0-9]{1,2}(\s*-\s*[0-9]{1,2})?$/
  • a break matching the pattern: /^(([0-9]{1,2}\/)?\/[0-9]{1,2}|[0-9]{1,2}\/)$/

LessonRange

extends Object

Parameter Type Description nullable
discriminator LessonDiscriminator discriminator
time String time in format HH:MM-HH:MM
or HH:MM-
or -HH:MM

Range

extends String
can be build 2 ways:

  • a range consisting of
    'Time-Time'
    one of the Times can be left out to do until or after e.g.: '-Time'
  • a time and the size of the surrounding
    both have to be the same type (DateTime or Date)
    'Time+-Time'

=> both work inclusive, means 10-20 matches 10 and 20 and 10+-5 matches 5 and 15

Time

extends String
can be two fromats

  • /DT[0-9]+/ aka DateTime -> represents the milliseconds passed since 01.01.1970
  • /D[0-9]+/ aka Date -> represents the days passed since 01.01.1970

UUID

extends String
format: id@issuer
allowed characters: /[a-z0-9.\-_+]+/ and one @ in the middle
e.g.: [email protected] or [email protected]

Version

extends String
format: /v(?>[0-9a-f]{1,2}\.){2}[0-9a-f]{1,2}/i

Data

extends Array

CalendarEvent

Field Type requirement Description nullable
0 UUID uuid(master's id for recurring events)
1 Time start
2 Time end
3 String summary
4 String description
5 String location
6 Boolean isRecurring
7 String [isRecurring]==true humanRecurrenceRule

Endpoints

Field Type Description nullable
version version the version of the connecting device
platform ios, backend or android the platform of the connecting device
apiVersion version the backend version to request
isRecommended Boolean is it the recommended version?
isOutdated Boolean is it a outdated version?
devVersion Boolean is it a developer version?

Error

Field Type Description nullable
0 UUID errors uuid
1 Time time the server received the error
2 Version version of the error sending client
3 String userAgent of the error sending client
4 Number platform of the error sending client
5 Time time the client caught the error
6 String short description of the error
7 String stack of the error
8 String msg to respond with on the next request
9 Time time the msgOnReq was set
10 Time time the msgOnReq was send

Feedback

Field Type Description nullable
0 UUID errors uuid
1 Time time the server received the error
2 Version version of the error sending client
3 String userAgent of the error sending client
4 Number platform of the error sending client
5 String the name of the feedback giver
6 UUID the email of the feedback giver
7 String the feedback itself
8 String msg to respond with on the next request
9 Time time the msgOnReq was set
10 Time time the msgOnReq was send

LastUpdate

Field Type Description Options nullable
0 Number category 0=timetables, 1=rooms, 2=teachers, 3=menu, 4=stand-in, 5=calendar
1 Time last time the category was updated

Lesson

extends Array

Field Type Description Options nullable
0 UUID masters uuid
1 Number weekday 0=monday, 1=tuesday, 2=wednesday, 3=thursday, 4=friday
2 LessonDiscriminator lesson
3 String Room
4 String Teacher
5 String Subject
6 ClassDiscriminator class name
7 Number Length(e.g.: 2 hour lessons)
8 Number Regularity 0=always, 1=uneven weeks, 2=even weeks

Menu

Field Type Description nullable
0 UUID uuid
1 Time day
2 String default
3 String vegetarian
4 String desert
5 String evening

Stand-in

Field Type requirement Description Options nullable
0 UUID uuid
1 Number type 0=default, 1=motd
2 Number [type]=1=motd subtype 0=other, 1=absentClasses, 2=absentTeachers
3 Time day
4 String message ✔ with [type]=0=default else ❌
5 String [type]=0=default teacher
6 String [type]=0=default subject
7 LessonDiscriminator [type]=0=default lesson
8 ClassDiscriminator [type]=0=default class
9 String [type]=0=default room
10 String [type]=0=default original teacher
11 String [type]=0=default original subject
12 Boolean [type]=0=default is eliminated

Teacher

Field Type Description nullable
0 UUID uuid
1 Boolean leftSchool
2 String shorthand
3 String name
4 Array(String) subjects
5 UUID email
6 Array(String) comments
7 Array(Timetable) timetable

Timetable

extends Array

Field Type requirement Description Options nullable
0 UUID uuid
1 Number type 0=class, 1=teacher, 2=room
2 ClassDiscriminator [type]=0=class class name
2 String [type]=1=teacher teachers shorthand
2 String [type]=2=room room name
3 Time date this timetable becomes active
4 Array(Lesson) Content

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published