@lwshen/vault-hub-ts-fetch-client 0.20250728.154349 → 0.20250729.153154
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 +6 -0
- package/README.md +2 -2
- package/dist/apis/APIKeyApi.d.ts +64 -0
- package/dist/apis/APIKeyApi.js +270 -0
- package/dist/apis/AuditApi.js +3 -3
- package/dist/apis/VaultApi.js +3 -3
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/APIKey.d.ts +75 -0
- package/dist/models/APIKey.js +72 -0
- package/dist/models/APIKeysResponse.d.ts +51 -0
- package/dist/models/APIKeysResponse.js +64 -0
- package/dist/models/AuditLog.d.ts +10 -0
- package/dist/models/AuditLog.js +13 -7
- package/dist/models/AuditLogsResponse.js +4 -4
- package/dist/models/CreateAPIKeyRequest.d.ts +44 -0
- package/dist/models/CreateAPIKeyRequest.js +55 -0
- package/dist/models/CreateAPIKeyResponse.d.ts +39 -0
- package/dist/models/CreateAPIKeyResponse.js +56 -0
- package/dist/models/UpdateAPIKeyRequest.d.ts +50 -0
- package/dist/models/UpdateAPIKeyRequest.js +55 -0
- package/dist/models/Vault.js +8 -8
- package/dist/models/VaultLite.js +4 -4
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/package.json +1 -1
- package/src/apis/APIKeyApi.ts +219 -0
- package/src/apis/AuditApi.ts +3 -3
- package/src/apis/VaultApi.ts +3 -3
- package/src/apis/index.ts +1 -0
- package/src/models/APIKey.ts +133 -0
- package/src/models/APIKeysResponse.ts +101 -0
- package/src/models/AuditLog.ts +25 -7
- package/src/models/AuditLogsResponse.ts +4 -4
- package/src/models/CreateAPIKeyRequest.ts +82 -0
- package/src/models/CreateAPIKeyResponse.ts +83 -0
- package/src/models/UpdateAPIKeyRequest.ts +89 -0
- package/src/models/Vault.ts +8 -8
- package/src/models/VaultLite.ts +4 -4
- package/src/models/index.ts +5 -0
|
@@ -0,0 +1,83 @@
|
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { APIKey } from './APIKey';
|
|
17
|
+
import {
|
|
18
|
+
APIKeyFromJSON,
|
|
19
|
+
APIKeyFromJSONTyped,
|
|
20
|
+
APIKeyToJSON,
|
|
21
|
+
APIKeyToJSONTyped,
|
|
22
|
+
} from './APIKey';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface CreateAPIKeyResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface CreateAPIKeyResponse {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {APIKey}
|
|
33
|
+
* @memberof CreateAPIKeyResponse
|
|
34
|
+
*/
|
|
35
|
+
apiKey: APIKey;
|
|
36
|
+
/**
|
|
37
|
+
* The generated API key (only shown once)
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof CreateAPIKeyResponse
|
|
40
|
+
*/
|
|
41
|
+
key: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Check if a given object implements the CreateAPIKeyResponse interface.
|
|
46
|
+
*/
|
|
47
|
+
export function instanceOfCreateAPIKeyResponse(value: object): value is CreateAPIKeyResponse {
|
|
48
|
+
if (!('apiKey' in value) || value['apiKey'] === undefined) return false;
|
|
49
|
+
if (!('key' in value) || value['key'] === undefined) return false;
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function CreateAPIKeyResponseFromJSON(json: any): CreateAPIKeyResponse {
|
|
54
|
+
return CreateAPIKeyResponseFromJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function CreateAPIKeyResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateAPIKeyResponse {
|
|
58
|
+
if (json == null) {
|
|
59
|
+
return json;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'apiKey': APIKeyFromJSON(json['apiKey']),
|
|
64
|
+
'key': json['key'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function CreateAPIKeyResponseToJSON(json: any): CreateAPIKeyResponse {
|
|
69
|
+
return CreateAPIKeyResponseToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function CreateAPIKeyResponseToJSONTyped(value?: CreateAPIKeyResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'apiKey': APIKeyToJSON(value['apiKey']),
|
|
80
|
+
'key': value['key'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface UpdateAPIKeyRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface UpdateAPIKeyRequest {
|
|
22
|
+
/**
|
|
23
|
+
* Human-readable name for the API key
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof UpdateAPIKeyRequest
|
|
26
|
+
*/
|
|
27
|
+
name?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Array of vault unique IDs this key can access (empty = all user's vaults)
|
|
30
|
+
* @type {Array<string>}
|
|
31
|
+
* @memberof UpdateAPIKeyRequest
|
|
32
|
+
*/
|
|
33
|
+
vaultUniqueIds?: Array<string>;
|
|
34
|
+
/**
|
|
35
|
+
* Optional expiration date
|
|
36
|
+
* @type {Date}
|
|
37
|
+
* @memberof UpdateAPIKeyRequest
|
|
38
|
+
*/
|
|
39
|
+
expiresAt?: Date;
|
|
40
|
+
/**
|
|
41
|
+
* Enable or disable the API key
|
|
42
|
+
* @type {boolean}
|
|
43
|
+
* @memberof UpdateAPIKeyRequest
|
|
44
|
+
*/
|
|
45
|
+
isActive?: boolean;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the UpdateAPIKeyRequest interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfUpdateAPIKeyRequest(value: object): value is UpdateAPIKeyRequest {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function UpdateAPIKeyRequestFromJSON(json: any): UpdateAPIKeyRequest {
|
|
56
|
+
return UpdateAPIKeyRequestFromJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function UpdateAPIKeyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateAPIKeyRequest {
|
|
60
|
+
if (json == null) {
|
|
61
|
+
return json;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
|
|
65
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
66
|
+
'vaultUniqueIds': json['vaultUniqueIds'] == null ? undefined : json['vaultUniqueIds'],
|
|
67
|
+
'expiresAt': json['expiresAt'] == null ? undefined : (new Date(json['expiresAt'])),
|
|
68
|
+
'isActive': json['isActive'] == null ? undefined : json['isActive'],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function UpdateAPIKeyRequestToJSON(json: any): UpdateAPIKeyRequest {
|
|
73
|
+
return UpdateAPIKeyRequestToJSONTyped(json, false);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function UpdateAPIKeyRequestToJSONTyped(value?: UpdateAPIKeyRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
77
|
+
if (value == null) {
|
|
78
|
+
return value;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return {
|
|
82
|
+
|
|
83
|
+
'name': value['name'],
|
|
84
|
+
'vaultUniqueIds': value['vaultUniqueIds'],
|
|
85
|
+
'expiresAt': value['expiresAt'] == null ? undefined : ((value['expiresAt']).toISOString()),
|
|
86
|
+
'isActive': value['isActive'],
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
package/src/models/Vault.ts
CHANGED
|
@@ -89,14 +89,14 @@ export function VaultFromJSONTyped(json: any, ignoreDiscriminator: boolean): Vau
|
|
|
89
89
|
}
|
|
90
90
|
return {
|
|
91
91
|
|
|
92
|
-
'uniqueId': json['
|
|
93
|
-
'userId': json['
|
|
92
|
+
'uniqueId': json['uniqueId'],
|
|
93
|
+
'userId': json['userId'] == null ? undefined : json['userId'],
|
|
94
94
|
'name': json['name'],
|
|
95
95
|
'value': json['value'],
|
|
96
96
|
'description': json['description'] == null ? undefined : json['description'],
|
|
97
97
|
'category': json['category'] == null ? undefined : json['category'],
|
|
98
|
-
'createdAt': json['
|
|
99
|
-
'updatedAt': json['
|
|
98
|
+
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
99
|
+
'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
|
|
@@ -111,14 +111,14 @@ export function VaultToJSONTyped(value?: Vault | null, ignoreDiscriminator: bool
|
|
|
111
111
|
|
|
112
112
|
return {
|
|
113
113
|
|
|
114
|
-
'
|
|
115
|
-
'
|
|
114
|
+
'uniqueId': value['uniqueId'],
|
|
115
|
+
'userId': value['userId'],
|
|
116
116
|
'name': value['name'],
|
|
117
117
|
'value': value['value'],
|
|
118
118
|
'description': value['description'],
|
|
119
119
|
'category': value['category'],
|
|
120
|
-
'
|
|
121
|
-
'
|
|
120
|
+
'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
|
121
|
+
'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
124
|
|
package/src/models/VaultLite.ts
CHANGED
|
@@ -70,11 +70,11 @@ export function VaultLiteFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
70
70
|
}
|
|
71
71
|
return {
|
|
72
72
|
|
|
73
|
-
'uniqueId': json['
|
|
73
|
+
'uniqueId': json['uniqueId'],
|
|
74
74
|
'name': json['name'],
|
|
75
75
|
'description': json['description'] == null ? undefined : json['description'],
|
|
76
76
|
'category': json['category'] == null ? undefined : json['category'],
|
|
77
|
-
'updatedAt': json['
|
|
77
|
+
'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
|
|
@@ -89,11 +89,11 @@ export function VaultLiteToJSONTyped(value?: VaultLite | null, ignoreDiscriminat
|
|
|
89
89
|
|
|
90
90
|
return {
|
|
91
91
|
|
|
92
|
-
'
|
|
92
|
+
'uniqueId': value['uniqueId'],
|
|
93
93
|
'name': value['name'],
|
|
94
94
|
'description': value['description'],
|
|
95
95
|
'category': value['category'],
|
|
96
|
-
'
|
|
96
|
+
'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
99
|
|
package/src/models/index.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
export * from './APIKey';
|
|
4
|
+
export * from './APIKeysResponse';
|
|
3
5
|
export * from './AuditLog';
|
|
4
6
|
export * from './AuditLogsResponse';
|
|
7
|
+
export * from './CreateAPIKeyRequest';
|
|
8
|
+
export * from './CreateAPIKeyResponse';
|
|
5
9
|
export * from './CreateVaultRequest';
|
|
6
10
|
export * from './GetUserResponse';
|
|
7
11
|
export * from './HealthCheckResponse';
|
|
@@ -9,6 +13,7 @@ export * from './LoginRequest';
|
|
|
9
13
|
export * from './LoginResponse';
|
|
10
14
|
export * from './SignupRequest';
|
|
11
15
|
export * from './SignupResponse';
|
|
16
|
+
export * from './UpdateAPIKeyRequest';
|
|
12
17
|
export * from './UpdateVaultRequest';
|
|
13
18
|
export * from './Vault';
|
|
14
19
|
export * from './VaultLite';
|