@51eat/sdk 0.0.41 → 0.0.43
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/README.md +14 -12
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +12 -0
- package/dist/cjs/Client.js +28 -8
- package/dist/cjs/api/resources/business/resources/products/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/business/resources/products/client/Client.js +7 -2
- package/dist/cjs/api/resources/business/resources/products/resources/images/client/Client.d.ts +69 -0
- package/dist/cjs/api/resources/business/resources/products/resources/images/client/Client.js +259 -0
- package/dist/cjs/api/resources/business/resources/products/resources/images/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/{customer/resources/businesses/resources/bulletins/types → business/resources/products/resources/images/client}/index.js +1 -1
- package/dist/cjs/api/resources/business/resources/products/resources/images/client/requests/DeleteImagesRequest.d.ts +13 -0
- package/dist/cjs/api/resources/business/resources/products/resources/images/client/requests/ReorderImagesRequest.d.ts +18 -0
- package/dist/cjs/api/resources/business/resources/products/resources/images/client/requests/UploadImagesRequest.d.ts +14 -0
- package/dist/cjs/api/resources/business/resources/products/resources/images/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/business/resources/products/resources/images/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/business/resources/products/resources/images/exports.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/products/resources/images/exports.js +21 -0
- package/dist/cjs/api/resources/business/resources/products/resources/images/index.d.ts +2 -0
- package/dist/cjs/api/resources/{customer/resources/businesses/resources/events/types → business/resources/products/resources/images}/index.js +2 -3
- package/dist/cjs/api/resources/business/resources/products/resources/images/types/DeleteImagesResponse.d.ts +9 -0
- package/dist/cjs/api/resources/business/resources/products/resources/images/types/DeleteImagesResponse.js +10 -0
- package/dist/cjs/api/resources/business/resources/products/resources/images/types/ReorderImagesResponse.d.ts +9 -0
- package/dist/cjs/api/resources/business/resources/products/resources/images/types/ReorderImagesResponse.js +10 -0
- package/dist/cjs/api/resources/business/resources/products/resources/images/types/UploadImagesResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/products/resources/images/types/index.d.ts +3 -0
- package/dist/cjs/api/resources/{customer/resources/businesses/resources/bulletins/resources/comments → business/resources/products/resources/images}/types/index.js +3 -4
- package/dist/cjs/api/resources/business/resources/products/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/business/resources/products/resources/index.js +4 -1
- package/dist/cjs/api/resources/business/resources/products/resources/variants/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/client/Client.js +5 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/exports.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/exports.js +1 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/index.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/index.js +1 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/client/Client.d.ts +69 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/client/Client.js +259 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/client/index.js +17 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/client/requests/DeleteImagesRequest.d.ts +13 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/client/requests/ReorderImagesRequest.d.ts +18 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/client/requests/UploadImagesRequest.d.ts +14 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/exports.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/exports.js +21 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/index.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/index.js +18 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/types/DeleteImagesResponse.d.ts +9 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/types/DeleteImagesResponse.js +10 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/types/ReorderImagesResponse.d.ts +9 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/types/ReorderImagesResponse.js +10 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/types/UploadImagesResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/types/index.d.ts +3 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/types/index.js +19 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/index.js +42 -0
- package/dist/cjs/api/resources/businessMessaging/client/Client.d.ts +27 -0
- package/dist/cjs/api/resources/businessMessaging/client/Client.js +124 -0
- package/dist/cjs/api/resources/businessMessaging/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/businessMessaging/client/index.js +17 -0
- package/dist/cjs/api/resources/businessMessaging/client/requests/SearchBusinessConversationsRequest.d.ts +14 -0
- package/dist/cjs/api/resources/businessMessaging/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/businessMessaging/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/businessMessaging/exports.d.ts +2 -0
- package/dist/cjs/api/resources/{customer/resources/businesses/types/index.js → businessMessaging/exports.js} +5 -5
- package/dist/cjs/api/resources/businessMessaging/index.d.ts +2 -0
- package/dist/cjs/api/resources/businessMessaging/index.js +18 -0
- package/dist/cjs/api/resources/businessMessaging/types/SearchBusinessConversationsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/businessMessaging/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/businessMessaging/types/index.js +17 -0
- package/dist/cjs/api/resources/customer/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/customer/client/Client.js +4 -4
- package/dist/cjs/api/resources/customer/resources/businesses/client/Client.d.ts +13 -41
- package/dist/cjs/api/resources/customer/resources/businesses/client/Client.js +62 -162
- package/dist/cjs/api/resources/customer/resources/businesses/client/requests/FavoriteBusinessesRequest.d.ts +2 -3
- package/dist/cjs/api/resources/customer/resources/businesses/client/requests/ListTemporaryLocationsBusinessesRequest.d.ts +2 -3
- package/dist/cjs/api/resources/customer/resources/businesses/client/requests/MenusBusinessesRequest.d.ts +2 -7
- package/dist/cjs/api/resources/customer/resources/businesses/client/requests/PhotosBusinessesRequest.d.ts +2 -7
- package/dist/cjs/api/resources/customer/resources/businesses/client/requests/ProfileBusinessesRequest.d.ts +2 -3
- package/dist/cjs/api/resources/customer/resources/businesses/client/requests/UnfavoriteBusinessesRequest.d.ts +2 -3
- package/dist/cjs/api/resources/customer/resources/businesses/index.d.ts +0 -1
- package/dist/cjs/api/resources/customer/resources/businesses/index.js +0 -1
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/client/Client.d.ts +3 -8
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/client/Client.js +11 -36
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/client/requests/ListBulletinsRequest.d.ts +2 -7
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/index.d.ts +0 -1
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/index.js +0 -1
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.d.ts +17 -43
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.js +50 -160
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/CreateCommentsRequest.d.ts +11 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ListCommentsRequest.d.ts +3 -9
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ListRepliesCommentsRequest.d.ts +4 -11
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ReplyCommentsRequest.d.ts +13 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/index.d.ts +2 -2
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/index.d.ts +0 -1
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/index.js +0 -1
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/index.d.ts +0 -1
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/index.js +0 -1
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/Client.d.ts +12 -33
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/Client.js +44 -126
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/requests/CancelRsvpEventsRequest.d.ts +3 -5
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/requests/GetEventsRequest.d.ts +2 -4
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/requests/ListEventsRequest.d.ts +2 -7
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/requests/RsvpEventsRequest.d.ts +11 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/requests/index.js +0 -3
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/index.d.ts +0 -1
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/index.js +0 -1
- package/dist/cjs/api/resources/customer/resources/businesses/resources/index.d.ts +0 -2
- package/dist/cjs/api/resources/customer/resources/businesses/resources/index.js +0 -2
- package/dist/cjs/api/resources/customer/resources/cart/client/Client.d.ts +43 -35
- package/dist/cjs/api/resources/customer/resources/cart/client/Client.js +105 -92
- package/dist/cjs/api/resources/customer/resources/cart/client/requests/AddToCartRequest.d.ts +3 -2
- package/dist/cjs/api/resources/customer/resources/cart/client/requests/CheckoutRequest.d.ts +3 -0
- package/dist/cjs/api/resources/customer/resources/cart/client/requests/ClearCartRequest.d.ts +10 -0
- package/dist/cjs/api/resources/customer/resources/cart/client/requests/CreatePaymentIntentRequest.d.ts +3 -0
- package/dist/cjs/api/resources/customer/resources/cart/client/requests/GetCartRequest.d.ts +10 -0
- package/dist/cjs/api/resources/customer/resources/cart/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/customer/resources/index.d.ts +0 -2
- package/dist/cjs/api/resources/customer/resources/index.js +0 -2
- package/dist/cjs/api/resources/customer/resources/shop/client/Client.d.ts +7 -13
- package/dist/cjs/api/resources/customer/resources/shop/client/Client.js +31 -71
- package/dist/cjs/api/resources/customer/resources/shop/client/requests/GetProductShopRequest.d.ts +2 -4
- package/dist/cjs/api/resources/customer/resources/shop/client/requests/ListCategoriesShopRequest.d.ts +2 -3
- package/dist/cjs/api/resources/customer/resources/shop/client/requests/ListProductsShopRequest.d.ts +2 -7
- package/dist/cjs/api/resources/customer/resources/shop/index.d.ts +0 -1
- package/dist/cjs/api/resources/customer/resources/shop/index.js +0 -1
- package/dist/cjs/api/resources/customerBusinesses/client/Client.d.ts +267 -0
- package/dist/cjs/api/resources/customerBusinesses/client/Client.js +982 -0
- package/dist/cjs/api/resources/customerBusinesses/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/customerBusinesses/client/index.js +17 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/BusinessesEventShowRequest.d.ts +13 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/DestroyEventRsvpRequest.d.ts +13 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/FavoritesBusinessRequest.d.ts +10 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/FavoritesBusinessRequest.js +3 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBulletinCommentRepliesRequest.d.ts +20 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBulletinCommentRepliesRequest.js +3 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBulletinCommentsRequest.d.ts +17 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBulletinCommentsRequest.js +3 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBusinessBulletinsRequest.d.ts +14 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBusinessBulletinsRequest.js +3 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBusinessEventsRequest.d.ts +14 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBusinessEventsRequest.js +3 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBusinessMenusRequest.d.ts +14 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBusinessMenusRequest.js +3 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBusinessPhotosRequest.d.ts +14 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBusinessPhotosRequest.js +3 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBusinessTemporaryLocationsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBusinessTemporaryLocationsRequest.js +3 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/ProfileShowRequest.d.ts +10 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/ProfileShowRequest.js +3 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/StoreBulletinCommentReplyRequest.js +3 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/UnfavoritesBusinessRequest.d.ts +10 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/UnfavoritesBusinessRequest.js +3 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/index.d.ts +15 -0
- package/dist/cjs/api/resources/customerBusinesses/client/requests/index.js +5 -0
- package/dist/cjs/api/resources/customerBusinesses/exports.d.ts +2 -0
- package/dist/cjs/api/resources/customerBusinesses/exports.js +21 -0
- package/dist/cjs/api/resources/customerBusinesses/index.d.ts +2 -0
- package/dist/cjs/api/resources/customerBusinesses/index.js +18 -0
- package/dist/cjs/api/resources/customerBusinesses/types/BusinessesEventShowResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customerBusinesses/types/BusinessesEventShowResponse.js +3 -0
- package/dist/cjs/api/resources/customerBusinesses/types/CreateBulletinCommentResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customerBusinesses/types/CreateBulletinCommentResponse.js +3 -0
- package/dist/cjs/api/resources/customerBusinesses/types/FavoritesBusinessResponse.d.ts +3 -0
- package/dist/cjs/api/resources/customerBusinesses/types/FavoritesBusinessResponse.js +3 -0
- package/dist/cjs/api/resources/customerBusinesses/types/GetBulletinCommentRepliesResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customerBusinesses/types/GetBulletinCommentRepliesResponse.js +3 -0
- package/dist/cjs/api/resources/customerBusinesses/types/GetBulletinCommentsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customerBusinesses/types/GetBulletinCommentsResponse.js +3 -0
- package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessBulletinsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessBulletinsResponse.js +3 -0
- package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessEventsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessEventsResponse.js +3 -0
- package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessMenusResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessMenusResponse.js +3 -0
- package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessPhotosResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessPhotosResponse.js +3 -0
- package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessTemporaryLocationsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessTemporaryLocationsResponse.js +3 -0
- package/dist/cjs/api/resources/customerBusinesses/types/ProfileShowResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customerBusinesses/types/ProfileShowResponse.js +3 -0
- package/dist/cjs/api/resources/customerBusinesses/types/ReplyToBulletinCommentResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customerBusinesses/types/ReplyToBulletinCommentResponse.js +3 -0
- package/dist/cjs/api/resources/customerBusinesses/types/StoreEventRsvpResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customerBusinesses/types/StoreEventRsvpResponse.js +3 -0
- package/dist/cjs/api/resources/customerBusinesses/types/index.d.ts +13 -0
- package/dist/cjs/api/resources/customerBusinesses/types/index.js +29 -0
- package/dist/cjs/api/resources/customerMessaging/client/Client.d.ts +27 -0
- package/dist/cjs/api/resources/customerMessaging/client/Client.js +124 -0
- package/dist/cjs/api/resources/customerMessaging/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/customerMessaging/client/index.js +17 -0
- package/dist/cjs/api/resources/customerMessaging/client/requests/SearchCustomerConversationsRequest.d.ts +14 -0
- package/dist/cjs/api/resources/customerMessaging/client/requests/SearchCustomerConversationsRequest.js +3 -0
- package/dist/cjs/api/resources/customerMessaging/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/customerMessaging/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/customerMessaging/exports.d.ts +2 -0
- package/dist/cjs/api/resources/customerMessaging/exports.js +21 -0
- package/dist/cjs/api/resources/customerMessaging/index.d.ts +2 -0
- package/dist/cjs/api/resources/customerMessaging/index.js +18 -0
- package/dist/cjs/api/resources/customerMessaging/types/SearchCustomerConversationsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customerMessaging/types/SearchCustomerConversationsResponse.js +3 -0
- package/dist/cjs/api/resources/customerMessaging/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/customerMessaging/types/index.js +17 -0
- package/dist/cjs/api/resources/customerShop/client/Client.d.ts +53 -0
- package/dist/cjs/api/resources/customerShop/client/Client.js +219 -0
- package/dist/cjs/api/resources/customerShop/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/customerShop/client/index.js +17 -0
- package/dist/cjs/api/resources/customerShop/client/requests/GetShopProductRequest.d.ts +13 -0
- package/dist/cjs/api/resources/customerShop/client/requests/GetShopProductRequest.js +3 -0
- package/dist/cjs/api/resources/customerShop/client/requests/ListShopCategoriesRequest.d.ts +10 -0
- package/dist/cjs/api/resources/customerShop/client/requests/ListShopCategoriesRequest.js +3 -0
- package/dist/cjs/api/resources/customerShop/client/requests/ListShopProductsRequest.d.ts +14 -0
- package/dist/cjs/api/resources/customerShop/client/requests/ListShopProductsRequest.js +3 -0
- package/dist/cjs/api/resources/customerShop/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/customerShop/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/customerShop/exports.d.ts +2 -0
- package/dist/cjs/api/resources/customerShop/exports.js +21 -0
- package/dist/cjs/api/resources/customerShop/index.d.ts +2 -0
- package/dist/cjs/api/resources/customerShop/index.js +18 -0
- package/dist/cjs/api/resources/customerShop/types/GetShopProductResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customerShop/types/GetShopProductResponse.js +3 -0
- package/dist/cjs/api/resources/customerShop/types/ListShopCategoriesResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customerShop/types/ListShopCategoriesResponse.js +3 -0
- package/dist/cjs/api/resources/customerShop/types/ListShopProductsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customerShop/types/ListShopProductsResponse.js +3 -0
- package/dist/cjs/api/resources/customerShop/types/index.d.ts +3 -0
- package/dist/cjs/api/resources/{customer/resources/shop → customerShop}/types/index.js +3 -3
- package/dist/cjs/api/resources/index.d.ts +12 -0
- package/dist/cjs/api/resources/index.js +13 -1
- package/dist/cjs/api/types/BusinessProduct.d.ts +1 -1
- package/dist/cjs/api/types/BusinessProductVariant.d.ts +2 -0
- package/dist/cjs/api/types/ExploreEvent.d.ts +21 -0
- package/dist/cjs/api/types/ExploreEvent.js +3 -0
- package/dist/cjs/api/types/ExploreResponse.d.ts +1 -0
- package/dist/cjs/api/types/ReorderProductImagesRequest.d.ts +12 -0
- package/dist/cjs/api/types/ReorderProductImagesRequest.js +3 -0
- package/dist/cjs/api/types/StoreProductImageRequest.d.ts +4 -0
- package/dist/cjs/api/types/StoreProductImageRequest.js +3 -0
- package/dist/cjs/api/types/index.d.ts +3 -0
- package/dist/cjs/api/types/index.js +3 -0
- 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 +12 -0
- package/dist/esm/Client.mjs +20 -0
- package/dist/esm/api/resources/business/resources/products/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/business/resources/products/client/Client.mjs +5 -0
- package/dist/esm/api/resources/business/resources/products/resources/images/client/Client.d.mts +69 -0
- package/dist/esm/api/resources/business/resources/products/resources/images/client/Client.mjs +222 -0
- package/dist/esm/api/resources/business/resources/products/resources/images/client/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/products/resources/images/client/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/products/resources/images/client/requests/DeleteImagesRequest.d.mts +13 -0
- package/dist/esm/api/resources/business/resources/products/resources/images/client/requests/ReorderImagesRequest.d.mts +18 -0
- package/dist/esm/api/resources/business/resources/products/resources/images/client/requests/UploadImagesRequest.d.mts +14 -0
- package/dist/esm/api/resources/business/resources/products/resources/images/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/business/resources/products/resources/images/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/products/resources/images/exports.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/products/resources/images/exports.mjs +3 -0
- package/dist/esm/api/resources/business/resources/products/resources/images/index.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/products/resources/images/index.mjs +2 -0
- package/dist/esm/api/resources/business/resources/products/resources/images/types/DeleteImagesResponse.d.mts +9 -0
- package/dist/esm/api/resources/business/resources/products/resources/images/types/DeleteImagesResponse.mjs +7 -0
- package/dist/esm/api/resources/business/resources/products/resources/images/types/ReorderImagesResponse.d.mts +9 -0
- package/dist/esm/api/resources/business/resources/products/resources/images/types/ReorderImagesResponse.mjs +7 -0
- package/dist/esm/api/resources/business/resources/products/resources/images/types/UploadImagesResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/products/resources/images/types/index.d.mts +3 -0
- package/dist/esm/api/resources/business/resources/products/resources/images/types/index.mjs +3 -0
- package/dist/esm/api/resources/business/resources/products/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/business/resources/products/resources/index.mjs +3 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/client/Client.mjs +5 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/exports.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/exports.mjs +1 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/client/Client.d.mts +69 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/client/Client.mjs +222 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/client/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/client/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/client/requests/DeleteImagesRequest.d.mts +13 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/client/requests/ReorderImagesRequest.d.mts +18 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/client/requests/UploadImagesRequest.d.mts +14 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/exports.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/exports.mjs +3 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/index.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/index.mjs +2 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/types/DeleteImagesResponse.d.mts +9 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/types/DeleteImagesResponse.mjs +7 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/types/ReorderImagesResponse.d.mts +9 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/types/ReorderImagesResponse.mjs +7 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/types/UploadImagesResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/types/index.d.mts +3 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/types/index.mjs +3 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/resources/index.mjs +3 -0
- package/dist/esm/api/resources/businessMessaging/client/Client.d.mts +27 -0
- package/dist/esm/api/resources/businessMessaging/client/Client.mjs +87 -0
- package/dist/esm/api/resources/businessMessaging/client/index.d.mts +1 -0
- package/dist/esm/api/resources/businessMessaging/client/index.mjs +1 -0
- package/dist/esm/api/resources/businessMessaging/client/requests/SearchBusinessConversationsRequest.d.mts +14 -0
- package/dist/esm/api/resources/businessMessaging/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/businessMessaging/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/businessMessaging/exports.d.mts +2 -0
- package/dist/esm/api/resources/businessMessaging/exports.mjs +3 -0
- package/dist/esm/api/resources/businessMessaging/index.d.mts +2 -0
- package/dist/esm/api/resources/businessMessaging/index.mjs +2 -0
- package/dist/esm/api/resources/businessMessaging/types/SearchBusinessConversationsResponse.d.mts +4 -0
- package/dist/esm/api/resources/businessMessaging/types/index.d.mts +1 -0
- package/dist/esm/api/resources/businessMessaging/types/index.mjs +1 -0
- package/dist/esm/api/resources/customer/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/customer/client/Client.mjs +4 -4
- package/dist/esm/api/resources/customer/resources/businesses/client/Client.d.mts +13 -41
- package/dist/esm/api/resources/customer/resources/businesses/client/Client.mjs +62 -162
- package/dist/esm/api/resources/customer/resources/businesses/client/requests/FavoriteBusinessesRequest.d.mts +2 -3
- package/dist/esm/api/resources/customer/resources/businesses/client/requests/ListTemporaryLocationsBusinessesRequest.d.mts +2 -3
- package/dist/esm/api/resources/customer/resources/businesses/client/requests/MenusBusinessesRequest.d.mts +2 -7
- package/dist/esm/api/resources/customer/resources/businesses/client/requests/PhotosBusinessesRequest.d.mts +2 -7
- package/dist/esm/api/resources/customer/resources/businesses/client/requests/ProfileBusinessesRequest.d.mts +2 -3
- package/dist/esm/api/resources/customer/resources/businesses/client/requests/UnfavoriteBusinessesRequest.d.mts +2 -3
- package/dist/esm/api/resources/customer/resources/businesses/index.d.mts +0 -1
- package/dist/esm/api/resources/customer/resources/businesses/index.mjs +0 -1
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/client/Client.d.mts +3 -8
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/client/Client.mjs +11 -36
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/client/requests/ListBulletinsRequest.d.mts +2 -7
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/index.d.mts +0 -1
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/index.mjs +0 -1
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.d.mts +17 -43
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.mjs +50 -160
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/CreateCommentsRequest.d.mts +11 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ListCommentsRequest.d.mts +3 -9
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ListRepliesCommentsRequest.d.mts +4 -11
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ReplyCommentsRequest.d.mts +13 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/index.d.mts +2 -2
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/index.d.mts +0 -1
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/index.mjs +0 -1
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/index.d.mts +0 -1
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/index.mjs +0 -1
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/Client.d.mts +12 -33
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/Client.mjs +44 -126
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/requests/CancelRsvpEventsRequest.d.mts +3 -5
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/requests/GetEventsRequest.d.mts +2 -4
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/requests/ListEventsRequest.d.mts +2 -7
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/requests/RsvpEventsRequest.d.mts +11 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/requests/index.mjs +1 -1
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/index.d.mts +0 -1
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/index.mjs +0 -1
- package/dist/esm/api/resources/customer/resources/businesses/resources/index.d.mts +0 -2
- package/dist/esm/api/resources/customer/resources/businesses/resources/index.mjs +0 -2
- package/dist/esm/api/resources/customer/resources/cart/client/Client.d.mts +43 -35
- package/dist/esm/api/resources/customer/resources/cart/client/Client.mjs +105 -92
- package/dist/esm/api/resources/customer/resources/cart/client/requests/AddToCartRequest.d.mts +3 -2
- package/dist/esm/api/resources/customer/resources/cart/client/requests/CheckoutRequest.d.mts +3 -0
- package/dist/esm/api/resources/customer/resources/cart/client/requests/ClearCartRequest.d.mts +10 -0
- package/dist/esm/api/resources/customer/resources/cart/client/requests/CreatePaymentIntentRequest.d.mts +3 -0
- package/dist/esm/api/resources/customer/resources/cart/client/requests/GetCartRequest.d.mts +10 -0
- package/dist/esm/api/resources/customer/resources/cart/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/customer/resources/index.d.mts +0 -2
- package/dist/esm/api/resources/customer/resources/index.mjs +0 -2
- package/dist/esm/api/resources/customer/resources/shop/client/Client.d.mts +7 -13
- package/dist/esm/api/resources/customer/resources/shop/client/Client.mjs +31 -71
- package/dist/esm/api/resources/customer/resources/shop/client/requests/GetProductShopRequest.d.mts +2 -4
- package/dist/esm/api/resources/customer/resources/shop/client/requests/ListCategoriesShopRequest.d.mts +2 -3
- package/dist/esm/api/resources/customer/resources/shop/client/requests/ListProductsShopRequest.d.mts +2 -7
- package/dist/esm/api/resources/customer/resources/shop/index.d.mts +0 -1
- package/dist/esm/api/resources/customer/resources/shop/index.mjs +0 -1
- package/dist/esm/api/resources/customerBusinesses/client/Client.d.mts +267 -0
- package/dist/esm/api/resources/customerBusinesses/client/Client.mjs +945 -0
- package/dist/esm/api/resources/customerBusinesses/client/index.d.mts +1 -0
- package/dist/esm/api/resources/customerBusinesses/client/index.mjs +1 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/BusinessesEventShowRequest.d.mts +13 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/DestroyEventRsvpRequest.d.mts +13 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/FavoritesBusinessRequest.d.mts +10 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/FavoritesBusinessRequest.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/GetBulletinCommentRepliesRequest.d.mts +20 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/GetBulletinCommentRepliesRequest.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/GetBulletinCommentsRequest.d.mts +17 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/GetBulletinCommentsRequest.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/GetBusinessBulletinsRequest.d.mts +14 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/GetBusinessBulletinsRequest.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/GetBusinessEventsRequest.d.mts +14 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/GetBusinessEventsRequest.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/GetBusinessMenusRequest.d.mts +14 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/GetBusinessMenusRequest.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/GetBusinessPhotosRequest.d.mts +14 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/GetBusinessPhotosRequest.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/GetBusinessTemporaryLocationsRequest.d.mts +10 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/GetBusinessTemporaryLocationsRequest.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/ProfileShowRequest.d.mts +10 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/ProfileShowRequest.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/StoreBulletinCommentReplyRequest.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/UnfavoritesBusinessRequest.d.mts +10 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/UnfavoritesBusinessRequest.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/index.d.mts +15 -0
- package/dist/esm/api/resources/customerBusinesses/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/customerBusinesses/exports.d.mts +2 -0
- package/dist/esm/api/resources/customerBusinesses/exports.mjs +3 -0
- package/dist/esm/api/resources/customerBusinesses/index.d.mts +2 -0
- package/dist/esm/api/resources/customerBusinesses/index.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/types/BusinessesEventShowResponse.d.mts +4 -0
- package/dist/esm/api/resources/customerBusinesses/types/BusinessesEventShowResponse.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/types/CreateBulletinCommentResponse.d.mts +4 -0
- package/dist/esm/api/resources/customerBusinesses/types/CreateBulletinCommentResponse.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/types/FavoritesBusinessResponse.d.mts +3 -0
- package/dist/esm/api/resources/customerBusinesses/types/FavoritesBusinessResponse.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/types/GetBulletinCommentRepliesResponse.d.mts +4 -0
- package/dist/esm/api/resources/customerBusinesses/types/GetBulletinCommentRepliesResponse.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/types/GetBulletinCommentsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customerBusinesses/types/GetBulletinCommentsResponse.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/types/GetBusinessBulletinsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customerBusinesses/types/GetBusinessBulletinsResponse.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/types/GetBusinessEventsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customerBusinesses/types/GetBusinessEventsResponse.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/types/GetBusinessMenusResponse.d.mts +4 -0
- package/dist/esm/api/resources/customerBusinesses/types/GetBusinessMenusResponse.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/types/GetBusinessPhotosResponse.d.mts +4 -0
- package/dist/esm/api/resources/customerBusinesses/types/GetBusinessPhotosResponse.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/types/GetBusinessTemporaryLocationsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customerBusinesses/types/GetBusinessTemporaryLocationsResponse.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/types/ProfileShowResponse.d.mts +4 -0
- package/dist/esm/api/resources/customerBusinesses/types/ProfileShowResponse.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/types/ReplyToBulletinCommentResponse.d.mts +4 -0
- package/dist/esm/api/resources/customerBusinesses/types/ReplyToBulletinCommentResponse.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/types/StoreEventRsvpResponse.d.mts +4 -0
- package/dist/esm/api/resources/customerBusinesses/types/StoreEventRsvpResponse.mjs +2 -0
- package/dist/esm/api/resources/customerBusinesses/types/index.d.mts +13 -0
- package/dist/esm/api/resources/customerBusinesses/types/index.mjs +13 -0
- package/dist/esm/api/resources/customerMessaging/client/Client.d.mts +27 -0
- package/dist/esm/api/resources/customerMessaging/client/Client.mjs +87 -0
- package/dist/esm/api/resources/customerMessaging/client/index.d.mts +1 -0
- package/dist/esm/api/resources/customerMessaging/client/index.mjs +1 -0
- package/dist/esm/api/resources/customerMessaging/client/requests/SearchCustomerConversationsRequest.d.mts +14 -0
- package/dist/esm/api/resources/customerMessaging/client/requests/SearchCustomerConversationsRequest.mjs +2 -0
- package/dist/esm/api/resources/customerMessaging/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/customerMessaging/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/customerMessaging/exports.d.mts +2 -0
- package/dist/esm/api/resources/customerMessaging/exports.mjs +3 -0
- package/dist/esm/api/resources/customerMessaging/index.d.mts +2 -0
- package/dist/esm/api/resources/customerMessaging/index.mjs +2 -0
- package/dist/esm/api/resources/customerMessaging/types/SearchCustomerConversationsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customerMessaging/types/SearchCustomerConversationsResponse.mjs +2 -0
- package/dist/esm/api/resources/customerMessaging/types/index.d.mts +1 -0
- package/dist/esm/api/resources/customerMessaging/types/index.mjs +1 -0
- package/dist/esm/api/resources/customerShop/client/Client.d.mts +53 -0
- package/dist/esm/api/resources/customerShop/client/Client.mjs +182 -0
- package/dist/esm/api/resources/customerShop/client/index.d.mts +1 -0
- package/dist/esm/api/resources/customerShop/client/index.mjs +1 -0
- package/dist/esm/api/resources/customerShop/client/requests/GetShopProductRequest.d.mts +13 -0
- package/dist/esm/api/resources/customerShop/client/requests/GetShopProductRequest.mjs +2 -0
- package/dist/esm/api/resources/customerShop/client/requests/ListShopCategoriesRequest.d.mts +10 -0
- package/dist/esm/api/resources/customerShop/client/requests/ListShopCategoriesRequest.mjs +2 -0
- package/dist/esm/api/resources/customerShop/client/requests/ListShopProductsRequest.d.mts +14 -0
- package/dist/esm/api/resources/customerShop/client/requests/ListShopProductsRequest.mjs +2 -0
- package/dist/esm/api/resources/customerShop/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/customerShop/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/customerShop/exports.d.mts +2 -0
- package/dist/esm/api/resources/customerShop/exports.mjs +3 -0
- package/dist/esm/api/resources/customerShop/index.d.mts +2 -0
- package/dist/esm/api/resources/customerShop/index.mjs +2 -0
- package/dist/esm/api/resources/customerShop/types/GetShopProductResponse.d.mts +4 -0
- package/dist/esm/api/resources/customerShop/types/GetShopProductResponse.mjs +2 -0
- package/dist/esm/api/resources/customerShop/types/ListShopCategoriesResponse.d.mts +4 -0
- package/dist/esm/api/resources/customerShop/types/ListShopCategoriesResponse.mjs +2 -0
- package/dist/esm/api/resources/customerShop/types/ListShopProductsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customerShop/types/ListShopProductsResponse.mjs +2 -0
- package/dist/esm/api/resources/customerShop/types/index.d.mts +3 -0
- package/dist/esm/api/resources/customerShop/types/index.mjs +3 -0
- package/dist/esm/api/resources/index.d.mts +12 -0
- package/dist/esm/api/resources/index.mjs +12 -0
- package/dist/esm/api/types/BusinessProduct.d.mts +1 -1
- package/dist/esm/api/types/BusinessProductVariant.d.mts +2 -0
- package/dist/esm/api/types/ExploreEvent.d.mts +21 -0
- package/dist/esm/api/types/ExploreEvent.mjs +2 -0
- package/dist/esm/api/types/ExploreResponse.d.mts +1 -0
- package/dist/esm/api/types/ReorderProductImagesRequest.d.mts +12 -0
- package/dist/esm/api/types/ReorderProductImagesRequest.mjs +2 -0
- package/dist/esm/api/types/StoreProductImageRequest.d.mts +4 -0
- package/dist/esm/api/types/StoreProductImageRequest.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +3 -0
- package/dist/esm/api/types/index.mjs +3 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +78 -12
- package/reference.md +3236 -1856
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/CreateCommentsResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ListCommentsResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ListRepliesCommentsResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ReplyCommentsResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/index.d.ts +0 -4
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/types/ListBulletinsResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/types/index.d.ts +0 -1
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/types/GetEventsResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/types/ListEventsResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/types/RsvpEventsResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/types/index.d.ts +0 -3
- package/dist/cjs/api/resources/customer/resources/businesses/types/FavoriteBusinessesResponse.d.ts +0 -3
- package/dist/cjs/api/resources/customer/resources/businesses/types/ListTemporaryLocationsBusinessesResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customer/resources/businesses/types/MenusBusinessesResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customer/resources/businesses/types/PhotosBusinessesResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customer/resources/businesses/types/ProfileBusinessesResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customer/resources/businesses/types/index.d.ts +0 -5
- package/dist/cjs/api/resources/customer/resources/shop/types/GetProductShopResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customer/resources/shop/types/ListCategoriesShopResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customer/resources/shop/types/ListProductsShopResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customer/resources/shop/types/index.d.ts +0 -3
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/CreateCommentsResponse.d.mts +0 -4
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ListCommentsResponse.d.mts +0 -4
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ListRepliesCommentsResponse.d.mts +0 -4
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ReplyCommentsResponse.d.mts +0 -4
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/index.d.mts +0 -4
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/index.mjs +0 -4
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/types/ListBulletinsResponse.d.mts +0 -4
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/types/index.d.mts +0 -1
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/types/index.mjs +0 -1
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/types/GetEventsResponse.d.mts +0 -4
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/types/ListEventsResponse.d.mts +0 -4
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/types/RsvpEventsResponse.d.mts +0 -4
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/types/index.d.mts +0 -3
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/types/index.mjs +0 -3
- package/dist/esm/api/resources/customer/resources/businesses/types/FavoriteBusinessesResponse.d.mts +0 -3
- package/dist/esm/api/resources/customer/resources/businesses/types/ListTemporaryLocationsBusinessesResponse.d.mts +0 -4
- package/dist/esm/api/resources/customer/resources/businesses/types/MenusBusinessesResponse.d.mts +0 -4
- package/dist/esm/api/resources/customer/resources/businesses/types/PhotosBusinessesResponse.d.mts +0 -4
- package/dist/esm/api/resources/customer/resources/businesses/types/ProfileBusinessesResponse.d.mts +0 -4
- package/dist/esm/api/resources/customer/resources/businesses/types/index.d.mts +0 -5
- package/dist/esm/api/resources/customer/resources/businesses/types/index.mjs +0 -5
- package/dist/esm/api/resources/customer/resources/shop/types/GetProductShopResponse.d.mts +0 -4
- package/dist/esm/api/resources/customer/resources/shop/types/ListCategoriesShopResponse.d.mts +0 -4
- package/dist/esm/api/resources/customer/resources/shop/types/ListProductsShopResponse.d.mts +0 -4
- package/dist/esm/api/resources/customer/resources/shop/types/index.d.mts +0 -3
- package/dist/esm/api/resources/customer/resources/shop/types/index.mjs +0 -3
- /package/dist/cjs/api/resources/{customer/resources/businesses/resources/bulletins/resources/comments/client/requests/AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest.js → business/resources/products/resources/images/client/requests/DeleteImagesRequest.js} +0 -0
- /package/dist/cjs/api/resources/{customer/resources/businesses/resources/bulletins/resources/comments/client/requests/StoreBulletinCommentReplyRequest.js → business/resources/products/resources/images/client/requests/ReorderImagesRequest.js} +0 -0
- /package/dist/cjs/api/resources/{customer/resources/businesses/resources/bulletins/resources/comments/types/CreateCommentsResponse.js → business/resources/products/resources/images/client/requests/UploadImagesRequest.js} +0 -0
- /package/dist/cjs/api/resources/{customer/resources/businesses/resources/bulletins/resources/comments/types/ListCommentsResponse.js → business/resources/products/resources/images/types/UploadImagesResponse.js} +0 -0
- /package/dist/cjs/api/resources/{customer/resources/businesses/resources/bulletins/resources/comments/types/ListRepliesCommentsResponse.js → business/resources/products/resources/variants/resources/images/client/requests/DeleteImagesRequest.js} +0 -0
- /package/dist/cjs/api/resources/{customer/resources/businesses/resources/bulletins/resources/comments/types/ReplyCommentsResponse.js → business/resources/products/resources/variants/resources/images/client/requests/ReorderImagesRequest.js} +0 -0
- /package/dist/cjs/api/resources/{customer/resources/businesses/resources/bulletins/types/ListBulletinsResponse.js → business/resources/products/resources/variants/resources/images/client/requests/UploadImagesRequest.js} +0 -0
- /package/dist/cjs/api/resources/{customer/resources/businesses/resources/events/types/GetEventsResponse.js → business/resources/products/resources/variants/resources/images/types/UploadImagesResponse.js} +0 -0
- /package/dist/cjs/api/resources/{customer/resources/businesses/resources/events/types/ListEventsResponse.js → businessMessaging/client/requests/SearchBusinessConversationsRequest.js} +0 -0
- /package/dist/cjs/api/resources/{customer/resources/businesses/resources/events/types/RsvpEventsResponse.js → businessMessaging/types/SearchBusinessConversationsResponse.js} +0 -0
- /package/dist/cjs/api/resources/customer/resources/businesses/{types/FavoriteBusinessesResponse.js → resources/bulletins/resources/comments/client/requests/CreateCommentsRequest.js} +0 -0
- /package/dist/cjs/api/resources/customer/resources/businesses/{types/ListTemporaryLocationsBusinessesResponse.js → resources/bulletins/resources/comments/client/requests/ReplyCommentsRequest.js} +0 -0
- /package/dist/cjs/api/resources/customer/resources/businesses/{types/MenusBusinessesResponse.js → resources/events/client/requests/RsvpEventsRequest.js} +0 -0
- /package/dist/cjs/api/resources/customer/resources/{businesses/types/PhotosBusinessesResponse.js → cart/client/requests/ClearCartRequest.js} +0 -0
- /package/dist/cjs/api/resources/customer/resources/{businesses/types/ProfileBusinessesResponse.js → cart/client/requests/GetCartRequest.js} +0 -0
- /package/dist/cjs/api/resources/{customer/resources/businesses/resources/bulletins/resources/comments → customerBusinesses}/client/requests/AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest.d.ts +0 -0
- /package/dist/cjs/api/resources/{customer/resources/shop/types/GetProductShopResponse.js → customerBusinesses/client/requests/AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest.js} +0 -0
- /package/dist/cjs/api/resources/{customer/resources/shop/types/ListCategoriesShopResponse.js → customerBusinesses/client/requests/BusinessesEventShowRequest.js} +0 -0
- /package/dist/cjs/api/resources/{customer/resources/shop/types/ListProductsShopResponse.js → customerBusinesses/client/requests/DestroyEventRsvpRequest.js} +0 -0
- /package/dist/cjs/api/resources/{customer/resources/businesses/resources/bulletins/resources/comments → customerBusinesses}/client/requests/StoreBulletinCommentReplyRequest.d.ts +0 -0
- /package/dist/cjs/api/resources/{customer/resources/businesses/resources/events → customerBusinesses}/client/requests/StoreEventRsvpRequest.d.ts +0 -0
- /package/dist/cjs/api/resources/{customer/resources/businesses/resources/events → customerBusinesses}/client/requests/StoreEventRsvpRequest.js +0 -0
- /package/dist/esm/api/resources/{customer/resources/businesses/resources/bulletins/resources/comments/client/requests/AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest.mjs → business/resources/products/resources/images/client/requests/DeleteImagesRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{customer/resources/businesses/resources/bulletins/resources/comments/client/requests/StoreBulletinCommentReplyRequest.mjs → business/resources/products/resources/images/client/requests/ReorderImagesRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{customer/resources/businesses/resources/bulletins/resources/comments/types/CreateCommentsResponse.mjs → business/resources/products/resources/images/client/requests/UploadImagesRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{customer/resources/businesses/resources/bulletins/resources/comments/types/ListCommentsResponse.mjs → business/resources/products/resources/images/types/UploadImagesResponse.mjs} +0 -0
- /package/dist/esm/api/resources/{customer/resources/businesses/resources/bulletins/resources/comments/types/ListRepliesCommentsResponse.mjs → business/resources/products/resources/variants/resources/images/client/requests/DeleteImagesRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{customer/resources/businesses/resources/bulletins/resources/comments/types/ReplyCommentsResponse.mjs → business/resources/products/resources/variants/resources/images/client/requests/ReorderImagesRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{customer/resources/businesses/resources/bulletins/types/ListBulletinsResponse.mjs → business/resources/products/resources/variants/resources/images/client/requests/UploadImagesRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{customer/resources/businesses/resources/events/types/GetEventsResponse.mjs → business/resources/products/resources/variants/resources/images/types/UploadImagesResponse.mjs} +0 -0
- /package/dist/esm/api/resources/{customer/resources/businesses/resources/events/types/ListEventsResponse.mjs → businessMessaging/client/requests/SearchBusinessConversationsRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{customer/resources/businesses/resources/events/types/RsvpEventsResponse.mjs → businessMessaging/types/SearchBusinessConversationsResponse.mjs} +0 -0
- /package/dist/esm/api/resources/customer/resources/businesses/{types/FavoriteBusinessesResponse.mjs → resources/bulletins/resources/comments/client/requests/CreateCommentsRequest.mjs} +0 -0
- /package/dist/esm/api/resources/customer/resources/businesses/{types/ListTemporaryLocationsBusinessesResponse.mjs → resources/bulletins/resources/comments/client/requests/ReplyCommentsRequest.mjs} +0 -0
- /package/dist/esm/api/resources/customer/resources/businesses/{types/MenusBusinessesResponse.mjs → resources/events/client/requests/RsvpEventsRequest.mjs} +0 -0
- /package/dist/esm/api/resources/customer/resources/{businesses/types/PhotosBusinessesResponse.mjs → cart/client/requests/ClearCartRequest.mjs} +0 -0
- /package/dist/esm/api/resources/customer/resources/{businesses/types/ProfileBusinessesResponse.mjs → cart/client/requests/GetCartRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{customer/resources/businesses/resources/bulletins/resources/comments → customerBusinesses}/client/requests/AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest.d.mts +0 -0
- /package/dist/esm/api/resources/{customer/resources/shop/types/GetProductShopResponse.mjs → customerBusinesses/client/requests/AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{customer/resources/shop/types/ListCategoriesShopResponse.mjs → customerBusinesses/client/requests/BusinessesEventShowRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{customer/resources/shop/types/ListProductsShopResponse.mjs → customerBusinesses/client/requests/DestroyEventRsvpRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{customer/resources/businesses/resources/bulletins/resources/comments → customerBusinesses}/client/requests/StoreBulletinCommentReplyRequest.d.mts +0 -0
- /package/dist/esm/api/resources/{customer/resources/businesses/resources/events → customerBusinesses}/client/requests/StoreEventRsvpRequest.d.mts +0 -0
- /package/dist/esm/api/resources/{customer/resources/businesses/resources/events → customerBusinesses}/client/requests/StoreEventRsvpRequest.mjs +0 -0
|
@@ -0,0 +1,945 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
12
|
+
var t = {};
|
|
13
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
+
t[p] = s[p];
|
|
15
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
+
t[p[i]] = s[p[i]];
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
21
|
+
};
|
|
22
|
+
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
23
|
+
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
24
|
+
import * as core from "../../../../core/index.mjs";
|
|
25
|
+
import * as environments from "../../../../environments.mjs";
|
|
26
|
+
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
27
|
+
import * as errors from "../../../../errors/index.mjs";
|
|
28
|
+
import * as FiveOneEat from "../../../index.mjs";
|
|
29
|
+
export class CustomerBusinessesClient {
|
|
30
|
+
constructor(options = {}) {
|
|
31
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Retrieve core business information for the profile page.
|
|
35
|
+
*
|
|
36
|
+
* @param {FiveOneEat.ProfileShowRequest} request
|
|
37
|
+
* @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
|
+
*
|
|
39
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* await client.customerBusinesses.profileShow({
|
|
43
|
+
* handle: "katzs-deli"
|
|
44
|
+
* })
|
|
45
|
+
*/
|
|
46
|
+
profileShow(request, requestOptions) {
|
|
47
|
+
return core.HttpResponsePromise.fromPromise(this.__profileShow(request, requestOptions));
|
|
48
|
+
}
|
|
49
|
+
__profileShow(request, requestOptions) {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
52
|
+
const { handle } = request;
|
|
53
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
54
|
+
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);
|
|
55
|
+
const _response = yield core.fetcher({
|
|
56
|
+
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/businesses/${core.url.encodePathParam(handle)}`),
|
|
57
|
+
method: "GET",
|
|
58
|
+
headers: _headers,
|
|
59
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
60
|
+
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,
|
|
61
|
+
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,
|
|
62
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
63
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
64
|
+
logging: this._options.logging,
|
|
65
|
+
});
|
|
66
|
+
if (_response.ok) {
|
|
67
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
68
|
+
}
|
|
69
|
+
if (_response.error.reason === "status-code") {
|
|
70
|
+
switch (_response.error.statusCode) {
|
|
71
|
+
case 401:
|
|
72
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
73
|
+
default:
|
|
74
|
+
throw new errors.FiveOneEatError({
|
|
75
|
+
statusCode: _response.error.statusCode,
|
|
76
|
+
body: _response.error.body,
|
|
77
|
+
rawResponse: _response.rawResponse,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{handle}");
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Retrieve all menus organized by groups for the business.
|
|
86
|
+
*
|
|
87
|
+
* @param {FiveOneEat.GetBusinessMenusRequest} request
|
|
88
|
+
* @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
89
|
+
*
|
|
90
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
91
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* await client.customerBusinesses.getBusinessMenus({
|
|
95
|
+
* handle: "katzs-deli"
|
|
96
|
+
* })
|
|
97
|
+
*/
|
|
98
|
+
getBusinessMenus(request, requestOptions) {
|
|
99
|
+
return core.HttpResponsePromise.fromPromise(this.__getBusinessMenus(request, requestOptions));
|
|
100
|
+
}
|
|
101
|
+
__getBusinessMenus(request, requestOptions) {
|
|
102
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
103
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
104
|
+
const { handle, page, per_page: perPage } = request;
|
|
105
|
+
const _queryParams = {
|
|
106
|
+
page,
|
|
107
|
+
per_page: perPage,
|
|
108
|
+
};
|
|
109
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
110
|
+
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);
|
|
111
|
+
const _response = yield core.fetcher({
|
|
112
|
+
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/businesses/${core.url.encodePathParam(handle)}/menus`),
|
|
113
|
+
method: "GET",
|
|
114
|
+
headers: _headers,
|
|
115
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
116
|
+
queryString: core.url
|
|
117
|
+
.queryBuilder()
|
|
118
|
+
.addMany(_queryParams)
|
|
119
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
120
|
+
.build(),
|
|
121
|
+
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,
|
|
122
|
+
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,
|
|
123
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
124
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
125
|
+
logging: this._options.logging,
|
|
126
|
+
});
|
|
127
|
+
if (_response.ok) {
|
|
128
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
129
|
+
}
|
|
130
|
+
if (_response.error.reason === "status-code") {
|
|
131
|
+
switch (_response.error.statusCode) {
|
|
132
|
+
case 401:
|
|
133
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
134
|
+
case 422:
|
|
135
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
136
|
+
default:
|
|
137
|
+
throw new errors.FiveOneEatError({
|
|
138
|
+
statusCode: _response.error.statusCode,
|
|
139
|
+
body: _response.error.body,
|
|
140
|
+
rawResponse: _response.rawResponse,
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{handle}/menus");
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Retrieve photo gallery for the business with pagination.
|
|
149
|
+
*
|
|
150
|
+
* @param {FiveOneEat.GetBusinessPhotosRequest} request
|
|
151
|
+
* @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
152
|
+
*
|
|
153
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
154
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* await client.customerBusinesses.getBusinessPhotos({
|
|
158
|
+
* handle: "katzs-deli"
|
|
159
|
+
* })
|
|
160
|
+
*/
|
|
161
|
+
getBusinessPhotos(request, requestOptions) {
|
|
162
|
+
return core.HttpResponsePromise.fromPromise(this.__getBusinessPhotos(request, requestOptions));
|
|
163
|
+
}
|
|
164
|
+
__getBusinessPhotos(request, requestOptions) {
|
|
165
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
166
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
167
|
+
const { handle, page, per_page: perPage } = request;
|
|
168
|
+
const _queryParams = {
|
|
169
|
+
page,
|
|
170
|
+
per_page: perPage,
|
|
171
|
+
};
|
|
172
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
173
|
+
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);
|
|
174
|
+
const _response = yield core.fetcher({
|
|
175
|
+
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/businesses/${core.url.encodePathParam(handle)}/photos`),
|
|
176
|
+
method: "GET",
|
|
177
|
+
headers: _headers,
|
|
178
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
179
|
+
queryString: core.url
|
|
180
|
+
.queryBuilder()
|
|
181
|
+
.addMany(_queryParams)
|
|
182
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
183
|
+
.build(),
|
|
184
|
+
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,
|
|
185
|
+
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,
|
|
186
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
187
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
188
|
+
logging: this._options.logging,
|
|
189
|
+
});
|
|
190
|
+
if (_response.ok) {
|
|
191
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
192
|
+
}
|
|
193
|
+
if (_response.error.reason === "status-code") {
|
|
194
|
+
switch (_response.error.statusCode) {
|
|
195
|
+
case 401:
|
|
196
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
197
|
+
case 422:
|
|
198
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
199
|
+
default:
|
|
200
|
+
throw new errors.FiveOneEatError({
|
|
201
|
+
statusCode: _response.error.statusCode,
|
|
202
|
+
body: _response.error.body,
|
|
203
|
+
rawResponse: _response.rawResponse,
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{handle}/photos");
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Retrieve business announcements and updates with pagination.
|
|
212
|
+
*
|
|
213
|
+
* @param {FiveOneEat.GetBusinessBulletinsRequest} request
|
|
214
|
+
* @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
215
|
+
*
|
|
216
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
217
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
218
|
+
*
|
|
219
|
+
* @example
|
|
220
|
+
* await client.customerBusinesses.getBusinessBulletins({
|
|
221
|
+
* handle: "katzs-deli"
|
|
222
|
+
* })
|
|
223
|
+
*/
|
|
224
|
+
getBusinessBulletins(request, requestOptions) {
|
|
225
|
+
return core.HttpResponsePromise.fromPromise(this.__getBusinessBulletins(request, requestOptions));
|
|
226
|
+
}
|
|
227
|
+
__getBusinessBulletins(request, requestOptions) {
|
|
228
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
229
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
230
|
+
const { handle, page, per_page: perPage } = request;
|
|
231
|
+
const _queryParams = {
|
|
232
|
+
page,
|
|
233
|
+
per_page: perPage,
|
|
234
|
+
};
|
|
235
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
236
|
+
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);
|
|
237
|
+
const _response = yield core.fetcher({
|
|
238
|
+
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/businesses/${core.url.encodePathParam(handle)}/bulletins`),
|
|
239
|
+
method: "GET",
|
|
240
|
+
headers: _headers,
|
|
241
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
242
|
+
queryString: core.url
|
|
243
|
+
.queryBuilder()
|
|
244
|
+
.addMany(_queryParams)
|
|
245
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
246
|
+
.build(),
|
|
247
|
+
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,
|
|
248
|
+
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,
|
|
249
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
250
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
251
|
+
logging: this._options.logging,
|
|
252
|
+
});
|
|
253
|
+
if (_response.ok) {
|
|
254
|
+
return {
|
|
255
|
+
data: _response.body,
|
|
256
|
+
rawResponse: _response.rawResponse,
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
if (_response.error.reason === "status-code") {
|
|
260
|
+
switch (_response.error.statusCode) {
|
|
261
|
+
case 401:
|
|
262
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
263
|
+
case 422:
|
|
264
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
265
|
+
default:
|
|
266
|
+
throw new errors.FiveOneEatError({
|
|
267
|
+
statusCode: _response.error.statusCode,
|
|
268
|
+
body: _response.error.body,
|
|
269
|
+
rawResponse: _response.rawResponse,
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{handle}/bulletins");
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Retrieve paginated comments for a published business bulletin.
|
|
278
|
+
*
|
|
279
|
+
* @param {FiveOneEat.GetBulletinCommentsRequest} request
|
|
280
|
+
* @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
281
|
+
*
|
|
282
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
283
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
284
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
285
|
+
*
|
|
286
|
+
* @example
|
|
287
|
+
* await client.customerBusinesses.getBulletinComments({
|
|
288
|
+
* handle: "katzs-deli",
|
|
289
|
+
* bulletin: "01950e7d-1234-7000-abcd-ef0123456789"
|
|
290
|
+
* })
|
|
291
|
+
*/
|
|
292
|
+
getBulletinComments(request, requestOptions) {
|
|
293
|
+
return core.HttpResponsePromise.fromPromise(this.__getBulletinComments(request, requestOptions));
|
|
294
|
+
}
|
|
295
|
+
__getBulletinComments(request, requestOptions) {
|
|
296
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
297
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
298
|
+
const { handle, bulletin, page, per_page: perPage } = request;
|
|
299
|
+
const _queryParams = {
|
|
300
|
+
page,
|
|
301
|
+
per_page: perPage,
|
|
302
|
+
};
|
|
303
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
304
|
+
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);
|
|
305
|
+
const _response = yield core.fetcher({
|
|
306
|
+
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/businesses/${core.url.encodePathParam(handle)}/bulletins/${core.url.encodePathParam(bulletin)}/comments`),
|
|
307
|
+
method: "GET",
|
|
308
|
+
headers: _headers,
|
|
309
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
310
|
+
queryString: core.url
|
|
311
|
+
.queryBuilder()
|
|
312
|
+
.addMany(_queryParams)
|
|
313
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
314
|
+
.build(),
|
|
315
|
+
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,
|
|
316
|
+
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,
|
|
317
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
318
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
319
|
+
logging: this._options.logging,
|
|
320
|
+
});
|
|
321
|
+
if (_response.ok) {
|
|
322
|
+
return {
|
|
323
|
+
data: _response.body,
|
|
324
|
+
rawResponse: _response.rawResponse,
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
if (_response.error.reason === "status-code") {
|
|
328
|
+
switch (_response.error.statusCode) {
|
|
329
|
+
case 401:
|
|
330
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
331
|
+
case 404:
|
|
332
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
333
|
+
case 422:
|
|
334
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
335
|
+
default:
|
|
336
|
+
throw new errors.FiveOneEatError({
|
|
337
|
+
statusCode: _response.error.statusCode,
|
|
338
|
+
body: _response.error.body,
|
|
339
|
+
rawResponse: _response.rawResponse,
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{handle}/bulletins/{bulletin}/comments");
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Post a comment on a business bulletin. Requires authentication.
|
|
348
|
+
*
|
|
349
|
+
* @param {FiveOneEat.AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest} request
|
|
350
|
+
* @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
351
|
+
*
|
|
352
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
353
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
354
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
355
|
+
*
|
|
356
|
+
* @example
|
|
357
|
+
* await client.customerBusinesses.createBulletinComment({
|
|
358
|
+
* handle: "katzs-deli",
|
|
359
|
+
* bulletin: "01950e7d-1234-7000-abcd-ef0123456789",
|
|
360
|
+
* body: "body"
|
|
361
|
+
* })
|
|
362
|
+
*/
|
|
363
|
+
createBulletinComment(request, requestOptions) {
|
|
364
|
+
return core.HttpResponsePromise.fromPromise(this.__createBulletinComment(request, requestOptions));
|
|
365
|
+
}
|
|
366
|
+
__createBulletinComment(request, requestOptions) {
|
|
367
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
368
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
369
|
+
const { handle, bulletin } = request, _body = __rest(request, ["handle", "bulletin"]);
|
|
370
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
371
|
+
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);
|
|
372
|
+
const _response = yield core.fetcher({
|
|
373
|
+
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/businesses/${core.url.encodePathParam(handle)}/bulletins/${core.url.encodePathParam(bulletin)}/comments`),
|
|
374
|
+
method: "POST",
|
|
375
|
+
headers: _headers,
|
|
376
|
+
contentType: "application/json",
|
|
377
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
378
|
+
requestType: "json",
|
|
379
|
+
body: _body,
|
|
380
|
+
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,
|
|
381
|
+
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,
|
|
382
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
383
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
384
|
+
logging: this._options.logging,
|
|
385
|
+
});
|
|
386
|
+
if (_response.ok) {
|
|
387
|
+
return {
|
|
388
|
+
data: _response.body,
|
|
389
|
+
rawResponse: _response.rawResponse,
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
if (_response.error.reason === "status-code") {
|
|
393
|
+
switch (_response.error.statusCode) {
|
|
394
|
+
case 401:
|
|
395
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
396
|
+
case 404:
|
|
397
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
398
|
+
case 422:
|
|
399
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
400
|
+
default:
|
|
401
|
+
throw new errors.FiveOneEatError({
|
|
402
|
+
statusCode: _response.error.statusCode,
|
|
403
|
+
body: _response.error.body,
|
|
404
|
+
rawResponse: _response.rawResponse,
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/customer/businesses/{handle}/bulletins/{bulletin}/comments");
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* Retrieve paginated replies for a top-level comment on a published bulletin.
|
|
413
|
+
*
|
|
414
|
+
* @param {FiveOneEat.GetBulletinCommentRepliesRequest} request
|
|
415
|
+
* @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
416
|
+
*
|
|
417
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
418
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
419
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
420
|
+
*
|
|
421
|
+
* @example
|
|
422
|
+
* await client.customerBusinesses.getBulletinCommentReplies({
|
|
423
|
+
* handle: "katzs-deli",
|
|
424
|
+
* bulletin: "01950e7d-1234-7000-abcd-ef0123456789",
|
|
425
|
+
* comment: "01950e7d-5678-7000-abcd-ef0123456789"
|
|
426
|
+
* })
|
|
427
|
+
*/
|
|
428
|
+
getBulletinCommentReplies(request, requestOptions) {
|
|
429
|
+
return core.HttpResponsePromise.fromPromise(this.__getBulletinCommentReplies(request, requestOptions));
|
|
430
|
+
}
|
|
431
|
+
__getBulletinCommentReplies(request, requestOptions) {
|
|
432
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
433
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
434
|
+
const { handle, bulletin, comment, page, per_page: perPage } = request;
|
|
435
|
+
const _queryParams = {
|
|
436
|
+
page,
|
|
437
|
+
per_page: perPage,
|
|
438
|
+
};
|
|
439
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
440
|
+
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);
|
|
441
|
+
const _response = yield core.fetcher({
|
|
442
|
+
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/businesses/${core.url.encodePathParam(handle)}/bulletins/${core.url.encodePathParam(bulletin)}/comments/${core.url.encodePathParam(comment)}/replies`),
|
|
443
|
+
method: "GET",
|
|
444
|
+
headers: _headers,
|
|
445
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
446
|
+
queryString: core.url
|
|
447
|
+
.queryBuilder()
|
|
448
|
+
.addMany(_queryParams)
|
|
449
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
450
|
+
.build(),
|
|
451
|
+
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,
|
|
452
|
+
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,
|
|
453
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
454
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
455
|
+
logging: this._options.logging,
|
|
456
|
+
});
|
|
457
|
+
if (_response.ok) {
|
|
458
|
+
return {
|
|
459
|
+
data: _response.body,
|
|
460
|
+
rawResponse: _response.rawResponse,
|
|
461
|
+
};
|
|
462
|
+
}
|
|
463
|
+
if (_response.error.reason === "status-code") {
|
|
464
|
+
switch (_response.error.statusCode) {
|
|
465
|
+
case 401:
|
|
466
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
467
|
+
case 404:
|
|
468
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
469
|
+
case 422:
|
|
470
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
471
|
+
default:
|
|
472
|
+
throw new errors.FiveOneEatError({
|
|
473
|
+
statusCode: _response.error.statusCode,
|
|
474
|
+
body: _response.error.body,
|
|
475
|
+
rawResponse: _response.rawResponse,
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{handle}/bulletins/{bulletin}/comments/{comment}/replies");
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* Post a reply to a top-level comment on a published bulletin. Requires authentication.
|
|
484
|
+
*
|
|
485
|
+
* @param {FiveOneEat.StoreBulletinCommentReplyRequest} request
|
|
486
|
+
* @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
487
|
+
*
|
|
488
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
489
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
490
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
491
|
+
*
|
|
492
|
+
* @example
|
|
493
|
+
* await client.customerBusinesses.replyToBulletinComment({
|
|
494
|
+
* handle: "katzs-deli",
|
|
495
|
+
* bulletin: "01950e7d-1234-7000-abcd-ef0123456789",
|
|
496
|
+
* comment: "01950e7d-5678-7000-abcd-ef0123456789",
|
|
497
|
+
* body: "body"
|
|
498
|
+
* })
|
|
499
|
+
*/
|
|
500
|
+
replyToBulletinComment(request, requestOptions) {
|
|
501
|
+
return core.HttpResponsePromise.fromPromise(this.__replyToBulletinComment(request, requestOptions));
|
|
502
|
+
}
|
|
503
|
+
__replyToBulletinComment(request, requestOptions) {
|
|
504
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
505
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
506
|
+
const { handle, bulletin, comment } = request, _body = __rest(request, ["handle", "bulletin", "comment"]);
|
|
507
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
508
|
+
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);
|
|
509
|
+
const _response = yield core.fetcher({
|
|
510
|
+
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/businesses/${core.url.encodePathParam(handle)}/bulletins/${core.url.encodePathParam(bulletin)}/comments/${core.url.encodePathParam(comment)}/replies`),
|
|
511
|
+
method: "POST",
|
|
512
|
+
headers: _headers,
|
|
513
|
+
contentType: "application/json",
|
|
514
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
515
|
+
requestType: "json",
|
|
516
|
+
body: _body,
|
|
517
|
+
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,
|
|
518
|
+
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,
|
|
519
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
520
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
521
|
+
logging: this._options.logging,
|
|
522
|
+
});
|
|
523
|
+
if (_response.ok) {
|
|
524
|
+
return {
|
|
525
|
+
data: _response.body,
|
|
526
|
+
rawResponse: _response.rawResponse,
|
|
527
|
+
};
|
|
528
|
+
}
|
|
529
|
+
if (_response.error.reason === "status-code") {
|
|
530
|
+
switch (_response.error.statusCode) {
|
|
531
|
+
case 401:
|
|
532
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
533
|
+
case 404:
|
|
534
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
535
|
+
case 422:
|
|
536
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
537
|
+
default:
|
|
538
|
+
throw new errors.FiveOneEatError({
|
|
539
|
+
statusCode: _response.error.statusCode,
|
|
540
|
+
body: _response.error.body,
|
|
541
|
+
rawResponse: _response.rawResponse,
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/customer/businesses/{handle}/bulletins/{bulletin}/comments/{comment}/replies");
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Add a business to the authenticated user's favorites.
|
|
550
|
+
*
|
|
551
|
+
* @param {FiveOneEat.FavoritesBusinessRequest} request
|
|
552
|
+
* @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
553
|
+
*
|
|
554
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
555
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
556
|
+
* @throws {@link FiveOneEat.ConflictError}
|
|
557
|
+
*
|
|
558
|
+
* @example
|
|
559
|
+
* await client.customerBusinesses.favoritesBusiness({
|
|
560
|
+
* handle: "katzs-deli"
|
|
561
|
+
* })
|
|
562
|
+
*/
|
|
563
|
+
favoritesBusiness(request, requestOptions) {
|
|
564
|
+
return core.HttpResponsePromise.fromPromise(this.__favoritesBusiness(request, requestOptions));
|
|
565
|
+
}
|
|
566
|
+
__favoritesBusiness(request, requestOptions) {
|
|
567
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
568
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
569
|
+
const { handle } = request;
|
|
570
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
571
|
+
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);
|
|
572
|
+
const _response = yield core.fetcher({
|
|
573
|
+
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/businesses/${core.url.encodePathParam(handle)}/favorite`),
|
|
574
|
+
method: "POST",
|
|
575
|
+
headers: _headers,
|
|
576
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
577
|
+
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,
|
|
578
|
+
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,
|
|
579
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
580
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
581
|
+
logging: this._options.logging,
|
|
582
|
+
});
|
|
583
|
+
if (_response.ok) {
|
|
584
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
585
|
+
}
|
|
586
|
+
if (_response.error.reason === "status-code") {
|
|
587
|
+
switch (_response.error.statusCode) {
|
|
588
|
+
case 401:
|
|
589
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
590
|
+
case 404:
|
|
591
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
592
|
+
case 409:
|
|
593
|
+
throw new FiveOneEat.ConflictError(_response.error.body, _response.rawResponse);
|
|
594
|
+
default:
|
|
595
|
+
throw new errors.FiveOneEatError({
|
|
596
|
+
statusCode: _response.error.statusCode,
|
|
597
|
+
body: _response.error.body,
|
|
598
|
+
rawResponse: _response.rawResponse,
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/customer/businesses/{handle}/favorite");
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
/**
|
|
606
|
+
* Remove a business from the authenticated user's favorites.
|
|
607
|
+
*
|
|
608
|
+
* @param {FiveOneEat.UnfavoritesBusinessRequest} request
|
|
609
|
+
* @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
610
|
+
*
|
|
611
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
612
|
+
*
|
|
613
|
+
* @example
|
|
614
|
+
* await client.customerBusinesses.unfavoritesBusiness({
|
|
615
|
+
* handle: "katzs-deli"
|
|
616
|
+
* })
|
|
617
|
+
*/
|
|
618
|
+
unfavoritesBusiness(request, requestOptions) {
|
|
619
|
+
return core.HttpResponsePromise.fromPromise(this.__unfavoritesBusiness(request, requestOptions));
|
|
620
|
+
}
|
|
621
|
+
__unfavoritesBusiness(request, requestOptions) {
|
|
622
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
623
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
624
|
+
const { handle } = request;
|
|
625
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
626
|
+
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);
|
|
627
|
+
const _response = yield core.fetcher({
|
|
628
|
+
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/businesses/${core.url.encodePathParam(handle)}/favorite`),
|
|
629
|
+
method: "DELETE",
|
|
630
|
+
headers: _headers,
|
|
631
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
632
|
+
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,
|
|
633
|
+
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,
|
|
634
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
635
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
636
|
+
logging: this._options.logging,
|
|
637
|
+
});
|
|
638
|
+
if (_response.ok) {
|
|
639
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
640
|
+
}
|
|
641
|
+
if (_response.error.reason === "status-code") {
|
|
642
|
+
switch (_response.error.statusCode) {
|
|
643
|
+
case 401:
|
|
644
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
645
|
+
default:
|
|
646
|
+
throw new errors.FiveOneEatError({
|
|
647
|
+
statusCode: _response.error.statusCode,
|
|
648
|
+
body: _response.error.body,
|
|
649
|
+
rawResponse: _response.rawResponse,
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/customer/businesses/{handle}/favorite");
|
|
654
|
+
});
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* Retrieve upcoming events for the business with pagination.
|
|
658
|
+
*
|
|
659
|
+
* @param {FiveOneEat.GetBusinessEventsRequest} request
|
|
660
|
+
* @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
661
|
+
*
|
|
662
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
663
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
664
|
+
*
|
|
665
|
+
* @example
|
|
666
|
+
* await client.customerBusinesses.getBusinessEvents({
|
|
667
|
+
* handle: "katzs-deli"
|
|
668
|
+
* })
|
|
669
|
+
*/
|
|
670
|
+
getBusinessEvents(request, requestOptions) {
|
|
671
|
+
return core.HttpResponsePromise.fromPromise(this.__getBusinessEvents(request, requestOptions));
|
|
672
|
+
}
|
|
673
|
+
__getBusinessEvents(request, requestOptions) {
|
|
674
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
675
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
676
|
+
const { handle, page, per_page: perPage } = request;
|
|
677
|
+
const _queryParams = {
|
|
678
|
+
page,
|
|
679
|
+
per_page: perPage,
|
|
680
|
+
};
|
|
681
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
682
|
+
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);
|
|
683
|
+
const _response = yield core.fetcher({
|
|
684
|
+
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/businesses/${core.url.encodePathParam(handle)}/events`),
|
|
685
|
+
method: "GET",
|
|
686
|
+
headers: _headers,
|
|
687
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
688
|
+
queryString: core.url
|
|
689
|
+
.queryBuilder()
|
|
690
|
+
.addMany(_queryParams)
|
|
691
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
692
|
+
.build(),
|
|
693
|
+
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,
|
|
694
|
+
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,
|
|
695
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
696
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
697
|
+
logging: this._options.logging,
|
|
698
|
+
});
|
|
699
|
+
if (_response.ok) {
|
|
700
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
701
|
+
}
|
|
702
|
+
if (_response.error.reason === "status-code") {
|
|
703
|
+
switch (_response.error.statusCode) {
|
|
704
|
+
case 401:
|
|
705
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
706
|
+
case 422:
|
|
707
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
708
|
+
default:
|
|
709
|
+
throw new errors.FiveOneEatError({
|
|
710
|
+
statusCode: _response.error.statusCode,
|
|
711
|
+
body: _response.error.body,
|
|
712
|
+
rawResponse: _response.rawResponse,
|
|
713
|
+
});
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{handle}/events");
|
|
717
|
+
});
|
|
718
|
+
}
|
|
719
|
+
/**
|
|
720
|
+
* Retrieve full details for a single upcoming event belonging to the business.
|
|
721
|
+
*
|
|
722
|
+
* @param {FiveOneEat.BusinessesEventShowRequest} request
|
|
723
|
+
* @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
724
|
+
*
|
|
725
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
726
|
+
*
|
|
727
|
+
* @example
|
|
728
|
+
* await client.customerBusinesses.businessesEventShow({
|
|
729
|
+
* handle: "katzs-deli",
|
|
730
|
+
* event: "event"
|
|
731
|
+
* })
|
|
732
|
+
*/
|
|
733
|
+
businessesEventShow(request, requestOptions) {
|
|
734
|
+
return core.HttpResponsePromise.fromPromise(this.__businessesEventShow(request, requestOptions));
|
|
735
|
+
}
|
|
736
|
+
__businessesEventShow(request, requestOptions) {
|
|
737
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
738
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
739
|
+
const { handle, event } = request;
|
|
740
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
741
|
+
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);
|
|
742
|
+
const _response = yield core.fetcher({
|
|
743
|
+
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/businesses/${core.url.encodePathParam(handle)}/events/${core.url.encodePathParam(event)}`),
|
|
744
|
+
method: "GET",
|
|
745
|
+
headers: _headers,
|
|
746
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
747
|
+
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,
|
|
748
|
+
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,
|
|
749
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
750
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
751
|
+
logging: this._options.logging,
|
|
752
|
+
});
|
|
753
|
+
if (_response.ok) {
|
|
754
|
+
return {
|
|
755
|
+
data: _response.body,
|
|
756
|
+
rawResponse: _response.rawResponse,
|
|
757
|
+
};
|
|
758
|
+
}
|
|
759
|
+
if (_response.error.reason === "status-code") {
|
|
760
|
+
switch (_response.error.statusCode) {
|
|
761
|
+
case 401:
|
|
762
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
763
|
+
default:
|
|
764
|
+
throw new errors.FiveOneEatError({
|
|
765
|
+
statusCode: _response.error.statusCode,
|
|
766
|
+
body: _response.error.body,
|
|
767
|
+
rawResponse: _response.rawResponse,
|
|
768
|
+
});
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{handle}/events/{event}");
|
|
772
|
+
});
|
|
773
|
+
}
|
|
774
|
+
/**
|
|
775
|
+
* Create or update the authenticated user's RSVP for a business event.
|
|
776
|
+
*
|
|
777
|
+
* @param {FiveOneEat.StoreEventRsvpRequest} request
|
|
778
|
+
* @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
779
|
+
*
|
|
780
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
781
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
782
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
783
|
+
*
|
|
784
|
+
* @example
|
|
785
|
+
* await client.customerBusinesses.storeEventRsvp({
|
|
786
|
+
* handle: "katzs-deli",
|
|
787
|
+
* event: "01950e7d-1234-7000-abcd-ef0123456789",
|
|
788
|
+
* status: "attending"
|
|
789
|
+
* })
|
|
790
|
+
*/
|
|
791
|
+
storeEventRsvp(request, requestOptions) {
|
|
792
|
+
return core.HttpResponsePromise.fromPromise(this.__storeEventRsvp(request, requestOptions));
|
|
793
|
+
}
|
|
794
|
+
__storeEventRsvp(request, requestOptions) {
|
|
795
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
796
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
797
|
+
const { handle, event } = request, _body = __rest(request, ["handle", "event"]);
|
|
798
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
799
|
+
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);
|
|
800
|
+
const _response = yield core.fetcher({
|
|
801
|
+
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/businesses/${core.url.encodePathParam(handle)}/events/${core.url.encodePathParam(event)}/rsvp`),
|
|
802
|
+
method: "POST",
|
|
803
|
+
headers: _headers,
|
|
804
|
+
contentType: "application/json",
|
|
805
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
806
|
+
requestType: "json",
|
|
807
|
+
body: _body,
|
|
808
|
+
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,
|
|
809
|
+
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,
|
|
810
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
811
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
812
|
+
logging: this._options.logging,
|
|
813
|
+
});
|
|
814
|
+
if (_response.ok) {
|
|
815
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
816
|
+
}
|
|
817
|
+
if (_response.error.reason === "status-code") {
|
|
818
|
+
switch (_response.error.statusCode) {
|
|
819
|
+
case 401:
|
|
820
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
821
|
+
case 404:
|
|
822
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
823
|
+
case 422:
|
|
824
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
825
|
+
default:
|
|
826
|
+
throw new errors.FiveOneEatError({
|
|
827
|
+
statusCode: _response.error.statusCode,
|
|
828
|
+
body: _response.error.body,
|
|
829
|
+
rawResponse: _response.rawResponse,
|
|
830
|
+
});
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/customer/businesses/{handle}/events/{event}/rsvp");
|
|
834
|
+
});
|
|
835
|
+
}
|
|
836
|
+
/**
|
|
837
|
+
* Cancel the authenticated user's RSVP for a business event.
|
|
838
|
+
*
|
|
839
|
+
* @param {FiveOneEat.DestroyEventRsvpRequest} request
|
|
840
|
+
* @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
841
|
+
*
|
|
842
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
843
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
844
|
+
*
|
|
845
|
+
* @example
|
|
846
|
+
* await client.customerBusinesses.destroyEventRsvp({
|
|
847
|
+
* handle: "katzs-deli",
|
|
848
|
+
* event: "01950e7d-1234-7000-abcd-ef0123456789"
|
|
849
|
+
* })
|
|
850
|
+
*/
|
|
851
|
+
destroyEventRsvp(request, requestOptions) {
|
|
852
|
+
return core.HttpResponsePromise.fromPromise(this.__destroyEventRsvp(request, requestOptions));
|
|
853
|
+
}
|
|
854
|
+
__destroyEventRsvp(request, requestOptions) {
|
|
855
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
856
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
857
|
+
const { handle, event } = request;
|
|
858
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
859
|
+
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);
|
|
860
|
+
const _response = yield core.fetcher({
|
|
861
|
+
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/businesses/${core.url.encodePathParam(handle)}/events/${core.url.encodePathParam(event)}/rsvp`),
|
|
862
|
+
method: "DELETE",
|
|
863
|
+
headers: _headers,
|
|
864
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
865
|
+
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,
|
|
866
|
+
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,
|
|
867
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
868
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
869
|
+
logging: this._options.logging,
|
|
870
|
+
});
|
|
871
|
+
if (_response.ok) {
|
|
872
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
873
|
+
}
|
|
874
|
+
if (_response.error.reason === "status-code") {
|
|
875
|
+
switch (_response.error.statusCode) {
|
|
876
|
+
case 401:
|
|
877
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
878
|
+
case 404:
|
|
879
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
880
|
+
default:
|
|
881
|
+
throw new errors.FiveOneEatError({
|
|
882
|
+
statusCode: _response.error.statusCode,
|
|
883
|
+
body: _response.error.body,
|
|
884
|
+
rawResponse: _response.rawResponse,
|
|
885
|
+
});
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/customer/businesses/{handle}/events/{event}/rsvp");
|
|
889
|
+
});
|
|
890
|
+
}
|
|
891
|
+
/**
|
|
892
|
+
* Retrieve active and upcoming temporary locations for a business.
|
|
893
|
+
*
|
|
894
|
+
* @param {FiveOneEat.GetBusinessTemporaryLocationsRequest} request
|
|
895
|
+
* @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
896
|
+
*
|
|
897
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
898
|
+
*
|
|
899
|
+
* @example
|
|
900
|
+
* await client.customerBusinesses.getBusinessTemporaryLocations({
|
|
901
|
+
* handle: "katzs-deli"
|
|
902
|
+
* })
|
|
903
|
+
*/
|
|
904
|
+
getBusinessTemporaryLocations(request, requestOptions) {
|
|
905
|
+
return core.HttpResponsePromise.fromPromise(this.__getBusinessTemporaryLocations(request, requestOptions));
|
|
906
|
+
}
|
|
907
|
+
__getBusinessTemporaryLocations(request, requestOptions) {
|
|
908
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
909
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
910
|
+
const { handle } = request;
|
|
911
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
912
|
+
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);
|
|
913
|
+
const _response = yield core.fetcher({
|
|
914
|
+
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/businesses/${core.url.encodePathParam(handle)}/temporary-locations`),
|
|
915
|
+
method: "GET",
|
|
916
|
+
headers: _headers,
|
|
917
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
918
|
+
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,
|
|
919
|
+
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,
|
|
920
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
921
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
922
|
+
logging: this._options.logging,
|
|
923
|
+
});
|
|
924
|
+
if (_response.ok) {
|
|
925
|
+
return {
|
|
926
|
+
data: _response.body,
|
|
927
|
+
rawResponse: _response.rawResponse,
|
|
928
|
+
};
|
|
929
|
+
}
|
|
930
|
+
if (_response.error.reason === "status-code") {
|
|
931
|
+
switch (_response.error.statusCode) {
|
|
932
|
+
case 401:
|
|
933
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
934
|
+
default:
|
|
935
|
+
throw new errors.FiveOneEatError({
|
|
936
|
+
statusCode: _response.error.statusCode,
|
|
937
|
+
body: _response.error.body,
|
|
938
|
+
rawResponse: _response.rawResponse,
|
|
939
|
+
});
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{handle}/temporary-locations");
|
|
943
|
+
});
|
|
944
|
+
}
|
|
945
|
+
}
|