@drupal-js-sdk/interfaces
Overview
Canonical TypeScript interfaces used across the SDK to guarantee compatibility between packages.
Usage
JavaScript
import type { XhrInterface, CoreInterface, EntityIdentifier } from "@drupal-js-sdk/interfaces";
const id = { entity: "node", bundle: "article" };
// Use types to annotate your code or implement custom adapters.
Public API (types)
xhr
XhrInterfaceXhrRequestConfigXhrResponseXhrMethod- headers/params types
client
high-level client-related types
core
CoreInterface
error
DrupalErrorInterface
session
SessionInterface
storage
StorageInterfaceStorageRecordInterfaceStorageValueType
entity
EntityIdentifierEntityAttributesEntityRecordEntityLoadOptionsEntityAdapter*EntityAdapterContext
Notes
- Consumed across all packages to keep public contracts consistent and decoupled.