run402-mcp
Version:
MCP server for Run402 — full-stack backend infrastructure for AI agents: Postgres, auth, storage, serverless functions and atomic deploys. Paid with x402/MPP. Includes $0.03 image generation.
63 lines • 2.25 kB
TypeScript
/**
* `subdomains` namespace — `*.run402.com` subdomain claims pointing at
* deployments or releases (defaulting to the project's live release).
* `add` and `delete` accept an optional `projectId` for ownership
* tracking; `list` requires one.
*/
import type { Client } from "../kernel.js";
export interface SubdomainClaimOptions {
/** Optional project ID. If omitted, falls back to the active project (set with `r.projects.use(id)`). The SDK sends the project's service key as bearer auth. */
projectId?: string;
}
export interface SubdomainAddInput extends SubdomainClaimOptions {
name: string;
/**
* Target to bind: a legacy `dpl_…` deployment id, or a `rel_…` / `op_…`
* id (the gateway resolves either). Omit both this and `releaseId` to
* bind the project's live release.
*/
deploymentId?: string;
/** A `rel_…` release id to bind. Omit both this and `deploymentId` to bind the project's live release. */
releaseId?: string;
}
export interface SubdomainAddResult {
name: string;
deployment_id: string;
url: string;
deployment_url: string;
project_id: string | null;
created_at: string;
updated_at: string;
}
export interface SubdomainSummary {
name: string;
url: string;
deployment_id: string;
deployment_url: string;
project_id: string;
created_at: string;
updated_at: string;
}
export interface SubdomainDeleteResult {
name: string;
deployment_id: string;
project_id: string;
deleted_at: string;
}
export declare class Subdomains {
#private;
private readonly client;
constructor(client: Client);
/**
* Claim a subdomain and point it at a deployment or release. Omit both
* `deploymentId` and `releaseId` to bind the project's live release —
* the gateway resolves it, and answers 404 only when the project has no
* live release with a site.
*/
add(input: SubdomainAddInput): Promise<SubdomainAddResult>;
/** Release a subdomain. */
delete(name: string, opts?: SubdomainClaimOptions): Promise<SubdomainDeleteResult>;
/** List a project's subdomains. */
list(projectId: string): Promise<SubdomainSummary[]>;
}
//# sourceMappingURL=subdomains.d.ts.map