@daocloud-proto/hydra 0.17.0-rc1-dev-25 → 0.18.0-dev-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -44,6 +44,7 @@ export enum APIKeyUsageQueryStatus {
44
44
  workspace?: number
45
45
  quota?: string
46
46
  unlimitedQuota?: boolean
47
+ allowModels?: string[]
47
48
  }
48
49
 
49
50
  export type CreateWSAPIKeyRequest = BaseCreateWSAPIKeyRequest
@@ -53,6 +54,7 @@ export type CreateWSAPIKeyRequest = BaseCreateWSAPIKeyRequest
53
54
 
54
55
  /* hydra modified */ export type BaseCreateAPIKeyRequest = {
55
56
  name?: string
57
+ allowModels?: string[]
56
58
  }
57
59
 
58
60
  export type CreateAPIKeyRequest = BaseCreateAPIKeyRequest
@@ -151,6 +153,17 @@ export type UpdateAPIKeyStatusRequest = {
151
153
  disabled?: boolean
152
154
  }
153
155
 
156
+ export type UpdateAPIKeyRequest = {
157
+ id?: string
158
+ allowModels?: string[]
159
+ }
160
+
161
+ export type UpdateWSAPIKeyRequest = {
162
+ id?: string
163
+ workspace?: number
164
+ allowModels?: string[]
165
+ }
166
+
154
167
  export type RegenerateAPIKeyRequest = {
155
168
  id?: string
156
169
  }
@@ -251,6 +264,9 @@ export class APIKeyManagement {
251
264
  static UpdateAPIKeyStatus(req: UpdateAPIKeyStatusRequest, initReq?: fm.InitReq): Promise<APIKey> {
252
265
  return fm.fetchReq<UpdateAPIKeyStatusRequest, APIKey>(`/apis/hydra.io/v1alpha1/apikeys/${req["id"]}/status`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
253
266
  }
267
+ static UpdateAPIKey(req: UpdateAPIKeyRequest, initReq?: fm.InitReq): Promise<APIKey> {
268
+ return fm.fetchReq<UpdateAPIKeyRequest, APIKey>(`/apis/hydra.io/v1alpha1/apikeys/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
269
+ }
254
270
  static RegenerateAPIKey(req: RegenerateAPIKeyRequest, initReq?: fm.InitReq): Promise<APIKeySecret> {
255
271
  return fm.fetchReq<RegenerateAPIKeyRequest, APIKeySecret>(`/apis/hydra.io/v1alpha1/apikeys/${req["id"]}/regenerate`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
256
272
  }
@@ -289,6 +305,9 @@ export class WSAPIKeyManagement {
289
305
  static UpdateWSAPIKeyQuota(req: UpdateWSAPIKeyQuotaRequest, initReq?: fm.InitReq): Promise<APIKey> {
290
306
  return fm.fetchReq<UpdateWSAPIKeyQuotaRequest, APIKey>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/apikeys/${req["id"]}/quota`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
291
307
  }
308
+ static UpdateWSAPIKey(req: UpdateWSAPIKeyRequest, initReq?: fm.InitReq): Promise<APIKey> {
309
+ return fm.fetchReq<UpdateWSAPIKeyRequest, APIKey>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/apikeys/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
310
+ }
292
311
  static RegenerateWSAPIKey(req: RegenerateWSAPIKeyRequest, initReq?: fm.InitReq): Promise<APIKeySecret> {
293
312
  return fm.fetchReq<RegenerateWSAPIKeyRequest, APIKeySecret>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/apikeys/${req["id"]}/regenerate`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
294
313
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/hydra",
3
- "version": "v0.17.0-rc1-dev-25",
3
+ "version": "v0.18.0-dev-1",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"