@emilgroup/public-api-sdk-node 1.0.0 → 1.0.2

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 (49) hide show
  1. package/.openapi-generator/FILES +5 -1
  2. package/README.md +22 -5
  3. package/api/documents-api.ts +4 -0
  4. package/api/notifications-api.ts +163 -0
  5. package/api/payment-setup-api.ts +4 -0
  6. package/api/products-api.ts +139 -20
  7. package/api.ts +6 -0
  8. package/base.ts +93 -57
  9. package/common.ts +1 -0
  10. package/configuration.ts +8 -0
  11. package/dist/api/documents-api.js +7 -3
  12. package/dist/api/notifications-api.d.ts +92 -0
  13. package/dist/api/notifications-api.js +224 -0
  14. package/dist/api/payment-setup-api.js +6 -2
  15. package/dist/api/products-api.d.ts +72 -11
  16. package/dist/api/products-api.js +127 -27
  17. package/dist/api.d.ts +1 -0
  18. package/dist/api.js +1 -0
  19. package/dist/base.d.ts +9 -5
  20. package/dist/base.js +136 -37
  21. package/dist/common.d.ts +1 -0
  22. package/dist/common.js +2 -1
  23. package/dist/configuration.d.ts +7 -0
  24. package/dist/models/create-account-request-dto.d.ts +12 -0
  25. package/dist/models/create-custom-application-request-dto.d.ts +1 -0
  26. package/dist/models/create-custom-application-request-dto.js +2 -1
  27. package/dist/models/create-estimated-invoice-request-dto.d.ts +14 -6
  28. package/dist/models/create-estimated-invoice-request-dto.js +2 -1
  29. package/dist/models/create-lead-request-dto.d.ts +7 -0
  30. package/dist/models/index.d.ts +4 -0
  31. package/dist/models/index.js +4 -0
  32. package/dist/models/premium-override-dto.d.ts +53 -0
  33. package/dist/models/premium-override-dto.js +25 -0
  34. package/dist/models/premium-override-request-dto.d.ts +25 -0
  35. package/dist/models/premium-override-request-dto.js +15 -0
  36. package/dist/models/send-notification-request-dto.d.ts +36 -0
  37. package/dist/models/send-notification-request-dto.js +15 -0
  38. package/dist/models/update-lead-request-dto.d.ts +84 -0
  39. package/dist/models/update-lead-request-dto.js +22 -0
  40. package/models/create-account-request-dto.ts +12 -0
  41. package/models/create-custom-application-request-dto.ts +2 -1
  42. package/models/create-estimated-invoice-request-dto.ts +15 -7
  43. package/models/create-lead-request-dto.ts +7 -0
  44. package/models/index.ts +4 -0
  45. package/models/premium-override-dto.ts +63 -0
  46. package/models/premium-override-request-dto.ts +31 -0
  47. package/models/send-notification-request-dto.ts +42 -0
  48. package/models/update-lead-request-dto.ts +93 -0
  49. package/package.json +5 -3
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) {
@@ -80,11 +103,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
80
103
  Object.defineProperty(exports, "__esModule", { value: true });
81
104
  exports.RequiredError = exports.BaseAPI = exports.resetRetry = exports.Environment = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
82
105
  var configuration_1 = require("./configuration");
83
- var common_1 = require("./common");
84
106
  // Some imports not used depending on template conditions
85
107
  // @ts-ignore
86
108
  var axios_1 = __importDefault(require("axios"));
109
+ var fs = __importStar(require("fs"));
110
+ var path = __importStar(require("path"));
111
+ var os = __importStar(require("os"));
87
112
  exports.BASE_PATH = "https://apiv2.emil.de".replace(/\/+$/, "");
113
+ var CONFIG_DIRECTORY = '.emil';
114
+ var CONFIG_FILENAME = 'credentials';
115
+ var KEY_USERNAME = 'emil_username';
116
+ var KEY_PASSWORD = 'emil_password';
117
+ var filePath = os.homedir() + path.sep + CONFIG_DIRECTORY + path.sep + CONFIG_FILENAME;
88
118
  /**
89
119
  *
90
120
  * @export
@@ -107,7 +137,6 @@ function resetRetry() {
107
137
  }
108
138
  exports.resetRetry = resetRetry;
109
139
  var NETWORK_ERROR_MESSAGE = "Network Error";
110
- var TOKEN_DATA = 'APP_TOKEN';
111
140
  /**
112
141
  *
113
142
  * @export
@@ -119,27 +148,101 @@ var BaseAPI = /** @class */ (function () {
119
148
  if (axios === void 0) { axios = axios_1.default; }
120
149
  this.basePath = basePath;
121
150
  this.axios = axios;
122
- this.loadTokenData();
123
151
  if (configuration) {
124
152
  this.configuration = configuration;
125
153
  this.basePath = configuration.basePath || this.basePath;
126
154
  }
127
155
  else {
128
- var _a = this.tokenData, accessToken = _a.accessToken, username = _a.username;
129
156
  this.configuration = new configuration_1.Configuration({
130
157
  basePath: this.basePath,
131
- accessToken: accessToken ? "Bearer ".concat(accessToken) : '',
132
- username: username,
133
158
  });
134
159
  }
135
160
  this.attachInterceptor(axios);
136
161
  }
162
+ BaseAPI.prototype.initialize = function (env) {
163
+ if (env === void 0) { env = Environment.Production; }
164
+ return __awaiter(this, void 0, void 0, function () {
165
+ return __generator(this, function (_a) {
166
+ switch (_a.label) {
167
+ case 0:
168
+ this.configuration.basePath = env;
169
+ return [4 /*yield*/, this.loadCredentials()];
170
+ case 1:
171
+ _a.sent();
172
+ if (!this.username) return [3 /*break*/, 3];
173
+ return [4 /*yield*/, this.authorize(this.username, this.password)];
174
+ case 2:
175
+ _a.sent();
176
+ this.password = null; // to avoid keeping password loaded in memory.
177
+ _a.label = 3;
178
+ case 3: return [2 /*return*/];
179
+ }
180
+ });
181
+ });
182
+ };
183
+ BaseAPI.prototype.loadCredentials = function () {
184
+ return __awaiter(this, void 0, void 0, function () {
185
+ var error_1;
186
+ return __generator(this, function (_a) {
187
+ switch (_a.label) {
188
+ case 0:
189
+ _a.trys.push([0, 2, , 3]);
190
+ return [4 /*yield*/, this.readConfigFile()];
191
+ case 1:
192
+ _a.sent();
193
+ return [3 /*break*/, 3];
194
+ case 2:
195
+ error_1 = _a.sent();
196
+ console.warn("No credentials file found. Check that ".concat(filePath, " exists."));
197
+ return [3 /*break*/, 3];
198
+ case 3:
199
+ this.readEnvVariables();
200
+ if (!this.username) {
201
+ console.info("No credentials found in credentials file or environment variables. Either provide some or use \n authorize() function.");
202
+ }
203
+ return [2 /*return*/];
204
+ }
205
+ });
206
+ });
207
+ };
208
+ BaseAPI.prototype.readConfigFile = function () {
209
+ return __awaiter(this, void 0, void 0, function () {
210
+ var file, lines;
211
+ var _this = this;
212
+ return __generator(this, function (_a) {
213
+ switch (_a.label) {
214
+ case 0: return [4 /*yield*/, fs.promises.readFile(filePath, 'utf-8')];
215
+ case 1:
216
+ file = _a.sent();
217
+ lines = file.split(os.EOL)
218
+ .filter(Boolean);
219
+ lines.forEach(function (line) {
220
+ if (line.startsWith(KEY_USERNAME)) {
221
+ _this.username = line.length > KEY_USERNAME.length + 1 ? line.substring(KEY_USERNAME.length + 1) : '';
222
+ }
223
+ else if (line.startsWith(KEY_PASSWORD)) {
224
+ _this.password = line.length > KEY_PASSWORD.length + 1 ? line.substring(KEY_PASSWORD.length + 1) : '';
225
+ }
226
+ });
227
+ return [2 /*return*/];
228
+ }
229
+ });
230
+ });
231
+ };
232
+ BaseAPI.prototype.readEnvVariables = function () {
233
+ if (process.env.EMIL_USERNAME) {
234
+ this.username = process.env.EMIL_USERNAME;
235
+ this.password = process.env.EMIL_PASSWORD || '';
236
+ return true;
237
+ }
238
+ return false;
239
+ };
137
240
  BaseAPI.prototype.selectEnvironment = function (env) {
138
241
  this.configuration.basePath = env;
139
242
  };
140
243
  BaseAPI.prototype.authorize = function (username, password) {
141
244
  return __awaiter(this, void 0, void 0, function () {
142
- var options, response, accessToken;
245
+ var options, response, accessToken, refreshToken;
143
246
  return __generator(this, function (_a) {
144
247
  switch (_a.label) {
145
248
  case 0:
@@ -159,9 +262,8 @@ var BaseAPI = /** @class */ (function () {
159
262
  accessToken = response.data.accessToken;
160
263
  this.configuration.username = username;
161
264
  this.configuration.accessToken = "Bearer ".concat(accessToken);
162
- this.tokenData.username = username;
163
- this.tokenData.accessToken = accessToken;
164
- this.storeTokenData(__assign({}, this.tokenData));
265
+ refreshToken = this.extractRefreshToken(response);
266
+ this.configuration.refreshToken = refreshToken;
165
267
  return [2 /*return*/];
166
268
  }
167
269
  });
@@ -169,12 +271,12 @@ var BaseAPI = /** @class */ (function () {
169
271
  };
170
272
  BaseAPI.prototype.refreshToken = function () {
171
273
  return __awaiter(this, void 0, void 0, function () {
172
- var username, options, accessToken;
173
- return __generator(this, function (_a) {
174
- switch (_a.label) {
274
+ var _a, username, refreshToken, options, accessToken;
275
+ return __generator(this, function (_b) {
276
+ switch (_b.label) {
175
277
  case 0:
176
- username = this.configuration.username;
177
- if (!username) {
278
+ _a = this.configuration, username = _a.username, refreshToken = _a.refreshToken;
279
+ if (!username || !refreshToken) {
178
280
  return [2 /*return*/, ''];
179
281
  }
180
282
  options = {
@@ -182,30 +284,28 @@ var BaseAPI = /** @class */ (function () {
182
284
  url: "".concat(this.configuration.basePath, "/authservice/v1/refresh-token"),
183
285
  headers: {
184
286
  'Content-Type': 'application/json',
287
+ Cookie: refreshToken,
185
288
  },
186
289
  data: { username: username },
187
290
  withCredentials: true,
188
291
  };
189
292
  return [4 /*yield*/, axios_1.default.request(options)];
190
293
  case 1:
191
- accessToken = (_a.sent()).data.accessToken;
294
+ accessToken = (_b.sent()).data.accessToken;
192
295
  return [2 /*return*/, accessToken];
193
296
  }
194
297
  });
195
298
  });
196
299
  };
197
- BaseAPI.prototype.storeTokenData = function (tokenData) {
198
- if (typeof window !== 'undefined') {
199
- (0, common_1.defaultStorage)().set(TOKEN_DATA, tokenData);
200
- }
201
- };
202
- BaseAPI.prototype.loadTokenData = function () {
203
- if (typeof window !== 'undefined') {
204
- this.tokenData = (0, common_1.defaultStorage)().get(TOKEN_DATA) || {};
300
+ BaseAPI.prototype.extractRefreshToken = function (response) {
301
+ if (response.headers && response.headers['set-cookie']
302
+ && response.headers['set-cookie'].length > 0) {
303
+ return "".concat(response.headers['set-cookie'][0].split(';')[0], ";");
205
304
  }
305
+ return '';
206
306
  };
207
- BaseAPI.prototype.cleanTokenData = function () {
208
- this.storeTokenData(null);
307
+ BaseAPI.prototype.getConfiguration = function () {
308
+ return this.configuration;
209
309
  };
210
310
  BaseAPI.prototype.attachInterceptor = function (axios) {
211
311
  var _this = this;
@@ -217,9 +317,8 @@ var BaseAPI = /** @class */ (function () {
217
317
  switch (_a.label) {
218
318
  case 0:
219
319
  originalConfig = err.config;
220
- if (!(err.response && !(err.response instanceof XMLHttpRequest))) return [3 /*break*/, 5];
221
- if (!((err.response.status === 401 || err.response.status === 403)
222
- && !originalConfig._retry)) return [3 /*break*/, 4];
320
+ if (!err.response) return [3 /*break*/, 5];
321
+ if (!(err.response.status === 401 && !originalConfig._retry)) return [3 /*break*/, 4];
223
322
  originalConfig._retry = true;
224
323
  _a.label = 1;
225
324
  case 1:
@@ -228,21 +327,23 @@ var BaseAPI = /** @class */ (function () {
228
327
  case 2:
229
328
  tokenString = _a.sent();
230
329
  accessToken = "Bearer ".concat(tokenString);
231
- delete originalConfig.headers['Authorization'];
232
- originalConfig.headers['Authorization'] = accessToken;
330
+ originalConfig.headers['Authorization'] = "Bearer ".concat(accessToken);
233
331
  this.configuration.accessToken = accessToken;
234
- this.tokenData.accessToken = tokenString;
235
- this.storeTokenData(this.tokenData);
236
- return [2 /*return*/, axios(originalConfig)];
332
+ return [2 /*return*/, axios.request(originalConfig)];
237
333
  case 3:
238
334
  _error_1 = _a.sent();
239
335
  if (_error_1.response && _error_1.response.data) {
240
336
  return [2 /*return*/, Promise.reject(_error_1.response.data)];
241
337
  }
242
338
  return [2 /*return*/, Promise.reject(_error_1)];
243
- case 4: return [3 /*break*/, 9];
339
+ case 4:
340
+ if (err.response.status === 403 && err.response.data) {
341
+ return [2 /*return*/, Promise.reject(err.response.data)];
342
+ }
343
+ return [3 /*break*/, 9];
244
344
  case 5:
245
345
  if (!(err.message === NETWORK_ERROR_MESSAGE
346
+ && err.isAxiosError
246
347
  && originalConfig.headers.hasOwnProperty('Authorization')
247
348
  && _retry_count < 4)) return [3 /*break*/, 9];
248
349
  _retry_count++;
@@ -256,8 +357,6 @@ var BaseAPI = /** @class */ (function () {
256
357
  _retry = true;
257
358
  originalConfig.headers['Authorization'] = accessToken;
258
359
  this.configuration.accessToken = accessToken;
259
- this.tokenData.accessToken = tokenString;
260
- this.storeTokenData(this.tokenData);
261
360
  return [2 /*return*/, axios.request(__assign({}, originalConfig))];
262
361
  case 8:
263
362
  _error_2 = _a.sent();
package/dist/common.d.ts CHANGED
@@ -12,6 +12,7 @@
12
12
  import { Configuration } from "./configuration";
13
13
  import { RequestArgs } from "./base";
14
14
  import { AxiosInstance, AxiosResponse } from 'axios';
15
+ import { URL } from 'url';
15
16
  /**
16
17
  *
17
18
  * @export
package/dist/common.js CHANGED
@@ -62,6 +62,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
62
62
  Object.defineProperty(exports, "__esModule", { value: true });
63
63
  exports.defaultStorage = exports.LocalStorage = exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
64
64
  var base_1 = require("./base");
65
+ var url_1 = require("url");
65
66
  /**
66
67
  *
67
68
  * @export
@@ -187,7 +188,7 @@ var setSearchParams = function (url) {
187
188
  for (var _i = 1; _i < arguments.length; _i++) {
188
189
  objects[_i - 1] = arguments[_i];
189
190
  }
190
- var searchParams = new URLSearchParams(url.search);
191
+ var searchParams = new url_1.URLSearchParams(url.search);
191
192
  for (var _a = 0, objects_1 = objects; _a < objects_1.length; _a++) {
192
193
  var object = objects_1[_a];
193
194
  for (var key in object) {
@@ -68,6 +68,13 @@ export declare class Configuration {
68
68
  * @type {new () => FormData}
69
69
  */
70
70
  formDataCtor?: new () => any;
71
+ /**
72
+ * parameter for automatically refreshing access token for oauth2 security
73
+ *
74
+ * @type {string}
75
+ * @memberof Configuration
76
+ */
77
+ refreshToken?: string;
71
78
  constructor(param?: ConfigurationParameters);
72
79
  /**
73
80
  * Check if the given MIME is a JSON MIME.
@@ -81,6 +81,18 @@ export interface CreateAccountRequestDto {
81
81
  * @memberof CreateAccountRequestDto
82
82
  */
83
83
  'accountNumber': string;
84
+ /**
85
+ *
86
+ * @type {object}
87
+ * @memberof CreateAccountRequestDto
88
+ */
89
+ 'customFields'?: object;
90
+ /**
91
+ *
92
+ * @type {object}
93
+ * @memberof CreateAccountRequestDto
94
+ */
95
+ 'metadata'?: object;
84
96
  }
85
97
  export declare const CreateAccountRequestDtoGenderEnum: {
86
98
  readonly Male: "male";
@@ -30,5 +30,6 @@ export interface CreateCustomApplicationRequestDto {
30
30
  }
31
31
  export declare const CreateCustomApplicationRequestDtoProviderEnum: {
32
32
  readonly Squarelife: "squarelife";
33
+ readonly Janitos: "janitos";
33
34
  };
34
35
  export declare type CreateCustomApplicationRequestDtoProviderEnum = typeof CreateCustomApplicationRequestDtoProviderEnum[keyof typeof CreateCustomApplicationRequestDtoProviderEnum];
@@ -15,5 +15,6 @@
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.CreateCustomApplicationRequestDtoProviderEnum = void 0;
17
17
  exports.CreateCustomApplicationRequestDtoProviderEnum = {
18
- Squarelife: 'squarelife'
18
+ Squarelife: 'squarelife',
19
+ Janitos: 'janitos'
19
20
  };
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { PolicyObjectRequestDto } from './policy-object-request-dto';
13
+ import { PremiumOverrideRequestDto } from './premium-override-request-dto';
13
14
  /**
14
15
  *
15
16
  * @export
@@ -17,25 +18,32 @@ import { PolicyObjectRequestDto } from './policy-object-request-dto';
17
18
  */
18
19
  export interface CreateEstimatedInvoiceRequestDto {
19
20
  /**
20
- *
21
+ * Policy objects describe all parts of the policy via insured objects and according data.
21
22
  * @type {Array<PolicyObjectRequestDto>}
22
23
  * @memberof CreateEstimatedInvoiceRequestDto
23
24
  */
24
- 'policyObjects': Array<PolicyObjectRequestDto>;
25
+ 'policyObjects'?: Array<PolicyObjectRequestDto>;
25
26
  /**
26
- * Customer data
27
+ * Customer data. Has to be present if policyObjects is defined.
27
28
  * @type {object}
28
29
  * @memberof CreateEstimatedInvoiceRequestDto
29
30
  */
30
- 'data': object;
31
+ 'data'?: object;
31
32
  /**
32
- * Custom provider name
33
+ * Insurance provider name. Has to be set if data is defined.
33
34
  * @type {string}
34
35
  * @memberof CreateEstimatedInvoiceRequestDto
35
36
  */
36
- 'provider': CreateEstimatedInvoiceRequestDtoProviderEnum;
37
+ 'provider'?: CreateEstimatedInvoiceRequestDtoProviderEnum;
38
+ /**
39
+ * Premium Override
40
+ * @type {Array<PremiumOverrideRequestDto>}
41
+ * @memberof CreateEstimatedInvoiceRequestDto
42
+ */
43
+ 'premiumOverride'?: Array<PremiumOverrideRequestDto>;
37
44
  }
38
45
  export declare const CreateEstimatedInvoiceRequestDtoProviderEnum: {
39
46
  readonly Squarelife: "squarelife";
47
+ readonly Janitos: "janitos";
40
48
  };
41
49
  export declare type CreateEstimatedInvoiceRequestDtoProviderEnum = typeof CreateEstimatedInvoiceRequestDtoProviderEnum[keyof typeof CreateEstimatedInvoiceRequestDtoProviderEnum];
@@ -15,5 +15,6 @@
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.CreateEstimatedInvoiceRequestDtoProviderEnum = void 0;
17
17
  exports.CreateEstimatedInvoiceRequestDtoProviderEnum = {
18
- Squarelife: 'squarelife'
18
+ Squarelife: 'squarelife',
19
+ Janitos: 'janitos'
19
20
  };
@@ -12,6 +12,7 @@
12
12
  import { CreateAccountRequestDto } from './create-account-request-dto';
13
13
  import { CreateBankAccountRequestDto } from './create-bank-account-request-dto';
14
14
  import { PolicyObjectRequestDto } from './policy-object-request-dto';
15
+ import { PremiumOverrideRequestDto } from './premium-override-request-dto';
15
16
  import { UploadedDocumentDto } from './uploaded-document-dto';
16
17
  /**
17
18
  *
@@ -43,6 +44,12 @@ export interface CreateLeadRequestDto {
43
44
  * @memberof CreateLeadRequestDto
44
45
  */
45
46
  'bankAccount'?: CreateBankAccountRequestDto;
47
+ /**
48
+ * Premium Override
49
+ * @type {Array<PremiumOverrideRequestDto>}
50
+ * @memberof CreateLeadRequestDto
51
+ */
52
+ 'premiumOverride'?: Array<PremiumOverrideRequestDto>;
46
53
  /**
47
54
  *
48
55
  * @type {CreateAccountRequestDto}
@@ -11,4 +11,8 @@ export * from './initiate-braintree-payment-setup-request-dto';
11
11
  export * from './initiate-payment-setup-request-dto';
12
12
  export * from './initiate-stripe-payment-setup-request-dto';
13
13
  export * from './policy-object-request-dto';
14
+ export * from './premium-override-dto';
15
+ export * from './premium-override-request-dto';
16
+ export * from './send-notification-request-dto';
17
+ export * from './update-lead-request-dto';
14
18
  export * from './uploaded-document-dto';
@@ -27,4 +27,8 @@ __exportStar(require("./initiate-braintree-payment-setup-request-dto"), exports)
27
27
  __exportStar(require("./initiate-payment-setup-request-dto"), exports);
28
28
  __exportStar(require("./initiate-stripe-payment-setup-request-dto"), exports);
29
29
  __exportStar(require("./policy-object-request-dto"), exports);
30
+ __exportStar(require("./premium-override-dto"), exports);
31
+ __exportStar(require("./premium-override-request-dto"), exports);
32
+ __exportStar(require("./send-notification-request-dto"), exports);
33
+ __exportStar(require("./update-lead-request-dto"), exports);
30
34
  __exportStar(require("./uploaded-document-dto"), exports);
@@ -0,0 +1,53 @@
1
+ /**
2
+ * EMIL PublicAPI
3
+ * The EMIL Public 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 PremiumOverrideDto
16
+ */
17
+ export interface PremiumOverrideDto {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof PremiumOverrideDto
22
+ */
23
+ 'name': string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof PremiumOverrideDto
28
+ */
29
+ 'type': PremiumOverrideDtoTypeEnum;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof PremiumOverrideDto
34
+ */
35
+ 'unit': PremiumOverrideDtoUnitEnum;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof PremiumOverrideDto
40
+ */
41
+ 'netPremium': number;
42
+ }
43
+ export declare const PremiumOverrideDtoTypeEnum: {
44
+ readonly Time: "time";
45
+ };
46
+ export declare type PremiumOverrideDtoTypeEnum = typeof PremiumOverrideDtoTypeEnum[keyof typeof PremiumOverrideDtoTypeEnum];
47
+ export declare const PremiumOverrideDtoUnitEnum: {
48
+ readonly Day: "day";
49
+ readonly Week: "week";
50
+ readonly Month: "month";
51
+ readonly Year: "year";
52
+ };
53
+ export declare type PremiumOverrideDtoUnitEnum = typeof PremiumOverrideDtoUnitEnum[keyof typeof PremiumOverrideDtoUnitEnum];
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL PublicAPI
6
+ * The EMIL Public 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 });
16
+ exports.PremiumOverrideDtoUnitEnum = exports.PremiumOverrideDtoTypeEnum = void 0;
17
+ exports.PremiumOverrideDtoTypeEnum = {
18
+ Time: 'time'
19
+ };
20
+ exports.PremiumOverrideDtoUnitEnum = {
21
+ Day: 'day',
22
+ Week: 'week',
23
+ Month: 'month',
24
+ Year: 'year'
25
+ };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * EMIL PublicAPI
3
+ * The EMIL Public 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 { PremiumOverrideDto } from './premium-override-dto';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface PremiumOverrideRequestDto
17
+ */
18
+ export interface PremiumOverrideRequestDto {
19
+ /**
20
+ * Premium Override
21
+ * @type {Array<PremiumOverrideDto>}
22
+ * @memberof PremiumOverrideRequestDto
23
+ */
24
+ 'premiumOverrides': Array<PremiumOverrideDto>;
25
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL PublicAPI
6
+ * The EMIL Public 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,36 @@
1
+ /**
2
+ * EMIL PublicAPI
3
+ * The EMIL Public 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 SendNotificationRequestDto
16
+ */
17
+ export interface SendNotificationRequestDto {
18
+ /**
19
+ * Unique identifying slug from template to be used for the email
20
+ * @type {string}
21
+ * @memberof SendNotificationRequestDto
22
+ */
23
+ 'templateSlug': string;
24
+ /**
25
+ * Subject of the email
26
+ * @type {string}
27
+ * @memberof SendNotificationRequestDto
28
+ */
29
+ 'emailSubject'?: string;
30
+ /**
31
+ * Payload is used by the template engine to replace all template variables with proper data. For more information, please go to https://github.com/flosch/pongo2.
32
+ * @type {object}
33
+ * @memberof SendNotificationRequestDto
34
+ */
35
+ 'payload'?: object;
36
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL PublicAPI
6
+ * The EMIL Public 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 });