@daocloud-proto/ghippo 0.49.2 → 0.50.0-dev1

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.49.2",
3
+ "version":"0.50.0-dev1",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -239,7 +239,27 @@ export type ListConciseSubAccountsWithoutTokenResponse = {
239
239
  pagination?: Pagination
240
240
  }
241
241
 
242
+ export type ListAccountsRequest = {
243
+ search?: string
244
+ pageSize?: number
245
+ page?: number
246
+ }
247
+
248
+ export type ListAccountsResponse = {
249
+ items?: Account[]
250
+ pagination?: Pagination
251
+ }
252
+
253
+ export type Account = {
254
+ id?: string
255
+ username?: string
256
+ hasSubAccount?: boolean
257
+ }
258
+
242
259
  export class Accounts {
260
+ static ListAccounts(req: ListAccountsRequest, initReq?: fm.InitReq): Promise<ListAccountsResponse> {
261
+ return fm.fetchReq<ListAccountsRequest, ListAccountsResponse>(`/v1alpha1.account.Accounts/ListAccounts`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
262
+ }
243
263
  static TransferToMainAccount(req: TransferToMainAccountRequest, initReq?: fm.InitReq): Promise<TransferToMainAccountResponse> {
244
264
  return fm.fetchReq<TransferToMainAccountRequest, TransferToMainAccountResponse>(`/apis/ghippo.io/v1alpha1/accounts/transfer-main`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
245
265
  }