@daocloud-proto/leopard 0.5.0 → 0.6.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 +39 -1
- package/v1alpha1/product.pb.ts +6 -0
package/package.json
CHANGED
package/v1alpha1/order.pb.ts
CHANGED
|
@@ -11,6 +11,7 @@ export enum OrderType {
|
|
|
11
11
|
REFUND = "REFUND",
|
|
12
12
|
UPGRADE = "UPGRADE",
|
|
13
13
|
DOWNGRADE = "DOWNGRADE",
|
|
14
|
+
TRANSFORM = "TRANSFORM",
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
export enum BillingType {
|
|
@@ -140,6 +141,8 @@ export type CreateNewPurchaseOrderRequest = {
|
|
|
140
141
|
username?: string
|
|
141
142
|
userId?: string
|
|
142
143
|
orderItems?: OrderItem[]
|
|
144
|
+
renewMeteringUnit?: UnitType
|
|
145
|
+
renewMeteringAmount?: number
|
|
143
146
|
}
|
|
144
147
|
|
|
145
148
|
export type CreateNewPurchaseOrderResponse = {
|
|
@@ -168,7 +171,8 @@ export type IsResourceOrderNextBillBalanceSufficientRequest = {
|
|
|
168
171
|
}
|
|
169
172
|
|
|
170
173
|
export type IsResourceOrderNextBillBalanceSufficientResponse = {
|
|
171
|
-
|
|
174
|
+
balanceSufficient?: boolean
|
|
175
|
+
inventorySufficient?: boolean
|
|
172
176
|
}
|
|
173
177
|
|
|
174
178
|
export type RefundOrderRequest = {
|
|
@@ -186,6 +190,34 @@ export type InvalidateOrderRequest = {
|
|
|
186
190
|
export type InvalidateOrderResponse = {
|
|
187
191
|
}
|
|
188
192
|
|
|
193
|
+
export type CreateTransformOrderRequest = {
|
|
194
|
+
username?: string
|
|
195
|
+
userId?: string
|
|
196
|
+
productName?: string
|
|
197
|
+
resourceId?: string
|
|
198
|
+
skuId?: string
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export type CreateTransformOrderResponse = {
|
|
202
|
+
orderId?: string
|
|
203
|
+
createOrderStatus?: CreateOrderStatus
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export type CreateRenewOrderRequest = {
|
|
207
|
+
username?: string
|
|
208
|
+
userId?: string
|
|
209
|
+
productName?: string
|
|
210
|
+
resourceId?: string
|
|
211
|
+
skuId?: string
|
|
212
|
+
renewMeteringUnit?: UnitType
|
|
213
|
+
renewMeteringAmount?: number
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export type CreateRenewOrderResponse = {
|
|
217
|
+
orderId?: string
|
|
218
|
+
createOrderStatus?: CreateOrderStatus
|
|
219
|
+
}
|
|
220
|
+
|
|
189
221
|
export class Order {
|
|
190
222
|
static ListOrders(req: ListOrdersRequest, initReq?: fm.InitReq): Promise<ListOrdersResponse> {
|
|
191
223
|
return fm.fetchReq<ListOrdersRequest, ListOrdersResponse>(`/apis/leopard.io/v1alpha1/orders?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -202,6 +234,12 @@ export class Order {
|
|
|
202
234
|
static CreateQuantityChangeOrder(req: CreateQuantityChangeOrderRequest, initReq?: fm.InitReq): Promise<CreateQuantityChangeOrderResponse> {
|
|
203
235
|
return fm.fetchReq<CreateQuantityChangeOrderRequest, CreateQuantityChangeOrderResponse>(`/apis/leopard.io/v1alpha1/orders/quantity-change`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
204
236
|
}
|
|
237
|
+
static CreateRenewOrder(req: CreateRenewOrderRequest, initReq?: fm.InitReq): Promise<CreateRenewOrderResponse> {
|
|
238
|
+
return fm.fetchReq<CreateRenewOrderRequest, CreateRenewOrderResponse>(`/apis/leopard.io/v1alpha1/orders/renew`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
239
|
+
}
|
|
240
|
+
static CreateTransformOrder(req: CreateTransformOrderRequest, initReq?: fm.InitReq): Promise<CreateTransformOrderResponse> {
|
|
241
|
+
return fm.fetchReq<CreateTransformOrderRequest, CreateTransformOrderResponse>(`/v1alpha1.order.Order/CreateTransformOrder`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
242
|
+
}
|
|
205
243
|
static IsResourceOrderNextBillBalanceSufficient(req: IsResourceOrderNextBillBalanceSufficientRequest, initReq?: fm.InitReq): Promise<IsResourceOrderNextBillBalanceSufficientResponse> {
|
|
206
244
|
return fm.fetchReq<IsResourceOrderNextBillBalanceSufficientRequest, IsResourceOrderNextBillBalanceSufficientResponse>(`/apis/leopard.io/v1alpha1/orders/is-resource-balance-sufficient`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
207
245
|
}
|
package/v1alpha1/product.pb.ts
CHANGED
|
@@ -8,6 +8,10 @@ import * as fm from "../fetch.pb"
|
|
|
8
8
|
|
|
9
9
|
export enum BillingType {
|
|
10
10
|
PAY_AS_YOU_GO = "PAY_AS_YOU_GO",
|
|
11
|
+
SUBSCRIPTION_DAILY = "SUBSCRIPTION_DAILY",
|
|
12
|
+
SUBSCRIPTION_WEEKLY = "SUBSCRIPTION_WEEKLY",
|
|
13
|
+
SUBSCRIPTION_MONTHLY = "SUBSCRIPTION_MONTHLY",
|
|
14
|
+
SUBSCRIPTION_YEARLY = "SUBSCRIPTION_YEARLY",
|
|
11
15
|
}
|
|
12
16
|
|
|
13
17
|
export enum UnitType {
|
|
@@ -45,6 +49,7 @@ export type ListProductSKUsRequest = {
|
|
|
45
49
|
filterByAnd?: boolean
|
|
46
50
|
sortType?: string
|
|
47
51
|
sortOrder?: SortOrder
|
|
52
|
+
billingType?: string
|
|
48
53
|
}
|
|
49
54
|
|
|
50
55
|
export type SkuItem = {
|
|
@@ -120,6 +125,7 @@ export type ListProductSpecFieldRequest = {
|
|
|
120
125
|
regionId?: string
|
|
121
126
|
specKey?: string
|
|
122
127
|
product?: string
|
|
128
|
+
billingType?: string
|
|
123
129
|
}
|
|
124
130
|
|
|
125
131
|
export type ListProductSpecFieldResponse = {
|