@daocloud-proto/kcoral 0.0.9-2 → 0.0.9-201

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.
@@ -5,6 +5,15 @@
5
5
  */
6
6
 
7
7
  import * as KcoralIoApiTypesPage from "../../types/page.pb"
8
+
9
+ type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
10
+ type OneOf<T> =
11
+ | { [k in keyof T]?: undefined }
12
+ | (
13
+ keyof T extends infer K ?
14
+ (K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
15
+ : never)
16
+ : never);
8
17
  export type ListKCoralClustersRequest = {
9
18
  page?: number
10
19
  pageSize?: number
@@ -15,6 +24,66 @@ export type ListKCoralClustersRequest = {
15
24
  fuzzyName?: string
16
25
  }
17
26
 
27
+
28
+ type BaseClusterDescription = {
29
+ clusterName?: string
30
+ veleroInstalled?: boolean
31
+ running?: boolean
32
+ }
33
+
34
+ export type ClusterDescription = BaseClusterDescription
35
+ & OneOf<{ error: string }>
36
+
18
37
  export type ListKCoralClustersResponse = {
19
- items?: string[]
38
+ items?: ClusterDescription[]
39
+ }
40
+
41
+ export type ListAllUserRoleSummaryRequest = {
42
+ cluster?: string
43
+ namespace?: string
44
+ }
45
+
46
+ export type ListAllUserRoleSummaryResponse = {
47
+ items?: {[key: string]: RoleSummary}
48
+ }
49
+
50
+ export type RoleSummary = {
51
+ clusterRoles?: string[]
52
+ roles?: {[key: string]: RoleNames}
53
+ }
54
+
55
+ export type RoleNames = {
56
+ names?: string[]
57
+ }
58
+
59
+ export type ListClusterPreferredResourcesRequest = {
60
+ cluster?: string
61
+ namespaced?: boolean
62
+ }
63
+
64
+ export type ListClusterPreferredResourcesResponse = {
65
+ resources?: APIResourceList[]
66
+ }
67
+
68
+ export type APIResourceList = {
69
+ groupVersion?: string
70
+ resources?: APIResource[]
71
+ }
72
+
73
+ export type APIResource = {
74
+ name?: string
75
+ namespaced?: boolean
76
+ group?: string
77
+ version?: string
78
+ kind?: string
79
+ }
80
+
81
+ export type CreateResourceRequest = {
82
+ cluster?: string
83
+ namespace?: string
84
+ data?: string[]
85
+ }
86
+
87
+ export type CreateResourceResponse = {
88
+ data?: string[]
20
89
  }
@@ -39,4 +39,5 @@ export type VolumeSnapshotClass = {
39
39
  metadata?: KcoralIoApiTypesObjectmeta.ObjectMeta
40
40
  deletionPolicy?: string
41
41
  parameters?: {[key: string]: string}
42
+ driver?: string
42
43
  }
@@ -26,11 +26,23 @@ export class Kubernetes {
26
26
  static EnableVolumeSnapshotClass(req: KcoralIoApiStorageV1alpha1Volumesnapshotclass.EnableVolumeSnapshotClassRequest, initReq?: fm.InitReq): Promise<KcoralIoApiStorageV1alpha1Volumesnapshotclass.VolumeSnapshotClass> {
27
27
  return fm.fetchReq<KcoralIoApiStorageV1alpha1Volumesnapshotclass.EnableVolumeSnapshotClassRequest, KcoralIoApiStorageV1alpha1Volumesnapshotclass.VolumeSnapshotClass>(`/apis/kcoral.io/v1alpha1/clusters/${req["cluster"]}/enablevolumesnapshotclass/${req["name"]}:enable`, {...initReq, method: "POST", body: JSON.stringify(req)})
28
28
  }
29
+ static ListAllUserRoleSummary(req: KcoralIoApiKcoralclusterV1alpha1Kcoralcluster.ListAllUserRoleSummaryRequest, initReq?: fm.InitReq): Promise<KcoralIoApiKcoralclusterV1alpha1Kcoralcluster.ListAllUserRoleSummaryResponse> {
30
+ return fm.fetchReq<KcoralIoApiKcoralclusterV1alpha1Kcoralcluster.ListAllUserRoleSummaryRequest, KcoralIoApiKcoralclusterV1alpha1Kcoralcluster.ListAllUserRoleSummaryResponse>(`/apis/kcoral.io/v1alpha1/rolesummary?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
31
+ }
32
+ static ListClusterPreferredResources(req: KcoralIoApiKcoralclusterV1alpha1Kcoralcluster.ListClusterPreferredResourcesRequest, initReq?: fm.InitReq): Promise<KcoralIoApiKcoralclusterV1alpha1Kcoralcluster.ListClusterPreferredResourcesResponse> {
33
+ return fm.fetchReq<KcoralIoApiKcoralclusterV1alpha1Kcoralcluster.ListClusterPreferredResourcesRequest, KcoralIoApiKcoralclusterV1alpha1Kcoralcluster.ListClusterPreferredResourcesResponse>(`/apis/kcoral.io/v1alpha1/clusters/${req["cluster"]}/preferredresources?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
34
+ }
35
+ static CreateResource(req: KcoralIoApiKcoralclusterV1alpha1Kcoralcluster.CreateResourceRequest, initReq?: fm.InitReq): Promise<KcoralIoApiKcoralclusterV1alpha1Kcoralcluster.CreateResourceResponse> {
36
+ return fm.fetchReq<KcoralIoApiKcoralclusterV1alpha1Kcoralcluster.CreateResourceRequest, KcoralIoApiKcoralclusterV1alpha1Kcoralcluster.CreateResourceResponse>(`/apis/kcoral.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/resources`, {...initReq, method: "POST", body: JSON.stringify(req)})
37
+ }
29
38
  }
30
39
  export class BackupStorageLocation {
31
40
  static ListBackupStorageLocations(req: KcoralIoApiVeleroV1alpha1Backupstoragelocation.ListBackupStorageLocationsRequest, initReq?: fm.InitReq): Promise<KcoralIoApiVeleroV1alpha1Backupstoragelocation.ListBackupStorageLocationsResponse> {
32
41
  return fm.fetchReq<KcoralIoApiVeleroV1alpha1Backupstoragelocation.ListBackupStorageLocationsRequest, KcoralIoApiVeleroV1alpha1Backupstoragelocation.ListBackupStorageLocationsResponse>(`/apis/kcoral.io/v1alpha1/clusters/${req["cluster"]}/backupstoragelocations?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
33
42
  }
43
+ static ListBackupStorageLocationsWithIdenticalBackend(req: KcoralIoApiVeleroV1alpha1Backupstoragelocation.ListBackupStorageLocationsWithIdenticalBackendRequest, initReq?: fm.InitReq): Promise<KcoralIoApiVeleroV1alpha1Backupstoragelocation.ListBackupStorageLocationsWithIdenticalBackendResponse> {
44
+ return fm.fetchReq<KcoralIoApiVeleroV1alpha1Backupstoragelocation.ListBackupStorageLocationsWithIdenticalBackendRequest, KcoralIoApiVeleroV1alpha1Backupstoragelocation.ListBackupStorageLocationsWithIdenticalBackendResponse>(`/apis/kcoral.io/v1alpha1/clusters/${req["cluster"]}/backupstoragelocationswithidenticalbackend?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
45
+ }
34
46
  static GetBackupStorageLocation(req: KcoralIoApiVeleroV1alpha1Backupstoragelocation.GetBackupStorageLocationRequest, initReq?: fm.InitReq): Promise<KcoralIoApiVeleroV1alpha1Backupstoragelocation.BackupStorageLocation> {
35
47
  return fm.fetchReq<KcoralIoApiVeleroV1alpha1Backupstoragelocation.GetBackupStorageLocationRequest, KcoralIoApiVeleroV1alpha1Backupstoragelocation.BackupStorageLocation>(`/apis/kcoral.io/v1alpha1/clusters/${req["cluster"]}/backupstoragelocations/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "name"])}`, {...initReq, method: "GET"})
36
48
  }
@@ -140,4 +140,5 @@ export type BackupStatus = {
140
140
  progress?: BackupProgress
141
141
  csiVolumeSnapshotsAttempted?: number
142
142
  csiVolumeSnapshotsCompleted?: number
143
+ logUrl?: string
143
144
  }
@@ -19,6 +19,14 @@ export enum BackupStorageLocationStatusBackupStorageLocationPhase {
19
19
  Unavailable = "Unavailable",
20
20
  }
21
21
 
22
+ export type ListBackupStorageLocationsWithIdenticalBackendRequest = {
23
+ cluster?: string
24
+ }
25
+
26
+ export type ListBackupStorageLocationsWithIdenticalBackendResponse = {
27
+ clusterName?: string[]
28
+ }
29
+
22
30
  export type ListBackupStorageLocationsResponse = {
23
31
  items?: BackupStorageLocation[]
24
32
  pagination?: KcoralIoApiTypesPage.Pagination
@@ -129,4 +129,6 @@ export type RestoreStatus = {
129
129
  startTimestamp?: string
130
130
  validationErrors?: string[]
131
131
  warnings?: number
132
+ logUrl?: string
133
+ resultsUrl?: string
132
134
  }
@@ -29,6 +29,7 @@ export type ListSchedulesRequest = {
29
29
  sortDir?: KcoralIoApiTypesPage.SortDir
30
30
  labelSelector?: string
31
31
  fieldSelector?: string
32
+ showScheduleWithoutBackup?: boolean
32
33
  }
33
34
 
34
35
  export type GetScheduleRequest = {
@@ -79,4 +80,5 @@ export type ScheduleStatus = {
79
80
  lastBackup?: string
80
81
  phase?: ScheduleStatusSchedulePhase
81
82
  validationErrors?: string[]
83
+ nextBackup?: string
82
84
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/kcoral",
3
- "version":"0.0.9-2",
3
+ "version":"0.0.9-201",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {