@daocloud-proto/leopard 0.6.0-dev1 → 0.6.0-dev10

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.6.0-dev1",
3
+ "version":"0.6.0-dev10",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -46,6 +46,7 @@ export type ListBillsRequest = {
46
46
  resourceId?: string
47
47
  billingType?: string
48
48
  productName?: string
49
+ username?: string
49
50
  }
50
51
 
51
52
  export type ListBillsResponse = {
@@ -114,6 +115,7 @@ export type GetMonthlyBillsRequest = {
114
115
 
115
116
  export type GetMonthlyBillsResponse = {
116
117
  products?: ProductMonthlyBill[]
118
+ users?: UserMonthlyBill[]
117
119
  }
118
120
 
119
121
  export type RegionMonthlyBill = {
@@ -133,6 +135,15 @@ export type ProductMonthlyBill = {
133
135
  amountDue?: string
134
136
  }
135
137
 
138
+ export type UserMonthlyBill = {
139
+ billingMonth?: string
140
+ userId?: string
141
+ username?: string
142
+ orderPrice?: string
143
+ voucherPayment?: string
144
+ amountDue?: string
145
+ }
146
+
136
147
  export class Bill {
137
148
  static ListBills(req: ListBillsRequest, initReq?: fm.InitReq): Promise<ListBillsResponse> {
138
149
  return fm.fetchReq<ListBillsRequest, ListBillsResponse>(`/apis/leopard.io/v1alpha1/bills?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -65,10 +65,11 @@ export type ListOrdersRequest = {
65
65
  end?: string
66
66
  page?: number
67
67
  pageSize?: number
68
+ username?: string
68
69
  }
69
70
 
70
71
  export type Orders = {
71
- userName?: string
72
+ username?: string
72
73
  orderId?: string
73
74
  createdAtTimestamp?: string
74
75
  orderType?: OrderType
@@ -92,7 +93,7 @@ export type OrderInfo = {
92
93
  orderStatus?: OrderStatus
93
94
  orderPrice?: string
94
95
  amountDue?: string
95
- userName?: string
96
+ username?: string
96
97
  userId?: string
97
98
  }
98
99
 
@@ -144,13 +145,14 @@ export type CreateNewPurchaseOrderRequest = {
144
145
  username?: string
145
146
  userId?: string
146
147
  orderItems?: OrderItem[]
147
- renewMeteringUnit?: UnitType
148
148
  renewMeteringAmount?: number
149
149
  }
150
150
 
151
151
  export type CreateNewPurchaseOrderResponse = {
152
152
  orderId?: string
153
153
  createOrderStatus?: CreateOrderStatus
154
+ startTimestamp?: string
155
+ endTimestamp?: string
154
156
  }
155
157
 
156
158
  export type CreateQuantityChangeOrderRequest = {
@@ -164,6 +166,8 @@ export type CreateQuantityChangeOrderRequest = {
164
166
  export type CreateQuantityChangeOrderResponse = {
165
167
  orderId?: string
166
168
  createOrderStatus?: CreateOrderStatus
169
+ startTimestamp?: string
170
+ endTimestamp?: string
167
171
  }
168
172
 
169
173
  export type IsResourceOrderNextBillBalanceSufficientRequest = {
@@ -204,6 +208,8 @@ export type CreateTransformOrderRequest = {
204
208
  export type CreateTransformOrderResponse = {
205
209
  orderId?: string
206
210
  createOrderStatus?: CreateOrderStatus
211
+ startTimestamp?: string
212
+ endTimestamp?: string
207
213
  }
208
214
 
209
215
  export type CreateRenewOrderRequest = {
@@ -212,13 +218,22 @@ export type CreateRenewOrderRequest = {
212
218
  productName?: string
213
219
  resourceId?: string
214
220
  skuId?: string
215
- renewMeteringUnit?: UnitType
216
221
  renewMeteringAmount?: number
217
222
  }
218
223
 
219
224
  export type CreateRenewOrderResponse = {
220
225
  orderId?: string
221
226
  createOrderStatus?: CreateOrderStatus
227
+ startTimestamp?: string
228
+ endTimestamp?: string
229
+ }
230
+
231
+ export type ChangeOrderRenewRequest = {
232
+ resourceId?: string
233
+ renewMeteringAmount?: number
234
+ }
235
+
236
+ export type ChangeOrderRenewResponse = {
222
237
  }
223
238
 
224
239
  export class Order {
@@ -243,6 +258,9 @@ export class Order {
243
258
  static CreateTransformOrder(req: CreateTransformOrderRequest, initReq?: fm.InitReq): Promise<CreateTransformOrderResponse> {
244
259
  return fm.fetchReq<CreateTransformOrderRequest, CreateTransformOrderResponse>(`/v1alpha1.order.Order/CreateTransformOrder`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
245
260
  }
261
+ static ChangeOrderRenew(req: ChangeOrderRenewRequest, initReq?: fm.InitReq): Promise<ChangeOrderRenewResponse> {
262
+ return fm.fetchReq<ChangeOrderRenewRequest, ChangeOrderRenewResponse>(`/v1alpha1.order.Order/ChangeOrderRenew`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
263
+ }
246
264
  static IsResourceOrderNextBillBalanceSufficient(req: IsResourceOrderNextBillBalanceSufficientRequest, initReq?: fm.InitReq): Promise<IsResourceOrderNextBillBalanceSufficientResponse> {
247
265
  return fm.fetchReq<IsResourceOrderNextBillBalanceSufficientRequest, IsResourceOrderNextBillBalanceSufficientResponse>(`/apis/leopard.io/v1alpha1/orders/is-resource-balance-sufficient`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
248
266
  }
@@ -19,6 +19,11 @@ export enum UnitType {
19
19
  THOUSAND_TOKENS = "THOUSAND_TOKENS",
20
20
  GB_DAY = "GB_DAY",
21
21
  INSTANCE_NUMBER = "INSTANCE_NUMBER",
22
+ PICTURE = "PICTURE",
23
+ DAY = "DAY",
24
+ WEEK = "WEEK",
25
+ MONTH = "MONTH",
26
+ YEAR = "YEAR",
22
27
  }
23
28
 
24
29
  export enum QuantityUnit {
@@ -0,0 +1,33 @@
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 PeriodStatus {
10
+ Paid = "Paid",
11
+ NotPaid = "NotPaid",
12
+ Failed = "Failed",
13
+ }
14
+
15
+ export type GetResourceInfoRequest = {
16
+ resourceId?: string
17
+ }
18
+
19
+ export type GetResourceInfoResponse = {
20
+ periods?: ResourcePeriod[]
21
+ }
22
+
23
+ export type ResourcePeriod = {
24
+ startTimestamp?: string
25
+ endTimestamp?: string
26
+ status?: PeriodStatus
27
+ }
28
+
29
+ export class Resource {
30
+ static GetResourceInfo(req: GetResourceInfoRequest, initReq?: fm.InitReq): Promise<GetResourceInfoResponse> {
31
+ return fm.fetchReq<GetResourceInfoRequest, GetResourceInfoResponse>(`/v1alpha1.resource.Resource/GetResourceInfo`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
32
+ }
33
+ }
@@ -15,6 +15,7 @@ export enum TransactionChannel {
15
15
  Balance = "Balance",
16
16
  Alipay = "Alipay",
17
17
  Wechat = "Wechat",
18
+ Corporate_Transfer = "Corporate_Transfer",
18
19
  }
19
20
 
20
21
  export enum PaymentType {
@@ -32,6 +33,7 @@ export type ListTransactionsRequest = {
32
33
  paymentType?: string
33
34
  transactionType?: string
34
35
  transactionChannel?: string
36
+ username?: string
35
37
  }
36
38
 
37
39
  export type ListTransactionsRequestResponse = {
@@ -9,6 +9,7 @@ import * as fm from "../fetch.pb"
9
9
  export enum PaymentChannel {
10
10
  ALIPAY = "ALIPAY",
11
11
  WECHAT = "WECHAT",
12
+ CORPORATE_TRANSFER = "CORPORATE_TRANSFER",
12
13
  }
13
14
 
14
15
  export enum PaymentType {
@@ -53,6 +54,36 @@ export type GetUserStateResponse = {
53
54
  permissions?: string[]
54
55
  }
55
56
 
57
+ export type ReceivingBankInfo = {
58
+ accountName?: string
59
+ bankAccount?: string
60
+ bankName?: string
61
+ }
62
+
63
+ export type GetReceivingBankInfoResponse = {
64
+ bankInfos?: ReceivingBankInfo[]
65
+ }
66
+
67
+ export type GetReceivingBankInfoRequest = {
68
+ }
69
+
70
+ export type PaymentSourceInfo = {
71
+ accountName?: string
72
+ bankAccount?: string
73
+ bankName?: string
74
+ }
75
+
76
+ export type CorporateTransferRechargeRequest = {
77
+ userId?: string
78
+ amount?: string
79
+ serialNumber?: string
80
+ message?: string
81
+ paymentSourceInfo?: PaymentSourceInfo
82
+ }
83
+
84
+ export type CorporateTransferRechargeResponse = {
85
+ }
86
+
56
87
  export class Wallet {
57
88
  static Balance(req: BalanceRequest, initReq?: fm.InitReq): Promise<BalanceResponse> {
58
89
  return fm.fetchReq<BalanceRequest, BalanceResponse>(`/apis/leopard.io/v1alpha1/wallet/balance?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -60,6 +91,12 @@ export class Wallet {
60
91
  static Recharge(req: RechargeRequest, initReq?: fm.InitReq): Promise<RechargeResponse> {
61
92
  return fm.fetchReq<RechargeRequest, RechargeResponse>(`/apis/leopard.io/v1alpha1/wallet/recharge`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
62
93
  }
94
+ static CorporateTransferRecharge(req: CorporateTransferRechargeRequest, initReq?: fm.InitReq): Promise<CorporateTransferRechargeResponse> {
95
+ return fm.fetchReq<CorporateTransferRechargeRequest, CorporateTransferRechargeResponse>(`/apis/leopard.io/v1alpha1/wallet/corporate-transfer/recharge`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
96
+ }
97
+ static GetReceivingBankInfos(req: GetReceivingBankInfoRequest, initReq?: fm.InitReq): Promise<GetReceivingBankInfoResponse> {
98
+ return fm.fetchReq<GetReceivingBankInfoRequest, GetReceivingBankInfoResponse>(`/apis/leopard.io/v1alpha1/wallet/corporate-transfer/receiving-bank-infos?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
99
+ }
63
100
  static GetUserState(req: GetUserStateRequest, initReq?: fm.InitReq): Promise<GetUserStateResponse> {
64
101
  return fm.fetchReq<GetUserStateRequest, GetUserStateResponse>(`/apis/leopard.io/v1alpha1/wallet/user-state?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
65
102
  }