Skip to content

Commit

Permalink
fix: List API keys returning types (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
bukinoshita authored Jun 16, 2023
1 parent 777a5cd commit beb864e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/api-keys/api-keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
CreateApiKeyOptions,
CreateApiKeyRequestOptions,
CreateApiKeyResponse,
ListApiKeysResponse,
} from './interfaces';

export class ApiKeys {
Expand All @@ -21,7 +22,7 @@ export class ApiKeys {
return data;
}

async list(): Promise<void> {
async list(): Promise<ListApiKeysResponse> {
const { data } = await this.resend.get<AxiosResponse>('/api-keys');
return data;
}
Expand Down
1 change: 1 addition & 0 deletions src/api-keys/interfaces/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './create-api-key-options.interface';
export * from './list-api-keys.interface';
5 changes: 5 additions & 0 deletions src/api-keys/interfaces/list-api-keys.interface.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export type ListApiKeysResponse = {
name: string;
id: string;
created_at: string;
}[];

0 comments on commit beb864e

Please sign in to comment.