diff --git a/src/apis/apiKeys.ts b/src/apis/apiKeys.ts index 163d034..e308849 100644 --- a/src/apis/apiKeys.ts +++ b/src/apis/apiKeys.ts @@ -15,33 +15,14 @@ export interface ApiKeysAddParams { scopes: string[]; defaults?: Record; } - -export interface ApiKeysGetParams { - id?: string; -} - -export interface ApiKeysUpdateParams { - id?: string; - name?: string; - description?: string; - rate_limits?: Record[]; - usage_limits?: Record; - scopes?: string[]; - defaults?: Record; -} -export interface ApiKeysListParams { - page_size?: number; - current_page?: number; - workspace_id?: string; -} -export interface ApiKeysDeleteParams { - id?: string; -} export interface ApiKeysAddResponse extends APIResponseType { id?: string; key?: string; object?: string; } +export interface ApiKeysGetParams { + id?: string; +} export interface ApiKeysGetResponse extends APIResponseType { id?: string; key?: string; @@ -62,16 +43,34 @@ export interface ApiKeysGetResponse extends APIResponseType { defaults?: Record; object?: string; } -export interface ApiKeysListResponse extends APIResponseType { - total?: number; - object?: string; - data?: Record[]; +export interface ApiKeysUpdateParams { + id?: string; + name?: string; + description?: string; + rate_limits?: Record[]; + usage_limits?: Record; + scopes?: string[]; + defaults?: Record; } export interface ApiKeysUpdateResponse extends APIResponseType { object?: string; total?:number; data?: Record[]; } +export interface ApiKeysListParams { + page_size?: number; + current_page?: number; + workspace_id?: string; +} +export interface ApiKeysListResponse extends APIResponseType { + total?: number; + object?: string; + data?: Record[]; +} +export interface ApiKeysDeleteParams { + id?: string; +} + function toQueryParams(params?: ApiKeysListParams): string { if (!params) { return '';