@daocloud-proto/mcamel-rabbitmq 0.2.6-7 → 0.2.6-93

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
@@ -6,31 +6,30 @@
6
6
 
7
7
  import * as CommonCommon from "./common.pb"
8
8
  import * as fm from "./fetch.pb"
9
+ export type GetWorkspaceListReq = {
10
+ }
9
11
 
10
- export enum GetClusterListRespGetClusterListDataClusterPhase {
11
- CLUSTER_PHASE_UNSPECIFIED = "CLUSTER_PHASE_UNSPECIFIED",
12
- UNKNOWN = "UNKNOWN",
13
- CREATING = "CREATING",
14
- RUNNING = "RUNNING",
15
- UPDATING = "UPDATING",
16
- DELETING = "DELETING",
12
+ export type GetWorkspaceListRespItem = {
13
+ workspaceId?: number
14
+ alias?: string
17
15
  }
18
16
 
19
- export type GetClusterListReq = {
17
+ export type GetWorkspaceListResp = {
18
+ items?: GetWorkspaceListRespItem[]
19
+ pagination?: CommonCommon.Pagination
20
20
  }
21
21
 
22
- export type GetClusterListRespGetClusterListData = {
23
- name?: string
24
- phase?: GetClusterListRespGetClusterListDataClusterPhase
25
- kubeSystemID?: string
22
+ export type GetClusterListReq = {
23
+ workspaceId?: number
26
24
  }
27
25
 
28
26
  export type GetClusterListResp = {
29
- items?: GetClusterListRespGetClusterListData[]
27
+ items?: string[]
30
28
  pagination?: CommonCommon.Pagination
31
29
  }
32
30
 
33
31
  export type GetClusterNamespaceListReq = {
32
+ workspaceId?: number
34
33
  cluster?: string
35
34
  }
36
35
 
@@ -41,9 +40,12 @@ export type GetClusterNamespaceListResp = {
41
40
 
42
41
  export class Cluster {
43
42
  static GetClusterList(req: GetClusterListReq, initReq?: fm.InitReq): Promise<GetClusterListResp> {
44
- return fm.fetchReq<GetClusterListReq, GetClusterListResp>(`/apis/mcamel.io/rabbitmq/v1alpha1/clusters?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
43
+ return fm.fetchReq<GetClusterListReq, GetClusterListResp>(`/apis/mcamel.io/rabbitmq/v1alpha1/${req["workspaceId"]}/clusters?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
45
44
  }
46
45
  static GetClusterNamespaceList(req: GetClusterNamespaceListReq, initReq?: fm.InitReq): Promise<GetClusterNamespaceListResp> {
47
- return fm.fetchReq<GetClusterNamespaceListReq, GetClusterNamespaceListResp>(`/apis/mcamel.io/rabbitmq/v1alpha1/${req["cluster"]}/namespaces?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
46
+ return fm.fetchReq<GetClusterNamespaceListReq, GetClusterNamespaceListResp>(`/apis/mcamel.io/rabbitmq/v1alpha1/${req["workspaceId"]}/${req["cluster"]}/namespaces?${fm.renderURLSearchParams(req, ["workspaceId", "cluster"])}`, {...initReq, method: "GET"})
47
+ }
48
+ static GetWorkspaceList(req: GetWorkspaceListReq, initReq?: fm.InitReq): Promise<GetWorkspaceListResp> {
49
+ return fm.fetchReq<GetWorkspaceListReq, GetWorkspaceListResp>(`/apis/mcamel.io/rabbitmq/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
48
50
  }
49
51
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/mcamel-rabbitmq",
3
- "version":"0.2.6-7",
3
+ "version":"0.2.6-93",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/rabbitmq.pb.ts CHANGED
@@ -63,6 +63,7 @@ export type GetRabbitMqListReq = {
63
63
  sortDir?: GetRabbitMqListReqSortDir
64
64
  sortBy?: string
65
65
  searchKey?: string
66
+ workspaceId?: number
66
67
  }
67
68
 
68
69
  export type GetRabbitMqConfReq = {
@@ -307,10 +308,10 @@ export class RabbitMq {
307
308
  return fm.fetchReq<GetRabbitMqParamReq, GetRabbitMqParamResp>(`/apis/mcamel.io/rabbitmq/v1alpha1/rabbitmq-params/${req["cluster"]}?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
308
309
  }
309
310
  static GetRabbitMqNodeList(req: GetRabbitMqNodeListReq, initReq?: fm.InitReq): Promise<GetRabbitMqNodeListResp> {
310
- return fm.fetchReq<GetRabbitMqNodeListReq, GetRabbitMqNodeListResp>(`/apis/mcamel.io/rabbitmq/v1alpha1/rabbitmq/nodes/${req["cluster"]}/${req["namespace"]}/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
311
+ return fm.fetchReq<GetRabbitMqNodeListReq, GetRabbitMqNodeListResp>(`/apis/mcamel.io/rabbitmq/v1alpha1/rabbitmq/${req["cluster"]}/${req["namespace"]}/${req["name"]}/nodes?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
311
312
  }
312
313
  static GetRabbitMqGrafanaAddr(req: GetRabbitMqGrafanaAddrReq, initReq?: fm.InitReq): Promise<GetRabbitMqGrafanaAddrResp> {
313
- return fm.fetchReq<GetRabbitMqGrafanaAddrReq, GetRabbitMqGrafanaAddrResp>(`/apis/mcamel.io/rabbitmq/v1alpha1/rabbitmq/grafana/${req["cluster"]}/${req["namespace"]}/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
314
+ return fm.fetchReq<GetRabbitMqGrafanaAddrReq, GetRabbitMqGrafanaAddrResp>(`/apis/mcamel.io/rabbitmq/v1alpha1/rabbitmq/${req["cluster"]}/${req["namespace"]}/${req["name"]}/grafana?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
314
315
  }
315
316
  static CreateRabbitMq(req: CreateRabbitMqReq, initReq?: fm.InitReq): Promise<CreateRabbitMqResp> {
316
317
  return fm.fetchReq<CreateRabbitMqReq, CreateRabbitMqResp>(`/apis/mcamel.io/rabbitmq/v1alpha1/rabbitmq`, {...initReq, method: "POST", body: JSON.stringify(req)})