@daocloud-proto/ghippo 0.2.2 → 0.3.1
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 +5 -5
- package/v1alpha1/currentuser.pb.ts +52 -0
- package/v1alpha1/group.pb.ts +116 -0
- package/v1alpha1/login.pb.ts +4 -4
- package/v1alpha1/productnav.pb.ts +2 -2
- package/v1alpha1/topnav.pb.ts +4 -4
- package/v1alpha1/user.pb.ts +83 -13
package/package.json
CHANGED
|
@@ -0,0 +1,52 @@
|
|
|
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 UpdateEmailRequest = {
|
|
9
|
+
email?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type UpdateEmailResponse = {
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type UpdatePasswordRequest = {
|
|
16
|
+
password?: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type UpdatePasswordResponse = {
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type UpdateLanguageRequest = {
|
|
23
|
+
locale?: string
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type UpdateLanguageResponse = {
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type GetUserRequest = {
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type GetUserResponse = {
|
|
33
|
+
uid?: string
|
|
34
|
+
username?: string
|
|
35
|
+
email?: string
|
|
36
|
+
locale?: string
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export class Account {
|
|
40
|
+
static UpdateEmail(req: UpdateEmailRequest, initReq?: fm.InitReq): Promise<UpdateEmailResponse> {
|
|
41
|
+
return fm.fetchReq<UpdateEmailRequest, UpdateEmailResponse>(`/apis/ghippo.io/v1alpha1/current-user/email`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
42
|
+
}
|
|
43
|
+
static UpdatePassword(req: UpdatePasswordRequest, initReq?: fm.InitReq): Promise<UpdatePasswordResponse> {
|
|
44
|
+
return fm.fetchReq<UpdatePasswordRequest, UpdatePasswordResponse>(`/apis/ghippo.io/v1alpha1/current-user/password`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
45
|
+
}
|
|
46
|
+
static UpdateLanguage(req: UpdateLanguageRequest, initReq?: fm.InitReq): Promise<UpdateLanguageResponse> {
|
|
47
|
+
return fm.fetchReq<UpdateLanguageRequest, UpdateLanguageResponse>(`/apis/ghippo.io/v1alpha1/current-user/language`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
48
|
+
}
|
|
49
|
+
static GetUser(req: GetUserRequest, initReq?: fm.InitReq): Promise<GetUserResponse> {
|
|
50
|
+
return fm.fetchReq<GetUserRequest, GetUserResponse>(`/apis/ghippo.io/v1alpha1/current-user?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
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 CreateGroupRequest = {
|
|
9
|
+
name?: string
|
|
10
|
+
description?: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type CreateGroupResponse = {
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type ListGroupsRequest = {
|
|
17
|
+
search?: string
|
|
18
|
+
offset?: number
|
|
19
|
+
size?: number
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type ListGroupsResponse = {
|
|
23
|
+
total?: string
|
|
24
|
+
groups?: GroupInfo[]
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type GroupInfo = {
|
|
28
|
+
id?: string
|
|
29
|
+
name?: string
|
|
30
|
+
user_count?: string
|
|
31
|
+
description?: string
|
|
32
|
+
created_at?: string
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type GroupRequest = {
|
|
36
|
+
id?: string
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type GetGroupResponse = {
|
|
40
|
+
group?: GroupInfo
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type DeleteGroupResponse = {
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type GroupMembersRequest = {
|
|
47
|
+
id?: string
|
|
48
|
+
search?: string
|
|
49
|
+
offset?: number
|
|
50
|
+
size?: number
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type GroupMembersResponse = {
|
|
54
|
+
total?: string
|
|
55
|
+
user?: User[]
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export type User = {
|
|
59
|
+
id?: string
|
|
60
|
+
name?: string
|
|
61
|
+
email?: string
|
|
62
|
+
description?: string
|
|
63
|
+
created_at?: string
|
|
64
|
+
updated_at?: string
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export type AddUserToGroupRequest = {
|
|
68
|
+
id?: string
|
|
69
|
+
user_id?: string
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export type AddUserToGroupResponse = {
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export type DeleteUserFromGroupRequest = {
|
|
76
|
+
id?: string
|
|
77
|
+
user_id?: string
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export type DeleteUserFromGroupResponse = {
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export type UpdateGroupRequest = {
|
|
84
|
+
id?: string
|
|
85
|
+
description?: string
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export type UpdateGroupResponse = {
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export class Group {
|
|
92
|
+
static CreateGroup(req: CreateGroupRequest, initReq?: fm.InitReq): Promise<CreateGroupResponse> {
|
|
93
|
+
return fm.fetchReq<CreateGroupRequest, CreateGroupResponse>(`/apis/ghippo.io/v1alpha1/groups`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
94
|
+
}
|
|
95
|
+
static ListGroups(req: ListGroupsRequest, initReq?: fm.InitReq): Promise<ListGroupsResponse> {
|
|
96
|
+
return fm.fetchReq<ListGroupsRequest, ListGroupsResponse>(`/apis/ghippo.io/v1alpha1/groups?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
97
|
+
}
|
|
98
|
+
static GetGroup(req: GroupRequest, initReq?: fm.InitReq): Promise<GetGroupResponse> {
|
|
99
|
+
return fm.fetchReq<GroupRequest, GetGroupResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
100
|
+
}
|
|
101
|
+
static DeleteGroup(req: GroupRequest, initReq?: fm.InitReq): Promise<DeleteGroupResponse> {
|
|
102
|
+
return fm.fetchReq<GroupRequest, DeleteGroupResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}`, {...initReq, method: "DELETE"})
|
|
103
|
+
}
|
|
104
|
+
static UpdateGroup(req: UpdateGroupRequest, initReq?: fm.InitReq): Promise<UpdateGroupResponse> {
|
|
105
|
+
return fm.fetchReq<UpdateGroupRequest, UpdateGroupResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
106
|
+
}
|
|
107
|
+
static GroupMembers(req: GroupMembersRequest, initReq?: fm.InitReq): Promise<GroupMembersResponse> {
|
|
108
|
+
return fm.fetchReq<GroupMembersRequest, GroupMembersResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}/members?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
109
|
+
}
|
|
110
|
+
static AddUserToGroup(req: AddUserToGroupRequest, initReq?: fm.InitReq): Promise<AddUserToGroupResponse> {
|
|
111
|
+
return fm.fetchReq<AddUserToGroupRequest, AddUserToGroupResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}/members/${req["user_id"]}`, {...initReq, method: "POST"})
|
|
112
|
+
}
|
|
113
|
+
static DeleteUserFromGroup(req: DeleteUserFromGroupRequest, initReq?: fm.InitReq): Promise<DeleteUserFromGroupResponse> {
|
|
114
|
+
return fm.fetchReq<DeleteUserFromGroupRequest, DeleteUserFromGroupResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}/members/${req["user_id"]}`, {...initReq, method: "DELETE"})
|
|
115
|
+
}
|
|
116
|
+
}
|
package/v1alpha1/login.pb.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import * as fm from "../fetch.pb"
|
|
8
8
|
export type LoginGetRequest = {
|
|
9
|
-
|
|
9
|
+
callback_url?: string
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export type LoginGetResponse = {
|
|
@@ -15,12 +15,12 @@ export type LoginGetResponse = {
|
|
|
15
15
|
export type LoginPostRequest = {
|
|
16
16
|
code?: string
|
|
17
17
|
state?: string
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
session_state?: string
|
|
19
|
+
callback_url?: string
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export type LoginPostResponse = {
|
|
23
|
-
|
|
23
|
+
id_token?: string
|
|
24
24
|
username?: string
|
|
25
25
|
}
|
|
26
26
|
|
package/v1alpha1/topnav.pb.ts
CHANGED
|
@@ -9,12 +9,12 @@ export type TopNavRequest = {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export type TopNavResponse = {
|
|
12
|
-
|
|
12
|
+
platform_name?: string
|
|
13
13
|
icon?: Uint8Array
|
|
14
14
|
favicon?: Uint8Array
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
icon_filename?: string
|
|
16
|
+
favicon_filename?: string
|
|
17
|
+
portal_url?: string
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export class TopNavigator {
|
package/v1alpha1/user.pb.ts
CHANGED
|
@@ -5,33 +5,103 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as fm from "../fetch.pb"
|
|
8
|
-
export type
|
|
8
|
+
export type ListUsersRequest = {
|
|
9
9
|
search?: string
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
size?: number
|
|
11
|
+
offset?: number
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export type
|
|
14
|
+
export type ListUsersResponse = {
|
|
15
15
|
total?: string
|
|
16
|
-
data?:
|
|
16
|
+
data?: GetUserResponse[]
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
export type
|
|
19
|
+
export type GetUserRequest = {
|
|
20
|
+
id?: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type GetUserResponse = {
|
|
20
24
|
id?: string
|
|
21
25
|
name?: string
|
|
22
|
-
|
|
23
|
-
|
|
26
|
+
email?: string
|
|
27
|
+
description?: string
|
|
28
|
+
enabled?: boolean
|
|
29
|
+
created_at?: string
|
|
30
|
+
updated_at?: string
|
|
24
31
|
}
|
|
25
32
|
|
|
26
|
-
export type
|
|
33
|
+
export type CreateUserRequest = {
|
|
34
|
+
name?: string
|
|
35
|
+
password?: string
|
|
36
|
+
description?: string
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type CreateUserResponse = {
|
|
40
|
+
id?: string
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type DeleteUserRequest = {
|
|
44
|
+
id?: string
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export type DeleteUserResponse = {
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export type UpdateUserRequest = {
|
|
27
51
|
id?: string
|
|
52
|
+
enabled?: boolean
|
|
53
|
+
email?: string
|
|
54
|
+
description?: string
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type UpdateUserResponse = {
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type SetUserPasswordRequest = {
|
|
61
|
+
id?: string
|
|
62
|
+
password?: string
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export type SetUserPasswordResponse = {
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export type Group = {
|
|
69
|
+
id?: string
|
|
70
|
+
name?: string
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export type ListUserGroupsRequest = {
|
|
74
|
+
id?: string
|
|
75
|
+
search?: string
|
|
76
|
+
offset?: number
|
|
77
|
+
size?: number
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export type ListUserGroupsResponse = {
|
|
81
|
+
total?: string
|
|
82
|
+
data?: Group[]
|
|
28
83
|
}
|
|
29
84
|
|
|
30
85
|
export class Users {
|
|
31
|
-
static
|
|
32
|
-
return fm.fetchReq<
|
|
86
|
+
static ListUsers(req: ListUsersRequest, initReq?: fm.InitReq): Promise<ListUsersResponse> {
|
|
87
|
+
return fm.fetchReq<ListUsersRequest, ListUsersResponse>(`/apis/ghippo.io/v1alpha1/users?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
88
|
+
}
|
|
89
|
+
static GetUser(req: GetUserRequest, initReq?: fm.InitReq): Promise<GetUserResponse> {
|
|
90
|
+
return fm.fetchReq<GetUserRequest, GetUserResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
91
|
+
}
|
|
92
|
+
static CreateUser(req: CreateUserRequest, initReq?: fm.InitReq): Promise<CreateUserResponse> {
|
|
93
|
+
return fm.fetchReq<CreateUserRequest, CreateUserResponse>(`/apis/ghippo.io/v1alpha1/users`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
94
|
+
}
|
|
95
|
+
static DeleteUser(req: DeleteUserRequest, initReq?: fm.InitReq): Promise<DeleteUserResponse> {
|
|
96
|
+
return fm.fetchReq<DeleteUserRequest, DeleteUserResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}`, {...initReq, method: "DELETE"})
|
|
97
|
+
}
|
|
98
|
+
static UpdateUser(req: UpdateUserRequest, initReq?: fm.InitReq): Promise<UpdateUserResponse> {
|
|
99
|
+
return fm.fetchReq<UpdateUserRequest, UpdateUserResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
100
|
+
}
|
|
101
|
+
static SetUserPassword(req: SetUserPasswordRequest, initReq?: fm.InitReq): Promise<SetUserPasswordResponse> {
|
|
102
|
+
return fm.fetchReq<SetUserPasswordRequest, SetUserPasswordResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/password`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
33
103
|
}
|
|
34
|
-
static
|
|
35
|
-
return fm.fetchReq<
|
|
104
|
+
static ListUserGroups(req: ListUserGroupsRequest, initReq?: fm.InitReq): Promise<ListUserGroupsResponse> {
|
|
105
|
+
return fm.fetchReq<ListUserGroupsRequest, ListUserGroupsResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/groups?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
36
106
|
}
|
|
37
107
|
}
|