@emilgroup/account-sdk 1.1.0 → 1.4.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 (38) hide show
  1. package/.openapi-generator/FILES +1 -1
  2. package/README.md +11 -11
  3. package/api/accounts-api.ts +54 -40
  4. package/api.ts +0 -5
  5. package/base.ts +122 -63
  6. package/common.ts +61 -0
  7. package/configuration.ts +0 -8
  8. package/dist/api/accounts-api.d.ts +54 -45
  9. package/dist/api/accounts-api.js +71 -71
  10. package/dist/api.d.ts +0 -4
  11. package/dist/api.js +4 -21
  12. package/dist/base.d.ts +10 -6
  13. package/dist/base.js +105 -66
  14. package/dist/common.d.ts +26 -0
  15. package/dist/common.js +42 -20
  16. package/dist/configuration.d.ts +0 -7
  17. package/dist/configuration.js +0 -1
  18. package/dist/index.d.ts +1 -1
  19. package/dist/index.js +8 -19
  20. package/dist/models/account-class.d.ts +31 -5
  21. package/dist/models/account-class.js +6 -0
  22. package/dist/models/create-account-request-dto.d.ts +40 -10
  23. package/dist/models/create-account-request-dto.js +10 -1
  24. package/dist/models/index.d.ts +1 -1
  25. package/dist/models/index.js +6 -24
  26. package/dist/models/policy-class.d.ts +30 -0
  27. package/dist/models/update-account-request-dto.d.ts +41 -17
  28. package/dist/models/update-account-request-dto.js +10 -1
  29. package/index.ts +1 -1
  30. package/models/account-class.ts +34 -5
  31. package/models/create-account-request-dto.ts +42 -10
  32. package/models/index.ts +1 -1
  33. package/models/policy-class.ts +36 -0
  34. package/models/update-account-request-dto.ts +43 -17
  35. package/package.json +3 -3
  36. package/dist/models/get-account-request-dto.d.ts +0 -30
  37. package/models/get-account-request-dto.ts +0 -36
  38. /package/dist/models/{get-account-request-dto.js → policy-class.js} +0 -0
@@ -16,12 +16,10 @@ 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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
19
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(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");
25
23
  extendStatics(d, b);
26
24
  function __() { this.constructor = d; }
27
25
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -78,7 +76,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
78
76
  return (mod && mod.__esModule) ? mod : { "default": mod };
79
77
  };
80
78
  Object.defineProperty(exports, "__esModule", { value: true });
81
- exports.AccountsApi = exports.AccountsApiFactory = exports.AccountsApiFp = exports.AccountsApiAxiosParamCreator = void 0;
82
79
  var axios_1 = __importDefault(require("axios"));
83
80
  // Some imports not used depending on template conditions
84
81
  // @ts-ignore
@@ -89,7 +86,7 @@ var base_1 = require("../base");
89
86
  * AccountsApi - axios parameter creator
90
87
  * @export
91
88
  */
92
- var AccountsApiAxiosParamCreator = function (configuration) {
89
+ exports.AccountsApiAxiosParamCreator = function (configuration) {
93
90
  var _this = this;
94
91
  return {
95
92
  /**
@@ -108,7 +105,7 @@ var AccountsApiAxiosParamCreator = function (configuration) {
108
105
  switch (_a.label) {
109
106
  case 0:
110
107
  // verify required parameter 'createAccountRequestDto' is not null or undefined
111
- (0, common_1.assertParamExists)('createAccount', 'createAccountRequestDto', createAccountRequestDto);
108
+ common_1.assertParamExists('createAccount', 'createAccountRequestDto', createAccountRequestDto);
112
109
  localVarPath = "/accountservice/v1/accounts";
113
110
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
114
111
  if (configuration) {
@@ -120,7 +117,7 @@ var AccountsApiAxiosParamCreator = function (configuration) {
120
117
  localVarQueryParameter = {};
121
118
  // authentication bearer required
122
119
  // http bearer authentication required
123
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
120
+ return [4 /*yield*/, common_1.setBearerAuthToObject(localVarHeaderParameter, configuration)];
124
121
  case 1:
125
122
  // authentication bearer required
126
123
  // http bearer authentication required
@@ -129,12 +126,12 @@ var AccountsApiAxiosParamCreator = function (configuration) {
129
126
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
130
127
  }
131
128
  localVarHeaderParameter['Content-Type'] = 'application/json';
132
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
129
+ common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
133
130
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
134
131
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
135
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createAccountRequestDto, localVarRequestOptions, configuration);
132
+ localVarRequestOptions.data = common_1.serializeDataIfNeeded(createAccountRequestDto, localVarRequestOptions, configuration);
136
133
  return [2 /*return*/, {
137
- url: (0, common_1.toPathString)(localVarUrlObj),
134
+ url: common_1.toPathString(localVarUrlObj),
138
135
  options: localVarRequestOptions,
139
136
  }];
140
137
  }
@@ -157,9 +154,9 @@ var AccountsApiAxiosParamCreator = function (configuration) {
157
154
  switch (_a.label) {
158
155
  case 0:
159
156
  // verify required parameter 'code' is not null or undefined
160
- (0, common_1.assertParamExists)('deleteAccount', 'code', code);
157
+ common_1.assertParamExists('deleteAccount', 'code', code);
161
158
  localVarPath = "/accountservice/v1/accounts/{code}"
162
- .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
159
+ .replace("{" + "code" + "}", encodeURIComponent(String(code)));
163
160
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
164
161
  if (configuration) {
165
162
  baseOptions = configuration.baseOptions;
@@ -170,7 +167,7 @@ var AccountsApiAxiosParamCreator = function (configuration) {
170
167
  localVarQueryParameter = {};
171
168
  // authentication bearer required
172
169
  // http bearer authentication required
173
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
170
+ return [4 /*yield*/, common_1.setBearerAuthToObject(localVarHeaderParameter, configuration)];
174
171
  case 1:
175
172
  // authentication bearer required
176
173
  // http bearer authentication required
@@ -178,11 +175,11 @@ var AccountsApiAxiosParamCreator = function (configuration) {
178
175
  if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
179
176
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
180
177
  }
181
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
178
+ common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
182
179
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
183
180
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
184
181
  return [2 /*return*/, {
185
- url: (0, common_1.toPathString)(localVarUrlObj),
182
+ url: common_1.toPathString(localVarUrlObj),
186
183
  options: localVarRequestOptions,
187
184
  }];
188
185
  }
@@ -206,9 +203,9 @@ var AccountsApiAxiosParamCreator = function (configuration) {
206
203
  switch (_a.label) {
207
204
  case 0:
208
205
  // verify required parameter 'code' is not null or undefined
209
- (0, common_1.assertParamExists)('getAccount', 'code', code);
206
+ common_1.assertParamExists('getAccount', 'code', code);
210
207
  localVarPath = "/accountservice/v1/accounts/{code}"
211
- .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
208
+ .replace("{" + "code" + "}", encodeURIComponent(String(code)));
212
209
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
213
210
  if (configuration) {
214
211
  baseOptions = configuration.baseOptions;
@@ -219,7 +216,7 @@ var AccountsApiAxiosParamCreator = function (configuration) {
219
216
  localVarQueryParameter = {};
220
217
  // authentication bearer required
221
218
  // http bearer authentication required
222
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
219
+ return [4 /*yield*/, common_1.setBearerAuthToObject(localVarHeaderParameter, configuration)];
223
220
  case 1:
224
221
  // authentication bearer required
225
222
  // http bearer authentication required
@@ -230,11 +227,11 @@ var AccountsApiAxiosParamCreator = function (configuration) {
230
227
  if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
231
228
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
232
229
  }
233
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
230
+ common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
234
231
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
235
232
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
236
233
  return [2 /*return*/, {
237
- url: (0, common_1.toPathString)(localVarUrlObj),
234
+ url: common_1.toPathString(localVarUrlObj),
238
235
  options: localVarRequestOptions,
239
236
  }];
240
237
  }
@@ -242,18 +239,19 @@ var AccountsApiAxiosParamCreator = function (configuration) {
242
239
  });
243
240
  },
244
241
  /**
245
- * Returns a list of accounts you have previously created. The accounts are returned in sorted order, with the oldest account appearing first. For more information about pagination, read the Pagination documentation.
242
+ * 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.
246
243
  * @summary List accounts
247
244
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
248
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
249
- * @param {string} [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.
250
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time. Parameters: **code**, **firstName**, **lastName**, **accountNumber**, **email**, **zipCode**, **birthDate**
251
- * @param {string} [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. Parameters: **firstName**, **lastName**, **accountNumber**, **email**.
252
- * @param {string} [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. Parameters: **policy**.
245
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
246
+ * @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.
248
+ * @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.
253
251
  * @param {*} [options] Override http request option.
254
252
  * @throws {RequiredError}
255
253
  */
256
- listAccounts: function (authorization, pageSize, pageToken, filter, order, expand, options) {
254
+ listAccounts: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
257
255
  if (options === void 0) { options = {}; }
258
256
  return __awaiter(_this, void 0, void 0, function () {
259
257
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
@@ -271,7 +269,7 @@ var AccountsApiAxiosParamCreator = function (configuration) {
271
269
  localVarQueryParameter = {};
272
270
  // authentication bearer required
273
271
  // http bearer authentication required
274
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
272
+ return [4 /*yield*/, common_1.setBearerAuthToObject(localVarHeaderParameter, configuration)];
275
273
  case 1:
276
274
  // authentication bearer required
277
275
  // http bearer authentication required
@@ -285,6 +283,9 @@ var AccountsApiAxiosParamCreator = function (configuration) {
285
283
  if (filter !== undefined) {
286
284
  localVarQueryParameter['filter'] = filter;
287
285
  }
286
+ if (search !== undefined) {
287
+ localVarQueryParameter['search'] = search;
288
+ }
288
289
  if (order !== undefined) {
289
290
  localVarQueryParameter['order'] = order;
290
291
  }
@@ -294,11 +295,11 @@ var AccountsApiAxiosParamCreator = function (configuration) {
294
295
  if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
295
296
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
296
297
  }
297
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
298
+ common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
298
299
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
299
300
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
300
301
  return [2 /*return*/, {
301
- url: (0, common_1.toPathString)(localVarUrlObj),
302
+ url: common_1.toPathString(localVarUrlObj),
302
303
  options: localVarRequestOptions,
303
304
  }];
304
305
  }
@@ -322,11 +323,11 @@ var AccountsApiAxiosParamCreator = function (configuration) {
322
323
  switch (_a.label) {
323
324
  case 0:
324
325
  // verify required parameter 'code' is not null or undefined
325
- (0, common_1.assertParamExists)('updateAccount', 'code', code);
326
+ common_1.assertParamExists('updateAccount', 'code', code);
326
327
  // verify required parameter 'updateAccountRequestDto' is not null or undefined
327
- (0, common_1.assertParamExists)('updateAccount', 'updateAccountRequestDto', updateAccountRequestDto);
328
+ common_1.assertParamExists('updateAccount', 'updateAccountRequestDto', updateAccountRequestDto);
328
329
  localVarPath = "/accountservice/v1/accounts/{code}"
329
- .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
330
+ .replace("{" + "code" + "}", encodeURIComponent(String(code)));
330
331
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
331
332
  if (configuration) {
332
333
  baseOptions = configuration.baseOptions;
@@ -337,7 +338,7 @@ var AccountsApiAxiosParamCreator = function (configuration) {
337
338
  localVarQueryParameter = {};
338
339
  // authentication bearer required
339
340
  // http bearer authentication required
340
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
341
+ return [4 /*yield*/, common_1.setBearerAuthToObject(localVarHeaderParameter, configuration)];
341
342
  case 1:
342
343
  // authentication bearer required
343
344
  // http bearer authentication required
@@ -346,12 +347,12 @@ var AccountsApiAxiosParamCreator = function (configuration) {
346
347
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
347
348
  }
348
349
  localVarHeaderParameter['Content-Type'] = 'application/json';
349
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
350
+ common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
350
351
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
351
352
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
352
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateAccountRequestDto, localVarRequestOptions, configuration);
353
+ localVarRequestOptions.data = common_1.serializeDataIfNeeded(updateAccountRequestDto, localVarRequestOptions, configuration);
353
354
  return [2 /*return*/, {
354
- url: (0, common_1.toPathString)(localVarUrlObj),
355
+ url: common_1.toPathString(localVarUrlObj),
355
356
  options: localVarRequestOptions,
356
357
  }];
357
358
  }
@@ -360,13 +361,12 @@ var AccountsApiAxiosParamCreator = function (configuration) {
360
361
  },
361
362
  };
362
363
  };
363
- exports.AccountsApiAxiosParamCreator = AccountsApiAxiosParamCreator;
364
364
  /**
365
365
  * AccountsApi - functional programming interface
366
366
  * @export
367
367
  */
368
- var AccountsApiFp = function (configuration) {
369
- var localVarAxiosParamCreator = (0, exports.AccountsApiAxiosParamCreator)(configuration);
368
+ exports.AccountsApiFp = function (configuration) {
369
+ var localVarAxiosParamCreator = exports.AccountsApiAxiosParamCreator(configuration);
370
370
  return {
371
371
  /**
372
372
  * 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 +384,7 @@ var AccountsApiFp = function (configuration) {
384
384
  case 0: return [4 /*yield*/, localVarAxiosParamCreator.createAccount(createAccountRequestDto, authorization, options)];
385
385
  case 1:
386
386
  localVarAxiosArgs = _a.sent();
387
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
387
+ return [2 /*return*/, common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
388
388
  }
389
389
  });
390
390
  });
@@ -405,7 +405,7 @@ var AccountsApiFp = function (configuration) {
405
405
  case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteAccount(code, authorization, options)];
406
406
  case 1:
407
407
  localVarAxiosArgs = _a.sent();
408
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
408
+ return [2 /*return*/, common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
409
409
  }
410
410
  });
411
411
  });
@@ -427,32 +427,33 @@ var AccountsApiFp = function (configuration) {
427
427
  case 0: return [4 /*yield*/, localVarAxiosParamCreator.getAccount(code, authorization, expand, options)];
428
428
  case 1:
429
429
  localVarAxiosArgs = _a.sent();
430
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
430
+ return [2 /*return*/, common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
431
431
  }
432
432
  });
433
433
  });
434
434
  },
435
435
  /**
436
- * Returns a list of accounts you have previously created. The accounts are returned in sorted order, with the oldest account appearing first. For more information about pagination, read the Pagination documentation.
436
+ * 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.
437
437
  * @summary List accounts
438
438
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
439
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
440
- * @param {string} [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 {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time. Parameters: **code**, **firstName**, **lastName**, **accountNumber**, **email**, **zipCode**, **birthDate**
442
- * @param {string} [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. Parameters: **firstName**, **lastName**, **accountNumber**, **email**.
443
- * @param {string} [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. Parameters: **policy**.
439
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
440
+ * @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.
442
+ * @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.
444
445
  * @param {*} [options] Override http request option.
445
446
  * @throws {RequiredError}
446
447
  */
447
- listAccounts: function (authorization, pageSize, pageToken, filter, order, expand, options) {
448
+ listAccounts: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
448
449
  return __awaiter(this, void 0, void 0, function () {
449
450
  var localVarAxiosArgs;
450
451
  return __generator(this, function (_a) {
451
452
  switch (_a.label) {
452
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.listAccounts(authorization, pageSize, pageToken, filter, order, expand, options)];
453
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listAccounts(authorization, pageSize, pageToken, filter, search, order, expand, options)];
453
454
  case 1:
454
455
  localVarAxiosArgs = _a.sent();
455
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
456
+ return [2 /*return*/, common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
456
457
  }
457
458
  });
458
459
  });
@@ -474,20 +475,19 @@ var AccountsApiFp = function (configuration) {
474
475
  case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateAccount(code, updateAccountRequestDto, authorization, options)];
475
476
  case 1:
476
477
  localVarAxiosArgs = _a.sent();
477
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
478
+ return [2 /*return*/, common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
478
479
  }
479
480
  });
480
481
  });
481
482
  },
482
483
  };
483
484
  };
484
- exports.AccountsApiFp = AccountsApiFp;
485
485
  /**
486
486
  * AccountsApi - factory interface
487
487
  * @export
488
488
  */
489
- var AccountsApiFactory = function (configuration, basePath, axios) {
490
- var localVarFp = (0, exports.AccountsApiFp)(configuration);
489
+ exports.AccountsApiFactory = function (configuration, basePath, axios) {
490
+ var localVarFp = exports.AccountsApiFp(configuration);
491
491
  return {
492
492
  /**
493
493
  * 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.
@@ -524,19 +524,20 @@ var AccountsApiFactory = function (configuration, basePath, axios) {
524
524
  return localVarFp.getAccount(code, authorization, expand, options).then(function (request) { return request(axios, basePath); });
525
525
  },
526
526
  /**
527
- * Returns a list of accounts you have previously created. The accounts are returned in sorted order, with the oldest account appearing first. For more information about pagination, read the Pagination documentation.
527
+ * 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.
528
528
  * @summary List accounts
529
529
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
530
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
531
- * @param {string} [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 {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time. Parameters: **code**, **firstName**, **lastName**, **accountNumber**, **email**, **zipCode**, **birthDate**
533
- * @param {string} [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. Parameters: **firstName**, **lastName**, **accountNumber**, **email**.
534
- * @param {string} [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. Parameters: **policy**.
530
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
531
+ * @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.
533
+ * @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.
535
536
  * @param {*} [options] Override http request option.
536
537
  * @throws {RequiredError}
537
538
  */
538
- listAccounts: function (authorization, pageSize, pageToken, filter, order, expand, options) {
539
- return localVarFp.listAccounts(authorization, pageSize, pageToken, filter, order, expand, options).then(function (request) { return request(axios, basePath); });
539
+ listAccounts: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
540
+ return localVarFp.listAccounts(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
540
541
  },
541
542
  /**
542
543
  * Updates the specified account by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
@@ -552,7 +553,6 @@ var AccountsApiFactory = function (configuration, basePath, axios) {
552
553
  },
553
554
  };
554
555
  };
555
- exports.AccountsApiFactory = AccountsApiFactory;
556
556
  /**
557
557
  * AccountsApi - object-oriented interface
558
558
  * @export
@@ -574,7 +574,7 @@ var AccountsApi = /** @class */ (function (_super) {
574
574
  */
575
575
  AccountsApi.prototype.createAccount = function (requestParameters, options) {
576
576
  var _this = this;
577
- return (0, exports.AccountsApiFp)(this.configuration).createAccount(requestParameters.createAccountRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
577
+ return exports.AccountsApiFp(this.configuration).createAccount(requestParameters.createAccountRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
578
578
  };
579
579
  /**
580
580
  * Permanently deletes the account. Supply the unique code that was returned when you created the account and this will delete it.
@@ -586,7 +586,7 @@ var AccountsApi = /** @class */ (function (_super) {
586
586
  */
587
587
  AccountsApi.prototype.deleteAccount = function (requestParameters, options) {
588
588
  var _this = this;
589
- return (0, exports.AccountsApiFp)(this.configuration).deleteAccount(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
589
+ return exports.AccountsApiFp(this.configuration).deleteAccount(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
590
590
  };
591
591
  /**
592
592
  * 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,10 +598,10 @@ var AccountsApi = /** @class */ (function (_super) {
598
598
  */
599
599
  AccountsApi.prototype.getAccount = function (requestParameters, options) {
600
600
  var _this = this;
601
- return (0, exports.AccountsApiFp)(this.configuration).getAccount(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
601
+ return exports.AccountsApiFp(this.configuration).getAccount(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
602
602
  };
603
603
  /**
604
- * Returns a list of accounts you have previously created. The accounts are returned in sorted order, with the oldest account appearing first. For more information about pagination, read the Pagination documentation.
604
+ * 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.
605
605
  * @summary List accounts
606
606
  * @param {AccountsApiListAccountsRequest} requestParameters Request parameters.
607
607
  * @param {*} [options] Override http request option.
@@ -611,7 +611,7 @@ var AccountsApi = /** @class */ (function (_super) {
611
611
  AccountsApi.prototype.listAccounts = function (requestParameters, options) {
612
612
  var _this = this;
613
613
  if (requestParameters === void 0) { requestParameters = {}; }
614
- return (0, exports.AccountsApiFp)(this.configuration).listAccounts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
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); });
615
615
  };
616
616
  /**
617
617
  * Updates the specified account by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
@@ -623,7 +623,7 @@ var AccountsApi = /** @class */ (function (_super) {
623
623
  */
624
624
  AccountsApi.prototype.updateAccount = function (requestParameters, options) {
625
625
  var _this = this;
626
- return (0, exports.AccountsApiFp)(this.configuration).updateAccount(requestParameters.code, requestParameters.updateAccountRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
626
+ return exports.AccountsApiFp(this.configuration).updateAccount(requestParameters.code, requestParameters.updateAccountRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
627
627
  };
628
628
  return AccountsApi;
629
629
  }(base_1.BaseAPI));
package/dist/api.d.ts CHANGED
@@ -10,7 +10,3 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  export * from './api/accounts-api';
13
- export declare enum Environment {
14
- Production = "https://apiv2.emil.de",
15
- Test = "https://apiv2-test.emil.de"
16
- }
package/dist/api.js CHANGED
@@ -12,25 +12,8 @@
12
12
  * https://openapi-generator.tech
13
13
  * Do not edit the class manually.
14
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
- };
15
+ function __export(m) {
16
+ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
17
+ }
29
18
  Object.defineProperty(exports, "__esModule", { value: true });
30
- exports.Environment = void 0;
31
- __exportStar(require("./api/accounts-api"), exports);
32
- var Environment;
33
- (function (Environment) {
34
- Environment["Production"] = "https://apiv2.emil.de";
35
- Environment["Test"] = "https://apiv2-test.emil.de";
36
- })(Environment = exports.Environment || (exports.Environment = {}));
19
+ __export(require("./api/accounts-api"));
package/dist/base.d.ts CHANGED
@@ -25,12 +25,13 @@ export declare const COLLECTION_FORMATS: {
25
25
  export interface LoginClass {
26
26
  accessToken: string;
27
27
  permissions: Array<string>;
28
- newPasswordRequired: boolean;
29
28
  }
30
29
  export declare enum Environment {
31
30
  Production = "https://apiv2.emil.de",
32
- Test = "https://apiv2-test.emil.de"
31
+ Test = "https://apiv2-test.emil.de",
32
+ Development = "https://apiv2-dev.emil.de"
33
33
  }
34
+ export declare function resetRetry(): void;
34
35
  /**
35
36
  *
36
37
  * @export
@@ -48,13 +49,16 @@ export interface RequestArgs {
48
49
  export declare class BaseAPI {
49
50
  protected basePath: string;
50
51
  protected axios: AxiosInstance;
51
- protected configuration: Configuration;
52
+ protected configuration: Configuration | undefined;
53
+ private tokenData?;
52
54
  constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
53
- getConfiguration(): Configuration;
54
55
  selectEnvironment(env: Environment): void;
55
56
  authorize(username: string, password: string): Promise<void>;
56
- refreshToken(): Promise<string>;
57
- private extractRefreshToken;
57
+ refreshTokenInternal(): Promise<string>;
58
+ private storeTokenData;
59
+ loadTokenData(): void;
60
+ cleanTokenData(): void;
61
+ private attachInterceptor;
58
62
  }
59
63
  /**
60
64
  *