@emilgroup/claim-sdk-node 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,542 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL ClaimService
6
+ * The EMIL ClaimService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __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.ClaimsApi = exports.ClaimsApiFactory = exports.ClaimsApiFp = exports.ClaimsApiAxiosParamCreator = 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
+ // URLSearchParams not necessarily used
89
+ // @ts-ignore
90
+ var url_1 = require("url");
91
+ var FormData = require('form-data');
92
+ /**
93
+ * ClaimsApi - axios parameter creator
94
+ * @export
95
+ */
96
+ var ClaimsApiAxiosParamCreator = function (configuration) {
97
+ var _this = this;
98
+ return {
99
+ /**
100
+ * This will create a claim in the database
101
+ * @summary Create the claim
102
+ * @param {CreateClaimRequestDto} createClaimRequestDto
103
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
104
+ * @param {*} [options] Override http request option.
105
+ * @throws {RequiredError}
106
+ */
107
+ createClaim: function (createClaimRequestDto, authorization, options) {
108
+ if (options === void 0) { options = {}; }
109
+ return __awaiter(_this, void 0, void 0, function () {
110
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
111
+ return __generator(this, function (_a) {
112
+ switch (_a.label) {
113
+ case 0:
114
+ // verify required parameter 'createClaimRequestDto' is not null or undefined
115
+ (0, common_1.assertParamExists)('createClaim', 'createClaimRequestDto', createClaimRequestDto);
116
+ localVarPath = "/v1/claims/";
117
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
118
+ if (configuration) {
119
+ baseOptions = configuration.baseOptions;
120
+ baseAccessToken = configuration.accessToken;
121
+ }
122
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
123
+ localVarHeaderParameter = {};
124
+ localVarQueryParameter = {};
125
+ // authentication bearer required
126
+ // http bearer authentication required
127
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
128
+ case 1:
129
+ // authentication bearer required
130
+ // http bearer authentication required
131
+ _a.sent();
132
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
134
+ }
135
+ localVarHeaderParameter['Content-Type'] = 'application/json';
136
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
137
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
138
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
139
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createClaimRequestDto, localVarRequestOptions, configuration);
140
+ return [2 /*return*/, {
141
+ url: (0, common_1.toPathString)(localVarUrlObj),
142
+ options: localVarRequestOptions,
143
+ }];
144
+ }
145
+ });
146
+ });
147
+ },
148
+ /**
149
+ * This will fetch the identified claim from the database by code
150
+ * @summary Retrieve the claim
151
+ * @param {string} code
152
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
153
+ * @param {*} [options] Override http request option.
154
+ * @throws {RequiredError}
155
+ */
156
+ getClaim: function (code, authorization, options) {
157
+ if (options === void 0) { options = {}; }
158
+ return __awaiter(_this, void 0, void 0, function () {
159
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
160
+ return __generator(this, function (_a) {
161
+ switch (_a.label) {
162
+ case 0:
163
+ // verify required parameter 'code' is not null or undefined
164
+ (0, common_1.assertParamExists)('getClaim', 'code', code);
165
+ localVarPath = "/v1/claims//{code}"
166
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
167
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
168
+ if (configuration) {
169
+ baseOptions = configuration.baseOptions;
170
+ baseAccessToken = configuration.accessToken;
171
+ }
172
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
173
+ localVarHeaderParameter = {};
174
+ localVarQueryParameter = {};
175
+ // authentication bearer required
176
+ // http bearer authentication required
177
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
178
+ case 1:
179
+ // authentication bearer required
180
+ // http bearer authentication required
181
+ _a.sent();
182
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
183
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
184
+ }
185
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
186
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
187
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
188
+ return [2 /*return*/, {
189
+ url: (0, common_1.toPathString)(localVarUrlObj),
190
+ options: localVarRequestOptions,
191
+ }];
192
+ }
193
+ });
194
+ });
195
+ },
196
+ /**
197
+ * This will fetch list of claims from the database
198
+ * @summary Retrieve the claim
199
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
200
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
201
+ * @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.
202
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
203
+ * @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.
204
+ * @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.
205
+ * @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.
206
+ * @param {*} [options] Override http request option.
207
+ * @throws {RequiredError}
208
+ */
209
+ listClaims: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
210
+ if (options === void 0) { options = {}; }
211
+ return __awaiter(_this, void 0, void 0, function () {
212
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
213
+ return __generator(this, function (_a) {
214
+ switch (_a.label) {
215
+ case 0:
216
+ localVarPath = "/v1/claims/";
217
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
218
+ if (configuration) {
219
+ baseOptions = configuration.baseOptions;
220
+ baseAccessToken = configuration.accessToken;
221
+ }
222
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
223
+ localVarHeaderParameter = {};
224
+ localVarQueryParameter = {};
225
+ // authentication bearer required
226
+ // http bearer authentication required
227
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
228
+ case 1:
229
+ // authentication bearer required
230
+ // http bearer authentication required
231
+ _a.sent();
232
+ if (pageSize !== undefined) {
233
+ localVarQueryParameter['pageSize'] = pageSize;
234
+ }
235
+ if (pageToken !== undefined) {
236
+ localVarQueryParameter['pageToken'] = pageToken;
237
+ }
238
+ if (filter !== undefined) {
239
+ localVarQueryParameter['filter'] = filter;
240
+ }
241
+ if (search !== undefined) {
242
+ localVarQueryParameter['search'] = search;
243
+ }
244
+ if (order !== undefined) {
245
+ localVarQueryParameter['order'] = order;
246
+ }
247
+ if (expand !== undefined) {
248
+ localVarQueryParameter['expand'] = expand;
249
+ }
250
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
251
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
252
+ }
253
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
254
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
255
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
256
+ return [2 /*return*/, {
257
+ url: (0, common_1.toPathString)(localVarUrlObj),
258
+ options: localVarRequestOptions,
259
+ }];
260
+ }
261
+ });
262
+ });
263
+ },
264
+ /**
265
+ * This will update the identified claim in the database
266
+ * @summary Update the claim
267
+ * @param {string} code
268
+ * @param {UpdateClaimRequestDto} updateClaimRequestDto
269
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
270
+ * @param {*} [options] Override http request option.
271
+ * @throws {RequiredError}
272
+ */
273
+ updateClaim: function (code, updateClaimRequestDto, authorization, options) {
274
+ if (options === void 0) { options = {}; }
275
+ return __awaiter(_this, void 0, void 0, function () {
276
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
277
+ return __generator(this, function (_a) {
278
+ switch (_a.label) {
279
+ case 0:
280
+ // verify required parameter 'code' is not null or undefined
281
+ (0, common_1.assertParamExists)('updateClaim', 'code', code);
282
+ // verify required parameter 'updateClaimRequestDto' is not null or undefined
283
+ (0, common_1.assertParamExists)('updateClaim', 'updateClaimRequestDto', updateClaimRequestDto);
284
+ localVarPath = "/v1/claims//{code}"
285
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
286
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
287
+ if (configuration) {
288
+ baseOptions = configuration.baseOptions;
289
+ baseAccessToken = configuration.accessToken;
290
+ }
291
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
292
+ localVarHeaderParameter = {};
293
+ localVarQueryParameter = {};
294
+ // authentication bearer required
295
+ // http bearer authentication required
296
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
297
+ case 1:
298
+ // authentication bearer required
299
+ // http bearer authentication required
300
+ _a.sent();
301
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
302
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
303
+ }
304
+ localVarHeaderParameter['Content-Type'] = 'application/json';
305
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
306
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
307
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
308
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateClaimRequestDto, localVarRequestOptions, configuration);
309
+ return [2 /*return*/, {
310
+ url: (0, common_1.toPathString)(localVarUrlObj),
311
+ options: localVarRequestOptions,
312
+ }];
313
+ }
314
+ });
315
+ });
316
+ },
317
+ };
318
+ };
319
+ exports.ClaimsApiAxiosParamCreator = ClaimsApiAxiosParamCreator;
320
+ /**
321
+ * ClaimsApi - functional programming interface
322
+ * @export
323
+ */
324
+ var ClaimsApiFp = function (configuration) {
325
+ var localVarAxiosParamCreator = (0, exports.ClaimsApiAxiosParamCreator)(configuration);
326
+ return {
327
+ /**
328
+ * This will create a claim in the database
329
+ * @summary Create the claim
330
+ * @param {CreateClaimRequestDto} createClaimRequestDto
331
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
332
+ * @param {*} [options] Override http request option.
333
+ * @throws {RequiredError}
334
+ */
335
+ createClaim: function (createClaimRequestDto, authorization, options) {
336
+ return __awaiter(this, void 0, void 0, function () {
337
+ var localVarAxiosArgs;
338
+ return __generator(this, function (_a) {
339
+ switch (_a.label) {
340
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createClaim(createClaimRequestDto, authorization, options)];
341
+ case 1:
342
+ localVarAxiosArgs = _a.sent();
343
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
344
+ }
345
+ });
346
+ });
347
+ },
348
+ /**
349
+ * This will fetch the identified claim from the database by code
350
+ * @summary Retrieve the claim
351
+ * @param {string} code
352
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
353
+ * @param {*} [options] Override http request option.
354
+ * @throws {RequiredError}
355
+ */
356
+ getClaim: function (code, authorization, options) {
357
+ return __awaiter(this, void 0, void 0, function () {
358
+ var localVarAxiosArgs;
359
+ return __generator(this, function (_a) {
360
+ switch (_a.label) {
361
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getClaim(code, authorization, options)];
362
+ case 1:
363
+ localVarAxiosArgs = _a.sent();
364
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
365
+ }
366
+ });
367
+ });
368
+ },
369
+ /**
370
+ * This will fetch list of claims from the database
371
+ * @summary Retrieve the claim
372
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
373
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
374
+ * @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.
375
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
376
+ * @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.
377
+ * @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.
378
+ * @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.
379
+ * @param {*} [options] Override http request option.
380
+ * @throws {RequiredError}
381
+ */
382
+ listClaims: function (authorization, pageSize, pageToken, filter, search, order, expand, 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.listClaims(authorization, pageSize, pageToken, filter, search, order, expand, 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
+ * This will update the identified claim in the database
397
+ * @summary Update the claim
398
+ * @param {string} code
399
+ * @param {UpdateClaimRequestDto} updateClaimRequestDto
400
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
401
+ * @param {*} [options] Override http request option.
402
+ * @throws {RequiredError}
403
+ */
404
+ updateClaim: function (code, updateClaimRequestDto, authorization, options) {
405
+ return __awaiter(this, void 0, void 0, function () {
406
+ var localVarAxiosArgs;
407
+ return __generator(this, function (_a) {
408
+ switch (_a.label) {
409
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateClaim(code, updateClaimRequestDto, authorization, options)];
410
+ case 1:
411
+ localVarAxiosArgs = _a.sent();
412
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
413
+ }
414
+ });
415
+ });
416
+ },
417
+ };
418
+ };
419
+ exports.ClaimsApiFp = ClaimsApiFp;
420
+ /**
421
+ * ClaimsApi - factory interface
422
+ * @export
423
+ */
424
+ var ClaimsApiFactory = function (configuration, basePath, axios) {
425
+ var localVarFp = (0, exports.ClaimsApiFp)(configuration);
426
+ return {
427
+ /**
428
+ * This will create a claim in the database
429
+ * @summary Create the claim
430
+ * @param {CreateClaimRequestDto} createClaimRequestDto
431
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
432
+ * @param {*} [options] Override http request option.
433
+ * @throws {RequiredError}
434
+ */
435
+ createClaim: function (createClaimRequestDto, authorization, options) {
436
+ return localVarFp.createClaim(createClaimRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
437
+ },
438
+ /**
439
+ * This will fetch the identified claim from the database by code
440
+ * @summary Retrieve the claim
441
+ * @param {string} code
442
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
443
+ * @param {*} [options] Override http request option.
444
+ * @throws {RequiredError}
445
+ */
446
+ getClaim: function (code, authorization, options) {
447
+ return localVarFp.getClaim(code, authorization, options).then(function (request) { return request(axios, basePath); });
448
+ },
449
+ /**
450
+ * This will fetch list of claims from the database
451
+ * @summary Retrieve the claim
452
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
453
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
454
+ * @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.
455
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
456
+ * @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.
457
+ * @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.
458
+ * @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.
459
+ * @param {*} [options] Override http request option.
460
+ * @throws {RequiredError}
461
+ */
462
+ listClaims: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
463
+ return localVarFp.listClaims(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
464
+ },
465
+ /**
466
+ * This will update the identified claim in the database
467
+ * @summary Update the claim
468
+ * @param {string} code
469
+ * @param {UpdateClaimRequestDto} updateClaimRequestDto
470
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
471
+ * @param {*} [options] Override http request option.
472
+ * @throws {RequiredError}
473
+ */
474
+ updateClaim: function (code, updateClaimRequestDto, authorization, options) {
475
+ return localVarFp.updateClaim(code, updateClaimRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
476
+ },
477
+ };
478
+ };
479
+ exports.ClaimsApiFactory = ClaimsApiFactory;
480
+ /**
481
+ * ClaimsApi - object-oriented interface
482
+ * @export
483
+ * @class ClaimsApi
484
+ * @extends {BaseAPI}
485
+ */
486
+ var ClaimsApi = /** @class */ (function (_super) {
487
+ __extends(ClaimsApi, _super);
488
+ function ClaimsApi() {
489
+ return _super !== null && _super.apply(this, arguments) || this;
490
+ }
491
+ /**
492
+ * This will create a claim in the database
493
+ * @summary Create the claim
494
+ * @param {ClaimsApiCreateClaimRequest} requestParameters Request parameters.
495
+ * @param {*} [options] Override http request option.
496
+ * @throws {RequiredError}
497
+ * @memberof ClaimsApi
498
+ */
499
+ ClaimsApi.prototype.createClaim = function (requestParameters, options) {
500
+ var _this = this;
501
+ return (0, exports.ClaimsApiFp)(this.configuration).createClaim(requestParameters.createClaimRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
502
+ };
503
+ /**
504
+ * This will fetch the identified claim from the database by code
505
+ * @summary Retrieve the claim
506
+ * @param {ClaimsApiGetClaimRequest} requestParameters Request parameters.
507
+ * @param {*} [options] Override http request option.
508
+ * @throws {RequiredError}
509
+ * @memberof ClaimsApi
510
+ */
511
+ ClaimsApi.prototype.getClaim = function (requestParameters, options) {
512
+ var _this = this;
513
+ return (0, exports.ClaimsApiFp)(this.configuration).getClaim(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
514
+ };
515
+ /**
516
+ * This will fetch list of claims from the database
517
+ * @summary Retrieve the claim
518
+ * @param {ClaimsApiListClaimsRequest} requestParameters Request parameters.
519
+ * @param {*} [options] Override http request option.
520
+ * @throws {RequiredError}
521
+ * @memberof ClaimsApi
522
+ */
523
+ ClaimsApi.prototype.listClaims = function (requestParameters, options) {
524
+ var _this = this;
525
+ if (requestParameters === void 0) { requestParameters = {}; }
526
+ return (0, exports.ClaimsApiFp)(this.configuration).listClaims(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
527
+ };
528
+ /**
529
+ * This will update the identified claim in the database
530
+ * @summary Update the claim
531
+ * @param {ClaimsApiUpdateClaimRequest} requestParameters Request parameters.
532
+ * @param {*} [options] Override http request option.
533
+ * @throws {RequiredError}
534
+ * @memberof ClaimsApi
535
+ */
536
+ ClaimsApi.prototype.updateClaim = function (requestParameters, options) {
537
+ var _this = this;
538
+ return (0, exports.ClaimsApiFp)(this.configuration).updateClaim(requestParameters.code, requestParameters.updateClaimRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
539
+ };
540
+ return ClaimsApi;
541
+ }(base_1.BaseAPI));
542
+ exports.ClaimsApi = ClaimsApi;
package/dist/api.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ /**
2
+ * EMIL ClaimService
3
+ * The EMIL ClaimService API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ export * from './api/claims-api';
package/dist/api.js ADDED
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL ClaimService
6
+ * The EMIL ClaimService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __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/claims-api"), exports);
package/dist/base.d.ts ADDED
@@ -0,0 +1,77 @@
1
+ /**
2
+ * EMIL ClaimService
3
+ * The EMIL ClaimService API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { 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: Array<string>;
28
+ }
29
+ export declare enum Environment {
30
+ Production = "https://apiv2.emil.de",
31
+ Test = "https://apiv2-test.emil.de",
32
+ Development = "https://apiv2-dev.emil.de"
33
+ }
34
+ export declare function resetRetry(): void;
35
+ /**
36
+ *
37
+ * @export
38
+ * @interface RequestArgs
39
+ */
40
+ export interface RequestArgs {
41
+ url: string;
42
+ options: AxiosRequestConfig;
43
+ }
44
+ /**
45
+ *
46
+ * @export
47
+ * @class BaseAPI
48
+ */
49
+ export declare class BaseAPI {
50
+ protected basePath: string;
51
+ protected axios: AxiosInstance;
52
+ protected configuration: Configuration;
53
+ private username?;
54
+ private password?;
55
+ constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
56
+ initialize(env?: Environment): Promise<void>;
57
+ private loadCredentials;
58
+ private readConfigFile;
59
+ private readEnvVariables;
60
+ selectEnvironment(env: Environment): void;
61
+ authorize(username: string, password: string): Promise<void>;
62
+ refreshTokenInternal(): Promise<string>;
63
+ private extractRefreshToken;
64
+ getConfiguration(): Configuration;
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
+ }