@daocloud-proto/ghippo 0.18.1 → 0.19.0-dev1

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.18.1",
3
+ "version":"0.19.0-dev1",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -23,62 +23,12 @@ export enum ExternalType {
23
23
  resetPassword = "resetPassword",
24
24
  }
25
25
 
26
- export type Disposition = {
27
- contentDisposition?: string
28
- }
29
-
30
- export type ListAuditRequest = {
31
- sourceType?: string
32
- sourceName?: string
33
- clusterName?: string
34
- status?: StatusType
35
- searchType?: SearchType
36
- searchUser?: string
37
- start?: string
38
- end?: string
39
- page?: number
40
- pageSize?: number
41
- }
42
-
43
- export type ListAuditResponse = {
44
- items?: AuditInfo[]
45
- pagination?: Pagination
46
- }
47
-
48
- export type AuditInfo = {
49
- id?: string
50
- auditName?: string
51
- resourceType?: string
52
- resourceName?: string
53
- clusterName?: string
54
- status?: StatusType
55
- user?: string
56
- client?: string
57
- ip?: string
58
- createdAt?: string
59
- }
60
-
61
26
  export type Pagination = {
62
27
  total?: number
63
28
  page?: number
64
29
  pageSize?: number
65
30
  }
66
31
 
67
- export type GetAuditRequest = {
68
- id?: string
69
- }
70
-
71
- export type GetAuditResponse = {
72
- audit?: string
73
- }
74
-
75
- export type CreateAuditRequest = {
76
- audit?: AuditInfo
77
- }
78
-
79
- export type CreateAuditResponse = {
80
- }
81
-
82
32
  export type GetAutoClearAuditTimeRequest = {
83
33
  }
84
34
 
@@ -135,12 +85,6 @@ export type GetAuditResourceReportResponse = {
135
85
  }
136
86
 
137
87
  export class Audit {
138
- static ListAudit(req: ListAuditRequest, initReq?: fm.InitReq): Promise<ListAuditResponse> {
139
- return fm.fetchReq<ListAuditRequest, ListAuditResponse>(`/apis/ghippo.io/v1alpha1/audits?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
140
- }
141
- static GetAudit(req: GetAuditRequest, initReq?: fm.InitReq): Promise<GetAuditResponse> {
142
- return fm.fetchReq<GetAuditRequest, GetAuditResponse>(`/apis/ghippo.io/v1alpha1/audits/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
143
- }
144
88
  static GetAutoClearAuditTime(req: GetAutoClearAuditTimeRequest, initReq?: fm.InitReq): Promise<GetAutoClearAuditTimeResponse> {
145
89
  return fm.fetchReq<GetAutoClearAuditTimeRequest, GetAutoClearAuditTimeResponse>(`/apis/ghippo.io/v1alpha1/audits/clear?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
146
90
  }
@@ -40,6 +40,13 @@ export type RefreshTokenResponse = {
40
40
  refreshToken?: string
41
41
  }
42
42
 
43
+ export type CheckSessionLimitRequest = {
44
+ username?: string
45
+ }
46
+
47
+ export type CheckSessionLimitResponse = {
48
+ }
49
+
43
50
  export class Login {
44
51
  static RedirectLogin(req: LoginGetRequest, initReq?: fm.InitReq): Promise<LoginGetResponse> {
45
52
  return fm.fetchReq<LoginGetRequest, LoginGetResponse>(`/apis/ghippo.io/v1alpha1/login?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -53,4 +60,7 @@ export class Login {
53
60
  static RefreshToken(req: RefreshTokenRequest, initReq?: fm.InitReq): Promise<RefreshTokenResponse> {
54
61
  return fm.fetchReq<RefreshTokenRequest, RefreshTokenResponse>(`/apis/ghippo.io/v1alpha1/refresh-token`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
55
62
  }
63
+ static CheckSessionLimit(req: CheckSessionLimitRequest, initReq?: fm.InitReq): Promise<CheckSessionLimitResponse> {
64
+ return fm.fetchReq<CheckSessionLimitRequest, CheckSessionLimitResponse>(`/apis/ghippo.io/v1alpha1/session-limit`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
65
+ }
56
66
  }
@@ -117,6 +117,24 @@ export type SetSystemSessionLimitRequest = {
117
117
  export type SetSystemSessionLimitResponse = {
118
118
  }
119
119
 
120
+ export type GetTimeSessionLimitRequest = {
121
+ }
122
+
123
+ export type GetTimeSessionLimitResponse = {
124
+ enabled?: boolean
125
+ start?: string
126
+ end?: string
127
+ }
128
+
129
+ export type SetTimeSessionLimitRequest = {
130
+ enabled?: boolean
131
+ start?: string
132
+ end?: string
133
+ }
134
+
135
+ export type SetTimeSessionLimitResponse = {
136
+ }
137
+
120
138
  export class SecurityPolicy {
121
139
  static GetPasswordPolicy(req: GetPasswordPolicyRequest, initReq?: fm.InitReq): Promise<GetPasswordPolicyResponse> {
122
140
  return fm.fetchReq<GetPasswordPolicyRequest, GetPasswordPolicyResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/password?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -154,4 +172,10 @@ export class SecurityPolicy {
154
172
  static SetSystemSessionLimit(req: SetSystemSessionLimitRequest, initReq?: fm.InitReq): Promise<SetSystemSessionLimitResponse> {
155
173
  return fm.fetchReq<SetSystemSessionLimitRequest, SetSystemSessionLimitResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/sessionlimit/system`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
156
174
  }
175
+ static GetTimeSessionLimit(req: GetTimeSessionLimitRequest, initReq?: fm.InitReq): Promise<GetTimeSessionLimitResponse> {
176
+ return fm.fetchReq<GetTimeSessionLimitRequest, GetTimeSessionLimitResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/sessionlimit/time?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
177
+ }
178
+ static SetTimeSessionLimit(req: SetTimeSessionLimitRequest, initReq?: fm.InitReq): Promise<SetTimeSessionLimitResponse> {
179
+ return fm.fetchReq<SetTimeSessionLimitRequest, SetTimeSessionLimitResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/sessionlimit/time`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
180
+ }
157
181
  }
@@ -45,6 +45,8 @@ export enum WorkspaceResourceKindEnum {
45
45
  resource_group = "resource_group",
46
46
  shared_resource = "shared_resource",
47
47
  registry = "registry",
48
+ kangaroo_registry = "kangaroo_registry",
49
+ kangaroo_project = "kangaroo_project",
48
50
  }
49
51
 
50
52
  export enum ClusterStatus {
@@ -3,56 +3,5 @@
3
3
  /*
4
4
  * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
5
  */
6
-
7
- import * as fm from "../fetch.pb"
8
- import * as GoogleApiHttpbody from "../google/api/httpbody.pb"
9
-
10
- export enum StatusType {
11
- all = "all",
12
- succeeded = "succeeded",
13
- failed = "failed",
14
- }
15
-
16
- export enum SearchType {
17
- fuzzy = "fuzzy",
18
- exact = "exact",
19
- }
20
-
21
- export type ExportAuditRequest = {
22
- start?: string
23
- end?: string
24
- sourceType?: string
25
- sourceName?: string
26
- clusterName?: string
27
- status?: StatusType
28
- searchType?: SearchType
29
- searchUser?: string
30
- }
31
-
32
- export type ClearAuditsRequest = {
33
- isKube?: boolean
34
- days?: number
35
- }
36
-
37
- export type ClearAuditsResponse = {
38
- }
39
-
40
- export type SetAutoClearAuditsRequest = {
41
- isKube?: boolean
42
- days?: number
43
- }
44
-
45
- export type SetAutoClearAuditsResponse = {
46
- }
47
-
48
6
  export class Audit {
49
- static ClearAudits(req: ClearAuditsRequest, initReq?: fm.InitReq): Promise<ClearAuditsResponse> {
50
- return fm.fetchReq<ClearAuditsRequest, ClearAuditsResponse>(`/apis/ghippo.io/v1alpha2/audits/clear`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
51
- }
52
- static SetAutoClearAudits(req: SetAutoClearAuditsRequest, initReq?: fm.InitReq): Promise<SetAutoClearAuditsResponse> {
53
- return fm.fetchReq<SetAutoClearAuditsRequest, SetAutoClearAuditsResponse>(`/apis/ghippo.io/v1alpha2/audits/clear`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
54
- }
55
- static ExportAudit(req: ExportAuditRequest, initReq?: fm.InitReq): Promise<GoogleApiHttpbody.HttpBody> {
56
- return fm.fetchReq<ExportAuditRequest, GoogleApiHttpbody.HttpBody>(`/apis/ghippo.io/v1alpha2/audits/export?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
57
- }
58
7
  }