@daocloud-proto/hydra 0.18.0-dev-19 → 0.18.0-dev-20
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.
|
@@ -299,6 +299,17 @@ export type ListModelUsageResponse = {
|
|
|
299
299
|
page?: HydraCommonCommon.Pagination
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
+
export type CheckModelUsageAvailabilityRequest = {
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export type WSCheckModelUsageAvailabilityRequest = {
|
|
306
|
+
workspace?: number
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export type CheckModelUsageAvailabilityResponse = {
|
|
310
|
+
available?: boolean
|
|
311
|
+
}
|
|
312
|
+
|
|
302
313
|
export type APIKeyUsageWarning = {
|
|
303
314
|
code?: string
|
|
304
315
|
message?: string
|
|
@@ -366,6 +377,9 @@ export class APIKeyManagement {
|
|
|
366
377
|
static ExportModelUsage(req: ExportModelUsageRequest, initReq?: fm.InitReq): Promise<Response> {
|
|
367
378
|
return fm.fetchRawReq(`/apis/hydra.io/v1alpha1/model-usage/export?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
368
379
|
}
|
|
380
|
+
static CheckModelUsageAvailability(req: CheckModelUsageAvailabilityRequest, initReq?: fm.InitReq): Promise<CheckModelUsageAvailabilityResponse> {
|
|
381
|
+
return fm.fetchReq<CheckModelUsageAvailabilityRequest, CheckModelUsageAvailabilityResponse>(`/apis/hydra.io/v1alpha1/model-usage/availability?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
382
|
+
}
|
|
369
383
|
static CheckAPIKeyCreation(req: CheckAPIKeyCreationRequest, initReq?: fm.InitReq): Promise<CheckAPIKeyCreationResponse> {
|
|
370
384
|
return fm.fetchReq<CheckAPIKeyCreationRequest, CheckAPIKeyCreationResponse>(`/apis/hydra.io/v1alpha1/apikeys/check-creation`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
371
385
|
}
|
|
@@ -416,4 +430,7 @@ export class WSAPIKeyManagement {
|
|
|
416
430
|
static ExportModelUsage(req: WSExportModelUsageRequest, initReq?: fm.InitReq): Promise<Response> {
|
|
417
431
|
return fm.fetchRawReq(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/model-usage/export?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
418
432
|
}
|
|
433
|
+
static CheckModelUsageAvailability(req: WSCheckModelUsageAvailabilityRequest, initReq?: fm.InitReq): Promise<CheckModelUsageAvailabilityResponse> {
|
|
434
|
+
return fm.fetchReq<WSCheckModelUsageAvailabilityRequest, CheckModelUsageAvailabilityResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/model-usage/availability?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
435
|
+
}
|
|
419
436
|
}
|