@daocloud-proto/hydra 0.11.0-dev-8 → 0.11.0-dev-9

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,23 @@ 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 EventV1alpha1Event from "../../../management-api/event/v1alpha1/event.pb"
12
+ import * as HydraManagement_apiStorageV1alpha1Filesstorage from "../../../management-api/storage/v1alpha1/filesstorage.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 PrePullActionRequestAction {
24
+ ACTION_UNSPECIFIED = "ACTION_UNSPECIFIED",
25
+ RERUN = "RERUN",
26
+ }
27
+
11
28
  export type FilesStorageStatus = {
12
29
  phase?: string
13
30
  reason?: string
@@ -83,37 +100,81 @@ export type CreateFolderRequest = {
83
100
  path?: string
84
101
  }
85
102
 
86
- export type Prepull = {
87
- name?: string
88
- status?: string
103
+ export type ListPrePullsRequest = {
104
+ storageName?: string
105
+ cluster?: string
106
+ page?: HydraCommonCommon.Pagination
89
107
  }
90
108
 
91
- export type ListPrepullsRequest = {
92
- name?: string
109
+ export type ListPrePullsResponse = {
110
+ items?: HydraManagement_apiStorageV1alpha1Filesstorage.PrePull[]
93
111
  page?: HydraCommonCommon.Pagination
94
112
  }
95
113
 
96
- export type ListPrepullsResponse = {
97
- items?: Prepull[]
98
- page?: HydraCommonCommon.Pagination
114
+ export type CreatePrePullRequest = {
115
+ prepullName?: string
116
+ cluster?: string
117
+ path?: string
118
+ storageName?: string
119
+ description?: string
120
+ labels?: {[key: string]: string}
121
+ annotations?: {[key: string]: string}
122
+ source?: HydraManagement_apiStorageV1alpha1Filesstorage.DataSource
123
+ secretOptions?: HydraManagement_apiStorageV1alpha1Filesstorage.SecretOptions
99
124
  }
100
125
 
101
- export type CreatePrepullRequest = {
102
- name?: string
126
+
127
+ type BaseUpdatePrePullRequest = {
128
+ cluster?: string
129
+ storageName?: string
130
+ prepullName?: string
131
+ description?: string
132
+ labels?: {[key: string]: string}
133
+ annotations?: {[key: string]: string}
134
+ secretOptions?: HydraManagement_apiStorageV1alpha1Filesstorage.SecretOptions
135
+ path?: string
103
136
  }
104
137
 
105
- export type UpdatePrepullRequest = {
106
- name?: string
138
+ export type UpdatePrePullRequest = BaseUpdatePrePullRequest
139
+ & OneOf<{ git: HydraManagement_apiStorageV1alpha1Filesstorage.DataSourceOptionsGit; s3: HydraManagement_apiStorageV1alpha1Filesstorage.DataSourceOptionsS3; http: HydraManagement_apiStorageV1alpha1Filesstorage.DataSourceOptionsHttp; huggingFace: HydraManagement_apiStorageV1alpha1Filesstorage.DataSourceOptionsHuggingFace; modelScope: HydraManagement_apiStorageV1alpha1Filesstorage.DataSourceOptionsModelScope }>
140
+
141
+ export type DeletePrePullRequest = {
142
+ storageName?: string
107
143
  prepullName?: string
108
144
  }
109
145
 
110
- export type DeletePrepullRequest = {
111
- name?: string
146
+ export type PrePullActionRequest = {
147
+ cluster?: string
148
+ storageName?: string
112
149
  prepullName?: string
150
+ action?: PrePullActionRequestAction
113
151
  }
114
152
 
115
- export type RestartPrepullRequest = {
116
- name?: string
153
+ export type RestartPrePullRequest = {
154
+ storageName?: string
155
+ prepullName?: string
156
+ }
157
+
158
+ export type ValidateDataSourceSecretsRequest = {
159
+ source?: HydraManagement_apiStorageV1alpha1Filesstorage.DataSource
160
+ secretOptions?: HydraManagement_apiStorageV1alpha1Filesstorage.SecretOptions
161
+ }
162
+
163
+ export type ValidateDataSourceSecretsResponse = {
164
+ valid?: boolean
165
+ message?: string
166
+ }
167
+
168
+ export type ListDatasetEventsRequest = {
169
+ cluster?: string
170
+ storageName?: string
171
+ prepullName?: string
172
+ page?: HydraCommonCommon.Pagination
173
+ }
174
+
175
+ export type SinglePrePullRequest = {
176
+ cluster?: string
177
+ storageName?: string
117
178
  prepullName?: string
118
179
  }
119
180
 
@@ -139,19 +200,31 @@ export class AdminFilesStorageService {
139
200
  static CreateFolder(req: CreateFolderRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
140
201
  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)})
141
202
  }
142
- static ListPrepulls(req: ListPrepullsRequest, initReq?: fm.InitReq): Promise<ListPrepullsResponse> {
143
- return fm.fetchReq<ListPrepullsRequest, ListPrepullsResponse>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["name"]}/prepulls?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
203
+ static ListPrePulls(req: ListPrePullsRequest, initReq?: fm.InitReq): Promise<ListPrePullsResponse> {
204
+ return fm.fetchReq<ListPrePullsRequest, ListPrePullsResponse>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls?${fm.renderURLSearchParams(req, ["storageName"])}`, {...initReq, method: "GET"})
205
+ }
206
+ static CreatePrePull(req: CreatePrePullRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiStorageV1alpha1Filesstorage.PrePull> {
207
+ return fm.fetchReq<CreatePrePullRequest, HydraManagement_apiStorageV1alpha1Filesstorage.PrePull>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
208
+ }
209
+ static UpdatePrePull(req: UpdatePrePullRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiStorageV1alpha1Filesstorage.PrePull> {
210
+ return fm.fetchReq<UpdatePrePullRequest, HydraManagement_apiStorageV1alpha1Filesstorage.PrePull>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
211
+ }
212
+ static DeletePrePull(req: DeletePrePullRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
213
+ return fm.fetchReq<DeletePrePullRequest, GoogleProtobufEmpty.Empty>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}`, {...initReq, method: "DELETE"})
214
+ }
215
+ static DatasetDoAction(req: PrePullActionRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiStorageV1alpha1Filesstorage.PrePull> {
216
+ return fm.fetchReq<PrePullActionRequest, HydraManagement_apiStorageV1alpha1Filesstorage.PrePull>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}/actions`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
144
217
  }
145
- static CreatePrepull(req: CreatePrepullRequest, initReq?: fm.InitReq): Promise<Prepull> {
146
- return fm.fetchReq<CreatePrepullRequest, Prepull>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["name"]}/prepulls`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
218
+ static ListPrePullEvents(req: ListDatasetEventsRequest, initReq?: fm.InitReq): Promise<EventV1alpha1Event.ListEventsResponse> {
219
+ return fm.fetchReq<ListDatasetEventsRequest, EventV1alpha1Event.ListEventsResponse>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}/events?${fm.renderURLSearchParams(req, ["storageName", "prepullName"])}`, {...initReq, method: "GET"})
147
220
  }
148
- static UpdatePrepull(req: UpdatePrepullRequest, initReq?: fm.InitReq): Promise<Prepull> {
149
- return fm.fetchReq<UpdatePrepullRequest, Prepull>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["name"]}/prepulls/${req["prepullName"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
221
+ static GetPrePullSyncProcess(req: SinglePrePullRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiStorageV1alpha1Filesstorage.PrePullSyncProcess> {
222
+ return fm.fetchReq<SinglePrePullRequest, HydraManagement_apiStorageV1alpha1Filesstorage.PrePullSyncProcess>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}/sync-process?${fm.renderURLSearchParams(req, ["storageName", "prepullName"])}`, {...initReq, method: "GET"})
150
223
  }
151
- static DeletePrepull(req: DeletePrepullRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
152
- return fm.fetchReq<DeletePrepullRequest, GoogleProtobufEmpty.Empty>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["name"]}/prepulls/${req["prepullName"]}`, {...initReq, method: "DELETE"})
224
+ static ValidateDataSourceSecrets(req: ValidateDataSourceSecretsRequest, initReq?: fm.InitReq): Promise<ValidateDataSourceSecretsResponse> {
225
+ return fm.fetchReq<ValidateDataSourceSecretsRequest, ValidateDataSourceSecretsResponse>(`/apis/admin.hydra.io/v1alpha1/filesstorages/validate-secrets`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
153
226
  }
154
- static RestartPrepull(req: RestartPrepullRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
155
- return fm.fetchReq<RestartPrepullRequest, GoogleProtobufEmpty.Empty>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["name"]}/prepulls/${req["prepullName"]}:restart`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
227
+ static GetPodInstanceList(req: HydraManagement_apiStorageV1alpha1Filesstorage.PodRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiStorageV1alpha1Filesstorage.PodInstanceListResponse> {
228
+ 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"})
156
229
  }
157
230
  }
@@ -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
+ }
@@ -8,6 +8,59 @@ 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 EventV1alpha1Event from "../../event/v1alpha1/event.pb"
12
+
13
+ type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
14
+ type OneOf<T> =
15
+ | { [k in keyof T]?: undefined }
16
+ | (
17
+ keyof T extends infer K ?
18
+ (K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
19
+ : never)
20
+ : never);
21
+
22
+ export enum DataSourceType {
23
+ DATA_SOURCE_TYPE_UNSPECIFIED = "DATA_SOURCE_TYPE_UNSPECIFIED",
24
+ GIT = "GIT",
25
+ S3 = "S3",
26
+ HTTP = "HTTP",
27
+ HUGGING_FACE = "HUGGING_FACE",
28
+ MODEL_SCOPE = "MODEL_SCOPE",
29
+ }
30
+
31
+ export enum SecretOptionsAuthType {
32
+ AUTH_TYPE_UNSPECIFIED = "AUTH_TYPE_UNSPECIFIED",
33
+ BASIC = "BASIC",
34
+ SSH = "SSH",
35
+ TOKEN = "TOKEN",
36
+ AK_SK = "AK_SK",
37
+ }
38
+
39
+ export enum DataSourceOptionsSyncMode {
40
+ SYNC_MODE_UNSPECIFIED = "SYNC_MODE_UNSPECIFIED",
41
+ copy = "copy",
42
+ sync = "sync",
43
+ }
44
+
45
+ export enum DataSourceOptionsS3Provider {
46
+ PROVIDER_UNSPECIFIED = "PROVIDER_UNSPECIFIED",
47
+ AWS = "AWS",
48
+ MINIO = "MINIO",
49
+ }
50
+
51
+ export enum DatasetStatusPhase {
52
+ DATA_SET_PHASE_UNSPECIFIED = "DATA_SET_PHASE_UNSPECIFIED",
53
+ PENDING = "PENDING",
54
+ READY = "READY",
55
+ PROCESSING = "PROCESSING",
56
+ FAILED = "FAILED",
57
+ }
58
+
59
+ export enum PrePullActionRequestAction {
60
+ ACTION_UNSPECIFIED = "ACTION_UNSPECIFIED",
61
+ RERUN = "RERUN",
62
+ }
63
+
11
64
  export type FilesStorageStatus = {
12
65
  phase?: string
13
66
  reason?: string
@@ -91,43 +144,212 @@ export type CreateFolderRequest = {
91
144
  path?: string
92
145
  }
93
146
 
94
- export type Prepull = {
147
+ export type DataSource = {
148
+ type?: DataSourceType
149
+ uri?: string
150
+ options?: DataSourceOptions
151
+ }
152
+
153
+ export type SecretOptionsBasicAuth = {
154
+ username?: string
155
+ password?: string
156
+ }
157
+
158
+ export type SecretOptionsSSHAuth = {
159
+ privateKey?: string
160
+ passphrase?: string
161
+ }
162
+
163
+ export type SecretOptionsTokenAuth = {
164
+ token?: string
165
+ }
166
+
167
+ export type SecretOptionsAkSkAuth = {
168
+ accessKey?: string
169
+ secretKey?: string
170
+ }
171
+
172
+
173
+ /* hydra modified */ export type BaseSecretOptions = {
174
+ authType?: SecretOptionsAuthType
175
+ }
176
+
177
+ export type SecretOptions = BaseSecretOptions
178
+ & OneOf<{ basic: SecretOptionsBasicAuth; ssh: SecretOptionsSSHAuth; token: SecretOptionsTokenAuth; akSk: SecretOptionsAkSkAuth }>
179
+
180
+ export type DataSourceOptionsGit = {
181
+ branch?: string
182
+ commit?: string
183
+ depth?: number
184
+ submodules?: boolean
185
+ }
186
+
187
+ export type DataSourceOptionsS3 = {
188
+ region?: string
189
+ endpoint?: string
190
+ provider?: DataSourceOptionsS3Provider
191
+ syncMode?: DataSourceOptionsSyncMode
192
+ }
193
+
194
+ export type DataSourceOptionsHttp = {
195
+ headers?: {[key: string]: string}
196
+ syncMode?: DataSourceOptionsSyncMode
197
+ }
198
+
199
+
200
+ /* hydra modified */ export type BaseDataSourceOptions = {
201
+ }
202
+
203
+ export type DataSourceOptions = BaseDataSourceOptions
204
+ & OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; huggingFace: DataSourceOptionsHuggingFace; modelScope: DataSourceOptionsModelScope }>
205
+
206
+ export type DataSourceOptionsHuggingFace = {
207
+ endpoint?: string
208
+ include?: string
209
+ exclude?: string
210
+ revision?: string
211
+ }
212
+
213
+ export type DataSourceOptionsModelScope = {
214
+ include?: string
215
+ exclude?: string
216
+ revision?: string
217
+ }
218
+
219
+ export type DatasetStatus = {
220
+ phase?: DatasetStatusPhase
221
+ }
222
+
223
+ export type PrePull = {
95
224
  name?: string
96
- status?: string
225
+ cluster?: string
226
+ namespace?: string
227
+ path?: string
228
+ storageName?: string
229
+ description?: string
230
+ creationTimestamp?: GoogleProtobufTimestamp.Timestamp
231
+ labels?: {[key: string]: string}
232
+ annotations?: {[key: string]: string}
233
+ source?: DataSource
234
+ status?: DatasetStatus
235
+ lastSync?: GoogleProtobufTimestamp.Timestamp
236
+ secretRef?: string
237
+ workspace?: number
97
238
  }
98
239
 
99
- export type ListPrepullsRequest = {
240
+ export type ListPrePullsRequest = {
241
+ storageName?: string
100
242
  workspace?: number
101
- name?: string
243
+ cluster?: string
102
244
  page?: HydraCommonCommon.Pagination
103
245
  }
104
246
 
105
- export type ListPrepullsResponse = {
106
- items?: Prepull[]
247
+ export type ListPrePullsResponse = {
248
+ items?: PrePull[]
107
249
  page?: HydraCommonCommon.Pagination
108
250
  }
109
251
 
110
- export type CreatePrepullRequest = {
252
+ export type CreatePrePullRequest = {
253
+ prepullName?: string
254
+ cluster?: string
255
+ path?: string
256
+ storageName?: string
257
+ description?: string
258
+ labels?: {[key: string]: string}
259
+ annotations?: {[key: string]: string}
260
+ source?: DataSource
261
+ secretOptions?: SecretOptions
262
+ workspace?: number
263
+ }
264
+
265
+
266
+ /* hydra modified */ export type BaseUpdatePrePullRequest = {
267
+ cluster?: string
268
+ storageName?: string
269
+ prepullName?: string
270
+ description?: string
271
+ labels?: {[key: string]: string}
272
+ annotations?: {[key: string]: string}
273
+ secretOptions?: SecretOptions
111
274
  workspace?: number
112
- name?: string
275
+ path?: string
113
276
  }
114
277
 
115
- export type UpdatePrepullRequest = {
278
+ export type UpdatePrePullRequest = BaseUpdatePrePullRequest
279
+ & OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; huggingFace: DataSourceOptionsHuggingFace; modelScope: DataSourceOptionsModelScope }>
280
+
281
+ export type DeletePrePullRequest = {
282
+ storageName?: string
283
+ prepullName?: string
116
284
  workspace?: number
117
- name?: string
285
+ }
286
+
287
+ export type PrePullActionRequest = {
288
+ cluster?: string
289
+ storageName?: string
118
290
  prepullName?: string
291
+ action?: PrePullActionRequestAction
292
+ workspace?: number
119
293
  }
120
294
 
121
- export type DeletePrepullRequest = {
295
+ export type ValidateDataSourceSecretsRequest = {
296
+ source?: DataSource
297
+ secretOptions?: SecretOptions
122
298
  workspace?: number
123
- name?: string
299
+ }
300
+
301
+ export type ValidateDataSourceSecretsResponse = {
302
+ valid?: boolean
303
+ message?: string
304
+ }
305
+
306
+ export type ListDatasetEventsRequest = {
307
+ cluster?: string
308
+ storageName?: string
309
+ prepullName?: string
310
+ page?: HydraCommonCommon.Pagination
311
+ workspace?: number
312
+ }
313
+
314
+ export type SinglePrePullRequest = {
315
+ cluster?: string
316
+ storageName?: string
124
317
  prepullName?: string
318
+ workspace?: number
125
319
  }
126
320
 
127
- export type RestartPrepullRequest = {
321
+ export type PrePullSyncProcess = {
322
+ status?: DatasetStatus
323
+ syncProcess?: number
324
+ }
325
+
326
+ export type PodRequest = {
128
327
  workspace?: number
129
- name?: string
328
+ storageName?: string
130
329
  prepullName?: string
330
+ page?: HydraCommonCommon.Pagination
331
+ }
332
+
333
+ export type PodInstance = {
334
+ cluster?: string
335
+ namespace?: string
336
+ name?: string
337
+ phase?: string
338
+ containerReadyCount?: number
339
+ containerTotalCount?: number
340
+ podIp?: string
341
+ nodeName?: string
342
+ containers?: Container[]
343
+ creationTimestamp?: GoogleProtobufTimestamp.Timestamp
344
+ }
345
+
346
+ export type Container = {
347
+ name?: string
348
+ }
349
+
350
+ export type PodInstanceListResponse = {
351
+ items?: PodInstance[]
352
+ page?: HydraCommonCommon.Pagination
131
353
  }
132
354
 
133
355
  export class WSFilesStorageService {
@@ -152,19 +374,31 @@ export class WSFilesStorageService {
152
374
  static CreateWSFolder(req: CreateFolderRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
153
375
  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)})
154
376
  }
155
- static ListWSPrepulls(req: ListPrepullsRequest, initReq?: fm.InitReq): Promise<ListPrepullsResponse> {
156
- return fm.fetchReq<ListPrepullsRequest, ListPrepullsResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["name"]}/prepulls?${fm.renderURLSearchParams(req, ["workspace", "name"])}`, {...initReq, method: "GET"})
377
+ static WSListPrePulls(req: ListPrePullsRequest, initReq?: fm.InitReq): Promise<ListPrePullsResponse> {
378
+ return fm.fetchReq<ListPrePullsRequest, ListPrePullsResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["storageName"]}/prepulls?${fm.renderURLSearchParams(req, ["workspace", "storageName"])}`, {...initReq, method: "GET"})
379
+ }
380
+ static WSCreatePrePull(req: CreatePrePullRequest, initReq?: fm.InitReq): Promise<PrePull> {
381
+ 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)})
382
+ }
383
+ static WSUpdatePrePull(req: UpdatePrePullRequest, initReq?: fm.InitReq): Promise<PrePull> {
384
+ 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)})
385
+ }
386
+ static WSDeletePrePull(req: DeletePrePullRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
387
+ return fm.fetchReq<DeletePrePullRequest, GoogleProtobufEmpty.Empty>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["storageName"]}/prepulls/${req["prepullName"]}`, {...initReq, method: "DELETE"})
388
+ }
389
+ static WSDatasetDoAction(req: PrePullActionRequest, initReq?: fm.InitReq): Promise<PrePull> {
390
+ 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)})
157
391
  }
158
- static CreateWSPrepull(req: CreatePrepullRequest, initReq?: fm.InitReq): Promise<Prepull> {
159
- return fm.fetchReq<CreatePrepullRequest, Prepull>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["name"]}/prepulls`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
392
+ static WSListPrePullEvents(req: ListDatasetEventsRequest, initReq?: fm.InitReq): Promise<EventV1alpha1Event.ListEventsResponse> {
393
+ 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"})
160
394
  }
161
- static UpdateWSPrepull(req: UpdatePrepullRequest, initReq?: fm.InitReq): Promise<Prepull> {
162
- return fm.fetchReq<UpdatePrepullRequest, Prepull>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["name"]}/prepulls/${req["prepullName"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
395
+ static WSGetPrePullSyncProcess(req: SinglePrePullRequest, initReq?: fm.InitReq): Promise<PrePullSyncProcess> {
396
+ 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"})
163
397
  }
164
- static DeleteWSPrepull(req: DeletePrepullRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
165
- return fm.fetchReq<DeletePrepullRequest, GoogleProtobufEmpty.Empty>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["name"]}/prepulls/${req["prepullName"]}`, {...initReq, method: "DELETE"})
398
+ static WSValidateDataSourceSecrets(req: ValidateDataSourceSecretsRequest, initReq?: fm.InitReq): Promise<ValidateDataSourceSecretsResponse> {
399
+ return fm.fetchReq<ValidateDataSourceSecretsRequest, ValidateDataSourceSecretsResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/validate-secrets`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
166
400
  }
167
- static RestartWSPrepull(req: RestartPrepullRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
168
- return fm.fetchReq<RestartPrepullRequest, GoogleProtobufEmpty.Empty>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["name"]}/prepulls/${req["prepullName"]}:restart`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
401
+ static WSGetPodInstanceList(req: PodRequest, initReq?: fm.InitReq): Promise<PodInstanceListResponse> {
402
+ 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"})
169
403
  }
170
404
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/hydra",
3
- "version": "v0.11.0-dev-8",
3
+ "version": "v0.11.0-dev-9",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"