@daocloud-proto/zestu 0.8.1-dev-ea0d05cb → 0.9.0-rc2-dev-20a8ff1b
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/zestu.io/api/audit/v1alpha1/audit.pb.ts +25 -0
- package/zestu.io/api/containerinstance/v1alpha1/containerinstance.pb.ts +42 -1
- package/zestu.io/api/file_storage/v1alpha1/storage.pb.ts +10 -0
- package/zestu.io/api/resources/v1alpha1/resources.pb.ts +10 -0
- package/zestu.io/api/sms/v1alpha1/sms.pb.ts +1 -0
- package/zestu.io/api/types/types.pb.ts +9 -4
- package/zestu.io/api/v1alpha1/zestu.pb.ts +13 -0
package/package.json
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
export type ObjectRef = {
|
|
7
|
+
name?: string
|
|
8
|
+
resource?: string
|
|
9
|
+
namespace?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type ResponseStatus = {
|
|
13
|
+
status?: string
|
|
14
|
+
reason?: string
|
|
15
|
+
code?: number
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type WritAuditLogRequest = {
|
|
19
|
+
requestURI?: string
|
|
20
|
+
verb?: string
|
|
21
|
+
objectRef?: ObjectRef
|
|
22
|
+
clusterName?: string
|
|
23
|
+
responseStatus?: ResponseStatus
|
|
24
|
+
extraExplain?: {[key: string]: string}
|
|
25
|
+
}
|
|
@@ -14,6 +14,11 @@ export enum EventType {
|
|
|
14
14
|
Warning = "Warning",
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
export enum PeriodStatus {
|
|
18
|
+
Paid = "Paid",
|
|
19
|
+
NotPaid = "NotPaid",
|
|
20
|
+
}
|
|
21
|
+
|
|
17
22
|
export enum SaveImageStatus {
|
|
18
23
|
SAVE_IMAGE_STATUS_UNSPECIFIED = "SAVE_IMAGE_STATUS_UNSPECIFIED",
|
|
19
24
|
SAVE_IMAGE_STATUS_SUCCESS = "SAVE_IMAGE_STATUS_SUCCESS",
|
|
@@ -35,6 +40,12 @@ export enum InstanceType {
|
|
|
35
40
|
VM = "VM",
|
|
36
41
|
}
|
|
37
42
|
|
|
43
|
+
export enum StorageType {
|
|
44
|
+
StorageTypeUnspecified = "StorageTypeUnspecified",
|
|
45
|
+
LocalStorage = "LocalStorage",
|
|
46
|
+
FileStorage = "FileStorage",
|
|
47
|
+
}
|
|
48
|
+
|
|
38
49
|
export enum InstanceStatus {
|
|
39
50
|
STATUS_UNSPECIFIED = "STATUS_UNSPECIFIED",
|
|
40
51
|
RUNNING = "RUNNING",
|
|
@@ -103,6 +114,22 @@ export type GetContainerInstanceResponse = {
|
|
|
103
114
|
instance?: ContainerInstance
|
|
104
115
|
}
|
|
105
116
|
|
|
117
|
+
export type GetContainerInstanceChargeRequest = {
|
|
118
|
+
regionId?: string
|
|
119
|
+
instanceId?: string
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export type ResourcePeriod = {
|
|
123
|
+
startTimestamp?: string
|
|
124
|
+
endTimestamp?: string
|
|
125
|
+
status?: PeriodStatus
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export type GetContainerInstanceChargeResponse = {
|
|
129
|
+
periods?: ResourcePeriod[]
|
|
130
|
+
isExpiration?: boolean
|
|
131
|
+
}
|
|
132
|
+
|
|
106
133
|
export type ContainerInstance = {
|
|
107
134
|
instanceName?: string
|
|
108
135
|
namespace?: string
|
|
@@ -140,6 +167,7 @@ export type Hardware = {
|
|
|
140
167
|
gpuNum?: number
|
|
141
168
|
gpuType?: ZestuIoApiResourcesV1alpha1Resources.GpuType
|
|
142
169
|
gpuVendor?: string
|
|
170
|
+
freeDataDiskSize?: string
|
|
143
171
|
}
|
|
144
172
|
|
|
145
173
|
export type CreateContainerInstanceRequest = {
|
|
@@ -195,7 +223,8 @@ export type InstanceSpec = {
|
|
|
195
223
|
export type VolumeSpec = {
|
|
196
224
|
sourcePath?: string
|
|
197
225
|
mountPath?: string
|
|
198
|
-
size?:
|
|
226
|
+
size?: string
|
|
227
|
+
storageType?: StorageType
|
|
199
228
|
}
|
|
200
229
|
|
|
201
230
|
export type ServiceEnable = {
|
|
@@ -204,6 +233,17 @@ export type ServiceEnable = {
|
|
|
204
233
|
vscode?: boolean
|
|
205
234
|
}
|
|
206
235
|
|
|
236
|
+
export type RenewContainerInstanceRequest = {
|
|
237
|
+
instanceId?: string
|
|
238
|
+
regionId?: string
|
|
239
|
+
chargeMode?: ZestuIoApiTypesTypes.BillingType
|
|
240
|
+
chargeDuration?: number
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export type RenewContainerInstanceResponse = {
|
|
244
|
+
containerInstance?: ContainerInstance
|
|
245
|
+
}
|
|
246
|
+
|
|
207
247
|
export type StopContainerInstanceRequest = {
|
|
208
248
|
instanceId?: string
|
|
209
249
|
regionId?: string
|
|
@@ -267,6 +307,7 @@ export type UpdateContainerInstanceRequest = {
|
|
|
267
307
|
image?: Image
|
|
268
308
|
schedule?: Schedule
|
|
269
309
|
volumeSpec?: VolumeSpec[]
|
|
310
|
+
instanceSpec?: InstanceSpec
|
|
270
311
|
}
|
|
271
312
|
|
|
272
313
|
export type UpdateContainerInstanceResponse = {
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import * as ZestuIoApiResourcesV1alpha1Resources from "../../resources/v1alpha1/resources.pb"
|
|
8
8
|
import * as ZestuIoApiTypesPage from "../../types/page.pb"
|
|
9
|
+
import * as ZestuIoApiTypesTypes from "../../types/types.pb"
|
|
9
10
|
|
|
10
11
|
export enum RegionStorageStatus {
|
|
11
12
|
unspecified = "unspecified",
|
|
@@ -27,6 +28,12 @@ export enum sortBy {
|
|
|
27
28
|
UpdatedAt = "UpdatedAt",
|
|
28
29
|
}
|
|
29
30
|
|
|
31
|
+
export enum GetStoragePriceRequestResourceType {
|
|
32
|
+
FileStorage = "FileStorage",
|
|
33
|
+
LocalStorage = "LocalStorage",
|
|
34
|
+
Unspecified = "Unspecified",
|
|
35
|
+
}
|
|
36
|
+
|
|
30
37
|
export type InitFileStorageRequest = {
|
|
31
38
|
regionId?: string
|
|
32
39
|
}
|
|
@@ -122,10 +129,13 @@ export type UpdateQuotaResponse = {
|
|
|
122
129
|
|
|
123
130
|
export type GetStoragePriceRequest = {
|
|
124
131
|
regionId?: string
|
|
132
|
+
resourceType?: GetStoragePriceRequestResourceType
|
|
133
|
+
billingType?: ZestuIoApiTypesTypes.BillingType
|
|
125
134
|
}
|
|
126
135
|
|
|
127
136
|
export type GetStoragePriceResponse = {
|
|
128
137
|
price?: ZestuIoApiResourcesV1alpha1Resources.ResourcePrice
|
|
138
|
+
freeSize?: string
|
|
129
139
|
}
|
|
130
140
|
|
|
131
141
|
export type ForceDecreaseQuotaRequest = {
|
|
@@ -45,6 +45,15 @@ export type ListResourcesResponse = {
|
|
|
45
45
|
pagination?: ZestuIoApiTypesPage.Pagination
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
export type GetResourceRequest = {
|
|
49
|
+
regionId?: string
|
|
50
|
+
resourcesId?: string
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type GetResourceResponse = {
|
|
54
|
+
resource?: Resource
|
|
55
|
+
}
|
|
56
|
+
|
|
48
57
|
export type Resource = {
|
|
49
58
|
skuId?: string
|
|
50
59
|
regionId?: string
|
|
@@ -66,6 +75,7 @@ export type ResourceDetail = {
|
|
|
66
75
|
gpuMemory?: string
|
|
67
76
|
gpuCore?: string
|
|
68
77
|
gpuVendor?: string
|
|
78
|
+
dataDiskSize?: string
|
|
69
79
|
}
|
|
70
80
|
|
|
71
81
|
export type ResourceGPU = {
|
|
@@ -9,6 +9,7 @@ export enum NotifyType {
|
|
|
9
9
|
ContainerDeleted = "ContainerDeleted",
|
|
10
10
|
FileStorageDeleteWarning = "FileStorageDeleteWarning",
|
|
11
11
|
FileStorageDeleted = "FileStorageDeleted",
|
|
12
|
+
SubscriptionContainerStopped = "SubscriptionContainerStopped",
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
export type SendShortMessageRequest = {
|
|
@@ -20,10 +20,15 @@ export enum BillingType {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export enum UnitType {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
HOUR = "HOUR",
|
|
24
|
+
THOUSAND_TOKENS = "THOUSAND_TOKENS",
|
|
25
|
+
GB_DAY = "GB_DAY",
|
|
26
|
+
INSTANCE_NUMBER = "INSTANCE_NUMBER",
|
|
27
|
+
PICTURE = "PICTURE",
|
|
28
|
+
DAY = "DAY",
|
|
29
|
+
WEEK = "WEEK",
|
|
30
|
+
MONTH = "MONTH",
|
|
31
|
+
YEAR = "YEAR",
|
|
27
32
|
}
|
|
28
33
|
|
|
29
34
|
export enum Currency {
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import * as fm from "../../../fetch.pb"
|
|
8
8
|
import * as GoogleProtobufEmpty from "../../../google/api/empty.pb"
|
|
9
|
+
import * as ZestuIoApiAuditV1alpha1Audit from "../audit/v1alpha1/audit.pb"
|
|
9
10
|
import * as ZestuIoApiContainerinstanceV1alpha1Containerinstance from "../containerinstance/v1alpha1/containerinstance.pb"
|
|
10
11
|
import * as ZestuIoApiFile_storageV1alpha1Storage from "../file_storage/v1alpha1/storage.pb"
|
|
11
12
|
import * as ZestuIoApiImageV1alpha1Image from "../image/v1alpha1/image.pb"
|
|
@@ -29,9 +30,15 @@ export class ContainerInstance {
|
|
|
29
30
|
static CreateContainerInstance(req: ZestuIoApiContainerinstanceV1alpha1Containerinstance.CreateContainerInstanceRequest, initReq?: fm.InitReq): Promise<ZestuIoApiContainerinstanceV1alpha1Containerinstance.CreateContainerInstanceResponse> {
|
|
30
31
|
return fm.fetchReq<ZestuIoApiContainerinstanceV1alpha1Containerinstance.CreateContainerInstanceRequest, ZestuIoApiContainerinstanceV1alpha1Containerinstance.CreateContainerInstanceResponse>(`/apis/zestu.io/v1/region/${req["regionId"]}/containerinstances`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
31
32
|
}
|
|
33
|
+
static RenewContainerInstance(req: ZestuIoApiContainerinstanceV1alpha1Containerinstance.RenewContainerInstanceRequest, initReq?: fm.InitReq): Promise<ZestuIoApiContainerinstanceV1alpha1Containerinstance.RenewContainerInstanceResponse> {
|
|
34
|
+
return fm.fetchReq<ZestuIoApiContainerinstanceV1alpha1Containerinstance.RenewContainerInstanceRequest, ZestuIoApiContainerinstanceV1alpha1Containerinstance.RenewContainerInstanceResponse>(`/apis/zestu.io/v1/region/${req["regionId"]}/containerinstances/${req["instanceId"]}/renew`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
35
|
+
}
|
|
32
36
|
static GetContainerInstances(req: ZestuIoApiContainerinstanceV1alpha1Containerinstance.GetContainerInstanceRequest, initReq?: fm.InitReq): Promise<ZestuIoApiContainerinstanceV1alpha1Containerinstance.GetContainerInstanceResponse> {
|
|
33
37
|
return fm.fetchReq<ZestuIoApiContainerinstanceV1alpha1Containerinstance.GetContainerInstanceRequest, ZestuIoApiContainerinstanceV1alpha1Containerinstance.GetContainerInstanceResponse>(`/apis/zestu.io/v1/region/${req["regionId"]}/containerinstances/${req["instanceId"]}?${fm.renderURLSearchParams(req, ["regionId", "instanceId"])}`, {...initReq, method: "GET"})
|
|
34
38
|
}
|
|
39
|
+
static GetContainerInstanceCharge(req: ZestuIoApiContainerinstanceV1alpha1Containerinstance.GetContainerInstanceChargeRequest, initReq?: fm.InitReq): Promise<ZestuIoApiContainerinstanceV1alpha1Containerinstance.GetContainerInstanceChargeResponse> {
|
|
40
|
+
return fm.fetchReq<ZestuIoApiContainerinstanceV1alpha1Containerinstance.GetContainerInstanceChargeRequest, ZestuIoApiContainerinstanceV1alpha1Containerinstance.GetContainerInstanceChargeResponse>(`/apis/zestu.io/v1/region/${req["regionId"]}/containerinstances/${req["instanceId"]}/charge?${fm.renderURLSearchParams(req, ["regionId", "instanceId"])}`, {...initReq, method: "GET"})
|
|
41
|
+
}
|
|
35
42
|
static StopContainerInstance(req: ZestuIoApiContainerinstanceV1alpha1Containerinstance.StopContainerInstanceRequest, initReq?: fm.InitReq): Promise<ZestuIoApiContainerinstanceV1alpha1Containerinstance.StopContainerInstanceResponse> {
|
|
36
43
|
return fm.fetchReq<ZestuIoApiContainerinstanceV1alpha1Containerinstance.StopContainerInstanceRequest, ZestuIoApiContainerinstanceV1alpha1Containerinstance.StopContainerInstanceResponse>(`/apis/zestu.io/v1/region/${req["regionId"]}/containerinstances/${req["instanceId"]}/stop`, {...initReq, method: "PATCH", body: JSON.stringify(req)})
|
|
37
44
|
}
|
|
@@ -66,6 +73,9 @@ export class Resources {
|
|
|
66
73
|
static ListResources(req: ZestuIoApiResourcesV1alpha1Resources.ListResourcesRequest, initReq?: fm.InitReq): Promise<ZestuIoApiResourcesV1alpha1Resources.ListResourcesResponse> {
|
|
67
74
|
return fm.fetchReq<ZestuIoApiResourcesV1alpha1Resources.ListResourcesRequest, ZestuIoApiResourcesV1alpha1Resources.ListResourcesResponse>(`/apis/zestu.io/v1/region/${req["regionId"]}/resources?${fm.renderURLSearchParams(req, ["regionId"])}`, {...initReq, method: "GET"})
|
|
68
75
|
}
|
|
76
|
+
static GetResources(req: ZestuIoApiResourcesV1alpha1Resources.GetResourceRequest, initReq?: fm.InitReq): Promise<ZestuIoApiResourcesV1alpha1Resources.GetResourceResponse> {
|
|
77
|
+
return fm.fetchReq<ZestuIoApiResourcesV1alpha1Resources.GetResourceRequest, ZestuIoApiResourcesV1alpha1Resources.GetResourceResponse>(`/apis/zestu.io/v1/region/${req["regionId"]}/resources/${req["resourcesId"]}?${fm.renderURLSearchParams(req, ["regionId", "resourcesId"])}`, {...initReq, method: "GET"})
|
|
78
|
+
}
|
|
69
79
|
static ListResourceModel(req: ZestuIoApiResourcesV1alpha1Resources.ListResourceModelRequest, initReq?: fm.InitReq): Promise<ZestuIoApiResourcesV1alpha1Resources.ListResourceModelResponse> {
|
|
70
80
|
return fm.fetchReq<ZestuIoApiResourcesV1alpha1Resources.ListResourceModelRequest, ZestuIoApiResourcesV1alpha1Resources.ListResourceModelResponse>(`/apis/zestu.io/v1/region/${req["regionId"]}/resources/models?${fm.renderURLSearchParams(req, ["regionId"])}`, {...initReq, method: "GET"})
|
|
71
81
|
}
|
|
@@ -142,6 +152,9 @@ export class Agent {
|
|
|
142
152
|
static SendShortMessage(req: ZestuIoApiSmsV1alpha1Sms.SendShortMessageRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
143
153
|
return fm.fetchReq<ZestuIoApiSmsV1alpha1Sms.SendShortMessageRequest, GoogleProtobufEmpty.Empty>(`/zestu.io.api.v1alpha1.Agent/SendShortMessage`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
144
154
|
}
|
|
155
|
+
static WritAuditLog(req: ZestuIoApiAuditV1alpha1Audit.WritAuditLogRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
156
|
+
return fm.fetchReq<ZestuIoApiAuditV1alpha1Audit.WritAuditLogRequest, GoogleProtobufEmpty.Empty>(`/zestu.io.api.v1alpha1.Agent/WritAuditLog`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
157
|
+
}
|
|
145
158
|
}
|
|
146
159
|
export class Metrics {
|
|
147
160
|
static QueryMetricsRange(req: ZestuIoApiMetricsV1alpha1Metrics.MetricsRangeRequest, initReq?: fm.InitReq): Promise<ZestuIoApiMetricsV1alpha1Metrics.MetricsRangeResponse> {
|