@daocloud-proto/leopard 0.1.0-dev15 → 0.1.0-dev16
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 +39 -0
package/package.json
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as fm from "../fetch.pb"
|
|
8
|
+
|
|
9
|
+
export enum Action {
|
|
10
|
+
AddOrUpdate = "AddOrUpdate",
|
|
11
|
+
Delete = "Delete",
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type UpdateInventoryRequest = {
|
|
15
|
+
action?: Action
|
|
16
|
+
inventory?: inventory
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type inventory = {
|
|
20
|
+
region?: string
|
|
21
|
+
node?: string
|
|
22
|
+
resources?: resource[]
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type resource = {
|
|
26
|
+
specFieldKey?: string
|
|
27
|
+
specFieldValue?: string
|
|
28
|
+
total?: number
|
|
29
|
+
free?: number
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type UpdateInventoryResponse = {
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export class Inventory {
|
|
36
|
+
static UpdateInventory(req: UpdateInventoryRequest, initReq?: fm.InitReq): Promise<UpdateInventoryResponse> {
|
|
37
|
+
return fm.fetchReq<UpdateInventoryRequest, UpdateInventoryResponse>(`/apis/leopard.io/v1alpha1/inventory`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
38
|
+
}
|
|
39
|
+
}
|