@daocloud-proto/hydra 0.17.0-rc1-dev-17 → 0.17.0-rc1-dev-21

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 = {
@@ -152,17 +152,6 @@ export type RegenerateWSAPIKeyRequest = {
152
152
  workspace?: number
153
153
  }
154
154
 
155
- export type RevealAPIKeySecretRequest = {
156
- id?: string
157
- password?: string
158
- }
159
-
160
- export type RevealWSAPIKeySecretRequest = {
161
- id?: string
162
- workspace?: number
163
- password?: string
164
- }
165
-
166
155
  export type DeleteAPIKeyRequest = {
167
156
  id?: string
168
157
  }
@@ -254,9 +243,6 @@ export class APIKeyManagement {
254
243
  static RegenerateAPIKey(req: RegenerateAPIKeyRequest, initReq?: fm.InitReq): Promise<APIKeySecret> {
255
244
  return fm.fetchReq<RegenerateAPIKeyRequest, APIKeySecret>(`/apis/hydra.io/v1alpha1/apikeys/${req["id"]}/regenerate`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
256
245
  }
257
- static RevealAPIKeySecret(req: RevealAPIKeySecretRequest, initReq?: fm.InitReq): Promise<APIKeySecret> {
258
- return fm.fetchReq<RevealAPIKeySecretRequest, APIKeySecret>(`/apis/hydra.io/v1alpha1/apikeys/${req["id"]}/reveal-secret`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
259
- }
260
246
  static GetAPIKeyUsageStatistics(req: APIKeyUsageStatisticsRequest, initReq?: fm.InitReq): Promise<APIKeyUsageStatisticsResponse> {
261
247
  return fm.fetchReq<APIKeyUsageStatisticsRequest, APIKeyUsageStatisticsResponse>(`/apis/hydra.io/v1alpha1/apikeys-stats`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
262
248
  }
@@ -295,9 +281,6 @@ export class WSAPIKeyManagement {
295
281
  static RegenerateWSAPIKey(req: RegenerateWSAPIKeyRequest, initReq?: fm.InitReq): Promise<APIKeySecret> {
296
282
  return fm.fetchReq<RegenerateWSAPIKeyRequest, APIKeySecret>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/apikeys/${req["id"]}/regenerate`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
297
283
  }
298
- static RevealWSAPIKeySecret(req: RevealWSAPIKeySecretRequest, initReq?: fm.InitReq): Promise<APIKeySecret> {
299
- return fm.fetchReq<RevealWSAPIKeySecretRequest, APIKeySecret>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/apikeys/${req["id"]}/reveal-secret`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
300
- }
301
284
  static GetAPIKeyUsageStatistics(req: WSAPIKeyUsageStatisticsRequest, initReq?: fm.InitReq): Promise<APIKeyUsageStatisticsResponse> {
302
285
  return fm.fetchReq<WSAPIKeyUsageStatisticsRequest, APIKeyUsageStatisticsResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/apikeys-stats`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
303
286
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/hydra",
3
- "version": "v0.17.0-rc1-dev-17",
3
+ "version": "v0.17.0-rc1-dev-21",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"