Skip to content

search

const search: {
query: Promise<SearchResults>;
};

Defined in: domains/search.ts:27

query(text, options?): Promise<SearchResults>;

Search across multiple entity types simultaneously.

Returns results grouped by type. Use options.types to restrict the search to specific entities and options.limit to control result set size per type.

Parameter Type Description
text string The search string.
options SearchOptions Optional filter for entity types and result limit.

Promise<SearchResults>

A SearchResults object with a result set for each entity type.

MobileLockerError on network failure or server error.

const results = await mobilelocker.search.query('Acme', { types: ['customers'], limit: 10 })
results.customers.results.forEach(c => console.log(c.name))