encore-api-services
Advanced tools
Comparing version 0.0.13 to 0.0.14
@@ -1,7 +0,7 @@ | ||
import { BasketData, DeliveryData } from '../typings'; | ||
import { BasketData, DeliveryData, RequestBasketData } from '../typings'; | ||
import { Environment } from '../../typings'; | ||
export declare const getBasketApi: (environment: Environment) => { | ||
upsertBasket: (basketData: BasketData) => Promise<BasketData>; | ||
upsertBasket: (basketData: RequestBasketData) => Promise<BasketData>; | ||
getBasket: (reference: string) => Promise<BasketData>; | ||
getDeliveries: (reference: string) => Promise<DeliveryData[]>; | ||
}; |
import { Basket, BasketItemsCollection, Delivery } from '../models'; | ||
import { Environment } from '../../typings'; | ||
import { BasketData, BasketItemData } from '../typings'; | ||
import { RequestBasketData, RequestBasketItemData } from '../typings'; | ||
export declare const getBasketRepository: (environment: Environment) => { | ||
getBasket: (reference: string) => Promise<Basket>; | ||
getDeliveries: (basketReference: string, basketItems: BasketItemsCollection) => Promise<Delivery[]>; | ||
createBasket: (basketData: BasketData) => Promise<Basket>; | ||
addItem: (basket: Basket, basketItem: BasketItemData) => Promise<Basket>; | ||
createBasket: (basketData: RequestBasketData) => Promise<Basket>; | ||
addItem: (basket: Basket, basketItem: RequestBasketItemData) => Promise<Basket>; | ||
removeItem: (basket: Basket, itemId: number) => Promise<Basket>; | ||
}; |
@@ -13,3 +13,3 @@ import { Amount } from '../../typings'; | ||
export interface Seat { | ||
block: string; | ||
blockName: string; | ||
row: string; | ||
@@ -58,1 +58,26 @@ number: string; | ||
} | ||
export interface RequestBasketItemData { | ||
productId: string; | ||
venueId: string; | ||
date: string; | ||
quantity: number; | ||
id?: string; | ||
productName?: string; | ||
productType?: ProductType; | ||
venueName?: string; | ||
seats?: Seat[]; | ||
salePrice?: Amount; | ||
faceValue?: Amount; | ||
adjustedAmount?: Amount; | ||
} | ||
export interface RequestBasketData { | ||
reference: string; | ||
channelId: string; | ||
reservations: RequestBasketItemData[]; | ||
delivery?: DeliveryData; | ||
createdAt?: string; | ||
expiredAt?: string; | ||
status?: BasketStatus; | ||
coupons?: CouponData[]; | ||
shopperReference?: string; | ||
} |
{ | ||
"name": "encore-api-services", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
45685
453