@daocloud-proto/leopard 0.1.0-dev16 → 0.1.0-dev17
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/inventory.pb.ts +1 -0
- package/v1alpha1/wallet.pb.ts +11 -0
package/package.json
CHANGED
package/v1alpha1/inventory.pb.ts
CHANGED
package/v1alpha1/wallet.pb.ts
CHANGED
|
@@ -35,6 +35,14 @@ export type RechargeResponse = {
|
|
|
35
35
|
redirectUrl?: string
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
export type InDebtRequest = {
|
|
39
|
+
userId?: string
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type InDebtResponse = {
|
|
43
|
+
inDebt?: boolean
|
|
44
|
+
}
|
|
45
|
+
|
|
38
46
|
export class Wallet {
|
|
39
47
|
static Balance(req: BalanceRequest, initReq?: fm.InitReq): Promise<BalanceResponse> {
|
|
40
48
|
return fm.fetchReq<BalanceRequest, BalanceResponse>(`/apis/leopard.io/v1alpha1/wallet/balance?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -42,4 +50,7 @@ export class Wallet {
|
|
|
42
50
|
static Recharge(req: RechargeRequest, initReq?: fm.InitReq): Promise<RechargeResponse> {
|
|
43
51
|
return fm.fetchReq<RechargeRequest, RechargeResponse>(`/apis/leopard.io/v1alpha1/wallet/recharge`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
44
52
|
}
|
|
53
|
+
static InDebt(req: InDebtRequest, initReq?: fm.InitReq): Promise<InDebtResponse> {
|
|
54
|
+
return fm.fetchReq<InDebtRequest, InDebtResponse>(`/v1alpha1.wallet.Wallet/InDebt`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
55
|
+
}
|
|
45
56
|
}
|