@daocloud-proto/ghippo 0.42.0-dev1 → 0.42.0-dev11

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.42.0-dev1",
3
+ "version":"0.42.0-dev11",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -183,6 +183,19 @@ export type SSHKey = {
183
183
  expiredAt?: string
184
184
  }
185
185
 
186
+ export type CheckSubAccountRequest = {
187
+ accountId?: string
188
+ accountName?: string
189
+ }
190
+
191
+ export type CheckSubAccountResponse = {
192
+ isSubAccount?: boolean
193
+ }
194
+
195
+ export type GetSubAccountByUsernameRequest = {
196
+ username?: string
197
+ }
198
+
186
199
  export class Accounts {
187
200
  static TransferToMainAccount(req: TransferToMainAccountRequest, initReq?: fm.InitReq): Promise<TransferToMainAccountResponse> {
188
201
  return fm.fetchReq<TransferToMainAccountRequest, TransferToMainAccountResponse>(`/apis/ghippo.io/v1alpha1/accounts/transfer-main`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
@@ -190,6 +203,12 @@ export class Accounts {
190
203
  static ListSubAccounts(req: ListSubAccountsRequest, initReq?: fm.InitReq): Promise<ListSubAccountsResponse> {
191
204
  return fm.fetchReq<ListSubAccountsRequest, ListSubAccountsResponse>(`/apis/ghippo.io/v1alpha1/sub-accounts?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
192
205
  }
206
+ static CheckSubAccount(req: CheckSubAccountRequest, initReq?: fm.InitReq): Promise<CheckSubAccountResponse> {
207
+ return fm.fetchReq<CheckSubAccountRequest, CheckSubAccountResponse>(`/v1alpha1.account.Accounts/CheckSubAccount`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
208
+ }
209
+ static GetSubAccountByUsername(req: GetSubAccountByUsernameRequest, initReq?: fm.InitReq): Promise<GetSubAccountResponse> {
210
+ return fm.fetchReq<GetSubAccountByUsernameRequest, GetSubAccountResponse>(`/v1alpha1.account.Accounts/GetSubAccountByUsername`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
211
+ }
193
212
  static GetSubAccount(req: GetSubAccountRequest, initReq?: fm.InitReq): Promise<GetSubAccountResponse> {
194
213
  return fm.fetchReq<GetSubAccountRequest, GetSubAccountResponse>(`/apis/ghippo.io/v1alpha1/sub-accounts/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
195
214
  }
@@ -29,6 +29,34 @@ export type Pagination = {
29
29
  pageSize?: number
30
30
  }
31
31
 
32
+ export type ListCSPAuditsRequest = {
33
+ accountName?: string
34
+ start?: string
35
+ end?: string
36
+ gproduct?: string
37
+ resourceType?: string
38
+ resourceName?: string
39
+ verb?: string
40
+ page?: number
41
+ pageSize?: number
42
+ }
43
+
44
+ export type ListCSPAuditsResponse = {
45
+ items?: CSPAuditInfo[]
46
+ pagination?: Pagination
47
+ }
48
+
49
+ export type CSPAuditInfo = {
50
+ createdAt?: string
51
+ resourceType?: string
52
+ resourceName?: string
53
+ gproduct?: string
54
+ verb?: string
55
+ operator?: string
56
+ ip?: string
57
+ status?: StatusType
58
+ }
59
+
32
60
  export type GetAutoClearAuditTimeRequest = {
33
61
  }
34
62
 
@@ -100,4 +128,7 @@ export class Audit {
100
128
  static GetAuditResourceReport(req: GetAuditResourceReportRequest, initReq?: fm.InitReq): Promise<GetAuditResourceReportResponse> {
101
129
  return fm.fetchReq<GetAuditResourceReportRequest, GetAuditResourceReportResponse>(`/apis/ghippo.io/v1alpha1/audits/reports/resources?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
102
130
  }
131
+ static ListCSPAudits(req: ListCSPAuditsRequest, initReq?: fm.InitReq): Promise<ListCSPAuditsResponse> {
132
+ return fm.fetchReq<ListCSPAuditsRequest, ListCSPAuditsResponse>(`/apis/ghippo.io/v1alpha1/csp-audits?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
133
+ }
103
134
  }
@@ -66,6 +66,14 @@ export enum CertifyType {
66
66
  WeChat = "WeChat",
67
67
  }
68
68
 
69
+ export type UpdateUserFirstAndLastNameRequest = {
70
+ firstname?: string
71
+ lastname?: string
72
+ }
73
+
74
+ export type UpdateUserFirstAndLastNameResponse = {
75
+ }
76
+
69
77
  export type UpdateEmailRequest = {
70
78
  email?: string
71
79
  }
@@ -101,6 +109,11 @@ export type GetUserResponse = {
101
109
  hasCertified?: boolean
102
110
  isMainAccount?: boolean
103
111
  isSubAccount?: boolean
112
+ firstname?: string
113
+ lastname?: string
114
+ mainAccountId?: string
115
+ mainAccountName?: string
116
+ mainAccountWorkspace?: string
104
117
  }
105
118
 
106
119
  export type ListAccessTokensRequest = {
@@ -248,6 +261,9 @@ export class Account {
248
261
  static UpdateLanguage(req: UpdateLanguageRequest, initReq?: fm.InitReq): Promise<UpdateLanguageResponse> {
249
262
  return fm.fetchReq<UpdateLanguageRequest, UpdateLanguageResponse>(`/apis/ghippo.io/v1alpha1/current-user/language`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
250
263
  }
264
+ static UpdateUserFirstAndLastName(req: UpdateUserFirstAndLastNameRequest, initReq?: fm.InitReq): Promise<UpdateUserFirstAndLastNameResponse> {
265
+ return fm.fetchReq<UpdateUserFirstAndLastNameRequest, UpdateUserFirstAndLastNameResponse>(`/apis/ghippo.io/v1alpha1/current-user/name`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
266
+ }
251
267
  static GetUser(req: GetUserRequest, initReq?: fm.InitReq): Promise<GetUserResponse> {
252
268
  return fm.fetchReq<GetUserRequest, GetUserResponse>(`/apis/ghippo.io/v1alpha1/current-user?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
253
269
  }
@@ -0,0 +1,29 @@
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 GetDomainDetailRequest = {
9
+ name?: string
10
+ }
11
+
12
+ export type GetDomainDetailResponse = {
13
+ name?: string
14
+ alipay?: Alipay
15
+ }
16
+
17
+ export type Alipay = {
18
+ appId?: string
19
+ appPrivateKey?: string
20
+ alipayPublicKey?: string
21
+ isProduction?: boolean
22
+ subject?: string
23
+ }
24
+
25
+ export class Domain {
26
+ static GetDomainDetail(req: GetDomainDetailRequest, initReq?: fm.InitReq): Promise<GetDomainDetailResponse> {
27
+ return fm.fetchReq<GetDomainDetailRequest, GetDomainDetailResponse>(`/apis/leopard.io/v1alpha1/domain/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
28
+ }
29
+ }
@@ -26,6 +26,7 @@ export type SendTemplateSmsRequest = {
26
26
  templateCode?: string
27
27
  templateVars?: {[key: string]: string}
28
28
  username?: string
29
+ domain?: string
29
30
  }
30
31
 
31
32
  export type SendTemplateSmsResponse = {