import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient"; import * as core from "../../../../core"; import * as Webflow from "../../../index"; export declare namespace Products { interface Options extends BaseClientOptions { } interface RequestOptions extends BaseRequestOptions { } } export declare class Products { protected readonly _options: Products.Options; constructor(_options: Products.Options); /** * Retrieve all products for a site. * * Use `limit` and `offset` to page through all products with subsequent requests. All SKUs for each product * will also be fetched and returned. The `limit`, `offset` and `total` values represent Products only and do not include any SKUs. * * Required scope | `ecommerce:read` * * @param {string} siteId - Unique identifier for a Site * @param {Webflow.ProductsListRequest} request * @param {Products.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Webflow.BadRequestError} * @throws {@link Webflow.UnauthorizedError} * @throws {@link Webflow.ForbiddenError} * @throws {@link Webflow.NotFoundError} * @throws {@link Webflow.ConflictError} * @throws {@link Webflow.TooManyRequestsError} * @throws {@link Webflow.InternalServerError} * * @example * await client.products.list("580e63e98c9a982ac9b8b741", { * offset: 1, * limit: 1 * }) */ list(siteId: string, request?: Webflow.ProductsListRequest, requestOptions?: Products.RequestOptions): core.HttpResponsePromise; private __list; /** * Create a new ecommerce product and defaultSKU. A product, at minimum, must have a single SKU. * * To create a product with multiple SKUs: * - First, create a list of `sku-properties`, also known as [product options](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants). For example, a T-shirt product may have a "color" `sku-property`, with a list of enum values: red, yellow, and blue, another `sku-property` may be "size", with a list of enum values: small, medium, and large. * - Once, a product is created with a list of `sku-properties`, Webflow will create a **default SKU**, which is always a combination of the first `enum` values of each `sku-property`. (e.g. Small - Red - T-Shirt) * - After creation, you can create additional SKUs for the product, using the [Create SKUs endpoint.](/data/reference/ecommerce/products/create-sku) * * Upon creation, the default product type will be `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer. * * Required scope | `ecommerce:write` * * @param {string} siteId - Unique identifier for a Site * @param {Webflow.ProductSkuCreate} request * @param {Products.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Webflow.BadRequestError} * @throws {@link Webflow.UnauthorizedError} * @throws {@link Webflow.ForbiddenError} * @throws {@link Webflow.NotFoundError} * @throws {@link Webflow.ConflictError} * @throws {@link Webflow.TooManyRequestsError} * @throws {@link Webflow.InternalServerError} * * @example * await client.products.create("580e63e98c9a982ac9b8b741", { * publishStatus: "staging", * product: { * fieldData: { * name: "Colorful T-shirt", * slug: "colorful-t-shirt", * description: "Our best-selling t-shirt available in multiple colors and sizes", * skuProperties: [{ * id: "color", * name: "Color", * "enum": [{ * id: "red", * name: "Red", * slug: "red" * }, { * id: "yellow", * name: "Yellow", * slug: "yellow" * }, { * id: "blue", * name: "Blue", * slug: "blue" * }] * }, { * id: "size", * name: "Size", * "enum": [{ * id: "small", * name: "Small", * slug: "small" * }, { * id: "medium", * name: "Medium", * slug: "medium" * }, { * id: "large", * name: "Large", * slug: "large" * }] * }] * } * }, * sku: { * fieldData: { * name: "Colorful T-shirt - Red Small", * slug: "colorful-t-shirt-red-small", * price: { * value: 2499, * unit: "USD", * currency: "USD" * }, * mainImage: "https://rocketamp-sample-store.myshopify.com/cdn/shop/products/Gildan_2000_Antique_Cherry_Red_Front_1024x1024.jpg?v=1527232987" * } * } * }) */ create(siteId: string, request: Webflow.ProductSkuCreate, requestOptions?: Products.RequestOptions): core.HttpResponsePromise; private __create; /** * Retrieve a single product by its ID. All of its SKUs will also be * retrieved. * * Required scope | `ecommerce:read` * * @param {string} siteId - Unique identifier for a Site * @param {string} productId - Unique identifier for a Product * @param {Products.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Webflow.BadRequestError} * @throws {@link Webflow.UnauthorizedError} * @throws {@link Webflow.ForbiddenError} * @throws {@link Webflow.NotFoundError} * @throws {@link Webflow.ConflictError} * @throws {@link Webflow.TooManyRequestsError} * @throws {@link Webflow.InternalServerError} * * @example * await client.products.get("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745") */ get(siteId: string, productId: string, requestOptions?: Products.RequestOptions): core.HttpResponsePromise; private __get; /** * Update an existing Product. * * Updating an existing Product will set the product type to `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer. * * Required scope | `ecommerce:write` * * @param {string} siteId - Unique identifier for a Site * @param {string} productId - Unique identifier for a Product * @param {Webflow.ProductSkuUpdate} request * @param {Products.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Webflow.BadRequestError} * @throws {@link Webflow.UnauthorizedError} * @throws {@link Webflow.ForbiddenError} * @throws {@link Webflow.NotFoundError} * @throws {@link Webflow.ConflictError} * @throws {@link Webflow.TooManyRequestsError} * @throws {@link Webflow.InternalServerError} * * @example * await client.products.update("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745") */ update(siteId: string, productId: string, request?: Webflow.ProductSkuUpdate, requestOptions?: Products.RequestOptions): core.HttpResponsePromise; private __update; /** * Create additional SKUs to manage every [option and variant of your Product.](https://help.webflow.com/hc/en-us/articles/33961334531347-Create-product-options-and-variants) * * Creating SKUs through the API will set the product type to `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer. * * Required scope | `ecommerce:write` * * @param {string} siteId - Unique identifier for a Site * @param {string} productId - Unique identifier for a Product * @param {Webflow.ProductsCreateSkuRequest} request * @param {Products.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Webflow.BadRequestError} * @throws {@link Webflow.UnauthorizedError} * @throws {@link Webflow.ForbiddenError} * @throws {@link Webflow.NotFoundError} * @throws {@link Webflow.ConflictError} * @throws {@link Webflow.TooManyRequestsError} * @throws {@link Webflow.InternalServerError} * * @example * await client.products.createSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745", { * skus: [{ * id: "66072fb71b89448912e2681c", * cmsLocaleId: "653ad57de882f528b32e810e", * lastPublished: new Date("2023-03-17T18:47:35.000Z"), * lastUpdated: new Date("2023-03-17T18:47:35.000Z"), * createdOn: new Date("2023-03-17T18:47:35.000Z"), * fieldData: { * name: "Colorful T-shirt - Default", * slug: "colorful-t-shirt-default", * price: { * value: 2499, * unit: "USD", * currency: "USD" * } * } * }] * }) */ createSku(siteId: string, productId: string, request: Webflow.ProductsCreateSkuRequest, requestOptions?: Products.RequestOptions): core.HttpResponsePromise; private __createSku; /** * Update a specified SKU. * * Updating an existing SKU will set the Product type to `Advanced`, which ensures all Product and SKU fields will be shown to users in the Designer. * * Required scope | `ecommerce:write` * * @param {string} siteId - Unique identifier for a Site * @param {string} productId - Unique identifier for a Product * @param {string} skuId - Unique identifier for a SKU * @param {Webflow.ProductsUpdateSkuRequest} request * @param {Products.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Webflow.BadRequestError} * @throws {@link Webflow.UnauthorizedError} * @throws {@link Webflow.ForbiddenError} * @throws {@link Webflow.NotFoundError} * @throws {@link Webflow.ConflictError} * @throws {@link Webflow.TooManyRequestsError} * @throws {@link Webflow.InternalServerError} * * @example * await client.products.updateSku("580e63e98c9a982ac9b8b741", "580e63fc8c9a982ac9b8b745", "5e8518516e147040726cc415", { * sku: { * id: "66072fb71b89448912e2681c", * cmsLocaleId: "653ad57de882f528b32e810e", * lastPublished: new Date("2023-03-17T18:47:35.000Z"), * lastUpdated: new Date("2023-03-17T18:47:35.000Z"), * createdOn: new Date("2023-03-17T18:47:35.000Z"), * fieldData: { * name: "Colorful T-shirt - Default", * slug: "colorful-t-shirt-default", * price: { * value: 2499, * unit: "USD", * currency: "USD" * } * } * } * }) */ updateSku(siteId: string, productId: string, skuId: string, request: Webflow.ProductsUpdateSkuRequest, requestOptions?: Products.RequestOptions): core.HttpResponsePromise; private __updateSku; protected _getAuthorizationHeader(): Promise; }