@daocloud-proto/leopard 0.15.1-rc1 → 0.16.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/accounts.pb.ts +24 -0
- package/v1alpha1/voucher.pb.ts +20 -0
package/package.json
CHANGED
package/v1alpha1/accounts.pb.ts
CHANGED
|
@@ -41,6 +41,27 @@ export type ListCurrentMembersResponse = {
|
|
|
41
41
|
pagination?: Pagination
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
export type ListAccountBalancesRequest = {
|
|
45
|
+
search?: string
|
|
46
|
+
sortField?: string
|
|
47
|
+
sortOrder?: string
|
|
48
|
+
page?: number
|
|
49
|
+
pageSize?: number
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export type ListAccountBalancesResponse = {
|
|
53
|
+
items?: AccountBalance[]
|
|
54
|
+
pagination?: Pagination
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type AccountBalance = {
|
|
58
|
+
userId?: string
|
|
59
|
+
username?: string
|
|
60
|
+
cashBalance?: string
|
|
61
|
+
voucherBalance?: string
|
|
62
|
+
totalAmount?: string
|
|
63
|
+
}
|
|
64
|
+
|
|
44
65
|
export type AccountInfo = {
|
|
45
66
|
id?: string
|
|
46
67
|
name?: string
|
|
@@ -68,6 +89,9 @@ export class Accounts {
|
|
|
68
89
|
static ListSubAccounts(req: ListSubAccountsRequest, initReq?: fm.InitReq): Promise<ListSubAccountsResponse> {
|
|
69
90
|
return fm.fetchReq<ListSubAccountsRequest, ListSubAccountsResponse>(`/apis/leopard.io/v1alpha1/accounts?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
70
91
|
}
|
|
92
|
+
static ListAccountBalances(req: ListAccountBalancesRequest, initReq?: fm.InitReq): Promise<ListAccountBalancesResponse> {
|
|
93
|
+
return fm.fetchReq<ListAccountBalancesRequest, ListAccountBalancesResponse>(`/apis/leopard.io/v1alpha1/accounts/balances?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
94
|
+
}
|
|
71
95
|
static GetExportURL(req: GetExportURLRequest, initReq?: fm.InitReq): Promise<GetExportURLResponse> {
|
|
72
96
|
return fm.fetchReq<GetExportURLRequest, GetExportURLResponse>(`/apis/leopard.io/v1alpha1/export/url?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
73
97
|
}
|
package/v1alpha1/voucher.pb.ts
CHANGED
|
@@ -39,6 +39,13 @@ export type ListExpiredVouchersByCurrentUserRequest = {
|
|
|
39
39
|
pageSize?: number
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
export type ListVouchersRequest = {
|
|
43
|
+
voucherId?: string
|
|
44
|
+
status?: string
|
|
45
|
+
page?: number
|
|
46
|
+
pageSize?: number
|
|
47
|
+
}
|
|
48
|
+
|
|
42
49
|
export type ListVouchersResponse = {
|
|
43
50
|
items?: VoucherInfo[]
|
|
44
51
|
pagination?: Pagination
|
|
@@ -61,12 +68,19 @@ export type VoucherInfo = {
|
|
|
61
68
|
orderTypes?: string[]
|
|
62
69
|
effectTimestamp?: string
|
|
63
70
|
expireTimestamp?: string
|
|
71
|
+
userId?: string
|
|
72
|
+
username?: string
|
|
64
73
|
}
|
|
65
74
|
|
|
66
75
|
export type ActivateVoucherRequest = {
|
|
67
76
|
voucherId?: string
|
|
68
77
|
}
|
|
69
78
|
|
|
79
|
+
export type ActivateVoucherForUserRequest = {
|
|
80
|
+
voucherId?: string
|
|
81
|
+
userId?: string
|
|
82
|
+
}
|
|
83
|
+
|
|
70
84
|
export type ActivateVoucherResponse = {
|
|
71
85
|
}
|
|
72
86
|
|
|
@@ -102,12 +116,18 @@ export class Voucher {
|
|
|
102
116
|
static ActivateVoucher(req: ActivateVoucherRequest, initReq?: fm.InitReq): Promise<ActivateVoucherResponse> {
|
|
103
117
|
return fm.fetchReq<ActivateVoucherRequest, ActivateVoucherResponse>(`/apis/leopard.io/v1alpha1/vouchers/activate`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
104
118
|
}
|
|
119
|
+
static ActivateVoucherForUser(req: ActivateVoucherForUserRequest, initReq?: fm.InitReq): Promise<ActivateVoucherResponse> {
|
|
120
|
+
return fm.fetchReq<ActivateVoucherForUserRequest, ActivateVoucherResponse>(`/apis/leopard.io/v1alpha1/vouchers/activate-for-user`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
121
|
+
}
|
|
105
122
|
static ListActiveVouchersByCurrentUser(req: ListActiveVouchersByCurrentUserRequest, initReq?: fm.InitReq): Promise<ListVouchersResponse> {
|
|
106
123
|
return fm.fetchReq<ListActiveVouchersByCurrentUserRequest, ListVouchersResponse>(`/apis/leopard.io/v1alpha1/vouchers/active?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
107
124
|
}
|
|
108
125
|
static ListExpiredVouchersByCurrentUser(req: ListExpiredVouchersByCurrentUserRequest, initReq?: fm.InitReq): Promise<ListVouchersResponse> {
|
|
109
126
|
return fm.fetchReq<ListExpiredVouchersByCurrentUserRequest, ListVouchersResponse>(`/apis/leopard.io/v1alpha1/vouchers/expired?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
110
127
|
}
|
|
128
|
+
static ListVouchers(req: ListVouchersRequest, initReq?: fm.InitReq): Promise<ListVouchersResponse> {
|
|
129
|
+
return fm.fetchReq<ListVouchersRequest, ListVouchersResponse>(`/apis/leopard.io/v1alpha1/vouchers?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
130
|
+
}
|
|
111
131
|
static GetVoucherStatByCurrentUser(req: GetVoucherStatByCurrentUserRequest, initReq?: fm.InitReq): Promise<GetVoucherStatByCurrentUserResponse> {
|
|
112
132
|
return fm.fetchReq<GetVoucherStatByCurrentUserRequest, GetVoucherStatByCurrentUserResponse>(`/apis/leopard.io/v1alpha1/vouchers/stat?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
113
133
|
}
|