@daocloud-proto/leopard 0.8.1 → 0.9.0-rc1

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.1",
3
+ "version":"0.9.0-rc1",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -5,6 +5,22 @@
5
5
  */
6
6
 
7
7
  import * as fm from "../fetch.pb"
8
+
9
+ export enum Modules {
10
+ bills = "bills",
11
+ monthly_bills = "monthly_bills",
12
+ orders = "orders",
13
+ transactions = "transactions",
14
+ }
15
+
16
+ export enum RequestMethod {
17
+ GET = "GET",
18
+ POST = "POST",
19
+ PUT = "PUT",
20
+ DELETE = "DELETE",
21
+ PATCH = "PATCH",
22
+ }
23
+
8
24
  export type ListCurrentMembersRequest = {
9
25
  page?: number
10
26
  pageSize?: number
@@ -26,8 +42,20 @@ export type Pagination = {
26
42
  pageSize?: number
27
43
  }
28
44
 
45
+ export type GetExportURLRequest = {
46
+ module?: Modules
47
+ }
48
+
49
+ export type GetExportURLResponse = {
50
+ url?: string
51
+ method?: RequestMethod
52
+ }
53
+
29
54
  export class Account {
30
55
  static ListCurrentMembers(req: ListCurrentMembersRequest, initReq?: fm.InitReq): Promise<ListCurrentMembersResponse> {
31
56
  return fm.fetchReq<ListCurrentMembersRequest, ListCurrentMembersResponse>(`/apis/leopard.io/v1alpha1/accounts/current/members?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
32
57
  }
58
+ static GetExportURL(req: GetExportURLRequest, initReq?: fm.InitReq): Promise<GetExportURLResponse> {
59
+ return fm.fetchReq<GetExportURLRequest, GetExportURLResponse>(`/apis/leopard.io/v1alpha1/export/url?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
60
+ }
33
61
  }
@@ -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,37 @@
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
+
9
+ export enum Modules {
10
+ bills = "bills",
11
+ monthly_bills = "monthly_bills",
12
+ orders = "orders",
13
+ transactions = "transactions",
14
+ }
15
+
16
+ export enum RequestMethod {
17
+ GET = "GET",
18
+ POST = "POST",
19
+ PUT = "PUT",
20
+ DELETE = "DELETE",
21
+ PATCH = "PATCH",
22
+ }
23
+
24
+ export type GetExportURLRequest = {
25
+ module?: Modules
26
+ }
27
+
28
+ export type GetExportURLResponse = {
29
+ url?: string
30
+ method?: RequestMethod
31
+ }
32
+
33
+ export class export {
34
+ static GetExportURL(req: GetExportURLRequest, initReq?: fm.InitReq): Promise<GetExportURLResponse> {
35
+ return fm.fetchReq<GetExportURLRequest, GetExportURLResponse>(`/apis/leopard.io/v1alpha1/export/url?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
36
+ }
37
+ }
@@ -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
  }