@daocloud-proto/ghippo 0.42.0-dev1 → 0.42.0-dev2
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 +1 -1
- package/v1alpha1/account.pb.ts +12 -0
- package/v1alpha1/currentuser.pb.ts +13 -0
package/package.json
CHANGED
package/v1alpha1/account.pb.ts
CHANGED
|
@@ -183,6 +183,15 @@ 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
|
+
|
|
186
195
|
export class Accounts {
|
|
187
196
|
static TransferToMainAccount(req: TransferToMainAccountRequest, initReq?: fm.InitReq): Promise<TransferToMainAccountResponse> {
|
|
188
197
|
return fm.fetchReq<TransferToMainAccountRequest, TransferToMainAccountResponse>(`/apis/ghippo.io/v1alpha1/accounts/transfer-main`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
@@ -190,6 +199,9 @@ export class Accounts {
|
|
|
190
199
|
static ListSubAccounts(req: ListSubAccountsRequest, initReq?: fm.InitReq): Promise<ListSubAccountsResponse> {
|
|
191
200
|
return fm.fetchReq<ListSubAccountsRequest, ListSubAccountsResponse>(`/apis/ghippo.io/v1alpha1/sub-accounts?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
192
201
|
}
|
|
202
|
+
static CheckSubAccount(req: CheckSubAccountRequest, initReq?: fm.InitReq): Promise<CheckSubAccountResponse> {
|
|
203
|
+
return fm.fetchReq<CheckSubAccountRequest, CheckSubAccountResponse>(`/v1alpha1.account.Accounts/CheckSubAccount`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
204
|
+
}
|
|
193
205
|
static GetSubAccount(req: GetSubAccountRequest, initReq?: fm.InitReq): Promise<GetSubAccountResponse> {
|
|
194
206
|
return fm.fetchReq<GetSubAccountRequest, GetSubAccountResponse>(`/apis/ghippo.io/v1alpha1/sub-accounts/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
195
207
|
}
|
|
@@ -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,8 @@ export type GetUserResponse = {
|
|
|
101
109
|
hasCertified?: boolean
|
|
102
110
|
isMainAccount?: boolean
|
|
103
111
|
isSubAccount?: boolean
|
|
112
|
+
firstname?: string
|
|
113
|
+
lastname?: string
|
|
104
114
|
}
|
|
105
115
|
|
|
106
116
|
export type ListAccessTokensRequest = {
|
|
@@ -248,6 +258,9 @@ export class Account {
|
|
|
248
258
|
static UpdateLanguage(req: UpdateLanguageRequest, initReq?: fm.InitReq): Promise<UpdateLanguageResponse> {
|
|
249
259
|
return fm.fetchReq<UpdateLanguageRequest, UpdateLanguageResponse>(`/apis/ghippo.io/v1alpha1/current-user/language`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
250
260
|
}
|
|
261
|
+
static UpdateUserFirstAndLastName(req: UpdateUserFirstAndLastNameRequest, initReq?: fm.InitReq): Promise<UpdateUserFirstAndLastNameResponse> {
|
|
262
|
+
return fm.fetchReq<UpdateUserFirstAndLastNameRequest, UpdateUserFirstAndLastNameResponse>(`/apis/ghippo.io/v1alpha1/current-user/name`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
263
|
+
}
|
|
251
264
|
static GetUser(req: GetUserRequest, initReq?: fm.InitReq): Promise<GetUserResponse> {
|
|
252
265
|
return fm.fetchReq<GetUserRequest, GetUserResponse>(`/apis/ghippo.io/v1alpha1/current-user?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
253
266
|
}
|