@gdwc/drupal-state
Version:
A simple data store to manage application state sourced from Drupal's JSON:API.
17 lines (14 loc) • 605 B
TypeScript
import { fetchAdapter, GenericIndex } from '../types/types.js';
import DrupalState from '../DrupalState.js';
import 'http';
import 'jsona/lib/JsonaTypes';
import 'drupal-jsonapi-params';
import 'zustand/vanilla';
/**
* Get an index of resource links for the API
* @param apiRoot url to the root of JSON:API
* @param fetch fetch compatible function
* @returns a promise containing an object with an index of resource links
*/
declare const fetchApiIndex: (apiRoot: string, fetch?: fetchAdapter, onError?: DrupalState['onError']) => Promise<void | GenericIndex>;
export { fetchApiIndex as default };