Service

signIn(email, password)

Authorizing in the system, function returns Promise.

const service = new Mixapp.Service([options])
service.signIn('user@domain.com', 'password')
    .then(res => {})
    .catch(err => {})
Name Type Description
email String ---
password String ---

signUp(data)

Registering in the system, function returns Promise.

const service = new Mixapp.Service([options])
service.signUp({
    email: 'user@domain.com',
    'name': 'username'
})
    .then(res => {})
    .catch(err => {})

Data parameter contains data about the user.

Name Type Description
email String Параметр обязателен
name String Параметр обязателен

update(data)

Updates user information, function returns Promise.

const service = new Mixapp.Service([options])
service.update({
    'name': 'username',
    'password': 'newpassword',
    'avatar': ''
})
    .then(res => {})
    .catch(err => {})

Data parameter contains user data that has to be updated.

Name Type Description
name String ---
password String If an empty value is submitted, the password will not be reset
avatar String An base64 image has to be submitted

restore(email)

System password reset request, function returns Promise.

const service = new Mixapp.Service([options])
service.restore('user@domain.com')
    .then(res => {})
    .catch(err => {})
Name Type Description
email String User e-mail in the system

confirmRestore(token, pass)

Request for password reset at access recovery, function returns Promise.

const service = new Mixapp.Service([options])
service.confirmRestore('token', 'newpass')
    .then(res => {})
    .catch(err => {})
Name Type Description
token String Token previously e-mailed
password String New password

workplaces.get(name)

Requesting and creating Workplace class instance, function returns Promise.

const service = new Mixapp.Service([options])
service.workplaces.get('myworkplace')
    .then(workplace => {})
    .catch(err => {})
Name Type Description
name String Workplace name

workplaces.create(data)

Creates a new workplace, function returns Promise.

const service = new Mixapp.Service([options])
service.workplaces.create({
    name: 'newworkplace'
})
    .then(workplace => {})
    .catch(err => {})

Data parameter contains information about the workplace created.

Name Type Description
name String Workplace name