@daocloud-proto/mcamel-postgresql 0.0.2-29 → 0.0.2-290

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.
package/cluster.pb.ts CHANGED
@@ -7,6 +7,30 @@
7
7
  import * as CommonCommon from "./common.pb"
8
8
  import * as fm from "./fetch.pb"
9
9
 
10
+ export enum PermissionsType {
11
+ None = "None",
12
+ GetInstance = "GetInstance",
13
+ CreateInstance = "CreateInstance",
14
+ UpdateInstance = "UpdateInstance",
15
+ DeleteInstance = "DeleteInstance",
16
+ GetMetric = "GetMetric",
17
+ GetInstanceLog = "GetInstanceLog",
18
+ GetConfig = "GetConfig",
19
+ UpdateConfig = "UpdateConfig",
20
+ GetBackup = "GetBackup",
21
+ CreateBackup = "CreateBackup",
22
+ UpdateBackup = "UpdateBackup",
23
+ DeleteBackup = "DeleteBackup",
24
+ GetBackupConf = "GetBackupConf",
25
+ CreateBackupConf = "CreateBackupConf",
26
+ UpdateBackupConf = "UpdateBackupConf",
27
+ DeleteBackupConf = "DeleteBackupConf",
28
+ GetTemplate = "GetTemplate",
29
+ CreateTemplate = "CreateTemplate",
30
+ UpdateTemplate = "UpdateTemplate",
31
+ DeleteTemplate = "DeleteTemplate",
32
+ }
33
+
10
34
  export enum EventType {
11
35
  EVENT_TYPE_UNSPECIFIED = "EVENT_TYPE_UNSPECIFIED",
12
36
  Normal = "Normal",
@@ -28,11 +52,88 @@ export enum GetWorkspaceListReqSortDir {
28
52
  DESC = "DESC",
29
53
  }
30
54
 
55
+ export enum ClusterItemNetworkMode {
56
+ Unknown = "Unknown",
57
+ Flannel = "Flannel",
58
+ Calico = "Calico",
59
+ }
60
+
31
61
  export enum GetInsightAgentStatusRespInsightAgentStatus {
32
62
  NotInstall = "NotInstall",
33
63
  Install = "Install",
34
64
  }
35
65
 
66
+ export type GetInstallVersionReq = {
67
+ cluster?: string
68
+ }
69
+
70
+ export type GetInstallVersionRespSupportVersion = {
71
+ minVersion?: string
72
+ maxVersion?: string
73
+ }
74
+
75
+ export type GetInstallVersionRespStatus = {
76
+ inRange?: boolean
77
+ }
78
+
79
+ export type GetInstallVersionResp = {
80
+ clusterVersion?: string
81
+ supportVersion?: GetInstallVersionRespSupportVersion
82
+ status?: GetInstallVersionRespStatus
83
+ }
84
+
85
+ export type RestartInstanceReq = {
86
+ workspaceId?: number
87
+ cluster?: string
88
+ namespace?: string
89
+ name?: string
90
+ extra?: string
91
+ }
92
+
93
+ export type RestartInstanceResp = {
94
+ message?: string
95
+ }
96
+
97
+ export type GetPermissionsListReq = {
98
+ workspaceId?: number
99
+ }
100
+
101
+ export type GetPermissionsListRespPermissions = {
102
+ getInstance?: boolean
103
+ createInstance?: boolean
104
+ updateInstance?: boolean
105
+ deleteInstance?: boolean
106
+ getMetric?: boolean
107
+ getInstanceLog?: boolean
108
+ getConfig?: boolean
109
+ updateConfig?: boolean
110
+ getBackup?: boolean
111
+ createBackup?: boolean
112
+ updateBackup?: boolean
113
+ deleteBackup?: boolean
114
+ getBackupConf?: boolean
115
+ createBackupConf?: boolean
116
+ updateBackupConf?: boolean
117
+ deleteBackupConf?: boolean
118
+ getTemplate?: boolean
119
+ createTemplate?: boolean
120
+ updateTemplate?: boolean
121
+ deleteTemplate?: boolean
122
+ }
123
+
124
+ export type GetPermissionsListResp = {
125
+ permissionsBool?: GetPermissionsListRespPermissions
126
+ permissions?: PermissionsType[]
127
+ }
128
+
129
+ export type GetAllEventKindsListResp = {
130
+ data?: string[]
131
+ }
132
+
133
+ export type GetAllEventKindsListReq = {
134
+ cluster?: string
135
+ }
136
+
36
137
  export type GetAllEventListReq = {
37
138
  page?: number
38
139
  pageSize?: number
@@ -43,6 +144,7 @@ export type GetAllEventListReq = {
43
144
  namespace?: string
44
145
  name?: string
45
146
  eventType?: EventType
147
+ kindName?: string
46
148
  }
47
149
 
48
150
  export type GetAllEventListRespItemsSource = {
@@ -102,6 +204,24 @@ export type GetClusterNodeLabelListResp = {
102
204
  pagination?: CommonCommon.Pagination
103
205
  }
104
206
 
207
+ export type GetClusterPodLabelListReq = {
208
+ page?: number
209
+ pageSize?: number
210
+ searchKey?: string
211
+ filterNamespace?: string
212
+ cluster?: string
213
+ }
214
+
215
+ export type GetClusterPodLabelListRespLabel = {
216
+ key?: string
217
+ value?: string[]
218
+ }
219
+
220
+ export type GetClusterPodLabelListResp = {
221
+ items?: GetClusterPodLabelListRespLabel[]
222
+ pagination?: CommonCommon.Pagination
223
+ }
224
+
105
225
  export type GetClusterNodePortListReq = {
106
226
  cluster?: string
107
227
  }
@@ -174,6 +294,7 @@ export type GetWorkspaceListReq = {
174
294
  export type GetWorkspaceListRespItem = {
175
295
  workspaceId?: number
176
296
  alias?: string
297
+ visible?: boolean
177
298
  }
178
299
 
179
300
  export type GetWorkspaceListResp = {
@@ -183,13 +304,28 @@ export type GetWorkspaceListResp = {
183
304
 
184
305
  export type GetClusterListReq = {
185
306
  workspaceId?: number
307
+ searchKey?: string
186
308
  }
187
309
 
188
310
  export type GetClusterListResp = {
189
311
  items?: string[]
312
+ clusters?: ClusterItem[]
190
313
  pagination?: CommonCommon.Pagination
191
314
  }
192
315
 
316
+ export type ClusterItemMetadata = {
317
+ name?: string
318
+ }
319
+
320
+ export type ClusterItemStatus = {
321
+ networkMode?: ClusterItemNetworkMode[]
322
+ }
323
+
324
+ export type ClusterItem = {
325
+ metadata?: ClusterItemMetadata
326
+ status?: ClusterItemStatus
327
+ }
328
+
193
329
  export type GetClusterNamespaceListReq = {
194
330
  workspaceId?: number
195
331
  cluster?: string
@@ -221,6 +357,9 @@ export class Cluster {
221
357
  static GetClusterNodeLabelList(req: GetClusterNodeLabelListReq, initReq?: fm.InitReq): Promise<GetClusterNodeLabelListResp> {
222
358
  return fm.fetchReq<GetClusterNodeLabelListReq, GetClusterNodeLabelListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/nodelabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
223
359
  }
360
+ static GetClusterPodLabelList(req: GetClusterPodLabelListReq, initReq?: fm.InitReq): Promise<GetClusterPodLabelListResp> {
361
+ return fm.fetchReq<GetClusterPodLabelListReq, GetClusterPodLabelListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/podlabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
362
+ }
224
363
  static GetWorkspaceList(req: GetWorkspaceListReq, initReq?: fm.InitReq): Promise<GetWorkspaceListResp> {
225
364
  return fm.fetchReq<GetWorkspaceListReq, GetWorkspaceListResp>(`/apis/mcamel.io/postgresql/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
226
365
  }
@@ -233,7 +372,19 @@ export class Cluster {
233
372
  static GetAllEventList(req: GetAllEventListReq, initReq?: fm.InitReq): Promise<GetAllEventListResp> {
234
373
  return fm.fetchReq<GetAllEventListReq, GetAllEventListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/${req["namespace"]}/${req["name"]}/all-events?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
235
374
  }
375
+ static GetAllEventKindsList(req: GetAllEventKindsListReq, initReq?: fm.InitReq): Promise<GetAllEventKindsListResp> {
376
+ return fm.fetchReq<GetAllEventKindsListReq, GetAllEventKindsListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/all-events-kinds?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
377
+ }
236
378
  static GetMetallbIPAddressPoolsList(req: GetMetallbIPAddressPoolsListReq, initReq?: fm.InitReq): Promise<GetMetallbIPAddressPoolsListResp> {
237
379
  return fm.fetchReq<GetMetallbIPAddressPoolsListReq, GetMetallbIPAddressPoolsListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/lbaddress/pools?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
238
380
  }
381
+ static GetPermissionsList(req: GetPermissionsListReq, initReq?: fm.InitReq): Promise<GetPermissionsListResp> {
382
+ return fm.fetchReq<GetPermissionsListReq, GetPermissionsListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/permissions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
383
+ }
384
+ static RestartInstance(req: RestartInstanceReq, initReq?: fm.InitReq): Promise<RestartInstanceResp> {
385
+ return fm.fetchReq<RestartInstanceReq, RestartInstanceResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/restart`, {...initReq, method: "POST", body: JSON.stringify(req)})
386
+ }
387
+ static GetInstallVersion(req: GetInstallVersionReq, initReq?: fm.InitReq): Promise<GetInstallVersionResp> {
388
+ return fm.fetchReq<GetInstallVersionReq, GetInstallVersionResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/install-version?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
389
+ }
239
390
  }
package/common.pb.ts CHANGED
@@ -145,10 +145,14 @@ export type PodCommon = {
145
145
  cpuLimit?: number
146
146
  memoryUsage?: number
147
147
  memoryLimit?: number
148
+ pvUsedInGb?: number
149
+ pvAllocatedInGb?: number
148
150
  conditions?: PodCommonCondition[]
149
151
  containersName?: string[]
150
152
  ownerReference?: OwnerReference[]
151
153
  initContainersName?: string[]
154
+ initContainersStatuses?: ContainerStatus[]
155
+ containersStatuses?: ContainerStatus[]
152
156
  }
153
157
 
154
158
  export type OwnerReference = {
@@ -162,4 +166,52 @@ export type CommonItemStatus = {
162
166
  serviceAddresses?: string[]
163
167
  webManagerAddress?: string
164
168
  webLogAddress?: string
169
+ avgPvAllocatedInGb?: number
170
+ avgPvUsedInGb?: number
171
+ cpuUtilization?: number
172
+ memoryUtilization?: number
173
+ }
174
+
175
+ export type AccessWhitelistInternal = {
176
+ namespace?: string
177
+ podSelector?: {[key: string]: string}
178
+ }
179
+
180
+ export type AccessWhitelistExternal = {
181
+ cidr?: string
182
+ ip?: string
183
+ }
184
+
185
+ export type AccessWhitelist = {
186
+ internals?: AccessWhitelistInternal[]
187
+ externals?: AccessWhitelistExternal[]
188
+ }
189
+
190
+ export type ContainerStatus = {
191
+ name?: string
192
+ state?: ContainerState
193
+ }
194
+
195
+ export type ContainerState = {
196
+ waiting?: ContainerStateWaiting
197
+ running?: ContainerStateRunning
198
+ terminated?: ContainerStateTerminated
199
+ }
200
+
201
+ export type ContainerStateWaiting = {
202
+ reason?: string
203
+ message?: string
204
+ }
205
+
206
+ export type ContainerStateRunning = {
207
+ startedAt?: string
208
+ }
209
+
210
+ export type ContainerStateTerminated = {
211
+ exitCode?: number
212
+ signal?: number
213
+ reason?: string
214
+ message?: string
215
+ startedAt?: string
216
+ finishedAt?: string
165
217
  }
package/insight.pb.ts CHANGED
@@ -20,27 +20,23 @@ export enum TargetType {
20
20
  DEPLOYMENT = "DEPLOYMENT",
21
21
  STATEFULSET = "STATEFULSET",
22
22
  DAEMONSET = "DAEMONSET",
23
- CRONJOB = "CRONJOB",
24
23
  POD = "POD",
25
24
  }
26
25
 
27
- export enum AlertStatus {
28
- ALERT_STATUS_UNSPECIFIED = "ALERT_STATUS_UNSPECIFIED",
29
- ALERT_STATUS_FIRING = "ALERT_STATUS_FIRING",
30
- ALERT_STATUS_RESOLVED = "ALERT_STATUS_RESOLVED",
31
- }
32
-
33
26
  export type AlertSummary = {
34
- alertId?: string
27
+ id?: string
28
+ groupName?: string
29
+ groupId?: string
35
30
  ruleName?: string
36
- severity?: Severity
31
+ ruleId?: string
37
32
  clusterName?: string
38
33
  namespace?: string
39
34
  targetType?: TargetType
40
- targetName?: string
41
- status?: AlertStatus
35
+ target?: string
36
+ severity?: Severity
37
+ value?: string
38
+ notifyResponse?: string
42
39
  description?: string
43
40
  startAt?: string
44
41
  updateAt?: string
45
- notifyResponse?: string
46
42
  }
package/metric.pb.ts CHANGED
@@ -7,7 +7,18 @@
7
7
  import * as CommonCommon from "./common.pb"
8
8
  import * as fm from "./fetch.pb"
9
9
  import * as InsightIoApiInsightV1alpha1Insight from "./insight.pb"
10
+
11
+ export enum GetAlertsListReqSortDir {
12
+ ASC = "ASC",
13
+ DESC = "DESC",
14
+ }
15
+
10
16
  export type GetAlertsListReq = {
17
+ page?: number
18
+ pageSize?: number
19
+ sortDir?: GetAlertsListReqSortDir
20
+ sortBy?: string
21
+ searchKey?: string
11
22
  cluster?: string
12
23
  namespace?: string
13
24
  name?: string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/mcamel-postgresql",
3
- "version":"0.0.2-29",
3
+ "version":"0.0.2-290",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/postgresql.pb.ts CHANGED
@@ -22,6 +22,48 @@ export enum Status {
22
22
  Creating = "Creating",
23
23
  }
24
24
 
25
+ export enum GetPostgresqlS3ConfigListReqSortDir {
26
+ ASC = "ASC",
27
+ DESC = "DESC",
28
+ }
29
+
30
+ export enum GetPostgresqlBackupListReqSortDir {
31
+ ASC = "ASC",
32
+ DESC = "DESC",
33
+ }
34
+
35
+ export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusStatus {
36
+ Running = "Running",
37
+ Failed = "Failed",
38
+ Succeeded = "Succeeded",
39
+ }
40
+
41
+ export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupType {
42
+ Full = "Full",
43
+ Incremental = "Incremental",
44
+ }
45
+
46
+ export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupMethod {
47
+ Manual = "Manual",
48
+ Auto = "Auto",
49
+ }
50
+
51
+ export enum PostgresqlBackupItemStatusStatus {
52
+ Running = "Running",
53
+ Failed = "Failed",
54
+ Succeeded = "Succeeded",
55
+ }
56
+
57
+ export enum PostgresqlBackupItemStatusBackupType {
58
+ Full = "Full",
59
+ Incremental = "Incremental",
60
+ }
61
+
62
+ export enum PostgresqlBackupItemStatusBackupMethod {
63
+ Manual = "Manual",
64
+ Auto = "Auto",
65
+ }
66
+
25
67
  export enum GetPostgresqlListReqSortDir {
26
68
  ASC = "ASC",
27
69
  DESC = "DESC",
@@ -67,6 +109,150 @@ export enum GetPostgresqlConfRespItemsParamType {
67
109
  conf = "conf",
68
110
  }
69
111
 
112
+ export type DeletePostgresqlBackupReq = {
113
+ cluster?: string
114
+ namespace?: string
115
+ name?: string
116
+ backupName?: string
117
+ }
118
+
119
+ export type DeletePostgresqlBackupResp = {
120
+ message?: string
121
+ }
122
+
123
+ export type CreateBucketExistCheckingReq = {
124
+ endpoint?: string
125
+ accessKey?: string
126
+ secretKey?: string
127
+ bucket?: string
128
+ }
129
+
130
+ export type CreateBucketExistCheckingResp = {
131
+ message?: string
132
+ }
133
+
134
+ export type UpdatePostgresqlS3ConfigReq = {
135
+ cluster?: string
136
+ namespace?: string
137
+ name?: string
138
+ description?: string
139
+ endpoint?: string
140
+ accessKey?: string
141
+ secretKey?: string
142
+ bucket?: string
143
+ retentionTime?: string
144
+ provider?: string
145
+ }
146
+
147
+ export type UpdatePostgresqlS3ConfigResp = {
148
+ message?: string
149
+ }
150
+
151
+ export type GetPostgresqlS3ConfigListReq = {
152
+ page?: number
153
+ pageSize?: number
154
+ sortDir?: GetPostgresqlS3ConfigListReqSortDir
155
+ sortBy?: string
156
+ searchKey?: string
157
+ workspaceId?: number
158
+ }
159
+
160
+ export type GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItemsStatus = {
161
+ createTimestamp?: string
162
+ updateTimestamp?: string
163
+ backupPath?: string
164
+ }
165
+
166
+ export type GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItems = {
167
+ spec?: UpdatePostgresqlS3ConfigReq
168
+ status?: GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItemsStatus
169
+ }
170
+
171
+ export type GetPostgresqlS3ConfigListResp = {
172
+ items?: GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItems[]
173
+ pagination?: CommonCommon.Pagination
174
+ }
175
+
176
+ export type UpdatePostgresqlBackupConfigReq = {
177
+ cluster?: string
178
+ namespace?: string
179
+ name?: string
180
+ isOpenAutoBackup?: boolean
181
+ backupSchedule?: string
182
+ }
183
+
184
+ export type UpdatePostgresqlBackupConfigResp = {
185
+ message?: string
186
+ }
187
+
188
+ export type GetPostgresqlBackupListReq = {
189
+ page?: number
190
+ pageSize?: number
191
+ sortDir?: GetPostgresqlBackupListReqSortDir
192
+ sortBy?: string
193
+ searchKey?: string
194
+ cluster?: string
195
+ namespace?: string
196
+ name?: string
197
+ }
198
+
199
+ export type GetPostgresqlBackupListRespPostgresqlBackupItemMetadata = {
200
+ creationTimestamp?: string
201
+ name?: string
202
+ namespace?: string
203
+ }
204
+
205
+ export type GetPostgresqlBackupListRespPostgresqlBackupItemStatusJobCondition = {
206
+ type?: string
207
+ status?: string
208
+ reason?: string
209
+ message?: string
210
+ }
211
+
212
+ export type GetPostgresqlBackupListRespPostgresqlBackupItemStatus = {
213
+ completionTimestamp?: string
214
+ startTime?: string
215
+ active?: number
216
+ succeeded?: number
217
+ failed?: number
218
+ conditions?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusJobCondition[]
219
+ status?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusStatus
220
+ backupType?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupType
221
+ backupMethod?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupMethod
222
+ storePath?: string
223
+ }
224
+
225
+ export type GetPostgresqlBackupListRespPostgresqlBackupItem = {
226
+ metadata?: GetPostgresqlBackupListRespPostgresqlBackupItemMetadata
227
+ spec?: CreatePostgresqlBackupReq
228
+ status?: GetPostgresqlBackupListRespPostgresqlBackupItemStatus
229
+ }
230
+
231
+ export type GetPostgresqlBackupListResp = {
232
+ items?: GetPostgresqlBackupListRespPostgresqlBackupItem[]
233
+ pagination?: CommonCommon.Pagination
234
+ }
235
+
236
+ export type CreatePostgresqlBackupReq = {
237
+ cluster?: string
238
+ namespace?: string
239
+ name?: string
240
+ backupName?: string
241
+ }
242
+
243
+ export type CreatePostgresqlBackupResp = {
244
+ message?: string
245
+ }
246
+
247
+ export type PostgresqlBackupItemStatus = {
248
+ status?: PostgresqlBackupItemStatusStatus
249
+ message?: string
250
+ backupUrl?: string
251
+ backupType?: PostgresqlBackupItemStatusBackupType
252
+ backupMethod?: PostgresqlBackupItemStatusBackupMethod
253
+ completionTimestamp?: string
254
+ }
255
+
70
256
  export type GetPostgresqlUsersReq = {
71
257
  cluster?: string
72
258
  namespace?: string
@@ -89,6 +275,8 @@ export type GetPostgresqlListReq = {
89
275
  sortBy?: string
90
276
  searchKey?: string
91
277
  workspaceId?: number
278
+ filterCluster?: string
279
+ filterNamespace?: string
92
280
  }
93
281
 
94
282
  export type GetPostgresqlConfReq = {
@@ -147,6 +335,7 @@ export type CreatePostgresqlReq = {
147
335
  pgAdminDefaultEmail?: string
148
336
  pgAdminDefaultPassword?: string
149
337
  affinity?: CommonCommon.Affinity
338
+ backupConfig?: UpdatePostgresqlBackupConfigReq
150
339
  externalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy
151
340
  lbTyp?: CommonCommon.LBTyp
152
341
  lbPoolName?: string
@@ -288,6 +477,8 @@ export type GetPostgresqlGrafanaAddrReq = {
288
477
  cluster?: string
289
478
  namespace?: string
290
479
  name?: string
480
+ from?: string
481
+ to?: string
291
482
  }
292
483
 
293
484
  export type GetPostgresqlGrafanaAddrResp = {
@@ -327,6 +518,7 @@ export type PostgresqlItemStatus = {
327
518
  clusterIPs?: string[]
328
519
  avgReplicationLagInBytes?: string
329
520
  common?: CommonCommon.CommonItemStatus
521
+ isControl?: boolean
330
522
  }
331
523
 
332
524
  export type PostgresqlItemMetadata = {
@@ -384,4 +576,25 @@ export class Postgresql {
384
576
  static GetPostgresqlUsers(req: GetPostgresqlUsersReq, initReq?: fm.InitReq): Promise<GetPostgresqlUsersResp> {
385
577
  return fm.fetchReq<GetPostgresqlUsersReq, GetPostgresqlUsersResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/users?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
386
578
  }
579
+ static GetPostgresqlBackupList(req: GetPostgresqlBackupListReq, initReq?: fm.InitReq): Promise<GetPostgresqlBackupListResp> {
580
+ return fm.fetchReq<GetPostgresqlBackupListReq, GetPostgresqlBackupListResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backups?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
581
+ }
582
+ static CreatePostgresqlBackup(req: CreatePostgresqlBackupReq, initReq?: fm.InitReq): Promise<CreatePostgresqlBackupResp> {
583
+ return fm.fetchReq<CreatePostgresqlBackupReq, CreatePostgresqlBackupResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup`, {...initReq, method: "POST", body: JSON.stringify(req)})
584
+ }
585
+ static DeletePostgresqlBackup(req: DeletePostgresqlBackupReq, initReq?: fm.InitReq): Promise<DeletePostgresqlBackupResp> {
586
+ return fm.fetchReq<DeletePostgresqlBackupReq, DeletePostgresqlBackupResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/backups/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/${req["backupName"]}`, {...initReq, method: "DELETE"})
587
+ }
588
+ static UpdatePostgresqlBackupConfig(req: UpdatePostgresqlBackupConfigReq, initReq?: fm.InitReq): Promise<UpdatePostgresqlBackupConfigResp> {
589
+ return fm.fetchReq<UpdatePostgresqlBackupConfigReq, UpdatePostgresqlBackupConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
590
+ }
591
+ static GetPostgresqlS3ConfigList(req: GetPostgresqlS3ConfigListReq, initReq?: fm.InitReq): Promise<GetPostgresqlS3ConfigListResp> {
592
+ return fm.fetchReq<GetPostgresqlS3ConfigListReq, GetPostgresqlS3ConfigListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/s3/configs?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
593
+ }
594
+ static UpdatePostgresqlS3Config(req: UpdatePostgresqlS3ConfigReq, initReq?: fm.InitReq): Promise<UpdatePostgresqlS3ConfigResp> {
595
+ return fm.fetchReq<UpdatePostgresqlS3ConfigReq, UpdatePostgresqlS3ConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/s3/config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
596
+ }
597
+ static CreateBucketExistChecking(req: CreateBucketExistCheckingReq, initReq?: fm.InitReq): Promise<CreateBucketExistCheckingResp> {
598
+ return fm.fetchReq<CreateBucketExistCheckingReq, CreateBucketExistCheckingResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/s3/config/checking`, {...initReq, method: "PUT", body: JSON.stringify(req)})
599
+ }
387
600
  }
@@ -0,0 +1,188 @@
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
+ STORAGE_CONFIG_CONSUMER_TYPE_REDIS = "STORAGE_CONFIG_CONSUMER_TYPE_REDIS",
28
+ }
29
+
30
+ export enum GetStorageConfigListReqSortDir {
31
+ ASC = "ASC",
32
+ DESC = "DESC",
33
+ }
34
+
35
+ export type GetStorageConfigParamReq = {
36
+ }
37
+
38
+ export type GetStorageConfigParamRespSelectDataStringValue = {
39
+ value?: string
40
+ }
41
+
42
+ export type GetStorageConfigParamRespSelectDataIntValue = {
43
+ value?: number
44
+ }
45
+
46
+
47
+ type BaseGetStorageConfigParamRespSelectData = {
48
+ }
49
+
50
+ export type GetStorageConfigParamRespSelectData = BaseGetStorageConfigParamRespSelectData
51
+ & OneOf<{ sValue: GetStorageConfigParamRespSelectDataStringValue; iValue: GetStorageConfigParamRespSelectDataIntValue }>
52
+
53
+ export type GetStorageConfigParamRespSelect = {
54
+ selectType?: GetStorageConfigParamRespSelectSelectType
55
+ data?: GetStorageConfigParamRespSelectData[]
56
+ }
57
+
58
+ export type GetStorageConfigParamResp = {
59
+ storageType?: GetStorageConfigParamRespSelect
60
+ }
61
+
62
+ export type CreateStorageConfigBucketCheckJobReq = {
63
+ storageType?: string
64
+ endpoint?: string
65
+ accessKey?: string
66
+ secretKey?: string
67
+ bucket?: string
68
+ cluster?: string
69
+ namespace?: string
70
+ name?: string
71
+ }
72
+
73
+ export type CreateStorageConfigBucketCheckJobResp = {
74
+ message?: string
75
+ }
76
+
77
+ export type CreateStorageConfigReq = {
78
+ workspaceId?: number
79
+ cluster?: string
80
+ namespace?: string
81
+ name?: string
82
+ storageType?: string
83
+ accessKey?: string
84
+ secretKey?: string
85
+ bucket?: string
86
+ endpoint?: string
87
+ minioCluster?: string
88
+ minioNamespace?: string
89
+ minioName?: string
90
+ description?: string
91
+ }
92
+
93
+ export type CreateStorageConfigResp = {
94
+ message?: string
95
+ }
96
+
97
+ export type GetStorageConfigConsumersReq = {
98
+ workspaceId?: number
99
+ name?: string
100
+ }
101
+
102
+ export type GetStorageConfigConsumersRespConsumer = {
103
+ type?: GetStorageConfigConsumersRespStorageConfigConsumerType
104
+ cluster?: string
105
+ namespace?: string
106
+ name?: string
107
+ }
108
+
109
+ export type GetStorageConfigConsumersResp = {
110
+ consumers?: GetStorageConfigConsumersRespConsumer[]
111
+ }
112
+
113
+ export type DeleteStorageConfigReq = {
114
+ workspaceId?: number
115
+ name?: string
116
+ cluster?: string
117
+ namespace?: string
118
+ }
119
+
120
+ export type DeleteStorageConfigResp = {
121
+ message?: string
122
+ }
123
+
124
+ export type UpdateStorageConfigResp = {
125
+ message?: string
126
+ }
127
+
128
+ export type StorageConfigItemStorageConfigStatus = {
129
+ lastUpdateTimestamp?: string
130
+ createTimestamp?: string
131
+ }
132
+
133
+ export type StorageConfigItem = {
134
+ spec?: CreateStorageConfigReq
135
+ status?: StorageConfigItemStorageConfigStatus
136
+ }
137
+
138
+ export type GetStorageConfigReq = {
139
+ workspaceId?: number
140
+ name?: string
141
+ namespace?: string
142
+ cluster?: string
143
+ }
144
+
145
+ export type GetStorageConfigResp = {
146
+ item?: StorageConfigItem
147
+ }
148
+
149
+ export type GetStorageConfigListReq = {
150
+ page?: number
151
+ pageSize?: number
152
+ sortDir?: GetStorageConfigListReqSortDir
153
+ sortBy?: string
154
+ searchKey?: string
155
+ workspaceId?: number
156
+ }
157
+
158
+ export type GetStorageConfigListResp = {
159
+ items?: StorageConfigItem[]
160
+ pagination?: CommonCommon.Pagination
161
+ }
162
+
163
+ export class StorageConfig {
164
+ static GetStorageConfigParam(req: GetStorageConfigParamReq, initReq?: fm.InitReq): Promise<GetStorageConfigParamResp> {
165
+ return fm.fetchReq<GetStorageConfigParamReq, GetStorageConfigParamResp>(`/apis/mcamel.io/postgresql/v1alpha1/storage-config/param?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
166
+ }
167
+ static CreateStorageConfigBucketCheckJob(req: CreateStorageConfigBucketCheckJobReq, initReq?: fm.InitReq): Promise<CreateStorageConfigBucketCheckJobResp> {
168
+ return fm.fetchReq<CreateStorageConfigBucketCheckJobReq, CreateStorageConfigBucketCheckJobResp>(`/apis/mcamel.io/postgresql/v1alpha1/storage-config/bucket/check-job`, {...initReq, method: "POST", body: JSON.stringify(req)})
169
+ }
170
+ static CreateStorageConfig(req: CreateStorageConfigReq, initReq?: fm.InitReq): Promise<CreateStorageConfigResp> {
171
+ return fm.fetchReq<CreateStorageConfigReq, CreateStorageConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/storage-config`, {...initReq, method: "POST", body: JSON.stringify(req)})
172
+ }
173
+ static GetStorageConfigConsumers(req: GetStorageConfigConsumersReq, initReq?: fm.InitReq): Promise<GetStorageConfigConsumersResp> {
174
+ return fm.fetchReq<GetStorageConfigConsumersReq, GetStorageConfigConsumersResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/storage-config/${req["name"]}/consumers?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
175
+ }
176
+ static DeleteStorageConfig(req: DeleteStorageConfigReq, initReq?: fm.InitReq): Promise<DeleteStorageConfigResp> {
177
+ return fm.fetchReq<DeleteStorageConfigReq, DeleteStorageConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/storage-config/${req["cluster"]}/${req["namespace"]}/${req["name"]}`, {...initReq, method: "DELETE"})
178
+ }
179
+ static UpdateStorageConfig(req: CreateStorageConfigReq, initReq?: fm.InitReq): Promise<UpdateStorageConfigResp> {
180
+ return fm.fetchReq<CreateStorageConfigReq, UpdateStorageConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/storage-config/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
181
+ }
182
+ static GetStorageConfig(req: GetStorageConfigReq, initReq?: fm.InitReq): Promise<GetStorageConfigResp> {
183
+ return fm.fetchReq<GetStorageConfigReq, GetStorageConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/storage-config/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
184
+ }
185
+ static GetStorageConfigList(req: GetStorageConfigListReq, initReq?: fm.InitReq): Promise<GetStorageConfigListResp> {
186
+ return fm.fetchReq<GetStorageConfigListReq, GetStorageConfigListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/storage-configs?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
187
+ }
188
+ }
package/template.pb.ts ADDED
@@ -0,0 +1,168 @@
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
+ export enum TemplateInstanceType {
11
+ MysqlMasterReplica = "MysqlMasterReplica",
12
+ RedisStandalone = "RedisStandalone",
13
+ RedisFailover = "RedisFailover",
14
+ RedisCluster = "RedisCluster",
15
+ }
16
+
17
+ export enum GetTemplateConfigReqSortDir {
18
+ ASC = "ASC",
19
+ DESC = "DESC",
20
+ }
21
+
22
+ export enum GetTemplateConfigListReqSortDir {
23
+ ASC = "ASC",
24
+ DESC = "DESC",
25
+ }
26
+
27
+ export enum TemplateConfigItemValueType {
28
+ String = "String",
29
+ SingleSelection = "SingleSelection",
30
+ MultiString = "MultiString",
31
+ }
32
+
33
+ export type GetTemplateConfigVersionsReq = {
34
+ workspaceId?: number
35
+ }
36
+
37
+ export type GetTemplateConfigVersionsResp = {
38
+ versions?: string[]
39
+ }
40
+
41
+ export type GetTemplateConfigStringResp = {
42
+ conf?: string
43
+ }
44
+
45
+ export type DeleteTemplateReq = {
46
+ workspaceId?: number
47
+ name?: string
48
+ version?: string
49
+ }
50
+
51
+ export type DeleteTemplateConfigResp = {
52
+ message?: string
53
+ }
54
+
55
+ export type CreateOrUpdateTemplateConfigResp = {
56
+ message?: string
57
+ }
58
+
59
+ export type GetTemplateConfigReq = {
60
+ page?: number
61
+ pageSize?: number
62
+ sortDir?: GetTemplateConfigReqSortDir
63
+ sortBy?: string
64
+ searchKey?: string
65
+ workspaceId?: number
66
+ name?: string
67
+ version?: string
68
+ templateType?: string
69
+ type?: string
70
+ createTimestamp?: string
71
+ templateInstanceType?: TemplateInstanceType
72
+ }
73
+
74
+ export type CreateTemplateConfigResp = {
75
+ message?: string
76
+ }
77
+
78
+ export type UpdateTemplateConfigResp = {
79
+ message?: string
80
+ }
81
+
82
+ export type CreateTemplateConfigReq = {
83
+ workspaceId?: number
84
+ targetName?: string
85
+ targetVersion?: string
86
+ targetType?: string
87
+ targetTemplateType?: string
88
+ targetConf?: string
89
+ fromTemplateName?: string
90
+ }
91
+
92
+ export type UpdateTemplateConfigReq = {
93
+ workspaceId?: number
94
+ name?: string
95
+ version?: string
96
+ type?: string
97
+ templateType?: string
98
+ items?: TemplateConfigItem[]
99
+ conf?: string
100
+ }
101
+
102
+ export type GetTemplateConfigResp = {
103
+ data?: UpdateTemplateConfigReq
104
+ pagination?: CommonCommon.Pagination
105
+ }
106
+
107
+ export type GetTemplateConfigListReq = {
108
+ page?: number
109
+ pageSize?: number
110
+ sortDir?: GetTemplateConfigListReqSortDir
111
+ sortBy?: string
112
+ searchKey?: string
113
+ workspaceId?: number
114
+ version?: string
115
+ templateInstanceType?: TemplateInstanceType
116
+ }
117
+
118
+ export type TemplateConfigItem = {
119
+ name?: string
120
+ default?: string
121
+ current?: string
122
+ value?: string
123
+ isNeedRestart?: boolean
124
+ valueType?: TemplateConfigItemValueType
125
+ valueRemarksZh?: string
126
+ valueRemarksEn?: string
127
+ updateTimestamp?: string
128
+ }
129
+
130
+ export type GetTemplateConfigListResp = {
131
+ items?: GetTemplateConfigReq[]
132
+ pagination?: CommonCommon.Pagination
133
+ }
134
+
135
+ export type GetTemplateInstanceTypeListReq = {
136
+ workspaceId?: number
137
+ }
138
+
139
+ export type GetTemplateInstanceTypeListResp = {
140
+ type?: TemplateInstanceType[]
141
+ }
142
+
143
+ export class Template {
144
+ static GetTemplateConfigList(req: GetTemplateConfigListReq, initReq?: fm.InitReq): Promise<GetTemplateConfigListResp> {
145
+ return fm.fetchReq<GetTemplateConfigListReq, GetTemplateConfigListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
146
+ }
147
+ static GetTemplateInstanceTypeList(req: GetTemplateInstanceTypeListReq, initReq?: fm.InitReq): Promise<GetTemplateInstanceTypeListResp> {
148
+ return fm.fetchReq<GetTemplateInstanceTypeListReq, GetTemplateInstanceTypeListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_instance_type?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
149
+ }
150
+ static GetTemplateConfig(req: GetTemplateConfigReq, initReq?: fm.InitReq): Promise<GetTemplateConfigResp> {
151
+ return fm.fetchReq<GetTemplateConfigReq, GetTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
152
+ }
153
+ static DeleteTemplateConfig(req: DeleteTemplateReq, initReq?: fm.InitReq): Promise<DeleteTemplateConfigResp> {
154
+ return fm.fetchReq<DeleteTemplateReq, DeleteTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}/${req["version"]}`, {...initReq, method: "DELETE"})
155
+ }
156
+ static CreateTemplateConfig(req: CreateTemplateConfigReq, initReq?: fm.InitReq): Promise<CreateTemplateConfigResp> {
157
+ return fm.fetchReq<CreateTemplateConfigReq, CreateTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config`, {...initReq, method: "POST", body: JSON.stringify(req)})
158
+ }
159
+ static UpdateTemplateConfig(req: UpdateTemplateConfigReq, initReq?: fm.InitReq): Promise<UpdateTemplateConfigResp> {
160
+ return fm.fetchReq<UpdateTemplateConfigReq, UpdateTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
161
+ }
162
+ static GetTemplateConfigString(req: GetTemplateConfigReq, initReq?: fm.InitReq): Promise<GetTemplateConfigStringResp> {
163
+ return fm.fetchReq<GetTemplateConfigReq, GetTemplateConfigStringResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}/to_string?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
164
+ }
165
+ static GetTemplateConfigVersions(req: GetTemplateConfigVersionsReq, initReq?: fm.InitReq): Promise<GetTemplateConfigVersionsResp> {
166
+ return fm.fetchReq<GetTemplateConfigVersionsReq, GetTemplateConfigVersionsResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/versions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
167
+ }
168
+ }