ChinoAPIUserSchemas

ChinoAPIUserSchemas

new ChinoAPIUserSchemas(baseUrl, customerId, customerKey)

Create a caller for User Schemas Chino APIs

Parameters:
Name Type Default Description
baseUrl string

The url endpoint for APIs

customerId string

The Chino customer id or bearer token

customerKey string | null null

The Chino customer key or null (not provided)

Source:

Methods

create(data) → {Promise.<objects.UserSchema, objects.ChinoException>}

Create a new user schema

Parameters:
Name Type Description
data object
Source:
Returns:

A promise that return a UserSchema object if resolved, otherwise throw an ChinoException object if rejected or was not retrieved a success status

Type
Promise.<objects.UserSchema, objects.ChinoException>

delete(userSchemaId, force) → {Promise.<objects.Success, objects.ChinoException>}

Deactivate (or delete) user schema selected by its id

Parameters:
Name Type Default Description
userSchemaId string
force boolean false

If true delete user schema information otherwise only deactivate it. Default value is false (deactivate)

Source:
Returns:

A promise that return a Success object if resolved, otherwise throw an ChinoException object if rejected or was not retrieved a success status

Type
Promise.<objects.Success, objects.ChinoException>

details(userSchemaId) → {Promise.<objects.UserSchema, objects.ChinoException>}

Return information about user schema selected by its id

Parameters:
Name Type Description
userSchemaId string
Source:
Returns:

A promise that return a User object if resolved, otherwise throw an ChinoException object if rejected or was not retrieved a success status

Type
Promise.<objects.UserSchema, objects.ChinoException>

list(offset, limit) → {Promise.<Array, objects.ChinoException>}

Return the list of current user schemas

Parameters:
Name Type Default Description
offset int 0
limit int 10
Source:
Returns:

A promise that return a list of UserSchema object if resolved, otherwise throw an ChinoException object if rejected or was not retrieved a success status

Type
Promise.<Array, objects.ChinoException>

update(userSchemaId, data) → {Promise.<objects.UserSchema, objects.ChinoException>}

Update information about user schema selected by its id with data as new user schema information

Parameters:
Name Type Description
userSchemaId string
data object
Source:
Returns:

A promise that return a User object if resolved, otherwise throw an ChinoException object if rejected or was not retrieved a success status

Type
Promise.<objects.UserSchema, objects.ChinoException>