@daocloud-proto/hydra 0.11.0-dev-15 → 0.11.0-dev-18
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.
|
@@ -27,7 +27,7 @@ export enum PrePullActionRequestAction {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export type FilesStorageStatus = {
|
|
30
|
-
phase?:
|
|
30
|
+
phase?: HydraManagement_apiStorageV1alpha1Filesstorage.PvcPhase
|
|
31
31
|
reason?: string
|
|
32
32
|
pvcName?: string
|
|
33
33
|
pvcNamespace?: string
|
|
@@ -90,10 +90,19 @@ export type ListFilesRequest = {
|
|
|
90
90
|
name?: string
|
|
91
91
|
path?: string
|
|
92
92
|
type?: HydraStorageserverV1alpha1Storage_server.FileType
|
|
93
|
+
searchKeyword?: string
|
|
94
|
+
page?: HydraCommonCommon.Pagination
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export type DeleteFileRequest = {
|
|
98
|
+
name?: string
|
|
99
|
+
fileName?: string
|
|
100
|
+
path?: string
|
|
93
101
|
}
|
|
94
102
|
|
|
95
103
|
export type ListFilesResponse = {
|
|
96
104
|
files?: FileInfo[]
|
|
105
|
+
page?: HydraCommonCommon.Pagination
|
|
97
106
|
}
|
|
98
107
|
|
|
99
108
|
export type CreateFolderRequest = {
|
|
@@ -180,6 +189,18 @@ export type SinglePrePullRequest = {
|
|
|
180
189
|
prepullName?: string
|
|
181
190
|
}
|
|
182
191
|
|
|
192
|
+
export type ListFilesStorageClustersRequest = {
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export type ListFilesStorageClustersResponse = {
|
|
196
|
+
clusters?: string[]
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export type GetPrePullRequest = {
|
|
200
|
+
storageName?: string
|
|
201
|
+
prepullName?: string
|
|
202
|
+
}
|
|
203
|
+
|
|
183
204
|
export class AdminFilesStorageService {
|
|
184
205
|
static ListFilesStorages(req: ListFilesStoragesRequest, initReq?: fm.InitReq): Promise<ListFilesStoragesResponse> {
|
|
185
206
|
return fm.fetchReq<ListFilesStoragesRequest, ListFilesStoragesResponse>(`/apis/admin.hydra.io/v1alpha1/filesstorages?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -199,6 +220,12 @@ export class AdminFilesStorageService {
|
|
|
199
220
|
static ListFiles(req: ListFilesRequest, initReq?: fm.InitReq): Promise<ListFilesResponse> {
|
|
200
221
|
return fm.fetchReq<ListFilesRequest, ListFilesResponse>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["name"]}/files?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
|
|
201
222
|
}
|
|
223
|
+
static DeleteFile(req: DeleteFileRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
224
|
+
return fm.fetchReq<DeleteFileRequest, GoogleProtobufEmpty.Empty>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["name"]}/files/${req["fileName"]}`, {...initReq, method: "DELETE"})
|
|
225
|
+
}
|
|
226
|
+
static ListFilesStorageClusters(req: ListFilesStorageClustersRequest, initReq?: fm.InitReq): Promise<ListFilesStorageClustersResponse> {
|
|
227
|
+
return fm.fetchReq<ListFilesStorageClustersRequest, ListFilesStorageClustersResponse>(`/apis/admin.hydra.io/v1alpha1/filesstorage-clusters?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
228
|
+
}
|
|
202
229
|
static CreateFolder(req: CreateFolderRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
203
230
|
return fm.fetchReq<CreateFolderRequest, GoogleProtobufEmpty.Empty>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["name"]}/folders/${req["folderName"]}`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
204
231
|
}
|
|
@@ -229,4 +256,7 @@ export class AdminFilesStorageService {
|
|
|
229
256
|
static GetPodInstanceList(req: HydraManagement_apiStorageV1alpha1Filesstorage.PodRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiStorageV1alpha1Filesstorage.PodInstanceListResponse> {
|
|
230
257
|
return fm.fetchReq<HydraManagement_apiStorageV1alpha1Filesstorage.PodRequest, HydraManagement_apiStorageV1alpha1Filesstorage.PodInstanceListResponse>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}/pods?${fm.renderURLSearchParams(req, ["storageName", "prepullName"])}`, {...initReq, method: "GET"})
|
|
231
258
|
}
|
|
259
|
+
static GetPrePull(req: GetPrePullRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiStorageV1alpha1Filesstorage.PrePull> {
|
|
260
|
+
return fm.fetchReq<GetPrePullRequest, HydraManagement_apiStorageV1alpha1Filesstorage.PrePull>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}?${fm.renderURLSearchParams(req, ["storageName", "prepullName"])}`, {...initReq, method: "GET"})
|
|
261
|
+
}
|
|
232
262
|
}
|
|
@@ -20,6 +20,14 @@ type OneOf<T> =
|
|
|
20
20
|
: never)
|
|
21
21
|
: never);
|
|
22
22
|
|
|
23
|
+
export enum PvcPhase {
|
|
24
|
+
PvcPhaseUnknown = "PvcPhaseUnknown",
|
|
25
|
+
PvcPhaseBound = "PvcPhaseBound",
|
|
26
|
+
PvcPhasePending = "PvcPhasePending",
|
|
27
|
+
PvcPhaseLost = "PvcPhaseLost",
|
|
28
|
+
PvcPhaseFailed = "PvcPhaseFailed",
|
|
29
|
+
}
|
|
30
|
+
|
|
23
31
|
export enum DataSourceType {
|
|
24
32
|
DATA_SOURCE_TYPE_UNSPECIFIED = "DATA_SOURCE_TYPE_UNSPECIFIED",
|
|
25
33
|
GIT = "GIT",
|
|
@@ -49,6 +57,18 @@ export enum DataSourceOptionsS3Provider {
|
|
|
49
57
|
MINIO = "MINIO",
|
|
50
58
|
}
|
|
51
59
|
|
|
60
|
+
export enum DataSourceOptionsHuggingFaceRepoType {
|
|
61
|
+
REPO_TYPE_UNSPECIFIED = "REPO_TYPE_UNSPECIFIED",
|
|
62
|
+
MODEL = "MODEL",
|
|
63
|
+
DATASET = "DATASET",
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export enum DataSourceOptionsModelScopeRepoType {
|
|
67
|
+
REPO_TYPE_UNSPECIFIED = "REPO_TYPE_UNSPECIFIED",
|
|
68
|
+
MODEL = "MODEL",
|
|
69
|
+
DATASET = "DATASET",
|
|
70
|
+
}
|
|
71
|
+
|
|
52
72
|
export enum DatasetStatusPhase {
|
|
53
73
|
DATA_SET_PHASE_UNSPECIFIED = "DATA_SET_PHASE_UNSPECIFIED",
|
|
54
74
|
PENDING = "PENDING",
|
|
@@ -63,7 +83,7 @@ export enum PrePullActionRequestAction {
|
|
|
63
83
|
}
|
|
64
84
|
|
|
65
85
|
export type FilesStorageStatus = {
|
|
66
|
-
phase?:
|
|
86
|
+
phase?: PvcPhase
|
|
67
87
|
reason?: string
|
|
68
88
|
pvcName?: string
|
|
69
89
|
pvcNamespace?: string
|
|
@@ -133,10 +153,13 @@ export type ListFilesRequest = {
|
|
|
133
153
|
name?: string
|
|
134
154
|
path?: string
|
|
135
155
|
type?: HydraStorageserverV1alpha1Storage_server.FileType
|
|
156
|
+
searchKeyword?: string
|
|
157
|
+
page?: HydraCommonCommon.Pagination
|
|
136
158
|
}
|
|
137
159
|
|
|
138
160
|
export type ListFilesResponse = {
|
|
139
161
|
files?: FileInfo[]
|
|
162
|
+
page?: HydraCommonCommon.Pagination
|
|
140
163
|
}
|
|
141
164
|
|
|
142
165
|
export type CreateFolderRequest = {
|
|
@@ -146,6 +169,13 @@ export type CreateFolderRequest = {
|
|
|
146
169
|
path?: string
|
|
147
170
|
}
|
|
148
171
|
|
|
172
|
+
export type DeleteFileRequest = {
|
|
173
|
+
workspace?: number
|
|
174
|
+
name?: string
|
|
175
|
+
fileName?: string
|
|
176
|
+
path?: string
|
|
177
|
+
}
|
|
178
|
+
|
|
149
179
|
export type DataSource = {
|
|
150
180
|
type?: DataSourceType
|
|
151
181
|
uri?: string
|
|
@@ -210,12 +240,14 @@ export type DataSourceOptionsHuggingFace = {
|
|
|
210
240
|
include?: string
|
|
211
241
|
exclude?: string
|
|
212
242
|
revision?: string
|
|
243
|
+
repoType?: DataSourceOptionsHuggingFaceRepoType
|
|
213
244
|
}
|
|
214
245
|
|
|
215
246
|
export type DataSourceOptionsModelScope = {
|
|
216
247
|
include?: string
|
|
217
248
|
exclude?: string
|
|
218
249
|
revision?: string
|
|
250
|
+
repoType?: DataSourceOptionsModelScopeRepoType
|
|
219
251
|
}
|
|
220
252
|
|
|
221
253
|
export type DatasetStatus = {
|
|
@@ -354,10 +386,27 @@ export type PodInstanceListResponse = {
|
|
|
354
386
|
page?: HydraCommonCommon.Pagination
|
|
355
387
|
}
|
|
356
388
|
|
|
389
|
+
export type ListWSFilesStorageClustersRequest = {
|
|
390
|
+
workspace?: number
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
export type ListWSFilesStorageClustersResponse = {
|
|
394
|
+
clusters?: string[]
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
export type GetPrePullRequest = {
|
|
398
|
+
workspace?: number
|
|
399
|
+
storageName?: string
|
|
400
|
+
prepullName?: string
|
|
401
|
+
}
|
|
402
|
+
|
|
357
403
|
export class WSFilesStorageService {
|
|
358
404
|
static ListWSFilesStorages(req: ListFilesStoragesRequest, initReq?: fm.InitReq): Promise<ListFilesStoragesResponse> {
|
|
359
405
|
return fm.fetchReq<ListFilesStoragesRequest, ListFilesStoragesResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
360
406
|
}
|
|
407
|
+
static ListWSFilesStorageClusters(req: ListWSFilesStorageClustersRequest, initReq?: fm.InitReq): Promise<ListWSFilesStorageClustersResponse> {
|
|
408
|
+
return fm.fetchReq<ListWSFilesStorageClustersRequest, ListWSFilesStorageClustersResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorage-clusters?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
409
|
+
}
|
|
361
410
|
static GetWSFilesStorage(req: GetFilesStorageRequest, initReq?: fm.InitReq): Promise<FilesStorage> {
|
|
362
411
|
return fm.fetchReq<GetFilesStorageRequest, FilesStorage>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["name"]}?${fm.renderURLSearchParams(req, ["workspace", "name"])}`, {...initReq, method: "GET"})
|
|
363
412
|
}
|
|
@@ -373,6 +422,9 @@ export class WSFilesStorageService {
|
|
|
373
422
|
static ListWSFiles(req: ListFilesRequest, initReq?: fm.InitReq): Promise<ListFilesResponse> {
|
|
374
423
|
return fm.fetchReq<ListFilesRequest, ListFilesResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["name"]}/files?${fm.renderURLSearchParams(req, ["workspace", "name"])}`, {...initReq, method: "GET"})
|
|
375
424
|
}
|
|
425
|
+
static DeleteWSFile(req: DeleteFileRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
426
|
+
return fm.fetchReq<DeleteFileRequest, GoogleProtobufEmpty.Empty>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["name"]}/files/${req["fileName"]}`, {...initReq, method: "DELETE"})
|
|
427
|
+
}
|
|
376
428
|
static CreateWSFolder(req: CreateFolderRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
377
429
|
return fm.fetchReq<CreateFolderRequest, GoogleProtobufEmpty.Empty>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["name"]}/folders/${req["folderName"]}`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
378
430
|
}
|
|
@@ -403,4 +455,7 @@ export class WSFilesStorageService {
|
|
|
403
455
|
static WSGetPodInstanceList(req: PodRequest, initReq?: fm.InitReq): Promise<PodInstanceListResponse> {
|
|
404
456
|
return fm.fetchReq<PodRequest, PodInstanceListResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}/pods?${fm.renderURLSearchParams(req, ["workspace", "storageName", "prepullName"])}`, {...initReq, method: "GET"})
|
|
405
457
|
}
|
|
458
|
+
static WSGetPrePull(req: GetPrePullRequest, initReq?: fm.InitReq): Promise<PrePull> {
|
|
459
|
+
return fm.fetchReq<GetPrePullRequest, PrePull>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}?${fm.renderURLSearchParams(req, ["workspace", "storageName", "prepullName"])}`, {...initReq, method: "GET"})
|
|
460
|
+
}
|
|
406
461
|
}
|