@aoxborrow/registrar-client 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -43
- package/dist/index.cjs +589 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -1
- package/dist/index.d.ts +30 -1
- package/dist/index.js +589 -47
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
- package/src/http.ts +26 -2
- package/src/index.ts +1 -0
- package/src/registrars/domain101.ts +709 -0
- package/src/registrars/dynadot.ts +3 -0
- package/src/registrars/index.ts +12 -10
- package/src/registrars/namecheap.ts +11 -5
- package/src/registrars/namecom.ts +8 -12
- package/src/types.ts +6 -0
package/dist/index.d.cts
CHANGED
|
@@ -68,6 +68,7 @@ interface ConnectionResult {
|
|
|
68
68
|
interface OperationResult {
|
|
69
69
|
success: boolean;
|
|
70
70
|
message: string;
|
|
71
|
+
pending?: boolean;
|
|
71
72
|
outcome?: 'unknown';
|
|
72
73
|
}
|
|
73
74
|
interface ConfigField {
|
|
@@ -140,6 +141,7 @@ interface DomainAvailability {
|
|
|
140
141
|
available: boolean;
|
|
141
142
|
premium?: boolean;
|
|
142
143
|
price?: number;
|
|
144
|
+
renewalPrice?: number;
|
|
143
145
|
currency?: string;
|
|
144
146
|
period?: number;
|
|
145
147
|
}
|
|
@@ -354,6 +356,7 @@ interface HttpClientConfig {
|
|
|
354
356
|
headers?: Record<string, string>;
|
|
355
357
|
options: RegistrarClientOptions;
|
|
356
358
|
safeMethods?: readonly string[];
|
|
359
|
+
rateLimitFallbackSeconds?: number;
|
|
357
360
|
}
|
|
358
361
|
declare const REST_SAFE_METHODS: readonly string[];
|
|
359
362
|
interface RequestConfig {
|
|
@@ -472,6 +475,31 @@ declare class CloudflareRegistrar extends BaseRegistrar {
|
|
|
472
475
|
private patchDomain;
|
|
473
476
|
}
|
|
474
477
|
|
|
478
|
+
declare class Domain101Registrar extends BaseRegistrar {
|
|
479
|
+
readonly name = "101domain";
|
|
480
|
+
static readonly safeMethods: readonly string[];
|
|
481
|
+
static readonly displayName = "101domain";
|
|
482
|
+
static readonly website = "101domain.com";
|
|
483
|
+
static readonly supportsSandbox = false;
|
|
484
|
+
static readonly configFields: ConfigField[];
|
|
485
|
+
static readonly helpText: string;
|
|
486
|
+
static readonly extendedFeatures: readonly RegistrarFeature[];
|
|
487
|
+
constructor(credentials: RegistrarCredentials, options?: RegistrarOptions);
|
|
488
|
+
testConnection(opts?: RequestOptions): Promise<ConnectionResult>;
|
|
489
|
+
listDomains(opts?: ListDomainsOptions): Promise<Domain[]>;
|
|
490
|
+
getDomain(domainName: string, opts?: RequestOptions): Promise<Domain>;
|
|
491
|
+
getNameservers(domainName: string, opts?: RequestOptions): Promise<string[]>;
|
|
492
|
+
updateNameservers(domainName: string, nameservers: string[], opts?: RequestOptions): Promise<OperationResult>;
|
|
493
|
+
checkAvailability(domainNames: string[], opts?: RequestOptions): Promise<DomainAvailability[]>;
|
|
494
|
+
getPricing(tldOrDomain: string, opts?: RequestOptions): Promise<TldPricing>;
|
|
495
|
+
getDnsRecords(domainName: string, opts?: RequestOptions): Promise<DnsRecord[]>;
|
|
496
|
+
setDnsRecords(domainName: string, records: DnsRecord[], opts?: RequestOptions): Promise<OperationResult>;
|
|
497
|
+
getDomainForwarding(domainName: string, opts?: RequestOptions): Promise<DomainForward[]>;
|
|
498
|
+
setDomainForwarding(domainName: string, forwards: DomainForward[], opts?: RequestOptions): Promise<OperationResult>;
|
|
499
|
+
private request;
|
|
500
|
+
private rawRecords;
|
|
501
|
+
}
|
|
502
|
+
|
|
475
503
|
declare class DynadotRegistrar extends BaseRegistrar {
|
|
476
504
|
readonly name = "dynadot";
|
|
477
505
|
static readonly safeMethods: readonly string[];
|
|
@@ -828,6 +856,7 @@ declare class SpaceshipRegistrar extends BaseRegistrar {
|
|
|
828
856
|
}
|
|
829
857
|
|
|
830
858
|
declare const registrars: {
|
|
859
|
+
'101domain': typeof Domain101Registrar;
|
|
831
860
|
cloudflare: typeof CloudflareRegistrar;
|
|
832
861
|
dynadot: typeof DynadotRegistrar;
|
|
833
862
|
gandi: typeof GandiRegistrar;
|
|
@@ -863,4 +892,4 @@ declare function normalizeNameservers(nameservers: unknown): string[];
|
|
|
863
892
|
declare function createDomain(data?: DomainInput): Domain;
|
|
864
893
|
declare function asRead<T extends RequestOptions>(opts?: T): T;
|
|
865
894
|
|
|
866
|
-
export { ALL_FEATURES, AbortError, AuthenticationError, AuthorizationError, BaseRegistrar, CORE_FEATURES, CloudflareRegistrar, type ConfigField, ConfigurationError, ConnectionError, type ConnectionResult, ConsentRequiredError, type Contact, type ContactSet, DEFAULT_OPTIONS, type DnsRecord, type DnssecStatus, type Domain, type DomainAvailability, type DomainForward, type DomainForwardType, type DomainInput, type DomainSource, type DsRecord, DynadotRegistrar, EXTENDED_FEATURES, type EmailForward, FEATURE_CALLS, Feature, type FeatureCall, GandiRegistrar, GoDaddyRegistrar, HttpClient, type HttpClientConfig, InvalidResponseError, type ListDomainsOptions, MASKED_FORWARD_UNSUPPORTED, NameBrightRegistrar, NameSiloRegistrar, NamecheapRegistrar, NamecomRegistrar, NotFoundError, NotImplementedError, type OperationResult, OutcomeUnknownError, ParsingError, PorkbunRegistrar, type PortfolioError, type PortfolioResult, REST_SAFE_METHODS, RateLimitError, type RegisterDomainInput, type Registrar, RegistrarClient, type RegistrarClientOptions, type RegistrarConstructor, type RegistrarCredentials, type RegistrarEnvironment, RegistrarError, type RegistrarFeature, type RegistrarName, type RegistrarOptions, type RegistrationConsent, type RequestConfig, type RequestIntent, type RequestOptions, RetryableRegistrarError, type SettableDomainForward, SpaceshipRegistrar, TimeoutError, type TldPricing, type TransferDomainInput, USER_AGENT, asRead, backoffDelay, createDomain, createRegistrar, ensureArray, filterDomains, isCoreFeature, listPortfolio, markNotSent, normalizeDomain, normalizeNameservers, parseDate, parseXml, registrars, requireConsent, selectBaseUrl, settableForwards, sleep, toRegistrarError, wasNotSent };
|
|
895
|
+
export { ALL_FEATURES, AbortError, AuthenticationError, AuthorizationError, BaseRegistrar, CORE_FEATURES, CloudflareRegistrar, type ConfigField, ConfigurationError, ConnectionError, type ConnectionResult, ConsentRequiredError, type Contact, type ContactSet, DEFAULT_OPTIONS, type DnsRecord, type DnssecStatus, type Domain, Domain101Registrar, type DomainAvailability, type DomainForward, type DomainForwardType, type DomainInput, type DomainSource, type DsRecord, DynadotRegistrar, EXTENDED_FEATURES, type EmailForward, FEATURE_CALLS, Feature, type FeatureCall, GandiRegistrar, GoDaddyRegistrar, HttpClient, type HttpClientConfig, InvalidResponseError, type ListDomainsOptions, MASKED_FORWARD_UNSUPPORTED, NameBrightRegistrar, NameSiloRegistrar, NamecheapRegistrar, NamecomRegistrar, NotFoundError, NotImplementedError, type OperationResult, OutcomeUnknownError, ParsingError, PorkbunRegistrar, type PortfolioError, type PortfolioResult, REST_SAFE_METHODS, RateLimitError, type RegisterDomainInput, type Registrar, RegistrarClient, type RegistrarClientOptions, type RegistrarConstructor, type RegistrarCredentials, type RegistrarEnvironment, RegistrarError, type RegistrarFeature, type RegistrarName, type RegistrarOptions, type RegistrationConsent, type RequestConfig, type RequestIntent, type RequestOptions, RetryableRegistrarError, type SettableDomainForward, SpaceshipRegistrar, TimeoutError, type TldPricing, type TransferDomainInput, USER_AGENT, asRead, backoffDelay, createDomain, createRegistrar, ensureArray, filterDomains, isCoreFeature, listPortfolio, markNotSent, normalizeDomain, normalizeNameservers, parseDate, parseXml, registrars, requireConsent, selectBaseUrl, settableForwards, sleep, toRegistrarError, wasNotSent };
|
package/dist/index.d.ts
CHANGED
|
@@ -68,6 +68,7 @@ interface ConnectionResult {
|
|
|
68
68
|
interface OperationResult {
|
|
69
69
|
success: boolean;
|
|
70
70
|
message: string;
|
|
71
|
+
pending?: boolean;
|
|
71
72
|
outcome?: 'unknown';
|
|
72
73
|
}
|
|
73
74
|
interface ConfigField {
|
|
@@ -140,6 +141,7 @@ interface DomainAvailability {
|
|
|
140
141
|
available: boolean;
|
|
141
142
|
premium?: boolean;
|
|
142
143
|
price?: number;
|
|
144
|
+
renewalPrice?: number;
|
|
143
145
|
currency?: string;
|
|
144
146
|
period?: number;
|
|
145
147
|
}
|
|
@@ -354,6 +356,7 @@ interface HttpClientConfig {
|
|
|
354
356
|
headers?: Record<string, string>;
|
|
355
357
|
options: RegistrarClientOptions;
|
|
356
358
|
safeMethods?: readonly string[];
|
|
359
|
+
rateLimitFallbackSeconds?: number;
|
|
357
360
|
}
|
|
358
361
|
declare const REST_SAFE_METHODS: readonly string[];
|
|
359
362
|
interface RequestConfig {
|
|
@@ -472,6 +475,31 @@ declare class CloudflareRegistrar extends BaseRegistrar {
|
|
|
472
475
|
private patchDomain;
|
|
473
476
|
}
|
|
474
477
|
|
|
478
|
+
declare class Domain101Registrar extends BaseRegistrar {
|
|
479
|
+
readonly name = "101domain";
|
|
480
|
+
static readonly safeMethods: readonly string[];
|
|
481
|
+
static readonly displayName = "101domain";
|
|
482
|
+
static readonly website = "101domain.com";
|
|
483
|
+
static readonly supportsSandbox = false;
|
|
484
|
+
static readonly configFields: ConfigField[];
|
|
485
|
+
static readonly helpText: string;
|
|
486
|
+
static readonly extendedFeatures: readonly RegistrarFeature[];
|
|
487
|
+
constructor(credentials: RegistrarCredentials, options?: RegistrarOptions);
|
|
488
|
+
testConnection(opts?: RequestOptions): Promise<ConnectionResult>;
|
|
489
|
+
listDomains(opts?: ListDomainsOptions): Promise<Domain[]>;
|
|
490
|
+
getDomain(domainName: string, opts?: RequestOptions): Promise<Domain>;
|
|
491
|
+
getNameservers(domainName: string, opts?: RequestOptions): Promise<string[]>;
|
|
492
|
+
updateNameservers(domainName: string, nameservers: string[], opts?: RequestOptions): Promise<OperationResult>;
|
|
493
|
+
checkAvailability(domainNames: string[], opts?: RequestOptions): Promise<DomainAvailability[]>;
|
|
494
|
+
getPricing(tldOrDomain: string, opts?: RequestOptions): Promise<TldPricing>;
|
|
495
|
+
getDnsRecords(domainName: string, opts?: RequestOptions): Promise<DnsRecord[]>;
|
|
496
|
+
setDnsRecords(domainName: string, records: DnsRecord[], opts?: RequestOptions): Promise<OperationResult>;
|
|
497
|
+
getDomainForwarding(domainName: string, opts?: RequestOptions): Promise<DomainForward[]>;
|
|
498
|
+
setDomainForwarding(domainName: string, forwards: DomainForward[], opts?: RequestOptions): Promise<OperationResult>;
|
|
499
|
+
private request;
|
|
500
|
+
private rawRecords;
|
|
501
|
+
}
|
|
502
|
+
|
|
475
503
|
declare class DynadotRegistrar extends BaseRegistrar {
|
|
476
504
|
readonly name = "dynadot";
|
|
477
505
|
static readonly safeMethods: readonly string[];
|
|
@@ -828,6 +856,7 @@ declare class SpaceshipRegistrar extends BaseRegistrar {
|
|
|
828
856
|
}
|
|
829
857
|
|
|
830
858
|
declare const registrars: {
|
|
859
|
+
'101domain': typeof Domain101Registrar;
|
|
831
860
|
cloudflare: typeof CloudflareRegistrar;
|
|
832
861
|
dynadot: typeof DynadotRegistrar;
|
|
833
862
|
gandi: typeof GandiRegistrar;
|
|
@@ -863,4 +892,4 @@ declare function normalizeNameservers(nameservers: unknown): string[];
|
|
|
863
892
|
declare function createDomain(data?: DomainInput): Domain;
|
|
864
893
|
declare function asRead<T extends RequestOptions>(opts?: T): T;
|
|
865
894
|
|
|
866
|
-
export { ALL_FEATURES, AbortError, AuthenticationError, AuthorizationError, BaseRegistrar, CORE_FEATURES, CloudflareRegistrar, type ConfigField, ConfigurationError, ConnectionError, type ConnectionResult, ConsentRequiredError, type Contact, type ContactSet, DEFAULT_OPTIONS, type DnsRecord, type DnssecStatus, type Domain, type DomainAvailability, type DomainForward, type DomainForwardType, type DomainInput, type DomainSource, type DsRecord, DynadotRegistrar, EXTENDED_FEATURES, type EmailForward, FEATURE_CALLS, Feature, type FeatureCall, GandiRegistrar, GoDaddyRegistrar, HttpClient, type HttpClientConfig, InvalidResponseError, type ListDomainsOptions, MASKED_FORWARD_UNSUPPORTED, NameBrightRegistrar, NameSiloRegistrar, NamecheapRegistrar, NamecomRegistrar, NotFoundError, NotImplementedError, type OperationResult, OutcomeUnknownError, ParsingError, PorkbunRegistrar, type PortfolioError, type PortfolioResult, REST_SAFE_METHODS, RateLimitError, type RegisterDomainInput, type Registrar, RegistrarClient, type RegistrarClientOptions, type RegistrarConstructor, type RegistrarCredentials, type RegistrarEnvironment, RegistrarError, type RegistrarFeature, type RegistrarName, type RegistrarOptions, type RegistrationConsent, type RequestConfig, type RequestIntent, type RequestOptions, RetryableRegistrarError, type SettableDomainForward, SpaceshipRegistrar, TimeoutError, type TldPricing, type TransferDomainInput, USER_AGENT, asRead, backoffDelay, createDomain, createRegistrar, ensureArray, filterDomains, isCoreFeature, listPortfolio, markNotSent, normalizeDomain, normalizeNameservers, parseDate, parseXml, registrars, requireConsent, selectBaseUrl, settableForwards, sleep, toRegistrarError, wasNotSent };
|
|
895
|
+
export { ALL_FEATURES, AbortError, AuthenticationError, AuthorizationError, BaseRegistrar, CORE_FEATURES, CloudflareRegistrar, type ConfigField, ConfigurationError, ConnectionError, type ConnectionResult, ConsentRequiredError, type Contact, type ContactSet, DEFAULT_OPTIONS, type DnsRecord, type DnssecStatus, type Domain, Domain101Registrar, type DomainAvailability, type DomainForward, type DomainForwardType, type DomainInput, type DomainSource, type DsRecord, DynadotRegistrar, EXTENDED_FEATURES, type EmailForward, FEATURE_CALLS, Feature, type FeatureCall, GandiRegistrar, GoDaddyRegistrar, HttpClient, type HttpClientConfig, InvalidResponseError, type ListDomainsOptions, MASKED_FORWARD_UNSUPPORTED, NameBrightRegistrar, NameSiloRegistrar, NamecheapRegistrar, NamecomRegistrar, NotFoundError, NotImplementedError, type OperationResult, OutcomeUnknownError, ParsingError, PorkbunRegistrar, type PortfolioError, type PortfolioResult, REST_SAFE_METHODS, RateLimitError, type RegisterDomainInput, type Registrar, RegistrarClient, type RegistrarClientOptions, type RegistrarConstructor, type RegistrarCredentials, type RegistrarEnvironment, RegistrarError, type RegistrarFeature, type RegistrarName, type RegistrarOptions, type RegistrationConsent, type RequestConfig, type RequestIntent, type RequestOptions, RetryableRegistrarError, type SettableDomainForward, SpaceshipRegistrar, TimeoutError, type TldPricing, type TransferDomainInput, USER_AGENT, asRead, backoffDelay, createDomain, createRegistrar, ensureArray, filterDomains, isCoreFeature, listPortfolio, markNotSent, normalizeDomain, normalizeNameservers, parseDate, parseXml, registrars, requireConsent, selectBaseUrl, settableForwards, sleep, toRegistrarError, wasNotSent };
|