Home Manual Reference Source Test Repository
public class | source

TicketsSearchBuilder

Extends:

SearchBuilder → TicketsSearchBuilder

Defined a search over Devices

Example:

ogapi.devicesSearchBuilder()

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public

The response will return a response without sorted

public

The response will return a flattened response

public

The search request will have this group by

public

The search request will have this filter

public

The response will only have a summary information

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

Public Constructors

public constructor(parent: InternalOpenGateAPI) source

Constructor

Override:

SearchBuilder#constructor

Params:

NameTypeAttributeDescription
parent InternalOpenGateAPI
  • nullable: false

Instance of our InternalOpenGateAPI

Public Methods

public disableDefaultSorted(): TicketsSearchBuilder source

The response will return a response without sorted

Example:

ogapi.ticketsSearchBuilder().disableDefaultSorted() 

public flattened(): TicketsSearchBuilder source

The response will return a flattened response

Example:

ogapi.ticketsSearchBuilder().flattened() 

public group(group: object): SearchBuilder source

The search request will have this group by

Params:

NameTypeAttributeDescription
group object
  • nullable: false

Return:

SearchBuilder

Example:


    

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

The search request will have this filter

Params:

NameTypeAttributeDescription
select SelectBuilder | object
  • nullable: false

Return:

SearchBuilder

Example:

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

public summary(): TicketsSearchBuilder source

The response will only have a summary information

Example:

ogapi.ticketsSearchBuilder().summary()