On this page

## Members

### (constant) IsObject

Helper function that tests if a specific value is an Object.

Source
  - utils/helper.functions.js, line 344

### (constant) ZxAIClientEvent :string

Enum NaeuralEdgeProtocol Client Events

Type:

- string

Source
  - client.js, line 115

### (constant) ZxAIEventType :string

Enum NaeuralEdgeProtocol Event Stream Types

Type:

- string

Source
  - client.js, line 106

### (constant) applyDefaultsToObject

Helper function that returns an object with all the missing mandatory properties based on a generic object provided. The mandatory properties are compuded based on the provided schema. All the properties added are assigned the default values from the schema definition. If no default value is provided in the schema, the property is not added to the returned object.

Source
  - utils/helper.functions.js, line 277

### (constant) base64ToUrlSafeBase64

Helper function that replaces any URL-unsafe characters from a base64 string.

Source
  - utils/helper.functions.js, line 121

### (constant) camelToZxAIFormat

Helper function that transforms camelCase strings into NaeuralEdgeProtocol network specific format. Conventionally, NaeuralEdgeProtocol commands have the keys in uppercase with underscore as word separator.

eg. blockchainKeyPair will be transformed as BLOCKCHAIN_KEY_PAIR

Source
  - utils/helper.functions.js, line 49

### (constant) checkMandatoryFields

Helper function that tests a generic object to have all the mandatory properties populated.

Source
  - utils/helper.functions.js, line 304

### (constant) checkType

Helper function for checking if a value-object is of a specific type (as defined in the schema) and if it's value complies with the allowedValues rule.

Source
  - utils/helper.functions.js, line 168

### (constant) computeDifferences

Helper function that compares two generic objects and returns the modified keys from the second object when compared to the first.

Source
  - utils/helper.functions.js, line 366

### (constant) convertKeysToCamelFormat

Helper function for transforming all the keys of the provided generic object into the conventional camelCase key format.

Source
  - utils/helper.functions.js, line 92

### (constant) convertKeysToZxAIFormat

Helper function for transforming all the keys of the provided generic object into the conventional NaeuralEdgeProtocol Network key format.

Source
  - utils/helper.functions.js, line 60

### (constant) dctSchemas :SchemaCollection

Type:

- SchemaCollection

Source
  - utils/schema.providers.js, line 61

### (constant) decode

Helper function for unzipping a string that has been received as base64.

The reverse process can be obtained with `encode(code)`;

Source
  - utils/helper.functions.js, line 34

### (constant) defaultSchemas

The default schemas supported by the SDK.

Source
  - utils/schema.providers.js, line 86

### (constant) encode

Helper function for zipping a string and encoding the result as base64.

The output can be decoded using `decode(string)`.

Source
  - utils/helper.functions.js, line 20

### (constant) generateId

Helper function that extracts the first two groups of characters from a v4 Uuid. This function can be used for generating unique identification strings for threads, messages or other entities.

Source
  - utils/helper.functions.js, line 354

### (constant) getRedisConnection

Helper function for providing Redis connection.

Source
  - utils/redis.connection.provider.js, line 13

### (constant) hasFleetFilter

This function returns true if the fleet definition is correct and is not the definition of the whole network. For processing the entire network, the fleet should be configured as [ ALL_EDGE_NODES ].

Source
  - utils/helper.functions.js, line 334

### (constant) identityFormatter

The default formatter. Does not alter the received message.

Source
  - formatters/identity.formatter.js, line 7

### (constant) pick

Helper function that extracts a sub-object from the provided object based on the provided path. The path string will represent each selection from the nested levels, separated by dots.

Examples:

- `name.first` will attempt to return the value stored under the `first` key of the nested object stored at `name` property
- `contacts.2.email` will attempt to extract the email stored under the third index of the `contacts` array

If no value can be found at the end of the path, the function returns `undefined`.

Source
  - utils/helper.functions.js, line 140

### (constant) pluginDefinition :SchemaDefinition

The VideoFile schema definition.

Type:

- SchemaDefinition

Source
  - utils/plugins/custom.exec.plugin.js, line 8

### (constant) pluginSchemas :SchemaCollection

Type:

- SchemaCollection

Source
  - utils/schema.providers.js, line 71

### (constant) rawIn

Transforms `raw` messages into the default format. TODO: add link to the internal format docs.

Source
  - formatters/raw.formatter.js, line 10

### (constant) schema :SchemaDefinition

The MetaStream schema definition.

Type:

- SchemaDefinition

Source
  - utils/dcts/meta.stream.dct.js, line 8

### (constant) schema :SchemaDefinition

The VideoFile schema definition.

Type:

- SchemaDefinition

Source
  - utils/dcts/on.demand.input.dct.js, line 8

### (constant) schema :SchemaDefinition

The VideoFile schema definition.

Type:

- SchemaDefinition

Source
  - utils/dcts/on.demand.text.input.dct.js, line 8

### (constant) schema :SchemaDefinition

The VideoFile schema definition.

Type:

- SchemaDefinition

Source
  - utils/dcts/video.file.dct.js, line 8

### (constant) schema :SchemaDefinition

The VideoFile schema definition.

Type:

- SchemaDefinition

Source
  - utils/dcts/video.stream.dct.js, line 8

### (constant) schema :SchemaDefinition

The VoidStream schema definition.

Type:

- SchemaDefinition

Source
  - utils/dcts/void.dct.js, line 8

### (constant) schemas :SchemasRepository

Type:

- SchemasRepository

Source
  - utils/schema.providers.js, line 76

### (constant) sleep

Helper function that resolves a promise after a specified amount of milliseconds.

Source
  - utils/helper.functions.js, line 323

### (constant) urlSafeBase64ToBase64

Helper function that reverts any replaced URL-unsafe characters in a base64 string.

Source
  - utils/helper.functions.js, line 111

### (constant) validateAgainstSchema

Helper function that validates a generic object based on a received schema. Will return an array of all the validation errors, if any, empty array otherwise. This function will not check if all the mandatory keys are present, it will only test if the provided values are of the correct type and the allowedValues rule is not broken.

Source
  - utils/helper.functions.js, line 234

### (constant) zxAIFormatToCamel

Helper function for transforming an NaeuralEdgeProtocol Network conventional OBJECT_KEY into a camel case objectKey.

Source
  - utils/helper.functions.js, line 79

## Methods

### archiveConfigRequestStrategy(notification, request)

Defines the strategy to be applied when attempting to solve an ARCHIVE_CONFIG network request.

Parameters:

Name | Type | Description
--- | --- | ---
`notification` | Object |
`request` | NetworkRequest |

Source
  - models/network.requests.handler.js, line 37

### updateConfigRequestStrategy(notification, request)

Defines the strategy to be applied when attempting to solve an UPDATE_CONFIG network request.

Parameters:

Name | Type | Description
--- | --- | ---
`notification` | Object |
`request` | NetworkRequest |

Source
  - models/network.requests.handler.js, line 54

### updatePipelineInstanceRequestStrategy(notification, request)

Defines the strategy to be applied when attempting to solve an UPDATE_PIPELINE_INSTANCE or BATCH_UPDATE_PIPELINE_INSTANCE network request.

Parameters:

Name | Type | Description
--- | --- | ---
`notification` | Object |
`request` | NetworkRequest |

Source
  - models/network.requests.handler.js, line 86

## Type Definitions

### AlertedNodes

Type:

- Object.<string, number>

Source
  - client.js, line 1

### AllowedValues

Represents the allowed values for a field.

Type:

- Array.<string> | IntervalDefinition

Source
  - utils/schema.providers.js, line 8

### AvailableDCTResponse

Type:

- Object

Properties

Name | Type | Description
--- | --- | ---
`name` | string | The name of the entity.
`description` | string | A description of the entity.
`type` | string | The unique signature.

Source
  - client.js, line 39

### AvailableSchemaResponse

Type:

- Object

Properties

Name | Type | Description
--- | --- | ---
`signature` | string | The unique signature.
`linkable` | boolean | Indicates if the entity is linkable.
`name` | string | The name of the entity.
`description` | string | A description of the entity.

Source
  - client.js, line 31

### Field

Represents a field in the configuration.

Type:

- Object

Properties

Name | Type | Attributes | Description
--- | --- | --- | ---
`key` | string |  | The key identifier for the field.
`type` | string |  | The type of the field (e.g., 'integer').
`label` | string |  | The human-readable label for the field.
`description` | string |  | The description of the field.
`default` | * |  | The default value for the field.
`required` | boolean |  | Whether the field is required.
`allowedValues` | AllowedValues | <optional> | The allowed values for the field.

Source
  - utils/schema.providers.js, line 13

### IntervalDefinition

Represents the configuration for an interval.

Type:

- Object

Properties

Name | Type | Attributes | Description
--- | --- | --- | ---
`min` | number | <optional> | The minimum value for the interval
`max` | number | <optional> | The maximum value for the interval

Source
  - utils/schema.providers.js, line 1

### NodeStatus

Type:

- Object

Source
  - models/state.js, line 19

### ObservedNodes

Type:

- Object.<string, number>

Source
  - models/state.js, line 15

### RedisConnectionOptions

Type:

- Object

Source
  - utils/redis.connection.provider.js, line 3

### SchemaCollection

A dictionary object holding schema configurations

Type:

- Object.<string, SchemaDefinition>

Source
  - utils/schema.providers.js, line 35

### SchemaDefinition

Represents the schema configuration

Type:

- Object

Properties

Name | Type | Attributes | Description
--- | --- | --- | ---
`options` | * | <optional> | Optional property describing other options.
`name` | string |  | The name of the DCT.
`description` | string |  | The description of the DCT.
`type` | string |  | The type of the DCT, indicating the specific DCT type.
`fields` | Array.<Field> |  | An array of fields for the DCT configuration.

Source
  - utils/schema.providers.js, line 25

### SchemasRepository

Type:

- Object

Source
  - utils/schema.providers.js, line 40

### ZxAIBlockchainOptions

Type:

- Object

Properties

Name | Type | Attributes | Description
--- | --- | --- | ---
`debug` | boolean | <optional> | Indicates if debugging is enabled.
`key` | string | <optional> | The key for the blockchain.
`encrypt` | boolean | <optional> | Indicates if encryption is enabled.
`secure` | boolean | <optional> | Indicates if the connection should be secure.

Source
  - utils/blockchain.js, line 45

### ZxAIClientOptions

Type:

- Object

Properties

Name | Type | Description
--- | --- | ---
`emitterOptions` | any | the EventEmitter2 setup
`initiator` | any | The initiator of the configuration.
`blockchain` | Object | Blockchain related configurations. ###### Properties
Name | Type | Description
--- | --- | ---
`debug` | boolean | Indicates if blockchain debugging is enabled.
`key` | string | The blockchain key.
`stateManager` | string | Describes the state manager.
`loglevel` | string | Describes the state manager.
`redis` | Object | Redis configuration details. ###### Properties
Name | Type | Description
--- | --- | ---
`host` | string | The Redis server host.
`port` | number | The Redis server port.
`password` | any | The Redis password.
`pubSubChannel` | string | The Redis Pub/Sub channel name.
`mqttOptions` | Object | MQTT connection options. ###### Properties
Name | Type | Description
--- | --- | ---
`url` | any | The MQTT server URL.
`username` | any | The MQTT username for authentication.
`password` | any | The MQTT password for authentication.
`customFormatters` | Object | Custom formatters for configuration.
`threads` | Object | Thread configuration for various tasks. ###### Properties
Name | Type | Description
--- | --- | ---
`heartbeats` | number | The number of heartbeat threads.
`notifications` | number | The number of notification threads.
`payloads` | number | The number of payload processing threads.
`fleet` | Array.<string> | An array of fleet strings.

Source
  - client.js, line 5

### ZxAICommand

Type:

- Object

Properties

Name | Type | Attributes | Description
--- | --- | --- | ---
`ACTION` | string |  | The action to be performed on the network node
`PAYLOAD` | Object | string |  | The payload for the forementioned `ACTION`
`EE_ID` | string | <optional> | The node identificator to route the command to, is optional up until the actual publishing.
`EE_SENDER` | string | <optional> | The identity of the sender, is optional up until publishing
`EE_HASH` | string | <optional> | The sha256 hash of the `ACTION` and `PAYLOAD`
`EE_SIGN` | string | <optional> | The signature of the `EE_HASH` using the `EE_SENDER`'s identity
`INITIATOR_ID` | string | <optional> | Optional until publishing, the human-readable identity of the sender.
`SESSION_ID` | string | <optional> | Optional, the session ID to be used when performing the action.

Source
  - constants.js, line 1

### ZxAIUpdateInstanceConfig

Type:

- Object

Properties

Name | Type | Description
--- | --- | ---
`NAME` | string | The pipeline id
`SIGNATURE` | string | The instance signature
`INSTANCE_ID` | string | The instance id
`INSTANCE_CONFIG` | Object | The new configuration to be applied for the instance

Source
  - constants.js, line 13

Type anything to view search result