UNPKG

@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

38 lines (37 loc) 1.16 kB
import type { JsonApiDocument, JsonApiListResponse, JsonApiSingleResponse } from './JsonApi'; import type { IRelationships } from './Relationships'; import type { ResultResponse } from './ResultResponse'; import type { WithCommonOptions } from './WithCommonOptions'; export interface CountryAttr extends JsonApiDocument { type: string; id: string; attributes: { iso: string; iso3: string; iso_name: string; name: string; states_required: boolean; zipcode_required: boolean; default: boolean; }; relationships: IRelationships; } export interface ICountry extends JsonApiSingleResponse { data: CountryAttr; } export interface ICountries extends JsonApiListResponse { data: CountryAttr[]; } export interface ICountryResult extends ResultResponse<ICountry> { } export interface ICountriesResult extends ResultResponse<ICountries> { } export declare type ListOptions = WithCommonOptions; export declare type ShowOptions = WithCommonOptions<{ suggestQuery: true; }, { iso: string; }>; export declare type DefaultOptions = WithCommonOptions<{ suggestQuery: true; }>;