@daocloud-proto/hydra 0.18.0-dev-19 → 0.18.0-dev-21

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.
@@ -92,6 +92,8 @@ export type APIKey = {
92
92
  quotaLimitedModels?: string[]
93
93
  allowedIps?: string[]
94
94
  blockedIps?: string[]
95
+ accountId?: string
96
+ subaccountId?: string
95
97
  }
96
98
 
97
99
  export type AllAPIKeyStatus = {
@@ -299,6 +301,17 @@ export type ListModelUsageResponse = {
299
301
  page?: HydraCommonCommon.Pagination
300
302
  }
301
303
 
304
+ export type CheckModelUsageAvailabilityRequest = {
305
+ }
306
+
307
+ export type WSCheckModelUsageAvailabilityRequest = {
308
+ workspace?: number
309
+ }
310
+
311
+ export type CheckModelUsageAvailabilityResponse = {
312
+ available?: boolean
313
+ }
314
+
302
315
  export type APIKeyUsageWarning = {
303
316
  code?: string
304
317
  message?: string
@@ -366,6 +379,9 @@ export class APIKeyManagement {
366
379
  static ExportModelUsage(req: ExportModelUsageRequest, initReq?: fm.InitReq): Promise<Response> {
367
380
  return fm.fetchRawReq(`/apis/hydra.io/v1alpha1/model-usage/export?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
368
381
  }
382
+ static CheckModelUsageAvailability(req: CheckModelUsageAvailabilityRequest, initReq?: fm.InitReq): Promise<CheckModelUsageAvailabilityResponse> {
383
+ return fm.fetchReq<CheckModelUsageAvailabilityRequest, CheckModelUsageAvailabilityResponse>(`/apis/hydra.io/v1alpha1/model-usage/availability?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
384
+ }
369
385
  static CheckAPIKeyCreation(req: CheckAPIKeyCreationRequest, initReq?: fm.InitReq): Promise<CheckAPIKeyCreationResponse> {
370
386
  return fm.fetchReq<CheckAPIKeyCreationRequest, CheckAPIKeyCreationResponse>(`/apis/hydra.io/v1alpha1/apikeys/check-creation`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
371
387
  }
@@ -416,4 +432,7 @@ export class WSAPIKeyManagement {
416
432
  static ExportModelUsage(req: WSExportModelUsageRequest, initReq?: fm.InitReq): Promise<Response> {
417
433
  return fm.fetchRawReq(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/model-usage/export?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
418
434
  }
435
+ static CheckModelUsageAvailability(req: WSCheckModelUsageAvailabilityRequest, initReq?: fm.InitReq): Promise<CheckModelUsageAvailabilityResponse> {
436
+ return fm.fetchReq<WSCheckModelUsageAvailabilityRequest, CheckModelUsageAvailabilityResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/model-usage/availability?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
437
+ }
419
438
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/hydra",
3
- "version": "v0.18.0-dev-19",
3
+ "version": "v0.18.0-dev-21",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"