@daocloud-proto/leopard 0.5.0-dev1 → 0.5.0-dev2
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/order.pb.ts +13 -1
package/package.json
CHANGED
package/v1alpha1/order.pb.ts
CHANGED
|
@@ -24,7 +24,7 @@ export enum BillingType {
|
|
|
24
24
|
export enum OrderStatus {
|
|
25
25
|
PAID = "PAID",
|
|
26
26
|
PARTIAL = "PARTIAL",
|
|
27
|
-
|
|
27
|
+
INVALIDATED = "INVALIDATED",
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export enum UnitType {
|
|
@@ -41,6 +41,7 @@ export enum CreateOrderStatus {
|
|
|
41
41
|
RESOURCE_NOT_EXIST = "RESOURCE_NOT_EXIST",
|
|
42
42
|
RESOURCE_EXIST = "RESOURCE_EXIST",
|
|
43
43
|
INSUFFICIENT_BALANCE = "INSUFFICIENT_BALANCE",
|
|
44
|
+
INSUFFICIENT_INVENTORY = "INSUFFICIENT_INVENTORY",
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
export type Pagination = {
|
|
@@ -134,6 +135,7 @@ export type CreateNewPurchaseOrderRequest = {
|
|
|
134
135
|
username?: string
|
|
135
136
|
userId?: string
|
|
136
137
|
orderItems?: OrderItem[]
|
|
138
|
+
meteringCount?: number
|
|
137
139
|
}
|
|
138
140
|
|
|
139
141
|
export type CreateNewPurchaseOrderResponse = {
|
|
@@ -165,6 +167,13 @@ export type IsResourceOrderNextBillBalanceSufficientResponse = {
|
|
|
165
167
|
sufficient?: boolean
|
|
166
168
|
}
|
|
167
169
|
|
|
170
|
+
export type RefundOrderRequest = {
|
|
171
|
+
orderId?: string
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export type RefundOrderResponse = {
|
|
175
|
+
}
|
|
176
|
+
|
|
168
177
|
export type InvalidateOrderRequest = {
|
|
169
178
|
orderId?: string
|
|
170
179
|
reason?: string
|
|
@@ -192,6 +201,9 @@ export class Order {
|
|
|
192
201
|
static IsResourceOrderNextBillBalanceSufficient(req: IsResourceOrderNextBillBalanceSufficientRequest, initReq?: fm.InitReq): Promise<IsResourceOrderNextBillBalanceSufficientResponse> {
|
|
193
202
|
return fm.fetchReq<IsResourceOrderNextBillBalanceSufficientRequest, IsResourceOrderNextBillBalanceSufficientResponse>(`/apis/leopard.io/v1alpha1/orders/is-resource-balance-sufficient`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
194
203
|
}
|
|
204
|
+
static RefundOrder(req: RefundOrderRequest, initReq?: fm.InitReq): Promise<RefundOrderResponse> {
|
|
205
|
+
return fm.fetchReq<RefundOrderRequest, RefundOrderResponse>(`/v1alpha1.order.Order/RefundOrder`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
206
|
+
}
|
|
195
207
|
static InvalidateOrder(req: InvalidateOrderRequest, initReq?: fm.InitReq): Promise<InvalidateOrderResponse> {
|
|
196
208
|
return fm.fetchReq<InvalidateOrderRequest, InvalidateOrderResponse>(`/v1alpha1.order.Order/InvalidateOrder`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
197
209
|
}
|