@daocloud-proto/hydra 0.11.0-dev-44 → 0.11.0-dev-48

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.
@@ -10,6 +10,12 @@ export type RegisterServerRequest = {
10
10
  clusterName?: string
11
11
  serverName?: string
12
12
  host?: string
13
+ grpcConfig?: GRPCConfig
14
+ }
15
+
16
+ export type GRPCConfig = {
17
+ plaintext?: boolean
18
+ insecure?: boolean
13
19
  }
14
20
 
15
21
  export type UnregisterServerRequest = {
@@ -60,6 +60,14 @@ export type DeleteAPIKeyRequest = {
60
60
  id?: string
61
61
  }
62
62
 
63
+ export type CheckAPIKeyCreationRequest = {
64
+ }
65
+
66
+ export type CheckAPIKeyCreationResponse = {
67
+ allowed?: boolean
68
+ reason?: string
69
+ }
70
+
63
71
  export type WSAPIKeyUsageStatisticsRequest = {
64
72
  startTime?: GoogleProtobufTimestamp.Timestamp
65
73
  endTime?: GoogleProtobufTimestamp.Timestamp
@@ -107,6 +115,9 @@ export class APIKeyManagement {
107
115
  static GetAPIKeyUsageStatistics(req: APIKeyUsageStatisticsRequest, initReq?: fm.InitReq): Promise<APIKeyUsageStatisticsResponse> {
108
116
  return fm.fetchReq<APIKeyUsageStatisticsRequest, APIKeyUsageStatisticsResponse>(`/apis/hydra.io/v1alpha1/apikeys-stats`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
109
117
  }
118
+ static CheckAPIKeyCreation(req: CheckAPIKeyCreationRequest, initReq?: fm.InitReq): Promise<CheckAPIKeyCreationResponse> {
119
+ return fm.fetchReq<CheckAPIKeyCreationRequest, CheckAPIKeyCreationResponse>(`/apis/hydra.io/v1alpha1/apikeys/check-creation`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
120
+ }
110
121
  }
111
122
  export class WSAPIKeyManagement {
112
123
  static CreateWSAPIKey(req: CreateWSAPIKeyRequest, initReq?: fm.InitReq): Promise<APIKey> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/hydra",
3
- "version": "v0.11.0-dev-44",
3
+ "version": "v0.11.0-dev-48",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"