@lwshen/vault-hub-ts-fetch-client 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +2 -0
- package/README.md +2 -2
- package/dist/apis/VersionApi.d.ts +28 -0
- package/dist/apis/VersionApi.js +123 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/VersionResponse.d.ts +38 -0
- package/dist/models/VersionResponse.js +55 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
- package/src/apis/VersionApi.ts +58 -0
- package/src/apis/index.ts +1 -0
- package/src/models/VersionResponse.ts +75 -0
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -10,6 +10,7 @@ src/apis/CliApi.ts
|
|
|
10
10
|
src/apis/DefaultApi.ts
|
|
11
11
|
src/apis/UserApi.ts
|
|
12
12
|
src/apis/VaultApi.ts
|
|
13
|
+
src/apis/VersionApi.ts
|
|
13
14
|
src/apis/index.ts
|
|
14
15
|
src/index.ts
|
|
15
16
|
src/models/APIKeysResponse.ts
|
|
@@ -30,6 +31,7 @@ src/models/UpdateVaultRequest.ts
|
|
|
30
31
|
src/models/Vault.ts
|
|
31
32
|
src/models/VaultAPIKey.ts
|
|
32
33
|
src/models/VaultLite.ts
|
|
34
|
+
src/models/VersionResponse.ts
|
|
33
35
|
src/models/index.ts
|
|
34
36
|
src/runtime.ts
|
|
35
37
|
tsconfig.json
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @lwshen/vault-hub-ts-fetch-client@v1.0.
|
|
1
|
+
## @lwshen/vault-hub-ts-fetch-client@v1.0.1
|
|
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@v1.0.
|
|
39
|
+
npm install @lwshen/vault-hub-ts-fetch-client@v1.0.1 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -0,0 +1,28 @@
|
|
|
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 { VersionResponse } from '../models/index';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
export declare class VersionApi extends runtime.BaseAPI {
|
|
18
|
+
/**
|
|
19
|
+
* Returns the current version and commit hash of the application
|
|
20
|
+
* Get version information
|
|
21
|
+
*/
|
|
22
|
+
getVersionRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VersionResponse>>;
|
|
23
|
+
/**
|
|
24
|
+
* Returns the current version and commit hash of the application
|
|
25
|
+
* Get version information
|
|
26
|
+
*/
|
|
27
|
+
getVersion(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VersionResponse>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
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.VersionApi = void 0;
|
|
68
|
+
var runtime = require("../runtime");
|
|
69
|
+
var index_1 = require("../models/index");
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
var VersionApi = /** @class */ (function (_super) {
|
|
74
|
+
__extends(VersionApi, _super);
|
|
75
|
+
function VersionApi() {
|
|
76
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Returns the current version and commit hash of the application
|
|
80
|
+
* Get version information
|
|
81
|
+
*/
|
|
82
|
+
VersionApi.prototype.getVersionRaw = function (initOverrides) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
84
|
+
var queryParameters, headerParameters, response;
|
|
85
|
+
return __generator(this, function (_a) {
|
|
86
|
+
switch (_a.label) {
|
|
87
|
+
case 0:
|
|
88
|
+
queryParameters = {};
|
|
89
|
+
headerParameters = {};
|
|
90
|
+
return [4 /*yield*/, this.request({
|
|
91
|
+
path: "/api/version",
|
|
92
|
+
method: 'GET',
|
|
93
|
+
headers: headerParameters,
|
|
94
|
+
query: queryParameters,
|
|
95
|
+
}, initOverrides)];
|
|
96
|
+
case 1:
|
|
97
|
+
response = _a.sent();
|
|
98
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.VersionResponseFromJSON)(jsonValue); })];
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Returns the current version and commit hash of the application
|
|
105
|
+
* Get version information
|
|
106
|
+
*/
|
|
107
|
+
VersionApi.prototype.getVersion = function (initOverrides) {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
109
|
+
var response;
|
|
110
|
+
return __generator(this, function (_a) {
|
|
111
|
+
switch (_a.label) {
|
|
112
|
+
case 0: return [4 /*yield*/, this.getVersionRaw(initOverrides)];
|
|
113
|
+
case 1:
|
|
114
|
+
response = _a.sent();
|
|
115
|
+
return [4 /*yield*/, response.value()];
|
|
116
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
return VersionApi;
|
|
122
|
+
}(runtime.BaseAPI));
|
|
123
|
+
exports.VersionApi = VersionApi;
|
package/dist/apis/index.d.ts
CHANGED
package/dist/apis/index.js
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
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 VersionResponse
|
|
16
|
+
*/
|
|
17
|
+
export interface VersionResponse {
|
|
18
|
+
/**
|
|
19
|
+
* Application version
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof VersionResponse
|
|
22
|
+
*/
|
|
23
|
+
version: string;
|
|
24
|
+
/**
|
|
25
|
+
* Git commit hash
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof VersionResponse
|
|
28
|
+
*/
|
|
29
|
+
commit: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the VersionResponse interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfVersionResponse(value: object): value is VersionResponse;
|
|
35
|
+
export declare function VersionResponseFromJSON(json: any): VersionResponse;
|
|
36
|
+
export declare function VersionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): VersionResponse;
|
|
37
|
+
export declare function VersionResponseToJSON(json: any): VersionResponse;
|
|
38
|
+
export declare function VersionResponseToJSONTyped(value?: VersionResponse | 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.instanceOfVersionResponse = instanceOfVersionResponse;
|
|
17
|
+
exports.VersionResponseFromJSON = VersionResponseFromJSON;
|
|
18
|
+
exports.VersionResponseFromJSONTyped = VersionResponseFromJSONTyped;
|
|
19
|
+
exports.VersionResponseToJSON = VersionResponseToJSON;
|
|
20
|
+
exports.VersionResponseToJSONTyped = VersionResponseToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the VersionResponse interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfVersionResponse(value) {
|
|
25
|
+
if (!('version' in value) || value['version'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('commit' in value) || value['commit'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
function VersionResponseFromJSON(json) {
|
|
32
|
+
return VersionResponseFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
function VersionResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'version': json['version'],
|
|
40
|
+
'commit': json['commit'],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function VersionResponseToJSON(json) {
|
|
44
|
+
return VersionResponseToJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
function VersionResponseToJSONTyped(value, ignoreDiscriminator) {
|
|
47
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
48
|
+
if (value == null) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'version': value['version'],
|
|
53
|
+
'commit': value['commit'],
|
|
54
|
+
};
|
|
55
|
+
}
|
package/dist/models/index.d.ts
CHANGED
package/dist/models/index.js
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
VersionResponse,
|
|
19
|
+
} from '../models/index';
|
|
20
|
+
import {
|
|
21
|
+
VersionResponseFromJSON,
|
|
22
|
+
VersionResponseToJSON,
|
|
23
|
+
} from '../models/index';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class VersionApi extends runtime.BaseAPI {
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Returns the current version and commit hash of the application
|
|
32
|
+
* Get version information
|
|
33
|
+
*/
|
|
34
|
+
async getVersionRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VersionResponse>> {
|
|
35
|
+
const queryParameters: any = {};
|
|
36
|
+
|
|
37
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
38
|
+
|
|
39
|
+
const response = await this.request({
|
|
40
|
+
path: `/api/version`,
|
|
41
|
+
method: 'GET',
|
|
42
|
+
headers: headerParameters,
|
|
43
|
+
query: queryParameters,
|
|
44
|
+
}, initOverrides);
|
|
45
|
+
|
|
46
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => VersionResponseFromJSON(jsonValue));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Returns the current version and commit hash of the application
|
|
51
|
+
* Get version information
|
|
52
|
+
*/
|
|
53
|
+
async getVersion(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VersionResponse> {
|
|
54
|
+
const response = await this.getVersionRaw(initOverrides);
|
|
55
|
+
return await response.value();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
}
|
package/src/apis/index.ts
CHANGED
|
@@ -0,0 +1,75 @@
|
|
|
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 VersionResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface VersionResponse {
|
|
22
|
+
/**
|
|
23
|
+
* Application version
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof VersionResponse
|
|
26
|
+
*/
|
|
27
|
+
version: string;
|
|
28
|
+
/**
|
|
29
|
+
* Git commit hash
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof VersionResponse
|
|
32
|
+
*/
|
|
33
|
+
commit: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the VersionResponse interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfVersionResponse(value: object): value is VersionResponse {
|
|
40
|
+
if (!('version' in value) || value['version'] === undefined) return false;
|
|
41
|
+
if (!('commit' in value) || value['commit'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function VersionResponseFromJSON(json: any): VersionResponse {
|
|
46
|
+
return VersionResponseFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function VersionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): VersionResponse {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'version': json['version'],
|
|
56
|
+
'commit': json['commit'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function VersionResponseToJSON(json: any): VersionResponse {
|
|
61
|
+
return VersionResponseToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function VersionResponseToJSONTyped(value?: VersionResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'version': value['version'],
|
|
72
|
+
'commit': value['commit'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
package/src/models/index.ts
CHANGED