@daocloud-proto/ghippo 0.8.10 → 0.8.11

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.8.10",
3
+ "version":"0.8.11",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -61,14 +61,6 @@ export type ClearAuditRequest = {
61
61
  export type ClearAuditResponse = {
62
62
  }
63
63
 
64
- export type ExportAuditRequest = {
65
- days?: number
66
- }
67
-
68
- export type ExportAuditResponse = {
69
- csv?: string
70
- }
71
-
72
64
  export type CreateAuditRequest = {
73
65
  audit?: AuditInfo
74
66
  }
@@ -86,7 +78,4 @@ export class Audit {
86
78
  static ClearAudit(req: ClearAuditRequest, initReq?: fm.InitReq): Promise<ClearAuditResponse> {
87
79
  return fm.fetchReq<ClearAuditRequest, ClearAuditResponse>(`/apis/ghippo.io/v1alpha1/audits`, {...initReq, method: "DELETE"})
88
80
  }
89
- static ExportAudit(req: ExportAuditRequest, initReq?: fm.InitReq): Promise<ExportAuditResponse> {
90
- return fm.fetchReq<ExportAuditRequest, ExportAuditResponse>(`/apis/ghippo.io/v1alpha1/audits/export?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
91
- }
92
81
  }
@@ -36,6 +36,45 @@ export type GetUserResponse = {
36
36
  locale?: string
37
37
  }
38
38
 
39
+ export type ListSecretsRequest = {
40
+ }
41
+
42
+ export type ListSecretsResponse = {
43
+ items?: Secret[]
44
+ }
45
+
46
+ export type Secret = {
47
+ id?: string
48
+ secret?: string
49
+ enabled?: boolean
50
+ createdAt?: string
51
+ updatedAt?: string
52
+ lastUsedAt?: string
53
+ }
54
+
55
+ export type CreateSecretRequest = {
56
+ enabled?: boolean
57
+ }
58
+
59
+ export type CreateSecretResponse = {
60
+ id?: string
61
+ }
62
+
63
+ export type UpdateSecretRequest = {
64
+ id?: string
65
+ enabled?: boolean
66
+ }
67
+
68
+ export type UpdateSecretResponse = {
69
+ }
70
+
71
+ export type DeleteSecretRequest = {
72
+ id?: string
73
+ }
74
+
75
+ export type DeleteSecretResponse = {
76
+ }
77
+
39
78
  export class Account {
40
79
  static UpdateEmail(req: UpdateEmailRequest, initReq?: fm.InitReq): Promise<UpdateEmailResponse> {
41
80
  return fm.fetchReq<UpdateEmailRequest, UpdateEmailResponse>(`/apis/ghippo.io/v1alpha1/current-user/email`, {...initReq, method: "PUT", body: JSON.stringify(req)})
@@ -49,4 +88,16 @@ export class Account {
49
88
  static GetUser(req: GetUserRequest, initReq?: fm.InitReq): Promise<GetUserResponse> {
50
89
  return fm.fetchReq<GetUserRequest, GetUserResponse>(`/apis/ghippo.io/v1alpha1/current-user?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
51
90
  }
91
+ static ListSecrets(req: ListSecretsRequest, initReq?: fm.InitReq): Promise<ListSecretsResponse> {
92
+ return fm.fetchReq<ListSecretsRequest, ListSecretsResponse>(`/apis/ghippo.io/v1alpha1/current-user/secrets?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
93
+ }
94
+ static CreateSecret(req: CreateSecretRequest, initReq?: fm.InitReq): Promise<CreateSecretResponse> {
95
+ return fm.fetchReq<CreateSecretRequest, CreateSecretResponse>(`/apis/ghippo.io/v1alpha1/current-user/secrets`, {...initReq, method: "POST", body: JSON.stringify(req)})
96
+ }
97
+ static UpdateSecret(req: UpdateSecretRequest, initReq?: fm.InitReq): Promise<UpdateSecretResponse> {
98
+ return fm.fetchReq<UpdateSecretRequest, UpdateSecretResponse>(`/apis/ghippo.io/v1alpha1/current-user/secrets/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
99
+ }
100
+ static DeleteSecret(req: DeleteSecretRequest, initReq?: fm.InitReq): Promise<DeleteSecretResponse> {
101
+ return fm.fetchReq<DeleteSecretRequest, DeleteSecretResponse>(`/apis/ghippo.io/v1alpha1/current-user/secrets/${req["id"]}`, {...initReq, method: "DELETE"})
102
+ }
52
103
  }
@@ -0,0 +1,41 @@
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
+ export type CertsRequest = {
9
+ }
10
+
11
+ export type CertsResponse = {
12
+ keys?: Key[]
13
+ }
14
+
15
+ export type Key = {
16
+ kid?: string
17
+ kty?: string
18
+ alg?: string
19
+ e?: string
20
+ n?: string
21
+ use?: string
22
+ }
23
+
24
+ export type GetTokenRequest = {
25
+ ak?: string
26
+ sk?: string
27
+ cycle?: number
28
+ }
29
+
30
+ export type GetTokenResponse = {
31
+ token?: string
32
+ }
33
+
34
+ export class Openapi {
35
+ static Certs(req: CertsRequest, initReq?: fm.InitReq): Promise<CertsResponse> {
36
+ return fm.fetchReq<CertsRequest, CertsResponse>(`/apis/ghippo.io/v1alpha1/certs?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
37
+ }
38
+ static GetToken(req: GetTokenRequest, initReq?: fm.InitReq): Promise<GetTokenResponse> {
39
+ return fm.fetchReq<GetTokenRequest, GetTokenResponse>(`/apis/ghippo.io/v1alpha1/token?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
40
+ }
41
+ }
@@ -158,6 +158,49 @@ export type UpdateUserRolesRequest = {
158
158
  export type UpdateUserRolesResponse = {
159
159
  }
160
160
 
161
+ export type ListUserSecretsRequest = {
162
+ id?: string
163
+ }
164
+
165
+ export type ListUserSecretsResponse = {
166
+ items?: Secret[]
167
+ }
168
+
169
+ export type Secret = {
170
+ id?: string
171
+ secret?: string
172
+ enabled?: boolean
173
+ createdAt?: string
174
+ updatedAt?: string
175
+ lastUsedAt?: string
176
+ }
177
+
178
+ export type CreateUserSecretRequest = {
179
+ id?: string
180
+ enabled?: boolean
181
+ }
182
+
183
+ export type CreateUserSecretResponse = {
184
+ id?: string
185
+ }
186
+
187
+ export type UpdateUserSecretRequest = {
188
+ id?: string
189
+ sid?: string
190
+ enabled?: boolean
191
+ }
192
+
193
+ export type UpdateUserSecretResponse = {
194
+ }
195
+
196
+ export type DeleteUserSecretRequest = {
197
+ id?: string
198
+ sid?: string
199
+ }
200
+
201
+ export type DeleteUserSecretResponse = {
202
+ }
203
+
161
204
  export class Users {
162
205
  static ListUsers(req: ListUsersRequest, initReq?: fm.InitReq): Promise<ListUsersResponse> {
163
206
  return fm.fetchReq<ListUsersRequest, ListUsersResponse>(`/apis/ghippo.io/v1alpha1/users?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -192,4 +235,16 @@ export class Users {
192
235
  static UpdateUserRoles(req: UpdateUserRolesRequest, initReq?: fm.InitReq): Promise<UpdateUserRolesResponse> {
193
236
  return fm.fetchReq<UpdateUserRolesRequest, UpdateUserRolesResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/roles`, {...initReq, method: "PUT", body: JSON.stringify(req)})
194
237
  }
238
+ static ListUserSecrets(req: ListUserSecretsRequest, initReq?: fm.InitReq): Promise<ListUserSecretsResponse> {
239
+ return fm.fetchReq<ListUserSecretsRequest, ListUserSecretsResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/secrets?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
240
+ }
241
+ static CreateUserSecret(req: CreateUserSecretRequest, initReq?: fm.InitReq): Promise<CreateUserSecretResponse> {
242
+ return fm.fetchReq<CreateUserSecretRequest, CreateUserSecretResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/secrets`, {...initReq, method: "POST", body: JSON.stringify(req)})
243
+ }
244
+ static UpdateUserSecret(req: UpdateUserSecretRequest, initReq?: fm.InitReq): Promise<UpdateUserSecretResponse> {
245
+ return fm.fetchReq<UpdateUserSecretRequest, UpdateUserSecretResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/secrets/${req["sid"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
246
+ }
247
+ static DeleteUserSecret(req: DeleteUserSecretRequest, initReq?: fm.InitReq): Promise<DeleteUserSecretResponse> {
248
+ return fm.fetchReq<DeleteUserSecretRequest, DeleteUserSecretResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/secrets/${req["sid"]}`, {...initReq, method: "DELETE"})
249
+ }
195
250
  }