Common objects

Common objects overview

List of available objects and queries related to many API resources.

Object types

User

Represents details of a user.

type User {
	userId: ID!
	projectId: ID!
	shortId: NonEmptyString!
	slots: [Slot]
	role: UserRole!
	email: EmailAddress!
	phoneNumber: PhoneNumber
	fullName: NonEmptyString
	jobTitle: NonEmptyString
	photoUrl: URL
	createdAt: DateTime!
	updatedAt: DateTime!
}

User fields

Field nameValue typeNon-nullDescription
userId
ID
true
A unique identifier for the user.
projectId
ID
true
A unique identifier for the project.
shortId
NonEmptyString
true
A human-readable identifier for the user.
slots
[Slot]
false
List of slots.
role
UserRole
true
Specifies a user role in project.
email
EmailAddress
true
Specifies a user email.
phoneNumber
PhoneNumber
false
Specifies a user phone number (mobile).
fullName
NonEmptyString
false
Specifies a user full name.
jobTitle
NonEmptyString
false
Specifies a user job title.
photoUrl
URL
false
Specifies the location of a user photo as a URL.
createdAt
DateTime
true
The date and time when a user was created.
updatedAt
DateTime
true
The date and time when a user was updated.

Media

Represents details of a media object.

type Media {
	url: URL!
	title: NonEmptyString
}

Media fields

Field nameValue typeNon-nullDescription
url
URL
true
The location of the media as a URL.
title
NonEmptyString
false
A word or phrase to share the nature or contents of a media.

LatLng

Represents details of a LatLng object.

type LatLng {
	lat: Latitude!
	lng: Longitude!
}

LatLng fields

Field nameValue typeNon-nullDescription
lat
Latitude
true
lng
Longitude
true

Enums

UserRole

User roles available in the system.

enum UserRole {
	SUPERADMIN
	OWNER
	ADMIN
	APIADMIN
	MANAGER
	STAFF
	USER
}

UserRole valid values

Valid valueDescription
SUPERADMIN
God mode on.
OWNER
Project owner. Full access to projects resources.
ADMIN
Project admin. Full access without project delete powers.
APIADMIN
Inherits ADMIN permissions.
MANAGER
Generally read/write permissions for project resources.
STAFF
Generally read only user.
USER
Customer or not logged user.

Theme

Represents details of a Theme.

enum Theme {
	LIGHT
	DARK
}

Theme valid values

Valid valueDescription
LIGHT
Light theme for booking page.
DARK
Dark theme for booking page.

Queries

me

Returns a me object.

me(
	projectId: ID!
): User

me arguments

Field nameValue typeRequiredDescription
projectId
ID
true
A unique identifier for the project.
🔑

Minimal role required: USER

Mutations

login

Get auth token. Needed to sign all other API queries.

login(
	email: EmailAddress!
	password: NonEmptyString!
): String

login arguments

Field nameValue typeRequiredDescription
email
EmailAddress
true
User email address linked to active Timerise account.
password
NonEmptyString
true
User secret password.
🔑

Minimal role required: USER