@daocloud-proto/leopard 0.7.3 → 0.8.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 +33 -0
- package/v1alpha1/order.pb.ts +2 -0
- package/v1alpha1/product.pb.ts +7 -0
- package/v1alpha1/wallet.pb.ts +0 -24
package/package.json
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as fm from "../fetch.pb"
|
|
8
|
+
export type ListCurrentMembersRequest = {
|
|
9
|
+
page?: number
|
|
10
|
+
pageSize?: number
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type ListCurrentMembersResponse = {
|
|
14
|
+
items?: AccountInfo[]
|
|
15
|
+
pagination?: Pagination
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type AccountInfo = {
|
|
19
|
+
id?: string
|
|
20
|
+
name?: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type Pagination = {
|
|
24
|
+
total?: number
|
|
25
|
+
page?: number
|
|
26
|
+
pageSize?: number
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export class Account {
|
|
30
|
+
static ListCurrentMembers(req: ListCurrentMembersRequest, initReq?: fm.InitReq): Promise<ListCurrentMembersResponse> {
|
|
31
|
+
return fm.fetchReq<ListCurrentMembersRequest, ListCurrentMembersResponse>(`/apis/leopard.io/v1alpha1/accounts/current/members?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
32
|
+
}
|
|
33
|
+
}
|
package/v1alpha1/order.pb.ts
CHANGED
|
@@ -146,6 +146,7 @@ export type CreateNewPurchaseOrderRequest = {
|
|
|
146
146
|
userId?: string
|
|
147
147
|
orderItems?: OrderItem[]
|
|
148
148
|
renewMeteringAmount?: number
|
|
149
|
+
renewSkuId?: string
|
|
149
150
|
}
|
|
150
151
|
|
|
151
152
|
export type CreateNewPurchaseOrderResponse = {
|
|
@@ -231,6 +232,7 @@ export type CreateRenewOrderResponse = {
|
|
|
231
232
|
export type ChangeOrderRenewRequest = {
|
|
232
233
|
resourceId?: string
|
|
233
234
|
renewMeteringAmount?: number
|
|
235
|
+
renewSkuId?: string
|
|
234
236
|
}
|
|
235
237
|
|
|
236
238
|
export type ChangeOrderRenewResponse = {
|
package/v1alpha1/product.pb.ts
CHANGED
|
@@ -69,6 +69,7 @@ export type SkuItem = {
|
|
|
69
69
|
specName?: string
|
|
70
70
|
specFields?: SpecField[]
|
|
71
71
|
inventory?: number
|
|
72
|
+
meteringAmountsDiscounts?: MeteringAmountsDiscount[]
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
export type ListProductSKUsResponse = {
|
|
@@ -116,6 +117,12 @@ export type GetSKUResponse = {
|
|
|
116
117
|
specName?: string
|
|
117
118
|
specFields?: SpecField[]
|
|
118
119
|
inventory?: number
|
|
120
|
+
meteringAmountsDiscounts?: MeteringAmountsDiscount[]
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export type MeteringAmountsDiscount = {
|
|
124
|
+
meteringAmounts?: number
|
|
125
|
+
discountPercentage?: number
|
|
119
126
|
}
|
|
120
127
|
|
|
121
128
|
export type GetSKUPriceRequest = {
|
package/v1alpha1/wallet.pb.ts
CHANGED
|
@@ -86,27 +86,6 @@ export type CorporateTransferRechargeRequest = {
|
|
|
86
86
|
export type CorporateTransferRechargeResponse = {
|
|
87
87
|
}
|
|
88
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
|
-
|
|
110
89
|
export class Wallet {
|
|
111
90
|
static Balance(req: BalanceRequest, initReq?: fm.InitReq): Promise<BalanceResponse> {
|
|
112
91
|
return fm.fetchReq<BalanceRequest, BalanceResponse>(`/apis/leopard.io/v1alpha1/wallet/balance?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -123,9 +102,6 @@ export class Wallet {
|
|
|
123
102
|
static GetUserState(req: GetUserStateRequest, initReq?: fm.InitReq): Promise<GetUserStateResponse> {
|
|
124
103
|
return fm.fetchReq<GetUserStateRequest, GetUserStateResponse>(`/apis/leopard.io/v1alpha1/wallet/user-state?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
125
104
|
}
|
|
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
|
-
}
|
|
129
105
|
static UserState(req: UserStateRequest, initReq?: fm.InitReq): Promise<UserStateResponse> {
|
|
130
106
|
return fm.fetchReq<UserStateRequest, UserStateResponse>(`/v1alpha1.wallet.Wallet/UserState`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
131
107
|
}
|