@lwshen/vault-hub-ts-fetch-client 0.20250819.61852 → 0.20250819.95832
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.
- package/.openapi-generator/FILES +2 -1
- package/README.md +2 -2
- package/dist/apis/APIKeyApi.d.ts +3 -3
- package/dist/apis/APIKeyApi.js +31 -52
- package/dist/models/APIKeysResponse.d.ts +3 -3
- package/dist/models/APIKeysResponse.js +3 -3
- package/dist/models/AuditLog.d.ts +3 -3
- package/dist/models/AuditLog.js +3 -3
- package/dist/models/CreateAPIKeyResponse.d.ts +3 -3
- package/dist/models/CreateAPIKeyResponse.js +3 -3
- package/dist/models/EnableClientEncryption.d.ts +25 -0
- package/dist/models/EnableClientEncryption.js +51 -0
- package/dist/models/{APIKey.d.ts → VaultAPIKey.d.ts} +16 -16
- package/dist/models/{APIKey.js → VaultAPIKey.js} +13 -13
- package/dist/models/index.d.ts +2 -1
- package/dist/models/index.js +2 -1
- package/package.json +1 -1
- package/src/apis/APIKeyApi.ts +6 -18
- package/src/models/APIKeysResponse.ts +10 -10
- package/src/models/AuditLog.ts +10 -10
- package/src/models/CreateAPIKeyResponse.ts +10 -10
- package/src/models/EnableClientEncryption.ts +53 -0
- package/src/models/{APIKey.ts → VaultAPIKey.ts} +18 -18
- package/src/models/index.ts +2 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -11,13 +11,13 @@ src/apis/UserApi.ts
|
|
|
11
11
|
src/apis/VaultApi.ts
|
|
12
12
|
src/apis/index.ts
|
|
13
13
|
src/index.ts
|
|
14
|
-
src/models/APIKey.ts
|
|
15
14
|
src/models/APIKeysResponse.ts
|
|
16
15
|
src/models/AuditLog.ts
|
|
17
16
|
src/models/AuditLogsResponse.ts
|
|
18
17
|
src/models/CreateAPIKeyRequest.ts
|
|
19
18
|
src/models/CreateAPIKeyResponse.ts
|
|
20
19
|
src/models/CreateVaultRequest.ts
|
|
20
|
+
src/models/EnableClientEncryption.ts
|
|
21
21
|
src/models/GetUserResponse.ts
|
|
22
22
|
src/models/HealthCheckResponse.ts
|
|
23
23
|
src/models/LoginRequest.ts
|
|
@@ -27,6 +27,7 @@ src/models/SignupResponse.ts
|
|
|
27
27
|
src/models/UpdateAPIKeyRequest.ts
|
|
28
28
|
src/models/UpdateVaultRequest.ts
|
|
29
29
|
src/models/Vault.ts
|
|
30
|
+
src/models/VaultAPIKey.ts
|
|
30
31
|
src/models/VaultLite.ts
|
|
31
32
|
src/models/index.ts
|
|
32
33
|
src/runtime.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @lwshen/vault-hub-ts-fetch-client@0.20250819.
|
|
1
|
+
## @lwshen/vault-hub-ts-fetch-client@0.20250819.095832
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @lwshen/vault-hub-ts-fetch-client@0.20250819.
|
|
39
|
+
npm install @lwshen/vault-hub-ts-fetch-client@0.20250819.095832 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
package/dist/apis/APIKeyApi.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type {
|
|
13
|
+
import type { APIKeysResponse, CreateAPIKeyRequest, CreateAPIKeyResponse, UpdateAPIKeyRequest, Vault, VaultAPIKey, VaultLite } from '../models/index';
|
|
14
14
|
export interface CreateAPIKeyOperationRequest {
|
|
15
15
|
createAPIKeyRequest: CreateAPIKeyRequest;
|
|
16
16
|
}
|
|
@@ -86,9 +86,9 @@ export declare class APIKeyApi extends runtime.BaseAPI {
|
|
|
86
86
|
/**
|
|
87
87
|
* Update an API key (enable/disable or modify properties)
|
|
88
88
|
*/
|
|
89
|
-
updateAPIKeyRaw(requestParameters: UpdateAPIKeyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
89
|
+
updateAPIKeyRaw(requestParameters: UpdateAPIKeyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VaultAPIKey>>;
|
|
90
90
|
/**
|
|
91
91
|
* Update an API key (enable/disable or modify properties)
|
|
92
92
|
*/
|
|
93
|
-
updateAPIKey(id: number, updateAPIKeyRequest: UpdateAPIKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
93
|
+
updateAPIKey(id: number, updateAPIKeyRequest: UpdateAPIKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VaultAPIKey>;
|
|
94
94
|
}
|
package/dist/apis/APIKeyApi.js
CHANGED
|
@@ -221,30 +221,23 @@ var APIKeyApi = /** @class */ (function (_super) {
|
|
|
221
221
|
*/
|
|
222
222
|
APIKeyApi.prototype.getVaultByAPIKeyRaw = function (requestParameters, initOverrides) {
|
|
223
223
|
return __awaiter(this, void 0, void 0, function () {
|
|
224
|
-
var queryParameters, headerParameters,
|
|
225
|
-
return __generator(this, function (
|
|
226
|
-
switch (
|
|
224
|
+
var queryParameters, headerParameters, response;
|
|
225
|
+
return __generator(this, function (_a) {
|
|
226
|
+
switch (_a.label) {
|
|
227
227
|
case 0:
|
|
228
228
|
if (requestParameters['uniqueId'] == null) {
|
|
229
229
|
throw new runtime.RequiredError('uniqueId', 'Required parameter "uniqueId" was null or undefined when calling getVaultByAPIKey().');
|
|
230
230
|
}
|
|
231
231
|
queryParameters = {};
|
|
232
232
|
headerParameters = {};
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
233
|
+
return [4 /*yield*/, this.request({
|
|
234
|
+
path: "/api/cli/vault/{uniqueId}".replace("{".concat("uniqueId", "}"), encodeURIComponent(String(requestParameters['uniqueId']))),
|
|
235
|
+
method: 'GET',
|
|
236
|
+
headers: headerParameters,
|
|
237
|
+
query: queryParameters,
|
|
238
|
+
}, initOverrides)];
|
|
237
239
|
case 1:
|
|
238
|
-
|
|
239
|
-
_c.label = 2;
|
|
240
|
-
case 2: return [4 /*yield*/, this.request({
|
|
241
|
-
path: "/api/cli/vault/{uniqueId}".replace("{".concat("uniqueId", "}"), encodeURIComponent(String(requestParameters['uniqueId']))),
|
|
242
|
-
method: 'GET',
|
|
243
|
-
headers: headerParameters,
|
|
244
|
-
query: queryParameters,
|
|
245
|
-
}, initOverrides)];
|
|
246
|
-
case 3:
|
|
247
|
-
response = _c.sent();
|
|
240
|
+
response = _a.sent();
|
|
248
241
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.VaultFromJSON)(jsonValue); })];
|
|
249
242
|
}
|
|
250
243
|
});
|
|
@@ -272,30 +265,23 @@ var APIKeyApi = /** @class */ (function (_super) {
|
|
|
272
265
|
*/
|
|
273
266
|
APIKeyApi.prototype.getVaultByNameAPIKeyRaw = function (requestParameters, initOverrides) {
|
|
274
267
|
return __awaiter(this, void 0, void 0, function () {
|
|
275
|
-
var queryParameters, headerParameters,
|
|
276
|
-
return __generator(this, function (
|
|
277
|
-
switch (
|
|
268
|
+
var queryParameters, headerParameters, response;
|
|
269
|
+
return __generator(this, function (_a) {
|
|
270
|
+
switch (_a.label) {
|
|
278
271
|
case 0:
|
|
279
272
|
if (requestParameters['name'] == null) {
|
|
280
273
|
throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling getVaultByNameAPIKey().');
|
|
281
274
|
}
|
|
282
275
|
queryParameters = {};
|
|
283
276
|
headerParameters = {};
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
277
|
+
return [4 /*yield*/, this.request({
|
|
278
|
+
path: "/api/cli/vault/name/{name}".replace("{".concat("name", "}"), encodeURIComponent(String(requestParameters['name']))),
|
|
279
|
+
method: 'GET',
|
|
280
|
+
headers: headerParameters,
|
|
281
|
+
query: queryParameters,
|
|
282
|
+
}, initOverrides)];
|
|
288
283
|
case 1:
|
|
289
|
-
|
|
290
|
-
_c.label = 2;
|
|
291
|
-
case 2: return [4 /*yield*/, this.request({
|
|
292
|
-
path: "/api/cli/vault/name/{name}".replace("{".concat("name", "}"), encodeURIComponent(String(requestParameters['name']))),
|
|
293
|
-
method: 'GET',
|
|
294
|
-
headers: headerParameters,
|
|
295
|
-
query: queryParameters,
|
|
296
|
-
}, initOverrides)];
|
|
297
|
-
case 3:
|
|
298
|
-
response = _c.sent();
|
|
284
|
+
response = _a.sent();
|
|
299
285
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.VaultFromJSON)(jsonValue); })];
|
|
300
286
|
}
|
|
301
287
|
});
|
|
@@ -323,27 +309,20 @@ var APIKeyApi = /** @class */ (function (_super) {
|
|
|
323
309
|
*/
|
|
324
310
|
APIKeyApi.prototype.getVaultsByAPIKeyRaw = function (initOverrides) {
|
|
325
311
|
return __awaiter(this, void 0, void 0, function () {
|
|
326
|
-
var queryParameters, headerParameters,
|
|
327
|
-
return __generator(this, function (
|
|
328
|
-
switch (
|
|
312
|
+
var queryParameters, headerParameters, response;
|
|
313
|
+
return __generator(this, function (_a) {
|
|
314
|
+
switch (_a.label) {
|
|
329
315
|
case 0:
|
|
330
316
|
queryParameters = {};
|
|
331
317
|
headerParameters = {};
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
318
|
+
return [4 /*yield*/, this.request({
|
|
319
|
+
path: "/api/cli/vaults",
|
|
320
|
+
method: 'GET',
|
|
321
|
+
headers: headerParameters,
|
|
322
|
+
query: queryParameters,
|
|
323
|
+
}, initOverrides)];
|
|
336
324
|
case 1:
|
|
337
|
-
|
|
338
|
-
_c.label = 2;
|
|
339
|
-
case 2: return [4 /*yield*/, this.request({
|
|
340
|
-
path: "/api/cli/vaults",
|
|
341
|
-
method: 'GET',
|
|
342
|
-
headers: headerParameters,
|
|
343
|
-
query: queryParameters,
|
|
344
|
-
}, initOverrides)];
|
|
345
|
-
case 3:
|
|
346
|
-
response = _c.sent();
|
|
325
|
+
response = _a.sent();
|
|
347
326
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.VaultLiteFromJSON); })];
|
|
348
327
|
}
|
|
349
328
|
});
|
|
@@ -393,7 +372,7 @@ var APIKeyApi = /** @class */ (function (_super) {
|
|
|
393
372
|
}, initOverrides)];
|
|
394
373
|
case 1:
|
|
395
374
|
response = _a.sent();
|
|
396
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.
|
|
375
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.VaultAPIKeyFromJSON)(jsonValue); })];
|
|
397
376
|
}
|
|
398
377
|
});
|
|
399
378
|
});
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import type {
|
|
12
|
+
import type { VaultAPIKey } from './VaultAPIKey';
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
* @export
|
|
@@ -18,10 +18,10 @@ import type { APIKey } from './APIKey';
|
|
|
18
18
|
export interface APIKeysResponse {
|
|
19
19
|
/**
|
|
20
20
|
*
|
|
21
|
-
* @type {Array<
|
|
21
|
+
* @type {Array<VaultAPIKey>}
|
|
22
22
|
* @memberof APIKeysResponse
|
|
23
23
|
*/
|
|
24
|
-
apiKeys: Array<
|
|
24
|
+
apiKeys: Array<VaultAPIKey>;
|
|
25
25
|
/**
|
|
26
26
|
* Total number of API keys
|
|
27
27
|
* @type {number}
|
|
@@ -18,7 +18,7 @@ exports.APIKeysResponseFromJSON = APIKeysResponseFromJSON;
|
|
|
18
18
|
exports.APIKeysResponseFromJSONTyped = APIKeysResponseFromJSONTyped;
|
|
19
19
|
exports.APIKeysResponseToJSON = APIKeysResponseToJSON;
|
|
20
20
|
exports.APIKeysResponseToJSONTyped = APIKeysResponseToJSONTyped;
|
|
21
|
-
var
|
|
21
|
+
var VaultAPIKey_1 = require("./VaultAPIKey");
|
|
22
22
|
/**
|
|
23
23
|
* Check if a given object implements the APIKeysResponse interface.
|
|
24
24
|
*/
|
|
@@ -41,7 +41,7 @@ function APIKeysResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
41
41
|
return json;
|
|
42
42
|
}
|
|
43
43
|
return {
|
|
44
|
-
'apiKeys': (json['apiKeys'].map(
|
|
44
|
+
'apiKeys': (json['apiKeys'].map(VaultAPIKey_1.VaultAPIKeyFromJSON)),
|
|
45
45
|
'totalCount': json['totalCount'],
|
|
46
46
|
'pageSize': json['pageSize'],
|
|
47
47
|
'pageIndex': json['pageIndex'],
|
|
@@ -56,7 +56,7 @@ function APIKeysResponseToJSONTyped(value, ignoreDiscriminator) {
|
|
|
56
56
|
return value;
|
|
57
57
|
}
|
|
58
58
|
return {
|
|
59
|
-
'apiKeys': (value['apiKeys'].map(
|
|
59
|
+
'apiKeys': (value['apiKeys'].map(VaultAPIKey_1.VaultAPIKeyToJSON)),
|
|
60
60
|
'totalCount': value['totalCount'],
|
|
61
61
|
'pageSize': value['pageSize'],
|
|
62
62
|
'pageIndex': value['pageIndex'],
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import type {
|
|
12
|
+
import type { VaultAPIKey } from './VaultAPIKey';
|
|
13
13
|
import type { VaultLite } from './VaultLite';
|
|
14
14
|
/**
|
|
15
15
|
*
|
|
@@ -31,10 +31,10 @@ export interface AuditLog {
|
|
|
31
31
|
vault?: VaultLite;
|
|
32
32
|
/**
|
|
33
33
|
*
|
|
34
|
-
* @type {
|
|
34
|
+
* @type {VaultAPIKey}
|
|
35
35
|
* @memberof AuditLog
|
|
36
36
|
*/
|
|
37
|
-
apiKey?:
|
|
37
|
+
apiKey?: VaultAPIKey;
|
|
38
38
|
/**
|
|
39
39
|
* Type of action performed
|
|
40
40
|
* @type {string}
|
package/dist/models/AuditLog.js
CHANGED
|
@@ -19,7 +19,7 @@ exports.AuditLogFromJSON = AuditLogFromJSON;
|
|
|
19
19
|
exports.AuditLogFromJSONTyped = AuditLogFromJSONTyped;
|
|
20
20
|
exports.AuditLogToJSON = AuditLogToJSON;
|
|
21
21
|
exports.AuditLogToJSONTyped = AuditLogToJSONTyped;
|
|
22
|
-
var
|
|
22
|
+
var VaultAPIKey_1 = require("./VaultAPIKey");
|
|
23
23
|
var VaultLite_1 = require("./VaultLite");
|
|
24
24
|
/**
|
|
25
25
|
* @export
|
|
@@ -56,7 +56,7 @@ function AuditLogFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
56
56
|
return {
|
|
57
57
|
'createdAt': (new Date(json['createdAt'])),
|
|
58
58
|
'vault': json['vault'] == null ? undefined : (0, VaultLite_1.VaultLiteFromJSON)(json['vault']),
|
|
59
|
-
'apiKey': json['apiKey'] == null ? undefined : (0,
|
|
59
|
+
'apiKey': json['apiKey'] == null ? undefined : (0, VaultAPIKey_1.VaultAPIKeyFromJSON)(json['apiKey']),
|
|
60
60
|
'action': json['action'],
|
|
61
61
|
'ipAddress': json['ipAddress'] == null ? undefined : json['ipAddress'],
|
|
62
62
|
'userAgent': json['userAgent'] == null ? undefined : json['userAgent'],
|
|
@@ -73,7 +73,7 @@ function AuditLogToJSONTyped(value, ignoreDiscriminator) {
|
|
|
73
73
|
return {
|
|
74
74
|
'createdAt': ((value['createdAt']).toISOString()),
|
|
75
75
|
'vault': (0, VaultLite_1.VaultLiteToJSON)(value['vault']),
|
|
76
|
-
'apiKey': (0,
|
|
76
|
+
'apiKey': (0, VaultAPIKey_1.VaultAPIKeyToJSON)(value['apiKey']),
|
|
77
77
|
'action': value['action'],
|
|
78
78
|
'ipAddress': value['ipAddress'],
|
|
79
79
|
'userAgent': value['userAgent'],
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import type {
|
|
12
|
+
import type { VaultAPIKey } from './VaultAPIKey';
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
* @export
|
|
@@ -18,10 +18,10 @@ import type { APIKey } from './APIKey';
|
|
|
18
18
|
export interface CreateAPIKeyResponse {
|
|
19
19
|
/**
|
|
20
20
|
*
|
|
21
|
-
* @type {
|
|
21
|
+
* @type {VaultAPIKey}
|
|
22
22
|
* @memberof CreateAPIKeyResponse
|
|
23
23
|
*/
|
|
24
|
-
apiKey:
|
|
24
|
+
apiKey: VaultAPIKey;
|
|
25
25
|
/**
|
|
26
26
|
* The generated API key (only shown once)
|
|
27
27
|
* @type {string}
|
|
@@ -18,7 +18,7 @@ exports.CreateAPIKeyResponseFromJSON = CreateAPIKeyResponseFromJSON;
|
|
|
18
18
|
exports.CreateAPIKeyResponseFromJSONTyped = CreateAPIKeyResponseFromJSONTyped;
|
|
19
19
|
exports.CreateAPIKeyResponseToJSON = CreateAPIKeyResponseToJSON;
|
|
20
20
|
exports.CreateAPIKeyResponseToJSONTyped = CreateAPIKeyResponseToJSONTyped;
|
|
21
|
-
var
|
|
21
|
+
var VaultAPIKey_1 = require("./VaultAPIKey");
|
|
22
22
|
/**
|
|
23
23
|
* Check if a given object implements the CreateAPIKeyResponse interface.
|
|
24
24
|
*/
|
|
@@ -37,7 +37,7 @@ function CreateAPIKeyResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
37
37
|
return json;
|
|
38
38
|
}
|
|
39
39
|
return {
|
|
40
|
-
'apiKey': (0,
|
|
40
|
+
'apiKey': (0, VaultAPIKey_1.VaultAPIKeyFromJSON)(json['apiKey']),
|
|
41
41
|
'key': json['key'],
|
|
42
42
|
};
|
|
43
43
|
}
|
|
@@ -50,7 +50,7 @@ function CreateAPIKeyResponseToJSONTyped(value, ignoreDiscriminator) {
|
|
|
50
50
|
return value;
|
|
51
51
|
}
|
|
52
52
|
return {
|
|
53
|
-
'apiKey': (0,
|
|
53
|
+
'apiKey': (0, VaultAPIKey_1.VaultAPIKeyToJSON)(value['apiKey']),
|
|
54
54
|
'key': value['key'],
|
|
55
55
|
};
|
|
56
56
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vault Hub Server
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Enable additional client-side encryption using key derived from API key + vault unique ID
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const EnableClientEncryption: {
|
|
17
|
+
readonly True: "true";
|
|
18
|
+
readonly False: "false";
|
|
19
|
+
};
|
|
20
|
+
export type EnableClientEncryption = typeof EnableClientEncryption[keyof typeof EnableClientEncryption];
|
|
21
|
+
export declare function instanceOfEnableClientEncryption(value: any): boolean;
|
|
22
|
+
export declare function EnableClientEncryptionFromJSON(json: any): EnableClientEncryption;
|
|
23
|
+
export declare function EnableClientEncryptionFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnableClientEncryption;
|
|
24
|
+
export declare function EnableClientEncryptionToJSON(value?: EnableClientEncryption | null): any;
|
|
25
|
+
export declare function EnableClientEncryptionToJSONTyped(value: any, ignoreDiscriminator: boolean): EnableClientEncryption;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Vault Hub Server
|
|
6
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.EnableClientEncryption = void 0;
|
|
17
|
+
exports.instanceOfEnableClientEncryption = instanceOfEnableClientEncryption;
|
|
18
|
+
exports.EnableClientEncryptionFromJSON = EnableClientEncryptionFromJSON;
|
|
19
|
+
exports.EnableClientEncryptionFromJSONTyped = EnableClientEncryptionFromJSONTyped;
|
|
20
|
+
exports.EnableClientEncryptionToJSON = EnableClientEncryptionToJSON;
|
|
21
|
+
exports.EnableClientEncryptionToJSONTyped = EnableClientEncryptionToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* Enable additional client-side encryption using key derived from API key + vault unique ID
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.EnableClientEncryption = {
|
|
27
|
+
True: 'true',
|
|
28
|
+
False: 'false'
|
|
29
|
+
};
|
|
30
|
+
function instanceOfEnableClientEncryption(value) {
|
|
31
|
+
for (var key in exports.EnableClientEncryption) {
|
|
32
|
+
if (Object.prototype.hasOwnProperty.call(exports.EnableClientEncryption, key)) {
|
|
33
|
+
if (exports.EnableClientEncryption[key] === value) {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
function EnableClientEncryptionFromJSON(json) {
|
|
41
|
+
return EnableClientEncryptionFromJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function EnableClientEncryptionFromJSONTyped(json, ignoreDiscriminator) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
function EnableClientEncryptionToJSON(value) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
function EnableClientEncryptionToJSONTyped(value, ignoreDiscriminator) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
@@ -13,63 +13,63 @@ import type { VaultLite } from './VaultLite';
|
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
* @export
|
|
16
|
-
* @interface
|
|
16
|
+
* @interface VaultAPIKey
|
|
17
17
|
*/
|
|
18
|
-
export interface
|
|
18
|
+
export interface VaultAPIKey {
|
|
19
19
|
/**
|
|
20
20
|
* Unique API key ID
|
|
21
21
|
* @type {number}
|
|
22
|
-
* @memberof
|
|
22
|
+
* @memberof VaultAPIKey
|
|
23
23
|
*/
|
|
24
24
|
id: number;
|
|
25
25
|
/**
|
|
26
26
|
* Human-readable name for the API key
|
|
27
27
|
* @type {string}
|
|
28
|
-
* @memberof
|
|
28
|
+
* @memberof VaultAPIKey
|
|
29
29
|
*/
|
|
30
30
|
name: string;
|
|
31
31
|
/**
|
|
32
32
|
* Array of vaults this key can access (null/empty = all user's vaults)
|
|
33
33
|
* @type {Array<VaultLite>}
|
|
34
|
-
* @memberof
|
|
34
|
+
* @memberof VaultAPIKey
|
|
35
35
|
*/
|
|
36
36
|
vaults?: Array<VaultLite>;
|
|
37
37
|
/**
|
|
38
38
|
* Optional expiration date
|
|
39
39
|
* @type {Date}
|
|
40
|
-
* @memberof
|
|
40
|
+
* @memberof VaultAPIKey
|
|
41
41
|
*/
|
|
42
42
|
expiresAt?: Date;
|
|
43
43
|
/**
|
|
44
44
|
* When the key was last used
|
|
45
45
|
* @type {Date}
|
|
46
|
-
* @memberof
|
|
46
|
+
* @memberof VaultAPIKey
|
|
47
47
|
*/
|
|
48
48
|
lastUsedAt?: Date;
|
|
49
49
|
/**
|
|
50
50
|
* Whether the key is currently active
|
|
51
51
|
* @type {boolean}
|
|
52
|
-
* @memberof
|
|
52
|
+
* @memberof VaultAPIKey
|
|
53
53
|
*/
|
|
54
54
|
isActive: boolean;
|
|
55
55
|
/**
|
|
56
56
|
* When the key was created
|
|
57
57
|
* @type {Date}
|
|
58
|
-
* @memberof
|
|
58
|
+
* @memberof VaultAPIKey
|
|
59
59
|
*/
|
|
60
60
|
createdAt: Date;
|
|
61
61
|
/**
|
|
62
62
|
* When the key was last updated
|
|
63
63
|
* @type {Date}
|
|
64
|
-
* @memberof
|
|
64
|
+
* @memberof VaultAPIKey
|
|
65
65
|
*/
|
|
66
66
|
updatedAt?: Date;
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
|
-
* Check if a given object implements the
|
|
69
|
+
* Check if a given object implements the VaultAPIKey interface.
|
|
70
70
|
*/
|
|
71
|
-
export declare function
|
|
72
|
-
export declare function
|
|
73
|
-
export declare function
|
|
74
|
-
export declare function
|
|
75
|
-
export declare function
|
|
71
|
+
export declare function instanceOfVaultAPIKey(value: object): value is VaultAPIKey;
|
|
72
|
+
export declare function VaultAPIKeyFromJSON(json: any): VaultAPIKey;
|
|
73
|
+
export declare function VaultAPIKeyFromJSONTyped(json: any, ignoreDiscriminator: boolean): VaultAPIKey;
|
|
74
|
+
export declare function VaultAPIKeyToJSON(json: any): VaultAPIKey;
|
|
75
|
+
export declare function VaultAPIKeyToJSONTyped(value?: VaultAPIKey | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -13,16 +13,16 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
16
|
+
exports.instanceOfVaultAPIKey = instanceOfVaultAPIKey;
|
|
17
|
+
exports.VaultAPIKeyFromJSON = VaultAPIKeyFromJSON;
|
|
18
|
+
exports.VaultAPIKeyFromJSONTyped = VaultAPIKeyFromJSONTyped;
|
|
19
|
+
exports.VaultAPIKeyToJSON = VaultAPIKeyToJSON;
|
|
20
|
+
exports.VaultAPIKeyToJSONTyped = VaultAPIKeyToJSONTyped;
|
|
21
21
|
var VaultLite_1 = require("./VaultLite");
|
|
22
22
|
/**
|
|
23
|
-
* Check if a given object implements the
|
|
23
|
+
* Check if a given object implements the VaultAPIKey interface.
|
|
24
24
|
*/
|
|
25
|
-
function
|
|
25
|
+
function instanceOfVaultAPIKey(value) {
|
|
26
26
|
if (!('id' in value) || value['id'] === undefined)
|
|
27
27
|
return false;
|
|
28
28
|
if (!('name' in value) || value['name'] === undefined)
|
|
@@ -33,10 +33,10 @@ function instanceOfAPIKey(value) {
|
|
|
33
33
|
return false;
|
|
34
34
|
return true;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
return
|
|
36
|
+
function VaultAPIKeyFromJSON(json) {
|
|
37
|
+
return VaultAPIKeyFromJSONTyped(json, false);
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function VaultAPIKeyFromJSONTyped(json, ignoreDiscriminator) {
|
|
40
40
|
if (json == null) {
|
|
41
41
|
return json;
|
|
42
42
|
}
|
|
@@ -51,10 +51,10 @@ function APIKeyFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
51
51
|
'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
return
|
|
54
|
+
function VaultAPIKeyToJSON(json) {
|
|
55
|
+
return VaultAPIKeyToJSONTyped(json, false);
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function VaultAPIKeyToJSONTyped(value, ignoreDiscriminator) {
|
|
58
58
|
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
59
59
|
if (value == null) {
|
|
60
60
|
return value;
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from './APIKey';
|
|
2
1
|
export * from './APIKeysResponse';
|
|
3
2
|
export * from './AuditLog';
|
|
4
3
|
export * from './AuditLogsResponse';
|
|
5
4
|
export * from './CreateAPIKeyRequest';
|
|
6
5
|
export * from './CreateAPIKeyResponse';
|
|
7
6
|
export * from './CreateVaultRequest';
|
|
7
|
+
export * from './EnableClientEncryption';
|
|
8
8
|
export * from './GetUserResponse';
|
|
9
9
|
export * from './HealthCheckResponse';
|
|
10
10
|
export * from './LoginRequest';
|
|
@@ -14,4 +14,5 @@ export * from './SignupResponse';
|
|
|
14
14
|
export * from './UpdateAPIKeyRequest';
|
|
15
15
|
export * from './UpdateVaultRequest';
|
|
16
16
|
export * from './Vault';
|
|
17
|
+
export * from './VaultAPIKey';
|
|
17
18
|
export * from './VaultLite';
|
package/dist/models/index.js
CHANGED
|
@@ -16,13 +16,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
|
-
__exportStar(require("./APIKey"), exports);
|
|
20
19
|
__exportStar(require("./APIKeysResponse"), exports);
|
|
21
20
|
__exportStar(require("./AuditLog"), exports);
|
|
22
21
|
__exportStar(require("./AuditLogsResponse"), exports);
|
|
23
22
|
__exportStar(require("./CreateAPIKeyRequest"), exports);
|
|
24
23
|
__exportStar(require("./CreateAPIKeyResponse"), exports);
|
|
25
24
|
__exportStar(require("./CreateVaultRequest"), exports);
|
|
25
|
+
__exportStar(require("./EnableClientEncryption"), exports);
|
|
26
26
|
__exportStar(require("./GetUserResponse"), exports);
|
|
27
27
|
__exportStar(require("./HealthCheckResponse"), exports);
|
|
28
28
|
__exportStar(require("./LoginRequest"), exports);
|
|
@@ -32,4 +32,5 @@ __exportStar(require("./SignupResponse"), exports);
|
|
|
32
32
|
__exportStar(require("./UpdateAPIKeyRequest"), exports);
|
|
33
33
|
__exportStar(require("./UpdateVaultRequest"), exports);
|
|
34
34
|
__exportStar(require("./Vault"), exports);
|
|
35
|
+
__exportStar(require("./VaultAPIKey"), exports);
|
|
35
36
|
__exportStar(require("./VaultLite"), exports);
|
package/package.json
CHANGED
package/src/apis/APIKeyApi.ts
CHANGED
|
@@ -15,17 +15,15 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
-
APIKey,
|
|
19
18
|
APIKeysResponse,
|
|
20
19
|
CreateAPIKeyRequest,
|
|
21
20
|
CreateAPIKeyResponse,
|
|
22
21
|
UpdateAPIKeyRequest,
|
|
23
22
|
Vault,
|
|
23
|
+
VaultAPIKey,
|
|
24
24
|
VaultLite,
|
|
25
25
|
} from '../models/index';
|
|
26
26
|
import {
|
|
27
|
-
APIKeyFromJSON,
|
|
28
|
-
APIKeyToJSON,
|
|
29
27
|
APIKeysResponseFromJSON,
|
|
30
28
|
APIKeysResponseToJSON,
|
|
31
29
|
CreateAPIKeyRequestFromJSON,
|
|
@@ -36,6 +34,8 @@ import {
|
|
|
36
34
|
UpdateAPIKeyRequestToJSON,
|
|
37
35
|
VaultFromJSON,
|
|
38
36
|
VaultToJSON,
|
|
37
|
+
VaultAPIKeyFromJSON,
|
|
38
|
+
VaultAPIKeyToJSON,
|
|
39
39
|
VaultLiteFromJSON,
|
|
40
40
|
VaultLiteToJSON,
|
|
41
41
|
} from '../models/index';
|
|
@@ -202,10 +202,6 @@ export class APIKeyApi extends runtime.BaseAPI {
|
|
|
202
202
|
|
|
203
203
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
204
204
|
|
|
205
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
206
|
-
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
207
|
-
}
|
|
208
|
-
|
|
209
205
|
const response = await this.request({
|
|
210
206
|
path: `/api/cli/vault/{uniqueId}`.replace(`{${"uniqueId"}}`, encodeURIComponent(String(requestParameters['uniqueId']))),
|
|
211
207
|
method: 'GET',
|
|
@@ -239,10 +235,6 @@ export class APIKeyApi extends runtime.BaseAPI {
|
|
|
239
235
|
|
|
240
236
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
241
237
|
|
|
242
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
243
|
-
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
244
|
-
}
|
|
245
|
-
|
|
246
238
|
const response = await this.request({
|
|
247
239
|
path: `/api/cli/vault/name/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name']))),
|
|
248
240
|
method: 'GET',
|
|
@@ -269,10 +261,6 @@ export class APIKeyApi extends runtime.BaseAPI {
|
|
|
269
261
|
|
|
270
262
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
271
263
|
|
|
272
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
273
|
-
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
274
|
-
}
|
|
275
|
-
|
|
276
264
|
const response = await this.request({
|
|
277
265
|
path: `/api/cli/vaults`,
|
|
278
266
|
method: 'GET',
|
|
@@ -294,7 +282,7 @@ export class APIKeyApi extends runtime.BaseAPI {
|
|
|
294
282
|
/**
|
|
295
283
|
* Update an API key (enable/disable or modify properties)
|
|
296
284
|
*/
|
|
297
|
-
async updateAPIKeyRaw(requestParameters: UpdateAPIKeyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
285
|
+
async updateAPIKeyRaw(requestParameters: UpdateAPIKeyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VaultAPIKey>> {
|
|
298
286
|
if (requestParameters['id'] == null) {
|
|
299
287
|
throw new runtime.RequiredError(
|
|
300
288
|
'id',
|
|
@@ -323,13 +311,13 @@ export class APIKeyApi extends runtime.BaseAPI {
|
|
|
323
311
|
body: UpdateAPIKeyRequestToJSON(requestParameters['updateAPIKeyRequest']),
|
|
324
312
|
}, initOverrides);
|
|
325
313
|
|
|
326
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
314
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => VaultAPIKeyFromJSON(jsonValue));
|
|
327
315
|
}
|
|
328
316
|
|
|
329
317
|
/**
|
|
330
318
|
* Update an API key (enable/disable or modify properties)
|
|
331
319
|
*/
|
|
332
|
-
async updateAPIKey(id: number, updateAPIKeyRequest: UpdateAPIKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
320
|
+
async updateAPIKey(id: number, updateAPIKeyRequest: UpdateAPIKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VaultAPIKey> {
|
|
333
321
|
const response = await this.updateAPIKeyRaw({ id: id, updateAPIKeyRequest: updateAPIKeyRequest }, initOverrides);
|
|
334
322
|
return await response.value();
|
|
335
323
|
}
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
-
import type {
|
|
16
|
+
import type { VaultAPIKey } from './VaultAPIKey';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from './
|
|
18
|
+
VaultAPIKeyFromJSON,
|
|
19
|
+
VaultAPIKeyFromJSONTyped,
|
|
20
|
+
VaultAPIKeyToJSON,
|
|
21
|
+
VaultAPIKeyToJSONTyped,
|
|
22
|
+
} from './VaultAPIKey';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
*
|
|
@@ -29,10 +29,10 @@ import {
|
|
|
29
29
|
export interface APIKeysResponse {
|
|
30
30
|
/**
|
|
31
31
|
*
|
|
32
|
-
* @type {Array<
|
|
32
|
+
* @type {Array<VaultAPIKey>}
|
|
33
33
|
* @memberof APIKeysResponse
|
|
34
34
|
*/
|
|
35
|
-
apiKeys: Array<
|
|
35
|
+
apiKeys: Array<VaultAPIKey>;
|
|
36
36
|
/**
|
|
37
37
|
* Total number of API keys
|
|
38
38
|
* @type {number}
|
|
@@ -74,7 +74,7 @@ export function APIKeysResponseFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
74
74
|
}
|
|
75
75
|
return {
|
|
76
76
|
|
|
77
|
-
'apiKeys': ((json['apiKeys'] as Array<any>).map(
|
|
77
|
+
'apiKeys': ((json['apiKeys'] as Array<any>).map(VaultAPIKeyFromJSON)),
|
|
78
78
|
'totalCount': json['totalCount'],
|
|
79
79
|
'pageSize': json['pageSize'],
|
|
80
80
|
'pageIndex': json['pageIndex'],
|
|
@@ -92,7 +92,7 @@ export function APIKeysResponseToJSONTyped(value?: APIKeysResponse | null, ignor
|
|
|
92
92
|
|
|
93
93
|
return {
|
|
94
94
|
|
|
95
|
-
'apiKeys': ((value['apiKeys'] as Array<any>).map(
|
|
95
|
+
'apiKeys': ((value['apiKeys'] as Array<any>).map(VaultAPIKeyToJSON)),
|
|
96
96
|
'totalCount': value['totalCount'],
|
|
97
97
|
'pageSize': value['pageSize'],
|
|
98
98
|
'pageIndex': value['pageIndex'],
|
package/src/models/AuditLog.ts
CHANGED
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
-
import type {
|
|
16
|
+
import type { VaultAPIKey } from './VaultAPIKey';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from './
|
|
18
|
+
VaultAPIKeyFromJSON,
|
|
19
|
+
VaultAPIKeyFromJSONTyped,
|
|
20
|
+
VaultAPIKeyToJSON,
|
|
21
|
+
VaultAPIKeyToJSONTyped,
|
|
22
|
+
} from './VaultAPIKey';
|
|
23
23
|
import type { VaultLite } from './VaultLite';
|
|
24
24
|
import {
|
|
25
25
|
VaultLiteFromJSON,
|
|
@@ -48,10 +48,10 @@ export interface AuditLog {
|
|
|
48
48
|
vault?: VaultLite;
|
|
49
49
|
/**
|
|
50
50
|
*
|
|
51
|
-
* @type {
|
|
51
|
+
* @type {VaultAPIKey}
|
|
52
52
|
* @memberof AuditLog
|
|
53
53
|
*/
|
|
54
|
-
apiKey?:
|
|
54
|
+
apiKey?: VaultAPIKey;
|
|
55
55
|
/**
|
|
56
56
|
* Type of action performed
|
|
57
57
|
* @type {string}
|
|
@@ -112,7 +112,7 @@ export function AuditLogFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
112
112
|
|
|
113
113
|
'createdAt': (new Date(json['createdAt'])),
|
|
114
114
|
'vault': json['vault'] == null ? undefined : VaultLiteFromJSON(json['vault']),
|
|
115
|
-
'apiKey': json['apiKey'] == null ? undefined :
|
|
115
|
+
'apiKey': json['apiKey'] == null ? undefined : VaultAPIKeyFromJSON(json['apiKey']),
|
|
116
116
|
'action': json['action'],
|
|
117
117
|
'ipAddress': json['ipAddress'] == null ? undefined : json['ipAddress'],
|
|
118
118
|
'userAgent': json['userAgent'] == null ? undefined : json['userAgent'],
|
|
@@ -132,7 +132,7 @@ export function AuditLogToJSONTyped(value?: AuditLog | null, ignoreDiscriminator
|
|
|
132
132
|
|
|
133
133
|
'createdAt': ((value['createdAt']).toISOString()),
|
|
134
134
|
'vault': VaultLiteToJSON(value['vault']),
|
|
135
|
-
'apiKey':
|
|
135
|
+
'apiKey': VaultAPIKeyToJSON(value['apiKey']),
|
|
136
136
|
'action': value['action'],
|
|
137
137
|
'ipAddress': value['ipAddress'],
|
|
138
138
|
'userAgent': value['userAgent'],
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
-
import type {
|
|
16
|
+
import type { VaultAPIKey } from './VaultAPIKey';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from './
|
|
18
|
+
VaultAPIKeyFromJSON,
|
|
19
|
+
VaultAPIKeyFromJSONTyped,
|
|
20
|
+
VaultAPIKeyToJSON,
|
|
21
|
+
VaultAPIKeyToJSONTyped,
|
|
22
|
+
} from './VaultAPIKey';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
*
|
|
@@ -29,10 +29,10 @@ import {
|
|
|
29
29
|
export interface CreateAPIKeyResponse {
|
|
30
30
|
/**
|
|
31
31
|
*
|
|
32
|
-
* @type {
|
|
32
|
+
* @type {VaultAPIKey}
|
|
33
33
|
* @memberof CreateAPIKeyResponse
|
|
34
34
|
*/
|
|
35
|
-
apiKey:
|
|
35
|
+
apiKey: VaultAPIKey;
|
|
36
36
|
/**
|
|
37
37
|
* The generated API key (only shown once)
|
|
38
38
|
* @type {string}
|
|
@@ -60,7 +60,7 @@ export function CreateAPIKeyResponseFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
60
60
|
}
|
|
61
61
|
return {
|
|
62
62
|
|
|
63
|
-
'apiKey':
|
|
63
|
+
'apiKey': VaultAPIKeyFromJSON(json['apiKey']),
|
|
64
64
|
'key': json['key'],
|
|
65
65
|
};
|
|
66
66
|
}
|
|
@@ -76,7 +76,7 @@ export function CreateAPIKeyResponseToJSONTyped(value?: CreateAPIKeyResponse | n
|
|
|
76
76
|
|
|
77
77
|
return {
|
|
78
78
|
|
|
79
|
-
'apiKey':
|
|
79
|
+
'apiKey': VaultAPIKeyToJSON(value['apiKey']),
|
|
80
80
|
'key': value['key'],
|
|
81
81
|
};
|
|
82
82
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Vault Hub Server
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Enable additional client-side encryption using key derived from API key + vault unique ID
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const EnableClientEncryption = {
|
|
21
|
+
True: 'true',
|
|
22
|
+
False: 'false'
|
|
23
|
+
} as const;
|
|
24
|
+
export type EnableClientEncryption = typeof EnableClientEncryption[keyof typeof EnableClientEncryption];
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export function instanceOfEnableClientEncryption(value: any): boolean {
|
|
28
|
+
for (const key in EnableClientEncryption) {
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(EnableClientEncryption, key)) {
|
|
30
|
+
if (EnableClientEncryption[key as keyof typeof EnableClientEncryption] === value) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function EnableClientEncryptionFromJSON(json: any): EnableClientEncryption {
|
|
39
|
+
return EnableClientEncryptionFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function EnableClientEncryptionFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnableClientEncryption {
|
|
43
|
+
return json as EnableClientEncryption;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function EnableClientEncryptionToJSON(value?: EnableClientEncryption | null): any {
|
|
47
|
+
return value as any;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function EnableClientEncryptionToJSONTyped(value: any, ignoreDiscriminator: boolean): EnableClientEncryption {
|
|
51
|
+
return value as EnableClientEncryption;
|
|
52
|
+
}
|
|
53
|
+
|
|
@@ -24,63 +24,63 @@ import {
|
|
|
24
24
|
/**
|
|
25
25
|
*
|
|
26
26
|
* @export
|
|
27
|
-
* @interface
|
|
27
|
+
* @interface VaultAPIKey
|
|
28
28
|
*/
|
|
29
|
-
export interface
|
|
29
|
+
export interface VaultAPIKey {
|
|
30
30
|
/**
|
|
31
31
|
* Unique API key ID
|
|
32
32
|
* @type {number}
|
|
33
|
-
* @memberof
|
|
33
|
+
* @memberof VaultAPIKey
|
|
34
34
|
*/
|
|
35
35
|
id: number;
|
|
36
36
|
/**
|
|
37
37
|
* Human-readable name for the API key
|
|
38
38
|
* @type {string}
|
|
39
|
-
* @memberof
|
|
39
|
+
* @memberof VaultAPIKey
|
|
40
40
|
*/
|
|
41
41
|
name: string;
|
|
42
42
|
/**
|
|
43
43
|
* Array of vaults this key can access (null/empty = all user's vaults)
|
|
44
44
|
* @type {Array<VaultLite>}
|
|
45
|
-
* @memberof
|
|
45
|
+
* @memberof VaultAPIKey
|
|
46
46
|
*/
|
|
47
47
|
vaults?: Array<VaultLite>;
|
|
48
48
|
/**
|
|
49
49
|
* Optional expiration date
|
|
50
50
|
* @type {Date}
|
|
51
|
-
* @memberof
|
|
51
|
+
* @memberof VaultAPIKey
|
|
52
52
|
*/
|
|
53
53
|
expiresAt?: Date;
|
|
54
54
|
/**
|
|
55
55
|
* When the key was last used
|
|
56
56
|
* @type {Date}
|
|
57
|
-
* @memberof
|
|
57
|
+
* @memberof VaultAPIKey
|
|
58
58
|
*/
|
|
59
59
|
lastUsedAt?: Date;
|
|
60
60
|
/**
|
|
61
61
|
* Whether the key is currently active
|
|
62
62
|
* @type {boolean}
|
|
63
|
-
* @memberof
|
|
63
|
+
* @memberof VaultAPIKey
|
|
64
64
|
*/
|
|
65
65
|
isActive: boolean;
|
|
66
66
|
/**
|
|
67
67
|
* When the key was created
|
|
68
68
|
* @type {Date}
|
|
69
|
-
* @memberof
|
|
69
|
+
* @memberof VaultAPIKey
|
|
70
70
|
*/
|
|
71
71
|
createdAt: Date;
|
|
72
72
|
/**
|
|
73
73
|
* When the key was last updated
|
|
74
74
|
* @type {Date}
|
|
75
|
-
* @memberof
|
|
75
|
+
* @memberof VaultAPIKey
|
|
76
76
|
*/
|
|
77
77
|
updatedAt?: Date;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
|
-
* Check if a given object implements the
|
|
81
|
+
* Check if a given object implements the VaultAPIKey interface.
|
|
82
82
|
*/
|
|
83
|
-
export function
|
|
83
|
+
export function instanceOfVaultAPIKey(value: object): value is VaultAPIKey {
|
|
84
84
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
85
85
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
86
86
|
if (!('isActive' in value) || value['isActive'] === undefined) return false;
|
|
@@ -88,11 +88,11 @@ export function instanceOfAPIKey(value: object): value is APIKey {
|
|
|
88
88
|
return true;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
export function
|
|
92
|
-
return
|
|
91
|
+
export function VaultAPIKeyFromJSON(json: any): VaultAPIKey {
|
|
92
|
+
return VaultAPIKeyFromJSONTyped(json, false);
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
export function
|
|
95
|
+
export function VaultAPIKeyFromJSONTyped(json: any, ignoreDiscriminator: boolean): VaultAPIKey {
|
|
96
96
|
if (json == null) {
|
|
97
97
|
return json;
|
|
98
98
|
}
|
|
@@ -109,11 +109,11 @@ export function APIKeyFromJSONTyped(json: any, ignoreDiscriminator: boolean): AP
|
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
export function
|
|
113
|
-
return
|
|
112
|
+
export function VaultAPIKeyToJSON(json: any): VaultAPIKey {
|
|
113
|
+
return VaultAPIKeyToJSONTyped(json, false);
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
export function
|
|
116
|
+
export function VaultAPIKeyToJSONTyped(value?: VaultAPIKey | null, ignoreDiscriminator: boolean = false): any {
|
|
117
117
|
if (value == null) {
|
|
118
118
|
return value;
|
|
119
119
|
}
|
package/src/models/index.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export * from './APIKey';
|
|
4
3
|
export * from './APIKeysResponse';
|
|
5
4
|
export * from './AuditLog';
|
|
6
5
|
export * from './AuditLogsResponse';
|
|
7
6
|
export * from './CreateAPIKeyRequest';
|
|
8
7
|
export * from './CreateAPIKeyResponse';
|
|
9
8
|
export * from './CreateVaultRequest';
|
|
9
|
+
export * from './EnableClientEncryption';
|
|
10
10
|
export * from './GetUserResponse';
|
|
11
11
|
export * from './HealthCheckResponse';
|
|
12
12
|
export * from './LoginRequest';
|
|
@@ -16,4 +16,5 @@ export * from './SignupResponse';
|
|
|
16
16
|
export * from './UpdateAPIKeyRequest';
|
|
17
17
|
export * from './UpdateVaultRequest';
|
|
18
18
|
export * from './Vault';
|
|
19
|
+
export * from './VaultAPIKey';
|
|
19
20
|
export * from './VaultLite';
|