@daocloud-proto/leopard 0.5.0-dev1 → 0.5.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 +1 -1
- package/v1alpha1/order.pb.ts +11 -0
package/package.json
CHANGED
package/v1alpha1/order.pb.ts
CHANGED
|
@@ -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 = {
|
|
@@ -165,6 +166,13 @@ export type IsResourceOrderNextBillBalanceSufficientResponse = {
|
|
|
165
166
|
sufficient?: boolean
|
|
166
167
|
}
|
|
167
168
|
|
|
169
|
+
export type RefundOrderRequest = {
|
|
170
|
+
orderId?: string
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export type RefundOrderResponse = {
|
|
174
|
+
}
|
|
175
|
+
|
|
168
176
|
export type InvalidateOrderRequest = {
|
|
169
177
|
orderId?: string
|
|
170
178
|
reason?: string
|
|
@@ -192,6 +200,9 @@ export class Order {
|
|
|
192
200
|
static IsResourceOrderNextBillBalanceSufficient(req: IsResourceOrderNextBillBalanceSufficientRequest, initReq?: fm.InitReq): Promise<IsResourceOrderNextBillBalanceSufficientResponse> {
|
|
193
201
|
return fm.fetchReq<IsResourceOrderNextBillBalanceSufficientRequest, IsResourceOrderNextBillBalanceSufficientResponse>(`/apis/leopard.io/v1alpha1/orders/is-resource-balance-sufficient`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
194
202
|
}
|
|
203
|
+
static RefundOrder(req: RefundOrderRequest, initReq?: fm.InitReq): Promise<RefundOrderResponse> {
|
|
204
|
+
return fm.fetchReq<RefundOrderRequest, RefundOrderResponse>(`/v1alpha1.order.Order/RefundOrder`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
205
|
+
}
|
|
195
206
|
static InvalidateOrder(req: InvalidateOrderRequest, initReq?: fm.InitReq): Promise<InvalidateOrderResponse> {
|
|
196
207
|
return fm.fetchReq<InvalidateOrderRequest, InvalidateOrderResponse>(`/v1alpha1.order.Order/InvalidateOrder`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
197
208
|
}
|