@daocloud-proto/ghippo 0.22.2 → 0.23.0-dev-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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/ghippo",
3
- "version":"0.22.2",
3
+ "version":"0.23.0-dev-1",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -135,6 +135,20 @@ export type SetTimeSessionLimitRequest = {
135
135
  export type SetTimeSessionLimitResponse = {
136
136
  }
137
137
 
138
+ export type GetMFARequest = {
139
+ }
140
+
141
+ export type GetMFAResponse = {
142
+ enabled?: boolean
143
+ }
144
+
145
+ export type SetMFARequest = {
146
+ enabled?: boolean
147
+ }
148
+
149
+ export type SetMFAResponse = {
150
+ }
151
+
138
152
  export class SecurityPolicy {
139
153
  static GetPasswordPolicy(req: GetPasswordPolicyRequest, initReq?: fm.InitReq): Promise<GetPasswordPolicyResponse> {
140
154
  return fm.fetchReq<GetPasswordPolicyRequest, GetPasswordPolicyResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/password?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -178,4 +192,10 @@ export class SecurityPolicy {
178
192
  static SetTimeSessionLimit(req: SetTimeSessionLimitRequest, initReq?: fm.InitReq): Promise<SetTimeSessionLimitResponse> {
179
193
  return fm.fetchReq<SetTimeSessionLimitRequest, SetTimeSessionLimitResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/sessionlimit/time`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
180
194
  }
195
+ static GetMFA(req: GetMFARequest, initReq?: fm.InitReq): Promise<GetMFAResponse> {
196
+ return fm.fetchReq<GetMFARequest, GetMFAResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/mfa?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
197
+ }
198
+ static SetMFA(req: SetMFARequest, initReq?: fm.InitReq): Promise<SetMFAResponse> {
199
+ return fm.fetchReq<SetMFARequest, SetMFAResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/mfa`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
200
+ }
181
201
  }
@@ -211,6 +211,13 @@ export type DeleteUserAccessTokenRequest = {
211
211
  export type DeleteUserAccessTokenResponse = {
212
212
  }
213
213
 
214
+ export type ResetUserMFARequest = {
215
+ id?: string
216
+ }
217
+
218
+ export type ResetUserMFAResponse = {
219
+ }
220
+
214
221
  export class Users {
215
222
  static ListUsers(req: ListUsersRequest, initReq?: fm.InitReq): Promise<ListUsersResponse> {
216
223
  return fm.fetchReq<ListUsersRequest, ListUsersResponse>(`/apis/ghippo.io/v1alpha1/users?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -242,6 +249,9 @@ export class Users {
242
249
  static SetUserPassword(req: SetUserPasswordRequest, initReq?: fm.InitReq): Promise<SetUserPasswordResponse> {
243
250
  return fm.fetchReq<SetUserPasswordRequest, SetUserPasswordResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/password`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
244
251
  }
252
+ static ResetUserMFA(req: ResetUserMFARequest, initReq?: fm.InitReq): Promise<ResetUserMFAResponse> {
253
+ return fm.fetchReq<ResetUserMFARequest, ResetUserMFAResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/mfa`, {...initReq, method: "DELETE"})
254
+ }
245
255
  static ListUserGroups(req: ListUserGroupsRequest, initReq?: fm.InitReq): Promise<ListUserGroupsResponse> {
246
256
  return fm.fetchReq<ListUserGroupsRequest, ListUserGroupsResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/groups?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
247
257
  }