/**
 * Project-scoped sub-client. `ScopedRun402` wraps the SDK's project-id-bearing
 * namespaces with the id pre-bound, so callers don't have to thread the id
 * through every call.
 *
 * Construct via `r.project(id?)` — see the JSDoc on
 * {@link Run402.project} for the resolution rule (explicit arg vs. fallback to
 * the credential provider's active-project state).
 *
 * Methods that take an options object containing `project_id`/`project`
 * (deploy, subdomains, domains) honour a caller-supplied value over the scoped
 * id, so a scoped client can still address a different project ad-hoc.
 *
 * Methods that don't take a project id (e.g. `projects.list(wallet)`,
 * `projects.getQuote()`, `projects.active()`, `apps.browse(tags?)`,
 * `ai.generateImage(opts)`, etc.) pass through unchanged.
 */
import type { LiveChangesOptions, LiveChangesPage, LiveEvent, LiveSubscribeOptions, LiveSubscription } from "./namespaces/live.types.js";
import type { Client } from "./kernel.js";
import type { Run402 } from "./index.js";
import type { ProjectKeys } from "./credentials.js";
import type { ExposeManifestValidationInput, ExposeManifestValidationResult, ListProjectsOptions, ListProjectsResult, ProjectDetail, ProjectInfo, ProjectRestOptions, ProjectRestResponse, QuoteResult, RenameProjectResult, SetRepoNameResult, SchemaReport, ListTenantPaymentsOptions, TenantPaymentListResult, UsageReport, ValidateExposeOptions, SqlBatchOptions, SqlBatchResult, SqlBatchStatement, SqlOptions, SqlResult } from "./namespaces/projects.types.js";
import type { AppDetails, AppInstallState, AppInstallStateInput, BrowseAppsResult, ForkAppOptions, ForkAppResult, ListVersionsResult, PublishAppOptions, PublishedVersion, UpdateVersionOptions } from "./namespaces/apps.js";
import type { AiUsageResult, GenerateImageOptions, GenerateImageResult, ModerateResult, TranslateOptions, TranslateResult } from "./namespaces/ai.js";
import type { AuthSettings, AuthSettingsResult, AuthSessionResult, AuthUserAdminResult, CreateAuthUserOptions, MagicLinkOptions, MagicLinkRequestResult, MagicLinkVerifyResult, EmailCodeVerifyOptions, PasskeyDeleteOptions, PasskeyListOptions, PasskeyLoginOptions, PasskeyLoginVerifyOptions, PasskeyOptionsResult, PasskeyRecord, PasskeyRegistrationOptions, PasskeyRegistrationVerifyOptions, SetPasswordOptions } from "./namespaces/auth.js";
import type { BlobDiagnoseEnvelope, BlobLsOptions, BlobLsResult, BlobRmResult, BlobPutOptions, BlobPutResult, BlobPutSource, BlobSignOptions, BlobSignResult, BlobWaitFreshOptions, BlobWaitFreshResult } from "./namespaces/assets.types.js";
import type { ContractCallOptions, ContractDeployOptions, ContractReadOptions, ProvisionSignerOptions, SignerTransferOptions } from "./namespaces/contracts.js";
import type { ProjectDomain, ProjectDomainConnectInput, ProjectDomainListResult, ProjectDomainTestReceiveResult, ProjectDomainWaitOptions } from "./namespaces/domains.js";
import type { CreateMailboxResult, DeleteMailboxResult, EmailDetail, EmailSummary, ListDeliveriesOptions, ListEmailsOptions, MailboxInfo, MailboxListResult, MailboxWebhookSummary, MailboxWebhooksResult, RawEmailResult, RedriveDeliveryResult, RegisterWebhookOptions, SendEmailOptions, SendEmailResult, SetMailboxDefaultsOptions, SetMailboxDefaultsResult, UpdateMailboxOptions, UpdateMailboxResult, UpdateWebhookOptions, WebhookDeliveriesResult } from "./namespaces/email.js";
import type { StripeAccountConnectInput, StripeAccountConnectResult, StripeAccountDisconnectResult, StripeAccountState, StripeCheckoutSession, StripeCheckoutSessionCreateInput, StripeCheckoutSessionOutcome, StripeOnboardingLink, StripeOnboardingLinkInput, StripePortalSession, StripePortalSessionCreateInput } from "./namespaces/stripe.js";
import type { DeleteFunctionResult, FunctionDeployOptions, FunctionDeployResult, FunctionInvokeOptions, FunctionInvokeResult, FunctionListResult, FunctionLogsByRequestIdOptions, FunctionLogsByRequestIdResult, FunctionLogsOptions, FunctionLogsResult, FunctionRunCreateOptions, FunctionRunHandle, FunctionRunListOptions, FunctionRunListResult, FunctionRunLogsOptions, FunctionRunRedriveOptions, FunctionRunWaitOptions, FunctionRebuildBatchResult, FunctionRebuildResult, FunctionUpdateOptions, FunctionUpdateResult } from "./namespaces/functions.types.js";
import type { ManagedJobLogsOptions, ManagedJobLogsResponse, ManagedJobPurgeResponse, ManagedJobResponse, ManagedJobSubmitRequest } from "./namespaces/jobs.js";
import type { DeleteSecretResult, SecretListResult, SecretSetOptions } from "./namespaces/secrets.js";
import type { CreateGrantInput, GrantCreateResult, GrantKeyCreateResult, GrantKeyInput, GrantKeyRevokeResult, GrantKeyRotateResult, GrantListResult, GrantRevokeResult } from "./namespaces/grants.types.js";
import type { ListEventsOptions, ProjectEventFeedPage } from "./namespaces/events.types.js";
import type { ErrorFingerprintDetail, ErrorsPage, ListErrorsOptions, WatchErrorsOptions, WatchErrorsResult } from "./namespaces/errors.types.js";
import type { ProjectArchiveCreateOptions, ProjectArchiveDownload, ProjectArchiveDto, ProjectArchiveExportOptions, ProjectArchiveExportResult, ProjectArchiveWaitOptions } from "./namespaces/archives.types.js";
import type { ProjectSnapshotCreateOptions, ProjectSnapshotDto, ProjectSnapshotsListOptions, ProjectSnapshotsListResult, SnapshotRestoreConfirmOptions, SnapshotRestoreHandle, SnapshotRestoreOptions, SnapshotRestorePlanEnvelope, SnapshotRestoreResult, SnapshotRestoreStatus } from "./namespaces/snapshots.types.js";
import type { ProjectBranchCreateOptions, ProjectBranchCreateResult, ProjectBranchDto, ProjectBranchesListResult, ProjectBranchRenewOptions } from "./namespaces/branches.types.js";
import type { SubdomainAddInput, SubdomainClaimOptions, SubdomainAddResult, SubdomainDeleteResult, SubdomainSummary } from "./namespaces/subdomains.js";
import type { ApplyOptions, ActiveReleaseInventory, DeployEvent, DeployEventsResponse, ExposeManifest, DeployListOptions, DeployListResponse, DeployOperation, DeployResolveResponse, DeployResult, EdgeCoherenceReport, EdgeCoherenceWaitOptions, EdgeCoherenceWaitResult, OperationSnapshot, PlanResponse, PromoteOptions, PromoteResult, RehearsePlanOptions, RehearsePlanResult, ReleaseDiffOptions, ReleaseInventory, ReleaseInventoryOptions, ReleaseSpec, ReleaseToReleaseDiff, ScopedDeployResolveOptions, StartOptions } from "./namespaces/deploy.types.js";
import type { ByteReader } from "./namespaces/deploy.js";
declare class ScopedProjectStripeAccount {
    private readonly parent;
    private readonly projectId;
    constructor(parent: Run402, projectId: string);
    connect(input?: StripeAccountConnectInput): Promise<StripeAccountConnectResult>;
    get(): Promise<StripeAccountState>;
    disconnect(): Promise<StripeAccountDisconnectResult>;
}
declare class ScopedProjectStripeOnboardingLinks {
    private readonly parent;
    private readonly projectId;
    constructor(parent: Run402, projectId: string);
    create(input?: StripeOnboardingLinkInput): Promise<StripeOnboardingLink>;
}
declare class ScopedProjectStripeCheckoutSessions {
    private readonly parent;
    private readonly projectId;
    constructor(parent: Run402, projectId: string);
    create(input: StripeCheckoutSessionCreateInput): Promise<StripeCheckoutSession>;
    get(checkoutSessionId: string): Promise<StripeCheckoutSessionOutcome>;
}
declare class ScopedProjectStripePortalSessions {
    private readonly parent;
    private readonly projectId;
    constructor(parent: Run402, projectId: string);
    create(input: StripePortalSessionCreateInput): Promise<StripePortalSession>;
}
/** `r.project(id).stripe` — the organization's Stripe account and sessions, project pre-bound. */
declare class ScopedProjectStripe {
    readonly account: ScopedProjectStripeAccount;
    readonly onboardingLinks: ScopedProjectStripeOnboardingLinks;
    readonly checkoutSessions: ScopedProjectStripeCheckoutSessions;
    readonly portalSessions: ScopedProjectStripePortalSessions;
    constructor(parent: Run402, projectId: string);
}
declare class ScopedProjects {
    private readonly parent;
    private readonly projectId;
    readonly stripe: ScopedProjectStripe;
    constructor(parent: Run402, projectId: string);
    delete(): Promise<void>;
    getUsage(): Promise<UsageReport>;
    getSchema(): Promise<SchemaReport>;
    sql(sql: string, params?: unknown[], opts?: SqlOptions): Promise<SqlResult>;
    sqlBatch(statements: SqlBatchStatement[], opts?: SqlBatchOptions): Promise<SqlBatchResult>;
    rest<T = unknown>(table: string, options?: ProjectRestOptions): Promise<T>;
    restResponse<T = unknown>(table: string, options?: ProjectRestOptions): Promise<ProjectRestResponse<T>>;
    applyExpose(manifest: ExposeManifest): Promise<unknown>;
    validateExpose(manifest: ExposeManifestValidationInput, opts?: ValidateExposeOptions): Promise<ExposeManifestValidationResult>;
    getExpose(): Promise<ExposeManifest>;
    rename(name: string): Promise<RenameProjectResult>;
    setRepoName(name: string): Promise<SetRepoNameResult>;
    listTenantPayments(opts?: ListTenantPaymentsOptions): Promise<TenantPaymentListResult>;
    promoteUser(email: string): Promise<void>;
    demoteUser(email: string): Promise<void>;
    get(): Promise<ProjectDetail>;
    info(): Promise<ProjectInfo>;
    keys(): Promise<ProjectKeys>;
    list(opts?: ListProjectsOptions): Promise<ListProjectsResult>;
    getQuote(): Promise<QuoteResult>;
    active(): Promise<string | null>;
}
declare class ScopedApps {
    private readonly parent;
    private readonly projectId;
    constructor(parent: Run402, projectId: string);
    publish(opts?: PublishAppOptions): Promise<PublishedVersion>;
    listVersions(): Promise<ListVersionsResult>;
    updateVersion(versionId: string, opts: UpdateVersionOptions): Promise<void>;
    deleteVersion(versionId: string): Promise<void>;
    browse(tags?: string[]): Promise<BrowseAppsResult>;
    fork(opts: ForkAppOptions): Promise<ForkAppResult>;
    getApp(versionId: string): Promise<AppDetails>;
    upsertInstallState(input: Omit<AppInstallStateInput, "project_id"> & {
        project_id?: string;
    }): Promise<AppInstallState>;
    getInstallState(appKey: string): Promise<AppInstallState>;
}
declare class ScopedAi {
    private readonly parent;
    private readonly projectId;
    constructor(parent: Run402, projectId: string);
    translate(opts: TranslateOptions): Promise<TranslateResult>;
    moderate(text: string): Promise<ModerateResult>;
    usage(): Promise<AiUsageResult>;
    generateImage(opts: GenerateImageOptions): Promise<GenerateImageResult>;
}
declare class ScopedGrants {
    private readonly parent;
    private readonly projectId;
    constructor(parent: Run402, projectId: string);
    create(input: CreateGrantInput): Promise<GrantCreateResult>;
    list(): Promise<GrantListResult>;
    revoke(grantId: string): Promise<GrantRevokeResult>;
    createKey(grantId: string, input?: GrantKeyInput): Promise<GrantKeyCreateResult>;
    revokeKey(keyId: string): Promise<GrantKeyRevokeResult>;
    rotateKey(keyId: string): Promise<GrantKeyRotateResult>;
}
declare class ScopedEvents {
    private readonly parent;
    private readonly projectId;
    constructor(parent: Run402, projectId: string);
    /** Read a page of this project's events feed (cursor is opaque — store and echo). */
    list(opts?: ListEventsOptions): Promise<ProjectEventFeedPage>;
}
declare class ScopedLive {
    private readonly parent;
    private readonly projectId;
    constructor(parent: Run402, projectId: string);
    /** Hints since `cursor`, or hold up to `wait` seconds for the first one. */
    changes(opts: LiveChangesOptions): Promise<LiveChangesPage>;
    /** Reconnecting SSE subscription; handle `resync` by refetching. */
    subscribe(opts: LiveSubscribeOptions, onEvent: (event: LiveEvent) => void): LiveSubscription;
}
declare class ScopedErrors {
    private readonly parent;
    private readonly projectId;
    constructor(parent: Run402, projectId: string);
    /** Read a verdict-first page of this project's grouped error fingerprints. */
    list(opts?: ListErrorsOptions): Promise<ErrorsPage>;
    /** Read one fingerprint's full detail (all samples + per-sample drill-downs). */
    get(fingerprintId: string): Promise<ErrorFingerprintDetail>;
    /** Run the promote-gate poll loop against a release (`{ newIn }` required). */
    watch(opts: WatchErrorsOptions): Promise<WatchErrorsResult>;
}
declare class ScopedArchives {
    private readonly parent;
    private readonly projectId;
    constructor(parent: Run402, projectId: string);
    create(opts?: ProjectArchiveCreateOptions): Promise<ProjectArchiveDto>;
    get(archiveId: string): Promise<ProjectArchiveDto>;
    wait(archiveId: string, opts?: ProjectArchiveWaitOptions): Promise<ProjectArchiveDto>;
    download(archiveId: string): Promise<ProjectArchiveDownload>;
    export(opts?: ProjectArchiveExportOptions): Promise<ProjectArchiveExportResult>;
}
declare class ScopedSnapshots {
    private readonly parent;
    private readonly projectId;
    constructor(parent: Run402, projectId: string);
    create(opts?: ProjectSnapshotCreateOptions): Promise<ProjectSnapshotDto>;
    list(opts?: ProjectSnapshotsListOptions): Promise<ProjectSnapshotsListResult>;
    get(snapshotId: string): Promise<ProjectSnapshotDto>;
    delete(snapshotId: string): Promise<void>;
    restorePlan(snapshotId: string, opts?: SnapshotRestoreOptions): Promise<SnapshotRestorePlanEnvelope>;
    restore(snapshotId: string, confirm: string, opts: SnapshotRestoreConfirmOptions & {
        wait: false;
    }): Promise<SnapshotRestoreHandle>;
    restore(snapshotId: string, confirm: string, opts?: SnapshotRestoreConfirmOptions): Promise<SnapshotRestoreResult>;
    getRestore(snapshotId: string, restoreId: string): Promise<SnapshotRestoreStatus>;
}
declare class ScopedBranches {
    private readonly parent;
    private readonly projectId;
    constructor(parent: Run402, projectId: string);
    create(opts?: ProjectBranchCreateOptions): Promise<ProjectBranchCreateResult>;
    list(): Promise<ProjectBranchesListResult>;
    renew(branchProjectId: string, opts?: ProjectBranchRenewOptions): Promise<ProjectBranchDto>;
    delete(branchProjectId: string): Promise<void>;
}
declare class ScopedAuth {
    private readonly parent;
    private readonly projectId;
    constructor(parent: Run402, projectId: string);
    requestMagicLink(opts: MagicLinkOptions): Promise<MagicLinkRequestResult>;
    verifyMagicLink(token: string): Promise<MagicLinkVerifyResult>;
    verifyEmailCode(opts: EmailCodeVerifyOptions): Promise<MagicLinkVerifyResult>;
    createUser(opts: CreateAuthUserOptions): Promise<AuthUserAdminResult>;
    inviteUser(opts: Omit<CreateAuthUserOptions, "sendInvite">): Promise<AuthUserAdminResult>;
    setUserPassword(opts: SetPasswordOptions): Promise<void>;
    settings(settings: AuthSettings): Promise<AuthSettingsResult>;
    createPasskeyRegistrationOptions(opts: PasskeyRegistrationOptions): Promise<PasskeyOptionsResult>;
    verifyPasskeyRegistration(opts: PasskeyRegistrationVerifyOptions): Promise<PasskeyRecord>;
    createPasskeyLoginOptions(opts: PasskeyLoginOptions): Promise<PasskeyOptionsResult>;
    verifyPasskeyLogin(opts: PasskeyLoginVerifyOptions): Promise<AuthSessionResult>;
    listPasskeys(opts: PasskeyListOptions): Promise<{
        passkeys: PasskeyRecord[];
    }>;
    deletePasskey(opts: PasskeyDeleteOptions): Promise<void>;
    providers(): Promise<unknown>;
    promote(email: string): Promise<void>;
    demote(email: string): Promise<void>;
}
declare class ScopedAssets {
    private readonly parent;
    private readonly projectId;
    constructor(parent: Run402, projectId: string);
    put(key: string, source: BlobPutSource, opts?: BlobPutOptions): Promise<BlobPutResult>;
    diagnoseUrl(url: string): Promise<BlobDiagnoseEnvelope>;
    waitFresh(opts: BlobWaitFreshOptions): Promise<BlobWaitFreshResult>;
    get(key: string): Promise<Response>;
    ls(opts?: BlobLsOptions): Promise<BlobLsResult>;
    rm(key: string): Promise<BlobRmResult>;
    sign(key: string, opts?: BlobSignOptions): Promise<BlobSignResult>;
}
declare class ScopedContracts {
    private readonly parent;
    private readonly projectId;
    constructor(parent: Run402, projectId: string);
    provisionSigner(opts: ProvisionSignerOptions): Promise<unknown>;
    getSigner(signerId: string): Promise<unknown>;
    listSigners(): Promise<unknown>;
    setRecovery(signerId: string, recoveryAddress: string | null): Promise<void>;
    setLowBalanceAlert(signerId: string, thresholdWei: string): Promise<void>;
    call(opts: ContractCallOptions): Promise<unknown>;
    deploy(opts: ContractDeployOptions): Promise<unknown>;
    callStatus(callId: string): Promise<unknown>;
    transfer(opts: SignerTransferOptions): Promise<unknown>;
    transferStatus(signerId: string, transferId: string): Promise<unknown>;
    listTransfers(signerId: string): Promise<unknown>;
    drain(signerId: string, destinationAddress: string): Promise<unknown>;
    deleteSigner(signerId: string): Promise<unknown>;
    read(opts: ContractReadOptions): Promise<unknown>;
}
/**
 * Callable hero shape for `r.project(id).apply`. The function form is the
 * documented happy path; the attached `plan`/`start`/`resume` sub-methods
 * are advanced primitives for callers building their own plan/upload/commit
 * pipelines. The same object owns release and operation reads, so the public
 * project-scoped lifecycle has one noun: apply. The hero is the
 * only public apply surface — no bare `r.apply`, no `r.deploy.apply`, no
 * `r.assets.apply`.
 */
export interface ScopedApplyHero {
    (spec: Omit<ReleaseSpec, "project_id"> & {
        project_id?: string;
    }, opts?: ApplyOptions): Promise<DeployResult>;
    plan(spec: Omit<ReleaseSpec, "project_id"> & {
        project_id?: string;
    }, opts?: {
        idempotencyKey?: string;
        dryRun?: boolean;
        mode?: "legacyDryRun" | "reviewedPlan";
        requiredPlan?: {
            planId: string;
            planFingerprint?: string;
        };
    }): Promise<{
        plan: PlanResponse;
        byteReaders: Map<string, ByteReader>;
    }>;
    start(spec: Omit<ReleaseSpec, "project_id"> & {
        project_id?: string;
    }, opts?: StartOptions): Promise<DeployOperation>;
    resume(operationId: string, opts?: {
        onEvent?: (event: DeployEvent) => void;
        project?: string;
    }): Promise<DeployResult>;
    /**
     * Pointer swap: promote an existing release to be the project's
     * current live release without re-running the apply pipeline. v1.58+.
     * See `Deploy.promote` for full semantics + warning surface.
     */
    promote(releaseId: string, opts?: PromoteOptions): Promise<PromoteResult>;
    upload(plan: PlanResponse, opts: {
        project?: string;
        byteReaders: Map<string, ByteReader>;
        onEvent?: (event: DeployEvent) => void;
    }): Promise<void>;
    commit(planId: string, opts?: {
        onEvent?: (event: DeployEvent) => void;
        idempotencyKey?: string;
        project?: string;
    }): Promise<DeployResult>;
    rehearse(planId: string, opts?: Omit<RehearsePlanOptions, "project"> & {
        project?: string;
    }): Promise<RehearsePlanResult>;
    status(operationId: string, opts?: {
        project?: string;
    }): Promise<OperationSnapshot>;
    list(opts?: Omit<DeployListOptions, "project"> & {
        project?: string;
    }): Promise<DeployListResponse>;
    events(operationId: string, opts?: {
        project?: string;
    }): Promise<DeployEventsResponse>;
    edgeCoherence(operationId: string, opts?: {
        project?: string;
    }): Promise<EdgeCoherenceReport>;
    waitEdgeCoherent(operationId: string, opts?: Omit<EdgeCoherenceWaitOptions, "project"> & {
        project?: string;
    }): Promise<EdgeCoherenceWaitResult>;
    getRelease(releaseId: string, opts?: Partial<ReleaseInventoryOptions>): Promise<ReleaseInventory>;
    getActiveRelease(opts?: Partial<ReleaseInventoryOptions>): Promise<ActiveReleaseInventory>;
    diff(opts: Omit<ReleaseDiffOptions, "project"> & {
        project?: string;
    }): Promise<ReleaseToReleaseDiff>;
    resolve(opts: ScopedDeployResolveOptions): Promise<DeployResolveResponse>;
}
declare class ScopedDomains {
    private readonly parent;
    private readonly projectId;
    constructor(parent: Run402, projectId: string);
    connect(input: ProjectDomainConnectInput): Promise<ProjectDomain>;
    get(domain: string): Promise<ProjectDomain>;
    list(): Promise<ProjectDomainListResult>;
    check(domain: string): Promise<ProjectDomain>;
    apply(domain: string): Promise<ProjectDomain>;
    repair(domain: string): Promise<ProjectDomain>;
    testReceive(domain: string, to: string): Promise<ProjectDomainTestReceiveResult>;
    activate(domain: string): Promise<ProjectDomain>;
    disconnect(domain: string): Promise<{
        status: string;
        domain: string;
    }>;
    wait(domain: string, opts?: ProjectDomainWaitOptions): Promise<ProjectDomain>;
}
declare class ScopedEmailWebhooks {
    private readonly parent;
    private readonly projectId;
    constructor(parent: Run402, projectId: string);
    register(opts: RegisterWebhookOptions): Promise<MailboxWebhookSummary>;
    list(): Promise<MailboxWebhooksResult>;
    get(webhookId: string): Promise<MailboxWebhookSummary>;
    update(webhookId: string, opts: UpdateWebhookOptions): Promise<MailboxWebhookSummary>;
    delete(webhookId: string): Promise<void>;
    listDeliveries(opts?: ListDeliveriesOptions): Promise<WebhookDeliveriesResult>;
    redriveDelivery(deliveryId: string): Promise<RedriveDeliveryResult>;
}
declare class ScopedEmail {
    private readonly parent;
    private readonly projectId;
    readonly webhooks: ScopedEmailWebhooks;
    constructor(parent: Run402, projectId: string);
    createMailbox(slug: string): Promise<CreateMailboxResult>;
    listMailboxes(): Promise<MailboxListResult>;
    setMailboxDefaults(opts: SetMailboxDefaultsOptions): Promise<SetMailboxDefaultsResult>;
    updateMailbox(opts: UpdateMailboxOptions): Promise<UpdateMailboxResult>;
    send(opts: SendEmailOptions): Promise<SendEmailResult>;
    list(opts?: ListEmailsOptions): Promise<EmailSummary[]>;
    get(messageId: string): Promise<EmailDetail>;
    getRaw(messageId: string): Promise<RawEmailResult>;
    getMailbox(): Promise<MailboxInfo>;
    deleteMailbox(mailboxId?: string): Promise<DeleteMailboxResult>;
}
declare class ScopedFunctionRuns {
    private readonly parent;
    private readonly projectId;
    constructor(parent: Run402, projectId: string);
    create(name: string, opts: FunctionRunCreateOptions): Promise<FunctionRunHandle>;
    list(name: string, opts?: FunctionRunListOptions): Promise<FunctionRunListResult>;
    get(runId: string): Promise<FunctionRunHandle>;
    logs(runId: string, opts?: FunctionRunLogsOptions): Promise<FunctionLogsResult>;
    cancel(runId: string): Promise<FunctionRunHandle>;
    redrive(runId: string, opts?: FunctionRunRedriveOptions): Promise<FunctionRunHandle>;
    wait(runId: string, opts?: FunctionRunWaitOptions): Promise<FunctionRunHandle>;
}
declare class ScopedFunctions {
    private readonly parent;
    private readonly projectId;
    readonly runs: ScopedFunctionRuns;
    constructor(parent: Run402, projectId: string);
    deploy(opts: FunctionDeployOptions): Promise<FunctionDeployResult>;
    invoke(name: string, opts?: FunctionInvokeOptions): Promise<FunctionInvokeResult>;
    logs(name: string, opts?: FunctionLogsOptions): Promise<FunctionLogsResult>;
    logsByRequestId(requestId: string, opts?: FunctionLogsByRequestIdOptions): Promise<FunctionLogsByRequestIdResult>;
    list(): Promise<FunctionListResult>;
    delete(name: string): Promise<DeleteFunctionResult>;
    update(name: string, opts: FunctionUpdateOptions): Promise<FunctionUpdateResult>;
    rebuild(name: string): Promise<FunctionRebuildResult>;
    rebuildAll(): Promise<FunctionRebuildBatchResult>;
}
declare class ScopedSecrets {
    private readonly parent;
    private readonly projectId;
    constructor(parent: Run402, projectId: string);
    set(key: string, opts: SecretSetOptions): Promise<void>;
    list(): Promise<SecretListResult>;
    delete(key: string): Promise<DeleteSecretResult>;
}
declare class ScopedJobs {
    private readonly parent;
    private readonly projectId;
    constructor(parent: Run402, projectId: string);
    submit(request: ManagedJobSubmitRequest): Promise<ManagedJobResponse>;
    get(jobId: string): Promise<ManagedJobResponse>;
    logs(jobId: string, opts?: ManagedJobLogsOptions): Promise<ManagedJobLogsResponse>;
    cancel(jobId: string): Promise<ManagedJobResponse>;
    purge(): Promise<ManagedJobPurgeResponse>;
    downloadArtifact(jobId: string, filename: string): Promise<Response>;
}
declare class ScopedSubdomains {
    private readonly parent;
    private readonly projectId;
    constructor(parent: Run402, projectId: string);
    list(): Promise<SubdomainSummary[]>;
    add(input: SubdomainAddInput): Promise<SubdomainAddResult>;
    delete(name: string, opts?: SubdomainClaimOptions): Promise<SubdomainDeleteResult>;
}
export declare class ScopedRun402 {
    /** Resolved project id this client is bound to. Read-only. */
    readonly projectId: string;
    readonly projects: ScopedProjects;
    readonly apps: ScopedApps;
    readonly ai: ScopedAi;
    readonly auth: ScopedAuth;
    readonly assets: ScopedAssets;
    readonly contracts: ScopedContracts;
    /**
     * Hero apply surface: `r.project(id).apply(spec)`
     * is the documented happy path for both release-only and mixed apply.
     * Callable directly, with `.plan(spec)` / `.start(spec)` / `.resume(opId)`
     * sub-methods for advanced plan-upload-commit pipelines.
     */
    readonly apply: ScopedApplyHero;
    /**
     * No `deploy` namespace: `apply` owns both writes and lifecycle reads.
     * Use `p.apply(...)`, `p.apply.plan(...)`, `p.apply.status(...)`,
     * `p.apply.getRelease(...)`, and `p.apply.resolve(...)`.
     */
    readonly domains: ScopedDomains;
    readonly email: ScopedEmail;
    readonly functions: ScopedFunctions;
    readonly jobs: ScopedJobs;
    readonly secrets: ScopedSecrets;
    readonly subdomains: ScopedSubdomains;
    /** Per-project capability grants and their grant keys, project-id pre-bound. */
    readonly grants: ScopedGrants;
    /** Cursored project events feed, project-id pre-bound. */
    readonly events: ScopedEvents;
    readonly live: ScopedLive;
    /** Release-error-rollup query surface (list / get / watch), project-id pre-bound. */
    readonly errors: ScopedErrors;
    readonly archives: ScopedArchives;
    readonly snapshots: ScopedSnapshots;
    readonly branches: ScopedBranches;
    constructor(parent: Run402, _client: Client, projectId: string);
}
export {};
//# sourceMappingURL=scoped.d.ts.map