@daocloud-proto/leopard 0.1.0-dev35 → 0.1.0-dev37

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.1.0-dev35",
3
+ "version":"0.1.0-dev37",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -33,8 +33,31 @@ export type resource = {
33
33
  export type UpdateInventoryResponse = {
34
34
  }
35
35
 
36
+ export type ListInventoriesRequest = {
37
+ region?: string
38
+ node?: string
39
+ }
40
+
41
+ export type ListInventoriesResponse = {
42
+ resources?: resource[]
43
+ }
44
+
45
+ export type DeleteInventoryRequest = {
46
+ region?: string
47
+ node?: string
48
+ }
49
+
50
+ export type DeleteInventoryResponse = {
51
+ }
52
+
36
53
  export class Inventory {
37
54
  static UpdateInventory(req: UpdateInventoryRequest, initReq?: fm.InitReq): Promise<UpdateInventoryResponse> {
38
55
  return fm.fetchReq<UpdateInventoryRequest, UpdateInventoryResponse>(`/v1alpha1.inventory.Inventory/UpdateInventory`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
39
56
  }
57
+ static ListInventories(req: ListInventoriesRequest, initReq?: fm.InitReq): Promise<ListInventoriesResponse> {
58
+ return fm.fetchReq<ListInventoriesRequest, ListInventoriesResponse>(`/v1alpha1.inventory.Inventory/ListInventories`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
59
+ }
60
+ static DeleteInventory(req: DeleteInventoryRequest, initReq?: fm.InitReq): Promise<DeleteInventoryResponse> {
61
+ return fm.fetchReq<DeleteInventoryRequest, DeleteInventoryResponse>(`/v1alpha1.inventory.Inventory/DeleteInventory`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
62
+ }
40
63
  }
@@ -21,6 +21,11 @@ export enum QuantityUnit {
21
21
  EMPTY = "EMPTY",
22
22
  }
23
23
 
24
+ export enum SortOrder {
25
+ ASC = "ASC",
26
+ DESC = "DESC",
27
+ }
28
+
24
29
  export type Pagination = {
25
30
  total?: number
26
31
  page?: number
@@ -38,6 +43,8 @@ export type ListProductSKUsRequest = {
38
43
  page?: number
39
44
  pageSize?: number
40
45
  filterByAnd?: boolean
46
+ sortType?: string
47
+ sortOrder?: SortOrder
41
48
  }
42
49
 
43
50
  export type SkuItem = {