@knowledge-stack/api-test 1.0.12

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.
@@ -0,0 +1,13 @@
1
+ .gitignore
2
+ .npmignore
3
+ .openapi-generator-ignore
4
+ README.md
5
+ package.json
6
+ src/apis/DefaultApi.ts
7
+ src/apis/index.ts
8
+ src/index.ts
9
+ src/models/HealthCheckResponse.ts
10
+ src/models/index.ts
11
+ src/runtime.ts
12
+ tsconfig.esm.json
13
+ tsconfig.json
@@ -0,0 +1 @@
1
+ 7.16.0
@@ -0,0 +1,23 @@
1
+ # OpenAPI Generator Ignore
2
+ # Generated by openapi-generator https://github.com/openapitools/openapi-generator
3
+
4
+ # Use this file to prevent files from being overwritten by the generator.
5
+ # The patterns follow closely to .gitignore or .dockerignore.
6
+
7
+ # As an example, the C# client generator defines ApiClient.cs.
8
+ # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9
+ #ApiClient.cs
10
+
11
+ # You can match any string of characters against a directory, file or extension with a single asterisk (*):
12
+ #foo/*/qux
13
+ # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14
+
15
+ # You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16
+ #foo/**/qux
17
+ # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18
+
19
+ # You can also negate patterns with an exclamation (!).
20
+ # For example, you can ignore all files in a docs folder with the file extension .md:
21
+ #docs/*.md
22
+ # Then explicitly reverse the ignore rule for a single file:
23
+ #!docs/README.md
package/README.md ADDED
@@ -0,0 +1,46 @@
1
+ ## @knowledge-stack/api-test@1.0.12
2
+
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
+
5
+ Environment
6
+ * Node.js
7
+ * Webpack
8
+ * Browserify
9
+
10
+ Language level
11
+ * ES5 - you must have a Promises/A+ library installed
12
+ * ES6
13
+
14
+ Module system
15
+ * CommonJS
16
+ * ES6 module system
17
+
18
+ It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html))
19
+
20
+ ### Building
21
+
22
+ To build and compile the typescript sources to javascript use:
23
+ ```
24
+ npm install
25
+ npm run build
26
+ ```
27
+
28
+ ### Publishing
29
+
30
+ First build the package then run `npm publish`
31
+
32
+ ### Consuming
33
+
34
+ navigate to the folder of your consuming project and run one of the following commands.
35
+
36
+ _published:_
37
+
38
+ ```
39
+ npm install @knowledge-stack/api-test@1.0.12 --save
40
+ ```
41
+
42
+ _unPublished (not recommended):_
43
+
44
+ ```
45
+ npm install PATH_TO_GENERATED_PACKAGE --save
46
+ ```
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.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 { HealthCheckResponse } from '../models/index';
14
+ /**
15
+ * DefaultApi - interface
16
+ *
17
+ * @export
18
+ * @interface DefaultApiInterface
19
+ */
20
+ export interface DefaultApiInterface {
21
+ /**
22
+ * Health check endpoint.
23
+ * @summary Health Check
24
+ * @param {*} [options] Override http request option.
25
+ * @throws {RequiredError}
26
+ * @memberof DefaultApiInterface
27
+ */
28
+ healthCheckHealthzGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<HealthCheckResponse>>;
29
+ /**
30
+ * Health check endpoint.
31
+ * Health Check
32
+ */
33
+ healthCheckHealthzGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<HealthCheckResponse>;
34
+ /**
35
+ * Root endpoint.
36
+ * @summary Root
37
+ * @param {*} [options] Override http request option.
38
+ * @throws {RequiredError}
39
+ * @memberof DefaultApiInterface
40
+ */
41
+ rootGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>>;
42
+ /**
43
+ * Root endpoint.
44
+ * Root
45
+ */
46
+ rootGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
47
+ }
48
+ /**
49
+ *
50
+ */
51
+ export declare class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
52
+ /**
53
+ * Health check endpoint.
54
+ * Health Check
55
+ */
56
+ healthCheckHealthzGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<HealthCheckResponse>>;
57
+ /**
58
+ * Health check endpoint.
59
+ * Health Check
60
+ */
61
+ healthCheckHealthzGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<HealthCheckResponse>;
62
+ /**
63
+ * Root endpoint.
64
+ * Root
65
+ */
66
+ rootGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>>;
67
+ /**
68
+ * Root endpoint.
69
+ * Root
70
+ */
71
+ rootGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
72
+ }
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Knowledge Stack API
6
+ * Knowledge Stack backend API for authentication and knowledge management
7
+ *
8
+ * The version of the OpenAPI document: 0.1.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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.DefaultApi = void 0;
26
+ const runtime = require("../runtime");
27
+ const index_1 = require("../models/index");
28
+ /**
29
+ *
30
+ */
31
+ class DefaultApi extends runtime.BaseAPI {
32
+ /**
33
+ * Health check endpoint.
34
+ * Health Check
35
+ */
36
+ healthCheckHealthzGetRaw(initOverrides) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ const queryParameters = {};
39
+ const headerParameters = {};
40
+ let urlPath = `/healthz`;
41
+ const response = yield this.request({
42
+ path: urlPath,
43
+ method: 'GET',
44
+ headers: headerParameters,
45
+ query: queryParameters,
46
+ }, initOverrides);
47
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.HealthCheckResponseFromJSON)(jsonValue));
48
+ });
49
+ }
50
+ /**
51
+ * Health check endpoint.
52
+ * Health Check
53
+ */
54
+ healthCheckHealthzGet(initOverrides) {
55
+ return __awaiter(this, void 0, void 0, function* () {
56
+ const response = yield this.healthCheckHealthzGetRaw(initOverrides);
57
+ return yield response.value();
58
+ });
59
+ }
60
+ /**
61
+ * Root endpoint.
62
+ * Root
63
+ */
64
+ rootGetRaw(initOverrides) {
65
+ return __awaiter(this, void 0, void 0, function* () {
66
+ const queryParameters = {};
67
+ const headerParameters = {};
68
+ let urlPath = `/`;
69
+ const response = yield this.request({
70
+ path: urlPath,
71
+ method: 'GET',
72
+ headers: headerParameters,
73
+ query: queryParameters,
74
+ }, initOverrides);
75
+ if (this.isJsonMime(response.headers.get('content-type'))) {
76
+ return new runtime.JSONApiResponse(response);
77
+ }
78
+ else {
79
+ return new runtime.TextApiResponse(response);
80
+ }
81
+ });
82
+ }
83
+ /**
84
+ * Root endpoint.
85
+ * Root
86
+ */
87
+ rootGet(initOverrides) {
88
+ return __awaiter(this, void 0, void 0, function* () {
89
+ const response = yield this.rootGetRaw(initOverrides);
90
+ return yield response.value();
91
+ });
92
+ }
93
+ }
94
+ exports.DefaultApi = DefaultApi;
@@ -0,0 +1 @@
1
+ export * from './DefaultApi';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ /* tslint:disable */
18
+ /* eslint-disable */
19
+ __exportStar(require("./DefaultApi"), exports);
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.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 { HealthCheckResponse } from '../models/index';
14
+ /**
15
+ * DefaultApi - interface
16
+ *
17
+ * @export
18
+ * @interface DefaultApiInterface
19
+ */
20
+ export interface DefaultApiInterface {
21
+ /**
22
+ * Health check endpoint.
23
+ * @summary Health Check
24
+ * @param {*} [options] Override http request option.
25
+ * @throws {RequiredError}
26
+ * @memberof DefaultApiInterface
27
+ */
28
+ healthCheckHealthzGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<HealthCheckResponse>>;
29
+ /**
30
+ * Health check endpoint.
31
+ * Health Check
32
+ */
33
+ healthCheckHealthzGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<HealthCheckResponse>;
34
+ /**
35
+ * Root endpoint.
36
+ * @summary Root
37
+ * @param {*} [options] Override http request option.
38
+ * @throws {RequiredError}
39
+ * @memberof DefaultApiInterface
40
+ */
41
+ rootGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>>;
42
+ /**
43
+ * Root endpoint.
44
+ * Root
45
+ */
46
+ rootGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
47
+ }
48
+ /**
49
+ *
50
+ */
51
+ export declare class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
52
+ /**
53
+ * Health check endpoint.
54
+ * Health Check
55
+ */
56
+ healthCheckHealthzGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<HealthCheckResponse>>;
57
+ /**
58
+ * Health check endpoint.
59
+ * Health Check
60
+ */
61
+ healthCheckHealthzGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<HealthCheckResponse>;
62
+ /**
63
+ * Root endpoint.
64
+ * Root
65
+ */
66
+ rootGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>>;
67
+ /**
68
+ * Root endpoint.
69
+ * Root
70
+ */
71
+ rootGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
72
+ }
@@ -0,0 +1,90 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management
6
+ *
7
+ * The version of the OpenAPI document: 0.1.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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime';
24
+ import { HealthCheckResponseFromJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class DefaultApi extends runtime.BaseAPI {
29
+ /**
30
+ * Health check endpoint.
31
+ * Health Check
32
+ */
33
+ healthCheckHealthzGetRaw(initOverrides) {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ const queryParameters = {};
36
+ const headerParameters = {};
37
+ let urlPath = `/healthz`;
38
+ const response = yield this.request({
39
+ path: urlPath,
40
+ method: 'GET',
41
+ headers: headerParameters,
42
+ query: queryParameters,
43
+ }, initOverrides);
44
+ return new runtime.JSONApiResponse(response, (jsonValue) => HealthCheckResponseFromJSON(jsonValue));
45
+ });
46
+ }
47
+ /**
48
+ * Health check endpoint.
49
+ * Health Check
50
+ */
51
+ healthCheckHealthzGet(initOverrides) {
52
+ return __awaiter(this, void 0, void 0, function* () {
53
+ const response = yield this.healthCheckHealthzGetRaw(initOverrides);
54
+ return yield response.value();
55
+ });
56
+ }
57
+ /**
58
+ * Root endpoint.
59
+ * Root
60
+ */
61
+ rootGetRaw(initOverrides) {
62
+ return __awaiter(this, void 0, void 0, function* () {
63
+ const queryParameters = {};
64
+ const headerParameters = {};
65
+ let urlPath = `/`;
66
+ const response = yield this.request({
67
+ path: urlPath,
68
+ method: 'GET',
69
+ headers: headerParameters,
70
+ query: queryParameters,
71
+ }, initOverrides);
72
+ if (this.isJsonMime(response.headers.get('content-type'))) {
73
+ return new runtime.JSONApiResponse(response);
74
+ }
75
+ else {
76
+ return new runtime.TextApiResponse(response);
77
+ }
78
+ });
79
+ }
80
+ /**
81
+ * Root endpoint.
82
+ * Root
83
+ */
84
+ rootGet(initOverrides) {
85
+ return __awaiter(this, void 0, void 0, function* () {
86
+ const response = yield this.rootGetRaw(initOverrides);
87
+ return yield response.value();
88
+ });
89
+ }
90
+ }
@@ -0,0 +1 @@
1
+ export * from './DefaultApi';
@@ -0,0 +1,3 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './DefaultApi';
@@ -0,0 +1,3 @@
1
+ export * from './runtime';
2
+ export * from './apis/index';
3
+ export * from './models/index';
@@ -0,0 +1,5 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './runtime';
4
+ export * from './apis/index';
5
+ export * from './models/index';
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.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 HealthCheckResponse
16
+ */
17
+ export interface HealthCheckResponse {
18
+ [key: string]: any | any;
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof HealthCheckResponse
23
+ */
24
+ status?: string;
25
+ /**
26
+ *
27
+ * @type {Date}
28
+ * @memberof HealthCheckResponse
29
+ */
30
+ databaseTs: Date;
31
+ }
32
+ /**
33
+ * Check if a given object implements the HealthCheckResponse interface.
34
+ */
35
+ export declare function instanceOfHealthCheckResponse(value: object): value is HealthCheckResponse;
36
+ export declare function HealthCheckResponseFromJSON(json: any): HealthCheckResponse;
37
+ export declare function HealthCheckResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): HealthCheckResponse;
38
+ export declare function HealthCheckResponseToJSON(json: any): HealthCheckResponse;
39
+ export declare function HealthCheckResponseToJSONTyped(value?: HealthCheckResponse | null, ignoreDiscriminator?: boolean): any;
40
+ export declare const HealthCheckResponsePropertyValidationAttributesMap: {
41
+ [property: string]: {
42
+ maxLength?: number;
43
+ minLength?: number;
44
+ pattern?: string;
45
+ maximum?: number;
46
+ exclusiveMaximum?: boolean;
47
+ minimum?: number;
48
+ exclusiveMinimum?: boolean;
49
+ multipleOf?: number;
50
+ maxItems?: number;
51
+ minItems?: number;
52
+ uniqueItems?: boolean;
53
+ };
54
+ };
55
+ export declare const HealthCheckResponseAdditionalPropertiesValidationAttributes: {
56
+ maxProperties?: number;
57
+ minProperties?: number;
58
+ };
@@ -0,0 +1,41 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management
6
+ *
7
+ * The version of the OpenAPI document: 0.1.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
+ * Check if a given object implements the HealthCheckResponse interface.
16
+ */
17
+ export function instanceOfHealthCheckResponse(value) {
18
+ if (!('databaseTs' in value) || value['databaseTs'] === undefined)
19
+ return false;
20
+ return true;
21
+ }
22
+ export function HealthCheckResponseFromJSON(json) {
23
+ return HealthCheckResponseFromJSONTyped(json, false);
24
+ }
25
+ export function HealthCheckResponseFromJSONTyped(json, ignoreDiscriminator) {
26
+ if (json == null) {
27
+ return json;
28
+ }
29
+ return Object.assign(Object.assign({}, json), { 'status': json['status'] == null ? undefined : json['status'], 'databaseTs': (new Date(json['database_ts'])) });
30
+ }
31
+ export function HealthCheckResponseToJSON(json) {
32
+ return HealthCheckResponseToJSONTyped(json, false);
33
+ }
34
+ export function HealthCheckResponseToJSONTyped(value, ignoreDiscriminator = false) {
35
+ if (value == null) {
36
+ return value;
37
+ }
38
+ return Object.assign(Object.assign({}, value), { 'status': value['status'], 'database_ts': value['databaseTs'].toISOString() });
39
+ }
40
+ export const HealthCheckResponsePropertyValidationAttributesMap = {};
41
+ export const HealthCheckResponseAdditionalPropertiesValidationAttributes = {};
@@ -0,0 +1 @@
1
+ export * from './HealthCheckResponse';
@@ -0,0 +1,3 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './HealthCheckResponse';