@daocloud-proto/ghippo 0.8.2 → 0.8.5
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/securitypolicy.pb.ts +28 -8
- package/v1alpha1/workspace.pb.ts +34 -19
package/package.json
CHANGED
|
@@ -37,24 +37,38 @@ export type SetPasswordPolicyRequest = {
|
|
|
37
37
|
export type SetPasswordPolicyResponse = {
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
export type
|
|
40
|
+
export type GetAccountLockoutPolicyRequest = {
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
export type
|
|
43
|
+
export type GetAccountLockoutPolicyResponse = {
|
|
44
44
|
enabled?: boolean
|
|
45
45
|
maxLoginFailures?: number
|
|
46
46
|
maxFailuresWaitSeconds?: number
|
|
47
47
|
failureResetSeconds?: number
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
export type
|
|
50
|
+
export type SetAccountLockoutPolicyRequest = {
|
|
51
51
|
enabled?: boolean
|
|
52
52
|
maxLoginFailures?: number
|
|
53
53
|
maxFailuresWaitSeconds?: number
|
|
54
54
|
failureResetSeconds?: number
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
export type
|
|
57
|
+
export type SetAccountLockoutPolicyResponse = {
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type GetLogoutPolicyRequest = {
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type GetLogoutPolicyResponse = {
|
|
64
|
+
enabled?: boolean
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export type SetLogoutPolicyRequest = {
|
|
68
|
+
enabled?: boolean
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export type SetLogoutPolicyResponse = {
|
|
58
72
|
}
|
|
59
73
|
|
|
60
74
|
export class SecurityPolicy {
|
|
@@ -64,10 +78,16 @@ export class SecurityPolicy {
|
|
|
64
78
|
static SetPasswordPolicy(req: SetPasswordPolicyRequest, initReq?: fm.InitReq): Promise<SetPasswordPolicyResponse> {
|
|
65
79
|
return fm.fetchReq<SetPasswordPolicyRequest, SetPasswordPolicyResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/password`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
66
80
|
}
|
|
67
|
-
static
|
|
68
|
-
return fm.fetchReq<
|
|
81
|
+
static GetAccountLockoutPolicy(req: GetAccountLockoutPolicyRequest, initReq?: fm.InitReq): Promise<GetAccountLockoutPolicyResponse> {
|
|
82
|
+
return fm.fetchReq<GetAccountLockoutPolicyRequest, GetAccountLockoutPolicyResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/accountlockout?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
83
|
+
}
|
|
84
|
+
static SetAccountLockoutPolicy(req: SetAccountLockoutPolicyRequest, initReq?: fm.InitReq): Promise<SetAccountLockoutPolicyResponse> {
|
|
85
|
+
return fm.fetchReq<SetAccountLockoutPolicyRequest, SetAccountLockoutPolicyResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/accountlockout`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
86
|
+
}
|
|
87
|
+
static GetLogoutPolicy(req: GetLogoutPolicyRequest, initReq?: fm.InitReq): Promise<GetLogoutPolicyResponse> {
|
|
88
|
+
return fm.fetchReq<GetLogoutPolicyRequest, GetLogoutPolicyResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/logout?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
69
89
|
}
|
|
70
|
-
static
|
|
71
|
-
return fm.fetchReq<
|
|
90
|
+
static SetLogoutPolicy(req: SetLogoutPolicyRequest, initReq?: fm.InitReq): Promise<SetLogoutPolicyResponse> {
|
|
91
|
+
return fm.fetchReq<SetLogoutPolicyRequest, SetLogoutPolicyResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/logout`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
72
92
|
}
|
|
73
93
|
}
|
package/v1alpha1/workspace.pb.ts
CHANGED
|
@@ -5,7 +5,15 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as fm from "../fetch.pb"
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
export enum QuotaType {
|
|
10
|
+
RequestsCPU = "RequestsCPU",
|
|
11
|
+
LimitsCPU = "LimitsCPU",
|
|
12
|
+
RequestsMemory = "RequestsMemory",
|
|
13
|
+
LimitsMemory = "LimitsMemory",
|
|
14
|
+
PersistentVolumeClaims = "PersistentVolumeClaims",
|
|
15
|
+
}
|
|
16
|
+
|
|
9
17
|
export type Pagination = {
|
|
10
18
|
total?: number
|
|
11
19
|
page?: number
|
|
@@ -271,11 +279,11 @@ export type Resource = {
|
|
|
271
279
|
}
|
|
272
280
|
|
|
273
281
|
export type QuotaHard = {
|
|
274
|
-
requestsCpu?:
|
|
275
|
-
limitsCpu?:
|
|
276
|
-
requestsMemory?:
|
|
277
|
-
limitsMemory?:
|
|
278
|
-
persistentvolumeclaims?:
|
|
282
|
+
requestsCpu?: string
|
|
283
|
+
limitsCpu?: string
|
|
284
|
+
requestsMemory?: string
|
|
285
|
+
limitsMemory?: string
|
|
286
|
+
persistentvolumeclaims?: string
|
|
279
287
|
}
|
|
280
288
|
|
|
281
289
|
export type BindResourceAndSetQuotaHardToWorkspaceRequest = {
|
|
@@ -297,13 +305,16 @@ export type SetQuotaHardForWorkspaceResourceRequest = {
|
|
|
297
305
|
export type SetQuotaHardForWorkspaceResourceResponse = {
|
|
298
306
|
}
|
|
299
307
|
|
|
300
|
-
export type
|
|
308
|
+
export type GetWorkspaceResourceQuotaRequest = {
|
|
301
309
|
workspaceId?: number
|
|
302
|
-
|
|
310
|
+
resourceName?: string
|
|
311
|
+
resourceType?: string
|
|
303
312
|
}
|
|
304
313
|
|
|
305
|
-
export type
|
|
306
|
-
|
|
314
|
+
export type GetWorkspaceResourceQuotaResponse = {
|
|
315
|
+
setting?: {[key: string]: string}
|
|
316
|
+
allocatable?: {[key: string]: string}
|
|
317
|
+
used?: {[key: string]: string}
|
|
307
318
|
}
|
|
308
319
|
|
|
309
320
|
export type ListResourceQuotaTypesRequest = {
|
|
@@ -313,14 +324,18 @@ export type ListResourceQuotaTypesResponse = {
|
|
|
313
324
|
items?: string[]
|
|
314
325
|
}
|
|
315
326
|
|
|
316
|
-
export type
|
|
327
|
+
export type UpdateQuotaCheckRequest = {
|
|
328
|
+
resourceName?: string
|
|
329
|
+
resourceType?: string
|
|
330
|
+
gproduct?: string
|
|
331
|
+
resourceScope?: string
|
|
317
332
|
workspaceId?: number
|
|
318
|
-
|
|
333
|
+
quotaHard?: QuotaHard
|
|
319
334
|
}
|
|
320
335
|
|
|
321
|
-
export type
|
|
322
|
-
|
|
323
|
-
|
|
336
|
+
export type UpdateQuotaCheckResponse = {
|
|
337
|
+
passed?: boolean
|
|
338
|
+
reason?: string
|
|
324
339
|
}
|
|
325
340
|
|
|
326
341
|
export class Workspace {
|
|
@@ -393,13 +408,13 @@ export class Workspace {
|
|
|
393
408
|
static SetQuotaHardForWorkspaceResource(req: SetQuotaHardForWorkspaceResourceRequest, initReq?: fm.InitReq): Promise<SetQuotaHardForWorkspaceResourceResponse> {
|
|
394
409
|
return fm.fetchReq<SetQuotaHardForWorkspaceResourceRequest, SetQuotaHardForWorkspaceResourceResponse>(`/apis/ghippo.io/v1alpha1/workspaceresource-quota-hard`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
395
410
|
}
|
|
396
|
-
static
|
|
397
|
-
return fm.fetchReq<
|
|
411
|
+
static GetWorkspaceResourceQuota(req: GetWorkspaceResourceQuotaRequest, initReq?: fm.InitReq): Promise<GetWorkspaceResourceQuotaResponse> {
|
|
412
|
+
return fm.fetchReq<GetWorkspaceResourceQuotaRequest, GetWorkspaceResourceQuotaResponse>(`/apis/ghippo.io/v1alpha1/workspaceresource-quota?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
398
413
|
}
|
|
399
414
|
static ListResourceQuotaTypes(req: ListResourceQuotaTypesRequest, initReq?: fm.InitReq): Promise<ListResourceQuotaTypesResponse> {
|
|
400
415
|
return fm.fetchReq<ListResourceQuotaTypesRequest, ListResourceQuotaTypesResponse>(`/apis/ghippo.io/v1alpha1/resourcequota-types?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
401
416
|
}
|
|
402
|
-
static
|
|
403
|
-
return fm.fetchReq<
|
|
417
|
+
static UpdateQuotaCheck(req: UpdateQuotaCheckRequest, initReq?: fm.InitReq): Promise<UpdateQuotaCheckResponse> {
|
|
418
|
+
return fm.fetchReq<UpdateQuotaCheckRequest, UpdateQuotaCheckResponse>(`/apis/ghippo.io/v1alpha1/update-quota-check`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
404
419
|
}
|
|
405
420
|
}
|