@daocloud-proto/mcamel-redis 0.11.0-rc2-21 → 0.17.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,46 @@ 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
+ available?: {[key: string]: string}
403
+ }
404
+
405
+ export type GetResourceQuotaResp = {
406
+ metadata?: GetResourceQuotaRespMetadata
407
+ spec?: GetResourceQuotaRespSpec
408
+ status?: GetResourceQuotaRespStatus
314
409
  }
315
410
 
316
411
  export class Cluster {
317
412
  static GetClusterList(req: GetClusterListReq, initReq?: fm.InitReq): Promise<GetClusterListResp> {
318
413
  return fm.fetchReq<GetClusterListReq, GetClusterListResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/clusters?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
319
414
  }
415
+ static GetClusterHostnetworkPorts(req: GetClusterHostnetworkPortsReq, initReq?: fm.InitReq): Promise<GetClusterHostnetworkPortsResp> {
416
+ return fm.fetchReq<GetClusterHostnetworkPortsReq, GetClusterHostnetworkPortsResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/hostnetwork-ports?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
417
+ }
320
418
  static GetClusterNamespaceList(req: GetClusterNamespaceListReq, initReq?: fm.InitReq): Promise<GetClusterNamespaceListResp> {
321
419
  return fm.fetchReq<GetClusterNamespaceListReq, GetClusterNamespaceListResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/${req["cluster"]}/namespaces?${fm.renderURLSearchParams(req, ["workspaceId", "cluster"])}`, {...initReq, method: "GET"})
322
420
  }
@@ -350,4 +448,16 @@ export class Cluster {
350
448
  static GetPermissionsList(req: GetPermissionsListReq, initReq?: fm.InitReq): Promise<GetPermissionsListResp> {
351
449
  return fm.fetchReq<GetPermissionsListReq, GetPermissionsListResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/permissions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
352
450
  }
451
+ static RestartInstance(req: RestartInstanceReq, initReq?: fm.InitReq): Promise<RestartInstanceResp> {
452
+ return fm.fetchReq<RestartInstanceReq, RestartInstanceResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/restart`, {...initReq, method: "POST", body: JSON.stringify(req)})
453
+ }
454
+ static InstallFile(req: InstallFileReq, initReq?: fm.InitReq): Promise<InstallFileResp> {
455
+ return fm.fetchReq<InstallFileReq, InstallFileResp>(`/apis/mcamel.io/redis/v1alpha1/${req["cluster"]}/install-file`, {...initReq, method: "POST", body: JSON.stringify(req)})
456
+ }
457
+ static GetInstallVersion(req: GetInstallVersionReq, initReq?: fm.InitReq): Promise<GetInstallVersionResp> {
458
+ return fm.fetchReq<GetInstallVersionReq, GetInstallVersionResp>(`/apis/mcamel.io/redis/v1alpha1/${req["cluster"]}/install-version?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
459
+ }
460
+ static GetResourceQuota(req: GetResourceQuotaReq, initReq?: fm.InitReq): Promise<GetResourceQuotaResp> {
461
+ return fm.fetchReq<GetResourceQuotaReq, GetResourceQuotaResp>(`/apis/mcamel.io/redis/v1alpha1/${req["cluster"]}/${req["namespace"]}/resourcequota?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
462
+ }
353
463
  }
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/mcamel-redis",
3
- "version":"0.11.0-rc2-21",
3
+ "version":"0.17.0-rc1-3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/redis.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> =
@@ -64,6 +65,33 @@ export enum UpdateRedisAutoBackupReqProvider {
64
65
  Other = "Other",
65
66
  }
66
67
 
68
+ export enum GetRedisTopologyRespItemsRole {
69
+ Sentinel = "Sentinel",
70
+ SentinelRedisMaster = "SentinelRedisMaster",
71
+ SentinelRedisReplica = "SentinelRedisReplica",
72
+ ClusterRedisMaster = "ClusterRedisMaster",
73
+ ClusterRedisReplica = "ClusterRedisReplica",
74
+ }
75
+
76
+ export enum GetRedisTopologyRespItemsStatus {
77
+ Online = "Online",
78
+ Offline = "Offline",
79
+ }
80
+
81
+ export enum GetRedisTopologyRespItemsPodStatus {
82
+ Pending = "Pending",
83
+ Running = "Running",
84
+ Succeeded = "Succeeded",
85
+ Failed = "Failed",
86
+ Unknown = "Unknown",
87
+ Terminating = "Terminating",
88
+ }
89
+
90
+ export enum GetRedisSlowLogListReqSortDir {
91
+ ASC = "ASC",
92
+ DESC = "DESC",
93
+ }
94
+
67
95
  export enum GetRedisListReqSortDir {
68
96
  ASC = "ASC",
69
97
  DESC = "DESC",
@@ -117,6 +145,8 @@ export type CreateRedisRecoverReq = {
117
145
  name?: string
118
146
  backupName?: string
119
147
  targetRedisName?: string
148
+ targetRedisNamespace?: string
149
+ targetRedisCluster?: string
120
150
  instanceType?: InstanceType
121
151
  }
122
152
 
@@ -130,6 +160,7 @@ export type DeleteRedisBackupReq = {
130
160
  backupName?: string
131
161
  isOpenAutoBackup?: boolean
132
162
  instanceType?: InstanceType
163
+ removeRemoteBackup?: boolean
133
164
  }
134
165
 
135
166
  export type DeleteRedisBackupResp = {
@@ -272,6 +303,60 @@ export type GetRedisUsersResp = {
272
303
  users?: GetRedisUsersRespUserItem[]
273
304
  }
274
305
 
306
+ export type GetRedisTopologyReq = {
307
+ cluster?: string
308
+ namespace?: string
309
+ name?: string
310
+ instanceType?: InstanceType
311
+ }
312
+
313
+ export type GetRedisTopologyRespItems = {
314
+ cluster?: string
315
+ namespace?: string
316
+ podName?: string
317
+ ip?: string
318
+ role?: GetRedisTopologyRespItemsRole
319
+ status?: GetRedisTopologyRespItemsStatus
320
+ materIp?: string
321
+ masterReplOffset?: string
322
+ slaveReplOffset?: string
323
+ podStatus?: GetRedisTopologyRespItemsPodStatus
324
+ totalContainer?: number
325
+ totalContainerReady?: number
326
+ podCpuRequest?: string
327
+ podMemoryRequest?: string
328
+ podCpuLimit?: string
329
+ podMemoryLimit?: string
330
+ id?: string
331
+ masterSyncInProgress?: string
332
+ masterLinkStatus?: string
333
+ }
334
+
335
+ export type GetRedisTopologyRespEdges = {
336
+ source?: string
337
+ target?: string
338
+ properties?: {[key: string]: string}
339
+ }
340
+
341
+ export type GetRedisTopologyResp = {
342
+ nodes?: GetRedisTopologyRespItems[]
343
+ edges?: GetRedisTopologyRespEdges[]
344
+ }
345
+
346
+ export type GetRedisSlowLogListReq = {
347
+ page?: number
348
+ pageSize?: number
349
+ sortDir?: GetRedisSlowLogListReqSortDir
350
+ sortBy?: string
351
+ searchKey?: string
352
+ cluster?: string
353
+ namespace?: string
354
+ name?: string
355
+ date?: string
356
+ instanceType?: InstanceType
357
+ refresh?: boolean
358
+ }
359
+
275
360
  export type GetRedisListReq = {
276
361
  page?: number
277
362
  pageSize?: number
@@ -317,6 +402,8 @@ export type CreateRedisReqRestore = {
317
402
  storePath?: string
318
403
  backupName?: string
319
404
  targetRedisName?: string
405
+ targetRedisNamespace?: string
406
+ targetRedisCluster?: string
320
407
  instanceType?: InstanceType
321
408
  }
322
409
 
@@ -338,6 +425,7 @@ export type CreateRedisReq = {
338
425
  memoryRequest?: string
339
426
  memoryLimit?: string
340
427
  conf?: string
428
+ confTemplateName?: string
341
429
  version?: string
342
430
  followerReplicas?: number
343
431
  affinity?: CommonCommon.Affinity
@@ -350,6 +438,14 @@ export type CreateRedisReq = {
350
438
  serviceMonitorInterval?: string
351
439
  accessWhitelist?: CommonCommon.AccessWhitelist
352
440
  isExtraSvc?: boolean
441
+ hostNetwork?: boolean
442
+ hostNetworkPort?: number
443
+ hostNetworkExporterPort?: number
444
+ sentinelCpuRequest?: string
445
+ sentinelCpuLimit?: string
446
+ sentinelMemoryRequest?: string
447
+ sentinelMemoryLimit?: string
448
+ sentinelReplicas?: number
353
449
  }
354
450
 
355
451
  export type UpdateRedisConfReq = {
@@ -357,8 +453,9 @@ export type UpdateRedisConfReq = {
357
453
  namespace?: string
358
454
  name?: string
359
455
  authPass?: string
360
- conf?: string
361
456
  instanceType?: InstanceType
457
+ reloadFromConfTemplateName?: string
458
+ confItems?: TemplateTemplate.TemplateConfigItem[]
362
459
  }
363
460
 
364
461
  export type UpdateRedisParamsResp = {
@@ -373,13 +470,6 @@ export type GetRedisParamRespSelectDataStringValue = {
373
470
  value?: string
374
471
  }
375
472
 
376
- export type GetRedisParamRespSelectDataResourceValue = {
377
- cpuRequest?: string
378
- cpuLimit?: string
379
- memoryRequest?: string
380
- memoryLimit?: string
381
- }
382
-
383
473
  export type GetRedisParamRespSelectDataIntValue = {
384
474
  value?: number
385
475
  }
@@ -398,7 +488,7 @@ type BaseGetRedisParamRespSelectData = {
398
488
  }
399
489
 
400
490
  export type GetRedisParamRespSelectData = BaseGetRedisParamRespSelectData
401
- & OneOf<{ sValue: GetRedisParamRespSelectDataStringValue; rValue: GetRedisParamRespSelectDataResourceValue; iValue: GetRedisParamRespSelectDataIntValue; tValue: GetRedisParamRespSelectDataInstanceTypeValue; scValue: GetRedisParamRespSelectDataStorageClassValue }>
491
+ & OneOf<{ sValue: GetRedisParamRespSelectDataStringValue; iValue: GetRedisParamRespSelectDataIntValue; tValue: GetRedisParamRespSelectDataInstanceTypeValue; scValue: GetRedisParamRespSelectDataStorageClassValue }>
402
492
 
403
493
  export type GetRedisParamRespSelect = {
404
494
  selectType?: GetRedisParamRespSelectSelectType
@@ -408,7 +498,6 @@ export type GetRedisParamRespSelect = {
408
498
  export type GetRedisParamResp = {
409
499
  version?: GetRedisParamRespSelect
410
500
  replicas?: GetRedisParamRespSelect
411
- resource?: GetRedisParamRespSelect
412
501
  storage?: GetRedisParamRespSelect
413
502
  conf?: GetRedisParamRespSelect
414
503
  }
@@ -522,6 +611,19 @@ export type GetRedisListResp = {
522
611
  pagination?: CommonCommon.Pagination
523
612
  }
524
613
 
614
+ export type GetRedisSlowLogListRespItems = {
615
+ id?: string
616
+ timestamp?: string
617
+ spent?: string
618
+ command?: string[]
619
+ ip?: string
620
+ }
621
+
622
+ export type GetRedisSlowLogListResp = {
623
+ items?: GetRedisSlowLogListRespItems[]
624
+ pagination?: CommonCommon.Pagination
625
+ }
626
+
525
627
  export type RedisItemStatus = {
526
628
  status?: Status
527
629
  podsAreReadyNum?: number
@@ -625,4 +727,10 @@ export class Redis {
625
727
  static CreateRedisRecover(req: CreateRedisRecoverReq, initReq?: fm.InitReq): Promise<CreateRedisRecoverResp> {
626
728
  return fm.fetchReq<CreateRedisRecoverReq, CreateRedisRecoverResp>(`/apis/mcamel.io/redis/v1alpha1/redis/${req["cluster"]}/${req["namespace"]}/${req["name"]}/recover`, {...initReq, method: "POST", body: JSON.stringify(req)})
627
729
  }
730
+ static GetRedisSlowLogList(req: GetRedisSlowLogListReq, initReq?: fm.InitReq): Promise<GetRedisSlowLogListResp> {
731
+ return fm.fetchReq<GetRedisSlowLogListReq, GetRedisSlowLogListResp>(`/apis/mcamel.io/redis/v1alpha1/redis/${req["instanceType"]}/${req["cluster"]}/${req["namespace"]}/${req["name"]}/slowlogs?${fm.renderURLSearchParams(req, ["instanceType", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
732
+ }
733
+ static GetRedisTopology(req: GetRedisTopologyReq, initReq?: fm.InitReq): Promise<GetRedisTopologyResp> {
734
+ return fm.fetchReq<GetRedisTopologyReq, GetRedisTopologyResp>(`/apis/mcamel.io/redis/v1alpha1/redis/${req["instanceType"]}/${req["cluster"]}/${req["namespace"]}/${req["name"]}/topology?${fm.renderURLSearchParams(req, ["instanceType", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
735
+ }
628
736
  }
package/template.pb.ts ADDED
@@ -0,0 +1,189 @@
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
+ }
61
+
62
+ export type DeleteTemplateReq = {
63
+ workspaceId?: number
64
+ name?: string
65
+ version?: string
66
+ }
67
+
68
+ export type DeleteTemplateConfigResp = {
69
+ message?: string
70
+ }
71
+
72
+ export type CreateOrUpdateTemplateConfigResp = {
73
+ message?: string
74
+ }
75
+
76
+ export type GetTemplateConfigReq = {
77
+ page?: number
78
+ pageSize?: number
79
+ sortDir?: GetTemplateConfigReqSortDir
80
+ sortBy?: string
81
+ searchKey?: string
82
+ workspaceId?: number
83
+ name?: string
84
+ version?: string
85
+ templateType?: string
86
+ type?: string
87
+ createTimestamp?: string
88
+ templateInstanceType?: TemplateInstanceType
89
+ }
90
+
91
+ export type CreateTemplateConfigResp = {
92
+ message?: string
93
+ }
94
+
95
+ export type UpdateTemplateConfigResp = {
96
+ message?: string
97
+ }
98
+
99
+ export type CreateTemplateConfigReq = {
100
+ workspaceId?: number
101
+ targetName?: string
102
+ targetVersion?: string
103
+ targetType?: string
104
+ targetTemplateType?: string
105
+ targetConf?: string
106
+ fromTemplateName?: string
107
+ targetTemplateInstanceType?: TemplateInstanceType
108
+ }
109
+
110
+ export type UpdateTemplateConfigReq = {
111
+ workspaceId?: number
112
+ name?: string
113
+ version?: string
114
+ type?: string
115
+ templateType?: string
116
+ items?: TemplateConfigItem[]
117
+ conf?: string
118
+ }
119
+
120
+ export type GetTemplateConfigResp = {
121
+ data?: UpdateTemplateConfigReq
122
+ pagination?: CommonCommon.Pagination
123
+ }
124
+
125
+ export type GetTemplateConfigListReq = {
126
+ page?: number
127
+ pageSize?: number
128
+ sortDir?: GetTemplateConfigListReqSortDir
129
+ sortBy?: string
130
+ searchKey?: string
131
+ workspaceId?: number
132
+ version?: string
133
+ templateInstanceType?: TemplateInstanceType
134
+ }
135
+
136
+ export type TemplateConfigItem = {
137
+ name?: string
138
+ default?: string
139
+ current?: string
140
+ value?: string
141
+ isNeedRestart?: boolean
142
+ valueType?: TemplateConfigItemValueType
143
+ valueRemarksZh?: string
144
+ valueRemarksEn?: string
145
+ updateTimestamp?: string
146
+ }
147
+
148
+ export type GetTemplateConfigListResp = {
149
+ items?: GetTemplateConfigReq[]
150
+ pagination?: CommonCommon.Pagination
151
+ }
152
+
153
+ export type GetTemplateInstanceTypeListReq = {
154
+ workspaceId?: number
155
+ }
156
+
157
+ export type GetTemplateInstanceTypeListResp = {
158
+ type?: TemplateInstanceType[]
159
+ }
160
+
161
+ export class Template {
162
+ static GetTemplateConfigList(req: GetTemplateConfigListReq, initReq?: fm.InitReq): Promise<GetTemplateConfigListResp> {
163
+ return fm.fetchReq<GetTemplateConfigListReq, GetTemplateConfigListResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/template_config?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
164
+ }
165
+ static GetTemplateInstanceTypeList(req: GetTemplateInstanceTypeListReq, initReq?: fm.InitReq): Promise<GetTemplateInstanceTypeListResp> {
166
+ return fm.fetchReq<GetTemplateInstanceTypeListReq, GetTemplateInstanceTypeListResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/template_instance_type?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
167
+ }
168
+ static GetTemplateConfig(req: GetTemplateConfigReq, initReq?: fm.InitReq): Promise<GetTemplateConfigResp> {
169
+ return fm.fetchReq<GetTemplateConfigReq, GetTemplateConfigResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
170
+ }
171
+ static DeleteTemplateConfig(req: DeleteTemplateReq, initReq?: fm.InitReq): Promise<DeleteTemplateConfigResp> {
172
+ return fm.fetchReq<DeleteTemplateReq, DeleteTemplateConfigResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}/${req["version"]}`, {...initReq, method: "DELETE"})
173
+ }
174
+ static CreateTemplateConfig(req: CreateTemplateConfigReq, initReq?: fm.InitReq): Promise<CreateTemplateConfigResp> {
175
+ return fm.fetchReq<CreateTemplateConfigReq, CreateTemplateConfigResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/template_config`, {...initReq, method: "POST", body: JSON.stringify(req)})
176
+ }
177
+ static UpdateTemplateConfig(req: UpdateTemplateConfigReq, initReq?: fm.InitReq): Promise<UpdateTemplateConfigResp> {
178
+ return fm.fetchReq<UpdateTemplateConfigReq, UpdateTemplateConfigResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/template_config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
179
+ }
180
+ static GetTemplateConfigString(req: GetTemplateConfigReq, initReq?: fm.InitReq): Promise<GetTemplateConfigStringResp> {
181
+ return fm.fetchReq<GetTemplateConfigReq, GetTemplateConfigStringResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}/to_string?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
182
+ }
183
+ static UpdateTemplateConfigToItem(req: UpdateTemplateConfigToItemReq, initReq?: fm.InitReq): Promise<UpdateTemplateConfigToItemResp> {
184
+ return fm.fetchReq<UpdateTemplateConfigToItemReq, UpdateTemplateConfigToItemResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/template_config/to_template`, {...initReq, method: "PUT", body: JSON.stringify(req)})
185
+ }
186
+ static GetTemplateConfigVersions(req: GetTemplateConfigVersionsReq, initReq?: fm.InitReq): Promise<GetTemplateConfigVersionsResp> {
187
+ return fm.fetchReq<GetTemplateConfigVersionsReq, GetTemplateConfigVersionsResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/template_config/versions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
188
+ }
189
+ }
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/redis/v1alpha1/redis/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
  }