@daocloud-proto/hydra 0.0.0-dev-65873840

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.
Files changed (29) hide show
  1. package/admin-api/core/v1alpha1/core.pb.ts +32 -0
  2. package/admin-api/maas/v1alpha1/maas.pb.ts +131 -0
  3. package/admin-api/model/v1alpha1/model.pb.ts +190 -0
  4. package/admin-api/model/v1alpha1/model_weights_volume.pb.ts +96 -0
  5. package/admin-api/model/v1alpha1/provider.pb.ts +59 -0
  6. package/admin-api/storage/v1alpha1/filesstorage.pb.ts +261 -0
  7. package/common/common.pb.ts +159 -0
  8. package/common/error.pb.ts +10 -0
  9. package/common/errorcode.ts +48 -0
  10. package/fetch.pb.ts +341 -0
  11. package/management-api/agent/v1alpha1/event.pb.ts +75 -0
  12. package/management-api/agent/v1alpha1/server_registration.pb.ts +33 -0
  13. package/management-api/agent/v1alpha1/sftp_user.pb.ts +39 -0
  14. package/management-api/apikey/v1alpha1/apikey.pb.ts +135 -0
  15. package/management-api/core/v1alpha1/image.pb.ts +174 -0
  16. package/management-api/core/v1alpha1/management.pb.ts +55 -0
  17. package/management-api/core/v1alpha1/permissions.pb.ts +30 -0
  18. package/management-api/event/v1alpha1/event.pb.ts +38 -0
  19. package/management-api/model/v1alpha1/model.pb.ts +275 -0
  20. package/management-api/model/v1alpha1/model_weights_volume.pb.ts +101 -0
  21. package/management-api/model/v1alpha1/provider.pb.ts +68 -0
  22. package/management-api/model_serving/v1alpha1/model_serving.pb.ts +317 -0
  23. package/management-api/product/v1alpha1/product.pb.ts +77 -0
  24. package/management-api/queue/v1alpha1/queue.pb.ts +121 -0
  25. package/management-api/storage/v1alpha1/filesstorage.pb.ts +495 -0
  26. package/management-api/user/v1alpha1/user.pb.ts +24 -0
  27. package/management-api/web_search_agent/v1alpha1/agent.pb.ts +19 -0
  28. package/management-api/workspace/v1alpha1/workspace.pb.ts +82 -0
  29. package/package.json +7 -0
@@ -0,0 +1,174 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as HydraCommonCommon from "../../../common/common.pb"
8
+ import * as fm from "../../../fetch.pb"
9
+ import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
10
+
11
+ export enum RegistryType {
12
+ REGISTRY_TYPE_UNSPECIFIED = "REGISTRY_TYPE_UNSPECIFIED",
13
+ REGISTRY_TYPE_HARBOR = "REGISTRY_TYPE_HARBOR",
14
+ REGISTRY_TYPE_DOCKER = "REGISTRY_TYPE_DOCKER",
15
+ REGISTRY_TYPE_JFROG = "REGISTRY_TYPE_JFROG",
16
+ }
17
+
18
+ export enum Scope {
19
+ SCOPE_UNKNOWN = "SCOPE_UNKNOWN",
20
+ SCOPE_GLOBAL = "SCOPE_GLOBAL",
21
+ SCOPE_WORKSPACE = "SCOPE_WORKSPACE",
22
+ }
23
+
24
+ export enum Visibility {
25
+ VISIBLE_UNKNOWN = "VISIBLE_UNKNOWN",
26
+ VISIBLE_PUBLIC = "VISIBLE_PUBLIC",
27
+ VISIBLE_PRIVATE = "VISIBLE_PRIVATE",
28
+ }
29
+
30
+ export type ListRegistriesRequest = {
31
+ workspace?: number
32
+ global?: boolean
33
+ page?: HydraCommonCommon.Pagination
34
+ }
35
+
36
+ export type Registry = {
37
+ host?: string
38
+ name?: string
39
+ type?: RegistryType
40
+ scope?: Scope
41
+ }
42
+
43
+ export type ListRegistriesResponse = {
44
+ items?: Registry[]
45
+ page?: HydraCommonCommon.Pagination
46
+ }
47
+
48
+ export type ListProjectsRequest = {
49
+ workspace?: number
50
+ registry?: string
51
+ public?: boolean
52
+ page?: HydraCommonCommon.Pagination
53
+ onlyBind?: boolean
54
+ all?: boolean
55
+ }
56
+
57
+ export type Project = {
58
+ name?: string
59
+ visible?: Visibility
60
+ }
61
+
62
+ export type ListProjectsResponse = {
63
+ items?: Project[]
64
+ page?: HydraCommonCommon.Pagination
65
+ }
66
+
67
+ export type ListRepositoriesRequest = {
68
+ workspace?: number
69
+ registry?: string
70
+ project?: string
71
+ page?: HydraCommonCommon.Pagination
72
+ }
73
+
74
+ export type Tag = {
75
+ name?: string
76
+ creationTimestamp?: GoogleProtobufTimestamp.Timestamp
77
+ }
78
+
79
+ export type Repository = {
80
+ name?: string
81
+ updateTimestamp?: GoogleProtobufTimestamp.Timestamp
82
+ }
83
+
84
+ export type ListRepositoriesResponse = {
85
+ items?: Repository[]
86
+ page?: HydraCommonCommon.Pagination
87
+ }
88
+
89
+ export type ListArtifactsRequest = {
90
+ workspace?: number
91
+ registry?: string
92
+ project?: string
93
+ repository?: string
94
+ page?: HydraCommonCommon.Pagination
95
+ }
96
+
97
+ export type Artifact = {
98
+ digest?: string
99
+ tags?: Tag[]
100
+ imageSize?: string
101
+ creationTimestamp?: GoogleProtobufTimestamp.Timestamp
102
+ }
103
+
104
+ export type ListArtifactsResponse = {
105
+ items?: Artifact[]
106
+ page?: HydraCommonCommon.Pagination
107
+ }
108
+
109
+ export type GetImageInfoRequest = {
110
+ workspace?: number
111
+ image?: string
112
+ }
113
+
114
+ export type ImageInfo = {
115
+ registry?: string
116
+ project?: string
117
+ image?: string
118
+ tag?: string
119
+ public?: boolean
120
+ global?: boolean
121
+ }
122
+
123
+ export type GetImageInfoResponse = {
124
+ origin?: string
125
+ info?: ImageInfo
126
+ }
127
+
128
+ export type ListSecretsRequest = {
129
+ cluster?: string
130
+ namespace?: string
131
+ type?: string
132
+ }
133
+
134
+ export type Secret = {
135
+ name?: string
136
+ namespace?: string
137
+ cluster?: string
138
+ type?: string
139
+ }
140
+
141
+ export type ListSecretsResponse = {
142
+ items?: Secret[]
143
+ }
144
+
145
+ export type DetectKangarooRequest = {
146
+ }
147
+
148
+ export type DetectKangarooResponse = {
149
+ enabled?: boolean
150
+ }
151
+
152
+ export class Image {
153
+ static ListRegistries(req: ListRegistriesRequest, initReq?: fm.InitReq): Promise<ListRegistriesResponse> {
154
+ return fm.fetchReq<ListRegistriesRequest, ListRegistriesResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/registries?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
155
+ }
156
+ static ListProjects(req: ListProjectsRequest, initReq?: fm.InitReq): Promise<ListProjectsResponse> {
157
+ return fm.fetchReq<ListProjectsRequest, ListProjectsResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/projects?${fm.renderURLSearchParams(req, ["workspace", "registry"])}`, {...initReq, method: "GET"})
158
+ }
159
+ static ListRepositories(req: ListRepositoriesRequest, initReq?: fm.InitReq): Promise<ListRepositoriesResponse> {
160
+ return fm.fetchReq<ListRepositoriesRequest, ListRepositoriesResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/repositories?${fm.renderURLSearchParams(req, ["workspace", "registry"])}`, {...initReq, method: "GET"})
161
+ }
162
+ static ListArtifacts(req: ListArtifactsRequest, initReq?: fm.InitReq): Promise<ListArtifactsResponse> {
163
+ return fm.fetchReq<ListArtifactsRequest, ListArtifactsResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/repositories/${req["repository"]}/artifacts?${fm.renderURLSearchParams(req, ["workspace", "registry", "repository"])}`, {...initReq, method: "GET"})
164
+ }
165
+ static ListSecrets(req: ListSecretsRequest, initReq?: fm.InitReq): Promise<ListSecretsResponse> {
166
+ return fm.fetchReq<ListSecretsRequest, ListSecretsResponse>(`/apis/hydra.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/secrets?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
167
+ }
168
+ static GetImageInfo(req: GetImageInfoRequest, initReq?: fm.InitReq): Promise<GetImageInfoResponse> {
169
+ return fm.fetchReq<GetImageInfoRequest, GetImageInfoResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/imageinfo?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
170
+ }
171
+ static DetectKangaroo(req: DetectKangarooRequest, initReq?: fm.InitReq): Promise<DetectKangarooResponse> {
172
+ return fm.fetchReq<DetectKangarooRequest, DetectKangarooResponse>(`/apis/hydra.io/v1alpha1/registries/kangaroo?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
173
+ }
174
+ }
@@ -0,0 +1,55 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as HydraCommonCommon from "../../../common/common.pb"
8
+ import * as fm from "../../../fetch.pb"
9
+ export type GetWebSearchAgentConfigRequest = {
10
+ }
11
+
12
+ export type WebSearchAgentConfig = {
13
+ address?: string
14
+ }
15
+
16
+ export type GetWebSearchAgentConfigResponse = {
17
+ config?: WebSearchAgentConfig
18
+ }
19
+
20
+ export type ListInferenceRuntimesRequest = {
21
+ }
22
+
23
+ export type ListInferenceRuntimesResponse = {
24
+ items?: InferenceRuntime[]
25
+ }
26
+
27
+ export type InferenceRuntime = {
28
+ name?: HydraCommonCommon.I18nName
29
+ runtimeCommand?: string
30
+ distributedSupported?: boolean
31
+ }
32
+
33
+ export type ListGPUTypesRequest = {
34
+ }
35
+
36
+ export type ListGPUTypesResponse = {
37
+ items?: GPUType[]
38
+ }
39
+
40
+ export type GPUType = {
41
+ gpuName?: string
42
+ gpuType?: string
43
+ }
44
+
45
+ export class Management {
46
+ static GetWebSearchAgentConfig(req: GetWebSearchAgentConfigRequest, initReq?: fm.InitReq): Promise<GetWebSearchAgentConfigResponse> {
47
+ return fm.fetchReq<GetWebSearchAgentConfigRequest, GetWebSearchAgentConfigResponse>(`/apis/hydra.io/v1alpha1/web-search-agent/config?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
48
+ }
49
+ static ListInferenceRuntimes(req: ListInferenceRuntimesRequest, initReq?: fm.InitReq): Promise<ListInferenceRuntimesResponse> {
50
+ return fm.fetchReq<ListInferenceRuntimesRequest, ListInferenceRuntimesResponse>(`/apis/hydra.io/v1alpha1/inference-runtimes?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
51
+ }
52
+ static ListGPUTypes(req: ListGPUTypesRequest, initReq?: fm.InitReq): Promise<ListGPUTypesResponse> {
53
+ return fm.fetchReq<ListGPUTypesRequest, ListGPUTypesResponse>(`/apis/hydra.io/v1alpha1/gpu-types?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
54
+ }
55
+ }
@@ -0,0 +1,30 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as fm from "../../../fetch.pb"
8
+ export type ListRolePermissionsByWorkspaceForCurrentUserRequest = {
9
+ workspace?: number
10
+ }
11
+
12
+ export type ListRolePermissionsByWorkspaceForCurrentUserResponse = {
13
+ permissions?: string[]
14
+ }
15
+
16
+ export type ListPlatformRolePermissionsForCurrentUserRequest = {
17
+ }
18
+
19
+ export type ListPlatformRolePermissionsForCurrentUserResponse = {
20
+ permissions?: string[]
21
+ }
22
+
23
+ export class Core {
24
+ static ListRolePermissionsByWorkspaceForCurrentUser(req: ListRolePermissionsByWorkspaceForCurrentUserRequest, initReq?: fm.InitReq): Promise<ListRolePermissionsByWorkspaceForCurrentUserResponse> {
25
+ return fm.fetchReq<ListRolePermissionsByWorkspaceForCurrentUserRequest, ListRolePermissionsByWorkspaceForCurrentUserResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/permissions?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
26
+ }
27
+ static ListPlatformRolePermissionsForCurrentUser(req: ListPlatformRolePermissionsForCurrentUserRequest, initReq?: fm.InitReq): Promise<ListPlatformRolePermissionsForCurrentUserResponse> {
28
+ return fm.fetchReq<ListPlatformRolePermissionsForCurrentUserRequest, ListPlatformRolePermissionsForCurrentUserResponse>(`/apis/hydra.io/v1alpha1/permissions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
29
+ }
30
+ }
@@ -0,0 +1,38 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as HydraCommonCommon from "../../../common/common.pb"
8
+ import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
9
+
10
+ export enum EventObjKind {
11
+ KIND_UNSPECIFIED = "KIND_UNSPECIFIED",
12
+ DATASET = "DATASET",
13
+ POD = "POD",
14
+ UNKNOWN = "UNKNOWN",
15
+ }
16
+
17
+ export enum EventType {
18
+ TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED",
19
+ NORMAL = "NORMAL",
20
+ WARNING = "WARNING",
21
+ }
22
+
23
+ export type Event = {
24
+ objKind?: EventObjKind
25
+ objName?: string
26
+ objNamespace?: string
27
+ type?: EventType
28
+ message?: string
29
+ reason?: string
30
+ firstTimestamp?: GoogleProtobufTimestamp.Timestamp
31
+ lastTimestamp?: GoogleProtobufTimestamp.Timestamp
32
+ count?: number
33
+ }
34
+
35
+ export type ListEventsResponse = {
36
+ items?: Event[]
37
+ page?: HydraCommonCommon.Pagination
38
+ }
@@ -0,0 +1,275 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as HydraCommonCommon from "../../../common/common.pb"
8
+ import * as fm from "../../../fetch.pb"
9
+ import * as GoogleProtobufEmpty from "../../../google/protobuf/empty.pb"
10
+ import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
11
+
12
+ export enum ModelSupportFeature {
13
+ MODEL_SUPPORT_TYPE_UNSPECIFIED = "MODEL_SUPPORT_TYPE_UNSPECIFIED",
14
+ TEXT_GENERATION = "TEXT_GENERATION",
15
+ VIDEO_TO_TEXT = "VIDEO_TO_TEXT",
16
+ TEXT_TO_VIDEO = "TEXT_TO_VIDEO",
17
+ IMAGE_TO_IMAGE = "IMAGE_TO_IMAGE",
18
+ IMAGE_TO_TEXT = "IMAGE_TO_TEXT",
19
+ TEXT_TO_IMAGE = "TEXT_TO_IMAGE",
20
+ EMBEDDING = "EMBEDDING",
21
+ RERANK_MODEL = "RERANK_MODEL",
22
+ AUDIO_TO_AUDIO = "AUDIO_TO_AUDIO",
23
+ AUDIO_TO_TEXT = "AUDIO_TO_TEXT",
24
+ TOOLS = "TOOLS",
25
+ }
26
+
27
+ export enum PublicModelConfigRateLimitLimitedBy {
28
+ LIMITED_BY_UNSPECIFIED = "LIMITED_BY_UNSPECIFIED",
29
+ USER_ID = "USER_ID",
30
+ API_KEY = "API_KEY",
31
+ }
32
+
33
+ export enum DeployTemplateInferenceRuntime {
34
+ INFERENCE_RUNTIME_UNSPECIFIED = "INFERENCE_RUNTIME_UNSPECIFIED",
35
+ VLLM = "VLLM",
36
+ SGLANG = "SGLANG",
37
+ IMAGE_GEN = "IMAGE_GEN",
38
+ }
39
+
40
+ export type ModelPrice = {
41
+ inputPerKTokens?: string
42
+ outputPerKTokens?: string
43
+ perImage?: string
44
+ }
45
+
46
+ export type Model = {
47
+ modelId?: string
48
+ modelAvatar?: string
49
+ modelName?: string
50
+ providerId?: string
51
+ providerName?: HydraCommonCommon.I18nName
52
+ modelDescription?: HydraCommonCommon.I18nName
53
+ finetune?: boolean
54
+ modelSupportFeature?: ModelSupportFeature[]
55
+ creationTimestamp?: GoogleProtobufTimestamp.Timestamp
56
+ updateTimestamp?: GoogleProtobufTimestamp.Timestamp
57
+ publicEndpointEnabled?: boolean
58
+ publicEndpointBaseUrl?: string
59
+ publicAccessModelName?: string
60
+ publicModelPrice?: ModelPrice
61
+ readme?: HydraCommonCommon.I18nName
62
+ publicModelConfig?: PublicModelConfig
63
+ modelDeploymentsExists?: boolean
64
+ visible?: string
65
+ }
66
+
67
+ export type ListModelRequest = {
68
+ page?: HydraCommonCommon.Pagination
69
+ showPublicModelPrice?: boolean
70
+ }
71
+
72
+ export type ListModelResponse = {
73
+ items?: Model[]
74
+ page?: HydraCommonCommon.Pagination
75
+ }
76
+
77
+ export type SingleModelRequest = {
78
+ modelId?: string
79
+ }
80
+
81
+ export type PublicModelConfigRateLimit = {
82
+ limitedBy?: PublicModelConfigRateLimitLimitedBy
83
+ limit?: string
84
+ duration?: string
85
+ }
86
+
87
+ export type PublicModelConfig = {
88
+ rateLimit?: PublicModelConfigRateLimit
89
+ }
90
+
91
+ export type ModelServingSpec = {
92
+ deployTemplates?: DeployTemplate[]
93
+ }
94
+
95
+ export type DeployTemplateResourcesRequirements = {
96
+ cpu?: number
97
+ memory?: number
98
+ gpuType?: string
99
+ gpuCount?: number
100
+ perGpuMemory?: number
101
+ gpuCores?: number
102
+ }
103
+
104
+ export type DeployTemplate = {
105
+ resourcesRequirements?: DeployTemplateResourcesRequirements
106
+ runtime?: DeployTemplateInferenceRuntime
107
+ versionRequired?: string
108
+ customDeployArgs?: string[]
109
+ env?: EnvVar[]
110
+ inferenceRuntime?: string
111
+ runtimeCommand?: string
112
+ templateName?: string
113
+ templateDescription?: string
114
+ }
115
+
116
+ export type EnvVar = {
117
+ name?: string
118
+ value?: string
119
+ }
120
+
121
+ export type ModelTemplate = {
122
+ templateId?: string
123
+ modelId?: string
124
+ workspace?: number
125
+ spec?: DeployTemplate
126
+ creationTimestamp?: GoogleProtobufTimestamp.Timestamp
127
+ updateTimestamp?: GoogleProtobufTimestamp.Timestamp
128
+ }
129
+
130
+ export type ListWSModelRequest = {
131
+ workspace?: number
132
+ page?: HydraCommonCommon.Pagination
133
+ }
134
+
135
+ export type ListWSModelResponse = {
136
+ items?: WSModel[]
137
+ page?: HydraCommonCommon.Pagination
138
+ }
139
+
140
+ export type SingleWSModelRequest = {
141
+ workspace?: number
142
+ modelId?: string
143
+ }
144
+
145
+ export type WSModel = {
146
+ modelId?: string
147
+ modelAvatar?: string
148
+ modelName?: string
149
+ providerId?: string
150
+ providerName?: HydraCommonCommon.I18nName
151
+ modelDescription?: HydraCommonCommon.I18nName
152
+ finetune?: boolean
153
+ modelSupportFeature?: ModelSupportFeature[]
154
+ creationTimestamp?: GoogleProtobufTimestamp.Timestamp
155
+ updateTimestamp?: GoogleProtobufTimestamp.Timestamp
156
+ publicEndpointEnabled?: boolean
157
+ publicEndpointBaseUrl?: string
158
+ publicAccessModelName?: string
159
+ readme?: HydraCommonCommon.I18nName
160
+ publicModelConfig?: PublicModelConfig
161
+ modelDeploymentsExists?: boolean
162
+ visible?: string
163
+ }
164
+
165
+ export type CreatePrivateModelRequest = {
166
+ workspace?: number
167
+ modelAvatar?: string
168
+ modelName?: string
169
+ modelDescription?: HydraCommonCommon.I18nName
170
+ modelSupportFeature?: ModelSupportFeature[]
171
+ readme?: HydraCommonCommon.I18nName
172
+ servingSpec?: ModelServingSpec
173
+ }
174
+
175
+ export type UpdatePrivateModelRequest = {
176
+ workspace?: number
177
+ modelId?: string
178
+ modelAvatar?: string
179
+ modelName?: string
180
+ modelDescription?: HydraCommonCommon.I18nName
181
+ modelSupportFeature?: ModelSupportFeature[]
182
+ readme?: HydraCommonCommon.I18nName
183
+ servingSpec?: ModelServingSpec
184
+ }
185
+
186
+ export type ListPrivateModelRequest = {
187
+ workspace?: number
188
+ page?: HydraCommonCommon.Pagination
189
+ }
190
+
191
+ export type CreateModelTemplateRequest = {
192
+ workspace?: number
193
+ modelId?: string
194
+ spec?: DeployTemplate
195
+ }
196
+
197
+ export type GetModelTemplateRequest = {
198
+ workspace?: number
199
+ templateId?: string
200
+ modelId?: string
201
+ }
202
+
203
+ export type UpdateModelTemplateRequest = {
204
+ workspace?: number
205
+ templateId?: string
206
+ spec?: DeployTemplate
207
+ modelId?: string
208
+ }
209
+
210
+ export type DeleteModelTemplateRequest = {
211
+ workspace?: number
212
+ templateId?: string
213
+ modelId?: string
214
+ }
215
+
216
+ export type ListModelTemplatesRequest = {
217
+ workspace?: number
218
+ modelId?: string
219
+ inferenceRuntime?: string
220
+ page?: HydraCommonCommon.Pagination
221
+ }
222
+
223
+ export type ListModelTemplatesResponse = {
224
+ items?: ModelTemplate[]
225
+ page?: HydraCommonCommon.Pagination
226
+ }
227
+
228
+ export class ModelManagement {
229
+ static GetModel(req: SingleModelRequest, initReq?: fm.InitReq): Promise<Model> {
230
+ return fm.fetchReq<SingleModelRequest, Model>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}?${fm.renderURLSearchParams(req, ["modelId"])}`, {...initReq, method: "GET"})
231
+ }
232
+ static ListModels(req: ListModelRequest, initReq?: fm.InitReq): Promise<ListModelResponse> {
233
+ return fm.fetchReq<ListModelRequest, ListModelResponse>(`/apis/hydra.io/v1alpha1/models?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
234
+ }
235
+ }
236
+ export class WSModelManagement {
237
+ static GetWSModel(req: SingleWSModelRequest, initReq?: fm.InitReq): Promise<WSModel> {
238
+ return fm.fetchReq<SingleWSModelRequest, WSModel>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/models/${req["modelId"]}?${fm.renderURLSearchParams(req, ["workspace", "modelId"])}`, {...initReq, method: "GET"})
239
+ }
240
+ static ListWSModels(req: ListWSModelRequest, initReq?: fm.InitReq): Promise<ListWSModelResponse> {
241
+ return fm.fetchReq<ListWSModelRequest, ListWSModelResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/models?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
242
+ }
243
+ static ListPrivateModels(req: ListPrivateModelRequest, initReq?: fm.InitReq): Promise<ListWSModelResponse> {
244
+ return fm.fetchReq<ListPrivateModelRequest, ListWSModelResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/private-models?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
245
+ }
246
+ static GetPrivateModel(req: SingleWSModelRequest, initReq?: fm.InitReq): Promise<WSModel> {
247
+ return fm.fetchReq<SingleWSModelRequest, WSModel>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/private-models/${req["modelId"]}?${fm.renderURLSearchParams(req, ["workspace", "modelId"])}`, {...initReq, method: "GET"})
248
+ }
249
+ static CreatePrivateModel(req: CreatePrivateModelRequest, initReq?: fm.InitReq): Promise<WSModel> {
250
+ return fm.fetchReq<CreatePrivateModelRequest, WSModel>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/private-models`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
251
+ }
252
+ static UpdatePrivateModel(req: UpdatePrivateModelRequest, initReq?: fm.InitReq): Promise<WSModel> {
253
+ return fm.fetchReq<UpdatePrivateModelRequest, WSModel>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/private-models/${req["modelId"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
254
+ }
255
+ static DeletePrivateModel(req: SingleWSModelRequest, initReq?: fm.InitReq): Promise<WSModel> {
256
+ return fm.fetchReq<SingleWSModelRequest, WSModel>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/private-models/${req["modelId"]}`, {...initReq, method: "DELETE"})
257
+ }
258
+ }
259
+ export class WSModelTemplateManagement {
260
+ static CreateWSModelTemplate(req: CreateModelTemplateRequest, initReq?: fm.InitReq): Promise<ModelTemplate> {
261
+ return fm.fetchReq<CreateModelTemplateRequest, ModelTemplate>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/models/${req["modelId"]}/model-templates`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
262
+ }
263
+ static GetWSModelTemplate(req: GetModelTemplateRequest, initReq?: fm.InitReq): Promise<ModelTemplate> {
264
+ return fm.fetchReq<GetModelTemplateRequest, ModelTemplate>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/models/${req["modelId"]}/model-templates/${req["templateId"]}?${fm.renderURLSearchParams(req, ["workspace", "modelId", "templateId"])}`, {...initReq, method: "GET"})
265
+ }
266
+ static UpdateWSModelTemplate(req: UpdateModelTemplateRequest, initReq?: fm.InitReq): Promise<ModelTemplate> {
267
+ return fm.fetchReq<UpdateModelTemplateRequest, ModelTemplate>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/models/${req["modelId"]}/model-templates/${req["templateId"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
268
+ }
269
+ static DeleteWSModelTemplate(req: DeleteModelTemplateRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
270
+ return fm.fetchReq<DeleteModelTemplateRequest, GoogleProtobufEmpty.Empty>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/models/${req["modelId"]}/model-templates/${req["templateId"]}`, {...initReq, method: "DELETE"})
271
+ }
272
+ static ListWSModelTemplates(req: ListModelTemplatesRequest, initReq?: fm.InitReq): Promise<ListModelTemplatesResponse> {
273
+ return fm.fetchReq<ListModelTemplatesRequest, ListModelTemplatesResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/models/${req["modelId"]}/model-templates?${fm.renderURLSearchParams(req, ["workspace", "modelId"])}`, {...initReq, method: "GET"})
274
+ }
275
+ }
@@ -0,0 +1,101 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as HydraCommonCommon from "../../../common/common.pb"
8
+ import * as fm from "../../../fetch.pb"
9
+ import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
10
+
11
+ export enum StorageSourceType {
12
+ STORAGE_SOURCE_TYPE_UNSPECIFIED = "STORAGE_SOURCE_TYPE_UNSPECIFIED",
13
+ FILES_STORAGE = "FILES_STORAGE",
14
+ PVC_STORAGE = "PVC_STORAGE",
15
+ }
16
+
17
+ export type WSModelWeightsVolume = {
18
+ id?: string
19
+ modelId?: string
20
+ modelTag?: string
21
+ clusterName?: string
22
+ storageSource?: StorageSourceType
23
+ storageRef?: string
24
+ subPath?: string
25
+ mountPath?: string
26
+ creationTimestamp?: GoogleProtobufTimestamp.Timestamp
27
+ updateTimestamp?: GoogleProtobufTimestamp.Timestamp
28
+ referenced?: boolean
29
+ }
30
+
31
+ export type CreateWSModelWeightsVolumeRequest = {
32
+ workspace?: number
33
+ id?: string
34
+ modelId?: string
35
+ clusterName?: string
36
+ modelTag?: string
37
+ storageSource?: StorageSourceType
38
+ storageRef?: string
39
+ subPath?: string
40
+ mountPath?: string
41
+ }
42
+
43
+ export type UpdateWSModelWeightsVolumeRequest = {
44
+ workspace?: number
45
+ id?: string
46
+ modelId?: string
47
+ clusterName?: string
48
+ modelTag?: string
49
+ storageSource?: StorageSourceType
50
+ storageRef?: string
51
+ subPath?: string
52
+ mountPath?: string
53
+ }
54
+
55
+ export type SingleWSModelWeightsVolumeRequest = {
56
+ workspace?: number
57
+ id?: string
58
+ modelId?: string
59
+ }
60
+
61
+ export type ListWSModelWeightsVolumesRequest = {
62
+ workspace?: number
63
+ modelId?: string
64
+ page?: HydraCommonCommon.Pagination
65
+ clusterName?: string
66
+ }
67
+
68
+ export type ListWSModelWeightsVolumesResponse = {
69
+ items?: WSModelWeightsVolume[]
70
+ page?: HydraCommonCommon.Pagination
71
+ }
72
+
73
+ export type GetWSStorageSourceRequest = {
74
+ workspace?: number
75
+ modelId?: string
76
+ }
77
+
78
+ export type GetWSStorageSourceResponse = {
79
+ sources?: {[key: string]: number}
80
+ }
81
+
82
+ export class WSModelWeightsVolumeManagement {
83
+ static CreateWSModelWeightsVolume(req: CreateWSModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<WSModelWeightsVolume> {
84
+ return fm.fetchReq<CreateWSModelWeightsVolumeRequest, WSModelWeightsVolume>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}/workspaces/${req["workspace"]}/weights`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
85
+ }
86
+ static UpdateWSModelWeightsVolume(req: UpdateWSModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<WSModelWeightsVolume> {
87
+ return fm.fetchReq<UpdateWSModelWeightsVolumeRequest, WSModelWeightsVolume>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}/workspaces/${req["workspace"]}/weights/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
88
+ }
89
+ static DeleteWSModelWeightsVolume(req: SingleWSModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<WSModelWeightsVolume> {
90
+ return fm.fetchReq<SingleWSModelWeightsVolumeRequest, WSModelWeightsVolume>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}/workspaces/${req["workspace"]}/weights/${req["id"]}`, {...initReq, method: "DELETE"})
91
+ }
92
+ static GetWSModelWeightsVolume(req: SingleWSModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<WSModelWeightsVolume> {
93
+ return fm.fetchReq<SingleWSModelWeightsVolumeRequest, WSModelWeightsVolume>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}/workspaces/${req["workspace"]}/weights/${req["id"]}?${fm.renderURLSearchParams(req, ["modelId", "workspace", "id"])}`, {...initReq, method: "GET"})
94
+ }
95
+ static ListWSModelWeightsVolumes(req: ListWSModelWeightsVolumesRequest, initReq?: fm.InitReq): Promise<ListWSModelWeightsVolumesResponse> {
96
+ return fm.fetchReq<ListWSModelWeightsVolumesRequest, ListWSModelWeightsVolumesResponse>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}/workspaces/${req["workspace"]}/weights?${fm.renderURLSearchParams(req, ["modelId", "workspace"])}`, {...initReq, method: "GET"})
97
+ }
98
+ static GetWSStorageSource(req: GetWSStorageSourceRequest, initReq?: fm.InitReq): Promise<GetWSStorageSourceResponse> {
99
+ return fm.fetchReq<GetWSStorageSourceRequest, GetWSStorageSourceResponse>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}/workspaces/${req["workspace"]}/weights:storage-source?${fm.renderURLSearchParams(req, ["modelId", "workspace"])}`, {...initReq, method: "GET"})
100
+ }
101
+ }