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 AppsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } /** * An App is software you build on Whop. It can be a hosted web app served at its domains, such as a `whop.site` address or a custom domain, or an API integration installed as an experience, and it belongs to the account that owns its credentials, settings, builds, and runtime logs. * * Use the Apps API to manage app configuration, deploy an app's working copy and follow the run on the app's `deployment` field, and, for hosted apps, read server runtime logs for console output, uncaught exceptions, and failed requests. * * Apps are also reusable blueprints. List official blueprints with `app_type=website&verified=true&order=template_usage`, or community blueprints with `app_type=website&verified=false&recommended=true&order=template_usage`. Pass the returned App `id` as `blueprint_id` when creating an Account. */ export declare class AppsClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: AppsClient.Options); /** * Lists apps on the Whop platform: the app store's live apps, or — with `account_id` and developer access to that account — every app the account owns. Requires authentication except for Whop's public app and website discovery lists. Public website discovery includes built official blueprints (verified apps with a product) and built, live community blueprints that Whop recommends. * * @param {Whop.ListAppsRequest} request * @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.apps.list() */ list(request?: Whop.ListAppsRequest, requestOptions?: AppsClient.RequestOptions): Promise>; /** * Registers a new app on the Whop developer platform. Apps provide custom experiences that can be added to products. * * @param {Whop.CreateAppsRequest} request * @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.apps.create({ * name: "Shine Time Booking" * }) */ create(request: Whop.CreateAppsRequest, requestOptions?: AppsClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Retrieves an app by ID, claimed route, active verified custom hostname, or proxy domain id. Authentication is optional; credential fields stay `null` unless you have the matching developer permission on the owning account. * * @param {Whop.RetrieveAppsRequest} request * @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.apps.retrieve({ * id: "id" * }) */ retrieve(request: Whop.RetrieveAppsRequest, requestOptions?: AppsClient.RequestOptions): core.HttpResponsePromise; private __retrieve; /** * Deletes an app. The app stops resolving within seconds — a website's site stops serving, and any claimed subdomain is reserved for a month before it can be claimed again. * * @param {Whop.DeleteAppsRequest} request * @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.apps.delete({ * id: "id" * }) */ delete(request: Whop.DeleteAppsRequest, requestOptions?: AppsClient.RequestOptions): core.HttpResponsePromise; private __delete; /** * Updates the settings, metadata, or status of an app. Fields that are omitted keep their current value. * * @param {Whop.UpdateAppsRequest} request * @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.apps.update({ * id: "id" * }) */ update(request: Whop.UpdateAppsRequest, requestOptions?: AppsClient.RequestOptions): core.HttpResponsePromise; private __update; /** * Builds the app's current source and ships it. Returns the run it started, so the caller can render progress from this response and then follow it on the app's `deployment` field. Only one deployment runs per app at a time — calling this while one is in flight reports that run rather than starting a second, and calling it with nothing to publish reports that instead of starting one. * * @param {Whop.DeployAppsRequest} request * @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.NotFoundError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.apps.deploy({ * id: "id" * }) */ deploy(request: Whop.DeployAppsRequest, requestOptions?: AppsClient.RequestOptions): core.HttpResponsePromise; private __deploy; /** * Lists a hosted app's server runtime logs, most recent first: console output, uncaught exceptions, and failed-request summaries captured on whop.site hosting. Logs are retained for 7 days. * * @param {Whop.LogsAppsRequest} request * @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.apps.logs({ * id: "id" * }) */ logs(request: Whop.LogsAppsRequest, requestOptions?: AppsClient.RequestOptions): Promise>; /** * Replaces the set of permissions the app requests from users when they install it. Requires a user session: the `developer:update_app_authorization` scope cannot be delegated to API keys. Sensitive permissions require step-up verification. * * @param {Whop.UpdatePermissionsAppsRequest} request * @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.apps.updatePermissions({ * id: "id", * requested_permissions: [{ * action: "company:basic:read", * is_required: true, * justification: "Reads basic account info to render the dashboard home." * }] * }) */ updatePermissions(request: Whop.UpdatePermissionsAppsRequest, requestOptions?: AppsClient.RequestOptions): core.HttpResponsePromise; private __updatePermissions; }