Home Manual Reference Source Test Repository
public class | source

PreFilteredSearchBuilder

Extends:

SearchBuilderFlattenedSearchBuilder → PreFilteredSearchBuilder

This is a abstract class. It is a class that extends from base to make all kind of summary search request to OpenGate North API.

Constructor Summary

Public Constructor
public

Constructor

Method Summary

Public Methods
public

This option forces search api to add a filter of collected content

public

The response will return a response by applying the filter with likes case-no-sensitive

public

The response will return a response without sorted

public

This option forces search api to add a filter of provisioned content

public

The response will return a response by applying the filter with likes case-no-sensitive

public

The search request will have this filter

Inherited Summary

From class SearchBuilder
public

[route]: *

public

Add ascending param into the sort search object

public

addSortBy(filterField: string, typeSort: string): SearchBuilder

Add ascending/descending param into the sort search object

public

Add descending param into the sort search object

public

Build a instance of Search

public

The search request will have this filter

public

findAllFields(input: *): Promise

Return a promise which it will contains an array with fields recommended with complete structure

public

findFieldPath(field: *): Promise

Return a promise which it will contains an string with the path of a field

public

findFields(input: *): Promise

Return a promise which it will contains an array with fields recommended with only identifier

public

limit(size: number, start: number): SearchBuilder

Set reponse pagination.

public

Remove sort param from the search object

public

The request will have a specific time out if it will be exceeded then the promise throw an exception

From class FlattenedSearchBuilder
public

Build a instance of Search

public

The response will return a flattened response

Public Constructors

public constructor(parent: InternalOpenGateAPI, routes: object) source

Constructor

Override:

FlattenedSearchBuilder#constructor

Params:

NameTypeAttributeDescription
parent InternalOpenGateAPI
  • nullable: false

this is ogapi instance

routes object
  • nullable: false

this defined the routes. One of those routes must be called on Builder before call build method.

Public Methods

public collected(): PreFilteredSearchBuilder source

This option forces search api to add a filter of collected content

Example:

ogapi.subscribersSearchBuilder().collected() 

public disableCaseSensitive(flag: *): EntitiesSearchBuilder source

The response will return a response by applying the filter with likes case-no-sensitive

Params:

NameTypeAttributeDescription
flag *

Example:

ogapi.entitiesSearchBuilder().disableCaseSensitive() 

public disableDefaultSorted(): PreFilteredSearchBuilder source

The response will return a response without sorted

Example:

ogapi.assetsSearchBuilder().disableDefaultSorted() 

public provisioned(): PreFilteredSearchBuilder source

This option forces search api to add a filter of provisioned content

Example:

ogapi.subscribersSearchBuilder().provisioned() 

public removeCaseSensitive(): EntitiesSearchBuilder source

The response will return a response by applying the filter with likes case-no-sensitive

Example:

ogapi.entitiesSearchBuilder().removeCaseSensitive() 

public select(select: SelectBuilder | object): PreFilteredSearchBuilder source

The search request will have this filter

Params:

NameTypeAttributeDescription
select SelectBuilder | object
  • nullable: false

Example:

 ogapi.devicesSearchBuilder().select(
     ogapi.newSelectBuilder().add(SE.element("provision.device.identifier", ["value"], "id"), SE.add("device.temperature.value", ["value"]))
 ) // Setting SelectBuilder
 ogapi.devicesSearchBuilder().select({
     "elements": [
         {"name": "provision.device.identifier","fields": ["value"],"alias": "id"},
         {"name": "device.temperature.value","fields": ["value"]}
     ]
 }) //Custom select