Manual Reference Source Test
import StatusService from 'clinical6/src/services/StatusService.js'
public class | source

StatusService

Extends:

AbstractServiceJsonApiService → StatusService

Service handling Status calls.

Constructor Summary

Public Constructor
public

Update type to be statuses

Method Summary

Public Methods
public

async check(obj: Helper, options: Object): Promise<Status>

public

getSections(resource: String, ownerType: String, owner: String): Promise

Retrieves the status values for the sections.

public

async getStatus(type: String, object: Object, ownerType: String, owner: String): Promise

this method was deprecated.

Retrieves an individual status value for the sections.

public

transition(transition: String, type: String, object: Object, ownerType: String, owner: String): Promise

Explicitely applies an action to transition the object status from one status to another.

Inherited Summary

From class AbstractService
public get
public set
public
private
From class JsonApiService
public

options: *

public

async delete(obj: Object, options: String): Promise

Call a DELETE request on the main obj.type expecting JSON API information.

public

async get(params: Object, options: String): Promise

Call a GET request expecting JSON API information.

public

async getChildren(parent: Object, child: Object, options: String): Promise

Call a GET request expecting JSON API information for children given a parent.

public

async insert(obj: Object, options: String): Promise

Call a POST request on the main obj.type expecting JSON API information.

public

async update(obj: Object, options: String): Promise

Call a PATCH request on the main obj.type expecting JSON API information.

Public Constructors

public constructor() source

Update type to be statuses

Override:

JsonApiService#constructor

Public Methods

public async check(obj: Helper, options: Object): Promise<Status> source

Params:

NameTypeAttributeDescription
obj Helper

Object to which get the status

options Object
  • optional

Override the options for this call

options.cacheMode String
  • optional

Override the caching method for this call

Return:

Promise<Status>

Promise object that returns a status

Throw:

Clinical6Error

If missing token or missing required parameters

Example:

import { statusService } from 'clinical6';

// You can retrieve an object's status with the `check(obj)` method
statusService.check(user).then(status => console.log(status));

Test:

public getSections(resource: String, ownerType: String, owner: String): Promise source

Retrieves the status values for the sections.

Params:

NameTypeAttributeDescription
resource String

The dynamic content section resource having sections.

ownerType String

The owner type.

owner String

The owner resource or id.

Return:

Promise

Promise object that returns success or failure

Decorators:

  • deprecate

Test:

public async getStatus(type: String, object: Object, ownerType: String, owner: String): Promise source

this method was deprecated.

Retrieves an individual status value for the sections.

Params:

NameTypeAttributeDescription
type String

The type of the section

object Object

The object attribute of the section

ownerType String

The owner type.

owner String
  • optional

The owner resource or id.

Return:

Promise

Promise object that returns success or failure

Decorators:

  • deprecate

Test:

public transition(transition: String, type: String, object: Object, ownerType: String, owner: String): Promise source

Explicitely applies an action to transition the object status from one status to another.

Params:

NameTypeAttributeDescription
transition String

The action to be applied to change the status of the object

type String

The type of the section

object Object

The object attribute of the section

ownerType String

The owner type.

owner String

The owner resource or id.

Return:

Promise

Promise object that returns success or failure