@daocloud-proto/hydra 0.17.0-rc1-dev-2 → 0.17.0-rc1-dev-5
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.
|
@@ -8,6 +8,7 @@ import * as HydraCommonCommon from "../../../common/common.pb"
|
|
|
8
8
|
import * as fm from "../../../fetch.pb"
|
|
9
9
|
import * as GoogleProtobufEmpty from "../../../google/protobuf/empty.pb"
|
|
10
10
|
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
11
|
+
import * as HydraManagement_apiModelV1alpha1Model from "../../../management-api/model/v1alpha1/model.pb"
|
|
11
12
|
|
|
12
13
|
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
13
14
|
type OneOf<T> =
|
|
@@ -282,6 +283,8 @@ export type ListRouterModelsResponse = {
|
|
|
282
283
|
export type ModelServing = {
|
|
283
284
|
name?: string
|
|
284
285
|
accessModelName?: string
|
|
286
|
+
modelAvatar?: string
|
|
287
|
+
modelSupportFeature?: HydraManagement_apiModelV1alpha1Model.ModelSupportFeature[]
|
|
285
288
|
}
|
|
286
289
|
|
|
287
290
|
export type ListModelServingsRequest = {
|
|
@@ -324,7 +327,7 @@ export class AutoRouteManagement {
|
|
|
324
327
|
return fm.fetchReq<UpdateAutoRouteStatusRequest, AutoRoute>(`/apis/admin.hydra.io/v1alpha1/auto-routes/${req["cluster"]}/status`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
325
328
|
}
|
|
326
329
|
static DeleteAutoRoute(req: DeleteAutoRouteRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
327
|
-
return fm.fetchReq<DeleteAutoRouteRequest, GoogleProtobufEmpty.Empty>(`/apis/admin.hydra.io/v1alpha1/auto-routes/${req["cluster"]}`, {...initReq, method: "DELETE"})
|
|
330
|
+
return fm.fetchReq<DeleteAutoRouteRequest, GoogleProtobufEmpty.Empty>(`/apis/admin.hydra.io/v1alpha1/auto-routes/${req["cluster"]}`, {...initReq, method: "DELETE", body: JSON.stringify(req, fm.replacer)})
|
|
328
331
|
}
|
|
329
332
|
static ListRouterModels(req: ListRouterModelsRequest, initReq?: fm.InitReq): Promise<ListRouterModelsResponse> {
|
|
330
333
|
return fm.fetchReq<ListRouterModelsRequest, ListRouterModelsResponse>(`/apis/admin.hydra.io/v1alpha1/auto-route-models?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -108,6 +108,31 @@ export type UpdateWSAPIKeyStatusRequest = {
|
|
|
108
108
|
disabled?: boolean
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
+
export type UpdateAPIKeyStatusRequest = {
|
|
112
|
+
id?: string
|
|
113
|
+
disabled?: boolean
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export type RegenerateAPIKeyRequest = {
|
|
117
|
+
id?: string
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export type RegenerateWSAPIKeyRequest = {
|
|
121
|
+
id?: string
|
|
122
|
+
workspace?: number
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export type RevealAPIKeySecretRequest = {
|
|
126
|
+
id?: string
|
|
127
|
+
password?: string
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export type RevealWSAPIKeySecretRequest = {
|
|
131
|
+
id?: string
|
|
132
|
+
workspace?: number
|
|
133
|
+
password?: string
|
|
134
|
+
}
|
|
135
|
+
|
|
111
136
|
export type DeleteAPIKeyRequest = {
|
|
112
137
|
id?: string
|
|
113
138
|
}
|
|
@@ -180,6 +205,15 @@ export class APIKeyManagement {
|
|
|
180
205
|
static DeleteAPIKey(req: DeleteAPIKeyRequest, initReq?: fm.InitReq): Promise<APIKey> {
|
|
181
206
|
return fm.fetchReq<DeleteAPIKeyRequest, APIKey>(`/apis/hydra.io/v1alpha1/apikeys/${req["id"]}`, {...initReq, method: "DELETE", body: JSON.stringify(req, fm.replacer)})
|
|
182
207
|
}
|
|
208
|
+
static UpdateAPIKeyStatus(req: UpdateAPIKeyStatusRequest, initReq?: fm.InitReq): Promise<APIKey> {
|
|
209
|
+
return fm.fetchReq<UpdateAPIKeyStatusRequest, APIKey>(`/apis/hydra.io/v1alpha1/apikeys/${req["id"]}/status`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
210
|
+
}
|
|
211
|
+
static RegenerateAPIKey(req: RegenerateAPIKeyRequest, initReq?: fm.InitReq): Promise<APIKeySecret> {
|
|
212
|
+
return fm.fetchReq<RegenerateAPIKeyRequest, APIKeySecret>(`/apis/hydra.io/v1alpha1/apikeys/${req["id"]}/regenerate`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
213
|
+
}
|
|
214
|
+
static RevealAPIKeySecret(req: RevealAPIKeySecretRequest, initReq?: fm.InitReq): Promise<APIKeySecret> {
|
|
215
|
+
return fm.fetchReq<RevealAPIKeySecretRequest, APIKeySecret>(`/apis/hydra.io/v1alpha1/apikeys/${req["id"]}/reveal-secret`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
216
|
+
}
|
|
183
217
|
static GetAPIKeyUsageStatistics(req: APIKeyUsageStatisticsRequest, initReq?: fm.InitReq): Promise<APIKeyUsageStatisticsResponse> {
|
|
184
218
|
return fm.fetchReq<APIKeyUsageStatisticsRequest, APIKeyUsageStatisticsResponse>(`/apis/hydra.io/v1alpha1/apikeys-stats`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
185
219
|
}
|
|
@@ -212,6 +246,12 @@ export class WSAPIKeyManagement {
|
|
|
212
246
|
static UpdateWSAPIKeyQuota(req: UpdateWSAPIKeyQuotaRequest, initReq?: fm.InitReq): Promise<APIKey> {
|
|
213
247
|
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)})
|
|
214
248
|
}
|
|
249
|
+
static RegenerateWSAPIKey(req: RegenerateWSAPIKeyRequest, initReq?: fm.InitReq): Promise<APIKeySecret> {
|
|
250
|
+
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)})
|
|
251
|
+
}
|
|
252
|
+
static RevealWSAPIKeySecret(req: RevealWSAPIKeySecretRequest, initReq?: fm.InitReq): Promise<APIKeySecret> {
|
|
253
|
+
return fm.fetchReq<RevealWSAPIKeySecretRequest, APIKeySecret>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/apikeys/${req["id"]}/reveal-secret`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
254
|
+
}
|
|
215
255
|
static GetAPIKeyUsageStatistics(req: WSAPIKeyUsageStatisticsRequest, initReq?: fm.InitReq): Promise<APIKeyUsageStatisticsResponse> {
|
|
216
256
|
return fm.fetchReq<WSAPIKeyUsageStatisticsRequest, APIKeyUsageStatisticsResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/apikeys-stats`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
217
257
|
}
|