@teemill/teemill-clients 0.1.0

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,121 @@
1
+ /* tslint:disable */
2
+ /**
3
+ * Teemill Clients
4
+ * Manage Teemill Client Projects.
5
+ *
6
+ * The version of the OpenAPI document: 0.1.0
7
+ *
8
+ *
9
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
10
+ * https://openapi-generator.tech
11
+ * Do not edit the class manually.
12
+ */
13
+
14
+ interface AWSv4Configuration {
15
+ options?: {
16
+ region?: string
17
+ service?: string
18
+ }
19
+ credentials?: {
20
+ accessKeyId?: string
21
+ secretAccessKey?: string,
22
+ sessionToken?: string
23
+ }
24
+ }
25
+
26
+ export interface ConfigurationParameters {
27
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
28
+ username?: string;
29
+ password?: string;
30
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
31
+ awsv4?: AWSv4Configuration;
32
+ basePath?: string;
33
+ serverIndex?: number;
34
+ baseOptions?: any;
35
+ formDataCtor?: new () => any;
36
+ }
37
+
38
+ export class Configuration {
39
+ /**
40
+ * parameter for apiKey security
41
+ * @param name security name
42
+ */
43
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
44
+ /**
45
+ * parameter for basic security
46
+ */
47
+ username?: string;
48
+ /**
49
+ * parameter for basic security
50
+ */
51
+ password?: string;
52
+ /**
53
+ * parameter for oauth2 security
54
+ * @param name security name
55
+ * @param scopes oauth2 scope
56
+ */
57
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
58
+ /**
59
+ * parameter for aws4 signature security
60
+ * @param {Object} AWS4Signature - AWS4 Signature security
61
+ * @param {string} options.region - aws region
62
+ * @param {string} options.service - name of the service.
63
+ * @param {string} credentials.accessKeyId - aws access key id
64
+ * @param {string} credentials.secretAccessKey - aws access key
65
+ * @param {string} credentials.sessionToken - aws session token
66
+ * @memberof Configuration
67
+ */
68
+ awsv4?: AWSv4Configuration;
69
+ /**
70
+ * override base path
71
+ */
72
+ basePath?: string;
73
+ /**
74
+ * override server index
75
+ */
76
+ serverIndex?: number;
77
+ /**
78
+ * base options for axios calls
79
+ */
80
+ baseOptions?: any;
81
+ /**
82
+ * The FormData constructor that will be used to create multipart form data
83
+ * requests. You can inject this here so that execution environments that
84
+ * do not support the FormData class can still run the generated client.
85
+ *
86
+ * @type {new () => FormData}
87
+ */
88
+ formDataCtor?: new () => any;
89
+
90
+ constructor(param: ConfigurationParameters = {}) {
91
+ this.apiKey = param.apiKey;
92
+ this.username = param.username;
93
+ this.password = param.password;
94
+ this.accessToken = param.accessToken;
95
+ this.awsv4 = param.awsv4;
96
+ this.basePath = param.basePath;
97
+ this.serverIndex = param.serverIndex;
98
+ this.baseOptions = {
99
+ ...param.baseOptions,
100
+ headers: {
101
+ ...param.baseOptions?.headers,
102
+ },
103
+ };
104
+ this.formDataCtor = param.formDataCtor;
105
+ }
106
+
107
+ /**
108
+ * Check if the given MIME is a JSON MIME.
109
+ * JSON MIME examples:
110
+ * application/json
111
+ * application/json; charset=UTF8
112
+ * APPLICATION/JSON
113
+ * application/vnd.company+json
114
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
115
+ * @return True if the given MIME is JSON, false otherwise.
116
+ */
117
+ public isJsonMime(mime: string): boolean {
118
+ const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
119
+ return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
120
+ }
121
+ }
package/dist/api.d.ts ADDED
@@ -0,0 +1,154 @@
1
+ /**
2
+ * Teemill Clients
3
+ * Manage Teemill Client Projects.
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 type { Configuration } from './configuration';
13
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
+ import type { RequestArgs } from './base';
15
+ import { BaseAPI } from './base';
16
+ export interface ApiError {
17
+ 'code'?: string;
18
+ 'message': string;
19
+ }
20
+ /**
21
+ * Teemill Client
22
+ */
23
+ export interface Client {
24
+ /**
25
+ * Whether the client has a Teemill Pro subscription
26
+ */
27
+ 'proEnabled': boolean;
28
+ }
29
+ export interface UpdateClientRequest {
30
+ /**
31
+ * Whether to enable Teemill Pro for the client
32
+ */
33
+ 'enablePro'?: boolean;
34
+ }
35
+ /**
36
+ * TeemillClientsApi - axios parameter creator
37
+ */
38
+ export declare const TeemillClientsApiAxiosParamCreator: (configuration?: Configuration) => {
39
+ /**
40
+ * Get a Teemill client
41
+ * @summary Get Teemill client
42
+ * @param {string} project The project being accessed
43
+ * @param {string} clientId The client unique identifier
44
+ * @param {*} [options] Override http request option.
45
+ * @throws {RequiredError}
46
+ */
47
+ getClient: (project: string, clientId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
48
+ /**
49
+ * Update a Teemill client
50
+ * @summary Update Teemill client
51
+ * @param {string} project The project being accessed
52
+ * @param {string} clientId The client unique identifier
53
+ * @param {UpdateClientRequest} updateClientRequest Teemill client to update
54
+ * @param {*} [options] Override http request option.
55
+ * @throws {RequiredError}
56
+ */
57
+ updateClient: (project: string, clientId: string, updateClientRequest: UpdateClientRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
58
+ };
59
+ /**
60
+ * TeemillClientsApi - functional programming interface
61
+ */
62
+ export declare const TeemillClientsApiFp: (configuration?: Configuration) => {
63
+ /**
64
+ * Get a Teemill client
65
+ * @summary Get Teemill client
66
+ * @param {string} project The project being accessed
67
+ * @param {string} clientId The client unique identifier
68
+ * @param {*} [options] Override http request option.
69
+ * @throws {RequiredError}
70
+ */
71
+ getClient(project: string, clientId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Client>>;
72
+ /**
73
+ * Update a Teemill client
74
+ * @summary Update Teemill client
75
+ * @param {string} project The project being accessed
76
+ * @param {string} clientId The client unique identifier
77
+ * @param {UpdateClientRequest} updateClientRequest Teemill client to update
78
+ * @param {*} [options] Override http request option.
79
+ * @throws {RequiredError}
80
+ */
81
+ updateClient(project: string, clientId: string, updateClientRequest: UpdateClientRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Client>>;
82
+ };
83
+ /**
84
+ * TeemillClientsApi - factory interface
85
+ */
86
+ export declare const TeemillClientsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
87
+ /**
88
+ * Get a Teemill client
89
+ * @summary Get Teemill client
90
+ * @param {TeemillClientsApiGetClientRequest} requestParameters Request parameters.
91
+ * @param {*} [options] Override http request option.
92
+ * @throws {RequiredError}
93
+ */
94
+ getClient(requestParameters: TeemillClientsApiGetClientRequest, options?: RawAxiosRequestConfig): AxiosPromise<Client>;
95
+ /**
96
+ * Update a Teemill client
97
+ * @summary Update Teemill client
98
+ * @param {TeemillClientsApiUpdateClientRequest} requestParameters Request parameters.
99
+ * @param {*} [options] Override http request option.
100
+ * @throws {RequiredError}
101
+ */
102
+ updateClient(requestParameters: TeemillClientsApiUpdateClientRequest, options?: RawAxiosRequestConfig): AxiosPromise<Client>;
103
+ };
104
+ /**
105
+ * Request parameters for getClient operation in TeemillClientsApi.
106
+ */
107
+ export interface TeemillClientsApiGetClientRequest {
108
+ /**
109
+ * The project being accessed
110
+ */
111
+ readonly project: string;
112
+ /**
113
+ * The client unique identifier
114
+ */
115
+ readonly clientId: string;
116
+ }
117
+ /**
118
+ * Request parameters for updateClient operation in TeemillClientsApi.
119
+ */
120
+ export interface TeemillClientsApiUpdateClientRequest {
121
+ /**
122
+ * The project being accessed
123
+ */
124
+ readonly project: string;
125
+ /**
126
+ * The client unique identifier
127
+ */
128
+ readonly clientId: string;
129
+ /**
130
+ * Teemill client to update
131
+ */
132
+ readonly updateClientRequest: UpdateClientRequest;
133
+ }
134
+ /**
135
+ * TeemillClientsApi - object-oriented interface
136
+ */
137
+ export declare class TeemillClientsApi extends BaseAPI {
138
+ /**
139
+ * Get a Teemill client
140
+ * @summary Get Teemill client
141
+ * @param {TeemillClientsApiGetClientRequest} requestParameters Request parameters.
142
+ * @param {*} [options] Override http request option.
143
+ * @throws {RequiredError}
144
+ */
145
+ getClient(requestParameters: TeemillClientsApiGetClientRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Client, any, {}>>;
146
+ /**
147
+ * Update a Teemill client
148
+ * @summary Update Teemill client
149
+ * @param {TeemillClientsApiUpdateClientRequest} requestParameters Request parameters.
150
+ * @param {*} [options] Override http request option.
151
+ * @throws {RequiredError}
152
+ */
153
+ updateClient(requestParameters: TeemillClientsApiUpdateClientRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Client, any, {}>>;
154
+ }
package/dist/api.js ADDED
@@ -0,0 +1,225 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Teemill Clients
6
+ * Manage Teemill Client Projects.
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.TeemillClientsApi = exports.TeemillClientsApiFactory = exports.TeemillClientsApiFp = exports.TeemillClientsApiAxiosParamCreator = 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
+ * TeemillClientsApi - axios parameter creator
34
+ */
35
+ const TeemillClientsApiAxiosParamCreator = function (configuration) {
36
+ return {
37
+ /**
38
+ * Get a Teemill client
39
+ * @summary Get Teemill client
40
+ * @param {string} project The project being accessed
41
+ * @param {string} clientId The client unique identifier
42
+ * @param {*} [options] Override http request option.
43
+ * @throws {RequiredError}
44
+ */
45
+ getClient: (project_1, clientId_1, ...args_1) => __awaiter(this, [project_1, clientId_1, ...args_1], void 0, function* (project, clientId, options = {}) {
46
+ // verify required parameter 'project' is not null or undefined
47
+ (0, common_1.assertParamExists)('getClient', 'project', project);
48
+ // verify required parameter 'clientId' is not null or undefined
49
+ (0, common_1.assertParamExists)('getClient', 'clientId', clientId);
50
+ const localVarPath = `/v1/teemill-clients/{clientId}`
51
+ .replace(`{${"clientId"}}`, encodeURIComponent(String(clientId)));
52
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
53
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
54
+ let baseOptions;
55
+ if (configuration) {
56
+ baseOptions = configuration.baseOptions;
57
+ }
58
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
59
+ const localVarHeaderParameter = {};
60
+ const localVarQueryParameter = {};
61
+ // authentication session-oauth required
62
+ // oauth required
63
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
64
+ // authentication api-key required
65
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
66
+ if (project !== undefined) {
67
+ localVarQueryParameter['project'] = project;
68
+ }
69
+ localVarHeaderParameter['Accept'] = 'application/json';
70
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
71
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
72
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
73
+ return {
74
+ url: (0, common_1.toPathString)(localVarUrlObj),
75
+ options: localVarRequestOptions,
76
+ };
77
+ }),
78
+ /**
79
+ * Update a Teemill client
80
+ * @summary Update Teemill client
81
+ * @param {string} project The project being accessed
82
+ * @param {string} clientId The client unique identifier
83
+ * @param {UpdateClientRequest} updateClientRequest Teemill client to update
84
+ * @param {*} [options] Override http request option.
85
+ * @throws {RequiredError}
86
+ */
87
+ updateClient: (project_1, clientId_1, updateClientRequest_1, ...args_1) => __awaiter(this, [project_1, clientId_1, updateClientRequest_1, ...args_1], void 0, function* (project, clientId, updateClientRequest, options = {}) {
88
+ // verify required parameter 'project' is not null or undefined
89
+ (0, common_1.assertParamExists)('updateClient', 'project', project);
90
+ // verify required parameter 'clientId' is not null or undefined
91
+ (0, common_1.assertParamExists)('updateClient', 'clientId', clientId);
92
+ // verify required parameter 'updateClientRequest' is not null or undefined
93
+ (0, common_1.assertParamExists)('updateClient', 'updateClientRequest', updateClientRequest);
94
+ const localVarPath = `/v1/teemill-clients/{clientId}`
95
+ .replace(`{${"clientId"}}`, encodeURIComponent(String(clientId)));
96
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
97
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
98
+ let baseOptions;
99
+ if (configuration) {
100
+ baseOptions = configuration.baseOptions;
101
+ }
102
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
103
+ const localVarHeaderParameter = {};
104
+ const localVarQueryParameter = {};
105
+ // authentication session-oauth required
106
+ // oauth required
107
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
108
+ // authentication api-key required
109
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
110
+ if (project !== undefined) {
111
+ localVarQueryParameter['project'] = project;
112
+ }
113
+ localVarHeaderParameter['Content-Type'] = 'application/json';
114
+ localVarHeaderParameter['Accept'] = 'application/json';
115
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
116
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
117
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
118
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateClientRequest, localVarRequestOptions, configuration);
119
+ return {
120
+ url: (0, common_1.toPathString)(localVarUrlObj),
121
+ options: localVarRequestOptions,
122
+ };
123
+ }),
124
+ };
125
+ };
126
+ exports.TeemillClientsApiAxiosParamCreator = TeemillClientsApiAxiosParamCreator;
127
+ /**
128
+ * TeemillClientsApi - functional programming interface
129
+ */
130
+ const TeemillClientsApiFp = function (configuration) {
131
+ const localVarAxiosParamCreator = (0, exports.TeemillClientsApiAxiosParamCreator)(configuration);
132
+ return {
133
+ /**
134
+ * Get a Teemill client
135
+ * @summary Get Teemill client
136
+ * @param {string} project The project being accessed
137
+ * @param {string} clientId The client unique identifier
138
+ * @param {*} [options] Override http request option.
139
+ * @throws {RequiredError}
140
+ */
141
+ getClient(project, clientId, options) {
142
+ return __awaiter(this, void 0, void 0, function* () {
143
+ var _a, _b, _c;
144
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getClient(project, clientId, options);
145
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
146
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['TeemillClientsApi.getClient']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
147
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
148
+ });
149
+ },
150
+ /**
151
+ * Update a Teemill client
152
+ * @summary Update Teemill client
153
+ * @param {string} project The project being accessed
154
+ * @param {string} clientId The client unique identifier
155
+ * @param {UpdateClientRequest} updateClientRequest Teemill client to update
156
+ * @param {*} [options] Override http request option.
157
+ * @throws {RequiredError}
158
+ */
159
+ updateClient(project, clientId, updateClientRequest, options) {
160
+ return __awaiter(this, void 0, void 0, function* () {
161
+ var _a, _b, _c;
162
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateClient(project, clientId, updateClientRequest, options);
163
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
164
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['TeemillClientsApi.updateClient']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
165
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
166
+ });
167
+ },
168
+ };
169
+ };
170
+ exports.TeemillClientsApiFp = TeemillClientsApiFp;
171
+ /**
172
+ * TeemillClientsApi - factory interface
173
+ */
174
+ const TeemillClientsApiFactory = function (configuration, basePath, axios) {
175
+ const localVarFp = (0, exports.TeemillClientsApiFp)(configuration);
176
+ return {
177
+ /**
178
+ * Get a Teemill client
179
+ * @summary Get Teemill client
180
+ * @param {TeemillClientsApiGetClientRequest} requestParameters Request parameters.
181
+ * @param {*} [options] Override http request option.
182
+ * @throws {RequiredError}
183
+ */
184
+ getClient(requestParameters, options) {
185
+ return localVarFp.getClient(requestParameters.project, requestParameters.clientId, options).then((request) => request(axios, basePath));
186
+ },
187
+ /**
188
+ * Update a Teemill client
189
+ * @summary Update Teemill client
190
+ * @param {TeemillClientsApiUpdateClientRequest} requestParameters Request parameters.
191
+ * @param {*} [options] Override http request option.
192
+ * @throws {RequiredError}
193
+ */
194
+ updateClient(requestParameters, options) {
195
+ return localVarFp.updateClient(requestParameters.project, requestParameters.clientId, requestParameters.updateClientRequest, options).then((request) => request(axios, basePath));
196
+ },
197
+ };
198
+ };
199
+ exports.TeemillClientsApiFactory = TeemillClientsApiFactory;
200
+ /**
201
+ * TeemillClientsApi - object-oriented interface
202
+ */
203
+ class TeemillClientsApi extends base_1.BaseAPI {
204
+ /**
205
+ * Get a Teemill client
206
+ * @summary Get Teemill client
207
+ * @param {TeemillClientsApiGetClientRequest} requestParameters Request parameters.
208
+ * @param {*} [options] Override http request option.
209
+ * @throws {RequiredError}
210
+ */
211
+ getClient(requestParameters, options) {
212
+ return (0, exports.TeemillClientsApiFp)(this.configuration).getClient(requestParameters.project, requestParameters.clientId, options).then((request) => request(this.axios, this.basePath));
213
+ }
214
+ /**
215
+ * Update a Teemill client
216
+ * @summary Update Teemill client
217
+ * @param {TeemillClientsApiUpdateClientRequest} requestParameters Request parameters.
218
+ * @param {*} [options] Override http request option.
219
+ * @throws {RequiredError}
220
+ */
221
+ updateClient(requestParameters, options) {
222
+ return (0, exports.TeemillClientsApiFp)(this.configuration).updateClient(requestParameters.project, requestParameters.clientId, requestParameters.updateClientRequest, options).then((request) => request(this.axios, this.basePath));
223
+ }
224
+ }
225
+ exports.TeemillClientsApi = TeemillClientsApi;
package/dist/base.d.ts ADDED
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Teemill Clients
3
+ * Manage Teemill Client Projects.
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 type { Configuration } from './configuration';
13
+ import type { AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
+ export declare const BASE_PATH: string;
15
+ export declare const COLLECTION_FORMATS: {
16
+ csv: string;
17
+ ssv: string;
18
+ tsv: string;
19
+ pipes: string;
20
+ };
21
+ export interface RequestArgs {
22
+ url: string;
23
+ options: RawAxiosRequestConfig;
24
+ }
25
+ export declare class BaseAPI {
26
+ protected basePath: string;
27
+ protected axios: AxiosInstance;
28
+ protected configuration: Configuration | undefined;
29
+ constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
30
+ }
31
+ export declare class RequiredError extends Error {
32
+ field: string;
33
+ constructor(field: string, msg?: string);
34
+ }
35
+ interface ServerMap {
36
+ [key: string]: {
37
+ url: string;
38
+ description: string;
39
+ }[];
40
+ }
41
+ export declare const operationServerMap: ServerMap;
42
+ export {};
package/dist/base.js ADDED
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Teemill Clients
6
+ * Manage Teemill Client Projects.
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
+ 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://api.localhost".replace(/\/+$/, "");
19
+ exports.COLLECTION_FORMATS = {
20
+ csv: ",",
21
+ ssv: " ",
22
+ tsv: "\t",
23
+ pipes: "|",
24
+ };
25
+ class BaseAPI {
26
+ constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
27
+ var _a;
28
+ this.basePath = basePath;
29
+ this.axios = axios;
30
+ if (configuration) {
31
+ this.configuration = configuration;
32
+ this.basePath = (_a = configuration.basePath) !== null && _a !== void 0 ? _a : basePath;
33
+ }
34
+ }
35
+ }
36
+ exports.BaseAPI = BaseAPI;
37
+ ;
38
+ class RequiredError extends Error {
39
+ constructor(field, msg) {
40
+ super(msg);
41
+ this.field = field;
42
+ this.name = "RequiredError";
43
+ }
44
+ }
45
+ exports.RequiredError = RequiredError;
46
+ exports.operationServerMap = {};
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Teemill Clients
3
+ * Manage Teemill Client Projects.
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 type { Configuration } from "./configuration";
13
+ import type { RequestArgs } from "./base";
14
+ import type { AxiosInstance, AxiosResponse } from 'axios';
15
+ /**
16
+ *
17
+ * @export
18
+ */
19
+ export declare const DUMMY_BASE_URL = "https://example.com";
20
+ /**
21
+ *
22
+ * @throws {RequiredError}
23
+ * @export
24
+ */
25
+ export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
26
+ /**
27
+ *
28
+ * @export
29
+ */
30
+ export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
31
+ /**
32
+ *
33
+ * @export
34
+ */
35
+ export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
36
+ /**
37
+ *
38
+ * @export
39
+ */
40
+ export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
41
+ /**
42
+ *
43
+ * @export
44
+ */
45
+ export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
46
+ /**
47
+ *
48
+ * @export
49
+ */
50
+ export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
51
+ /**
52
+ *
53
+ * @export
54
+ */
55
+ export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
56
+ /**
57
+ *
58
+ * @export
59
+ */
60
+ export declare const toPathString: (url: URL) => string;
61
+ /**
62
+ *
63
+ * @export
64
+ */
65
+ export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;