@51eat/sdk 0.0.55 → 0.0.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +3 -3
- package/dist/cjs/Client.js +11 -11
- package/dist/cjs/api/resources/business/resources/discounts/client/requests/StoreDiscountRequest.d.ts +2 -2
- package/dist/cjs/api/resources/business/resources/discounts/client/requests/UpdateDiscountRequest.d.ts +2 -2
- package/dist/cjs/api/resources/business/resources/productCategories/client/requests/StoreProductCategoryRequest.d.ts +1 -1
- package/dist/cjs/api/resources/business/resources/productCategories/client/requests/UpdateProductCategoryRequest.d.ts +1 -1
- package/dist/cjs/api/resources/business/resources/productOrders/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/business/resources/productOrders/client/Client.js +4 -1
- package/dist/cjs/api/resources/business/resources/productOrders/types/GetLabelRatesProductOrdersResponseItem.d.ts +10 -0
- package/dist/cjs/api/resources/business/resources/productOrders/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/productOrders/types/index.js +1 -0
- package/dist/cjs/api/resources/business/resources/products/client/requests/StoreProductRequest.d.ts +1 -1
- package/dist/cjs/api/resources/business/resources/products/client/requests/UpdateProductRequest.d.ts +1 -1
- package/dist/cjs/api/resources/business/resources/pushNotifications/types/RegisterPushNotificationsResponse.d.ts +3 -3
- package/dist/cjs/api/resources/business/resources/stripeConnect/types/CreateAccountSessionStripeConnectResponse.d.ts +1 -1
- package/dist/cjs/api/resources/businessProducts/client/requests/AdjustInventoryRequest.d.ts +2 -10
- package/dist/cjs/api/resources/businessProducts/client/requests/AdjustInventoryRequest.js +0 -8
- package/dist/cjs/api/resources/customer/resources/businesses/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/customer/resources/businesses/client/Client.js +4 -1
- package/dist/cjs/api/resources/customer/resources/cart/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/customer/resources/cart/client/Client.js +5 -2
- package/dist/cjs/api/resources/customer/resources/cart/client/requests/AddToCartRequest.d.ts +3 -3
- package/dist/cjs/api/resources/customer/resources/cart/types/GetShippingOptionsCartResponseItem.d.ts +19 -0
- package/dist/cjs/api/resources/customer/resources/cart/types/SelectShippingOptionCartResponse.d.ts +2 -7
- package/dist/cjs/api/resources/customer/resources/cart/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/customer/resources/cart/types/index.js +1 -0
- package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/CalculatePriceTicketingResponse.d.ts +13 -1
- package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/ConfirmOrderTicketingResponse.d.ts +3 -3
- package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/HoldTicketsTicketingResponse.d.ts +13 -2
- package/dist/cjs/api/resources/customer/resources/pushNotifications/types/RegisterPushNotificationsResponse.d.ts +3 -3
- package/dist/cjs/api/resources/customerBusinesses/client/Client.d.ts +30 -0
- package/dist/cjs/api/resources/{getPickupTimeslots → customerBusinesses}/client/Client.js +12 -10
- package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBusinessPickupTimeslotsRequest.d.ts +12 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/customerBusinesses/exports.d.ts +2 -0
- package/dist/cjs/api/resources/{getPickupTimeslots → customerBusinesses}/exports.js +2 -2
- package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessPickupTimeslotsResponse.d.ts +7 -0
- package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessPickupTimeslotsResponse.js +3 -0
- package/dist/cjs/api/resources/customerBusinesses/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/{getPickupTimeslots → customerBusinesses}/types/index.js +1 -1
- package/dist/cjs/api/resources/customerMyAccount/client/Client.d.ts +16 -0
- package/dist/cjs/api/resources/customerMyAccount/client/Client.js +54 -0
- package/dist/cjs/api/resources/customerMyAccount/client/requests/DownloadAppleWalletPassRequest.d.ts +9 -0
- package/dist/cjs/api/resources/customerMyAccount/client/requests/DownloadAppleWalletPassRequest.js +3 -0
- package/dist/cjs/api/resources/customerMyAccount/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/index.d.ts +3 -3
- package/dist/cjs/api/resources/index.js +4 -4
- package/dist/cjs/api/resources/serveAd/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/serveAd/client/Client.js +4 -1
- package/dist/cjs/api/resources/serveAd/types/AdsServeAdResponse.d.ts +2 -2
- package/dist/cjs/api/types/Ad.d.ts +1 -4
- package/dist/cjs/api/types/BusinessConversation.d.ts +1 -1
- package/dist/cjs/api/types/BusinessEventCheckInStats.d.ts +1 -1
- package/dist/cjs/api/types/BusinessEventSalesSummary.d.ts +1 -1
- package/dist/cjs/api/types/BusinessMenuItem.d.ts +22 -2
- package/dist/cjs/api/types/Conversation.d.ts +1 -1
- package/dist/cjs/api/types/CustomerProductOrderItem.d.ts +10 -1
- package/dist/cjs/api/types/InventoryChangeType.d.ts +9 -0
- package/dist/cjs/api/types/InventoryChangeType.js +12 -0
- package/dist/cjs/api/types/Ticket.d.ts +1 -0
- package/dist/cjs/api/types/TicketOrder.d.ts +1 -1
- package/dist/cjs/api/types/index.d.ts +1 -1
- package/dist/cjs/api/types/index.js +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +3 -3
- package/dist/esm/Client.mjs +5 -5
- package/dist/esm/api/resources/business/resources/discounts/client/requests/StoreDiscountRequest.d.mts +2 -2
- package/dist/esm/api/resources/business/resources/discounts/client/requests/UpdateDiscountRequest.d.mts +2 -2
- package/dist/esm/api/resources/business/resources/productCategories/client/requests/StoreProductCategoryRequest.d.mts +1 -1
- package/dist/esm/api/resources/business/resources/productCategories/client/requests/UpdateProductCategoryRequest.d.mts +1 -1
- package/dist/esm/api/resources/business/resources/productOrders/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/business/resources/productOrders/client/Client.mjs +4 -1
- package/dist/esm/api/resources/business/resources/productOrders/types/GetLabelRatesProductOrdersResponseItem.d.mts +10 -0
- package/dist/esm/api/resources/business/resources/productOrders/types/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/productOrders/types/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/products/client/requests/StoreProductRequest.d.mts +1 -1
- package/dist/esm/api/resources/business/resources/products/client/requests/UpdateProductRequest.d.mts +1 -1
- package/dist/esm/api/resources/business/resources/pushNotifications/types/RegisterPushNotificationsResponse.d.mts +3 -3
- package/dist/esm/api/resources/business/resources/stripeConnect/types/CreateAccountSessionStripeConnectResponse.d.mts +1 -1
- package/dist/esm/api/resources/businessProducts/client/requests/AdjustInventoryRequest.d.mts +2 -10
- package/dist/esm/api/resources/businessProducts/client/requests/AdjustInventoryRequest.mjs +0 -8
- package/dist/esm/api/resources/customer/resources/businesses/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/customer/resources/businesses/client/Client.mjs +4 -1
- package/dist/esm/api/resources/customer/resources/cart/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/customer/resources/cart/client/Client.mjs +5 -2
- package/dist/esm/api/resources/customer/resources/cart/client/requests/AddToCartRequest.d.mts +3 -3
- package/dist/esm/api/resources/customer/resources/cart/types/GetShippingOptionsCartResponseItem.d.mts +19 -0
- package/dist/esm/api/resources/customer/resources/cart/types/SelectShippingOptionCartResponse.d.mts +2 -7
- package/dist/esm/api/resources/customer/resources/cart/types/index.d.mts +1 -0
- package/dist/esm/api/resources/customer/resources/cart/types/index.mjs +1 -0
- package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/CalculatePriceTicketingResponse.d.mts +13 -1
- package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/ConfirmOrderTicketingResponse.d.mts +3 -3
- package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/HoldTicketsTicketingResponse.d.mts +13 -2
- package/dist/esm/api/resources/customer/resources/pushNotifications/types/RegisterPushNotificationsResponse.d.mts +3 -3
- package/dist/esm/api/resources/customerBusinesses/client/Client.d.mts +30 -0
- package/dist/esm/api/resources/{getPickupTimeslots → customerBusinesses}/client/Client.mjs +10 -8
- package/dist/esm/api/resources/customerBusinesses/client/requests/GetBusinessPickupTimeslotsRequest.d.mts +12 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/customerBusinesses/exports.d.mts +2 -0
- package/dist/esm/api/resources/{getPickupTimeslots → customerBusinesses}/exports.mjs +1 -1
- package/dist/esm/api/resources/customerBusinesses/types/GetBusinessPickupTimeslotsResponse.d.mts +7 -0
- package/dist/esm/api/resources/customerBusinesses/types/GetBusinessPickupTimeslotsResponse.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/types/index.d.mts +1 -0
- package/dist/esm/api/resources/customerBusinesses/types/index.mjs +1 -0
- package/dist/esm/api/resources/customerMyAccount/client/Client.d.mts +16 -0
- package/dist/esm/api/resources/customerMyAccount/client/Client.mjs +54 -0
- package/dist/esm/api/resources/customerMyAccount/client/requests/DownloadAppleWalletPassRequest.d.mts +9 -0
- package/dist/esm/api/resources/customerMyAccount/client/requests/DownloadAppleWalletPassRequest.mjs +2 -0
- package/dist/esm/api/resources/customerMyAccount/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/index.d.mts +3 -3
- package/dist/esm/api/resources/index.mjs +3 -3
- package/dist/esm/api/resources/serveAd/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/serveAd/client/Client.mjs +4 -1
- package/dist/esm/api/resources/serveAd/types/AdsServeAdResponse.d.mts +2 -2
- package/dist/esm/api/types/Ad.d.mts +1 -4
- package/dist/esm/api/types/BusinessConversation.d.mts +1 -1
- package/dist/esm/api/types/BusinessEventCheckInStats.d.mts +1 -1
- package/dist/esm/api/types/BusinessEventSalesSummary.d.mts +1 -1
- package/dist/esm/api/types/BusinessMenuItem.d.mts +22 -2
- package/dist/esm/api/types/Conversation.d.mts +1 -1
- package/dist/esm/api/types/CustomerProductOrderItem.d.mts +10 -1
- package/dist/esm/api/types/InventoryChangeType.d.mts +9 -0
- package/dist/esm/api/types/InventoryChangeType.mjs +9 -0
- package/dist/esm/api/types/Ticket.d.mts +1 -0
- package/dist/esm/api/types/TicketOrder.d.mts +1 -1
- package/dist/esm/api/types/index.d.mts +1 -1
- package/dist/esm/api/types/index.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +12 -12
- package/reference.md +108 -29
- package/dist/cjs/api/resources/getPickupTimeslots/client/Client.d.ts +0 -28
- package/dist/cjs/api/resources/getPickupTimeslots/client/requests/BusinessesGetPickupTimeslotsRequest.d.ts +0 -11
- package/dist/cjs/api/resources/getPickupTimeslots/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/getPickupTimeslots/exports.d.ts +0 -2
- package/dist/cjs/api/resources/getPickupTimeslots/types/BusinessesGetPickupTimeslotsResponse.d.ts +0 -7
- package/dist/cjs/api/resources/getPickupTimeslots/types/index.d.ts +0 -1
- package/dist/cjs/api/types/JsonResource.d.ts +0 -1
- package/dist/esm/api/resources/getPickupTimeslots/client/Client.d.mts +0 -28
- package/dist/esm/api/resources/getPickupTimeslots/client/requests/BusinessesGetPickupTimeslotsRequest.d.mts +0 -11
- package/dist/esm/api/resources/getPickupTimeslots/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/getPickupTimeslots/exports.d.mts +0 -2
- package/dist/esm/api/resources/getPickupTimeslots/types/BusinessesGetPickupTimeslotsResponse.d.mts +0 -7
- package/dist/esm/api/resources/getPickupTimeslots/types/index.d.mts +0 -1
- package/dist/esm/api/resources/getPickupTimeslots/types/index.mjs +0 -1
- package/dist/esm/api/types/JsonResource.d.mts +0 -1
- /package/dist/cjs/api/resources/{getPickupTimeslots/client/requests/BusinessesGetPickupTimeslotsRequest.js → business/resources/productOrders/types/GetLabelRatesProductOrdersResponseItem.js} +0 -0
- /package/dist/cjs/api/resources/{getPickupTimeslots/types/BusinessesGetPickupTimeslotsResponse.js → customer/resources/cart/types/GetShippingOptionsCartResponseItem.js} +0 -0
- /package/dist/cjs/api/resources/{getPickupTimeslots → customerBusinesses}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{getPickupTimeslots → customerBusinesses}/client/index.js +0 -0
- /package/dist/cjs/api/{types/JsonResource.js → resources/customerBusinesses/client/requests/GetBusinessPickupTimeslotsRequest.js} +0 -0
- /package/dist/cjs/api/resources/{getPickupTimeslots → customerBusinesses}/client/requests/index.js +0 -0
- /package/dist/cjs/api/resources/{getPickupTimeslots → customerBusinesses}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{getPickupTimeslots → customerBusinesses}/index.js +0 -0
- /package/dist/esm/api/resources/{getPickupTimeslots/client/requests/BusinessesGetPickupTimeslotsRequest.mjs → business/resources/productOrders/types/GetLabelRatesProductOrdersResponseItem.mjs} +0 -0
- /package/dist/esm/api/resources/{getPickupTimeslots/types/BusinessesGetPickupTimeslotsResponse.mjs → customer/resources/cart/types/GetShippingOptionsCartResponseItem.mjs} +0 -0
- /package/dist/esm/api/resources/{getPickupTimeslots → customerBusinesses}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/{getPickupTimeslots → customerBusinesses}/client/index.mjs +0 -0
- /package/dist/esm/api/{types/JsonResource.mjs → resources/customerBusinesses/client/requests/GetBusinessPickupTimeslotsRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{getPickupTimeslots → customerBusinesses}/client/requests/index.mjs +0 -0
- /package/dist/esm/api/resources/{getPickupTimeslots → customerBusinesses}/index.d.mts +0 -0
- /package/dist/esm/api/resources/{getPickupTimeslots → customerBusinesses}/index.mjs +0 -0
|
@@ -87,13 +87,14 @@ export declare class BusinessesClient {
|
|
|
87
87
|
* @param {BusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
88
88
|
*
|
|
89
89
|
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
90
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
90
91
|
*
|
|
91
92
|
* @example
|
|
92
93
|
* await client.customer.businesses.unfavorite({
|
|
93
94
|
* business: "katzs-deli"
|
|
94
95
|
* })
|
|
95
96
|
*/
|
|
96
|
-
unfavorite(request: FiveOneEat.customer.UnfavoriteBusinessesRequest, requestOptions?: BusinessesClient.RequestOptions): core.HttpResponsePromise<
|
|
97
|
+
unfavorite(request: FiveOneEat.customer.UnfavoriteBusinessesRequest, requestOptions?: BusinessesClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
97
98
|
private __unfavorite;
|
|
98
99
|
/**
|
|
99
100
|
* Retrieve active and upcoming temporary locations for a business.
|
|
@@ -282,6 +282,7 @@ export class BusinessesClient {
|
|
|
282
282
|
* @param {BusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
283
283
|
*
|
|
284
284
|
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
285
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
285
286
|
*
|
|
286
287
|
* @example
|
|
287
288
|
* await client.customer.businesses.unfavorite({
|
|
@@ -309,12 +310,14 @@ export class BusinessesClient {
|
|
|
309
310
|
logging: this._options.logging,
|
|
310
311
|
});
|
|
311
312
|
if (_response.ok) {
|
|
312
|
-
return { data:
|
|
313
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
313
314
|
}
|
|
314
315
|
if (_response.error.reason === "status-code") {
|
|
315
316
|
switch (_response.error.statusCode) {
|
|
316
317
|
case 401:
|
|
317
318
|
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
319
|
+
case 404:
|
|
320
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
318
321
|
default:
|
|
319
322
|
throw new errors.FiveOneEatError({
|
|
320
323
|
statusCode: _response.error.statusCode,
|
|
@@ -33,7 +33,7 @@ export declare class CartClient {
|
|
|
33
33
|
* @example
|
|
34
34
|
* await client.customer.cart.addItem({
|
|
35
35
|
* business: "katzs-deli",
|
|
36
|
-
* product_id:
|
|
36
|
+
* product_id: "product_id",
|
|
37
37
|
* quantity: 1
|
|
38
38
|
* })
|
|
39
39
|
*/
|
|
@@ -155,7 +155,7 @@ export declare class CartClient {
|
|
|
155
155
|
* }
|
|
156
156
|
* })
|
|
157
157
|
*/
|
|
158
|
-
getShippingOptions(request: FiveOneEat.customer.GetShippingOptionsRequest, requestOptions?: CartClient.RequestOptions): core.HttpResponsePromise<
|
|
158
|
+
getShippingOptions(request: FiveOneEat.customer.GetShippingOptionsRequest, requestOptions?: CartClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.GetShippingOptionsCartResponseItem[]>;
|
|
159
159
|
private __getShippingOptions;
|
|
160
160
|
/**
|
|
161
161
|
* Pass either `shipping_rate_id` (for flat/free rates) or `provider_rate_id`
|
|
@@ -89,7 +89,7 @@ export class CartClient {
|
|
|
89
89
|
* @example
|
|
90
90
|
* await client.customer.cart.addItem({
|
|
91
91
|
* business: "katzs-deli",
|
|
92
|
-
* product_id:
|
|
92
|
+
* product_id: "product_id",
|
|
93
93
|
* quantity: 1
|
|
94
94
|
* })
|
|
95
95
|
*/
|
|
@@ -497,7 +497,10 @@ export class CartClient {
|
|
|
497
497
|
logging: this._options.logging,
|
|
498
498
|
});
|
|
499
499
|
if (_response.ok) {
|
|
500
|
-
return {
|
|
500
|
+
return {
|
|
501
|
+
data: _response.body,
|
|
502
|
+
rawResponse: _response.rawResponse,
|
|
503
|
+
};
|
|
501
504
|
}
|
|
502
505
|
if (_response.error.reason === "status-code") {
|
|
503
506
|
switch (_response.error.statusCode) {
|
package/dist/esm/api/resources/customer/resources/cart/client/requests/AddToCartRequest.d.mts
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
4
|
* business: "katzs-deli",
|
|
5
|
-
* product_id:
|
|
5
|
+
* product_id: "product_id",
|
|
6
6
|
* quantity: 1
|
|
7
7
|
* }
|
|
8
8
|
*/
|
|
9
9
|
export interface AddToCartRequest {
|
|
10
10
|
/** The business handle */
|
|
11
11
|
business: string;
|
|
12
|
-
product_id:
|
|
13
|
-
variant_id?:
|
|
12
|
+
product_id: string;
|
|
13
|
+
variant_id?: string | null;
|
|
14
14
|
quantity: number;
|
|
15
15
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type GetShippingOptionsCartResponseItem = {
|
|
2
|
+
shipping_rate_id: string;
|
|
3
|
+
provider_rate_id: unknown | null;
|
|
4
|
+
name: string;
|
|
5
|
+
amount_cents: number;
|
|
6
|
+
amount: string;
|
|
7
|
+
carrier: unknown | null;
|
|
8
|
+
service: unknown | null;
|
|
9
|
+
estimated_days: unknown | null;
|
|
10
|
+
} | {
|
|
11
|
+
shipping_rate_id: unknown | null;
|
|
12
|
+
provider_rate_id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
amount_cents: string;
|
|
15
|
+
amount: string;
|
|
16
|
+
carrier: string;
|
|
17
|
+
service: string;
|
|
18
|
+
estimated_days: string;
|
|
19
|
+
};
|
package/dist/esm/api/resources/customer/resources/cart/types/SelectShippingOptionCartResponse.d.mts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
export
|
|
1
|
+
export interface SelectShippingOptionCartResponse {
|
|
2
2
|
shipping_amount: string;
|
|
3
3
|
shipping_amount_cents: number;
|
|
4
4
|
shipping_method: string;
|
|
5
5
|
total_amount: string;
|
|
6
|
-
}
|
|
7
|
-
shipping_amount: string;
|
|
8
|
-
shipping_amount_cents: number;
|
|
9
|
-
shipping_method: string;
|
|
10
|
-
total_amount: string;
|
|
11
|
-
};
|
|
6
|
+
}
|
|
@@ -3,6 +3,7 @@ export * from "./CheckoutCartResponse.mjs";
|
|
|
3
3
|
export * from "./ClearCartResponse.mjs";
|
|
4
4
|
export * from "./CreatePaymentIntentCartResponse.mjs";
|
|
5
5
|
export * from "./GetCartResponse.mjs";
|
|
6
|
+
export * from "./GetShippingOptionsCartResponseItem.mjs";
|
|
6
7
|
export * from "./RemoveItemCartResponse.mjs";
|
|
7
8
|
export * from "./SelectShippingOptionCartResponse.mjs";
|
|
8
9
|
export * from "./UpdateItemCartResponse.mjs";
|
|
@@ -3,6 +3,7 @@ export * from "./CheckoutCartResponse.mjs";
|
|
|
3
3
|
export * from "./ClearCartResponse.mjs";
|
|
4
4
|
export * from "./CreatePaymentIntentCartResponse.mjs";
|
|
5
5
|
export * from "./GetCartResponse.mjs";
|
|
6
|
+
export * from "./GetShippingOptionsCartResponseItem.mjs";
|
|
6
7
|
export * from "./RemoveItemCartResponse.mjs";
|
|
7
8
|
export * from "./SelectShippingOptionCartResponse.mjs";
|
|
8
9
|
export * from "./UpdateItemCartResponse.mjs";
|
|
@@ -6,6 +6,18 @@ export declare namespace CalculatePriceTicketingResponse {
|
|
|
6
6
|
subtotal: string;
|
|
7
7
|
platform_fee: string;
|
|
8
8
|
total: string;
|
|
9
|
-
line_items:
|
|
9
|
+
line_items: Data.LineItems.Item[];
|
|
10
|
+
}
|
|
11
|
+
namespace Data {
|
|
12
|
+
type LineItems = LineItems.Item[];
|
|
13
|
+
namespace LineItems {
|
|
14
|
+
interface Item {
|
|
15
|
+
ticket_type_id: string;
|
|
16
|
+
ticket_type_name: string;
|
|
17
|
+
unit_price: string;
|
|
18
|
+
quantity: string;
|
|
19
|
+
line_total: string;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
10
22
|
}
|
|
11
23
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as FiveOneEat from "../../../../../../../index.mjs";
|
|
2
|
-
export
|
|
3
|
-
data: FiveOneEat.
|
|
4
|
-
}
|
|
2
|
+
export interface ConfirmOrderTicketingResponse {
|
|
3
|
+
data: FiveOneEat.TicketOrder;
|
|
4
|
+
}
|
|
@@ -5,7 +5,18 @@ export declare namespace HoldTicketsTicketingResponse {
|
|
|
5
5
|
interface Data {
|
|
6
6
|
ticket_cart_id: string;
|
|
7
7
|
expires_at: string;
|
|
8
|
-
time_remaining_seconds:
|
|
9
|
-
holds:
|
|
8
|
+
time_remaining_seconds: number;
|
|
9
|
+
holds: Data.Holds.Item[];
|
|
10
|
+
}
|
|
11
|
+
namespace Data {
|
|
12
|
+
type Holds = Holds.Item[];
|
|
13
|
+
namespace Holds {
|
|
14
|
+
interface Item {
|
|
15
|
+
id: number;
|
|
16
|
+
ticket_type_id: string;
|
|
17
|
+
quantity: number;
|
|
18
|
+
expires_at: string;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
10
21
|
}
|
|
11
22
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
3
|
+
import * as core from "../../../../core/index.mjs";
|
|
4
|
+
import * as FiveOneEat from "../../../index.mjs";
|
|
5
|
+
export declare namespace CustomerBusinessesClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class CustomerBusinessesClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<CustomerBusinessesClient.Options>;
|
|
12
|
+
constructor(options?: CustomerBusinessesClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Returns available pickup timeslots for a business on a given date.
|
|
15
|
+
*
|
|
16
|
+
* @param {FiveOneEat.GetBusinessPickupTimeslotsRequest} request
|
|
17
|
+
* @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
|
+
*
|
|
19
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
20
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* await client.customerBusinesses.getBusinessPickupTimeslots({
|
|
24
|
+
* handle: "katzs-deli",
|
|
25
|
+
* date: "2023-01-15"
|
|
26
|
+
* })
|
|
27
|
+
*/
|
|
28
|
+
getBusinessPickupTimeslots(request: FiveOneEat.GetBusinessPickupTimeslotsRequest, requestOptions?: CustomerBusinessesClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.GetBusinessPickupTimeslotsResponse>;
|
|
29
|
+
private __getBusinessPickupTimeslots;
|
|
30
|
+
}
|
|
@@ -15,27 +15,29 @@ import * as environments from "../../../../environments.mjs";
|
|
|
15
15
|
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
16
|
import * as errors from "../../../../errors/index.mjs";
|
|
17
17
|
import * as FiveOneEat from "../../../index.mjs";
|
|
18
|
-
export class
|
|
18
|
+
export class CustomerBusinessesClient {
|
|
19
19
|
constructor(options = {}) {
|
|
20
20
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
23
|
+
* Returns available pickup timeslots for a business on a given date.
|
|
24
|
+
*
|
|
25
|
+
* @param {FiveOneEat.GetBusinessPickupTimeslotsRequest} request
|
|
26
|
+
* @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
25
27
|
*
|
|
26
28
|
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
27
29
|
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
28
30
|
*
|
|
29
31
|
* @example
|
|
30
|
-
* await client.
|
|
31
|
-
* handle: "
|
|
32
|
+
* await client.customerBusinesses.getBusinessPickupTimeslots({
|
|
33
|
+
* handle: "katzs-deli",
|
|
32
34
|
* date: "2023-01-15"
|
|
33
35
|
* })
|
|
34
36
|
*/
|
|
35
|
-
|
|
36
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
37
|
+
getBusinessPickupTimeslots(request, requestOptions) {
|
|
38
|
+
return core.HttpResponsePromise.fromPromise(this.__getBusinessPickupTimeslots(request, requestOptions));
|
|
37
39
|
}
|
|
38
|
-
|
|
40
|
+
__getBusinessPickupTimeslots(request, requestOptions) {
|
|
39
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
42
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
41
43
|
const { handle, date } = request;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { GetBusinessPickupTimeslotsRequest } from "./GetBusinessPickupTimeslotsRequest.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./GetBusinessPickupTimeslotsResponse.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./GetBusinessPickupTimeslotsResponse.mjs";
|
|
@@ -25,6 +25,22 @@ export declare class CustomerMyAccountClient {
|
|
|
25
25
|
*/
|
|
26
26
|
getMyTicket(request: FiveOneEat.GetMyTicketRequest, requestOptions?: CustomerMyAccountClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.GetMyTicketResponse>;
|
|
27
27
|
private __getMyTicket;
|
|
28
|
+
/**
|
|
29
|
+
* Returns a signed .pkpass file for import into Apple Wallet.
|
|
30
|
+
*
|
|
31
|
+
* @param {FiveOneEat.DownloadAppleWalletPassRequest} request
|
|
32
|
+
* @param {CustomerMyAccountClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
33
|
+
*
|
|
34
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
35
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* await client.customerMyAccount.downloadAppleWalletPass({
|
|
39
|
+
* ticketId: "ticketId"
|
|
40
|
+
* })
|
|
41
|
+
*/
|
|
42
|
+
downloadAppleWalletPass(request: FiveOneEat.DownloadAppleWalletPassRequest, requestOptions?: CustomerMyAccountClient.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
|
|
43
|
+
private __downloadAppleWalletPass;
|
|
28
44
|
/**
|
|
29
45
|
* Retrieve a single ticket order belonging to the authenticated user.
|
|
30
46
|
*
|
|
@@ -70,6 +70,60 @@ export class CustomerMyAccountClient {
|
|
|
70
70
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/tickets/{ticketId}");
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Returns a signed .pkpass file for import into Apple Wallet.
|
|
75
|
+
*
|
|
76
|
+
* @param {FiveOneEat.DownloadAppleWalletPassRequest} request
|
|
77
|
+
* @param {CustomerMyAccountClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
78
|
+
*
|
|
79
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
80
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* await client.customerMyAccount.downloadAppleWalletPass({
|
|
84
|
+
* ticketId: "ticketId"
|
|
85
|
+
* })
|
|
86
|
+
*/
|
|
87
|
+
downloadAppleWalletPass(request, requestOptions) {
|
|
88
|
+
return core.HttpResponsePromise.fromPromise(this.__downloadAppleWalletPass(request, requestOptions));
|
|
89
|
+
}
|
|
90
|
+
__downloadAppleWalletPass(request, requestOptions) {
|
|
91
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
93
|
+
const { ticketId } = request;
|
|
94
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
95
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
96
|
+
const _response = yield core.fetcher({
|
|
97
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/tickets/${core.url.encodePathParam(ticketId)}/wallet/apple`),
|
|
98
|
+
method: "GET",
|
|
99
|
+
headers: _headers,
|
|
100
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
101
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
102
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
103
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
104
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
105
|
+
logging: this._options.logging,
|
|
106
|
+
});
|
|
107
|
+
if (_response.ok) {
|
|
108
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
109
|
+
}
|
|
110
|
+
if (_response.error.reason === "status-code") {
|
|
111
|
+
switch (_response.error.statusCode) {
|
|
112
|
+
case 401:
|
|
113
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
114
|
+
case 404:
|
|
115
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
116
|
+
default:
|
|
117
|
+
throw new errors.FiveOneEatError({
|
|
118
|
+
statusCode: _response.error.statusCode,
|
|
119
|
+
body: _response.error.body,
|
|
120
|
+
rawResponse: _response.rawResponse,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/tickets/{ticketId}/wallet/apple");
|
|
125
|
+
});
|
|
126
|
+
}
|
|
73
127
|
/**
|
|
74
128
|
* Retrieve a single ticket order belonging to the authenticated user.
|
|
75
129
|
*
|
|
@@ -11,6 +11,9 @@ export * from "./businessShipping/types/index.mjs";
|
|
|
11
11
|
export * from "./customer/client/requests/index.mjs";
|
|
12
12
|
export * as customer from "./customer/index.mjs";
|
|
13
13
|
export * from "./customer/types/index.mjs";
|
|
14
|
+
export * from "./customerBusinesses/client/requests/index.mjs";
|
|
15
|
+
export * as customerBusinesses from "./customerBusinesses/index.mjs";
|
|
16
|
+
export * from "./customerBusinesses/types/index.mjs";
|
|
14
17
|
export * from "./customerEvents/client/requests/index.mjs";
|
|
15
18
|
export * as customerEvents from "./customerEvents/index.mjs";
|
|
16
19
|
export * from "./customerMessaging/client/requests/index.mjs";
|
|
@@ -19,9 +22,6 @@ export * from "./customerMessaging/types/index.mjs";
|
|
|
19
22
|
export * from "./customerMyAccount/client/requests/index.mjs";
|
|
20
23
|
export * as customerMyAccount from "./customerMyAccount/index.mjs";
|
|
21
24
|
export * from "./customerMyAccount/types/index.mjs";
|
|
22
|
-
export * from "./getPickupTimeslots/client/requests/index.mjs";
|
|
23
|
-
export * as getPickupTimeslots from "./getPickupTimeslots/index.mjs";
|
|
24
|
-
export * from "./getPickupTimeslots/types/index.mjs";
|
|
25
25
|
export * from "./recordClick/client/requests/index.mjs";
|
|
26
26
|
export * as recordClick from "./recordClick/index.mjs";
|
|
27
27
|
export * from "./serveAd/client/requests/index.mjs";
|
|
@@ -11,6 +11,9 @@ export * from "./businessShipping/types/index.mjs";
|
|
|
11
11
|
export * from "./customer/client/requests/index.mjs";
|
|
12
12
|
export * as customer from "./customer/index.mjs";
|
|
13
13
|
export * from "./customer/types/index.mjs";
|
|
14
|
+
export * from "./customerBusinesses/client/requests/index.mjs";
|
|
15
|
+
export * as customerBusinesses from "./customerBusinesses/index.mjs";
|
|
16
|
+
export * from "./customerBusinesses/types/index.mjs";
|
|
14
17
|
export * from "./customerEvents/client/requests/index.mjs";
|
|
15
18
|
export * as customerEvents from "./customerEvents/index.mjs";
|
|
16
19
|
export * from "./customerMessaging/client/requests/index.mjs";
|
|
@@ -19,9 +22,6 @@ export * from "./customerMessaging/types/index.mjs";
|
|
|
19
22
|
export * from "./customerMyAccount/client/requests/index.mjs";
|
|
20
23
|
export * as customerMyAccount from "./customerMyAccount/index.mjs";
|
|
21
24
|
export * from "./customerMyAccount/types/index.mjs";
|
|
22
|
-
export * from "./getPickupTimeslots/client/requests/index.mjs";
|
|
23
|
-
export * as getPickupTimeslots from "./getPickupTimeslots/index.mjs";
|
|
24
|
-
export * from "./getPickupTimeslots/types/index.mjs";
|
|
25
25
|
export * from "./recordClick/client/requests/index.mjs";
|
|
26
26
|
export * as recordClick from "./recordClick/index.mjs";
|
|
27
27
|
export * from "./serveAd/client/requests/index.mjs";
|
|
@@ -22,6 +22,6 @@ export declare class ServeAdClient {
|
|
|
22
22
|
* placement: "placement"
|
|
23
23
|
* })
|
|
24
24
|
*/
|
|
25
|
-
adsServeAd(request: FiveOneEat.AdsServeAdRequest, requestOptions?: ServeAdClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.AdsServeAdResponse>;
|
|
25
|
+
adsServeAd(request: FiveOneEat.AdsServeAdRequest, requestOptions?: ServeAdClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.AdsServeAdResponse | undefined>;
|
|
26
26
|
private __adsServeAd;
|
|
27
27
|
}
|
|
@@ -52,7 +52,10 @@ export class ServeAdClient {
|
|
|
52
52
|
logging: this._options.logging,
|
|
53
53
|
});
|
|
54
54
|
if (_response.ok) {
|
|
55
|
-
return {
|
|
55
|
+
return {
|
|
56
|
+
data: _response.body,
|
|
57
|
+
rawResponse: _response.rawResponse,
|
|
58
|
+
};
|
|
56
59
|
}
|
|
57
60
|
if (_response.error.reason === "status-code") {
|
|
58
61
|
switch (_response.error.statusCode) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type BusinessEventCheckInStats = unknown
|
|
1
|
+
export type BusinessEventCheckInStats = Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type BusinessEventSalesSummary = unknown
|
|
1
|
+
export type BusinessEventSalesSummary = Record<string, unknown>;
|
|
@@ -8,8 +8,28 @@ export interface BusinessMenuItem {
|
|
|
8
8
|
is_available: boolean;
|
|
9
9
|
sort_order: number;
|
|
10
10
|
image?: string | undefined;
|
|
11
|
-
tags?:
|
|
12
|
-
allergens?:
|
|
11
|
+
tags?: BusinessMenuItem.Tags.Item[] | undefined;
|
|
12
|
+
allergens?: BusinessMenuItem.Allergens.Item[] | undefined;
|
|
13
13
|
variations?: FiveOneEat.BusinessMenuItemVariation[] | undefined;
|
|
14
14
|
modifiers?: FiveOneEat.BusinessMenuItemModifier[] | undefined;
|
|
15
15
|
}
|
|
16
|
+
export declare namespace BusinessMenuItem {
|
|
17
|
+
type Tags = Tags.Item[];
|
|
18
|
+
namespace Tags {
|
|
19
|
+
interface Item {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
slug: string;
|
|
23
|
+
color: string;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
type Allergens = Allergens.Item[];
|
|
27
|
+
namespace Allergens {
|
|
28
|
+
interface Item {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
slug: string;
|
|
32
|
+
icon: string | null;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -8,7 +8,7 @@ export interface CustomerProductOrderItem {
|
|
|
8
8
|
product_snapshot: unknown[] | null;
|
|
9
9
|
product?: CustomerProductOrderItem.Product | undefined;
|
|
10
10
|
variant?: (CustomerProductOrderItem.Variant | null) | undefined;
|
|
11
|
-
downloads?:
|
|
11
|
+
downloads?: CustomerProductOrderItem.Downloads.Item[] | undefined;
|
|
12
12
|
}
|
|
13
13
|
export declare namespace CustomerProductOrderItem {
|
|
14
14
|
interface Product {
|
|
@@ -20,4 +20,13 @@ export declare namespace CustomerProductOrderItem {
|
|
|
20
20
|
id: string;
|
|
21
21
|
name: string;
|
|
22
22
|
}
|
|
23
|
+
type Downloads = Downloads.Item[];
|
|
24
|
+
namespace Downloads {
|
|
25
|
+
interface Item {
|
|
26
|
+
id: string;
|
|
27
|
+
download_token: string;
|
|
28
|
+
download_count: number;
|
|
29
|
+
expires_at: string | null;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
23
32
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const InventoryChangeType: {
|
|
2
|
+
readonly Restock: "restock";
|
|
3
|
+
readonly Damaged: "damaged";
|
|
4
|
+
readonly Shrinkage: "shrinkage";
|
|
5
|
+
readonly Returned: "returned";
|
|
6
|
+
readonly Correction: "correction";
|
|
7
|
+
readonly Other: "other";
|
|
8
|
+
};
|
|
9
|
+
export type InventoryChangeType = (typeof InventoryChangeType)[keyof typeof InventoryChangeType];
|