@daocloud-proto/leopard 0.6.1 → 0.7.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/leopard",
3
- "version":"0.6.1",
3
+ "version":"0.7.0-dev1",
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 = {
@@ -76,6 +77,7 @@ export type bill = {
76
77
  billingItem?: string
77
78
  voucherPayment?: string
78
79
  type?: BillType
80
+ userId?: string
79
81
  }
80
82
 
81
83
  export type BillingCycle = {
@@ -113,6 +115,7 @@ export type GetMonthlyBillsRequest = {
113
115
 
114
116
  export type GetMonthlyBillsResponse = {
115
117
  products?: ProductMonthlyBill[]
118
+ users?: UserMonthlyBill[]
116
119
  }
117
120
 
118
121
  export type RegionMonthlyBill = {
@@ -132,6 +135,15 @@ export type ProductMonthlyBill = {
132
135
  amountDue?: string
133
136
  }
134
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
+
135
147
  export class Bill {
136
148
  static ListBills(req: ListBillsRequest, initReq?: fm.InitReq): Promise<ListBillsResponse> {
137
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
@@ -77,6 +78,7 @@ export type Orders = {
77
78
  orderStatus?: OrderStatus
78
79
  orderPrice?: string
79
80
  amountDue?: string
81
+ userId?: string
80
82
  }
81
83
 
82
84
  export type ListOrdersResponse = {
@@ -91,6 +93,8 @@ export type OrderInfo = {
91
93
  orderStatus?: OrderStatus
92
94
  orderPrice?: string
93
95
  amountDue?: string
96
+ username?: string
97
+ userId?: string
94
98
  }
95
99
 
96
100
  export type Resource = {
@@ -141,13 +145,14 @@ export type CreateNewPurchaseOrderRequest = {
141
145
  username?: string
142
146
  userId?: string
143
147
  orderItems?: OrderItem[]
144
- renewMeteringUnit?: UnitType
145
148
  renewMeteringAmount?: number
146
149
  }
147
150
 
148
151
  export type CreateNewPurchaseOrderResponse = {
149
152
  orderId?: string
150
153
  createOrderStatus?: CreateOrderStatus
154
+ startTimestamp?: string
155
+ endTimestamp?: string
151
156
  }
152
157
 
153
158
  export type CreateQuantityChangeOrderRequest = {
@@ -161,6 +166,8 @@ export type CreateQuantityChangeOrderRequest = {
161
166
  export type CreateQuantityChangeOrderResponse = {
162
167
  orderId?: string
163
168
  createOrderStatus?: CreateOrderStatus
169
+ startTimestamp?: string
170
+ endTimestamp?: string
164
171
  }
165
172
 
166
173
  export type IsResourceOrderNextBillBalanceSufficientRequest = {
@@ -201,6 +208,8 @@ export type CreateTransformOrderRequest = {
201
208
  export type CreateTransformOrderResponse = {
202
209
  orderId?: string
203
210
  createOrderStatus?: CreateOrderStatus
211
+ startTimestamp?: string
212
+ endTimestamp?: string
204
213
  }
205
214
 
206
215
  export type CreateRenewOrderRequest = {
@@ -209,13 +218,22 @@ export type CreateRenewOrderRequest = {
209
218
  productName?: string
210
219
  resourceId?: string
211
220
  skuId?: string
212
- renewMeteringUnit?: UnitType
213
221
  renewMeteringAmount?: number
214
222
  }
215
223
 
216
224
  export type CreateRenewOrderResponse = {
217
225
  orderId?: string
218
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 = {
219
237
  }
220
238
 
221
239
  export class Order {
@@ -240,6 +258,9 @@ export class Order {
240
258
  static CreateTransformOrder(req: CreateTransformOrderRequest, initReq?: fm.InitReq): Promise<CreateTransformOrderResponse> {
241
259
  return fm.fetchReq<CreateTransformOrderRequest, CreateTransformOrderResponse>(`/v1alpha1.order.Order/CreateTransformOrder`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
242
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
+ }
243
264
  static IsResourceOrderNextBillBalanceSufficient(req: IsResourceOrderNextBillBalanceSufficientRequest, initReq?: fm.InitReq): Promise<IsResourceOrderNextBillBalanceSufficientResponse> {
244
265
  return fm.fetchReq<IsResourceOrderNextBillBalanceSufficientRequest, IsResourceOrderNextBillBalanceSufficientResponse>(`/apis/leopard.io/v1alpha1/orders/is-resource-balance-sufficient`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
245
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 = {
@@ -55,6 +57,7 @@ export type transaction = {
55
57
  amount?: string
56
58
  billingId?: string
57
59
  balance?: string
60
+ userId?: string
58
61
  }
59
62
 
60
63
  export class Transaction {
@@ -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 {
@@ -49,6 +50,38 @@ export type GetUserStateRequest = {
49
50
 
50
51
  export type GetUserStateResponse = {
51
52
  isVerified?: boolean
53
+ isMain?: boolean
54
+ permissions?: string[]
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 = {
52
85
  }
53
86
 
54
87
  export class Wallet {
@@ -58,6 +91,12 @@ export class Wallet {
58
91
  static Recharge(req: RechargeRequest, initReq?: fm.InitReq): Promise<RechargeResponse> {
59
92
  return fm.fetchReq<RechargeRequest, RechargeResponse>(`/apis/leopard.io/v1alpha1/wallet/recharge`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
60
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
+ }
61
100
  static GetUserState(req: GetUserStateRequest, initReq?: fm.InitReq): Promise<GetUserStateResponse> {
62
101
  return fm.fetchReq<GetUserStateRequest, GetUserStateResponse>(`/apis/leopard.io/v1alpha1/wallet/user-state?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
63
102
  }