@51eat/sdk 0.0.61 → 0.0.63
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 +13 -15
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +9 -0
- package/dist/cjs/Client.js +35 -20
- package/dist/cjs/api/resources/business/resources/bulletins/client/Client.d.ts +7 -0
- package/dist/cjs/api/resources/business/resources/bulletins/client/Client.js +21 -0
- package/dist/cjs/api/resources/business/resources/businesses/client/requests/StoreBusinessRequest.d.ts +0 -12
- package/dist/cjs/api/resources/business/resources/businesses/client/requests/UpdateBusinessRequest.d.ts +0 -12
- package/dist/cjs/api/resources/business/resources/events/client/Client.d.ts +8 -0
- package/dist/cjs/api/resources/business/resources/events/client/Client.js +24 -0
- package/dist/cjs/api/resources/business/resources/events/client/requests/StoreEventRequest.d.ts +1 -1
- package/dist/cjs/api/resources/business/resources/events/client/requests/UpdateEventRequest.d.ts +1 -1
- package/dist/cjs/api/resources/business/resources/events/resources/checkIn/client/Client.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/events/resources/checkIn/client/Client.js +6 -0
- package/dist/cjs/api/resources/business/resources/events/resources/orders/client/Client.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/events/resources/orders/client/Client.js +6 -0
- package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/client/Client.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/client/Client.js +6 -0
- package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/client/requests/StoreTicketTypeRequest.d.ts +1 -1
- package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/client/requests/UpdateTicketTypeRequest.d.ts +1 -1
- package/dist/cjs/api/resources/business/resources/menus/client/Client.d.ts +5 -0
- package/dist/cjs/api/resources/business/resources/menus/client/Client.js +15 -0
- package/dist/cjs/api/resources/business/resources/menus/resources/groups/client/Client.d.ts +5 -2
- package/dist/cjs/api/resources/business/resources/menus/resources/groups/client/Client.js +10 -1
- package/dist/cjs/api/resources/business/resources/menus/resources/groups/client/requests/{ReorderGroupsRequest.d.ts → ReorderMenuGroupsRequest.d.ts} +3 -3
- package/dist/cjs/api/resources/business/resources/menus/resources/groups/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/business/resources/menus/resources/items/client/Client.d.ts +7 -4
- package/dist/cjs/api/resources/business/resources/menus/resources/items/client/Client.js +11 -2
- package/dist/{esm/api/resources/business/resources/menus/resources/items/client/requests/MoveItemsRequest.d.mts → cjs/api/resources/business/resources/menus/resources/items/client/requests/MoveMenuItemRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/business/resources/menus/resources/items/client/requests/{ReorderItemsRequest.d.ts → ReorderMenuItemsRequest.d.ts} +3 -3
- package/dist/cjs/api/resources/business/resources/menus/resources/items/client/requests/index.d.ts +2 -2
- package/dist/cjs/api/resources/business/resources/menus/resources/items/resources/modifiers/client/Client.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/menus/resources/items/resources/modifiers/client/Client.js +6 -0
- package/dist/cjs/api/resources/business/resources/menus/resources/items/resources/variations/client/Client.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/menus/resources/items/resources/variations/client/Client.js +6 -0
- package/dist/cjs/api/resources/business/resources/productCategories/client/Client.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/productCategories/client/Client.js +12 -0
- package/dist/cjs/api/resources/business/resources/products/client/Client.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/products/client/Client.js +12 -0
- package/dist/cjs/api/resources/business/resources/products/resources/images/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/products/resources/images/client/Client.js +3 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/client/Client.js +3 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/products/resources/variants/resources/images/client/Client.js +3 -0
- package/dist/cjs/api/resources/business/resources/profile/client/requests/UpdateBusinessProfileRequest.d.ts +0 -13
- package/dist/cjs/api/resources/businessHours/client/Client.d.ts +91 -0
- package/dist/cjs/api/resources/businessHours/client/Client.js +361 -0
- package/dist/cjs/api/resources/businessHours/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/businessHours/client/index.js +17 -0
- package/dist/cjs/api/resources/businessHours/client/requests/DeleteBusinessHourExceptionRequest.d.ts +10 -0
- package/dist/cjs/api/resources/businessHours/client/requests/DeleteBusinessHourExceptionRequest.js +3 -0
- package/dist/cjs/api/resources/businessHours/client/requests/StoreBusinessHourExceptionRequest.d.ts +16 -0
- package/dist/cjs/api/resources/businessHours/client/requests/StoreBusinessHourExceptionRequest.js +3 -0
- package/dist/cjs/api/resources/businessHours/client/requests/UpdateBusinessHourExceptionRequest.d.ts +19 -0
- package/dist/cjs/api/resources/businessHours/client/requests/UpdateBusinessHourExceptionRequest.js +3 -0
- package/dist/cjs/api/resources/businessHours/client/requests/UpdateBusinessHoursRequest.d.ts +25 -0
- package/dist/cjs/api/resources/businessHours/client/requests/UpdateBusinessHoursRequest.js +3 -0
- package/dist/cjs/api/resources/businessHours/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/businessHours/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/businessHours/exports.d.ts +2 -0
- package/dist/cjs/api/resources/businessHours/exports.js +21 -0
- package/dist/cjs/api/resources/businessHours/index.d.ts +2 -0
- package/dist/cjs/api/resources/businessHours/index.js +18 -0
- package/dist/cjs/api/resources/businessHours/types/CreateBusinessHourExceptionResponse.d.ts +4 -0
- package/dist/cjs/api/resources/businessHours/types/CreateBusinessHourExceptionResponse.js +3 -0
- package/dist/cjs/api/resources/businessHours/types/GetBusinessHoursResponse.d.ts +4 -0
- package/dist/cjs/api/resources/businessHours/types/GetBusinessHoursResponse.js +3 -0
- package/dist/cjs/api/resources/businessHours/types/UpdateBusinessHourExceptionResponse.d.ts +4 -0
- package/dist/cjs/api/resources/businessHours/types/UpdateBusinessHourExceptionResponse.js +3 -0
- package/dist/cjs/api/resources/businessHours/types/UpdateBusinessHoursResponse.d.ts +4 -0
- package/dist/cjs/api/resources/businessHours/types/UpdateBusinessHoursResponse.js +3 -0
- package/dist/cjs/api/resources/businessHours/types/index.d.ts +4 -0
- package/dist/cjs/api/resources/businessHours/types/index.js +20 -0
- package/dist/cjs/api/resources/businessProducts/client/Client.d.ts +2 -0
- package/dist/cjs/api/resources/businessProducts/client/Client.js +6 -0
- package/dist/cjs/api/resources/businessStands/client/Client.d.ts +106 -0
- package/dist/cjs/api/resources/businessStands/client/Client.js +421 -0
- package/dist/cjs/api/resources/businessStands/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/businessStands/client/index.js +17 -0
- package/dist/cjs/api/resources/businessStands/client/requests/DeleteBusinessStandRequest.d.ts +10 -0
- package/dist/cjs/api/resources/businessStands/client/requests/DeleteBusinessStandRequest.js +3 -0
- package/dist/cjs/api/resources/businessStands/client/requests/GetBusinessStandRequest.d.ts +10 -0
- package/dist/cjs/api/resources/businessStands/client/requests/GetBusinessStandRequest.js +3 -0
- package/dist/cjs/api/resources/businessStands/client/requests/StoreStandRequest.d.ts +18 -0
- package/dist/cjs/api/resources/businessStands/client/requests/StoreStandRequest.js +3 -0
- package/dist/cjs/api/resources/businessStands/client/requests/SyncStandProductsRequest.d.ts +12 -0
- package/dist/cjs/api/resources/businessStands/client/requests/SyncStandProductsRequest.js +3 -0
- package/dist/cjs/api/resources/businessStands/client/requests/UpdateStandRequest.d.ts +20 -0
- package/dist/cjs/api/resources/businessStands/client/requests/UpdateStandRequest.js +3 -0
- package/dist/cjs/api/resources/businessStands/client/requests/index.d.ts +5 -0
- package/dist/cjs/api/resources/businessStands/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/businessStands/exports.d.ts +2 -0
- package/dist/cjs/api/resources/businessStands/exports.js +21 -0
- package/dist/cjs/api/resources/businessStands/index.d.ts +2 -0
- package/dist/cjs/api/resources/businessStands/index.js +18 -0
- package/dist/cjs/api/resources/businessStands/types/CreateBusinessStandResponse.d.ts +4 -0
- package/dist/cjs/api/resources/businessStands/types/CreateBusinessStandResponse.js +3 -0
- package/dist/cjs/api/resources/businessStands/types/GetBusinessStandResponse.d.ts +4 -0
- package/dist/cjs/api/resources/businessStands/types/GetBusinessStandResponse.js +3 -0
- package/dist/cjs/api/resources/businessStands/types/ListBusinessStandsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/businessStands/types/ListBusinessStandsResponse.js +3 -0
- package/dist/cjs/api/resources/businessStands/types/UpdateBusinessStandResponse.d.ts +4 -0
- package/dist/cjs/api/resources/businessStands/types/UpdateBusinessStandResponse.js +3 -0
- package/dist/cjs/api/resources/businessStands/types/index.d.ts +4 -0
- package/dist/cjs/api/resources/businessStands/types/index.js +20 -0
- package/dist/cjs/api/resources/customerStands/client/Client.d.ts +63 -0
- package/dist/cjs/api/resources/customerStands/client/Client.js +245 -0
- package/dist/cjs/api/resources/customerStands/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/customerStands/client/index.js +17 -0
- package/dist/cjs/api/resources/customerStands/client/requests/CreateStandPaymentIntentRequest.d.ts +11 -0
- package/dist/cjs/api/resources/customerStands/client/requests/CreateStandPaymentIntentRequest.js +3 -0
- package/dist/cjs/api/resources/customerStands/client/requests/ScanStandRequest.d.ts +10 -0
- package/dist/cjs/api/resources/customerStands/client/requests/ScanStandRequest.js +3 -0
- package/dist/cjs/api/resources/customerStands/client/requests/SelfCheckoutRequest.d.ts +12 -0
- package/dist/cjs/api/resources/customerStands/client/requests/SelfCheckoutRequest.js +3 -0
- package/dist/cjs/api/resources/customerStands/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/customerStands/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/customerStands/exports.d.ts +2 -0
- package/dist/cjs/api/resources/customerStands/exports.js +21 -0
- package/dist/cjs/api/resources/customerStands/index.d.ts +2 -0
- package/dist/cjs/api/resources/customerStands/index.js +18 -0
- package/dist/cjs/api/resources/customerStands/types/CreateStandPaymentIntentResponse.d.ts +6 -0
- package/dist/cjs/api/resources/customerStands/types/CreateStandPaymentIntentResponse.js +3 -0
- package/dist/cjs/api/resources/customerStands/types/ScanStandResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customerStands/types/ScanStandResponse.js +3 -0
- package/dist/cjs/api/resources/customerStands/types/StandCheckoutResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customerStands/types/StandCheckoutResponse.js +3 -0
- package/dist/cjs/api/resources/customerStands/types/index.d.ts +3 -0
- package/dist/cjs/api/resources/customerStands/types/index.js +19 -0
- package/dist/cjs/api/resources/index.d.ts +9 -0
- package/dist/cjs/api/resources/index.js +10 -1
- package/dist/cjs/api/types/BusinessEvent.d.ts +3 -0
- package/dist/cjs/api/types/BusinessHourExceptionResource.d.ts +10 -0
- package/dist/cjs/api/types/BusinessHourExceptionResource.js +3 -0
- package/dist/cjs/api/types/BusinessHourSlotResource.d.ts +6 -0
- package/dist/cjs/api/types/BusinessHourSlotResource.js +3 -0
- package/dist/cjs/api/types/BusinessHoursResource.d.ts +7 -0
- package/dist/cjs/api/types/BusinessHoursResource.js +3 -0
- package/dist/cjs/api/types/BusinessInventoryLog.d.ts +2 -2
- package/dist/cjs/api/types/BusinessMenu.d.ts +1 -0
- package/dist/cjs/api/types/BusinessMenuItem.d.ts +5 -1
- package/dist/cjs/api/types/BusinessProduct.d.ts +14 -0
- package/dist/cjs/api/types/BusinessProductCategory.d.ts +1 -0
- package/dist/cjs/api/types/BusinessProfile.d.ts +6 -9
- package/dist/cjs/api/types/BusinessScheduleDayResource.d.ts +5 -0
- package/dist/cjs/api/types/BusinessScheduleDayResource.js +3 -0
- package/dist/cjs/api/types/BusinessStand.d.ts +16 -0
- package/dist/cjs/api/types/BusinessStand.js +3 -0
- package/dist/cjs/api/types/CustomerBusinessProfile.d.ts +6 -10
- package/dist/cjs/api/types/CustomerCartItem.d.ts +1 -1
- package/dist/cjs/api/types/CustomerEventDetail.d.ts +1 -1
- package/dist/cjs/api/types/EventFeedItem.d.ts +1 -1
- package/dist/cjs/api/types/ExploreEvent.d.ts +2 -1
- package/dist/cjs/api/types/ExploreTemporaryLocation.d.ts +2 -1
- package/dist/cjs/api/types/StandShop.d.ts +24 -0
- package/dist/cjs/api/types/StandShop.js +3 -0
- package/dist/cjs/api/types/index.d.ts +6 -0
- package/dist/cjs/api/types/index.js +6 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +9 -0
- package/dist/esm/Client.mjs +15 -0
- package/dist/esm/api/resources/business/resources/bulletins/client/Client.d.mts +7 -0
- package/dist/esm/api/resources/business/resources/bulletins/client/Client.mjs +21 -0
- package/dist/esm/api/resources/business/resources/businesses/client/requests/StoreBusinessRequest.d.mts +0 -12
- package/dist/esm/api/resources/business/resources/businesses/client/requests/UpdateBusinessRequest.d.mts +0 -12
- package/dist/esm/api/resources/business/resources/events/client/Client.d.mts +8 -0
- package/dist/esm/api/resources/business/resources/events/client/Client.mjs +24 -0
- package/dist/esm/api/resources/business/resources/events/client/requests/StoreEventRequest.d.mts +1 -1
- package/dist/esm/api/resources/business/resources/events/client/requests/UpdateEventRequest.d.mts +1 -1
- package/dist/esm/api/resources/business/resources/events/resources/checkIn/client/Client.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/events/resources/checkIn/client/Client.mjs +6 -0
- package/dist/esm/api/resources/business/resources/events/resources/orders/client/Client.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/events/resources/orders/client/Client.mjs +6 -0
- package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/client/Client.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/client/Client.mjs +6 -0
- package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/client/requests/StoreTicketTypeRequest.d.mts +1 -1
- package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/client/requests/UpdateTicketTypeRequest.d.mts +1 -1
- package/dist/esm/api/resources/business/resources/menus/client/Client.d.mts +5 -0
- package/dist/esm/api/resources/business/resources/menus/client/Client.mjs +15 -0
- package/dist/esm/api/resources/business/resources/menus/resources/groups/client/Client.d.mts +5 -2
- package/dist/esm/api/resources/business/resources/menus/resources/groups/client/Client.mjs +10 -1
- package/dist/esm/api/resources/business/resources/menus/resources/groups/client/requests/{ReorderGroupsRequest.d.mts → ReorderMenuGroupsRequest.d.mts} +3 -3
- package/dist/esm/api/resources/business/resources/menus/resources/groups/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/business/resources/menus/resources/items/client/Client.d.mts +7 -4
- package/dist/esm/api/resources/business/resources/menus/resources/items/client/Client.mjs +11 -2
- package/dist/{cjs/api/resources/business/resources/menus/resources/items/client/requests/MoveItemsRequest.d.ts → esm/api/resources/business/resources/menus/resources/items/client/requests/MoveMenuItemRequest.d.mts} +1 -1
- package/dist/esm/api/resources/business/resources/menus/resources/items/client/requests/{ReorderItemsRequest.d.mts → ReorderMenuItemsRequest.d.mts} +3 -3
- package/dist/esm/api/resources/business/resources/menus/resources/items/client/requests/index.d.mts +2 -2
- package/dist/esm/api/resources/business/resources/menus/resources/items/resources/modifiers/client/Client.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/menus/resources/items/resources/modifiers/client/Client.mjs +6 -0
- package/dist/esm/api/resources/business/resources/menus/resources/items/resources/variations/client/Client.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/menus/resources/items/resources/variations/client/Client.mjs +6 -0
- package/dist/esm/api/resources/business/resources/productCategories/client/Client.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/productCategories/client/Client.mjs +12 -0
- package/dist/esm/api/resources/business/resources/products/client/Client.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/products/client/Client.mjs +12 -0
- package/dist/esm/api/resources/business/resources/products/resources/images/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/products/resources/images/client/Client.mjs +3 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/client/Client.mjs +3 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/products/resources/variants/resources/images/client/Client.mjs +3 -0
- package/dist/esm/api/resources/business/resources/profile/client/requests/UpdateBusinessProfileRequest.d.mts +0 -13
- package/dist/esm/api/resources/businessHours/client/Client.d.mts +91 -0
- package/dist/esm/api/resources/businessHours/client/Client.mjs +324 -0
- package/dist/esm/api/resources/businessHours/client/index.d.mts +1 -0
- package/dist/esm/api/resources/businessHours/client/index.mjs +1 -0
- package/dist/esm/api/resources/businessHours/client/requests/DeleteBusinessHourExceptionRequest.d.mts +10 -0
- package/dist/esm/api/resources/businessHours/client/requests/DeleteBusinessHourExceptionRequest.mjs +2 -0
- package/dist/esm/api/resources/businessHours/client/requests/StoreBusinessHourExceptionRequest.d.mts +16 -0
- package/dist/esm/api/resources/businessHours/client/requests/StoreBusinessHourExceptionRequest.mjs +2 -0
- package/dist/esm/api/resources/businessHours/client/requests/UpdateBusinessHourExceptionRequest.d.mts +19 -0
- package/dist/esm/api/resources/businessHours/client/requests/UpdateBusinessHourExceptionRequest.mjs +2 -0
- package/dist/esm/api/resources/businessHours/client/requests/UpdateBusinessHoursRequest.d.mts +25 -0
- package/dist/esm/api/resources/businessHours/client/requests/UpdateBusinessHoursRequest.mjs +2 -0
- package/dist/esm/api/resources/businessHours/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/businessHours/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/businessHours/exports.d.mts +2 -0
- package/dist/esm/api/resources/businessHours/exports.mjs +3 -0
- package/dist/esm/api/resources/businessHours/index.d.mts +2 -0
- package/dist/esm/api/resources/businessHours/index.mjs +2 -0
- package/dist/esm/api/resources/businessHours/types/CreateBusinessHourExceptionResponse.d.mts +4 -0
- package/dist/esm/api/resources/businessHours/types/CreateBusinessHourExceptionResponse.mjs +2 -0
- package/dist/esm/api/resources/businessHours/types/GetBusinessHoursResponse.d.mts +4 -0
- package/dist/esm/api/resources/businessHours/types/GetBusinessHoursResponse.mjs +2 -0
- package/dist/esm/api/resources/businessHours/types/UpdateBusinessHourExceptionResponse.d.mts +4 -0
- package/dist/esm/api/resources/businessHours/types/UpdateBusinessHourExceptionResponse.mjs +2 -0
- package/dist/esm/api/resources/businessHours/types/UpdateBusinessHoursResponse.d.mts +4 -0
- package/dist/esm/api/resources/businessHours/types/UpdateBusinessHoursResponse.mjs +2 -0
- package/dist/esm/api/resources/businessHours/types/index.d.mts +4 -0
- package/dist/esm/api/resources/businessHours/types/index.mjs +4 -0
- package/dist/esm/api/resources/businessProducts/client/Client.d.mts +2 -0
- package/dist/esm/api/resources/businessProducts/client/Client.mjs +6 -0
- package/dist/esm/api/resources/businessStands/client/Client.d.mts +106 -0
- package/dist/esm/api/resources/businessStands/client/Client.mjs +384 -0
- package/dist/esm/api/resources/businessStands/client/index.d.mts +1 -0
- package/dist/esm/api/resources/businessStands/client/index.mjs +1 -0
- package/dist/esm/api/resources/businessStands/client/requests/DeleteBusinessStandRequest.d.mts +10 -0
- package/dist/esm/api/resources/businessStands/client/requests/DeleteBusinessStandRequest.mjs +2 -0
- package/dist/esm/api/resources/businessStands/client/requests/GetBusinessStandRequest.d.mts +10 -0
- package/dist/esm/api/resources/businessStands/client/requests/GetBusinessStandRequest.mjs +2 -0
- package/dist/esm/api/resources/businessStands/client/requests/StoreStandRequest.d.mts +18 -0
- package/dist/esm/api/resources/businessStands/client/requests/StoreStandRequest.mjs +2 -0
- package/dist/esm/api/resources/businessStands/client/requests/SyncStandProductsRequest.d.mts +12 -0
- package/dist/esm/api/resources/businessStands/client/requests/SyncStandProductsRequest.mjs +2 -0
- package/dist/esm/api/resources/businessStands/client/requests/UpdateStandRequest.d.mts +20 -0
- package/dist/esm/api/resources/businessStands/client/requests/UpdateStandRequest.mjs +2 -0
- package/dist/esm/api/resources/businessStands/client/requests/index.d.mts +5 -0
- package/dist/esm/api/resources/businessStands/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/businessStands/exports.d.mts +2 -0
- package/dist/esm/api/resources/businessStands/exports.mjs +3 -0
- package/dist/esm/api/resources/businessStands/index.d.mts +2 -0
- package/dist/esm/api/resources/businessStands/index.mjs +2 -0
- package/dist/esm/api/resources/businessStands/types/CreateBusinessStandResponse.d.mts +4 -0
- package/dist/esm/api/resources/businessStands/types/CreateBusinessStandResponse.mjs +2 -0
- package/dist/esm/api/resources/businessStands/types/GetBusinessStandResponse.d.mts +4 -0
- package/dist/esm/api/resources/businessStands/types/GetBusinessStandResponse.mjs +2 -0
- package/dist/esm/api/resources/businessStands/types/ListBusinessStandsResponse.d.mts +4 -0
- package/dist/esm/api/resources/businessStands/types/ListBusinessStandsResponse.mjs +2 -0
- package/dist/esm/api/resources/businessStands/types/UpdateBusinessStandResponse.d.mts +4 -0
- package/dist/esm/api/resources/businessStands/types/UpdateBusinessStandResponse.mjs +2 -0
- package/dist/esm/api/resources/businessStands/types/index.d.mts +4 -0
- package/dist/esm/api/resources/businessStands/types/index.mjs +4 -0
- package/dist/esm/api/resources/customerStands/client/Client.d.mts +63 -0
- package/dist/esm/api/resources/customerStands/client/Client.mjs +208 -0
- package/dist/esm/api/resources/customerStands/client/index.d.mts +1 -0
- package/dist/esm/api/resources/customerStands/client/index.mjs +1 -0
- package/dist/esm/api/resources/customerStands/client/requests/CreateStandPaymentIntentRequest.d.mts +11 -0
- package/dist/esm/api/resources/customerStands/client/requests/CreateStandPaymentIntentRequest.mjs +2 -0
- package/dist/esm/api/resources/customerStands/client/requests/ScanStandRequest.d.mts +10 -0
- package/dist/esm/api/resources/customerStands/client/requests/ScanStandRequest.mjs +2 -0
- package/dist/esm/api/resources/customerStands/client/requests/SelfCheckoutRequest.d.mts +12 -0
- package/dist/esm/api/resources/customerStands/client/requests/SelfCheckoutRequest.mjs +2 -0
- package/dist/esm/api/resources/customerStands/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/customerStands/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/customerStands/exports.d.mts +2 -0
- package/dist/esm/api/resources/customerStands/exports.mjs +3 -0
- package/dist/esm/api/resources/customerStands/index.d.mts +2 -0
- package/dist/esm/api/resources/customerStands/index.mjs +2 -0
- package/dist/esm/api/resources/customerStands/types/CreateStandPaymentIntentResponse.d.mts +6 -0
- package/dist/esm/api/resources/customerStands/types/CreateStandPaymentIntentResponse.mjs +2 -0
- package/dist/esm/api/resources/customerStands/types/ScanStandResponse.d.mts +4 -0
- package/dist/esm/api/resources/customerStands/types/ScanStandResponse.mjs +2 -0
- package/dist/esm/api/resources/customerStands/types/StandCheckoutResponse.d.mts +4 -0
- package/dist/esm/api/resources/customerStands/types/StandCheckoutResponse.mjs +2 -0
- package/dist/esm/api/resources/customerStands/types/index.d.mts +3 -0
- package/dist/esm/api/resources/customerStands/types/index.mjs +3 -0
- package/dist/esm/api/resources/index.d.mts +9 -0
- package/dist/esm/api/resources/index.mjs +9 -0
- package/dist/esm/api/types/BusinessEvent.d.mts +3 -0
- package/dist/esm/api/types/BusinessHourExceptionResource.d.mts +10 -0
- package/dist/esm/api/types/BusinessHourExceptionResource.mjs +2 -0
- package/dist/esm/api/types/BusinessHourSlotResource.d.mts +6 -0
- package/dist/esm/api/types/BusinessHourSlotResource.mjs +2 -0
- package/dist/esm/api/types/BusinessHoursResource.d.mts +7 -0
- package/dist/esm/api/types/BusinessHoursResource.mjs +2 -0
- package/dist/esm/api/types/BusinessInventoryLog.d.mts +2 -2
- package/dist/esm/api/types/BusinessMenu.d.mts +1 -0
- package/dist/esm/api/types/BusinessMenuItem.d.mts +5 -1
- package/dist/esm/api/types/BusinessProduct.d.mts +14 -0
- package/dist/esm/api/types/BusinessProductCategory.d.mts +1 -0
- package/dist/esm/api/types/BusinessProfile.d.mts +6 -9
- package/dist/esm/api/types/BusinessScheduleDayResource.d.mts +5 -0
- package/dist/esm/api/types/BusinessScheduleDayResource.mjs +2 -0
- package/dist/esm/api/types/BusinessStand.d.mts +16 -0
- package/dist/esm/api/types/BusinessStand.mjs +2 -0
- package/dist/esm/api/types/CustomerBusinessProfile.d.mts +6 -10
- package/dist/esm/api/types/CustomerCartItem.d.mts +1 -1
- package/dist/esm/api/types/CustomerEventDetail.d.mts +1 -1
- package/dist/esm/api/types/EventFeedItem.d.mts +1 -1
- package/dist/esm/api/types/ExploreEvent.d.mts +2 -1
- package/dist/esm/api/types/ExploreTemporaryLocation.d.mts +2 -1
- package/dist/esm/api/types/StandShop.d.mts +24 -0
- package/dist/esm/api/types/StandShop.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +6 -0
- package/dist/esm/api/types/index.mjs +6 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +34 -1
- package/reference.md +809 -57
- /package/dist/cjs/api/resources/business/resources/menus/resources/groups/client/requests/{ReorderGroupsRequest.js → ReorderMenuGroupsRequest.js} +0 -0
- /package/dist/cjs/api/resources/business/resources/menus/resources/items/client/requests/{MoveItemsRequest.js → MoveMenuItemRequest.js} +0 -0
- /package/dist/cjs/api/resources/business/resources/menus/resources/items/client/requests/{ReorderItemsRequest.js → ReorderMenuItemsRequest.js} +0 -0
- /package/dist/esm/api/resources/business/resources/menus/resources/groups/client/requests/{ReorderGroupsRequest.mjs → ReorderMenuGroupsRequest.mjs} +0 -0
- /package/dist/esm/api/resources/business/resources/menus/resources/items/client/requests/{MoveItemsRequest.mjs → MoveMenuItemRequest.mjs} +0 -0
- /package/dist/esm/api/resources/business/resources/menus/resources/items/client/requests/{ReorderItemsRequest.mjs → ReorderMenuItemsRequest.mjs} +0 -0
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
46
|
+
var t = {};
|
|
47
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
48
|
+
t[p] = s[p];
|
|
49
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
50
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
51
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
52
|
+
t[p[i]] = s[p[i]];
|
|
53
|
+
}
|
|
54
|
+
return t;
|
|
55
|
+
};
|
|
56
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
57
|
+
exports.BusinessHoursClient = void 0;
|
|
58
|
+
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
59
|
+
const headers_js_1 = require("../../../../core/headers.js");
|
|
60
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
61
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
62
|
+
const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
|
|
63
|
+
const errors = __importStar(require("../../../../errors/index.js"));
|
|
64
|
+
const FiveOneEat = __importStar(require("../../../index.js"));
|
|
65
|
+
class BusinessHoursClient {
|
|
66
|
+
constructor(options = {}) {
|
|
67
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* @param {BusinessHoursClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
71
|
+
*
|
|
72
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* await client.businessHours.getBusinessHours()
|
|
76
|
+
*/
|
|
77
|
+
getBusinessHours(requestOptions) {
|
|
78
|
+
return core.HttpResponsePromise.fromPromise(this.__getBusinessHours(requestOptions));
|
|
79
|
+
}
|
|
80
|
+
__getBusinessHours(requestOptions) {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
83
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
84
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
85
|
+
const _response = yield core.fetcher({
|
|
86
|
+
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, "business/hours"),
|
|
87
|
+
method: "GET",
|
|
88
|
+
headers: _headers,
|
|
89
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
90
|
+
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,
|
|
91
|
+
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,
|
|
92
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
93
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
94
|
+
logging: this._options.logging,
|
|
95
|
+
});
|
|
96
|
+
if (_response.ok) {
|
|
97
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
98
|
+
}
|
|
99
|
+
if (_response.error.reason === "status-code") {
|
|
100
|
+
switch (_response.error.statusCode) {
|
|
101
|
+
case 401:
|
|
102
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
103
|
+
default:
|
|
104
|
+
throw new errors.FiveOneEatError({
|
|
105
|
+
statusCode: _response.error.statusCode,
|
|
106
|
+
body: _response.error.body,
|
|
107
|
+
rawResponse: _response.rawResponse,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/business/hours");
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* @param {FiveOneEat.UpdateBusinessHoursRequest} request
|
|
116
|
+
* @param {BusinessHoursClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
117
|
+
*
|
|
118
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
119
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
120
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* await client.businessHours.updateBusinessHours({
|
|
124
|
+
* slots: [{
|
|
125
|
+
* day_of_week: 1,
|
|
126
|
+
* opens_at: "opens_at",
|
|
127
|
+
* closes_at: "closes_at"
|
|
128
|
+
* }]
|
|
129
|
+
* })
|
|
130
|
+
*/
|
|
131
|
+
updateBusinessHours(request, requestOptions) {
|
|
132
|
+
return core.HttpResponsePromise.fromPromise(this.__updateBusinessHours(request, requestOptions));
|
|
133
|
+
}
|
|
134
|
+
__updateBusinessHours(request, requestOptions) {
|
|
135
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
136
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
137
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
138
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
139
|
+
const _response = yield core.fetcher({
|
|
140
|
+
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, "business/hours"),
|
|
141
|
+
method: "PUT",
|
|
142
|
+
headers: _headers,
|
|
143
|
+
contentType: "application/json",
|
|
144
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
145
|
+
requestType: "json",
|
|
146
|
+
body: request,
|
|
147
|
+
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,
|
|
148
|
+
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,
|
|
149
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
150
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
151
|
+
logging: this._options.logging,
|
|
152
|
+
});
|
|
153
|
+
if (_response.ok) {
|
|
154
|
+
return {
|
|
155
|
+
data: _response.body,
|
|
156
|
+
rawResponse: _response.rawResponse,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
if (_response.error.reason === "status-code") {
|
|
160
|
+
switch (_response.error.statusCode) {
|
|
161
|
+
case 401:
|
|
162
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
163
|
+
case 403:
|
|
164
|
+
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
165
|
+
case 422:
|
|
166
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
167
|
+
default:
|
|
168
|
+
throw new errors.FiveOneEatError({
|
|
169
|
+
statusCode: _response.error.statusCode,
|
|
170
|
+
body: _response.error.body,
|
|
171
|
+
rawResponse: _response.rawResponse,
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/business/hours");
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* @param {FiveOneEat.StoreBusinessHourExceptionRequest} request
|
|
180
|
+
* @param {BusinessHoursClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
181
|
+
*
|
|
182
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
183
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
184
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* await client.businessHours.createBusinessHourException({
|
|
188
|
+
* starts_on: "2024-01-15T09:30:00Z",
|
|
189
|
+
* is_closed: true
|
|
190
|
+
* })
|
|
191
|
+
*/
|
|
192
|
+
createBusinessHourException(request, requestOptions) {
|
|
193
|
+
return core.HttpResponsePromise.fromPromise(this.__createBusinessHourException(request, requestOptions));
|
|
194
|
+
}
|
|
195
|
+
__createBusinessHourException(request, requestOptions) {
|
|
196
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
197
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
198
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
199
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
200
|
+
const _response = yield core.fetcher({
|
|
201
|
+
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, "business/hours/exceptions"),
|
|
202
|
+
method: "POST",
|
|
203
|
+
headers: _headers,
|
|
204
|
+
contentType: "application/json",
|
|
205
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
206
|
+
requestType: "json",
|
|
207
|
+
body: request,
|
|
208
|
+
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,
|
|
209
|
+
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,
|
|
210
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
211
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
212
|
+
logging: this._options.logging,
|
|
213
|
+
});
|
|
214
|
+
if (_response.ok) {
|
|
215
|
+
return {
|
|
216
|
+
data: _response.body,
|
|
217
|
+
rawResponse: _response.rawResponse,
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
if (_response.error.reason === "status-code") {
|
|
221
|
+
switch (_response.error.statusCode) {
|
|
222
|
+
case 401:
|
|
223
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
224
|
+
case 403:
|
|
225
|
+
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
226
|
+
case 422:
|
|
227
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
228
|
+
default:
|
|
229
|
+
throw new errors.FiveOneEatError({
|
|
230
|
+
statusCode: _response.error.statusCode,
|
|
231
|
+
body: _response.error.body,
|
|
232
|
+
rawResponse: _response.rawResponse,
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/business/hours/exceptions");
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* @param {FiveOneEat.DeleteBusinessHourExceptionRequest} request
|
|
241
|
+
* @param {BusinessHoursClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
242
|
+
*
|
|
243
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
244
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
245
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
246
|
+
*
|
|
247
|
+
* @example
|
|
248
|
+
* await client.businessHours.deleteBusinessHourException({
|
|
249
|
+
* exception: "exception"
|
|
250
|
+
* })
|
|
251
|
+
*/
|
|
252
|
+
deleteBusinessHourException(request, requestOptions) {
|
|
253
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteBusinessHourException(request, requestOptions));
|
|
254
|
+
}
|
|
255
|
+
__deleteBusinessHourException(request, requestOptions) {
|
|
256
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
257
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
258
|
+
const { exception } = request;
|
|
259
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
260
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
261
|
+
const _response = yield core.fetcher({
|
|
262
|
+
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, `business/hours/exceptions/${core.url.encodePathParam(exception)}`),
|
|
263
|
+
method: "DELETE",
|
|
264
|
+
headers: _headers,
|
|
265
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
266
|
+
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,
|
|
267
|
+
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,
|
|
268
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
269
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
270
|
+
logging: this._options.logging,
|
|
271
|
+
});
|
|
272
|
+
if (_response.ok) {
|
|
273
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
274
|
+
}
|
|
275
|
+
if (_response.error.reason === "status-code") {
|
|
276
|
+
switch (_response.error.statusCode) {
|
|
277
|
+
case 401:
|
|
278
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
279
|
+
case 403:
|
|
280
|
+
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
281
|
+
case 404:
|
|
282
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
283
|
+
default:
|
|
284
|
+
throw new errors.FiveOneEatError({
|
|
285
|
+
statusCode: _response.error.statusCode,
|
|
286
|
+
body: _response.error.body,
|
|
287
|
+
rawResponse: _response.rawResponse,
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/business/hours/exceptions/{exception}");
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* @param {FiveOneEat.UpdateBusinessHourExceptionRequest} request
|
|
296
|
+
* @param {BusinessHoursClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
297
|
+
*
|
|
298
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
299
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
300
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
301
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
302
|
+
*
|
|
303
|
+
* @example
|
|
304
|
+
* await client.businessHours.updateBusinessHourException({
|
|
305
|
+
* exception: "exception",
|
|
306
|
+
* starts_on: "2024-01-15T09:30:00Z",
|
|
307
|
+
* is_closed: true
|
|
308
|
+
* })
|
|
309
|
+
*/
|
|
310
|
+
updateBusinessHourException(request, requestOptions) {
|
|
311
|
+
return core.HttpResponsePromise.fromPromise(this.__updateBusinessHourException(request, requestOptions));
|
|
312
|
+
}
|
|
313
|
+
__updateBusinessHourException(request, requestOptions) {
|
|
314
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
315
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
316
|
+
const { exception } = request, _body = __rest(request, ["exception"]);
|
|
317
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
318
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
319
|
+
const _response = yield core.fetcher({
|
|
320
|
+
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, `business/hours/exceptions/${core.url.encodePathParam(exception)}`),
|
|
321
|
+
method: "PATCH",
|
|
322
|
+
headers: _headers,
|
|
323
|
+
contentType: "application/json",
|
|
324
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
325
|
+
requestType: "json",
|
|
326
|
+
body: _body,
|
|
327
|
+
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,
|
|
328
|
+
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,
|
|
329
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
330
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
331
|
+
logging: this._options.logging,
|
|
332
|
+
});
|
|
333
|
+
if (_response.ok) {
|
|
334
|
+
return {
|
|
335
|
+
data: _response.body,
|
|
336
|
+
rawResponse: _response.rawResponse,
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
if (_response.error.reason === "status-code") {
|
|
340
|
+
switch (_response.error.statusCode) {
|
|
341
|
+
case 401:
|
|
342
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
343
|
+
case 403:
|
|
344
|
+
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
345
|
+
case 404:
|
|
346
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
347
|
+
case 422:
|
|
348
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
349
|
+
default:
|
|
350
|
+
throw new errors.FiveOneEatError({
|
|
351
|
+
statusCode: _response.error.statusCode,
|
|
352
|
+
body: _response.error.body,
|
|
353
|
+
rawResponse: _response.rawResponse,
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/business/hours/exceptions/{exception}");
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
exports.BusinessHoursClient = BusinessHoursClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests/index.js"), exports);
|
package/dist/cjs/api/resources/businessHours/client/requests/StoreBusinessHourExceptionRequest.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* starts_on: "2024-01-15T09:30:00Z",
|
|
5
|
+
* is_closed: true
|
|
6
|
+
* }
|
|
7
|
+
*/
|
|
8
|
+
export interface StoreBusinessHourExceptionRequest {
|
|
9
|
+
starts_on: string;
|
|
10
|
+
ends_on?: string | null;
|
|
11
|
+
is_closed: boolean;
|
|
12
|
+
opens_at?: string | null;
|
|
13
|
+
closes_at?: string | null;
|
|
14
|
+
label?: string | null;
|
|
15
|
+
message?: string | null;
|
|
16
|
+
}
|
package/dist/cjs/api/resources/businessHours/client/requests/UpdateBusinessHourExceptionRequest.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* exception: "exception",
|
|
5
|
+
* starts_on: "2024-01-15T09:30:00Z",
|
|
6
|
+
* is_closed: true
|
|
7
|
+
* }
|
|
8
|
+
*/
|
|
9
|
+
export interface UpdateBusinessHourExceptionRequest {
|
|
10
|
+
/** The exception ID */
|
|
11
|
+
exception: string;
|
|
12
|
+
starts_on: string;
|
|
13
|
+
ends_on?: string | null;
|
|
14
|
+
is_closed: boolean;
|
|
15
|
+
opens_at?: string | null;
|
|
16
|
+
closes_at?: string | null;
|
|
17
|
+
label?: string | null;
|
|
18
|
+
message?: string | null;
|
|
19
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* slots: [{
|
|
5
|
+
* day_of_week: 1,
|
|
6
|
+
* opens_at: "opens_at",
|
|
7
|
+
* closes_at: "closes_at"
|
|
8
|
+
* }]
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface UpdateBusinessHoursRequest {
|
|
12
|
+
slots: UpdateBusinessHoursRequest.Slots.Item[];
|
|
13
|
+
}
|
|
14
|
+
export declare namespace UpdateBusinessHoursRequest {
|
|
15
|
+
type Slots = Slots.Item[];
|
|
16
|
+
namespace Slots {
|
|
17
|
+
interface Item {
|
|
18
|
+
day_of_week: number;
|
|
19
|
+
opens_at: string;
|
|
20
|
+
closes_at: string;
|
|
21
|
+
label?: (string | null) | undefined;
|
|
22
|
+
sort_order?: (number | null) | undefined;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { DeleteBusinessHourExceptionRequest } from "./DeleteBusinessHourExceptionRequest.js";
|
|
2
|
+
export type { StoreBusinessHourExceptionRequest } from "./StoreBusinessHourExceptionRequest.js";
|
|
3
|
+
export type { UpdateBusinessHourExceptionRequest } from "./UpdateBusinessHourExceptionRequest.js";
|
|
4
|
+
export type { UpdateBusinessHoursRequest } from "./UpdateBusinessHoursRequest.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.BusinessHoursClient = void 0;
|
|
19
|
+
var Client_js_1 = require("./client/Client.js");
|
|
20
|
+
Object.defineProperty(exports, "BusinessHoursClient", { enumerable: true, get: function () { return Client_js_1.BusinessHoursClient; } });
|
|
21
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|
|
18
|
+
__exportStar(require("./types/index.js"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./CreateBusinessHourExceptionResponse.js"), exports);
|
|
18
|
+
__exportStar(require("./GetBusinessHoursResponse.js"), exports);
|
|
19
|
+
__exportStar(require("./UpdateBusinessHourExceptionResponse.js"), exports);
|
|
20
|
+
__exportStar(require("./UpdateBusinessHoursResponse.js"), exports);
|
|
@@ -36,6 +36,7 @@ export declare class BusinessProductsClient {
|
|
|
36
36
|
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
37
37
|
* @throws {@link FiveOneEat.ForbiddenError}
|
|
38
38
|
* @throws {@link FiveOneEat.NotFoundError}
|
|
39
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
39
40
|
*
|
|
40
41
|
* @example
|
|
41
42
|
* await client.businessProducts.listVariantInventoryHistory({
|
|
@@ -51,6 +52,7 @@ export declare class BusinessProductsClient {
|
|
|
51
52
|
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
52
53
|
* @throws {@link FiveOneEat.ForbiddenError}
|
|
53
54
|
* @throws {@link FiveOneEat.NotFoundError}
|
|
55
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
54
56
|
*
|
|
55
57
|
* @example
|
|
56
58
|
* await client.businessProducts.getProductInventorySummary({
|