Skip to main content

Interface: SearchParams

@headstartwp/core.SearchParams

The EndpointParams supported by the SearchNativeFetchStrategy

Hierarchy

Properties

_embed

Optional _embed: boolean

The _embed param returned associated entities in the response

It's recommended to avoid additional requests to fetch data

Inherited from

EndpointParams._embed

Defined in

packages/core/src/data/strategies/AbstractFetchStrategy.ts:17


_fields

Optional _fields: string[]

The _fields parameter is used to return only the specified fields in the response

Inherited from

EndpointParams._fields

Defined in

packages/core/src/data/strategies/AbstractFetchStrategy.ts:22


exclude

Optional exclude: number[]

Ensure result set excludes specific IDs.

Defined in

packages/core/src/data/strategies/SearchNativeFetchStrategy.ts:47


include

Optional include: number[]

Limit result set to specific IDs.

Defined in

packages/core/src/data/strategies/SearchNativeFetchStrategy.ts:52


lang

Optional lang: string

The polylang ?lang parameter.

This is only used if the polylang integration is enabled

Inherited from

EndpointParams.lang

Defined in

packages/core/src/data/strategies/AbstractFetchStrategy.ts:29


page

Optional page: number

Current page of the collection.

Default

1

Defined in

packages/core/src/data/strategies/SearchNativeFetchStrategy.ts:18


per_page

Optional per_page: number

Maximum number of items to be returned in result set.

Default

10

Defined in

packages/core/src/data/strategies/SearchNativeFetchStrategy.ts:25


Optional search: string

Limit results to those matching a string.

Defined in

packages/core/src/data/strategies/SearchNativeFetchStrategy.ts:30


subtype

Optional subtype: string | string[]

Limit results to items of one or more object subtypes.

Defined in

packages/core/src/data/strategies/SearchNativeFetchStrategy.ts:42


type

Optional type: "post" | "term" | "post-format"

Limit results to items of an object type.

Default

'post'

Defined in

packages/core/src/data/strategies/SearchNativeFetchStrategy.ts:37