@lwshen/vault-hub-ts-fetch-client 0.20250716.93700 → 0.20250716.143150
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 -0
- package/README.md +2 -2
- package/dist/apis/ConfigurationApi.d.ts +74 -0
- package/dist/apis/ConfigurationApi.js +305 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/ConfigurationItem.d.ts +74 -0
- package/dist/models/ConfigurationItem.js +69 -0
- package/dist/models/CreateConfigurationRequest.d.ts +56 -0
- package/dist/models/CreateConfigurationRequest.js +63 -0
- package/dist/models/UpdateConfigurationRequest.d.ts +50 -0
- package/dist/models/UpdateConfigurationRequest.js +55 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/package.json +1 -1
- package/src/apis/ConfigurationApi.ts +231 -0
- package/src/apis/index.ts +1 -0
- package/src/models/ConfigurationItem.ts +124 -0
- package/src/models/CreateConfigurationRequest.ts +100 -0
- package/src/models/UpdateConfigurationRequest.ts +89 -0
- package/src/models/index.ts +3 -0
|
@@ -0,0 +1,63 @@
|
|
|
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.instanceOfCreateConfigurationRequest = instanceOfCreateConfigurationRequest;
|
|
17
|
+
exports.CreateConfigurationRequestFromJSON = CreateConfigurationRequestFromJSON;
|
|
18
|
+
exports.CreateConfigurationRequestFromJSONTyped = CreateConfigurationRequestFromJSONTyped;
|
|
19
|
+
exports.CreateConfigurationRequestToJSON = CreateConfigurationRequestToJSON;
|
|
20
|
+
exports.CreateConfigurationRequestToJSONTyped = CreateConfigurationRequestToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the CreateConfigurationRequest interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfCreateConfigurationRequest(value) {
|
|
25
|
+
if (!('uniqueId' in value) || value['uniqueId'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('value' in value) || value['value'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
function CreateConfigurationRequestFromJSON(json) {
|
|
34
|
+
return CreateConfigurationRequestFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
function CreateConfigurationRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
if (json == null) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'uniqueId': json['unique_id'],
|
|
42
|
+
'name': json['name'],
|
|
43
|
+
'value': json['value'],
|
|
44
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
45
|
+
'category': json['category'] == null ? undefined : json['category'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function CreateConfigurationRequestToJSON(json) {
|
|
49
|
+
return CreateConfigurationRequestToJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
function CreateConfigurationRequestToJSONTyped(value, ignoreDiscriminator) {
|
|
52
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
53
|
+
if (value == null) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
'unique_id': value['uniqueId'],
|
|
58
|
+
'name': value['name'],
|
|
59
|
+
'value': value['value'],
|
|
60
|
+
'description': value['description'],
|
|
61
|
+
'category': value['category'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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 UpdateConfigurationRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface UpdateConfigurationRequest {
|
|
18
|
+
/**
|
|
19
|
+
* Human-readable name
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof UpdateConfigurationRequest
|
|
22
|
+
*/
|
|
23
|
+
name?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Value to be encrypted and stored
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof UpdateConfigurationRequest
|
|
28
|
+
*/
|
|
29
|
+
value?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Human-readable description
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof UpdateConfigurationRequest
|
|
34
|
+
*/
|
|
35
|
+
description?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Category/type of config
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof UpdateConfigurationRequest
|
|
40
|
+
*/
|
|
41
|
+
category?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the UpdateConfigurationRequest interface.
|
|
45
|
+
*/
|
|
46
|
+
export declare function instanceOfUpdateConfigurationRequest(value: object): value is UpdateConfigurationRequest;
|
|
47
|
+
export declare function UpdateConfigurationRequestFromJSON(json: any): UpdateConfigurationRequest;
|
|
48
|
+
export declare function UpdateConfigurationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateConfigurationRequest;
|
|
49
|
+
export declare function UpdateConfigurationRequestToJSON(json: any): UpdateConfigurationRequest;
|
|
50
|
+
export declare function UpdateConfigurationRequestToJSONTyped(value?: UpdateConfigurationRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,55 @@
|
|
|
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.instanceOfUpdateConfigurationRequest = instanceOfUpdateConfigurationRequest;
|
|
17
|
+
exports.UpdateConfigurationRequestFromJSON = UpdateConfigurationRequestFromJSON;
|
|
18
|
+
exports.UpdateConfigurationRequestFromJSONTyped = UpdateConfigurationRequestFromJSONTyped;
|
|
19
|
+
exports.UpdateConfigurationRequestToJSON = UpdateConfigurationRequestToJSON;
|
|
20
|
+
exports.UpdateConfigurationRequestToJSONTyped = UpdateConfigurationRequestToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the UpdateConfigurationRequest interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfUpdateConfigurationRequest(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function UpdateConfigurationRequestFromJSON(json) {
|
|
28
|
+
return UpdateConfigurationRequestFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function UpdateConfigurationRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
36
|
+
'value': json['value'] == null ? undefined : json['value'],
|
|
37
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
38
|
+
'category': json['category'] == null ? undefined : json['category'],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function UpdateConfigurationRequestToJSON(json) {
|
|
42
|
+
return UpdateConfigurationRequestToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function UpdateConfigurationRequestToJSONTyped(value, ignoreDiscriminator) {
|
|
45
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
46
|
+
if (value == null) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'name': value['name'],
|
|
51
|
+
'value': value['value'],
|
|
52
|
+
'description': value['description'],
|
|
53
|
+
'category': value['category'],
|
|
54
|
+
};
|
|
55
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
export * from './ConfigurationItem';
|
|
2
|
+
export * from './CreateConfigurationRequest';
|
|
1
3
|
export * from './GetUserResponse';
|
|
2
4
|
export * from './HealthCheckResponse';
|
|
3
5
|
export * from './LoginRequest';
|
|
4
6
|
export * from './LoginResponse';
|
|
5
7
|
export * from './SignupRequest';
|
|
6
8
|
export * from './SignupResponse';
|
|
9
|
+
export * from './UpdateConfigurationRequest';
|
package/dist/models/index.js
CHANGED
|
@@ -16,9 +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("./ConfigurationItem"), exports);
|
|
20
|
+
__exportStar(require("./CreateConfigurationRequest"), exports);
|
|
19
21
|
__exportStar(require("./GetUserResponse"), exports);
|
|
20
22
|
__exportStar(require("./HealthCheckResponse"), exports);
|
|
21
23
|
__exportStar(require("./LoginRequest"), exports);
|
|
22
24
|
__exportStar(require("./LoginResponse"), exports);
|
|
23
25
|
__exportStar(require("./SignupRequest"), exports);
|
|
24
26
|
__exportStar(require("./SignupResponse"), exports);
|
|
27
|
+
__exportStar(require("./UpdateConfigurationRequest"), 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
|
+
ConfigurationItem,
|
|
19
|
+
CreateConfigurationRequest,
|
|
20
|
+
UpdateConfigurationRequest,
|
|
21
|
+
} from '../models/index';
|
|
22
|
+
import {
|
|
23
|
+
ConfigurationItemFromJSON,
|
|
24
|
+
ConfigurationItemToJSON,
|
|
25
|
+
CreateConfigurationRequestFromJSON,
|
|
26
|
+
CreateConfigurationRequestToJSON,
|
|
27
|
+
UpdateConfigurationRequestFromJSON,
|
|
28
|
+
UpdateConfigurationRequestToJSON,
|
|
29
|
+
} from '../models/index';
|
|
30
|
+
|
|
31
|
+
export interface CreateConfigurationOperationRequest {
|
|
32
|
+
createConfigurationRequest: CreateConfigurationRequest;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface DeleteConfigurationRequest {
|
|
36
|
+
id: number;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface GetConfigurationRequest {
|
|
40
|
+
id: number;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface GetConfigurationsRequest {
|
|
44
|
+
category?: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface UpdateConfigurationOperationRequest {
|
|
48
|
+
id: number;
|
|
49
|
+
updateConfigurationRequest: UpdateConfigurationRequest;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
export class ConfigurationApi extends runtime.BaseAPI {
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Create a new configuration
|
|
59
|
+
*/
|
|
60
|
+
async createConfigurationRaw(requestParameters: CreateConfigurationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConfigurationItem>> {
|
|
61
|
+
if (requestParameters['createConfigurationRequest'] == null) {
|
|
62
|
+
throw new runtime.RequiredError(
|
|
63
|
+
'createConfigurationRequest',
|
|
64
|
+
'Required parameter "createConfigurationRequest" was null or undefined when calling createConfiguration().'
|
|
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/configurations`,
|
|
76
|
+
method: 'POST',
|
|
77
|
+
headers: headerParameters,
|
|
78
|
+
query: queryParameters,
|
|
79
|
+
body: CreateConfigurationRequestToJSON(requestParameters['createConfigurationRequest']),
|
|
80
|
+
}, initOverrides);
|
|
81
|
+
|
|
82
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ConfigurationItemFromJSON(jsonValue));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Create a new configuration
|
|
87
|
+
*/
|
|
88
|
+
async createConfiguration(createConfigurationRequest: CreateConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConfigurationItem> {
|
|
89
|
+
const response = await this.createConfigurationRaw({ createConfigurationRequest: createConfigurationRequest }, initOverrides);
|
|
90
|
+
return await response.value();
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Delete a configuration
|
|
95
|
+
*/
|
|
96
|
+
async deleteConfigurationRaw(requestParameters: DeleteConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
97
|
+
if (requestParameters['id'] == null) {
|
|
98
|
+
throw new runtime.RequiredError(
|
|
99
|
+
'id',
|
|
100
|
+
'Required parameter "id" was null or undefined when calling deleteConfiguration().'
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const queryParameters: any = {};
|
|
105
|
+
|
|
106
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
107
|
+
|
|
108
|
+
const response = await this.request({
|
|
109
|
+
path: `/api/configurations/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
110
|
+
method: 'DELETE',
|
|
111
|
+
headers: headerParameters,
|
|
112
|
+
query: queryParameters,
|
|
113
|
+
}, initOverrides);
|
|
114
|
+
|
|
115
|
+
return new runtime.VoidApiResponse(response);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Delete a configuration
|
|
120
|
+
*/
|
|
121
|
+
async deleteConfiguration(id: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
122
|
+
await this.deleteConfigurationRaw({ id: id }, initOverrides);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Get a specific configuration by ID
|
|
127
|
+
*/
|
|
128
|
+
async getConfigurationRaw(requestParameters: GetConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConfigurationItem>> {
|
|
129
|
+
if (requestParameters['id'] == null) {
|
|
130
|
+
throw new runtime.RequiredError(
|
|
131
|
+
'id',
|
|
132
|
+
'Required parameter "id" was null or undefined when calling getConfiguration().'
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const queryParameters: any = {};
|
|
137
|
+
|
|
138
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
139
|
+
|
|
140
|
+
const response = await this.request({
|
|
141
|
+
path: `/api/configurations/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
142
|
+
method: 'GET',
|
|
143
|
+
headers: headerParameters,
|
|
144
|
+
query: queryParameters,
|
|
145
|
+
}, initOverrides);
|
|
146
|
+
|
|
147
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ConfigurationItemFromJSON(jsonValue));
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Get a specific configuration by ID
|
|
152
|
+
*/
|
|
153
|
+
async getConfiguration(id: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConfigurationItem> {
|
|
154
|
+
const response = await this.getConfigurationRaw({ id: id }, initOverrides);
|
|
155
|
+
return await response.value();
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Get all configurations for the current user
|
|
160
|
+
*/
|
|
161
|
+
async getConfigurationsRaw(requestParameters: GetConfigurationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ConfigurationItem>>> {
|
|
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/configurations`,
|
|
172
|
+
method: 'GET',
|
|
173
|
+
headers: headerParameters,
|
|
174
|
+
query: queryParameters,
|
|
175
|
+
}, initOverrides);
|
|
176
|
+
|
|
177
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ConfigurationItemFromJSON));
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Get all configurations for the current user
|
|
182
|
+
*/
|
|
183
|
+
async getConfigurations(category?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ConfigurationItem>> {
|
|
184
|
+
const response = await this.getConfigurationsRaw({ category: category }, initOverrides);
|
|
185
|
+
return await response.value();
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Update a configuration
|
|
190
|
+
*/
|
|
191
|
+
async updateConfigurationRaw(requestParameters: UpdateConfigurationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConfigurationItem>> {
|
|
192
|
+
if (requestParameters['id'] == null) {
|
|
193
|
+
throw new runtime.RequiredError(
|
|
194
|
+
'id',
|
|
195
|
+
'Required parameter "id" was null or undefined when calling updateConfiguration().'
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
if (requestParameters['updateConfigurationRequest'] == null) {
|
|
200
|
+
throw new runtime.RequiredError(
|
|
201
|
+
'updateConfigurationRequest',
|
|
202
|
+
'Required parameter "updateConfigurationRequest" was null or undefined when calling updateConfiguration().'
|
|
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/configurations/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
214
|
+
method: 'PUT',
|
|
215
|
+
headers: headerParameters,
|
|
216
|
+
query: queryParameters,
|
|
217
|
+
body: UpdateConfigurationRequestToJSON(requestParameters['updateConfigurationRequest']),
|
|
218
|
+
}, initOverrides);
|
|
219
|
+
|
|
220
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ConfigurationItemFromJSON(jsonValue));
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Update a configuration
|
|
225
|
+
*/
|
|
226
|
+
async updateConfiguration(id: number, updateConfigurationRequest: UpdateConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConfigurationItem> {
|
|
227
|
+
const response = await this.updateConfigurationRaw({ id: id, updateConfigurationRequest: updateConfigurationRequest }, initOverrides);
|
|
228
|
+
return await response.value();
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
}
|
package/src/apis/index.ts
CHANGED
|
@@ -0,0 +1,124 @@
|
|
|
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 ConfigurationItem
|
|
20
|
+
*/
|
|
21
|
+
export interface ConfigurationItem {
|
|
22
|
+
/**
|
|
23
|
+
* Unique identifier for the config
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ConfigurationItem
|
|
26
|
+
*/
|
|
27
|
+
uniqueId: string;
|
|
28
|
+
/**
|
|
29
|
+
* ID of the user who owns this configuration
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof ConfigurationItem
|
|
32
|
+
*/
|
|
33
|
+
userId?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Human-readable name
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof ConfigurationItem
|
|
38
|
+
*/
|
|
39
|
+
name: string;
|
|
40
|
+
/**
|
|
41
|
+
* Encrypted value
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof ConfigurationItem
|
|
44
|
+
*/
|
|
45
|
+
value: string;
|
|
46
|
+
/**
|
|
47
|
+
* Human-readable description
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof ConfigurationItem
|
|
50
|
+
*/
|
|
51
|
+
description?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Category/type of config
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof ConfigurationItem
|
|
56
|
+
*/
|
|
57
|
+
category?: string;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {Date}
|
|
61
|
+
* @memberof ConfigurationItem
|
|
62
|
+
*/
|
|
63
|
+
createdAt?: Date;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {Date}
|
|
67
|
+
* @memberof ConfigurationItem
|
|
68
|
+
*/
|
|
69
|
+
updatedAt?: Date;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Check if a given object implements the ConfigurationItem interface.
|
|
74
|
+
*/
|
|
75
|
+
export function instanceOfConfigurationItem(value: object): value is ConfigurationItem {
|
|
76
|
+
if (!('uniqueId' in value) || value['uniqueId'] === undefined) return false;
|
|
77
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
78
|
+
if (!('value' in value) || value['value'] === undefined) return false;
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function ConfigurationItemFromJSON(json: any): ConfigurationItem {
|
|
83
|
+
return ConfigurationItemFromJSONTyped(json, false);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function ConfigurationItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfigurationItem {
|
|
87
|
+
if (json == null) {
|
|
88
|
+
return json;
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
|
|
92
|
+
'uniqueId': json['unique_id'],
|
|
93
|
+
'userId': json['user_id'] == null ? undefined : json['user_id'],
|
|
94
|
+
'name': json['name'],
|
|
95
|
+
'value': json['value'],
|
|
96
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
97
|
+
'category': json['category'] == null ? undefined : json['category'],
|
|
98
|
+
'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
|
99
|
+
'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function ConfigurationItemToJSON(json: any): ConfigurationItem {
|
|
104
|
+
return ConfigurationItemToJSONTyped(json, false);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function ConfigurationItemToJSONTyped(value?: ConfigurationItem | null, ignoreDiscriminator: boolean = false): any {
|
|
108
|
+
if (value == null) {
|
|
109
|
+
return value;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return {
|
|
113
|
+
|
|
114
|
+
'unique_id': value['uniqueId'],
|
|
115
|
+
'user_id': value['userId'],
|
|
116
|
+
'name': value['name'],
|
|
117
|
+
'value': value['value'],
|
|
118
|
+
'description': value['description'],
|
|
119
|
+
'category': value['category'],
|
|
120
|
+
'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
|
121
|
+
'updated_at': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
@@ -0,0 +1,100 @@
|
|
|
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 CreateConfigurationRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface CreateConfigurationRequest {
|
|
22
|
+
/**
|
|
23
|
+
* Unique identifier for the config
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof CreateConfigurationRequest
|
|
26
|
+
*/
|
|
27
|
+
uniqueId: string;
|
|
28
|
+
/**
|
|
29
|
+
* Human-readable name
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof CreateConfigurationRequest
|
|
32
|
+
*/
|
|
33
|
+
name: string;
|
|
34
|
+
/**
|
|
35
|
+
* Value to be encrypted and stored
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof CreateConfigurationRequest
|
|
38
|
+
*/
|
|
39
|
+
value: string;
|
|
40
|
+
/**
|
|
41
|
+
* Human-readable description
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof CreateConfigurationRequest
|
|
44
|
+
*/
|
|
45
|
+
description?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Category/type of config
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof CreateConfigurationRequest
|
|
50
|
+
*/
|
|
51
|
+
category?: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the CreateConfigurationRequest interface.
|
|
56
|
+
*/
|
|
57
|
+
export function instanceOfCreateConfigurationRequest(value: object): value is CreateConfigurationRequest {
|
|
58
|
+
if (!('uniqueId' in value) || value['uniqueId'] === undefined) return false;
|
|
59
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
60
|
+
if (!('value' in value) || value['value'] === undefined) return false;
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function CreateConfigurationRequestFromJSON(json: any): CreateConfigurationRequest {
|
|
65
|
+
return CreateConfigurationRequestFromJSONTyped(json, false);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function CreateConfigurationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateConfigurationRequest {
|
|
69
|
+
if (json == null) {
|
|
70
|
+
return json;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
|
|
74
|
+
'uniqueId': json['unique_id'],
|
|
75
|
+
'name': json['name'],
|
|
76
|
+
'value': json['value'],
|
|
77
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
78
|
+
'category': json['category'] == null ? undefined : json['category'],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function CreateConfigurationRequestToJSON(json: any): CreateConfigurationRequest {
|
|
83
|
+
return CreateConfigurationRequestToJSONTyped(json, false);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function CreateConfigurationRequestToJSONTyped(value?: CreateConfigurationRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
87
|
+
if (value == null) {
|
|
88
|
+
return value;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return {
|
|
92
|
+
|
|
93
|
+
'unique_id': value['uniqueId'],
|
|
94
|
+
'name': value['name'],
|
|
95
|
+
'value': value['value'],
|
|
96
|
+
'description': value['description'],
|
|
97
|
+
'category': value['category'],
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|