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

52 lines (51 loc) 1.49 kB
import type { JsonApiDocument, JsonApiSingleResponse } from './JsonApi'; import type { IQuery } from './Query'; import type { IRelationships } from './Relationships'; import type { ResultResponse } from './ResultResponse'; import type { WithCommonOptions } from './WithCommonOptions'; export interface WishedItemAttr extends JsonApiDocument { type: string; id: string; attributes: { variant_id: string; quantity: number; }; relationships: IRelationships; } export interface WishedItem extends JsonApiSingleResponse { data: WishedItemAttr; } export interface WishedItemResult extends ResultResponse<WishedItem> { } /** * @deprecated Use {@link AddWishedItemOptions} instead. */ export interface WishlistsAddWishedItem extends IQuery { variant_id: string; quantity: number; } /** * @deprecated Use {@link UpdateWishedItemOptions} instead. */ export interface WishlistsUpdateWishedItem extends IQuery { quantity: number; } export declare type AddWishedItemOptions = WithCommonOptions<{ suggestToken: true; suggestQuery: true; }, { wishlist_token: string; } & WishlistsAddWishedItem>; export declare type UpdateWishedItemOptions = WithCommonOptions<{ suggestToken: true; suggestQuery: true; }, { wishlist_token: string; id: string; } & WishlistsUpdateWishedItem>; export declare type RemoveWishedItemOptions = WithCommonOptions<{ suggestToken: true; }, { wishlist_token: string; id: string; }>;