Instantiates a new NextDrupalBase.
const client = new NextDrupalBase(baseUrl)
The baseUrl of your Drupal site. Do not add the /jsonapi suffix.
Options for NextDrupalBase.
Optional
accessOptional
fetcherOptional
init: RequestInitAdds a locale prefix to the given path.
The path.
The options for adding the locale prefix.
Optional
defaultLocale?: stringThe default locale.
Optional
locale?: stringThe locale.
The path with the locale prefix.
Builds an endpoint URL with the given options.
The options for building the endpoint.
Optional
locale?: stringThe locale.
Optional
path?: stringThe path.
Optional
searchParams?: EndpointSearchParamsThe search parameters.
The constructed endpoint URL.
Builds a URL with the given path and search parameters.
The URL path.
Optional
searchParams: EndpointSearchParamsThe search parameters.
The constructed URL.
Constructs a path from the given segment and options.
The path segment.
The options for constructing the path.
Optional
defaultLocale?: stringThe default locale.
Optional
locale?: stringThe locale.
Optional
pathPrefix?: stringThe path prefix.
The constructed path.
Fetches a resource from the given input URL or path.
The input URL or path.
The fetch options.
The fetch response.
Gets an access token using the provided client ID and secret.
Optional
clientIdSecret: NextDrupalAuthClientIdSecretThe client ID and secret.
The access token.
Gets the authorization header value based on the provided auth configuration.
The auth configuration.
The authorization header value.
Extracts errors from the fetch response.
The fetch response.
The extracted errors.
The base class for NextDrupal clients.