@boulevard/blvd-book-sdk
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -36,3 +36,3 @@ import { Node, PlatformClient } from "./platformClient"; | ||
*/ | ||
constructor(platformClient: PlatformClient, category: Graph.CartAvailableCategory, cartId: Scalars["String"]); | ||
constructor(platformClient: PlatformClient, category: Graph.CartAvailableCategory); | ||
} | ||
@@ -391,2 +391,3 @@ /** Available starting date for bookable items in a cart. */ | ||
timezone?: string; | ||
location?: Location; | ||
}): Promise<Array<CartBookableDate>>; | ||
@@ -418,3 +419,5 @@ /** | ||
*/ | ||
getBookableStaffVariants(time: CartBookableTime, item: CartBookableItem): Promise<Array<CartAvailableBookableItemStaffVariant>>; | ||
getBookableStaffVariants(time: CartBookableTime, item: CartBookableItem, opts?: { | ||
location?: Location; | ||
}): Promise<Array<CartAvailableBookableItemStaffVariant>>; | ||
/** | ||
@@ -432,2 +435,3 @@ * Retrieves available times for all bookable cart items, given a date that was retrieved earlier using `getDates`. | ||
timezone?: string; | ||
location?: Location; | ||
}): Promise<Array<CartBookableTime>>; | ||
@@ -448,4 +452,16 @@ /** | ||
*/ | ||
getLocation(): Promise<Location>; | ||
getLocation(): Promise<Location | null>; | ||
/** | ||
* | ||
* Sets a location for the cart. | ||
* | ||
* Alternative methods for setting a location is passing a locationId argument | ||
* when creating a cart or when adding a first item to an existing cart. | ||
* | ||
* Note that the location can only be set once and cannot be changed. When | ||
* a location is already present on the cart, this mutation returns a | ||
* `CART_LOCATION_ALREADY_SET` error. | ||
*/ | ||
setLocation(location: Location): Promise<Cart>; | ||
/** | ||
* A list of offers applied to the cart. | ||
@@ -574,3 +590,3 @@ * | ||
* @param opts.staffVariant The selected bookable item staff variant. | ||
* @deprecated See CartAvailableBookableItem.update instead | ||
* @deprecated See {@link CartBookableItem.update} instead | ||
* @public | ||
@@ -577,0 +593,0 @@ * @returns Promise containing the updated cart |
@@ -17,3 +17,3 @@ import { PlatformClient } from "./platformClient"; | ||
*/ | ||
create(location: Location, opts?: { | ||
create(location?: Location, opts?: { | ||
timezone?: string; | ||
@@ -20,0 +20,0 @@ }): Promise<Cart>; |
@@ -36,1 +36,2 @@ export declare const addBookableItemMutation: string; | ||
export declare const bookingQuestionAddAnswerMutation: string; | ||
export declare const setLocationMutation: string; |
@@ -39,3 +39,3 @@ import { Scalars, Maybe } from "../graph"; | ||
/** Total discount amount on the price. */ | ||
discountAmount: Scalars["Money"]; | ||
discountAmount: Maybe<Scalars["Money"]>; | ||
/** | ||
@@ -53,7 +53,7 @@ * Valid discount code that was applied, either the cart's code or one that was | ||
/** Total for the item after discounts and taxes. */ | ||
lineTotal: Scalars["Money"]; | ||
lineTotal: Maybe<Scalars["Money"]>; | ||
/** Price before discounts and taxes. */ | ||
price: Scalars["Money"]; | ||
price: Maybe<Scalars["Money"]>; | ||
/** Total tax amount on the discounted price. */ | ||
taxAmount: Scalars["Money"]; | ||
taxAmount: Maybe<Scalars["Money"]>; | ||
/** | ||
@@ -105,9 +105,3 @@ * @internal | ||
* @internal | ||
* Included so that we don't have to make the `update` call | ||
* from the Cart object | ||
*/ | ||
private cartId; | ||
/** | ||
* @internal | ||
*/ | ||
optionGroups: Array<CartAvailableBookableItemOptionGroup>; | ||
@@ -121,21 +115,2 @@ /** | ||
/** | ||
* Update the item. | ||
* | ||
* This invalidates existing reservations when the guest, staff variant, or options are updated. | ||
* | ||
* @async | ||
* @param opts.discountCode Optional discount code applied to the item. Invalid discount codes are ignored without an error, check `discountCode` on the selected item to see if the code was valid. | ||
* @param opts.guest The guest this item is booked for. A null value indicates the cart owner, or current client. When finding available times for bookable items, it's assumed that two items having different guests can be booked simultaneously. | ||
* @param opts.options Selected bookable item options. Note that the selections must conform to the option group requirements, e.g. limits on the number of options. Otherwise an error is returned. | ||
* @param opts.staffVariant The selected bookable item staff variant. | ||
* @public | ||
* @returns Promise containing the updated cart | ||
*/ | ||
update(opts?: { | ||
discountCode?: Maybe<string>; | ||
guest?: Maybe<CartGuest>; | ||
options?: Maybe<Array<CartAvailableBookableItemOption>>; | ||
staffVariant?: Maybe<CartAvailableBookableItemStaffVariant>; | ||
}): Promise<Cart>; | ||
/** | ||
* @internal | ||
@@ -154,5 +129,15 @@ */ | ||
/** | ||
* List of locations offering the selected bookable item. | ||
* | ||
* Location has to be chosen before checking out the cart. | ||
*/ | ||
getLocationVariants(): Promise<Array<CartAvailableBookableItemLocationVariant>>; | ||
/** | ||
* @internal | ||
*/ | ||
constructor(platformClient: any, item: any, cartId: Scalars["ID"]); | ||
locationVariants: Array<CartAvailableBookableItemLocationVariant>; | ||
/** | ||
* @internal | ||
*/ | ||
constructor(platformClient: any, item: any); | ||
} | ||
@@ -216,2 +201,8 @@ /** | ||
/** | ||
* @internal | ||
* Included so that we don't have to make the `update` call | ||
* from the Cart object | ||
*/ | ||
private cartId; | ||
/** | ||
* ID of the guest associated with this item. | ||
@@ -249,2 +240,21 @@ * | ||
/** | ||
* Update the item. | ||
* | ||
* This invalidates existing reservations when the guest, staff variant, or options are updated. | ||
* | ||
* @async | ||
* @param opts.discountCode Optional discount code applied to the item. Invalid discount codes are ignored without an error, check `discountCode` on the selected item to see if the code was valid. | ||
* @param opts.guest The guest this item is booked for. A null value indicates the cart owner, or current client. When finding available times for bookable items, it's assumed that two items having different guests can be booked simultaneously. | ||
* @param opts.options Selected bookable item options. Note that the selections must conform to the option group requirements, e.g. limits on the number of options. Otherwise an error is returned. | ||
* @param opts.staffVariant The selected bookable item staff variant. | ||
* @public | ||
* @returns Promise containing the updated cart | ||
*/ | ||
update(opts?: { | ||
discountCode?: Maybe<string>; | ||
guest?: Maybe<CartGuest>; | ||
options?: Maybe<Array<CartAvailableBookableItemOption>>; | ||
staffVariant?: Maybe<CartAvailableBookableItemStaffVariant>; | ||
}): Promise<Cart>; | ||
/** | ||
* @internal | ||
@@ -267,3 +277,3 @@ */ | ||
*/ | ||
constructor(platformClient: any, item: any); | ||
constructor(platformClient: any, item: any, cartId: Scalars["ID"]); | ||
} | ||
@@ -285,2 +295,10 @@ /** Staff variant of a bookable item. */ | ||
} | ||
/** Location variant of a bookable item */ | ||
declare class CartAvailableBookableItemLocationVariant extends Node<CartAvailableBookableItemLocationVariant> { | ||
location: Location; | ||
/** | ||
* @internal | ||
*/ | ||
constructor(platformClient: any, group: any); | ||
} | ||
/** Specified design for a CartItemEmailFulfillment. */ | ||
@@ -287,0 +305,0 @@ declare class CartItemGiftCardDesign extends Node<Graph.CartItemGiftCardDesign> { |
@@ -13,2 +13,4 @@ import { Node, PlatformClient } from "./platformClient"; | ||
id: Scalars["ID"]; | ||
/** Location external id */ | ||
externalId: Maybe<Scalars["String"]>; | ||
insertedAt: Scalars["DateTime"]; | ||
@@ -21,2 +23,7 @@ /** The location's name */ | ||
tz: Scalars["Tz"]; | ||
/** | ||
* Indicates that the location is a remote location, and that appointments for | ||
* this location are carried out remotely. | ||
*/ | ||
isRemote: Scalars["Boolean"]; | ||
updatedAt: Scalars["DateTime"]; | ||
@@ -23,0 +30,0 @@ /** |
{ | ||
"name": "@boulevard/blvd-book-sdk", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A JS client for the Boulevard API", | ||
@@ -5,0 +5,0 @@ "main": "lib/blvd.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
704683
8710