@emilgroup/setting-sdk 0.2.0 → 0.2.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.
Files changed (65) hide show
  1. package/index.js +99 -0
  2. package/package.json +8 -22
  3. package/scripts/deploy.js +235 -0
  4. package/.openapi-generator/FILES +0 -26
  5. package/.openapi-generator/VERSION +0 -1
  6. package/.openapi-generator-ignore +0 -23
  7. package/api/default-api.ts +0 -120
  8. package/api/public-keys-api.ts +0 -785
  9. package/api.ts +0 -29
  10. package/base.ts +0 -282
  11. package/common.ts +0 -198
  12. package/configuration.ts +0 -110
  13. package/dist/api/default-api.d.ts +0 -66
  14. package/dist/api/default-api.js +0 -196
  15. package/dist/api/public-keys-api.d.ts +0 -441
  16. package/dist/api/public-keys-api.js +0 -731
  17. package/dist/api.d.ts +0 -13
  18. package/dist/api.js +0 -31
  19. package/dist/base.d.ts +0 -77
  20. package/dist/base.js +0 -324
  21. package/dist/common.d.ts +0 -91
  22. package/dist/common.js +0 -276
  23. package/dist/configuration.d.ts +0 -89
  24. package/dist/configuration.js +0 -52
  25. package/dist/index.d.ts +0 -15
  26. package/dist/index.js +0 -36
  27. package/dist/models/create-public-key-request-dto.d.ts +0 -24
  28. package/dist/models/create-public-key-request-dto.js +0 -15
  29. package/dist/models/create-public-key-response-class.d.ts +0 -25
  30. package/dist/models/create-public-key-response-class.js +0 -15
  31. package/dist/models/delete-public-key-request-dto.d.ts +0 -24
  32. package/dist/models/delete-public-key-request-dto.js +0 -15
  33. package/dist/models/get-public-key-response-class.d.ts +0 -25
  34. package/dist/models/get-public-key-response-class.js +0 -15
  35. package/dist/models/index.d.ts +0 -11
  36. package/dist/models/index.js +0 -27
  37. package/dist/models/inline-response200.d.ts +0 -54
  38. package/dist/models/inline-response200.js +0 -15
  39. package/dist/models/inline-response503.d.ts +0 -54
  40. package/dist/models/inline-response503.js +0 -15
  41. package/dist/models/list-public-keys-response-class.d.ts +0 -43
  42. package/dist/models/list-public-keys-response-class.js +0 -15
  43. package/dist/models/public-key-class.d.ts +0 -66
  44. package/dist/models/public-key-class.js +0 -15
  45. package/dist/models/rotate-public-key-response-class.d.ts +0 -25
  46. package/dist/models/rotate-public-key-response-class.js +0 -15
  47. package/dist/models/update-public-key-request-dto.d.ts +0 -30
  48. package/dist/models/update-public-key-request-dto.js +0 -15
  49. package/dist/models/update-public-key-response-class.d.ts +0 -25
  50. package/dist/models/update-public-key-response-class.js +0 -15
  51. package/git_push.sh +0 -57
  52. package/index.ts +0 -19
  53. package/models/create-public-key-request-dto.ts +0 -30
  54. package/models/create-public-key-response-class.ts +0 -31
  55. package/models/delete-public-key-request-dto.ts +0 -30
  56. package/models/get-public-key-response-class.ts +0 -31
  57. package/models/index.ts +0 -11
  58. package/models/inline-response200.ts +0 -48
  59. package/models/inline-response503.ts +0 -48
  60. package/models/list-public-keys-response-class.ts +0 -49
  61. package/models/public-key-class.ts +0 -72
  62. package/models/rotate-public-key-response-class.ts +0 -31
  63. package/models/update-public-key-request-dto.ts +0 -36
  64. package/models/update-public-key-response-class.ts +0 -31
  65. package/tsconfig.json +0 -23
package/dist/api.d.ts DELETED
@@ -1,13 +0,0 @@
1
- /**
2
- * EMIL SettingService
3
- * The EMIL SettingService API description
4
- *
5
- * The version of the OpenAPI document: 1.0
6
- * Contact: kontakt@emil.de
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 * from './api/default-api';
13
- export * from './api/public-keys-api';
package/dist/api.js DELETED
@@ -1,31 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * EMIL SettingService
6
- * The EMIL SettingService API description
7
- *
8
- * The version of the OpenAPI document: 1.0
9
- * Contact: kontakt@emil.de
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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
- if (k2 === undefined) k2 = k;
17
- var desc = Object.getOwnPropertyDescriptor(m, k);
18
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
- desc = { enumerable: true, get: function() { return m[k]; } };
20
- }
21
- Object.defineProperty(o, k2, desc);
22
- }) : (function(o, m, k, k2) {
23
- if (k2 === undefined) k2 = k;
24
- o[k2] = m[k];
25
- }));
26
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
27
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
28
- };
29
- Object.defineProperty(exports, "__esModule", { value: true });
30
- __exportStar(require("./api/default-api"), exports);
31
- __exportStar(require("./api/public-keys-api"), exports);
package/dist/base.d.ts DELETED
@@ -1,77 +0,0 @@
1
- /**
2
- * EMIL SettingService
3
- * The EMIL SettingService API description
4
- *
5
- * The version of the OpenAPI document: 1.0
6
- * Contact: kontakt@emil.de
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
- export interface LoginClass {
26
- accessToken: string;
27
- permissions: string;
28
- }
29
- export declare enum Environment {
30
- Production = "https://apiv2.emil.de",
31
- Test = "https://apiv2-test.emil.de",
32
- Staging = "https://apiv2-staging.emil.de",
33
- Development = "https://apiv2-dev.emil.de",
34
- ProductionZurich = "https://eu-central-2.apiv2.emil.de"
35
- }
36
- export declare function resetRetry(): void;
37
- /**
38
- *
39
- * @export
40
- * @interface RequestArgs
41
- */
42
- export interface RequestArgs {
43
- url: string;
44
- options: AxiosRequestConfig;
45
- }
46
- /**
47
- *
48
- * @export
49
- * @class BaseAPI
50
- */
51
- export declare class BaseAPI {
52
- protected basePath: string;
53
- protected axios: AxiosInstance;
54
- protected configuration: Configuration | undefined;
55
- private tokenData?;
56
- constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
57
- selectEnvironment(env: Environment): void;
58
- selectBasePath(path: string): void;
59
- getPermissions(): Array<string>;
60
- authorize(username: string, password: string, targetWorkspace?: string): Promise<void>;
61
- refreshTokenInternal(): Promise<LoginClass>;
62
- private storeTokenData;
63
- loadTokenData(): void;
64
- cleanTokenData(): void;
65
- private attachInterceptor;
66
- }
67
- /**
68
- *
69
- * @export
70
- * @class RequiredError
71
- * @extends {Error}
72
- */
73
- export declare class RequiredError extends Error {
74
- field: string;
75
- name: "RequiredError";
76
- constructor(field: string, msg?: string);
77
- }
package/dist/base.js DELETED
@@ -1,324 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * EMIL SettingService
6
- * The EMIL SettingService API description
7
- *
8
- * The version of the OpenAPI document: 1.0
9
- * Contact: kontakt@emil.de
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 __extends = (this && this.__extends) || (function () {
16
- var extendStatics = function (d, b) {
17
- extendStatics = Object.setPrototypeOf ||
18
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
- return extendStatics(d, b);
21
- };
22
- return function (d, b) {
23
- if (typeof b !== "function" && b !== null)
24
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
- extendStatics(d, b);
26
- function __() { this.constructor = d; }
27
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
- };
29
- })();
30
- var __assign = (this && this.__assign) || function () {
31
- __assign = Object.assign || function(t) {
32
- for (var s, i = 1, n = arguments.length; i < n; i++) {
33
- s = arguments[i];
34
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
- t[p] = s[p];
36
- }
37
- return t;
38
- };
39
- return __assign.apply(this, arguments);
40
- };
41
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
- return new (P || (P = Promise))(function (resolve, reject) {
44
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
- step((generator = generator.apply(thisArg, _arguments || [])).next());
48
- });
49
- };
50
- var __generator = (this && this.__generator) || function (thisArg, body) {
51
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
52
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
- function verb(n) { return function (v) { return step([n, v]); }; }
54
- function step(op) {
55
- if (f) throw new TypeError("Generator is already executing.");
56
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
57
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
58
- if (y = 0, t) op = [op[0] & 2, t.value];
59
- switch (op[0]) {
60
- case 0: case 1: t = op; break;
61
- case 4: _.label++; return { value: op[1], done: false };
62
- case 5: _.label++; y = op[1]; op = [0]; continue;
63
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
- default:
65
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
- if (t[2]) _.ops.pop();
70
- _.trys.pop(); continue;
71
- }
72
- op = body.call(thisArg, _);
73
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
- }
76
- };
77
- var __importDefault = (this && this.__importDefault) || function (mod) {
78
- return (mod && mod.__esModule) ? mod : { "default": mod };
79
- };
80
- Object.defineProperty(exports, "__esModule", { value: true });
81
- exports.RequiredError = exports.BaseAPI = exports.resetRetry = exports.Environment = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
82
- var configuration_1 = require("./configuration");
83
- var common_1 = require("./common");
84
- // Some imports not used depending on template conditions
85
- // @ts-ignore
86
- var axios_1 = __importDefault(require("axios"));
87
- exports.BASE_PATH = "https://apiv2.emil.de".replace(/\/+$/, "");
88
- /**
89
- *
90
- * @export
91
- */
92
- exports.COLLECTION_FORMATS = {
93
- csv: ",",
94
- ssv: " ",
95
- tsv: "\t",
96
- pipes: "|",
97
- };
98
- var Environment;
99
- (function (Environment) {
100
- Environment["Production"] = "https://apiv2.emil.de";
101
- Environment["Test"] = "https://apiv2-test.emil.de";
102
- Environment["Staging"] = "https://apiv2-staging.emil.de";
103
- Environment["Development"] = "https://apiv2-dev.emil.de";
104
- Environment["ProductionZurich"] = "https://eu-central-2.apiv2.emil.de";
105
- })(Environment = exports.Environment || (exports.Environment = {}));
106
- var _retry_count = 0;
107
- var _retry = null;
108
- function resetRetry() {
109
- _retry_count = 0;
110
- }
111
- exports.resetRetry = resetRetry;
112
- var NETWORK_ERROR_MESSAGE = "Network Error";
113
- var TOKEN_DATA = 'APP_TOKEN';
114
- /**
115
- *
116
- * @export
117
- * @class BaseAPI
118
- */
119
- var BaseAPI = /** @class */ (function () {
120
- function BaseAPI(configuration, basePath, axios) {
121
- if (basePath === void 0) { basePath = exports.BASE_PATH; }
122
- if (axios === void 0) { axios = axios_1.default; }
123
- this.basePath = basePath;
124
- this.axios = axios;
125
- this.loadTokenData();
126
- if (configuration) {
127
- var accessToken = this.tokenData.accessToken;
128
- this.configuration = configuration;
129
- this.basePath = configuration.basePath || this.basePath;
130
- // Use config token if provided, otherwise use tokenData token
131
- var configToken = this.configuration.accessToken;
132
- var storedToken = accessToken ? "Bearer ".concat(accessToken) : '';
133
- this.configuration.accessToken = configToken || storedToken;
134
- }
135
- else {
136
- var _a = this.tokenData, accessToken = _a.accessToken, username = _a.username;
137
- this.configuration = new configuration_1.Configuration({
138
- basePath: this.basePath,
139
- accessToken: accessToken ? "Bearer ".concat(accessToken) : '',
140
- username: username,
141
- });
142
- }
143
- this.attachInterceptor(axios);
144
- }
145
- BaseAPI.prototype.selectEnvironment = function (env) {
146
- this.selectBasePath(env);
147
- };
148
- BaseAPI.prototype.selectBasePath = function (path) {
149
- this.configuration.basePath = path;
150
- };
151
- BaseAPI.prototype.getPermissions = function () {
152
- var _a;
153
- if (!((_a = this.tokenData) === null || _a === void 0 ? void 0 : _a.permissions)) {
154
- return [];
155
- }
156
- return this.tokenData.permissions.split(',');
157
- };
158
- BaseAPI.prototype.authorize = function (username, password, targetWorkspace) {
159
- return __awaiter(this, void 0, void 0, function () {
160
- var options, response, _a, accessToken, permissions;
161
- return __generator(this, function (_b) {
162
- switch (_b.label) {
163
- case 0:
164
- options = {
165
- method: 'POST',
166
- url: "".concat(this.configuration.basePath, "/authservice/v1/login"),
167
- headers: { 'Content-Type': 'application/json' },
168
- data: {
169
- username: username,
170
- password: password,
171
- },
172
- withCredentials: true,
173
- };
174
- return [4 /*yield*/, axios_1.default.request(options)];
175
- case 1:
176
- response = _b.sent();
177
- _a = response.data, accessToken = _a.accessToken, permissions = _a.permissions;
178
- this.configuration.username = username;
179
- this.configuration.accessToken = "Bearer ".concat(accessToken);
180
- this.tokenData.username = username;
181
- this.tokenData.accessToken = accessToken;
182
- this.tokenData.permissions = permissions;
183
- return [2 /*return*/];
184
- }
185
- });
186
- });
187
- };
188
- BaseAPI.prototype.refreshTokenInternal = function () {
189
- return __awaiter(this, void 0, void 0, function () {
190
- var username, refreshTokenAxios, options, response;
191
- var _this = this;
192
- return __generator(this, function (_a) {
193
- switch (_a.label) {
194
- case 0:
195
- username = this.configuration.username;
196
- if (!username) {
197
- throw new Error('Failed to refresh token.');
198
- }
199
- refreshTokenAxios = axios_1.default.create();
200
- refreshTokenAxios.interceptors.response.use(function (response) {
201
- var permissions = response.data.permissions;
202
- _this.tokenData.permissions = permissions;
203
- _this.storeTokenData(_this.tokenData);
204
- return response;
205
- });
206
- options = {
207
- method: 'POST',
208
- url: "".concat(this.configuration.basePath, "/authservice/v1/refresh-token"),
209
- headers: {
210
- 'Content-Type': 'application/json',
211
- },
212
- data: { username: username },
213
- withCredentials: true,
214
- };
215
- return [4 /*yield*/, refreshTokenAxios.request(options)];
216
- case 1:
217
- response = _a.sent();
218
- return [2 /*return*/, response.data];
219
- }
220
- });
221
- });
222
- };
223
- BaseAPI.prototype.storeTokenData = function (tokenData) {
224
- if (typeof window !== 'undefined') {
225
- (0, common_1.defaultStorage)().set(TOKEN_DATA, tokenData);
226
- }
227
- };
228
- BaseAPI.prototype.loadTokenData = function () {
229
- if (typeof window !== 'undefined') {
230
- this.tokenData = (0, common_1.defaultStorage)().get(TOKEN_DATA) || {};
231
- }
232
- else {
233
- this.tokenData = {};
234
- }
235
- };
236
- BaseAPI.prototype.cleanTokenData = function () {
237
- this.storeTokenData(null);
238
- };
239
- BaseAPI.prototype.attachInterceptor = function (axios) {
240
- var _this = this;
241
- axios.interceptors.response.use(function (res) {
242
- return res;
243
- }, function (err) { return __awaiter(_this, void 0, void 0, function () {
244
- var originalConfig, _a, tokenString, permissions, accessToken, _error_1, _b, tokenString, permissions, accessToken, _error_2;
245
- return __generator(this, function (_c) {
246
- switch (_c.label) {
247
- case 0:
248
- originalConfig = err.config;
249
- if (!(err.response && !(err.response instanceof XMLHttpRequest))) return [3 /*break*/, 5];
250
- if (!((err.response.status === 401 || err.response.status === 403)
251
- && !originalConfig._retry)) return [3 /*break*/, 4];
252
- originalConfig._retry = true;
253
- _c.label = 1;
254
- case 1:
255
- _c.trys.push([1, 3, , 4]);
256
- return [4 /*yield*/, this.refreshTokenInternal()];
257
- case 2:
258
- _a = _c.sent(), tokenString = _a.accessToken, permissions = _a.permissions;
259
- accessToken = "Bearer ".concat(tokenString);
260
- this.tokenData.permissions = permissions;
261
- delete originalConfig.headers['Authorization'];
262
- originalConfig.headers['Authorization'] = accessToken;
263
- this.configuration.accessToken = accessToken;
264
- this.tokenData.accessToken = tokenString;
265
- this.storeTokenData(this.tokenData);
266
- return [2 /*return*/, axios(originalConfig)];
267
- case 3:
268
- _error_1 = _c.sent();
269
- if (_error_1.response && _error_1.response.data) {
270
- return [2 /*return*/, Promise.reject(_error_1.response.data)];
271
- }
272
- return [2 /*return*/, Promise.reject(_error_1)];
273
- case 4: return [3 /*break*/, 9];
274
- case 5:
275
- if (!(err.message === NETWORK_ERROR_MESSAGE
276
- && originalConfig.headers.hasOwnProperty('Authorization')
277
- && _retry_count < 4)) return [3 /*break*/, 9];
278
- _retry_count++;
279
- _c.label = 6;
280
- case 6:
281
- _c.trys.push([6, 8, , 9]);
282
- return [4 /*yield*/, this.refreshTokenInternal()];
283
- case 7:
284
- _b = _c.sent(), tokenString = _b.accessToken, permissions = _b.permissions;
285
- accessToken = "Bearer ".concat(tokenString);
286
- this.tokenData.permissions = permissions;
287
- _retry = true;
288
- originalConfig.headers['Authorization'] = accessToken;
289
- this.configuration.accessToken = accessToken;
290
- this.tokenData.accessToken = tokenString;
291
- this.storeTokenData(this.tokenData);
292
- return [2 /*return*/, axios.request(__assign({}, originalConfig))];
293
- case 8:
294
- _error_2 = _c.sent();
295
- if (_error_2.response && _error_2.response.data) {
296
- return [2 /*return*/, Promise.reject(_error_2.response.data)];
297
- }
298
- return [2 /*return*/, Promise.reject(_error_2)];
299
- case 9: return [2 /*return*/, Promise.reject(err)];
300
- }
301
- });
302
- }); });
303
- };
304
- return BaseAPI;
305
- }());
306
- exports.BaseAPI = BaseAPI;
307
- ;
308
- /**
309
- *
310
- * @export
311
- * @class RequiredError
312
- * @extends {Error}
313
- */
314
- var RequiredError = /** @class */ (function (_super) {
315
- __extends(RequiredError, _super);
316
- function RequiredError(field, msg) {
317
- var _this = _super.call(this, msg) || this;
318
- _this.field = field;
319
- _this.name = "RequiredError";
320
- return _this;
321
- }
322
- return RequiredError;
323
- }(Error));
324
- exports.RequiredError = RequiredError;
package/dist/common.d.ts DELETED
@@ -1,91 +0,0 @@
1
- /**
2
- * EMIL SettingService
3
- * The EMIL SettingService API description
4
- *
5
- * The version of the OpenAPI document: 1.0
6
- * Contact: kontakt@emil.de
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
- /**
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>;
66
- /**
67
- * EMIL SettingService
68
- * The EMIL SettingService API description
69
- *
70
- * The version of the OpenAPI document: 1.0
71
- * Contact: kontakt@emil.de
72
- *
73
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
74
- * https://openapi-generator.tech
75
- * Do not edit the class manually.
76
- */
77
- export interface IStorageConverter<D, SD> {
78
- toStorageData(data: D): SD;
79
- fromStorageData(storageData: SD): D;
80
- }
81
- export interface IStorage {
82
- get<T>(key: string, converter?: IStorageConverter<T, any>): T | null;
83
- set<T>(key: string, value: T, converter?: IStorageConverter<T, any>): void;
84
- }
85
- export declare class LocalStorage implements IStorage {
86
- readonly storage: Storage;
87
- constructor();
88
- get<T>(key: string, converter?: IStorageConverter<T, any>): T | null;
89
- set<T>(key: string, value: T, converter?: IStorageConverter<T, any>): void;
90
- }
91
- export declare const defaultStorage: () => IStorage;