@daocloud-proto/zestu 0.1.0-dev-44247749 → 0.1.0-dev-522cc3b5
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,100 @@
|
|
|
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
|
+
|
|
9
|
+
export enum RegionStorageStatus {
|
|
10
|
+
unspecified = "unspecified",
|
|
11
|
+
uninitialized = "uninitialized",
|
|
12
|
+
created = "created",
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export enum SelectionType {
|
|
16
|
+
FILE = "FILE",
|
|
17
|
+
DIRECTORY = "DIRECTORY",
|
|
18
|
+
ALL = "ALL",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export enum sortBy {
|
|
22
|
+
Name = "Name",
|
|
23
|
+
Size = "Size",
|
|
24
|
+
UpdatedAt = "UpdatedAt",
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type InitFileStorageRequest = {
|
|
28
|
+
regionId?: string
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type InitFileStorageResponse = {
|
|
32
|
+
initializedAt?: string
|
|
33
|
+
defaultQuota?: string
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type ListDirectoriesAndFilesRequest = {
|
|
37
|
+
regionId?: string
|
|
38
|
+
dirPath?: string
|
|
39
|
+
page?: number
|
|
40
|
+
pageSize?: number
|
|
41
|
+
sortBy?: sortBy
|
|
42
|
+
sortDir?: ZestuIoApiTypesPage.SortDir
|
|
43
|
+
type?: SelectionType
|
|
44
|
+
fuzzyName?: string
|
|
45
|
+
recursive?: boolean
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export type FileInfo = {
|
|
49
|
+
name?: string
|
|
50
|
+
fullPath?: string
|
|
51
|
+
size?: string
|
|
52
|
+
updatedAt?: string
|
|
53
|
+
isDir?: boolean
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export type ListDirectoriesAndFilesResponse = {
|
|
57
|
+
items?: FileInfo[]
|
|
58
|
+
pagination?: ZestuIoApiTypesPage.Pagination
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export type GetStorageDetailsRequest = {
|
|
62
|
+
regionId?: string
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export type GetStorageDetailsResponse = {
|
|
66
|
+
status?: RegionStorageStatus
|
|
67
|
+
currentUsage?: string
|
|
68
|
+
quota?: string
|
|
69
|
+
userMaxQuota?: string
|
|
70
|
+
userDefaultQuota?: string
|
|
71
|
+
freeSize?: string
|
|
72
|
+
mountPath?: string
|
|
73
|
+
initializedAt?: string
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export type DeleteFileRequest = {
|
|
77
|
+
regionId?: string
|
|
78
|
+
filename?: string
|
|
79
|
+
dirPath?: string
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export type GenerateFileUploadSignatureRequest = {
|
|
83
|
+
regionId?: string
|
|
84
|
+
filename?: string
|
|
85
|
+
dirPath?: string
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export type GenerateFileUploadSignatureResponse = {
|
|
89
|
+
signatureUrl?: string
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export type GenerateFileDownloadSignatureRequest = {
|
|
93
|
+
regionId?: string
|
|
94
|
+
filename?: string
|
|
95
|
+
dirPath?: string
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export type GenerateFileDownloadSignatureResponse = {
|
|
99
|
+
signatureUrl?: string
|
|
100
|
+
}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import * as fm from "../../../fetch.pb"
|
|
8
8
|
import * as GoogleProtobufEmpty from "../../../google/api/empty.pb"
|
|
9
9
|
import * as ZestuIoApiContainerinstanceV1alpha1Containerinstance from "../containerinstance/v1alpha1/containerinstance.pb"
|
|
10
|
+
import * as ZestuIoApiFile_storageV1alpha1Storage from "../file_storage/v1alpha1/storage.pb"
|
|
10
11
|
import * as ZestuIoApiRegionV1alpha1Region from "../region/v1alpha1/region.pb"
|
|
11
12
|
export class ContainerInstance {
|
|
12
13
|
static ListContainerInstances(req: ZestuIoApiContainerinstanceV1alpha1Containerinstance.ListContainerInstancesRequest, initReq?: fm.InitReq): Promise<ZestuIoApiContainerinstanceV1alpha1Containerinstance.ListContainerInstancesResponse> {
|
|
@@ -41,4 +42,24 @@ export class Region {
|
|
|
41
42
|
static ListRegions(req: GoogleProtobufEmpty.Empty, initReq?: fm.InitReq): Promise<ZestuIoApiRegionV1alpha1Region.ListRegionsResponse> {
|
|
42
43
|
return fm.fetchReq<GoogleProtobufEmpty.Empty, ZestuIoApiRegionV1alpha1Region.ListRegionsResponse>(`/apis/zestu.io/v1/regions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
43
44
|
}
|
|
45
|
+
}
|
|
46
|
+
export class FileStorage {
|
|
47
|
+
static GetStorageDetails(req: ZestuIoApiFile_storageV1alpha1Storage.GetStorageDetailsRequest, initReq?: fm.InitReq): Promise<ZestuIoApiFile_storageV1alpha1Storage.GetStorageDetailsResponse> {
|
|
48
|
+
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"})
|
|
49
|
+
}
|
|
50
|
+
static InitFileStorage(req: ZestuIoApiFile_storageV1alpha1Storage.InitFileStorageRequest, initReq?: fm.InitReq): Promise<ZestuIoApiFile_storageV1alpha1Storage.InitFileStorageResponse> {
|
|
51
|
+
return fm.fetchReq<ZestuIoApiFile_storageV1alpha1Storage.InitFileStorageRequest, ZestuIoApiFile_storageV1alpha1Storage.InitFileStorageResponse>(`/apis/zestu.io/v1/region/${req["regionId"]}/filestorage/init`, {...initReq, method: "POST"})
|
|
52
|
+
}
|
|
53
|
+
static ListDirectoriesAndFiles(req: ZestuIoApiFile_storageV1alpha1Storage.ListDirectoriesAndFilesRequest, initReq?: fm.InitReq): Promise<ZestuIoApiFile_storageV1alpha1Storage.ListDirectoriesAndFilesResponse> {
|
|
54
|
+
return fm.fetchReq<ZestuIoApiFile_storageV1alpha1Storage.ListDirectoriesAndFilesRequest, ZestuIoApiFile_storageV1alpha1Storage.ListDirectoriesAndFilesResponse>(`/apis/zestu.io/v1/region/${req["regionId"]}/filestorage?${fm.renderURLSearchParams(req, ["regionId"])}`, {...initReq, method: "GET"})
|
|
55
|
+
}
|
|
56
|
+
static GenerateFileDownloadSignature(req: ZestuIoApiFile_storageV1alpha1Storage.GenerateFileDownloadSignatureRequest, initReq?: fm.InitReq): Promise<ZestuIoApiFile_storageV1alpha1Storage.GenerateFileDownloadSignatureResponse> {
|
|
57
|
+
return fm.fetchReq<ZestuIoApiFile_storageV1alpha1Storage.GenerateFileDownloadSignatureRequest, ZestuIoApiFile_storageV1alpha1Storage.GenerateFileDownloadSignatureResponse>(`/apis/zestu.io/v1/region/${req["regionId"]}/filestorage/file/downloadsignature`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
58
|
+
}
|
|
59
|
+
static GenerateFileUploadSignature(req: ZestuIoApiFile_storageV1alpha1Storage.GenerateFileUploadSignatureRequest, initReq?: fm.InitReq): Promise<ZestuIoApiFile_storageV1alpha1Storage.GenerateFileUploadSignatureResponse> {
|
|
60
|
+
return fm.fetchReq<ZestuIoApiFile_storageV1alpha1Storage.GenerateFileUploadSignatureRequest, ZestuIoApiFile_storageV1alpha1Storage.GenerateFileUploadSignatureResponse>(`/apis/zestu.io/v1/region/${req["regionId"]}/filestorage/file/uploadsignature`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
61
|
+
}
|
|
62
|
+
static DeleteFile(req: ZestuIoApiFile_storageV1alpha1Storage.DeleteFileRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
63
|
+
return fm.fetchReq<ZestuIoApiFile_storageV1alpha1Storage.DeleteFileRequest, GoogleProtobufEmpty.Empty>(`/apis/zestu.io/v1/region/${req["regionId"]}/filestorage/file`, {...initReq, method: "DELETE"})
|
|
64
|
+
}
|
|
44
65
|
}
|