@daocloud-proto/leopard 0.8.0-dev6 → 0.8.0-dev8
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 +26 -0
- package/v1alpha1/export.pb.ts +67 -0
- package/v1alpha1/order.pb.ts +16 -0
- package/v1alpha1/transaction.pb.ts +15 -0
package/package.json
CHANGED
package/v1alpha1/bill.pb.ts
CHANGED
|
@@ -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,20 @@ export enum ExpenseType {
|
|
|
36
41
|
Refund = "Refund",
|
|
37
42
|
}
|
|
38
43
|
|
|
44
|
+
export type ExportBillsReportRequest = {
|
|
45
|
+
accountId?: string
|
|
46
|
+
productName?: string
|
|
47
|
+
start?: string
|
|
48
|
+
end?: string
|
|
49
|
+
exportType?: ExportTypes
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export type ExportMonthlyBillsReportRequest = {
|
|
53
|
+
startMonth?: string
|
|
54
|
+
endMonth?: string
|
|
55
|
+
exportType?: ExportTypes
|
|
56
|
+
}
|
|
57
|
+
|
|
39
58
|
export type ListBillsRequest = {
|
|
40
59
|
start?: string
|
|
41
60
|
end?: string
|
|
@@ -116,6 +135,7 @@ export type GetMonthlyBillsRequest = {
|
|
|
116
135
|
export type GetMonthlyBillsResponse = {
|
|
117
136
|
products?: ProductMonthlyBill[]
|
|
118
137
|
users?: UserMonthlyBill[]
|
|
138
|
+
regions?: RegionMonthlyBill[]
|
|
119
139
|
}
|
|
120
140
|
|
|
121
141
|
export type RegionMonthlyBill = {
|
|
@@ -154,4 +174,10 @@ export class Bill {
|
|
|
154
174
|
static GetMonthlyBills(req: GetMonthlyBillsRequest, initReq?: fm.InitReq): Promise<GetMonthlyBillsResponse> {
|
|
155
175
|
return fm.fetchReq<GetMonthlyBillsRequest, GetMonthlyBillsResponse>(`/apis/leopard.io/v1alpha1/bills/monthly/${req["billingMonth"]}?${fm.renderURLSearchParams(req, ["billingMonth"])}`, {...initReq, method: "GET"})
|
|
156
176
|
}
|
|
177
|
+
static ExportBills(req: ExportBillsReportRequest, initReq?: fm.InitReq): Promise<GoogleApiHttpbody.HttpBody> {
|
|
178
|
+
return fm.fetchReq<ExportBillsReportRequest, GoogleApiHttpbody.HttpBody>(`/apis/leopard.io/v1alpha1/export/bills?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
179
|
+
}
|
|
180
|
+
static ExportMonthlyBills(req: ExportMonthlyBillsReportRequest, initReq?: fm.InitReq): Promise<GoogleApiHttpbody.HttpBody> {
|
|
181
|
+
return fm.fetchReq<ExportMonthlyBillsReportRequest, GoogleApiHttpbody.HttpBody>(`/apis/leopard.io/v1alpha1/export/bills/monthly?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
182
|
+
}
|
|
157
183
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
import * as GoogleApiHttpbody from "../google/api/httpbody.pb"
|
|
9
|
+
|
|
10
|
+
export enum ExportTypes {
|
|
11
|
+
excel = "excel",
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export enum Account_Type {
|
|
15
|
+
all_accounts = "all_accounts",
|
|
16
|
+
main_account = "main_account",
|
|
17
|
+
sub_account = "sub_account",
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export enum GproductType {
|
|
21
|
+
all_gproduct = "all_gproduct",
|
|
22
|
+
zestu = "zestu",
|
|
23
|
+
hydra = "hydra",
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type ExportOrdersRequest = {
|
|
27
|
+
accountType?: Account_Type
|
|
28
|
+
gproduct?: GproductType
|
|
29
|
+
start?: string
|
|
30
|
+
end?: string
|
|
31
|
+
exportType?: ExportTypes
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type ExportTransactionsRequest = {
|
|
35
|
+
accountType?: Account_Type
|
|
36
|
+
start?: string
|
|
37
|
+
end?: string
|
|
38
|
+
exportType?: ExportTypes
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type ExportBillsReportRequest = {
|
|
42
|
+
accountType?: Account_Type
|
|
43
|
+
gproduct?: GproductType
|
|
44
|
+
start?: string
|
|
45
|
+
end?: string
|
|
46
|
+
exportType?: ExportTypes
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type ExportMonthlyBillsReportRequest = {
|
|
50
|
+
billingMonth?: string
|
|
51
|
+
exportType?: ExportTypes
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export class Export {
|
|
55
|
+
static ExportOrders(req: ExportOrdersRequest, initReq?: fm.InitReq): Promise<GoogleApiHttpbody.HttpBody> {
|
|
56
|
+
return fm.fetchReq<ExportOrdersRequest, GoogleApiHttpbody.HttpBody>(`/apis/leopard.io/v1alpha1/export/orders?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
57
|
+
}
|
|
58
|
+
static ExportTransactions(req: ExportTransactionsRequest, initReq?: fm.InitReq): Promise<GoogleApiHttpbody.HttpBody> {
|
|
59
|
+
return fm.fetchReq<ExportTransactionsRequest, GoogleApiHttpbody.HttpBody>(`/apis/leopard.io/v1alpha1/export/transactions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
60
|
+
}
|
|
61
|
+
static ExportBills(req: ExportBillsReportRequest, initReq?: fm.InitReq): Promise<GoogleApiHttpbody.HttpBody> {
|
|
62
|
+
return fm.fetchReq<ExportBillsReportRequest, GoogleApiHttpbody.HttpBody>(`/apis/leopard.io/v1alpha1/export/bills?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
63
|
+
}
|
|
64
|
+
static ExportMonthlyBills(req: ExportMonthlyBillsReportRequest, initReq?: fm.InitReq): Promise<GoogleApiHttpbody.HttpBody> {
|
|
65
|
+
return fm.fetchReq<ExportMonthlyBillsReportRequest, GoogleApiHttpbody.HttpBody>(`/apis/leopard.io/v1alpha1/export/bills/monthly/${req["billingMonth"]}?${fm.renderURLSearchParams(req, ["billingMonth"])}`, {...initReq, method: "GET"})
|
|
66
|
+
}
|
|
67
|
+
}
|
package/v1alpha1/order.pb.ts
CHANGED
|
@@ -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 OrderType {
|
|
10
15
|
PURCHASE = "PURCHASE",
|
|
@@ -49,6 +54,14 @@ export enum CreateOrderStatus {
|
|
|
49
54
|
INSUFFICIENT_INVENTORY = "INSUFFICIENT_INVENTORY",
|
|
50
55
|
}
|
|
51
56
|
|
|
57
|
+
export type ExportOrdersRequest = {
|
|
58
|
+
accountId?: string
|
|
59
|
+
productName?: string
|
|
60
|
+
start?: string
|
|
61
|
+
end?: string
|
|
62
|
+
exportType?: ExportTypes
|
|
63
|
+
}
|
|
64
|
+
|
|
52
65
|
export type Pagination = {
|
|
53
66
|
total?: number
|
|
54
67
|
page?: number
|
|
@@ -272,4 +285,7 @@ export class Order {
|
|
|
272
285
|
static InvalidateOrder(req: InvalidateOrderRequest, initReq?: fm.InitReq): Promise<InvalidateOrderResponse> {
|
|
273
286
|
return fm.fetchReq<InvalidateOrderRequest, InvalidateOrderResponse>(`/v1alpha1.order.Order/InvalidateOrder`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
274
287
|
}
|
|
288
|
+
static ExportOrders(req: ExportOrdersRequest, initReq?: fm.InitReq): Promise<GoogleApiHttpbody.HttpBody> {
|
|
289
|
+
return fm.fetchReq<ExportOrdersRequest, GoogleApiHttpbody.HttpBody>(`/apis/leopard.io/v1alpha1/export/orders?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
290
|
+
}
|
|
275
291
|
}
|
|
@@ -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,13 @@ export enum PaymentType {
|
|
|
23
28
|
Expense = "Expense",
|
|
24
29
|
}
|
|
25
30
|
|
|
31
|
+
export type ExportTransactionsRequest = {
|
|
32
|
+
accountId?: string
|
|
33
|
+
start?: string
|
|
34
|
+
end?: string
|
|
35
|
+
exportType?: ExportTypes
|
|
36
|
+
}
|
|
37
|
+
|
|
26
38
|
export type ListTransactionsRequest = {
|
|
27
39
|
start?: string
|
|
28
40
|
end?: string
|
|
@@ -64,4 +76,7 @@ export class Transaction {
|
|
|
64
76
|
static ListTransactions(req: ListTransactionsRequest, initReq?: fm.InitReq): Promise<ListTransactionsRequestResponse> {
|
|
65
77
|
return fm.fetchReq<ListTransactionsRequest, ListTransactionsRequestResponse>(`/apis/leopard.io/v1alpha1/transactions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
66
78
|
}
|
|
79
|
+
static ExportTransactions(req: ExportTransactionsRequest, initReq?: fm.InitReq): Promise<GoogleApiHttpbody.HttpBody> {
|
|
80
|
+
return fm.fetchReq<ExportTransactionsRequest, GoogleApiHttpbody.HttpBody>(`/apis/leopard.io/v1alpha1/export/transactions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
81
|
+
}
|
|
67
82
|
}
|