clientInfo

clientInfo

Contains constants and functions for a Client Info Event.

The structure for a Client Info Event is as follows:

{
  payload: {
    appSettings: <object>,
    deviceInfo: <object>,
    type: 'connect'
    version: <string>,
  },
  type: 'client'
  annotations: <array>,
  clientId: <string>,
  timestamp: <number>,
  uuid: <string>,
}
Source:

Members

(static, constant) group

A grouping for this object

Source:

(static, constant) label

A label that can be used when describing this object

Source:

(static, constant) matcher

Matcher can be used to find matching Client Info Event objects.

Source:
See:
  • kit.match

(static, constant) parentDepth

Describes the number of parents this object has based off schema references. When checking for matches for example, we want to use a schema that is more specific over a more generic schema

Source:

(static, constant) path :string

Paths for the keys on a Client Info Event

Properties:
Name Type Description
payload string

An object with custom data describing the event.
Path is payload.

appSettings string

A map containing details about the settings of the application on which Griffon is registered.
Path is payload.appSettings.

deviceInfo string

A map containing details about the connected device.
Path is payload.deviceInfo.

type string

Constant value representing this event will initiate a connection.
Path is payload.type.

version string

Griffon SDK Extension version.
Path is payload.version.

rootType string

The type of event.
Path is type.

annotations string

Array of Annotation objects.
Path is annotations.

clientId string

A unique id that differentiates clients from one another.
Path is clientId.

timestamp string

When the event occurred.
Path is timestamp.

rootId string

Uniquely identifies each event.
Path is uuid.

Source:

(static, constant) ROOT_TYPE

The value for rootType for a Client Info Event.

Path is type.

Source:

(static, constant) TYPE

The value for type for a Client Info Event.

Path is payload,type.

Source:

Methods

(static) get(alias, data) → {*}

Retrieves a value from the object. You can provide either a path or an alias.

Parameters:
Name Type Description
alias string

Path or alias

data *

Data to search

Source:

(static) getAppSettings(source) → {object}

Returns the appSettings from the Client Info Event. This is the a map containing details about the settings of the application on which Griffon is registered.

Path is payload,appSettings.

Parameters:
Name Type Description
source object

The Client Info Event instance

Source:

(static) getAppSettingsKey(…path, source) → {*}

Returns the data using the specified path from the appSettings of the Client Info Event.

Parameters:
Name Type Attributes Description
path string <repeatable>

key in object

source object

The Client Info Event instance

Source:

(static) getDeviceInfo(source) → {object}

Returns the deviceInfo from the Client Info Event. This is the a map containing details about the connected device.

Path is payload,deviceInfo.

Parameters:
Name Type Description
source object

The Client Info Event instance

Source:

(static) getDeviceInfoKey(…path, source) → {*}

Returns the data using the specified path from the deviceInfo of the Client Info Event.

Parameters:
Name Type Attributes Description
path string <repeatable>

key in object

source object

The Client Info Event instance

Source:

(static) getType(source) → {string}

Returns the type from the Client Info Event. This is the constant value representing this event will initiate a connection.

Path is payload,type.

Parameters:
Name Type Description
source object

The Client Info Event instance

Source:

(static) getVersion(source) → {string}

Returns the version from the Client Info Event. This is the griffon SDK Extension version.

Path is payload,version.

Parameters:
Name Type Description
source object

The Client Info Event instance

Source:

(static) isMatch(source) → {boolean}

Tests the provided source against the matcher to see if it's Client Info Event event.

Parameters:
Name Type Description
source object

The Client Info Event instance

Source:
See:
  • kit.isMatch

(static) make(…input) → {object}

Generates a Client Info Event with the const values set. Can be useful in testing. Can provide additional data by providing a flat object of paths and values.

Parameters:
Name Type Attributes Description
input function <repeatable>

Overrides

Source:

(static) mock(…input) → {object}

Generates a Client Info Event with some default values set. Can be useful in testing. Can override defaults and provide additional data by providing a flat object of paths and values.

Parameters:
Name Type Attributes Description
input function <repeatable>

Overrides

Source: