Instantiates a new NextDrupalBase.
const client = new NextDrupalBase(baseUrl)
The baseUrl of your Drupal site. Do not add the /jsonapi suffix.
Options for NextDrupalBase.
OptionalaccessOptionalfetcherOptionalinit: RequestInitAdds a locale prefix to the given path.
The path.
The options for adding the locale prefix.
OptionaldefaultLocale?: stringThe default locale.
Optionallocale?: stringThe locale.
The path with the locale prefix.
Builds an endpoint URL with the given options.
The options for building the endpoint.
Optionallocale?: stringThe locale.
Optionalpath?: stringThe path.
OptionalsearchParams?: EndpointSearchParamsThe search parameters.
The constructed endpoint URL.
Builds a URL with the given path and search parameters.
The URL path.
OptionalsearchParams: EndpointSearchParamsThe search parameters.
The constructed URL.
Constructs a path from the given segment and options.
The path segment.
The options for constructing the path.
OptionaldefaultLocale?: stringThe default locale.
Optionallocale?: stringThe locale.
OptionalpathPrefix?: 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.
OptionalclientIdSecret: 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.