import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"; import * as core from "../../../../core/index.js"; import * as Whop from "../../../index.js"; export declare namespace ProductsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } /** * A Product is a digital good or service sold on Whop. Products contain variants for pricing and may contain experiences for content delivery. * * Use the Products API to search the public marketplace, list an account's products, retrieve a product, and create, update, or delete products. */ export declare class ProductsClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: ProductsClient.Options); /** * Lists an account's products, or searches the public marketplace when you omit `account_id`. * * @param {Whop.ListProductsRequest} request * @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.products.list({ * visibilities: ["visible"], * access_pass_types: ["regular"] * }) */ list(request?: Whop.ListProductsRequest, requestOptions?: ProductsClient.RequestOptions): Promise>; /** * Creates a new product for an account. * * @param {Whop.CreateProductsRequest} request * @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.products.create({ * title: "Interior Deep Clean" * }) */ create(request: Whop.CreateProductsRequest, requestOptions?: ProductsClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Retrieves a product. Requires no authentication. * * @param {Whop.RetrieveProductsRequest} request * @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.products.retrieve({ * id: "id" * }) */ retrieve(request: Whop.RetrieveProductsRequest, requestOptions?: ProductsClient.RequestOptions): core.HttpResponsePromise; private __retrieve; /** * Deletes a product. Only products with no memberships, entries, reviews, or invoices can be deleted. * * @param {Whop.DeleteProductsRequest} request * @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.products.delete({ * id: "id" * }) */ delete(request: Whop.DeleteProductsRequest, requestOptions?: ProductsClient.RequestOptions): core.HttpResponsePromise; private __delete; /** * Updates an existing product. * * @param {Whop.UpdateProductsRequest} request * @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.products.update({ * id: "id" * }) */ update(request: Whop.UpdateProductsRequest, requestOptions?: ProductsClient.RequestOptions): core.HttpResponsePromise; private __update; /** * Submits an App Store app's product for review. The product moves to `pending_review`; a Whop reviewer approves it before it goes live. Other products can no longer be listed on the whop.com marketplace, so the request fails with `discover_listing_discontinued`. * * @param {Whop.PublishProductsRequest} request * @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.NotFoundError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.products.publish({ * id: "id" * }) */ publish(request: Whop.PublishProductsRequest, requestOptions?: ProductsClient.RequestOptions): core.HttpResponsePromise; private __publish; /** * Removes a product from the whop.com marketplace. The product moves to `not_available`. * * @param {Whop.UnpublishProductsRequest} request * @param {ProductsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.NotFoundError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.products.unpublish({ * id: "id" * }) */ unpublish(request: Whop.UnpublishProductsRequest, requestOptions?: ProductsClient.RequestOptions): core.HttpResponsePromise; private __unpublish; }