Workspace

fetch()

Updates local class, function returns Promise.

const service = new Mixapp.Service([options])
service.workplaces.get('workplace')
    .then(workplace => {
        return workplace.fetch();
    })
    .catch(err => {})

update(data)

Updates workplace settings, function returns Promise.

const service = new Mixapp.Service([options])
service.workplaces.get('workplace')
    .then(workplace => {
        return workplace.update({
            npm: ['lodash']
        });
    })
    .catch(err => {})

Data parameter contains workplace settings being updated.

Name Type Description
npm String Array of supported NPM modules

remove()

Deletes the workplace, function returns Promise.

const service = new Mixapp.Service([options])
service.workplaces.get('workplace')
    .then(workplace => {
        return workplace.remove();
    })
    .catch(err => {})

settings.oidc.get()

Gets oidc settings, function returns Promise.

const service = new Mixapp.Service([options])
service.workplaces.get('workplace')
    .then(workplace => {
        return workplace.settings.oidc.get();
    })
    .catch(err => {})

settings.oidc.update()

Updates oidc settings, function returns Promise.

const service = new Mixapp.Service([options])
service.workplaces.get('workplace')
    .then(workplace => {
        return workplace.settings.oidc.update({collection: 'new_name'});
    })
    .catch(err => {})

settings.oidc.refreshToken()

Refreshes oidc token, function returns Promise.

const service = new Mixapp.Service([options])
service.workplaces.get('workplace')
    .then(workplace => {
        return workplace.settings.oidc.refreshToken();
    })
    .catch(err => {})

storages.getAll()

Retrieves the list of available storages, function returns Promise.

const service = new Mixapp.Service([options])
service.workplaces.get('workplace')
    .then(workplace => {
        return workplace.storages.getAll();
    })
    .catch(err => {})

storages.create(data)

Creates a new storage, function returns Promise.

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

Data parameter contains information on the storage created.

Name Type Description
name String Имя хранилища

storages.get(name)

Retrieves storage class instance, function returns Promise.

const service = new Mixapp.Service([options])
service.workplaces.get('workplace')
    .then(workplace => {
        return workplace.storages.get('newstorage');
    })
    .then(storage => {})
    .catch(err => {})
Name Type Description
name String Имя хранилища

processes.search(filter)

Retrieves list of processes, function returns Promise.

const service = new Mixapp.Service([options])
service.workplaces.get('workplace')
    .then(workplace => {
        return workplace.processes.search({
            skip: 0,
            limit: 10,
            title: 'My process'
        });
    })
    .catch(err => {})

Filter parameter contains process selection settings.

Name Type Description
skip String Skips over the specified number of processes
limit String Limits the number of processes passed
title String Not obligatory

processes.get(id)

Retrieves process class instance, function returns Promise.

const service = new Mixapp.Service([options])
service.workplaces.get('workplace')
    .then(workplace => {
        return workplace.processes.get(id)
    })
    .catch(err => {})
Name Type Description
id String Process identifier

processes.create(data)

Creates a new process, function returns Promise.

const service = new Mixapp.Service([options])
service.workplaces.get('workplace')
    .then(workplace => {
        return workplace.processes.create({
            title: 'Process'
        })
    })
    .catch(err => {})

Data parameter contains data of the process created.

Name Type Description
title String Process name

getConnectors()

Retrieves list of available connector in the system, function returns Promise.

const service = new Mixapp.Service([options])
service.workplaces.get('workplace')
    .then(workplace => {
        return workplace.getConnectors()
    })
    .catch(err => {})

oidc.getClients(token)

Gets list of oidc logs, function returns Promise.

Name Type Description
token String Secret token from oidc settings workplace
const service = new Mixapp.Service([options])
service.workplaces.get('workplace')
    .then(workplace => {
        return workplace.oidc.getClients(token);
    })  
    .catch(err => {})

oidc.getClient(token, id)

Gets oidc client, function returns Promise.

Name Type Description
token String Secret token from oidc settings workplace
id String Client id
const service = new Mixapp.Service([options])
service.workplaces.get('workplace')
    .then(workplace => {
        return workplace.getClient(token, id);
    })
    .catch(err => {})

oidc.updateClient(token, id, data)

Updates oidc client, function returns Promise.

Name Type Description
token String Secret token from oidc settings workplace
id String Client id
data String Client data
const service = new Mixapp.Service([options])
service.workplaces.get('workplace')
    .then(workplace => {
        return workplace.oidc.updateClient(token, id, data);
    })
    .catch(err => {})

oidc.createClient(token, id, data)

Creates oidc client, function returns Promise.

Name Type Description
token String Secret token from oidc settings workplace
id String Client id
data String Client data
const service = new Mixapp.Service([options])
service.workplaces.get('workplace')
    .then(workplace => {
        return workplace.oidc.createClient(token, data);
    })
    .catch(err => {})

oidc.removeClient(token, id)

Removes oidc client, function returns Promise.

Name Type Description
token String Secret token from oidc settings workplace
id String Client id
const service = new Mixapp.Service([options])
service.workplaces.get('workplace')
    .then(workplace => {
        return workplace.oidc.removeClient(token, id);
    })
    .catch(err => {})