@daocloud-proto/hydra 0.16.0-dev-19 → 0.16.0-dev-22
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.
|
@@ -167,6 +167,10 @@ export type ListModelServingsByModelResponse = {
|
|
|
167
167
|
items?: WorkspaceModelServingGroup[]
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
+
export type SortModelsRequest = {
|
|
171
|
+
modelIds?: string[]
|
|
172
|
+
}
|
|
173
|
+
|
|
170
174
|
export class AdminModelManagement {
|
|
171
175
|
static CreateModel(req: CreateModelRequest, initReq?: fm.InitReq): Promise<Model> {
|
|
172
176
|
return fm.fetchReq<CreateModelRequest, Model>(`/apis/admin.hydra.io/v1alpha1/models`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
@@ -204,6 +208,9 @@ export class AdminModelManagement {
|
|
|
204
208
|
static ListModelServingsByModel(req: ListModelServingsByModelRequest, initReq?: fm.InitReq): Promise<ListModelServingsByModelResponse> {
|
|
205
209
|
return fm.fetchReq<ListModelServingsByModelRequest, ListModelServingsByModelResponse>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/servings?${fm.renderURLSearchParams(req, ["modelId"])}`, {...initReq, method: "GET"})
|
|
206
210
|
}
|
|
211
|
+
static SortModels(req: SortModelsRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
212
|
+
return fm.fetchReq<SortModelsRequest, GoogleProtobufEmpty.Empty>(`/apis/admin.hydra.io/v1alpha1/models:sort`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
213
|
+
}
|
|
207
214
|
}
|
|
208
215
|
export class AdminModelTemplateManagement {
|
|
209
216
|
static CreateModelTemplate(req: HydraManagement_apiModelV1alpha1Model.CreateModelTemplateRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiModelV1alpha1Model.ModelTemplate> {
|
|
@@ -112,6 +112,10 @@ export type DeleteAPIKeyRequest = {
|
|
|
112
112
|
id?: string
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
export type GetAPIKeySecretRequest = {
|
|
116
|
+
id?: string
|
|
117
|
+
}
|
|
118
|
+
|
|
115
119
|
export type CheckAPIKeyCreationRequest = {
|
|
116
120
|
}
|
|
117
121
|
|
|
@@ -167,6 +171,12 @@ export class APIKeyManagement {
|
|
|
167
171
|
static ListAPIKey(req: ListAPIKeyRequest, initReq?: fm.InitReq): Promise<ListAPIKeyResponse> {
|
|
168
172
|
return fm.fetchReq<ListAPIKeyRequest, ListAPIKeyResponse>(`/apis/hydra.io/v1alpha1/apikeys?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
169
173
|
}
|
|
174
|
+
static ListAPIKeyMasked(req: ListAPIKeyRequest, initReq?: fm.InitReq): Promise<ListAPIKeyResponse> {
|
|
175
|
+
return fm.fetchReq<ListAPIKeyRequest, ListAPIKeyResponse>(`/apis/hydra.io/v1alpha1/masked-apikeys?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
176
|
+
}
|
|
177
|
+
static GetAPIKeySecret(req: GetAPIKeySecretRequest, initReq?: fm.InitReq): Promise<APIKeySecret> {
|
|
178
|
+
return fm.fetchReq<GetAPIKeySecretRequest, APIKeySecret>(`/apis/hydra.io/v1alpha1/apikeys/${req["id"]}/secret?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
179
|
+
}
|
|
170
180
|
static DeleteAPIKey(req: DeleteAPIKeyRequest, initReq?: fm.InitReq): Promise<APIKey> {
|
|
171
181
|
return fm.fetchReq<DeleteAPIKeyRequest, APIKey>(`/apis/hydra.io/v1alpha1/apikeys/${req["id"]}`, {...initReq, method: "DELETE", body: JSON.stringify(req, fm.replacer)})
|
|
172
182
|
}
|