@51eat/sdk 0.0.62 → 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/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +6 -0
- package/dist/cjs/Client.js +24 -14
- 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 -3
- package/dist/cjs/api/resources/business/resources/businesses/client/requests/UpdateBusinessRequest.d.ts +0 -3
- 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 -2
- 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 +6 -0
- package/dist/cjs/api/resources/index.js +7 -1
- package/dist/cjs/api/types/BusinessEvent.d.ts +3 -0
- 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 +0 -2
- 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 +0 -3
- 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 +2 -0
- package/dist/cjs/api/types/index.js +2 -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 +6 -0
- package/dist/esm/Client.mjs +10 -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 -3
- package/dist/esm/api/resources/business/resources/businesses/client/requests/UpdateBusinessRequest.d.mts +0 -3
- 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 -2
- 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 +6 -0
- package/dist/esm/api/resources/index.mjs +6 -0
- package/dist/esm/api/types/BusinessEvent.d.mts +3 -0
- 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 +0 -2
- 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 +0 -3
- 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 +2 -0
- package/dist/esm/api/types/index.mjs +2 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +23 -1
- package/reference.md +502 -3
- /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,421 @@
|
|
|
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.BusinessStandsClient = 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 BusinessStandsClient {
|
|
66
|
+
constructor(options = {}) {
|
|
67
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* @param {BusinessStandsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
71
|
+
*
|
|
72
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
73
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* await client.businessStands.listBusinessStands()
|
|
77
|
+
*/
|
|
78
|
+
listBusinessStands(requestOptions) {
|
|
79
|
+
return core.HttpResponsePromise.fromPromise(this.__listBusinessStands(requestOptions));
|
|
80
|
+
}
|
|
81
|
+
__listBusinessStands(requestOptions) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
84
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
85
|
+
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);
|
|
86
|
+
const _response = yield core.fetcher({
|
|
87
|
+
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/stands"),
|
|
88
|
+
method: "GET",
|
|
89
|
+
headers: _headers,
|
|
90
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
91
|
+
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,
|
|
92
|
+
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,
|
|
93
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
94
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
95
|
+
logging: this._options.logging,
|
|
96
|
+
});
|
|
97
|
+
if (_response.ok) {
|
|
98
|
+
return {
|
|
99
|
+
data: _response.body,
|
|
100
|
+
rawResponse: _response.rawResponse,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
if (_response.error.reason === "status-code") {
|
|
104
|
+
switch (_response.error.statusCode) {
|
|
105
|
+
case 401:
|
|
106
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
107
|
+
case 403:
|
|
108
|
+
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
109
|
+
default:
|
|
110
|
+
throw new errors.FiveOneEatError({
|
|
111
|
+
statusCode: _response.error.statusCode,
|
|
112
|
+
body: _response.error.body,
|
|
113
|
+
rawResponse: _response.rawResponse,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/business/stands");
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* @param {FiveOneEat.StoreStandRequest} request
|
|
122
|
+
* @param {BusinessStandsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
123
|
+
*
|
|
124
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
125
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
126
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* await client.businessStands.createBusinessStand({
|
|
130
|
+
* name: "name"
|
|
131
|
+
* })
|
|
132
|
+
*/
|
|
133
|
+
createBusinessStand(request, requestOptions) {
|
|
134
|
+
return core.HttpResponsePromise.fromPromise(this.__createBusinessStand(request, requestOptions));
|
|
135
|
+
}
|
|
136
|
+
__createBusinessStand(request, requestOptions) {
|
|
137
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
139
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
140
|
+
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);
|
|
141
|
+
const _response = yield core.fetcher({
|
|
142
|
+
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/stands"),
|
|
143
|
+
method: "POST",
|
|
144
|
+
headers: _headers,
|
|
145
|
+
contentType: "application/json",
|
|
146
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
147
|
+
requestType: "json",
|
|
148
|
+
body: request,
|
|
149
|
+
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,
|
|
150
|
+
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,
|
|
151
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
152
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
153
|
+
logging: this._options.logging,
|
|
154
|
+
});
|
|
155
|
+
if (_response.ok) {
|
|
156
|
+
return {
|
|
157
|
+
data: _response.body,
|
|
158
|
+
rawResponse: _response.rawResponse,
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
if (_response.error.reason === "status-code") {
|
|
162
|
+
switch (_response.error.statusCode) {
|
|
163
|
+
case 401:
|
|
164
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
165
|
+
case 403:
|
|
166
|
+
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
167
|
+
case 422:
|
|
168
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
169
|
+
default:
|
|
170
|
+
throw new errors.FiveOneEatError({
|
|
171
|
+
statusCode: _response.error.statusCode,
|
|
172
|
+
body: _response.error.body,
|
|
173
|
+
rawResponse: _response.rawResponse,
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/business/stands");
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* @param {FiveOneEat.GetBusinessStandRequest} request
|
|
182
|
+
* @param {BusinessStandsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
183
|
+
*
|
|
184
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
185
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
186
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
187
|
+
*
|
|
188
|
+
* @example
|
|
189
|
+
* await client.businessStands.getBusinessStand({
|
|
190
|
+
* stand: "stand"
|
|
191
|
+
* })
|
|
192
|
+
*/
|
|
193
|
+
getBusinessStand(request, requestOptions) {
|
|
194
|
+
return core.HttpResponsePromise.fromPromise(this.__getBusinessStand(request, requestOptions));
|
|
195
|
+
}
|
|
196
|
+
__getBusinessStand(request, requestOptions) {
|
|
197
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
198
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
199
|
+
const { stand } = request;
|
|
200
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
201
|
+
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);
|
|
202
|
+
const _response = yield core.fetcher({
|
|
203
|
+
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/stands/${core.url.encodePathParam(stand)}`),
|
|
204
|
+
method: "GET",
|
|
205
|
+
headers: _headers,
|
|
206
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
207
|
+
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,
|
|
208
|
+
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,
|
|
209
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
210
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
211
|
+
logging: this._options.logging,
|
|
212
|
+
});
|
|
213
|
+
if (_response.ok) {
|
|
214
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
215
|
+
}
|
|
216
|
+
if (_response.error.reason === "status-code") {
|
|
217
|
+
switch (_response.error.statusCode) {
|
|
218
|
+
case 401:
|
|
219
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
220
|
+
case 403:
|
|
221
|
+
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
222
|
+
case 404:
|
|
223
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
224
|
+
default:
|
|
225
|
+
throw new errors.FiveOneEatError({
|
|
226
|
+
statusCode: _response.error.statusCode,
|
|
227
|
+
body: _response.error.body,
|
|
228
|
+
rawResponse: _response.rawResponse,
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/business/stands/{stand}");
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* @param {FiveOneEat.UpdateStandRequest} request
|
|
237
|
+
* @param {BusinessStandsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
238
|
+
*
|
|
239
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
240
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
241
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
242
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
243
|
+
*
|
|
244
|
+
* @example
|
|
245
|
+
* await client.businessStands.updateBusinessStand({
|
|
246
|
+
* stand: "stand"
|
|
247
|
+
* })
|
|
248
|
+
*/
|
|
249
|
+
updateBusinessStand(request, requestOptions) {
|
|
250
|
+
return core.HttpResponsePromise.fromPromise(this.__updateBusinessStand(request, requestOptions));
|
|
251
|
+
}
|
|
252
|
+
__updateBusinessStand(request, requestOptions) {
|
|
253
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
254
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
255
|
+
const { stand } = request, _body = __rest(request, ["stand"]);
|
|
256
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
257
|
+
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);
|
|
258
|
+
const _response = yield core.fetcher({
|
|
259
|
+
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/stands/${core.url.encodePathParam(stand)}`),
|
|
260
|
+
method: "PUT",
|
|
261
|
+
headers: _headers,
|
|
262
|
+
contentType: "application/json",
|
|
263
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
264
|
+
requestType: "json",
|
|
265
|
+
body: _body,
|
|
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 {
|
|
274
|
+
data: _response.body,
|
|
275
|
+
rawResponse: _response.rawResponse,
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
if (_response.error.reason === "status-code") {
|
|
279
|
+
switch (_response.error.statusCode) {
|
|
280
|
+
case 401:
|
|
281
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
282
|
+
case 403:
|
|
283
|
+
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
284
|
+
case 404:
|
|
285
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
286
|
+
case 422:
|
|
287
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
288
|
+
default:
|
|
289
|
+
throw new errors.FiveOneEatError({
|
|
290
|
+
statusCode: _response.error.statusCode,
|
|
291
|
+
body: _response.error.body,
|
|
292
|
+
rawResponse: _response.rawResponse,
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/business/stands/{stand}");
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* @param {FiveOneEat.DeleteBusinessStandRequest} request
|
|
301
|
+
* @param {BusinessStandsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
302
|
+
*
|
|
303
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
304
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
305
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
306
|
+
*
|
|
307
|
+
* @example
|
|
308
|
+
* await client.businessStands.deleteBusinessStand({
|
|
309
|
+
* stand: "stand"
|
|
310
|
+
* })
|
|
311
|
+
*/
|
|
312
|
+
deleteBusinessStand(request, requestOptions) {
|
|
313
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteBusinessStand(request, requestOptions));
|
|
314
|
+
}
|
|
315
|
+
__deleteBusinessStand(request, requestOptions) {
|
|
316
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
317
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
318
|
+
const { stand } = request;
|
|
319
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
320
|
+
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);
|
|
321
|
+
const _response = yield core.fetcher({
|
|
322
|
+
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/stands/${core.url.encodePathParam(stand)}`),
|
|
323
|
+
method: "DELETE",
|
|
324
|
+
headers: _headers,
|
|
325
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
326
|
+
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,
|
|
327
|
+
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,
|
|
328
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
329
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
330
|
+
logging: this._options.logging,
|
|
331
|
+
});
|
|
332
|
+
if (_response.ok) {
|
|
333
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
334
|
+
}
|
|
335
|
+
if (_response.error.reason === "status-code") {
|
|
336
|
+
switch (_response.error.statusCode) {
|
|
337
|
+
case 401:
|
|
338
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
339
|
+
case 403:
|
|
340
|
+
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
341
|
+
case 404:
|
|
342
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
343
|
+
default:
|
|
344
|
+
throw new errors.FiveOneEatError({
|
|
345
|
+
statusCode: _response.error.statusCode,
|
|
346
|
+
body: _response.error.body,
|
|
347
|
+
rawResponse: _response.rawResponse,
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/business/stands/{stand}");
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Replaces the stand's product list with the submitted set. Send an empty
|
|
356
|
+
* array to clear all assignments. Only products belonging to the
|
|
357
|
+
* authenticated business are accepted.
|
|
358
|
+
*
|
|
359
|
+
* @param {FiveOneEat.SyncStandProductsRequest} request
|
|
360
|
+
* @param {BusinessStandsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
361
|
+
*
|
|
362
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
363
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
364
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
365
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
366
|
+
*
|
|
367
|
+
* @example
|
|
368
|
+
* await client.businessStands.syncStandProducts({
|
|
369
|
+
* stand: "stand",
|
|
370
|
+
* product_ids: ["product_ids"]
|
|
371
|
+
* })
|
|
372
|
+
*/
|
|
373
|
+
syncStandProducts(request, requestOptions) {
|
|
374
|
+
return core.HttpResponsePromise.fromPromise(this.__syncStandProducts(request, requestOptions));
|
|
375
|
+
}
|
|
376
|
+
__syncStandProducts(request, requestOptions) {
|
|
377
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
378
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
379
|
+
const { stand } = request, _body = __rest(request, ["stand"]);
|
|
380
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
381
|
+
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);
|
|
382
|
+
const _response = yield core.fetcher({
|
|
383
|
+
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/stands/${core.url.encodePathParam(stand)}/products`),
|
|
384
|
+
method: "PUT",
|
|
385
|
+
headers: _headers,
|
|
386
|
+
contentType: "application/json",
|
|
387
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
388
|
+
requestType: "json",
|
|
389
|
+
body: _body,
|
|
390
|
+
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,
|
|
391
|
+
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,
|
|
392
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
393
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
394
|
+
logging: this._options.logging,
|
|
395
|
+
});
|
|
396
|
+
if (_response.ok) {
|
|
397
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
398
|
+
}
|
|
399
|
+
if (_response.error.reason === "status-code") {
|
|
400
|
+
switch (_response.error.statusCode) {
|
|
401
|
+
case 401:
|
|
402
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
403
|
+
case 403:
|
|
404
|
+
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
405
|
+
case 404:
|
|
406
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
407
|
+
case 422:
|
|
408
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
409
|
+
default:
|
|
410
|
+
throw new errors.FiveOneEatError({
|
|
411
|
+
statusCode: _response.error.statusCode,
|
|
412
|
+
body: _response.error.body,
|
|
413
|
+
rawResponse: _response.rawResponse,
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/business/stands/{stand}/products");
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
exports.BusinessStandsClient = BusinessStandsClient;
|
|
@@ -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);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* name: "name"
|
|
5
|
+
* }
|
|
6
|
+
*/
|
|
7
|
+
export interface StoreStandRequest {
|
|
8
|
+
name: string;
|
|
9
|
+
notes?: string | null;
|
|
10
|
+
address?: string | null;
|
|
11
|
+
city?: string | null;
|
|
12
|
+
state?: string | null;
|
|
13
|
+
zipcode?: string | null;
|
|
14
|
+
country?: string | null;
|
|
15
|
+
latitude?: number | null;
|
|
16
|
+
longitude?: number | null;
|
|
17
|
+
is_active?: boolean | null;
|
|
18
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* stand: "stand"
|
|
5
|
+
* }
|
|
6
|
+
*/
|
|
7
|
+
export interface UpdateStandRequest {
|
|
8
|
+
/** The stand ID */
|
|
9
|
+
stand: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
notes?: string | null;
|
|
12
|
+
address?: string | null;
|
|
13
|
+
city?: string | null;
|
|
14
|
+
state?: string | null;
|
|
15
|
+
zipcode?: string | null;
|
|
16
|
+
country?: string | null;
|
|
17
|
+
latitude?: number | null;
|
|
18
|
+
longitude?: number | null;
|
|
19
|
+
is_active?: boolean | null;
|
|
20
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { DeleteBusinessStandRequest } from "./DeleteBusinessStandRequest.js";
|
|
2
|
+
export type { GetBusinessStandRequest } from "./GetBusinessStandRequest.js";
|
|
3
|
+
export type { StoreStandRequest } from "./StoreStandRequest.js";
|
|
4
|
+
export type { SyncStandProductsRequest } from "./SyncStandProductsRequest.js";
|
|
5
|
+
export type { UpdateStandRequest } from "./UpdateStandRequest.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.BusinessStandsClient = void 0;
|
|
19
|
+
var Client_js_1 = require("./client/Client.js");
|
|
20
|
+
Object.defineProperty(exports, "BusinessStandsClient", { enumerable: true, get: function () { return Client_js_1.BusinessStandsClient; } });
|
|
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);
|