UNPKG

@hasna/domains

Version:

Domain portfolio, registrar, marketplace, and DNS management for AI agents — CLI + MCP + HTTP API + SDK, shared account API and PostgreSQL

70 lines • 2.52 kB
/** * Persistent config stored in the domains config directory. * * This is a SETTINGS store — registrant contact defaults, registrar/DNS * defaults, the purchase AWS profile. It never holds an API key: credentials * come from the shared @hasna/contracts resolver only (see * `../lib/domains-resolver.ts`). */ export interface DomainContact { first_name?: string; last_name?: string; email?: string; phone?: string; address_line_1?: string; city?: string; state?: string; country_code?: string; zip_code?: string; organization_name?: string; } export interface DomainsConfig { default_registrar?: string; default_dns?: string; /** AWS profile/account used for domain purchases (Route53 Domains). */ purchase_aws_profile?: string; contact?: DomainContact; } /** * AWS profile to use for Route 53 domain purchases. Resolved from config, then * env. Applying it sets process.env.AWS_PROFILE when no explicit AWS creds are * already present. */ export declare function getPurchaseProfile(): string | undefined; /** Set AWS_PROFILE from config for purchase ops if no explicit creds are set. */ export declare function applyPurchaseProfile(): string | undefined; /** * The default config location — `config.json` at the root of the effective * local data home (see `app-home.ts`). Env overrides (DOMAINS_CONFIG_PATH / * DOMAINS_CONFIG_DIR) are honored unchanged and win over the default. */ export declare function getConfigPath(env?: NodeJS.ProcessEnv): string; export declare function loadConfig(env?: NodeJS.ProcessEnv): DomainsConfig; export declare function saveConfig(config: DomainsConfig, env?: NodeJS.ProcessEnv): void; export declare function setConfigKey(keyPath: string, value: string, env?: NodeJS.ProcessEnv): DomainsConfig; /** Return a DomainContactInfo-shaped object from config, with CLI opts overriding stored values */ export declare function resolveContact(opts: { email?: string; firstName?: string; lastName?: string; phone?: string; address?: string; city?: string; state?: string; country?: string; zip?: string; org?: string; }): { first_name: string; last_name: string; email: string; phone: string; address_line_1: string; city: string; state: string; country_code: string; zip_code: string; organization_name?: string; }; export declare function getConfigKey(keyPath: string): string | undefined; //# sourceMappingURL=config.d.ts.map