@daocloud-proto/ghippo 0.9.5 → 0.9.6

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.9.5",
3
+ "version":"0.9.6",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -55,6 +55,8 @@ export type GetAuditResponse = {
55
55
  }
56
56
 
57
57
  export type ClearAuditRequest = {
58
+ isKube?: boolean
59
+ isAuto?: boolean
58
60
  days?: number
59
61
  }
60
62
 
@@ -86,7 +88,7 @@ export class Audit {
86
88
  return fm.fetchReq<GetAuditRequest, GetAuditResponse>(`/apis/ghippo.io/v1alpha1/audits/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
87
89
  }
88
90
  static ClearAudit(req: ClearAuditRequest, initReq?: fm.InitReq): Promise<ClearAuditResponse> {
89
- return fm.fetchReq<ClearAuditRequest, ClearAuditResponse>(`/apis/ghippo.io/v1alpha1/audits/${req["days"]}`, {...initReq, method: "DELETE"})
91
+ return fm.fetchReq<ClearAuditRequest, ClearAuditResponse>(`/apis/ghippo.io/v1alpha1/audits/clear`, {...initReq, method: "POST", body: JSON.stringify(req)})
90
92
  }
91
93
  static ExportAuditUrl(req: ExportAuditUrlRequest, initReq?: fm.InitReq): Promise<ExportAuditUrlResponse> {
92
94
  return fm.fetchReq<ExportAuditUrlRequest, ExportAuditUrlResponse>(`/apis/ghippo.io/v1alpha1/audits/export?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})