@daocloud-proto/leopard 0.7.1-rc1 → 0.7.2-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/leopard",
3
- "version":"0.7.1-rc1",
3
+ "version":"0.7.2-dev1",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -116,6 +116,12 @@ export type GetSKUResponse = {
116
116
  specName?: string
117
117
  specFields?: SpecField[]
118
118
  inventory?: number
119
+ meteringAmountsDiscounts?: MeteringAmountsDiscount[]
120
+ }
121
+
122
+ export type MeteringAmountsDiscount = {
123
+ meteringAmounts?: number
124
+ discountPercentage?: number
119
125
  }
120
126
 
121
127
  export type GetSKUPriceRequest = {
@@ -43,6 +43,7 @@ export type UserStateRequest = {
43
43
  export type UserStateResponse = {
44
44
  amount?: string
45
45
  isVerified?: boolean
46
+ isMain?: boolean
46
47
  }
47
48
 
48
49
  export type GetUserStateRequest = {
@@ -52,6 +53,7 @@ export type GetUserStateResponse = {
52
53
  isVerified?: boolean
53
54
  isMain?: boolean
54
55
  permissions?: string[]
56
+ enableSub?: boolean
55
57
  }
56
58
 
57
59
  export type ReceivingBankInfo = {
@@ -84,6 +86,27 @@ export type CorporateTransferRechargeRequest = {
84
86
  export type CorporateTransferRechargeResponse = {
85
87
  }
86
88
 
89
+ export type ListSubAccountsRequest = {
90
+ page?: number
91
+ pageSize?: number
92
+ }
93
+
94
+ export type ListSubAccountsResponse = {
95
+ items?: SubAccount[]
96
+ pagination?: Pagination
97
+ }
98
+
99
+ export type SubAccount = {
100
+ id?: string
101
+ name?: string
102
+ }
103
+
104
+ export type Pagination = {
105
+ total?: number
106
+ page?: number
107
+ pageSize?: number
108
+ }
109
+
87
110
  export class Wallet {
88
111
  static Balance(req: BalanceRequest, initReq?: fm.InitReq): Promise<BalanceResponse> {
89
112
  return fm.fetchReq<BalanceRequest, BalanceResponse>(`/apis/leopard.io/v1alpha1/wallet/balance?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -100,6 +123,9 @@ export class Wallet {
100
123
  static GetUserState(req: GetUserStateRequest, initReq?: fm.InitReq): Promise<GetUserStateResponse> {
101
124
  return fm.fetchReq<GetUserStateRequest, GetUserStateResponse>(`/apis/leopard.io/v1alpha1/wallet/user-state?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
102
125
  }
126
+ static ListSubAccounts(req: ListSubAccountsRequest, initReq?: fm.InitReq): Promise<ListSubAccountsResponse> {
127
+ return fm.fetchReq<ListSubAccountsRequest, ListSubAccountsResponse>(`/apis/leopard.io/v1alpha1/wallet/sub-accounts?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
128
+ }
103
129
  static UserState(req: UserStateRequest, initReq?: fm.InitReq): Promise<UserStateResponse> {
104
130
  return fm.fetchReq<UserStateRequest, UserStateResponse>(`/v1alpha1.wallet.Wallet/UserState`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
105
131
  }