@daocloud-proto/mcamel-mysql 0.11.0-rc2-15 → 0.16.0-rc1-3

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
@@ -29,6 +29,7 @@ export enum PermissionsType {
29
29
  CreateTemplate = "CreateTemplate",
30
30
  UpdateTemplate = "UpdateTemplate",
31
31
  DeleteTemplate = "DeleteTemplate",
32
+ GetUserPassword = "GetUserPassword",
32
33
  }
33
34
 
34
35
  export enum EventType {
@@ -37,6 +38,11 @@ export enum EventType {
37
38
  Warning = "Warning",
38
39
  }
39
40
 
41
+ export enum InstallFileReqGVR {
42
+ None = "None",
43
+ CustomResourceDefinition = "CustomResourceDefinition",
44
+ }
45
+
40
46
  export enum GetAllEventListReqSortDir {
41
47
  ASC = "ASC",
42
48
  DESC = "DESC",
@@ -63,6 +69,47 @@ export enum GetInsightAgentStatusRespInsightAgentStatus {
63
69
  Install = "Install",
64
70
  }
65
71
 
72
+ export type InstallFileReq = {
73
+ cluster?: string
74
+ path?: string
75
+ gvr?: InstallFileReqGVR
76
+ }
77
+
78
+ export type InstallFileResp = {
79
+ message?: string
80
+ }
81
+
82
+ export type GetInstallVersionReq = {
83
+ cluster?: string
84
+ }
85
+
86
+ export type GetInstallVersionRespSupportVersion = {
87
+ minVersion?: string
88
+ maxVersion?: string
89
+ }
90
+
91
+ export type GetInstallVersionRespStatus = {
92
+ inRange?: boolean
93
+ }
94
+
95
+ export type GetInstallVersionResp = {
96
+ clusterVersion?: string
97
+ supportVersion?: GetInstallVersionRespSupportVersion
98
+ status?: GetInstallVersionRespStatus
99
+ }
100
+
101
+ export type RestartInstanceReq = {
102
+ workspaceId?: number
103
+ cluster?: string
104
+ namespace?: string
105
+ name?: string
106
+ extra?: string
107
+ }
108
+
109
+ export type RestartInstanceResp = {
110
+ message?: string
111
+ }
112
+
66
113
  export type GetPermissionsListReq = {
67
114
  workspaceId?: number
68
115
  }
@@ -88,6 +135,7 @@ export type GetPermissionsListRespPermissions = {
88
135
  createTemplate?: boolean
89
136
  updateTemplate?: boolean
90
137
  deleteTemplate?: boolean
138
+ getUserPassword?: boolean
91
139
  }
92
140
 
93
141
  export type GetPermissionsListResp = {
@@ -168,8 +216,14 @@ export type GetClusterNodeLabelListRespLabel = {
168
216
  value?: string[]
169
217
  }
170
218
 
219
+ export type GetClusterNodeLabelListRespNode2Label = {
220
+ nodeName?: string
221
+ label?: GetClusterNodeLabelListRespLabel[]
222
+ }
223
+
171
224
  export type GetClusterNodeLabelListResp = {
172
225
  items?: GetClusterNodeLabelListRespLabel[]
226
+ items1?: GetClusterNodeLabelListRespNode2Label[]
173
227
  pagination?: CommonCommon.Pagination
174
228
  }
175
229
 
@@ -271,11 +325,20 @@ export type GetWorkspaceListResp = {
271
325
  pagination?: CommonCommon.Pagination
272
326
  }
273
327
 
328
+ export type GetClusterHostnetworkPortsReq = {
329
+ workspaceId?: number
330
+ cluster?: string
331
+ }
332
+
274
333
  export type GetClusterListReq = {
275
334
  workspaceId?: number
276
335
  searchKey?: string
277
336
  }
278
337
 
338
+ export type GetClusterHostnetworkPortsResp = {
339
+ items?: number[]
340
+ }
341
+
279
342
  export type GetClusterListResp = {
280
343
  items?: string[]
281
344
  clusters?: ClusterItem[]
@@ -302,6 +365,7 @@ export type GetClusterNamespaceListReq = {
302
365
 
303
366
  export type GetClusterNamespaceListResp = {
304
367
  items?: string[]
368
+ disableItems?: string[]
305
369
  pagination?: CommonCommon.Pagination
306
370
  }
307
371
 
@@ -311,12 +375,45 @@ export type GetInsightAgentStatusReq = {
311
375
 
312
376
  export type GetInsightAgentStatusResp = {
313
377
  status?: GetInsightAgentStatusRespInsightAgentStatus
378
+ clusterStatus?: CommonCommon.ClusterStatus
379
+ }
380
+
381
+ export type GetResourceQuotaReq = {
382
+ cluster?: string
383
+ namespace?: string
384
+ }
385
+
386
+ export type GetResourceQuotaRespMetadata = {
387
+ uid?: string
388
+ name?: string
389
+ namespace?: string
390
+ annotations?: {[key: string]: string}
391
+ resourceVersion?: string
392
+ creationTimestamp?: string
393
+ }
394
+
395
+ export type GetResourceQuotaRespSpec = {
396
+ hard?: {[key: string]: string}
397
+ }
398
+
399
+ export type GetResourceQuotaRespStatus = {
400
+ hard?: {[key: string]: string}
401
+ used?: {[key: string]: string}
402
+ }
403
+
404
+ export type GetResourceQuotaResp = {
405
+ metadata?: GetResourceQuotaRespMetadata
406
+ spec?: GetResourceQuotaRespSpec
407
+ status?: GetResourceQuotaRespStatus
314
408
  }
315
409
 
316
410
  export class Cluster {
317
411
  static GetClusterList(req: GetClusterListReq, initReq?: fm.InitReq): Promise<GetClusterListResp> {
318
412
  return fm.fetchReq<GetClusterListReq, GetClusterListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/clusters?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
319
413
  }
414
+ static GetClusterHostnetworkPorts(req: GetClusterHostnetworkPortsReq, initReq?: fm.InitReq): Promise<GetClusterHostnetworkPortsResp> {
415
+ return fm.fetchReq<GetClusterHostnetworkPortsReq, GetClusterHostnetworkPortsResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/hostnetwork-ports?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
416
+ }
320
417
  static GetClusterNamespaceList(req: GetClusterNamespaceListReq, initReq?: fm.InitReq): Promise<GetClusterNamespaceListResp> {
321
418
  return fm.fetchReq<GetClusterNamespaceListReq, GetClusterNamespaceListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/${req["cluster"]}/namespaces?${fm.renderURLSearchParams(req, ["workspaceId", "cluster"])}`, {...initReq, method: "GET"})
322
419
  }
@@ -350,4 +447,16 @@ export class Cluster {
350
447
  static GetPermissionsList(req: GetPermissionsListReq, initReq?: fm.InitReq): Promise<GetPermissionsListResp> {
351
448
  return fm.fetchReq<GetPermissionsListReq, GetPermissionsListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/permissions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
352
449
  }
450
+ static RestartInstance(req: RestartInstanceReq, initReq?: fm.InitReq): Promise<RestartInstanceResp> {
451
+ return fm.fetchReq<RestartInstanceReq, RestartInstanceResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/restart`, {...initReq, method: "POST", body: JSON.stringify(req)})
452
+ }
453
+ static InstallFile(req: InstallFileReq, initReq?: fm.InitReq): Promise<InstallFileResp> {
454
+ return fm.fetchReq<InstallFileReq, InstallFileResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["cluster"]}/install-file`, {...initReq, method: "POST", body: JSON.stringify(req)})
455
+ }
456
+ static GetInstallVersion(req: GetInstallVersionReq, initReq?: fm.InitReq): Promise<GetInstallVersionResp> {
457
+ return fm.fetchReq<GetInstallVersionReq, GetInstallVersionResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["cluster"]}/install-version?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
458
+ }
459
+ static GetResourceQuota(req: GetResourceQuotaReq, initReq?: fm.InitReq): Promise<GetResourceQuotaResp> {
460
+ return fm.fetchReq<GetResourceQuotaReq, GetResourceQuotaResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["cluster"]}/${req["namespace"]}/resourcequota?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
461
+ }
353
462
  }
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",
@@ -170,6 +180,7 @@ export type CommonItemStatus = {
170
180
  avgPvUsedInGb?: number
171
181
  cpuUtilization?: number
172
182
  memoryUtilization?: number
183
+ clusterStatus?: ClusterStatus
173
184
  }
174
185
 
175
186
  export type AccessWhitelistInternal = {
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/mysql.pb.ts CHANGED
@@ -17,10 +17,33 @@ type OneOf<T> =
17
17
  : never)
18
18
  : never);
19
19
 
20
+ export enum RoleType {
21
+ Unknown = "Unknown",
22
+ Master = "Master",
23
+ Slave = "Slave",
24
+ PRIMARY = "PRIMARY",
25
+ SECONDARY = "SECONDARY",
26
+ }
27
+
28
+ export enum InstanceType {
29
+ UnKnown = "UnKnown",
30
+ SingleNode = "SingleNode",
31
+ MasterSlave = "MasterSlave",
32
+ Mgr = "Mgr",
33
+ }
34
+
20
35
  export enum Status {
21
36
  Failed = "Failed",
22
37
  Running = "Running",
23
38
  Creating = "Creating",
39
+ MgrOnline = "MgrOnline",
40
+ MgrRecovering = "MgrRecovering",
41
+ MgrError = "MgrError",
42
+ MgrOffline = "MgrOffline",
43
+ MgrNotManaged = "MgrNotManaged",
44
+ MgrUnmanaged = "MgrUnmanaged",
45
+ MgrUnreachable = "MgrUnreachable",
46
+ MgrUnknown = "MgrUnknown",
24
47
  }
25
48
 
26
49
  export enum GetMinioListReqSortDir {
@@ -108,6 +131,8 @@ export enum GetMysqlNodeListRespNodeType {
108
131
  Master = "Master",
109
132
  Replica = "Replica",
110
133
  PhpAdmin = "PhpAdmin",
134
+ PRIMARY = "PRIMARY",
135
+ SECONDARY = "SECONDARY",
111
136
  }
112
137
 
113
138
  export enum GetMysqlConfRespItemsParamType {
@@ -121,6 +146,46 @@ export enum MysqlClusterItemStatusRestoreInitialStatus {
121
146
  Succeeded = "Succeeded",
122
147
  }
123
148
 
149
+ export type GetTopologyRequest = {
150
+ cluster?: string
151
+ namespace?: string
152
+ name?: string
153
+ instanceType?: InstanceType
154
+ }
155
+
156
+ export type GetTopologyResp = {
157
+ cluster?: string
158
+ namespace?: string
159
+ name?: string
160
+ instanceType?: InstanceType
161
+ version?: string
162
+ topology?: Topology[]
163
+ storageClassName?: string
164
+ storageCapacity?: string
165
+ }
166
+
167
+ export type Topology = {
168
+ source?: Node
169
+ replicas?: Node[]
170
+ }
171
+
172
+ export type Node = {
173
+ serverUuid?: string
174
+ upstreamServerUuid?: string
175
+ role?: RoleType
176
+ podName?: string
177
+ ip?: string
178
+ status?: Status
179
+ cpuLimit?: number
180
+ cpuUsage?: number
181
+ memoryLimit?: number
182
+ memoryUsage?: number
183
+ gtidPurged?: string
184
+ gtidExecuted?: string
185
+ lagBehindUpstream?: string
186
+ error?: string
187
+ }
188
+
124
189
  export type GetMinioListReq = {
125
190
  page?: number
126
191
  pageSize?: number
@@ -156,6 +221,7 @@ export type GetMysqlUsersReq = {
156
221
  cluster?: string
157
222
  namespace?: string
158
223
  name?: string
224
+ instanceType?: InstanceType
159
225
  }
160
226
 
161
227
  export type GetMysqlUsersRespUserItem = {
@@ -180,6 +246,7 @@ export type UpdateMysqlBackupConfigReq = {
180
246
  storageConfigName?: string
181
247
  storageConfigNamespace?: string
182
248
  storageConfigCluster?: string
249
+ instanceType?: InstanceType
183
250
  }
184
251
 
185
252
  export type UpdateMysqlBackupConfigResp = {
@@ -193,6 +260,9 @@ export type CreateMysqlRecoverReq = {
193
260
  name?: string
194
261
  backupName?: string
195
262
  targetMysqlClusterName?: string
263
+ targetMysqlClusterNamespace?: string
264
+ targetMysqlClusterCluster?: string
265
+ instanceType?: InstanceType
196
266
  }
197
267
 
198
268
  export type CreateMysqlRecoverResp = {
@@ -208,6 +278,7 @@ export type GetMysqlBackupListReq = {
208
278
  cluster?: string
209
279
  namespace?: string
210
280
  name?: string
281
+ instanceType?: InstanceType
211
282
  }
212
283
 
213
284
  export type GetMysqlBackupJobListReq = {
@@ -318,6 +389,7 @@ export type CreateMysqlBackupReq = {
318
389
  backupName?: string
319
390
  backupBucket?: string
320
391
  backupBucketSubPath?: string
392
+ instanceType?: InstanceType
321
393
  }
322
394
 
323
395
  export type CreateMysqlBackupResp = {
@@ -332,10 +404,12 @@ export type DeleteMysqlBackupReq = {
332
404
  cluster?: string
333
405
  namespace?: string
334
406
  name?: string
407
+ instanceType?: InstanceType
335
408
  }
336
409
 
337
410
  export type DeleteMysqlBackupResp = {
338
411
  message?: string
412
+ instanceType?: InstanceType
339
413
  }
340
414
 
341
415
  export type GetMysqlListReq = {
@@ -358,6 +432,7 @@ export type GetMysqlConfReq = {
358
432
  cluster?: string
359
433
  namespace?: string
360
434
  name?: string
435
+ instanceType?: InstanceType
361
436
  }
362
437
 
363
438
  export type GetMysqlParamReq = {
@@ -380,6 +455,7 @@ export type CreateMysqlReq = {
380
455
  describe?: string
381
456
  version?: string
382
457
  replicas?: number
458
+ instanceType?: InstanceType
383
459
  storageClassName?: string
384
460
  storageCapacity?: string
385
461
  rootPassword?: string
@@ -414,6 +490,7 @@ export type CreateMysqlReq = {
414
490
  storageConfigCluster?: string
415
491
  affinity?: CommonCommon.Affinity
416
492
  serviceMonitorInterval?: string
493
+ accessWhitelist?: CommonCommon.AccessWhitelist
417
494
  externalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy
418
495
  lbTyp?: CommonCommon.LBTyp
419
496
  lbPoolName?: string
@@ -430,6 +507,7 @@ export type UpdateMysqlConfReq = {
430
507
  name?: string
431
508
  confItems?: TemplateTemplate.TemplateConfigItem[]
432
509
  reloadFromConfTemplateName?: string
510
+ instanceType?: InstanceType
433
511
  }
434
512
 
435
513
  export type UpdateMysqlParamsResp = {
@@ -444,13 +522,6 @@ export type GetMysqlParamRespSelectDataStringValue = {
444
522
  value?: string
445
523
  }
446
524
 
447
- export type GetMysqlParamRespSelectDataResourceValue = {
448
- cpuRequest?: string
449
- cpuLimit?: string
450
- memoryRequest?: string
451
- memoryLimit?: string
452
- }
453
-
454
525
  export type GetMysqlParamRespSelectDataIntValue = {
455
526
  value?: number
456
527
  }
@@ -465,7 +536,7 @@ type BaseGetMysqlParamRespSelectData = {
465
536
  }
466
537
 
467
538
  export type GetMysqlParamRespSelectData = BaseGetMysqlParamRespSelectData
468
- & OneOf<{ sValue: GetMysqlParamRespSelectDataStringValue; rValue: GetMysqlParamRespSelectDataResourceValue; iValue: GetMysqlParamRespSelectDataIntValue; scValue: GetMysqlParamRespSelectDataStorageClassValue }>
539
+ & OneOf<{ sValue: GetMysqlParamRespSelectDataStringValue; iValue: GetMysqlParamRespSelectDataIntValue; scValue: GetMysqlParamRespSelectDataStorageClassValue }>
469
540
 
470
541
  export type GetMysqlParamRespSelect = {
471
542
  selectType?: GetMysqlParamRespSelectSelectType
@@ -475,10 +546,10 @@ export type GetMysqlParamRespSelect = {
475
546
  export type GetMysqlParamResp = {
476
547
  version?: GetMysqlParamRespSelect
477
548
  replicas?: GetMysqlParamRespSelect
478
- resource?: GetMysqlParamRespSelect
479
549
  storage?: GetMysqlParamRespSelect
480
550
  cnf?: GetMysqlParamRespSelect
481
551
  eightXcnf?: GetMysqlParamRespSelect
552
+ mgrVersion?: GetMysqlParamRespSelect
482
553
  }
483
554
 
484
555
  export type GetMysqlBackupProviderListResp = {
@@ -490,12 +561,14 @@ export type CreateMysqlResp = {
490
561
  }
491
562
 
492
563
  export type GetMysqlOperatorVersionListReq = {
564
+ cluster?: string
493
565
  }
494
566
 
495
567
  export type GetMysqlOperatorVersionListRespGetMysqlOperatorVersionListData = {
496
568
  cluster?: string
497
569
  namespace?: string
498
570
  version?: string
571
+ instanceType?: InstanceType[]
499
572
  }
500
573
 
501
574
  export type GetMysqlOperatorVersionListResp = {
@@ -507,6 +580,7 @@ export type DeleteMysqlReq = {
507
580
  cluster?: string
508
581
  namespace?: string
509
582
  name?: string
583
+ instanceType?: InstanceType
510
584
  }
511
585
 
512
586
  export type DeleteMysqlsReq = {
@@ -530,6 +604,7 @@ export type GetMysqlNodeListReq = {
530
604
  sortDir?: GetMysqlNodeListReqSortDir
531
605
  sortBy?: string
532
606
  searchKey?: string
607
+ instanceType?: InstanceType
533
608
  }
534
609
 
535
610
  export type GetMysqlNodeListRespData = {
@@ -558,6 +633,7 @@ export type GetMysqlGrafanaAddrReq = {
558
633
  name?: string
559
634
  from?: string
560
635
  to?: string
636
+ instanceType?: InstanceType
561
637
  }
562
638
 
563
639
  export type GetMysqlGrafanaAddrResp = {
@@ -568,6 +644,7 @@ export type GetMysqlReq = {
568
644
  cluster?: string
569
645
  namespace?: string
570
646
  name?: string
647
+ instanceType?: InstanceType
571
648
  }
572
649
 
573
650
  export type GetMysqlResp = {
@@ -621,74 +698,77 @@ export type MysqlClusterItem = {
621
698
  status?: MysqlClusterItemStatus
622
699
  }
623
700
 
624
- export class Mysql {
701
+ export class MysqlMgr {
625
702
  static GetMysqlList(req: GetMysqlListReq, initReq?: fm.InitReq): Promise<GetMysqlListResp> {
626
- return fm.fetchReq<GetMysqlListReq, GetMysqlListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/mysqls?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
703
+ return fm.fetchReq<GetMysqlListReq, GetMysqlListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/mysqls?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
627
704
  }
628
705
  static GetMysqlOperatorVersionList(req: GetMysqlOperatorVersionListReq, initReq?: fm.InitReq): Promise<GetMysqlOperatorVersionListResp> {
629
- return fm.fetchReq<GetMysqlOperatorVersionListReq, GetMysqlOperatorVersionListResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql-operator/versions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
706
+ return fm.fetchReq<GetMysqlOperatorVersionListReq, GetMysqlOperatorVersionListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/mysql-operator/versions?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
630
707
  }
631
708
  static GetMysql(req: GetMysqlReq, initReq?: fm.InitReq): Promise<GetMysqlResp> {
632
- return fm.fetchReq<GetMysqlReq, GetMysqlResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
709
+ return fm.fetchReq<GetMysqlReq, GetMysqlResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
633
710
  }
634
711
  static GetMysqlParam(req: GetMysqlParamReq, initReq?: fm.InitReq): Promise<GetMysqlParamResp> {
635
- return fm.fetchReq<GetMysqlParamReq, GetMysqlParamResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql-params/${req["cluster"]}?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
712
+ return fm.fetchReq<GetMysqlParamReq, GetMysqlParamResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql-params/${req["cluster"]}?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
636
713
  }
637
714
  static GetMysqlNodeList(req: GetMysqlNodeListReq, initReq?: fm.InitReq): Promise<GetMysqlNodeListResp> {
638
- return fm.fetchReq<GetMysqlNodeListReq, GetMysqlNodeListResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/nodes?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
715
+ return fm.fetchReq<GetMysqlNodeListReq, GetMysqlNodeListResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/nodes?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
639
716
  }
640
717
  static GetMysqlGrafanaAddr(req: GetMysqlGrafanaAddrReq, initReq?: fm.InitReq): Promise<GetMysqlGrafanaAddrResp> {
641
- return fm.fetchReq<GetMysqlGrafanaAddrReq, GetMysqlGrafanaAddrResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/grafana?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
718
+ return fm.fetchReq<GetMysqlGrafanaAddrReq, GetMysqlGrafanaAddrResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/grafana?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
642
719
  }
643
720
  static CreateMysql(req: CreateMysqlReq, initReq?: fm.InitReq): Promise<CreateMysqlResp> {
644
- return fm.fetchReq<CreateMysqlReq, CreateMysqlResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql`, {...initReq, method: "POST", body: JSON.stringify(req)})
721
+ return fm.fetchReq<CreateMysqlReq, CreateMysqlResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql`, {...initReq, method: "POST", body: JSON.stringify(req)})
645
722
  }
646
723
  static GetMysqlConfs(req: GetMysqlConfReq, initReq?: fm.InitReq): Promise<GetMysqlConfResp> {
647
- return fm.fetchReq<GetMysqlConfReq, GetMysqlConfResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/confs?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
724
+ return fm.fetchReq<GetMysqlConfReq, GetMysqlConfResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/confs?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
648
725
  }
649
726
  static UpdateMysqlConf(req: UpdateMysqlConfReq, initReq?: fm.InitReq): Promise<UpdateMysqlConfResp> {
650
- return fm.fetchReq<UpdateMysqlConfReq, UpdateMysqlConfResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/conf`, {...initReq, method: "PUT", body: JSON.stringify(req)})
727
+ return fm.fetchReq<UpdateMysqlConfReq, UpdateMysqlConfResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/conf`, {...initReq, method: "PUT", body: JSON.stringify(req)})
651
728
  }
652
729
  static UpdateMysqlParams(req: CreateMysqlReq, initReq?: fm.InitReq): Promise<UpdateMysqlParamsResp> {
653
- return fm.fetchReq<CreateMysqlReq, UpdateMysqlParamsResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/params`, {...initReq, method: "PUT", body: JSON.stringify(req)})
730
+ return fm.fetchReq<CreateMysqlReq, UpdateMysqlParamsResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/params`, {...initReq, method: "PUT", body: JSON.stringify(req)})
654
731
  }
655
732
  static DeleteMysql(req: DeleteMysqlReq, initReq?: fm.InitReq): Promise<DeleteMysqlResp> {
656
- return fm.fetchReq<DeleteMysqlReq, DeleteMysqlResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}`, {...initReq, method: "DELETE"})
733
+ return fm.fetchReq<DeleteMysqlReq, DeleteMysqlResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["instanceType"]}/${req["name"]}`, {...initReq, method: "DELETE"})
657
734
  }
658
735
  static DeleteMysqls(req: DeleteMysqlsReq, initReq?: fm.InitReq): Promise<DeleteMysqlsResp> {
659
- return fm.fetchReq<DeleteMysqlsReq, DeleteMysqlsResp>(`/apis/mcamel.io/mysql/v1alpha1/mysqls`, {...initReq, method: "POST", body: JSON.stringify(req)})
736
+ return fm.fetchReq<DeleteMysqlsReq, DeleteMysqlsResp>(`/apis/mcamel.io/mysql/v1alpha2/mysqls`, {...initReq, method: "POST", body: JSON.stringify(req)})
660
737
  }
661
738
  static GetMysqlBackupList(req: GetMysqlBackupListReq, initReq?: fm.InitReq): Promise<GetMysqlBackupListResp> {
662
- return fm.fetchReq<GetMysqlBackupListReq, GetMysqlBackupListResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backups?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
739
+ return fm.fetchReq<GetMysqlBackupListReq, GetMysqlBackupListResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backups?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
663
740
  }
664
741
  static GetMysqlBackupJobList(req: GetMysqlBackupJobListReq, initReq?: fm.InitReq): Promise<GetMysqlBackupJobListResp> {
665
- return fm.fetchReq<GetMysqlBackupJobListReq, GetMysqlBackupJobListResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/jobs?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
742
+ return fm.fetchReq<GetMysqlBackupJobListReq, GetMysqlBackupJobListResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/jobs?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
666
743
  }
667
744
  static CreateMysqlBackup(req: CreateMysqlBackupReq, initReq?: fm.InitReq): Promise<CreateMysqlBackupResp> {
668
- return fm.fetchReq<CreateMysqlBackupReq, CreateMysqlBackupResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup`, {...initReq, method: "POST", body: JSON.stringify(req)})
745
+ return fm.fetchReq<CreateMysqlBackupReq, CreateMysqlBackupResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup`, {...initReq, method: "POST", body: JSON.stringify(req)})
669
746
  }
670
747
  static DeleteMysqlBackup(req: DeleteMysqlBackupReq, initReq?: fm.InitReq): Promise<DeleteMysqlBackupResp> {
671
- return fm.fetchReq<DeleteMysqlBackupReq, DeleteMysqlBackupResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup`, {...initReq, method: "DELETE"})
748
+ return fm.fetchReq<DeleteMysqlBackupReq, DeleteMysqlBackupResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["instanceType"]}/${req["name"]}/backup`, {...initReq, method: "DELETE"})
672
749
  }
673
750
  static GetMysqlBackupSecret(req: GetMysqlBackupSecretReq, initReq?: fm.InitReq): Promise<GetMysqlBackupSecretResp> {
674
- return fm.fetchReq<GetMysqlBackupSecretReq, GetMysqlBackupSecretResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql/${req["workspaceId"]}/secret?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
751
+ return fm.fetchReq<GetMysqlBackupSecretReq, GetMysqlBackupSecretResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["workspaceId"]}/secret?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
675
752
  }
676
753
  static GetMysqlBackupProviderList(req: GetMysqlBackupProviderListReq, initReq?: fm.InitReq): Promise<GetMysqlBackupProviderListResp> {
677
- return fm.fetchReq<GetMysqlBackupProviderListReq, GetMysqlBackupProviderListResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql/${req["workspaceId"]}/providers?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
754
+ return fm.fetchReq<GetMysqlBackupProviderListReq, GetMysqlBackupProviderListResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["workspaceId"]}/providers?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
678
755
  }
679
756
  static SetMysqlBackupSecret(req: SetMysqlBackupSecretReq, initReq?: fm.InitReq): Promise<SetMysqlBackupSecretResp> {
680
- return fm.fetchReq<SetMysqlBackupSecretReq, SetMysqlBackupSecretResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql/${req["workspaceId"]}/secret`, {...initReq, method: "PUT", body: JSON.stringify(req)})
757
+ return fm.fetchReq<SetMysqlBackupSecretReq, SetMysqlBackupSecretResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["workspaceId"]}/secret`, {...initReq, method: "PUT", body: JSON.stringify(req)})
681
758
  }
682
759
  static CreateMysqlRecover(req: CreateMysqlRecoverReq, initReq?: fm.InitReq): Promise<CreateMysqlRecoverResp> {
683
- return fm.fetchReq<CreateMysqlRecoverReq, CreateMysqlRecoverResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/recover`, {...initReq, method: "POST", body: JSON.stringify(req)})
760
+ return fm.fetchReq<CreateMysqlRecoverReq, CreateMysqlRecoverResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/recover`, {...initReq, method: "POST", body: JSON.stringify(req)})
684
761
  }
685
762
  static UpdateMysqlBackupConfig(req: UpdateMysqlBackupConfigReq, initReq?: fm.InitReq): Promise<UpdateMysqlBackupConfigResp> {
686
- return fm.fetchReq<UpdateMysqlBackupConfigReq, UpdateMysqlBackupConfigResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
763
+ return fm.fetchReq<UpdateMysqlBackupConfigReq, UpdateMysqlBackupConfigResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
687
764
  }
688
765
  static GetMysqlUsers(req: GetMysqlUsersReq, initReq?: fm.InitReq): Promise<GetMysqlUsersResp> {
689
- return fm.fetchReq<GetMysqlUsersReq, GetMysqlUsersResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/users?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
766
+ return fm.fetchReq<GetMysqlUsersReq, GetMysqlUsersResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/users?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
690
767
  }
691
768
  static GetMinioList(req: GetMinioListReq, initReq?: fm.InitReq): Promise<GetMinioListResp> {
692
- return fm.fetchReq<GetMinioListReq, GetMinioListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/minios?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
769
+ return fm.fetchReq<GetMinioListReq, GetMinioListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/minios?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
770
+ }
771
+ static GetTopology(req: GetTopologyRequest, initReq?: fm.InitReq): Promise<GetTopologyResp> {
772
+ return fm.fetchReq<GetTopologyRequest, GetTopologyResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/${req["namespace"]}/${req["name"]}/${req["instanceType"]}/topology?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name", "instanceType"])}`, {...initReq, method: "GET"})
693
773
  }
694
774
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/mcamel-mysql",
3
- "version":"0.11.0-rc2-15",
3
+ "version":"0.16.0-rc1-3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/template.pb.ts CHANGED
@@ -7,6 +7,17 @@
7
7
  import * as CommonCommon from "./common.pb"
8
8
  import * as fm from "./fetch.pb"
9
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
+ }
20
+
10
21
  export enum GetTemplateConfigReqSortDir {
11
22
  ASC = "ASC",
12
23
  DESC = "DESC",
@@ -20,6 +31,7 @@ export enum GetTemplateConfigListReqSortDir {
20
31
  export enum TemplateConfigItemValueType {
21
32
  String = "String",
22
33
  SingleSelection = "SingleSelection",
34
+ MultiString = "MultiString",
23
35
  }
24
36
 
25
37
  export type GetTemplateConfigVersionsReq = {
@@ -60,6 +72,7 @@ export type GetTemplateConfigReq = {
60
72
  templateType?: string
61
73
  type?: string
62
74
  createTimestamp?: string
75
+ templateInstanceType?: TemplateInstanceType
63
76
  }
64
77
 
65
78
  export type CreateTemplateConfigResp = {
@@ -103,6 +116,7 @@ export type GetTemplateConfigListReq = {
103
116
  searchKey?: string
104
117
  workspaceId?: number
105
118
  version?: string
119
+ templateInstanceType?: TemplateInstanceType
106
120
  }
107
121
 
108
122
  export type TemplateConfigItem = {
@@ -122,10 +136,21 @@ export type GetTemplateConfigListResp = {
122
136
  pagination?: CommonCommon.Pagination
123
137
  }
124
138
 
139
+ export type GetTemplateInstanceTypeListReq = {
140
+ workspaceId?: number
141
+ }
142
+
143
+ export type GetTemplateInstanceTypeListResp = {
144
+ type?: TemplateInstanceType[]
145
+ }
146
+
125
147
  export class Template {
126
148
  static GetTemplateConfigList(req: GetTemplateConfigListReq, initReq?: fm.InitReq): Promise<GetTemplateConfigListResp> {
127
149
  return fm.fetchReq<GetTemplateConfigListReq, GetTemplateConfigListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/template_config?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
128
150
  }
151
+ static GetTemplateInstanceTypeList(req: GetTemplateInstanceTypeListReq, initReq?: fm.InitReq): Promise<GetTemplateInstanceTypeListResp> {
152
+ return fm.fetchReq<GetTemplateInstanceTypeListReq, GetTemplateInstanceTypeListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/template_instance_type?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
153
+ }
129
154
  static GetTemplateConfig(req: GetTemplateConfigReq, initReq?: fm.InitReq): Promise<GetTemplateConfigResp> {
130
155
  return fm.fetchReq<GetTemplateConfigReq, GetTemplateConfigResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
131
156
  }
package/version.pb.ts CHANGED
@@ -22,6 +22,6 @@ export type Empty = {
22
22
 
23
23
  export class Version {
24
24
  static Get(req: Empty, initReq?: fm.InitReq): Promise<GetVersionReply> {
25
- return fm.fetchReq<Empty, GetVersionReply>(`/apis/mcamel.io/mysql/v1alpha1/mysql/version?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
25
+ return fm.fetchReq<Empty, GetVersionReply>(`/apis/mcamel.io/mysql/v1alpha2/mysql/version?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
26
26
  }
27
27
  }