@51eat/sdk 2.0.0 → 2.1.0
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/api/resources/business/resources/commerce/client/Client.d.ts +9 -0
- package/dist/cjs/api/resources/business/resources/commerce/client/Client.js +17 -2
- package/dist/cjs/api/resources/business/resources/commerce/resources/index.d.ts +10 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/index.js +14 -4
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/Client.d.ts +294 -1
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/Client.js +893 -1
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/index.d.ts +1 -1
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/index.js +15 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/ArchiveLocationsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/ArchiveLocationsRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/DeleteLocationsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/DeleteLocationsRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/FlyerLocationsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/FlyerLocationsRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/GetHoursLocationsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/GetHoursLocationsRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/GetLocationsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/GetLocationsRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/GetPickupLocationsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/GetPickupLocationsRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/OfferMainStoreProductsLocationsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/OfferMainStoreProductsLocationsRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/PreviewPickupScheduleRequest.d.ts +52 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/PreviewPickupScheduleRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/SetLocationActiveRequest.d.ts +12 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/SetLocationActiveRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/StoreLocationRequest.d.ts +68 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/StoreLocationRequest.js +38 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/UpdateLocationsRequest.d.ts +30 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/UpdateLocationsRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/UpdateOpeningHoursRequest.d.ts +46 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/UpdateOpeningHoursRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/UpdatePickupScheduleRequest.d.ts +52 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/UpdatePickupScheduleRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/index.d.ts +13 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/index.js +5 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/ArchiveLocationsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/ArchiveLocationsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/CreateLocationsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/CreateLocationsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/FlyerLocationsResponse.d.ts +9 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/FlyerLocationsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/GetHoursLocationsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/GetHoursLocationsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/GetLocationsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/GetLocationsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/GetPickupLocationsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/GetPickupLocationsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/ListLocationsResponse.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/OfferMainStoreProductsLocationsResponse.d.ts +8 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/OfferMainStoreProductsLocationsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/PreviewPickupAffectedOrdersLocationsResponse.d.ts +15 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/PreviewPickupAffectedOrdersLocationsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/SetActiveLocationsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/SetActiveLocationsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/UpdateHoursLocationsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/UpdateHoursLocationsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/UpdateLocationsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/UpdateLocationsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/UpdatePickupLocationsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/UpdatePickupLocationsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/index.d.ts +12 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/index.js +12 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/Client.d.ts +114 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/Client.js +401 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/index.js +17 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/DeleteProductsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/DeleteProductsRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/GetProductsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/GetProductsRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/ListProductsRequest.d.ts +12 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/ListProductsRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/StoreProductRequest.d.ts +49 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/StoreProductRequest.js +17 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/UpdateProductRequest.d.ts +36 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/UpdateProductRequest.js +17 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/index.d.ts +5 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/client/requests/index.js +7 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/exports.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/exports.js +21 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/index.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/index.js +18 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/CreateProductsResponse.d.ts +8 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/CreateProductsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/GetProductsResponse.d.ts +8 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/GetProductsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/ListProductsResponse.d.ts +44 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/ListProductsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/UpdateProductsResponse.d.ts +8 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/UpdateProductsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/index.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/products/types/index.js +20 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/Client.d.ts +104 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/Client.js +380 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/index.js +17 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/requests/AcceptSellerTermsRequest.d.ts +12 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/requests/AcceptSellerTermsRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/requests/RequestSellingApprovalRequest.d.ts +12 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/requests/RequestSellingApprovalRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/requests/UpdateSellingRequest.d.ts +9 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/requests/UpdateSellingRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/exports.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/exports.js +21 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/index.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/index.js +18 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/AcceptSellerTermsSellingResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/AcceptSellerTermsSellingResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/GetSellerTermsSellingResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/GetSellerTermsSellingResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/GetSellingResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/GetSellingResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/RequestApprovalSellingResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/RequestApprovalSellingResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/UpdateSellingResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/UpdateSellingResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/index.d.ts +5 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/selling/types/index.js +21 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/Client.d.ts +163 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/Client.js +537 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/index.js +17 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/ArchiveVariantsRequest.d.ts +13 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/ArchiveVariantsRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/DeleteVariantsRequest.d.ts +13 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/DeleteVariantsRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/GetVariantsRequest.d.ts +13 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/GetVariantsRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/ListVariantsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/ListVariantsRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/SetVariantPriceRequest.d.ts +16 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/SetVariantPriceRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/StoreVariantRequest.d.ts +54 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/StoreVariantRequest.js +17 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/UpdateVariantRequest.d.ts +46 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/UpdateVariantRequest.js +17 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/index.d.ts +7 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/client/requests/index.js +7 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/exports.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/exports.js +21 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/index.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/index.js +18 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/ArchiveVariantsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/ArchiveVariantsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/CreateVariantsResponse.d.ts +8 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/CreateVariantsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/GetVariantsResponse.d.ts +6 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/GetVariantsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/ListVariantsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/ListVariantsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/SetPriceVariantsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/SetPriceVariantsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/UpdateVariantsResponse.d.ts +8 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/UpdateVariantsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/index.d.ts +6 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/variants/types/index.js +22 -0
- package/dist/cjs/api/resources/commerce/resources/carts/resources/lines/client/Client.d.ts +9 -5
- package/dist/cjs/api/resources/commerce/resources/carts/resources/lines/client/Client.js +9 -5
- package/dist/cjs/api/types/BusinessCommerceLocation.d.ts +37 -3
- package/dist/cjs/api/types/BusinessEvent.d.ts +2 -0
- package/dist/cjs/api/types/BusinessLocation.d.ts +29 -0
- package/dist/cjs/api/types/BusinessLocation.js +11 -0
- package/dist/cjs/api/types/BusinessLocationDetails.d.ts +36 -0
- package/dist/cjs/api/types/BusinessLocationDetails.js +11 -0
- package/dist/cjs/api/types/BusinessLocationHourException.d.ts +14 -0
- package/dist/cjs/api/types/BusinessLocationHourException.js +3 -0
- package/dist/cjs/api/types/BusinessLocationOpeningHours.d.ts +17 -0
- package/dist/cjs/api/types/BusinessLocationOpeningHours.js +3 -0
- package/dist/cjs/api/types/BusinessLocationPickup.d.ts +25 -0
- package/dist/cjs/api/types/BusinessLocationPickup.js +14 -0
- package/dist/cjs/api/types/BusinessOpeningHourSlot.d.ts +10 -0
- package/dist/cjs/api/types/BusinessOpeningHourSlot.js +3 -0
- package/dist/cjs/api/types/BusinessPickupSchedule.d.ts +10 -0
- package/dist/cjs/api/types/BusinessPickupSchedule.js +3 -0
- package/dist/cjs/api/types/BusinessPickupWindow.d.ts +11 -0
- package/dist/cjs/api/types/BusinessPickupWindow.js +3 -0
- package/dist/cjs/api/types/BusinessSellerTerms.d.ts +10 -0
- package/dist/cjs/api/types/BusinessSellerTerms.js +3 -0
- package/dist/cjs/api/types/BusinessSelling.d.ts +61 -0
- package/dist/cjs/api/types/BusinessSelling.js +16 -0
- package/dist/cjs/api/types/Cart.d.ts +1 -1
- package/dist/cjs/api/types/CustomerEvent.d.ts +6 -0
- package/dist/cjs/api/types/CustomerEventDetail.d.ts +6 -0
- package/dist/cjs/api/types/CustomerEventTicketType.d.ts +7 -0
- package/dist/cjs/api/types/EventFeedItem.d.ts +6 -0
- package/dist/cjs/api/types/ImageResource.d.ts +7 -0
- package/dist/cjs/api/types/ImageResource.js +3 -0
- package/dist/cjs/api/types/LocationKind.d.ts +12 -0
- package/dist/cjs/api/types/LocationKind.js +15 -0
- package/dist/cjs/api/types/ProductResource.d.ts +41 -0
- package/dist/cjs/api/types/ProductResource.js +18 -0
- package/dist/cjs/api/types/Unit.d.ts +16 -0
- package/dist/cjs/api/types/Unit.js +19 -0
- package/dist/cjs/api/types/UpdateLocationRequest.d.ts +7 -0
- package/dist/cjs/api/types/UpdateLocationRequest.js +3 -0
- package/dist/cjs/api/types/VariantInventoryLevelResource.d.ts +9 -0
- package/dist/cjs/api/types/VariantInventoryLevelResource.js +3 -0
- package/dist/cjs/api/types/VariantResource.d.ts +26 -0
- package/dist/cjs/api/types/VariantResource.js +3 -0
- package/dist/cjs/api/types/VariantStockLocationResource.d.ts +15 -0
- package/dist/cjs/api/types/VariantStockLocationResource.js +11 -0
- package/dist/cjs/api/types/index.d.ts +18 -0
- package/dist/cjs/api/types/index.js +18 -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/api/resources/business/resources/commerce/client/Client.d.mts +9 -0
- package/dist/esm/api/resources/business/resources/commerce/client/Client.mjs +15 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/index.d.mts +10 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/index.mjs +10 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/Client.d.mts +294 -1
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/Client.mjs +894 -2
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/index.d.mts +1 -1
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/index.mjs +1 -1
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/ArchiveLocationsRequest.d.mts +10 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/ArchiveLocationsRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/DeleteLocationsRequest.d.mts +10 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/DeleteLocationsRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/FlyerLocationsRequest.d.mts +10 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/FlyerLocationsRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/GetHoursLocationsRequest.d.mts +10 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/GetHoursLocationsRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/GetLocationsRequest.d.mts +10 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/GetLocationsRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/GetPickupLocationsRequest.d.mts +10 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/GetPickupLocationsRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/OfferMainStoreProductsLocationsRequest.d.mts +10 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/OfferMainStoreProductsLocationsRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/PreviewPickupScheduleRequest.d.mts +52 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/PreviewPickupScheduleRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/SetLocationActiveRequest.d.mts +12 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/SetLocationActiveRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/StoreLocationRequest.d.mts +68 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/StoreLocationRequest.mjs +35 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/UpdateLocationsRequest.d.mts +30 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/UpdateLocationsRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/UpdateOpeningHoursRequest.d.mts +46 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/UpdateOpeningHoursRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/UpdatePickupScheduleRequest.d.mts +52 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/UpdatePickupScheduleRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/index.d.mts +13 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/ArchiveLocationsResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/ArchiveLocationsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/CreateLocationsResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/CreateLocationsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/FlyerLocationsResponse.d.mts +9 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/FlyerLocationsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/GetHoursLocationsResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/GetHoursLocationsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/GetLocationsResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/GetLocationsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/GetPickupLocationsResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/GetPickupLocationsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/ListLocationsResponse.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/OfferMainStoreProductsLocationsResponse.d.mts +8 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/OfferMainStoreProductsLocationsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/PreviewPickupAffectedOrdersLocationsResponse.d.mts +15 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/PreviewPickupAffectedOrdersLocationsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/SetActiveLocationsResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/SetActiveLocationsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/UpdateHoursLocationsResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/UpdateHoursLocationsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/UpdateLocationsResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/UpdateLocationsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/UpdatePickupLocationsResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/UpdatePickupLocationsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/index.d.mts +12 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/index.mjs +12 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/client/Client.d.mts +114 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/client/Client.mjs +364 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/client/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/client/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/DeleteProductsRequest.d.mts +10 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/DeleteProductsRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/GetProductsRequest.d.mts +10 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/GetProductsRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/ListProductsRequest.d.mts +12 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/ListProductsRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/StoreProductRequest.d.mts +49 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/StoreProductRequest.mjs +14 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/UpdateProductRequest.d.mts +36 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/UpdateProductRequest.mjs +14 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/index.d.mts +5 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/client/requests/index.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/exports.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/exports.mjs +3 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/index.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/index.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/types/CreateProductsResponse.d.mts +8 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/types/CreateProductsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/types/GetProductsResponse.d.mts +8 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/types/GetProductsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/types/ListProductsResponse.d.mts +44 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/types/ListProductsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/types/UpdateProductsResponse.d.mts +8 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/types/UpdateProductsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/types/index.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/products/types/index.mjs +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/Client.d.mts +104 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/Client.mjs +343 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/requests/AcceptSellerTermsRequest.d.mts +12 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/requests/AcceptSellerTermsRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/requests/RequestSellingApprovalRequest.d.mts +12 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/requests/RequestSellingApprovalRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/requests/UpdateSellingRequest.d.mts +9 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/requests/UpdateSellingRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/exports.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/exports.mjs +3 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/index.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/index.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/AcceptSellerTermsSellingResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/AcceptSellerTermsSellingResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/GetSellerTermsSellingResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/GetSellerTermsSellingResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/GetSellingResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/GetSellingResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/RequestApprovalSellingResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/RequestApprovalSellingResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/UpdateSellingResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/UpdateSellingResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/index.d.mts +5 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/selling/types/index.mjs +5 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/Client.d.mts +163 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/Client.mjs +500 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/ArchiveVariantsRequest.d.mts +13 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/ArchiveVariantsRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/DeleteVariantsRequest.d.mts +13 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/DeleteVariantsRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/GetVariantsRequest.d.mts +13 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/GetVariantsRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/ListVariantsRequest.d.mts +10 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/ListVariantsRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/SetVariantPriceRequest.d.mts +16 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/SetVariantPriceRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/StoreVariantRequest.d.mts +54 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/StoreVariantRequest.mjs +14 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/UpdateVariantRequest.d.mts +46 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/UpdateVariantRequest.mjs +14 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/index.d.mts +7 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/client/requests/index.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/exports.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/exports.mjs +3 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/index.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/index.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/ArchiveVariantsResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/ArchiveVariantsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/CreateVariantsResponse.d.mts +8 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/CreateVariantsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/GetVariantsResponse.d.mts +6 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/GetVariantsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/ListVariantsResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/ListVariantsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/SetPriceVariantsResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/SetPriceVariantsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/UpdateVariantsResponse.d.mts +8 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/UpdateVariantsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/index.d.mts +6 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/variants/types/index.mjs +6 -0
- package/dist/esm/api/resources/commerce/resources/carts/resources/lines/client/Client.d.mts +9 -5
- package/dist/esm/api/resources/commerce/resources/carts/resources/lines/client/Client.mjs +9 -5
- package/dist/esm/api/types/BusinessCommerceLocation.d.mts +37 -3
- package/dist/esm/api/types/BusinessEvent.d.mts +2 -0
- package/dist/esm/api/types/BusinessLocation.d.mts +29 -0
- package/dist/esm/api/types/BusinessLocation.mjs +8 -0
- package/dist/esm/api/types/BusinessLocationDetails.d.mts +36 -0
- package/dist/esm/api/types/BusinessLocationDetails.mjs +8 -0
- package/dist/esm/api/types/BusinessLocationHourException.d.mts +14 -0
- package/dist/esm/api/types/BusinessLocationHourException.mjs +2 -0
- package/dist/esm/api/types/BusinessLocationOpeningHours.d.mts +17 -0
- package/dist/esm/api/types/BusinessLocationOpeningHours.mjs +2 -0
- package/dist/esm/api/types/BusinessLocationPickup.d.mts +25 -0
- package/dist/esm/api/types/BusinessLocationPickup.mjs +11 -0
- package/dist/esm/api/types/BusinessOpeningHourSlot.d.mts +10 -0
- package/dist/esm/api/types/BusinessOpeningHourSlot.mjs +2 -0
- package/dist/esm/api/types/BusinessPickupSchedule.d.mts +10 -0
- package/dist/esm/api/types/BusinessPickupSchedule.mjs +2 -0
- package/dist/esm/api/types/BusinessPickupWindow.d.mts +11 -0
- package/dist/esm/api/types/BusinessPickupWindow.mjs +2 -0
- package/dist/esm/api/types/BusinessSellerTerms.d.mts +10 -0
- package/dist/esm/api/types/BusinessSellerTerms.mjs +2 -0
- package/dist/esm/api/types/BusinessSelling.d.mts +61 -0
- package/dist/esm/api/types/BusinessSelling.mjs +13 -0
- package/dist/esm/api/types/Cart.d.mts +1 -1
- package/dist/esm/api/types/CustomerEvent.d.mts +6 -0
- package/dist/esm/api/types/CustomerEventDetail.d.mts +6 -0
- package/dist/esm/api/types/CustomerEventTicketType.d.mts +7 -0
- package/dist/esm/api/types/EventFeedItem.d.mts +6 -0
- package/dist/esm/api/types/ImageResource.d.mts +7 -0
- package/dist/esm/api/types/ImageResource.mjs +2 -0
- package/dist/esm/api/types/LocationKind.d.mts +12 -0
- package/dist/esm/api/types/LocationKind.mjs +12 -0
- package/dist/esm/api/types/ProductResource.d.mts +41 -0
- package/dist/esm/api/types/ProductResource.mjs +15 -0
- package/dist/esm/api/types/Unit.d.mts +16 -0
- package/dist/esm/api/types/Unit.mjs +16 -0
- package/dist/esm/api/types/UpdateLocationRequest.d.mts +7 -0
- package/dist/esm/api/types/UpdateLocationRequest.mjs +2 -0
- package/dist/esm/api/types/VariantInventoryLevelResource.d.mts +9 -0
- package/dist/esm/api/types/VariantInventoryLevelResource.mjs +2 -0
- package/dist/esm/api/types/VariantResource.d.mts +26 -0
- package/dist/esm/api/types/VariantResource.mjs +2 -0
- package/dist/esm/api/types/VariantStockLocationResource.d.mts +15 -0
- package/dist/esm/api/types/VariantStockLocationResource.mjs +8 -0
- package/dist/esm/api/types/index.d.mts +18 -0
- package/dist/esm/api/types/index.mjs +18 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +34 -1
- package/reference.md +2115 -83
package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/index.mjs
CHANGED
|
@@ -1 +1,13 @@
|
|
|
1
|
+
export * from "./ArchiveLocationsResponse.mjs";
|
|
2
|
+
export * from "./CreateLocationsResponse.mjs";
|
|
3
|
+
export * from "./FlyerLocationsResponse.mjs";
|
|
4
|
+
export * from "./GetHoursLocationsResponse.mjs";
|
|
5
|
+
export * from "./GetLocationsResponse.mjs";
|
|
6
|
+
export * from "./GetPickupLocationsResponse.mjs";
|
|
1
7
|
export * from "./ListLocationsResponse.mjs";
|
|
8
|
+
export * from "./OfferMainStoreProductsLocationsResponse.mjs";
|
|
9
|
+
export * from "./PreviewPickupAffectedOrdersLocationsResponse.mjs";
|
|
10
|
+
export * from "./SetActiveLocationsResponse.mjs";
|
|
11
|
+
export * from "./UpdateHoursLocationsResponse.mjs";
|
|
12
|
+
export * from "./UpdateLocationsResponse.mjs";
|
|
13
|
+
export * from "./UpdatePickupLocationsResponse.mjs";
|
package/dist/esm/api/resources/business/resources/commerce/resources/products/client/Client.d.mts
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient.mjs";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../../../BaseClient.mjs";
|
|
3
|
+
import * as core from "../../../../../../../../core/index.mjs";
|
|
4
|
+
import * as FiveOneEat from "../../../../../../../index.mjs";
|
|
5
|
+
export declare namespace ProductsClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class ProductsClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<ProductsClient.Options>;
|
|
12
|
+
constructor(options?: ProductsClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Newest first, 20 a page, each with its default option and category.
|
|
15
|
+
* `search` keeps those whose name contains it, any case; `location`
|
|
16
|
+
* those offered at that store or stand, either way of buying (ignored
|
|
17
|
+
* unless it's one of the business's unarchived locations); `category`
|
|
18
|
+
* those filed in that category.
|
|
19
|
+
*
|
|
20
|
+
* @param {FiveOneEat.business.commerce.ListProductsRequest} request
|
|
21
|
+
* @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
22
|
+
*
|
|
23
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
24
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
25
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* await client.business.commerce.products.list()
|
|
29
|
+
*/
|
|
30
|
+
list(request?: FiveOneEat.business.commerce.ListProductsRequest, requestOptions?: ProductsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.commerce.ListProductsResponse>;
|
|
31
|
+
private __list;
|
|
32
|
+
/**
|
|
33
|
+
* Answers 201 with the product as `GET /products/{product}` shows it. It
|
|
34
|
+
* starts with one option, the default: `price` prices it, and `compare_at_price`,
|
|
35
|
+
* `unit`, `quantity_step` and `starting_stock` need a price. Without a
|
|
36
|
+
* price the option starts unpriced. Refused with a form error on
|
|
37
|
+
* `payments` until the business can take payments, and on `is_active`
|
|
38
|
+
* when it would go on sale before 51Eat approves the business to sell.
|
|
39
|
+
*
|
|
40
|
+
* @param {FiveOneEat.business.commerce.StoreProductRequest} request
|
|
41
|
+
* @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
42
|
+
*
|
|
43
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
44
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
45
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* await client.business.commerce.products.create({
|
|
49
|
+
* "Idempotency-Key": "Idempotency-Key",
|
|
50
|
+
* name: "name",
|
|
51
|
+
* tax_code: "tax_code"
|
|
52
|
+
* })
|
|
53
|
+
*/
|
|
54
|
+
create(request: FiveOneEat.business.commerce.StoreProductRequest, requestOptions?: ProductsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.commerce.CreateProductsResponse>;
|
|
55
|
+
private __create;
|
|
56
|
+
/**
|
|
57
|
+
* With its unarchived options in order, each with its stock at every
|
|
58
|
+
* location, where it's offered (`availability`), its category, photos
|
|
59
|
+
* and tax code.
|
|
60
|
+
*
|
|
61
|
+
* @param {FiveOneEat.business.commerce.GetProductsRequest} request
|
|
62
|
+
* @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
|
+
*
|
|
64
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
65
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
66
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* await client.business.commerce.products.get({
|
|
70
|
+
* product: "product"
|
|
71
|
+
* })
|
|
72
|
+
*/
|
|
73
|
+
get(request: FiveOneEat.business.commerce.GetProductsRequest, requestOptions?: ProductsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.commerce.GetProductsResponse>;
|
|
74
|
+
private __get;
|
|
75
|
+
/**
|
|
76
|
+
* Saves its details. `availability`, when sent, replaces where it's
|
|
77
|
+
* offered; left out, that stays as it is.
|
|
78
|
+
*
|
|
79
|
+
* @param {FiveOneEat.business.commerce.UpdateProductRequest} request
|
|
80
|
+
* @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
81
|
+
*
|
|
82
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
83
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
84
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
85
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* await client.business.commerce.products.update({
|
|
89
|
+
* product: "product",
|
|
90
|
+
* name: "name",
|
|
91
|
+
* tax_code: "tax_code"
|
|
92
|
+
* })
|
|
93
|
+
*/
|
|
94
|
+
update(request: FiveOneEat.business.commerce.UpdateProductRequest, requestOptions?: ProductsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.commerce.UpdateProductsResponse>;
|
|
95
|
+
private __update;
|
|
96
|
+
/**
|
|
97
|
+
* Archives it, so its orders keep it. It leaves the list and every store
|
|
98
|
+
* and stand.
|
|
99
|
+
*
|
|
100
|
+
* @param {FiveOneEat.business.commerce.DeleteProductsRequest} request
|
|
101
|
+
* @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
102
|
+
*
|
|
103
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
104
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
105
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* await client.business.commerce.products.delete({
|
|
109
|
+
* product: "product"
|
|
110
|
+
* })
|
|
111
|
+
*/
|
|
112
|
+
delete(request: FiveOneEat.business.commerce.DeleteProductsRequest, requestOptions?: ProductsClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
113
|
+
private __delete;
|
|
114
|
+
}
|
package/dist/esm/api/resources/business/resources/commerce/resources/products/client/Client.mjs
ADDED
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
12
|
+
var t = {};
|
|
13
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
+
t[p] = s[p];
|
|
15
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
+
t[p[i]] = s[p[i]];
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
21
|
+
};
|
|
22
|
+
import { normalizeClientOptionsWithAuth, } from "../../../../../../../../BaseClient.mjs";
|
|
23
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../../../core/headers.mjs";
|
|
24
|
+
import * as core from "../../../../../../../../core/index.mjs";
|
|
25
|
+
import * as environments from "../../../../../../../../environments.mjs";
|
|
26
|
+
import { handleNonStatusCodeError } from "../../../../../../../../errors/handleNonStatusCodeError.mjs";
|
|
27
|
+
import * as errors from "../../../../../../../../errors/index.mjs";
|
|
28
|
+
import * as FiveOneEat from "../../../../../../../index.mjs";
|
|
29
|
+
export class ProductsClient {
|
|
30
|
+
constructor(options = {}) {
|
|
31
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Newest first, 20 a page, each with its default option and category.
|
|
35
|
+
* `search` keeps those whose name contains it, any case; `location`
|
|
36
|
+
* those offered at that store or stand, either way of buying (ignored
|
|
37
|
+
* unless it's one of the business's unarchived locations); `category`
|
|
38
|
+
* those filed in that category.
|
|
39
|
+
*
|
|
40
|
+
* @param {FiveOneEat.business.commerce.ListProductsRequest} request
|
|
41
|
+
* @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
42
|
+
*
|
|
43
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
44
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
45
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* await client.business.commerce.products.list()
|
|
49
|
+
*/
|
|
50
|
+
list(request = {}, requestOptions) {
|
|
51
|
+
return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
|
|
52
|
+
}
|
|
53
|
+
__list() {
|
|
54
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
55
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
56
|
+
const { search, location, category } = request;
|
|
57
|
+
const _queryParams = {
|
|
58
|
+
search,
|
|
59
|
+
location,
|
|
60
|
+
category,
|
|
61
|
+
};
|
|
62
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
63
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
64
|
+
const _response = yield core.fetcher({
|
|
65
|
+
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/commerce/products"),
|
|
66
|
+
method: "GET",
|
|
67
|
+
headers: _headers,
|
|
68
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
69
|
+
queryString: core.url
|
|
70
|
+
.queryBuilder()
|
|
71
|
+
.addMany(_queryParams)
|
|
72
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
73
|
+
.build(),
|
|
74
|
+
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,
|
|
75
|
+
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,
|
|
76
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
77
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
78
|
+
logging: this._options.logging,
|
|
79
|
+
});
|
|
80
|
+
if (_response.ok) {
|
|
81
|
+
return {
|
|
82
|
+
data: _response.body,
|
|
83
|
+
rawResponse: _response.rawResponse,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
if (_response.error.reason === "status-code") {
|
|
87
|
+
switch (_response.error.statusCode) {
|
|
88
|
+
case 401:
|
|
89
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
90
|
+
case 403:
|
|
91
|
+
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
92
|
+
case 422:
|
|
93
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
94
|
+
default:
|
|
95
|
+
throw new errors.FiveOneEatError({
|
|
96
|
+
statusCode: _response.error.statusCode,
|
|
97
|
+
body: _response.error.body,
|
|
98
|
+
rawResponse: _response.rawResponse,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/business/commerce/products");
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Answers 201 with the product as `GET /products/{product}` shows it. It
|
|
107
|
+
* starts with one option, the default: `price` prices it, and `compare_at_price`,
|
|
108
|
+
* `unit`, `quantity_step` and `starting_stock` need a price. Without a
|
|
109
|
+
* price the option starts unpriced. Refused with a form error on
|
|
110
|
+
* `payments` until the business can take payments, and on `is_active`
|
|
111
|
+
* when it would go on sale before 51Eat approves the business to sell.
|
|
112
|
+
*
|
|
113
|
+
* @param {FiveOneEat.business.commerce.StoreProductRequest} request
|
|
114
|
+
* @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
115
|
+
*
|
|
116
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
117
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
118
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* await client.business.commerce.products.create({
|
|
122
|
+
* "Idempotency-Key": "Idempotency-Key",
|
|
123
|
+
* name: "name",
|
|
124
|
+
* tax_code: "tax_code"
|
|
125
|
+
* })
|
|
126
|
+
*/
|
|
127
|
+
create(request, requestOptions) {
|
|
128
|
+
return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
|
|
129
|
+
}
|
|
130
|
+
__create(request, requestOptions) {
|
|
131
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
132
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
133
|
+
const { "Idempotency-Key": idempotencyKey } = request, _body = __rest(request, ["Idempotency-Key"]);
|
|
134
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
135
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "Idempotency-Key": idempotencyKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
136
|
+
const _response = yield core.fetcher({
|
|
137
|
+
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/commerce/products"),
|
|
138
|
+
method: "POST",
|
|
139
|
+
headers: _headers,
|
|
140
|
+
contentType: "application/json",
|
|
141
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
142
|
+
requestType: "json",
|
|
143
|
+
body: _body,
|
|
144
|
+
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,
|
|
145
|
+
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,
|
|
146
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
147
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
148
|
+
logging: this._options.logging,
|
|
149
|
+
});
|
|
150
|
+
if (_response.ok) {
|
|
151
|
+
return {
|
|
152
|
+
data: _response.body,
|
|
153
|
+
rawResponse: _response.rawResponse,
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
if (_response.error.reason === "status-code") {
|
|
157
|
+
switch (_response.error.statusCode) {
|
|
158
|
+
case 401:
|
|
159
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
160
|
+
case 403:
|
|
161
|
+
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
162
|
+
case 422:
|
|
163
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
164
|
+
default:
|
|
165
|
+
throw new errors.FiveOneEatError({
|
|
166
|
+
statusCode: _response.error.statusCode,
|
|
167
|
+
body: _response.error.body,
|
|
168
|
+
rawResponse: _response.rawResponse,
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/business/commerce/products");
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* With its unarchived options in order, each with its stock at every
|
|
177
|
+
* location, where it's offered (`availability`), its category, photos
|
|
178
|
+
* and tax code.
|
|
179
|
+
*
|
|
180
|
+
* @param {FiveOneEat.business.commerce.GetProductsRequest} request
|
|
181
|
+
* @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
182
|
+
*
|
|
183
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
184
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
185
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
186
|
+
*
|
|
187
|
+
* @example
|
|
188
|
+
* await client.business.commerce.products.get({
|
|
189
|
+
* product: "product"
|
|
190
|
+
* })
|
|
191
|
+
*/
|
|
192
|
+
get(request, requestOptions) {
|
|
193
|
+
return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));
|
|
194
|
+
}
|
|
195
|
+
__get(request, requestOptions) {
|
|
196
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
197
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
198
|
+
const { product } = request;
|
|
199
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
200
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
201
|
+
const _response = yield core.fetcher({
|
|
202
|
+
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/commerce/products/${core.url.encodePathParam(product)}`),
|
|
203
|
+
method: "GET",
|
|
204
|
+
headers: _headers,
|
|
205
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
206
|
+
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,
|
|
207
|
+
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,
|
|
208
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
209
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
210
|
+
logging: this._options.logging,
|
|
211
|
+
});
|
|
212
|
+
if (_response.ok) {
|
|
213
|
+
return {
|
|
214
|
+
data: _response.body,
|
|
215
|
+
rawResponse: _response.rawResponse,
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
if (_response.error.reason === "status-code") {
|
|
219
|
+
switch (_response.error.statusCode) {
|
|
220
|
+
case 401:
|
|
221
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
222
|
+
case 403:
|
|
223
|
+
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
224
|
+
case 404:
|
|
225
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
226
|
+
default:
|
|
227
|
+
throw new errors.FiveOneEatError({
|
|
228
|
+
statusCode: _response.error.statusCode,
|
|
229
|
+
body: _response.error.body,
|
|
230
|
+
rawResponse: _response.rawResponse,
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/business/commerce/products/{product}");
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Saves its details. `availability`, when sent, replaces where it's
|
|
239
|
+
* offered; left out, that stays as it is.
|
|
240
|
+
*
|
|
241
|
+
* @param {FiveOneEat.business.commerce.UpdateProductRequest} request
|
|
242
|
+
* @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
243
|
+
*
|
|
244
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
245
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
246
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
247
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
248
|
+
*
|
|
249
|
+
* @example
|
|
250
|
+
* await client.business.commerce.products.update({
|
|
251
|
+
* product: "product",
|
|
252
|
+
* name: "name",
|
|
253
|
+
* tax_code: "tax_code"
|
|
254
|
+
* })
|
|
255
|
+
*/
|
|
256
|
+
update(request, requestOptions) {
|
|
257
|
+
return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions));
|
|
258
|
+
}
|
|
259
|
+
__update(request, requestOptions) {
|
|
260
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
261
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
262
|
+
const { product } = request, _body = __rest(request, ["product"]);
|
|
263
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
264
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
265
|
+
const _response = yield core.fetcher({
|
|
266
|
+
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/commerce/products/${core.url.encodePathParam(product)}`),
|
|
267
|
+
method: "PUT",
|
|
268
|
+
headers: _headers,
|
|
269
|
+
contentType: "application/json",
|
|
270
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
271
|
+
requestType: "json",
|
|
272
|
+
body: _body,
|
|
273
|
+
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,
|
|
274
|
+
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,
|
|
275
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
276
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
277
|
+
logging: this._options.logging,
|
|
278
|
+
});
|
|
279
|
+
if (_response.ok) {
|
|
280
|
+
return {
|
|
281
|
+
data: _response.body,
|
|
282
|
+
rawResponse: _response.rawResponse,
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
if (_response.error.reason === "status-code") {
|
|
286
|
+
switch (_response.error.statusCode) {
|
|
287
|
+
case 401:
|
|
288
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
289
|
+
case 403:
|
|
290
|
+
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
291
|
+
case 404:
|
|
292
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
293
|
+
case 422:
|
|
294
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
295
|
+
default:
|
|
296
|
+
throw new errors.FiveOneEatError({
|
|
297
|
+
statusCode: _response.error.statusCode,
|
|
298
|
+
body: _response.error.body,
|
|
299
|
+
rawResponse: _response.rawResponse,
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/business/commerce/products/{product}");
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Archives it, so its orders keep it. It leaves the list and every store
|
|
308
|
+
* and stand.
|
|
309
|
+
*
|
|
310
|
+
* @param {FiveOneEat.business.commerce.DeleteProductsRequest} request
|
|
311
|
+
* @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
312
|
+
*
|
|
313
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
314
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
315
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
316
|
+
*
|
|
317
|
+
* @example
|
|
318
|
+
* await client.business.commerce.products.delete({
|
|
319
|
+
* product: "product"
|
|
320
|
+
* })
|
|
321
|
+
*/
|
|
322
|
+
delete(request, requestOptions) {
|
|
323
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions));
|
|
324
|
+
}
|
|
325
|
+
__delete(request, requestOptions) {
|
|
326
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
327
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
328
|
+
const { product } = request;
|
|
329
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
330
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
331
|
+
const _response = yield core.fetcher({
|
|
332
|
+
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/commerce/products/${core.url.encodePathParam(product)}`),
|
|
333
|
+
method: "DELETE",
|
|
334
|
+
headers: _headers,
|
|
335
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
336
|
+
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,
|
|
337
|
+
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,
|
|
338
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
339
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
340
|
+
logging: this._options.logging,
|
|
341
|
+
});
|
|
342
|
+
if (_response.ok) {
|
|
343
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
344
|
+
}
|
|
345
|
+
if (_response.error.reason === "status-code") {
|
|
346
|
+
switch (_response.error.statusCode) {
|
|
347
|
+
case 401:
|
|
348
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
349
|
+
case 403:
|
|
350
|
+
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
351
|
+
case 404:
|
|
352
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
353
|
+
default:
|
|
354
|
+
throw new errors.FiveOneEatError({
|
|
355
|
+
statusCode: _response.error.statusCode,
|
|
356
|
+
body: _response.error.body,
|
|
357
|
+
rawResponse: _response.rawResponse,
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/business/commerce/products/{product}");
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
}
|
package/dist/esm/api/resources/business/resources/commerce/resources/products/client/index.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
package/dist/esm/api/resources/business/resources/commerce/resources/products/client/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {}
|
|
4
|
+
*/
|
|
5
|
+
export interface ListProductsRequest {
|
|
6
|
+
/** Only products whose name contains it, any case. */
|
|
7
|
+
search?: string | null;
|
|
8
|
+
/** Only products offered at this store or stand, either way of buying. */
|
|
9
|
+
location?: string | null;
|
|
10
|
+
/** Only products filed in this category. */
|
|
11
|
+
category?: string | null;
|
|
12
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type * as FiveOneEat from "../../../../../../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* "Idempotency-Key": "Idempotency-Key",
|
|
6
|
+
* name: "name",
|
|
7
|
+
* tax_code: "tax_code"
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface StoreProductRequest {
|
|
11
|
+
/** Required, 1–255 characters, new for each product you mean to add: a retry with the same key never adds twice. */
|
|
12
|
+
"Idempotency-Key": string;
|
|
13
|
+
name: string;
|
|
14
|
+
description?: string | null;
|
|
15
|
+
is_active?: boolean;
|
|
16
|
+
tax_code: string;
|
|
17
|
+
product_category_id?: string | null;
|
|
18
|
+
metadata?: Record<string, unknown> | null;
|
|
19
|
+
/** Where it's offered: one entry per store or stand and way of buying. `online` needs one that takes pickup orders, `in_person` one that sells in person. */
|
|
20
|
+
availability?: StoreProductRequest.Availability.Item[] | null;
|
|
21
|
+
price?: number | null;
|
|
22
|
+
compare_at_price?: number | null;
|
|
23
|
+
unit?: FiveOneEat.Unit;
|
|
24
|
+
quantity_step?: number;
|
|
25
|
+
starting_stock?: StoreProductRequest.StartingStock.Item[];
|
|
26
|
+
}
|
|
27
|
+
export declare namespace StoreProductRequest {
|
|
28
|
+
type Availability = Availability.Item[];
|
|
29
|
+
namespace Availability {
|
|
30
|
+
interface Item {
|
|
31
|
+
location_id: string;
|
|
32
|
+
channel: Item.Channel;
|
|
33
|
+
}
|
|
34
|
+
namespace Item {
|
|
35
|
+
const Channel: {
|
|
36
|
+
readonly Online: "online";
|
|
37
|
+
readonly InPerson: "in_person";
|
|
38
|
+
};
|
|
39
|
+
type Channel = (typeof Channel)[keyof typeof Channel];
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
type StartingStock = StartingStock.Item[];
|
|
43
|
+
namespace StartingStock {
|
|
44
|
+
interface Item {
|
|
45
|
+
location_id: string;
|
|
46
|
+
count: number;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
export var StoreProductRequest;
|
|
3
|
+
(function (StoreProductRequest) {
|
|
4
|
+
let Availability;
|
|
5
|
+
(function (Availability) {
|
|
6
|
+
let Item;
|
|
7
|
+
(function (Item) {
|
|
8
|
+
Item.Channel = {
|
|
9
|
+
Online: "online",
|
|
10
|
+
InPerson: "in_person",
|
|
11
|
+
};
|
|
12
|
+
})(Item = Availability.Item || (Availability.Item = {}));
|
|
13
|
+
})(Availability = StoreProductRequest.Availability || (StoreProductRequest.Availability = {}));
|
|
14
|
+
})(StoreProductRequest || (StoreProductRequest = {}));
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* product: "product",
|
|
5
|
+
* name: "name",
|
|
6
|
+
* tax_code: "tax_code"
|
|
7
|
+
* }
|
|
8
|
+
*/
|
|
9
|
+
export interface UpdateProductRequest {
|
|
10
|
+
/** The product ID */
|
|
11
|
+
product: string;
|
|
12
|
+
name: string;
|
|
13
|
+
description?: string | null;
|
|
14
|
+
is_active?: boolean;
|
|
15
|
+
tax_code: string;
|
|
16
|
+
product_category_id?: string | null;
|
|
17
|
+
metadata?: Record<string, unknown> | null;
|
|
18
|
+
/** Where it's offered: one entry per store or stand and way of buying. `online` needs one that takes pickup orders, `in_person` one that sells in person. */
|
|
19
|
+
availability?: UpdateProductRequest.Availability.Item[] | null;
|
|
20
|
+
}
|
|
21
|
+
export declare namespace UpdateProductRequest {
|
|
22
|
+
type Availability = Availability.Item[];
|
|
23
|
+
namespace Availability {
|
|
24
|
+
interface Item {
|
|
25
|
+
location_id: string;
|
|
26
|
+
channel: Item.Channel;
|
|
27
|
+
}
|
|
28
|
+
namespace Item {
|
|
29
|
+
const Channel: {
|
|
30
|
+
readonly Online: "online";
|
|
31
|
+
readonly InPerson: "in_person";
|
|
32
|
+
};
|
|
33
|
+
type Channel = (typeof Channel)[keyof typeof Channel];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|