@spree/storefront-api-v2-sdk
Version:
Node module to easily integrate your JavaScript or TypeScript application with Spree API V2. You can create an entirely custom Storefront in JS/TS with this package including one page checkout, Single Page Apps, PWAs and so on
7 lines (6 loc) • 788 B
TypeScript
import type { JsonApiDocument, JsonApiResponse } from '../interfaces/JsonApi';
import type { RelationType } from '../interfaces/Relationships';
declare const findDocument: <DocumentType_1 extends JsonApiDocument>(spreeSuccessResponse: JsonApiResponse, relationType: RelationType) => DocumentType_1;
declare const findRelationshipDocuments: <DocumentType_1 extends JsonApiDocument>(spreeSuccessResponse: JsonApiResponse, sourceDocument: JsonApiDocument, relationshipName: string) => DocumentType_1[];
declare const findSingleRelationshipDocument: <DocumentType_1 extends JsonApiDocument>(spreeSuccessResponse: JsonApiResponse, sourceDocument: JsonApiDocument, relationshipName: string) => DocumentType_1;
export { findDocument, findRelationshipDocuments, findSingleRelationshipDocument };