@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/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "@51eat/sdk",
|
|
46
|
-
"X-Fern-SDK-Version": "2.
|
|
47
|
-
"User-Agent": "@51eat/sdk/2.
|
|
46
|
+
"X-Fern-SDK-Version": "2.2.0",
|
|
47
|
+
"User-Agent": "@51eat/sdk/2.2.0",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -14,7 +14,6 @@ import { GalleryClient } from "../resources/gallery/client/Client.js";
|
|
|
14
14
|
import { HoursClient } from "../resources/hours/client/Client.js";
|
|
15
15
|
import { MenusClient } from "../resources/menus/client/Client.js";
|
|
16
16
|
import { MessagingClient } from "../resources/messaging/client/Client.js";
|
|
17
|
-
import { ProductCategoriesClient } from "../resources/productCategories/client/Client.js";
|
|
18
17
|
import { ProductOrdersClient } from "../resources/productOrders/client/Client.js";
|
|
19
18
|
import { ProfileClient } from "../resources/profile/client/Client.js";
|
|
20
19
|
import { PushNotificationsClient } from "../resources/pushNotifications/client/Client.js";
|
|
@@ -46,7 +45,6 @@ export declare class BusinessClient {
|
|
|
46
45
|
protected _categories: CategoriesClient | undefined;
|
|
47
46
|
protected _allergens: AllergensClient | undefined;
|
|
48
47
|
protected _temporaryLocations: TemporaryLocationsClient | undefined;
|
|
49
|
-
protected _productCategories: ProductCategoriesClient | undefined;
|
|
50
48
|
protected _commerce: CommerceClient | undefined;
|
|
51
49
|
protected _shipping: ShippingClient | undefined;
|
|
52
50
|
constructor(options?: BusinessClient.Options);
|
|
@@ -69,7 +67,6 @@ export declare class BusinessClient {
|
|
|
69
67
|
get categories(): CategoriesClient;
|
|
70
68
|
get allergens(): AllergensClient;
|
|
71
69
|
get temporaryLocations(): TemporaryLocationsClient;
|
|
72
|
-
get productCategories(): ProductCategoriesClient;
|
|
73
70
|
get commerce(): CommerceClient;
|
|
74
71
|
get shipping(): ShippingClient;
|
|
75
72
|
}
|
|
@@ -17,14 +17,13 @@ const Client_js_11 = require("../resources/gallery/client/Client.js");
|
|
|
17
17
|
const Client_js_12 = require("../resources/hours/client/Client.js");
|
|
18
18
|
const Client_js_13 = require("../resources/menus/client/Client.js");
|
|
19
19
|
const Client_js_14 = require("../resources/messaging/client/Client.js");
|
|
20
|
-
const Client_js_15 = require("../resources/
|
|
21
|
-
const Client_js_16 = require("../resources/
|
|
22
|
-
const Client_js_17 = require("../resources/
|
|
23
|
-
const Client_js_18 = require("../resources/
|
|
24
|
-
const Client_js_19 = require("../resources/
|
|
25
|
-
const Client_js_20 = require("../resources/
|
|
26
|
-
const Client_js_21 = require("../resources/
|
|
27
|
-
const Client_js_22 = require("../resources/temporaryLocations/client/Client.js");
|
|
20
|
+
const Client_js_15 = require("../resources/productOrders/client/Client.js");
|
|
21
|
+
const Client_js_16 = require("../resources/profile/client/Client.js");
|
|
22
|
+
const Client_js_17 = require("../resources/pushNotifications/client/Client.js");
|
|
23
|
+
const Client_js_18 = require("../resources/shipping/client/Client.js");
|
|
24
|
+
const Client_js_19 = require("../resources/stands/client/Client.js");
|
|
25
|
+
const Client_js_20 = require("../resources/stripeConnect/client/Client.js");
|
|
26
|
+
const Client_js_21 = require("../resources/temporaryLocations/client/Client.js");
|
|
28
27
|
class BusinessClient {
|
|
29
28
|
constructor(options = {}) {
|
|
30
29
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
@@ -47,7 +46,7 @@ class BusinessClient {
|
|
|
47
46
|
}
|
|
48
47
|
get productOrders() {
|
|
49
48
|
var _a;
|
|
50
|
-
return ((_a = this._productOrders) !== null && _a !== void 0 ? _a : (this._productOrders = new
|
|
49
|
+
return ((_a = this._productOrders) !== null && _a !== void 0 ? _a : (this._productOrders = new Client_js_15.ProductOrdersClient(this._options)));
|
|
51
50
|
}
|
|
52
51
|
get events() {
|
|
53
52
|
var _a;
|
|
@@ -71,19 +70,19 @@ class BusinessClient {
|
|
|
71
70
|
}
|
|
72
71
|
get profile() {
|
|
73
72
|
var _a;
|
|
74
|
-
return ((_a = this._profile) !== null && _a !== void 0 ? _a : (this._profile = new
|
|
73
|
+
return ((_a = this._profile) !== null && _a !== void 0 ? _a : (this._profile = new Client_js_16.ProfileClient(this._options)));
|
|
75
74
|
}
|
|
76
75
|
get pushNotifications() {
|
|
77
76
|
var _a;
|
|
78
|
-
return ((_a = this._pushNotifications) !== null && _a !== void 0 ? _a : (this._pushNotifications = new
|
|
77
|
+
return ((_a = this._pushNotifications) !== null && _a !== void 0 ? _a : (this._pushNotifications = new Client_js_17.PushNotificationsClient(this._options)));
|
|
79
78
|
}
|
|
80
79
|
get stands() {
|
|
81
80
|
var _a;
|
|
82
|
-
return ((_a = this._stands) !== null && _a !== void 0 ? _a : (this._stands = new
|
|
81
|
+
return ((_a = this._stands) !== null && _a !== void 0 ? _a : (this._stands = new Client_js_19.StandsClient(this._options)));
|
|
83
82
|
}
|
|
84
83
|
get stripeConnect() {
|
|
85
84
|
var _a;
|
|
86
|
-
return ((_a = this._stripeConnect) !== null && _a !== void 0 ? _a : (this._stripeConnect = new
|
|
85
|
+
return ((_a = this._stripeConnect) !== null && _a !== void 0 ? _a : (this._stripeConnect = new Client_js_20.StripeConnectClient(this._options)));
|
|
87
86
|
}
|
|
88
87
|
get cuisines() {
|
|
89
88
|
var _a;
|
|
@@ -103,11 +102,7 @@ class BusinessClient {
|
|
|
103
102
|
}
|
|
104
103
|
get temporaryLocations() {
|
|
105
104
|
var _a;
|
|
106
|
-
return ((_a = this._temporaryLocations) !== null && _a !== void 0 ? _a : (this._temporaryLocations = new
|
|
107
|
-
}
|
|
108
|
-
get productCategories() {
|
|
109
|
-
var _a;
|
|
110
|
-
return ((_a = this._productCategories) !== null && _a !== void 0 ? _a : (this._productCategories = new Client_js_15.ProductCategoriesClient(this._options)));
|
|
105
|
+
return ((_a = this._temporaryLocations) !== null && _a !== void 0 ? _a : (this._temporaryLocations = new Client_js_21.TemporaryLocationsClient(this._options)));
|
|
111
106
|
}
|
|
112
107
|
get commerce() {
|
|
113
108
|
var _a;
|
|
@@ -115,7 +110,7 @@ class BusinessClient {
|
|
|
115
110
|
}
|
|
116
111
|
get shipping() {
|
|
117
112
|
var _a;
|
|
118
|
-
return ((_a = this._shipping) !== null && _a !== void 0 ? _a : (this._shipping = new
|
|
113
|
+
return ((_a = this._shipping) !== null && _a !== void 0 ? _a : (this._shipping = new Client_js_18.ShippingClient(this._options)));
|
|
119
114
|
}
|
|
120
115
|
}
|
|
121
116
|
exports.BusinessClient = BusinessClient;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { BaseClientOptions } from "../../../../../../BaseClient.js";
|
|
2
2
|
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
|
|
3
|
+
import { CatalogClient } from "../resources/catalog/client/Client.js";
|
|
3
4
|
import { LocationsClient } from "../resources/locations/client/Client.js";
|
|
4
5
|
import { OrdersClient } from "../resources/orders/client/Client.js";
|
|
6
|
+
import { ProductCategoriesClient } from "../resources/productCategories/client/Client.js";
|
|
7
|
+
import { ProductImagesClient } from "../resources/productImages/client/Client.js";
|
|
5
8
|
import { ProductsClient } from "../resources/products/client/Client.js";
|
|
6
9
|
import { SellingClient } from "../resources/selling/client/Client.js";
|
|
7
10
|
import { StockClient } from "../resources/stock/client/Client.js";
|
|
@@ -11,17 +14,23 @@ export declare namespace CommerceClient {
|
|
|
11
14
|
}
|
|
12
15
|
export declare class CommerceClient {
|
|
13
16
|
protected readonly _options: NormalizedClientOptionsWithAuth<CommerceClient.Options>;
|
|
17
|
+
protected _productCategories: ProductCategoriesClient | undefined;
|
|
14
18
|
protected _locations: LocationsClient | undefined;
|
|
15
19
|
protected _orders: OrdersClient | undefined;
|
|
16
20
|
protected _products: ProductsClient | undefined;
|
|
21
|
+
protected _catalog: CatalogClient | undefined;
|
|
17
22
|
protected _variants: VariantsClient | undefined;
|
|
23
|
+
protected _productImages: ProductImagesClient | undefined;
|
|
18
24
|
protected _selling: SellingClient | undefined;
|
|
19
25
|
protected _stock: StockClient | undefined;
|
|
20
26
|
constructor(options?: CommerceClient.Options);
|
|
27
|
+
get productCategories(): ProductCategoriesClient;
|
|
21
28
|
get locations(): LocationsClient;
|
|
22
29
|
get orders(): OrdersClient;
|
|
23
30
|
get products(): ProductsClient;
|
|
31
|
+
get catalog(): CatalogClient;
|
|
24
32
|
get variants(): VariantsClient;
|
|
33
|
+
get productImages(): ProductImagesClient;
|
|
25
34
|
get selling(): SellingClient;
|
|
26
35
|
get stock(): StockClient;
|
|
27
36
|
}
|
|
@@ -3,39 +3,54 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.CommerceClient = void 0;
|
|
5
5
|
const BaseClient_js_1 = require("../../../../../../BaseClient.js");
|
|
6
|
-
const Client_js_1 = require("../resources/
|
|
7
|
-
const Client_js_2 = require("../resources/
|
|
8
|
-
const Client_js_3 = require("../resources/
|
|
9
|
-
const Client_js_4 = require("../resources/
|
|
10
|
-
const Client_js_5 = require("../resources/
|
|
11
|
-
const Client_js_6 = require("../resources/
|
|
6
|
+
const Client_js_1 = require("../resources/catalog/client/Client.js");
|
|
7
|
+
const Client_js_2 = require("../resources/locations/client/Client.js");
|
|
8
|
+
const Client_js_3 = require("../resources/orders/client/Client.js");
|
|
9
|
+
const Client_js_4 = require("../resources/productCategories/client/Client.js");
|
|
10
|
+
const Client_js_5 = require("../resources/productImages/client/Client.js");
|
|
11
|
+
const Client_js_6 = require("../resources/products/client/Client.js");
|
|
12
|
+
const Client_js_7 = require("../resources/selling/client/Client.js");
|
|
13
|
+
const Client_js_8 = require("../resources/stock/client/Client.js");
|
|
14
|
+
const Client_js_9 = require("../resources/variants/client/Client.js");
|
|
12
15
|
class CommerceClient {
|
|
13
16
|
constructor(options = {}) {
|
|
14
17
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
15
18
|
}
|
|
19
|
+
get productCategories() {
|
|
20
|
+
var _a;
|
|
21
|
+
return ((_a = this._productCategories) !== null && _a !== void 0 ? _a : (this._productCategories = new Client_js_4.ProductCategoriesClient(this._options)));
|
|
22
|
+
}
|
|
16
23
|
get locations() {
|
|
17
24
|
var _a;
|
|
18
|
-
return ((_a = this._locations) !== null && _a !== void 0 ? _a : (this._locations = new
|
|
25
|
+
return ((_a = this._locations) !== null && _a !== void 0 ? _a : (this._locations = new Client_js_2.LocationsClient(this._options)));
|
|
19
26
|
}
|
|
20
27
|
get orders() {
|
|
21
28
|
var _a;
|
|
22
|
-
return ((_a = this._orders) !== null && _a !== void 0 ? _a : (this._orders = new
|
|
29
|
+
return ((_a = this._orders) !== null && _a !== void 0 ? _a : (this._orders = new Client_js_3.OrdersClient(this._options)));
|
|
23
30
|
}
|
|
24
31
|
get products() {
|
|
25
32
|
var _a;
|
|
26
|
-
return ((_a = this._products) !== null && _a !== void 0 ? _a : (this._products = new
|
|
33
|
+
return ((_a = this._products) !== null && _a !== void 0 ? _a : (this._products = new Client_js_6.ProductsClient(this._options)));
|
|
34
|
+
}
|
|
35
|
+
get catalog() {
|
|
36
|
+
var _a;
|
|
37
|
+
return ((_a = this._catalog) !== null && _a !== void 0 ? _a : (this._catalog = new Client_js_1.CatalogClient(this._options)));
|
|
27
38
|
}
|
|
28
39
|
get variants() {
|
|
29
40
|
var _a;
|
|
30
|
-
return ((_a = this._variants) !== null && _a !== void 0 ? _a : (this._variants = new
|
|
41
|
+
return ((_a = this._variants) !== null && _a !== void 0 ? _a : (this._variants = new Client_js_9.VariantsClient(this._options)));
|
|
42
|
+
}
|
|
43
|
+
get productImages() {
|
|
44
|
+
var _a;
|
|
45
|
+
return ((_a = this._productImages) !== null && _a !== void 0 ? _a : (this._productImages = new Client_js_5.ProductImagesClient(this._options)));
|
|
31
46
|
}
|
|
32
47
|
get selling() {
|
|
33
48
|
var _a;
|
|
34
|
-
return ((_a = this._selling) !== null && _a !== void 0 ? _a : (this._selling = new
|
|
49
|
+
return ((_a = this._selling) !== null && _a !== void 0 ? _a : (this._selling = new Client_js_7.SellingClient(this._options)));
|
|
35
50
|
}
|
|
36
51
|
get stock() {
|
|
37
52
|
var _a;
|
|
38
|
-
return ((_a = this._stock) !== null && _a !== void 0 ? _a : (this._stock = new
|
|
53
|
+
return ((_a = this._stock) !== null && _a !== void 0 ? _a : (this._stock = new Client_js_8.StockClient(this._options)));
|
|
39
54
|
}
|
|
40
55
|
}
|
|
41
56
|
exports.CommerceClient = CommerceClient;
|
package/dist/cjs/api/resources/business/resources/commerce/resources/catalog/client/Client.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../../../BaseClient.js";
|
|
3
|
+
import * as core from "../../../../../../../../core/index.js";
|
|
4
|
+
import * as FiveOneEat from "../../../../../../../index.js";
|
|
5
|
+
export declare namespace CatalogClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class CatalogClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<CatalogClient.Options>;
|
|
12
|
+
constructor(options?: CatalogClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* The units an option is sold in, the tax codes the business's products
|
|
15
|
+
* may use (a restaurant seller's are food and drink, with
|
|
16
|
+
* `prepared_food_tax_code` as the default; everyone else's are general
|
|
17
|
+
* goods), its categories and unarchived locations, and whether it can
|
|
18
|
+
* sell, take payments and put a product on sale (`readiness`).
|
|
19
|
+
*
|
|
20
|
+
* @param {CatalogClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
21
|
+
*
|
|
22
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
23
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* await client.business.commerce.catalog.getOptions()
|
|
27
|
+
*/
|
|
28
|
+
getOptions(requestOptions?: CatalogClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.commerce.GetOptionsCatalogResponse>;
|
|
29
|
+
private __getOptions;
|
|
30
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.CatalogClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../../../../../BaseClient.js");
|
|
48
|
+
const headers_js_1 = require("../../../../../../../../core/headers.js");
|
|
49
|
+
const core = __importStar(require("../../../../../../../../core/index.js"));
|
|
50
|
+
const environments = __importStar(require("../../../../../../../../environments.js"));
|
|
51
|
+
const handleNonStatusCodeError_js_1 = require("../../../../../../../../errors/handleNonStatusCodeError.js");
|
|
52
|
+
const errors = __importStar(require("../../../../../../../../errors/index.js"));
|
|
53
|
+
const FiveOneEat = __importStar(require("../../../../../../../index.js"));
|
|
54
|
+
class CatalogClient {
|
|
55
|
+
constructor(options = {}) {
|
|
56
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The units an option is sold in, the tax codes the business's products
|
|
60
|
+
* may use (a restaurant seller's are food and drink, with
|
|
61
|
+
* `prepared_food_tax_code` as the default; everyone else's are general
|
|
62
|
+
* goods), its categories and unarchived locations, and whether it can
|
|
63
|
+
* sell, take payments and put a product on sale (`readiness`).
|
|
64
|
+
*
|
|
65
|
+
* @param {CatalogClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
66
|
+
*
|
|
67
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
68
|
+
* @throws {@link FiveOneEat.ForbiddenError}
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* await client.business.commerce.catalog.getOptions()
|
|
72
|
+
*/
|
|
73
|
+
getOptions(requestOptions) {
|
|
74
|
+
return core.HttpResponsePromise.fromPromise(this.__getOptions(requestOptions));
|
|
75
|
+
}
|
|
76
|
+
__getOptions(requestOptions) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
79
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
80
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
81
|
+
const _response = yield core.fetcher({
|
|
82
|
+
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"),
|
|
83
|
+
method: "GET",
|
|
84
|
+
headers: _headers,
|
|
85
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
86
|
+
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,
|
|
87
|
+
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,
|
|
88
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
89
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
90
|
+
logging: this._options.logging,
|
|
91
|
+
});
|
|
92
|
+
if (_response.ok) {
|
|
93
|
+
return {
|
|
94
|
+
data: _response.body,
|
|
95
|
+
rawResponse: _response.rawResponse,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
if (_response.error.reason === "status-code") {
|
|
99
|
+
switch (_response.error.statusCode) {
|
|
100
|
+
case 401:
|
|
101
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
102
|
+
case 403:
|
|
103
|
+
throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
104
|
+
default:
|
|
105
|
+
throw new errors.FiveOneEatError({
|
|
106
|
+
statusCode: _response.error.statusCode,
|
|
107
|
+
body: _response.error.body,
|
|
108
|
+
rawResponse: _response.rawResponse,
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/business/commerce/catalog/options");
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
exports.CatalogClient = CatalogClient;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.CatalogClient = void 0;
|
|
19
|
+
var Client_js_1 = require("./client/Client.js");
|
|
20
|
+
Object.defineProperty(exports, "CatalogClient", { enumerable: true, get: function () { return Client_js_1.CatalogClient; } });
|
|
21
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./GetOptionsCatalogResponse.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./GetOptionsCatalogResponse.js"), exports);
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
+
export * as catalog from "./catalog/index.js";
|
|
2
|
+
export * from "./catalog/types/index.js";
|
|
1
3
|
export * from "./locations/client/requests/index.js";
|
|
2
4
|
export * as locations from "./locations/index.js";
|
|
3
5
|
export * from "./locations/types/index.js";
|
|
4
6
|
export * from "./orders/client/requests/index.js";
|
|
5
7
|
export * as orders from "./orders/index.js";
|
|
6
8
|
export * from "./orders/types/index.js";
|
|
9
|
+
export * from "./productCategories/client/requests/index.js";
|
|
10
|
+
export * as productCategories from "./productCategories/index.js";
|
|
11
|
+
export * from "./productCategories/types/index.js";
|
|
12
|
+
export * from "./productImages/client/requests/index.js";
|
|
13
|
+
export * as productImages from "./productImages/index.js";
|
|
14
|
+
export * from "./productImages/types/index.js";
|
|
7
15
|
export * from "./products/client/requests/index.js";
|
|
8
16
|
export * as products from "./products/index.js";
|
|
9
17
|
export * from "./products/types/index.js";
|
|
@@ -15,9 +15,6 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
-
};
|
|
21
18
|
var __importStar = (this && this.__importStar) || (function () {
|
|
22
19
|
var ownKeys = function(o) {
|
|
23
20
|
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
@@ -35,14 +32,25 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
32
|
return result;
|
|
36
33
|
};
|
|
37
34
|
})();
|
|
35
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
|
+
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.variants = exports.stock = exports.selling = exports.products = exports.orders = exports.locations = void 0;
|
|
39
|
+
exports.variants = exports.stock = exports.selling = exports.products = exports.productImages = exports.productCategories = exports.orders = exports.locations = exports.catalog = void 0;
|
|
40
|
+
exports.catalog = __importStar(require("./catalog/index.js"));
|
|
41
|
+
__exportStar(require("./catalog/types/index.js"), exports);
|
|
40
42
|
__exportStar(require("./locations/client/requests/index.js"), exports);
|
|
41
43
|
exports.locations = __importStar(require("./locations/index.js"));
|
|
42
44
|
__exportStar(require("./locations/types/index.js"), exports);
|
|
43
45
|
__exportStar(require("./orders/client/requests/index.js"), exports);
|
|
44
46
|
exports.orders = __importStar(require("./orders/index.js"));
|
|
45
47
|
__exportStar(require("./orders/types/index.js"), exports);
|
|
48
|
+
__exportStar(require("./productCategories/client/requests/index.js"), exports);
|
|
49
|
+
exports.productCategories = __importStar(require("./productCategories/index.js"));
|
|
50
|
+
__exportStar(require("./productCategories/types/index.js"), exports);
|
|
51
|
+
__exportStar(require("./productImages/client/requests/index.js"), exports);
|
|
52
|
+
exports.productImages = __importStar(require("./productImages/index.js"));
|
|
53
|
+
__exportStar(require("./productImages/types/index.js"), exports);
|
|
46
54
|
__exportStar(require("./products/client/requests/index.js"), exports);
|
|
47
55
|
exports.products = __importStar(require("./products/index.js"));
|
|
48
56
|
__exportStar(require("./products/types/index.js"), exports);
|
package/dist/cjs/api/resources/business/resources/commerce/resources/locations/client/Client.d.ts
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.
|