Manual Reference Source

Typedef

Static Public Summary
public

The ClientOptions object contains information about the server.

public

The GSF object provides an entry point to the SDK.

public

The InputParameter object contains information about an input parameter.

public

Emitted when a job is accepted.

public

Emitted when a job completes.

public

Emitted when a job fails.

public

The JobInfo object contains information about a job.

public

A list of JobInfo objects with count and total information.

public

Filtering options for listing jobs.

public

The Job Options object contains processing options to be used when running the job.

public

Emitted when job progress is updated.

public

Information about job progress.

public

The job output results.

public

The JobResults object contains the job results.

public

Emitted when a job starts.

public

Called when a job starts processing.

public

Emitted when a job succeeds.

public

Provides information about the node on which the job ran.

public

The OutputParameter object contains information about an output parameter.

public

The ServiceInfo object contains information about a service.

public

The Submit Options object contains the information needed to run a job.

public

The TaskInfo object contains information about a task.

Static Public

public ClientOptions: Object source

The ClientOptions object contains information about the server.

Properties:

NameTypeAttributeDescription
ClientOptions.address string

The server address/name.

ClientOptions.port string
  • optional
  • default: null

The server port.

ClientOptions.headers Object
  • optional
  • default: {}

The headers to be used in requests.

ClientOptions.APIRoot string
  • optional
  • default: ''

The API root endpoint.

ClientOptions.protocol string
  • optional
  • default: 'http'

The protocol to use.

public GSF: Object source

The GSF object provides an entry point to the SDK.

Properties:

NameTypeAttributeDescription
client function(clientOptions: ClientOptions): Client

The function for creating a new Client object.

Example:

const client = GSF.client({address:'MyServer',port:9191});

public InputParameter: Object source

The InputParameter object contains information about an input parameter.

Properties:

NameTypeAttributeDescription
name string

The name of the parameter.

type string

The type for the parameter.

required boolean

A boolean representing whether or not the parameter is required.

displayName string
  • optional

A display name for the parameter.

description string
  • optional

A description of the parameter.

default string
  • optional

A default value for the parameter.

choiceList string
  • optional

A list of values that will be accepted as input for the parameter.

public JobAccepted: Object source

Emitted when a job is accepted.

Properties:

NameTypeAttributeDescription
jobId string

The job id.

public JobCompleted: Object source

Emitted when a job completes.

Properties:

NameTypeAttributeDescription
jobId string

The job id.

success boolean

A boolean set to true if the job succeeds, false if it fails.

public JobFailed: Object source

Emitted when a job fails.

Properties:

NameTypeAttributeDescription
jobId string

The job id.

public JobInfo: Object source

The JobInfo object contains information about a job.

Properties:

NameTypeAttributeDescription
serviceName string

The name of the service.

taskName string

The name of the task.

jobOptions JobOptions
  • optional

Processing directives to submit along with the job.

inputParameters Object
  • optional

The input parameters.

jobId string

The job id.

jobProgress number
  • optional

The percentage of job completion.

jobMessage string
  • optional

A status message that is sent with progress updates.

jobStatus string

The status of the job. It can be Accepted, Started, Succeeded, or Failed.

jobResults JobResults
  • optional

The job output results.

jobSubmitted string
  • optional

Time the job was submitted.

jobStart string
  • optional

Time the job started processing.

jobEnd string
  • optional

Time the job finished processing.

jobError string
  • optional

An error from the job, if there was one.

nodeInfo NodeInfo
  • optional

Provides information about the node on which the job ran.

public JobInfoList: Object source

A list of JobInfo objects with count and total information.

Properties:

NameTypeAttributeDescription
jobs JobInfo[]

An array of JobInfo objects that match the search criteria.

count string

The number of filtered jobs in the jobs array.

total string
  • optional

The total number of jobs. Enabled by default. To disable, set 'totals' to 'none' in the JobListOptions.

accepted string
  • optional

The total number of accepted jobs. This can be enabled by setting 'totals' to 'all' in the JobListOptions.

started string
  • optional

The total number of started jobs. This can be enabled by setting 'totals' to 'all' in the JobListOptions.

succeeded string
  • optional

The total number of succeeded jobs. This can be enabled by setting 'totals' to 'all' in the JobListOptions.

failed string
  • optional

The total number of failed jobs. This can be enabled by setting 'totals' to 'all' in the JobListOptions.

public JobListOptions: Object source

Filtering options for listing jobs.

Properties:

NameTypeAttributeDescription
query Object

Filter jobs by specifying one or more comparison operators per property. Comparison operators must be prefixed with '$' and only the following are supported: $eq, $ne, $gt, $gte, $lt, $lte. Queries may contain multiple properties and each property may contain multiple comparison operators.

sort Array

The sort array. This array contains an array for each sort which consists of the property to sort by and the direction. To sort in ascending order use 1 and to sort in descending order use -1. For example, to sort by jobSubmitted date in ascending order: [ [ 'jobSubmitted', 1 ] ]

offset number

The number of jobs to skip; useful for pagination.

limit number

Limit the number of jobs returned. Set to -1 to return all jobs. Note: -1 is not recommended, as it may take a long time to retrieve all jobs.

totals string

Types of total job counts to include in the response. Must be one of: 'all', 'none', or 'default'. The default is 'default'. Set to 'none' to exclude totals. Set to 'default' to include total count of all filtered jobs. Set to 'all' to include total count of all filtered jobs and the total counts of filtered jobs in each job status. Totals will only be visible when used with the jobInfoList() function.

public JobOptions: Object source

The Job Options object contains processing options to be used when running the job.

Properties:

NameTypeAttributeDescription
route string
  • optional

The route on which to run the job if there is one.

public JobProgress: Object source

Emitted when job progress is updated.

Properties:

NameTypeAttributeDescription
jobId string

The job id.

progress number

The job progress percent.

message string
  • optional

The job progress message, if any.

public JobProgressInfo: Object source

Information about job progress.

Properties:

NameTypeAttributeDescription
jobId string

The job id.

progress number

The job progress percent.

message string
  • optional

The job progress message, if any.

public JobResults: Object source

The job output results.

Properties:

NameTypeAttributeDescription
<parameterName>.best *

Result from the first parameter mapper which was able to reverse translate the output value.

<parameterName>.raw *

The raw output value returned by the task.

public JobResults: Object source

The JobResults object contains the job results.

public JobStarted: Object source

Emitted when a job starts.

Properties:

NameTypeAttributeDescription
jobId string

The job id.

public JobStartedInfo: Object source

Called when a job starts processing. For more reliable job started information, listen to the GSF JobStarted events as this callback may not always get called. In some cases the job can start before the callback is registered.

Properties:

NameTypeAttributeDescription
jobId string

The job id.

public JobSucceeded: Object source

Emitted when a job succeeds.

Properties:

NameTypeAttributeDescription
jobId string

The job id.

public NodeInfo: Object source

Provides information about the node on which the job ran.

Properties:

NameTypeAttributeDescription
nodeAddress string

This is the address of the machine that ran job.

nodePort number

The port of the server that ran the job.

workerID number

The ID of the worker that ran the job.

public OutputParameter: Object source

The OutputParameter object contains information about an output parameter.

Properties:

NameTypeAttributeDescription
name string

The name of the parameter.

type string

The type for the parameter.

required boolean

A boolean representing whether or not the parameter is required.

displayName string
  • optional

A display name for the parameter.

description string
  • optional

A description of the parameter.

public ServiceInfo: Object source

The ServiceInfo object contains information about a service.

Properties:

NameTypeAttributeDescription
name string

The name of the service.

description string

A description of the service.

public SubmitOptions: * source

The Submit Options object contains the information needed to run a job.

Properties:

NameTypeAttributeDescription
inputParameters Object

The input parameters to the job. This is an object where the keys represent the names of the input parameters and the values are the inputs to the task.

jobOptions JobOptions
  • optional

Processing options to be used when running the job.

public TaskInfo: Object source

The TaskInfo object contains information about a task.

Properties:

NameTypeAttributeDescription
taskName string

The name of the task.

serviceName string

The name of the service.

displayName string
  • optional

A readable name for the task. This is only used for display purposes.

description string
  • optional

A description of the task.

inputParameters InputParameter[]

An array containing the input parameter definitions.

outputParameters OutputParameter[]

An array containing the output parameter definitions.