@51eat/sdk 0.0.73 → 0.0.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +3 -0
- package/dist/cjs/Client.js +5 -0
- package/dist/cjs/api/resources/business/resources/businesses/client/requests/StoreBusinessRequest.d.ts +1 -1
- package/dist/cjs/api/resources/business/resources/businesses/client/requests/UpdateBusinessRequest.d.ts +1 -1
- package/dist/cjs/api/resources/business/resources/events/client/requests/UploadEventImageRequest.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/gallery/client/requests/StoreGalleryPhotoRequest.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/productOrders/types/GetLabelRatesProductOrdersResponseItem.d.ts +1 -1
- package/dist/cjs/api/resources/business/resources/profile/client/requests/UpdateBusinessProfileRequest.d.ts +22 -2
- package/dist/cjs/api/resources/business/resources/profile/client/requests/UpdateBusinessProfileRequest.js +21 -0
- package/dist/cjs/api/resources/business/resources/profile/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/business/resources/profile/client/requests/index.js +3 -0
- package/dist/cjs/api/resources/business/resources/profile/resources/logo/client/requests/UploadLogoRequest.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/temporaryLocations/client/requests/StoreTemporaryLocationRequest.d.ts +1 -1
- package/dist/cjs/api/resources/business/resources/temporaryLocations/client/requests/UpdateTemporaryLocationRequest.d.ts +1 -1
- package/dist/cjs/api/resources/customer/resources/auth/client/Client.d.ts +19 -0
- package/dist/cjs/api/resources/customer/resources/auth/client/Client.js +62 -0
- package/dist/cjs/api/resources/customer/resources/auth/client/requests/DeleteAccountRequest.d.ts +9 -0
- package/dist/cjs/api/resources/customer/resources/auth/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/customer/resources/auth/types/DeleteAccountAuthResponse.d.ts +3 -0
- package/dist/cjs/api/resources/customer/resources/auth/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/customer/resources/auth/types/index.js +1 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/client/requests/StoreBusinessSubmissionRequest.d.ts +22 -2
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/client/requests/StoreBusinessSubmissionRequest.js +21 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/client/requests/index.js +3 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/resources/photos/client/requests/UploadSubmissionPhotoRequest.d.ts +1 -0
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/resources/photos/types/UploadPhotosResponse.d.ts +5 -1
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/types/CreateBusinessSubmissionsResponse.d.ts +5 -1
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/types/GetBusinessSubmissionsResponse.d.ts +5 -1
- package/dist/cjs/api/resources/customer/resources/businessSubmissions/types/ListBusinessSubmissionsResponse.d.ts +6 -1
- package/dist/cjs/api/resources/customer/resources/cart/types/GetShippingOptionsCartResponse.d.ts +1 -1
- package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/ConfirmOrderTicketingResponse.d.ts +5 -1
- package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/CreatePaymentIntentTicketingResponse.d.ts +7 -7
- package/dist/cjs/api/resources/customer/resources/me/client/Client.d.ts +21 -1
- package/dist/cjs/api/resources/customer/resources/me/client/Client.js +75 -8
- package/dist/cjs/api/resources/customer/resources/me/client/requests/FavoritesMeRequest.d.ts +8 -4
- package/dist/cjs/api/resources/customer/resources/me/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/index.js +4 -1
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/client/Client.d.ts +122 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/client/Client.js +428 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/client/index.js +17 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/client/requests/DeleteListsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/client/requests/DeleteListsRequest.js +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/client/requests/GetListsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/client/requests/GetListsRequest.js +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/client/requests/MembershipsListsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/client/requests/MembershipsListsRequest.js +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/client/requests/StoreBusinessListRequest.d.ts +11 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/client/requests/StoreBusinessListRequest.js +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/client/requests/UpdateBusinessListRequest.d.ts +14 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/client/requests/UpdateBusinessListRequest.js +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/client/requests/index.d.ts +5 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/exports.d.ts +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/exports.js +22 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/index.d.ts +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/index.js +19 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/resources/index.js +42 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/resources/items/client/Client.d.ts +73 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/resources/items/client/Client.js +266 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/resources/items/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/resources/items/client/index.js +17 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/resources/items/client/requests/AddListItemRequest.d.ts +13 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/resources/items/client/requests/AddListItemRequest.js +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/resources/items/client/requests/RemoveItemsRequest.d.ts +13 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/resources/items/client/requests/RemoveItemsRequest.js +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/resources/items/client/requests/UpdateListItemNoteRequest.d.ts +14 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/resources/items/client/requests/UpdateListItemNoteRequest.js +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/resources/items/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/resources/items/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/resources/items/exports.d.ts +2 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/resources/items/exports.js +21 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/resources/items/index.d.ts +2 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/resources/items/index.js +18 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/resources/items/types/AddItemsResponse.d.ts +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/resources/items/types/AddItemsResponse.js +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/resources/items/types/UpdateNoteItemsResponse.d.ts +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/resources/items/types/UpdateNoteItemsResponse.js +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/resources/items/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/resources/items/types/index.js +18 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/types/CreateListsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/types/CreateListsResponse.js +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/types/GetListsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/types/GetListsResponse.js +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/types/ListListsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/types/ListListsResponse.js +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/types/MembershipsListsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/types/MembershipsListsResponse.js +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/types/UpdateListsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/types/UpdateListsResponse.js +3 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/types/index.d.ts +5 -0
- package/dist/cjs/api/resources/customer/resources/me/resources/lists/types/index.js +21 -0
- package/dist/cjs/api/resources/customer/resources/me/types/FavoriteFacetsMeResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/me/types/FavoriteFacetsMeResponse.js +3 -0
- package/dist/cjs/api/resources/customer/resources/me/types/FavoritesMeRequestSort.d.ts +6 -0
- package/dist/cjs/api/resources/customer/resources/me/types/FavoritesMeRequestSort.js +9 -0
- package/dist/cjs/api/resources/customer/resources/me/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/customer/resources/me/types/index.js +2 -0
- package/dist/cjs/api/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/index.js +4 -1
- package/dist/cjs/api/resources/publicLists/client/Client.d.ts +34 -0
- package/dist/cjs/api/resources/publicLists/client/Client.js +116 -0
- package/dist/cjs/api/resources/publicLists/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/publicLists/client/index.js +17 -0
- package/dist/cjs/api/resources/publicLists/client/requests/GetPublicListsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/publicLists/client/requests/GetPublicListsRequest.js +3 -0
- package/dist/cjs/api/resources/publicLists/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/publicLists/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/publicLists/exports.d.ts +2 -0
- package/dist/cjs/api/resources/publicLists/exports.js +21 -0
- package/dist/cjs/api/resources/publicLists/index.d.ts +2 -0
- package/dist/cjs/api/resources/publicLists/index.js +18 -0
- package/dist/cjs/api/resources/publicLists/types/GetPublicListsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/publicLists/types/GetPublicListsResponse.js +3 -0
- package/dist/cjs/api/resources/publicLists/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/publicLists/types/index.js +17 -0
- package/dist/cjs/api/types/Address.d.ts +2 -2
- package/dist/cjs/api/types/BusinessAllergen.d.ts +2 -2
- package/dist/cjs/api/types/BusinessBulletin.d.ts +6 -6
- package/dist/cjs/api/types/BusinessConversation.d.ts +1 -1
- package/dist/cjs/api/types/BusinessEvent.d.ts +11 -11
- package/dist/cjs/api/types/BusinessEventRsvp.d.ts +3 -3
- package/dist/cjs/api/types/BusinessEventTicketType.d.ts +11 -11
- package/dist/cjs/api/types/BusinessList.d.ts +11 -0
- package/dist/cjs/api/types/BusinessList.js +3 -0
- package/dist/cjs/api/types/BusinessListCollection.d.ts +4 -0
- package/dist/cjs/api/types/BusinessListCollection.js +3 -0
- package/dist/cjs/api/types/BusinessListDetail.d.ts +12 -0
- package/dist/cjs/api/types/BusinessListDetail.js +3 -0
- package/dist/cjs/api/types/BusinessListItem.d.ts +7 -0
- package/dist/cjs/api/types/BusinessListItem.js +3 -0
- package/dist/cjs/api/types/BusinessListMembership.d.ts +14 -0
- package/dist/cjs/api/types/BusinessListMembership.js +3 -0
- package/dist/cjs/api/types/BusinessMenu.d.ts +2 -2
- package/dist/cjs/api/types/BusinessMenuGroup.d.ts +2 -2
- package/dist/cjs/api/types/BusinessMenuItem.d.ts +6 -24
- package/dist/cjs/api/types/BusinessMenuItemModifier.d.ts +3 -3
- package/dist/cjs/api/types/BusinessMenuItemVariation.d.ts +4 -4
- package/dist/cjs/api/types/BusinessProfile.d.ts +1 -1
- package/dist/cjs/api/types/BusinessStand.d.ts +2 -2
- package/dist/cjs/api/types/BusinessStripeConnection.d.ts +15 -15
- package/dist/cjs/api/types/BusinessTemporaryLocation.d.ts +2 -2
- package/dist/cjs/api/types/CartResource.d.ts +2 -2
- package/dist/cjs/api/types/Conversation.d.ts +1 -1
- package/dist/cjs/api/types/CustomerBulletin.d.ts +1 -1
- package/dist/cjs/api/types/CustomerComment.d.ts +2 -2
- package/dist/cjs/api/types/CustomerDiscoveryAllergen.d.ts +2 -2
- package/dist/cjs/api/types/CustomerEvent.d.ts +1 -1
- package/dist/cjs/api/types/CustomerEventRsvp.d.ts +2 -2
- package/dist/cjs/api/types/CustomerEventTicketType.d.ts +2 -2
- package/dist/cjs/api/types/DiscoveryBusiness.d.ts +3 -3
- package/dist/cjs/api/types/FavoriteFacets.d.ts +34 -0
- package/dist/cjs/api/types/FavoriteFacets.js +3 -0
- package/dist/cjs/api/types/ProductResource.d.ts +5 -5
- package/dist/cjs/api/types/PublicBusinessList.d.ts +10 -0
- package/dist/cjs/api/types/PublicBusinessList.js +3 -0
- package/dist/cjs/api/types/ShippingAccountResource.d.ts +5 -5
- package/dist/cjs/api/types/Transaction.d.ts +2 -2
- package/dist/cjs/api/types/index.d.ts +7 -2
- package/dist/cjs/api/types/index.js +7 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +3 -0
- package/dist/esm/Client.mjs +5 -0
- package/dist/esm/api/resources/business/resources/businesses/client/requests/StoreBusinessRequest.d.mts +1 -1
- package/dist/esm/api/resources/business/resources/businesses/client/requests/UpdateBusinessRequest.d.mts +1 -1
- package/dist/esm/api/resources/business/resources/events/client/requests/UploadEventImageRequest.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/gallery/client/requests/StoreGalleryPhotoRequest.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/productOrders/types/GetLabelRatesProductOrdersResponseItem.d.mts +1 -1
- package/dist/esm/api/resources/business/resources/profile/client/requests/UpdateBusinessProfileRequest.d.mts +22 -2
- package/dist/esm/api/resources/business/resources/profile/client/requests/UpdateBusinessProfileRequest.mjs +20 -1
- package/dist/esm/api/resources/business/resources/profile/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/business/resources/profile/client/requests/index.mjs +1 -1
- package/dist/esm/api/resources/business/resources/profile/resources/logo/client/requests/UploadLogoRequest.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/temporaryLocations/client/requests/StoreTemporaryLocationRequest.d.mts +1 -1
- package/dist/esm/api/resources/business/resources/temporaryLocations/client/requests/UpdateTemporaryLocationRequest.d.mts +1 -1
- package/dist/esm/api/resources/customer/resources/auth/client/Client.d.mts +19 -0
- package/dist/esm/api/resources/customer/resources/auth/client/Client.mjs +62 -0
- package/dist/esm/api/resources/customer/resources/auth/client/requests/DeleteAccountRequest.d.mts +9 -0
- package/dist/esm/api/resources/customer/resources/auth/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/customer/resources/auth/types/DeleteAccountAuthResponse.d.mts +3 -0
- package/dist/esm/api/resources/customer/resources/auth/types/index.d.mts +1 -0
- package/dist/esm/api/resources/customer/resources/auth/types/index.mjs +1 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/client/requests/StoreBusinessSubmissionRequest.d.mts +22 -2
- package/dist/esm/api/resources/customer/resources/businessSubmissions/client/requests/StoreBusinessSubmissionRequest.mjs +20 -1
- package/dist/esm/api/resources/customer/resources/businessSubmissions/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/customer/resources/businessSubmissions/client/requests/index.mjs +1 -1
- package/dist/esm/api/resources/customer/resources/businessSubmissions/resources/photos/client/requests/UploadSubmissionPhotoRequest.d.mts +1 -0
- package/dist/esm/api/resources/customer/resources/businessSubmissions/resources/photos/types/UploadPhotosResponse.d.mts +5 -1
- package/dist/esm/api/resources/customer/resources/businessSubmissions/types/CreateBusinessSubmissionsResponse.d.mts +5 -1
- package/dist/esm/api/resources/customer/resources/businessSubmissions/types/GetBusinessSubmissionsResponse.d.mts +5 -1
- package/dist/esm/api/resources/customer/resources/businessSubmissions/types/ListBusinessSubmissionsResponse.d.mts +6 -1
- package/dist/esm/api/resources/customer/resources/cart/types/GetShippingOptionsCartResponse.d.mts +1 -1
- package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/ConfirmOrderTicketingResponse.d.mts +5 -1
- package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/CreatePaymentIntentTicketingResponse.d.mts +7 -7
- package/dist/esm/api/resources/customer/resources/me/client/Client.d.mts +21 -1
- package/dist/esm/api/resources/customer/resources/me/client/Client.mjs +69 -2
- package/dist/esm/api/resources/customer/resources/me/client/requests/FavoritesMeRequest.d.mts +8 -4
- package/dist/esm/api/resources/customer/resources/me/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/customer/resources/me/resources/index.mjs +3 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/client/Client.d.mts +122 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/client/Client.mjs +391 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/client/index.d.mts +1 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/client/index.mjs +1 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/client/requests/DeleteListsRequest.d.mts +10 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/client/requests/DeleteListsRequest.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/client/requests/GetListsRequest.d.mts +10 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/client/requests/GetListsRequest.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/client/requests/MembershipsListsRequest.d.mts +10 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/client/requests/MembershipsListsRequest.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/client/requests/StoreBusinessListRequest.d.mts +11 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/client/requests/StoreBusinessListRequest.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/client/requests/UpdateBusinessListRequest.d.mts +14 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/client/requests/UpdateBusinessListRequest.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/client/requests/index.d.mts +5 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/exports.d.mts +3 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/exports.mjs +4 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/index.d.mts +3 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/index.mjs +3 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/resources/index.mjs +3 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/resources/items/client/Client.d.mts +73 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/resources/items/client/Client.mjs +229 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/resources/items/client/index.d.mts +1 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/resources/items/client/index.mjs +1 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/resources/items/client/requests/AddListItemRequest.d.mts +13 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/resources/items/client/requests/AddListItemRequest.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/resources/items/client/requests/RemoveItemsRequest.d.mts +13 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/resources/items/client/requests/RemoveItemsRequest.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/resources/items/client/requests/UpdateListItemNoteRequest.d.mts +14 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/resources/items/client/requests/UpdateListItemNoteRequest.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/resources/items/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/resources/items/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/resources/items/exports.d.mts +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/resources/items/exports.mjs +3 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/resources/items/index.d.mts +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/resources/items/index.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/resources/items/types/AddItemsResponse.d.mts +3 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/resources/items/types/AddItemsResponse.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/resources/items/types/UpdateNoteItemsResponse.d.mts +3 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/resources/items/types/UpdateNoteItemsResponse.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/resources/items/types/index.d.mts +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/resources/items/types/index.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/types/CreateListsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/types/CreateListsResponse.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/types/GetListsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/types/GetListsResponse.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/types/ListListsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/types/ListListsResponse.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/types/MembershipsListsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/types/MembershipsListsResponse.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/types/UpdateListsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/types/UpdateListsResponse.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/types/index.d.mts +5 -0
- package/dist/esm/api/resources/customer/resources/me/resources/lists/types/index.mjs +5 -0
- package/dist/esm/api/resources/customer/resources/me/types/FavoriteFacetsMeResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/me/types/FavoriteFacetsMeResponse.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/me/types/FavoritesMeRequestSort.d.mts +6 -0
- package/dist/esm/api/resources/customer/resources/me/types/FavoritesMeRequestSort.mjs +6 -0
- package/dist/esm/api/resources/customer/resources/me/types/index.d.mts +2 -0
- package/dist/esm/api/resources/customer/resources/me/types/index.mjs +2 -0
- package/dist/esm/api/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/index.mjs +3 -0
- package/dist/esm/api/resources/publicLists/client/Client.d.mts +34 -0
- package/dist/esm/api/resources/publicLists/client/Client.mjs +79 -0
- package/dist/esm/api/resources/publicLists/client/index.d.mts +1 -0
- package/dist/esm/api/resources/publicLists/client/index.mjs +1 -0
- package/dist/esm/api/resources/publicLists/client/requests/GetPublicListsRequest.d.mts +10 -0
- package/dist/esm/api/resources/publicLists/client/requests/GetPublicListsRequest.mjs +2 -0
- package/dist/esm/api/resources/publicLists/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/publicLists/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/publicLists/exports.d.mts +2 -0
- package/dist/esm/api/resources/publicLists/exports.mjs +3 -0
- package/dist/esm/api/resources/publicLists/index.d.mts +2 -0
- package/dist/esm/api/resources/publicLists/index.mjs +2 -0
- package/dist/esm/api/resources/publicLists/types/GetPublicListsResponse.d.mts +4 -0
- package/dist/esm/api/resources/publicLists/types/GetPublicListsResponse.mjs +2 -0
- package/dist/esm/api/resources/publicLists/types/index.d.mts +1 -0
- package/dist/esm/api/resources/publicLists/types/index.mjs +1 -0
- package/dist/esm/api/types/Address.d.mts +2 -2
- package/dist/esm/api/types/BusinessAllergen.d.mts +2 -2
- package/dist/esm/api/types/BusinessBulletin.d.mts +6 -6
- package/dist/esm/api/types/BusinessConversation.d.mts +1 -1
- package/dist/esm/api/types/BusinessEvent.d.mts +11 -11
- package/dist/esm/api/types/BusinessEventRsvp.d.mts +3 -3
- package/dist/esm/api/types/BusinessEventTicketType.d.mts +11 -11
- package/dist/esm/api/types/BusinessList.d.mts +11 -0
- package/dist/esm/api/types/BusinessList.mjs +2 -0
- package/dist/esm/api/types/BusinessListCollection.d.mts +4 -0
- package/dist/esm/api/types/BusinessListCollection.mjs +2 -0
- package/dist/esm/api/types/BusinessListDetail.d.mts +12 -0
- package/dist/esm/api/types/BusinessListDetail.mjs +2 -0
- package/dist/esm/api/types/BusinessListItem.d.mts +7 -0
- package/dist/esm/api/types/BusinessListItem.mjs +2 -0
- package/dist/esm/api/types/BusinessListMembership.d.mts +14 -0
- package/dist/esm/api/types/BusinessListMembership.mjs +2 -0
- package/dist/esm/api/types/BusinessMenu.d.mts +2 -2
- package/dist/esm/api/types/BusinessMenuGroup.d.mts +2 -2
- package/dist/esm/api/types/BusinessMenuItem.d.mts +6 -24
- package/dist/esm/api/types/BusinessMenuItemModifier.d.mts +3 -3
- package/dist/esm/api/types/BusinessMenuItemVariation.d.mts +4 -4
- package/dist/esm/api/types/BusinessProfile.d.mts +1 -1
- package/dist/esm/api/types/BusinessStand.d.mts +2 -2
- package/dist/esm/api/types/BusinessStripeConnection.d.mts +15 -15
- package/dist/esm/api/types/BusinessTemporaryLocation.d.mts +2 -2
- package/dist/esm/api/types/CartResource.d.mts +2 -2
- package/dist/esm/api/types/Conversation.d.mts +1 -1
- package/dist/esm/api/types/CustomerBulletin.d.mts +1 -1
- package/dist/esm/api/types/CustomerComment.d.mts +2 -2
- package/dist/esm/api/types/CustomerDiscoveryAllergen.d.mts +2 -2
- package/dist/esm/api/types/CustomerEvent.d.mts +1 -1
- package/dist/esm/api/types/CustomerEventRsvp.d.mts +2 -2
- package/dist/esm/api/types/CustomerEventTicketType.d.mts +2 -2
- package/dist/esm/api/types/DiscoveryBusiness.d.mts +3 -3
- package/dist/esm/api/types/FavoriteFacets.d.mts +34 -0
- package/dist/esm/api/types/FavoriteFacets.mjs +2 -0
- package/dist/esm/api/types/ProductResource.d.mts +5 -5
- package/dist/esm/api/types/PublicBusinessList.d.mts +10 -0
- package/dist/esm/api/types/PublicBusinessList.mjs +2 -0
- package/dist/esm/api/types/ShippingAccountResource.d.mts +5 -5
- package/dist/esm/api/types/Transaction.d.mts +2 -2
- package/dist/esm/api/types/index.d.mts +7 -2
- package/dist/esm/api/types/index.mjs +7 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +34 -1
- package/reference.md +857 -61
- package/dist/cjs/api/types/Allergen.d.ts +0 -10
- package/dist/cjs/api/types/Image.d.ts +0 -16
- package/dist/esm/api/types/Allergen.d.mts +0 -10
- package/dist/esm/api/types/Image.d.mts +0 -16
- /package/dist/cjs/api/{types/Allergen.js → resources/customer/resources/auth/client/requests/DeleteAccountRequest.js} +0 -0
- /package/dist/cjs/api/{types/Image.js → resources/customer/resources/auth/types/DeleteAccountAuthResponse.js} +0 -0
- /package/dist/esm/api/{types/Allergen.mjs → resources/customer/resources/auth/client/requests/DeleteAccountRequest.mjs} +0 -0
- /package/dist/esm/api/{types/Image.mjs → resources/customer/resources/auth/types/DeleteAccountAuthResponse.mjs} +0 -0
|
@@ -0,0 +1,229 @@
|
|
|
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 ItemsClient {
|
|
30
|
+
constructor(options = {}) {
|
|
31
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Save a business to one of the authenticated user's lists, with an
|
|
35
|
+
* optional note. Idempotent: adding a business already in the list leaves
|
|
36
|
+
* the existing entry and its note untouched.
|
|
37
|
+
*
|
|
38
|
+
* @param {FiveOneEat.customer.me.lists.AddListItemRequest} request
|
|
39
|
+
* @param {ItemsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
40
|
+
*
|
|
41
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
42
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
43
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
44
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* await client.customer.me.lists.items.add({
|
|
48
|
+
* businessList: "businessList",
|
|
49
|
+
* business: "business"
|
|
50
|
+
* })
|
|
51
|
+
*/
|
|
52
|
+
add(request, requestOptions) {
|
|
53
|
+
return core.HttpResponsePromise.fromPromise(this.__add(request, requestOptions));
|
|
54
|
+
}
|
|
55
|
+
__add(request, requestOptions) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
58
|
+
const { businessList } = request, _body = __rest(request, ["businessList"]);
|
|
59
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
60
|
+
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);
|
|
61
|
+
const _response = yield core.fetcher({
|
|
62
|
+
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/lists/${core.url.encodePathParam(businessList)}/items`),
|
|
63
|
+
method: "POST",
|
|
64
|
+
headers: _headers,
|
|
65
|
+
contentType: "application/json",
|
|
66
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
67
|
+
requestType: "json",
|
|
68
|
+
body: _body,
|
|
69
|
+
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,
|
|
70
|
+
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,
|
|
71
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
72
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
73
|
+
logging: this._options.logging,
|
|
74
|
+
});
|
|
75
|
+
if (_response.ok) {
|
|
76
|
+
return {
|
|
77
|
+
data: _response.body,
|
|
78
|
+
rawResponse: _response.rawResponse,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
if (_response.error.reason === "status-code") {
|
|
82
|
+
switch (_response.error.statusCode) {
|
|
83
|
+
case 401:
|
|
84
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
85
|
+
case 403:
|
|
86
|
+
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
87
|
+
case 404:
|
|
88
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
89
|
+
case 422:
|
|
90
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
91
|
+
default:
|
|
92
|
+
throw new errors.FiveOneEatError({
|
|
93
|
+
statusCode: _response.error.statusCode,
|
|
94
|
+
body: _response.error.body,
|
|
95
|
+
rawResponse: _response.rawResponse,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/customer/lists/{businessList}/items");
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Remove a business and its note from a list. The business itself is
|
|
104
|
+
* unaffected.
|
|
105
|
+
*
|
|
106
|
+
* @param {FiveOneEat.customer.me.lists.RemoveItemsRequest} request
|
|
107
|
+
* @param {ItemsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
108
|
+
*
|
|
109
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
110
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
111
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* await client.customer.me.lists.items.remove({
|
|
115
|
+
* businessList: "businessList",
|
|
116
|
+
* business: "katzs-deli"
|
|
117
|
+
* })
|
|
118
|
+
*/
|
|
119
|
+
remove(request, requestOptions) {
|
|
120
|
+
return core.HttpResponsePromise.fromPromise(this.__remove(request, requestOptions));
|
|
121
|
+
}
|
|
122
|
+
__remove(request, requestOptions) {
|
|
123
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
124
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
125
|
+
const { businessList, business } = request;
|
|
126
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
127
|
+
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);
|
|
128
|
+
const _response = yield core.fetcher({
|
|
129
|
+
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/lists/${core.url.encodePathParam(businessList)}/items/${core.url.encodePathParam(business)}`),
|
|
130
|
+
method: "DELETE",
|
|
131
|
+
headers: _headers,
|
|
132
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
133
|
+
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,
|
|
134
|
+
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,
|
|
135
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
136
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
137
|
+
logging: this._options.logging,
|
|
138
|
+
});
|
|
139
|
+
if (_response.ok) {
|
|
140
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
141
|
+
}
|
|
142
|
+
if (_response.error.reason === "status-code") {
|
|
143
|
+
switch (_response.error.statusCode) {
|
|
144
|
+
case 401:
|
|
145
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
146
|
+
case 403:
|
|
147
|
+
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
148
|
+
case 404:
|
|
149
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
150
|
+
default:
|
|
151
|
+
throw new errors.FiveOneEatError({
|
|
152
|
+
statusCode: _response.error.statusCode,
|
|
153
|
+
body: _response.error.body,
|
|
154
|
+
rawResponse: _response.rawResponse,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/customer/lists/{businessList}/items/{business}");
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Change the note attached to one business within one list. Notes are
|
|
163
|
+
* per-list, so the same business can carry a different note elsewhere.
|
|
164
|
+
*
|
|
165
|
+
* @param {FiveOneEat.customer.me.lists.UpdateListItemNoteRequest} request
|
|
166
|
+
* @param {ItemsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
167
|
+
*
|
|
168
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
169
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
170
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
171
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
172
|
+
*
|
|
173
|
+
* @example
|
|
174
|
+
* await client.customer.me.lists.items.updateNote({
|
|
175
|
+
* businessList: "businessList",
|
|
176
|
+
* business: "katzs-deli"
|
|
177
|
+
* })
|
|
178
|
+
*/
|
|
179
|
+
updateNote(request, requestOptions) {
|
|
180
|
+
return core.HttpResponsePromise.fromPromise(this.__updateNote(request, requestOptions));
|
|
181
|
+
}
|
|
182
|
+
__updateNote(request, requestOptions) {
|
|
183
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
184
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
185
|
+
const { businessList, business } = request, _body = __rest(request, ["businessList", "business"]);
|
|
186
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
187
|
+
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);
|
|
188
|
+
const _response = yield core.fetcher({
|
|
189
|
+
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/lists/${core.url.encodePathParam(businessList)}/items/${core.url.encodePathParam(business)}`),
|
|
190
|
+
method: "PATCH",
|
|
191
|
+
headers: _headers,
|
|
192
|
+
contentType: "application/json",
|
|
193
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
194
|
+
requestType: "json",
|
|
195
|
+
body: _body,
|
|
196
|
+
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,
|
|
197
|
+
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,
|
|
198
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
199
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
200
|
+
logging: this._options.logging,
|
|
201
|
+
});
|
|
202
|
+
if (_response.ok) {
|
|
203
|
+
return {
|
|
204
|
+
data: _response.body,
|
|
205
|
+
rawResponse: _response.rawResponse,
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
if (_response.error.reason === "status-code") {
|
|
209
|
+
switch (_response.error.statusCode) {
|
|
210
|
+
case 401:
|
|
211
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
212
|
+
case 403:
|
|
213
|
+
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
214
|
+
case 404:
|
|
215
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
216
|
+
case 422:
|
|
217
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
218
|
+
default:
|
|
219
|
+
throw new errors.FiveOneEatError({
|
|
220
|
+
statusCode: _response.error.statusCode,
|
|
221
|
+
body: _response.error.body,
|
|
222
|
+
rawResponse: _response.rawResponse,
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/customer/lists/{businessList}/items/{business}");
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* businessList: "businessList",
|
|
5
|
+
* business: "katzs-deli"
|
|
6
|
+
* }
|
|
7
|
+
*/
|
|
8
|
+
export interface UpdateListItemNoteRequest {
|
|
9
|
+
/** The list uuid */
|
|
10
|
+
businessList: string;
|
|
11
|
+
/** The business handle */
|
|
12
|
+
business: string;
|
|
13
|
+
note?: string | null;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -5,3 +5,6 @@ export * from "./customer/types/index.mjs";
|
|
|
5
5
|
export * from "./customerStands/client/requests/index.mjs";
|
|
6
6
|
export * as customerStands from "./customerStands/index.mjs";
|
|
7
7
|
export * from "./customerStands/types/index.mjs";
|
|
8
|
+
export * from "./publicLists/client/requests/index.mjs";
|
|
9
|
+
export * as publicLists from "./publicLists/index.mjs";
|
|
10
|
+
export * from "./publicLists/types/index.mjs";
|
|
@@ -5,3 +5,6 @@ export * from "./customer/types/index.mjs";
|
|
|
5
5
|
export * from "./customerStands/client/requests/index.mjs";
|
|
6
6
|
export * as customerStands from "./customerStands/index.mjs";
|
|
7
7
|
export * from "./customerStands/types/index.mjs";
|
|
8
|
+
export * from "./publicLists/client/requests/index.mjs";
|
|
9
|
+
export * as publicLists from "./publicLists/index.mjs";
|
|
10
|
+
export * from "./publicLists/types/index.mjs";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
3
|
+
import * as core from "../../../../core/index.mjs";
|
|
4
|
+
import * as FiveOneEat from "../../../index.mjs";
|
|
5
|
+
export declare namespace PublicListsClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class PublicListsClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<PublicListsClient.Options>;
|
|
12
|
+
constructor(options?: PublicListsClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Read a publicly shared list. No authentication required — this is what a
|
|
15
|
+
* share link resolves to.
|
|
16
|
+
*
|
|
17
|
+
* A private list returns 404 rather than 403: a 403 would confirm the list
|
|
18
|
+
* exists, which is more than a stranger should learn from a guessed URL.
|
|
19
|
+
* Items exclude delisted businesses, so a business that has left the
|
|
20
|
+
* platform cannot leak through someone's shared link.
|
|
21
|
+
*
|
|
22
|
+
* @param {FiveOneEat.GetPublicListsRequest} request
|
|
23
|
+
* @param {PublicListsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
24
|
+
*
|
|
25
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* await client.publicLists.get({
|
|
29
|
+
* businessList: "businessList"
|
|
30
|
+
* })
|
|
31
|
+
*/
|
|
32
|
+
get(request: FiveOneEat.GetPublicListsRequest, requestOptions?: PublicListsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.GetPublicListsResponse>;
|
|
33
|
+
private __get;
|
|
34
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
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
|
+
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
|
+
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
13
|
+
import * as core from "../../../../core/index.mjs";
|
|
14
|
+
import * as environments from "../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
|
+
import * as errors from "../../../../errors/index.mjs";
|
|
17
|
+
import * as FiveOneEat from "../../../index.mjs";
|
|
18
|
+
export class PublicListsClient {
|
|
19
|
+
constructor(options = {}) {
|
|
20
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Read a publicly shared list. No authentication required — this is what a
|
|
24
|
+
* share link resolves to.
|
|
25
|
+
*
|
|
26
|
+
* A private list returns 404 rather than 403: a 403 would confirm the list
|
|
27
|
+
* exists, which is more than a stranger should learn from a guessed URL.
|
|
28
|
+
* Items exclude delisted businesses, so a business that has left the
|
|
29
|
+
* platform cannot leak through someone's shared link.
|
|
30
|
+
*
|
|
31
|
+
* @param {FiveOneEat.GetPublicListsRequest} request
|
|
32
|
+
* @param {PublicListsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
33
|
+
*
|
|
34
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* await client.publicLists.get({
|
|
38
|
+
* businessList: "businessList"
|
|
39
|
+
* })
|
|
40
|
+
*/
|
|
41
|
+
get(request, requestOptions) {
|
|
42
|
+
return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));
|
|
43
|
+
}
|
|
44
|
+
__get(request, requestOptions) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
47
|
+
const { businessList } = request;
|
|
48
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
49
|
+
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);
|
|
50
|
+
const _response = yield core.fetcher({
|
|
51
|
+
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, `public/lists/${core.url.encodePathParam(businessList)}`),
|
|
52
|
+
method: "GET",
|
|
53
|
+
headers: _headers,
|
|
54
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
55
|
+
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,
|
|
56
|
+
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,
|
|
57
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
58
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
59
|
+
logging: this._options.logging,
|
|
60
|
+
});
|
|
61
|
+
if (_response.ok) {
|
|
62
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
63
|
+
}
|
|
64
|
+
if (_response.error.reason === "status-code") {
|
|
65
|
+
switch (_response.error.statusCode) {
|
|
66
|
+
case 404:
|
|
67
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
68
|
+
default:
|
|
69
|
+
throw new errors.FiveOneEatError({
|
|
70
|
+
statusCode: _response.error.statusCode,
|
|
71
|
+
body: _response.error.body,
|
|
72
|
+
rawResponse: _response.rawResponse,
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/public/lists/{businessList}");
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { GetPublicListsRequest } from "./GetPublicListsRequest.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|