( name: string = 'My API Key', configType: 'antigravity' | 'kiro' = 'antigravity' )
| 802 | * 生成新的 API Key |
| 803 | */ |
| 804 | export async function generateAPIKey( |
| 805 | name: string = 'My API Key', |
| 806 | configType: 'antigravity' | 'kiro' = 'antigravity' |
| 807 | ): Promise<CreateAPIKeyResponse> { |
| 808 | return fetchWithAuth<CreateAPIKeyResponse>( |
| 809 | `${API_BASE_URL}/api/api-keys`, |
| 810 | { |
| 811 | method: 'POST', |
| 812 | body: JSON.stringify({ name, config_type: configType }), |
| 813 | } |
| 814 | ); |
| 815 | } |
| 816 | |
| 817 | /** |
| 818 | * 删除指定的 API Key |
no test coverage detected