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