@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,495 @@
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
+ import * as HydraStorageserverV1alpha1Storage_server from "../../../storageserver/v1alpha1/storage_server.pb"
12
+ import * as EventV1alpha1Event from "../../event/v1alpha1/event.pb"
13
+
14
+ type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
15
+ type OneOf<T> =
16
+ | { [k in keyof T]?: undefined }
17
+ | (
18
+ keyof T extends infer K ?
19
+ (K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
20
+ : never)
21
+ : never);
22
+
23
+ export enum PvcPhase {
24
+ PvcPhaseUnknown = "PvcPhaseUnknown",
25
+ PvcPhaseBound = "PvcPhaseBound",
26
+ PvcPhasePending = "PvcPhasePending",
27
+ PvcPhaseLost = "PvcPhaseLost",
28
+ PvcPhaseFailed = "PvcPhaseFailed",
29
+ PvcPhaseDeleting = "PvcPhaseDeleting",
30
+ }
31
+
32
+ export enum ListReferencedByRequestItemType {
33
+ model = "model",
34
+ dataset = "dataset",
35
+ }
36
+
37
+ export enum DataSourceType {
38
+ DATA_SOURCE_TYPE_UNSPECIFIED = "DATA_SOURCE_TYPE_UNSPECIFIED",
39
+ GIT = "GIT",
40
+ S3 = "S3",
41
+ HTTP = "HTTP",
42
+ HUGGING_FACE = "HUGGING_FACE",
43
+ MODEL_SCOPE = "MODEL_SCOPE",
44
+ }
45
+
46
+ export enum SecretOptionsAuthType {
47
+ AUTH_TYPE_UNSPECIFIED = "AUTH_TYPE_UNSPECIFIED",
48
+ BASIC = "BASIC",
49
+ SSH = "SSH",
50
+ TOKEN = "TOKEN",
51
+ AK_SK = "AK_SK",
52
+ }
53
+
54
+ export enum DataSourceOptionsSyncMode {
55
+ SYNC_MODE_UNSPECIFIED = "SYNC_MODE_UNSPECIFIED",
56
+ copy = "copy",
57
+ sync = "sync",
58
+ }
59
+
60
+ export enum DataSourceOptionsS3Provider {
61
+ PROVIDER_UNSPECIFIED = "PROVIDER_UNSPECIFIED",
62
+ AWS = "AWS",
63
+ MINIO = "MINIO",
64
+ }
65
+
66
+ export enum DataSourceOptionsHuggingFaceRepoType {
67
+ REPO_TYPE_UNSPECIFIED = "REPO_TYPE_UNSPECIFIED",
68
+ MODEL = "MODEL",
69
+ DATASET = "DATASET",
70
+ }
71
+
72
+ export enum DataSourceOptionsModelScopeRepoType {
73
+ REPO_TYPE_UNSPECIFIED = "REPO_TYPE_UNSPECIFIED",
74
+ MODEL = "MODEL",
75
+ DATASET = "DATASET",
76
+ }
77
+
78
+ export enum DatasetStatusPhase {
79
+ DATA_SET_PHASE_UNSPECIFIED = "DATA_SET_PHASE_UNSPECIFIED",
80
+ PENDING = "PENDING",
81
+ READY = "READY",
82
+ PROCESSING = "PROCESSING",
83
+ FAILED = "FAILED",
84
+ }
85
+
86
+ export enum PrePullActionRequestAction {
87
+ ACTION_UNSPECIFIED = "ACTION_UNSPECIFIED",
88
+ RERUN = "RERUN",
89
+ }
90
+
91
+ export type FilesStorageStatus = {
92
+ phase?: PvcPhase
93
+ reason?: string
94
+ pvcName?: string
95
+ pvcNamespace?: string
96
+ storageServer?: StorageServerStatus
97
+ }
98
+
99
+ export type FilesStorage = {
100
+ name?: string
101
+ cluster?: string
102
+ pvcNamespace?: string
103
+ storageClassName?: string
104
+ capacity?: string
105
+ status?: FilesStorageStatus
106
+ createTime?: GoogleProtobufTimestamp.Timestamp
107
+ workspace?: number
108
+ description?: string
109
+ }
110
+
111
+ export type StorageServerStatus = {
112
+ phase?: string
113
+ name?: string
114
+ namespace?: string
115
+ }
116
+
117
+ export type ListFilesStoragesRequest = {
118
+ workspace?: number
119
+ page?: HydraCommonCommon.Pagination
120
+ cluster?: string
121
+ }
122
+
123
+ export type ListFilesStoragesResponse = {
124
+ items?: FilesStorage[]
125
+ page?: HydraCommonCommon.Pagination
126
+ }
127
+
128
+ export type GetFilesStorageRequest = {
129
+ workspace?: number
130
+ name?: string
131
+ }
132
+
133
+ export type CreateFilesStorageRequest = {
134
+ workspace?: number
135
+ cluster?: string
136
+ description?: string
137
+ }
138
+
139
+ export type UpdateFilesStorageRequest = {
140
+ workspace?: number
141
+ name?: string
142
+ description?: string
143
+ }
144
+
145
+ export type DeleteFilesStorageRequest = {
146
+ workspace?: number
147
+ name?: string
148
+ }
149
+
150
+ export type FileInfo = {
151
+ name?: string
152
+ type?: HydraStorageserverV1alpha1Storage_server.FileType
153
+ size?: string
154
+ modificationTimestamp?: string
155
+ }
156
+
157
+ export type ListFilesRequest = {
158
+ workspace?: number
159
+ name?: string
160
+ path?: string
161
+ type?: HydraStorageserverV1alpha1Storage_server.FileType
162
+ searchKeyword?: string
163
+ page?: HydraCommonCommon.Pagination
164
+ }
165
+
166
+ export type ListFilesResponse = {
167
+ files?: FileInfo[]
168
+ page?: HydraCommonCommon.Pagination
169
+ }
170
+
171
+ export type CreateFolderRequest = {
172
+ workspace?: number
173
+ name?: string
174
+ folderName?: string
175
+ path?: string
176
+ }
177
+
178
+ export type DeleteFileRequest = {
179
+ workspace?: number
180
+ name?: string
181
+ fileName?: string
182
+ path?: string
183
+ }
184
+
185
+ export type ListReferencedByRequest = {
186
+ workspace?: number
187
+ name?: string
188
+ itemType?: ListReferencedByRequestItemType
189
+ }
190
+
191
+ export type ListReferencedByResponseReferencedItem = {
192
+ id?: string
193
+ name?: string
194
+ }
195
+
196
+ export type ListReferencedByResponse = {
197
+ items?: ListReferencedByResponseReferencedItem[]
198
+ }
199
+
200
+ export type DataSource = {
201
+ type?: DataSourceType
202
+ uri?: string
203
+ options?: DataSourceOptions
204
+ }
205
+
206
+ export type SecretOptionsBasicAuth = {
207
+ username?: string
208
+ password?: string
209
+ }
210
+
211
+ export type SecretOptionsSSHAuth = {
212
+ privateKey?: string
213
+ passphrase?: string
214
+ }
215
+
216
+ export type SecretOptionsTokenAuth = {
217
+ token?: string
218
+ }
219
+
220
+ export type SecretOptionsAkSkAuth = {
221
+ accessKey?: string
222
+ secretKey?: string
223
+ }
224
+
225
+
226
+ /* hydra modified */ export type BaseSecretOptions = {
227
+ authType?: SecretOptionsAuthType
228
+ }
229
+
230
+ export type SecretOptions = BaseSecretOptions
231
+ & OneOf<{ basic: SecretOptionsBasicAuth; ssh: SecretOptionsSSHAuth; token: SecretOptionsTokenAuth; akSk: SecretOptionsAkSkAuth }>
232
+
233
+ export type DataSourceOptionsGit = {
234
+ branch?: string
235
+ commit?: string
236
+ depth?: number
237
+ submodules?: boolean
238
+ }
239
+
240
+ export type DataSourceOptionsS3 = {
241
+ region?: string
242
+ endpoint?: string
243
+ provider?: DataSourceOptionsS3Provider
244
+ syncMode?: DataSourceOptionsSyncMode
245
+ }
246
+
247
+ export type DataSourceOptionsHttp = {
248
+ headers?: {[key: string]: string}
249
+ syncMode?: DataSourceOptionsSyncMode
250
+ }
251
+
252
+
253
+ /* hydra modified */ export type BaseDataSourceOptions = {
254
+ }
255
+
256
+ export type DataSourceOptions = BaseDataSourceOptions
257
+ & OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; huggingFace: DataSourceOptionsHuggingFace; modelScope: DataSourceOptionsModelScope }>
258
+
259
+ export type DataSourceOptionsHuggingFace = {
260
+ endpoint?: string
261
+ include?: string
262
+ exclude?: string
263
+ revision?: string
264
+ repoType?: DataSourceOptionsHuggingFaceRepoType
265
+ }
266
+
267
+ export type DataSourceOptionsModelScope = {
268
+ include?: string
269
+ exclude?: string
270
+ revision?: string
271
+ repoType?: DataSourceOptionsModelScopeRepoType
272
+ }
273
+
274
+ export type DatasetStatus = {
275
+ phase?: DatasetStatusPhase
276
+ }
277
+
278
+ export type PrePull = {
279
+ name?: string
280
+ cluster?: string
281
+ namespace?: string
282
+ path?: string
283
+ storageName?: string
284
+ description?: string
285
+ creationTimestamp?: GoogleProtobufTimestamp.Timestamp
286
+ labels?: {[key: string]: string}
287
+ annotations?: {[key: string]: string}
288
+ source?: DataSource
289
+ status?: DatasetStatus
290
+ lastSync?: GoogleProtobufTimestamp.Timestamp
291
+ secretRef?: string
292
+ workspace?: number
293
+ }
294
+
295
+ export type ListPrePullsRequest = {
296
+ storageName?: string
297
+ workspace?: number
298
+ cluster?: string
299
+ page?: HydraCommonCommon.Pagination
300
+ }
301
+
302
+ export type ListPrePullsResponse = {
303
+ items?: PrePull[]
304
+ page?: HydraCommonCommon.Pagination
305
+ }
306
+
307
+ export type CreatePrePullRequest = {
308
+ prepullName?: string
309
+ cluster?: string
310
+ path?: string
311
+ storageName?: string
312
+ description?: string
313
+ labels?: {[key: string]: string}
314
+ annotations?: {[key: string]: string}
315
+ source?: DataSource
316
+ secretOptions?: SecretOptions
317
+ workspace?: number
318
+ }
319
+
320
+
321
+ /* hydra modified */ export type BaseUpdatePrePullRequest = {
322
+ cluster?: string
323
+ storageName?: string
324
+ prepullName?: string
325
+ description?: string
326
+ labels?: {[key: string]: string}
327
+ annotations?: {[key: string]: string}
328
+ secretOptions?: SecretOptions
329
+ workspace?: number
330
+ path?: string
331
+ }
332
+
333
+ export type UpdatePrePullRequest = BaseUpdatePrePullRequest
334
+ & OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; huggingFace: DataSourceOptionsHuggingFace; modelScope: DataSourceOptionsModelScope }>
335
+
336
+ export type DeletePrePullRequest = {
337
+ storageName?: string
338
+ prepullName?: string
339
+ workspace?: number
340
+ }
341
+
342
+ export type PrePullActionRequest = {
343
+ cluster?: string
344
+ storageName?: string
345
+ prepullName?: string
346
+ action?: PrePullActionRequestAction
347
+ workspace?: number
348
+ }
349
+
350
+ export type ValidateDataSourceSecretsRequest = {
351
+ source?: DataSource
352
+ secretOptions?: SecretOptions
353
+ workspace?: number
354
+ }
355
+
356
+ export type ValidateDataSourceSecretsResponse = {
357
+ valid?: boolean
358
+ message?: string
359
+ }
360
+
361
+ export type ListDatasetEventsRequest = {
362
+ cluster?: string
363
+ storageName?: string
364
+ prepullName?: string
365
+ page?: HydraCommonCommon.Pagination
366
+ workspace?: number
367
+ }
368
+
369
+ export type SinglePrePullRequest = {
370
+ cluster?: string
371
+ storageName?: string
372
+ prepullName?: string
373
+ workspace?: number
374
+ }
375
+
376
+ export type PrePullSyncProcess = {
377
+ status?: DatasetStatus
378
+ syncProcess?: number
379
+ }
380
+
381
+ export type PodRequest = {
382
+ workspace?: number
383
+ storageName?: string
384
+ prepullName?: string
385
+ page?: HydraCommonCommon.Pagination
386
+ }
387
+
388
+ export type PodInstance = {
389
+ cluster?: string
390
+ namespace?: string
391
+ name?: string
392
+ phase?: string
393
+ containerReadyCount?: number
394
+ containerTotalCount?: number
395
+ podIp?: string
396
+ nodeName?: string
397
+ containers?: Container[]
398
+ creationTimestamp?: GoogleProtobufTimestamp.Timestamp
399
+ }
400
+
401
+ export type Container = {
402
+ name?: string
403
+ }
404
+
405
+ export type PodInstanceListResponse = {
406
+ items?: PodInstance[]
407
+ page?: HydraCommonCommon.Pagination
408
+ }
409
+
410
+ export type GetPrePullRequest = {
411
+ workspace?: number
412
+ storageName?: string
413
+ prepullName?: string
414
+ }
415
+
416
+ export type CreateSFTPAccessRequest = {
417
+ workspace?: number
418
+ storageName?: string
419
+ expirationDays?: number
420
+ }
421
+
422
+ export type GetSFTPAccessRequest = {
423
+ workspace?: number
424
+ storageName?: string
425
+ }
426
+
427
+ export type SFTPAccessResponse = {
428
+ command?: string
429
+ }
430
+
431
+ export class WSFilesStorageService {
432
+ static ListWSFilesStorages(req: ListFilesStoragesRequest, initReq?: fm.InitReq): Promise<ListFilesStoragesResponse> {
433
+ return fm.fetchReq<ListFilesStoragesRequest, ListFilesStoragesResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
434
+ }
435
+ static GetWSFilesStorage(req: GetFilesStorageRequest, initReq?: fm.InitReq): Promise<FilesStorage> {
436
+ return fm.fetchReq<GetFilesStorageRequest, FilesStorage>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["name"]}?${fm.renderURLSearchParams(req, ["workspace", "name"])}`, {...initReq, method: "GET"})
437
+ }
438
+ static CreateWSFilesStorage(req: CreateFilesStorageRequest, initReq?: fm.InitReq): Promise<FilesStorage> {
439
+ return fm.fetchReq<CreateFilesStorageRequest, FilesStorage>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
440
+ }
441
+ static UpdateWSFilesStorage(req: UpdateFilesStorageRequest, initReq?: fm.InitReq): Promise<FilesStorage> {
442
+ return fm.fetchReq<UpdateFilesStorageRequest, FilesStorage>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
443
+ }
444
+ static DeleteWSFilesStorage(req: DeleteFilesStorageRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
445
+ return fm.fetchReq<DeleteFilesStorageRequest, GoogleProtobufEmpty.Empty>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["name"]}`, {...initReq, method: "DELETE"})
446
+ }
447
+ static ListWSFiles(req: ListFilesRequest, initReq?: fm.InitReq): Promise<ListFilesResponse> {
448
+ return fm.fetchReq<ListFilesRequest, ListFilesResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["name"]}/files?${fm.renderURLSearchParams(req, ["workspace", "name"])}`, {...initReq, method: "GET"})
449
+ }
450
+ static DeleteWSFile(req: DeleteFileRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
451
+ return fm.fetchReq<DeleteFileRequest, GoogleProtobufEmpty.Empty>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["name"]}/files/${req["fileName"]}:delete`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
452
+ }
453
+ static CreateWSFolder(req: CreateFolderRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
454
+ 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)})
455
+ }
456
+ static ListWSReferencedBy(req: ListReferencedByRequest, initReq?: fm.InitReq): Promise<ListReferencedByResponse> {
457
+ return fm.fetchReq<ListReferencedByRequest, ListReferencedByResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["name"]}/referencedby/${req["itemType"]}?${fm.renderURLSearchParams(req, ["workspace", "name", "itemType"])}`, {...initReq, method: "GET"})
458
+ }
459
+ static WSListPrePulls(req: ListPrePullsRequest, initReq?: fm.InitReq): Promise<ListPrePullsResponse> {
460
+ return fm.fetchReq<ListPrePullsRequest, ListPrePullsResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["storageName"]}/prepulls?${fm.renderURLSearchParams(req, ["workspace", "storageName"])}`, {...initReq, method: "GET"})
461
+ }
462
+ static WSCreatePrePull(req: CreatePrePullRequest, initReq?: fm.InitReq): Promise<PrePull> {
463
+ return fm.fetchReq<CreatePrePullRequest, PrePull>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["storageName"]}/prepulls`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
464
+ }
465
+ static WSUpdatePrePull(req: UpdatePrePullRequest, initReq?: fm.InitReq): Promise<PrePull> {
466
+ return fm.fetchReq<UpdatePrePullRequest, PrePull>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
467
+ }
468
+ static WSDeletePrePull(req: DeletePrePullRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
469
+ return fm.fetchReq<DeletePrePullRequest, GoogleProtobufEmpty.Empty>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}`, {...initReq, method: "DELETE"})
470
+ }
471
+ static WSDatasetDoAction(req: PrePullActionRequest, initReq?: fm.InitReq): Promise<PrePull> {
472
+ return fm.fetchReq<PrePullActionRequest, PrePull>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}/actions`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
473
+ }
474
+ static WSListPrePullEvents(req: ListDatasetEventsRequest, initReq?: fm.InitReq): Promise<EventV1alpha1Event.ListEventsResponse> {
475
+ return fm.fetchReq<ListDatasetEventsRequest, EventV1alpha1Event.ListEventsResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}/events?${fm.renderURLSearchParams(req, ["workspace", "storageName", "prepullName"])}`, {...initReq, method: "GET"})
476
+ }
477
+ static WSGetPrePullSyncProcess(req: SinglePrePullRequest, initReq?: fm.InitReq): Promise<PrePullSyncProcess> {
478
+ return fm.fetchReq<SinglePrePullRequest, PrePullSyncProcess>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}/sync-process?${fm.renderURLSearchParams(req, ["workspace", "storageName", "prepullName"])}`, {...initReq, method: "GET"})
479
+ }
480
+ static WSValidateDataSourceSecrets(req: ValidateDataSourceSecretsRequest, initReq?: fm.InitReq): Promise<ValidateDataSourceSecretsResponse> {
481
+ return fm.fetchReq<ValidateDataSourceSecretsRequest, ValidateDataSourceSecretsResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/validate-secrets`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
482
+ }
483
+ static WSGetPodInstanceList(req: PodRequest, initReq?: fm.InitReq): Promise<PodInstanceListResponse> {
484
+ 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"})
485
+ }
486
+ static WSGetPrePull(req: GetPrePullRequest, initReq?: fm.InitReq): Promise<PrePull> {
487
+ 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"})
488
+ }
489
+ static WSCreateSFTPAccess(req: CreateSFTPAccessRequest, initReq?: fm.InitReq): Promise<SFTPAccessResponse> {
490
+ return fm.fetchReq<CreateSFTPAccessRequest, SFTPAccessResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["storageName"]}/sftp-access`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
491
+ }
492
+ static WSGetSFTPAccess(req: GetSFTPAccessRequest, initReq?: fm.InitReq): Promise<SFTPAccessResponse> {
493
+ return fm.fetchReq<GetSFTPAccessRequest, SFTPAccessResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["storageName"]}/sftp-access?${fm.renderURLSearchParams(req, ["workspace", "storageName"])}`, {...initReq, method: "GET"})
494
+ }
495
+ }
@@ -0,0 +1,24 @@
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 CurrentUserRequest = {
9
+ }
10
+
11
+ export type UserInfo = {
12
+ id?: string
13
+ username?: string
14
+ balance?: string
15
+ amount?: string
16
+ idVerified?: boolean
17
+ isMain?: boolean
18
+ }
19
+
20
+ export class UserService {
21
+ static CurrentUser(req: CurrentUserRequest, initReq?: fm.InitReq): Promise<UserInfo> {
22
+ return fm.fetchReq<CurrentUserRequest, UserInfo>(`/apis/hydra.io/v1alpha1/current-user?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
23
+ }
24
+ }
@@ -0,0 +1,19 @@
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 GetAgentAddressRequest = {
9
+ }
10
+
11
+ export type GetAgentAddressResponse = {
12
+ address?: string
13
+ }
14
+
15
+ export class WebSearchAgentService {
16
+ static GetAgentAddress(req: GetAgentAddressRequest, initReq?: fm.InitReq): Promise<GetAgentAddressResponse> {
17
+ return fm.fetchReq<GetAgentAddressRequest, GetAgentAddressResponse>(`/apis/hydra.io/v1alpha1/web-search-agent/address?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
18
+ }
19
+ }
@@ -0,0 +1,82 @@
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
+
10
+ export enum ClusterStatus {
11
+ STATUS_UNSPECIFIED = "STATUS_UNSPECIFIED",
12
+ STATUS_READY = "STATUS_READY",
13
+ STATUS_NOT_READY = "STATUS_NOT_READY",
14
+ }
15
+
16
+ export type ListWorkspaceRequest = {
17
+ page?: HydraCommonCommon.Pagination
18
+ cluster?: string
19
+ }
20
+
21
+ export type Workspace = {
22
+ workspaceId?: number
23
+ alias?: string
24
+ }
25
+
26
+ export type ListWorkspacesResponse = {
27
+ items?: Workspace[]
28
+ page?: HydraCommonCommon.Pagination
29
+ }
30
+
31
+ export type ListClusterRequest = {
32
+ workspace?: number
33
+ page?: HydraCommonCommon.Pagination
34
+ }
35
+
36
+ export type Cluster = {
37
+ name?: string
38
+ status?: ClusterStatus
39
+ agentInstalled?: boolean
40
+ baseUrl?: string
41
+ components?: Component[]
42
+ }
43
+
44
+ export type Component = {
45
+ name?: string
46
+ installedVersion?: string
47
+ recommendedVersion?: string
48
+ ready?: boolean
49
+ }
50
+
51
+ export type ListClustersResponse = {
52
+ items?: Cluster[]
53
+ page?: HydraCommonCommon.Pagination
54
+ }
55
+
56
+ export type ClusterNamespace = {
57
+ cluster?: string
58
+ namespace?: string
59
+ }
60
+
61
+ export type ListClusterNamespacesRequest = {
62
+ workspace?: number
63
+ cluster?: string
64
+ page?: HydraCommonCommon.Pagination
65
+ }
66
+
67
+ export type ListClusterNamespaceResponse = {
68
+ items?: ClusterNamespace[]
69
+ page?: HydraCommonCommon.Pagination
70
+ }
71
+
72
+ export class WorkspaceService {
73
+ static ListWorkspaces(req: ListWorkspaceRequest, initReq?: fm.InitReq): Promise<ListWorkspacesResponse> {
74
+ return fm.fetchReq<ListWorkspaceRequest, ListWorkspacesResponse>(`/apis/hydra.io/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
75
+ }
76
+ static ListClusters(req: ListClusterRequest, initReq?: fm.InitReq): Promise<ListClustersResponse> {
77
+ return fm.fetchReq<ListClusterRequest, ListClustersResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/clusters?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
78
+ }
79
+ static ListClusterNamespaces(req: ListClusterNamespacesRequest, initReq?: fm.InitReq): Promise<ListClusterNamespaceResponse> {
80
+ return fm.fetchReq<ListClusterNamespacesRequest, ListClusterNamespaceResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/cluster-namespaces?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
81
+ }
82
+ }
package/package.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "@daocloud-proto/hydra",
3
+ "version": "v0.0.0-dev-65873840",
4
+ "description": "",
5
+ "author": "",
6
+ "license": "ISC"
7
+ }