Skip to content

ApiEndpoint

Defined in: wp-typia-rest/src/client.ts:80

WordPress REST endpoint contract with request and response validators.

Use this contract when integrating with @wordpress/api-fetch or the React helpers from @wp-typia/rest/react.

Req

Res

optional buildRequestOptions?: (request) => Partial<APIFetchOptions>

Defined in: wp-typia-rest/src/client.ts:81

Req

Partial<APIFetchOptions>


method: "DELETE" | "GET" | "PATCH" | "POST" | "PUT"

Defined in: wp-typia-rest/src/client.ts:82


path: string

Defined in: wp-typia-rest/src/client.ts:83


optional requestLocation?: "query" | "body" | "query-and-body"

Defined in: wp-typia-rest/src/client.ts:84


validateRequest: (input) => ValidationResult<Req>

Defined in: wp-typia-rest/src/client.ts:85

unknown

ValidationResult<Req>


validateResponse: (input) => ValidationResult<Res>

Defined in: wp-typia-rest/src/client.ts:86

unknown

ValidationResult<Res>