@teemill/schema 0.1.2
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/README.md +46 -0
- package/api.ts +347 -0
- package/base.ts +86 -0
- package/common.ts +150 -0
- package/configuration.ts +110 -0
- package/dist/api.d.ts +231 -0
- package/dist/api.js +216 -0
- package/dist/base.d.ts +66 -0
- package/dist/base.js +65 -0
- package/dist/common.d.ts +65 -0
- package/dist/common.js +161 -0
- package/dist/configuration.d.ts +91 -0
- package/dist/configuration.js +43 -0
- package/dist/esm/api.d.ts +231 -0
- package/dist/esm/api.js +209 -0
- package/dist/esm/base.d.ts +66 -0
- package/dist/esm/base.js +60 -0
- package/dist/esm/common.d.ts +65 -0
- package/dist/esm/common.js +149 -0
- package/dist/esm/configuration.d.ts +91 -0
- package/dist/esm/configuration.js +39 -0
- package/dist/esm/index.d.ts +13 -0
- package/dist/esm/index.js +15 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +31 -0
- package/git_push.sh +57 -0
- package/index.ts +18 -0
- package/package.json +33 -0
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +18 -0
package/configuration.ts
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Schema API
|
|
5
|
+
* View PodOS API Schemas Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.2
|
|
8
|
+
* Contact: hello@podos.io
|
|
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 interface ConfigurationParameters {
|
|
17
|
+
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
18
|
+
username?: string;
|
|
19
|
+
password?: string;
|
|
20
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
21
|
+
basePath?: string;
|
|
22
|
+
serverIndex?: number;
|
|
23
|
+
baseOptions?: any;
|
|
24
|
+
formDataCtor?: new () => any;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export class Configuration {
|
|
28
|
+
/**
|
|
29
|
+
* parameter for apiKey security
|
|
30
|
+
* @param name security name
|
|
31
|
+
* @memberof Configuration
|
|
32
|
+
*/
|
|
33
|
+
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
34
|
+
/**
|
|
35
|
+
* parameter for basic security
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof Configuration
|
|
39
|
+
*/
|
|
40
|
+
username?: string;
|
|
41
|
+
/**
|
|
42
|
+
* parameter for basic security
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof Configuration
|
|
46
|
+
*/
|
|
47
|
+
password?: string;
|
|
48
|
+
/**
|
|
49
|
+
* parameter for oauth2 security
|
|
50
|
+
* @param name security name
|
|
51
|
+
* @param scopes oauth2 scope
|
|
52
|
+
* @memberof Configuration
|
|
53
|
+
*/
|
|
54
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
55
|
+
/**
|
|
56
|
+
* override base path
|
|
57
|
+
*
|
|
58
|
+
* @type {string}
|
|
59
|
+
* @memberof Configuration
|
|
60
|
+
*/
|
|
61
|
+
basePath?: string;
|
|
62
|
+
/**
|
|
63
|
+
* override server index
|
|
64
|
+
*
|
|
65
|
+
* @type {number}
|
|
66
|
+
* @memberof Configuration
|
|
67
|
+
*/
|
|
68
|
+
serverIndex?: number;
|
|
69
|
+
/**
|
|
70
|
+
* base options for axios calls
|
|
71
|
+
*
|
|
72
|
+
* @type {any}
|
|
73
|
+
* @memberof Configuration
|
|
74
|
+
*/
|
|
75
|
+
baseOptions?: any;
|
|
76
|
+
/**
|
|
77
|
+
* The FormData constructor that will be used to create multipart form data
|
|
78
|
+
* requests. You can inject this here so that execution environments that
|
|
79
|
+
* do not support the FormData class can still run the generated client.
|
|
80
|
+
*
|
|
81
|
+
* @type {new () => FormData}
|
|
82
|
+
*/
|
|
83
|
+
formDataCtor?: new () => any;
|
|
84
|
+
|
|
85
|
+
constructor(param: ConfigurationParameters = {}) {
|
|
86
|
+
this.apiKey = param.apiKey;
|
|
87
|
+
this.username = param.username;
|
|
88
|
+
this.password = param.password;
|
|
89
|
+
this.accessToken = param.accessToken;
|
|
90
|
+
this.basePath = param.basePath;
|
|
91
|
+
this.serverIndex = param.serverIndex;
|
|
92
|
+
this.baseOptions = param.baseOptions;
|
|
93
|
+
this.formDataCtor = param.formDataCtor;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Check if the given MIME is a JSON MIME.
|
|
98
|
+
* JSON MIME examples:
|
|
99
|
+
* application/json
|
|
100
|
+
* application/json; charset=UTF8
|
|
101
|
+
* APPLICATION/JSON
|
|
102
|
+
* application/vnd.company+json
|
|
103
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
104
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
105
|
+
*/
|
|
106
|
+
public isJsonMime(mime: string): boolean {
|
|
107
|
+
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
|
108
|
+
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
|
109
|
+
}
|
|
110
|
+
}
|
package/dist/api.d.ts
ADDED
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema API
|
|
3
|
+
* View PodOS API Schemas Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.2
|
|
6
|
+
* Contact: hello@podos.io
|
|
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 type { Configuration } from './configuration';
|
|
13
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
14
|
+
import type { RequestArgs } from './base';
|
|
15
|
+
import { BaseAPI } from './base';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ApiError
|
|
20
|
+
*/
|
|
21
|
+
export interface ApiError {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ApiError
|
|
26
|
+
*/
|
|
27
|
+
'code'?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ApiError
|
|
32
|
+
*/
|
|
33
|
+
'message': string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @export
|
|
38
|
+
* @interface Schema
|
|
39
|
+
*/
|
|
40
|
+
export interface Schema {
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof Schema
|
|
45
|
+
*/
|
|
46
|
+
'name': string;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {string}
|
|
50
|
+
* @memberof Schema
|
|
51
|
+
*/
|
|
52
|
+
'description': string;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {string}
|
|
56
|
+
* @memberof Schema
|
|
57
|
+
*/
|
|
58
|
+
'version': string;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @type {Array<string>}
|
|
62
|
+
* @memberof Schema
|
|
63
|
+
*/
|
|
64
|
+
'paths': Array<string>;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @type {object}
|
|
68
|
+
* @memberof Schema
|
|
69
|
+
*/
|
|
70
|
+
'schema'?: object;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @export
|
|
75
|
+
* @interface Schemas
|
|
76
|
+
*/
|
|
77
|
+
export interface Schemas {
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @type {Array<Schema>}
|
|
81
|
+
* @memberof Schemas
|
|
82
|
+
*/
|
|
83
|
+
'schemas': Array<Schema>;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @export
|
|
88
|
+
* @interface ValidationError
|
|
89
|
+
*/
|
|
90
|
+
export interface ValidationError {
|
|
91
|
+
/**
|
|
92
|
+
*
|
|
93
|
+
* @type {string}
|
|
94
|
+
* @memberof ValidationError
|
|
95
|
+
*/
|
|
96
|
+
'message': string;
|
|
97
|
+
/**
|
|
98
|
+
*
|
|
99
|
+
* @type {{ [key: string]: Array<string>; }}
|
|
100
|
+
* @memberof ValidationError
|
|
101
|
+
*/
|
|
102
|
+
'errors': {
|
|
103
|
+
[key: string]: Array<string>;
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* SchemasApi - axios parameter creator
|
|
108
|
+
* @export
|
|
109
|
+
*/
|
|
110
|
+
export declare const SchemasApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
111
|
+
/**
|
|
112
|
+
* Get an API schema
|
|
113
|
+
* @summary Get schema
|
|
114
|
+
* @param {string} api API name
|
|
115
|
+
* @param {string} [project] Project unique identifier
|
|
116
|
+
* @param {*} [options] Override http request option.
|
|
117
|
+
* @throws {RequiredError}
|
|
118
|
+
*/
|
|
119
|
+
getSchema: (api: string, project?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
120
|
+
/**
|
|
121
|
+
* List all available schemas
|
|
122
|
+
* @summary List schemas
|
|
123
|
+
* @param {string} [project] Project unique identifier
|
|
124
|
+
* @param {*} [options] Override http request option.
|
|
125
|
+
* @throws {RequiredError}
|
|
126
|
+
*/
|
|
127
|
+
listSchemas: (project?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* SchemasApi - functional programming interface
|
|
131
|
+
* @export
|
|
132
|
+
*/
|
|
133
|
+
export declare const SchemasApiFp: (configuration?: Configuration) => {
|
|
134
|
+
/**
|
|
135
|
+
* Get an API schema
|
|
136
|
+
* @summary Get schema
|
|
137
|
+
* @param {string} api API name
|
|
138
|
+
* @param {string} [project] Project unique identifier
|
|
139
|
+
* @param {*} [options] Override http request option.
|
|
140
|
+
* @throws {RequiredError}
|
|
141
|
+
*/
|
|
142
|
+
getSchema(api: string, project?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Schemas>>;
|
|
143
|
+
/**
|
|
144
|
+
* List all available schemas
|
|
145
|
+
* @summary List schemas
|
|
146
|
+
* @param {string} [project] Project unique identifier
|
|
147
|
+
* @param {*} [options] Override http request option.
|
|
148
|
+
* @throws {RequiredError}
|
|
149
|
+
*/
|
|
150
|
+
listSchemas(project?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Schema>>;
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* SchemasApi - factory interface
|
|
154
|
+
* @export
|
|
155
|
+
*/
|
|
156
|
+
export declare const SchemasApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
157
|
+
/**
|
|
158
|
+
* Get an API schema
|
|
159
|
+
* @summary Get schema
|
|
160
|
+
* @param {SchemasApiGetSchemaRequest} requestParameters Request parameters.
|
|
161
|
+
* @param {*} [options] Override http request option.
|
|
162
|
+
* @throws {RequiredError}
|
|
163
|
+
*/
|
|
164
|
+
getSchema(requestParameters: SchemasApiGetSchemaRequest, options?: RawAxiosRequestConfig): AxiosPromise<Schemas>;
|
|
165
|
+
/**
|
|
166
|
+
* List all available schemas
|
|
167
|
+
* @summary List schemas
|
|
168
|
+
* @param {SchemasApiListSchemasRequest} requestParameters Request parameters.
|
|
169
|
+
* @param {*} [options] Override http request option.
|
|
170
|
+
* @throws {RequiredError}
|
|
171
|
+
*/
|
|
172
|
+
listSchemas(requestParameters?: SchemasApiListSchemasRequest, options?: RawAxiosRequestConfig): AxiosPromise<Schema>;
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* Request parameters for getSchema operation in SchemasApi.
|
|
176
|
+
* @export
|
|
177
|
+
* @interface SchemasApiGetSchemaRequest
|
|
178
|
+
*/
|
|
179
|
+
export interface SchemasApiGetSchemaRequest {
|
|
180
|
+
/**
|
|
181
|
+
* API name
|
|
182
|
+
* @type {string}
|
|
183
|
+
* @memberof SchemasApiGetSchema
|
|
184
|
+
*/
|
|
185
|
+
readonly api: string;
|
|
186
|
+
/**
|
|
187
|
+
* Project unique identifier
|
|
188
|
+
* @type {string}
|
|
189
|
+
* @memberof SchemasApiGetSchema
|
|
190
|
+
*/
|
|
191
|
+
readonly project?: string;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Request parameters for listSchemas operation in SchemasApi.
|
|
195
|
+
* @export
|
|
196
|
+
* @interface SchemasApiListSchemasRequest
|
|
197
|
+
*/
|
|
198
|
+
export interface SchemasApiListSchemasRequest {
|
|
199
|
+
/**
|
|
200
|
+
* Project unique identifier
|
|
201
|
+
* @type {string}
|
|
202
|
+
* @memberof SchemasApiListSchemas
|
|
203
|
+
*/
|
|
204
|
+
readonly project?: string;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* SchemasApi - object-oriented interface
|
|
208
|
+
* @export
|
|
209
|
+
* @class SchemasApi
|
|
210
|
+
* @extends {BaseAPI}
|
|
211
|
+
*/
|
|
212
|
+
export declare class SchemasApi extends BaseAPI {
|
|
213
|
+
/**
|
|
214
|
+
* Get an API schema
|
|
215
|
+
* @summary Get schema
|
|
216
|
+
* @param {SchemasApiGetSchemaRequest} requestParameters Request parameters.
|
|
217
|
+
* @param {*} [options] Override http request option.
|
|
218
|
+
* @throws {RequiredError}
|
|
219
|
+
* @memberof SchemasApi
|
|
220
|
+
*/
|
|
221
|
+
getSchema(requestParameters: SchemasApiGetSchemaRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Schemas, any>>;
|
|
222
|
+
/**
|
|
223
|
+
* List all available schemas
|
|
224
|
+
* @summary List schemas
|
|
225
|
+
* @param {SchemasApiListSchemasRequest} requestParameters Request parameters.
|
|
226
|
+
* @param {*} [options] Override http request option.
|
|
227
|
+
* @throws {RequiredError}
|
|
228
|
+
* @memberof SchemasApi
|
|
229
|
+
*/
|
|
230
|
+
listSchemas(requestParameters?: SchemasApiListSchemasRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Schema, any>>;
|
|
231
|
+
}
|
package/dist/api.js
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Schema API
|
|
6
|
+
* View PodOS API Schemas Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.2
|
|
9
|
+
* Contact: hello@podos.io
|
|
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.SchemasApi = exports.SchemasApiFactory = exports.SchemasApiFp = exports.SchemasApiAxiosParamCreator = void 0;
|
|
26
|
+
const axios_1 = require("axios");
|
|
27
|
+
// Some imports not used depending on template conditions
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
const common_1 = require("./common");
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
const base_1 = require("./base");
|
|
32
|
+
/**
|
|
33
|
+
* SchemasApi - axios parameter creator
|
|
34
|
+
* @export
|
|
35
|
+
*/
|
|
36
|
+
const SchemasApiAxiosParamCreator = function (configuration) {
|
|
37
|
+
return {
|
|
38
|
+
/**
|
|
39
|
+
* Get an API schema
|
|
40
|
+
* @summary Get schema
|
|
41
|
+
* @param {string} api API name
|
|
42
|
+
* @param {string} [project] Project unique identifier
|
|
43
|
+
* @param {*} [options] Override http request option.
|
|
44
|
+
* @throws {RequiredError}
|
|
45
|
+
*/
|
|
46
|
+
getSchema: (api_1, project_1, ...args_1) => __awaiter(this, [api_1, project_1, ...args_1], void 0, function* (api, project, options = {}) {
|
|
47
|
+
// verify required parameter 'api' is not null or undefined
|
|
48
|
+
(0, common_1.assertParamExists)('getSchema', 'api', api);
|
|
49
|
+
const localVarPath = `/{api}`
|
|
50
|
+
.replace(`{${"api"}}`, encodeURIComponent(String(api)));
|
|
51
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
52
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
53
|
+
let baseOptions;
|
|
54
|
+
if (configuration) {
|
|
55
|
+
baseOptions = configuration.baseOptions;
|
|
56
|
+
}
|
|
57
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
58
|
+
const localVarHeaderParameter = {};
|
|
59
|
+
const localVarQueryParameter = {};
|
|
60
|
+
// authentication session-oauth required
|
|
61
|
+
// oauth required
|
|
62
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
63
|
+
// authentication api-key required
|
|
64
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
65
|
+
if (project !== undefined) {
|
|
66
|
+
localVarQueryParameter['project'] = project;
|
|
67
|
+
}
|
|
68
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
69
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
70
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
71
|
+
return {
|
|
72
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
73
|
+
options: localVarRequestOptions,
|
|
74
|
+
};
|
|
75
|
+
}),
|
|
76
|
+
/**
|
|
77
|
+
* List all available schemas
|
|
78
|
+
* @summary List schemas
|
|
79
|
+
* @param {string} [project] Project unique identifier
|
|
80
|
+
* @param {*} [options] Override http request option.
|
|
81
|
+
* @throws {RequiredError}
|
|
82
|
+
*/
|
|
83
|
+
listSchemas: (project_1, ...args_1) => __awaiter(this, [project_1, ...args_1], void 0, function* (project, options = {}) {
|
|
84
|
+
const localVarPath = `/`;
|
|
85
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
86
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
87
|
+
let baseOptions;
|
|
88
|
+
if (configuration) {
|
|
89
|
+
baseOptions = configuration.baseOptions;
|
|
90
|
+
}
|
|
91
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
92
|
+
const localVarHeaderParameter = {};
|
|
93
|
+
const localVarQueryParameter = {};
|
|
94
|
+
// authentication session-oauth required
|
|
95
|
+
// oauth required
|
|
96
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
97
|
+
// authentication api-key required
|
|
98
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
99
|
+
if (project !== undefined) {
|
|
100
|
+
localVarQueryParameter['project'] = project;
|
|
101
|
+
}
|
|
102
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
103
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
104
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
105
|
+
return {
|
|
106
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
107
|
+
options: localVarRequestOptions,
|
|
108
|
+
};
|
|
109
|
+
}),
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
exports.SchemasApiAxiosParamCreator = SchemasApiAxiosParamCreator;
|
|
113
|
+
/**
|
|
114
|
+
* SchemasApi - functional programming interface
|
|
115
|
+
* @export
|
|
116
|
+
*/
|
|
117
|
+
const SchemasApiFp = function (configuration) {
|
|
118
|
+
const localVarAxiosParamCreator = (0, exports.SchemasApiAxiosParamCreator)(configuration);
|
|
119
|
+
return {
|
|
120
|
+
/**
|
|
121
|
+
* Get an API schema
|
|
122
|
+
* @summary Get schema
|
|
123
|
+
* @param {string} api API name
|
|
124
|
+
* @param {string} [project] Project unique identifier
|
|
125
|
+
* @param {*} [options] Override http request option.
|
|
126
|
+
* @throws {RequiredError}
|
|
127
|
+
*/
|
|
128
|
+
getSchema(api, project, options) {
|
|
129
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
+
var _a, _b, _c;
|
|
131
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getSchema(api, project, options);
|
|
132
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
133
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['SchemasApi.getSchema']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
134
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
135
|
+
});
|
|
136
|
+
},
|
|
137
|
+
/**
|
|
138
|
+
* List all available schemas
|
|
139
|
+
* @summary List schemas
|
|
140
|
+
* @param {string} [project] Project unique identifier
|
|
141
|
+
* @param {*} [options] Override http request option.
|
|
142
|
+
* @throws {RequiredError}
|
|
143
|
+
*/
|
|
144
|
+
listSchemas(project, options) {
|
|
145
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
146
|
+
var _a, _b, _c;
|
|
147
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listSchemas(project, options);
|
|
148
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
149
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['SchemasApi.listSchemas']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
150
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
151
|
+
});
|
|
152
|
+
},
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
exports.SchemasApiFp = SchemasApiFp;
|
|
156
|
+
/**
|
|
157
|
+
* SchemasApi - factory interface
|
|
158
|
+
* @export
|
|
159
|
+
*/
|
|
160
|
+
const SchemasApiFactory = function (configuration, basePath, axios) {
|
|
161
|
+
const localVarFp = (0, exports.SchemasApiFp)(configuration);
|
|
162
|
+
return {
|
|
163
|
+
/**
|
|
164
|
+
* Get an API schema
|
|
165
|
+
* @summary Get schema
|
|
166
|
+
* @param {SchemasApiGetSchemaRequest} requestParameters Request parameters.
|
|
167
|
+
* @param {*} [options] Override http request option.
|
|
168
|
+
* @throws {RequiredError}
|
|
169
|
+
*/
|
|
170
|
+
getSchema(requestParameters, options) {
|
|
171
|
+
return localVarFp.getSchema(requestParameters.api, requestParameters.project, options).then((request) => request(axios, basePath));
|
|
172
|
+
},
|
|
173
|
+
/**
|
|
174
|
+
* List all available schemas
|
|
175
|
+
* @summary List schemas
|
|
176
|
+
* @param {SchemasApiListSchemasRequest} requestParameters Request parameters.
|
|
177
|
+
* @param {*} [options] Override http request option.
|
|
178
|
+
* @throws {RequiredError}
|
|
179
|
+
*/
|
|
180
|
+
listSchemas(requestParameters = {}, options) {
|
|
181
|
+
return localVarFp.listSchemas(requestParameters.project, options).then((request) => request(axios, basePath));
|
|
182
|
+
},
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
exports.SchemasApiFactory = SchemasApiFactory;
|
|
186
|
+
/**
|
|
187
|
+
* SchemasApi - object-oriented interface
|
|
188
|
+
* @export
|
|
189
|
+
* @class SchemasApi
|
|
190
|
+
* @extends {BaseAPI}
|
|
191
|
+
*/
|
|
192
|
+
class SchemasApi extends base_1.BaseAPI {
|
|
193
|
+
/**
|
|
194
|
+
* Get an API schema
|
|
195
|
+
* @summary Get schema
|
|
196
|
+
* @param {SchemasApiGetSchemaRequest} requestParameters Request parameters.
|
|
197
|
+
* @param {*} [options] Override http request option.
|
|
198
|
+
* @throws {RequiredError}
|
|
199
|
+
* @memberof SchemasApi
|
|
200
|
+
*/
|
|
201
|
+
getSchema(requestParameters, options) {
|
|
202
|
+
return (0, exports.SchemasApiFp)(this.configuration).getSchema(requestParameters.api, requestParameters.project, options).then((request) => request(this.axios, this.basePath));
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* List all available schemas
|
|
206
|
+
* @summary List schemas
|
|
207
|
+
* @param {SchemasApiListSchemasRequest} requestParameters Request parameters.
|
|
208
|
+
* @param {*} [options] Override http request option.
|
|
209
|
+
* @throws {RequiredError}
|
|
210
|
+
* @memberof SchemasApi
|
|
211
|
+
*/
|
|
212
|
+
listSchemas(requestParameters = {}, options) {
|
|
213
|
+
return (0, exports.SchemasApiFp)(this.configuration).listSchemas(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
exports.SchemasApi = SchemasApi;
|
package/dist/base.d.ts
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema API
|
|
3
|
+
* View PodOS API Schemas Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.2
|
|
6
|
+
* Contact: hello@podos.io
|
|
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 type { Configuration } from './configuration';
|
|
13
|
+
import type { AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
14
|
+
export declare const BASE_PATH: string;
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export declare const COLLECTION_FORMATS: {
|
|
20
|
+
csv: string;
|
|
21
|
+
ssv: string;
|
|
22
|
+
tsv: string;
|
|
23
|
+
pipes: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @export
|
|
28
|
+
* @interface RequestArgs
|
|
29
|
+
*/
|
|
30
|
+
export interface RequestArgs {
|
|
31
|
+
url: string;
|
|
32
|
+
options: RawAxiosRequestConfig;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @export
|
|
37
|
+
* @class BaseAPI
|
|
38
|
+
*/
|
|
39
|
+
export declare class BaseAPI {
|
|
40
|
+
protected basePath: string;
|
|
41
|
+
protected axios: AxiosInstance;
|
|
42
|
+
protected configuration: Configuration | undefined;
|
|
43
|
+
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @export
|
|
48
|
+
* @class RequiredError
|
|
49
|
+
* @extends {Error}
|
|
50
|
+
*/
|
|
51
|
+
export declare class RequiredError extends Error {
|
|
52
|
+
field: string;
|
|
53
|
+
constructor(field: string, msg?: string);
|
|
54
|
+
}
|
|
55
|
+
interface ServerMap {
|
|
56
|
+
[key: string]: {
|
|
57
|
+
url: string;
|
|
58
|
+
description: string;
|
|
59
|
+
}[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @export
|
|
64
|
+
*/
|
|
65
|
+
export declare const operationServerMap: ServerMap;
|
|
66
|
+
export {};
|
package/dist/base.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Schema API
|
|
6
|
+
* View PodOS API Schemas Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.2
|
|
9
|
+
* Contact: hello@podos.io
|
|
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.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
17
|
+
const axios_1 = require("axios");
|
|
18
|
+
exports.BASE_PATH = "https://localhost:8080/v1/schema".replace(/\/+$/, "");
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @export
|
|
22
|
+
*/
|
|
23
|
+
exports.COLLECTION_FORMATS = {
|
|
24
|
+
csv: ",",
|
|
25
|
+
ssv: " ",
|
|
26
|
+
tsv: "\t",
|
|
27
|
+
pipes: "|",
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @export
|
|
32
|
+
* @class BaseAPI
|
|
33
|
+
*/
|
|
34
|
+
class BaseAPI {
|
|
35
|
+
constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
|
|
36
|
+
var _a;
|
|
37
|
+
this.basePath = basePath;
|
|
38
|
+
this.axios = axios;
|
|
39
|
+
if (configuration) {
|
|
40
|
+
this.configuration = configuration;
|
|
41
|
+
this.basePath = (_a = configuration.basePath) !== null && _a !== void 0 ? _a : basePath;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.BaseAPI = BaseAPI;
|
|
46
|
+
;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @export
|
|
50
|
+
* @class RequiredError
|
|
51
|
+
* @extends {Error}
|
|
52
|
+
*/
|
|
53
|
+
class RequiredError extends Error {
|
|
54
|
+
constructor(field, msg) {
|
|
55
|
+
super(msg);
|
|
56
|
+
this.field = field;
|
|
57
|
+
this.name = "RequiredError";
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.RequiredError = RequiredError;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @export
|
|
64
|
+
*/
|
|
65
|
+
exports.operationServerMap = {};
|