ob-parking-sdk 0.0.1

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,281 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * obk-parking
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: 0.0.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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
25
+ return (mod && mod.__esModule) ? mod : { "default": mod };
26
+ };
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ exports.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = exports.ReceiptStatus = exports.AddParkingTicketType = void 0;
29
+ const axios_1 = __importDefault(require("axios"));
30
+ // Some imports not used depending on template conditions
31
+ // @ts-ignore
32
+ const common_1 = require("./common");
33
+ // @ts-ignore
34
+ const base_1 = require("./base");
35
+ /**
36
+ *
37
+ * @export
38
+ * @enum {string}
39
+ */
40
+ exports.AddParkingTicketType = {
41
+ Cms: 'CMS',
42
+ App: 'APP'
43
+ };
44
+ /**
45
+ *
46
+ * @export
47
+ * @enum {string}
48
+ */
49
+ exports.ReceiptStatus = {
50
+ Declined: 'declined',
51
+ Success: 'success',
52
+ Pending: 'pending',
53
+ Dispute: 'dispute',
54
+ Redeemed: 'redeemed'
55
+ };
56
+ /**
57
+ * DefaultApi - axios parameter creator
58
+ * @export
59
+ */
60
+ const DefaultApiAxiosParamCreator = function (configuration) {
61
+ return {
62
+ /**
63
+ *
64
+ * @param {string} logId
65
+ * @param {AddParkingTicketType} type
66
+ * @param {string} [xAccountId]
67
+ * @param {*} [options] Override http request option.
68
+ * @throws {RequiredError}
69
+ */
70
+ parkingAddParkingTicket: (logId, type, xAccountId, options = {}) => __awaiter(this, void 0, void 0, function* () {
71
+ // verify required parameter 'logId' is not null or undefined
72
+ (0, common_1.assertParamExists)('parkingAddParkingTicket', 'logId', logId);
73
+ // verify required parameter 'type' is not null or undefined
74
+ (0, common_1.assertParamExists)('parkingAddParkingTicket', 'type', type);
75
+ const localVarPath = `/parking-details/add-parking-ticket`;
76
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
77
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
78
+ let baseOptions;
79
+ if (configuration) {
80
+ baseOptions = configuration.baseOptions;
81
+ }
82
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
83
+ const localVarHeaderParameter = {};
84
+ const localVarQueryParameter = {};
85
+ if (logId !== undefined) {
86
+ localVarQueryParameter['log_id'] = logId;
87
+ }
88
+ if (type !== undefined) {
89
+ localVarQueryParameter['type'] = type;
90
+ }
91
+ if (xAccountId != null) {
92
+ localVarHeaderParameter['x-account-id'] = String(xAccountId);
93
+ }
94
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
95
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
96
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
97
+ return {
98
+ url: (0, common_1.toPathString)(localVarUrlObj),
99
+ options: localVarRequestOptions,
100
+ };
101
+ }),
102
+ /**
103
+ *
104
+ * @param {string} id
105
+ * @param {*} [options] Override http request option.
106
+ * @throws {RequiredError}
107
+ */
108
+ parkingDetailsGetParkingDetail: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
109
+ // verify required parameter 'id' is not null or undefined
110
+ (0, common_1.assertParamExists)('parkingDetailsGetParkingDetail', 'id', id);
111
+ const localVarPath = `/parking-details/{id}`
112
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
113
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
114
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
115
+ let baseOptions;
116
+ if (configuration) {
117
+ baseOptions = configuration.baseOptions;
118
+ }
119
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
120
+ const localVarHeaderParameter = {};
121
+ const localVarQueryParameter = {};
122
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
123
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
124
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
125
+ return {
126
+ url: (0, common_1.toPathString)(localVarUrlObj),
127
+ options: localVarRequestOptions,
128
+ };
129
+ }),
130
+ /**
131
+ *
132
+ * @param {*} [options] Override http request option.
133
+ * @throws {RequiredError}
134
+ */
135
+ testTest: (options = {}) => __awaiter(this, void 0, void 0, function* () {
136
+ const localVarPath = `/test`;
137
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
138
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
139
+ let baseOptions;
140
+ if (configuration) {
141
+ baseOptions = configuration.baseOptions;
142
+ }
143
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
144
+ const localVarHeaderParameter = {};
145
+ const localVarQueryParameter = {};
146
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
147
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
148
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
149
+ return {
150
+ url: (0, common_1.toPathString)(localVarUrlObj),
151
+ options: localVarRequestOptions,
152
+ };
153
+ }),
154
+ };
155
+ };
156
+ exports.DefaultApiAxiosParamCreator = DefaultApiAxiosParamCreator;
157
+ /**
158
+ * DefaultApi - functional programming interface
159
+ * @export
160
+ */
161
+ const DefaultApiFp = function (configuration) {
162
+ const localVarAxiosParamCreator = (0, exports.DefaultApiAxiosParamCreator)(configuration);
163
+ return {
164
+ /**
165
+ *
166
+ * @param {string} logId
167
+ * @param {AddParkingTicketType} type
168
+ * @param {string} [xAccountId]
169
+ * @param {*} [options] Override http request option.
170
+ * @throws {RequiredError}
171
+ */
172
+ parkingAddParkingTicket(logId, type, xAccountId, options) {
173
+ return __awaiter(this, void 0, void 0, function* () {
174
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.parkingAddParkingTicket(logId, type, xAccountId, options);
175
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
176
+ });
177
+ },
178
+ /**
179
+ *
180
+ * @param {string} id
181
+ * @param {*} [options] Override http request option.
182
+ * @throws {RequiredError}
183
+ */
184
+ parkingDetailsGetParkingDetail(id, options) {
185
+ return __awaiter(this, void 0, void 0, function* () {
186
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.parkingDetailsGetParkingDetail(id, options);
187
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
188
+ });
189
+ },
190
+ /**
191
+ *
192
+ * @param {*} [options] Override http request option.
193
+ * @throws {RequiredError}
194
+ */
195
+ testTest(options) {
196
+ return __awaiter(this, void 0, void 0, function* () {
197
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.testTest(options);
198
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
199
+ });
200
+ },
201
+ };
202
+ };
203
+ exports.DefaultApiFp = DefaultApiFp;
204
+ /**
205
+ * DefaultApi - factory interface
206
+ * @export
207
+ */
208
+ const DefaultApiFactory = function (configuration, basePath, axios) {
209
+ const localVarFp = (0, exports.DefaultApiFp)(configuration);
210
+ return {
211
+ /**
212
+ *
213
+ * @param {string} logId
214
+ * @param {AddParkingTicketType} type
215
+ * @param {string} [xAccountId]
216
+ * @param {*} [options] Override http request option.
217
+ * @throws {RequiredError}
218
+ */
219
+ parkingAddParkingTicket(logId, type, xAccountId, options) {
220
+ return localVarFp.parkingAddParkingTicket(logId, type, xAccountId, options).then((request) => request(axios, basePath));
221
+ },
222
+ /**
223
+ *
224
+ * @param {string} id
225
+ * @param {*} [options] Override http request option.
226
+ * @throws {RequiredError}
227
+ */
228
+ parkingDetailsGetParkingDetail(id, options) {
229
+ return localVarFp.parkingDetailsGetParkingDetail(id, options).then((request) => request(axios, basePath));
230
+ },
231
+ /**
232
+ *
233
+ * @param {*} [options] Override http request option.
234
+ * @throws {RequiredError}
235
+ */
236
+ testTest(options) {
237
+ return localVarFp.testTest(options).then((request) => request(axios, basePath));
238
+ },
239
+ };
240
+ };
241
+ exports.DefaultApiFactory = DefaultApiFactory;
242
+ /**
243
+ * DefaultApi - object-oriented interface
244
+ * @export
245
+ * @class DefaultApi
246
+ * @extends {BaseAPI}
247
+ */
248
+ class DefaultApi extends base_1.BaseAPI {
249
+ /**
250
+ *
251
+ * @param {string} logId
252
+ * @param {AddParkingTicketType} type
253
+ * @param {string} [xAccountId]
254
+ * @param {*} [options] Override http request option.
255
+ * @throws {RequiredError}
256
+ * @memberof DefaultApi
257
+ */
258
+ parkingAddParkingTicket(logId, type, xAccountId, options) {
259
+ return (0, exports.DefaultApiFp)(this.configuration).parkingAddParkingTicket(logId, type, xAccountId, options).then((request) => request(this.axios, this.basePath));
260
+ }
261
+ /**
262
+ *
263
+ * @param {string} id
264
+ * @param {*} [options] Override http request option.
265
+ * @throws {RequiredError}
266
+ * @memberof DefaultApi
267
+ */
268
+ parkingDetailsGetParkingDetail(id, options) {
269
+ return (0, exports.DefaultApiFp)(this.configuration).parkingDetailsGetParkingDetail(id, options).then((request) => request(this.axios, this.basePath));
270
+ }
271
+ /**
272
+ *
273
+ * @param {*} [options] Override http request option.
274
+ * @throws {RequiredError}
275
+ * @memberof DefaultApi
276
+ */
277
+ testTest(options) {
278
+ return (0, exports.DefaultApiFp)(this.configuration).testTest(options).then((request) => request(this.axios, this.basePath));
279
+ }
280
+ }
281
+ exports.DefaultApi = DefaultApi;
@@ -0,0 +1,54 @@
1
+ /**
2
+ * obk-parking
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 0.0.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, 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
+ constructor(field: string, msg?: string);
54
+ }
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * obk-parking
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: 0.0.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 __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
20
+ const axios_1 = __importDefault(require("axios"));
21
+ exports.BASE_PATH = "http://localhost".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
+ *
51
+ * @export
52
+ * @class RequiredError
53
+ * @extends {Error}
54
+ */
55
+ class RequiredError extends Error {
56
+ constructor(field, msg) {
57
+ super(msg);
58
+ this.field = field;
59
+ this.name = "RequiredError";
60
+ }
61
+ }
62
+ exports.RequiredError = RequiredError;
@@ -0,0 +1,65 @@
1
+ /**
2
+ * obk-parking
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 0.0.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, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
@@ -0,0 +1,160 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * obk-parking
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: 0.0.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));
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 = 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
+ const axiosRequestArgs = Object.assign(Object.assign({}, axiosArgs.options), { url: ((configuration === null || configuration === void 0 ? void 0 : configuration.basePath) || axios.defaults.baseURL || basePath) + axiosArgs.url });
157
+ return axios.request(axiosRequestArgs);
158
+ };
159
+ };
160
+ exports.createRequestFunction = createRequestFunction;