@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
36 lines (28 loc) • 968 B
text/typescript
import { JsonApiDocument, JsonApiListResponse, JsonApiSingleResponse } from './JsonApi'
import { IRelationships } from './Relationships'
import { ResultResponse } from './ResultResponse'
import { WithCommonOptions } from './WithCommonOptions'
export interface PageAttr extends JsonApiDocument {
type: string
id: string
attributes: {
title: string
content: string
locale: string
meta_description: string | null
meta_title: string | null
slug: string
type: string
}
relationships: IRelationships
}
export interface IPage extends JsonApiSingleResponse {
data: PageAttr
}
export interface IPages extends JsonApiListResponse {
data: PageAttr[]
}
export interface IPageResult extends ResultResponse<IPage> {}
export interface IPagesResult extends ResultResponse<IPages> {}
export type ListOptions = WithCommonOptions<{ suggestQuery: true }>
export type ShowOptions = WithCommonOptions<{ suggestQuery: true }, { id: string }>