pushRequest

pushRequest

Contains constants and functions for a Push Request.

The structure for a Push Request is as follows:

{
  payload: {
    event: 'push request from pipeline'
    groupID: <string>,
    platform: <string>,
    pushTokens: <string>,
  },
  type: 'Push Service'
  vendor: 'com.adobe.cepheus'
  annotations: <array>,
  clientId: <string>,
  timestamp: <number>,
  uuid: <string>,
}
Source:

Members

(static, constant) EVENT_NAME

The value for eventName for a Push Request.

Path is payload,event.

Source:

(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 Push Request 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 Push Request

Properties:
Name Type Description
payload string

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

eventName string

The name of the event.
Path is payload.event.

groupId string

id to stitch the requests together.
Path is payload.groupID.

platform string

The platform to send the push to.
Path is payload.platform.

pushToken string

The push token to send to.
Path is payload.pushTokens.

rootType string

The type of event.
Path is type.

vendor string

The vendor of the service that sent the event.
Path is vendor.

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 Push Request.

Path is type.

Source:

(static, constant) VENDOR

The value for vendor for a Push Request.

Path is vendor.

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) getEventName(source) → {string}

Returns the eventName from the Push Request. This is the the name of the event.

Path is payload,event.

Parameters:
Name Type Description
source object

The Push Request instance

Source:

(static) getGroupId(source) → {string}

Returns the groupId from the Push Request. This is the id to stitch the requests together.

Path is payload,groupID.

Parameters:
Name Type Description
source object

The Push Request instance

Source:

(static) getPlatform(source) → {string}

Returns the platform from the Push Request. This is the the platform to send the push to.

Path is payload,platform.

Parameters:
Name Type Description
source object

The Push Request instance

Source:

(static) getPushToken(source) → {string}

Returns the pushToken from the Push Request. This is the the push token to send to.

Path is payload,pushTokens.

Parameters:
Name Type Description
source object

The Push Request instance

Source:

(static) isMatch(source) → {boolean}

Tests the provided source against the matcher to see if it's Push Request event.

Parameters:
Name Type Description
source object

The Push Request instance

Source:
See:
  • kit.isMatch

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

Generates a Push Request 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 Push Request 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: