@daocloud-proto/leopard 0.3.0 → 0.4.0-dev1
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/bill.pb.ts +55 -0
package/package.json
CHANGED
package/v1alpha1/bill.pb.ts
CHANGED
|
@@ -22,6 +22,11 @@ export enum UnitType {
|
|
|
22
22
|
PICTURE = "PICTURE",
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
export enum ExpenseType {
|
|
26
|
+
Consume = "Consume",
|
|
27
|
+
Refund = "Refund",
|
|
28
|
+
}
|
|
29
|
+
|
|
25
30
|
export type ListBillsRequest = {
|
|
26
31
|
start?: string
|
|
27
32
|
end?: string
|
|
@@ -73,8 +78,58 @@ export type Resource = {
|
|
|
73
78
|
id?: string
|
|
74
79
|
}
|
|
75
80
|
|
|
81
|
+
export type ListMonthlyBillsRequest = {
|
|
82
|
+
startMonth?: string
|
|
83
|
+
endMonth?: string
|
|
84
|
+
page?: number
|
|
85
|
+
pageSize?: number
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export type ListMonthlyBillsResponse = {
|
|
89
|
+
items?: MonthBillSummary[]
|
|
90
|
+
pagination?: Pagination
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export type MonthBillSummary = {
|
|
94
|
+
billingMonth?: string
|
|
95
|
+
orderPrice?: string
|
|
96
|
+
voucherPayment?: string
|
|
97
|
+
amountDue?: string
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export type GetMonthlyBillsRequest = {
|
|
101
|
+
billingMonth?: string
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export type GetMonthlyBillsResponse = {
|
|
105
|
+
products?: ProductMonthlyBill[]
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export type RegionMonthlyBill = {
|
|
109
|
+
billingMonth?: string
|
|
110
|
+
region?: string
|
|
111
|
+
orderPrice?: string
|
|
112
|
+
voucherPayment?: string
|
|
113
|
+
amountDue?: string
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export type ProductMonthlyBill = {
|
|
117
|
+
billingMonth?: string
|
|
118
|
+
product?: string
|
|
119
|
+
expenseType?: ExpenseType
|
|
120
|
+
orderPrice?: string
|
|
121
|
+
voucherPayment?: string
|
|
122
|
+
amountDue?: string
|
|
123
|
+
}
|
|
124
|
+
|
|
76
125
|
export class Bill {
|
|
77
126
|
static ListBills(req: ListBillsRequest, initReq?: fm.InitReq): Promise<ListBillsResponse> {
|
|
78
127
|
return fm.fetchReq<ListBillsRequest, ListBillsResponse>(`/apis/leopard.io/v1alpha1/bills?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
79
128
|
}
|
|
129
|
+
static ListMonthlyBills(req: ListMonthlyBillsRequest, initReq?: fm.InitReq): Promise<ListMonthlyBillsResponse> {
|
|
130
|
+
return fm.fetchReq<ListMonthlyBillsRequest, ListMonthlyBillsResponse>(`/apis/leopard.io/v1alpha1/bills/monthly?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
131
|
+
}
|
|
132
|
+
static GetMonthlyBills(req: GetMonthlyBillsRequest, initReq?: fm.InitReq): Promise<GetMonthlyBillsResponse> {
|
|
133
|
+
return fm.fetchReq<GetMonthlyBillsRequest, GetMonthlyBillsResponse>(`/apis/leopard.io/v1alpha1/bills/monthly/${req["billingMonth"]}?${fm.renderURLSearchParams(req, ["billingMonth"])}`, {...initReq, method: "GET"})
|
|
134
|
+
}
|
|
80
135
|
}
|