@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
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type * as core from "../../../../../../../../../core/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* image: fs.createReadStream("/path/to/your/file"),
|
|
6
|
+
* "Idempotency-Key": "Idempotency-Key",
|
|
7
|
+
* product: "product"
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface StoreProductImageRequest {
|
|
11
|
+
/** The product ID */
|
|
12
|
+
product: string;
|
|
13
|
+
/** Required, 1–255 characters, new for each photo you mean to add: a retry with the same key never adds twice. */
|
|
14
|
+
"Idempotency-Key": string;
|
|
15
|
+
/** Maximum file size: 10240 kilobytes. */
|
|
16
|
+
image: core.file.Uploadable;
|
|
17
|
+
alt_text?: string | null;
|
|
18
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { DeleteProductImagesRequest } from "./DeleteProductImagesRequest.js";
|
|
2
|
+
export type { ReorderProductImagesRequest } from "./ReorderProductImagesRequest.js";
|
|
3
|
+
export type { StoreProductImageRequest } from "./StoreProductImageRequest.js";
|
|
4
|
+
export type { UpdateProductImageRequest } from "./UpdateProductImageRequest.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ProductImagesClient = void 0;
|
|
19
|
+
var Client_js_1 = require("./client/Client.js");
|
|
20
|
+
Object.defineProperty(exports, "ProductImagesClient", { enumerable: true, get: function () { return Client_js_1.ProductImagesClient; } });
|
|
21
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|
|
18
|
+
__exportStar(require("./types/index.js"), exports);
|
package/dist/cjs/api/resources/business/resources/commerce/resources/productImages/types/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
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("./ReorderProductImagesResponse.js"), exports);
|
|
18
|
+
__exportStar(require("./UpdateProductImagesResponse.js"), exports);
|
|
19
|
+
__exportStar(require("./UploadProductImagesResponse.js"), exports);
|
|
@@ -33,8 +33,6 @@ export * as menus from "./menus/index.js";
|
|
|
33
33
|
export * from "./menus/types/index.js";
|
|
34
34
|
export * from "./messaging/client/requests/index.js";
|
|
35
35
|
export * as messaging from "./messaging/index.js";
|
|
36
|
-
export * from "./productCategories/client/requests/index.js";
|
|
37
|
-
export * as productCategories from "./productCategories/index.js";
|
|
38
36
|
export * from "./productOrders/client/requests/index.js";
|
|
39
37
|
export * as productOrders from "./productOrders/index.js";
|
|
40
38
|
export * from "./productOrders/types/index.js";
|
|
@@ -36,7 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.temporaryLocations = exports.stripeConnect = exports.stands = exports.shipping = exports.pushNotifications = exports.profile = exports.productOrders = exports.
|
|
39
|
+
exports.temporaryLocations = exports.stripeConnect = exports.stands = exports.shipping = exports.pushNotifications = exports.profile = exports.productOrders = exports.messaging = exports.menus = exports.hours = exports.gallery = exports.events = exports.cuisines = exports.commerce = exports.claims = exports.certifications = exports.categories = exports.businesses = exports.bulletins = exports.auth = exports.allergens = void 0;
|
|
40
40
|
exports.allergens = __importStar(require("./allergens/index.js"));
|
|
41
41
|
__exportStar(require("./allergens/types/index.js"), exports);
|
|
42
42
|
__exportStar(require("./auth/client/requests/index.js"), exports);
|
|
@@ -72,8 +72,6 @@ exports.menus = __importStar(require("./menus/index.js"));
|
|
|
72
72
|
__exportStar(require("./menus/types/index.js"), exports);
|
|
73
73
|
__exportStar(require("./messaging/client/requests/index.js"), exports);
|
|
74
74
|
exports.messaging = __importStar(require("./messaging/index.js"));
|
|
75
|
-
__exportStar(require("./productCategories/client/requests/index.js"), exports);
|
|
76
|
-
exports.productCategories = __importStar(require("./productCategories/index.js"));
|
|
77
75
|
__exportStar(require("./productOrders/client/requests/index.js"), exports);
|
|
78
76
|
exports.productOrders = __importStar(require("./productOrders/index.js"));
|
|
79
77
|
__exportStar(require("./productOrders/types/index.js"), exports);
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export interface CatalogFormOptionsResource {
|
|
2
|
+
/** Every unit an option is sold in. */
|
|
3
|
+
units: CatalogFormOptionsResource.Units.Item[];
|
|
4
|
+
/** The tax codes its products may use: a restaurant seller's are food and drink, everyone else's general goods. */
|
|
5
|
+
tax_codes: CatalogFormOptionsResource.TaxCodes.Item[];
|
|
6
|
+
/** The groups `tax_codes` fall into, in the order the picker shows them. */
|
|
7
|
+
tax_code_categories: CatalogFormOptionsResource.TaxCodeCategories.Item[];
|
|
8
|
+
/** A restaurant seller's new products start on it; null for everyone else. */
|
|
9
|
+
prepared_food_tax_code: string | null;
|
|
10
|
+
/** Its product categories, flat: a child names its parent. */
|
|
11
|
+
categories: CatalogFormOptionsResource.Categories.Item[];
|
|
12
|
+
/**
|
|
13
|
+
* Its unarchived stores and stands: the main store first, then stores, then stands, each by name.
|
|
14
|
+
* `holds_stock` says whether it counts its own stock, so a new product's starting counts are asked for there.
|
|
15
|
+
*/
|
|
16
|
+
locations: CatalogFormOptionsResource.Locations.Item[];
|
|
17
|
+
/**
|
|
18
|
+
* Whether it can sell (`commerce_ready`; `reason` is why not, the web's banner's reason,
|
|
19
|
+
* or `ready`), take payments (adding a product needs it) and put a product on sale
|
|
20
|
+
* (`approved_to_sell`).
|
|
21
|
+
*/
|
|
22
|
+
readiness: CatalogFormOptionsResource.Readiness;
|
|
23
|
+
}
|
|
24
|
+
export declare namespace CatalogFormOptionsResource {
|
|
25
|
+
type Units = Units.Item[];
|
|
26
|
+
namespace Units {
|
|
27
|
+
interface Item {
|
|
28
|
+
value: string;
|
|
29
|
+
label: string;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
type TaxCodes = TaxCodes.Item[];
|
|
33
|
+
namespace TaxCodes {
|
|
34
|
+
interface Item {
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
description: string | null;
|
|
38
|
+
category: string;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
type TaxCodeCategories = TaxCodeCategories.Item[];
|
|
42
|
+
namespace TaxCodeCategories {
|
|
43
|
+
interface Item {
|
|
44
|
+
value: string;
|
|
45
|
+
label: string;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
type Categories = Categories.Item[];
|
|
49
|
+
namespace Categories {
|
|
50
|
+
interface Item {
|
|
51
|
+
id: string;
|
|
52
|
+
name: string;
|
|
53
|
+
parent_id: string | null;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
type Locations = Locations.Item[];
|
|
57
|
+
namespace Locations {
|
|
58
|
+
interface Item {
|
|
59
|
+
id: string;
|
|
60
|
+
name: string;
|
|
61
|
+
kind: Item.Kind;
|
|
62
|
+
is_main: boolean;
|
|
63
|
+
is_active: boolean;
|
|
64
|
+
offers_pickup: boolean;
|
|
65
|
+
offers_in_person: boolean;
|
|
66
|
+
holds_stock: boolean;
|
|
67
|
+
}
|
|
68
|
+
namespace Item {
|
|
69
|
+
const Kind: {
|
|
70
|
+
readonly Store: "store";
|
|
71
|
+
readonly Stand: "stand";
|
|
72
|
+
};
|
|
73
|
+
type Kind = (typeof Kind)[keyof typeof Kind];
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Whether it can sell (`commerce_ready`; `reason` is why not, the web's banner's reason,
|
|
78
|
+
* or `ready`), take payments (adding a product needs it) and put a product on sale
|
|
79
|
+
* (`approved_to_sell`).
|
|
80
|
+
*/
|
|
81
|
+
interface Readiness {
|
|
82
|
+
commerce_ready: boolean;
|
|
83
|
+
reason: string;
|
|
84
|
+
payments_ready: boolean;
|
|
85
|
+
approved_to_sell: boolean;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.CatalogFormOptionsResource = void 0;
|
|
5
|
+
var CatalogFormOptionsResource;
|
|
6
|
+
(function (CatalogFormOptionsResource) {
|
|
7
|
+
let Locations;
|
|
8
|
+
(function (Locations) {
|
|
9
|
+
let Item;
|
|
10
|
+
(function (Item) {
|
|
11
|
+
Item.Kind = {
|
|
12
|
+
Store: "store",
|
|
13
|
+
Stand: "stand",
|
|
14
|
+
};
|
|
15
|
+
})(Item = Locations.Item || (Locations.Item = {}));
|
|
16
|
+
})(Locations = CatalogFormOptionsResource.Locations || (CatalogFormOptionsResource.Locations = {}));
|
|
17
|
+
})(CatalogFormOptionsResource || (exports.CatalogFormOptionsResource = CatalogFormOptionsResource = {}));
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export interface LocationProductsResource {
|
|
2
|
+
location: LocationProductsResource.Location;
|
|
3
|
+
/** How the products here are sold: `online`, for pickup, at a store; `in_person` at a stand. */
|
|
4
|
+
channel: LocationProductsResource.Channel;
|
|
5
|
+
/** Every product of the business, by name. `live` is whether it's on sale. */
|
|
6
|
+
products: LocationProductsResource.Products.Item[];
|
|
7
|
+
/** The IDs of the products sold here that way. */
|
|
8
|
+
selected: string[];
|
|
9
|
+
}
|
|
10
|
+
export declare namespace LocationProductsResource {
|
|
11
|
+
interface Location {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
kind: Location.Kind;
|
|
15
|
+
is_main: boolean;
|
|
16
|
+
is_active: boolean;
|
|
17
|
+
archived: boolean;
|
|
18
|
+
sells_this_way: boolean;
|
|
19
|
+
}
|
|
20
|
+
namespace Location {
|
|
21
|
+
const Kind: {
|
|
22
|
+
readonly Store: "store";
|
|
23
|
+
readonly Stand: "stand";
|
|
24
|
+
};
|
|
25
|
+
type Kind = (typeof Kind)[keyof typeof Kind];
|
|
26
|
+
}
|
|
27
|
+
/** How the products here are sold: `online`, for pickup, at a store; `in_person` at a stand. */
|
|
28
|
+
const Channel: {
|
|
29
|
+
readonly Online: "online";
|
|
30
|
+
readonly InPerson: "in_person";
|
|
31
|
+
};
|
|
32
|
+
type Channel = (typeof Channel)[keyof typeof Channel];
|
|
33
|
+
type Products = Products.Item[];
|
|
34
|
+
namespace Products {
|
|
35
|
+
interface Item {
|
|
36
|
+
id: string;
|
|
37
|
+
name: string;
|
|
38
|
+
category: string | null;
|
|
39
|
+
live: boolean;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.LocationProductsResource = void 0;
|
|
5
|
+
var LocationProductsResource;
|
|
6
|
+
(function (LocationProductsResource) {
|
|
7
|
+
let Location;
|
|
8
|
+
(function (Location) {
|
|
9
|
+
Location.Kind = {
|
|
10
|
+
Store: "store",
|
|
11
|
+
Stand: "stand",
|
|
12
|
+
};
|
|
13
|
+
})(Location = LocationProductsResource.Location || (LocationProductsResource.Location = {}));
|
|
14
|
+
/** How the products here are sold: `online`, for pickup, at a store; `in_person` at a stand. */
|
|
15
|
+
LocationProductsResource.Channel = {
|
|
16
|
+
Online: "online",
|
|
17
|
+
InPerson: "in_person",
|
|
18
|
+
};
|
|
19
|
+
})(LocationProductsResource || (exports.LocationProductsResource = LocationProductsResource = {}));
|
|
@@ -4,5 +4,9 @@ export interface ProductCategoryResource {
|
|
|
4
4
|
name: string;
|
|
5
5
|
slug: string;
|
|
6
6
|
sort_order: number;
|
|
7
|
+
/** The top-level category it's filed under; null for a top-level one. */
|
|
8
|
+
parent_id: string | null;
|
|
9
|
+
/** The products filed directly under it, on the owner's categories list. */
|
|
10
|
+
products_count?: number | undefined;
|
|
7
11
|
parent?: (FiveOneEat.ProductCategoryResource | null) | undefined;
|
|
8
12
|
}
|
|
@@ -89,6 +89,7 @@ export * from "./BusinessToken.js";
|
|
|
89
89
|
export * from "./BuyerOrder.js";
|
|
90
90
|
export * from "./Cart.js";
|
|
91
91
|
export * from "./CartQuote.js";
|
|
92
|
+
export * from "./CatalogFormOptionsResource.js";
|
|
92
93
|
export * from "./CatalogLocation.js";
|
|
93
94
|
export * from "./CatalogPickupSlots.js";
|
|
94
95
|
export * from "./CatalogProduct.js";
|
|
@@ -146,6 +147,7 @@ export * from "./Image.js";
|
|
|
146
147
|
export * from "./ImageResource.js";
|
|
147
148
|
export * from "./InternalServerErrorBody.js";
|
|
148
149
|
export * from "./LocationKind.js";
|
|
150
|
+
export * from "./LocationProductsResource.js";
|
|
149
151
|
export * from "./MenuItemSearchResult.js";
|
|
150
152
|
export * from "./Message.js";
|
|
151
153
|
export * from "./NearbyStand.js";
|
|
@@ -105,6 +105,7 @@ __exportStar(require("./BusinessToken.js"), exports);
|
|
|
105
105
|
__exportStar(require("./BuyerOrder.js"), exports);
|
|
106
106
|
__exportStar(require("./Cart.js"), exports);
|
|
107
107
|
__exportStar(require("./CartQuote.js"), exports);
|
|
108
|
+
__exportStar(require("./CatalogFormOptionsResource.js"), exports);
|
|
108
109
|
__exportStar(require("./CatalogLocation.js"), exports);
|
|
109
110
|
__exportStar(require("./CatalogPickupSlots.js"), exports);
|
|
110
111
|
__exportStar(require("./CatalogProduct.js"), exports);
|
|
@@ -162,6 +163,7 @@ __exportStar(require("./Image.js"), exports);
|
|
|
162
163
|
__exportStar(require("./ImageResource.js"), exports);
|
|
163
164
|
__exportStar(require("./InternalServerErrorBody.js"), exports);
|
|
164
165
|
__exportStar(require("./LocationKind.js"), exports);
|
|
166
|
+
__exportStar(require("./LocationProductsResource.js"), exports);
|
|
165
167
|
__exportStar(require("./MenuItemSearchResult.js"), exports);
|
|
166
168
|
__exportStar(require("./Message.js"), exports);
|
|
167
169
|
__exportStar(require("./NearbyStand.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.
|
|
1
|
+
export declare const SDK_VERSION = "2.2.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "@51eat/sdk",
|
|
9
|
-
"X-Fern-SDK-Version": "2.
|
|
10
|
-
"User-Agent": "@51eat/sdk/2.
|
|
9
|
+
"X-Fern-SDK-Version": "2.2.0",
|
|
10
|
+
"User-Agent": "@51eat/sdk/2.2.0",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -14,7 +14,6 @@ import { GalleryClient } from "../resources/gallery/client/Client.mjs";
|
|
|
14
14
|
import { HoursClient } from "../resources/hours/client/Client.mjs";
|
|
15
15
|
import { MenusClient } from "../resources/menus/client/Client.mjs";
|
|
16
16
|
import { MessagingClient } from "../resources/messaging/client/Client.mjs";
|
|
17
|
-
import { ProductCategoriesClient } from "../resources/productCategories/client/Client.mjs";
|
|
18
17
|
import { ProductOrdersClient } from "../resources/productOrders/client/Client.mjs";
|
|
19
18
|
import { ProfileClient } from "../resources/profile/client/Client.mjs";
|
|
20
19
|
import { PushNotificationsClient } from "../resources/pushNotifications/client/Client.mjs";
|
|
@@ -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
|
}
|
|
@@ -14,7 +14,6 @@ import { GalleryClient } from "../resources/gallery/client/Client.mjs";
|
|
|
14
14
|
import { HoursClient } from "../resources/hours/client/Client.mjs";
|
|
15
15
|
import { MenusClient } from "../resources/menus/client/Client.mjs";
|
|
16
16
|
import { MessagingClient } from "../resources/messaging/client/Client.mjs";
|
|
17
|
-
import { ProductCategoriesClient } from "../resources/productCategories/client/Client.mjs";
|
|
18
17
|
import { ProductOrdersClient } from "../resources/productOrders/client/Client.mjs";
|
|
19
18
|
import { ProfileClient } from "../resources/profile/client/Client.mjs";
|
|
20
19
|
import { PushNotificationsClient } from "../resources/pushNotifications/client/Client.mjs";
|
|
@@ -102,10 +101,6 @@ export class BusinessClient {
|
|
|
102
101
|
var _a;
|
|
103
102
|
return ((_a = this._temporaryLocations) !== null && _a !== void 0 ? _a : (this._temporaryLocations = new TemporaryLocationsClient(this._options)));
|
|
104
103
|
}
|
|
105
|
-
get productCategories() {
|
|
106
|
-
var _a;
|
|
107
|
-
return ((_a = this._productCategories) !== null && _a !== void 0 ? _a : (this._productCategories = new ProductCategoriesClient(this._options)));
|
|
108
|
-
}
|
|
109
104
|
get commerce() {
|
|
110
105
|
var _a;
|
|
111
106
|
return ((_a = this._commerce) !== null && _a !== void 0 ? _a : (this._commerce = new CommerceClient(this._options)));
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { BaseClientOptions } from "../../../../../../BaseClient.mjs";
|
|
2
2
|
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
3
|
+
import { CatalogClient } from "../resources/catalog/client/Client.mjs";
|
|
3
4
|
import { LocationsClient } from "../resources/locations/client/Client.mjs";
|
|
4
5
|
import { OrdersClient } from "../resources/orders/client/Client.mjs";
|
|
6
|
+
import { ProductCategoriesClient } from "../resources/productCategories/client/Client.mjs";
|
|
7
|
+
import { ProductImagesClient } from "../resources/productImages/client/Client.mjs";
|
|
5
8
|
import { ProductsClient } from "../resources/products/client/Client.mjs";
|
|
6
9
|
import { SellingClient } from "../resources/selling/client/Client.mjs";
|
|
7
10
|
import { StockClient } from "../resources/stock/client/Client.mjs";
|
|
@@ -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
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
3
|
+
import { CatalogClient } from "../resources/catalog/client/Client.mjs";
|
|
3
4
|
import { LocationsClient } from "../resources/locations/client/Client.mjs";
|
|
4
5
|
import { OrdersClient } from "../resources/orders/client/Client.mjs";
|
|
6
|
+
import { ProductCategoriesClient } from "../resources/productCategories/client/Client.mjs";
|
|
7
|
+
import { ProductImagesClient } from "../resources/productImages/client/Client.mjs";
|
|
5
8
|
import { ProductsClient } from "../resources/products/client/Client.mjs";
|
|
6
9
|
import { SellingClient } from "../resources/selling/client/Client.mjs";
|
|
7
10
|
import { StockClient } from "../resources/stock/client/Client.mjs";
|
|
@@ -10,6 +13,10 @@ export class CommerceClient {
|
|
|
10
13
|
constructor(options = {}) {
|
|
11
14
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
12
15
|
}
|
|
16
|
+
get productCategories() {
|
|
17
|
+
var _a;
|
|
18
|
+
return ((_a = this._productCategories) !== null && _a !== void 0 ? _a : (this._productCategories = new ProductCategoriesClient(this._options)));
|
|
19
|
+
}
|
|
13
20
|
get locations() {
|
|
14
21
|
var _a;
|
|
15
22
|
return ((_a = this._locations) !== null && _a !== void 0 ? _a : (this._locations = new LocationsClient(this._options)));
|
|
@@ -22,10 +29,18 @@ export class CommerceClient {
|
|
|
22
29
|
var _a;
|
|
23
30
|
return ((_a = this._products) !== null && _a !== void 0 ? _a : (this._products = new ProductsClient(this._options)));
|
|
24
31
|
}
|
|
32
|
+
get catalog() {
|
|
33
|
+
var _a;
|
|
34
|
+
return ((_a = this._catalog) !== null && _a !== void 0 ? _a : (this._catalog = new CatalogClient(this._options)));
|
|
35
|
+
}
|
|
25
36
|
get variants() {
|
|
26
37
|
var _a;
|
|
27
38
|
return ((_a = this._variants) !== null && _a !== void 0 ? _a : (this._variants = new VariantsClient(this._options)));
|
|
28
39
|
}
|
|
40
|
+
get productImages() {
|
|
41
|
+
var _a;
|
|
42
|
+
return ((_a = this._productImages) !== null && _a !== void 0 ? _a : (this._productImages = new ProductImagesClient(this._options)));
|
|
43
|
+
}
|
|
29
44
|
get selling() {
|
|
30
45
|
var _a;
|
|
31
46
|
return ((_a = this._selling) !== null && _a !== void 0 ? _a : (this._selling = new SellingClient(this._options)));
|
package/dist/esm/api/resources/business/resources/commerce/resources/catalog/client/Client.d.mts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
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 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
|
+
}
|