@emilgroup/customer-sdk-node 1.0.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/.openapi-generator/FILES +8 -4
  2. package/README.md +12 -12
  3. package/api/customers-api.ts +304 -114
  4. package/base.ts +57 -43
  5. package/dist/api/customers-api.d.ts +180 -76
  6. package/dist/api/customers-api.js +249 -89
  7. package/dist/base.d.ts +3 -0
  8. package/dist/base.js +75 -42
  9. package/dist/models/{login-request-dto.d.ts → authentication-result-class.d.ts} +8 -14
  10. package/dist/models/{invite-customer-request-dto.js → authentication-result-class.js} +0 -0
  11. package/dist/models/index.d.ts +8 -4
  12. package/dist/models/index.js +8 -4
  13. package/dist/models/initiate-auth-request-dto.d.ts +36 -0
  14. package/dist/models/{invite-customer-response-class.js → initiate-auth-request-dto.js} +0 -0
  15. package/dist/models/initiate-auth-response-class.d.ts +43 -0
  16. package/dist/models/{login-request-dto.js → initiate-auth-response-class.js} +0 -0
  17. package/dist/models/{invite-customer-request-dto.d.ts → invite-by-customer-request-dto.d.ts} +6 -6
  18. package/dist/models/{login-response-class.js → invite-by-customer-request-dto.js} +0 -0
  19. package/dist/models/invite-by-customer-response-class.d.ts +25 -0
  20. package/dist/models/invite-by-customer-response-class.js +15 -0
  21. package/dist/models/{invite-customer-response-class.d.ts → invite-by-tenant-response-class.d.ts} +3 -3
  22. package/dist/models/invite-by-tenant-response-class.js +15 -0
  23. package/dist/models/respond-to-auth-challenge-class.d.ts +43 -0
  24. package/dist/models/respond-to-auth-challenge-class.js +15 -0
  25. package/dist/models/respond-to-auth-challenge-request-dto.d.ts +42 -0
  26. package/dist/models/respond-to-auth-challenge-request-dto.js +15 -0
  27. package/models/{login-request-dto.ts → authentication-result-class.ts} +8 -14
  28. package/models/index.ts +8 -4
  29. package/models/initiate-auth-request-dto.ts +42 -0
  30. package/models/initiate-auth-response-class.ts +49 -0
  31. package/models/{invite-customer-request-dto.ts → invite-by-customer-request-dto.ts} +6 -6
  32. package/models/invite-by-customer-response-class.ts +31 -0
  33. package/models/{invite-customer-response-class.ts → invite-by-tenant-response-class.ts} +3 -3
  34. package/models/respond-to-auth-challenge-class.ts +49 -0
  35. package/models/respond-to-auth-challenge-request-dto.ts +48 -0
  36. package/package.json +1 -1
  37. package/dist/models/login-response-class.d.ts +0 -30
  38. package/models/login-response-class.ts +0 -36
package/dist/base.js CHANGED
@@ -38,6 +38,29 @@ var __assign = (this && this.__assign) || function () {
38
38
  };
39
39
  return __assign.apply(this, arguments);
40
40
  };
41
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
42
+ if (k2 === undefined) k2 = k;
43
+ var desc = Object.getOwnPropertyDescriptor(m, k);
44
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
45
+ desc = { enumerable: true, get: function() { return m[k]; } };
46
+ }
47
+ Object.defineProperty(o, k2, desc);
48
+ }) : (function(o, m, k, k2) {
49
+ if (k2 === undefined) k2 = k;
50
+ o[k2] = m[k];
51
+ }));
52
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
53
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
54
+ }) : function(o, v) {
55
+ o["default"] = v;
56
+ });
57
+ var __importStar = (this && this.__importStar) || function (mod) {
58
+ if (mod && mod.__esModule) return mod;
59
+ var result = {};
60
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
61
+ __setModuleDefault(result, mod);
62
+ return result;
63
+ };
41
64
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
65
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
66
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -83,7 +106,14 @@ var configuration_1 = require("./configuration");
83
106
  // Some imports not used depending on template conditions
84
107
  // @ts-ignore
85
108
  var axios_1 = __importDefault(require("axios"));
86
- exports.BASE_PATH = "http://localhost".replace(/\/+$/, "");
109
+ var path = __importStar(require("path"));
110
+ var os = __importStar(require("os"));
111
+ exports.BASE_PATH = "https://apiv2.emil.de".replace(/\/+$/, "");
112
+ var CONFIG_DIRECTORY = '.emil';
113
+ var CONFIG_FILENAME = 'credentials';
114
+ var KEY_USERNAME = 'emil_username';
115
+ var KEY_PASSWORD = 'emil_password';
116
+ var filePath = os.homedir() + path.sep + CONFIG_DIRECTORY + path.sep + CONFIG_FILENAME;
87
117
  /**
88
118
  *
89
119
  * @export
@@ -108,7 +138,6 @@ var BaseAPI = /** @class */ (function () {
108
138
  function BaseAPI(configuration, basePath, axios) {
109
139
  if (basePath === void 0) { basePath = exports.BASE_PATH; }
110
140
  if (axios === void 0) { axios = axios_1.default; }
111
- var _this = this;
112
141
  this.basePath = basePath;
113
142
  this.axios = axios;
114
143
  if (configuration) {
@@ -120,44 +149,7 @@ var BaseAPI = /** @class */ (function () {
120
149
  basePath: this.basePath,
121
150
  });
122
151
  }
123
- axios.interceptors.response.use(function (res) {
124
- return res;
125
- }, function (err) { return __awaiter(_this, void 0, void 0, function () {
126
- var originalConfig, tokenString, accessToken, localVarHeaderParameter, _error_1;
127
- return __generator(this, function (_a) {
128
- switch (_a.label) {
129
- case 0:
130
- originalConfig = err.config;
131
- if (!err.response) return [3 /*break*/, 5];
132
- if (!(err.response.status === 401 && !originalConfig._retry)) return [3 /*break*/, 4];
133
- originalConfig._retry = true;
134
- _a.label = 1;
135
- case 1:
136
- _a.trys.push([1, 3, , 4]);
137
- return [4 /*yield*/, this.refreshTokenInternal()];
138
- case 2:
139
- tokenString = _a.sent();
140
- accessToken = "Bearer ".concat(tokenString);
141
- localVarHeaderParameter = {};
142
- localVarHeaderParameter['Authorization'] = accessToken;
143
- originalConfig.headers = __assign(__assign({}, originalConfig.headers), localVarHeaderParameter);
144
- this.configuration.accessToken = accessToken;
145
- return [2 /*return*/, axios(originalConfig)];
146
- case 3:
147
- _error_1 = _a.sent();
148
- if (_error_1.response && _error_1.response.data) {
149
- return [2 /*return*/, Promise.reject(_error_1.response.data)];
150
- }
151
- return [2 /*return*/, Promise.reject(_error_1)];
152
- case 4:
153
- if (err.response.status === 403 && err.response.data) {
154
- return [2 /*return*/, Promise.reject(err.response.data)];
155
- }
156
- _a.label = 5;
157
- case 5: return [2 /*return*/, Promise.reject(err)];
158
- }
159
- });
160
- }); });
152
+ this.attachInterceptor(axios);
161
153
  }
162
154
  BaseAPI.prototype.selectEnvironment = function (env) {
163
155
  this.configuration.basePath = env;
@@ -170,7 +162,7 @@ var BaseAPI = /** @class */ (function () {
170
162
  case 0:
171
163
  options = {
172
164
  method: 'POST',
173
- url: "".concat(Environment.Test, "/v1/customers/login"),
165
+ url: "".concat(this.configuration.basePath, "/v1/customers/login"),
174
166
  headers: { 'Content-Type': 'application/json' },
175
167
  data: {
176
168
  username: username,
@@ -205,7 +197,7 @@ var BaseAPI = /** @class */ (function () {
205
197
  }
206
198
  options = {
207
199
  method: 'POST',
208
- url: "".concat(Environment.Test, "/v1/customers/refresh-token"),
200
+ url: "".concat(this.configuration.basePath, "/v1/customers/refresh-token"),
209
201
  headers: {
210
202
  'Content-Type': 'application/json',
211
203
  Cookie: refreshToken,
@@ -228,6 +220,47 @@ var BaseAPI = /** @class */ (function () {
228
220
  }
229
221
  return '';
230
222
  };
223
+ BaseAPI.prototype.attachInterceptor = function (axios) {
224
+ var _this = this;
225
+ axios.interceptors.response.use(function (res) {
226
+ return res;
227
+ }, function (err) { return __awaiter(_this, void 0, void 0, function () {
228
+ var originalConfig, tokenString, accessToken, localVarHeaderParameter, _error_1;
229
+ return __generator(this, function (_a) {
230
+ switch (_a.label) {
231
+ case 0:
232
+ originalConfig = err.config;
233
+ if (!err.response) return [3 /*break*/, 5];
234
+ if (!(err.response.status === 401 && !originalConfig._retry)) return [3 /*break*/, 4];
235
+ originalConfig._retry = true;
236
+ _a.label = 1;
237
+ case 1:
238
+ _a.trys.push([1, 3, , 4]);
239
+ return [4 /*yield*/, this.refreshTokenInternal()];
240
+ case 2:
241
+ tokenString = _a.sent();
242
+ accessToken = "Bearer ".concat(tokenString);
243
+ localVarHeaderParameter = {};
244
+ localVarHeaderParameter['Authorization'] = accessToken;
245
+ originalConfig.headers = __assign(__assign({}, originalConfig.headers), localVarHeaderParameter);
246
+ this.configuration.accessToken = accessToken;
247
+ return [2 /*return*/, axios(originalConfig)];
248
+ case 3:
249
+ _error_1 = _a.sent();
250
+ if (_error_1.response && _error_1.response.data) {
251
+ return [2 /*return*/, Promise.reject(_error_1.response.data)];
252
+ }
253
+ return [2 /*return*/, Promise.reject(_error_1)];
254
+ case 4:
255
+ if (err.response.status === 403 && err.response.data) {
256
+ return [2 /*return*/, Promise.reject(err.response.data)];
257
+ }
258
+ _a.label = 5;
259
+ case 5: return [2 /*return*/, Promise.reject(err)];
260
+ }
261
+ });
262
+ }); });
263
+ };
231
264
  return BaseAPI;
232
265
  }());
233
266
  exports.BaseAPI = BaseAPI;
@@ -12,25 +12,19 @@
12
12
  /**
13
13
  *
14
14
  * @export
15
- * @interface LoginRequestDto
15
+ * @interface AuthenticationResultClass
16
16
  */
17
- export interface LoginRequestDto {
17
+ export interface AuthenticationResultClass {
18
18
  /**
19
- *
19
+ * Access token, contains the customer identity
20
20
  * @type {string}
21
- * @memberof LoginRequestDto
21
+ * @memberof AuthenticationResultClass
22
22
  */
23
- 'username': string;
23
+ 'accessToken': string;
24
24
  /**
25
- *
25
+ * Refresh token, does not contain user info
26
26
  * @type {string}
27
- * @memberof LoginRequestDto
27
+ * @memberof AuthenticationResultClass
28
28
  */
29
- 'password': string;
30
- /**
31
- *
32
- * @type {string}
33
- * @memberof LoginRequestDto
34
- */
35
- 'tenantSlug': string;
29
+ 'refreshToken': string;
36
30
  }
@@ -1,15 +1,17 @@
1
+ export * from './authentication-result-class';
1
2
  export * from './create-account-request-dto';
2
3
  export * from './create-customer-request-dto';
3
4
  export * from './create-customer-response-class';
4
5
  export * from './forgot-password-request-dto';
5
6
  export * from './get-policy-response-class';
7
+ export * from './initiate-auth-request-dto';
8
+ export * from './initiate-auth-response-class';
9
+ export * from './invite-by-customer-request-dto';
10
+ export * from './invite-by-customer-response-class';
11
+ export * from './invite-by-tenant-response-class';
6
12
  export * from './invite-class';
7
- export * from './invite-customer-request-dto';
8
- export * from './invite-customer-response-class';
9
13
  export * from './list-invoices-response-class';
10
14
  export * from './list-policies-response-class';
11
- export * from './login-request-dto';
12
- export * from './login-response-class';
13
15
  export * from './policy-class';
14
16
  export * from './policy-object-class';
15
17
  export * from './policy-premium-class';
@@ -17,5 +19,7 @@ export * from './policy-premium-item-class';
17
19
  export * from './policy-version-class';
18
20
  export * from './refresh-token-dto';
19
21
  export * from './reset-password-by-customer-request-dto';
22
+ export * from './respond-to-auth-challenge-class';
23
+ export * from './respond-to-auth-challenge-request-dto';
20
24
  export * from './timeslice-class';
21
25
  export * from './verify-customer-invite-response-class';
@@ -14,18 +14,20 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./authentication-result-class"), exports);
17
18
  __exportStar(require("./create-account-request-dto"), exports);
18
19
  __exportStar(require("./create-customer-request-dto"), exports);
19
20
  __exportStar(require("./create-customer-response-class"), exports);
20
21
  __exportStar(require("./forgot-password-request-dto"), exports);
21
22
  __exportStar(require("./get-policy-response-class"), exports);
23
+ __exportStar(require("./initiate-auth-request-dto"), exports);
24
+ __exportStar(require("./initiate-auth-response-class"), exports);
25
+ __exportStar(require("./invite-by-customer-request-dto"), exports);
26
+ __exportStar(require("./invite-by-customer-response-class"), exports);
27
+ __exportStar(require("./invite-by-tenant-response-class"), exports);
22
28
  __exportStar(require("./invite-class"), exports);
23
- __exportStar(require("./invite-customer-request-dto"), exports);
24
- __exportStar(require("./invite-customer-response-class"), exports);
25
29
  __exportStar(require("./list-invoices-response-class"), exports);
26
30
  __exportStar(require("./list-policies-response-class"), exports);
27
- __exportStar(require("./login-request-dto"), exports);
28
- __exportStar(require("./login-response-class"), exports);
29
31
  __exportStar(require("./policy-class"), exports);
30
32
  __exportStar(require("./policy-object-class"), exports);
31
33
  __exportStar(require("./policy-premium-class"), exports);
@@ -33,5 +35,7 @@ __exportStar(require("./policy-premium-item-class"), exports);
33
35
  __exportStar(require("./policy-version-class"), exports);
34
36
  __exportStar(require("./refresh-token-dto"), exports);
35
37
  __exportStar(require("./reset-password-by-customer-request-dto"), exports);
38
+ __exportStar(require("./respond-to-auth-challenge-class"), exports);
39
+ __exportStar(require("./respond-to-auth-challenge-request-dto"), exports);
36
40
  __exportStar(require("./timeslice-class"), exports);
37
41
  __exportStar(require("./verify-customer-invite-response-class"), exports);
@@ -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
+ *
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 InitiateAuthRequestDto
16
+ */
17
+ export interface InitiateAuthRequestDto {
18
+ /**
19
+ * Auth flow for the authentication process
20
+ * @type {string}
21
+ * @memberof InitiateAuthRequestDto
22
+ */
23
+ 'authFlow': string;
24
+ /**
25
+ * Auth flow parameters for the authentication process
26
+ * @type {object}
27
+ * @memberof InitiateAuthRequestDto
28
+ */
29
+ 'authParameters'?: object;
30
+ /**
31
+ * Tenant slug
32
+ * @type {string}
33
+ * @memberof InitiateAuthRequestDto
34
+ */
35
+ 'tenantSlug': string;
36
+ }
@@ -0,0 +1,43 @@
1
+ /**
2
+ * EMIL CustomerService
3
+ * The EMIL CustomerService API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { AuthenticationResultClass } from './authentication-result-class';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface InitiateAuthResponseClass
17
+ */
18
+ export interface InitiateAuthResponseClass {
19
+ /**
20
+ * Authentication Result
21
+ * @type {AuthenticationResultClass}
22
+ * @memberof InitiateAuthResponseClass
23
+ */
24
+ 'authenticationResult': AuthenticationResultClass;
25
+ /**
26
+ * Challenge name
27
+ * @type {string}
28
+ * @memberof InitiateAuthResponseClass
29
+ */
30
+ 'challengeName': string;
31
+ /**
32
+ * MFA Challenge parameters
33
+ * @type {object}
34
+ * @memberof InitiateAuthResponseClass
35
+ */
36
+ 'challengeParameters': object;
37
+ /**
38
+ * session
39
+ * @type {string}
40
+ * @memberof InitiateAuthResponseClass
41
+ */
42
+ 'session': string;
43
+ }
@@ -12,19 +12,19 @@
12
12
  /**
13
13
  *
14
14
  * @export
15
- * @interface InviteCustomerRequestDto
15
+ * @interface InviteByCustomerRequestDto
16
16
  */
17
- export interface InviteCustomerRequestDto {
17
+ export interface InviteByCustomerRequestDto {
18
18
  /**
19
19
  * User\'s email address
20
20
  * @type {string}
21
- * @memberof InviteCustomerRequestDto
21
+ * @memberof InviteByCustomerRequestDto
22
22
  */
23
23
  'email': string;
24
24
  /**
25
- * Account code
25
+ * Tenant slug
26
26
  * @type {string}
27
- * @memberof InviteCustomerRequestDto
27
+ * @memberof InviteByCustomerRequestDto
28
28
  */
29
- 'accountCode'?: string;
29
+ 'tenantSlug': string;
30
30
  }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * EMIL CustomerService
3
+ * The EMIL CustomerService API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { InviteClass } from './invite-class';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface InviteByCustomerResponseClass
17
+ */
18
+ export interface InviteByCustomerResponseClass {
19
+ /**
20
+ * invite
21
+ * @type {InviteClass}
22
+ * @memberof InviteByCustomerResponseClass
23
+ */
24
+ 'invite': InviteClass;
25
+ }
@@ -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
+ *
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 });
@@ -13,13 +13,13 @@ import { InviteClass } from './invite-class';
13
13
  /**
14
14
  *
15
15
  * @export
16
- * @interface InviteCustomerResponseClass
16
+ * @interface InviteByTenantResponseClass
17
17
  */
18
- export interface InviteCustomerResponseClass {
18
+ export interface InviteByTenantResponseClass {
19
19
  /**
20
20
  * invite
21
21
  * @type {InviteClass}
22
- * @memberof InviteCustomerResponseClass
22
+ * @memberof InviteByTenantResponseClass
23
23
  */
24
24
  'invite': InviteClass;
25
25
  }
@@ -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
+ *
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 });
@@ -0,0 +1,43 @@
1
+ /**
2
+ * EMIL CustomerService
3
+ * The EMIL CustomerService API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { AuthenticationResultClass } from './authentication-result-class';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface RespondToAuthChallengeClass
17
+ */
18
+ export interface RespondToAuthChallengeClass {
19
+ /**
20
+ * Authentication Result
21
+ * @type {AuthenticationResultClass}
22
+ * @memberof RespondToAuthChallengeClass
23
+ */
24
+ 'authenticationResult': AuthenticationResultClass;
25
+ /**
26
+ * Challenge name
27
+ * @type {string}
28
+ * @memberof RespondToAuthChallengeClass
29
+ */
30
+ 'challengeName': string;
31
+ /**
32
+ * MFA Challenge
33
+ * @type {object}
34
+ * @memberof RespondToAuthChallengeClass
35
+ */
36
+ 'challengeParameters': object;
37
+ /**
38
+ * session
39
+ * @type {string}
40
+ * @memberof RespondToAuthChallengeClass
41
+ */
42
+ 'session': string;
43
+ }
@@ -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
+ *
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 });
@@ -0,0 +1,42 @@
1
+ /**
2
+ * EMIL CustomerService
3
+ * The EMIL CustomerService API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface RespondToAuthChallengeRequestDto
16
+ */
17
+ export interface RespondToAuthChallengeRequestDto {
18
+ /**
19
+ * Auth flow for the authentication process
20
+ * @type {string}
21
+ * @memberof RespondToAuthChallengeRequestDto
22
+ */
23
+ 'session'?: string;
24
+ /**
25
+ * Responses for the challenges sent during last challenge
26
+ * @type {object}
27
+ * @memberof RespondToAuthChallengeRequestDto
28
+ */
29
+ 'challengeResponses'?: object;
30
+ /**
31
+ * Challenge name
32
+ * @type {string}
33
+ * @memberof RespondToAuthChallengeRequestDto
34
+ */
35
+ 'challengeName': string;
36
+ /**
37
+ * Tenant slug
38
+ * @type {string}
39
+ * @memberof RespondToAuthChallengeRequestDto
40
+ */
41
+ 'tenantSlug': string;
42
+ }
@@ -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
+ *
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 });
@@ -17,26 +17,20 @@
17
17
  /**
18
18
  *
19
19
  * @export
20
- * @interface LoginRequestDto
20
+ * @interface AuthenticationResultClass
21
21
  */
22
- export interface LoginRequestDto {
22
+ export interface AuthenticationResultClass {
23
23
  /**
24
- *
24
+ * Access token, contains the customer identity
25
25
  * @type {string}
26
- * @memberof LoginRequestDto
26
+ * @memberof AuthenticationResultClass
27
27
  */
28
- 'username': string;
28
+ 'accessToken': string;
29
29
  /**
30
- *
30
+ * Refresh token, does not contain user info
31
31
  * @type {string}
32
- * @memberof LoginRequestDto
32
+ * @memberof AuthenticationResultClass
33
33
  */
34
- 'password': string;
35
- /**
36
- *
37
- * @type {string}
38
- * @memberof LoginRequestDto
39
- */
40
- 'tenantSlug': string;
34
+ 'refreshToken': string;
41
35
  }
42
36
 
package/models/index.ts CHANGED
@@ -1,15 +1,17 @@
1
+ export * from './authentication-result-class';
1
2
  export * from './create-account-request-dto';
2
3
  export * from './create-customer-request-dto';
3
4
  export * from './create-customer-response-class';
4
5
  export * from './forgot-password-request-dto';
5
6
  export * from './get-policy-response-class';
7
+ export * from './initiate-auth-request-dto';
8
+ export * from './initiate-auth-response-class';
9
+ export * from './invite-by-customer-request-dto';
10
+ export * from './invite-by-customer-response-class';
11
+ export * from './invite-by-tenant-response-class';
6
12
  export * from './invite-class';
7
- export * from './invite-customer-request-dto';
8
- export * from './invite-customer-response-class';
9
13
  export * from './list-invoices-response-class';
10
14
  export * from './list-policies-response-class';
11
- export * from './login-request-dto';
12
- export * from './login-response-class';
13
15
  export * from './policy-class';
14
16
  export * from './policy-object-class';
15
17
  export * from './policy-premium-class';
@@ -17,5 +19,7 @@ export * from './policy-premium-item-class';
17
19
  export * from './policy-version-class';
18
20
  export * from './refresh-token-dto';
19
21
  export * from './reset-password-by-customer-request-dto';
22
+ export * from './respond-to-auth-challenge-class';
23
+ export * from './respond-to-auth-challenge-request-dto';
20
24
  export * from './timeslice-class';
21
25
  export * from './verify-customer-invite-response-class';