Home Manual Reference Source Test Repository
import OperationActions from 'opengate-js/src/operations/OperationActions.js'
public class | source

OperationActions

Constructor Summary

Public Constructor
public

constructor(ogapi: InternalOpenGateAPI, operationId: string)

Constructor

Method Summary

Public Methods
public

This invoke a request to OpenGate North API and the callback is managed by promises This function active an operation

public

This invoke a request to OpenGate North API and the callback is managed by promises This function active periodicity of an operation

public

This invoke a request to OpenGate North API and the callback is managed by promises This function cancela operation

public

This invoke a request to OpenGate North API and the callback is managed by promises This function cancel the periodicity of an operation

public

changeCallback(url: string): promise

This invoke a request to OpenGate North API and the callback is managed by promises This function pauses (if it was active), updates the callback and passes the operation to the initial state (if activated, activated again)

public

executeLater(minutes: number): promise

This invoke a request to OpenGate North API and the callback is managed by promises This function pauses (if it was active), updates the delay and passes the operation to the initial state (if activated, activated again)

public

This invoke a request to OpenGate North API and the callback is managed by promises This function pause, update its delay and active an operation for execute immediately

public

This invoke a request to OpenGate North API and the callback is managed by promises This function pause an operation

public

This invoke a request to OpenGate North API and the callback is managed by promises This function pause periodicity of an operation

Public Constructors

public constructor(ogapi: InternalOpenGateAPI, operationId: string) source

Constructor

Params:

NameTypeAttributeDescription
ogapi InternalOpenGateAPI

this is configuration about Opengate North API.

operationId string

Identifier of the operation on which the action will be carried out

Public Methods

public active(): Promise source

This invoke a request to OpenGate North API and the callback is managed by promises This function active an operation

Return:

Promise

Return Properties:

NameTypeAttributeDescription
then function(statusCode: number)

When request it is OK

then function(errors: array, statusCode: number)

When request it is NOK

catch function(errors: array)

When request it is NOK

Example:

ogapi.newOperationActions("xxxxx-xxx-xxxx-xxxxx").active()

public activePeriodicity(): Promise source

This invoke a request to OpenGate North API and the callback is managed by promises This function active periodicity of an operation

Return:

Promise

Return Properties:

NameTypeAttributeDescription
then function(statusCode: number)

When request it is OK

then function(errors: array, statusCode: number)

When request it is NOK

catch function(errors: array)

When request it is NOK

Example:

ogapi.newOperationActions("xxxxx-xxx-xxxx-xxxxx").activePeriodicity()

public cancel(): Promise source

This invoke a request to OpenGate North API and the callback is managed by promises This function cancela operation

Return:

Promise

Return Properties:

NameTypeAttributeDescription
then function(result: object, statusCode: number)

When request it is OK

then function(errors: array, statusCode: number)

When request it is NOK

catch function(errors: array)

When request it is NOK

Example:

Actions("xxxxx-xxx-xxxx-xxxxx").cancel();

public cancelPeriodicity(): Promise source

This invoke a request to OpenGate North API and the callback is managed by promises This function cancel the periodicity of an operation

Return:

Promise

Return Properties:

NameTypeAttributeDescription
then function(result: object, statusCode: number)

When request it is OK

then function(errors: array, statusCode: number)

When request it is NOK

catch function(errors: array)

When request it is NOK

Example:

ogapi.OperationActions("xxxxx-xxx-xxxx-xxxxx").cancelPeriodicity();

public changeCallback(url: string): promise source

This invoke a request to OpenGate North API and the callback is managed by promises This function pauses (if it was active), updates the callback and passes the operation to the initial state (if activated, activated again)

Params:

NameTypeAttributeDescription
url string
  • nullable: false

Return:

promise

Return Properties:

NameTypeAttributeDescription
then function(statusCode: number)

When request it is OK

then function(errors: array, statusCode: number)

When request it is NOK

catch function(errors: array)

When request it is NOK

Example:

ogapi.OperationActions("xxxxx-xxx-xxxx-xxxxx").changeCallback("http://[your_application_address]/[your_URI]")

public executeLater(minutes: number): promise source

This invoke a request to OpenGate North API and the callback is managed by promises This function pauses (if it was active), updates the delay and passes the operation to the initial state (if activated, activated again)

Params:

NameTypeAttributeDescription
minutes number
  • nullable: false

Return:

promise

Return Properties:

NameTypeAttributeDescription
then function(statusCode: number)

When request it is OK

then function(errors: array, statusCode: number)

When request it is NOK

catch function(errors: array)

When request it is NOK

Example:

ogapi.OperationActions("xxxxx-xxx-xxxx-xxxxx").executeLater(10)

public executeNow(): Promise source

This invoke a request to OpenGate North API and the callback is managed by promises This function pause, update its delay and active an operation for execute immediately

Return:

Promise

Return Properties:

NameTypeAttributeDescription
then function(statusCode: number)

When request it is OK

then function(errors: array, statusCode: number)

When request it is NOK

catch function(errors: array)

When request it is NOK

Example:

ogapi.OperationActions("xxxxx-xxx-xxxx-xxxxx").executeNow()

public pause(): Promise source

This invoke a request to OpenGate North API and the callback is managed by promises This function pause an operation

Return:

Promise

Return Properties:

NameTypeAttributeDescription
then function(statusCode: number)

When request it is OK

then function(errors: array, statusCode: number)

When request it is NOK

catch function(errors: array)

When request it is NOK

Example:

ogapi.OperationActions("xxxxx-xxx-xxxx-xxxxx").pause()

public pausePeriodicity(): Promise source

This invoke a request to OpenGate North API and the callback is managed by promises This function pause periodicity of an operation

Return:

Promise

Return Properties:

NameTypeAttributeDescription
then function(statusCode: number)

When request it is OK

then function(errors: array, statusCode: number)

When request it is NOK

catch function(errors: array)

When request it is NOK

Example:

ogapi.OperationActions("xxxxx-xxx-xxxx-xxxxx").pausePeriodicity()