@daocloud-proto/leopard 0.1.0-dev16 → 0.1.0-dev18
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 +2 -1
- package/v1alpha1/product.pb.ts +2 -0
- package/v1alpha1/wallet.pb.ts +11 -0
package/package.json
CHANGED
package/v1alpha1/inventory.pb.ts
CHANGED
|
@@ -27,6 +27,7 @@ export type resource = {
|
|
|
27
27
|
specFieldValue?: string
|
|
28
28
|
total?: number
|
|
29
29
|
free?: number
|
|
30
|
+
serial?: string
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
export type UpdateInventoryResponse = {
|
|
@@ -34,6 +35,6 @@ export type UpdateInventoryResponse = {
|
|
|
34
35
|
|
|
35
36
|
export class Inventory {
|
|
36
37
|
static UpdateInventory(req: UpdateInventoryRequest, initReq?: fm.InitReq): Promise<UpdateInventoryResponse> {
|
|
37
|
-
return fm.fetchReq<UpdateInventoryRequest, UpdateInventoryResponse>(`/
|
|
38
|
+
return fm.fetchReq<UpdateInventoryRequest, UpdateInventoryResponse>(`/v1alpha1.inventory.Inventory/UpdateInventory`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
38
39
|
}
|
|
39
40
|
}
|
package/v1alpha1/product.pb.ts
CHANGED
|
@@ -50,6 +50,7 @@ export type SkuItem = {
|
|
|
50
50
|
specId?: number
|
|
51
51
|
specName?: string
|
|
52
52
|
specFields?: SpecField[]
|
|
53
|
+
inventory?: number
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
export type ListProductSKUsResponse = {
|
|
@@ -91,6 +92,7 @@ export type GetSKUResponse = {
|
|
|
91
92
|
specId?: number
|
|
92
93
|
specName?: string
|
|
93
94
|
specFields?: SpecField[]
|
|
95
|
+
inventory?: number
|
|
94
96
|
}
|
|
95
97
|
|
|
96
98
|
export type GetSKUPriceRequest = {
|
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
|
}
|