@daocloud-proto/ghippo 0.21.0 → 0.22.0-dev2
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 +7 -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
|
|
@@ -212,6 +216,9 @@ export class Users {
|
|
|
212
216
|
static GetUser(req: GetUserRequest, initReq?: fm.InitReq): Promise<GetUserResponse> {
|
|
213
217
|
return fm.fetchReq<GetUserRequest, GetUserResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
214
218
|
}
|
|
219
|
+
static GetUserByName(req: GetUserByNameRequest, initReq?: fm.InitReq): Promise<GetUserResponse> {
|
|
220
|
+
return fm.fetchReq<GetUserByNameRequest, GetUserResponse>(`/apis/ghippo.io/v1alpha1/users/username/${req["username"]}?${fm.renderURLSearchParams(req, ["username"])}`, {...initReq, method: "GET"})
|
|
221
|
+
}
|
|
215
222
|
static CreateUser(req: CreateUserRequest, initReq?: fm.InitReq): Promise<CreateUserResponse> {
|
|
216
223
|
return fm.fetchReq<CreateUserRequest, CreateUserResponse>(`/apis/ghippo.io/v1alpha1/users`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
217
224
|
}
|