This is an abstract class, it must be extended to another class that defines the different actions of a specific provision.
This class is responsible for managing the request to execute Norte OpenGate API
constructor
Constructor
Parámetros
Nombre
Tipo
Opcional
Descripción
ogapi
InternalOpenGateAPI
❌
this is ogapi instance
resource
string
❌
this is a base url resource
timeout
number
✅
timeout on request
requiredParameters
array
❌
serviceBaseURL
string
❌
base of the uri petition
create()
This invoke a request to OpenGate North API and the callback is managed by promises
This function create a entity of provision
Retorna
Tip
Tipo:Promise
Ejemplos
ogapi.organizationsBuilder().create()
delete(body)
This invoke a request to OpenGate North API and the callback is managed by promises
This function deletes a entity of provision
Instead of creating a bulk process, return the provision process planning for specified entries. This is is synch process that does not cause changes in the database
This class extends SimpleBuilder to allow set complex values. What is a complex value? It is simple, It is a value
that need a communications module identifier to allow set into the box.
constructor
Constructor
Parámetros
Nombre
Tipo
Opcional
Descripción
ogapi
InternalOpenGateAPI
❌
this is ogapi instance
resource
string
❌
this is the resource url where can be create/delete/update/read the entity
allowedDatastreams
array
✅
Allowed datastreams to add into the new entity
definedSchemas
array
✅
Jsonschema about all OpenGate specific types
jsonSchemaValidator
Validator
✅
Json schema validator tool
withComplex(_id, idCommunicationModules, val)
Set a complex value to entity
Parámetros
Nombre
Tipo
Opcional
Descripción
_id
string
❌
Datastream identifier
idCommunicationModules
string
❌
Communications module identifier
val
object
❌
Value to set.
Retorna
Tip
Tipo:*
Csv Bulk Builder
Csv builder. This builder give you the necessary tools to create a csv bulk using our OpenGate REST.
constructor
Constructor
Parámetros
Nombre
Tipo
Opcional
Descripción
ogapi
InternalOpenGateAPI
❌
required field. This is ogapi instance
organization
string
❌
required field. This is the organization name where entities will be created, updated or deleted
resource
resource
❌
required field. This is the resource used for the bulk provision
timeout
number
✅
timeout in millisecons. The request will have a specific time out if it will be exceeded then the promise throw an exception
async
boolean
✅
forces async execution for the bulk operation
Device Builder
Device builder. This builder give you the necessary tools to create a device using our OpenGate REST.
constructor
Constructor
Parámetros
Nombre
Tipo
Opcional
Descripción
ogapi
InternalOpenGateAPI
❌
this is ogapi instance
organization
string
❌
this is the organization name where device will be created
allowedDatastreams
array
✅
Allowed datastreams to add into the new device
definedSchemas
array
✅
Jsonschema about all OpenGate specific types
jsonSchemaValidator
Validator
✅
Json schema validator tool
ms
number
❌
timeout in milliseconds
create()
This invoke a request to OpenGate North API and the callback is managed by promises
This function create a entity of provision
Retorna
Tip
Tipo:Promise
Ejemplos
ogapi.organizationsBuilder().create()
update()
This invoke a request to OpenGate North API and the callback is managed by promises
This function updates a entity of provision and check if any subscriber/subscription exits or no.
If a subscriber/subscription not exists then this entities will be created and after that will be added to entity box.
Retorna
Tip
Tipo:Promise
Ejemplos
ogapi.entityBuilder.devicesBuilder().update()
Entity Builder
This is a base object that contains all you can do about Devices.
constructor
Constructor
Parámetros
Nombre
Tipo
Opcional
Descripción
Reference
InternalOpenGateAPI
❌
to the API object.
assetsBuilder(organization, timeout)
Get a AssetBuilder for operate with entities of type asset