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 AppInstallationsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } /** * An App Installation represents one install of your app on one account. An account installs an app once, however many experiences it adds, so an installation holds state that belongs to the account rather than to one experience, such as a sync cursor or the ID of the account it's linked to in another system. * * Use the App Installations API to [list the accounts your app is installed on](/api-reference/beta/app-installations/list-app-installations), [retrieve one](/api-reference/beta/app-installations/retrieve-app-installation), and [update](/api-reference/beta/app-installations/update-app-installation) the `metadata` and `external_id` your app keeps on it. An account can also list the apps installed on it, and a developer every installation of their app. Only the app and its developer see `metadata` and `external_id`, and only the app can change them. */ export declare class AppInstallationsClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: AppInstallationsClient.Options); /** * Lists app installations, newest first. An app's API key lists the accounts that installed it. An account lists the apps installed on it; a user passes that account's `account_id`. The developer of an app lists every installation of it by passing `app_id`. Uninstalled apps, deleted apps and deleted accounts are left out. * * @param {Whop.ListAppInstallationsRequest} request * @param {AppInstallationsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.appInstallations.list() */ list(request?: Whop.ListAppInstallationsRequest, requestOptions?: AppInstallationsClient.RequestOptions): Promise>; /** * Retrieves an app installation, with the metadata the app stores on it. The app, its developer and the account it's installed on can retrieve it. * * @param {Whop.RetrieveAppInstallationsRequest} request * @param {AppInstallationsClient.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.appInstallations.retrieve({ * id: "id" * }) */ retrieve(request: Whop.RetrieveAppInstallationsRequest, requestOptions?: AppInstallationsClient.RequestOptions): core.HttpResponsePromise; private __retrieve; /** * Updates the `metadata` and `external_id` your app keeps on an installation. Only the metadata keys you send change, so separate jobs can each keep their own keys. * * @param {Whop.UpdateAppInstallationsRequest} request * @param {AppInstallationsClient.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.appInstallations.update({ * id: "id" * }) */ update(request: Whop.UpdateAppInstallationsRequest, requestOptions?: AppInstallationsClient.RequestOptions): core.HttpResponsePromise; private __update; }