@51eat/sdk 2.1.0 → 2.2.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/client/Client.d.ts +0 -3
- package/dist/cjs/api/resources/business/client/Client.js +14 -19
- 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 +27 -12
- package/dist/cjs/api/resources/business/resources/commerce/resources/catalog/client/Client.d.ts +30 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/catalog/client/Client.js +116 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/catalog/exports.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/catalog/exports.js +21 -0
- package/dist/cjs/api/resources/business/resources/{productCategories → commerce/resources/catalog}/index.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/{productCategories → commerce/resources/catalog}/index.js +1 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/catalog/types/GetOptionsCatalogResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/catalog/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/catalog/types/index.js +17 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/index.d.ts +8 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/index.js +12 -4
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/Client.d.ts +46 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/Client.js +137 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/GetProductsLocationsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/SetLocationProductsRequest.d.ts +15 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/SetLocationProductsRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/GetProductsLocationsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/GetProductsLocationsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/SetProductsLocationsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/SetProductsLocationsResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/locations/types/index.js +2 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/client/Client.d.ts +80 -0
- package/dist/cjs/api/resources/business/resources/{productCategories → commerce/resources/productCategories}/client/Client.js +142 -49
- package/dist/cjs/api/resources/business/resources/{productCategories → commerce/resources/productCategories}/client/requests/DeleteProductCategoriesRequest.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/client/requests/DeleteProductCategoriesRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/client/requests/StoreProductCategoryRequest.d.ts +14 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/client/requests/StoreProductCategoryRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/client/requests/UpdateProductCategoryRequest.d.ts +14 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/client/requests/UpdateProductCategoryRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/index.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/index.js +18 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/types/CreateProductCategoriesResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/types/CreateProductCategoriesResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/types/ListProductCategoriesResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/types/ListProductCategoriesResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/types/UpdateProductCategoriesResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/types/UpdateProductCategoriesResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/types/index.d.ts +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productCategories/types/index.js +19 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/Client.d.ts +92 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/Client.js +338 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/index.js +17 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/requests/DeleteProductImagesRequest.d.ts +13 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/requests/DeleteProductImagesRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/requests/ReorderProductImagesRequest.d.ts +24 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/requests/ReorderProductImagesRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/requests/StoreProductImageRequest.d.ts +18 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/requests/StoreProductImageRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/requests/UpdateProductImageRequest.d.ts +14 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/requests/UpdateProductImageRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/exports.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/exports.js +21 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/index.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/index.js +18 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/types/ReorderProductImagesResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/types/ReorderProductImagesResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/types/UpdateProductImagesResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/types/UpdateProductImagesResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/types/UploadProductImagesResponse.d.ts +4 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/types/UploadProductImagesResponse.js +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/types/index.d.ts +3 -0
- package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/types/index.js +19 -0
- package/dist/cjs/api/resources/business/resources/index.d.ts +0 -2
- package/dist/cjs/api/resources/business/resources/index.js +1 -3
- package/dist/cjs/api/types/CatalogFormOptionsResource.d.ts +87 -0
- package/dist/cjs/api/types/CatalogFormOptionsResource.js +17 -0
- package/dist/cjs/api/types/LocationProductsResource.d.ts +42 -0
- package/dist/cjs/api/types/LocationProductsResource.js +19 -0
- package/dist/cjs/api/types/ProductCategoryResource.d.ts +4 -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/api/resources/business/client/Client.d.mts +0 -3
- package/dist/esm/api/resources/business/client/Client.mjs +0 -5
- 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/catalog/client/Client.d.mts +30 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/catalog/client/Client.mjs +79 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/catalog/client/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/catalog/client/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/catalog/exports.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/catalog/exports.mjs +3 -0
- package/dist/esm/api/resources/business/resources/{productCategories → commerce/resources/catalog}/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/{productCategories → commerce/resources/catalog}/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/catalog/types/GetOptionsCatalogResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/catalog/types/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/catalog/types/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/index.d.mts +8 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/index.mjs +8 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/Client.d.mts +46 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/Client.mjs +137 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/GetProductsLocationsRequest.d.mts +10 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/SetLocationProductsRequest.d.mts +15 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/SetLocationProductsRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/GetProductsLocationsResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/GetProductsLocationsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/SetProductsLocationsResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/SetProductsLocationsResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/index.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/index.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/client/Client.d.mts +80 -0
- package/dist/esm/api/resources/business/resources/{productCategories → commerce/resources/productCategories}/client/Client.mjs +142 -49
- package/dist/esm/api/resources/business/resources/{productCategories → commerce/resources/productCategories}/client/requests/DeleteProductCategoriesRequest.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/client/requests/DeleteProductCategoriesRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/client/requests/StoreProductCategoryRequest.d.mts +14 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/client/requests/StoreProductCategoryRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/client/requests/UpdateProductCategoryRequest.d.mts +14 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/client/requests/UpdateProductCategoryRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/index.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/index.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/types/CreateProductCategoriesResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/types/CreateProductCategoriesResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/types/ListProductCategoriesResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/types/ListProductCategoriesResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/types/UpdateProductCategoriesResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/types/UpdateProductCategoriesResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/types/index.d.mts +3 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productCategories/types/index.mjs +3 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/Client.d.mts +92 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/Client.mjs +301 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/index.d.mts +1 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/requests/DeleteProductImagesRequest.d.mts +13 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/requests/DeleteProductImagesRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/requests/ReorderProductImagesRequest.d.mts +24 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/requests/ReorderProductImagesRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/requests/StoreProductImageRequest.d.mts +18 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/requests/StoreProductImageRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/requests/UpdateProductImageRequest.d.mts +14 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/requests/UpdateProductImageRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/exports.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/exports.mjs +3 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/index.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/index.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/types/ReorderProductImagesResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/types/ReorderProductImagesResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/types/UpdateProductImagesResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/types/UpdateProductImagesResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/types/UploadProductImagesResponse.d.mts +4 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/types/UploadProductImagesResponse.mjs +2 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/types/index.d.mts +3 -0
- package/dist/esm/api/resources/business/resources/commerce/resources/productImages/types/index.mjs +3 -0
- package/dist/esm/api/resources/business/resources/index.d.mts +0 -2
- package/dist/esm/api/resources/business/resources/index.mjs +0 -2
- package/dist/esm/api/types/CatalogFormOptionsResource.d.mts +87 -0
- package/dist/esm/api/types/CatalogFormOptionsResource.mjs +14 -0
- package/dist/esm/api/types/LocationProductsResource.d.mts +42 -0
- package/dist/esm/api/types/LocationProductsResource.mjs +16 -0
- package/dist/esm/api/types/ProductCategoryResource.d.mts +4 -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 +34 -12
- package/reference.md +543 -42
- package/dist/cjs/api/resources/business/resources/productCategories/client/Client.d.ts +0 -51
- package/dist/cjs/api/resources/business/resources/productCategories/client/requests/UpdateProductCategoriesRequest.d.ts +0 -9
- package/dist/cjs/api/resources/business/resources/productCategories/client/requests/index.d.ts +0 -2
- package/dist/esm/api/resources/business/resources/productCategories/client/Client.d.mts +0 -51
- package/dist/esm/api/resources/business/resources/productCategories/client/requests/UpdateProductCategoriesRequest.d.mts +0 -9
- package/dist/esm/api/resources/business/resources/productCategories/client/requests/index.d.mts +0 -2
- /package/dist/{esm/api/resources/business/resources/productCategories/client/requests/index.mjs → cjs/api/resources/business/resources/commerce/resources/catalog/client/index.d.ts} +0 -0
- /package/dist/cjs/api/resources/business/resources/{productCategories/client/requests → commerce/resources/catalog/client}/index.js +0 -0
- /package/dist/cjs/api/resources/business/resources/{productCategories/client/requests/DeleteProductCategoriesRequest.js → commerce/resources/catalog/types/GetOptionsCatalogResponse.js} +0 -0
- /package/dist/cjs/api/resources/business/resources/{productCategories/client/requests/UpdateProductCategoriesRequest.js → commerce/resources/locations/client/requests/GetProductsLocationsRequest.js} +0 -0
- /package/dist/cjs/api/resources/business/resources/{productCategories → commerce/resources/productCategories}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/business/resources/{productCategories → commerce/resources/productCategories}/client/index.js +0 -0
- /package/dist/cjs/api/resources/business/resources/{productCategories → commerce/resources/productCategories}/exports.d.ts +0 -0
- /package/dist/cjs/api/resources/business/resources/{productCategories → commerce/resources/productCategories}/exports.js +0 -0
- /package/dist/esm/api/resources/business/resources/{productCategories/client/requests/DeleteProductCategoriesRequest.mjs → commerce/resources/catalog/types/GetOptionsCatalogResponse.mjs} +0 -0
- /package/dist/esm/api/resources/business/resources/{productCategories/client/requests/UpdateProductCategoriesRequest.mjs → commerce/resources/locations/client/requests/GetProductsLocationsRequest.mjs} +0 -0
- /package/dist/esm/api/resources/business/resources/{productCategories → commerce/resources/productCategories}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/business/resources/{productCategories → commerce/resources/productCategories}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/business/resources/{productCategories → commerce/resources/productCategories}/exports.d.mts +0 -0
- /package/dist/esm/api/resources/business/resources/{productCategories → commerce/resources/productCategories}/exports.mjs +0 -0
package/dist/esm/api/resources/business/resources/commerce/resources/catalog/client/Client.mjs
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
import { normalizeClientOptionsWithAuth, } from "../../../../../../../../BaseClient.mjs";
|
|
12
|
+
import { mergeHeaders } from "../../../../../../../../core/headers.mjs";
|
|
13
|
+
import * as core from "../../../../../../../../core/index.mjs";
|
|
14
|
+
import * as environments from "../../../../../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
|
+
import * as errors from "../../../../../../../../errors/index.mjs";
|
|
17
|
+
import * as FiveOneEat from "../../../../../../../index.mjs";
|
|
18
|
+
export class CatalogClient {
|
|
19
|
+
constructor(options = {}) {
|
|
20
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The units an option is sold in, the tax codes the business's products
|
|
24
|
+
* may use (a restaurant seller's are food and drink, with
|
|
25
|
+
* `prepared_food_tax_code` as the default; everyone else's are general
|
|
26
|
+
* goods), its categories and unarchived locations, and whether it can
|
|
27
|
+
* sell, take payments and put a product on sale (`readiness`).
|
|
28
|
+
*
|
|
29
|
+
* @param {CatalogClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
30
|
+
*
|
|
31
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
32
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* await client.business.commerce.catalog.getOptions()
|
|
36
|
+
*/
|
|
37
|
+
getOptions(requestOptions) {
|
|
38
|
+
return core.HttpResponsePromise.fromPromise(this.__getOptions(requestOptions));
|
|
39
|
+
}
|
|
40
|
+
__getOptions(requestOptions) {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
43
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
44
|
+
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);
|
|
45
|
+
const _response = yield core.fetcher({
|
|
46
|
+
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/catalog/options"),
|
|
47
|
+
method: "GET",
|
|
48
|
+
headers: _headers,
|
|
49
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
50
|
+
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,
|
|
51
|
+
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,
|
|
52
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
53
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
54
|
+
logging: this._options.logging,
|
|
55
|
+
});
|
|
56
|
+
if (_response.ok) {
|
|
57
|
+
return {
|
|
58
|
+
data: _response.body,
|
|
59
|
+
rawResponse: _response.rawResponse,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
if (_response.error.reason === "status-code") {
|
|
63
|
+
switch (_response.error.statusCode) {
|
|
64
|
+
case 401:
|
|
65
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
66
|
+
case 403:
|
|
67
|
+
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
68
|
+
default:
|
|
69
|
+
throw new errors.FiveOneEatError({
|
|
70
|
+
statusCode: _response.error.statusCode,
|
|
71
|
+
body: _response.error.body,
|
|
72
|
+
rawResponse: _response.rawResponse,
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/business/commerce/catalog/options");
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
package/dist/esm/api/resources/business/resources/commerce/resources/catalog/client/index.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/esm/api/resources/business/resources/commerce/resources/catalog/types/index.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./GetOptionsCatalogResponse.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./GetOptionsCatalogResponse.mjs";
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
+
export * as catalog from "./catalog/index.mjs";
|
|
2
|
+
export * from "./catalog/types/index.mjs";
|
|
1
3
|
export * from "./locations/client/requests/index.mjs";
|
|
2
4
|
export * as locations from "./locations/index.mjs";
|
|
3
5
|
export * from "./locations/types/index.mjs";
|
|
4
6
|
export * from "./orders/client/requests/index.mjs";
|
|
5
7
|
export * as orders from "./orders/index.mjs";
|
|
6
8
|
export * from "./orders/types/index.mjs";
|
|
9
|
+
export * from "./productCategories/client/requests/index.mjs";
|
|
10
|
+
export * as productCategories from "./productCategories/index.mjs";
|
|
11
|
+
export * from "./productCategories/types/index.mjs";
|
|
12
|
+
export * from "./productImages/client/requests/index.mjs";
|
|
13
|
+
export * as productImages from "./productImages/index.mjs";
|
|
14
|
+
export * from "./productImages/types/index.mjs";
|
|
7
15
|
export * from "./products/client/requests/index.mjs";
|
|
8
16
|
export * as products from "./products/index.mjs";
|
|
9
17
|
export * from "./products/types/index.mjs";
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
+
export * as catalog from "./catalog/index.mjs";
|
|
2
|
+
export * from "./catalog/types/index.mjs";
|
|
1
3
|
export * from "./locations/client/requests/index.mjs";
|
|
2
4
|
export * as locations from "./locations/index.mjs";
|
|
3
5
|
export * from "./locations/types/index.mjs";
|
|
4
6
|
export * from "./orders/client/requests/index.mjs";
|
|
5
7
|
export * as orders from "./orders/index.mjs";
|
|
6
8
|
export * from "./orders/types/index.mjs";
|
|
9
|
+
export * from "./productCategories/client/requests/index.mjs";
|
|
10
|
+
export * as productCategories from "./productCategories/index.mjs";
|
|
11
|
+
export * from "./productCategories/types/index.mjs";
|
|
12
|
+
export * from "./productImages/client/requests/index.mjs";
|
|
13
|
+
export * as productImages from "./productImages/index.mjs";
|
|
14
|
+
export * from "./productImages/types/index.mjs";
|
|
7
15
|
export * from "./products/client/requests/index.mjs";
|
|
8
16
|
export * as products from "./products/index.mjs";
|
|
9
17
|
export * from "./products/types/index.mjs";
|
package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/Client.d.mts
CHANGED
|
@@ -53,6 +53,52 @@ export declare class LocationsClient {
|
|
|
53
53
|
*/
|
|
54
54
|
create(request: FiveOneEat.business.commerce.StoreLocationRequest, requestOptions?: LocationsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.commerce.CreateLocationsResponse>;
|
|
55
55
|
private __create;
|
|
56
|
+
/**
|
|
57
|
+
* Every product of the business, by name, and the IDs of those sold here
|
|
58
|
+
* (`selected`): online, for pickup, at a store; in person at a stand
|
|
59
|
+
* (`channel`). `location.sells_this_way` is false while the location
|
|
60
|
+
* doesn't sell that way at all, and nothing can be added there.
|
|
61
|
+
*
|
|
62
|
+
* @param {FiveOneEat.business.commerce.GetProductsLocationsRequest} request
|
|
63
|
+
* @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
|
+
*
|
|
65
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
66
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
67
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* await client.business.commerce.locations.getProducts({
|
|
71
|
+
* location: "location"
|
|
72
|
+
* })
|
|
73
|
+
*/
|
|
74
|
+
getProducts(request: FiveOneEat.business.commerce.GetProductsLocationsRequest, requestOptions?: LocationsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.commerce.GetProductsLocationsResponse>;
|
|
75
|
+
private __getProducts;
|
|
76
|
+
/**
|
|
77
|
+
* Sells exactly `product_ids` here, the way the location sells; an empty
|
|
78
|
+
* list takes them all off. Each product's other stores and stands stay
|
|
79
|
+
* as they are. Saving replaces what is there, so a retry is safe.
|
|
80
|
+
* `active: true` switches the location on before adding, `active: false`
|
|
81
|
+
* off after taking off. A product added where the location can't sell it
|
|
82
|
+
* (switched off, archived, or not taking pickup orders or selling in
|
|
83
|
+
* person) is refused with a form error on `availability`, and one that
|
|
84
|
+
* isn't the business's on `product_ids.*`.
|
|
85
|
+
*
|
|
86
|
+
* @param {FiveOneEat.business.commerce.SetLocationProductsRequest} request
|
|
87
|
+
* @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
88
|
+
*
|
|
89
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
90
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
91
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
92
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* await client.business.commerce.locations.setProducts({
|
|
96
|
+
* location: "location",
|
|
97
|
+
* product_ids: ["product_ids"]
|
|
98
|
+
* })
|
|
99
|
+
*/
|
|
100
|
+
setProducts(request: FiveOneEat.business.commerce.SetLocationProductsRequest, requestOptions?: LocationsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.commerce.SetProductsLocationsResponse>;
|
|
101
|
+
private __setProducts;
|
|
56
102
|
/**
|
|
57
103
|
* @param {FiveOneEat.business.commerce.GetLocationsRequest} request
|
|
58
104
|
* @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
package/dist/esm/api/resources/business/resources/commerce/resources/locations/client/Client.mjs
CHANGED
|
@@ -159,6 +159,143 @@ export class LocationsClient {
|
|
|
159
159
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/business/commerce/locations");
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
|
+
/**
|
|
163
|
+
* Every product of the business, by name, and the IDs of those sold here
|
|
164
|
+
* (`selected`): online, for pickup, at a store; in person at a stand
|
|
165
|
+
* (`channel`). `location.sells_this_way` is false while the location
|
|
166
|
+
* doesn't sell that way at all, and nothing can be added there.
|
|
167
|
+
*
|
|
168
|
+
* @param {FiveOneEat.business.commerce.GetProductsLocationsRequest} request
|
|
169
|
+
* @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
170
|
+
*
|
|
171
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
172
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
173
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* await client.business.commerce.locations.getProducts({
|
|
177
|
+
* location: "location"
|
|
178
|
+
* })
|
|
179
|
+
*/
|
|
180
|
+
getProducts(request, requestOptions) {
|
|
181
|
+
return core.HttpResponsePromise.fromPromise(this.__getProducts(request, requestOptions));
|
|
182
|
+
}
|
|
183
|
+
__getProducts(request, requestOptions) {
|
|
184
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
185
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
186
|
+
const { location } = request;
|
|
187
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
188
|
+
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);
|
|
189
|
+
const _response = yield core.fetcher({
|
|
190
|
+
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/locations/${core.url.encodePathParam(location)}/products`),
|
|
191
|
+
method: "GET",
|
|
192
|
+
headers: _headers,
|
|
193
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
194
|
+
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,
|
|
195
|
+
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,
|
|
196
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
197
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
198
|
+
logging: this._options.logging,
|
|
199
|
+
});
|
|
200
|
+
if (_response.ok) {
|
|
201
|
+
return {
|
|
202
|
+
data: _response.body,
|
|
203
|
+
rawResponse: _response.rawResponse,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
if (_response.error.reason === "status-code") {
|
|
207
|
+
switch (_response.error.statusCode) {
|
|
208
|
+
case 401:
|
|
209
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
210
|
+
case 403:
|
|
211
|
+
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
212
|
+
case 404:
|
|
213
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
214
|
+
default:
|
|
215
|
+
throw new errors.FiveOneEatError({
|
|
216
|
+
statusCode: _response.error.statusCode,
|
|
217
|
+
body: _response.error.body,
|
|
218
|
+
rawResponse: _response.rawResponse,
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/business/commerce/locations/{location}/products");
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Sells exactly `product_ids` here, the way the location sells; an empty
|
|
227
|
+
* list takes them all off. Each product's other stores and stands stay
|
|
228
|
+
* as they are. Saving replaces what is there, so a retry is safe.
|
|
229
|
+
* `active: true` switches the location on before adding, `active: false`
|
|
230
|
+
* off after taking off. A product added where the location can't sell it
|
|
231
|
+
* (switched off, archived, or not taking pickup orders or selling in
|
|
232
|
+
* person) is refused with a form error on `availability`, and one that
|
|
233
|
+
* isn't the business's on `product_ids.*`.
|
|
234
|
+
*
|
|
235
|
+
* @param {FiveOneEat.business.commerce.SetLocationProductsRequest} request
|
|
236
|
+
* @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
237
|
+
*
|
|
238
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
239
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
240
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
241
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
242
|
+
*
|
|
243
|
+
* @example
|
|
244
|
+
* await client.business.commerce.locations.setProducts({
|
|
245
|
+
* location: "location",
|
|
246
|
+
* product_ids: ["product_ids"]
|
|
247
|
+
* })
|
|
248
|
+
*/
|
|
249
|
+
setProducts(request, requestOptions) {
|
|
250
|
+
return core.HttpResponsePromise.fromPromise(this.__setProducts(request, requestOptions));
|
|
251
|
+
}
|
|
252
|
+
__setProducts(request, requestOptions) {
|
|
253
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
254
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
255
|
+
const { location } = request, _body = __rest(request, ["location"]);
|
|
256
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
257
|
+
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);
|
|
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/commerce/locations/${core.url.encodePathParam(location)}/products`),
|
|
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 handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/business/commerce/locations/{location}/products");
|
|
297
|
+
});
|
|
298
|
+
}
|
|
162
299
|
/**
|
|
163
300
|
* @param {FiveOneEat.business.commerce.GetLocationsRequest} request
|
|
164
301
|
* @param {LocationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* location: "location",
|
|
5
|
+
* product_ids: ["product_ids"]
|
|
6
|
+
* }
|
|
7
|
+
*/
|
|
8
|
+
export interface SetLocationProductsRequest {
|
|
9
|
+
/** The location ID */
|
|
10
|
+
location: string;
|
|
11
|
+
/** Every product sold here; an empty list takes them all off. */
|
|
12
|
+
product_ids: string[];
|
|
13
|
+
/** Switch the location on before adding, or off after taking off. Left out, it stays as it is. */
|
|
14
|
+
active?: boolean;
|
|
15
|
+
}
|
|
@@ -4,9 +4,11 @@ export type { FlyerLocationsRequest } from "./FlyerLocationsRequest.mjs";
|
|
|
4
4
|
export type { GetHoursLocationsRequest } from "./GetHoursLocationsRequest.mjs";
|
|
5
5
|
export type { GetLocationsRequest } from "./GetLocationsRequest.mjs";
|
|
6
6
|
export type { GetPickupLocationsRequest } from "./GetPickupLocationsRequest.mjs";
|
|
7
|
+
export type { GetProductsLocationsRequest } from "./GetProductsLocationsRequest.mjs";
|
|
7
8
|
export type { OfferMainStoreProductsLocationsRequest } from "./OfferMainStoreProductsLocationsRequest.mjs";
|
|
8
9
|
export type { PreviewPickupScheduleRequest } from "./PreviewPickupScheduleRequest.mjs";
|
|
9
10
|
export type { SetLocationActiveRequest } from "./SetLocationActiveRequest.mjs";
|
|
11
|
+
export type { SetLocationProductsRequest } from "./SetLocationProductsRequest.mjs";
|
|
10
12
|
export { StoreLocationRequest } from "./StoreLocationRequest.mjs";
|
|
11
13
|
export type { UpdateLocationsRequest } from "./UpdateLocationsRequest.mjs";
|
|
12
14
|
export type { UpdateOpeningHoursRequest } from "./UpdateOpeningHoursRequest.mjs";
|
package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/index.d.mts
CHANGED
|
@@ -4,10 +4,12 @@ export * from "./FlyerLocationsResponse.mjs";
|
|
|
4
4
|
export * from "./GetHoursLocationsResponse.mjs";
|
|
5
5
|
export * from "./GetLocationsResponse.mjs";
|
|
6
6
|
export * from "./GetPickupLocationsResponse.mjs";
|
|
7
|
+
export * from "./GetProductsLocationsResponse.mjs";
|
|
7
8
|
export * from "./ListLocationsResponse.mjs";
|
|
8
9
|
export * from "./OfferMainStoreProductsLocationsResponse.mjs";
|
|
9
10
|
export * from "./PreviewPickupAffectedOrdersLocationsResponse.mjs";
|
|
10
11
|
export * from "./SetActiveLocationsResponse.mjs";
|
|
12
|
+
export * from "./SetProductsLocationsResponse.mjs";
|
|
11
13
|
export * from "./UpdateHoursLocationsResponse.mjs";
|
|
12
14
|
export * from "./UpdateLocationsResponse.mjs";
|
|
13
15
|
export * from "./UpdatePickupLocationsResponse.mjs";
|
package/dist/esm/api/resources/business/resources/commerce/resources/locations/types/index.mjs
CHANGED
|
@@ -4,10 +4,12 @@ export * from "./FlyerLocationsResponse.mjs";
|
|
|
4
4
|
export * from "./GetHoursLocationsResponse.mjs";
|
|
5
5
|
export * from "./GetLocationsResponse.mjs";
|
|
6
6
|
export * from "./GetPickupLocationsResponse.mjs";
|
|
7
|
+
export * from "./GetProductsLocationsResponse.mjs";
|
|
7
8
|
export * from "./ListLocationsResponse.mjs";
|
|
8
9
|
export * from "./OfferMainStoreProductsLocationsResponse.mjs";
|
|
9
10
|
export * from "./PreviewPickupAffectedOrdersLocationsResponse.mjs";
|
|
10
11
|
export * from "./SetActiveLocationsResponse.mjs";
|
|
12
|
+
export * from "./SetProductsLocationsResponse.mjs";
|
|
11
13
|
export * from "./UpdateHoursLocationsResponse.mjs";
|
|
12
14
|
export * from "./UpdateLocationsResponse.mjs";
|
|
13
15
|
export * from "./UpdatePickupLocationsResponse.mjs";
|
|
@@ -0,0 +1,80 @@
|
|
|
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 ProductCategoriesClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class ProductCategoriesClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<ProductCategoriesClient.Options>;
|
|
12
|
+
constructor(options?: ProductCategoriesClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* In their order, flat (a child names its parent in `parent_id`), each
|
|
15
|
+
* with `products_count`, the products filed directly under it.
|
|
16
|
+
*
|
|
17
|
+
* @param {ProductCategoriesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
|
+
*
|
|
19
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
20
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* await client.business.commerce.productCategories.list()
|
|
24
|
+
*/
|
|
25
|
+
list(requestOptions?: ProductCategoriesClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.commerce.ListProductCategoriesResponse>;
|
|
26
|
+
private __list;
|
|
27
|
+
/**
|
|
28
|
+
* Answers 201.
|
|
29
|
+
*
|
|
30
|
+
* @param {FiveOneEat.business.commerce.StoreProductCategoryRequest} request
|
|
31
|
+
* @param {ProductCategoriesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
32
|
+
*
|
|
33
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
34
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
35
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* await client.business.commerce.productCategories.create({
|
|
39
|
+
* "Idempotency-Key": "Idempotency-Key",
|
|
40
|
+
* name: "name"
|
|
41
|
+
* })
|
|
42
|
+
*/
|
|
43
|
+
create(request: FiveOneEat.business.commerce.StoreProductCategoryRequest, requestOptions?: ProductCategoriesClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.commerce.CreateProductCategoriesResponse>;
|
|
44
|
+
private __create;
|
|
45
|
+
/**
|
|
46
|
+
* @param {FiveOneEat.business.commerce.UpdateProductCategoryRequest} request
|
|
47
|
+
* @param {ProductCategoriesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
48
|
+
*
|
|
49
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
50
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
51
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
52
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* await client.business.commerce.productCategories.update({
|
|
56
|
+
* productCategory: "productCategory",
|
|
57
|
+
* name: "name"
|
|
58
|
+
* })
|
|
59
|
+
*/
|
|
60
|
+
update(request: FiveOneEat.business.commerce.UpdateProductCategoryRequest, requestOptions?: ProductCategoriesClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.commerce.UpdateProductCategoriesResponse>;
|
|
61
|
+
private __update;
|
|
62
|
+
/**
|
|
63
|
+
* Its children become top-level categories and its products, and theirs,
|
|
64
|
+
* are left uncategorised.
|
|
65
|
+
*
|
|
66
|
+
* @param {FiveOneEat.business.commerce.DeleteProductCategoriesRequest} request
|
|
67
|
+
* @param {ProductCategoriesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
68
|
+
*
|
|
69
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
70
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
71
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* await client.business.commerce.productCategories.delete({
|
|
75
|
+
* productCategory: "productCategory"
|
|
76
|
+
* })
|
|
77
|
+
*/
|
|
78
|
+
delete(request: FiveOneEat.business.commerce.DeleteProductCategoriesRequest, requestOptions?: ProductCategoriesClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
79
|
+
private __delete;
|
|
80
|
+
}
|