@emilgroup/customer-sdk-node 1.34.0 → 1.36.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 (32) hide show
  1. package/.openapi-generator/FILES +1 -0
  2. package/README.md +18 -2
  3. package/base.ts +23 -13
  4. package/dist/base.d.ts +4 -2
  5. package/dist/base.js +38 -28
  6. package/dist/models/create-bank-account-request-dto.d.ts +8 -2
  7. package/dist/models/create-customer-request-dto.d.ts +6 -0
  8. package/dist/models/create-lead-request-dto.d.ts +4 -9
  9. package/dist/models/forgot-password-request-dto.d.ts +6 -0
  10. package/dist/models/index.d.ts +1 -0
  11. package/dist/models/index.js +1 -0
  12. package/dist/models/invite-by-customer-request-dto.d.ts +6 -0
  13. package/dist/models/invite-by-tenant-request-dto.d.ts +6 -0
  14. package/dist/models/lead-bank-account-class.d.ts +8 -2
  15. package/dist/models/lead-class.d.ts +12 -0
  16. package/dist/models/link-lead-partner-request-dto.d.ts +36 -0
  17. package/dist/models/link-lead-partner-request-dto.js +15 -0
  18. package/dist/models/partner-link-class.d.ts +12 -0
  19. package/dist/models/reset-password-by-customer-request-dto.d.ts +6 -0
  20. package/models/create-bank-account-request-dto.ts +8 -2
  21. package/models/create-customer-request-dto.ts +6 -0
  22. package/models/create-lead-request-dto.ts +4 -9
  23. package/models/forgot-password-request-dto.ts +6 -0
  24. package/models/index.ts +1 -0
  25. package/models/invite-by-customer-request-dto.ts +6 -0
  26. package/models/invite-by-tenant-request-dto.ts +6 -0
  27. package/models/lead-bank-account-class.ts +8 -2
  28. package/models/lead-class.ts +12 -0
  29. package/models/link-lead-partner-request-dto.ts +42 -0
  30. package/models/partner-link-class.ts +12 -0
  31. package/models/reset-password-by-customer-request-dto.ts +6 -0
  32. package/package.json +2 -2
@@ -65,6 +65,7 @@ models/invite-class.ts
65
65
  models/invoice-class.ts
66
66
  models/lead-bank-account-class.ts
67
67
  models/lead-class.ts
68
+ models/link-lead-partner-request-dto.ts
68
69
  models/list-customer-claims-response-class.ts
69
70
  models/list-documents-response-class.ts
70
71
  models/list-invoices-response-class.ts
package/README.md CHANGED
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/customer-sdk-node@1.34.0 --save
20
+ npm install @emilgroup/customer-sdk-node@1.36.0 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/customer-sdk-node@1.34.0
24
+ yarn add @emilgroup/customer-sdk-node@1.36.0
25
25
  ```
26
26
 
27
27
  And then you can import `CustomersApi`.
@@ -47,6 +47,22 @@ export EMIL_USERNAME=XXXXX@XXXX.XXX
47
47
  export EMIL_PASSWORD=XXXXXXXXXXXXXX
48
48
  ```
49
49
 
50
+ ## Base path
51
+
52
+ To select the basic path for using the API, we can use two approaches. The first is to use one of the predefined environments, and the second is to specify the domain as a string.
53
+
54
+ ```ts
55
+ import { CustomersApi, Environment } from '@emilgroup/customer-sdk-node'
56
+
57
+ const customersApi = new CustomersApi();
58
+
59
+ // Allows you to simply choose environment. It will usually be Environment.Production.
60
+ customersApi.selectEnvironment(Environment.Production);
61
+
62
+ // For advanced users, use the custom baseUrl of the website you need to connect to.
63
+ customersApi.selectBasePath('https://my-custom-domain.com');
64
+ ```
65
+
50
66
  ## Example
51
67
 
52
68
  Here is a basic functionning example:
package/base.ts CHANGED
@@ -81,6 +81,7 @@ export class BaseAPI {
81
81
  private username?: string;
82
82
  private password?: string;
83
83
  private isCustomerToken = false;
84
+ private permissions: Array<string> = [];
84
85
 
85
86
  constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
86
87
  if (configuration) {
@@ -151,6 +152,10 @@ export class BaseAPI {
151
152
  this.configuration.basePath = env;
152
153
  }
153
154
 
155
+ getPermissions(): Array<string> {
156
+ return this.permissions;
157
+ }
158
+
154
159
  async authorize(username: string, password: string): Promise<void> {
155
160
  const options: AxiosRequestConfig = {
156
161
  method: 'POST',
@@ -165,9 +170,10 @@ export class BaseAPI {
165
170
 
166
171
  const response = await globalAxios.request<LoginClass>(options);
167
172
 
168
- const { data: { accessToken } } = response;
173
+ const { data: { accessToken, permissions } } = response;
169
174
  this.configuration.username = username;
170
175
  this.configuration.accessToken = `Bearer ${accessToken}`;
176
+ this.permissions = permissions;
171
177
 
172
178
  const refreshToken = this.extractRefreshToken(response);
173
179
  this.configuration.refreshToken = refreshToken;
@@ -234,12 +240,12 @@ export class BaseAPI {
234
240
  return response;
235
241
  }
236
242
 
237
- async refreshTokenTenant(): Promise<string> {
243
+ async refreshTokenTenant(): Promise<LoginClass> {
238
244
  const { username, refreshToken } = this.configuration;
239
245
 
240
246
 
241
247
  if (!username || !refreshToken) {
242
- return '';
248
+ throw new Error('Failed to refresh token.');
243
249
  }
244
250
 
245
251
  const options: AxiosRequestConfig = {
@@ -253,16 +259,16 @@ export class BaseAPI {
253
259
  withCredentials: true,
254
260
  };
255
261
 
256
- const { data: { accessToken } } = await globalAxios.request<LoginClass>(options);
262
+ const response = await globalAxios.request<LoginClass>(options);
257
263
 
258
- return accessToken;
264
+ return response.data;
259
265
  }
260
266
 
261
- async refreshTokenCustomer(): Promise<string> {
267
+ async refreshTokenCustomer(): Promise<LoginClass> {
262
268
  const { username, refreshToken, tenantSlug } = this.configuration;
263
269
 
264
270
  if (!username || !refreshToken) {
265
- return '';
271
+ throw new Error('Failed to refresh token.');
266
272
  }
267
273
 
268
274
  const options: AxiosRequestConfig = {
@@ -276,9 +282,9 @@ export class BaseAPI {
276
282
  withCredentials: true,
277
283
  };
278
284
 
279
- const { data: { accessToken } } = await globalAxios.request<LoginClass>(options);
285
+ const response = await globalAxios.request<LoginClass>(options);
280
286
 
281
- return accessToken;
287
+ return response.data;
282
288
  }
283
289
 
284
290
  private extractRefreshToken(response: AxiosResponse): string {
@@ -304,12 +310,14 @@ export class BaseAPI {
304
310
  originalConfig._retry = true;
305
311
  try {
306
312
  let tokenString: string;
313
+ let permissions: Array<string>;
307
314
  if (this.isCustomerToken) {
308
- tokenString = await this.refreshTokenCustomer();
315
+ ({ accessToken: tokenString, permissions } = await this.refreshTokenCustomer());
309
316
  } else {
310
- tokenString = await this.refreshTokenTenant();
317
+ ({ accessToken: tokenString, permissions } = await this.refreshTokenTenant());
311
318
  }
312
319
  const accessToken = `Bearer ${tokenString}`;
320
+ this.permissions = permissions;
313
321
 
314
322
  delete originalConfig.headers['Authorization']
315
323
 
@@ -336,12 +344,14 @@ export class BaseAPI {
336
344
  _retry_count++;
337
345
  try {
338
346
  let tokenString: string;
347
+ let permissions: Array<string>;
339
348
  if (this.isCustomerToken) {
340
- tokenString = await this.refreshTokenCustomer();
349
+ ({ accessToken: tokenString, permissions } = await this.refreshTokenCustomer());
341
350
  } else {
342
- tokenString = await this.refreshTokenTenant();
351
+ ({ accessToken: tokenString, permissions } = await this.refreshTokenTenant());
343
352
  }
344
353
  const accessToken = `Bearer ${tokenString}`;
354
+ this.permissions = permissions;
345
355
 
346
356
  _retry = true;
347
357
  originalConfig.headers['Authorization'] = accessToken;
package/dist/base.d.ts CHANGED
@@ -55,17 +55,19 @@ export declare class BaseAPI {
55
55
  private username?;
56
56
  private password?;
57
57
  private isCustomerToken;
58
+ private permissions;
58
59
  constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
59
60
  initialize(env?: Environment): Promise<void>;
60
61
  private loadCredentials;
61
62
  private readConfigFile;
62
63
  private readEnvVariables;
63
64
  selectEnvironment(env: Environment): void;
65
+ getPermissions(): Array<string>;
64
66
  authorize(username: string, password: string): Promise<void>;
65
67
  initiateAuthorization(username: string, password: string, tenantSlug: string): Promise<AxiosResponse<InitiateAuthResponseClass>>;
66
68
  respondToAuthorizationChallenge(respondToAuthChallengeRequestDto: RespondToAuthChallengeRequestDto): Promise<AxiosResponse<RespondToAuthChallengeClass>>;
67
- refreshTokenTenant(): Promise<string>;
68
- refreshTokenCustomer(): Promise<string>;
69
+ refreshTokenTenant(): Promise<LoginClass>;
70
+ refreshTokenCustomer(): Promise<LoginClass>;
69
71
  private extractRefreshToken;
70
72
  private attachInterceptor;
71
73
  }
package/dist/base.js CHANGED
@@ -151,6 +151,7 @@ var BaseAPI = /** @class */ (function () {
151
151
  this.basePath = basePath;
152
152
  this.axios = axios;
153
153
  this.isCustomerToken = false;
154
+ this.permissions = [];
154
155
  if (configuration) {
155
156
  this.configuration = configuration;
156
157
  this.basePath = configuration.basePath || this.basePath;
@@ -243,11 +244,14 @@ var BaseAPI = /** @class */ (function () {
243
244
  BaseAPI.prototype.selectEnvironment = function (env) {
244
245
  this.configuration.basePath = env;
245
246
  };
247
+ BaseAPI.prototype.getPermissions = function () {
248
+ return this.permissions;
249
+ };
246
250
  BaseAPI.prototype.authorize = function (username, password) {
247
251
  return __awaiter(this, void 0, void 0, function () {
248
- var options, response, accessToken, refreshToken;
249
- return __generator(this, function (_a) {
250
- switch (_a.label) {
252
+ var options, response, _a, accessToken, permissions, refreshToken;
253
+ return __generator(this, function (_b) {
254
+ switch (_b.label) {
251
255
  case 0:
252
256
  options = {
253
257
  method: 'POST',
@@ -261,10 +265,11 @@ var BaseAPI = /** @class */ (function () {
261
265
  };
262
266
  return [4 /*yield*/, axios_1.default.request(options)];
263
267
  case 1:
264
- response = _a.sent();
265
- accessToken = response.data.accessToken;
268
+ response = _b.sent();
269
+ _a = response.data, accessToken = _a.accessToken, permissions = _a.permissions;
266
270
  this.configuration.username = username;
267
271
  this.configuration.accessToken = "Bearer ".concat(accessToken);
272
+ this.permissions = permissions;
268
273
  refreshToken = this.extractRefreshToken(response);
269
274
  this.configuration.refreshToken = refreshToken;
270
275
  return [2 /*return*/];
@@ -339,13 +344,13 @@ var BaseAPI = /** @class */ (function () {
339
344
  };
340
345
  BaseAPI.prototype.refreshTokenTenant = function () {
341
346
  return __awaiter(this, void 0, void 0, function () {
342
- var _a, username, refreshToken, options, accessToken;
347
+ var _a, username, refreshToken, options, response;
343
348
  return __generator(this, function (_b) {
344
349
  switch (_b.label) {
345
350
  case 0:
346
351
  _a = this.configuration, username = _a.username, refreshToken = _a.refreshToken;
347
352
  if (!username || !refreshToken) {
348
- return [2 /*return*/, ''];
353
+ throw new Error('Failed to refresh token.');
349
354
  }
350
355
  options = {
351
356
  method: 'POST',
@@ -359,21 +364,21 @@ var BaseAPI = /** @class */ (function () {
359
364
  };
360
365
  return [4 /*yield*/, axios_1.default.request(options)];
361
366
  case 1:
362
- accessToken = (_b.sent()).data.accessToken;
363
- return [2 /*return*/, accessToken];
367
+ response = _b.sent();
368
+ return [2 /*return*/, response.data];
364
369
  }
365
370
  });
366
371
  });
367
372
  };
368
373
  BaseAPI.prototype.refreshTokenCustomer = function () {
369
374
  return __awaiter(this, void 0, void 0, function () {
370
- var _a, username, refreshToken, tenantSlug, options, accessToken;
375
+ var _a, username, refreshToken, tenantSlug, options, response;
371
376
  return __generator(this, function (_b) {
372
377
  switch (_b.label) {
373
378
  case 0:
374
379
  _a = this.configuration, username = _a.username, refreshToken = _a.refreshToken, tenantSlug = _a.tenantSlug;
375
380
  if (!username || !refreshToken) {
376
- return [2 /*return*/, ''];
381
+ throw new Error('Failed to refresh token.');
377
382
  }
378
383
  options = {
379
384
  method: 'POST',
@@ -387,8 +392,8 @@ var BaseAPI = /** @class */ (function () {
387
392
  };
388
393
  return [4 /*yield*/, axios_1.default.request(options)];
389
394
  case 1:
390
- accessToken = (_b.sent()).data.accessToken;
391
- return [2 /*return*/, accessToken];
395
+ response = _b.sent();
396
+ return [2 /*return*/, response.data];
392
397
  }
393
398
  });
394
399
  });
@@ -405,35 +410,38 @@ var BaseAPI = /** @class */ (function () {
405
410
  axios.interceptors.response.use(function (res) {
406
411
  return res;
407
412
  }, function (err) { return __awaiter(_this, void 0, void 0, function () {
408
- var originalConfig, tokenString, accessToken, _error_1, tokenString, accessToken, _error_2;
409
- return __generator(this, function (_a) {
410
- switch (_a.label) {
413
+ var originalConfig, tokenString, permissions, accessToken, _error_1, tokenString, permissions, accessToken, _error_2;
414
+ var _a, _b, _c, _d;
415
+ return __generator(this, function (_e) {
416
+ switch (_e.label) {
411
417
  case 0:
412
418
  originalConfig = err.config;
413
419
  if (!err.response) return [3 /*break*/, 8];
414
420
  if (!(err.response.status === 401 && !originalConfig._retry)) return [3 /*break*/, 7];
415
421
  originalConfig._retry = true;
416
- _a.label = 1;
422
+ _e.label = 1;
417
423
  case 1:
418
- _a.trys.push([1, 6, , 7]);
424
+ _e.trys.push([1, 6, , 7]);
419
425
  tokenString = void 0;
426
+ permissions = void 0;
420
427
  if (!this.isCustomerToken) return [3 /*break*/, 3];
421
428
  return [4 /*yield*/, this.refreshTokenCustomer()];
422
429
  case 2:
423
- tokenString = _a.sent();
430
+ (_a = _e.sent(), tokenString = _a.accessToken, permissions = _a.permissions);
424
431
  return [3 /*break*/, 5];
425
432
  case 3: return [4 /*yield*/, this.refreshTokenTenant()];
426
433
  case 4:
427
- tokenString = _a.sent();
428
- _a.label = 5;
434
+ (_b = _e.sent(), tokenString = _b.accessToken, permissions = _b.permissions);
435
+ _e.label = 5;
429
436
  case 5:
430
437
  accessToken = "Bearer ".concat(tokenString);
438
+ this.permissions = permissions;
431
439
  delete originalConfig.headers['Authorization'];
432
440
  originalConfig.headers['Authorization'] = accessToken;
433
441
  this.configuration.accessToken = accessToken;
434
442
  return [2 /*return*/, axios(originalConfig)];
435
443
  case 6:
436
- _error_1 = _a.sent();
444
+ _error_1 = _e.sent();
437
445
  if (_error_1.response && _error_1.response.data) {
438
446
  return [2 /*return*/, Promise.reject(_error_1.response.data)];
439
447
  }
@@ -449,27 +457,29 @@ var BaseAPI = /** @class */ (function () {
449
457
  && originalConfig.headers.hasOwnProperty('Authorization')
450
458
  && _retry_count < 4)) return [3 /*break*/, 15];
451
459
  _retry_count++;
452
- _a.label = 9;
460
+ _e.label = 9;
453
461
  case 9:
454
- _a.trys.push([9, 14, , 15]);
462
+ _e.trys.push([9, 14, , 15]);
455
463
  tokenString = void 0;
464
+ permissions = void 0;
456
465
  if (!this.isCustomerToken) return [3 /*break*/, 11];
457
466
  return [4 /*yield*/, this.refreshTokenCustomer()];
458
467
  case 10:
459
- tokenString = _a.sent();
468
+ (_c = _e.sent(), tokenString = _c.accessToken, permissions = _c.permissions);
460
469
  return [3 /*break*/, 13];
461
470
  case 11: return [4 /*yield*/, this.refreshTokenTenant()];
462
471
  case 12:
463
- tokenString = _a.sent();
464
- _a.label = 13;
472
+ (_d = _e.sent(), tokenString = _d.accessToken, permissions = _d.permissions);
473
+ _e.label = 13;
465
474
  case 13:
466
475
  accessToken = "Bearer ".concat(tokenString);
476
+ this.permissions = permissions;
467
477
  _retry = true;
468
478
  originalConfig.headers['Authorization'] = accessToken;
469
479
  this.configuration.accessToken = accessToken;
470
480
  return [2 /*return*/, axios.request(__assign({}, originalConfig))];
471
481
  case 14:
472
- _error_2 = _a.sent();
482
+ _error_2 = _e.sent();
473
483
  if (_error_2.response && _error_2.response.data) {
474
484
  return [2 /*return*/, Promise.reject(_error_2.response.data)];
475
485
  }
@@ -16,13 +16,19 @@
16
16
  */
17
17
  export interface CreateBankAccountRequestDto {
18
18
  /**
19
- * Unique identifier of the account that this object belongs to.
19
+ * User account code associated with bank account.
20
20
  * @type {string}
21
21
  * @memberof CreateBankAccountRequestDto
22
22
  */
23
23
  'accountCode'?: string;
24
24
  /**
25
- * Bank account IBAN.
25
+ * Partner code associated with bank account.
26
+ * @type {string}
27
+ * @memberof CreateBankAccountRequestDto
28
+ */
29
+ 'partnerCode'?: string;
30
+ /**
31
+ * IBAN number for the bank account
26
32
  * @type {string}
27
33
  * @memberof CreateBankAccountRequestDto
28
34
  */
@@ -34,6 +34,12 @@ export interface CreateCustomerRequestDto {
34
34
  * @memberof CreateCustomerRequestDto
35
35
  */
36
36
  'isEulaAccepted': boolean;
37
+ /**
38
+ * Another variant used for the template from the customer settings.
39
+ * @type {string}
40
+ * @memberof CreateCustomerRequestDto
41
+ */
42
+ 'configVariant'?: string;
37
43
  /**
38
44
  * If the account does not exist yet, it will be created in the database.
39
45
  * @type {CreateAccountRequestDto}
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import { CreateBankAccountRequestDto } from './create-bank-account-request-dto';
13
13
  import { CreatePaymentMethodRequestDto } from './create-payment-method-request-dto';
14
+ import { LinkLeadPartnerRequestDto } from './link-lead-partner-request-dto';
14
15
  import { PolicyObjectDto } from './policy-object-dto';
15
16
  import { PremiumOverrideRequestDto } from './premium-override-request-dto';
16
17
  import { UploadedDocumentDto } from './uploaded-document-dto';
@@ -81,15 +82,9 @@ export interface CreateLeadRequestDto {
81
82
  */
82
83
  'paymentMethod': CreatePaymentMethodRequestDto;
83
84
  /**
84
- * Unique identifier of the partner that this object belongs to.
85
- * @type {string}
86
- * @memberof CreateLeadRequestDto
87
- */
88
- 'partnerCode'?: string;
89
- /**
90
- * Unique identifier of the partner role that this object belongs to.
91
- * @type {string}
85
+ * Optional partner object contains necessary information to link a partner to the policy.
86
+ * @type {LinkLeadPartnerRequestDto}
92
87
  * @memberof CreateLeadRequestDto
93
88
  */
94
- 'partnerRoleCode'?: string;
89
+ 'partner'?: LinkLeadPartnerRequestDto;
95
90
  }
@@ -27,4 +27,10 @@ export interface ForgotPasswordRequestDto {
27
27
  * @memberof ForgotPasswordRequestDto
28
28
  */
29
29
  'tenantSlug': string;
30
+ /**
31
+ * Another variant used for the template from the customer settings.
32
+ * @type {string}
33
+ * @memberof ForgotPasswordRequestDto
34
+ */
35
+ 'configVariant'?: string;
30
36
  }
@@ -43,6 +43,7 @@ export * from './invite-class';
43
43
  export * from './invoice-class';
44
44
  export * from './lead-bank-account-class';
45
45
  export * from './lead-class';
46
+ export * from './link-lead-partner-request-dto';
46
47
  export * from './list-customer-claims-response-class';
47
48
  export * from './list-documents-response-class';
48
49
  export * from './list-invoices-response-class';
@@ -59,6 +59,7 @@ __exportStar(require("./invite-class"), exports);
59
59
  __exportStar(require("./invoice-class"), exports);
60
60
  __exportStar(require("./lead-bank-account-class"), exports);
61
61
  __exportStar(require("./lead-class"), exports);
62
+ __exportStar(require("./link-lead-partner-request-dto"), exports);
62
63
  __exportStar(require("./list-customer-claims-response-class"), exports);
63
64
  __exportStar(require("./list-documents-response-class"), exports);
64
65
  __exportStar(require("./list-invoices-response-class"), exports);
@@ -27,4 +27,10 @@ export interface InviteByCustomerRequestDto {
27
27
  * @memberof InviteByCustomerRequestDto
28
28
  */
29
29
  'tenantSlug': string;
30
+ /**
31
+ * Another variant used for the template from the customer settings.
32
+ * @type {string}
33
+ * @memberof InviteByCustomerRequestDto
34
+ */
35
+ 'configVariant'?: string;
30
36
  }
@@ -21,4 +21,10 @@ export interface InviteByTenantRequestDto {
21
21
  * @memberof InviteByTenantRequestDto
22
22
  */
23
23
  'email': string;
24
+ /**
25
+ * Another variant used for the template from the customer settings.
26
+ * @type {string}
27
+ * @memberof InviteByTenantRequestDto
28
+ */
29
+ 'configVariant'?: string;
24
30
  }
@@ -16,13 +16,19 @@
16
16
  */
17
17
  export interface LeadBankAccountClass {
18
18
  /**
19
- * Account code place-holder.
19
+ * User account code associated with bank account.
20
20
  * @type {string}
21
21
  * @memberof LeadBankAccountClass
22
22
  */
23
23
  'accountCode': string;
24
24
  /**
25
- * Bank account IBAN.
25
+ * Partner code associated with bank account.
26
+ * @type {string}
27
+ * @memberof LeadBankAccountClass
28
+ */
29
+ 'partnerCode': string;
30
+ /**
31
+ * IBAN number for the bank account
26
32
  * @type {string}
27
33
  * @memberof LeadBankAccountClass
28
34
  */
@@ -125,6 +125,18 @@ export interface LeadClass {
125
125
  * @memberof LeadClass
126
126
  */
127
127
  'partnerLinks': Array<PartnerLinkClass>;
128
+ /**
129
+ * Identifier of the user who created the record.
130
+ * @type {string}
131
+ * @memberof LeadClass
132
+ */
133
+ 'createdBy': string;
134
+ /**
135
+ * Identifier of the user who last updated the record.
136
+ * @type {string}
137
+ * @memberof LeadClass
138
+ */
139
+ 'updatedBy': string;
128
140
  /**
129
141
  * Organization name.
130
142
  * @type {string}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * EMIL CustomerService
3
+ * The EMIL CustomerService 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
+ /**
13
+ *
14
+ * @export
15
+ * @interface LinkLeadPartnerRequestDto
16
+ */
17
+ export interface LinkLeadPartnerRequestDto {
18
+ /**
19
+ * The code of the partner with which the lead will be linked.
20
+ * @type {string}
21
+ * @memberof LinkLeadPartnerRequestDto
22
+ */
23
+ 'partnerCode': string;
24
+ /**
25
+ * The code of role that the partner will have in the established link between the lead and the partner.
26
+ * @type {string}
27
+ * @memberof LinkLeadPartnerRequestDto
28
+ */
29
+ 'partnerRoleCode': string;
30
+ /**
31
+ * The date of the start of linking with a partner.
32
+ * @type {string}
33
+ * @memberof LinkLeadPartnerRequestDto
34
+ */
35
+ 'startDate': string;
36
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL CustomerService
6
+ * The EMIL CustomerService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -69,4 +69,16 @@ export interface PartnerLinkClass {
69
69
  * @memberof PartnerLinkClass
70
70
  */
71
71
  'updatedAt': string;
72
+ /**
73
+ * Identifier of the user who created the record.
74
+ * @type {string}
75
+ * @memberof PartnerLinkClass
76
+ */
77
+ 'createdBy': string;
78
+ /**
79
+ * Identifier of the user who last updated the record.
80
+ * @type {string}
81
+ * @memberof PartnerLinkClass
82
+ */
83
+ 'updatedBy': string;
72
84
  }
@@ -33,4 +33,10 @@ export interface ResetPasswordByCustomerRequestDto {
33
33
  * @memberof ResetPasswordByCustomerRequestDto
34
34
  */
35
35
  'newPassword': string;
36
+ /**
37
+ * Another variant used for the template from the customer settings.
38
+ * @type {string}
39
+ * @memberof ResetPasswordByCustomerRequestDto
40
+ */
41
+ 'configVariant'?: string;
36
42
  }
@@ -21,13 +21,19 @@
21
21
  */
22
22
  export interface CreateBankAccountRequestDto {
23
23
  /**
24
- * Unique identifier of the account that this object belongs to.
24
+ * User account code associated with bank account.
25
25
  * @type {string}
26
26
  * @memberof CreateBankAccountRequestDto
27
27
  */
28
28
  'accountCode'?: string;
29
29
  /**
30
- * Bank account IBAN.
30
+ * Partner code associated with bank account.
31
+ * @type {string}
32
+ * @memberof CreateBankAccountRequestDto
33
+ */
34
+ 'partnerCode'?: string;
35
+ /**
36
+ * IBAN number for the bank account
31
37
  * @type {string}
32
38
  * @memberof CreateBankAccountRequestDto
33
39
  */
@@ -39,6 +39,12 @@ export interface CreateCustomerRequestDto {
39
39
  * @memberof CreateCustomerRequestDto
40
40
  */
41
41
  'isEulaAccepted': boolean;
42
+ /**
43
+ * Another variant used for the template from the customer settings.
44
+ * @type {string}
45
+ * @memberof CreateCustomerRequestDto
46
+ */
47
+ 'configVariant'?: string;
42
48
  /**
43
49
  * If the account does not exist yet, it will be created in the database.
44
50
  * @type {CreateAccountRequestDto}
@@ -15,6 +15,7 @@
15
15
 
16
16
  import { CreateBankAccountRequestDto } from './create-bank-account-request-dto';
17
17
  import { CreatePaymentMethodRequestDto } from './create-payment-method-request-dto';
18
+ import { LinkLeadPartnerRequestDto } from './link-lead-partner-request-dto';
18
19
  import { PolicyObjectDto } from './policy-object-dto';
19
20
  import { PremiumOverrideRequestDto } from './premium-override-request-dto';
20
21
  import { UploadedDocumentDto } from './uploaded-document-dto';
@@ -86,16 +87,10 @@ export interface CreateLeadRequestDto {
86
87
  */
87
88
  'paymentMethod': CreatePaymentMethodRequestDto;
88
89
  /**
89
- * Unique identifier of the partner that this object belongs to.
90
- * @type {string}
91
- * @memberof CreateLeadRequestDto
92
- */
93
- 'partnerCode'?: string;
94
- /**
95
- * Unique identifier of the partner role that this object belongs to.
96
- * @type {string}
90
+ * Optional partner object contains necessary information to link a partner to the policy.
91
+ * @type {LinkLeadPartnerRequestDto}
97
92
  * @memberof CreateLeadRequestDto
98
93
  */
99
- 'partnerRoleCode'?: string;
94
+ 'partner'?: LinkLeadPartnerRequestDto;
100
95
  }
101
96
 
@@ -32,5 +32,11 @@ export interface ForgotPasswordRequestDto {
32
32
  * @memberof ForgotPasswordRequestDto
33
33
  */
34
34
  'tenantSlug': string;
35
+ /**
36
+ * Another variant used for the template from the customer settings.
37
+ * @type {string}
38
+ * @memberof ForgotPasswordRequestDto
39
+ */
40
+ 'configVariant'?: string;
35
41
  }
36
42
 
package/models/index.ts CHANGED
@@ -43,6 +43,7 @@ export * from './invite-class';
43
43
  export * from './invoice-class';
44
44
  export * from './lead-bank-account-class';
45
45
  export * from './lead-class';
46
+ export * from './link-lead-partner-request-dto';
46
47
  export * from './list-customer-claims-response-class';
47
48
  export * from './list-documents-response-class';
48
49
  export * from './list-invoices-response-class';
@@ -32,5 +32,11 @@ export interface InviteByCustomerRequestDto {
32
32
  * @memberof InviteByCustomerRequestDto
33
33
  */
34
34
  'tenantSlug': string;
35
+ /**
36
+ * Another variant used for the template from the customer settings.
37
+ * @type {string}
38
+ * @memberof InviteByCustomerRequestDto
39
+ */
40
+ 'configVariant'?: string;
35
41
  }
36
42
 
@@ -26,5 +26,11 @@ export interface InviteByTenantRequestDto {
26
26
  * @memberof InviteByTenantRequestDto
27
27
  */
28
28
  'email': string;
29
+ /**
30
+ * Another variant used for the template from the customer settings.
31
+ * @type {string}
32
+ * @memberof InviteByTenantRequestDto
33
+ */
34
+ 'configVariant'?: string;
29
35
  }
30
36
 
@@ -21,13 +21,19 @@
21
21
  */
22
22
  export interface LeadBankAccountClass {
23
23
  /**
24
- * Account code place-holder.
24
+ * User account code associated with bank account.
25
25
  * @type {string}
26
26
  * @memberof LeadBankAccountClass
27
27
  */
28
28
  'accountCode': string;
29
29
  /**
30
- * Bank account IBAN.
30
+ * Partner code associated with bank account.
31
+ * @type {string}
32
+ * @memberof LeadBankAccountClass
33
+ */
34
+ 'partnerCode': string;
35
+ /**
36
+ * IBAN number for the bank account
31
37
  * @type {string}
32
38
  * @memberof LeadBankAccountClass
33
39
  */
@@ -130,6 +130,18 @@ export interface LeadClass {
130
130
  * @memberof LeadClass
131
131
  */
132
132
  'partnerLinks': Array<PartnerLinkClass>;
133
+ /**
134
+ * Identifier of the user who created the record.
135
+ * @type {string}
136
+ * @memberof LeadClass
137
+ */
138
+ 'createdBy': string;
139
+ /**
140
+ * Identifier of the user who last updated the record.
141
+ * @type {string}
142
+ * @memberof LeadClass
143
+ */
144
+ 'updatedBy': string;
133
145
  /**
134
146
  * Organization name.
135
147
  * @type {string}
@@ -0,0 +1,42 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL CustomerService
5
+ * The EMIL CustomerService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+
17
+ /**
18
+ *
19
+ * @export
20
+ * @interface LinkLeadPartnerRequestDto
21
+ */
22
+ export interface LinkLeadPartnerRequestDto {
23
+ /**
24
+ * The code of the partner with which the lead will be linked.
25
+ * @type {string}
26
+ * @memberof LinkLeadPartnerRequestDto
27
+ */
28
+ 'partnerCode': string;
29
+ /**
30
+ * The code of role that the partner will have in the established link between the lead and the partner.
31
+ * @type {string}
32
+ * @memberof LinkLeadPartnerRequestDto
33
+ */
34
+ 'partnerRoleCode': string;
35
+ /**
36
+ * The date of the start of linking with a partner.
37
+ * @type {string}
38
+ * @memberof LinkLeadPartnerRequestDto
39
+ */
40
+ 'startDate': string;
41
+ }
42
+
@@ -74,5 +74,17 @@ export interface PartnerLinkClass {
74
74
  * @memberof PartnerLinkClass
75
75
  */
76
76
  'updatedAt': string;
77
+ /**
78
+ * Identifier of the user who created the record.
79
+ * @type {string}
80
+ * @memberof PartnerLinkClass
81
+ */
82
+ 'createdBy': string;
83
+ /**
84
+ * Identifier of the user who last updated the record.
85
+ * @type {string}
86
+ * @memberof PartnerLinkClass
87
+ */
88
+ 'updatedBy': string;
77
89
  }
78
90
 
@@ -38,5 +38,11 @@ export interface ResetPasswordByCustomerRequestDto {
38
38
  * @memberof ResetPasswordByCustomerRequestDto
39
39
  */
40
40
  'newPassword': string;
41
+ /**
42
+ * Another variant used for the template from the customer settings.
43
+ * @type {string}
44
+ * @memberof ResetPasswordByCustomerRequestDto
45
+ */
46
+ 'configVariant'?: string;
41
47
  }
42
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/customer-sdk-node",
3
- "version": "1.34.0",
3
+ "version": "1.36.0",
4
4
  "description": "OpenAPI client for @emilgroup/customer-sdk-node",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [
@@ -23,7 +23,7 @@
23
23
  "url": "^0.11.0"
24
24
  },
25
25
  "devDependencies": {
26
- "@types/node": "^12.11.5",
26
+ "@types/node": "^12.11.5",
27
27
  "typescript": "^4.0"
28
28
  }
29
29
  }