diff --git a/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts b/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts index bacf4ac5..af3bc962 100644 --- a/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts +++ b/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts @@ -3,14 +3,15 @@ import { IsSubnameAvailableRequest, IsSubnameAvailableResponse, SIWEHeaders, - SubnameAcceptRequest, SubnameAcceptResponse, + SubnameAcceptRequest, + SubnameAcceptResponse, SubnameAddRequest, SubnameAddResponse, - SubnameGetAllByAddressRequest, SubnameGetAllByAddressResponse, - SubnameGetAllByDomainChainIdRequest, - SubnameGetAllByDomainChainIdResponse, SubnameGetByDomainNameChainIdRequest, + SubnameGetAllByDomainChainIdRequest, + SubnameGetAllByDomainChainIdResponse, + SubnameGetByDomainNameChainIdRequest, SubnameGetByDomainNameChainIdResponse, SubnameGetBySubnameRequest, SubnameGetBySubnameResponse, @@ -18,10 +19,10 @@ import { SubnameReserveResponse, SubnameRevokeRequest, SubnameRevokeResponse, - SubnameSearchRequest, - SubnameSearchResponse, SubnameUpdateRequest, - SubnameUpdateResponse -, + SubnameSearchRequest, + SubnameSearchResponse, + SubnameUpdateRequest, + SubnameUpdateResponse, } from '../../types'; /** @@ -58,7 +59,6 @@ export class Subnames { this.apiKey = apiKey; } - /** * Accept a subname invite under a specific domain, associating it with an Ethereum address. * This operation requires an API key. @@ -211,7 +211,7 @@ export class Subnames { async searchSubnames( params: SubnameSearchRequest - ): Promise { + ): Promise { return restCall('SEARCH_SUBNAMES_ROUTE', 'GET', params); } diff --git a/packages/@justaname.id/sdk/src/lib/types/subnames/search-subnames.ts b/packages/@justaname.id/sdk/src/lib/types/subnames/search-subnames.ts index 362dfc40..cb6dd60d 100644 --- a/packages/@justaname.id/sdk/src/lib/types/subnames/search-subnames.ts +++ b/packages/@justaname.id/sdk/src/lib/types/subnames/search-subnames.ts @@ -49,6 +49,11 @@ export interface SubnameSearchRequest extends IRequest { } export interface SubnameSearchResponse extends IResponse { + domains: SubnameSearchDomainResponse[] | string[]; + registered?: boolean; +} + +export interface SubnameSearchDomainResponse { id: string; username: string; @@ -66,6 +71,6 @@ export interface SubnameSearchResponse extends IResponse { export interface SubnameSearchRoute extends IRoute { request: SubnameSearchRequest; - response: SubnameSearchResponse[]; + response: SubnameSearchResponse; headers: NonNullable; }