import type { DomainClient } from "./provider"; import type { Domain, RequestOptions, WaitUntilActiveOptions } from "./types"; export interface SubdomainClientOptions { /** Domain lifecycle client for the platform that serves tenant traffic. */ domainClient: DomainClient; /** Parent hostname owned by the application, for example `mydomain.com`. */ baseDomain: string; /** Labels that tenants must never be allowed to claim. */ reservedLabels?: readonly string[]; } export interface SubdomainClient { readonly baseDomain: string; readonly wildcardHostname: string; readonly supportsWildcard: boolean; /** Normalize a direct-child label and return its full tenant hostname. */ toHostname(label: string): string; /** Return the normalized direct-child label for a full tenant hostname. */ fromHostname(hostname: string): string; /** Attach one tenant hostname. Use when wildcard provisioning is unavailable. */ add(label: string, options?: RequestOptions): Promise; get(label: string, options?: RequestOptions): Promise; refresh(label: string, options?: RequestOptions): Promise; verify(label: string, options?: RequestOptions): Promise; remove(label: string, options?: RequestOptions): Promise; waitUntilActive(label: string, options?: WaitUntilActiveOptions): Promise; /** Attach `*.baseDomain` once so the application can route every tenant label. */ provisionWildcard(options?: RequestOptions): Promise; getWildcard(options?: RequestOptions): Promise; refreshWildcard(options?: RequestOptions): Promise; verifyWildcard(options?: RequestOptions): Promise; removeWildcard(options?: RequestOptions): Promise; waitUntilWildcardActive(options?: WaitUntilActiveOptions): Promise; } /** * Scope domain lifecycle operations to direct tenant subdomains of one owned * parent domain. Tenant ownership and uniqueness remain application concerns. */ export declare function createSubdomainClient(options: SubdomainClientOptions): SubdomainClient; //# sourceMappingURL=subdomains.d.ts.map