feat: add ICANN-list tab

This commit is contained in:
Maël Gangloff
2025-09-14 17:59:26 +02:00
parent 7c10f4bd3c
commit ac264d9a13
7 changed files with 416 additions and 142 deletions

View File

@@ -0,0 +1,14 @@
import type {IcannAccreditation, Tld} from './index'
import {request} from './index'
interface IcannAccreditationList {
'hydra:totalItems': number
'hydra:member': IcannAccreditation[]
}
export async function getIcannAccreditations(params: object): Promise<IcannAccreditationList> {
return (await request<IcannAccreditationList>({
url: 'entities/icann-accreditations',
params
})).data
}

View File

@@ -124,6 +124,16 @@ export interface TrackedDomains {
'hydra:member': Domain[]
}
export interface IcannAccreditation {
handle: string
icannAccreditation: {
registrarName: string
status: string
date?: string
updated?: string
}
}
export async function request<T = object, R = AxiosResponse<T>, D = object>(config: AxiosRequestConfig): Promise<R> {
const axiosConfig: AxiosRequestConfig = {
...config,