@daocloud-proto/ghippo 0.5.4 → 0.5.5

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/v1alpha1/role.pb.ts +109 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/ghippo",
3
- "version":"0.5.4",
3
+ "version":"0.5.5",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -0,0 +1,109 @@
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 fm from "../fetch.pb"
8
+ export type RoleInfo = {
9
+ id?: string
10
+ name?: string
11
+ type?: string
12
+ description?: string
13
+ composite?: boolean
14
+ created_at?: string
15
+ updated_at?: string
16
+ }
17
+
18
+ export type ListRolesRequest = {
19
+ search?: string
20
+ offset?: number
21
+ size?: number
22
+ }
23
+
24
+ export type ListRolesResponse = {
25
+ roles?: RoleInfo[]
26
+ }
27
+
28
+ export type GetRoleRequest = {
29
+ id?: string
30
+ }
31
+
32
+ export type GetRoleResponse = {
33
+ role?: RoleInfo
34
+ }
35
+
36
+ export type CreateRoleRequest = {
37
+ name?: string
38
+ description?: string
39
+ relation_role_id?: string[]
40
+ }
41
+
42
+ export type CreateRoleResponse = {
43
+ }
44
+
45
+ export type UpdateRoleRequest = {
46
+ id?: string
47
+ description?: string
48
+ }
49
+
50
+ export type UpdateRoleResponse = {
51
+ }
52
+
53
+ export type DeleteRoleRequest = {
54
+ id?: string
55
+ }
56
+
57
+ export type DeleteRoleResponse = {
58
+ }
59
+
60
+ export type AddRoleCompositeRequest = {
61
+ id?: string
62
+ relation_role_id?: string[]
63
+ }
64
+
65
+ export type AddRoleCompositeResponse = {
66
+ }
67
+
68
+ export type RemoveRoleCompositeRequest = {
69
+ id?: string
70
+ relation_role_id?: string[]
71
+ }
72
+
73
+ export type RemoveRoleCompositeResponse = {
74
+ }
75
+
76
+ export type ListRoleCompositeRequest = {
77
+ id?: string
78
+ }
79
+
80
+ export type ListRoleCompositeResponse = {
81
+ roles?: RoleInfo[]
82
+ }
83
+
84
+ export class Role {
85
+ static ListRoles(req: ListRolesRequest, initReq?: fm.InitReq): Promise<ListRolesResponse> {
86
+ return fm.fetchReq<ListRolesRequest, ListRolesResponse>(`/apis/ghippo.io/v1alpha1/roles?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
87
+ }
88
+ static GetRole(req: GetRoleRequest, initReq?: fm.InitReq): Promise<GetRoleResponse> {
89
+ return fm.fetchReq<GetRoleRequest, GetRoleResponse>(`/apis/ghippo.io/v1alpha1/roles/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
90
+ }
91
+ static CreateRole(req: CreateRoleRequest, initReq?: fm.InitReq): Promise<CreateRoleResponse> {
92
+ return fm.fetchReq<CreateRoleRequest, CreateRoleResponse>(`/apis/ghippo.io/v1alpha1/roles`, {...initReq, method: "POST", body: JSON.stringify(req)})
93
+ }
94
+ static UpdateRole(req: UpdateRoleRequest, initReq?: fm.InitReq): Promise<UpdateRoleResponse> {
95
+ return fm.fetchReq<UpdateRoleRequest, UpdateRoleResponse>(`/apis/ghippo.io/v1alpha1/roles/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
96
+ }
97
+ static DeleteRole(req: DeleteRoleRequest, initReq?: fm.InitReq): Promise<DeleteRoleResponse> {
98
+ return fm.fetchReq<DeleteRoleRequest, DeleteRoleResponse>(`/apis/ghippo.io/v1alpha1/roles/${req["id"]}`, {...initReq, method: "DELETE"})
99
+ }
100
+ static AddRoleComposite(req: AddRoleCompositeRequest, initReq?: fm.InitReq): Promise<AddRoleCompositeResponse> {
101
+ return fm.fetchReq<AddRoleCompositeRequest, AddRoleCompositeResponse>(`/apis/ghippo.io/v1alpha1/roles/${req["id"]}/composites`, {...initReq, method: "POST", body: JSON.stringify(req)})
102
+ }
103
+ static RemoveRoleComposite(req: RemoveRoleCompositeRequest, initReq?: fm.InitReq): Promise<RemoveRoleCompositeResponse> {
104
+ return fm.fetchReq<RemoveRoleCompositeRequest, RemoveRoleCompositeResponse>(`/apis/ghippo.io/v1alpha1/roles/${req["id"]}/composites`, {...initReq, method: "PUT", body: JSON.stringify(req)})
105
+ }
106
+ static ListRoleComposite(req: ListRoleCompositeRequest, initReq?: fm.InitReq): Promise<ListRoleCompositeResponse> {
107
+ return fm.fetchReq<ListRoleCompositeRequest, ListRoleCompositeResponse>(`/apis/ghippo.io/v1alpha1/roles/${req["id"]}/composites?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
108
+ }
109
+ }