@daocloud-proto/ghippo 0.22.0-dev1 → 0.22.0-dev3
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 +1 -1
- package/v1alpha1/user.pb.ts +18 -0
- package/v1alpha1/workspace.pb.ts +1 -0
package/package.json
CHANGED
package/v1alpha1/user.pb.ts
CHANGED
|
@@ -57,6 +57,10 @@ export type GetUserResponse = {
|
|
|
57
57
|
canAuthorize?: boolean
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
export type GetUserByNameRequest = {
|
|
61
|
+
username?: string
|
|
62
|
+
}
|
|
63
|
+
|
|
60
64
|
export type CreateUserRequest = {
|
|
61
65
|
name?: string
|
|
62
66
|
password?: string
|
|
@@ -68,6 +72,14 @@ export type CreateUserResponse = {
|
|
|
68
72
|
id?: string
|
|
69
73
|
}
|
|
70
74
|
|
|
75
|
+
export type CreateUserWithoutPasswordRequest = {
|
|
76
|
+
name?: string
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export type CreateUserWithoutPasswordResponse = {
|
|
80
|
+
id?: string
|
|
81
|
+
}
|
|
82
|
+
|
|
71
83
|
export type DeleteUserRequest = {
|
|
72
84
|
id?: string
|
|
73
85
|
}
|
|
@@ -212,9 +224,15 @@ export class Users {
|
|
|
212
224
|
static GetUser(req: GetUserRequest, initReq?: fm.InitReq): Promise<GetUserResponse> {
|
|
213
225
|
return fm.fetchReq<GetUserRequest, GetUserResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
214
226
|
}
|
|
227
|
+
static GetUserByName(req: GetUserByNameRequest, initReq?: fm.InitReq): Promise<GetUserResponse> {
|
|
228
|
+
return fm.fetchReq<GetUserByNameRequest, GetUserResponse>(`/apis/ghippo.io/v1alpha1/users/username/${req["username"]}?${fm.renderURLSearchParams(req, ["username"])}`, {...initReq, method: "GET"})
|
|
229
|
+
}
|
|
215
230
|
static CreateUser(req: CreateUserRequest, initReq?: fm.InitReq): Promise<CreateUserResponse> {
|
|
216
231
|
return fm.fetchReq<CreateUserRequest, CreateUserResponse>(`/apis/ghippo.io/v1alpha1/users`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
217
232
|
}
|
|
233
|
+
static CreateUserWithoutPassword(req: CreateUserWithoutPasswordRequest, initReq?: fm.InitReq): Promise<CreateUserWithoutPasswordResponse> {
|
|
234
|
+
return fm.fetchReq<CreateUserWithoutPasswordRequest, CreateUserWithoutPasswordResponse>(`/apis/ghippo.io/v1alpha1/users/without-password`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
235
|
+
}
|
|
218
236
|
static DeleteUser(req: DeleteUserRequest, initReq?: fm.InitReq): Promise<DeleteUserResponse> {
|
|
219
237
|
return fm.fetchReq<DeleteUserRequest, DeleteUserResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}`, {...initReq, method: "DELETE"})
|
|
220
238
|
}
|