import FlattenedSearchBuilder from 'opengate-js/src/searching/builder/FlattenedSearchBuilder.js'FlattenedSearchBuilder
Extends:
Direct Subclass:
Indirect Subclass:
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(parent: InternalOpenGateAPI, routes: object) Constructor |
|
Method Summary
| Public Methods | ||
| public |
Build a instance of Search |
|
| public |
The response will return a flattened response |
|
Inherited Summary
| From class SearchBuilder | ||
| public |
[route]: * |
|
| public |
addSortAscendingBy(filterField: string): SearchBuilder 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 |
addSortDescendingBy(filterField: string): SearchBuilder Add descending param into the sort search object |
|
| public |
Build a instance of Search |
|
| public |
filter(filter: FilterBuilder | object): SearchBuilder 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 |
removeSortBy(filterField: string): SearchBuilder Remove sort param from the search object |
|
| public |
withTimeout(ms: number): SearchBuilder 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, routes: object) source
Constructor
Override:
SearchBuilder#constructorParams:
| Name | Type | Attribute | Description |
| parent | InternalOpenGateAPI |
|
this is ogapi instance |
| routes | object |
|
this defined the routes. One of those routes must be called on Builder before call build method. |
Public Methods
public build(): Search source
Build a instance of Search
Override:
SearchBuilder#buildThrow:
Throw error on url build |
Example:
ogapi.devicesSearchBuilder().onProvisioned().build()
public flattened(): FlattenedSearchBuilder source
The response will return a flattened response
Example:
ogapi.entitiesSearchBuilder().flattened()