@daocloud-proto/leopard 0.1.0-dev35 → 0.1.0-dev36
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/inventory.pb.ts +23 -7
package/package.json
CHANGED
package/v1alpha1/inventory.pb.ts
CHANGED
|
@@ -5,14 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as fm from "../fetch.pb"
|
|
8
|
-
|
|
9
|
-
export enum Action {
|
|
10
|
-
AddOrUpdate = "AddOrUpdate",
|
|
11
|
-
Delete = "Delete",
|
|
12
|
-
}
|
|
13
|
-
|
|
14
8
|
export type UpdateInventoryRequest = {
|
|
15
|
-
action?: Action
|
|
16
9
|
inventory?: inventory
|
|
17
10
|
}
|
|
18
11
|
|
|
@@ -33,8 +26,31 @@ export type resource = {
|
|
|
33
26
|
export type UpdateInventoryResponse = {
|
|
34
27
|
}
|
|
35
28
|
|
|
29
|
+
export type ListInventoriesRequest = {
|
|
30
|
+
region?: string
|
|
31
|
+
node?: string
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type ListInventoriesResponse = {
|
|
35
|
+
resources?: resource[]
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type DeleteInventoryRequest = {
|
|
39
|
+
region?: string
|
|
40
|
+
node?: string
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type DeleteInventoryResponse = {
|
|
44
|
+
}
|
|
45
|
+
|
|
36
46
|
export class Inventory {
|
|
37
47
|
static UpdateInventory(req: UpdateInventoryRequest, initReq?: fm.InitReq): Promise<UpdateInventoryResponse> {
|
|
38
48
|
return fm.fetchReq<UpdateInventoryRequest, UpdateInventoryResponse>(`/v1alpha1.inventory.Inventory/UpdateInventory`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
39
49
|
}
|
|
50
|
+
static ListInventories(req: ListInventoriesRequest, initReq?: fm.InitReq): Promise<ListInventoriesResponse> {
|
|
51
|
+
return fm.fetchReq<ListInventoriesRequest, ListInventoriesResponse>(`/v1alpha1.inventory.Inventory/ListInventories`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
52
|
+
}
|
|
53
|
+
static DeleteInventory(req: DeleteInventoryRequest, initReq?: fm.InitReq): Promise<DeleteInventoryResponse> {
|
|
54
|
+
return fm.fetchReq<DeleteInventoryRequest, DeleteInventoryResponse>(`/v1alpha1.inventory.Inventory/DeleteInventory`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
55
|
+
}
|
|
40
56
|
}
|