import type * as Whop from "../index.js"; export interface App { /** The account that owns the app. */ account: Whop.AccountParent; /** Legacy app API key used to authenticate requests on the app's behalf. `null` when no key exists or the caller lacks the `developer:manage_api_key` permission. */ api_key: Whop.AppApiKey | null; /** Detailed description shown on the app store's in-depth app page, or `null` when none has been set. */ app_store_description: string | null; /** The type of end-user the app is built for. */ app_type: App.AppType; /** Banner image from the app's product listing, or `null` when none is uploaded. */ banner_image: Whop.AppBannerImage | null; /** The production base URL where the app is hosted. `null` if no base URL is configured, if the caller lacks the `developer:basic:read` permission on the app's account, or on list responses, which never expose it. */ base_url: string | null; /** Website businesses created from this app as a template. */ businesses_created_count: number; businesses_created_logo_urls: string[]; /** Website businesses created from this app as a template that processed a payment in the last 24 hours. Recounted hourly, so it can be up to an hour behind. */ businesses_with_recent_sales_count: number; /** The user who owns the publishing account. */ creator: Whop.AppCreator; /** URL path for the account dashboard view, or `null` when not configured. */ dashboard_path: string | null; /** The app's default API key. `null` when the app has no default key or the caller lacks the `developer:manage_api_key` permission; `secret_key` is additionally `null` unless the caller could have created the key themselves. */ default_api_key: Whop.AppDefaultApiKey | null; /** What the app has left to publish, and how a publish in flight is going — `status` is only ever `unpublished`, `publishing`, or `failed` here. `null` means there is nothing to report: the app is fully published, there is no working copy to publish from, or the caller cannot deploy this app. Tell those apart from the app's own `production_web_build`. */ deployment: Whop.AppDeployment | null; /** Short description shown in listings and search results, or `null` if none has been set. */ description: string | null; /** URL path for the discover view, or `null` when not configured. */ discover_path: string | null; /** Subdomain identifier for the app's proxied URL, forming https://{domain_id}.apps.whop.com. */ domain_id: string; domains: Whop.AppDomain[]; elements_used: App.ElementsUsed.Item[]; /** URL path for the member-facing hub view, or `null` when not configured. */ experience_path: string | null; /** * Full URL where the app's hosted web build is served, or `null` if no route is claimed. * DEPRECATED: Read `domains` instead. */ hosted_url: string | null; /** The app's icon. Falls back to the default app icon when none is uploaded. */ icon: Whop.AppIcon; /** App ID, prefixed `app_`. */ id: string; /** The address of the existing website this app was imported from, such as `https://shop.example.com`. `null` if the app was not imported from another site, or if the caller lacks the `developer:basic:read` permission on the app's account. */ imported_from_url: string | null; /** Approval status of the app's product listing on the Whop app store, or `null` when the app has no associated product. */ marketplace_status: App.MarketplaceStatus | null; /** Display name shown on the app store and in experience navigation. */ name: string; /** How the app authenticates at the OAuth token endpoint. */ oauth_client_type: App.OauthClientType; /** URL path to the app's OpenAPI spec file, or `null` when not configured. */ openapi_path: string | null; /** Full origin URL of the app's proxied domain, for example https://ab1c2d3e4f.apps.whop.com. */ origin: string | null; /** Five-field cron expression, read in UTC, on which Whop runs the production web build's `scheduled()` export once for every installation, with the installation in `ctx.props.app_installation`, no more often than every 15 minutes. Slots are skipped while the app has no production web build with a server entry. `null` when the app has no per-install schedule, or if the caller lacks the `developer:basic:read` permission on the app's account. */ per_install_schedule: string | null; /** A short-lived signed pass scoping the caller to this app's gated preview hosts — every build preview and the live dev-server sandbox. Add it to a preview host as the `__whop_preview` query param (or `x-whop-preview-token` header). `null` unless the caller is a team member who can read the app's developer settings. */ preview_token: string | null; /** ID of the app's product listing on the Whop app store, or `null` when the app has no associated product. */ product_id: string | null; /** The approved build currently served on Android, or `null` when none is deployed. */ production_android_build: Whop.AppProductionBuild | null; /** The approved build currently served on iOS, or `null` when none is deployed. */ production_ios_build: Whop.AppProductionBuild | null; /** The approved build currently served on web, or `null` when none is deployed. */ production_web_build: Whop.AppProductionBuild | null; redirect_uris: string[]; requested_permissions: Whop.AppRequestedPermission[]; required_scopes: App.RequiredScopes.Item[]; /** * Claimed subdomain route where hosted web builds are served (`myapp` for myapp.whop.site), or `null` if no route is claimed. * DEPRECATED: Read `domains` instead. */ route: string | null; /** Five-field cron expression, read in UTC, on which Whop runs the production web build's `scheduled()` export once per slot. Slots are skipped while the app has no production web build with a server entry. `null` when the app has no global schedule, or if the caller lacks the `developer:basic:read` permission on the app's account. */ schedule: string | null; /** The app's production secrets as an object of string values, injected into the hosted server runtime. `null` when the caller lacks the `developer:update_app` permission. */ secrets: Record | null; /** URL path to the app's skills directory, or `null` when not configured. */ skills_path: string | null; /** Visibility on the Whop app store: `live` is publicly discoverable, `unlisted` is accessible only via direct link, `hidden` is not visible anywhere. */ status: App.Status; /** Whether the app has been verified by Whop and is eligible for the featured apps section. */ verified: boolean; } export declare namespace App { /** The type of end-user the app is built for. */ const AppType: { readonly B2BApp: "b2b_app"; readonly B2CApp: "b2c_app"; readonly CompanyApp: "company_app"; readonly Component: "component"; readonly Website: "website"; }; type AppType = (typeof AppType)[keyof typeof AppType]; type ElementsUsed = ElementsUsed.Item[]; namespace ElementsUsed { /** Whop Elements the app's production web build mounts, as `.` keys (sub-controller children take a third segment, e.g. `payments.cardFields.cardNumber`). A bare namespace means the build reaches that namespace but the individual elements could not be resolved. Empty when the build mounts none, when it has not been scanned yet, or when the app has no production web build. */ const Item: { readonly Ads: "ads"; readonly AdsBillingSetup: "ads.billing-setup"; readonly AdsCampaignCreator: "ads.campaign-creator"; readonly AdsReporting: "ads.reporting"; readonly AdsReportingChart: "ads.reporting.chart"; readonly AdsReportingTable: "ads.reporting.table"; readonly Checkout: "checkout"; readonly CheckoutCheckout: "checkout.checkout"; readonly CheckoutExpressCheckout: "checkout.expressCheckout"; readonly Payments: "payments"; readonly PaymentsAddress: "payments.address"; readonly PaymentsBranding: "payments.branding"; readonly PaymentsCard: "payments.card"; readonly PaymentsCardFields: "payments.cardFields"; readonly PaymentsCardFieldsCardCvc: "payments.cardFields.cardCvc"; readonly PaymentsCardFieldsCardExpiry: "payments.cardFields.cardExpiry"; readonly PaymentsCardFieldsCardNumber: "payments.cardFields.cardNumber"; readonly PaymentsEmail: "payments.email"; readonly PaymentsPayment: "payments.payment"; readonly PaymentsTaxId: "payments.taxId"; readonly Tracking: "tracking"; readonly TrackingEvents: "tracking.events"; readonly TrackingPeople: "tracking.people"; readonly Wallet: "wallet"; readonly WalletActivity: "wallet.activity"; readonly WalletBalances: "wallet.balances"; readonly WalletBalancesBalance: "wallet.balances.balance"; readonly WalletBalancesList: "wallet.balances.list"; readonly WalletCards: "wallet.cards"; readonly WalletDeposit: "wallet.deposit"; readonly WalletSend: "wallet.send"; readonly WalletWithdraw: "wallet.withdraw"; readonly Websites: "websites"; readonly WebsitesPixelSetup: "websites.pixel-setup"; readonly WebsitesWebsites: "websites.websites"; }; type Item = (typeof Item)[keyof typeof Item]; } /** Approval status of the app's product listing on the Whop app store, or `null` when the app has no associated product. */ const MarketplaceStatus: { readonly NotAvailable: "not_available"; readonly PendingReview: "pending_review"; readonly LiveMarketplace: "live_marketplace"; }; type MarketplaceStatus = (typeof MarketplaceStatus)[keyof typeof MarketplaceStatus]; /** How the app authenticates at the OAuth token endpoint. */ const OauthClientType: { readonly Public: "public"; readonly Confidential: "confidential"; }; type OauthClientType = (typeof OauthClientType)[keyof typeof OauthClientType]; type RequiredScopes = RequiredScopes.Item[]; namespace RequiredScopes { /** Scopes the app asks a user to grant when they authorize it, shown on the consent screen. */ const Item: { readonly ReadUser: "read_user"; }; type Item = (typeof Item)[keyof typeof Item]; } /** Visibility on the Whop app store: `live` is publicly discoverable, `unlisted` is accessible only via direct link, `hidden` is not visible anywhere. */ const Status: { readonly Live: "live"; readonly Unlisted: "unlisted"; readonly Hidden: "hidden"; }; type Status = (typeof Status)[keyof typeof Status]; }