Module: Session

Members

(static) EventName :string

Type:
  • string
Properties:
Name Type Description
ON_RECORD_SUBMIT string
ON_RECORD_SUBMIT_FAIL string
Source:

Methods

(static) endSession(success)

Ends a user's session
Parameters:
Name Type Description
success Callback Callback function indicating method invoked.
Source:

(static) getVersion(success)

returns a string representation of the sdk version. 1.3 currently.
Parameters:
Name Type Description
success VersionCallback Callback passed the version number of the native library the plugin is interacting with.
Source:

(static) isSessionActive(success)

Indicates there is an active Session with a user
Parameters:
Name Type Description
success IsActiveCallback Callback function indicating whether an active session is available
Source:

(static) setSessionListener(success, fail)

Registers listeners for record upload success and failure callbacks. It is recommended to use event listeners instead.
Parameters:
Name Type Description
success EventCallback Function invoked for each record successfully uploaded to the server. The uploaded record is included in the payload.
fail EventCallback Callback invoked for each record which experiences a non-recoverable upload error.
Source:

(static) startSession(userId, orgId, accessToken, success, fail)

Starts a session with a User's credentials.
Parameters:
Name Type Description
userId string Id of the user.
orgId string Organization Id.
accessToken string Security Access Token.
success function Callback. No parameters passed.
fail FailCallback Callback if parameters are invalid types or are missing. This function does NOT verify that the credentials are valid.
Source:

(static) submitRecord(record, imgopt, successValidate, errorValidate)

Submits a record to the validic backend
Parameters:
Name Type Attributes Description
record Record Record to upload.
img string <optional>
Base64 encoded image associated with a record.
successValidate function Invoked on successful submission (not upload).
errorValidate FailCallback Invoked on invalid record or other record submission issues.
Source:

(static) submitRecords(records, successValidate, errorValidate)

Submits an array of records to the Validic backend
Parameters:
Name Type Description
records Array.<Record> Array of records to be submitted.
successValidate function Callback acknowledging record submission.
errorValidate FailCallback Invoked on submission error. Invalid parameters, etc.
Source: