@daocloud-proto/mcamel-redis 0.4.0-19 → 0.4.0-190

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,78 @@
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 GoogleProtobufEmpty from "../../../google/protobuf/empty.pb"
8
+ import * as CommonCommon from "./common.pb"
9
+ import * as fm from "./fetch.pb"
10
+
11
+ export enum CreateCloudShellRequestType {
12
+ TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED",
13
+ bash = "bash",
14
+ exec = "exec",
15
+ logs = "logs",
16
+ upload = "upload",
17
+ download = "download",
18
+ }
19
+
20
+ export type ObjectMeta = {
21
+ name?: string
22
+ namespace?: string
23
+ uid?: string
24
+ resourceVersion?: string
25
+ creationTimestamp?: string
26
+ deletionTimestamp?: string
27
+ labels?: {[key: string]: string}
28
+ annotations?: {[key: string]: string}
29
+ ownerReferences?: CommonCommon.OwnerReference[]
30
+ cluster?: string
31
+ workspaceAlias?: string
32
+ }
33
+
34
+ export type CloudShell = {
35
+ metadata?: ObjectMeta
36
+ spec?: CloudShellSpec
37
+ status?: CloudShellStatus
38
+ }
39
+
40
+ export type CloudShellSpec = {
41
+ configMapName?: string
42
+ once?: boolean
43
+ commandAction?: string
44
+ ttl?: number
45
+ cleanup?: boolean
46
+ }
47
+
48
+ export type CloudShellStatus = {
49
+ phase?: string
50
+ accessUrl?: string
51
+ }
52
+
53
+ export type CreateCloudShellRequest = {
54
+ type?: CreateCloudShellRequestType
55
+ cluster?: string
56
+ namespace?: string
57
+ podName?: string
58
+ filePath?: string
59
+ container?: string
60
+ logCount?: number
61
+ data?: CloudShell
62
+ }
63
+
64
+ export type GetorDeleteCloudShellRequest = {
65
+ name?: string
66
+ }
67
+
68
+ export class CloudShellService {
69
+ static CreateCloudShell(req: CreateCloudShellRequest, initReq?: fm.InitReq): Promise<CloudShell> {
70
+ return fm.fetchReq<CreateCloudShellRequest, CloudShell>(`/apis/mcamel.io/redis/v1alpha1/cloudshells`, {...initReq, method: "POST", body: JSON.stringify(req)})
71
+ }
72
+ static GetCloudShell(req: GetorDeleteCloudShellRequest, initReq?: fm.InitReq): Promise<CloudShell> {
73
+ return fm.fetchReq<GetorDeleteCloudShellRequest, CloudShell>(`/apis/mcamel.io/redis/v1alpha1/cloudshells/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
74
+ }
75
+ static DeleteCloudShell(req: GetorDeleteCloudShellRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
76
+ return fm.fetchReq<GetorDeleteCloudShellRequest, GoogleProtobufEmpty.Empty>(`/apis/mcamel.io/redis/v1alpha1/cloudshells/${req["name"]}`, {...initReq, method: "DELETE"})
77
+ }
78
+ }
package/cluster.pb.ts CHANGED
@@ -13,6 +13,11 @@ export enum EventType {
13
13
  Warning = "Warning",
14
14
  }
15
15
 
16
+ export enum GetAllEventListReqSortDir {
17
+ ASC = "ASC",
18
+ DESC = "DESC",
19
+ }
20
+
16
21
  export enum GetEventListReqKind {
17
22
  KIND_UNSPECIFIED = "KIND_UNSPECIFIED",
18
23
  Pod = "Pod",
@@ -28,6 +33,61 @@ export enum GetInsightAgentStatusRespInsightAgentStatus {
28
33
  Install = "Install",
29
34
  }
30
35
 
36
+ export type GetAllEventListReq = {
37
+ page?: number
38
+ pageSize?: number
39
+ sortDir?: GetAllEventListReqSortDir
40
+ sortBy?: string
41
+ searchKey?: string
42
+ cluster?: string
43
+ namespace?: string
44
+ name?: string
45
+ eventType?: EventType
46
+ }
47
+
48
+ export type GetAllEventListRespItemsSource = {
49
+ component?: string
50
+ }
51
+
52
+ export type GetAllEventListRespItemsMetadata = {
53
+ uid?: string
54
+ name?: string
55
+ namespace?: string
56
+ annotations?: {[key: string]: string}
57
+ resourceVersion?: string
58
+ creationTimestamp?: string
59
+ }
60
+
61
+ export type GetAllEventListRespItemsInvolvedObject = {
62
+ uid?: string
63
+ kind?: string
64
+ name?: string
65
+ namespace?: string
66
+ apiVersion?: string
67
+ resourceVersion?: string
68
+ }
69
+
70
+ export type GetAllEventListRespItems = {
71
+ kind?: string
72
+ type?: string
73
+ count?: number
74
+ reason?: string
75
+ source?: GetAllEventListRespItemsSource
76
+ message?: string
77
+ metadata?: GetAllEventListRespItemsMetadata
78
+ apiVersion?: string
79
+ lastTimestamp?: string
80
+ firstTimestamp?: string
81
+ involvedObject?: GetAllEventListRespItemsInvolvedObject
82
+ reportingInstance?: string
83
+ reportingComponent?: string
84
+ }
85
+
86
+ export type GetAllEventListResp = {
87
+ items?: GetAllEventListRespItems[]
88
+ pagination?: CommonCommon.Pagination
89
+ }
90
+
31
91
  export type GetClusterNodeLabelListReq = {
32
92
  cluster?: string
33
93
  }
@@ -56,6 +116,24 @@ export type EventSource = {
56
116
  host?: string
57
117
  }
58
118
 
119
+ export type GetMetallbIPAddressPoolsListReq = {
120
+ cluster?: string
121
+ }
122
+
123
+ export type GetMetallbIPAddressPoolsListRespItem = {
124
+ name?: string
125
+ addresses?: string[]
126
+ autoAssign?: boolean
127
+ avoidBuggyIPs?: boolean
128
+ }
129
+
130
+ export type GetMetallbIPAddressPoolsListResp = {
131
+ items?: GetMetallbIPAddressPoolsListRespItem[]
132
+ isSupportLb?: boolean
133
+ externalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy[]
134
+ lbTyp?: CommonCommon.LBTyp[]
135
+ }
136
+
59
137
  export type GetEventListReq = {
60
138
  cluster?: string
61
139
  namespace?: string
@@ -152,4 +230,10 @@ export class Cluster {
152
230
  static GetEventList(req: GetEventListReq, initReq?: fm.InitReq): Promise<GetEventListResp> {
153
231
  return fm.fetchReq<GetEventListReq, GetEventListResp>(`/apis/mcamel.io/redis/v1alpha1/${req["cluster"]}/${req["namespace"]}/events?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
154
232
  }
233
+ static GetAllEventList(req: GetAllEventListReq, initReq?: fm.InitReq): Promise<GetAllEventListResp> {
234
+ return fm.fetchReq<GetAllEventListReq, GetAllEventListResp>(`/apis/mcamel.io/redis/v1alpha1/${req["cluster"]}/${req["namespace"]}/${req["name"]}/all-events?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
235
+ }
236
+ static GetMetallbIPAddressPoolsList(req: GetMetallbIPAddressPoolsListReq, initReq?: fm.InitReq): Promise<GetMetallbIPAddressPoolsListResp> {
237
+ return fm.fetchReq<GetMetallbIPAddressPoolsListReq, GetMetallbIPAddressPoolsListResp>(`/apis/mcamel.io/redis/v1alpha1/${req["cluster"]}/lbaddress/pools?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
238
+ }
155
239
  }
package/common.pb.ts CHANGED
@@ -4,6 +4,22 @@
4
4
  * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
5
  */
6
6
 
7
+ export enum ExternalTrafficPolicy {
8
+ Cluster = "Cluster",
9
+ Local = "Local",
10
+ }
11
+
12
+ export enum LBTyp {
13
+ MetalLB = "MetalLB",
14
+ Others = "Others",
15
+ }
16
+
17
+ export enum ServiceType {
18
+ ClusterIP = "ClusterIP",
19
+ NodePort = "NodePort",
20
+ LoadBalancer = "LoadBalancer",
21
+ }
22
+
7
23
  export enum PageInfoReqSortDir {
8
24
  ASC = "ASC",
9
25
  DESC = "DESC",
@@ -130,9 +146,20 @@ export type PodCommon = {
130
146
  memoryUsage?: number
131
147
  memoryLimit?: number
132
148
  conditions?: PodCommonCondition[]
149
+ containersName?: string[]
150
+ ownerReference?: OwnerReference[]
151
+ initContainersName?: string[]
152
+ }
153
+
154
+ export type OwnerReference = {
155
+ uid?: string
156
+ controller?: boolean
157
+ name?: string
158
+ kind?: string
133
159
  }
134
160
 
135
161
  export type CommonItemStatus = {
136
162
  serviceAddresses?: string[]
137
163
  webManagerAddress?: string
164
+ webLogAddress?: string
138
165
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/mcamel-redis",
3
- "version":"0.4.0-19",
3
+ "version":"0.4.0-190",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/redis.pb.ts CHANGED
@@ -36,6 +36,32 @@ export enum RedisPodType {
36
36
  FollowerRedis = "FollowerRedis",
37
37
  }
38
38
 
39
+ export enum GetRedisBackupListReqSortDir {
40
+ ASC = "ASC",
41
+ DESC = "DESC",
42
+ }
43
+
44
+ export enum GetMinioListReqSortDir {
45
+ ASC = "ASC",
46
+ DESC = "DESC",
47
+ }
48
+
49
+ export enum GetRedisBackupListRespRedisBackupItemStatusStatus {
50
+ Running = "Running",
51
+ Failed = "Failed",
52
+ Succeeded = "Succeeded",
53
+ }
54
+
55
+ export enum CreateRedisBackupReqProvider {
56
+ Minio = "Minio",
57
+ Other = "Other",
58
+ }
59
+
60
+ export enum UpdateRedisAutoBackupReqProvider {
61
+ Minio = "Minio",
62
+ Other = "Other",
63
+ }
64
+
39
65
  export enum GetRedisListReqSortDir {
40
66
  ASC = "ASC",
41
67
  DESC = "DESC",
@@ -46,10 +72,9 @@ export enum GetRedisConfReqSortDir {
46
72
  DESC = "DESC",
47
73
  }
48
74
 
49
- export enum CreateRedisReqServiceType {
50
- ClusterIP = "ClusterIP",
51
- NodePort = "NodePort",
52
- LoadBalancer = "LoadBalancer",
75
+ export enum CreateRedisReqRestoreProvider {
76
+ Minio = "Minio",
77
+ Other = "Other",
53
78
  }
54
79
 
55
80
  export enum GetRedisParamRespSelectSelectType {
@@ -76,6 +101,148 @@ export enum GetRedisConfRespItemsParamType {
76
101
  conf = "conf",
77
102
  }
78
103
 
104
+ export type CreateRedisRecoverReq = {
105
+ workspaceId?: number
106
+ cluster?: string
107
+ namespace?: string
108
+ name?: string
109
+ backupName?: string
110
+ targetRedisName?: string
111
+ instanceType?: InstanceType
112
+ }
113
+
114
+ export type CreateRedisRecoverResp = {
115
+ message?: string
116
+ }
117
+
118
+ export type DeleteRedisBackupReq = {
119
+ cluster?: string
120
+ namespace?: string
121
+ backupName?: string
122
+ isOpenAutoBackup?: boolean
123
+ }
124
+
125
+ export type DeleteRedisBackupResp = {
126
+ message?: string
127
+ }
128
+
129
+ export type GetRedisBackupListReq = {
130
+ page?: number
131
+ pageSize?: number
132
+ sortDir?: GetRedisBackupListReqSortDir
133
+ sortBy?: string
134
+ searchKey?: string
135
+ cluster?: string
136
+ namespace?: string
137
+ name?: string
138
+ }
139
+
140
+ export type GetMinioListReq = {
141
+ page?: number
142
+ pageSize?: number
143
+ sortDir?: GetMinioListReqSortDir
144
+ sortBy?: string
145
+ searchKey?: string
146
+ workspaceId?: number
147
+ }
148
+
149
+ export type GetMinioListResp = {
150
+ items?: TenantItem[]
151
+ pagination?: CommonCommon.Pagination
152
+ }
153
+
154
+ export type TenantItemCreateMinioReq = {
155
+ name?: string
156
+ namespace?: string
157
+ cluster?: string
158
+ }
159
+
160
+ export type TenantItem = {
161
+ apiVersion?: string
162
+ kind?: string
163
+ spec?: TenantItemCreateMinioReq
164
+ status?: TenantItemStatus
165
+ }
166
+
167
+ export type TenantItemStatus = {
168
+ common?: CommonCommon.CommonItemStatus
169
+ }
170
+
171
+ export type GetRedisBackupListRespRedisBackupItemMetadata = {
172
+ creationTimestamp?: string
173
+ name?: string
174
+ namespace?: string
175
+ }
176
+
177
+ export type GetRedisBackupListRespRedisBackupItemStatusJobCondition = {
178
+ type?: string
179
+ status?: string
180
+ reason?: string
181
+ message?: string
182
+ }
183
+
184
+ export type GetRedisBackupListRespRedisBackupItemStatus = {
185
+ completionTime?: string
186
+ startTime?: string
187
+ active?: number
188
+ succeeded?: number
189
+ failed?: number
190
+ conditions?: GetRedisBackupListRespRedisBackupItemStatusJobCondition[]
191
+ isAutoBackup?: boolean
192
+ status?: GetRedisBackupListRespRedisBackupItemStatusStatus
193
+ }
194
+
195
+ export type GetRedisBackupListRespRedisBackupItem = {
196
+ metadata?: GetRedisBackupListRespRedisBackupItemMetadata
197
+ spec?: CreateRedisBackupReq
198
+ status?: GetRedisBackupListRespRedisBackupItemStatus
199
+ }
200
+
201
+ export type GetRedisBackupListResp = {
202
+ items?: GetRedisBackupListRespRedisBackupItem[]
203
+ pagination?: CommonCommon.Pagination
204
+ }
205
+
206
+ export type CreateRedisBackupReq = {
207
+ cluster?: string
208
+ namespace?: string
209
+ name?: string
210
+ instanceType?: InstanceType
211
+ backupName?: string
212
+ accessKeyId?: string
213
+ accessKeySecret?: string
214
+ endpoint?: string
215
+ provider?: CreateRedisBackupReqProvider
216
+ storePath?: string
217
+ }
218
+
219
+ export type UpdateRedisAutoBackupReq = {
220
+ workspaceId?: number
221
+ cluster?: string
222
+ namespace?: string
223
+ name?: string
224
+ instanceType?: InstanceType
225
+ accessKeyId?: string
226
+ accessKeySecret?: string
227
+ endpoint?: string
228
+ provider?: UpdateRedisAutoBackupReqProvider
229
+ storePath?: string
230
+ isOpenAutoBackup?: boolean
231
+ backupSchedule?: string
232
+ backupHistoryLimit?: number
233
+ storageConfigName?: string
234
+ storageConfigNamespace?: string
235
+ storageConfigCluster?: string
236
+ }
237
+
238
+ export type UpdateRedisAutoBackupResp = {
239
+ message?: string
240
+ }
241
+
242
+ export type CreateRedisBackupResp = {
243
+ message?: string
244
+ }
245
+
79
246
  export type GetRedisUsersReq = {
80
247
  cluster?: string
81
248
  namespace?: string
@@ -126,6 +293,18 @@ export type CreateRedisReqPorts = {
126
293
  nodePort?: number
127
294
  }
128
295
 
296
+ export type CreateRedisReqRestore = {
297
+ enable?: boolean
298
+ accessKeyId?: string
299
+ accessKeySecret?: string
300
+ endpoint?: string
301
+ provider?: CreateRedisReqRestoreProvider
302
+ storePath?: string
303
+ backupName?: string
304
+ targetRedisName?: string
305
+ instanceType?: InstanceType
306
+ }
307
+
129
308
  export type CreateRedisReq = {
130
309
  cluster?: string
131
310
  namespace?: string
@@ -136,7 +315,7 @@ export type CreateRedisReq = {
136
315
  storageCapacity?: string
137
316
  instanceType?: InstanceType
138
317
  authPass?: string
139
- serviceType?: CreateRedisReqServiceType
318
+ serviceType?: CommonCommon.ServiceType
140
319
  serviceAnnotations?: {[key: string]: string}
141
320
  ports?: CreateRedisReqPorts[]
142
321
  cpuRequest?: string
@@ -147,6 +326,12 @@ export type CreateRedisReq = {
147
326
  version?: string
148
327
  followerReplicas?: number
149
328
  affinity?: CommonCommon.Affinity
329
+ externalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy
330
+ lbTyp?: CommonCommon.LBTyp
331
+ lbPoolName?: string
332
+ lbAddress?: string
333
+ restore?: CreateRedisReqRestore
334
+ autoBackupConfig?: UpdateRedisAutoBackupReq
150
335
  }
151
336
 
152
337
  export type UpdateRedisConfReq = {
@@ -324,6 +509,7 @@ export type RedisItemStatus = {
324
509
  clusterIPs?: string[]
325
510
  serviceAddr?: string
326
511
  common?: CommonCommon.CommonItemStatus
512
+ isControl?: boolean
327
513
  }
328
514
 
329
515
  export type RedisItemMetadata = {
@@ -381,4 +567,22 @@ export class Redis {
381
567
  static GetRedisUsers(req: GetRedisUsersReq, initReq?: fm.InitReq): Promise<GetRedisUsersResp> {
382
568
  return fm.fetchReq<GetRedisUsersReq, GetRedisUsersResp>(`/apis/mcamel.io/redis/v1alpha1/redis/${req["instanceType"]}/${req["cluster"]}/${req["namespace"]}/${req["name"]}/users?${fm.renderURLSearchParams(req, ["instanceType", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
383
569
  }
570
+ static CreateRedisBackup(req: CreateRedisBackupReq, initReq?: fm.InitReq): Promise<CreateRedisBackupResp> {
571
+ return fm.fetchReq<CreateRedisBackupReq, CreateRedisBackupResp>(`/apis/mcamel.io/redis/v1alpha1/redis/backup`, {...initReq, method: "POST", body: JSON.stringify(req)})
572
+ }
573
+ static UpdateRedisAutoBackup(req: UpdateRedisAutoBackupReq, initReq?: fm.InitReq): Promise<UpdateRedisAutoBackupResp> {
574
+ return fm.fetchReq<UpdateRedisAutoBackupReq, UpdateRedisAutoBackupResp>(`/apis/mcamel.io/redis/v1alpha1/redis/${req["cluster"]}/${req["namespace"]}/${req["name"]}/auto-backup`, {...initReq, method: "PUT", body: JSON.stringify(req)})
575
+ }
576
+ static GetRedisBackupList(req: GetRedisBackupListReq, initReq?: fm.InitReq): Promise<GetRedisBackupListResp> {
577
+ return fm.fetchReq<GetRedisBackupListReq, GetRedisBackupListResp>(`/apis/mcamel.io/redis/v1alpha1/redis/backups?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
578
+ }
579
+ static DeleteRedisBackup(req: DeleteRedisBackupReq, initReq?: fm.InitReq): Promise<DeleteRedisBackupResp> {
580
+ return fm.fetchReq<DeleteRedisBackupReq, DeleteRedisBackupResp>(`/apis/mcamel.io/redis/v1alpha1/redis/backups/${req["cluster"]}/${req["namespace"]}/${req["backupName"]}`, {...initReq, method: "DELETE"})
581
+ }
582
+ static GetMinioList(req: GetMinioListReq, initReq?: fm.InitReq): Promise<GetMinioListResp> {
583
+ return fm.fetchReq<GetMinioListReq, GetMinioListResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/minios?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
584
+ }
585
+ static CreateRedisRecover(req: CreateRedisRecoverReq, initReq?: fm.InitReq): Promise<CreateRedisRecoverResp> {
586
+ return fm.fetchReq<CreateRedisRecoverReq, CreateRedisRecoverResp>(`/apis/mcamel.io/redis/v1alpha1/redis/${req["cluster"]}/${req["namespace"]}/${req["name"]}/recover`, {...initReq, method: "POST", body: JSON.stringify(req)})
587
+ }
384
588
  }
@@ -0,0 +1,187 @@
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 CommonCommon from "./common.pb"
8
+ import * as fm from "./fetch.pb"
9
+
10
+ type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
11
+ type OneOf<T> =
12
+ | { [k in keyof T]?: undefined }
13
+ | (
14
+ keyof T extends infer K ?
15
+ (K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
16
+ : never)
17
+ : never);
18
+
19
+ export enum GetStorageConfigParamRespSelectSelectType {
20
+ Single = "Single",
21
+ Multiple = "Multiple",
22
+ }
23
+
24
+ export enum GetStorageConfigConsumersRespStorageConfigConsumerType {
25
+ STORAGE_CONFIG_CONSUMER_TYPE_UNSPECIFIED = "STORAGE_CONFIG_CONSUMER_TYPE_UNSPECIFIED",
26
+ STORAGE_CONFIG_CONSUMER_TYPE_MYSQL = "STORAGE_CONFIG_CONSUMER_TYPE_MYSQL",
27
+ }
28
+
29
+ export enum GetStorageConfigListReqSortDir {
30
+ ASC = "ASC",
31
+ DESC = "DESC",
32
+ }
33
+
34
+ export type GetStorageConfigParamReq = {
35
+ }
36
+
37
+ export type GetStorageConfigParamRespSelectDataStringValue = {
38
+ value?: string
39
+ }
40
+
41
+ export type GetStorageConfigParamRespSelectDataIntValue = {
42
+ value?: number
43
+ }
44
+
45
+
46
+ type BaseGetStorageConfigParamRespSelectData = {
47
+ }
48
+
49
+ export type GetStorageConfigParamRespSelectData = BaseGetStorageConfigParamRespSelectData
50
+ & OneOf<{ sValue: GetStorageConfigParamRespSelectDataStringValue; iValue: GetStorageConfigParamRespSelectDataIntValue }>
51
+
52
+ export type GetStorageConfigParamRespSelect = {
53
+ selectType?: GetStorageConfigParamRespSelectSelectType
54
+ data?: GetStorageConfigParamRespSelectData[]
55
+ }
56
+
57
+ export type GetStorageConfigParamResp = {
58
+ storageType?: GetStorageConfigParamRespSelect
59
+ }
60
+
61
+ export type CreateStorageConfigBucketCheckJobReq = {
62
+ storageType?: string
63
+ endpoint?: string
64
+ accessKey?: string
65
+ secretKey?: string
66
+ bucket?: string
67
+ cluster?: string
68
+ namespace?: string
69
+ name?: string
70
+ }
71
+
72
+ export type CreateStorageConfigBucketCheckJobResp = {
73
+ message?: string
74
+ }
75
+
76
+ export type CreateStorageConfigReq = {
77
+ workspaceId?: number
78
+ cluster?: string
79
+ namespace?: string
80
+ name?: string
81
+ storageType?: string
82
+ accessKey?: string
83
+ secretKey?: string
84
+ bucket?: string
85
+ endpoint?: string
86
+ minioCluster?: string
87
+ minioNamespace?: string
88
+ minioName?: string
89
+ description?: string
90
+ }
91
+
92
+ export type CreateStorageConfigResp = {
93
+ message?: string
94
+ }
95
+
96
+ export type GetStorageConfigConsumersReq = {
97
+ workspaceId?: number
98
+ name?: string
99
+ }
100
+
101
+ export type GetStorageConfigConsumersRespConsumer = {
102
+ type?: GetStorageConfigConsumersRespStorageConfigConsumerType
103
+ cluster?: string
104
+ namespace?: string
105
+ name?: string
106
+ }
107
+
108
+ export type GetStorageConfigConsumersResp = {
109
+ consumers?: GetStorageConfigConsumersRespConsumer[]
110
+ }
111
+
112
+ export type DeleteStorageConfigReq = {
113
+ workspaceId?: number
114
+ name?: string
115
+ cluster?: string
116
+ namespace?: string
117
+ }
118
+
119
+ export type DeleteStorageConfigResp = {
120
+ message?: string
121
+ }
122
+
123
+ export type UpdateStorageConfigResp = {
124
+ message?: string
125
+ }
126
+
127
+ export type StorageConfigItemStorageConfigStatus = {
128
+ lastUpdateTimestamp?: string
129
+ createTimestamp?: string
130
+ }
131
+
132
+ export type StorageConfigItem = {
133
+ spec?: CreateStorageConfigReq
134
+ status?: StorageConfigItemStorageConfigStatus
135
+ }
136
+
137
+ export type GetStorageConfigReq = {
138
+ workspaceId?: number
139
+ name?: string
140
+ namespace?: string
141
+ cluster?: string
142
+ }
143
+
144
+ export type GetStorageConfigResp = {
145
+ item?: StorageConfigItem
146
+ }
147
+
148
+ export type GetStorageConfigListReq = {
149
+ page?: number
150
+ pageSize?: number
151
+ sortDir?: GetStorageConfigListReqSortDir
152
+ sortBy?: string
153
+ searchKey?: string
154
+ workspaceId?: number
155
+ }
156
+
157
+ export type GetStorageConfigListResp = {
158
+ items?: StorageConfigItem[]
159
+ pagination?: CommonCommon.Pagination
160
+ }
161
+
162
+ export class StorageConfig {
163
+ static GetStorageConfigParam(req: GetStorageConfigParamReq, initReq?: fm.InitReq): Promise<GetStorageConfigParamResp> {
164
+ return fm.fetchReq<GetStorageConfigParamReq, GetStorageConfigParamResp>(`/apis/mcamel.io/redis/v1alpha1/storage-config/param?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
165
+ }
166
+ static CreateStorageConfigBucketCheckJob(req: CreateStorageConfigBucketCheckJobReq, initReq?: fm.InitReq): Promise<CreateStorageConfigBucketCheckJobResp> {
167
+ return fm.fetchReq<CreateStorageConfigBucketCheckJobReq, CreateStorageConfigBucketCheckJobResp>(`/apis/mcamel.io/redis/v1alpha1/storage-config/bucket/check-job`, {...initReq, method: "POST", body: JSON.stringify(req)})
168
+ }
169
+ static CreateStorageConfig(req: CreateStorageConfigReq, initReq?: fm.InitReq): Promise<CreateStorageConfigResp> {
170
+ return fm.fetchReq<CreateStorageConfigReq, CreateStorageConfigResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/storage-config`, {...initReq, method: "POST", body: JSON.stringify(req)})
171
+ }
172
+ static GetStorageConfigConsumers(req: GetStorageConfigConsumersReq, initReq?: fm.InitReq): Promise<GetStorageConfigConsumersResp> {
173
+ return fm.fetchReq<GetStorageConfigConsumersReq, GetStorageConfigConsumersResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/storage-config/${req["name"]}/consumers?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
174
+ }
175
+ static DeleteStorageConfig(req: DeleteStorageConfigReq, initReq?: fm.InitReq): Promise<DeleteStorageConfigResp> {
176
+ return fm.fetchReq<DeleteStorageConfigReq, DeleteStorageConfigResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/storage-config/${req["cluster"]}/${req["namespace"]}/${req["name"]}`, {...initReq, method: "DELETE"})
177
+ }
178
+ static UpdateStorageConfig(req: CreateStorageConfigReq, initReq?: fm.InitReq): Promise<UpdateStorageConfigResp> {
179
+ return fm.fetchReq<CreateStorageConfigReq, UpdateStorageConfigResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/storage-config/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
180
+ }
181
+ static GetStorageConfig(req: GetStorageConfigReq, initReq?: fm.InitReq): Promise<GetStorageConfigResp> {
182
+ return fm.fetchReq<GetStorageConfigReq, GetStorageConfigResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/storage-config/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
183
+ }
184
+ static GetStorageConfigList(req: GetStorageConfigListReq, initReq?: fm.InitReq): Promise<GetStorageConfigListResp> {
185
+ return fm.fetchReq<GetStorageConfigListReq, GetStorageConfigListResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/storage-configs?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
186
+ }
187
+ }