diff --git a/src/api-keys/api-keys.ts b/src/api-keys/api-keys.ts index c60dd93a..a9885d7e 100644 --- a/src/api-keys/api-keys.ts +++ b/src/api-keys/api-keys.ts @@ -4,6 +4,7 @@ import { CreateApiKeyOptions, CreateApiKeyRequestOptions, CreateApiKeyResponse, + ListApiKeysResponse, } from './interfaces'; export class ApiKeys { @@ -21,7 +22,7 @@ export class ApiKeys { return data; } - async list(): Promise { + async list(): Promise { const { data } = await this.resend.get('/api-keys'); return data; } diff --git a/src/api-keys/interfaces/index.ts b/src/api-keys/interfaces/index.ts index 83c87db3..d03ea05a 100644 --- a/src/api-keys/interfaces/index.ts +++ b/src/api-keys/interfaces/index.ts @@ -1 +1,2 @@ export * from './create-api-key-options.interface'; +export * from './list-api-keys.interface'; diff --git a/src/api-keys/interfaces/list-api-keys.interface.ts b/src/api-keys/interfaces/list-api-keys.interface.ts new file mode 100644 index 00000000..d8b17c7b --- /dev/null +++ b/src/api-keys/interfaces/list-api-keys.interface.ts @@ -0,0 +1,5 @@ +export type ListApiKeysResponse = { + name: string; + id: string; + created_at: string; +}[];