@@ -33,11 +33,18 @@ import { getDefaultEnsNodeUrl } from "./deployments";
3333/**
3434 * Configuration options for ENSNode API client
3535 */
36- export interface ClientOptions {
36+ export interface EnsApiClientOptions {
3737 /** The ENSNode API URL */
3838 url : URL ;
3939}
4040
41+ /**
42+ * Configuration options for ENSNode API client
43+ *
44+ * @deprecated Use {@link EnsApiClientOptions} instead.
45+ */
46+ export type ClientOptions = EnsApiClientOptions ;
47+
4148/**
4249 * EnsApi Client
4350 *
@@ -93,22 +100,22 @@ export interface ClientOptions {
93100 * ```
94101 */
95102export class EnsApiClient {
96- private readonly options : ClientOptions ;
103+ private readonly options : EnsApiClientOptions ;
97104
98- static defaultOptions ( ) : ClientOptions {
105+ static defaultOptions ( ) : EnsApiClientOptions {
99106 return {
100107 url : getDefaultEnsNodeUrl ( ) ,
101108 } ;
102109 }
103110
104- constructor ( options : Partial < ClientOptions > = { } ) {
111+ constructor ( options : Partial < EnsApiClientOptions > = { } ) {
105112 this . options = {
106113 ...EnsApiClient . defaultOptions ( ) ,
107114 ...options ,
108115 } ;
109116 }
110117
111- getOptions ( ) : Readonly < ClientOptions > {
118+ getOptions ( ) : Readonly < EnsApiClientOptions > {
112119 return Object . freeze ( {
113120 url : new URL ( this . options . url . href ) ,
114121 } ) ;
@@ -311,7 +318,7 @@ export class EnsApiClient {
311318 * @returns {EnsApiConfigResponse }
312319 *
313320 * @throws if the ENSApi request fails
314- * @throws if the ENSApi returns an error response
321+ * @throws if the ENSApi returns a non-ok response
315322 * @throws if the ENSApi response breaks required invariants
316323 */
317324 async config ( ) : Promise < EnsApiConfigResponse > {
@@ -342,7 +349,7 @@ export class EnsApiClient {
342349 * @returns {EnsApiIndexingStatusResponse }
343350 *
344351 * @throws if the ENSApi request fails
345- * @throws if the ENSApi returns an error response
352+ * @throws if the ENSApi returns a non-ok response
346353 * @throws if the ENSApi response breaks required invariants
347354 */
348355 async indexingStatus ( ) : Promise < EnsApiIndexingStatusResponse > {
@@ -366,9 +373,7 @@ export class EnsApiClient {
366373 try {
367374 errorResponse = deserializeErrorResponse ( responseData ) ;
368375 } catch {
369- // if errorResponse could not be determined,
370- // it means the response includes indexing status data
371- console . log ( "Indexing Status API: handling a known indexing status server error." ) ;
376+ // No-op: allow subsequent deserialization of indexing status response.
372377 }
373378
374379 // however, if errorResponse was defined,
0 commit comments