@daocloud-proto/hydra 0.16.0-dev-12 → 0.16.0-dev-13
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.
|
@@ -85,6 +85,16 @@ export type DeleteWSAPIKeyRequest = {
|
|
|
85
85
|
workspace?: number
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
export type GetWSAPIKeySecretRequest = {
|
|
89
|
+
id?: string
|
|
90
|
+
workspace?: number
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export type APIKeySecret = {
|
|
94
|
+
id?: string
|
|
95
|
+
key?: string
|
|
96
|
+
}
|
|
97
|
+
|
|
88
98
|
export type UpdateWSAPIKeyQuotaRequest = {
|
|
89
99
|
id?: string
|
|
90
100
|
workspace?: number
|
|
@@ -177,6 +187,12 @@ export class WSAPIKeyManagement {
|
|
|
177
187
|
static ListMyWSAPIKeys(req: ListWSAPIKeyRequest, initReq?: fm.InitReq): Promise<ListAPIKeyResponse> {
|
|
178
188
|
return fm.fetchReq<ListWSAPIKeyRequest, ListAPIKeyResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/my-apikeys?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
179
189
|
}
|
|
190
|
+
static ListWSAPIKeyMasked(req: ListWSAPIKeyRequest, initReq?: fm.InitReq): Promise<ListAPIKeyResponse> {
|
|
191
|
+
return fm.fetchReq<ListWSAPIKeyRequest, ListAPIKeyResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/masked-apikeys?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
192
|
+
}
|
|
193
|
+
static GetWSAPIKeySecret(req: GetWSAPIKeySecretRequest, initReq?: fm.InitReq): Promise<APIKeySecret> {
|
|
194
|
+
return fm.fetchReq<GetWSAPIKeySecretRequest, APIKeySecret>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/apikeys/${req["id"]}/secret?${fm.renderURLSearchParams(req, ["workspace", "id"])}`, {...initReq, method: "GET"})
|
|
195
|
+
}
|
|
180
196
|
static DeleteWSAPIKey(req: DeleteWSAPIKeyRequest, initReq?: fm.InitReq): Promise<APIKey> {
|
|
181
197
|
return fm.fetchReq<DeleteWSAPIKeyRequest, APIKey>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/apikeys/${req["id"]}`, {...initReq, method: "DELETE", body: JSON.stringify(req, fm.replacer)})
|
|
182
198
|
}
|