@daocloud-proto/ghippo 0.6.17 → 0.6.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/ghippo",
3
- "version":"0.6.17",
3
+ "version":"0.6.20",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -51,12 +51,11 @@ export type GetGProductLicensesESNResponse = {
51
51
  }
52
52
 
53
53
  export type GProductLicense = {
54
- meta_name?: string
55
- license_name?: string
54
+ name?: string
55
+ alias?: string
56
56
  product_name?: string
57
57
  tier?: string
58
58
  status?: string
59
- is_expired?: string
60
59
  expired_at?: string
61
60
  }
62
61
 
@@ -65,7 +64,7 @@ export class GProducts {
65
64
  return fm.fetchReq<ListGProductLicensesRequest, ListGProductLicensesResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
66
65
  }
67
66
  static GetGProductLicenses(req: GetGProductLicensesRequest, initReq?: fm.InitReq): Promise<GetGProductLicensesResponse> {
68
- return fm.fetchReq<GetGProductLicensesRequest, GetGProductLicensesResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses/info?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
67
+ return fm.fetchReq<GetGProductLicensesRequest, GetGProductLicensesResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
69
68
  }
70
69
  static UpdateGProductLicenses(req: UpdateGProductLicensesRequest, initReq?: fm.InitReq): Promise<UpdateGProductLicensesResponse> {
71
70
  return fm.fetchReq<UpdateGProductLicensesRequest, UpdateGProductLicensesResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses`, {...initReq, method: "PUT", body: JSON.stringify(req)})
@@ -74,7 +73,7 @@ export class GProducts {
74
73
  return fm.fetchReq<GetGProductLicenseYamlRequest, GetGProductLicenseYamlResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses/yaml?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
75
74
  }
76
75
  static DeleteGProductLicenses(req: DeleteProductLicensesRequest, initReq?: fm.InitReq): Promise<DeleteProductLicensesResponse> {
77
- return fm.fetchReq<DeleteProductLicensesRequest, DeleteProductLicensesResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses`, {...initReq, method: "DELETE"})
76
+ return fm.fetchReq<DeleteProductLicensesRequest, DeleteProductLicensesResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses/${req["name"]}`, {...initReq, method: "DELETE"})
78
77
  }
79
78
  static GetGProductLicensesESN(req: GetGProductLicensesESNRequest, initReq?: fm.InitReq): Promise<GetGProductLicensesESNResponse> {
80
79
  return fm.fetchReq<GetGProductLicensesESNRequest, GetGProductLicensesESNResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses/esn?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -31,6 +31,26 @@ export type ListRolesResponse = {
31
31
  roles?: RoleInfo[]
32
32
  }
33
33
 
34
+ export type WorkspaceRoleInfo = {
35
+ id?: number
36
+ name?: string
37
+ description?: string
38
+ type?: string
39
+ auth_scope?: string
40
+ gproduct?: string
41
+ permissions?: string
42
+ }
43
+
44
+ export type ListWorkspaceRolesRequest = {
45
+ offset?: number
46
+ size?: number
47
+ }
48
+
49
+ export type ListWorkspaceRolesResponse = {
50
+ total?: number
51
+ workspaceroles?: WorkspaceRoleInfo[]
52
+ }
53
+
34
54
  export type GetRoleRequest = {
35
55
  id?: string
36
56
  }
@@ -110,6 +130,9 @@ export class Role {
110
130
  static ListRoles(req: ListRolesRequest, initReq?: fm.InitReq): Promise<ListRolesResponse> {
111
131
  return fm.fetchReq<ListRolesRequest, ListRolesResponse>(`/apis/ghippo.io/v1alpha1/roles?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
112
132
  }
133
+ static ListWorkspaceRoles(req: ListWorkspaceRolesRequest, initReq?: fm.InitReq): Promise<ListWorkspaceRolesResponse> {
134
+ return fm.fetchReq<ListWorkspaceRolesRequest, ListWorkspaceRolesResponse>(`/apis/ghippo.io/v1alpha1/workspaceroles?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
135
+ }
113
136
  static GetRole(req: GetRoleRequest, initReq?: fm.InitReq): Promise<GetRoleResponse> {
114
137
  return fm.fetchReq<GetRoleRequest, GetRoleResponse>(`/apis/ghippo.io/v1alpha1/roles/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
115
138
  }
@@ -64,7 +64,7 @@ export type UnbindResourceFromWorkspaceResponse = {
64
64
  export type CreateWorkspaceRequest = {
65
65
  name?: string
66
66
  alias?: string
67
- parent_workspace_id?: number
67
+ parent_folder_id?: number
68
68
  }
69
69
 
70
70
  export type CreateWorkspaceResponse = {