Home Manual Reference Source Test Repository
public class | source

ServiceGroupSearchBuilder

Extends:

SearchBuilder → ServiceGroupSearchBuilder

Defined a search over service group catalogs

Example:

ogapi.serviceGroupSearchBuilder()

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

Method Summary

Public Methods
public

Build a instance of StaticSearch

public

Set entityType to search

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 Members

public customFilters: {} source

Public Methods

public build(): StaticSearch source

Build a instance of StaticSearch

Override:

SearchBuilder#build

Return:

StaticSearch

Throw:

SearchBuilderError

Throw error on url build

Example:

  ogapi.serviceGroupSearchBuilder().filter({and:[]}).build()

public withEntityType(entityType: string): ServiceGroupSearchBuilder source

Set entityType to search

Params:

NameTypeAttributeDescription
entityType string
  • nullable: false

entity type

Throw:

Error

throw error when entityType is not typeof string

Example:

 ogapi.serviceGroupSearchBuilder().withEntityType('myEntityType').build()