@daocloud-proto/ghippo 0.22.0-dev1 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/ghippo",
3
- "version":"0.22.0-dev1",
3
+ "version":"0.22.0-dev2",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -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
  }
@@ -253,6 +253,7 @@ export type AuthorizeRequest = {
253
253
  memberName?: string
254
254
  memberType?: string
255
255
  memberId?: string
256
+ roleNames?: string[]
256
257
  }
257
258
 
258
259
  export type AuthorizeResponse = {