@daocloud-proto/hydra 0.0.0-dev-4751b54b → 0.0.0-dev-94d4b7a0
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.
|
@@ -84,6 +84,13 @@ export type DeleteWSAPIKeyRequest = {
|
|
|
84
84
|
workspace?: number
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
+
export type UpdateWSAPIKeyQuotaRequest = {
|
|
88
|
+
id?: string
|
|
89
|
+
workspace?: number
|
|
90
|
+
quota?: string
|
|
91
|
+
unlimitedQuota?: boolean
|
|
92
|
+
}
|
|
93
|
+
|
|
87
94
|
export type DeleteAPIKeyRequest = {
|
|
88
95
|
id?: string
|
|
89
96
|
}
|
|
@@ -161,6 +168,9 @@ export class WSAPIKeyManagement {
|
|
|
161
168
|
static DeleteWSAPIKey(req: DeleteWSAPIKeyRequest, initReq?: fm.InitReq): Promise<APIKey> {
|
|
162
169
|
return fm.fetchReq<DeleteWSAPIKeyRequest, APIKey>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/apikeys/${req["id"]}`, {...initReq, method: "DELETE", body: JSON.stringify(req, fm.replacer)})
|
|
163
170
|
}
|
|
171
|
+
static UpdateWSAPIKeyQuota(req: UpdateWSAPIKeyQuotaRequest, initReq?: fm.InitReq): Promise<APIKey> {
|
|
172
|
+
return fm.fetchReq<UpdateWSAPIKeyQuotaRequest, APIKey>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/apikeys/${req["id"]}/quota`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
173
|
+
}
|
|
164
174
|
static GetAPIKeyUsageStatistics(req: WSAPIKeyUsageStatisticsRequest, initReq?: fm.InitReq): Promise<APIKeyUsageStatisticsResponse> {
|
|
165
175
|
return fm.fetchReq<WSAPIKeyUsageStatisticsRequest, APIKeyUsageStatisticsResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/apikeys-stats`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
166
176
|
}
|