@daocloud-proto/zestu 0.1.0-dev-7b3a64bb → 0.1.0-dev-3b683750
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
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
8
|
+
type OneOf<T> =
|
|
9
|
+
| { [k in keyof T]?: undefined }
|
|
10
|
+
| (
|
|
11
|
+
keyof T extends infer K ?
|
|
12
|
+
(K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
|
|
13
|
+
: never)
|
|
14
|
+
: never);
|
|
15
|
+
|
|
16
|
+
export enum EventType {
|
|
17
|
+
EVENT_TYPE_UNSPECIFIED = "EVENT_TYPE_UNSPECIFIED",
|
|
18
|
+
EVENT_CONTAINER_INSTANCE = "EVENT_CONTAINER_INSTANCE",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export enum PowerType {
|
|
22
|
+
POWER_TYPE_UNSPECIFIED = "POWER_TYPE_UNSPECIFIED",
|
|
23
|
+
POWER_ON = "POWER_ON",
|
|
24
|
+
POWER_OFF = "POWER_OFF",
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
type BasePushEventRequest = {
|
|
29
|
+
type?: EventType
|
|
30
|
+
resourceId?: string
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export type PushEventRequest = BasePushEventRequest
|
|
34
|
+
& OneOf<{ powerType: PowerType }>
|
|
@@ -9,6 +9,7 @@ import * as GoogleProtobufEmpty from "../../../google/api/empty.pb"
|
|
|
9
9
|
import * as ZestuIoApiContainerinstanceV1alpha1Containerinstance from "../containerinstance/v1alpha1/containerinstance.pb"
|
|
10
10
|
import * as ZestuIoApiFile_storageV1alpha1Storage from "../file_storage/v1alpha1/storage.pb"
|
|
11
11
|
import * as ZestuIoApiImageV1alpha1Image from "../image/v1alpha1/image.pb"
|
|
12
|
+
import * as ZestuIoApiMeteringV1alpha1Metering from "../metering/v1alpha1/metering.pb"
|
|
12
13
|
import * as ZestuIoApiRegionV1alpha1Region from "../region/v1alpha1/region.pb"
|
|
13
14
|
import * as ZestuIoApiResourcesV1alpha1Resources from "../resources/v1alpha1/resources.pb"
|
|
14
15
|
export class ContainerInstance {
|
|
@@ -74,4 +75,9 @@ export class Image {
|
|
|
74
75
|
static ListPublicImages(req: ZestuIoApiImageV1alpha1Image.ListPublicImagesRequest, initReq?: fm.InitReq): Promise<ZestuIoApiImageV1alpha1Image.ListPublicImagesResponse> {
|
|
75
76
|
return fm.fetchReq<ZestuIoApiImageV1alpha1Image.ListPublicImagesRequest, ZestuIoApiImageV1alpha1Image.ListPublicImagesResponse>(`/apis/zestu.io/v1/region/${req["regionId"]}/public-images?${fm.renderURLSearchParams(req, ["regionId"])}`, {...initReq, method: "GET"})
|
|
76
77
|
}
|
|
78
|
+
}
|
|
79
|
+
export class metering {
|
|
80
|
+
static PushEvent(req: ZestuIoApiMeteringV1alpha1Metering.PushEventRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
81
|
+
return fm.fetchReq<ZestuIoApiMeteringV1alpha1Metering.PushEventRequest, GoogleProtobufEmpty.Empty>(`/apis/zestu.io/v1/events/push`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
82
|
+
}
|
|
77
83
|
}
|