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

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.
@@ -0,0 +1,157 @@
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
+ export type FilesStorageStatus = {
12
+ phase?: string
13
+ reason?: string
14
+ pvcName?: string
15
+ pvcNamespace?: string
16
+ storageServer?: StorageServerStatus
17
+ }
18
+
19
+ export type FilesStorage = {
20
+ name?: string
21
+ cluster?: string
22
+ pvcNamespace?: string
23
+ storageClassName?: string
24
+ capacity?: string
25
+ status?: FilesStorageStatus
26
+ createTime?: GoogleProtobufTimestamp.Timestamp
27
+ description?: string
28
+ }
29
+
30
+ export type StorageServerStatus = {
31
+ phase?: string
32
+ name?: string
33
+ namespace?: string
34
+ }
35
+
36
+ export type ListFilesStoragesRequest = {
37
+ page?: HydraCommonCommon.Pagination
38
+ cluster?: string
39
+ }
40
+
41
+ export type ListFilesStoragesResponse = {
42
+ items?: FilesStorage[]
43
+ page?: HydraCommonCommon.Pagination
44
+ }
45
+
46
+ export type GetFilesStorageRequest = {
47
+ name?: string
48
+ }
49
+
50
+ export type CreateFilesStorageRequest = {
51
+ cluster?: string
52
+ description?: string
53
+ }
54
+
55
+ export type UpdateFilesStorageRequest = {
56
+ name?: string
57
+ description?: string
58
+ }
59
+
60
+ export type DeleteFilesStorageRequest = {
61
+ name?: string
62
+ }
63
+
64
+ export type FileInfo = {
65
+ name?: string
66
+ isDir?: boolean
67
+ size?: string
68
+ modTime?: GoogleProtobufTimestamp.Timestamp
69
+ }
70
+
71
+ export type ListFilesRequest = {
72
+ name?: string
73
+ path?: string
74
+ }
75
+
76
+ export type ListFilesResponse = {
77
+ items?: FileInfo[]
78
+ }
79
+
80
+ export type CreateFolderRequest = {
81
+ name?: string
82
+ folderName?: string
83
+ path?: string
84
+ }
85
+
86
+ export type Prepull = {
87
+ name?: string
88
+ status?: string
89
+ }
90
+
91
+ export type ListPrepullsRequest = {
92
+ name?: string
93
+ page?: HydraCommonCommon.Pagination
94
+ }
95
+
96
+ export type ListPrepullsResponse = {
97
+ items?: Prepull[]
98
+ page?: HydraCommonCommon.Pagination
99
+ }
100
+
101
+ export type CreatePrepullRequest = {
102
+ name?: string
103
+ }
104
+
105
+ export type UpdatePrepullRequest = {
106
+ name?: string
107
+ prepullName?: string
108
+ }
109
+
110
+ export type DeletePrepullRequest = {
111
+ name?: string
112
+ prepullName?: string
113
+ }
114
+
115
+ export type RestartPrepullRequest = {
116
+ name?: string
117
+ prepullName?: string
118
+ }
119
+
120
+ export class AdminFilesStorageService {
121
+ static ListFilesStorages(req: ListFilesStoragesRequest, initReq?: fm.InitReq): Promise<ListFilesStoragesResponse> {
122
+ return fm.fetchReq<ListFilesStoragesRequest, ListFilesStoragesResponse>(`/apis/admin.hydra.io/v1alpha1/filesstorages?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
123
+ }
124
+ static GetFilesStorage(req: GetFilesStorageRequest, initReq?: fm.InitReq): Promise<FilesStorage> {
125
+ return fm.fetchReq<GetFilesStorageRequest, FilesStorage>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
126
+ }
127
+ static CreateFilesStorage(req: CreateFilesStorageRequest, initReq?: fm.InitReq): Promise<FilesStorage> {
128
+ return fm.fetchReq<CreateFilesStorageRequest, FilesStorage>(`/apis/admin.hydra.io/v1alpha1/filesstorages`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
129
+ }
130
+ static UpdateFilesStorage(req: UpdateFilesStorageRequest, initReq?: fm.InitReq): Promise<FilesStorage> {
131
+ return fm.fetchReq<UpdateFilesStorageRequest, FilesStorage>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
132
+ }
133
+ static DeleteFilesStorage(req: DeleteFilesStorageRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
134
+ return fm.fetchReq<DeleteFilesStorageRequest, GoogleProtobufEmpty.Empty>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["name"]}`, {...initReq, method: "DELETE"})
135
+ }
136
+ static ListFiles(req: ListFilesRequest, initReq?: fm.InitReq): Promise<ListFilesResponse> {
137
+ return fm.fetchReq<ListFilesRequest, ListFilesResponse>(`/apis/admin.hydra.io/v1alpha1/filesstorages/${req["name"]}/files?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
138
+ }
139
+ static CreateFolder(req: CreateFolderRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
140
+ 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
+ }
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"})
144
+ }
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)})
147
+ }
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)})
150
+ }
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"})
153
+ }
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)})
156
+ }
157
+ }
@@ -0,0 +1,170 @@
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
+ export type FilesStorageStatus = {
12
+ phase?: string
13
+ reason?: string
14
+ pvcName?: string
15
+ pvcNamespace?: string
16
+ storageServer?: StorageServerStatus
17
+ }
18
+
19
+ export type FilesStorage = {
20
+ name?: string
21
+ cluster?: string
22
+ pvcNamespace?: string
23
+ storageClassName?: string
24
+ capacity?: string
25
+ status?: FilesStorageStatus
26
+ createTime?: GoogleProtobufTimestamp.Timestamp
27
+ workspace?: number
28
+ description?: string
29
+ }
30
+
31
+ export type StorageServerStatus = {
32
+ phase?: string
33
+ name?: string
34
+ namespace?: string
35
+ }
36
+
37
+ export type ListFilesStoragesRequest = {
38
+ workspace?: number
39
+ page?: HydraCommonCommon.Pagination
40
+ cluster?: string
41
+ }
42
+
43
+ export type ListFilesStoragesResponse = {
44
+ items?: FilesStorage[]
45
+ page?: HydraCommonCommon.Pagination
46
+ }
47
+
48
+ export type GetFilesStorageRequest = {
49
+ workspace?: number
50
+ name?: string
51
+ }
52
+
53
+ export type CreateFilesStorageRequest = {
54
+ workspace?: number
55
+ cluster?: string
56
+ description?: string
57
+ }
58
+
59
+ export type UpdateFilesStorageRequest = {
60
+ workspace?: number
61
+ name?: string
62
+ description?: string
63
+ }
64
+
65
+ export type DeleteFilesStorageRequest = {
66
+ workspace?: number
67
+ name?: string
68
+ }
69
+
70
+ export type FileInfo = {
71
+ name?: string
72
+ isDir?: boolean
73
+ size?: string
74
+ modTime?: GoogleProtobufTimestamp.Timestamp
75
+ }
76
+
77
+ export type ListFilesRequest = {
78
+ workspace?: number
79
+ name?: string
80
+ path?: string
81
+ }
82
+
83
+ export type ListFilesResponse = {
84
+ items?: FileInfo[]
85
+ }
86
+
87
+ export type CreateFolderRequest = {
88
+ workspace?: number
89
+ name?: string
90
+ folderName?: string
91
+ path?: string
92
+ }
93
+
94
+ export type Prepull = {
95
+ name?: string
96
+ status?: string
97
+ }
98
+
99
+ export type ListPrepullsRequest = {
100
+ workspace?: number
101
+ name?: string
102
+ page?: HydraCommonCommon.Pagination
103
+ }
104
+
105
+ export type ListPrepullsResponse = {
106
+ items?: Prepull[]
107
+ page?: HydraCommonCommon.Pagination
108
+ }
109
+
110
+ export type CreatePrepullRequest = {
111
+ workspace?: number
112
+ name?: string
113
+ }
114
+
115
+ export type UpdatePrepullRequest = {
116
+ workspace?: number
117
+ name?: string
118
+ prepullName?: string
119
+ }
120
+
121
+ export type DeletePrepullRequest = {
122
+ workspace?: number
123
+ name?: string
124
+ prepullName?: string
125
+ }
126
+
127
+ export type RestartPrepullRequest = {
128
+ workspace?: number
129
+ name?: string
130
+ prepullName?: string
131
+ }
132
+
133
+ export class WSFilesStorageService {
134
+ static ListWSFilesStorages(req: ListFilesStoragesRequest, initReq?: fm.InitReq): Promise<ListFilesStoragesResponse> {
135
+ return fm.fetchReq<ListFilesStoragesRequest, ListFilesStoragesResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
136
+ }
137
+ static GetWSFilesStorage(req: GetFilesStorageRequest, initReq?: fm.InitReq): Promise<FilesStorage> {
138
+ return fm.fetchReq<GetFilesStorageRequest, FilesStorage>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["name"]}?${fm.renderURLSearchParams(req, ["workspace", "name"])}`, {...initReq, method: "GET"})
139
+ }
140
+ static CreateWSFilesStorage(req: CreateFilesStorageRequest, initReq?: fm.InitReq): Promise<FilesStorage> {
141
+ return fm.fetchReq<CreateFilesStorageRequest, FilesStorage>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
142
+ }
143
+ static UpdateWSFilesStorage(req: UpdateFilesStorageRequest, initReq?: fm.InitReq): Promise<FilesStorage> {
144
+ return fm.fetchReq<UpdateFilesStorageRequest, FilesStorage>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
145
+ }
146
+ static DeleteWSFilesStorage(req: DeleteFilesStorageRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
147
+ return fm.fetchReq<DeleteFilesStorageRequest, GoogleProtobufEmpty.Empty>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["name"]}`, {...initReq, method: "DELETE"})
148
+ }
149
+ static ListWSFiles(req: ListFilesRequest, initReq?: fm.InitReq): Promise<ListFilesResponse> {
150
+ return fm.fetchReq<ListFilesRequest, ListFilesResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/filesstorages/${req["name"]}/files?${fm.renderURLSearchParams(req, ["workspace", "name"])}`, {...initReq, method: "GET"})
151
+ }
152
+ static CreateWSFolder(req: CreateFolderRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
153
+ 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
+ }
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"})
157
+ }
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)})
160
+ }
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)})
163
+ }
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"})
166
+ }
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)})
169
+ }
170
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/hydra",
3
- "version": "v0.11.0-dev-6",
3
+ "version": "v0.11.0-dev-8",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"