@daocloud-proto/leopard 0.15.0-rc1 → 0.15.0

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.15.0-rc1",
3
+ "version":"0.15.0",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -74,6 +74,16 @@ export type ListBillsRequest = {
74
74
  billingTimeEnd?: string
75
75
  }
76
76
 
77
+ export type QueryBillsRequest = {
78
+ start?: string
79
+ end?: string
80
+ page?: number
81
+ pageSize?: number
82
+ userId?: string[]
83
+ skuId?: string[]
84
+ productName?: string[]
85
+ }
86
+
77
87
  export type ListBillsResponse = {
78
88
  items?: bill[]
79
89
  pagination?: Pagination
@@ -123,6 +133,7 @@ export type bill = {
123
133
  discountPrice?: string
124
134
  discountRuleName?: string
125
135
  discountRate?: string
136
+ skuId?: string
126
137
  }
127
138
 
128
139
  export type BillingCycle = {
@@ -207,6 +218,9 @@ export class Bill {
207
218
  static ListBills(req: ListBillsRequest, initReq?: fm.InitReq): Promise<ListBillsResponse> {
208
219
  return fm.fetchReq<ListBillsRequest, ListBillsResponse>(`/apis/leopard.io/v1alpha1/bills?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
209
220
  }
221
+ static QueryBills(req: QueryBillsRequest, initReq?: fm.InitReq): Promise<ListBillsResponse> {
222
+ return fm.fetchReq<QueryBillsRequest, ListBillsResponse>(`/apis/leopard.io/v1alpha1/bills/query`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
223
+ }
210
224
  static GetAccountBillAggregation(req: GetAccountBillAggregationRequest, initReq?: fm.InitReq): Promise<GetAccountBillAggregationResponse> {
211
225
  return fm.fetchReq<GetAccountBillAggregationRequest, GetAccountBillAggregationResponse>(`/apis/leopard.io/v1alpha1/bills/aggregation?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
212
226
  }