GSS

1.45.6

object

Description

Provides a “Map” container interface of GssProvider instances keyed by provider name.

methodentries
() => object[][]

Returns

object[][]

methodforEach
(callback: (provider: GssProvider, providerName: string) => void) => void

Description

Iterates over the provider

Parameters

Name
Type
Required
Description

callback

(provider: GssProvider, providerName: string) => void

yes

Returns

void

methodget
(name: string) => GssProvider

Description

Finds a provider by its name

Parameters

Name
Type
Required
Description

name

string

yes

Returns

GssProvider

methodhas
(name: string) => boolean

Description

Tests whether a provider can be found by name

Parameters

Name
Type
Required
Description

name

string

yes

Returns

boolean

methodkeys
() => string[]

Returns

string[]

methodvalues
() => GssProvider[]

Returns

GssProvider[]

Properties

number

object

(gssEntities: any[], descriptors: GssFields, logger: API) => { [key: string]: any; }[]

Parameters

Name
Type
Required
Description

gssEntities

any[]

yes

descriptors

yes

logger

API

yes

Returns

{ [key: string]: any; }[]

(agm: API, settings: GssDmConfig) => GssDesktopManager

Parameters

Name
Type
Required
Description

agm

API

yes

settings

GssDmConfig

yes

Returns

GssDesktopManager

methodnoConflict
() => boolean

Returns

boolean

Properties

object

methodsameAs
(other: GssEntityType) => boolean

Parameters

Name
Type
Required
Description

other

yes

Returns

boolean

Properties

string

object

Description

Provides a “Map” container interface of GssEntityTypes keyed by entity type name.

methodentries
() => [string, GssEntityType]

Returns

[string, GssEntityType]

methodforEach
(callback: (entityType: GssEntityType, entityTypeName: string) => void) => void

Description

Iterates over the entity types

Parameters

Name
Type
Required
Description

callback

(entityType: GssEntityType, entityTypeName: string) => void

yes

Returns

void

methodget
(name: string) => GssEntityType

Description

Finds an entity type by its name

Parameters

Name
Type
Required
Description

name

string

yes

Returns

GssEntityType

methodhas
(name: string) => boolean

Description

Tests whether an entity type can be found by name

Parameters

Name
Type
Required
Description

name

string

yes

Returns

boolean

methodkeys
() => string[]

Returns

string[]

methodvalues
() => GssEntityType[]

Returns

GssEntityType[]

Properties

number

object

Description

Defines the search criteria for a GssField in a GssQuery.

Properties

string

string | number | boolean

object

Description

GssEntityType field descriptor. An entity type is defined by a name, and as a set of GssField fields.

methodsameAs
(other: GssField) => boolean

Parameters

Name
Type
Required
Description

other

yes

Returns

boolean

Properties

string

string

boolean

object

string

object

Description

Provides a “Map” container interface of GssField instances keyed by field name.

methoddeepGet
(name: string) => GssField

Description

Finds a field by its name (supports finding a nested field)

Parameters

Name
Type
Required
Description

name

string

yes

Returns

GssField

methodentries
() => [string, GssField][]

Returns

[string, GssField][]

methodforEach
(callback: (field: GssField, fieldName: string) => void) => void

Parameters

Name
Type
Required
Description

callback

(field: GssField, fieldName: string) => void

yes

Returns

void

methodget
(name: string) => GssField

Description

Iterates over the entity type’s fields

Parameters

Name
Type
Required
Description

name

string

yes

Returns

GssField

methodhas
(name: string) => boolean

Description

Finds a field by its name

Parameters

Name
Type
Required
Description

name

string

yes

Returns

boolean

methodkeys
() => string[]

Description

Tests whether a field exists in the entity type’s fields

Returns

string[]

methodsameAs
(other: string) => boolean

Parameters

Name
Type
Required
Description

other

string

yes

Returns

boolean

methodvalues
() => GssField[]

Returns

GssField[]

Properties

number

object

Description

An object controlling the behavior of the GSS API.

Properties

number

Sets the default connect timeout

boolean

Enables or disables API debugging.

string

object

Passes a logger to be used by the API, instead of the default console-only logger.

boolean

Enables or disables API latency tracking

boolean

Enables or disables automatic query re-scheduling on connection drop.

number

Sets the default search timeout

Sets the AGM instance identity of the GSS Desktop Manager, by default it’s ‘GssDesktopManager’

boolean

Enables or disables API tracing (logging each and every function entry and exit).

object

Description

An object containing the query that comes from a GSS client as passed down from the GSS DM.

Properties

string

The entity type for which the query was created

The field filters from the last search request

number

The max number of entities

string[]

The selected properties

object

Description

Defines a provider with its name and type (usually REST or AGM)

methodsameAs
(other: GssProvider) => boolean

Parameters

Name
Type
Required
Description

other

yes

Returns

boolean

Properties

string

The provider’s name

string

The provider’s fields

object

Description

An abstraction allowing entityTypes to be served by AGM-enabled JavaScript applications.

(entityType: object | GssEntityType, entityTypeSearchHandler: (query: GssQueryRequest) => void) => GlueSearchProvider

Description

Registers a search handler for the specified entity type. This can be called before or after GlueSearchProvider#start

Parameters

Name
Type
Required
Description

entityType

object | GssEntityType

yes

entityTypeSearchHandler

(query: GssQueryRequest) => void

yes

Returns

GlueSearchProvider

methodstart
(callback: (error: Error, result: GlueSearchProvider) => void) => Promise<GlueSearchProvider>

Description

Starts the GSS Search Provider.

Parameters

Name
Type
Required
Description

callback

(error: Error, result: GlueSearchProvider) => void

yes

Returns

Promise<GlueSearchProvider>

methodstop
() => void

Description

Stops the GSS publisher. Publisher can be restarted later using GlueSearchProvider#start.

Returns

void

object

Description

Options which you can use to modify the default behavior of a GssQuery.

Properties

number

Sets a limit for the number of entities returned in a single GssResult

string[]

Returns the set of properties to which search results should be limited.

string[]

Restricts the set of properties which should be returned to the specified subset.

number

Sets a timeout for the query.

object

Description

Represents a search request for the registered entity type search handler

methoderror
(error: string | Error | GssError) => void

Description

Callback interface for the search handler to publish errors encountered during handling the search request.

Parameters

Name
Type
Required
Description

error

string | Error | GssError

yes

Returns

void

methodpush
(entities: object[], isLastResult: boolean) => void

Description

Callback interface for the search handler to stream results.

Parameters

Name
Type
Required
Description

entities

object[]

yes

isLastResult

boolean

no

Returns

void

Properties

object

Description

Typed enumeration of all GSS query states, suitable for reference equality comparison.

Properties

object

Description

Represents a GssQuery status.

Properties

string

object

Description

Represents a search request for a specific entity type. You can create a query by calling GlueSearchService#createQuery and passing the GssEntityType and optionally the set of fields your application is interested in. Before you perform the search, you need to first set up the query by: * subscribing a callback to GssQuery#onData to receive search results * optionally subscribing for query status notifications by passing a callback to GssQuery#onStatus To actually perform the search, you need to call the GssQuery#search method, passing it a filter.

methodcancel
() => void

Description

Cancels the current search.

Returns

void

() => void

Description

Removes all the callbacks that may have been registered using GssQuery#onStatus, GssQuery#onData, and GssQuery#onComplete.

Returns

void

(text: string) => void

Description

Triggers a full text search against the GSS DM.

Parameters

Name
Type
Required
Description

text

string

yes

Returns

void

methodonComplete
(callback: () => void) => void

Description

Subscribes the passed callback to be notified when all Search Providers have delivered their search results for the performed search.

Parameters

Name
Type
Required
Description

callback

() => void

yes

Returns

void

methodonData
(callback: (searchResult: GssResult) => void) => void

Description

Subscribes the passed callback for search results.

Parameters

Name
Type
Required
Description

callback

(searchResult: GssResult) => void

yes

Returns

void

methodonStatus
(callback: (newStatus: GssQueryStatus, oldStatus: GssQueryStatus) => void) => void

Description

Subscribes the passed callback for query status notifications.

Parameters

Name
Type
Required
Description

callback

(newStatus: GssQueryStatus, oldStatus: GssQueryStatus) => void

yes

Returns

void

methodsearch
(criteria: GssFieldFilter[]) => void

Description

Triggers the actual search request against the GSS DM.

Parameters

Name
Type
Required
Description

criteria

no

Returns

void

Example

search(
  { name: "clientId", value: 1234567 },
  { name: "fullName", value: "Jo" },
  { name: "fullName", value: "John Smith", searchType: "Exact" }
);

Properties

Returns the current search filter.

object

Description

Represents a search result produced by a single Search Provider. GssQuery#onData can call the data callback multiple times, once for each Search Provider’s result. A streaming Search Provider can push multiple results. You can inspect the GssResult#isLast property to check whether this is the last result that the provider has produced. Also see GssQuery#onComplete where you can pass a callback which will be called when all providers have finished delivering results.

Properties

object[]

Returns an array of entities (plain objects) produced by the Search Provider.

boolean

Returns true if the result was served from the GSS DM’s local cache

boolean

Returns true if this is the last result produced by the Search Provider

string

Returns the display name of the Search Provider which produced the results for the requested entity type

object

Description

Typed enumeration of all GSS field search types, suitable for reference equality comparison.

methodvalueOf
(name: string) => GssSearchType

Description

Returns a reference to the GssSearchType object given its name

Parameters

Name
Type
Required
Description

name

string

yes

Returns

GssSearchType

Properties

any

any

any

any

object

Description

Typed enumeration of all GSS field types, suitable for reference equality comparison.

methodvalueOf
(name: string) => GssType

Description

Returns a reference to the GssType object given its name

Parameters

Name
Type
Required
Description

name

string

yes

Returns

GssType

Properties

string

Returns the GSS field type’s name

any

any

any

any

any

any

any

object

Description

An object containing information about GSS errors.

Properties

string

Description of the error, e.g. 'Function not implemented'

number

Error code (integer), e.g. 38.

string

Error code (string) e.g. ‘ENOSYS’.

object

function

(gssEntities: any[], descriptors: GssFields, logger: API) => { [key: string]: any; }[]

Description

A utility allowing GssObject objects to be converted to plain JavaScript objects.

Parameters

Name
Type
Required
Description

gssEntities

any[]

yes

descriptors

yes

logger

API

yes

Returns

{ [key: string]: any; }[]