@daocloud-proto/mcamel-postgresql 0.0.2-52 → 0.0.2-524

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,12 +7,44 @@
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
+ GetUserPassword = "GetUserPassword",
33
+ ExportTemplate = "ExportTemplate",
34
+ ImportTemplate = "ImportTemplate",
35
+ }
36
+
10
37
  export enum EventType {
11
38
  EVENT_TYPE_UNSPECIFIED = "EVENT_TYPE_UNSPECIFIED",
12
39
  Normal = "Normal",
13
40
  Warning = "Warning",
14
41
  }
15
42
 
43
+ export enum InstallFileReqGVR {
44
+ None = "None",
45
+ CustomResourceDefinition = "CustomResourceDefinition",
46
+ }
47
+
16
48
  export enum GetAllEventListReqSortDir {
17
49
  ASC = "ASC",
18
50
  DESC = "DESC",
@@ -28,11 +60,93 @@ export enum GetWorkspaceListReqSortDir {
28
60
  DESC = "DESC",
29
61
  }
30
62
 
63
+ export enum ClusterItemNetworkMode {
64
+ Unknown = "Unknown",
65
+ Flannel = "Flannel",
66
+ Calico = "Calico",
67
+ }
68
+
31
69
  export enum GetInsightAgentStatusRespInsightAgentStatus {
32
70
  NotInstall = "NotInstall",
33
71
  Install = "Install",
34
72
  }
35
73
 
74
+ export type InstallFileReq = {
75
+ cluster?: string
76
+ path?: string
77
+ gvr?: InstallFileReqGVR
78
+ }
79
+
80
+ export type InstallFileResp = {
81
+ message?: string
82
+ }
83
+
84
+ export type GetInstallVersionReq = {
85
+ cluster?: string
86
+ }
87
+
88
+ export type GetInstallVersionRespSupportVersion = {
89
+ minVersion?: string
90
+ maxVersion?: string
91
+ }
92
+
93
+ export type GetInstallVersionRespStatus = {
94
+ inRange?: boolean
95
+ }
96
+
97
+ export type GetInstallVersionResp = {
98
+ clusterVersion?: string
99
+ supportVersion?: GetInstallVersionRespSupportVersion
100
+ status?: GetInstallVersionRespStatus
101
+ }
102
+
103
+ export type RestartInstanceReq = {
104
+ workspaceId?: number
105
+ cluster?: string
106
+ namespace?: string
107
+ name?: string
108
+ extra?: string
109
+ }
110
+
111
+ export type RestartInstanceResp = {
112
+ message?: string
113
+ }
114
+
115
+ export type GetPermissionsListReq = {
116
+ workspaceId?: number
117
+ }
118
+
119
+ export type GetPermissionsListRespPermissions = {
120
+ getInstance?: boolean
121
+ createInstance?: boolean
122
+ updateInstance?: boolean
123
+ deleteInstance?: boolean
124
+ getMetric?: boolean
125
+ getInstanceLog?: boolean
126
+ getConfig?: boolean
127
+ updateConfig?: boolean
128
+ getBackup?: boolean
129
+ createBackup?: boolean
130
+ updateBackup?: boolean
131
+ deleteBackup?: boolean
132
+ getBackupConf?: boolean
133
+ createBackupConf?: boolean
134
+ updateBackupConf?: boolean
135
+ deleteBackupConf?: boolean
136
+ getTemplate?: boolean
137
+ createTemplate?: boolean
138
+ updateTemplate?: boolean
139
+ deleteTemplate?: boolean
140
+ getUserPassword?: boolean
141
+ exportTemplate?: boolean
142
+ importTemplate?: boolean
143
+ }
144
+
145
+ export type GetPermissionsListResp = {
146
+ permissionsBool?: GetPermissionsListRespPermissions
147
+ permissions?: PermissionsType[]
148
+ }
149
+
36
150
  export type GetAllEventKindsListResp = {
37
151
  data?: string[]
38
152
  }
@@ -106,8 +220,32 @@ export type GetClusterNodeLabelListRespLabel = {
106
220
  value?: string[]
107
221
  }
108
222
 
223
+ export type GetClusterNodeLabelListRespNode2Label = {
224
+ nodeName?: string
225
+ label?: GetClusterNodeLabelListRespLabel[]
226
+ }
227
+
109
228
  export type GetClusterNodeLabelListResp = {
110
229
  items?: GetClusterNodeLabelListRespLabel[]
230
+ items1?: GetClusterNodeLabelListRespNode2Label[]
231
+ pagination?: CommonCommon.Pagination
232
+ }
233
+
234
+ export type GetClusterPodLabelListReq = {
235
+ page?: number
236
+ pageSize?: number
237
+ searchKey?: string
238
+ filterNamespace?: string
239
+ cluster?: string
240
+ }
241
+
242
+ export type GetClusterPodLabelListRespLabel = {
243
+ key?: string
244
+ value?: string[]
245
+ }
246
+
247
+ export type GetClusterPodLabelListResp = {
248
+ items?: GetClusterPodLabelListRespLabel[]
111
249
  pagination?: CommonCommon.Pagination
112
250
  }
113
251
 
@@ -183,6 +321,7 @@ export type GetWorkspaceListReq = {
183
321
  export type GetWorkspaceListRespItem = {
184
322
  workspaceId?: number
185
323
  alias?: string
324
+ visible?: boolean
186
325
  }
187
326
 
188
327
  export type GetWorkspaceListResp = {
@@ -190,15 +329,39 @@ export type GetWorkspaceListResp = {
190
329
  pagination?: CommonCommon.Pagination
191
330
  }
192
331
 
332
+ export type GetClusterHostnetworkPortsReq = {
333
+ workspaceId?: number
334
+ cluster?: string
335
+ }
336
+
193
337
  export type GetClusterListReq = {
194
338
  workspaceId?: number
339
+ searchKey?: string
340
+ }
341
+
342
+ export type GetClusterHostnetworkPortsResp = {
343
+ items?: number[]
195
344
  }
196
345
 
197
346
  export type GetClusterListResp = {
198
347
  items?: string[]
348
+ clusters?: ClusterItem[]
199
349
  pagination?: CommonCommon.Pagination
200
350
  }
201
351
 
352
+ export type ClusterItemMetadata = {
353
+ name?: string
354
+ }
355
+
356
+ export type ClusterItemStatus = {
357
+ networkMode?: ClusterItemNetworkMode[]
358
+ }
359
+
360
+ export type ClusterItem = {
361
+ metadata?: ClusterItemMetadata
362
+ status?: ClusterItemStatus
363
+ }
364
+
202
365
  export type GetClusterNamespaceListReq = {
203
366
  workspaceId?: number
204
367
  cluster?: string
@@ -206,6 +369,7 @@ export type GetClusterNamespaceListReq = {
206
369
 
207
370
  export type GetClusterNamespaceListResp = {
208
371
  items?: string[]
372
+ disableItems?: string[]
209
373
  pagination?: CommonCommon.Pagination
210
374
  }
211
375
 
@@ -215,12 +379,46 @@ export type GetInsightAgentStatusReq = {
215
379
 
216
380
  export type GetInsightAgentStatusResp = {
217
381
  status?: GetInsightAgentStatusRespInsightAgentStatus
382
+ clusterStatus?: CommonCommon.ClusterStatus
383
+ }
384
+
385
+ export type GetResourceQuotaReq = {
386
+ cluster?: string
387
+ namespace?: string
388
+ }
389
+
390
+ export type GetResourceQuotaRespMetadata = {
391
+ uid?: string
392
+ name?: string
393
+ namespace?: string
394
+ annotations?: {[key: string]: string}
395
+ resourceVersion?: string
396
+ creationTimestamp?: string
397
+ }
398
+
399
+ export type GetResourceQuotaRespSpec = {
400
+ hard?: {[key: string]: string}
401
+ }
402
+
403
+ export type GetResourceQuotaRespStatus = {
404
+ hard?: {[key: string]: string}
405
+ used?: {[key: string]: string}
406
+ available?: {[key: string]: string}
407
+ }
408
+
409
+ export type GetResourceQuotaResp = {
410
+ metadata?: GetResourceQuotaRespMetadata
411
+ spec?: GetResourceQuotaRespSpec
412
+ status?: GetResourceQuotaRespStatus
218
413
  }
219
414
 
220
415
  export class Cluster {
221
416
  static GetClusterList(req: GetClusterListReq, initReq?: fm.InitReq): Promise<GetClusterListResp> {
222
417
  return fm.fetchReq<GetClusterListReq, GetClusterListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/clusters?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
223
418
  }
419
+ static GetClusterHostnetworkPorts(req: GetClusterHostnetworkPortsReq, initReq?: fm.InitReq): Promise<GetClusterHostnetworkPortsResp> {
420
+ return fm.fetchReq<GetClusterHostnetworkPortsReq, GetClusterHostnetworkPortsResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/hostnetwork-ports?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
421
+ }
224
422
  static GetClusterNamespaceList(req: GetClusterNamespaceListReq, initReq?: fm.InitReq): Promise<GetClusterNamespaceListResp> {
225
423
  return fm.fetchReq<GetClusterNamespaceListReq, GetClusterNamespaceListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/${req["cluster"]}/namespaces?${fm.renderURLSearchParams(req, ["workspaceId", "cluster"])}`, {...initReq, method: "GET"})
226
424
  }
@@ -230,6 +428,9 @@ export class Cluster {
230
428
  static GetClusterNodeLabelList(req: GetClusterNodeLabelListReq, initReq?: fm.InitReq): Promise<GetClusterNodeLabelListResp> {
231
429
  return fm.fetchReq<GetClusterNodeLabelListReq, GetClusterNodeLabelListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/nodelabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
232
430
  }
431
+ static GetClusterPodLabelList(req: GetClusterPodLabelListReq, initReq?: fm.InitReq): Promise<GetClusterPodLabelListResp> {
432
+ return fm.fetchReq<GetClusterPodLabelListReq, GetClusterPodLabelListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/podlabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
433
+ }
233
434
  static GetWorkspaceList(req: GetWorkspaceListReq, initReq?: fm.InitReq): Promise<GetWorkspaceListResp> {
234
435
  return fm.fetchReq<GetWorkspaceListReq, GetWorkspaceListResp>(`/apis/mcamel.io/postgresql/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
235
436
  }
@@ -248,4 +449,19 @@ export class Cluster {
248
449
  static GetMetallbIPAddressPoolsList(req: GetMetallbIPAddressPoolsListReq, initReq?: fm.InitReq): Promise<GetMetallbIPAddressPoolsListResp> {
249
450
  return fm.fetchReq<GetMetallbIPAddressPoolsListReq, GetMetallbIPAddressPoolsListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/lbaddress/pools?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
250
451
  }
452
+ static GetPermissionsList(req: GetPermissionsListReq, initReq?: fm.InitReq): Promise<GetPermissionsListResp> {
453
+ return fm.fetchReq<GetPermissionsListReq, GetPermissionsListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/permissions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
454
+ }
455
+ static RestartInstance(req: RestartInstanceReq, initReq?: fm.InitReq): Promise<RestartInstanceResp> {
456
+ return fm.fetchReq<RestartInstanceReq, RestartInstanceResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/restart`, {...initReq, method: "POST", body: JSON.stringify(req)})
457
+ }
458
+ static InstallFile(req: InstallFileReq, initReq?: fm.InitReq): Promise<InstallFileResp> {
459
+ return fm.fetchReq<InstallFileReq, InstallFileResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/install-file`, {...initReq, method: "POST", body: JSON.stringify(req)})
460
+ }
461
+ static GetInstallVersion(req: GetInstallVersionReq, initReq?: fm.InitReq): Promise<GetInstallVersionResp> {
462
+ return fm.fetchReq<GetInstallVersionReq, GetInstallVersionResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/install-version?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
463
+ }
464
+ static GetResourceQuota(req: GetResourceQuotaReq, initReq?: fm.InitReq): Promise<GetResourceQuotaResp> {
465
+ return fm.fetchReq<GetResourceQuotaReq, GetResourceQuotaResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/${req["namespace"]}/resourcequota?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
466
+ }
251
467
  }
package/common.pb.ts CHANGED
@@ -20,6 +20,16 @@ export enum ServiceType {
20
20
  LoadBalancer = "LoadBalancer",
21
21
  }
22
22
 
23
+ export enum ClusterStatus {
24
+ UNSPECIFIED = "UNSPECIFIED",
25
+ Unknown = "Unknown",
26
+ Creating = "Creating",
27
+ Running = "Running",
28
+ Updating = "Updating",
29
+ Deleting = "Deleting",
30
+ Failed = "Failed",
31
+ }
32
+
23
33
  export enum PageInfoReqSortDir {
24
34
  ASC = "ASC",
25
35
  DESC = "DESC",
@@ -40,6 +50,14 @@ export enum PodCommonConditionStatus {
40
50
  PodConditionStatusFalse = "PodConditionStatusFalse",
41
51
  }
42
52
 
53
+ export enum PodCommonFilterPodStatus {
54
+ UNSPECIFIED = "UNSPECIFIED",
55
+ RUNNING = "RUNNING",
56
+ ERROR = "ERROR",
57
+ COMPLETED = "COMPLETED",
58
+ WAITING = "WAITING",
59
+ }
60
+
43
61
  export type Affinity = {
44
62
  nodeAffinity?: NodeAffinity
45
63
  podAffinity?: PodAffinity
@@ -151,6 +169,9 @@ export type PodCommon = {
151
169
  containersName?: string[]
152
170
  ownerReference?: OwnerReference[]
153
171
  initContainersName?: string[]
172
+ initContainersStatuses?: ContainerStatus[]
173
+ containersStatuses?: ContainerStatus[]
174
+ podStatus?: string
154
175
  }
155
176
 
156
177
  export type OwnerReference = {
@@ -164,4 +185,53 @@ export type CommonItemStatus = {
164
185
  serviceAddresses?: string[]
165
186
  webManagerAddress?: string
166
187
  webLogAddress?: string
188
+ avgPvAllocatedInGb?: number
189
+ avgPvUsedInGb?: number
190
+ cpuUtilization?: number
191
+ memoryUtilization?: number
192
+ clusterStatus?: ClusterStatus
193
+ }
194
+
195
+ export type AccessWhitelistInternal = {
196
+ namespace?: string
197
+ podSelector?: {[key: string]: string}
198
+ }
199
+
200
+ export type AccessWhitelistExternal = {
201
+ cidr?: string
202
+ ip?: string
203
+ }
204
+
205
+ export type AccessWhitelist = {
206
+ internals?: AccessWhitelistInternal[]
207
+ externals?: AccessWhitelistExternal[]
208
+ }
209
+
210
+ export type ContainerStatus = {
211
+ name?: string
212
+ state?: ContainerState
213
+ }
214
+
215
+ export type ContainerState = {
216
+ waiting?: ContainerStateWaiting
217
+ running?: ContainerStateRunning
218
+ terminated?: ContainerStateTerminated
219
+ }
220
+
221
+ export type ContainerStateWaiting = {
222
+ reason?: string
223
+ message?: string
224
+ }
225
+
226
+ export type ContainerStateRunning = {
227
+ startedAt?: string
228
+ }
229
+
230
+ export type ContainerStateTerminated = {
231
+ exitCode?: number
232
+ signal?: number
233
+ reason?: string
234
+ message?: string
235
+ startedAt?: string
236
+ finishedAt?: string
167
237
  }
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-52",
3
+ "version":"0.0.2-524",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/postgresql.pb.ts CHANGED
@@ -6,6 +6,7 @@
6
6
 
7
7
  import * as CommonCommon from "./common.pb"
8
8
  import * as fm from "./fetch.pb"
9
+ import * as TemplateTemplate from "./template.pb"
9
10
 
10
11
  type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
11
12
  type OneOf<T> =
@@ -22,6 +23,80 @@ export enum Status {
22
23
  Creating = "Creating",
23
24
  }
24
25
 
26
+ export enum GetPostgresqlTopologyRespNodePodStatus {
27
+ Pending = "Pending",
28
+ Running = "Running",
29
+ Succeeded = "Succeeded",
30
+ Failed = "Failed",
31
+ Unknown = "Unknown",
32
+ Terminating = "Terminating",
33
+ }
34
+
35
+ export enum GetPostgresqlTopologyRespNodeRole {
36
+ RoleUnknown = "RoleUnknown",
37
+ Primary = "Primary",
38
+ Standby = "Standby",
39
+ }
40
+
41
+ export enum GetPostgresqlTopologyRespNodeSyncState {
42
+ SyncStateUnknown = "SyncStateUnknown",
43
+ Sync = "Sync",
44
+ Async = "Async",
45
+ Potential = "Potential",
46
+ Quorum = "Quorum",
47
+ }
48
+
49
+ export enum GetPostgresqlTopologyRespNodeState {
50
+ StateUnknown = "StateUnknown",
51
+ Startup = "Startup",
52
+ Catchup = "Catchup",
53
+ Streaming = "Streaming",
54
+ Backup = "Backup",
55
+ Stopping = "Stopping",
56
+ }
57
+
58
+ export enum GetPostgresqlS3ConfigListReqSortDir {
59
+ ASC = "ASC",
60
+ DESC = "DESC",
61
+ }
62
+
63
+ export enum GetPostgresqlBackupListReqSortDir {
64
+ ASC = "ASC",
65
+ DESC = "DESC",
66
+ }
67
+
68
+ export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusStatus {
69
+ Running = "Running",
70
+ Failed = "Failed",
71
+ Succeeded = "Succeeded",
72
+ }
73
+
74
+ export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupType {
75
+ Full = "Full",
76
+ Incremental = "Incremental",
77
+ }
78
+
79
+ export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupMethod {
80
+ Manual = "Manual",
81
+ Auto = "Auto",
82
+ }
83
+
84
+ export enum PostgresqlBackupItemStatusStatus {
85
+ Running = "Running",
86
+ Failed = "Failed",
87
+ Succeeded = "Succeeded",
88
+ }
89
+
90
+ export enum PostgresqlBackupItemStatusBackupType {
91
+ Full = "Full",
92
+ Incremental = "Incremental",
93
+ }
94
+
95
+ export enum PostgresqlBackupItemStatusBackupMethod {
96
+ Manual = "Manual",
97
+ Auto = "Auto",
98
+ }
99
+
25
100
  export enum GetPostgresqlListReqSortDir {
26
101
  ASC = "ASC",
27
102
  DESC = "DESC",
@@ -52,8 +127,8 @@ export enum GetPostgresqlPodListRespPodStatus {
52
127
  }
53
128
 
54
129
  export enum GetPostgresqlPodListRespPodType {
55
- Master = "Master",
56
- Replica = "Replica",
130
+ Primary = "Primary",
131
+ Standby = "Standby",
57
132
  PgAdmin = "PgAdmin",
58
133
  }
59
134
 
@@ -67,6 +142,210 @@ export enum GetPostgresqlConfRespItemsParamType {
67
142
  conf = "conf",
68
143
  }
69
144
 
145
+ export enum PostgresqlItemStatusRestoreInitialStatus {
146
+ Unknown = "Unknown",
147
+ Running = "Running",
148
+ Failed = "Failed",
149
+ Succeeded = "Succeeded",
150
+ }
151
+
152
+ export type GetPostgresqlTopologyReq = {
153
+ cluster?: string
154
+ namespace?: string
155
+ name?: string
156
+ }
157
+
158
+ export type GetPostgresqlTopologyRespNode = {
159
+ cluster?: string
160
+ namespace?: string
161
+ podName?: string
162
+ ip?: string
163
+ podStatus?: GetPostgresqlTopologyRespNodePodStatus
164
+ totalContainer?: number
165
+ totalContainerReady?: number
166
+ podCpuRequest?: string
167
+ podMemoryRequest?: string
168
+ podCpuLimit?: string
169
+ podMemoryLimit?: string
170
+ role?: GetPostgresqlTopologyRespNodeRole
171
+ syncState?: GetPostgresqlTopologyRespNodeSyncState
172
+ state?: GetPostgresqlTopologyRespNodeState
173
+ sentLsn?: string
174
+ writeLsn?: string
175
+ flushLsn?: string
176
+ replayLsn?: string
177
+ }
178
+
179
+ export type GetPostgresqlTopologyRespEdges = {
180
+ source?: string
181
+ target?: string
182
+ properties?: {[key: string]: string}
183
+ }
184
+
185
+ export type GetPostgresqlTopologyResp = {
186
+ nodes?: GetPostgresqlTopologyRespNode[]
187
+ edges?: GetPostgresqlTopologyRespEdges[]
188
+ }
189
+
190
+ export type CreatePostgresqlRestoreReq = {
191
+ cluster?: string
192
+ namespace?: string
193
+ name?: string
194
+ backupName?: string
195
+ targetPostgresqlName?: string
196
+ targetPostgresqlNamespace?: string
197
+ targetPostgresqlCluster?: string
198
+ }
199
+
200
+ export type CreatePostgresqlRestoreResp = {
201
+ message?: string
202
+ }
203
+
204
+ export type DeletePostgresqlBackupReq = {
205
+ cluster?: string
206
+ namespace?: string
207
+ name?: string
208
+ backupName?: string
209
+ removeRemoteBackup?: boolean
210
+ }
211
+
212
+ export type DeletePostgresqlBackupResp = {
213
+ message?: string
214
+ }
215
+
216
+ export type CreateBucketExistCheckingReq = {
217
+ endpoint?: string
218
+ accessKey?: string
219
+ secretKey?: string
220
+ bucket?: string
221
+ }
222
+
223
+ export type CreateBucketExistCheckingResp = {
224
+ message?: string
225
+ }
226
+
227
+ export type UpdatePostgresqlS3ConfigReq = {
228
+ cluster?: string
229
+ namespace?: string
230
+ name?: string
231
+ description?: string
232
+ endpoint?: string
233
+ accessKey?: string
234
+ secretKey?: string
235
+ bucket?: string
236
+ retentionTime?: string
237
+ provider?: string
238
+ }
239
+
240
+ export type UpdatePostgresqlS3ConfigResp = {
241
+ message?: string
242
+ }
243
+
244
+ export type GetPostgresqlS3ConfigListReq = {
245
+ page?: number
246
+ pageSize?: number
247
+ sortDir?: GetPostgresqlS3ConfigListReqSortDir
248
+ sortBy?: string
249
+ searchKey?: string
250
+ workspaceId?: number
251
+ }
252
+
253
+ export type GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItemsStatus = {
254
+ createTimestamp?: string
255
+ updateTimestamp?: string
256
+ backupPath?: string
257
+ }
258
+
259
+ export type GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItems = {
260
+ spec?: UpdatePostgresqlS3ConfigReq
261
+ status?: GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItemsStatus
262
+ }
263
+
264
+ export type GetPostgresqlS3ConfigListResp = {
265
+ items?: GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItems[]
266
+ pagination?: CommonCommon.Pagination
267
+ }
268
+
269
+ export type UpdatePostgresqlBackupConfigReq = {
270
+ cluster?: string
271
+ namespace?: string
272
+ name?: string
273
+ isOpenAutoBackup?: boolean
274
+ backupSchedule?: string
275
+ }
276
+
277
+ export type UpdatePostgresqlBackupConfigResp = {
278
+ message?: string
279
+ }
280
+
281
+ export type GetPostgresqlBackupListReq = {
282
+ page?: number
283
+ pageSize?: number
284
+ sortDir?: GetPostgresqlBackupListReqSortDir
285
+ sortBy?: string
286
+ searchKey?: string
287
+ cluster?: string
288
+ namespace?: string
289
+ name?: string
290
+ }
291
+
292
+ export type GetPostgresqlBackupListRespPostgresqlBackupItemMetadata = {
293
+ creationTimestamp?: string
294
+ name?: string
295
+ namespace?: string
296
+ }
297
+
298
+ export type GetPostgresqlBackupListRespPostgresqlBackupItemStatusJobCondition = {
299
+ type?: string
300
+ status?: string
301
+ reason?: string
302
+ message?: string
303
+ }
304
+
305
+ export type GetPostgresqlBackupListRespPostgresqlBackupItemStatus = {
306
+ completionTimestamp?: string
307
+ startTime?: string
308
+ active?: number
309
+ succeeded?: number
310
+ failed?: number
311
+ conditions?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusJobCondition[]
312
+ status?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusStatus
313
+ backupType?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupType
314
+ backupMethod?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupMethod
315
+ storePath?: string
316
+ }
317
+
318
+ export type GetPostgresqlBackupListRespPostgresqlBackupItem = {
319
+ metadata?: GetPostgresqlBackupListRespPostgresqlBackupItemMetadata
320
+ spec?: CreatePostgresqlBackupReq
321
+ status?: GetPostgresqlBackupListRespPostgresqlBackupItemStatus
322
+ }
323
+
324
+ export type GetPostgresqlBackupListResp = {
325
+ items?: GetPostgresqlBackupListRespPostgresqlBackupItem[]
326
+ pagination?: CommonCommon.Pagination
327
+ }
328
+
329
+ export type CreatePostgresqlBackupReq = {
330
+ cluster?: string
331
+ namespace?: string
332
+ name?: string
333
+ backupName?: string
334
+ }
335
+
336
+ export type CreatePostgresqlBackupResp = {
337
+ message?: string
338
+ }
339
+
340
+ export type PostgresqlBackupItemStatus = {
341
+ status?: PostgresqlBackupItemStatusStatus
342
+ message?: string
343
+ backupUrl?: string
344
+ backupType?: PostgresqlBackupItemStatusBackupType
345
+ backupMethod?: PostgresqlBackupItemStatusBackupMethod
346
+ completionTimestamp?: string
347
+ }
348
+
70
349
  export type GetPostgresqlUsersReq = {
71
350
  cluster?: string
72
351
  namespace?: string
@@ -138,6 +417,7 @@ export type CreatePostgresqlReq = {
138
417
  memoryRequest?: string
139
418
  memoryLimit?: string
140
419
  conf?: string
420
+ confTemplateName?: string
141
421
  isOpenPgAdmin?: boolean
142
422
  pgAdminServiceType?: CommonCommon.ServiceType
143
423
  pgAdminNodePort?: number
@@ -149,6 +429,8 @@ export type CreatePostgresqlReq = {
149
429
  pgAdminDefaultEmail?: string
150
430
  pgAdminDefaultPassword?: string
151
431
  affinity?: CommonCommon.Affinity
432
+ backupConfig?: UpdatePostgresqlBackupConfigReq
433
+ accessWhitelist?: CommonCommon.AccessWhitelist
152
434
  externalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy
153
435
  lbTyp?: CommonCommon.LBTyp
154
436
  lbPoolName?: string
@@ -164,6 +446,8 @@ export type UpdatePostgresqlConfReq = {
164
446
  namespace?: string
165
447
  name?: string
166
448
  conf?: string
449
+ confItems?: TemplateTemplate.TemplateConfigItem[]
450
+ reloadFromConfTemplateName?: string
167
451
  }
168
452
 
169
453
  export type UpdatePostgresqlParamsResp = {
@@ -178,13 +462,6 @@ export type GetPostgresqlParamRespSelectDataStringValue = {
178
462
  value?: string
179
463
  }
180
464
 
181
- export type GetPostgresqlParamRespSelectDataResourceValue = {
182
- cpuRequest?: string
183
- cpuLimit?: string
184
- memoryRequest?: string
185
- memoryLimit?: string
186
- }
187
-
188
465
  export type GetPostgresqlParamRespSelectDataIntValue = {
189
466
  value?: number
190
467
  }
@@ -199,7 +476,7 @@ type BaseGetPostgresqlParamRespSelectData = {
199
476
  }
200
477
 
201
478
  export type GetPostgresqlParamRespSelectData = BaseGetPostgresqlParamRespSelectData
202
- & OneOf<{ sValue: GetPostgresqlParamRespSelectDataStringValue; rValue: GetPostgresqlParamRespSelectDataResourceValue; iValue: GetPostgresqlParamRespSelectDataIntValue; scValue: GetPostgresqlParamRespSelectDataStorageClassValue }>
479
+ & OneOf<{ sValue: GetPostgresqlParamRespSelectDataStringValue; iValue: GetPostgresqlParamRespSelectDataIntValue; scValue: GetPostgresqlParamRespSelectDataStorageClassValue }>
203
480
 
204
481
  export type GetPostgresqlParamRespSelect = {
205
482
  selectType?: GetPostgresqlParamRespSelectSelectType
@@ -210,7 +487,6 @@ export type GetPostgresqlParamResp = {
210
487
  version?: GetPostgresqlParamRespSelect
211
488
  conf?: GetPostgresqlParamRespSelect
212
489
  replicas?: GetPostgresqlParamRespSelect
213
- resource?: GetPostgresqlParamRespSelect
214
490
  storage?: GetPostgresqlParamRespSelect
215
491
  }
216
492
 
@@ -290,6 +566,8 @@ export type GetPostgresqlGrafanaAddrReq = {
290
566
  cluster?: string
291
567
  namespace?: string
292
568
  name?: string
569
+ from?: string
570
+ to?: string
293
571
  }
294
572
 
295
573
  export type GetPostgresqlGrafanaAddrResp = {
@@ -329,6 +607,8 @@ export type PostgresqlItemStatus = {
329
607
  clusterIPs?: string[]
330
608
  avgReplicationLagInBytes?: string
331
609
  common?: CommonCommon.CommonItemStatus
610
+ isControl?: boolean
611
+ restoreInitialStatus?: PostgresqlItemStatusRestoreInitialStatus
332
612
  }
333
613
 
334
614
  export type PostgresqlItemMetadata = {
@@ -336,6 +616,7 @@ export type PostgresqlItemMetadata = {
336
616
  creationTimestamp?: string
337
617
  name?: string
338
618
  namespace?: string
619
+ uid?: string
339
620
  }
340
621
 
341
622
  export type PostgresqlItem = {
@@ -386,4 +667,31 @@ export class Postgresql {
386
667
  static GetPostgresqlUsers(req: GetPostgresqlUsersReq, initReq?: fm.InitReq): Promise<GetPostgresqlUsersResp> {
387
668
  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"})
388
669
  }
670
+ static GetPostgresqlBackupList(req: GetPostgresqlBackupListReq, initReq?: fm.InitReq): Promise<GetPostgresqlBackupListResp> {
671
+ 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"})
672
+ }
673
+ static CreatePostgresqlBackup(req: CreatePostgresqlBackupReq, initReq?: fm.InitReq): Promise<CreatePostgresqlBackupResp> {
674
+ 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)})
675
+ }
676
+ static CreatePostgresqlRestore(req: CreatePostgresqlRestoreReq, initReq?: fm.InitReq): Promise<CreatePostgresqlRestoreResp> {
677
+ return fm.fetchReq<CreatePostgresqlRestoreReq, CreatePostgresqlRestoreResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/restore`, {...initReq, method: "POST", body: JSON.stringify(req)})
678
+ }
679
+ static DeletePostgresqlBackup(req: DeletePostgresqlBackupReq, initReq?: fm.InitReq): Promise<DeletePostgresqlBackupResp> {
680
+ return fm.fetchReq<DeletePostgresqlBackupReq, DeletePostgresqlBackupResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/backups/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/${req["backupName"]}`, {...initReq, method: "DELETE", body: JSON.stringify(req)})
681
+ }
682
+ static UpdatePostgresqlBackupConfig(req: UpdatePostgresqlBackupConfigReq, initReq?: fm.InitReq): Promise<UpdatePostgresqlBackupConfigResp> {
683
+ 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)})
684
+ }
685
+ static GetPostgresqlS3ConfigList(req: GetPostgresqlS3ConfigListReq, initReq?: fm.InitReq): Promise<GetPostgresqlS3ConfigListResp> {
686
+ return fm.fetchReq<GetPostgresqlS3ConfigListReq, GetPostgresqlS3ConfigListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/s3/configs?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
687
+ }
688
+ static UpdatePostgresqlS3Config(req: UpdatePostgresqlS3ConfigReq, initReq?: fm.InitReq): Promise<UpdatePostgresqlS3ConfigResp> {
689
+ 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)})
690
+ }
691
+ static CreateBucketExistChecking(req: CreateBucketExistCheckingReq, initReq?: fm.InitReq): Promise<CreateBucketExistCheckingResp> {
692
+ return fm.fetchReq<CreateBucketExistCheckingReq, CreateBucketExistCheckingResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/s3/config/checking`, {...initReq, method: "PUT", body: JSON.stringify(req)})
693
+ }
694
+ static GetPostgresqlTopology(req: GetPostgresqlTopologyReq, initReq?: fm.InitReq): Promise<GetPostgresqlTopologyResp> {
695
+ return fm.fetchReq<GetPostgresqlTopologyReq, GetPostgresqlTopologyResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/topology?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
696
+ }
389
697
  }
@@ -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,194 @@
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
+ KafkaConfig = "KafkaConfig",
16
+ MysqlMgrConfig = "MysqlMgrConfig",
17
+ MongodbConfig = "MongodbConfig",
18
+ PostgresqlConfig = "PostgresqlConfig",
19
+ RabbitmqConfig = "RabbitmqConfig",
20
+ }
21
+
22
+ export enum GetTemplateConfigReqSortDir {
23
+ ASC = "ASC",
24
+ DESC = "DESC",
25
+ }
26
+
27
+ export enum GetTemplateConfigListReqSortDir {
28
+ ASC = "ASC",
29
+ DESC = "DESC",
30
+ }
31
+
32
+ export enum TemplateConfigItemValueType {
33
+ String = "String",
34
+ SingleSelection = "SingleSelection",
35
+ MultiString = "MultiString",
36
+ }
37
+
38
+ export type UpdateTemplateConfigToItemReq = {
39
+ workspaceId?: number
40
+ conf?: string
41
+ version?: string
42
+ templateInstanceType?: TemplateInstanceType
43
+ }
44
+
45
+ export type UpdateTemplateConfigToItemResp = {
46
+ items?: TemplateConfigItem[]
47
+ }
48
+
49
+ export type GetTemplateConfigVersionsReq = {
50
+ workspaceId?: number
51
+ }
52
+
53
+ export type GetTemplateConfigVersionsResp = {
54
+ versions?: string[]
55
+ }
56
+
57
+ export type GetTemplateConfigStringResp = {
58
+ conf?: string
59
+ fileName?: string
60
+ }
61
+
62
+ export type DeleteTemplateReq = {
63
+ workspaceId?: number
64
+ name?: string
65
+ version?: string
66
+ }
67
+
68
+ export type DeleteTemplateConfigResp = {
69
+ message?: string
70
+ }
71
+
72
+ export type CreateOrUpdateTemplateConfigResp = {
73
+ message?: string
74
+ }
75
+
76
+ export type GetTemplateConfigReq = {
77
+ page?: number
78
+ pageSize?: number
79
+ sortDir?: GetTemplateConfigReqSortDir
80
+ sortBy?: string
81
+ searchKey?: string
82
+ workspaceId?: number
83
+ name?: string
84
+ version?: string
85
+ templateType?: string
86
+ type?: string
87
+ createTimestamp?: string
88
+ templateInstanceType?: TemplateInstanceType
89
+ }
90
+
91
+ export type GetTemplateConfigStringReq = {
92
+ workspaceId?: number
93
+ name?: string
94
+ }
95
+
96
+ export type CreateTemplateConfigResp = {
97
+ message?: string
98
+ }
99
+
100
+ export type UpdateTemplateConfigResp = {
101
+ message?: string
102
+ }
103
+
104
+ export type CreateTemplateConfigReq = {
105
+ workspaceId?: number
106
+ targetName?: string
107
+ targetVersion?: string
108
+ targetType?: string
109
+ targetTemplateType?: string
110
+ targetConf?: string
111
+ fromTemplateName?: string
112
+ targetTemplateInstanceType?: TemplateInstanceType
113
+ }
114
+
115
+ export type UpdateTemplateConfigReq = {
116
+ workspaceId?: number
117
+ name?: string
118
+ version?: string
119
+ type?: string
120
+ templateType?: string
121
+ items?: TemplateConfigItem[]
122
+ conf?: string
123
+ }
124
+
125
+ export type GetTemplateConfigResp = {
126
+ data?: UpdateTemplateConfigReq
127
+ pagination?: CommonCommon.Pagination
128
+ }
129
+
130
+ export type GetTemplateConfigListReq = {
131
+ page?: number
132
+ pageSize?: number
133
+ sortDir?: GetTemplateConfigListReqSortDir
134
+ sortBy?: string
135
+ searchKey?: string
136
+ workspaceId?: number
137
+ version?: string
138
+ templateInstanceType?: TemplateInstanceType
139
+ }
140
+
141
+ export type TemplateConfigItem = {
142
+ name?: string
143
+ default?: string
144
+ current?: string
145
+ value?: string
146
+ isNeedRestart?: boolean
147
+ valueType?: TemplateConfigItemValueType
148
+ valueRemarksZh?: string
149
+ valueRemarksEn?: string
150
+ updateTimestamp?: string
151
+ }
152
+
153
+ export type GetTemplateConfigListResp = {
154
+ items?: GetTemplateConfigReq[]
155
+ pagination?: CommonCommon.Pagination
156
+ }
157
+
158
+ export type GetTemplateInstanceTypeListReq = {
159
+ workspaceId?: number
160
+ }
161
+
162
+ export type GetTemplateInstanceTypeListResp = {
163
+ type?: TemplateInstanceType[]
164
+ }
165
+
166
+ export class Template {
167
+ static GetTemplateConfigList(req: GetTemplateConfigListReq, initReq?: fm.InitReq): Promise<GetTemplateConfigListResp> {
168
+ return fm.fetchReq<GetTemplateConfigListReq, GetTemplateConfigListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
169
+ }
170
+ static GetTemplateInstanceTypeList(req: GetTemplateInstanceTypeListReq, initReq?: fm.InitReq): Promise<GetTemplateInstanceTypeListResp> {
171
+ return fm.fetchReq<GetTemplateInstanceTypeListReq, GetTemplateInstanceTypeListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_instance_type?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
172
+ }
173
+ static GetTemplateConfig(req: GetTemplateConfigReq, initReq?: fm.InitReq): Promise<GetTemplateConfigResp> {
174
+ return fm.fetchReq<GetTemplateConfigReq, GetTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
175
+ }
176
+ static DeleteTemplateConfig(req: DeleteTemplateReq, initReq?: fm.InitReq): Promise<DeleteTemplateConfigResp> {
177
+ return fm.fetchReq<DeleteTemplateReq, DeleteTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}/${req["version"]}`, {...initReq, method: "DELETE"})
178
+ }
179
+ static CreateTemplateConfig(req: CreateTemplateConfigReq, initReq?: fm.InitReq): Promise<CreateTemplateConfigResp> {
180
+ return fm.fetchReq<CreateTemplateConfigReq, CreateTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config`, {...initReq, method: "POST", body: JSON.stringify(req)})
181
+ }
182
+ static UpdateTemplateConfig(req: UpdateTemplateConfigReq, initReq?: fm.InitReq): Promise<UpdateTemplateConfigResp> {
183
+ return fm.fetchReq<UpdateTemplateConfigReq, UpdateTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
184
+ }
185
+ static GetTemplateConfigString(req: GetTemplateConfigStringReq, initReq?: fm.InitReq): Promise<GetTemplateConfigStringResp> {
186
+ return fm.fetchReq<GetTemplateConfigStringReq, GetTemplateConfigStringResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}/to_string?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
187
+ }
188
+ static UpdateTemplateConfigToItem(req: UpdateTemplateConfigToItemReq, initReq?: fm.InitReq): Promise<UpdateTemplateConfigToItemResp> {
189
+ return fm.fetchReq<UpdateTemplateConfigToItemReq, UpdateTemplateConfigToItemResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/to_template`, {...initReq, method: "PUT", body: JSON.stringify(req)})
190
+ }
191
+ static GetTemplateConfigVersions(req: GetTemplateConfigVersionsReq, initReq?: fm.InitReq): Promise<GetTemplateConfigVersionsResp> {
192
+ return fm.fetchReq<GetTemplateConfigVersionsReq, GetTemplateConfigVersionsResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/versions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
193
+ }
194
+ }
package/version.pb.ts CHANGED
@@ -17,6 +17,10 @@ export type GetVersionReply = {
17
17
  buildTime?: string
18
18
  }
19
19
 
20
+ export type HealthzReply = {
21
+ message?: string
22
+ }
23
+
20
24
  export type Empty = {
21
25
  }
22
26
 
@@ -24,4 +28,7 @@ export class Version {
24
28
  static Get(req: Empty, initReq?: fm.InitReq): Promise<GetVersionReply> {
25
29
  return fm.fetchReq<Empty, GetVersionReply>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/version?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
26
30
  }
31
+ static Healthz(req: Empty, initReq?: fm.InitReq): Promise<HealthzReply> {
32
+ return fm.fetchReq<Empty, HealthzReply>(`/healthz?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
33
+ }
27
34
  }