@emilgroup/account-sdk 1.6.0 → 1.8.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.
Files changed (62) hide show
  1. package/.openapi-generator/FILES +4 -2
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +2 -2
  4. package/api/accounts-api.ts +36 -34
  5. package/api/default-api.ts +120 -0
  6. package/api.ts +3 -1
  7. package/base.ts +1 -1
  8. package/common.ts +2 -2
  9. package/configuration.ts +1 -1
  10. package/dist/api/accounts-api.d.ts +37 -37
  11. package/dist/api/accounts-api.js +68 -60
  12. package/dist/api/default-api.d.ts +66 -0
  13. package/dist/api/default-api.js +196 -0
  14. package/dist/api.d.ts +2 -1
  15. package/dist/api.js +17 -5
  16. package/dist/base.d.ts +1 -1
  17. package/dist/base.js +14 -11
  18. package/dist/common.d.ts +2 -2
  19. package/dist/common.js +24 -13
  20. package/dist/configuration.d.ts +1 -1
  21. package/dist/configuration.js +2 -1
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.js +21 -9
  24. package/dist/models/account-class.d.ts +10 -10
  25. package/dist/models/account-class.js +2 -1
  26. package/dist/models/create-account-request-dto.d.ts +31 -31
  27. package/dist/models/create-account-request-dto.js +2 -1
  28. package/dist/models/create-account-response-class.d.ts +1 -1
  29. package/dist/models/create-account-response-class.js +1 -1
  30. package/dist/models/get-account-response-class.d.ts +1 -1
  31. package/dist/models/get-account-response-class.js +1 -1
  32. package/dist/models/index.d.ts +2 -2
  33. package/dist/models/index.js +24 -6
  34. package/dist/models/inline-response200.d.ts +54 -0
  35. package/dist/models/{delete-request-dto.js → inline-response200.js} +1 -1
  36. package/dist/models/inline-response503.d.ts +54 -0
  37. package/dist/models/{register-policy-request-dto.js → inline-response503.js} +1 -1
  38. package/dist/models/list-accounts-response-class.d.ts +1 -1
  39. package/dist/models/list-accounts-response-class.js +1 -1
  40. package/dist/models/policy-class.d.ts +1 -1
  41. package/dist/models/policy-class.js +1 -1
  42. package/dist/models/update-account-request-dto.d.ts +37 -37
  43. package/dist/models/update-account-request-dto.js +2 -1
  44. package/dist/models/update-account-response-class.d.ts +1 -1
  45. package/dist/models/update-account-response-class.js +1 -1
  46. package/index.ts +1 -1
  47. package/models/account-class.ts +9 -9
  48. package/models/create-account-request-dto.ts +28 -28
  49. package/models/create-account-response-class.ts +1 -1
  50. package/models/get-account-response-class.ts +1 -1
  51. package/models/index.ts +2 -2
  52. package/models/inline-response200.ts +48 -0
  53. package/models/inline-response503.ts +48 -0
  54. package/models/list-accounts-response-class.ts +1 -1
  55. package/models/policy-class.ts +1 -1
  56. package/models/update-account-request-dto.ts +34 -34
  57. package/models/update-account-response-class.ts +1 -1
  58. package/package.json +1 -2
  59. package/dist/models/delete-request-dto.d.ts +0 -24
  60. package/dist/models/register-policy-request-dto.d.ts +0 -36
  61. package/models/delete-request-dto.ts +0 -30
  62. package/models/register-policy-request-dto.ts +0 -42
@@ -6,7 +6,7 @@
6
6
  * The EMIL AccountService API description
7
7
  *
8
8
  * The version of the OpenAPI document: 1.0
9
- *
9
+ * Contact: kontakt@emil.de
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
12
  * https://openapi-generator.tech
@@ -16,10 +16,12 @@ var __extends = (this && this.__extends) || (function () {
16
16
  var extendStatics = function (d, b) {
17
17
  extendStatics = Object.setPrototypeOf ||
18
18
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
20
  return extendStatics(d, b);
21
21
  };
22
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");
23
25
  extendStatics(d, b);
24
26
  function __() { this.constructor = d; }
25
27
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -51,7 +53,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
51
53
  function verb(n) { return function (v) { return step([n, v]); }; }
52
54
  function step(op) {
53
55
  if (f) throw new TypeError("Generator is already executing.");
54
- while (_) try {
56
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
55
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;
56
58
  if (y = 0, t) op = [op[0] & 2, t.value];
57
59
  switch (op[0]) {
@@ -76,6 +78,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
76
78
  return (mod && mod.__esModule) ? mod : { "default": mod };
77
79
  };
78
80
  Object.defineProperty(exports, "__esModule", { value: true });
81
+ exports.AccountsApi = exports.AccountsApiFactory = exports.AccountsApiFp = exports.AccountsApiAxiosParamCreator = void 0;
79
82
  var axios_1 = __importDefault(require("axios"));
80
83
  // Some imports not used depending on template conditions
81
84
  // @ts-ignore
@@ -86,7 +89,7 @@ var base_1 = require("../base");
86
89
  * AccountsApi - axios parameter creator
87
90
  * @export
88
91
  */
89
- exports.AccountsApiAxiosParamCreator = function (configuration) {
92
+ var AccountsApiAxiosParamCreator = function (configuration) {
90
93
  var _this = this;
91
94
  return {
92
95
  /**
@@ -105,7 +108,7 @@ exports.AccountsApiAxiosParamCreator = function (configuration) {
105
108
  switch (_a.label) {
106
109
  case 0:
107
110
  // verify required parameter 'createAccountRequestDto' is not null or undefined
108
- common_1.assertParamExists('createAccount', 'createAccountRequestDto', createAccountRequestDto);
111
+ (0, common_1.assertParamExists)('createAccount', 'createAccountRequestDto', createAccountRequestDto);
109
112
  localVarPath = "/accountservice/v1/accounts";
110
113
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
111
114
  if (configuration) {
@@ -117,7 +120,7 @@ exports.AccountsApiAxiosParamCreator = function (configuration) {
117
120
  localVarQueryParameter = {};
118
121
  // authentication bearer required
119
122
  // http bearer authentication required
120
- return [4 /*yield*/, common_1.setBearerAuthToObject(localVarHeaderParameter, configuration)];
123
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
121
124
  case 1:
122
125
  // authentication bearer required
123
126
  // http bearer authentication required
@@ -126,12 +129,12 @@ exports.AccountsApiAxiosParamCreator = function (configuration) {
126
129
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
127
130
  }
128
131
  localVarHeaderParameter['Content-Type'] = 'application/json';
129
- common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
132
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
130
133
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
131
134
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
132
- localVarRequestOptions.data = common_1.serializeDataIfNeeded(createAccountRequestDto, localVarRequestOptions, configuration);
135
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createAccountRequestDto, localVarRequestOptions, configuration);
133
136
  return [2 /*return*/, {
134
- url: common_1.toPathString(localVarUrlObj),
137
+ url: (0, common_1.toPathString)(localVarUrlObj),
135
138
  options: localVarRequestOptions,
136
139
  }];
137
140
  }
@@ -154,9 +157,9 @@ exports.AccountsApiAxiosParamCreator = function (configuration) {
154
157
  switch (_a.label) {
155
158
  case 0:
156
159
  // verify required parameter 'code' is not null or undefined
157
- common_1.assertParamExists('deleteAccount', 'code', code);
160
+ (0, common_1.assertParamExists)('deleteAccount', 'code', code);
158
161
  localVarPath = "/accountservice/v1/accounts/{code}"
159
- .replace("{" + "code" + "}", encodeURIComponent(String(code)));
162
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
160
163
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
161
164
  if (configuration) {
162
165
  baseOptions = configuration.baseOptions;
@@ -167,7 +170,7 @@ exports.AccountsApiAxiosParamCreator = function (configuration) {
167
170
  localVarQueryParameter = {};
168
171
  // authentication bearer required
169
172
  // http bearer authentication required
170
- return [4 /*yield*/, common_1.setBearerAuthToObject(localVarHeaderParameter, configuration)];
173
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
171
174
  case 1:
172
175
  // authentication bearer required
173
176
  // http bearer authentication required
@@ -175,11 +178,11 @@ exports.AccountsApiAxiosParamCreator = function (configuration) {
175
178
  if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
176
179
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
177
180
  }
178
- common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
181
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
179
182
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
180
183
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
181
184
  return [2 /*return*/, {
182
- url: common_1.toPathString(localVarUrlObj),
185
+ url: (0, common_1.toPathString)(localVarUrlObj),
183
186
  options: localVarRequestOptions,
184
187
  }];
185
188
  }
@@ -190,12 +193,12 @@ exports.AccountsApiAxiosParamCreator = function (configuration) {
190
193
  * Retrieves the details of the account that was previously created. Supply the unique account code that was returned when you created it and Emil Api will return the corresponding account information.
191
194
  * @summary Retrieve the account
192
195
  * @param {string} code Unique identifier for the object.
196
+ * @param {string} expand
193
197
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
194
- * @param {string} [expand] Use the expand query parameter when you need additional information. The expand query parameter increases the set of fields that appear in the response in addition to the default fields. Expanding resources reduces the number of API calls required to accomplish a task.
195
198
  * @param {*} [options] Override http request option.
196
199
  * @throws {RequiredError}
197
200
  */
198
- getAccount: function (code, authorization, expand, options) {
201
+ getAccount: function (code, expand, authorization, options) {
199
202
  if (options === void 0) { options = {}; }
200
203
  return __awaiter(_this, void 0, void 0, function () {
201
204
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
@@ -203,9 +206,11 @@ exports.AccountsApiAxiosParamCreator = function (configuration) {
203
206
  switch (_a.label) {
204
207
  case 0:
205
208
  // verify required parameter 'code' is not null or undefined
206
- common_1.assertParamExists('getAccount', 'code', code);
209
+ (0, common_1.assertParamExists)('getAccount', 'code', code);
210
+ // verify required parameter 'expand' is not null or undefined
211
+ (0, common_1.assertParamExists)('getAccount', 'expand', expand);
207
212
  localVarPath = "/accountservice/v1/accounts/{code}"
208
- .replace("{" + "code" + "}", encodeURIComponent(String(code)));
213
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
209
214
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
210
215
  if (configuration) {
211
216
  baseOptions = configuration.baseOptions;
@@ -216,7 +221,7 @@ exports.AccountsApiAxiosParamCreator = function (configuration) {
216
221
  localVarQueryParameter = {};
217
222
  // authentication bearer required
218
223
  // http bearer authentication required
219
- return [4 /*yield*/, common_1.setBearerAuthToObject(localVarHeaderParameter, configuration)];
224
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
220
225
  case 1:
221
226
  // authentication bearer required
222
227
  // http bearer authentication required
@@ -227,11 +232,11 @@ exports.AccountsApiAxiosParamCreator = function (configuration) {
227
232
  if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
228
233
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
229
234
  }
230
- common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
235
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
231
236
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
232
237
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
233
238
  return [2 /*return*/, {
234
- url: common_1.toPathString(localVarUrlObj),
239
+ url: (0, common_1.toPathString)(localVarUrlObj),
235
240
  options: localVarRequestOptions,
236
241
  }];
237
242
  }
@@ -244,10 +249,10 @@ exports.AccountsApiAxiosParamCreator = function (configuration) {
244
249
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
245
250
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
246
251
  * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
247
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
252
+ * @param {'firstName' | 'code' | 'email' | 'createdAt' | 'birthDate' | 'accountNumber' | 'title' | 'lastName' | 'gender' | 'street' | 'houseNumber' | 'zipCode' | 'city' | 'phone' | 'type' | 'companyName'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
248
253
  * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
249
- * @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.
250
- * @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.
254
+ * @param {'id' | 'firstName' | 'lastName' | 'email' | 'createdAt' | 'accountNumber'} [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.
255
+ * @param {'policies'} [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.
251
256
  * @param {*} [options] Override http request option.
252
257
  * @throws {RequiredError}
253
258
  */
@@ -269,7 +274,7 @@ exports.AccountsApiAxiosParamCreator = function (configuration) {
269
274
  localVarQueryParameter = {};
270
275
  // authentication bearer required
271
276
  // http bearer authentication required
272
- return [4 /*yield*/, common_1.setBearerAuthToObject(localVarHeaderParameter, configuration)];
277
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
273
278
  case 1:
274
279
  // authentication bearer required
275
280
  // http bearer authentication required
@@ -295,11 +300,11 @@ exports.AccountsApiAxiosParamCreator = function (configuration) {
295
300
  if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
296
301
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
297
302
  }
298
- common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
303
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
299
304
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
300
305
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
301
306
  return [2 /*return*/, {
302
- url: common_1.toPathString(localVarUrlObj),
307
+ url: (0, common_1.toPathString)(localVarUrlObj),
303
308
  options: localVarRequestOptions,
304
309
  }];
305
310
  }
@@ -323,11 +328,11 @@ exports.AccountsApiAxiosParamCreator = function (configuration) {
323
328
  switch (_a.label) {
324
329
  case 0:
325
330
  // verify required parameter 'code' is not null or undefined
326
- common_1.assertParamExists('updateAccount', 'code', code);
331
+ (0, common_1.assertParamExists)('updateAccount', 'code', code);
327
332
  // verify required parameter 'updateAccountRequestDto' is not null or undefined
328
- common_1.assertParamExists('updateAccount', 'updateAccountRequestDto', updateAccountRequestDto);
333
+ (0, common_1.assertParamExists)('updateAccount', 'updateAccountRequestDto', updateAccountRequestDto);
329
334
  localVarPath = "/accountservice/v1/accounts/{code}"
330
- .replace("{" + "code" + "}", encodeURIComponent(String(code)));
335
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
331
336
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
332
337
  if (configuration) {
333
338
  baseOptions = configuration.baseOptions;
@@ -338,7 +343,7 @@ exports.AccountsApiAxiosParamCreator = function (configuration) {
338
343
  localVarQueryParameter = {};
339
344
  // authentication bearer required
340
345
  // http bearer authentication required
341
- return [4 /*yield*/, common_1.setBearerAuthToObject(localVarHeaderParameter, configuration)];
346
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
342
347
  case 1:
343
348
  // authentication bearer required
344
349
  // http bearer authentication required
@@ -347,12 +352,12 @@ exports.AccountsApiAxiosParamCreator = function (configuration) {
347
352
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
348
353
  }
349
354
  localVarHeaderParameter['Content-Type'] = 'application/json';
350
- common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
355
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
351
356
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
352
357
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
353
- localVarRequestOptions.data = common_1.serializeDataIfNeeded(updateAccountRequestDto, localVarRequestOptions, configuration);
358
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateAccountRequestDto, localVarRequestOptions, configuration);
354
359
  return [2 /*return*/, {
355
- url: common_1.toPathString(localVarUrlObj),
360
+ url: (0, common_1.toPathString)(localVarUrlObj),
356
361
  options: localVarRequestOptions,
357
362
  }];
358
363
  }
@@ -361,12 +366,13 @@ exports.AccountsApiAxiosParamCreator = function (configuration) {
361
366
  },
362
367
  };
363
368
  };
369
+ exports.AccountsApiAxiosParamCreator = AccountsApiAxiosParamCreator;
364
370
  /**
365
371
  * AccountsApi - functional programming interface
366
372
  * @export
367
373
  */
368
- exports.AccountsApiFp = function (configuration) {
369
- var localVarAxiosParamCreator = exports.AccountsApiAxiosParamCreator(configuration);
374
+ var AccountsApiFp = function (configuration) {
375
+ var localVarAxiosParamCreator = (0, exports.AccountsApiAxiosParamCreator)(configuration);
370
376
  return {
371
377
  /**
372
378
  * This will create an account in the database. Account creation is usually part of a complex workflow that starts with lead creation. Creating directly an account without prior knowledge might result in an unusable account. Look into lead creation for more information.
@@ -384,7 +390,7 @@ exports.AccountsApiFp = function (configuration) {
384
390
  case 0: return [4 /*yield*/, localVarAxiosParamCreator.createAccount(createAccountRequestDto, authorization, options)];
385
391
  case 1:
386
392
  localVarAxiosArgs = _a.sent();
387
- return [2 /*return*/, common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
393
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
388
394
  }
389
395
  });
390
396
  });
@@ -405,7 +411,7 @@ exports.AccountsApiFp = function (configuration) {
405
411
  case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteAccount(code, authorization, options)];
406
412
  case 1:
407
413
  localVarAxiosArgs = _a.sent();
408
- return [2 /*return*/, common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
414
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
409
415
  }
410
416
  });
411
417
  });
@@ -414,20 +420,20 @@ exports.AccountsApiFp = function (configuration) {
414
420
  * Retrieves the details of the account that was previously created. Supply the unique account code that was returned when you created it and Emil Api will return the corresponding account information.
415
421
  * @summary Retrieve the account
416
422
  * @param {string} code Unique identifier for the object.
423
+ * @param {string} expand
417
424
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
418
- * @param {string} [expand] Use the expand query parameter when you need additional information. The expand query parameter increases the set of fields that appear in the response in addition to the default fields. Expanding resources reduces the number of API calls required to accomplish a task.
419
425
  * @param {*} [options] Override http request option.
420
426
  * @throws {RequiredError}
421
427
  */
422
- getAccount: function (code, authorization, expand, options) {
428
+ getAccount: function (code, expand, authorization, options) {
423
429
  return __awaiter(this, void 0, void 0, function () {
424
430
  var localVarAxiosArgs;
425
431
  return __generator(this, function (_a) {
426
432
  switch (_a.label) {
427
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getAccount(code, authorization, expand, options)];
433
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getAccount(code, expand, authorization, options)];
428
434
  case 1:
429
435
  localVarAxiosArgs = _a.sent();
430
- return [2 /*return*/, common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
436
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
431
437
  }
432
438
  });
433
439
  });
@@ -438,10 +444,10 @@ exports.AccountsApiFp = function (configuration) {
438
444
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
439
445
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
440
446
  * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
441
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
447
+ * @param {'firstName' | 'code' | 'email' | 'createdAt' | 'birthDate' | 'accountNumber' | 'title' | 'lastName' | 'gender' | 'street' | 'houseNumber' | 'zipCode' | 'city' | 'phone' | 'type' | 'companyName'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
442
448
  * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
443
- * @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.
444
- * @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.
449
+ * @param {'id' | 'firstName' | 'lastName' | 'email' | 'createdAt' | 'accountNumber'} [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.
450
+ * @param {'policies'} [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.
445
451
  * @param {*} [options] Override http request option.
446
452
  * @throws {RequiredError}
447
453
  */
@@ -453,7 +459,7 @@ exports.AccountsApiFp = function (configuration) {
453
459
  case 0: return [4 /*yield*/, localVarAxiosParamCreator.listAccounts(authorization, pageSize, pageToken, filter, search, order, expand, options)];
454
460
  case 1:
455
461
  localVarAxiosArgs = _a.sent();
456
- return [2 /*return*/, common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
462
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
457
463
  }
458
464
  });
459
465
  });
@@ -475,19 +481,20 @@ exports.AccountsApiFp = function (configuration) {
475
481
  case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateAccount(code, updateAccountRequestDto, authorization, options)];
476
482
  case 1:
477
483
  localVarAxiosArgs = _a.sent();
478
- return [2 /*return*/, common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
484
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
479
485
  }
480
486
  });
481
487
  });
482
488
  },
483
489
  };
484
490
  };
491
+ exports.AccountsApiFp = AccountsApiFp;
485
492
  /**
486
493
  * AccountsApi - factory interface
487
494
  * @export
488
495
  */
489
- exports.AccountsApiFactory = function (configuration, basePath, axios) {
490
- var localVarFp = exports.AccountsApiFp(configuration);
496
+ var AccountsApiFactory = function (configuration, basePath, axios) {
497
+ var localVarFp = (0, exports.AccountsApiFp)(configuration);
491
498
  return {
492
499
  /**
493
500
  * This will create an account in the database. Account creation is usually part of a complex workflow that starts with lead creation. Creating directly an account without prior knowledge might result in an unusable account. Look into lead creation for more information.
@@ -515,13 +522,13 @@ exports.AccountsApiFactory = function (configuration, basePath, axios) {
515
522
  * Retrieves the details of the account that was previously created. Supply the unique account code that was returned when you created it and Emil Api will return the corresponding account information.
516
523
  * @summary Retrieve the account
517
524
  * @param {string} code Unique identifier for the object.
525
+ * @param {string} expand
518
526
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
519
- * @param {string} [expand] Use the expand query parameter when you need additional information. The expand query parameter increases the set of fields that appear in the response in addition to the default fields. Expanding resources reduces the number of API calls required to accomplish a task.
520
527
  * @param {*} [options] Override http request option.
521
528
  * @throws {RequiredError}
522
529
  */
523
- getAccount: function (code, authorization, expand, options) {
524
- return localVarFp.getAccount(code, authorization, expand, options).then(function (request) { return request(axios, basePath); });
530
+ getAccount: function (code, expand, authorization, options) {
531
+ return localVarFp.getAccount(code, expand, authorization, options).then(function (request) { return request(axios, basePath); });
525
532
  },
526
533
  /**
527
534
  * Returns a list of accounts you have previously created. The accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
@@ -529,10 +536,10 @@ exports.AccountsApiFactory = function (configuration, basePath, axios) {
529
536
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
530
537
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
531
538
  * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
532
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
539
+ * @param {'firstName' | 'code' | 'email' | 'createdAt' | 'birthDate' | 'accountNumber' | 'title' | 'lastName' | 'gender' | 'street' | 'houseNumber' | 'zipCode' | 'city' | 'phone' | 'type' | 'companyName'} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
533
540
  * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
534
- * @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.
535
- * @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.
541
+ * @param {'id' | 'firstName' | 'lastName' | 'email' | 'createdAt' | 'accountNumber'} [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.
542
+ * @param {'policies'} [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.
536
543
  * @param {*} [options] Override http request option.
537
544
  * @throws {RequiredError}
538
545
  */
@@ -553,6 +560,7 @@ exports.AccountsApiFactory = function (configuration, basePath, axios) {
553
560
  },
554
561
  };
555
562
  };
563
+ exports.AccountsApiFactory = AccountsApiFactory;
556
564
  /**
557
565
  * AccountsApi - object-oriented interface
558
566
  * @export
@@ -574,7 +582,7 @@ var AccountsApi = /** @class */ (function (_super) {
574
582
  */
575
583
  AccountsApi.prototype.createAccount = function (requestParameters, options) {
576
584
  var _this = this;
577
- return exports.AccountsApiFp(this.configuration).createAccount(requestParameters.createAccountRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
585
+ return (0, exports.AccountsApiFp)(this.configuration).createAccount(requestParameters.createAccountRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
578
586
  };
579
587
  /**
580
588
  * Permanently deletes the account. Supply the unique code that was returned when you created the account and this will delete it.
@@ -586,7 +594,7 @@ var AccountsApi = /** @class */ (function (_super) {
586
594
  */
587
595
  AccountsApi.prototype.deleteAccount = function (requestParameters, options) {
588
596
  var _this = this;
589
- return exports.AccountsApiFp(this.configuration).deleteAccount(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
597
+ return (0, exports.AccountsApiFp)(this.configuration).deleteAccount(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
590
598
  };
591
599
  /**
592
600
  * Retrieves the details of the account that was previously created. Supply the unique account code that was returned when you created it and Emil Api will return the corresponding account information.
@@ -598,7 +606,7 @@ var AccountsApi = /** @class */ (function (_super) {
598
606
  */
599
607
  AccountsApi.prototype.getAccount = function (requestParameters, options) {
600
608
  var _this = this;
601
- return exports.AccountsApiFp(this.configuration).getAccount(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
609
+ return (0, exports.AccountsApiFp)(this.configuration).getAccount(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
602
610
  };
603
611
  /**
604
612
  * Returns a list of accounts you have previously created. The accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
@@ -611,7 +619,7 @@ var AccountsApi = /** @class */ (function (_super) {
611
619
  AccountsApi.prototype.listAccounts = function (requestParameters, options) {
612
620
  var _this = this;
613
621
  if (requestParameters === void 0) { requestParameters = {}; }
614
- return exports.AccountsApiFp(this.configuration).listAccounts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
622
+ return (0, exports.AccountsApiFp)(this.configuration).listAccounts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
615
623
  };
616
624
  /**
617
625
  * Updates the specified account by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
@@ -623,7 +631,7 @@ var AccountsApi = /** @class */ (function (_super) {
623
631
  */
624
632
  AccountsApi.prototype.updateAccount = function (requestParameters, options) {
625
633
  var _this = this;
626
- return exports.AccountsApiFp(this.configuration).updateAccount(requestParameters.code, requestParameters.updateAccountRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
634
+ return (0, exports.AccountsApiFp)(this.configuration).updateAccount(requestParameters.code, requestParameters.updateAccountRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
627
635
  };
628
636
  return AccountsApi;
629
637
  }(base_1.BaseAPI));
@@ -0,0 +1,66 @@
1
+ /**
2
+ * EMIL AccountService
3
+ * The EMIL AccountService 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 { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
+ import { Configuration } from '../configuration';
14
+ import { RequestArgs, BaseAPI } from '../base';
15
+ import { InlineResponse200 } from '../models';
16
+ /**
17
+ * DefaultApi - axios parameter creator
18
+ * @export
19
+ */
20
+ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration) => {
21
+ /**
22
+ *
23
+ * @param {*} [options] Override http request option.
24
+ * @throws {RequiredError}
25
+ */
26
+ check: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
27
+ };
28
+ /**
29
+ * DefaultApi - functional programming interface
30
+ * @export
31
+ */
32
+ export declare const DefaultApiFp: (configuration?: Configuration) => {
33
+ /**
34
+ *
35
+ * @param {*} [options] Override http request option.
36
+ * @throws {RequiredError}
37
+ */
38
+ check(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse200>>;
39
+ };
40
+ /**
41
+ * DefaultApi - factory interface
42
+ * @export
43
+ */
44
+ export declare const DefaultApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
45
+ /**
46
+ *
47
+ * @param {*} [options] Override http request option.
48
+ * @throws {RequiredError}
49
+ */
50
+ check(options?: any): AxiosPromise<InlineResponse200>;
51
+ };
52
+ /**
53
+ * DefaultApi - object-oriented interface
54
+ * @export
55
+ * @class DefaultApi
56
+ * @extends {BaseAPI}
57
+ */
58
+ export declare class DefaultApi extends BaseAPI {
59
+ /**
60
+ *
61
+ * @param {*} [options] Override http request option.
62
+ * @throws {RequiredError}
63
+ * @memberof DefaultApi
64
+ */
65
+ check(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InlineResponse200, any>>;
66
+ }