domainr-node
Version:
`domainr-node` is a [Domainr](https://domainr.com) API client written for Node that fully supports both the standard and enterprise versions.
53 lines (52 loc) • 1.65 kB
TypeScript
/**
* domainr-node
* Copyright (C) 2021 Marvin Schopf
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @license Apache-2.0
* @copyright 2021 Marvin Schopf
* @author Marvin Schopf <marvin@schopf.biz>
*
*/
export declare type DomainrOptions = {
endpoint?: "standard" | "enterprise";
};
export declare type DomainrSearchOptions = {
location?: string;
registrar?: string;
defaults?: string[];
keywords?: string[];
};
export declare type DomainrStatusResponse = {
domain: string;
zone: string;
status: string[];
};
export declare type DomainrSearchResponse = {
domain: string;
host: string;
subdomain: string;
zone: string;
path: string;
registerURL: string;
};
export declare class DomainrClient {
apiKey: string;
endpoint: "standard" | "enterprise";
constructor(apiKey: string, options?: DomainrOptions);
register(domain: string, registrar?: string): Promise<string>;
status(domain: string): Promise<DomainrStatusResponse[]>;
search(query: string, options?: DomainrSearchOptions): Promise<DomainrSearchResponse[]>;
}
export default DomainrClient;