@daocloud-proto/mcamel-redis 0.4.0-123 → 0.4.0-125

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/redis.pb.ts +67 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/mcamel-redis",
3
- "version":"0.4.0-123",
3
+ "version":"0.4.0-125",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/redis.pb.ts CHANGED
@@ -36,6 +36,11 @@ export enum RedisPodType {
36
36
  FollowerRedis = "FollowerRedis",
37
37
  }
38
38
 
39
+ export enum GetRedisBackupListReqSortDir {
40
+ ASC = "ASC",
41
+ DESC = "DESC",
42
+ }
43
+
39
44
  export enum CreateRedisBackupReqProvider {
40
45
  Minio = "Minio",
41
46
  Other = "Other",
@@ -80,6 +85,62 @@ export enum GetRedisConfRespItemsParamType {
80
85
  conf = "conf",
81
86
  }
82
87
 
88
+ export type DeleteRedisBackupReq = {
89
+ cluster?: string
90
+ namespace?: string
91
+ name?: string
92
+ instanceType?: InstanceType
93
+ backupName?: string
94
+ }
95
+
96
+ export type DeleteRedisBackupResp = {
97
+ message?: string
98
+ }
99
+
100
+ export type GetRedisBackupListReq = {
101
+ page?: number
102
+ pageSize?: number
103
+ sortDir?: GetRedisBackupListReqSortDir
104
+ sortBy?: string
105
+ searchKey?: string
106
+ cluster?: string
107
+ namespace?: string
108
+ name?: string
109
+ }
110
+
111
+ export type GetRedisBackupListRespRedisBackupItemMetadata = {
112
+ creationTimestamp?: string
113
+ name?: string
114
+ namespace?: string
115
+ }
116
+
117
+ export type GetRedisBackupListRespRedisBackupItemStatusJobCondition = {
118
+ type?: string
119
+ status?: string
120
+ reason?: string
121
+ message?: string
122
+ }
123
+
124
+ export type GetRedisBackupListRespRedisBackupItemStatus = {
125
+ completionTime?: string
126
+ startTime?: string
127
+ active?: number
128
+ succeeded?: number
129
+ failed?: number
130
+ conditions?: GetRedisBackupListRespRedisBackupItemStatusJobCondition[]
131
+ }
132
+
133
+ export type GetRedisBackupListRespRedisBackupItem = {
134
+ metadata?: GetRedisBackupListRespRedisBackupItemMetadata
135
+ spec?: CreateRedisBackupReq
136
+ status?: GetRedisBackupListRespRedisBackupItemStatus
137
+ }
138
+
139
+ export type GetRedisBackupListResp = {
140
+ items?: GetRedisBackupListRespRedisBackupItem[]
141
+ pagination?: CommonCommon.Pagination
142
+ }
143
+
83
144
  export type CreateRedisBackupReq = {
84
145
  cluster?: string
85
146
  namespace?: string
@@ -419,4 +480,10 @@ export class Redis {
419
480
  static CreateRedisBackup(req: CreateRedisBackupReq, initReq?: fm.InitReq): Promise<CreateRedisBackupResp> {
420
481
  return fm.fetchReq<CreateRedisBackupReq, CreateRedisBackupResp>(`/apis/mcamel.io/redis/v1alpha1/redis/backup`, {...initReq, method: "POST", body: JSON.stringify(req)})
421
482
  }
483
+ static GetRedisBackupList(req: GetRedisBackupListReq, initReq?: fm.InitReq): Promise<GetRedisBackupListResp> {
484
+ return fm.fetchReq<GetRedisBackupListReq, GetRedisBackupListResp>(`/apis/mcamel.io/redis/v1alpha1/redis/backups?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
485
+ }
486
+ static DeleteRedisBackup(req: DeleteRedisBackupReq, initReq?: fm.InitReq): Promise<DeleteRedisBackupResp> {
487
+ return fm.fetchReq<DeleteRedisBackupReq, DeleteRedisBackupResp>(`/apis/mcamel.io/redis/v1alpha1/redis/backups/${req["cluster"]}/${req["namespace"]}/${req["backupName"]}`, {...initReq, method: "DELETE"})
488
+ }
422
489
  }