@hasna/domains
Version:
Domain portfolio, registrar, marketplace, and DNS management for AI agents — CLI + MCP + HTTP API + SDK, shared account API and PostgreSQL
146 lines • 4.69 kB
TypeScript
/**
* Sedo marketplace provider
*
* Wraps the Sedo domain marketplace connector for domain search,
* availability, purchase, and portfolio management.
*
* Uses XML-based API (SOAP/XML-RPC over HTTP POST) as documented at
* https://api.sedo.com/apidocs/v1/
*
* Auth: partnerid, signkey, username, password via env vars:
* SEDO_PARTNER_ID, SEDO_API_KEY (signkey), SEDO_USERNAME, SEDO_PASSWORD
*/
export interface SedoConfig {
partnerId: string;
signKey: string;
username: string;
password: string;
[key: string]: unknown;
}
export interface SedoDomain {
domain: string;
forSale: boolean;
price?: number;
currency?: string;
status?: string;
isPremium?: boolean;
}
export interface SedoSearchResult {
domains: SedoDomain[];
total: number;
}
export interface SedoStatusResult {
domain: string;
listed: boolean;
forSale: boolean;
price?: number;
currency?: string;
partnerId?: number;
status?: string;
}
export interface SedoPurchaseResult {
domain: string;
success: boolean;
error?: string;
orderId?: string;
price?: number;
}
export declare function resolveSedoConfig(env?: Record<string, string | undefined>): Partial<SedoConfig>;
export declare function getSedoConfig(): SedoConfig;
export interface SedoCapability {
configured: boolean;
gated: boolean;
notes: string;
}
export declare function sedoCapability(env?: Record<string, string | undefined>): SedoCapability;
/**
* Sedo encodes currency as an integer code in API responses
* (see DomainInsert / DomainSearch docs): 0 = EUR, 1 = USD, 2 = GBP.
*/
export declare const SEDO_CURRENCY_CODES: Record<string, string>;
export interface SedoFault {
code: string;
message: string;
}
/**
* Detect and parse a Sedo <SEDOFAULT> error envelope.
* Returns null when the response is not a fault.
*/
export declare function parseSedoFault(xml: string): SedoFault | null;
export interface SedoSearchOptions {
tld?: string;
limit?: number;
minPrice?: number;
maxPrice?: number;
/** Keyword match mode: B=begins with, C=contains, E=ends with. Default C. */
kwtype?: "B" | "C" | "E";
/** ISO 639-1 result language. Default "en". */
language?: string;
}
/**
* Build the Sedo DomainSearch request params using the documented
* parameter names. The marketplace search action is `keyword` based —
* `searchword`/`limit` are NOT recognized and yield an E1201 fault.
* See https://api.sedo.com/apidocs/v1/Basic/functions/sedoapi_DomainSearch.html
*/
export declare function buildSedoSearchParams(query: string, options?: SedoSearchOptions): Record<string, unknown>;
/**
* Parse a Sedo <SEDOSEARCH> XML response into domain listings.
* Throws if the response is a <SEDOFAULT> error envelope.
*/
export declare function parseSedoSearchResponse(xml: string): SedoSearchResult;
/**
* Search for domains for sale on Sedo.
*/
export declare function searchSedoDomains(query: string, options?: SedoSearchOptions): Promise<SedoSearchResult>;
/**
* Search health/tech domains on Sedo — convenience method.
*/
export declare function searchHealthDomains(options?: {
tld?: string;
limit?: number;
}): Promise<SedoSearchResult>;
/**
* Check domain status on Sedo — whether listed for sale.
*/
export declare function checkSedoStatus(domains: string[]): Promise<SedoStatusResult[]>;
/**
* List domains in your Sedo portfolio.
*/
export declare function listSedoPortfolio(options?: {
limit?: number;
}): Promise<SedoDomain[]>;
export interface SedoDomainInput {
domain: string;
price?: number;
currency?: string;
forSale?: boolean;
parkingEnabled?: boolean;
buyNowPrice?: number;
}
/**
* Add a domain to Sedo marketplace.
*/
export declare function addDomainToSedo(input: SedoDomainInput): Promise<SedoStatusResult>;
/**
* Update an existing domain on Sedo.
*/
export declare function editDomainOnSedo(input: SedoDomainInput): Promise<SedoStatusResult>;
/**
* Remove a domain from Sedo marketplace.
*/
export declare function removeDomainFromSedo(domain: string): Promise<boolean>;
/**
* Check if domains are blacklisted at Sedo.
*/
export declare function checkSedoBlacklist(domains: string[]): Promise<{
domain: string;
blacklisted: boolean;
}[]>;
/**
* Record a Sedo domain purchase in the shared portfolio.
* Sedo doesn't have a direct purchase API — purchases go through
* their marketplace UI. This records the acquisition in the shared portfolio.
*/
export declare function recordSedoPurchase(domain: string, price: number, orderId?: string): Promise<import("../index.js").Domain>;
//# sourceMappingURL=sedo.d.ts.map