@daocloud-proto/hydra 0.0.0-dev-593036d8 → 0.0.0-dev-df7fe94b
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.
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import * as HydraCommonCommon from "../../../common/common.pb"
|
|
8
8
|
import * as fm from "../../../fetch.pb"
|
|
9
9
|
import * as GoogleProtobufEmpty from "../../../google/protobuf/empty.pb"
|
|
10
|
+
import * as HydraManagement_apiCoreV1alpha1Permissions from "../../../management-api/core/v1alpha1/permissions.pb"
|
|
10
11
|
import * as HydraManagement_apiWorkspaceV1alpha1Workspace from "../../../management-api/workspace/v1alpha1/workspace.pb"
|
|
11
12
|
export type ListClusterRequest = {
|
|
12
13
|
page?: HydraCommonCommon.Pagination
|
|
@@ -22,6 +23,10 @@ export type ConstantsResponse = {
|
|
|
22
23
|
defaultMountPath?: string
|
|
23
24
|
}
|
|
24
25
|
|
|
26
|
+
export type ListPlatformRolePermissionsForCurrentUserResponse = {
|
|
27
|
+
permissions?: HydraManagement_apiCoreV1alpha1Permissions.Permission[]
|
|
28
|
+
}
|
|
29
|
+
|
|
25
30
|
export class CoreService {
|
|
26
31
|
static AdminListCluster(req: ListClusterRequest, initReq?: fm.InitReq): Promise<ListClusterResponse> {
|
|
27
32
|
return fm.fetchReq<ListClusterRequest, ListClusterResponse>(`/apis/admin.hydra.io/v1alpha1/clusters?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -29,4 +34,7 @@ export class CoreService {
|
|
|
29
34
|
static AdminListConstants(req: GoogleProtobufEmpty.Empty, initReq?: fm.InitReq): Promise<ConstantsResponse> {
|
|
30
35
|
return fm.fetchReq<GoogleProtobufEmpty.Empty, ConstantsResponse>(`/apis/admin.hydra.io/v1alpha1/constants?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
31
36
|
}
|
|
37
|
+
static ListPlatformRolePermissionsForCurrentUser(req: GoogleProtobufEmpty.Empty, initReq?: fm.InitReq): Promise<ListPlatformRolePermissionsForCurrentUserResponse> {
|
|
38
|
+
return fm.fetchReq<GoogleProtobufEmpty.Empty, ListPlatformRolePermissionsForCurrentUserResponse>(`/apis/admin.hydra.io/v1alpha1/permissions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
39
|
+
}
|
|
32
40
|
}
|
|
@@ -5,26 +5,44 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as fm from "../../../fetch.pb"
|
|
8
|
-
export type ListRolePermissionsByWorkspaceForCurrentUserRequest = {
|
|
9
|
-
workspace?: number
|
|
10
|
-
}
|
|
11
8
|
|
|
12
|
-
export
|
|
13
|
-
|
|
9
|
+
export enum Permission {
|
|
10
|
+
MODEL_GET = "MODEL_GET",
|
|
11
|
+
MODEL_CREATE = "MODEL_CREATE",
|
|
12
|
+
MODEL_UPDATE = "MODEL_UPDATE",
|
|
13
|
+
MODEL_DELETE = "MODEL_DELETE",
|
|
14
|
+
MAAS_MODEL_GET = "MAAS_MODEL_GET",
|
|
15
|
+
MAAS_MODEL_CREATE = "MAAS_MODEL_CREATE",
|
|
16
|
+
MAAS_MODEL_UPDATE = "MAAS_MODEL_UPDATE",
|
|
17
|
+
MODEL_SERVING_GET = "MODEL_SERVING_GET",
|
|
18
|
+
MODEL_SERVING_CREATE = "MODEL_SERVING_CREATE",
|
|
19
|
+
MODEL_SERVING_UPDATE = "MODEL_SERVING_UPDATE",
|
|
20
|
+
MODEL_SERVING_DELETE = "MODEL_SERVING_DELETE",
|
|
21
|
+
APIKEY_GET = "APIKEY_GET",
|
|
22
|
+
APIKEY_CREATE = "APIKEY_CREATE",
|
|
23
|
+
APIKEY_DELETE = "APIKEY_DELETE",
|
|
24
|
+
CLUSTER_GET = "CLUSTER_GET",
|
|
25
|
+
FILES_STORAGE_GET = "FILES_STORAGE_GET",
|
|
26
|
+
FILES_STORAGE_CREATE = "FILES_STORAGE_CREATE",
|
|
27
|
+
FILES_STORAGE_UPDATE = "FILES_STORAGE_UPDATE",
|
|
28
|
+
FILES_STORAGE_DELETE = "FILES_STORAGE_DELETE",
|
|
29
|
+
QUEUE_GET = "QUEUE_GET",
|
|
30
|
+
QUEUE_CREATE = "QUEUE_CREATE",
|
|
31
|
+
QUEUE_UPDATE = "QUEUE_UPDATE",
|
|
32
|
+
QUEUE_DELETE = "QUEUE_DELETE",
|
|
33
|
+
ALL = "ALL",
|
|
14
34
|
}
|
|
15
35
|
|
|
16
|
-
export type
|
|
36
|
+
export type ListRolePermissionsByWorkspaceForCurrentUserRequest = {
|
|
37
|
+
workspace?: number
|
|
17
38
|
}
|
|
18
39
|
|
|
19
|
-
export type
|
|
20
|
-
permissions?:
|
|
40
|
+
export type ListRolePermissionsByWorkspaceForCurrentUserResponse = {
|
|
41
|
+
permissions?: Permission[]
|
|
21
42
|
}
|
|
22
43
|
|
|
23
44
|
export class Core {
|
|
24
45
|
static ListRolePermissionsByWorkspaceForCurrentUser(req: ListRolePermissionsByWorkspaceForCurrentUserRequest, initReq?: fm.InitReq): Promise<ListRolePermissionsByWorkspaceForCurrentUserResponse> {
|
|
25
46
|
return fm.fetchReq<ListRolePermissionsByWorkspaceForCurrentUserRequest, ListRolePermissionsByWorkspaceForCurrentUserResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/permissions?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
26
47
|
}
|
|
27
|
-
static ListPlatformRolePermissionsForCurrentUser(req: ListPlatformRolePermissionsForCurrentUserRequest, initReq?: fm.InitReq): Promise<ListPlatformRolePermissionsForCurrentUserResponse> {
|
|
28
|
-
return fm.fetchReq<ListPlatformRolePermissionsForCurrentUserRequest, ListPlatformRolePermissionsForCurrentUserResponse>(`/apis/hydra.io/v1alpha1/permissions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
29
|
-
}
|
|
30
48
|
}
|