@lwshen/vault-hub-ts-fetch-client 0.20250714.160312 → 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
package/.openapi-generator/FILES
CHANGED
|
@@ -4,16 +4,20 @@
|
|
|
4
4
|
README.md
|
|
5
5
|
package.json
|
|
6
6
|
src/apis/AuthApi.ts
|
|
7
|
+
src/apis/ConfigurationApi.ts
|
|
7
8
|
src/apis/DefaultApi.ts
|
|
8
9
|
src/apis/UserApi.ts
|
|
9
10
|
src/apis/index.ts
|
|
10
11
|
src/index.ts
|
|
12
|
+
src/models/ConfigurationItem.ts
|
|
13
|
+
src/models/CreateConfigurationRequest.ts
|
|
11
14
|
src/models/GetUserResponse.ts
|
|
12
15
|
src/models/HealthCheckResponse.ts
|
|
13
16
|
src/models/LoginRequest.ts
|
|
14
17
|
src/models/LoginResponse.ts
|
|
15
18
|
src/models/SignupRequest.ts
|
|
16
19
|
src/models/SignupResponse.ts
|
|
20
|
+
src/models/UpdateConfigurationRequest.ts
|
|
17
21
|
src/models/index.ts
|
|
18
22
|
src/runtime.ts
|
|
19
23
|
tsconfig.json
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @lwshen/vault-hub-ts-fetch-client@0.
|
|
1
|
+
## @lwshen/vault-hub-ts-fetch-client@0.20250716.143150
|
|
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.
|
|
39
|
+
npm install @lwshen/vault-hub-ts-fetch-client@0.20250716.143150 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -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
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { ConfigurationItem, CreateConfigurationRequest, UpdateConfigurationRequest } from '../models/index';
|
|
14
|
+
export interface CreateConfigurationOperationRequest {
|
|
15
|
+
createConfigurationRequest: CreateConfigurationRequest;
|
|
16
|
+
}
|
|
17
|
+
export interface DeleteConfigurationRequest {
|
|
18
|
+
id: number;
|
|
19
|
+
}
|
|
20
|
+
export interface GetConfigurationRequest {
|
|
21
|
+
id: number;
|
|
22
|
+
}
|
|
23
|
+
export interface GetConfigurationsRequest {
|
|
24
|
+
category?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface UpdateConfigurationOperationRequest {
|
|
27
|
+
id: number;
|
|
28
|
+
updateConfigurationRequest: UpdateConfigurationRequest;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
export declare class ConfigurationApi extends runtime.BaseAPI {
|
|
34
|
+
/**
|
|
35
|
+
* Create a new configuration
|
|
36
|
+
*/
|
|
37
|
+
createConfigurationRaw(requestParameters: CreateConfigurationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConfigurationItem>>;
|
|
38
|
+
/**
|
|
39
|
+
* Create a new configuration
|
|
40
|
+
*/
|
|
41
|
+
createConfiguration(createConfigurationRequest: CreateConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConfigurationItem>;
|
|
42
|
+
/**
|
|
43
|
+
* Delete a configuration
|
|
44
|
+
*/
|
|
45
|
+
deleteConfigurationRaw(requestParameters: DeleteConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
46
|
+
/**
|
|
47
|
+
* Delete a configuration
|
|
48
|
+
*/
|
|
49
|
+
deleteConfiguration(id: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Get a specific configuration by ID
|
|
52
|
+
*/
|
|
53
|
+
getConfigurationRaw(requestParameters: GetConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConfigurationItem>>;
|
|
54
|
+
/**
|
|
55
|
+
* Get a specific configuration by ID
|
|
56
|
+
*/
|
|
57
|
+
getConfiguration(id: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConfigurationItem>;
|
|
58
|
+
/**
|
|
59
|
+
* Get all configurations for the current user
|
|
60
|
+
*/
|
|
61
|
+
getConfigurationsRaw(requestParameters: GetConfigurationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ConfigurationItem>>>;
|
|
62
|
+
/**
|
|
63
|
+
* Get all configurations for the current user
|
|
64
|
+
*/
|
|
65
|
+
getConfigurations(category?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ConfigurationItem>>;
|
|
66
|
+
/**
|
|
67
|
+
* Update a configuration
|
|
68
|
+
*/
|
|
69
|
+
updateConfigurationRaw(requestParameters: UpdateConfigurationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConfigurationItem>>;
|
|
70
|
+
/**
|
|
71
|
+
* Update a configuration
|
|
72
|
+
*/
|
|
73
|
+
updateConfiguration(id: number, updateConfigurationRequest: UpdateConfigurationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConfigurationItem>;
|
|
74
|
+
}
|
|
@@ -0,0 +1,305 @@
|
|
|
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
|
+
var __extends = (this && this.__extends) || (function () {
|
|
16
|
+
var extendStatics = function (d, b) {
|
|
17
|
+
extendStatics = Object.setPrototypeOf ||
|
|
18
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
+
return extendStatics(d, b);
|
|
21
|
+
};
|
|
22
|
+
return function (d, b) {
|
|
23
|
+
if (typeof b !== "function" && b !== null)
|
|
24
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
+
extendStatics(d, b);
|
|
26
|
+
function __() { this.constructor = d; }
|
|
27
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
+
};
|
|
29
|
+
})();
|
|
30
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
31
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
32
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
33
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
34
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
35
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
36
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
40
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
41
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
42
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
43
|
+
function step(op) {
|
|
44
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
45
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
46
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
47
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
48
|
+
switch (op[0]) {
|
|
49
|
+
case 0: case 1: t = op; break;
|
|
50
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
51
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
52
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
53
|
+
default:
|
|
54
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
55
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
56
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
57
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
58
|
+
if (t[2]) _.ops.pop();
|
|
59
|
+
_.trys.pop(); continue;
|
|
60
|
+
}
|
|
61
|
+
op = body.call(thisArg, _);
|
|
62
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
63
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
|
+
exports.ConfigurationApi = void 0;
|
|
68
|
+
var runtime = require("../runtime");
|
|
69
|
+
var index_1 = require("../models/index");
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
var ConfigurationApi = /** @class */ (function (_super) {
|
|
74
|
+
__extends(ConfigurationApi, _super);
|
|
75
|
+
function ConfigurationApi() {
|
|
76
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Create a new configuration
|
|
80
|
+
*/
|
|
81
|
+
ConfigurationApi.prototype.createConfigurationRaw = function (requestParameters, initOverrides) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
+
var queryParameters, headerParameters, response;
|
|
84
|
+
return __generator(this, function (_a) {
|
|
85
|
+
switch (_a.label) {
|
|
86
|
+
case 0:
|
|
87
|
+
if (requestParameters['createConfigurationRequest'] == null) {
|
|
88
|
+
throw new runtime.RequiredError('createConfigurationRequest', 'Required parameter "createConfigurationRequest" was null or undefined when calling createConfiguration().');
|
|
89
|
+
}
|
|
90
|
+
queryParameters = {};
|
|
91
|
+
headerParameters = {};
|
|
92
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
93
|
+
return [4 /*yield*/, this.request({
|
|
94
|
+
path: "/api/configurations",
|
|
95
|
+
method: 'POST',
|
|
96
|
+
headers: headerParameters,
|
|
97
|
+
query: queryParameters,
|
|
98
|
+
body: (0, index_1.CreateConfigurationRequestToJSON)(requestParameters['createConfigurationRequest']),
|
|
99
|
+
}, initOverrides)];
|
|
100
|
+
case 1:
|
|
101
|
+
response = _a.sent();
|
|
102
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ConfigurationItemFromJSON)(jsonValue); })];
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Create a new configuration
|
|
109
|
+
*/
|
|
110
|
+
ConfigurationApi.prototype.createConfiguration = function (createConfigurationRequest, initOverrides) {
|
|
111
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
112
|
+
var response;
|
|
113
|
+
return __generator(this, function (_a) {
|
|
114
|
+
switch (_a.label) {
|
|
115
|
+
case 0: return [4 /*yield*/, this.createConfigurationRaw({ createConfigurationRequest: createConfigurationRequest }, initOverrides)];
|
|
116
|
+
case 1:
|
|
117
|
+
response = _a.sent();
|
|
118
|
+
return [4 /*yield*/, response.value()];
|
|
119
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Delete a configuration
|
|
126
|
+
*/
|
|
127
|
+
ConfigurationApi.prototype.deleteConfigurationRaw = function (requestParameters, initOverrides) {
|
|
128
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
129
|
+
var queryParameters, headerParameters, response;
|
|
130
|
+
return __generator(this, function (_a) {
|
|
131
|
+
switch (_a.label) {
|
|
132
|
+
case 0:
|
|
133
|
+
if (requestParameters['id'] == null) {
|
|
134
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteConfiguration().');
|
|
135
|
+
}
|
|
136
|
+
queryParameters = {};
|
|
137
|
+
headerParameters = {};
|
|
138
|
+
return [4 /*yield*/, this.request({
|
|
139
|
+
path: "/api/configurations/{id}".replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id']))),
|
|
140
|
+
method: 'DELETE',
|
|
141
|
+
headers: headerParameters,
|
|
142
|
+
query: queryParameters,
|
|
143
|
+
}, initOverrides)];
|
|
144
|
+
case 1:
|
|
145
|
+
response = _a.sent();
|
|
146
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* Delete a configuration
|
|
153
|
+
*/
|
|
154
|
+
ConfigurationApi.prototype.deleteConfiguration = function (id, initOverrides) {
|
|
155
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
156
|
+
return __generator(this, function (_a) {
|
|
157
|
+
switch (_a.label) {
|
|
158
|
+
case 0: return [4 /*yield*/, this.deleteConfigurationRaw({ id: id }, initOverrides)];
|
|
159
|
+
case 1:
|
|
160
|
+
_a.sent();
|
|
161
|
+
return [2 /*return*/];
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* Get a specific configuration by ID
|
|
168
|
+
*/
|
|
169
|
+
ConfigurationApi.prototype.getConfigurationRaw = function (requestParameters, initOverrides) {
|
|
170
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
171
|
+
var queryParameters, headerParameters, response;
|
|
172
|
+
return __generator(this, function (_a) {
|
|
173
|
+
switch (_a.label) {
|
|
174
|
+
case 0:
|
|
175
|
+
if (requestParameters['id'] == null) {
|
|
176
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getConfiguration().');
|
|
177
|
+
}
|
|
178
|
+
queryParameters = {};
|
|
179
|
+
headerParameters = {};
|
|
180
|
+
return [4 /*yield*/, this.request({
|
|
181
|
+
path: "/api/configurations/{id}".replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id']))),
|
|
182
|
+
method: 'GET',
|
|
183
|
+
headers: headerParameters,
|
|
184
|
+
query: queryParameters,
|
|
185
|
+
}, initOverrides)];
|
|
186
|
+
case 1:
|
|
187
|
+
response = _a.sent();
|
|
188
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ConfigurationItemFromJSON)(jsonValue); })];
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
};
|
|
193
|
+
/**
|
|
194
|
+
* Get a specific configuration by ID
|
|
195
|
+
*/
|
|
196
|
+
ConfigurationApi.prototype.getConfiguration = function (id, initOverrides) {
|
|
197
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
198
|
+
var response;
|
|
199
|
+
return __generator(this, function (_a) {
|
|
200
|
+
switch (_a.label) {
|
|
201
|
+
case 0: return [4 /*yield*/, this.getConfigurationRaw({ id: id }, initOverrides)];
|
|
202
|
+
case 1:
|
|
203
|
+
response = _a.sent();
|
|
204
|
+
return [4 /*yield*/, response.value()];
|
|
205
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
});
|
|
209
|
+
};
|
|
210
|
+
/**
|
|
211
|
+
* Get all configurations for the current user
|
|
212
|
+
*/
|
|
213
|
+
ConfigurationApi.prototype.getConfigurationsRaw = function (requestParameters, initOverrides) {
|
|
214
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
215
|
+
var queryParameters, headerParameters, response;
|
|
216
|
+
return __generator(this, function (_a) {
|
|
217
|
+
switch (_a.label) {
|
|
218
|
+
case 0:
|
|
219
|
+
queryParameters = {};
|
|
220
|
+
if (requestParameters['category'] != null) {
|
|
221
|
+
queryParameters['category'] = requestParameters['category'];
|
|
222
|
+
}
|
|
223
|
+
headerParameters = {};
|
|
224
|
+
return [4 /*yield*/, this.request({
|
|
225
|
+
path: "/api/configurations",
|
|
226
|
+
method: 'GET',
|
|
227
|
+
headers: headerParameters,
|
|
228
|
+
query: queryParameters,
|
|
229
|
+
}, initOverrides)];
|
|
230
|
+
case 1:
|
|
231
|
+
response = _a.sent();
|
|
232
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.ConfigurationItemFromJSON); })];
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
};
|
|
237
|
+
/**
|
|
238
|
+
* Get all configurations for the current user
|
|
239
|
+
*/
|
|
240
|
+
ConfigurationApi.prototype.getConfigurations = function (category, initOverrides) {
|
|
241
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
242
|
+
var response;
|
|
243
|
+
return __generator(this, function (_a) {
|
|
244
|
+
switch (_a.label) {
|
|
245
|
+
case 0: return [4 /*yield*/, this.getConfigurationsRaw({ category: category }, initOverrides)];
|
|
246
|
+
case 1:
|
|
247
|
+
response = _a.sent();
|
|
248
|
+
return [4 /*yield*/, response.value()];
|
|
249
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* Update a configuration
|
|
256
|
+
*/
|
|
257
|
+
ConfigurationApi.prototype.updateConfigurationRaw = function (requestParameters, initOverrides) {
|
|
258
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
259
|
+
var queryParameters, headerParameters, response;
|
|
260
|
+
return __generator(this, function (_a) {
|
|
261
|
+
switch (_a.label) {
|
|
262
|
+
case 0:
|
|
263
|
+
if (requestParameters['id'] == null) {
|
|
264
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateConfiguration().');
|
|
265
|
+
}
|
|
266
|
+
if (requestParameters['updateConfigurationRequest'] == null) {
|
|
267
|
+
throw new runtime.RequiredError('updateConfigurationRequest', 'Required parameter "updateConfigurationRequest" was null or undefined when calling updateConfiguration().');
|
|
268
|
+
}
|
|
269
|
+
queryParameters = {};
|
|
270
|
+
headerParameters = {};
|
|
271
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
272
|
+
return [4 /*yield*/, this.request({
|
|
273
|
+
path: "/api/configurations/{id}".replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id']))),
|
|
274
|
+
method: 'PUT',
|
|
275
|
+
headers: headerParameters,
|
|
276
|
+
query: queryParameters,
|
|
277
|
+
body: (0, index_1.UpdateConfigurationRequestToJSON)(requestParameters['updateConfigurationRequest']),
|
|
278
|
+
}, initOverrides)];
|
|
279
|
+
case 1:
|
|
280
|
+
response = _a.sent();
|
|
281
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ConfigurationItemFromJSON)(jsonValue); })];
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
});
|
|
285
|
+
};
|
|
286
|
+
/**
|
|
287
|
+
* Update a configuration
|
|
288
|
+
*/
|
|
289
|
+
ConfigurationApi.prototype.updateConfiguration = function (id, updateConfigurationRequest, initOverrides) {
|
|
290
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
291
|
+
var response;
|
|
292
|
+
return __generator(this, function (_a) {
|
|
293
|
+
switch (_a.label) {
|
|
294
|
+
case 0: return [4 /*yield*/, this.updateConfigurationRaw({ id: id, updateConfigurationRequest: updateConfigurationRequest }, initOverrides)];
|
|
295
|
+
case 1:
|
|
296
|
+
response = _a.sent();
|
|
297
|
+
return [4 /*yield*/, response.value()];
|
|
298
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
});
|
|
302
|
+
};
|
|
303
|
+
return ConfigurationApi;
|
|
304
|
+
}(runtime.BaseAPI));
|
|
305
|
+
exports.ConfigurationApi = ConfigurationApi;
|
package/dist/apis/index.d.ts
CHANGED
package/dist/apis/index.js
CHANGED
|
@@ -17,5 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
19
|
__exportStar(require("./AuthApi"), exports);
|
|
20
|
+
__exportStar(require("./ConfigurationApi"), exports);
|
|
20
21
|
__exportStar(require("./DefaultApi"), exports);
|
|
21
22
|
__exportStar(require("./UserApi"), exports);
|
|
@@ -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 ConfigurationItem
|
|
16
|
+
*/
|
|
17
|
+
export interface ConfigurationItem {
|
|
18
|
+
/**
|
|
19
|
+
* Unique identifier for the config
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ConfigurationItem
|
|
22
|
+
*/
|
|
23
|
+
uniqueId: string;
|
|
24
|
+
/**
|
|
25
|
+
* ID of the user who owns this configuration
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof ConfigurationItem
|
|
28
|
+
*/
|
|
29
|
+
userId?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Human-readable name
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ConfigurationItem
|
|
34
|
+
*/
|
|
35
|
+
name: string;
|
|
36
|
+
/**
|
|
37
|
+
* Encrypted value
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof ConfigurationItem
|
|
40
|
+
*/
|
|
41
|
+
value: string;
|
|
42
|
+
/**
|
|
43
|
+
* Human-readable description
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof ConfigurationItem
|
|
46
|
+
*/
|
|
47
|
+
description?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Category/type of config
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof ConfigurationItem
|
|
52
|
+
*/
|
|
53
|
+
category?: string;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {Date}
|
|
57
|
+
* @memberof ConfigurationItem
|
|
58
|
+
*/
|
|
59
|
+
createdAt?: Date;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {Date}
|
|
63
|
+
* @memberof ConfigurationItem
|
|
64
|
+
*/
|
|
65
|
+
updatedAt?: Date;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Check if a given object implements the ConfigurationItem interface.
|
|
69
|
+
*/
|
|
70
|
+
export declare function instanceOfConfigurationItem(value: object): value is ConfigurationItem;
|
|
71
|
+
export declare function ConfigurationItemFromJSON(json: any): ConfigurationItem;
|
|
72
|
+
export declare function ConfigurationItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConfigurationItem;
|
|
73
|
+
export declare function ConfigurationItemToJSON(json: any): ConfigurationItem;
|
|
74
|
+
export declare function ConfigurationItemToJSONTyped(value?: ConfigurationItem | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,69 @@
|
|
|
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.instanceOfConfigurationItem = instanceOfConfigurationItem;
|
|
17
|
+
exports.ConfigurationItemFromJSON = ConfigurationItemFromJSON;
|
|
18
|
+
exports.ConfigurationItemFromJSONTyped = ConfigurationItemFromJSONTyped;
|
|
19
|
+
exports.ConfigurationItemToJSON = ConfigurationItemToJSON;
|
|
20
|
+
exports.ConfigurationItemToJSONTyped = ConfigurationItemToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the ConfigurationItem interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfConfigurationItem(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 ConfigurationItemFromJSON(json) {
|
|
34
|
+
return ConfigurationItemFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
function ConfigurationItemFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
if (json == null) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'uniqueId': json['unique_id'],
|
|
42
|
+
'userId': json['user_id'] == null ? undefined : json['user_id'],
|
|
43
|
+
'name': json['name'],
|
|
44
|
+
'value': json['value'],
|
|
45
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
46
|
+
'category': json['category'] == null ? undefined : json['category'],
|
|
47
|
+
'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
|
48
|
+
'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function ConfigurationItemToJSON(json) {
|
|
52
|
+
return ConfigurationItemToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
function ConfigurationItemToJSONTyped(value, ignoreDiscriminator) {
|
|
55
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
56
|
+
if (value == null) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
'unique_id': value['uniqueId'],
|
|
61
|
+
'user_id': value['userId'],
|
|
62
|
+
'name': value['name'],
|
|
63
|
+
'value': value['value'],
|
|
64
|
+
'description': value['description'],
|
|
65
|
+
'category': value['category'],
|
|
66
|
+
'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
|
67
|
+
'updated_at': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
|
|
68
|
+
};
|
|
69
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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 CreateConfigurationRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface CreateConfigurationRequest {
|
|
18
|
+
/**
|
|
19
|
+
* Unique identifier for the config
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CreateConfigurationRequest
|
|
22
|
+
*/
|
|
23
|
+
uniqueId: string;
|
|
24
|
+
/**
|
|
25
|
+
* Human-readable name
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof CreateConfigurationRequest
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
/**
|
|
31
|
+
* Value to be encrypted and stored
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof CreateConfigurationRequest
|
|
34
|
+
*/
|
|
35
|
+
value: string;
|
|
36
|
+
/**
|
|
37
|
+
* Human-readable description
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof CreateConfigurationRequest
|
|
40
|
+
*/
|
|
41
|
+
description?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Category/type of config
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof CreateConfigurationRequest
|
|
46
|
+
*/
|
|
47
|
+
category?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the CreateConfigurationRequest interface.
|
|
51
|
+
*/
|
|
52
|
+
export declare function instanceOfCreateConfigurationRequest(value: object): value is CreateConfigurationRequest;
|
|
53
|
+
export declare function CreateConfigurationRequestFromJSON(json: any): CreateConfigurationRequest;
|
|
54
|
+
export declare function CreateConfigurationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateConfigurationRequest;
|
|
55
|
+
export declare function CreateConfigurationRequestToJSON(json: any): CreateConfigurationRequest;
|
|
56
|
+
export declare function CreateConfigurationRequestToJSONTyped(value?: CreateConfigurationRequest | null, ignoreDiscriminator?: boolean): any;
|