@daocloud-proto/hydra 0.17.0-rc1-dev-19 → 0.17.0-rc1-dev-22
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.
|
@@ -28,6 +28,12 @@ export enum RateLimitBaseOn {
|
|
|
28
28
|
RATE_LIMIT_BASE_ON_WS = "RATE_LIMIT_BASE_ON_WS",
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
export enum RateLimitUnitType {
|
|
32
|
+
RATE_LIMIT_UNIT_TYPE_UNSPECIFIED = "RATE_LIMIT_UNIT_TYPE_UNSPECIFIED",
|
|
33
|
+
RATE_LIMIT_UNIT_TYPE_REQUESTS = "RATE_LIMIT_UNIT_TYPE_REQUESTS",
|
|
34
|
+
RATE_LIMIT_UNIT_TYPE_TOTAL_TOKENS = "RATE_LIMIT_UNIT_TYPE_TOTAL_TOKENS",
|
|
35
|
+
}
|
|
36
|
+
|
|
31
37
|
export enum MAASBackendStatus {
|
|
32
38
|
MAAS_BACKEND_STATUS_UNSPECIFIED = "MAAS_BACKEND_STATUS_UNSPECIFIED",
|
|
33
39
|
MAAS_BACKEND_STATUS_HEALTHY = "MAAS_BACKEND_STATUS_HEALTHY",
|
|
@@ -101,6 +107,7 @@ export type RateLimitRule = {
|
|
|
101
107
|
duration?: number
|
|
102
108
|
workspace?: number
|
|
103
109
|
apiKey?: string
|
|
110
|
+
unitType?: RateLimitUnitType
|
|
104
111
|
}
|
|
105
112
|
|
|
106
113
|
export type MAASCapabilityRoute = {
|
|
@@ -48,6 +48,7 @@ export enum APIKeyUsageQueryStatus {
|
|
|
48
48
|
|
|
49
49
|
export type CreateWSAPIKeyRequest = BaseCreateWSAPIKeyRequest
|
|
50
50
|
& OneOf<{ expireTime: GoogleProtobufTimestamp.Timestamp }>
|
|
51
|
+
& OneOf<{ userId: string }>
|
|
51
52
|
|
|
52
53
|
|
|
53
54
|
/* hydra modified */ export type BaseCreateAPIKeyRequest = {
|
|
@@ -87,6 +87,25 @@ export type ListConfigMapsResponse = {
|
|
|
87
87
|
page?: HydraCommonCommon.Pagination
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
+
export type ListWorkspaceMembersRequest = {
|
|
91
|
+
workspace?: number
|
|
92
|
+
page?: HydraCommonCommon.Pagination
|
|
93
|
+
memberName?: string
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export type WorkspaceMember = {
|
|
97
|
+
userId?: string
|
|
98
|
+
memberName?: string
|
|
99
|
+
firstname?: string
|
|
100
|
+
lastname?: string
|
|
101
|
+
roleNames?: string[]
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export type ListWorkspaceMembersResponse = {
|
|
105
|
+
items?: WorkspaceMember[]
|
|
106
|
+
page?: HydraCommonCommon.Pagination
|
|
107
|
+
}
|
|
108
|
+
|
|
90
109
|
export class WorkspaceService {
|
|
91
110
|
static ListWorkspaces(req: ListWorkspaceRequest, initReq?: fm.InitReq): Promise<ListWorkspacesResponse> {
|
|
92
111
|
return fm.fetchReq<ListWorkspaceRequest, ListWorkspacesResponse>(`/apis/hydra.io/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -100,4 +119,7 @@ export class WorkspaceService {
|
|
|
100
119
|
static ListConfigMaps(req: ListConfigMapsRequest, initReq?: fm.InitReq): Promise<ListConfigMapsResponse> {
|
|
101
120
|
return fm.fetchReq<ListConfigMapsRequest, ListConfigMapsResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/configmaps?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
102
121
|
}
|
|
122
|
+
static ListWorkspaceMembers(req: ListWorkspaceMembersRequest, initReq?: fm.InitReq): Promise<ListWorkspaceMembersResponse> {
|
|
123
|
+
return fm.fetchReq<ListWorkspaceMembersRequest, ListWorkspaceMembersResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/workspace-members?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
124
|
+
}
|
|
103
125
|
}
|