@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/ghippo",
3
- "version":"0.22.0-dev1",
3
+ "version":"0.22.0-dev3",
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
@@ -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
  }
@@ -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 = {