@daocloud-proto/leopard 0.8.0-dev5 → 0.8.0-dev7

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.8.0-dev5",
3
+ "version":"0.8.0-dev7",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -5,6 +5,11 @@
5
5
  */
6
6
 
7
7
  import * as fm from "../fetch.pb"
8
+ import * as GoogleApiHttpbody from "../google/api/httpbody.pb"
9
+
10
+ export enum ExportTypes {
11
+ excel = "excel",
12
+ }
8
13
 
9
14
  export enum BillType {
10
15
  CONSUME = "CONSUME",
@@ -36,6 +41,23 @@ export enum ExpenseType {
36
41
  Refund = "Refund",
37
42
  }
38
43
 
44
+ export type ExportBillsReportRequest = {
45
+ start?: string
46
+ end?: string
47
+ exportType?: ExportTypes
48
+ billId?: string
49
+ orderId?: string
50
+ resourceId?: string
51
+ billingType?: string
52
+ productName?: string
53
+ username?: string
54
+ }
55
+
56
+ export type ExportMonthlyBillsReportRequest = {
57
+ billingMonth?: string
58
+ exportType?: ExportTypes
59
+ }
60
+
39
61
  export type ListBillsRequest = {
40
62
  start?: string
41
63
  end?: string
@@ -116,6 +138,7 @@ export type GetMonthlyBillsRequest = {
116
138
  export type GetMonthlyBillsResponse = {
117
139
  products?: ProductMonthlyBill[]
118
140
  users?: UserMonthlyBill[]
141
+ regions?: RegionMonthlyBill[]
119
142
  }
120
143
 
121
144
  export type RegionMonthlyBill = {
@@ -154,4 +177,10 @@ export class Bill {
154
177
  static GetMonthlyBills(req: GetMonthlyBillsRequest, initReq?: fm.InitReq): Promise<GetMonthlyBillsResponse> {
155
178
  return fm.fetchReq<GetMonthlyBillsRequest, GetMonthlyBillsResponse>(`/apis/leopard.io/v1alpha1/bills/monthly/${req["billingMonth"]}?${fm.renderURLSearchParams(req, ["billingMonth"])}`, {...initReq, method: "GET"})
156
179
  }
180
+ static ExportBills(req: ExportBillsReportRequest, initReq?: fm.InitReq): Promise<GoogleApiHttpbody.HttpBody> {
181
+ return fm.fetchReq<ExportBillsReportRequest, GoogleApiHttpbody.HttpBody>(`/apis/leopard.io/v1alpha1/export/bills?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
182
+ }
183
+ static ExportMonthlyBills(req: ExportMonthlyBillsReportRequest, initReq?: fm.InitReq): Promise<GoogleApiHttpbody.HttpBody> {
184
+ return fm.fetchReq<ExportMonthlyBillsReportRequest, GoogleApiHttpbody.HttpBody>(`/apis/leopard.io/v1alpha1/export/bills/monthly/${req["billingMonth"]}?${fm.renderURLSearchParams(req, ["billingMonth"])}`, {...initReq, method: "GET"})
185
+ }
157
186
  }
@@ -5,6 +5,11 @@
5
5
  */
6
6
 
7
7
  import * as fm from "../fetch.pb"
8
+ import * as GoogleApiHttpbody from "../google/api/httpbody.pb"
9
+
10
+ export enum ExportTypes {
11
+ excel = "excel",
12
+ }
8
13
 
9
14
  export enum TransactionType {
10
15
  Consume = "Consume",
@@ -23,6 +28,18 @@ export enum PaymentType {
23
28
  Expense = "Expense",
24
29
  }
25
30
 
31
+ export type ExportTransactionsRequest = {
32
+ start?: string
33
+ end?: string
34
+ exportType?: ExportTypes
35
+ serialNumber?: string
36
+ billingId?: string
37
+ paymentType?: string
38
+ transactionType?: string
39
+ transactionChannel?: string
40
+ username?: string
41
+ }
42
+
26
43
  export type ListTransactionsRequest = {
27
44
  start?: string
28
45
  end?: string
@@ -64,4 +81,7 @@ export class Transaction {
64
81
  static ListTransactions(req: ListTransactionsRequest, initReq?: fm.InitReq): Promise<ListTransactionsRequestResponse> {
65
82
  return fm.fetchReq<ListTransactionsRequest, ListTransactionsRequestResponse>(`/apis/leopard.io/v1alpha1/transactions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
66
83
  }
84
+ static ExportTransactions(req: ExportTransactionsRequest, initReq?: fm.InitReq): Promise<GoogleApiHttpbody.HttpBody> {
85
+ return fm.fetchReq<ExportTransactionsRequest, GoogleApiHttpbody.HttpBody>(`/apis/leopard.io/v1alpha1/export/transactions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
86
+ }
67
87
  }