@daocloud-proto/hydra 0.18.0-dev-14 → 0.18.0-dev-17

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.
@@ -22,6 +22,7 @@ export enum AdminPermission {
22
22
  FILES_STORAGE_CREATE = "FILES_STORAGE_CREATE",
23
23
  FILES_STORAGE_UPDATE = "FILES_STORAGE_UPDATE",
24
24
  FILES_STORAGE_DELETE = "FILES_STORAGE_DELETE",
25
+ BASIC_INFO_GET = "BASIC_INFO_GET",
25
26
  }
26
27
 
27
28
  export enum ExportModule {
@@ -44,6 +45,72 @@ export type ConstantsResponse = {
44
45
  defaultModelServingPort?: number
45
46
  }
46
47
 
48
+ export type APIKeyInfo = {
49
+ id?: string
50
+ name?: string
51
+ workspace?: number
52
+ userId?: string
53
+ }
54
+
55
+ export type UserInfo = {
56
+ id?: string
57
+ name?: string
58
+ }
59
+
60
+ export type AccountBasicInfo = {
61
+ id?: string
62
+ name?: string
63
+ hasSubAccount?: boolean
64
+ }
65
+
66
+ export type ListAPIKeysRequest = {
67
+ accountID?: string
68
+ subAccountID?: string
69
+ page?: HydraCommonCommon.Pagination
70
+ }
71
+
72
+ export type ListAPIKeysResponse = {
73
+ items?: APIKeyInfo[]
74
+ page?: HydraCommonCommon.Pagination
75
+ }
76
+
77
+ export type ListUsersRequest = {
78
+ workspace?: number
79
+ name?: string
80
+ page?: HydraCommonCommon.Pagination
81
+ }
82
+
83
+ export type ListUsersResponse = {
84
+ items?: UserInfo[]
85
+ page?: HydraCommonCommon.Pagination
86
+ }
87
+
88
+ export type ListAccountsRequest = {
89
+ name?: string
90
+ page?: HydraCommonCommon.Pagination
91
+ }
92
+
93
+ export type ListAccountsResponse = {
94
+ items?: AccountBasicInfo[]
95
+ page?: HydraCommonCommon.Pagination
96
+ }
97
+
98
+ export type ListSubAccountsRequest = {
99
+ accountId?: string
100
+ name?: string
101
+ page?: HydraCommonCommon.Pagination
102
+ }
103
+
104
+ export type SubAccountInfo = {
105
+ id?: string
106
+ name?: string
107
+ }
108
+
109
+ export type ListSubAccountsResponse = {
110
+ items?: SubAccountInfo[]
111
+ page?: HydraCommonCommon.Pagination
112
+ }
113
+
47
114
  export type ListPlatformRolePermissionsForCurrentUserResponse = {
48
115
  permissions?: AdminPermission[]
49
116
  }
@@ -148,4 +215,16 @@ export class CoreService {
148
215
  static AdminListPersistentVolumeClaims(req: AdminListPersistentVolumeClaimsRequest, initReq?: fm.InitReq): Promise<AdminListPersistentVolumeClaimsResponse> {
149
216
  return fm.fetchReq<AdminListPersistentVolumeClaimsRequest, AdminListPersistentVolumeClaimsResponse>(`/apis/admin.hydra.io/v1alpha1/clusters/${req["cluster"]}/persistentvolumeclaims?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
150
217
  }
218
+ static AdminListUsers(req: ListUsersRequest, initReq?: fm.InitReq): Promise<ListUsersResponse> {
219
+ return fm.fetchReq<ListUsersRequest, ListUsersResponse>(`/apis/admin.hydra.io/v1alpha1/users?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
220
+ }
221
+ static AdminListAPIKeys(req: ListAPIKeysRequest, initReq?: fm.InitReq): Promise<ListAPIKeysResponse> {
222
+ return fm.fetchReq<ListAPIKeysRequest, ListAPIKeysResponse>(`/apis/admin.hydra.io/v1alpha1/apikeys?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
223
+ }
224
+ static AdminListAccounts(req: ListAccountsRequest, initReq?: fm.InitReq): Promise<ListAccountsResponse> {
225
+ return fm.fetchReq<ListAccountsRequest, ListAccountsResponse>(`/apis/admin.hydra.io/v1alpha1/accounts?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
226
+ }
227
+ static AdminListSubAccounts(req: ListSubAccountsRequest, initReq?: fm.InitReq): Promise<ListSubAccountsResponse> {
228
+ return fm.fetchReq<ListSubAccountsRequest, ListSubAccountsResponse>(`/apis/admin.hydra.io/v1alpha1/accounts/${req["accountId"]}/subaccounts?${fm.renderURLSearchParams(req, ["accountId"])}`, {...initReq, method: "GET"})
229
+ }
151
230
  }
@@ -140,8 +140,18 @@ export type CreateMAASModelRequest = {
140
140
  tokenWeight?: string
141
141
  workspaceVisibility?: MAASWorkspaceVisibility
142
142
  capabilityRoutes?: MAASCapabilityRoute[]
143
+ modelRatelimitConfig?: ModelRatelimitConfig
143
144
  }
144
145
 
146
+
147
+ type BaseModelRatelimitConfig = {
148
+ enabled?: boolean
149
+ }
150
+
151
+ export type ModelRatelimitConfig = BaseModelRatelimitConfig
152
+ & OneOf<{ rpm: number }>
153
+ & OneOf<{ tpm: number }>
154
+
145
155
  export type MAASModel = {
146
156
  model?: HydraAdmin_apiModelV1alpha1Model.Model
147
157
  upstreamModels?: UpstreamModel[]
@@ -156,6 +166,7 @@ export type MAASModel = {
156
166
  capabilityRoutes?: MAASCapabilityRoute[]
157
167
  healthStatus?: MAASModelHealthStatus
158
168
  clusterStatus?: HydraManagement_apiWorkspaceV1alpha1Workspace.ClusterStatus
169
+ modelRatelimitConfig?: ModelRatelimitConfig
159
170
  }
160
171
 
161
172
  export type LoadBalanceConfig = {
@@ -236,6 +247,7 @@ export type UpdateMAASModelRequest = {
236
247
  tokenWeight?: string
237
248
  workspaceVisibility?: MAASWorkspaceVisibility
238
249
  capabilityRoutes?: MAASCapabilityRoute[]
250
+ modelRatelimitConfig?: ModelRatelimitConfig
239
251
  }
240
252
 
241
253
  export type UpdateMAASModelStatusRequest = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/hydra",
3
- "version": "v0.18.0-dev-14",
3
+ "version": "v0.18.0-dev-17",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"