@lwshen/vault-hub-ts-fetch-client 0.20250717.121502 → 0.20250717.140729
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 +4 -4
- package/README.md +2 -2
- package/dist/apis/VaultApi.d.ts +74 -0
- package/dist/apis/{ConfigurationApi.js → VaultApi.js} +52 -52
- package/dist/apis/index.d.ts +1 -1
- package/dist/apis/index.js +1 -1
- package/dist/models/CreateVaultRequest.d.ts +50 -0
- package/dist/models/{CreateConfigurationRequest.js → CreateVaultRequest.js} +13 -17
- package/dist/models/UpdateVaultRequest.d.ts +50 -0
- package/dist/models/{UpdateConfigurationRequest.js → UpdateVaultRequest.js} +13 -13
- package/dist/models/Vault.d.ts +74 -0
- package/dist/models/{ConfigurationItem.js → Vault.js} +13 -13
- package/dist/models/index.d.ts +3 -3
- package/dist/models/index.js +3 -3
- package/package.json +1 -1
- package/src/apis/VaultApi.ts +231 -0
- package/src/apis/index.ts +1 -1
- package/src/models/{CreateConfigurationRequest.ts → CreateVaultRequest.ts} +15 -24
- package/src/models/{UpdateConfigurationRequest.ts → UpdateVaultRequest.ts} +15 -15
- package/src/models/{ConfigurationItem.ts → Vault.ts} +21 -21
- package/src/models/index.ts +3 -3
- package/dist/apis/ConfigurationApi.d.ts +0 -74
- package/dist/models/ConfigurationItem.d.ts +0 -74
- package/dist/models/CreateConfigurationRequest.d.ts +0 -56
- package/dist/models/UpdateConfigurationRequest.d.ts +0 -50
- package/src/apis/ConfigurationApi.ts +0 -231
|
@@ -0,0 +1,74 @@
|
|
|
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
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface Vault
|
|
16
|
+
*/
|
|
17
|
+
export interface Vault {
|
|
18
|
+
/**
|
|
19
|
+
* Unique identifier for the vault
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof Vault
|
|
22
|
+
*/
|
|
23
|
+
uniqueId: string;
|
|
24
|
+
/**
|
|
25
|
+
* ID of the user who owns this vault
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof Vault
|
|
28
|
+
*/
|
|
29
|
+
userId?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Human-readable name
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof Vault
|
|
34
|
+
*/
|
|
35
|
+
name: string;
|
|
36
|
+
/**
|
|
37
|
+
* Encrypted value
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof Vault
|
|
40
|
+
*/
|
|
41
|
+
value: string;
|
|
42
|
+
/**
|
|
43
|
+
* Human-readable description
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof Vault
|
|
46
|
+
*/
|
|
47
|
+
description?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Category/type of vault
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof Vault
|
|
52
|
+
*/
|
|
53
|
+
category?: string;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {Date}
|
|
57
|
+
* @memberof Vault
|
|
58
|
+
*/
|
|
59
|
+
createdAt?: Date;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {Date}
|
|
63
|
+
* @memberof Vault
|
|
64
|
+
*/
|
|
65
|
+
updatedAt?: Date;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Check if a given object implements the Vault interface.
|
|
69
|
+
*/
|
|
70
|
+
export declare function instanceOfVault(value: object): value is Vault;
|
|
71
|
+
export declare function VaultFromJSON(json: any): Vault;
|
|
72
|
+
export declare function VaultFromJSONTyped(json: any, ignoreDiscriminator: boolean): Vault;
|
|
73
|
+
export declare function VaultToJSON(json: any): Vault;
|
|
74
|
+
export declare function VaultToJSONTyped(value?: Vault | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -13,15 +13,15 @@
|
|
|
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.instanceOfVault = instanceOfVault;
|
|
17
|
+
exports.VaultFromJSON = VaultFromJSON;
|
|
18
|
+
exports.VaultFromJSONTyped = VaultFromJSONTyped;
|
|
19
|
+
exports.VaultToJSON = VaultToJSON;
|
|
20
|
+
exports.VaultToJSONTyped = VaultToJSONTyped;
|
|
21
21
|
/**
|
|
22
|
-
* Check if a given object implements the
|
|
22
|
+
* Check if a given object implements the Vault interface.
|
|
23
23
|
*/
|
|
24
|
-
function
|
|
24
|
+
function instanceOfVault(value) {
|
|
25
25
|
if (!('uniqueId' in value) || value['uniqueId'] === undefined)
|
|
26
26
|
return false;
|
|
27
27
|
if (!('name' in value) || value['name'] === undefined)
|
|
@@ -30,10 +30,10 @@ function instanceOfConfigurationItem(value) {
|
|
|
30
30
|
return false;
|
|
31
31
|
return true;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
return
|
|
33
|
+
function VaultFromJSON(json) {
|
|
34
|
+
return VaultFromJSONTyped(json, false);
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function VaultFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
37
|
if (json == null) {
|
|
38
38
|
return json;
|
|
39
39
|
}
|
|
@@ -48,10 +48,10 @@ function ConfigurationItemFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
48
48
|
'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
return
|
|
51
|
+
function VaultToJSON(json) {
|
|
52
|
+
return VaultToJSONTyped(json, false);
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function VaultToJSONTyped(value, ignoreDiscriminator) {
|
|
55
55
|
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
56
56
|
if (value == null) {
|
|
57
57
|
return value;
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './CreateConfigurationRequest';
|
|
1
|
+
export * from './CreateVaultRequest';
|
|
3
2
|
export * from './GetUserResponse';
|
|
4
3
|
export * from './HealthCheckResponse';
|
|
5
4
|
export * from './LoginRequest';
|
|
6
5
|
export * from './LoginResponse';
|
|
7
6
|
export * from './SignupRequest';
|
|
8
7
|
export * from './SignupResponse';
|
|
9
|
-
export * from './
|
|
8
|
+
export * from './UpdateVaultRequest';
|
|
9
|
+
export * from './Vault';
|
package/dist/models/index.js
CHANGED
|
@@ -16,12 +16,12 @@ 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("./
|
|
20
|
-
__exportStar(require("./CreateConfigurationRequest"), exports);
|
|
19
|
+
__exportStar(require("./CreateVaultRequest"), exports);
|
|
21
20
|
__exportStar(require("./GetUserResponse"), exports);
|
|
22
21
|
__exportStar(require("./HealthCheckResponse"), exports);
|
|
23
22
|
__exportStar(require("./LoginRequest"), exports);
|
|
24
23
|
__exportStar(require("./LoginResponse"), exports);
|
|
25
24
|
__exportStar(require("./SignupRequest"), exports);
|
|
26
25
|
__exportStar(require("./SignupResponse"), exports);
|
|
27
|
-
__exportStar(require("./
|
|
26
|
+
__exportStar(require("./UpdateVaultRequest"), exports);
|
|
27
|
+
__exportStar(require("./Vault"), exports);
|
package/package.json
CHANGED
|
@@ -0,0 +1,231 @@
|
|
|
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
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
CreateVaultRequest,
|
|
19
|
+
UpdateVaultRequest,
|
|
20
|
+
Vault,
|
|
21
|
+
} from '../models/index';
|
|
22
|
+
import {
|
|
23
|
+
CreateVaultRequestFromJSON,
|
|
24
|
+
CreateVaultRequestToJSON,
|
|
25
|
+
UpdateVaultRequestFromJSON,
|
|
26
|
+
UpdateVaultRequestToJSON,
|
|
27
|
+
VaultFromJSON,
|
|
28
|
+
VaultToJSON,
|
|
29
|
+
} from '../models/index';
|
|
30
|
+
|
|
31
|
+
export interface CreateVaultOperationRequest {
|
|
32
|
+
createVaultRequest: CreateVaultRequest;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface DeleteVaultRequest {
|
|
36
|
+
uniqueId: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface GetVaultRequest {
|
|
40
|
+
uniqueId: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface GetVaultsRequest {
|
|
44
|
+
category?: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface UpdateVaultOperationRequest {
|
|
48
|
+
uniqueId: string;
|
|
49
|
+
updateVaultRequest: UpdateVaultRequest;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
export class VaultApi extends runtime.BaseAPI {
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Create a new vault
|
|
59
|
+
*/
|
|
60
|
+
async createVaultRaw(requestParameters: CreateVaultOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Vault>> {
|
|
61
|
+
if (requestParameters['createVaultRequest'] == null) {
|
|
62
|
+
throw new runtime.RequiredError(
|
|
63
|
+
'createVaultRequest',
|
|
64
|
+
'Required parameter "createVaultRequest" was null or undefined when calling createVault().'
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const queryParameters: any = {};
|
|
69
|
+
|
|
70
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
71
|
+
|
|
72
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
73
|
+
|
|
74
|
+
const response = await this.request({
|
|
75
|
+
path: `/api/vaults`,
|
|
76
|
+
method: 'POST',
|
|
77
|
+
headers: headerParameters,
|
|
78
|
+
query: queryParameters,
|
|
79
|
+
body: CreateVaultRequestToJSON(requestParameters['createVaultRequest']),
|
|
80
|
+
}, initOverrides);
|
|
81
|
+
|
|
82
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => VaultFromJSON(jsonValue));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Create a new vault
|
|
87
|
+
*/
|
|
88
|
+
async createVault(createVaultRequest: CreateVaultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Vault> {
|
|
89
|
+
const response = await this.createVaultRaw({ createVaultRequest: createVaultRequest }, initOverrides);
|
|
90
|
+
return await response.value();
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Delete a vault
|
|
95
|
+
*/
|
|
96
|
+
async deleteVaultRaw(requestParameters: DeleteVaultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
97
|
+
if (requestParameters['uniqueId'] == null) {
|
|
98
|
+
throw new runtime.RequiredError(
|
|
99
|
+
'uniqueId',
|
|
100
|
+
'Required parameter "uniqueId" was null or undefined when calling deleteVault().'
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const queryParameters: any = {};
|
|
105
|
+
|
|
106
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
107
|
+
|
|
108
|
+
const response = await this.request({
|
|
109
|
+
path: `/api/vaults/{unique_id}`.replace(`{${"unique_id"}}`, encodeURIComponent(String(requestParameters['uniqueId']))),
|
|
110
|
+
method: 'DELETE',
|
|
111
|
+
headers: headerParameters,
|
|
112
|
+
query: queryParameters,
|
|
113
|
+
}, initOverrides);
|
|
114
|
+
|
|
115
|
+
return new runtime.VoidApiResponse(response);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Delete a vault
|
|
120
|
+
*/
|
|
121
|
+
async deleteVault(uniqueId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
122
|
+
await this.deleteVaultRaw({ uniqueId: uniqueId }, initOverrides);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Get a specific vault by Unique ID
|
|
127
|
+
*/
|
|
128
|
+
async getVaultRaw(requestParameters: GetVaultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Vault>> {
|
|
129
|
+
if (requestParameters['uniqueId'] == null) {
|
|
130
|
+
throw new runtime.RequiredError(
|
|
131
|
+
'uniqueId',
|
|
132
|
+
'Required parameter "uniqueId" was null or undefined when calling getVault().'
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const queryParameters: any = {};
|
|
137
|
+
|
|
138
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
139
|
+
|
|
140
|
+
const response = await this.request({
|
|
141
|
+
path: `/api/vaults/{unique_id}`.replace(`{${"unique_id"}}`, encodeURIComponent(String(requestParameters['uniqueId']))),
|
|
142
|
+
method: 'GET',
|
|
143
|
+
headers: headerParameters,
|
|
144
|
+
query: queryParameters,
|
|
145
|
+
}, initOverrides);
|
|
146
|
+
|
|
147
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => VaultFromJSON(jsonValue));
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Get a specific vault by Unique ID
|
|
152
|
+
*/
|
|
153
|
+
async getVault(uniqueId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Vault> {
|
|
154
|
+
const response = await this.getVaultRaw({ uniqueId: uniqueId }, initOverrides);
|
|
155
|
+
return await response.value();
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Get all vaults for the current user
|
|
160
|
+
*/
|
|
161
|
+
async getVaultsRaw(requestParameters: GetVaultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Vault>>> {
|
|
162
|
+
const queryParameters: any = {};
|
|
163
|
+
|
|
164
|
+
if (requestParameters['category'] != null) {
|
|
165
|
+
queryParameters['category'] = requestParameters['category'];
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
169
|
+
|
|
170
|
+
const response = await this.request({
|
|
171
|
+
path: `/api/vaults`,
|
|
172
|
+
method: 'GET',
|
|
173
|
+
headers: headerParameters,
|
|
174
|
+
query: queryParameters,
|
|
175
|
+
}, initOverrides);
|
|
176
|
+
|
|
177
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(VaultFromJSON));
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Get all vaults for the current user
|
|
182
|
+
*/
|
|
183
|
+
async getVaults(category?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Vault>> {
|
|
184
|
+
const response = await this.getVaultsRaw({ category: category }, initOverrides);
|
|
185
|
+
return await response.value();
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Update a vault
|
|
190
|
+
*/
|
|
191
|
+
async updateVaultRaw(requestParameters: UpdateVaultOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Vault>> {
|
|
192
|
+
if (requestParameters['uniqueId'] == null) {
|
|
193
|
+
throw new runtime.RequiredError(
|
|
194
|
+
'uniqueId',
|
|
195
|
+
'Required parameter "uniqueId" was null or undefined when calling updateVault().'
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
if (requestParameters['updateVaultRequest'] == null) {
|
|
200
|
+
throw new runtime.RequiredError(
|
|
201
|
+
'updateVaultRequest',
|
|
202
|
+
'Required parameter "updateVaultRequest" was null or undefined when calling updateVault().'
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
const queryParameters: any = {};
|
|
207
|
+
|
|
208
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
209
|
+
|
|
210
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
211
|
+
|
|
212
|
+
const response = await this.request({
|
|
213
|
+
path: `/api/vaults/{unique_id}`.replace(`{${"unique_id"}}`, encodeURIComponent(String(requestParameters['uniqueId']))),
|
|
214
|
+
method: 'PUT',
|
|
215
|
+
headers: headerParameters,
|
|
216
|
+
query: queryParameters,
|
|
217
|
+
body: UpdateVaultRequestToJSON(requestParameters['updateVaultRequest']),
|
|
218
|
+
}, initOverrides);
|
|
219
|
+
|
|
220
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => VaultFromJSON(jsonValue));
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Update a vault
|
|
225
|
+
*/
|
|
226
|
+
async updateVault(uniqueId: string, updateVaultRequest: UpdateVaultRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Vault> {
|
|
227
|
+
const response = await this.updateVaultRaw({ uniqueId: uniqueId, updateVaultRequest: updateVaultRequest }, initOverrides);
|
|
228
|
+
return await response.value();
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
}
|
package/src/apis/index.ts
CHANGED
|
@@ -16,62 +16,54 @@ import { mapValues } from '../runtime';
|
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
* @export
|
|
19
|
-
* @interface
|
|
19
|
+
* @interface CreateVaultRequest
|
|
20
20
|
*/
|
|
21
|
-
export interface
|
|
22
|
-
/**
|
|
23
|
-
* Unique identifier for the config
|
|
24
|
-
* @type {string}
|
|
25
|
-
* @memberof CreateConfigurationRequest
|
|
26
|
-
*/
|
|
27
|
-
uniqueId: string;
|
|
21
|
+
export interface CreateVaultRequest {
|
|
28
22
|
/**
|
|
29
23
|
* Human-readable name
|
|
30
24
|
* @type {string}
|
|
31
|
-
* @memberof
|
|
25
|
+
* @memberof CreateVaultRequest
|
|
32
26
|
*/
|
|
33
27
|
name: string;
|
|
34
28
|
/**
|
|
35
29
|
* Value to be encrypted and stored
|
|
36
30
|
* @type {string}
|
|
37
|
-
* @memberof
|
|
31
|
+
* @memberof CreateVaultRequest
|
|
38
32
|
*/
|
|
39
33
|
value: string;
|
|
40
34
|
/**
|
|
41
35
|
* Human-readable description
|
|
42
36
|
* @type {string}
|
|
43
|
-
* @memberof
|
|
37
|
+
* @memberof CreateVaultRequest
|
|
44
38
|
*/
|
|
45
39
|
description?: string;
|
|
46
40
|
/**
|
|
47
|
-
* Category/type of
|
|
41
|
+
* Category/type of vault
|
|
48
42
|
* @type {string}
|
|
49
|
-
* @memberof
|
|
43
|
+
* @memberof CreateVaultRequest
|
|
50
44
|
*/
|
|
51
45
|
category?: string;
|
|
52
46
|
}
|
|
53
47
|
|
|
54
48
|
/**
|
|
55
|
-
* Check if a given object implements the
|
|
49
|
+
* Check if a given object implements the CreateVaultRequest interface.
|
|
56
50
|
*/
|
|
57
|
-
export function
|
|
58
|
-
if (!('uniqueId' in value) || value['uniqueId'] === undefined) return false;
|
|
51
|
+
export function instanceOfCreateVaultRequest(value: object): value is CreateVaultRequest {
|
|
59
52
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
60
53
|
if (!('value' in value) || value['value'] === undefined) return false;
|
|
61
54
|
return true;
|
|
62
55
|
}
|
|
63
56
|
|
|
64
|
-
export function
|
|
65
|
-
return
|
|
57
|
+
export function CreateVaultRequestFromJSON(json: any): CreateVaultRequest {
|
|
58
|
+
return CreateVaultRequestFromJSONTyped(json, false);
|
|
66
59
|
}
|
|
67
60
|
|
|
68
|
-
export function
|
|
61
|
+
export function CreateVaultRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateVaultRequest {
|
|
69
62
|
if (json == null) {
|
|
70
63
|
return json;
|
|
71
64
|
}
|
|
72
65
|
return {
|
|
73
66
|
|
|
74
|
-
'uniqueId': json['unique_id'],
|
|
75
67
|
'name': json['name'],
|
|
76
68
|
'value': json['value'],
|
|
77
69
|
'description': json['description'] == null ? undefined : json['description'],
|
|
@@ -79,18 +71,17 @@ export function CreateConfigurationRequestFromJSONTyped(json: any, ignoreDiscrim
|
|
|
79
71
|
};
|
|
80
72
|
}
|
|
81
73
|
|
|
82
|
-
export function
|
|
83
|
-
return
|
|
74
|
+
export function CreateVaultRequestToJSON(json: any): CreateVaultRequest {
|
|
75
|
+
return CreateVaultRequestToJSONTyped(json, false);
|
|
84
76
|
}
|
|
85
77
|
|
|
86
|
-
export function
|
|
78
|
+
export function CreateVaultRequestToJSONTyped(value?: CreateVaultRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
87
79
|
if (value == null) {
|
|
88
80
|
return value;
|
|
89
81
|
}
|
|
90
82
|
|
|
91
83
|
return {
|
|
92
84
|
|
|
93
|
-
'unique_id': value['uniqueId'],
|
|
94
85
|
'name': value['name'],
|
|
95
86
|
'value': value['value'],
|
|
96
87
|
'description': value['description'],
|
|
@@ -16,47 +16,47 @@ import { mapValues } from '../runtime';
|
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
* @export
|
|
19
|
-
* @interface
|
|
19
|
+
* @interface UpdateVaultRequest
|
|
20
20
|
*/
|
|
21
|
-
export interface
|
|
21
|
+
export interface UpdateVaultRequest {
|
|
22
22
|
/**
|
|
23
23
|
* Human-readable name
|
|
24
24
|
* @type {string}
|
|
25
|
-
* @memberof
|
|
25
|
+
* @memberof UpdateVaultRequest
|
|
26
26
|
*/
|
|
27
27
|
name?: string;
|
|
28
28
|
/**
|
|
29
29
|
* Value to be encrypted and stored
|
|
30
30
|
* @type {string}
|
|
31
|
-
* @memberof
|
|
31
|
+
* @memberof UpdateVaultRequest
|
|
32
32
|
*/
|
|
33
33
|
value?: string;
|
|
34
34
|
/**
|
|
35
35
|
* Human-readable description
|
|
36
36
|
* @type {string}
|
|
37
|
-
* @memberof
|
|
37
|
+
* @memberof UpdateVaultRequest
|
|
38
38
|
*/
|
|
39
39
|
description?: string;
|
|
40
40
|
/**
|
|
41
|
-
* Category/type of
|
|
41
|
+
* Category/type of vault
|
|
42
42
|
* @type {string}
|
|
43
|
-
* @memberof
|
|
43
|
+
* @memberof UpdateVaultRequest
|
|
44
44
|
*/
|
|
45
45
|
category?: string;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
|
-
* Check if a given object implements the
|
|
49
|
+
* Check if a given object implements the UpdateVaultRequest interface.
|
|
50
50
|
*/
|
|
51
|
-
export function
|
|
51
|
+
export function instanceOfUpdateVaultRequest(value: object): value is UpdateVaultRequest {
|
|
52
52
|
return true;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
export function
|
|
56
|
-
return
|
|
55
|
+
export function UpdateVaultRequestFromJSON(json: any): UpdateVaultRequest {
|
|
56
|
+
return UpdateVaultRequestFromJSONTyped(json, false);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
export function
|
|
59
|
+
export function UpdateVaultRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateVaultRequest {
|
|
60
60
|
if (json == null) {
|
|
61
61
|
return json;
|
|
62
62
|
}
|
|
@@ -69,11 +69,11 @@ export function UpdateConfigurationRequestFromJSONTyped(json: any, ignoreDiscrim
|
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
export function
|
|
73
|
-
return
|
|
72
|
+
export function UpdateVaultRequestToJSON(json: any): UpdateVaultRequest {
|
|
73
|
+
return UpdateVaultRequestToJSONTyped(json, false);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
export function
|
|
76
|
+
export function UpdateVaultRequestToJSONTyped(value?: UpdateVaultRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
77
77
|
if (value == null) {
|
|
78
78
|
return value;
|
|
79
79
|
}
|
|
@@ -16,74 +16,74 @@ import { mapValues } from '../runtime';
|
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
* @export
|
|
19
|
-
* @interface
|
|
19
|
+
* @interface Vault
|
|
20
20
|
*/
|
|
21
|
-
export interface
|
|
21
|
+
export interface Vault {
|
|
22
22
|
/**
|
|
23
|
-
* Unique identifier for the
|
|
23
|
+
* Unique identifier for the vault
|
|
24
24
|
* @type {string}
|
|
25
|
-
* @memberof
|
|
25
|
+
* @memberof Vault
|
|
26
26
|
*/
|
|
27
27
|
uniqueId: string;
|
|
28
28
|
/**
|
|
29
|
-
* ID of the user who owns this
|
|
29
|
+
* ID of the user who owns this vault
|
|
30
30
|
* @type {number}
|
|
31
|
-
* @memberof
|
|
31
|
+
* @memberof Vault
|
|
32
32
|
*/
|
|
33
33
|
userId?: number;
|
|
34
34
|
/**
|
|
35
35
|
* Human-readable name
|
|
36
36
|
* @type {string}
|
|
37
|
-
* @memberof
|
|
37
|
+
* @memberof Vault
|
|
38
38
|
*/
|
|
39
39
|
name: string;
|
|
40
40
|
/**
|
|
41
41
|
* Encrypted value
|
|
42
42
|
* @type {string}
|
|
43
|
-
* @memberof
|
|
43
|
+
* @memberof Vault
|
|
44
44
|
*/
|
|
45
45
|
value: string;
|
|
46
46
|
/**
|
|
47
47
|
* Human-readable description
|
|
48
48
|
* @type {string}
|
|
49
|
-
* @memberof
|
|
49
|
+
* @memberof Vault
|
|
50
50
|
*/
|
|
51
51
|
description?: string;
|
|
52
52
|
/**
|
|
53
|
-
* Category/type of
|
|
53
|
+
* Category/type of vault
|
|
54
54
|
* @type {string}
|
|
55
|
-
* @memberof
|
|
55
|
+
* @memberof Vault
|
|
56
56
|
*/
|
|
57
57
|
category?: string;
|
|
58
58
|
/**
|
|
59
59
|
*
|
|
60
60
|
* @type {Date}
|
|
61
|
-
* @memberof
|
|
61
|
+
* @memberof Vault
|
|
62
62
|
*/
|
|
63
63
|
createdAt?: Date;
|
|
64
64
|
/**
|
|
65
65
|
*
|
|
66
66
|
* @type {Date}
|
|
67
|
-
* @memberof
|
|
67
|
+
* @memberof Vault
|
|
68
68
|
*/
|
|
69
69
|
updatedAt?: Date;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
|
-
* Check if a given object implements the
|
|
73
|
+
* Check if a given object implements the Vault interface.
|
|
74
74
|
*/
|
|
75
|
-
export function
|
|
75
|
+
export function instanceOfVault(value: object): value is Vault {
|
|
76
76
|
if (!('uniqueId' in value) || value['uniqueId'] === undefined) return false;
|
|
77
77
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
78
78
|
if (!('value' in value) || value['value'] === undefined) return false;
|
|
79
79
|
return true;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
export function
|
|
83
|
-
return
|
|
82
|
+
export function VaultFromJSON(json: any): Vault {
|
|
83
|
+
return VaultFromJSONTyped(json, false);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
export function
|
|
86
|
+
export function VaultFromJSONTyped(json: any, ignoreDiscriminator: boolean): Vault {
|
|
87
87
|
if (json == null) {
|
|
88
88
|
return json;
|
|
89
89
|
}
|
|
@@ -100,11 +100,11 @@ export function ConfigurationItemFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
export function
|
|
104
|
-
return
|
|
103
|
+
export function VaultToJSON(json: any): Vault {
|
|
104
|
+
return VaultToJSONTyped(json, false);
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
export function
|
|
107
|
+
export function VaultToJSONTyped(value?: Vault | null, ignoreDiscriminator: boolean = false): any {
|
|
108
108
|
if (value == null) {
|
|
109
109
|
return value;
|
|
110
110
|
}
|