@daocloud-proto/mcamel-postgresql 0.0.2-49 → 0.0.2-490

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-49",
3
+ "version":"0.0.2-490",
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,79 @@ 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
+ }
33
+
34
+ export enum GetPostgresqlTopologyRespNodeRole {
35
+ RoleUnknown = "RoleUnknown",
36
+ Primary = "Primary",
37
+ Standby = "Standby",
38
+ }
39
+
40
+ export enum GetPostgresqlTopologyRespNodeSyncState {
41
+ SyncStateUnknown = "SyncStateUnknown",
42
+ Sync = "Sync",
43
+ Async = "Async",
44
+ Potential = "Potential",
45
+ Quorum = "Quorum",
46
+ }
47
+
48
+ export enum GetPostgresqlTopologyRespNodeState {
49
+ StateUnknown = "StateUnknown",
50
+ Startup = "Startup",
51
+ Catchup = "Catchup",
52
+ Streaming = "Streaming",
53
+ Backup = "Backup",
54
+ Stopping = "Stopping",
55
+ }
56
+
57
+ export enum GetPostgresqlS3ConfigListReqSortDir {
58
+ ASC = "ASC",
59
+ DESC = "DESC",
60
+ }
61
+
62
+ export enum GetPostgresqlBackupListReqSortDir {
63
+ ASC = "ASC",
64
+ DESC = "DESC",
65
+ }
66
+
67
+ export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusStatus {
68
+ Running = "Running",
69
+ Failed = "Failed",
70
+ Succeeded = "Succeeded",
71
+ }
72
+
73
+ export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupType {
74
+ Full = "Full",
75
+ Incremental = "Incremental",
76
+ }
77
+
78
+ export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupMethod {
79
+ Manual = "Manual",
80
+ Auto = "Auto",
81
+ }
82
+
83
+ export enum PostgresqlBackupItemStatusStatus {
84
+ Running = "Running",
85
+ Failed = "Failed",
86
+ Succeeded = "Succeeded",
87
+ }
88
+
89
+ export enum PostgresqlBackupItemStatusBackupType {
90
+ Full = "Full",
91
+ Incremental = "Incremental",
92
+ }
93
+
94
+ export enum PostgresqlBackupItemStatusBackupMethod {
95
+ Manual = "Manual",
96
+ Auto = "Auto",
97
+ }
98
+
25
99
  export enum GetPostgresqlListReqSortDir {
26
100
  ASC = "ASC",
27
101
  DESC = "DESC",
@@ -52,8 +126,8 @@ export enum GetPostgresqlPodListRespPodStatus {
52
126
  }
53
127
 
54
128
  export enum GetPostgresqlPodListRespPodType {
55
- Master = "Master",
56
- Replica = "Replica",
129
+ Primary = "Primary",
130
+ Standby = "Standby",
57
131
  PgAdmin = "PgAdmin",
58
132
  }
59
133
 
@@ -67,6 +141,203 @@ export enum GetPostgresqlConfRespItemsParamType {
67
141
  conf = "conf",
68
142
  }
69
143
 
144
+ export type GetPostgresqlTopologyReq = {
145
+ cluster?: string
146
+ namespace?: string
147
+ name?: string
148
+ }
149
+
150
+ export type GetPostgresqlTopologyRespNode = {
151
+ cluster?: string
152
+ namespace?: string
153
+ podName?: string
154
+ ip?: string
155
+ podStatus?: GetPostgresqlTopologyRespNodePodStatus
156
+ totalContainer?: number
157
+ totalContainerReady?: number
158
+ podCpuRequest?: string
159
+ podMemoryRequest?: string
160
+ podCpuLimit?: string
161
+ podMemoryLimit?: string
162
+ role?: GetPostgresqlTopologyRespNodeRole
163
+ syncState?: GetPostgresqlTopologyRespNodeSyncState
164
+ state?: GetPostgresqlTopologyRespNodeState
165
+ sentLsn?: string
166
+ writeLsn?: string
167
+ flushLsn?: string
168
+ replayLsn?: string
169
+ }
170
+
171
+ export type GetPostgresqlTopologyRespEdges = {
172
+ source?: string
173
+ target?: string
174
+ properties?: {[key: string]: string}
175
+ }
176
+
177
+ export type GetPostgresqlTopologyResp = {
178
+ nodes?: GetPostgresqlTopologyRespNode[]
179
+ edges?: GetPostgresqlTopologyRespEdges[]
180
+ }
181
+
182
+ export type CreatePostgresqlRestoreReq = {
183
+ cluster?: string
184
+ namespace?: string
185
+ name?: string
186
+ backupName?: string
187
+ targetPostgresqlName?: string
188
+ targetPostgresqlNamespace?: string
189
+ targetPostgresqlCluster?: string
190
+ }
191
+
192
+ export type CreatePostgresqlRestoreResp = {
193
+ message?: string
194
+ }
195
+
196
+ export type DeletePostgresqlBackupReq = {
197
+ cluster?: string
198
+ namespace?: string
199
+ name?: string
200
+ backupName?: string
201
+ removeRemoteBackup?: boolean
202
+ }
203
+
204
+ export type DeletePostgresqlBackupResp = {
205
+ message?: string
206
+ }
207
+
208
+ export type CreateBucketExistCheckingReq = {
209
+ endpoint?: string
210
+ accessKey?: string
211
+ secretKey?: string
212
+ bucket?: string
213
+ }
214
+
215
+ export type CreateBucketExistCheckingResp = {
216
+ message?: string
217
+ }
218
+
219
+ export type UpdatePostgresqlS3ConfigReq = {
220
+ cluster?: string
221
+ namespace?: string
222
+ name?: string
223
+ description?: string
224
+ endpoint?: string
225
+ accessKey?: string
226
+ secretKey?: string
227
+ bucket?: string
228
+ retentionTime?: string
229
+ provider?: string
230
+ }
231
+
232
+ export type UpdatePostgresqlS3ConfigResp = {
233
+ message?: string
234
+ }
235
+
236
+ export type GetPostgresqlS3ConfigListReq = {
237
+ page?: number
238
+ pageSize?: number
239
+ sortDir?: GetPostgresqlS3ConfigListReqSortDir
240
+ sortBy?: string
241
+ searchKey?: string
242
+ workspaceId?: number
243
+ }
244
+
245
+ export type GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItemsStatus = {
246
+ createTimestamp?: string
247
+ updateTimestamp?: string
248
+ backupPath?: string
249
+ }
250
+
251
+ export type GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItems = {
252
+ spec?: UpdatePostgresqlS3ConfigReq
253
+ status?: GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItemsStatus
254
+ }
255
+
256
+ export type GetPostgresqlS3ConfigListResp = {
257
+ items?: GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItems[]
258
+ pagination?: CommonCommon.Pagination
259
+ }
260
+
261
+ export type UpdatePostgresqlBackupConfigReq = {
262
+ cluster?: string
263
+ namespace?: string
264
+ name?: string
265
+ isOpenAutoBackup?: boolean
266
+ backupSchedule?: string
267
+ }
268
+
269
+ export type UpdatePostgresqlBackupConfigResp = {
270
+ message?: string
271
+ }
272
+
273
+ export type GetPostgresqlBackupListReq = {
274
+ page?: number
275
+ pageSize?: number
276
+ sortDir?: GetPostgresqlBackupListReqSortDir
277
+ sortBy?: string
278
+ searchKey?: string
279
+ cluster?: string
280
+ namespace?: string
281
+ name?: string
282
+ }
283
+
284
+ export type GetPostgresqlBackupListRespPostgresqlBackupItemMetadata = {
285
+ creationTimestamp?: string
286
+ name?: string
287
+ namespace?: string
288
+ }
289
+
290
+ export type GetPostgresqlBackupListRespPostgresqlBackupItemStatusJobCondition = {
291
+ type?: string
292
+ status?: string
293
+ reason?: string
294
+ message?: string
295
+ }
296
+
297
+ export type GetPostgresqlBackupListRespPostgresqlBackupItemStatus = {
298
+ completionTimestamp?: string
299
+ startTime?: string
300
+ active?: number
301
+ succeeded?: number
302
+ failed?: number
303
+ conditions?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusJobCondition[]
304
+ status?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusStatus
305
+ backupType?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupType
306
+ backupMethod?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupMethod
307
+ storePath?: string
308
+ }
309
+
310
+ export type GetPostgresqlBackupListRespPostgresqlBackupItem = {
311
+ metadata?: GetPostgresqlBackupListRespPostgresqlBackupItemMetadata
312
+ spec?: CreatePostgresqlBackupReq
313
+ status?: GetPostgresqlBackupListRespPostgresqlBackupItemStatus
314
+ }
315
+
316
+ export type GetPostgresqlBackupListResp = {
317
+ items?: GetPostgresqlBackupListRespPostgresqlBackupItem[]
318
+ pagination?: CommonCommon.Pagination
319
+ }
320
+
321
+ export type CreatePostgresqlBackupReq = {
322
+ cluster?: string
323
+ namespace?: string
324
+ name?: string
325
+ backupName?: string
326
+ }
327
+
328
+ export type CreatePostgresqlBackupResp = {
329
+ message?: string
330
+ }
331
+
332
+ export type PostgresqlBackupItemStatus = {
333
+ status?: PostgresqlBackupItemStatusStatus
334
+ message?: string
335
+ backupUrl?: string
336
+ backupType?: PostgresqlBackupItemStatusBackupType
337
+ backupMethod?: PostgresqlBackupItemStatusBackupMethod
338
+ completionTimestamp?: string
339
+ }
340
+
70
341
  export type GetPostgresqlUsersReq = {
71
342
  cluster?: string
72
343
  namespace?: string
@@ -138,6 +409,7 @@ export type CreatePostgresqlReq = {
138
409
  memoryRequest?: string
139
410
  memoryLimit?: string
140
411
  conf?: string
412
+ confTemplateName?: string
141
413
  isOpenPgAdmin?: boolean
142
414
  pgAdminServiceType?: CommonCommon.ServiceType
143
415
  pgAdminNodePort?: number
@@ -149,6 +421,8 @@ export type CreatePostgresqlReq = {
149
421
  pgAdminDefaultEmail?: string
150
422
  pgAdminDefaultPassword?: string
151
423
  affinity?: CommonCommon.Affinity
424
+ backupConfig?: UpdatePostgresqlBackupConfigReq
425
+ accessWhitelist?: CommonCommon.AccessWhitelist
152
426
  externalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy
153
427
  lbTyp?: CommonCommon.LBTyp
154
428
  lbPoolName?: string
@@ -164,6 +438,8 @@ export type UpdatePostgresqlConfReq = {
164
438
  namespace?: string
165
439
  name?: string
166
440
  conf?: string
441
+ confItems?: TemplateTemplate.TemplateConfigItem[]
442
+ reloadFromConfTemplateName?: string
167
443
  }
168
444
 
169
445
  export type UpdatePostgresqlParamsResp = {
@@ -178,13 +454,6 @@ export type GetPostgresqlParamRespSelectDataStringValue = {
178
454
  value?: string
179
455
  }
180
456
 
181
- export type GetPostgresqlParamRespSelectDataResourceValue = {
182
- cpuRequest?: string
183
- cpuLimit?: string
184
- memoryRequest?: string
185
- memoryLimit?: string
186
- }
187
-
188
457
  export type GetPostgresqlParamRespSelectDataIntValue = {
189
458
  value?: number
190
459
  }
@@ -199,7 +468,7 @@ type BaseGetPostgresqlParamRespSelectData = {
199
468
  }
200
469
 
201
470
  export type GetPostgresqlParamRespSelectData = BaseGetPostgresqlParamRespSelectData
202
- & OneOf<{ sValue: GetPostgresqlParamRespSelectDataStringValue; rValue: GetPostgresqlParamRespSelectDataResourceValue; iValue: GetPostgresqlParamRespSelectDataIntValue; scValue: GetPostgresqlParamRespSelectDataStorageClassValue }>
471
+ & OneOf<{ sValue: GetPostgresqlParamRespSelectDataStringValue; iValue: GetPostgresqlParamRespSelectDataIntValue; scValue: GetPostgresqlParamRespSelectDataStorageClassValue }>
203
472
 
204
473
  export type GetPostgresqlParamRespSelect = {
205
474
  selectType?: GetPostgresqlParamRespSelectSelectType
@@ -210,7 +479,6 @@ export type GetPostgresqlParamResp = {
210
479
  version?: GetPostgresqlParamRespSelect
211
480
  conf?: GetPostgresqlParamRespSelect
212
481
  replicas?: GetPostgresqlParamRespSelect
213
- resource?: GetPostgresqlParamRespSelect
214
482
  storage?: GetPostgresqlParamRespSelect
215
483
  }
216
484
 
@@ -290,6 +558,8 @@ export type GetPostgresqlGrafanaAddrReq = {
290
558
  cluster?: string
291
559
  namespace?: string
292
560
  name?: string
561
+ from?: string
562
+ to?: string
293
563
  }
294
564
 
295
565
  export type GetPostgresqlGrafanaAddrResp = {
@@ -329,6 +599,7 @@ export type PostgresqlItemStatus = {
329
599
  clusterIPs?: string[]
330
600
  avgReplicationLagInBytes?: string
331
601
  common?: CommonCommon.CommonItemStatus
602
+ isControl?: boolean
332
603
  }
333
604
 
334
605
  export type PostgresqlItemMetadata = {
@@ -336,6 +607,7 @@ export type PostgresqlItemMetadata = {
336
607
  creationTimestamp?: string
337
608
  name?: string
338
609
  namespace?: string
610
+ uid?: string
339
611
  }
340
612
 
341
613
  export type PostgresqlItem = {
@@ -386,4 +658,31 @@ export class Postgresql {
386
658
  static GetPostgresqlUsers(req: GetPostgresqlUsersReq, initReq?: fm.InitReq): Promise<GetPostgresqlUsersResp> {
387
659
  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
660
  }
661
+ static GetPostgresqlBackupList(req: GetPostgresqlBackupListReq, initReq?: fm.InitReq): Promise<GetPostgresqlBackupListResp> {
662
+ 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"})
663
+ }
664
+ static CreatePostgresqlBackup(req: CreatePostgresqlBackupReq, initReq?: fm.InitReq): Promise<CreatePostgresqlBackupResp> {
665
+ 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)})
666
+ }
667
+ static CreatePostgresqlRestore(req: CreatePostgresqlRestoreReq, initReq?: fm.InitReq): Promise<CreatePostgresqlRestoreResp> {
668
+ 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)})
669
+ }
670
+ static DeletePostgresqlBackup(req: DeletePostgresqlBackupReq, initReq?: fm.InitReq): Promise<DeletePostgresqlBackupResp> {
671
+ 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)})
672
+ }
673
+ static UpdatePostgresqlBackupConfig(req: UpdatePostgresqlBackupConfigReq, initReq?: fm.InitReq): Promise<UpdatePostgresqlBackupConfigResp> {
674
+ 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)})
675
+ }
676
+ static GetPostgresqlS3ConfigList(req: GetPostgresqlS3ConfigListReq, initReq?: fm.InitReq): Promise<GetPostgresqlS3ConfigListResp> {
677
+ return fm.fetchReq<GetPostgresqlS3ConfigListReq, GetPostgresqlS3ConfigListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/s3/configs?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
678
+ }
679
+ static UpdatePostgresqlS3Config(req: UpdatePostgresqlS3ConfigReq, initReq?: fm.InitReq): Promise<UpdatePostgresqlS3ConfigResp> {
680
+ 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)})
681
+ }
682
+ static CreateBucketExistChecking(req: CreateBucketExistCheckingReq, initReq?: fm.InitReq): Promise<CreateBucketExistCheckingResp> {
683
+ return fm.fetchReq<CreateBucketExistCheckingReq, CreateBucketExistCheckingResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/s3/config/checking`, {...initReq, method: "PUT", body: JSON.stringify(req)})
684
+ }
685
+ static GetPostgresqlTopology(req: GetPostgresqlTopologyReq, initReq?: fm.InitReq): Promise<GetPostgresqlTopologyResp> {
686
+ 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"})
687
+ }
389
688
  }
@@ -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,195 @@
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
+ pagination?: CommonCommon.Pagination
48
+ }
49
+
50
+ export type GetTemplateConfigVersionsReq = {
51
+ workspaceId?: number
52
+ }
53
+
54
+ export type GetTemplateConfigVersionsResp = {
55
+ versions?: string[]
56
+ }
57
+
58
+ export type GetTemplateConfigStringResp = {
59
+ conf?: string
60
+ fileName?: string
61
+ }
62
+
63
+ export type DeleteTemplateReq = {
64
+ workspaceId?: number
65
+ name?: string
66
+ version?: string
67
+ }
68
+
69
+ export type DeleteTemplateConfigResp = {
70
+ message?: string
71
+ }
72
+
73
+ export type CreateOrUpdateTemplateConfigResp = {
74
+ message?: string
75
+ }
76
+
77
+ export type GetTemplateConfigReq = {
78
+ page?: number
79
+ pageSize?: number
80
+ sortDir?: GetTemplateConfigReqSortDir
81
+ sortBy?: string
82
+ searchKey?: string
83
+ workspaceId?: number
84
+ name?: string
85
+ version?: string
86
+ templateType?: string
87
+ type?: string
88
+ createTimestamp?: string
89
+ templateInstanceType?: TemplateInstanceType
90
+ }
91
+
92
+ export type GetTemplateConfigStringReq = {
93
+ workspaceId?: number
94
+ name?: string
95
+ }
96
+
97
+ export type CreateTemplateConfigResp = {
98
+ message?: string
99
+ }
100
+
101
+ export type UpdateTemplateConfigResp = {
102
+ message?: string
103
+ }
104
+
105
+ export type CreateTemplateConfigReq = {
106
+ workspaceId?: number
107
+ targetName?: string
108
+ targetVersion?: string
109
+ targetType?: string
110
+ targetTemplateType?: string
111
+ targetConf?: string
112
+ fromTemplateName?: string
113
+ targetTemplateInstanceType?: TemplateInstanceType
114
+ }
115
+
116
+ export type UpdateTemplateConfigReq = {
117
+ workspaceId?: number
118
+ name?: string
119
+ version?: string
120
+ type?: string
121
+ templateType?: string
122
+ items?: TemplateConfigItem[]
123
+ conf?: string
124
+ }
125
+
126
+ export type GetTemplateConfigResp = {
127
+ data?: UpdateTemplateConfigReq
128
+ pagination?: CommonCommon.Pagination
129
+ }
130
+
131
+ export type GetTemplateConfigListReq = {
132
+ page?: number
133
+ pageSize?: number
134
+ sortDir?: GetTemplateConfigListReqSortDir
135
+ sortBy?: string
136
+ searchKey?: string
137
+ workspaceId?: number
138
+ version?: string
139
+ templateInstanceType?: TemplateInstanceType
140
+ }
141
+
142
+ export type TemplateConfigItem = {
143
+ name?: string
144
+ default?: string
145
+ current?: string
146
+ value?: string
147
+ isNeedRestart?: boolean
148
+ valueType?: TemplateConfigItemValueType
149
+ valueRemarksZh?: string
150
+ valueRemarksEn?: string
151
+ updateTimestamp?: string
152
+ }
153
+
154
+ export type GetTemplateConfigListResp = {
155
+ items?: GetTemplateConfigReq[]
156
+ pagination?: CommonCommon.Pagination
157
+ }
158
+
159
+ export type GetTemplateInstanceTypeListReq = {
160
+ workspaceId?: number
161
+ }
162
+
163
+ export type GetTemplateInstanceTypeListResp = {
164
+ type?: TemplateInstanceType[]
165
+ }
166
+
167
+ export class Template {
168
+ static GetTemplateConfigList(req: GetTemplateConfigListReq, initReq?: fm.InitReq): Promise<GetTemplateConfigListResp> {
169
+ return fm.fetchReq<GetTemplateConfigListReq, GetTemplateConfigListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
170
+ }
171
+ static GetTemplateInstanceTypeList(req: GetTemplateInstanceTypeListReq, initReq?: fm.InitReq): Promise<GetTemplateInstanceTypeListResp> {
172
+ return fm.fetchReq<GetTemplateInstanceTypeListReq, GetTemplateInstanceTypeListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_instance_type?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
173
+ }
174
+ static GetTemplateConfig(req: GetTemplateConfigReq, initReq?: fm.InitReq): Promise<GetTemplateConfigResp> {
175
+ return fm.fetchReq<GetTemplateConfigReq, GetTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
176
+ }
177
+ static DeleteTemplateConfig(req: DeleteTemplateReq, initReq?: fm.InitReq): Promise<DeleteTemplateConfigResp> {
178
+ return fm.fetchReq<DeleteTemplateReq, DeleteTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}/${req["version"]}`, {...initReq, method: "DELETE"})
179
+ }
180
+ static CreateTemplateConfig(req: CreateTemplateConfigReq, initReq?: fm.InitReq): Promise<CreateTemplateConfigResp> {
181
+ return fm.fetchReq<CreateTemplateConfigReq, CreateTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config`, {...initReq, method: "POST", body: JSON.stringify(req)})
182
+ }
183
+ static UpdateTemplateConfig(req: UpdateTemplateConfigReq, initReq?: fm.InitReq): Promise<UpdateTemplateConfigResp> {
184
+ return fm.fetchReq<UpdateTemplateConfigReq, UpdateTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
185
+ }
186
+ static GetTemplateConfigString(req: GetTemplateConfigStringReq, initReq?: fm.InitReq): Promise<GetTemplateConfigStringResp> {
187
+ 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"})
188
+ }
189
+ static UpdateTemplateConfigToItem(req: UpdateTemplateConfigToItemReq, initReq?: fm.InitReq): Promise<UpdateTemplateConfigToItemResp> {
190
+ return fm.fetchReq<UpdateTemplateConfigToItemReq, UpdateTemplateConfigToItemResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/to_template`, {...initReq, method: "PUT", body: JSON.stringify(req)})
191
+ }
192
+ static GetTemplateConfigVersions(req: GetTemplateConfigVersionsReq, initReq?: fm.InitReq): Promise<GetTemplateConfigVersionsResp> {
193
+ return fm.fetchReq<GetTemplateConfigVersionsReq, GetTemplateConfigVersionsResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/versions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
194
+ }
195
+ }
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
  }