@emilgroup/tenant-sdk 1.4.0 → 1.5.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 (80) hide show
  1. package/.openapi-generator/FILES +15 -0
  2. package/README.md +5 -22
  3. package/api/custom-schema-api.ts +0 -4
  4. package/api/data-report-api.ts +673 -0
  5. package/api/data-report-executor-api.ts +161 -0
  6. package/api/invite-organizations-api.ts +0 -4
  7. package/api/invite-users-api.ts +0 -4
  8. package/api/list-organization-invitations-api.ts +0 -4
  9. package/api/organizations-api.ts +0 -4
  10. package/api/re-invite-an-organization-api.ts +0 -4
  11. package/api/roles-api.ts +0 -4
  12. package/api/settings-api.ts +0 -4
  13. package/api/users-api.ts +0 -4
  14. package/api.ts +4 -4
  15. package/base.ts +59 -93
  16. package/common.ts +0 -1
  17. package/configuration.ts +0 -8
  18. package/dist/api/custom-schema-api.js +4 -8
  19. package/dist/api/data-report-api.d.ts +380 -0
  20. package/dist/api/data-report-api.js +632 -0
  21. package/dist/api/data-report-executor-api.d.ts +93 -0
  22. package/dist/api/data-report-executor-api.js +220 -0
  23. package/dist/api/invite-organizations-api.js +1 -5
  24. package/dist/api/invite-users-api.js +5 -9
  25. package/dist/api/list-organization-invitations-api.js +1 -5
  26. package/dist/api/organizations-api.js +3 -7
  27. package/dist/api/re-invite-an-organization-api.js +1 -5
  28. package/dist/api/roles-api.js +1 -5
  29. package/dist/api/settings-api.js +1 -5
  30. package/dist/api/users-api.js +9 -13
  31. package/dist/api.d.ts +2 -0
  32. package/dist/api.js +2 -0
  33. package/dist/base.d.ts +5 -9
  34. package/dist/base.js +40 -136
  35. package/dist/common.d.ts +0 -1
  36. package/dist/common.js +1 -2
  37. package/dist/configuration.d.ts +0 -7
  38. package/dist/models/create-data-report-request-dto.d.ts +61 -0
  39. package/dist/models/create-data-report-request-dto.js +15 -0
  40. package/dist/models/create-data-report-response-class.d.ts +25 -0
  41. package/dist/models/create-data-report-response-class.js +15 -0
  42. package/dist/models/data-report-class.d.ts +79 -0
  43. package/dist/models/data-report-class.js +15 -0
  44. package/dist/models/data-report-filter-class.d.ts +72 -0
  45. package/dist/models/data-report-filter-class.js +15 -0
  46. package/dist/models/data-report-filter-dto.d.ts +48 -0
  47. package/dist/models/data-report-filter-dto.js +15 -0
  48. package/dist/models/data-report-filter-single-value-dto.d.ts +42 -0
  49. package/dist/models/data-report-filter-single-value-dto.js +15 -0
  50. package/dist/models/data-report-filter-value-dto.d.ts +31 -0
  51. package/dist/models/data-report-filter-value-dto.js +15 -0
  52. package/dist/models/get-data-report-response-class.d.ts +25 -0
  53. package/dist/models/get-data-report-response-class.js +15 -0
  54. package/dist/models/index.d.ts +13 -0
  55. package/dist/models/index.js +13 -0
  56. package/dist/models/list-data-reports-response-class.d.ts +31 -0
  57. package/dist/models/list-data-reports-response-class.js +15 -0
  58. package/dist/models/run-data-report-request-dto.d.ts +31 -0
  59. package/dist/models/run-data-report-request-dto.js +15 -0
  60. package/dist/models/run-data-report-response-class.d.ts +24 -0
  61. package/dist/models/run-data-report-response-class.js +15 -0
  62. package/dist/models/update-data-report-request-dto.d.ts +61 -0
  63. package/dist/models/update-data-report-request-dto.js +15 -0
  64. package/dist/models/update-data-report-response-class.d.ts +25 -0
  65. package/dist/models/update-data-report-response-class.js +15 -0
  66. package/models/create-data-report-request-dto.ts +67 -0
  67. package/models/create-data-report-response-class.ts +31 -0
  68. package/models/data-report-class.ts +85 -0
  69. package/models/data-report-filter-class.ts +78 -0
  70. package/models/data-report-filter-dto.ts +54 -0
  71. package/models/data-report-filter-single-value-dto.ts +48 -0
  72. package/models/data-report-filter-value-dto.ts +37 -0
  73. package/models/get-data-report-response-class.ts +31 -0
  74. package/models/index.ts +13 -0
  75. package/models/list-data-reports-response-class.ts +37 -0
  76. package/models/run-data-report-request-dto.ts +37 -0
  77. package/models/run-data-report-response-class.ts +30 -0
  78. package/models/update-data-report-request-dto.ts +67 -0
  79. package/models/update-data-report-response-class.ts +31 -0
  80. package/package.json +3 -5
@@ -0,0 +1,632 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL Tenant Service
6
+ * The EMIL TenantService 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.DataReportApi = exports.DataReportApiFactory = exports.DataReportApiFp = exports.DataReportApiAxiosParamCreator = void 0;
82
+ var axios_1 = __importDefault(require("axios"));
83
+ // Some imports not used depending on template conditions
84
+ // @ts-ignore
85
+ var common_1 = require("../common");
86
+ // @ts-ignore
87
+ var base_1 = require("../base");
88
+ /**
89
+ * DataReportApi - axios parameter creator
90
+ * @export
91
+ */
92
+ var DataReportApiAxiosParamCreator = function (configuration) {
93
+ var _this = this;
94
+ return {
95
+ /**
96
+ * This will create a data report for tenant in the database
97
+ * @summary Create the data-report
98
+ * @param {CreateDataReportRequestDto} createDataReportRequestDto
99
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
100
+ * @param {*} [options] Override http request option.
101
+ * @throws {RequiredError}
102
+ */
103
+ createCustomSchema: function (createDataReportRequestDto, authorization, options) {
104
+ if (options === void 0) { options = {}; }
105
+ return __awaiter(_this, void 0, void 0, function () {
106
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
107
+ return __generator(this, function (_a) {
108
+ switch (_a.label) {
109
+ case 0:
110
+ // verify required parameter 'createDataReportRequestDto' is not null or undefined
111
+ (0, common_1.assertParamExists)('createCustomSchema', 'createDataReportRequestDto', createDataReportRequestDto);
112
+ localVarPath = "/tenantservice/v1/data-reports";
113
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
114
+ if (configuration) {
115
+ baseOptions = configuration.baseOptions;
116
+ baseAccessToken = configuration.accessToken;
117
+ }
118
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
119
+ localVarHeaderParameter = {};
120
+ localVarQueryParameter = {};
121
+ // authentication bearer required
122
+ // http bearer authentication required
123
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
124
+ case 1:
125
+ // authentication bearer required
126
+ // http bearer authentication required
127
+ _a.sent();
128
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
129
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
130
+ }
131
+ localVarHeaderParameter['Content-Type'] = 'application/json';
132
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
133
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
134
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
135
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createDataReportRequestDto, localVarRequestOptions, configuration);
136
+ return [2 /*return*/, {
137
+ url: (0, common_1.toPathString)(localVarUrlObj),
138
+ options: localVarRequestOptions,
139
+ }];
140
+ }
141
+ });
142
+ });
143
+ },
144
+ /**
145
+ *
146
+ * @param {string} id
147
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
148
+ * @param {*} [options] Override http request option.
149
+ * @throws {RequiredError}
150
+ */
151
+ deleteAlert: function (id, authorization, options) {
152
+ if (options === void 0) { options = {}; }
153
+ return __awaiter(_this, void 0, void 0, function () {
154
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
155
+ return __generator(this, function (_a) {
156
+ switch (_a.label) {
157
+ case 0:
158
+ // verify required parameter 'id' is not null or undefined
159
+ (0, common_1.assertParamExists)('deleteAlert', 'id', id);
160
+ localVarPath = "/tenantservice/v1/data-reports/{id}"
161
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
162
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
163
+ if (configuration) {
164
+ baseOptions = configuration.baseOptions;
165
+ baseAccessToken = configuration.accessToken;
166
+ }
167
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
168
+ localVarHeaderParameter = {};
169
+ localVarQueryParameter = {};
170
+ // authentication bearer required
171
+ // http bearer authentication required
172
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
173
+ case 1:
174
+ // authentication bearer required
175
+ // http bearer authentication required
176
+ _a.sent();
177
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
178
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
179
+ }
180
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
181
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
182
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
183
+ return [2 /*return*/, {
184
+ url: (0, common_1.toPathString)(localVarUrlObj),
185
+ options: localVarRequestOptions,
186
+ }];
187
+ }
188
+ });
189
+ });
190
+ },
191
+ /**
192
+ * Retrieves the details of the data-report that was previously created. Supply the unique data-report code that was returned when you created it and Emil Api will return the corresponding data-report information.
193
+ * @summary Retrieve the data-report
194
+ * @param {string} code Unique identifier for the object.
195
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
196
+ * @param {string} [expand] Fields to expand response by
197
+ * @param {*} [options] Override http request option.
198
+ * @throws {RequiredError}
199
+ */
200
+ getDataReport: function (code, authorization, expand, options) {
201
+ if (options === void 0) { options = {}; }
202
+ return __awaiter(_this, void 0, void 0, function () {
203
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
204
+ return __generator(this, function (_a) {
205
+ switch (_a.label) {
206
+ case 0:
207
+ // verify required parameter 'code' is not null or undefined
208
+ (0, common_1.assertParamExists)('getDataReport', 'code', code);
209
+ localVarPath = "/tenantservice/v1/data-reports/{code}"
210
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
211
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
212
+ if (configuration) {
213
+ baseOptions = configuration.baseOptions;
214
+ baseAccessToken = configuration.accessToken;
215
+ }
216
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
217
+ localVarHeaderParameter = {};
218
+ localVarQueryParameter = {};
219
+ // authentication bearer required
220
+ // http bearer authentication required
221
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
222
+ case 1:
223
+ // authentication bearer required
224
+ // http bearer authentication required
225
+ _a.sent();
226
+ if (expand !== undefined) {
227
+ localVarQueryParameter['expand'] = expand;
228
+ }
229
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
230
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
231
+ }
232
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
233
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
234
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
235
+ return [2 /*return*/, {
236
+ url: (0, common_1.toPathString)(localVarUrlObj),
237
+ options: localVarRequestOptions,
238
+ }];
239
+ }
240
+ });
241
+ });
242
+ },
243
+ /**
244
+ * Returns a list of data-reports you have previously created. The data-reports are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
245
+ * @summary List data-reports
246
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
247
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
248
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
249
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
250
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
251
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
252
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
253
+ * @param {*} [options] Override http request option.
254
+ * @throws {RequiredError}
255
+ */
256
+ listDataReports: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
257
+ if (options === void 0) { options = {}; }
258
+ return __awaiter(_this, void 0, void 0, function () {
259
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
260
+ return __generator(this, function (_a) {
261
+ switch (_a.label) {
262
+ case 0:
263
+ localVarPath = "/tenantservice/v1/data-reports";
264
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
265
+ if (configuration) {
266
+ baseOptions = configuration.baseOptions;
267
+ baseAccessToken = configuration.accessToken;
268
+ }
269
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
270
+ localVarHeaderParameter = {};
271
+ localVarQueryParameter = {};
272
+ // authentication bearer required
273
+ // http bearer authentication required
274
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
275
+ case 1:
276
+ // authentication bearer required
277
+ // http bearer authentication required
278
+ _a.sent();
279
+ if (pageSize !== undefined) {
280
+ localVarQueryParameter['pageSize'] = pageSize;
281
+ }
282
+ if (pageToken !== undefined) {
283
+ localVarQueryParameter['pageToken'] = pageToken;
284
+ }
285
+ if (filter !== undefined) {
286
+ localVarQueryParameter['filter'] = filter;
287
+ }
288
+ if (search !== undefined) {
289
+ localVarQueryParameter['search'] = search;
290
+ }
291
+ if (order !== undefined) {
292
+ localVarQueryParameter['order'] = order;
293
+ }
294
+ if (expand !== undefined) {
295
+ localVarQueryParameter['expand'] = expand;
296
+ }
297
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
298
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
299
+ }
300
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
301
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
302
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
303
+ return [2 /*return*/, {
304
+ url: (0, common_1.toPathString)(localVarUrlObj),
305
+ options: localVarRequestOptions,
306
+ }];
307
+ }
308
+ });
309
+ });
310
+ },
311
+ /**
312
+ * Updates the specified data-report by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
313
+ * @summary Update the data-report
314
+ * @param {string} code
315
+ * @param {UpdateDataReportRequestDto} updateDataReportRequestDto
316
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
317
+ * @param {*} [options] Override http request option.
318
+ * @throws {RequiredError}
319
+ */
320
+ updateDataReport: function (code, updateDataReportRequestDto, authorization, options) {
321
+ if (options === void 0) { options = {}; }
322
+ return __awaiter(_this, void 0, void 0, function () {
323
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
324
+ return __generator(this, function (_a) {
325
+ switch (_a.label) {
326
+ case 0:
327
+ // verify required parameter 'code' is not null or undefined
328
+ (0, common_1.assertParamExists)('updateDataReport', 'code', code);
329
+ // verify required parameter 'updateDataReportRequestDto' is not null or undefined
330
+ (0, common_1.assertParamExists)('updateDataReport', 'updateDataReportRequestDto', updateDataReportRequestDto);
331
+ localVarPath = "/tenantservice/v1/data-reports/{code}"
332
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
333
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
334
+ if (configuration) {
335
+ baseOptions = configuration.baseOptions;
336
+ baseAccessToken = configuration.accessToken;
337
+ }
338
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
339
+ localVarHeaderParameter = {};
340
+ localVarQueryParameter = {};
341
+ // authentication bearer required
342
+ // http bearer authentication required
343
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
344
+ case 1:
345
+ // authentication bearer required
346
+ // http bearer authentication required
347
+ _a.sent();
348
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
349
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
350
+ }
351
+ localVarHeaderParameter['Content-Type'] = 'application/json';
352
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
353
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
354
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
355
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateDataReportRequestDto, localVarRequestOptions, configuration);
356
+ return [2 /*return*/, {
357
+ url: (0, common_1.toPathString)(localVarUrlObj),
358
+ options: localVarRequestOptions,
359
+ }];
360
+ }
361
+ });
362
+ });
363
+ },
364
+ };
365
+ };
366
+ exports.DataReportApiAxiosParamCreator = DataReportApiAxiosParamCreator;
367
+ /**
368
+ * DataReportApi - functional programming interface
369
+ * @export
370
+ */
371
+ var DataReportApiFp = function (configuration) {
372
+ var localVarAxiosParamCreator = (0, exports.DataReportApiAxiosParamCreator)(configuration);
373
+ return {
374
+ /**
375
+ * This will create a data report for tenant in the database
376
+ * @summary Create the data-report
377
+ * @param {CreateDataReportRequestDto} createDataReportRequestDto
378
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
379
+ * @param {*} [options] Override http request option.
380
+ * @throws {RequiredError}
381
+ */
382
+ createCustomSchema: function (createDataReportRequestDto, authorization, options) {
383
+ return __awaiter(this, void 0, void 0, function () {
384
+ var localVarAxiosArgs;
385
+ return __generator(this, function (_a) {
386
+ switch (_a.label) {
387
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createCustomSchema(createDataReportRequestDto, authorization, options)];
388
+ case 1:
389
+ localVarAxiosArgs = _a.sent();
390
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
391
+ }
392
+ });
393
+ });
394
+ },
395
+ /**
396
+ *
397
+ * @param {string} id
398
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
399
+ * @param {*} [options] Override http request option.
400
+ * @throws {RequiredError}
401
+ */
402
+ deleteAlert: function (id, authorization, options) {
403
+ return __awaiter(this, void 0, void 0, function () {
404
+ var localVarAxiosArgs;
405
+ return __generator(this, function (_a) {
406
+ switch (_a.label) {
407
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteAlert(id, authorization, options)];
408
+ case 1:
409
+ localVarAxiosArgs = _a.sent();
410
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
411
+ }
412
+ });
413
+ });
414
+ },
415
+ /**
416
+ * Retrieves the details of the data-report that was previously created. Supply the unique data-report code that was returned when you created it and Emil Api will return the corresponding data-report information.
417
+ * @summary Retrieve the data-report
418
+ * @param {string} code Unique identifier for the object.
419
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
420
+ * @param {string} [expand] Fields to expand response by
421
+ * @param {*} [options] Override http request option.
422
+ * @throws {RequiredError}
423
+ */
424
+ getDataReport: function (code, authorization, expand, options) {
425
+ return __awaiter(this, void 0, void 0, function () {
426
+ var localVarAxiosArgs;
427
+ return __generator(this, function (_a) {
428
+ switch (_a.label) {
429
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getDataReport(code, authorization, expand, options)];
430
+ case 1:
431
+ localVarAxiosArgs = _a.sent();
432
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
433
+ }
434
+ });
435
+ });
436
+ },
437
+ /**
438
+ * Returns a list of data-reports you have previously created. The data-reports are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
439
+ * @summary List data-reports
440
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
441
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
442
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
443
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
444
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
445
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
446
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
447
+ * @param {*} [options] Override http request option.
448
+ * @throws {RequiredError}
449
+ */
450
+ listDataReports: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
451
+ return __awaiter(this, void 0, void 0, function () {
452
+ var localVarAxiosArgs;
453
+ return __generator(this, function (_a) {
454
+ switch (_a.label) {
455
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listDataReports(authorization, pageSize, pageToken, filter, search, order, expand, options)];
456
+ case 1:
457
+ localVarAxiosArgs = _a.sent();
458
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
459
+ }
460
+ });
461
+ });
462
+ },
463
+ /**
464
+ * Updates the specified data-report by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
465
+ * @summary Update the data-report
466
+ * @param {string} code
467
+ * @param {UpdateDataReportRequestDto} updateDataReportRequestDto
468
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
469
+ * @param {*} [options] Override http request option.
470
+ * @throws {RequiredError}
471
+ */
472
+ updateDataReport: function (code, updateDataReportRequestDto, authorization, options) {
473
+ return __awaiter(this, void 0, void 0, function () {
474
+ var localVarAxiosArgs;
475
+ return __generator(this, function (_a) {
476
+ switch (_a.label) {
477
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateDataReport(code, updateDataReportRequestDto, authorization, options)];
478
+ case 1:
479
+ localVarAxiosArgs = _a.sent();
480
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
481
+ }
482
+ });
483
+ });
484
+ },
485
+ };
486
+ };
487
+ exports.DataReportApiFp = DataReportApiFp;
488
+ /**
489
+ * DataReportApi - factory interface
490
+ * @export
491
+ */
492
+ var DataReportApiFactory = function (configuration, basePath, axios) {
493
+ var localVarFp = (0, exports.DataReportApiFp)(configuration);
494
+ return {
495
+ /**
496
+ * This will create a data report for tenant in the database
497
+ * @summary Create the data-report
498
+ * @param {CreateDataReportRequestDto} createDataReportRequestDto
499
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
500
+ * @param {*} [options] Override http request option.
501
+ * @throws {RequiredError}
502
+ */
503
+ createCustomSchema: function (createDataReportRequestDto, authorization, options) {
504
+ return localVarFp.createCustomSchema(createDataReportRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
505
+ },
506
+ /**
507
+ *
508
+ * @param {string} id
509
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
510
+ * @param {*} [options] Override http request option.
511
+ * @throws {RequiredError}
512
+ */
513
+ deleteAlert: function (id, authorization, options) {
514
+ return localVarFp.deleteAlert(id, authorization, options).then(function (request) { return request(axios, basePath); });
515
+ },
516
+ /**
517
+ * Retrieves the details of the data-report that was previously created. Supply the unique data-report code that was returned when you created it and Emil Api will return the corresponding data-report information.
518
+ * @summary Retrieve the data-report
519
+ * @param {string} code Unique identifier for the object.
520
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
521
+ * @param {string} [expand] Fields to expand response by
522
+ * @param {*} [options] Override http request option.
523
+ * @throws {RequiredError}
524
+ */
525
+ getDataReport: function (code, authorization, expand, options) {
526
+ return localVarFp.getDataReport(code, authorization, expand, options).then(function (request) { return request(axios, basePath); });
527
+ },
528
+ /**
529
+ * Returns a list of data-reports you have previously created. The data-reports are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
530
+ * @summary List data-reports
531
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
532
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
533
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
534
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
535
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
536
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
537
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
538
+ * @param {*} [options] Override http request option.
539
+ * @throws {RequiredError}
540
+ */
541
+ listDataReports: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
542
+ return localVarFp.listDataReports(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
543
+ },
544
+ /**
545
+ * Updates the specified data-report by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
546
+ * @summary Update the data-report
547
+ * @param {string} code
548
+ * @param {UpdateDataReportRequestDto} updateDataReportRequestDto
549
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
550
+ * @param {*} [options] Override http request option.
551
+ * @throws {RequiredError}
552
+ */
553
+ updateDataReport: function (code, updateDataReportRequestDto, authorization, options) {
554
+ return localVarFp.updateDataReport(code, updateDataReportRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
555
+ },
556
+ };
557
+ };
558
+ exports.DataReportApiFactory = DataReportApiFactory;
559
+ /**
560
+ * DataReportApi - object-oriented interface
561
+ * @export
562
+ * @class DataReportApi
563
+ * @extends {BaseAPI}
564
+ */
565
+ var DataReportApi = /** @class */ (function (_super) {
566
+ __extends(DataReportApi, _super);
567
+ function DataReportApi() {
568
+ return _super !== null && _super.apply(this, arguments) || this;
569
+ }
570
+ /**
571
+ * This will create a data report for tenant in the database
572
+ * @summary Create the data-report
573
+ * @param {DataReportApiCreateCustomSchemaRequest} requestParameters Request parameters.
574
+ * @param {*} [options] Override http request option.
575
+ * @throws {RequiredError}
576
+ * @memberof DataReportApi
577
+ */
578
+ DataReportApi.prototype.createCustomSchema = function (requestParameters, options) {
579
+ var _this = this;
580
+ return (0, exports.DataReportApiFp)(this.configuration).createCustomSchema(requestParameters.createDataReportRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
581
+ };
582
+ /**
583
+ *
584
+ * @param {DataReportApiDeleteAlertRequest} requestParameters Request parameters.
585
+ * @param {*} [options] Override http request option.
586
+ * @throws {RequiredError}
587
+ * @memberof DataReportApi
588
+ */
589
+ DataReportApi.prototype.deleteAlert = function (requestParameters, options) {
590
+ var _this = this;
591
+ return (0, exports.DataReportApiFp)(this.configuration).deleteAlert(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
592
+ };
593
+ /**
594
+ * Retrieves the details of the data-report that was previously created. Supply the unique data-report code that was returned when you created it and Emil Api will return the corresponding data-report information.
595
+ * @summary Retrieve the data-report
596
+ * @param {DataReportApiGetDataReportRequest} requestParameters Request parameters.
597
+ * @param {*} [options] Override http request option.
598
+ * @throws {RequiredError}
599
+ * @memberof DataReportApi
600
+ */
601
+ DataReportApi.prototype.getDataReport = function (requestParameters, options) {
602
+ var _this = this;
603
+ return (0, exports.DataReportApiFp)(this.configuration).getDataReport(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
604
+ };
605
+ /**
606
+ * Returns a list of data-reports you have previously created. The data-reports are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
607
+ * @summary List data-reports
608
+ * @param {DataReportApiListDataReportsRequest} requestParameters Request parameters.
609
+ * @param {*} [options] Override http request option.
610
+ * @throws {RequiredError}
611
+ * @memberof DataReportApi
612
+ */
613
+ DataReportApi.prototype.listDataReports = function (requestParameters, options) {
614
+ var _this = this;
615
+ if (requestParameters === void 0) { requestParameters = {}; }
616
+ return (0, exports.DataReportApiFp)(this.configuration).listDataReports(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
617
+ };
618
+ /**
619
+ * Updates the specified data-report by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
620
+ * @summary Update the data-report
621
+ * @param {DataReportApiUpdateDataReportRequest} requestParameters Request parameters.
622
+ * @param {*} [options] Override http request option.
623
+ * @throws {RequiredError}
624
+ * @memberof DataReportApi
625
+ */
626
+ DataReportApi.prototype.updateDataReport = function (requestParameters, options) {
627
+ var _this = this;
628
+ return (0, exports.DataReportApiFp)(this.configuration).updateDataReport(requestParameters.code, requestParameters.updateDataReportRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
629
+ };
630
+ return DataReportApi;
631
+ }(base_1.BaseAPI));
632
+ exports.DataReportApi = DataReportApi;