@daocloud-proto/mcamel-mysql 0.5.0-9 → 0.5.0-901

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/mysql.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> =
@@ -16,10 +17,56 @@ type OneOf<T> =
16
17
  : never)
17
18
  : never);
18
19
 
20
+ export enum RoleType {
21
+ Unknown = "Unknown",
22
+ Master = "Master",
23
+ Replica = "Replica",
24
+ PRIMARY = "PRIMARY",
25
+ SECONDARY = "SECONDARY",
26
+ }
27
+
28
+ export enum PodStatus {
29
+ PodStatus_UNSPECIFIED = "PodStatus_UNSPECIFIED",
30
+ PodStatus_Unknown = "PodStatus_Unknown",
31
+ PodStatus_Pending = "PodStatus_Pending",
32
+ PodStatus_Running = "PodStatus_Running",
33
+ PodStatus_Succeeded = "PodStatus_Succeeded",
34
+ PodStatus_Failed = "PodStatus_Failed",
35
+ PodStatus_Terminating = "PodStatus_Terminating",
36
+ }
37
+
38
+ export enum InstanceType {
39
+ UnKnown = "UnKnown",
40
+ SingleNode = "SingleNode",
41
+ MasterSlave = "MasterSlave",
42
+ Mgr = "Mgr",
43
+ }
44
+
19
45
  export enum Status {
20
46
  Failed = "Failed",
21
47
  Running = "Running",
22
48
  Creating = "Creating",
49
+ MgrOnline = "MgrOnline",
50
+ MgrRecovering = "MgrRecovering",
51
+ MgrError = "MgrError",
52
+ MgrOffline = "MgrOffline",
53
+ MgrNotManaged = "MgrNotManaged",
54
+ MgrUnmanaged = "MgrUnmanaged",
55
+ MgrUnreachable = "MgrUnreachable",
56
+ MgrUnknown = "MgrUnknown",
57
+ }
58
+
59
+ export enum GetSlowlogPodListRespItemNodeType {
60
+ Master = "Master",
61
+ Replica = "Replica",
62
+ PhpAdmin = "PhpAdmin",
63
+ PRIMARY = "PRIMARY",
64
+ SECONDARY = "SECONDARY",
65
+ }
66
+
67
+ export enum GetSlowlogListReqSortDir {
68
+ ASC = "ASC",
69
+ DESC = "DESC",
23
70
  }
24
71
 
25
72
  export enum GetMinioListReqSortDir {
@@ -78,12 +125,6 @@ export enum GetMysqlConfReqSortDir {
78
125
  DESC = "DESC",
79
126
  }
80
127
 
81
- export enum CreateMysqlReqServiceType {
82
- ClusterIP = "ClusterIP",
83
- NodePort = "NodePort",
84
- LoadBalancer = "LoadBalancer",
85
- }
86
-
87
128
  export enum GetMysqlParamRespSelectSelectType {
88
129
  Single = "Single",
89
130
  Multiple = "Multiple",
@@ -113,12 +154,153 @@ export enum GetMysqlNodeListRespNodeType {
113
154
  Master = "Master",
114
155
  Replica = "Replica",
115
156
  PhpAdmin = "PhpAdmin",
157
+ PRIMARY = "PRIMARY",
158
+ SECONDARY = "SECONDARY",
116
159
  }
117
160
 
118
161
  export enum GetMysqlConfRespItemsParamType {
119
162
  conf = "conf",
120
163
  }
121
164
 
165
+ export enum MysqlClusterItemStatusRestoreInitialStatus {
166
+ Unknown = "Unknown",
167
+ Running = "Running",
168
+ Failed = "Failed",
169
+ Succeeded = "Succeeded",
170
+ }
171
+
172
+ export type GetSlowlogPodListReq = {
173
+ cluster?: string
174
+ namespace?: string
175
+ name?: string
176
+ instanceType?: InstanceType
177
+ }
178
+
179
+ export type GetSlowlogPodListRespItem = {
180
+ podName?: string
181
+ slowLogCount?: number
182
+ nodeType?: GetSlowlogPodListRespItemNodeType
183
+ }
184
+
185
+ export type GetSlowlogPodListResp = {
186
+ items?: GetSlowlogPodListRespItem[]
187
+ }
188
+
189
+ export type UpdateSlowlogStatusReq = {
190
+ cluster?: string
191
+ namespace?: string
192
+ name?: string
193
+ instanceType?: InstanceType
194
+ enable?: boolean
195
+ }
196
+
197
+ export type UpdateSlowlogStatusResp = {
198
+ message?: string
199
+ }
200
+
201
+ export type GetSlowlogConfReq = {
202
+ cluster?: string
203
+ namespace?: string
204
+ name?: string
205
+ instanceType?: InstanceType
206
+ }
207
+
208
+ export type GetSlowlogConfResp = {
209
+ longQueryTime?: string
210
+ slowQueryLog?: boolean
211
+ }
212
+
213
+ export type DeleteSlowlogReq = {
214
+ cluster?: string
215
+ namespace?: string
216
+ name?: string
217
+ podName?: string[]
218
+ instanceType?: InstanceType
219
+ }
220
+
221
+ export type DeleteSlowlogResp = {
222
+ message?: string
223
+ }
224
+
225
+ export type GetSlowlogListReq = {
226
+ page?: number
227
+ pageSize?: number
228
+ sortDir?: GetSlowlogListReqSortDir
229
+ sortBy?: string
230
+ searchKey?: string
231
+ cluster?: string
232
+ namespace?: string
233
+ name?: string
234
+ podName?: string
235
+ instanceType?: InstanceType
236
+ fromDate?: string
237
+ toDate?: string
238
+ }
239
+
240
+ export type GetSlowlogListRespItem = {
241
+ startTime?: string
242
+ db?: string
243
+ sqlText?: string
244
+ queryTime?: string
245
+ lockTime?: string
246
+ rowsExamined?: string
247
+ rowsSent?: string
248
+ userHost?: string
249
+ }
250
+
251
+ export type GetSlowlogListResp = {
252
+ items?: GetSlowlogListRespItem[]
253
+ pagination?: CommonCommon.Pagination
254
+ }
255
+
256
+ export type GetTopologyRequest = {
257
+ cluster?: string
258
+ namespace?: string
259
+ name?: string
260
+ instanceType?: InstanceType
261
+ }
262
+
263
+ export type GetTopologyResp = {
264
+ cluster?: string
265
+ namespace?: string
266
+ name?: string
267
+ instanceType?: InstanceType
268
+ version?: string
269
+ storageClassName?: string
270
+ storageCapacity?: string
271
+ nodes?: Node[]
272
+ edges?: Edge[]
273
+ }
274
+
275
+ export type Edge = {
276
+ source?: string
277
+ target?: string
278
+ properties?: Property
279
+ }
280
+
281
+ export type Property = {
282
+ }
283
+
284
+ export type Node = {
285
+ serverUuid?: string
286
+ upstreamServerUuid?: string
287
+ role?: RoleType
288
+ podName?: string
289
+ ip?: string
290
+ podStatus?: PodStatus
291
+ status?: Status
292
+ cpuLimit?: string
293
+ cpuRequest?: string
294
+ memoryLimit?: string
295
+ memoryRequest?: string
296
+ totalContainer?: number
297
+ totalContainerReady?: number
298
+ gtidPurged?: string
299
+ gtidExecuted?: string
300
+ lagBehindUpstream?: string
301
+ error?: string
302
+ }
303
+
122
304
  export type GetMinioListReq = {
123
305
  page?: number
124
306
  pageSize?: number
@@ -154,6 +336,7 @@ export type GetMysqlUsersReq = {
154
336
  cluster?: string
155
337
  namespace?: string
156
338
  name?: string
339
+ instanceType?: InstanceType
157
340
  }
158
341
 
159
342
  export type GetMysqlUsersRespUserItem = {
@@ -178,6 +361,7 @@ export type UpdateMysqlBackupConfigReq = {
178
361
  storageConfigName?: string
179
362
  storageConfigNamespace?: string
180
363
  storageConfigCluster?: string
364
+ instanceType?: InstanceType
181
365
  }
182
366
 
183
367
  export type UpdateMysqlBackupConfigResp = {
@@ -191,6 +375,9 @@ export type CreateMysqlRecoverReq = {
191
375
  name?: string
192
376
  backupName?: string
193
377
  targetMysqlClusterName?: string
378
+ targetMysqlClusterNamespace?: string
379
+ targetMysqlClusterCluster?: string
380
+ instanceType?: InstanceType
194
381
  }
195
382
 
196
383
  export type CreateMysqlRecoverResp = {
@@ -206,6 +393,7 @@ export type GetMysqlBackupListReq = {
206
393
  cluster?: string
207
394
  namespace?: string
208
395
  name?: string
396
+ instanceType?: InstanceType
209
397
  }
210
398
 
211
399
  export type GetMysqlBackupJobListReq = {
@@ -316,6 +504,7 @@ export type CreateMysqlBackupReq = {
316
504
  backupName?: string
317
505
  backupBucket?: string
318
506
  backupBucketSubPath?: string
507
+ instanceType?: InstanceType
319
508
  }
320
509
 
321
510
  export type CreateMysqlBackupResp = {
@@ -330,10 +519,12 @@ export type DeleteMysqlBackupReq = {
330
519
  cluster?: string
331
520
  namespace?: string
332
521
  name?: string
522
+ instanceType?: InstanceType
333
523
  }
334
524
 
335
525
  export type DeleteMysqlBackupResp = {
336
526
  message?: string
527
+ instanceType?: InstanceType
337
528
  }
338
529
 
339
530
  export type GetMysqlListReq = {
@@ -343,6 +534,8 @@ export type GetMysqlListReq = {
343
534
  sortBy?: string
344
535
  searchKey?: string
345
536
  workspaceId?: number
537
+ filterCluster?: string
538
+ filterNamespace?: string
346
539
  }
347
540
 
348
541
  export type GetMysqlConfReq = {
@@ -354,6 +547,7 @@ export type GetMysqlConfReq = {
354
547
  cluster?: string
355
548
  namespace?: string
356
549
  name?: string
550
+ instanceType?: InstanceType
357
551
  }
358
552
 
359
553
  export type GetMysqlParamReq = {
@@ -376,10 +570,11 @@ export type CreateMysqlReq = {
376
570
  describe?: string
377
571
  version?: string
378
572
  replicas?: number
573
+ instanceType?: InstanceType
379
574
  storageClassName?: string
380
575
  storageCapacity?: string
381
576
  rootPassword?: string
382
- serviceType?: CreateMysqlReqServiceType
577
+ serviceType?: CommonCommon.ServiceType
383
578
  serviceAnnotations?: {[key: string]: string}
384
579
  ports?: CreateMysqlReqPorts[]
385
580
  cpuRequest?: string
@@ -387,11 +582,12 @@ export type CreateMysqlReq = {
387
582
  memoryRequest?: string
388
583
  memoryLimit?: string
389
584
  conf?: string
585
+ confTemplateName?: string
390
586
  backupSchedule?: string
391
587
  backupSecretName?: string
392
588
  backupBucket?: string
393
589
  isOpenPhpAdmin?: boolean
394
- phpAdminServiceType?: CreateMysqlReqServiceType
590
+ phpAdminServiceType?: CommonCommon.ServiceType
395
591
  phpAdminNodePort?: number
396
592
  phpAdminCpuRequest?: string
397
593
  phpAdminCpuLimit?: string
@@ -408,13 +604,25 @@ export type CreateMysqlReq = {
408
604
  storageConfigNamespace?: string
409
605
  storageConfigCluster?: string
410
606
  affinity?: CommonCommon.Affinity
607
+ serviceMonitorInterval?: string
608
+ accessWhitelist?: CommonCommon.AccessWhitelist
609
+ externalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy
610
+ lbTyp?: CommonCommon.LBTyp
611
+ lbPoolName?: string
612
+ lbAddress?: string
613
+ phpAdminExternalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy
614
+ phpAdminLbTyp?: CommonCommon.LBTyp
615
+ phpAdminLbPoolName?: string
616
+ phpAdminLbAddress?: string
411
617
  }
412
618
 
413
619
  export type UpdateMysqlConfReq = {
414
620
  cluster?: string
415
621
  namespace?: string
416
622
  name?: string
417
- conf?: string
623
+ confItems?: TemplateTemplate.TemplateConfigItem[]
624
+ reloadFromConfTemplateName?: string
625
+ instanceType?: InstanceType
418
626
  }
419
627
 
420
628
  export type UpdateMysqlParamsResp = {
@@ -429,13 +637,6 @@ export type GetMysqlParamRespSelectDataStringValue = {
429
637
  value?: string
430
638
  }
431
639
 
432
- export type GetMysqlParamRespSelectDataResourceValue = {
433
- cpuRequest?: string
434
- cpuLimit?: string
435
- memoryRequest?: string
436
- memoryLimit?: string
437
- }
438
-
439
640
  export type GetMysqlParamRespSelectDataIntValue = {
440
641
  value?: number
441
642
  }
@@ -450,7 +651,7 @@ type BaseGetMysqlParamRespSelectData = {
450
651
  }
451
652
 
452
653
  export type GetMysqlParamRespSelectData = BaseGetMysqlParamRespSelectData
453
- & OneOf<{ sValue: GetMysqlParamRespSelectDataStringValue; rValue: GetMysqlParamRespSelectDataResourceValue; iValue: GetMysqlParamRespSelectDataIntValue; scValue: GetMysqlParamRespSelectDataStorageClassValue }>
654
+ & OneOf<{ sValue: GetMysqlParamRespSelectDataStringValue; iValue: GetMysqlParamRespSelectDataIntValue; scValue: GetMysqlParamRespSelectDataStorageClassValue }>
454
655
 
455
656
  export type GetMysqlParamRespSelect = {
456
657
  selectType?: GetMysqlParamRespSelectSelectType
@@ -460,10 +661,10 @@ export type GetMysqlParamRespSelect = {
460
661
  export type GetMysqlParamResp = {
461
662
  version?: GetMysqlParamRespSelect
462
663
  replicas?: GetMysqlParamRespSelect
463
- resource?: GetMysqlParamRespSelect
464
664
  storage?: GetMysqlParamRespSelect
465
665
  cnf?: GetMysqlParamRespSelect
466
666
  eightXcnf?: GetMysqlParamRespSelect
667
+ mgrVersion?: GetMysqlParamRespSelect
467
668
  }
468
669
 
469
670
  export type GetMysqlBackupProviderListResp = {
@@ -475,12 +676,14 @@ export type CreateMysqlResp = {
475
676
  }
476
677
 
477
678
  export type GetMysqlOperatorVersionListReq = {
679
+ cluster?: string
478
680
  }
479
681
 
480
682
  export type GetMysqlOperatorVersionListRespGetMysqlOperatorVersionListData = {
481
683
  cluster?: string
482
684
  namespace?: string
483
685
  version?: string
686
+ instanceType?: InstanceType[]
484
687
  }
485
688
 
486
689
  export type GetMysqlOperatorVersionListResp = {
@@ -492,6 +695,7 @@ export type DeleteMysqlReq = {
492
695
  cluster?: string
493
696
  namespace?: string
494
697
  name?: string
698
+ instanceType?: InstanceType
495
699
  }
496
700
 
497
701
  export type DeleteMysqlsReq = {
@@ -515,6 +719,7 @@ export type GetMysqlNodeListReq = {
515
719
  sortDir?: GetMysqlNodeListReqSortDir
516
720
  sortBy?: string
517
721
  searchKey?: string
722
+ instanceType?: InstanceType
518
723
  }
519
724
 
520
725
  export type GetMysqlNodeListRespData = {
@@ -541,6 +746,9 @@ export type GetMysqlGrafanaAddrReq = {
541
746
  cluster?: string
542
747
  namespace?: string
543
748
  name?: string
749
+ from?: string
750
+ to?: string
751
+ instanceType?: InstanceType
544
752
  }
545
753
 
546
754
  export type GetMysqlGrafanaAddrResp = {
@@ -551,6 +759,7 @@ export type GetMysqlReq = {
551
759
  cluster?: string
552
760
  namespace?: string
553
761
  name?: string
762
+ instanceType?: InstanceType
554
763
  }
555
764
 
556
765
  export type GetMysqlResp = {
@@ -582,6 +791,11 @@ export type MysqlClusterItemStatus = {
582
791
  isAutoBackupEnabled?: boolean
583
792
  serviceAddr?: string
584
793
  common?: CommonCommon.CommonItemStatus
794
+ isControl?: boolean
795
+ secondsBehindMaster?: number
796
+ cpuUtilization?: number
797
+ memoryUtilization?: number
798
+ restoreInitialStatus?: MysqlClusterItemStatusRestoreInitialStatus
585
799
  }
586
800
 
587
801
  export type MysqlClusterItemMetadata = {
@@ -599,74 +813,92 @@ export type MysqlClusterItem = {
599
813
  status?: MysqlClusterItemStatus
600
814
  }
601
815
 
602
- export class Mysql {
816
+ export class MysqlMgr {
603
817
  static GetMysqlList(req: GetMysqlListReq, initReq?: fm.InitReq): Promise<GetMysqlListResp> {
604
- return fm.fetchReq<GetMysqlListReq, GetMysqlListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/mysqls?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
818
+ return fm.fetchReq<GetMysqlListReq, GetMysqlListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/mysqls?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
605
819
  }
606
820
  static GetMysqlOperatorVersionList(req: GetMysqlOperatorVersionListReq, initReq?: fm.InitReq): Promise<GetMysqlOperatorVersionListResp> {
607
- return fm.fetchReq<GetMysqlOperatorVersionListReq, GetMysqlOperatorVersionListResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql-operator/versions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
821
+ return fm.fetchReq<GetMysqlOperatorVersionListReq, GetMysqlOperatorVersionListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/mysql-operator/versions?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
608
822
  }
609
823
  static GetMysql(req: GetMysqlReq, initReq?: fm.InitReq): Promise<GetMysqlResp> {
610
- 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"})
824
+ 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"})
611
825
  }
612
826
  static GetMysqlParam(req: GetMysqlParamReq, initReq?: fm.InitReq): Promise<GetMysqlParamResp> {
613
- return fm.fetchReq<GetMysqlParamReq, GetMysqlParamResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql-params/${req["cluster"]}?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
827
+ return fm.fetchReq<GetMysqlParamReq, GetMysqlParamResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql-params/${req["cluster"]}?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
614
828
  }
615
829
  static GetMysqlNodeList(req: GetMysqlNodeListReq, initReq?: fm.InitReq): Promise<GetMysqlNodeListResp> {
616
- 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"})
830
+ 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"})
617
831
  }
618
832
  static GetMysqlGrafanaAddr(req: GetMysqlGrafanaAddrReq, initReq?: fm.InitReq): Promise<GetMysqlGrafanaAddrResp> {
619
- 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"})
833
+ 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"})
620
834
  }
621
835
  static CreateMysql(req: CreateMysqlReq, initReq?: fm.InitReq): Promise<CreateMysqlResp> {
622
- return fm.fetchReq<CreateMysqlReq, CreateMysqlResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql`, {...initReq, method: "POST", body: JSON.stringify(req)})
836
+ return fm.fetchReq<CreateMysqlReq, CreateMysqlResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql`, {...initReq, method: "POST", body: JSON.stringify(req)})
623
837
  }
624
838
  static GetMysqlConfs(req: GetMysqlConfReq, initReq?: fm.InitReq): Promise<GetMysqlConfResp> {
625
- 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"})
839
+ 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"})
626
840
  }
627
841
  static UpdateMysqlConf(req: UpdateMysqlConfReq, initReq?: fm.InitReq): Promise<UpdateMysqlConfResp> {
628
- 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)})
842
+ 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)})
629
843
  }
630
844
  static UpdateMysqlParams(req: CreateMysqlReq, initReq?: fm.InitReq): Promise<UpdateMysqlParamsResp> {
631
- 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)})
845
+ 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)})
632
846
  }
633
847
  static DeleteMysql(req: DeleteMysqlReq, initReq?: fm.InitReq): Promise<DeleteMysqlResp> {
634
- return fm.fetchReq<DeleteMysqlReq, DeleteMysqlResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}`, {...initReq, method: "DELETE"})
848
+ return fm.fetchReq<DeleteMysqlReq, DeleteMysqlResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["instanceType"]}/${req["name"]}`, {...initReq, method: "DELETE"})
635
849
  }
636
850
  static DeleteMysqls(req: DeleteMysqlsReq, initReq?: fm.InitReq): Promise<DeleteMysqlsResp> {
637
- return fm.fetchReq<DeleteMysqlsReq, DeleteMysqlsResp>(`/apis/mcamel.io/mysql/v1alpha1/mysqls`, {...initReq, method: "POST", body: JSON.stringify(req)})
851
+ return fm.fetchReq<DeleteMysqlsReq, DeleteMysqlsResp>(`/apis/mcamel.io/mysql/v1alpha2/mysqls`, {...initReq, method: "POST", body: JSON.stringify(req)})
638
852
  }
639
853
  static GetMysqlBackupList(req: GetMysqlBackupListReq, initReq?: fm.InitReq): Promise<GetMysqlBackupListResp> {
640
- 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"})
854
+ 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"})
641
855
  }
642
856
  static GetMysqlBackupJobList(req: GetMysqlBackupJobListReq, initReq?: fm.InitReq): Promise<GetMysqlBackupJobListResp> {
643
- 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"})
857
+ 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"})
644
858
  }
645
859
  static CreateMysqlBackup(req: CreateMysqlBackupReq, initReq?: fm.InitReq): Promise<CreateMysqlBackupResp> {
646
- 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)})
860
+ 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)})
647
861
  }
648
862
  static DeleteMysqlBackup(req: DeleteMysqlBackupReq, initReq?: fm.InitReq): Promise<DeleteMysqlBackupResp> {
649
- return fm.fetchReq<DeleteMysqlBackupReq, DeleteMysqlBackupResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup`, {...initReq, method: "DELETE"})
863
+ return fm.fetchReq<DeleteMysqlBackupReq, DeleteMysqlBackupResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["instanceType"]}/${req["name"]}/backup`, {...initReq, method: "DELETE"})
650
864
  }
651
865
  static GetMysqlBackupSecret(req: GetMysqlBackupSecretReq, initReq?: fm.InitReq): Promise<GetMysqlBackupSecretResp> {
652
- return fm.fetchReq<GetMysqlBackupSecretReq, GetMysqlBackupSecretResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql/${req["workspaceId"]}/secret?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
866
+ return fm.fetchReq<GetMysqlBackupSecretReq, GetMysqlBackupSecretResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["workspaceId"]}/secret?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
653
867
  }
654
868
  static GetMysqlBackupProviderList(req: GetMysqlBackupProviderListReq, initReq?: fm.InitReq): Promise<GetMysqlBackupProviderListResp> {
655
- return fm.fetchReq<GetMysqlBackupProviderListReq, GetMysqlBackupProviderListResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql/${req["workspaceId"]}/providers?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
869
+ return fm.fetchReq<GetMysqlBackupProviderListReq, GetMysqlBackupProviderListResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["workspaceId"]}/providers?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
656
870
  }
657
871
  static SetMysqlBackupSecret(req: SetMysqlBackupSecretReq, initReq?: fm.InitReq): Promise<SetMysqlBackupSecretResp> {
658
- return fm.fetchReq<SetMysqlBackupSecretReq, SetMysqlBackupSecretResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql/${req["workspaceId"]}/secret`, {...initReq, method: "PUT", body: JSON.stringify(req)})
872
+ return fm.fetchReq<SetMysqlBackupSecretReq, SetMysqlBackupSecretResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["workspaceId"]}/secret`, {...initReq, method: "PUT", body: JSON.stringify(req)})
659
873
  }
660
874
  static CreateMysqlRecover(req: CreateMysqlRecoverReq, initReq?: fm.InitReq): Promise<CreateMysqlRecoverResp> {
661
- 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)})
875
+ 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)})
662
876
  }
663
877
  static UpdateMysqlBackupConfig(req: UpdateMysqlBackupConfigReq, initReq?: fm.InitReq): Promise<UpdateMysqlBackupConfigResp> {
664
- 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)})
878
+ 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)})
665
879
  }
666
880
  static GetMysqlUsers(req: GetMysqlUsersReq, initReq?: fm.InitReq): Promise<GetMysqlUsersResp> {
667
- 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"})
881
+ 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"})
668
882
  }
669
883
  static GetMinioList(req: GetMinioListReq, initReq?: fm.InitReq): Promise<GetMinioListResp> {
670
- return fm.fetchReq<GetMinioListReq, GetMinioListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/minios?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
884
+ return fm.fetchReq<GetMinioListReq, GetMinioListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/minios?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
885
+ }
886
+ static GetTopology(req: GetTopologyRequest, initReq?: fm.InitReq): Promise<GetTopologyResp> {
887
+ 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"})
888
+ }
889
+ static GetSlowlogList(req: GetSlowlogListReq, initReq?: fm.InitReq): Promise<GetSlowlogListResp> {
890
+ return fm.fetchReq<GetSlowlogListReq, GetSlowlogListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/${req["namespace"]}/${req["name"]}/${req["podName"]}/${req["instanceType"]}/slowlog?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name", "podName", "instanceType"])}`, {...initReq, method: "GET"})
891
+ }
892
+ static DeleteSlowlog(req: DeleteSlowlogReq, initReq?: fm.InitReq): Promise<DeleteSlowlogResp> {
893
+ return fm.fetchReq<DeleteSlowlogReq, DeleteSlowlogResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/${req["instanceType"]}/slowlog`, {...initReq, method: "DELETE", body: JSON.stringify(req)})
894
+ }
895
+ static GetSlowlogConf(req: GetSlowlogConfReq, initReq?: fm.InitReq): Promise<GetSlowlogConfResp> {
896
+ return fm.fetchReq<GetSlowlogConfReq, GetSlowlogConfResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/${req["namespace"]}/${req["name"]}/${req["instanceType"]}/slowlog/conf?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name", "instanceType"])}`, {...initReq, method: "GET"})
897
+ }
898
+ static UpdateSlowlogStatus(req: UpdateSlowlogStatusReq, initReq?: fm.InitReq): Promise<UpdateSlowlogStatusResp> {
899
+ return fm.fetchReq<UpdateSlowlogStatusReq, UpdateSlowlogStatusResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/${req["namespace"]}/${req["name"]}/${req["instanceType"]}/slowlog/toggle`, {...initReq, method: "PUT", body: JSON.stringify(req)})
900
+ }
901
+ static GetSlowlogPodList(req: GetSlowlogPodListReq, initReq?: fm.InitReq): Promise<GetSlowlogPodListResp> {
902
+ return fm.fetchReq<GetSlowlogPodListReq, GetSlowlogPodListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/${req["namespace"]}/${req["name"]}/${req["instanceType"]}/slowlog/pods?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name", "instanceType"])}`, {...initReq, method: "GET"})
671
903
  }
672
904
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/mcamel-mysql",
3
- "version":"0.5.0-9",
3
+ "version":"0.5.0-901",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -24,6 +24,7 @@ export enum GetStorageConfigParamRespSelectSelectType {
24
24
  export enum GetStorageConfigConsumersRespStorageConfigConsumerType {
25
25
  STORAGE_CONFIG_CONSUMER_TYPE_UNSPECIFIED = "STORAGE_CONFIG_CONSUMER_TYPE_UNSPECIFIED",
26
26
  STORAGE_CONFIG_CONSUMER_TYPE_MYSQL = "STORAGE_CONFIG_CONSUMER_TYPE_MYSQL",
27
+ STORAGE_CONFIG_CONSUMER_TYPE_REDIS = "STORAGE_CONFIG_CONSUMER_TYPE_REDIS",
27
28
  }
28
29
 
29
30
  export enum GetStorageConfigListReqSortDir {
@@ -161,27 +162,27 @@ export type GetStorageConfigListResp = {
161
162
 
162
163
  export class StorageConfig {
163
164
  static GetStorageConfigParam(req: GetStorageConfigParamReq, initReq?: fm.InitReq): Promise<GetStorageConfigParamResp> {
164
- return fm.fetchReq<GetStorageConfigParamReq, GetStorageConfigParamResp>(`/apis/mcamel.io/mysql/v1alpha1/storage-config/param?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
165
+ return fm.fetchReq<GetStorageConfigParamReq, GetStorageConfigParamResp>(`/apis/mcamel.io/mysql/v1alpha2/storage-config/param?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
165
166
  }
166
167
  static CreateStorageConfigBucketCheckJob(req: CreateStorageConfigBucketCheckJobReq, initReq?: fm.InitReq): Promise<CreateStorageConfigBucketCheckJobResp> {
167
- return fm.fetchReq<CreateStorageConfigBucketCheckJobReq, CreateStorageConfigBucketCheckJobResp>(`/apis/mcamel.io/mysql/v1alpha1/storage-config/bucket/check-job`, {...initReq, method: "POST", body: JSON.stringify(req)})
168
+ return fm.fetchReq<CreateStorageConfigBucketCheckJobReq, CreateStorageConfigBucketCheckJobResp>(`/apis/mcamel.io/mysql/v1alpha2/storage-config/bucket/check-job`, {...initReq, method: "POST", body: JSON.stringify(req)})
168
169
  }
169
170
  static CreateStorageConfig(req: CreateStorageConfigReq, initReq?: fm.InitReq): Promise<CreateStorageConfigResp> {
170
- return fm.fetchReq<CreateStorageConfigReq, CreateStorageConfigResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/storage-config`, {...initReq, method: "POST", body: JSON.stringify(req)})
171
+ return fm.fetchReq<CreateStorageConfigReq, CreateStorageConfigResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/storage-config`, {...initReq, method: "POST", body: JSON.stringify(req)})
171
172
  }
172
173
  static GetStorageConfigConsumers(req: GetStorageConfigConsumersReq, initReq?: fm.InitReq): Promise<GetStorageConfigConsumersResp> {
173
- return fm.fetchReq<GetStorageConfigConsumersReq, GetStorageConfigConsumersResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/storage-config/${req["name"]}/consumers?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
174
+ return fm.fetchReq<GetStorageConfigConsumersReq, GetStorageConfigConsumersResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/storage-config/${req["name"]}/consumers?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
174
175
  }
175
176
  static DeleteStorageConfig(req: DeleteStorageConfigReq, initReq?: fm.InitReq): Promise<DeleteStorageConfigResp> {
176
- return fm.fetchReq<DeleteStorageConfigReq, DeleteStorageConfigResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/storage-config/${req["cluster"]}/${req["namespace"]}/${req["name"]}`, {...initReq, method: "DELETE"})
177
+ return fm.fetchReq<DeleteStorageConfigReq, DeleteStorageConfigResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/storage-config/${req["cluster"]}/${req["namespace"]}/${req["name"]}`, {...initReq, method: "DELETE"})
177
178
  }
178
179
  static UpdateStorageConfig(req: CreateStorageConfigReq, initReq?: fm.InitReq): Promise<UpdateStorageConfigResp> {
179
- return fm.fetchReq<CreateStorageConfigReq, UpdateStorageConfigResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/storage-config/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
180
+ return fm.fetchReq<CreateStorageConfigReq, UpdateStorageConfigResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/storage-config/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
180
181
  }
181
182
  static GetStorageConfig(req: GetStorageConfigReq, initReq?: fm.InitReq): Promise<GetStorageConfigResp> {
182
- return fm.fetchReq<GetStorageConfigReq, GetStorageConfigResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/storage-config/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
183
+ return fm.fetchReq<GetStorageConfigReq, GetStorageConfigResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/storage-config/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
183
184
  }
184
185
  static GetStorageConfigList(req: GetStorageConfigListReq, initReq?: fm.InitReq): Promise<GetStorageConfigListResp> {
185
- return fm.fetchReq<GetStorageConfigListReq, GetStorageConfigListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/storage-configs?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
186
+ return fm.fetchReq<GetStorageConfigListReq, GetStorageConfigListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["workspaceId"]}/storage-configs?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
186
187
  }
187
188
  }