@daocloud-proto/mcamel-redis 0.2.2-6 → 0.2.2-9

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 +19 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/mcamel-redis",
3
- "version":"0.2.2-6",
3
+ "version":"0.2.2-9",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/redis.pb.ts CHANGED
@@ -76,6 +76,22 @@ export enum GetRedisConfRespItemsParamType {
76
76
  conf = "conf",
77
77
  }
78
78
 
79
+ export type GetRedisUsersReq = {
80
+ cluster?: string
81
+ namespace?: string
82
+ name?: string
83
+ instanceType?: InstanceType
84
+ }
85
+
86
+ export type GetRedisUsersRespUserItem = {
87
+ username?: string
88
+ password?: string
89
+ }
90
+
91
+ export type GetRedisUsersResp = {
92
+ users?: GetRedisUsersRespUserItem[]
93
+ }
94
+
79
95
  export type GetRedisListReq = {
80
96
  page?: number
81
97
  pageSize?: number
@@ -372,4 +388,7 @@ export class Redis {
372
388
  static DeleteRediss(req: DeleteRedissReq, initReq?: fm.InitReq): Promise<DeleteRedissResp> {
373
389
  return fm.fetchReq<DeleteRedissReq, DeleteRedissResp>(`/apis/mcamel.io/redis/v1alpha1/rediss`, {...initReq, method: "POST", body: JSON.stringify(req)})
374
390
  }
391
+ static GetRedisUsers(req: GetRedisUsersReq, initReq?: fm.InitReq): Promise<GetRedisUsersResp> {
392
+ return fm.fetchReq<GetRedisUsersReq, GetRedisUsersResp>(`/apis/mcamel.io/redis/v1alpha1/redis/${req["instanceType"]}/${req["cluster"]}/${req["namespace"]}/${req["name"]}/users?${fm.renderURLSearchParams(req, ["instanceType", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
393
+ }
375
394
  }