@daocloud-proto/ghippo 0.7.31 → 0.7.37

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.7.31",
3
+ "version":"0.7.37",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -54,7 +54,7 @@ export type TestLdapConnectionRequest = {
54
54
  export type TestLdapConnectionResponse = {
55
55
  }
56
56
 
57
- export type TestLdaptestAuthenticationRequest = {
57
+ export type TestLdapAuthenticationRequest = {
58
58
  bindDn?: string
59
59
  bindCredential?: string
60
60
  connectionUrl?: string
@@ -65,7 +65,7 @@ export type TestLdaptestAuthenticationRequest = {
65
65
  componentId?: string
66
66
  }
67
67
 
68
- export type TestLdaptestAuthenticationResponse = {
68
+ export type TestLdapAuthenticationResponse = {
69
69
  }
70
70
 
71
71
  export type UpdateLdapRequest = {
@@ -170,8 +170,8 @@ export class Ldap {
170
170
  static TestLdapConnection(req: TestLdapConnectionRequest, initReq?: fm.InitReq): Promise<TestLdapConnectionResponse> {
171
171
  return fm.fetchReq<TestLdapConnectionRequest, TestLdapConnectionResponse>(`/apis/ghippo.io/v1alpha1/testLdapConnection`, {...initReq, method: "POST", body: JSON.stringify(req)})
172
172
  }
173
- static TestLdapAuthentication(req: TestLdaptestAuthenticationRequest, initReq?: fm.InitReq): Promise<TestLdaptestAuthenticationResponse> {
174
- return fm.fetchReq<TestLdaptestAuthenticationRequest, TestLdaptestAuthenticationResponse>(`/apis/ghippo.io/v1alpha1/testLdapAuthentication`, {...initReq, method: "POST", body: JSON.stringify(req)})
173
+ static TestLdapAuthentication(req: TestLdapAuthenticationRequest, initReq?: fm.InitReq): Promise<TestLdapAuthenticationResponse> {
174
+ return fm.fetchReq<TestLdapAuthenticationRequest, TestLdapAuthenticationResponse>(`/apis/ghippo.io/v1alpha1/testLdapAuthentication`, {...initReq, method: "POST", body: JSON.stringify(req)})
175
175
  }
176
176
  static UpdateLdap(req: UpdateLdapRequest, initReq?: fm.InitReq): Promise<UpdateLdapResponse> {
177
177
  return fm.fetchReq<UpdateLdapRequest, UpdateLdapResponse>(`/apis/ghippo.io/v1alpha1/ldap/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
@@ -37,6 +37,26 @@ export type SetPasswordPolicyRequest = {
37
37
  export type SetPasswordPolicyResponse = {
38
38
  }
39
39
 
40
+ export type GetLoginPolicyRequest = {
41
+ }
42
+
43
+ export type GetLoginPolicyResponse = {
44
+ enabled?: boolean
45
+ maxLoginFailures?: number
46
+ maxFailuresWaitSeconds?: number
47
+ failureResetSeconds?: number
48
+ }
49
+
50
+ export type SetLoginPolicyRequest = {
51
+ enabled?: boolean
52
+ maxLoginFailures?: number
53
+ maxFailuresWaitSeconds?: number
54
+ failureResetSeconds?: number
55
+ }
56
+
57
+ export type SetLoginPolicyResponse = {
58
+ }
59
+
40
60
  export class SecurityPolicy {
41
61
  static GetPasswordPolicy(req: GetPasswordPolicyRequest, initReq?: fm.InitReq): Promise<GetPasswordPolicyResponse> {
42
62
  return fm.fetchReq<GetPasswordPolicyRequest, GetPasswordPolicyResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/password?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -44,4 +64,10 @@ export class SecurityPolicy {
44
64
  static SetPasswordPolicy(req: SetPasswordPolicyRequest, initReq?: fm.InitReq): Promise<SetPasswordPolicyResponse> {
45
65
  return fm.fetchReq<SetPasswordPolicyRequest, SetPasswordPolicyResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/password`, {...initReq, method: "PUT", body: JSON.stringify(req)})
46
66
  }
67
+ static GetLoginPolicy(req: GetLoginPolicyRequest, initReq?: fm.InitReq): Promise<GetLoginPolicyResponse> {
68
+ return fm.fetchReq<GetLoginPolicyRequest, GetLoginPolicyResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/login?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
69
+ }
70
+ static SetLoginPolicy(req: SetLoginPolicyRequest, initReq?: fm.InitReq): Promise<SetLoginPolicyResponse> {
71
+ return fm.fetchReq<SetLoginPolicyRequest, SetLoginPolicyResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/login`, {...initReq, method: "PUT", body: JSON.stringify(req)})
72
+ }
47
73
  }
@@ -229,16 +229,6 @@ export type ListMembersRolesByFolderResponse = {
229
229
  pagination?: Pagination
230
230
  }
231
231
 
232
- export type ListMembersRolesResourcesRequest = {
233
- page?: number
234
- pageSize?: number
235
- }
236
-
237
- export type ListMembersRolesResourcesResponse = {
238
- items?: MemberRoleWorkspaceInfo[]
239
- pagination?: Pagination
240
- }
241
-
242
232
  export type ResourceInfo = {
243
233
  name?: string
244
234
  type?: string
@@ -324,6 +314,16 @@ export type ListResourceQuotaTypesResponse = {
324
314
  items?: string[]
325
315
  }
326
316
 
317
+ export type GetWorkspaceResourceQuotaAllocatableRequest = {
318
+ workspaceId?: number
319
+ cluster?: string
320
+ }
321
+
322
+ export type GetWorkspaceResourceQuotaAllocatableResponse = {
323
+ setting?: {[key: string]: string}
324
+ allocatable?: {[key: string]: string}
325
+ }
326
+
327
327
  export class Workspace {
328
328
  static ListWorkspaces(req: ListWorkspacesRequest, initReq?: fm.InitReq): Promise<ListWorkspacesResponse> {
329
329
  return fm.fetchReq<ListWorkspacesRequest, ListWorkspacesResponse>(`/apis/ghippo.io/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -379,9 +379,6 @@ export class Workspace {
379
379
  static ListMembersRolesByFolder(req: ListMembersRolesByFolderRequest, initReq?: fm.InitReq): Promise<ListMembersRolesByFolderResponse> {
380
380
  return fm.fetchReq<ListMembersRolesByFolderRequest, ListMembersRolesByFolderResponse>(`/apis/ghippo.io/v1alpha1/folders/${req["folderId"]}/members-roles?${fm.renderURLSearchParams(req, ["folderId"])}`, {...initReq, method: "GET"})
381
381
  }
382
- static ListMembersRolesResources(req: ListMembersRolesResourcesRequest, initReq?: fm.InitReq): Promise<ListMembersRolesResourcesResponse> {
383
- return fm.fetchReq<ListMembersRolesResourcesRequest, ListMembersRolesResourcesResponse>(`/apis/ghippo.io/v1alpha1/resources/members-roles?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
384
- }
385
382
  static ListResources(req: ListResourcesRequest, initReq?: fm.InitReq): Promise<ListResourcesResponse> {
386
383
  return fm.fetchReq<ListResourcesRequest, ListResourcesResponse>(`/apis/ghippo.io/v1alpha1/resources?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
387
384
  }
@@ -403,4 +400,7 @@ export class Workspace {
403
400
  static ListResourceQuotaTypes(req: ListResourceQuotaTypesRequest, initReq?: fm.InitReq): Promise<ListResourceQuotaTypesResponse> {
404
401
  return fm.fetchReq<ListResourceQuotaTypesRequest, ListResourceQuotaTypesResponse>(`/apis/ghippo.io/v1alpha1/resourcequota-types?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
405
402
  }
403
+ static GetWorkspaceResourceQuotaAllocatable(req: GetWorkspaceResourceQuotaAllocatableRequest, initReq?: fm.InitReq): Promise<GetWorkspaceResourceQuotaAllocatableResponse> {
404
+ return fm.fetchReq<GetWorkspaceResourceQuotaAllocatableRequest, GetWorkspaceResourceQuotaAllocatableResponse>(`/apis/ghippo.io/v1alpha1/workspaceresource-quota-allocatable?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
405
+ }
406
406
  }