@daocloud-proto/ghippo 0.7.16 → 0.7.18

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.16",
3
+ "version":"0.7.18",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -0,0 +1,99 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as fm from "../fetch.pb"
8
+
9
+ export enum StatusType {
10
+ all = "all",
11
+ succeeded = "succeeded",
12
+ failed = "failed",
13
+ }
14
+
15
+ export enum TimeType {
16
+ day = "day",
17
+ hour = "hour",
18
+ minute = "minute",
19
+ }
20
+
21
+ export type ListAuditRequest = {
22
+ source?: string
23
+ type?: string
24
+ status?: StatusType
25
+ search?: string
26
+ timeType?: TimeType
27
+ timeCount?: number
28
+ page?: number
29
+ pageSize?: number
30
+ }
31
+
32
+ export type ListAuditResponse = {
33
+ items?: AuditInfo[]
34
+ pagination?: Pagination
35
+ }
36
+
37
+ export type AuditInfo = {
38
+ id?: number
39
+ auditName?: string
40
+ source?: string
41
+ resourceType?: string
42
+ resourceName?: string
43
+ status?: StatusType
44
+ user?: string
45
+ client?: string
46
+ ip?: string
47
+ createdAt?: string
48
+ }
49
+
50
+ export type Pagination = {
51
+ total?: number
52
+ page?: number
53
+ pageSize?: number
54
+ }
55
+
56
+ export type GetAuditRequest = {
57
+ id?: number
58
+ }
59
+
60
+ export type GetAuditResponse = {
61
+ audit?: string
62
+ }
63
+
64
+ export type ClearAuditRequest = {
65
+ days?: number
66
+ }
67
+
68
+ export type ClearAuditResponse = {
69
+ }
70
+
71
+ export type ExportAuditRequest = {
72
+ days?: number
73
+ }
74
+
75
+ export type ExportAuditResponse = {
76
+ csv?: string
77
+ }
78
+
79
+ export type CreateAuditRequest = {
80
+ audit?: AuditInfo
81
+ }
82
+
83
+ export type CreateAuditResponse = {
84
+ }
85
+
86
+ export class Audit {
87
+ static ListAudit(req: ListAuditRequest, initReq?: fm.InitReq): Promise<ListAuditResponse> {
88
+ return fm.fetchReq<ListAuditRequest, ListAuditResponse>(`/apis/ghippo.io/v1alpha1/audits?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
89
+ }
90
+ static GetAudit(req: GetAuditRequest, initReq?: fm.InitReq): Promise<GetAuditResponse> {
91
+ return fm.fetchReq<GetAuditRequest, GetAuditResponse>(`/apis/ghippo.io/v1alpha1/audits/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
92
+ }
93
+ static ClearAudit(req: ClearAuditRequest, initReq?: fm.InitReq): Promise<ClearAuditResponse> {
94
+ return fm.fetchReq<ClearAuditRequest, ClearAuditResponse>(`/apis/ghippo.io/v1alpha1/audits`, {...initReq, method: "DELETE"})
95
+ }
96
+ static ExportAudit(req: ExportAuditRequest, initReq?: fm.InitReq): Promise<ExportAuditResponse> {
97
+ return fm.fetchReq<ExportAuditRequest, ExportAuditResponse>(`/apis/ghippo.io/v1alpha1/audits/export?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
98
+ }
99
+ }