feat: configure key model access after creation
This commit is contained in:
1 parent
6de29ebd6d
commit
7f35960ba6
8 files changed
+175
-23
No files matched your search
@@ -155,6 +155,13 @@ class HttpCatalogClient {
|
||||
return this.request<CreatedCatalogKey>('/api/keys', { method: 'POST', body: JSON.stringify(input) })
|
||||
}
|
||||
|
||||
async updateKeyModels(id: string, modelIds: string[]) {
|
||||
return this.request<{ apiKey: CatalogApiKey }>(`/api/keys/${encodeURIComponent(id)}/models`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ modelIds }),
|
||||
})
|
||||
}
|
||||
|
||||
async revokeKey(id: string) {
|
||||
await this.request(`/api/keys/${encodeURIComponent(id)}/revoke`, { method: 'POST' })
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user