@daocloud-proto/ghippo 0.14.0 → 0.15.0-dev-2

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.14.0",
3
+ "version":"0.15.0-dev-2",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -122,6 +122,37 @@ export type ExternalAuditRequest = {
122
122
  export type ExternalAuditResponse = {
123
123
  }
124
124
 
125
+ export type UserReport = {
126
+ userName?: string
127
+ totalCount?: number
128
+ successCount?: number
129
+ failedCount?: number
130
+ }
131
+
132
+ export type ResourceReport = {
133
+ resourceType?: string
134
+ eventName?: string
135
+ count?: number
136
+ }
137
+
138
+ export type GetAuditUserReportRequest = {
139
+ start?: string
140
+ end?: string
141
+ }
142
+
143
+ export type GetAuditUserReportResponse = {
144
+ items?: UserReport[]
145
+ }
146
+
147
+ export type GetAuditResourceReportRequest = {
148
+ start?: string
149
+ end?: string
150
+ }
151
+
152
+ export type GetAuditResourceReportResponse = {
153
+ items?: ResourceReport[]
154
+ }
155
+
125
156
  export class Audit {
126
157
  static ListAudit(req: ListAuditRequest, initReq?: fm.InitReq): Promise<ListAuditResponse> {
127
158
  return fm.fetchReq<ListAuditRequest, ListAuditResponse>(`/apis/ghippo.io/v1alpha1/audits?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -144,4 +175,10 @@ export class Audit {
144
175
  static ExternalAudit(req: ExternalAuditRequest, initReq?: fm.InitReq): Promise<ExternalAuditResponse> {
145
176
  return fm.fetchReq<ExternalAuditRequest, ExternalAuditResponse>(`/apis/ghippo.io/v1alpha1/audits/external?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
146
177
  }
178
+ static GetAuditUserReport(req: GetAuditUserReportRequest, initReq?: fm.InitReq): Promise<GetAuditUserReportResponse> {
179
+ return fm.fetchReq<GetAuditUserReportRequest, GetAuditUserReportResponse>(`/apis/ghippo.io/v1alpha1/audits/reports/users?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
180
+ }
181
+ static GetAuditResourceReport(req: GetAuditResourceReportRequest, initReq?: fm.InitReq): Promise<GetAuditResourceReportResponse> {
182
+ return fm.fetchReq<GetAuditResourceReportRequest, GetAuditResourceReportResponse>(`/apis/ghippo.io/v1alpha1/audits/reports/resources?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
183
+ }
147
184
  }
@@ -7,6 +7,7 @@
7
7
  import * as fm from "../fetch.pb"
8
8
 
9
9
  export enum AuthScope {
10
+ unknown_auth_scope = "unknown_auth_scope",
10
11
  platform = "platform",
11
12
  folder = "folder",
12
13
  workspace = "workspace",
@@ -91,6 +92,7 @@ export type ListRolesRequest = {
91
92
  pageSize?: number
92
93
  page?: number
93
94
  roleType?: globalRoleType
95
+ scope?: AuthScope
94
96
  }
95
97
 
96
98
  export type ListRolesResponse = {