@daocloud-proto/zestu 0.1.0-dev-522cc3b5 → 0.1.0-dev-ba820a52
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,61 @@
|
|
|
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 ZestuIoApiTypesPage from "../../types/page.pb"
|
|
8
|
+
import * as ZestuIoApiTypesTypes from "../../types/types.pb"
|
|
9
|
+
export type ListResourcesRequest = {
|
|
10
|
+
model?: string[]
|
|
11
|
+
regionId?: string
|
|
12
|
+
billingType?: ZestuIoApiTypesTypes.BillingType
|
|
13
|
+
page?: number
|
|
14
|
+
pageSize?: number
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type ListResourcesResponse = {
|
|
18
|
+
items?: Resource[]
|
|
19
|
+
pagination?: ZestuIoApiTypesPage.Pagination
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type Resource = {
|
|
23
|
+
skuId?: string
|
|
24
|
+
regionId?: string
|
|
25
|
+
saleable?: boolean
|
|
26
|
+
specName?: string
|
|
27
|
+
detail?: ResourceDetail
|
|
28
|
+
gpu?: ResourceGPU
|
|
29
|
+
prices?: ResourcePrice
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type ResourceDetail = {
|
|
33
|
+
gpuModel?: string
|
|
34
|
+
gpuNumber?: number
|
|
35
|
+
cpu?: number
|
|
36
|
+
cpuFamily?: string
|
|
37
|
+
memory?: string
|
|
38
|
+
systemDisk?: string
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type ResourceGPU = {
|
|
42
|
+
gpuMemory?: string
|
|
43
|
+
driverVersion?: string
|
|
44
|
+
cudaVersion?: string
|
|
45
|
+
connection?: string
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export type ResourcePrice = {
|
|
49
|
+
billingType?: ZestuIoApiTypesTypes.BillingType
|
|
50
|
+
unit?: ZestuIoApiTypesTypes.UnitType
|
|
51
|
+
price?: string
|
|
52
|
+
currency?: ZestuIoApiTypesTypes.Currency
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export type ListResourceModelRequest = {
|
|
56
|
+
regionId?: string
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type ListResourceModelResponse = {
|
|
60
|
+
items?: string[]
|
|
61
|
+
}
|
|
@@ -9,4 +9,19 @@ export enum ConditionStatus {
|
|
|
9
9
|
True = "True",
|
|
10
10
|
False = "False",
|
|
11
11
|
Unknown = "Unknown",
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export enum BillingType {
|
|
15
|
+
PayAsYouGo = "PayAsYouGo",
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export enum UnitType {
|
|
19
|
+
Hour = "Hour",
|
|
20
|
+
ThousandTokens = "ThousandTokens",
|
|
21
|
+
GBDay = "GBDay",
|
|
22
|
+
ComputeUnit = "ComputeUnit",
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export enum Currency {
|
|
26
|
+
Cny = "Cny",
|
|
12
27
|
}
|
|
@@ -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 ZestuIoApiRegionV1alpha1Region from "../region/v1alpha1/region.pb"
|
|
12
|
+
import * as ZestuIoApiResourcesV1alpha1Resources from "../resources/v1alpha1/resources.pb"
|
|
12
13
|
export class ContainerInstance {
|
|
13
14
|
static ListContainerInstances(req: ZestuIoApiContainerinstanceV1alpha1Containerinstance.ListContainerInstancesRequest, initReq?: fm.InitReq): Promise<ZestuIoApiContainerinstanceV1alpha1Containerinstance.ListContainerInstancesResponse> {
|
|
14
15
|
return fm.fetchReq<ZestuIoApiContainerinstanceV1alpha1Containerinstance.ListContainerInstancesRequest, ZestuIoApiContainerinstanceV1alpha1Containerinstance.ListContainerInstancesResponse>(`/apis/zestu.io/v1/region/${req["regionId"]}/containerinstances?${fm.renderURLSearchParams(req, ["regionId"])}`, {...initReq, method: "GET"})
|
|
@@ -43,6 +44,14 @@ export class Region {
|
|
|
43
44
|
return fm.fetchReq<GoogleProtobufEmpty.Empty, ZestuIoApiRegionV1alpha1Region.ListRegionsResponse>(`/apis/zestu.io/v1/regions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
44
45
|
}
|
|
45
46
|
}
|
|
47
|
+
export class Resources {
|
|
48
|
+
static ListResources(req: ZestuIoApiResourcesV1alpha1Resources.ListResourcesRequest, initReq?: fm.InitReq): Promise<ZestuIoApiResourcesV1alpha1Resources.ListResourcesResponse> {
|
|
49
|
+
return fm.fetchReq<ZestuIoApiResourcesV1alpha1Resources.ListResourcesRequest, ZestuIoApiResourcesV1alpha1Resources.ListResourcesResponse>(`/apis/zestu.io/v1/region/${req["regionId"]}/resources?${fm.renderURLSearchParams(req, ["regionId"])}`, {...initReq, method: "GET"})
|
|
50
|
+
}
|
|
51
|
+
static ListResourceModel(req: ZestuIoApiResourcesV1alpha1Resources.ListResourceModelRequest, initReq?: fm.InitReq): Promise<ZestuIoApiResourcesV1alpha1Resources.ListResourceModelResponse> {
|
|
52
|
+
return fm.fetchReq<ZestuIoApiResourcesV1alpha1Resources.ListResourceModelRequest, ZestuIoApiResourcesV1alpha1Resources.ListResourceModelResponse>(`/apis/zestu.io/v1/region/${req["regionId"]}/resources/models?${fm.renderURLSearchParams(req, ["regionId"])}`, {...initReq, method: "GET"})
|
|
53
|
+
}
|
|
54
|
+
}
|
|
46
55
|
export class FileStorage {
|
|
47
56
|
static GetStorageDetails(req: ZestuIoApiFile_storageV1alpha1Storage.GetStorageDetailsRequest, initReq?: fm.InitReq): Promise<ZestuIoApiFile_storageV1alpha1Storage.GetStorageDetailsResponse> {
|
|
48
57
|
return fm.fetchReq<ZestuIoApiFile_storageV1alpha1Storage.GetStorageDetailsRequest, ZestuIoApiFile_storageV1alpha1Storage.GetStorageDetailsResponse>(`/apis/zestu.io/v1/region/${req["regionId"]}/filestorage/details?${fm.renderURLSearchParams(req, ["regionId"])}`, {...initReq, method: "GET"})
|