klasik 1.0.19 → 1.0.22

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.
@@ -1,17 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- /**
4
- * Test API with Discriminated Unions
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
-
3
+ {{>licenseInfo}}
15
4
 
16
5
  export interface ConfigurationParameters {
17
6
  apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
@@ -127,6 +116,9 @@ export class Configuration {
127
116
  this.baseOptions = {
128
117
  ...param.baseOptions,
129
118
  headers: {
119
+ {{#httpUserAgent}}
120
+ 'User-Agent': "{{httpUserAgent}}",
121
+ {{/httpUserAgent}}
130
122
  ...param.baseOptions?.headers,
131
123
  },
132
124
  };
@@ -1,23 +0,0 @@
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
@@ -1,142 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Test API with Discriminated Unions
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 type { Configuration } from '../configuration.js';
17
- import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
18
- import globalAxios, { type AxiosResponse } from 'axios';
19
- import { plainToInstance } from 'class-transformer';
20
- // URLSearchParams not necessarily used
21
- // @ts-ignore
22
- import { URL, URLSearchParams } from 'url';
23
- // Some imports not used depending on template conditions
24
- // @ts-ignore
25
- import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common.js';
26
- // @ts-ignore
27
- import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base.js';
28
- // @ts-ignore
29
- import { Capability } from '../models/index.js';
30
- /**
31
- * DefaultApi - axios parameter creator
32
- * @export
33
- */
34
- export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) {
35
- return {
36
- /**
37
- *
38
- * @param {*} [options] Override http request option.
39
- * @throws {RequiredError}
40
- */
41
- getCapabilities: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
42
- const localVarPath = `/capabilities`;
43
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
44
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
45
- let baseOptions;
46
- if (configuration) {
47
- baseOptions = configuration.baseOptions;
48
- }
49
-
50
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
51
- const localVarHeaderParameter = {} as any;
52
- const localVarQueryParameter = {} as any;
53
-
54
-
55
-
56
- setSearchParams(localVarUrlObj, localVarQueryParameter);
57
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
58
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
59
-
60
- return {
61
- url: toPathString(localVarUrlObj),
62
- options: localVarRequestOptions,
63
- };
64
- },
65
- }
66
- };
67
-
68
- /**
69
- * DefaultApi - functional programming interface
70
- * @export
71
- */
72
- export const DefaultApiFp = function(configuration?: Configuration) {
73
- const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration)
74
- return {
75
- /**
76
- *
77
- * @param {*} [options] Override http request option.
78
- * @throws {RequiredError}
79
- */
80
- async getCapabilities(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Capability>>> {
81
- const localVarAxiosArgs = await localVarAxiosParamCreator.getCapabilities(options);
82
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
83
- const localVarOperationServerBasePath = operationServerMap['DefaultApi.getCapabilities']?.[localVarOperationServerIndex]?.url;
84
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath).then(response => {
85
- // Check if response transformation is enabled (default: true)
86
- if (configuration?.enableResponseTransformation !== false) {
87
- try {
88
- response.data = plainToInstance(Capability, response.data as any[]);
89
- } catch (error) {
90
- // Handle transformation errors
91
- if (configuration?.onTransformationError) {
92
- configuration.onTransformationError(error as Error, Capability, response.data);
93
- } else {
94
- console.error('class-transformer failed to transform response:', error);
95
- console.error('Returning original response data. To handle this error, provide onTransformationError in Configuration.');
96
- }
97
- // Return original data on error (cast for type safety)
98
- response.data = response.data as any as Capability[];
99
- }
100
- }
101
- return response as AxiosResponse<Capability[]>;
102
- });
103
- },
104
- }
105
- };
106
-
107
- /**
108
- * DefaultApi - factory interface
109
- * @export
110
- */
111
- export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
112
- const localVarFp = DefaultApiFp(configuration)
113
- return {
114
- /**
115
- *
116
- * @param {*} [options] Override http request option.
117
- * @throws {RequiredError}
118
- */
119
- getCapabilities(options?: RawAxiosRequestConfig): AxiosPromise<Array<Capability>> {
120
- return localVarFp.getCapabilities(options).then((request) => request(axios, basePath));
121
- },
122
- };
123
- };
124
-
125
- /**
126
- * DefaultApi - object-oriented interface
127
- * @export
128
- * @class DefaultApi
129
- * @extends {BaseAPI}
130
- */
131
- export class DefaultApi extends BaseAPI {
132
- /**
133
- *
134
- * @param {*} [options] Override http request option.
135
- * @throws {RequiredError}
136
- * @memberof DefaultApi
137
- */
138
- public getCapabilities(options?: RawAxiosRequestConfig) {
139
- return DefaultApiFp(this.configuration).getCapabilities(options).then((request) => request(this.axios, this.basePath));
140
- }
141
- }
142
-
@@ -1,19 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Test API with Discriminated Unions
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
-
17
- export { Configuration } from './configuration.js';
18
- export * from './api/default-api.js';
19
-
@@ -1,86 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Test API with Discriminated Unions
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 type { Configuration } from './configuration.js';
17
- // Some imports not used depending on template conditions
18
- // @ts-ignore
19
- import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
20
- import globalAxios from 'axios';
21
-
22
- export const BASE_PATH = "https://api.example.com".replace(/\/+$/, "");
23
-
24
- /**
25
- *
26
- * @export
27
- */
28
- export const COLLECTION_FORMATS = {
29
- csv: ",",
30
- ssv: " ",
31
- tsv: "\t",
32
- pipes: "|",
33
- };
34
-
35
- /**
36
- *
37
- * @export
38
- * @interface RequestArgs
39
- */
40
- export interface RequestArgs {
41
- url: string;
42
- options: RawAxiosRequestConfig;
43
- }
44
-
45
- /**
46
- *
47
- * @export
48
- * @class BaseAPI
49
- */
50
- export class BaseAPI {
51
- protected configuration: Configuration | undefined;
52
-
53
- constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
54
- if (configuration) {
55
- this.configuration = configuration;
56
- this.basePath = configuration.basePath ?? basePath;
57
- }
58
- }
59
- };
60
-
61
- /**
62
- *
63
- * @export
64
- * @class RequiredError
65
- * @extends {Error}
66
- */
67
- export class RequiredError extends Error {
68
- constructor(public field: string, msg?: string) {
69
- super(msg);
70
- this.name = "RequiredError"
71
- }
72
- }
73
-
74
- interface ServerMap {
75
- [key: string]: {
76
- url: string,
77
- description: string,
78
- }[];
79
- }
80
-
81
- /**
82
- *
83
- * @export
84
- */
85
- export const operationServerMap: ServerMap = {
86
- }
@@ -1,151 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Test API with Discriminated Unions
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 type { Configuration } from "./configuration.js";
17
- import type { RequestArgs } from "./base.js";
18
- import type { AxiosInstance, AxiosResponse } from 'axios';
19
- import { RequiredError } from "./base.js";
20
- import { URL, URLSearchParams } from 'url';
21
-
22
- /**
23
- *
24
- * @export
25
- */
26
- export const DUMMY_BASE_URL = 'https://example.com'
27
-
28
- /**
29
- *
30
- * @throws {RequiredError}
31
- * @export
32
- */
33
- export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {
34
- if (paramValue === null || paramValue === undefined) {
35
- throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
36
- }
37
- }
38
-
39
- /**
40
- *
41
- * @export
42
- */
43
- export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {
44
- if (configuration && configuration.apiKey) {
45
- const localVarApiKeyValue = typeof configuration.apiKey === 'function'
46
- ? await configuration.apiKey(keyParamName)
47
- : await configuration.apiKey;
48
- object[keyParamName] = localVarApiKeyValue;
49
- }
50
- }
51
-
52
- /**
53
- *
54
- * @export
55
- */
56
- export const setBasicAuthToObject = function (object: any, configuration?: Configuration) {
57
- if (configuration && (configuration.username || configuration.password)) {
58
- object["auth"] = { username: configuration.username, password: configuration.password };
59
- }
60
- }
61
-
62
- /**
63
- *
64
- * @export
65
- */
66
- export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {
67
- if (configuration && configuration.accessToken) {
68
- const accessToken = typeof configuration.accessToken === 'function'
69
- ? await configuration.accessToken()
70
- : await configuration.accessToken;
71
- object["Authorization"] = "Bearer " + accessToken;
72
- }
73
- }
74
-
75
- /**
76
- *
77
- * @export
78
- */
79
- export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {
80
- if (configuration && configuration.accessToken) {
81
- const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
82
- ? await configuration.accessToken(name, scopes)
83
- : await configuration.accessToken;
84
- object["Authorization"] = "Bearer " + localVarAccessTokenValue;
85
- }
86
- }
87
-
88
- function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
89
- if (parameter == null) return;
90
- if (typeof parameter === "object") {
91
- if (Array.isArray(parameter)) {
92
- (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
93
- }
94
- else {
95
- Object.keys(parameter).forEach(currentKey =>
96
- setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`)
97
- );
98
- }
99
- }
100
- else {
101
- if (urlSearchParams.has(key)) {
102
- urlSearchParams.append(key, parameter);
103
- }
104
- else {
105
- urlSearchParams.set(key, parameter);
106
- }
107
- }
108
- }
109
-
110
- /**
111
- *
112
- * @export
113
- */
114
- export const setSearchParams = function (url: URL, ...objects: any[]) {
115
- const searchParams = new URLSearchParams(url.search);
116
- setFlattenedQueryParams(searchParams, objects);
117
- url.search = searchParams.toString();
118
- }
119
-
120
- /**
121
- *
122
- * @export
123
- */
124
- export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {
125
- const nonString = typeof value !== 'string';
126
- const needsSerialization = nonString && configuration && configuration.isJsonMime
127
- ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
128
- : nonString;
129
- return needsSerialization
130
- ? JSON.stringify(value !== undefined ? value : {})
131
- : (value || "");
132
- }
133
-
134
- /**
135
- *
136
- * @export
137
- */
138
- export const toPathString = function (url: URL) {
139
- return url.pathname + url.search + url.hash
140
- }
141
-
142
- /**
143
- *
144
- * @export
145
- */
146
- export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
147
- return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
148
- const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url};
149
- return axios.request<T, R>(axiosRequestArgs);
150
- };
151
- }
@@ -1,18 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Test API with Discriminated Unions
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
- export * from "./api.js";
17
- export * from "./configuration.js";
18
- export * from "./models/index.js";
@@ -1,80 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Test API with Discriminated Unions
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
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
15
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
18
- return c > 3 && r && Object.defineProperty(target, key, r), r;
19
- };
20
- var __metadata = (this && this.__metadata) || function (k, v) {
21
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
22
- };
23
- // May contain unused imports in some cases
24
- // @ts-ignore
25
- import { Expose, Type } from 'class-transformer';
26
- import { HelmComponent } from './helm-component.js';
27
- import { KustomizeComponent } from './kustomize-component.js';
28
- import { ManifestComponent } from './manifest-component.js';
29
- var Capability = /** @class */ (function () {
30
- function Capability() {
31
- }
32
- Capability.attributeTypeMap = [
33
- {
34
- "name": "name",
35
- "baseName": "name",
36
- "type": "string",
37
- "format": "",
38
- "description": "Capability name",
39
- "vendorExtensions": {}
40
- },
41
- {
42
- "name": "description",
43
- "baseName": "description",
44
- "type": "string",
45
- "format": "",
46
- "description": undefined,
47
- "vendorExtensions": {}
48
- },
49
- {
50
- "name": "components",
51
- "baseName": "components",
52
- "type": "Array<HelmComponent | KustomizeComponent | ManifestComponent>",
53
- "format": "",
54
- "description": undefined,
55
- "vendorExtensions": {},
56
- "modelClasses": [HelmComponent, KustomizeComponent, ManifestComponent], "discriminatorProperty": "type"
57
- }
58
- ];
59
- __decorate([
60
- Expose(),
61
- __metadata("design:type", String)
62
- ], Capability.prototype, "name", void 0);
63
- __decorate([
64
- Expose(),
65
- __metadata("design:type", String)
66
- ], Capability.prototype, "description", void 0);
67
- __decorate([
68
- Expose(),
69
- Type(function () { return Object; }, {
70
- discriminator: {
71
- property: 'type',
72
- subTypes: [{ value: HelmComponent, name: 'helm' }, { value: KustomizeComponent, name: 'kustomize' }, { value: ManifestComponent, name: 'manifest' }]
73
- },
74
- keepDiscriminatorProperty: true
75
- }),
76
- __metadata("design:type", Array)
77
- ], Capability.prototype, "components", void 0);
78
- return Capability;
79
- }());
80
- export { Capability };
@@ -1,74 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Test API with Discriminated Unions
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
- // May contain unused imports in some cases
17
- // @ts-ignore
18
- import { Expose, Type } from 'class-transformer';
19
- import { HelmComponent } from './helm-component.js';
20
- import { KustomizeComponent } from './kustomize-component.js';
21
- import { ManifestComponent } from './manifest-component.js';
22
- export class Capability {
23
- /**
24
- * Capability name
25
- */
26
- @Expose()
27
- 'name': string;
28
- /**
29
- * description
30
- */
31
- @Expose()
32
- 'description'?: string;
33
- /**
34
- * components
35
- */
36
- @Expose()
37
- @Type(() => Object, {
38
- discriminator: {
39
- property: 'type',
40
- subTypes: [{ value: HelmComponent, name: 'helm' }, { value: KustomizeComponent, name: 'kustomize' }, { value: ManifestComponent, name: 'manifest' }]
41
- },
42
- keepDiscriminatorProperty: true
43
- })
44
- 'components': Array<HelmComponent | KustomizeComponent | ManifestComponent>;
45
-
46
- static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string, description?: string, vendorExtensions?: any, modelClass?: any}> = [
47
- {
48
- "name": "name",
49
- "baseName": "name",
50
- "type": "string",
51
- "format": "",
52
- "description": `Capability name`,
53
- "vendorExtensions": {}
54
- },
55
- {
56
- "name": "description",
57
- "baseName": "description",
58
- "type": "string",
59
- "format": "",
60
- "description": undefined,
61
- "vendorExtensions": {}
62
- },
63
- {
64
- "name": "components",
65
- "baseName": "components",
66
- "type": "Array<HelmComponent | KustomizeComponent | ManifestComponent>",
67
- "format": "",
68
- "description": undefined,
69
- "vendorExtensions": {},
70
- "modelClasses": [HelmComponent, KustomizeComponent, ManifestComponent], "discriminatorProperty": "type"
71
- }
72
- ];
73
- }
74
-