@51eat/sdk 0.0.43 → 0.0.44
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 +9 -11
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +0 -6
- package/dist/cjs/Client.js +8 -18
- 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 +41 -13
- package/dist/cjs/api/resources/customer/resources/businesses/client/Client.js +146 -46
- package/dist/cjs/api/resources/customer/resources/businesses/client/requests/FavoriteBusinessesRequest.d.ts +2 -1
- package/dist/cjs/api/resources/customer/resources/businesses/client/requests/ListTemporaryLocationsBusinessesRequest.d.ts +2 -1
- package/dist/cjs/api/resources/customer/resources/businesses/client/requests/MenusBusinessesRequest.d.ts +6 -1
- package/dist/cjs/api/resources/customer/resources/businesses/client/requests/PhotosBusinessesRequest.d.ts +6 -1
- package/dist/cjs/api/resources/customer/resources/businesses/client/requests/ProfileBusinessesRequest.d.ts +2 -1
- package/dist/cjs/api/resources/customer/resources/businesses/client/requests/UnfavoriteBusinessesRequest.d.ts +2 -1
- package/dist/cjs/api/resources/customer/resources/businesses/index.d.ts +1 -0
- package/dist/cjs/api/resources/customer/resources/businesses/index.js +1 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/client/Client.d.ts +8 -3
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/client/Client.js +34 -9
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/client/requests/ListBulletinsRequest.d.ts +6 -1
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/index.d.ts +1 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/index.js +1 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.d.ts +43 -17
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.js +152 -42
- package/dist/cjs/api/resources/{customerBusinesses → customer/resources/businesses/resources/bulletins/resources/comments}/client/requests/AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest.d.ts +2 -2
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ListCommentsRequest.d.ts +8 -2
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ListRepliesCommentsRequest.d.ts +10 -3
- package/dist/cjs/api/resources/{customerBusinesses → customer/resources/businesses/resources/bulletins/resources/comments}/client/requests/StoreBulletinCommentReplyRequest.d.ts +2 -2
- 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 +1 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/index.js +1 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/CreateCommentsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ListCommentsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ListRepliesCommentsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ReplyCommentsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/index.d.ts +4 -0
- package/dist/cjs/api/resources/{customerShop → customer/resources/businesses/resources/bulletins/resources/comments/types}/index.js +4 -2
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/index.d.ts +1 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/index.js +1 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/types/ListBulletinsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/{customerBusinesses/client → customer/resources/businesses/resources/bulletins/types}/index.js +1 -1
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/Client.d.ts +33 -12
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/Client.js +116 -34
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/requests/CancelRsvpEventsRequest.d.ts +4 -2
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/requests/GetEventsRequest.d.ts +3 -1
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/requests/ListEventsRequest.d.ts +6 -1
- package/dist/cjs/api/resources/{customerBusinesses → customer/resources/businesses/resources/events}/client/requests/StoreEventRsvpRequest.d.ts +2 -2
- 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 +3 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/index.d.ts +1 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/index.js +1 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/types/GetEventsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/types/ListEventsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/types/RsvpEventsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/types/index.d.ts +3 -0
- package/dist/cjs/api/resources/{customerShop/client → customer/resources/businesses/resources/events/types}/index.js +3 -1
- package/dist/cjs/api/resources/customer/resources/businesses/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/index.js +2 -0
- package/dist/cjs/api/resources/customer/resources/businesses/types/FavoriteBusinessesResponse.d.ts +3 -0
- package/dist/cjs/api/resources/customer/resources/businesses/types/ListTemporaryLocationsBusinessesResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/businesses/types/MenusBusinessesResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/businesses/types/PhotosBusinessesResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/businesses/types/ProfileBusinessesResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/businesses/types/index.d.ts +5 -0
- package/dist/cjs/api/resources/{customerShop/exports.js → customer/resources/businesses/types/index.js} +5 -5
- package/dist/cjs/api/resources/customer/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/customer/resources/index.js +2 -0
- package/dist/cjs/api/resources/customer/resources/shop/client/Client.d.ts +13 -7
- package/dist/cjs/api/resources/customer/resources/shop/client/Client.js +63 -23
- package/dist/cjs/api/resources/customer/resources/shop/client/requests/GetProductShopRequest.d.ts +3 -1
- package/dist/cjs/api/resources/customer/resources/shop/client/requests/ListCategoriesShopRequest.d.ts +2 -1
- package/dist/cjs/api/resources/customer/resources/shop/client/requests/ListProductsShopRequest.d.ts +6 -1
- package/dist/cjs/api/resources/customer/resources/shop/index.d.ts +1 -0
- package/dist/cjs/api/resources/customer/resources/shop/index.js +1 -0
- package/dist/cjs/api/resources/customer/resources/shop/types/GetProductShopResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/shop/types/ListCategoriesShopResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/shop/types/ListProductsShopResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/shop/types/index.d.ts +3 -0
- package/dist/cjs/api/resources/{customerShop → customer/resources/shop}/types/index.js +3 -3
- package/dist/cjs/api/resources/index.d.ts +0 -6
- package/dist/cjs/api/resources/index.js +1 -7
- 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 +0 -6
- package/dist/esm/Client.mjs +0 -10
- 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 +41 -13
- package/dist/esm/api/resources/customer/resources/businesses/client/Client.mjs +146 -46
- package/dist/esm/api/resources/customer/resources/businesses/client/requests/FavoriteBusinessesRequest.d.mts +2 -1
- package/dist/esm/api/resources/customer/resources/businesses/client/requests/ListTemporaryLocationsBusinessesRequest.d.mts +2 -1
- package/dist/esm/api/resources/customer/resources/businesses/client/requests/MenusBusinessesRequest.d.mts +6 -1
- package/dist/esm/api/resources/customer/resources/businesses/client/requests/PhotosBusinessesRequest.d.mts +6 -1
- package/dist/esm/api/resources/customer/resources/businesses/client/requests/ProfileBusinessesRequest.d.mts +2 -1
- package/dist/esm/api/resources/customer/resources/businesses/client/requests/UnfavoriteBusinessesRequest.d.mts +2 -1
- package/dist/esm/api/resources/customer/resources/businesses/index.d.mts +1 -0
- package/dist/esm/api/resources/customer/resources/businesses/index.mjs +1 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/client/Client.d.mts +8 -3
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/client/Client.mjs +34 -9
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/client/requests/ListBulletinsRequest.d.mts +6 -1
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/index.d.mts +1 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/index.mjs +1 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.d.mts +43 -17
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.mjs +152 -42
- package/dist/esm/api/resources/{customerBusinesses → customer/resources/businesses/resources/bulletins/resources/comments}/client/requests/AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest.d.mts +2 -2
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ListCommentsRequest.d.mts +8 -2
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ListRepliesCommentsRequest.d.mts +10 -3
- package/dist/esm/api/resources/{customerBusinesses → customer/resources/businesses/resources/bulletins/resources/comments}/client/requests/StoreBulletinCommentReplyRequest.d.mts +2 -2
- 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 +1 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/index.mjs +1 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/CreateCommentsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ListCommentsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ListRepliesCommentsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ReplyCommentsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/index.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/index.mjs +4 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/index.d.mts +1 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/index.mjs +1 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/types/ListBulletinsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/types/index.d.mts +1 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/types/index.mjs +1 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/Client.d.mts +33 -12
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/Client.mjs +116 -34
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/requests/CancelRsvpEventsRequest.d.mts +4 -2
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/requests/GetEventsRequest.d.mts +3 -1
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/requests/ListEventsRequest.d.mts +6 -1
- package/dist/esm/api/resources/{customerBusinesses → customer/resources/businesses/resources/events}/client/requests/StoreEventRsvpRequest.d.mts +2 -2
- 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 +1 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/index.mjs +1 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/types/GetEventsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/types/ListEventsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/types/RsvpEventsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/types/index.d.mts +3 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/types/index.mjs +3 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/index.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/businesses/types/FavoriteBusinessesResponse.d.mts +3 -0
- package/dist/esm/api/resources/customer/resources/businesses/types/ListTemporaryLocationsBusinessesResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/businesses/types/MenusBusinessesResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/businesses/types/PhotosBusinessesResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/businesses/types/ProfileBusinessesResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/businesses/types/index.d.mts +5 -0
- package/dist/esm/api/resources/customer/resources/businesses/types/index.mjs +5 -0
- package/dist/esm/api/resources/customer/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/customer/resources/index.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/shop/client/Client.d.mts +13 -7
- package/dist/esm/api/resources/customer/resources/shop/client/Client.mjs +63 -23
- package/dist/esm/api/resources/customer/resources/shop/client/requests/GetProductShopRequest.d.mts +3 -1
- package/dist/esm/api/resources/customer/resources/shop/client/requests/ListCategoriesShopRequest.d.mts +2 -1
- package/dist/esm/api/resources/customer/resources/shop/client/requests/ListProductsShopRequest.d.mts +6 -1
- package/dist/esm/api/resources/customer/resources/shop/index.d.mts +1 -0
- package/dist/esm/api/resources/customer/resources/shop/index.mjs +1 -0
- package/dist/esm/api/resources/customer/resources/shop/types/GetProductShopResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/shop/types/ListCategoriesShopResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/shop/types/ListProductsShopResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/shop/types/index.d.mts +3 -0
- package/dist/esm/api/resources/customer/resources/shop/types/index.mjs +3 -0
- package/dist/esm/api/resources/index.d.mts +0 -6
- package/dist/esm/api/resources/index.mjs +0 -6
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +12 -34
- package/reference.md +693 -1623
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/CreateCommentsRequest.d.ts +0 -11
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ReplyCommentsRequest.d.ts +0 -13
- package/dist/cjs/api/resources/customer/resources/businesses/resources/events/client/requests/RsvpEventsRequest.d.ts +0 -11
- package/dist/cjs/api/resources/customerBusinesses/client/Client.d.ts +0 -267
- package/dist/cjs/api/resources/customerBusinesses/client/Client.js +0 -982
- package/dist/cjs/api/resources/customerBusinesses/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/customerBusinesses/client/requests/BusinessesEventShowRequest.d.ts +0 -13
- package/dist/cjs/api/resources/customerBusinesses/client/requests/DestroyEventRsvpRequest.d.ts +0 -13
- package/dist/cjs/api/resources/customerBusinesses/client/requests/FavoritesBusinessRequest.d.ts +0 -10
- package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBulletinCommentRepliesRequest.d.ts +0 -20
- package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBulletinCommentsRequest.d.ts +0 -17
- package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBusinessBulletinsRequest.d.ts +0 -14
- package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBusinessEventsRequest.d.ts +0 -14
- package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBusinessMenusRequest.d.ts +0 -14
- package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBusinessPhotosRequest.d.ts +0 -14
- package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBusinessTemporaryLocationsRequest.d.ts +0 -10
- package/dist/cjs/api/resources/customerBusinesses/client/requests/ProfileShowRequest.d.ts +0 -10
- package/dist/cjs/api/resources/customerBusinesses/client/requests/UnfavoritesBusinessRequest.d.ts +0 -10
- package/dist/cjs/api/resources/customerBusinesses/client/requests/index.d.ts +0 -15
- package/dist/cjs/api/resources/customerBusinesses/client/requests/index.js +0 -5
- package/dist/cjs/api/resources/customerBusinesses/exports.d.ts +0 -2
- package/dist/cjs/api/resources/customerBusinesses/exports.js +0 -21
- package/dist/cjs/api/resources/customerBusinesses/index.d.ts +0 -2
- package/dist/cjs/api/resources/customerBusinesses/index.js +0 -18
- package/dist/cjs/api/resources/customerBusinesses/types/BusinessesEventShowResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customerBusinesses/types/CreateBulletinCommentResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customerBusinesses/types/CreateBulletinCommentResponse.js +0 -3
- package/dist/cjs/api/resources/customerBusinesses/types/FavoritesBusinessResponse.d.ts +0 -3
- package/dist/cjs/api/resources/customerBusinesses/types/FavoritesBusinessResponse.js +0 -3
- package/dist/cjs/api/resources/customerBusinesses/types/GetBulletinCommentRepliesResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customerBusinesses/types/GetBulletinCommentRepliesResponse.js +0 -3
- package/dist/cjs/api/resources/customerBusinesses/types/GetBulletinCommentsResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customerBusinesses/types/GetBulletinCommentsResponse.js +0 -3
- package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessBulletinsResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessBulletinsResponse.js +0 -3
- package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessEventsResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessEventsResponse.js +0 -3
- package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessMenusResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessMenusResponse.js +0 -3
- package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessPhotosResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessPhotosResponse.js +0 -3
- package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessTemporaryLocationsResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessTemporaryLocationsResponse.js +0 -3
- package/dist/cjs/api/resources/customerBusinesses/types/ProfileShowResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customerBusinesses/types/ProfileShowResponse.js +0 -3
- package/dist/cjs/api/resources/customerBusinesses/types/ReplyToBulletinCommentResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customerBusinesses/types/ReplyToBulletinCommentResponse.js +0 -3
- package/dist/cjs/api/resources/customerBusinesses/types/StoreEventRsvpResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customerBusinesses/types/StoreEventRsvpResponse.js +0 -3
- package/dist/cjs/api/resources/customerBusinesses/types/index.d.ts +0 -13
- package/dist/cjs/api/resources/customerBusinesses/types/index.js +0 -29
- package/dist/cjs/api/resources/customerShop/client/Client.d.ts +0 -53
- package/dist/cjs/api/resources/customerShop/client/Client.js +0 -219
- package/dist/cjs/api/resources/customerShop/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/customerShop/client/requests/GetShopProductRequest.d.ts +0 -13
- package/dist/cjs/api/resources/customerShop/client/requests/GetShopProductRequest.js +0 -3
- package/dist/cjs/api/resources/customerShop/client/requests/ListShopCategoriesRequest.d.ts +0 -10
- package/dist/cjs/api/resources/customerShop/client/requests/ListShopCategoriesRequest.js +0 -3
- package/dist/cjs/api/resources/customerShop/client/requests/ListShopProductsRequest.d.ts +0 -14
- package/dist/cjs/api/resources/customerShop/client/requests/ListShopProductsRequest.js +0 -3
- package/dist/cjs/api/resources/customerShop/client/requests/index.d.ts +0 -3
- package/dist/cjs/api/resources/customerShop/client/requests/index.js +0 -2
- package/dist/cjs/api/resources/customerShop/exports.d.ts +0 -2
- package/dist/cjs/api/resources/customerShop/index.d.ts +0 -2
- package/dist/cjs/api/resources/customerShop/types/GetShopProductResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customerShop/types/GetShopProductResponse.js +0 -3
- package/dist/cjs/api/resources/customerShop/types/ListShopCategoriesResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customerShop/types/ListShopCategoriesResponse.js +0 -3
- package/dist/cjs/api/resources/customerShop/types/ListShopProductsResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customerShop/types/ListShopProductsResponse.js +0 -3
- package/dist/cjs/api/resources/customerShop/types/index.d.ts +0 -3
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/CreateCommentsRequest.d.mts +0 -11
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ReplyCommentsRequest.d.mts +0 -13
- package/dist/esm/api/resources/customer/resources/businesses/resources/events/client/requests/RsvpEventsRequest.d.mts +0 -11
- package/dist/esm/api/resources/customerBusinesses/client/Client.d.mts +0 -267
- package/dist/esm/api/resources/customerBusinesses/client/Client.mjs +0 -945
- package/dist/esm/api/resources/customerBusinesses/client/index.d.mts +0 -1
- package/dist/esm/api/resources/customerBusinesses/client/index.mjs +0 -1
- package/dist/esm/api/resources/customerBusinesses/client/requests/BusinessesEventShowRequest.d.mts +0 -13
- package/dist/esm/api/resources/customerBusinesses/client/requests/DestroyEventRsvpRequest.d.mts +0 -13
- package/dist/esm/api/resources/customerBusinesses/client/requests/FavoritesBusinessRequest.d.mts +0 -10
- package/dist/esm/api/resources/customerBusinesses/client/requests/GetBulletinCommentRepliesRequest.d.mts +0 -20
- package/dist/esm/api/resources/customerBusinesses/client/requests/GetBulletinCommentsRequest.d.mts +0 -17
- package/dist/esm/api/resources/customerBusinesses/client/requests/GetBusinessBulletinsRequest.d.mts +0 -14
- package/dist/esm/api/resources/customerBusinesses/client/requests/GetBusinessEventsRequest.d.mts +0 -14
- package/dist/esm/api/resources/customerBusinesses/client/requests/GetBusinessMenusRequest.d.mts +0 -14
- package/dist/esm/api/resources/customerBusinesses/client/requests/GetBusinessPhotosRequest.d.mts +0 -14
- package/dist/esm/api/resources/customerBusinesses/client/requests/GetBusinessTemporaryLocationsRequest.d.mts +0 -10
- package/dist/esm/api/resources/customerBusinesses/client/requests/ProfileShowRequest.d.mts +0 -10
- package/dist/esm/api/resources/customerBusinesses/client/requests/UnfavoritesBusinessRequest.d.mts +0 -10
- package/dist/esm/api/resources/customerBusinesses/client/requests/index.d.mts +0 -15
- package/dist/esm/api/resources/customerBusinesses/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/customerBusinesses/exports.d.mts +0 -2
- package/dist/esm/api/resources/customerBusinesses/exports.mjs +0 -3
- package/dist/esm/api/resources/customerBusinesses/index.d.mts +0 -2
- package/dist/esm/api/resources/customerBusinesses/index.mjs +0 -2
- package/dist/esm/api/resources/customerBusinesses/types/BusinessesEventShowResponse.d.mts +0 -4
- package/dist/esm/api/resources/customerBusinesses/types/CreateBulletinCommentResponse.d.mts +0 -4
- package/dist/esm/api/resources/customerBusinesses/types/CreateBulletinCommentResponse.mjs +0 -2
- package/dist/esm/api/resources/customerBusinesses/types/FavoritesBusinessResponse.d.mts +0 -3
- package/dist/esm/api/resources/customerBusinesses/types/FavoritesBusinessResponse.mjs +0 -2
- package/dist/esm/api/resources/customerBusinesses/types/GetBulletinCommentRepliesResponse.d.mts +0 -4
- package/dist/esm/api/resources/customerBusinesses/types/GetBulletinCommentRepliesResponse.mjs +0 -2
- package/dist/esm/api/resources/customerBusinesses/types/GetBulletinCommentsResponse.d.mts +0 -4
- package/dist/esm/api/resources/customerBusinesses/types/GetBulletinCommentsResponse.mjs +0 -2
- package/dist/esm/api/resources/customerBusinesses/types/GetBusinessBulletinsResponse.d.mts +0 -4
- package/dist/esm/api/resources/customerBusinesses/types/GetBusinessBulletinsResponse.mjs +0 -2
- package/dist/esm/api/resources/customerBusinesses/types/GetBusinessEventsResponse.d.mts +0 -4
- package/dist/esm/api/resources/customerBusinesses/types/GetBusinessEventsResponse.mjs +0 -2
- package/dist/esm/api/resources/customerBusinesses/types/GetBusinessMenusResponse.d.mts +0 -4
- package/dist/esm/api/resources/customerBusinesses/types/GetBusinessMenusResponse.mjs +0 -2
- package/dist/esm/api/resources/customerBusinesses/types/GetBusinessPhotosResponse.d.mts +0 -4
- package/dist/esm/api/resources/customerBusinesses/types/GetBusinessPhotosResponse.mjs +0 -2
- package/dist/esm/api/resources/customerBusinesses/types/GetBusinessTemporaryLocationsResponse.d.mts +0 -4
- package/dist/esm/api/resources/customerBusinesses/types/GetBusinessTemporaryLocationsResponse.mjs +0 -2
- package/dist/esm/api/resources/customerBusinesses/types/ProfileShowResponse.d.mts +0 -4
- package/dist/esm/api/resources/customerBusinesses/types/ProfileShowResponse.mjs +0 -2
- package/dist/esm/api/resources/customerBusinesses/types/ReplyToBulletinCommentResponse.d.mts +0 -4
- package/dist/esm/api/resources/customerBusinesses/types/ReplyToBulletinCommentResponse.mjs +0 -2
- package/dist/esm/api/resources/customerBusinesses/types/StoreEventRsvpResponse.d.mts +0 -4
- package/dist/esm/api/resources/customerBusinesses/types/StoreEventRsvpResponse.mjs +0 -2
- package/dist/esm/api/resources/customerBusinesses/types/index.d.mts +0 -13
- package/dist/esm/api/resources/customerBusinesses/types/index.mjs +0 -13
- package/dist/esm/api/resources/customerShop/client/Client.d.mts +0 -53
- package/dist/esm/api/resources/customerShop/client/Client.mjs +0 -182
- package/dist/esm/api/resources/customerShop/client/index.d.mts +0 -1
- package/dist/esm/api/resources/customerShop/client/index.mjs +0 -1
- package/dist/esm/api/resources/customerShop/client/requests/GetShopProductRequest.d.mts +0 -13
- package/dist/esm/api/resources/customerShop/client/requests/GetShopProductRequest.mjs +0 -2
- package/dist/esm/api/resources/customerShop/client/requests/ListShopCategoriesRequest.d.mts +0 -10
- package/dist/esm/api/resources/customerShop/client/requests/ListShopCategoriesRequest.mjs +0 -2
- package/dist/esm/api/resources/customerShop/client/requests/ListShopProductsRequest.d.mts +0 -14
- package/dist/esm/api/resources/customerShop/client/requests/ListShopProductsRequest.mjs +0 -2
- package/dist/esm/api/resources/customerShop/client/requests/index.d.mts +0 -3
- package/dist/esm/api/resources/customerShop/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/customerShop/exports.d.mts +0 -2
- package/dist/esm/api/resources/customerShop/exports.mjs +0 -3
- package/dist/esm/api/resources/customerShop/index.d.mts +0 -2
- package/dist/esm/api/resources/customerShop/index.mjs +0 -2
- package/dist/esm/api/resources/customerShop/types/GetShopProductResponse.d.mts +0 -4
- package/dist/esm/api/resources/customerShop/types/GetShopProductResponse.mjs +0 -2
- package/dist/esm/api/resources/customerShop/types/ListShopCategoriesResponse.d.mts +0 -4
- package/dist/esm/api/resources/customerShop/types/ListShopCategoriesResponse.mjs +0 -2
- package/dist/esm/api/resources/customerShop/types/ListShopProductsResponse.d.mts +0 -4
- package/dist/esm/api/resources/customerShop/types/ListShopProductsResponse.mjs +0 -2
- package/dist/esm/api/resources/customerShop/types/index.d.mts +0 -3
- package/dist/esm/api/resources/customerShop/types/index.mjs +0 -3
- /package/dist/cjs/api/resources/{customerBusinesses → customer/resources/businesses/resources/bulletins/resources/comments}/client/requests/AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest.js +0 -0
- /package/dist/cjs/api/resources/{customerBusinesses → customer/resources/businesses/resources/bulletins/resources/comments}/client/requests/StoreBulletinCommentReplyRequest.js +0 -0
- /package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/{client/requests/CreateCommentsRequest.js → types/CreateCommentsResponse.js} +0 -0
- /package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/{client/requests/ReplyCommentsRequest.js → types/ListCommentsResponse.js} +0 -0
- /package/dist/cjs/api/resources/customer/resources/businesses/resources/{events/client/requests/RsvpEventsRequest.js → bulletins/resources/comments/types/ListRepliesCommentsResponse.js} +0 -0
- /package/dist/cjs/api/resources/{customerBusinesses/client/requests/BusinessesEventShowRequest.js → customer/resources/businesses/resources/bulletins/resources/comments/types/ReplyCommentsResponse.js} +0 -0
- /package/dist/cjs/api/resources/{customerBusinesses/client/requests/DestroyEventRsvpRequest.js → customer/resources/businesses/resources/bulletins/types/ListBulletinsResponse.js} +0 -0
- /package/dist/cjs/api/resources/{customerBusinesses → customer/resources/businesses/resources/events}/client/requests/StoreEventRsvpRequest.js +0 -0
- /package/dist/cjs/api/resources/{customerBusinesses/client/requests/FavoritesBusinessRequest.js → customer/resources/businesses/resources/events/types/GetEventsResponse.js} +0 -0
- /package/dist/cjs/api/resources/{customerBusinesses/client/requests/GetBulletinCommentRepliesRequest.js → customer/resources/businesses/resources/events/types/ListEventsResponse.js} +0 -0
- /package/dist/cjs/api/resources/{customerBusinesses/client/requests/GetBulletinCommentsRequest.js → customer/resources/businesses/resources/events/types/RsvpEventsResponse.js} +0 -0
- /package/dist/cjs/api/resources/{customerBusinesses/client/requests/GetBusinessBulletinsRequest.js → customer/resources/businesses/types/FavoriteBusinessesResponse.js} +0 -0
- /package/dist/cjs/api/resources/{customerBusinesses/client/requests/GetBusinessEventsRequest.js → customer/resources/businesses/types/ListTemporaryLocationsBusinessesResponse.js} +0 -0
- /package/dist/cjs/api/resources/{customerBusinesses/client/requests/GetBusinessMenusRequest.js → customer/resources/businesses/types/MenusBusinessesResponse.js} +0 -0
- /package/dist/cjs/api/resources/{customerBusinesses/client/requests/GetBusinessPhotosRequest.js → customer/resources/businesses/types/PhotosBusinessesResponse.js} +0 -0
- /package/dist/cjs/api/resources/{customerBusinesses/client/requests/GetBusinessTemporaryLocationsRequest.js → customer/resources/businesses/types/ProfileBusinessesResponse.js} +0 -0
- /package/dist/cjs/api/resources/{customerBusinesses/client/requests/ProfileShowRequest.js → customer/resources/shop/types/GetProductShopResponse.js} +0 -0
- /package/dist/cjs/api/resources/{customerBusinesses/client/requests/UnfavoritesBusinessRequest.js → customer/resources/shop/types/ListCategoriesShopResponse.js} +0 -0
- /package/dist/cjs/api/resources/{customerBusinesses/types/BusinessesEventShowResponse.js → customer/resources/shop/types/ListProductsShopResponse.js} +0 -0
- /package/dist/esm/api/resources/{customerBusinesses → customer/resources/businesses/resources/bulletins/resources/comments}/client/requests/AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest.mjs +0 -0
- /package/dist/esm/api/resources/{customerBusinesses → customer/resources/businesses/resources/bulletins/resources/comments}/client/requests/StoreBulletinCommentReplyRequest.mjs +0 -0
- /package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/{client/requests/CreateCommentsRequest.mjs → types/CreateCommentsResponse.mjs} +0 -0
- /package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/{client/requests/ReplyCommentsRequest.mjs → types/ListCommentsResponse.mjs} +0 -0
- /package/dist/esm/api/resources/customer/resources/businesses/resources/{events/client/requests/RsvpEventsRequest.mjs → bulletins/resources/comments/types/ListRepliesCommentsResponse.mjs} +0 -0
- /package/dist/esm/api/resources/{customerBusinesses/client/requests/BusinessesEventShowRequest.mjs → customer/resources/businesses/resources/bulletins/resources/comments/types/ReplyCommentsResponse.mjs} +0 -0
- /package/dist/esm/api/resources/{customerBusinesses/client/requests/DestroyEventRsvpRequest.mjs → customer/resources/businesses/resources/bulletins/types/ListBulletinsResponse.mjs} +0 -0
- /package/dist/esm/api/resources/{customerBusinesses → customer/resources/businesses/resources/events}/client/requests/StoreEventRsvpRequest.mjs +0 -0
- /package/dist/esm/api/resources/{customerBusinesses/client/requests/FavoritesBusinessRequest.mjs → customer/resources/businesses/resources/events/types/GetEventsResponse.mjs} +0 -0
- /package/dist/esm/api/resources/{customerBusinesses/client/requests/GetBulletinCommentRepliesRequest.mjs → customer/resources/businesses/resources/events/types/ListEventsResponse.mjs} +0 -0
- /package/dist/esm/api/resources/{customerBusinesses/client/requests/GetBulletinCommentsRequest.mjs → customer/resources/businesses/resources/events/types/RsvpEventsResponse.mjs} +0 -0
- /package/dist/esm/api/resources/{customerBusinesses/client/requests/GetBusinessBulletinsRequest.mjs → customer/resources/businesses/types/FavoriteBusinessesResponse.mjs} +0 -0
- /package/dist/esm/api/resources/{customerBusinesses/client/requests/GetBusinessEventsRequest.mjs → customer/resources/businesses/types/ListTemporaryLocationsBusinessesResponse.mjs} +0 -0
- /package/dist/esm/api/resources/{customerBusinesses/client/requests/GetBusinessMenusRequest.mjs → customer/resources/businesses/types/MenusBusinessesResponse.mjs} +0 -0
- /package/dist/esm/api/resources/{customerBusinesses/client/requests/GetBusinessPhotosRequest.mjs → customer/resources/businesses/types/PhotosBusinessesResponse.mjs} +0 -0
- /package/dist/esm/api/resources/{customerBusinesses/client/requests/GetBusinessTemporaryLocationsRequest.mjs → customer/resources/businesses/types/ProfileBusinessesResponse.mjs} +0 -0
- /package/dist/esm/api/resources/{customerBusinesses/client/requests/ProfileShowRequest.mjs → customer/resources/shop/types/GetProductShopResponse.mjs} +0 -0
- /package/dist/esm/api/resources/{customerBusinesses/client/requests/UnfavoritesBusinessRequest.mjs → customer/resources/shop/types/ListCategoriesShopResponse.mjs} +0 -0
- /package/dist/esm/api/resources/{customerBusinesses/types/BusinessesEventShowResponse.mjs → customer/resources/shop/types/ListProductsShopResponse.mjs} +0 -0
|
@@ -14,6 +14,7 @@ import * as core from "../../../../../../core/index.mjs";
|
|
|
14
14
|
import * as environments from "../../../../../../environments.mjs";
|
|
15
15
|
import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
16
|
import * as errors from "../../../../../../errors/index.mjs";
|
|
17
|
+
import * as FiveOneEat from "../../../../../index.mjs";
|
|
17
18
|
import { BulletinsClient } from "../resources/bulletins/client/Client.mjs";
|
|
18
19
|
import { EventsClient } from "../resources/events/client/Client.mjs";
|
|
19
20
|
export class BusinessesClient {
|
|
@@ -29,12 +30,16 @@ export class BusinessesClient {
|
|
|
29
30
|
return ((_a = this._events) !== null && _a !== void 0 ? _a : (this._events = new EventsClient(this._options)));
|
|
30
31
|
}
|
|
31
32
|
/**
|
|
33
|
+
* Retrieve core business information for the profile page.
|
|
34
|
+
*
|
|
32
35
|
* @param {FiveOneEat.customer.ProfileBusinessesRequest} request
|
|
33
36
|
* @param {BusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
34
37
|
*
|
|
38
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
39
|
+
*
|
|
35
40
|
* @example
|
|
36
41
|
* await client.customer.businesses.profile({
|
|
37
|
-
* business: "
|
|
42
|
+
* business: "katzs-deli"
|
|
38
43
|
* })
|
|
39
44
|
*/
|
|
40
45
|
profile(request, requestOptions) {
|
|
@@ -58,25 +63,38 @@ export class BusinessesClient {
|
|
|
58
63
|
logging: this._options.logging,
|
|
59
64
|
});
|
|
60
65
|
if (_response.ok) {
|
|
61
|
-
return {
|
|
66
|
+
return {
|
|
67
|
+
data: _response.body,
|
|
68
|
+
rawResponse: _response.rawResponse,
|
|
69
|
+
};
|
|
62
70
|
}
|
|
63
71
|
if (_response.error.reason === "status-code") {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
72
|
+
switch (_response.error.statusCode) {
|
|
73
|
+
case 401:
|
|
74
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
75
|
+
default:
|
|
76
|
+
throw new errors.FiveOneEatError({
|
|
77
|
+
statusCode: _response.error.statusCode,
|
|
78
|
+
body: _response.error.body,
|
|
79
|
+
rawResponse: _response.rawResponse,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
69
82
|
}
|
|
70
83
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{business}");
|
|
71
84
|
});
|
|
72
85
|
}
|
|
73
86
|
/**
|
|
87
|
+
* Retrieve all menus organized by groups for the business.
|
|
88
|
+
*
|
|
74
89
|
* @param {FiveOneEat.customer.MenusBusinessesRequest} request
|
|
75
90
|
* @param {BusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
76
91
|
*
|
|
92
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
93
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
94
|
+
*
|
|
77
95
|
* @example
|
|
78
96
|
* await client.customer.businesses.menus({
|
|
79
|
-
* business: "
|
|
97
|
+
* business: "katzs-deli"
|
|
80
98
|
* })
|
|
81
99
|
*/
|
|
82
100
|
menus(request, requestOptions) {
|
|
@@ -85,14 +103,23 @@ export class BusinessesClient {
|
|
|
85
103
|
__menus(request, requestOptions) {
|
|
86
104
|
return __awaiter(this, void 0, void 0, function* () {
|
|
87
105
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
88
|
-
const { business } = request;
|
|
106
|
+
const { business, page, per_page: perPage } = request;
|
|
107
|
+
const _queryParams = {
|
|
108
|
+
page,
|
|
109
|
+
per_page: perPage,
|
|
110
|
+
};
|
|
89
111
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
90
112
|
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);
|
|
91
113
|
const _response = yield core.fetcher({
|
|
92
114
|
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(business)}/menus`),
|
|
93
115
|
method: "GET",
|
|
94
116
|
headers: _headers,
|
|
95
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
117
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
118
|
+
queryString: core.url
|
|
119
|
+
.queryBuilder()
|
|
120
|
+
.addMany(_queryParams)
|
|
121
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
122
|
+
.build(),
|
|
96
123
|
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,
|
|
97
124
|
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,
|
|
98
125
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -100,25 +127,40 @@ export class BusinessesClient {
|
|
|
100
127
|
logging: this._options.logging,
|
|
101
128
|
});
|
|
102
129
|
if (_response.ok) {
|
|
103
|
-
return {
|
|
130
|
+
return {
|
|
131
|
+
data: _response.body,
|
|
132
|
+
rawResponse: _response.rawResponse,
|
|
133
|
+
};
|
|
104
134
|
}
|
|
105
135
|
if (_response.error.reason === "status-code") {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
136
|
+
switch (_response.error.statusCode) {
|
|
137
|
+
case 401:
|
|
138
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
139
|
+
case 422:
|
|
140
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
141
|
+
default:
|
|
142
|
+
throw new errors.FiveOneEatError({
|
|
143
|
+
statusCode: _response.error.statusCode,
|
|
144
|
+
body: _response.error.body,
|
|
145
|
+
rawResponse: _response.rawResponse,
|
|
146
|
+
});
|
|
147
|
+
}
|
|
111
148
|
}
|
|
112
149
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{business}/menus");
|
|
113
150
|
});
|
|
114
151
|
}
|
|
115
152
|
/**
|
|
153
|
+
* Retrieve photo gallery for the business with pagination.
|
|
154
|
+
*
|
|
116
155
|
* @param {FiveOneEat.customer.PhotosBusinessesRequest} request
|
|
117
156
|
* @param {BusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
118
157
|
*
|
|
158
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
159
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
160
|
+
*
|
|
119
161
|
* @example
|
|
120
162
|
* await client.customer.businesses.photos({
|
|
121
|
-
* business: "
|
|
163
|
+
* business: "katzs-deli"
|
|
122
164
|
* })
|
|
123
165
|
*/
|
|
124
166
|
photos(request, requestOptions) {
|
|
@@ -127,14 +169,23 @@ export class BusinessesClient {
|
|
|
127
169
|
__photos(request, requestOptions) {
|
|
128
170
|
return __awaiter(this, void 0, void 0, function* () {
|
|
129
171
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
130
|
-
const { business } = request;
|
|
172
|
+
const { business, page, per_page: perPage } = request;
|
|
173
|
+
const _queryParams = {
|
|
174
|
+
page,
|
|
175
|
+
per_page: perPage,
|
|
176
|
+
};
|
|
131
177
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
132
178
|
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);
|
|
133
179
|
const _response = yield core.fetcher({
|
|
134
180
|
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(business)}/photos`),
|
|
135
181
|
method: "GET",
|
|
136
182
|
headers: _headers,
|
|
137
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
183
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
184
|
+
queryString: core.url
|
|
185
|
+
.queryBuilder()
|
|
186
|
+
.addMany(_queryParams)
|
|
187
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
188
|
+
.build(),
|
|
138
189
|
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,
|
|
139
190
|
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,
|
|
140
191
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -142,25 +193,41 @@ export class BusinessesClient {
|
|
|
142
193
|
logging: this._options.logging,
|
|
143
194
|
});
|
|
144
195
|
if (_response.ok) {
|
|
145
|
-
return {
|
|
196
|
+
return {
|
|
197
|
+
data: _response.body,
|
|
198
|
+
rawResponse: _response.rawResponse,
|
|
199
|
+
};
|
|
146
200
|
}
|
|
147
201
|
if (_response.error.reason === "status-code") {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
202
|
+
switch (_response.error.statusCode) {
|
|
203
|
+
case 401:
|
|
204
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
205
|
+
case 422:
|
|
206
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
207
|
+
default:
|
|
208
|
+
throw new errors.FiveOneEatError({
|
|
209
|
+
statusCode: _response.error.statusCode,
|
|
210
|
+
body: _response.error.body,
|
|
211
|
+
rawResponse: _response.rawResponse,
|
|
212
|
+
});
|
|
213
|
+
}
|
|
153
214
|
}
|
|
154
215
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{business}/photos");
|
|
155
216
|
});
|
|
156
217
|
}
|
|
157
218
|
/**
|
|
219
|
+
* Add a business to the authenticated user's favorites.
|
|
220
|
+
*
|
|
158
221
|
* @param {FiveOneEat.customer.FavoriteBusinessesRequest} request
|
|
159
222
|
* @param {BusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
160
223
|
*
|
|
224
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
225
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
226
|
+
* @throws {@link FiveOneEat.ConflictError}
|
|
227
|
+
*
|
|
161
228
|
* @example
|
|
162
229
|
* await client.customer.businesses.favorite({
|
|
163
|
-
* business: "
|
|
230
|
+
* business: "katzs-deli"
|
|
164
231
|
* })
|
|
165
232
|
*/
|
|
166
233
|
favorite(request, requestOptions) {
|
|
@@ -184,25 +251,41 @@ export class BusinessesClient {
|
|
|
184
251
|
logging: this._options.logging,
|
|
185
252
|
});
|
|
186
253
|
if (_response.ok) {
|
|
187
|
-
return {
|
|
254
|
+
return {
|
|
255
|
+
data: _response.body,
|
|
256
|
+
rawResponse: _response.rawResponse,
|
|
257
|
+
};
|
|
188
258
|
}
|
|
189
259
|
if (_response.error.reason === "status-code") {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
260
|
+
switch (_response.error.statusCode) {
|
|
261
|
+
case 401:
|
|
262
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
263
|
+
case 404:
|
|
264
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
265
|
+
case 409:
|
|
266
|
+
throw new FiveOneEat.ConflictError(_response.error.body, _response.rawResponse);
|
|
267
|
+
default:
|
|
268
|
+
throw new errors.FiveOneEatError({
|
|
269
|
+
statusCode: _response.error.statusCode,
|
|
270
|
+
body: _response.error.body,
|
|
271
|
+
rawResponse: _response.rawResponse,
|
|
272
|
+
});
|
|
273
|
+
}
|
|
195
274
|
}
|
|
196
275
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/customer/businesses/{business}/favorite");
|
|
197
276
|
});
|
|
198
277
|
}
|
|
199
278
|
/**
|
|
279
|
+
* Remove a business from the authenticated user's favorites.
|
|
280
|
+
*
|
|
200
281
|
* @param {FiveOneEat.customer.UnfavoriteBusinessesRequest} request
|
|
201
282
|
* @param {BusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
202
283
|
*
|
|
284
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
285
|
+
*
|
|
203
286
|
* @example
|
|
204
287
|
* await client.customer.businesses.unfavorite({
|
|
205
|
-
* business: "
|
|
288
|
+
* business: "katzs-deli"
|
|
206
289
|
* })
|
|
207
290
|
*/
|
|
208
291
|
unfavorite(request, requestOptions) {
|
|
@@ -226,25 +309,34 @@ export class BusinessesClient {
|
|
|
226
309
|
logging: this._options.logging,
|
|
227
310
|
});
|
|
228
311
|
if (_response.ok) {
|
|
229
|
-
return { data:
|
|
312
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
230
313
|
}
|
|
231
314
|
if (_response.error.reason === "status-code") {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
315
|
+
switch (_response.error.statusCode) {
|
|
316
|
+
case 401:
|
|
317
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
318
|
+
default:
|
|
319
|
+
throw new errors.FiveOneEatError({
|
|
320
|
+
statusCode: _response.error.statusCode,
|
|
321
|
+
body: _response.error.body,
|
|
322
|
+
rawResponse: _response.rawResponse,
|
|
323
|
+
});
|
|
324
|
+
}
|
|
237
325
|
}
|
|
238
326
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/customer/businesses/{business}/favorite");
|
|
239
327
|
});
|
|
240
328
|
}
|
|
241
329
|
/**
|
|
330
|
+
* Retrieve active and upcoming temporary locations for a business.
|
|
331
|
+
*
|
|
242
332
|
* @param {FiveOneEat.customer.ListTemporaryLocationsBusinessesRequest} request
|
|
243
333
|
* @param {BusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
244
334
|
*
|
|
335
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
336
|
+
*
|
|
245
337
|
* @example
|
|
246
338
|
* await client.customer.businesses.listTemporaryLocations({
|
|
247
|
-
* business: "
|
|
339
|
+
* business: "katzs-deli"
|
|
248
340
|
* })
|
|
249
341
|
*/
|
|
250
342
|
listTemporaryLocations(request, requestOptions) {
|
|
@@ -268,14 +360,22 @@ export class BusinessesClient {
|
|
|
268
360
|
logging: this._options.logging,
|
|
269
361
|
});
|
|
270
362
|
if (_response.ok) {
|
|
271
|
-
return {
|
|
363
|
+
return {
|
|
364
|
+
data: _response.body,
|
|
365
|
+
rawResponse: _response.rawResponse,
|
|
366
|
+
};
|
|
272
367
|
}
|
|
273
368
|
if (_response.error.reason === "status-code") {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
369
|
+
switch (_response.error.statusCode) {
|
|
370
|
+
case 401:
|
|
371
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
372
|
+
default:
|
|
373
|
+
throw new errors.FiveOneEatError({
|
|
374
|
+
statusCode: _response.error.statusCode,
|
|
375
|
+
body: _response.error.body,
|
|
376
|
+
rawResponse: _response.rawResponse,
|
|
377
|
+
});
|
|
378
|
+
}
|
|
279
379
|
}
|
|
280
380
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{business}/temporary-locations");
|
|
281
381
|
});
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
-
* business: "
|
|
4
|
+
* business: "katzs-deli"
|
|
5
5
|
* }
|
|
6
6
|
*/
|
|
7
7
|
export interface MenusBusinessesRequest {
|
|
8
|
+
/** The business handle */
|
|
8
9
|
business: string;
|
|
10
|
+
/** Page number for pagination */
|
|
11
|
+
page?: number;
|
|
12
|
+
/** Number of items per page */
|
|
13
|
+
per_page?: number;
|
|
9
14
|
}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
-
* business: "
|
|
4
|
+
* business: "katzs-deli"
|
|
5
5
|
* }
|
|
6
6
|
*/
|
|
7
7
|
export interface PhotosBusinessesRequest {
|
|
8
|
+
/** The business handle */
|
|
8
9
|
business: string;
|
|
10
|
+
/** Page number for pagination */
|
|
11
|
+
page?: number;
|
|
12
|
+
/** Number of photos per page */
|
|
13
|
+
per_page?: number;
|
|
9
14
|
}
|
package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/client/Client.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient.mjs";
|
|
2
2
|
import { type NormalizedClientOptionsWithAuth } from "../../../../../../../../BaseClient.mjs";
|
|
3
3
|
import * as core from "../../../../../../../../core/index.mjs";
|
|
4
|
-
import
|
|
4
|
+
import * as FiveOneEat from "../../../../../../../index.mjs";
|
|
5
5
|
import { CommentsClient } from "../resources/comments/client/Client.mjs";
|
|
6
6
|
export declare namespace BulletinsClient {
|
|
7
7
|
type Options = BaseClientOptions;
|
|
@@ -14,14 +14,19 @@ export declare class BulletinsClient {
|
|
|
14
14
|
constructor(options?: BulletinsClient.Options);
|
|
15
15
|
get comments(): CommentsClient;
|
|
16
16
|
/**
|
|
17
|
+
* Retrieve business announcements and updates with pagination.
|
|
18
|
+
*
|
|
17
19
|
* @param {FiveOneEat.customer.businesses.ListBulletinsRequest} request
|
|
18
20
|
* @param {BulletinsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
19
21
|
*
|
|
22
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
23
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
24
|
+
*
|
|
20
25
|
* @example
|
|
21
26
|
* await client.customer.businesses.bulletins.list({
|
|
22
|
-
* business: "
|
|
27
|
+
* business: "katzs-deli"
|
|
23
28
|
* })
|
|
24
29
|
*/
|
|
25
|
-
list(request: FiveOneEat.customer.businesses.ListBulletinsRequest, requestOptions?: BulletinsClient.RequestOptions): core.HttpResponsePromise<
|
|
30
|
+
list(request: FiveOneEat.customer.businesses.ListBulletinsRequest, requestOptions?: BulletinsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.businesses.ListBulletinsResponse>;
|
|
26
31
|
private __list;
|
|
27
32
|
}
|
package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/client/Client.mjs
CHANGED
|
@@ -14,6 +14,7 @@ import * as core from "../../../../../../../../core/index.mjs";
|
|
|
14
14
|
import * as environments from "../../../../../../../../environments.mjs";
|
|
15
15
|
import { handleNonStatusCodeError } from "../../../../../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
16
|
import * as errors from "../../../../../../../../errors/index.mjs";
|
|
17
|
+
import * as FiveOneEat from "../../../../../../../index.mjs";
|
|
17
18
|
import { CommentsClient } from "../resources/comments/client/Client.mjs";
|
|
18
19
|
export class BulletinsClient {
|
|
19
20
|
constructor(options = {}) {
|
|
@@ -24,12 +25,17 @@ export class BulletinsClient {
|
|
|
24
25
|
return ((_a = this._comments) !== null && _a !== void 0 ? _a : (this._comments = new CommentsClient(this._options)));
|
|
25
26
|
}
|
|
26
27
|
/**
|
|
28
|
+
* Retrieve business announcements and updates with pagination.
|
|
29
|
+
*
|
|
27
30
|
* @param {FiveOneEat.customer.businesses.ListBulletinsRequest} request
|
|
28
31
|
* @param {BulletinsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
29
32
|
*
|
|
33
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
34
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
35
|
+
*
|
|
30
36
|
* @example
|
|
31
37
|
* await client.customer.businesses.bulletins.list({
|
|
32
|
-
* business: "
|
|
38
|
+
* business: "katzs-deli"
|
|
33
39
|
* })
|
|
34
40
|
*/
|
|
35
41
|
list(request, requestOptions) {
|
|
@@ -38,14 +44,23 @@ export class BulletinsClient {
|
|
|
38
44
|
__list(request, requestOptions) {
|
|
39
45
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
46
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
41
|
-
const { business } = request;
|
|
47
|
+
const { business, page, per_page: perPage } = request;
|
|
48
|
+
const _queryParams = {
|
|
49
|
+
page,
|
|
50
|
+
per_page: perPage,
|
|
51
|
+
};
|
|
42
52
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
43
53
|
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);
|
|
44
54
|
const _response = yield core.fetcher({
|
|
45
55
|
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(business)}/bulletins`),
|
|
46
56
|
method: "GET",
|
|
47
57
|
headers: _headers,
|
|
48
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
58
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
59
|
+
queryString: core.url
|
|
60
|
+
.queryBuilder()
|
|
61
|
+
.addMany(_queryParams)
|
|
62
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
63
|
+
.build(),
|
|
49
64
|
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,
|
|
50
65
|
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,
|
|
51
66
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -53,14 +68,24 @@ export class BulletinsClient {
|
|
|
53
68
|
logging: this._options.logging,
|
|
54
69
|
});
|
|
55
70
|
if (_response.ok) {
|
|
56
|
-
return {
|
|
71
|
+
return {
|
|
72
|
+
data: _response.body,
|
|
73
|
+
rawResponse: _response.rawResponse,
|
|
74
|
+
};
|
|
57
75
|
}
|
|
58
76
|
if (_response.error.reason === "status-code") {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
77
|
+
switch (_response.error.statusCode) {
|
|
78
|
+
case 401:
|
|
79
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
80
|
+
case 422:
|
|
81
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
82
|
+
default:
|
|
83
|
+
throw new errors.FiveOneEatError({
|
|
84
|
+
statusCode: _response.error.statusCode,
|
|
85
|
+
body: _response.error.body,
|
|
86
|
+
rawResponse: _response.rawResponse,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
64
89
|
}
|
|
65
90
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{business}/bulletins");
|
|
66
91
|
});
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
-
* business: "
|
|
4
|
+
* business: "katzs-deli"
|
|
5
5
|
* }
|
|
6
6
|
*/
|
|
7
7
|
export interface ListBulletinsRequest {
|
|
8
|
+
/** The business handle */
|
|
8
9
|
business: string;
|
|
10
|
+
/** Page number for pagination */
|
|
11
|
+
page?: number;
|
|
12
|
+
/** Number of bulletins per page */
|
|
13
|
+
per_page?: number;
|
|
9
14
|
}
|