@autifyhq/autify-sdk 0.1.0-beta.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.
Files changed (31) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +18 -0
  3. package/dist/debug.d.ts +1 -0
  4. package/dist/debug.js +11 -0
  5. package/dist/generated/mobile/client.d.ts +32 -0
  6. package/dist/generated/mobile/client.js +62 -0
  7. package/dist/generated/mobile/openapi/api.d.ts +316 -0
  8. package/dist/generated/mobile/openapi/api.js +277 -0
  9. package/dist/generated/mobile/openapi/base.d.ts +55 -0
  10. package/dist/generated/mobile/openapi/base.js +61 -0
  11. package/dist/generated/mobile/openapi/common.d.ts +66 -0
  12. package/dist/generated/mobile/openapi/common.js +144 -0
  13. package/dist/generated/mobile/openapi/configuration.d.ts +83 -0
  14. package/dist/generated/mobile/openapi/configuration.js +44 -0
  15. package/dist/generated/mobile/openapi/index.d.ts +13 -0
  16. package/dist/generated/mobile/openapi/index.js +18 -0
  17. package/dist/generated/web/client.d.ts +117 -0
  18. package/dist/generated/web/client.js +165 -0
  19. package/dist/generated/web/openapi/api.d.ts +1402 -0
  20. package/dist/generated/web/openapi/api.js +1135 -0
  21. package/dist/generated/web/openapi/base.d.ts +55 -0
  22. package/dist/generated/web/openapi/base.js +61 -0
  23. package/dist/generated/web/openapi/common.d.ts +66 -0
  24. package/dist/generated/web/openapi/common.js +144 -0
  25. package/dist/generated/web/openapi/configuration.d.ts +83 -0
  26. package/dist/generated/web/openapi/configuration.js +44 -0
  27. package/dist/generated/web/openapi/index.d.ts +13 -0
  28. package/dist/generated/web/openapi/index.js +18 -0
  29. package/dist/index.d.ts +3 -0
  30. package/dist/index.js +10 -0
  31. package/package.json +60 -0
@@ -0,0 +1,277 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Autify for Mobile API
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: v1
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.TestPlansApi = exports.TestPlansApiFactory = exports.TestPlansApiFp = exports.TestPlansApiAxiosParamCreator = exports.BuildsApi = exports.BuildsApiFactory = exports.BuildsApiFp = exports.BuildsApiAxiosParamCreator = void 0;
17
+ const tslib_1 = require("tslib");
18
+ const axios_1 = tslib_1.__importDefault(require("axios"));
19
+ // URLSearchParams not necessarily used
20
+ // @ts-ignore
21
+ const url_1 = require("url");
22
+ const form_data_1 = tslib_1.__importDefault(require("form-data"));
23
+ // Some imports not used depending on template conditions
24
+ // @ts-ignore
25
+ const common_1 = require("./common");
26
+ // @ts-ignore
27
+ const base_1 = require("./base");
28
+ /**
29
+ * BuildsApi - axios parameter creator
30
+ * @export
31
+ */
32
+ const BuildsApiAxiosParamCreator = function (configuration) {
33
+ return {
34
+ /**
35
+ * Upload the build file.
36
+ * @summary Upload a build
37
+ * @param {string} projectId The ID of the project to upload the build file to.
38
+ * @param {any} file Build file.
39
+ * @param {*} [options] Override http request option.
40
+ * @throws {RequiredError}
41
+ */
42
+ uploadBuild: async (projectId, file, options = {}) => {
43
+ var _a, _b;
44
+ // verify required parameter 'projectId' is not null or undefined
45
+ (0, common_1.assertParamExists)("uploadBuild", "projectId", projectId);
46
+ // verify required parameter 'file' is not null or undefined
47
+ (0, common_1.assertParamExists)("uploadBuild", "file", file);
48
+ const localVarPath = `/projects/{project_id}/builds`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
49
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
50
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
51
+ let baseOptions;
52
+ if (configuration) {
53
+ baseOptions = configuration.baseOptions;
54
+ }
55
+ const localVarRequestOptions = {
56
+ method: "POST",
57
+ ...baseOptions,
58
+ ...options,
59
+ };
60
+ const localVarHeaderParameter = {};
61
+ const localVarQueryParameter = {};
62
+ const localVarFormParams = new ((configuration &&
63
+ configuration.formDataCtor) ||
64
+ form_data_1.default)();
65
+ // authentication bearerAuth required
66
+ // http bearer authentication required
67
+ await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
68
+ if (file !== undefined) {
69
+ localVarFormParams.append("file", file);
70
+ }
71
+ localVarHeaderParameter["Content-Type"] = "multipart/form-data";
72
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
73
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
74
+ localVarRequestOptions.headers = {
75
+ ...localVarHeaderParameter,
76
+ ...headersFromBaseOptions,
77
+ ...(_b = (_a = localVarFormParams).getHeaders) === null || _b === void 0 ? void 0 : _b.call(_a),
78
+ ...options.headers,
79
+ };
80
+ localVarRequestOptions.data = localVarFormParams;
81
+ return {
82
+ url: (0, common_1.toPathString)(localVarUrlObj),
83
+ options: localVarRequestOptions,
84
+ };
85
+ },
86
+ };
87
+ };
88
+ exports.BuildsApiAxiosParamCreator = BuildsApiAxiosParamCreator;
89
+ /**
90
+ * BuildsApi - functional programming interface
91
+ * @export
92
+ */
93
+ const BuildsApiFp = function (configuration) {
94
+ const localVarAxiosParamCreator = (0, exports.BuildsApiAxiosParamCreator)(configuration);
95
+ return {
96
+ /**
97
+ * Upload the build file.
98
+ * @summary Upload a build
99
+ * @param {string} projectId The ID of the project to upload the build file to.
100
+ * @param {any} file Build file.
101
+ * @param {*} [options] Override http request option.
102
+ * @throws {RequiredError}
103
+ */
104
+ async uploadBuild(projectId, file, options) {
105
+ const localVarAxiosArgs = await localVarAxiosParamCreator.uploadBuild(projectId, file, options);
106
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
107
+ },
108
+ };
109
+ };
110
+ exports.BuildsApiFp = BuildsApiFp;
111
+ /**
112
+ * BuildsApi - factory interface
113
+ * @export
114
+ */
115
+ const BuildsApiFactory = function (configuration, basePath, axios) {
116
+ const localVarFp = (0, exports.BuildsApiFp)(configuration);
117
+ return {
118
+ /**
119
+ * Upload the build file.
120
+ * @summary Upload a build
121
+ * @param {string} projectId The ID of the project to upload the build file to.
122
+ * @param {any} file Build file.
123
+ * @param {*} [options] Override http request option.
124
+ * @throws {RequiredError}
125
+ */
126
+ uploadBuild(projectId, file, options) {
127
+ return localVarFp
128
+ .uploadBuild(projectId, file, options)
129
+ .then((request) => request(axios, basePath));
130
+ },
131
+ };
132
+ };
133
+ exports.BuildsApiFactory = BuildsApiFactory;
134
+ /**
135
+ * BuildsApi - object-oriented interface
136
+ * @export
137
+ * @class BuildsApi
138
+ * @extends {BaseAPI}
139
+ */
140
+ class BuildsApi extends base_1.BaseAPI {
141
+ /**
142
+ * Upload the build file.
143
+ * @summary Upload a build
144
+ * @param {string} projectId The ID of the project to upload the build file to.
145
+ * @param {any} file Build file.
146
+ * @param {*} [options] Override http request option.
147
+ * @throws {RequiredError}
148
+ * @memberof BuildsApi
149
+ */
150
+ uploadBuild(projectId, file, options) {
151
+ return (0, exports.BuildsApiFp)(this.configuration)
152
+ .uploadBuild(projectId, file, options)
153
+ .then((request) => request(this.axios, this.basePath));
154
+ }
155
+ }
156
+ exports.BuildsApi = BuildsApi;
157
+ /**
158
+ * TestPlansApi - axios parameter creator
159
+ * @export
160
+ */
161
+ const TestPlansApiAxiosParamCreator = function (configuration) {
162
+ return {
163
+ /**
164
+ * Run a test plan
165
+ * @summary Run a test plan
166
+ * @param {string} testPlanId The ID of the test plan to run.
167
+ * @param {RunTestPlanRequest} runTestPlanRequest The build_id to execute the test plan.
168
+ * @param {*} [options] Override http request option.
169
+ * @throws {RequiredError}
170
+ */
171
+ runTestPlan: async (testPlanId, runTestPlanRequest, options = {}) => {
172
+ // verify required parameter 'testPlanId' is not null or undefined
173
+ (0, common_1.assertParamExists)("runTestPlan", "testPlanId", testPlanId);
174
+ // verify required parameter 'runTestPlanRequest' is not null or undefined
175
+ (0, common_1.assertParamExists)("runTestPlan", "runTestPlanRequest", runTestPlanRequest);
176
+ const localVarPath = `/test_plans/{test_plan_id}/test_plan_results`.replace(`{${"test_plan_id"}}`, encodeURIComponent(String(testPlanId)));
177
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
178
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
179
+ let baseOptions;
180
+ if (configuration) {
181
+ baseOptions = configuration.baseOptions;
182
+ }
183
+ const localVarRequestOptions = {
184
+ method: "POST",
185
+ ...baseOptions,
186
+ ...options,
187
+ };
188
+ const localVarHeaderParameter = {};
189
+ const localVarQueryParameter = {};
190
+ // authentication bearerAuth required
191
+ // http bearer authentication required
192
+ await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
193
+ localVarHeaderParameter["Content-Type"] = "application/json";
194
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
195
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
196
+ localVarRequestOptions.headers = {
197
+ ...localVarHeaderParameter,
198
+ ...headersFromBaseOptions,
199
+ ...options.headers,
200
+ };
201
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(runTestPlanRequest, localVarRequestOptions, configuration);
202
+ return {
203
+ url: (0, common_1.toPathString)(localVarUrlObj),
204
+ options: localVarRequestOptions,
205
+ };
206
+ },
207
+ };
208
+ };
209
+ exports.TestPlansApiAxiosParamCreator = TestPlansApiAxiosParamCreator;
210
+ /**
211
+ * TestPlansApi - functional programming interface
212
+ * @export
213
+ */
214
+ const TestPlansApiFp = function (configuration) {
215
+ const localVarAxiosParamCreator = (0, exports.TestPlansApiAxiosParamCreator)(configuration);
216
+ return {
217
+ /**
218
+ * Run a test plan
219
+ * @summary Run a test plan
220
+ * @param {string} testPlanId The ID of the test plan to run.
221
+ * @param {RunTestPlanRequest} runTestPlanRequest The build_id to execute the test plan.
222
+ * @param {*} [options] Override http request option.
223
+ * @throws {RequiredError}
224
+ */
225
+ async runTestPlan(testPlanId, runTestPlanRequest, options) {
226
+ const localVarAxiosArgs = await localVarAxiosParamCreator.runTestPlan(testPlanId, runTestPlanRequest, options);
227
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
228
+ },
229
+ };
230
+ };
231
+ exports.TestPlansApiFp = TestPlansApiFp;
232
+ /**
233
+ * TestPlansApi - factory interface
234
+ * @export
235
+ */
236
+ const TestPlansApiFactory = function (configuration, basePath, axios) {
237
+ const localVarFp = (0, exports.TestPlansApiFp)(configuration);
238
+ return {
239
+ /**
240
+ * Run a test plan
241
+ * @summary Run a test plan
242
+ * @param {string} testPlanId The ID of the test plan to run.
243
+ * @param {RunTestPlanRequest} runTestPlanRequest The build_id to execute the test plan.
244
+ * @param {*} [options] Override http request option.
245
+ * @throws {RequiredError}
246
+ */
247
+ runTestPlan(testPlanId, runTestPlanRequest, options) {
248
+ return localVarFp
249
+ .runTestPlan(testPlanId, runTestPlanRequest, options)
250
+ .then((request) => request(axios, basePath));
251
+ },
252
+ };
253
+ };
254
+ exports.TestPlansApiFactory = TestPlansApiFactory;
255
+ /**
256
+ * TestPlansApi - object-oriented interface
257
+ * @export
258
+ * @class TestPlansApi
259
+ * @extends {BaseAPI}
260
+ */
261
+ class TestPlansApi extends base_1.BaseAPI {
262
+ /**
263
+ * Run a test plan
264
+ * @summary Run a test plan
265
+ * @param {string} testPlanId The ID of the test plan to run.
266
+ * @param {RunTestPlanRequest} runTestPlanRequest The build_id to execute the test plan.
267
+ * @param {*} [options] Override http request option.
268
+ * @throws {RequiredError}
269
+ * @memberof TestPlansApi
270
+ */
271
+ runTestPlan(testPlanId, runTestPlanRequest, options) {
272
+ return (0, exports.TestPlansApiFp)(this.configuration)
273
+ .runTestPlan(testPlanId, runTestPlanRequest, options)
274
+ .then((request) => request(this.axios, this.basePath));
275
+ }
276
+ }
277
+ exports.TestPlansApi = TestPlansApi;
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Autify for Mobile API
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: v1
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 { Configuration } from "./configuration";
13
+ import { AxiosInstance, AxiosRequestConfig } 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: AxiosRequestConfig;
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
+ name: "RequiredError";
54
+ constructor(field: string, msg?: string);
55
+ }
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Autify for Mobile API
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: v1
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.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
17
+ const tslib_1 = require("tslib");
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ const axios_1 = tslib_1.__importDefault(require("axios"));
21
+ exports.BASE_PATH = "https://mobile-app.autify.com/api/v1".replace(/\/+$/, "");
22
+ /**
23
+ *
24
+ * @export
25
+ */
26
+ exports.COLLECTION_FORMATS = {
27
+ csv: ",",
28
+ ssv: " ",
29
+ tsv: "\t",
30
+ pipes: "|",
31
+ };
32
+ /**
33
+ *
34
+ * @export
35
+ * @class BaseAPI
36
+ */
37
+ class BaseAPI {
38
+ constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
39
+ this.basePath = basePath;
40
+ this.axios = axios;
41
+ if (configuration) {
42
+ this.configuration = configuration;
43
+ this.basePath = configuration.basePath || this.basePath;
44
+ }
45
+ }
46
+ }
47
+ exports.BaseAPI = BaseAPI;
48
+ /**
49
+ *
50
+ * @export
51
+ * @class RequiredError
52
+ * @extends {Error}
53
+ */
54
+ class RequiredError extends Error {
55
+ constructor(field, msg) {
56
+ super(msg);
57
+ this.field = field;
58
+ this.name = "RequiredError";
59
+ }
60
+ }
61
+ exports.RequiredError = RequiredError;
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Autify for Mobile API
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: v1
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 { Configuration } from "./configuration";
13
+ import { RequestArgs } from "./base";
14
+ import { AxiosInstance, AxiosResponse } from "axios";
15
+ import { URL } from "url";
16
+ /**
17
+ *
18
+ * @export
19
+ */
20
+ export declare const DUMMY_BASE_URL = "https://example.com";
21
+ /**
22
+ *
23
+ * @throws {RequiredError}
24
+ * @export
25
+ */
26
+ export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
27
+ /**
28
+ *
29
+ * @export
30
+ */
31
+ export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
32
+ /**
33
+ *
34
+ * @export
35
+ */
36
+ export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
37
+ /**
38
+ *
39
+ * @export
40
+ */
41
+ export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
42
+ /**
43
+ *
44
+ * @export
45
+ */
46
+ export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
47
+ /**
48
+ *
49
+ * @export
50
+ */
51
+ export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
52
+ /**
53
+ *
54
+ * @export
55
+ */
56
+ export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
57
+ /**
58
+ *
59
+ * @export
60
+ */
61
+ export declare const toPathString: (url: URL) => string;
62
+ /**
63
+ *
64
+ * @export
65
+ */
66
+ export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
@@ -0,0 +1,144 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Autify for Mobile API
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: v1
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.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
17
+ const base_1 = require("./base");
18
+ const url_1 = require("url");
19
+ /**
20
+ *
21
+ * @export
22
+ */
23
+ exports.DUMMY_BASE_URL = "https://example.com";
24
+ /**
25
+ *
26
+ * @throws {RequiredError}
27
+ * @export
28
+ */
29
+ const assertParamExists = function (functionName, paramName, paramValue) {
30
+ if (paramValue === null || paramValue === undefined) {
31
+ throw new base_1.RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
32
+ }
33
+ };
34
+ exports.assertParamExists = assertParamExists;
35
+ /**
36
+ *
37
+ * @export
38
+ */
39
+ const setApiKeyToObject = async function (object, keyParamName, configuration) {
40
+ if (configuration && configuration.apiKey) {
41
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
42
+ ? await configuration.apiKey(keyParamName)
43
+ : await configuration.apiKey;
44
+ object[keyParamName] = localVarApiKeyValue;
45
+ }
46
+ };
47
+ exports.setApiKeyToObject = setApiKeyToObject;
48
+ /**
49
+ *
50
+ * @export
51
+ */
52
+ const setBasicAuthToObject = function (object, configuration) {
53
+ if (configuration && (configuration.username || configuration.password)) {
54
+ object["auth"] = {
55
+ username: configuration.username,
56
+ password: configuration.password,
57
+ };
58
+ }
59
+ };
60
+ exports.setBasicAuthToObject = setBasicAuthToObject;
61
+ /**
62
+ *
63
+ * @export
64
+ */
65
+ const setBearerAuthToObject = async function (object, configuration) {
66
+ if (configuration && configuration.accessToken) {
67
+ const accessToken = typeof configuration.accessToken === "function"
68
+ ? await configuration.accessToken()
69
+ : await configuration.accessToken;
70
+ object["Authorization"] = "Bearer " + accessToken;
71
+ }
72
+ };
73
+ exports.setBearerAuthToObject = setBearerAuthToObject;
74
+ /**
75
+ *
76
+ * @export
77
+ */
78
+ const setOAuthToObject = async function (object, name, scopes, configuration) {
79
+ if (configuration && configuration.accessToken) {
80
+ const localVarAccessTokenValue = typeof configuration.accessToken === "function"
81
+ ? await configuration.accessToken(name, scopes)
82
+ : await configuration.accessToken;
83
+ object["Authorization"] = "Bearer " + localVarAccessTokenValue;
84
+ }
85
+ };
86
+ exports.setOAuthToObject = setOAuthToObject;
87
+ /**
88
+ *
89
+ * @export
90
+ */
91
+ const setSearchParams = function (url, ...objects) {
92
+ const searchParams = new url_1.URLSearchParams(url.search);
93
+ for (const object of objects) {
94
+ for (const key in object) {
95
+ if (Array.isArray(object[key])) {
96
+ searchParams.delete(key);
97
+ for (const item of object[key]) {
98
+ searchParams.append(key, item);
99
+ }
100
+ }
101
+ else {
102
+ searchParams.set(key, object[key]);
103
+ }
104
+ }
105
+ }
106
+ url.search = searchParams.toString();
107
+ };
108
+ exports.setSearchParams = setSearchParams;
109
+ /**
110
+ *
111
+ * @export
112
+ */
113
+ const serializeDataIfNeeded = function (value, requestOptions, configuration) {
114
+ const nonString = typeof value !== "string";
115
+ const needsSerialization = nonString && configuration && configuration.isJsonMime
116
+ ? configuration.isJsonMime(requestOptions.headers["Content-Type"])
117
+ : nonString;
118
+ return needsSerialization
119
+ ? JSON.stringify(value !== undefined ? value : {})
120
+ : value || "";
121
+ };
122
+ exports.serializeDataIfNeeded = serializeDataIfNeeded;
123
+ /**
124
+ *
125
+ * @export
126
+ */
127
+ const toPathString = function (url) {
128
+ return url.pathname + url.search + url.hash;
129
+ };
130
+ exports.toPathString = toPathString;
131
+ /**
132
+ *
133
+ * @export
134
+ */
135
+ const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
136
+ return (axios = globalAxios, basePath = BASE_PATH) => {
137
+ const axiosRequestArgs = {
138
+ ...axiosArgs.options,
139
+ url: ((configuration === null || configuration === void 0 ? void 0 : configuration.basePath) || basePath) + axiosArgs.url,
140
+ };
141
+ return axios.request(axiosRequestArgs);
142
+ };
143
+ };
144
+ exports.createRequestFunction = createRequestFunction;
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Autify for Mobile API
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: v1
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
+ export interface ConfigurationParameters {
13
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
14
+ username?: string;
15
+ password?: string;
16
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
17
+ basePath?: string;
18
+ baseOptions?: any;
19
+ formDataCtor?: new () => any;
20
+ }
21
+ export declare class Configuration {
22
+ /**
23
+ * parameter for apiKey security
24
+ * @param name security name
25
+ * @memberof Configuration
26
+ */
27
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
28
+ /**
29
+ * parameter for basic security
30
+ *
31
+ * @type {string}
32
+ * @memberof Configuration
33
+ */
34
+ username?: string;
35
+ /**
36
+ * parameter for basic security
37
+ *
38
+ * @type {string}
39
+ * @memberof Configuration
40
+ */
41
+ password?: string;
42
+ /**
43
+ * parameter for oauth2 security
44
+ * @param name security name
45
+ * @param scopes oauth2 scope
46
+ * @memberof Configuration
47
+ */
48
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
49
+ /**
50
+ * override base path
51
+ *
52
+ * @type {string}
53
+ * @memberof Configuration
54
+ */
55
+ basePath?: string;
56
+ /**
57
+ * base options for axios calls
58
+ *
59
+ * @type {any}
60
+ * @memberof Configuration
61
+ */
62
+ baseOptions?: any;
63
+ /**
64
+ * The FormData constructor that will be used to create multipart form data
65
+ * requests. You can inject this here so that execution environments that
66
+ * do not support the FormData class can still run the generated client.
67
+ *
68
+ * @type {new () => FormData}
69
+ */
70
+ formDataCtor?: new () => any;
71
+ constructor(param?: ConfigurationParameters);
72
+ /**
73
+ * Check if the given MIME is a JSON MIME.
74
+ * JSON MIME examples:
75
+ * application/json
76
+ * application/json; charset=UTF8
77
+ * APPLICATION/JSON
78
+ * application/vnd.company+json
79
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
80
+ * @return True if the given MIME is JSON, false otherwise.
81
+ */
82
+ isJsonMime(mime: string): boolean;
83
+ }