Skip to content
Client
Server

Reference / @open-music-sdk/client-catalog / tSearchSuggestionsOptions

Interface: tSearchSuggestionsOptions ​

Defined in: clients/client-catalog/src/discover.ts:81

The options of getSearchSuggestions.

Extends ​

Properties ​

extend? ​

ts
readonly optional extend?: readonly string[];

Defined in: packages/core/src/options.ts:26

The attributes to add to those sent by default, such as ["artistUrl"]: at most 300 names, each of 1 to 64 characters with no comma in it. An empty list is none, and is not sent.

Inherited from ​

tReadOptions.extend


include? ​

ts
readonly optional include?: readonly string[];

Defined in: packages/core/src/options.ts:21

The relationships to send in full with each resource, such as ["albums", "artists"]: at most 300 names, each of 1 to 64 characters with no comma in it. An empty list is none, and is not sent.

Inherited from ​

tReadOptions.include


kinds ​

ts
readonly kinds: readonly ("terms" | "topResults")[];

Defined in: clients/client-catalog/src/discover.ts:83

The kinds of suggestion to make: "terms" to search for, "topResults" for resources that match. There is no default: Apple wants one at least.


language? ​

ts
readonly optional language?: string;

Defined in: packages/core/src/options.ts:16

The language to answer in, as a tag the storefront supports, such as "en-GB": a string of 1 to 64 characters, sent as l. Default: the storefront's own.

Inherited from ​

tReadOptions.language


limit? ​

ts
readonly optional limit?: number;

Defined in: packages/core/src/options.ts:28

How many to send in one answer: a whole number above zero. Apple sets the default and the most.

Inherited from ​

tReadOptions.limit


offset? ​

ts
readonly optional offset?: string | number;

Defined in: packages/core/src/options.ts:30

Where in the collection to start: a whole number from zero, or a cursor as Apple gave it, of 1 to 256 characters.

Inherited from ​

tReadOptions.offset


params? ​

ts
readonly optional params?: Readonly<Record<string, 
  | string
  | number
  | boolean
  | readonly (string | number)[]
  | null
| undefined>>;

Defined in: packages/core/src/options.ts:42

Any other query parameter, sent as given: what Apple takes and no option here names. An option that is given, or an argument of the function, wins over the same key here.

It is a plain object of at most 100 parameters; a Map or a URLSearchParams is a TypeError, where it would otherwise be read as no parameters at all. A name is one as Apple writes them, such as ids[albums] or limit[songs:tracks]: a letter, then letters, digits, -, _, . and :, with any part in brackets after, in at most 64 characters. A name that does not fit is described in the error, not repeated. A value is a string of at most 256 characters, a number, true or false, or a list of at most 300 numbers and strings, each string of 1 to 64 characters with no comma in it. null, undefined and an empty list are not sent.

Inherited from ​

tReadOptions.params


schema? ​

ts
readonly optional schema?: tSchemaLike<tSearchSuggestionsResponse>;

Defined in: packages/core/src/options.ts:47

Validates the answer; a failure throws ValidationError. Any Standard Schema, such as a validator from @open-music-sdk/validate: an object or a function with a validate function under ~standard.

Inherited from ​

tReadOptions.schema


signal? ​

ts
readonly optional signal?: AbortSignal;

Defined in: packages/core/src/options.ts:49

Aborts the request. An abort is rethrown as it is.

Inherited from ​

tReadOptions.signal


storefront? ​

ts
readonly optional storefront?: string;

Defined in: packages/core/src/endpoint.ts:367

The storefront whose catalog is asked, by its id, such as "gb". Default: the client's, which is the one it was created with, or else the listener's, which the client looks up once.

Inherited from ​

tStorefrontOption.storefront


types? ​

ts
readonly optional types?: readonly tCatalogSearchType[];

Defined in: clients/client-catalog/src/discover.ts:85

The types of resource the top results may be. It has no effect on the terms.

MIT licensed. Not affiliated with, endorsed by, or sponsored by Apple Inc. Apple Music and MusicKit are trademarks of Apple Inc.