@vergelijkdirect/insurance-transmission-client 1.3.21

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 (246) hide show
  1. package/README.md +79 -0
  2. package/package.json +33 -0
  3. package/src/js/adapters/index.d.ts +1 -0
  4. package/src/js/adapters/index.js +5 -0
  5. package/src/js/adapters/local-storage.adapter.d.ts +15 -0
  6. package/src/js/adapters/local-storage.adapter.js +56 -0
  7. package/src/js/clients/index.d.ts +1 -0
  8. package/src/js/clients/index.js +5 -0
  9. package/src/js/clients/insurance-transmission.client.d.ts +14 -0
  10. package/src/js/clients/insurance-transmission.client.js +88 -0
  11. package/src/js/core/http.client.d.ts +32 -0
  12. package/src/js/core/http.client.js +146 -0
  13. package/src/js/core/index.d.ts +2 -0
  14. package/src/js/core/index.js +7 -0
  15. package/src/js/core/injector.d.ts +17 -0
  16. package/src/js/core/injector.js +67 -0
  17. package/src/js/factories/api-service.factory.d.ts +4 -0
  18. package/src/js/factories/api-service.factory.js +50 -0
  19. package/src/js/factories/comparison.factory.d.ts +32 -0
  20. package/src/js/factories/comparison.factory.js +23 -0
  21. package/src/js/factories/index.d.ts +3 -0
  22. package/src/js/factories/index.js +9 -0
  23. package/src/js/factories/rate.factory.d.ts +6 -0
  24. package/src/js/factories/rate.factory.js +92 -0
  25. package/src/js/handlers/error.handler.d.ts +7 -0
  26. package/src/js/handlers/error.handler.js +12 -0
  27. package/src/js/handlers/index.d.ts +3 -0
  28. package/src/js/handlers/index.js +9 -0
  29. package/src/js/handlers/rate-handler.d.ts +10 -0
  30. package/src/js/handlers/rate-handler.js +70 -0
  31. package/src/js/handlers/response.handler.d.ts +7 -0
  32. package/src/js/handlers/response.handler.js +12 -0
  33. package/src/js/index.d.ts +5 -0
  34. package/src/js/index.js +21 -0
  35. package/src/js/interfaces/additional-coverage.interface.d.ts +8 -0
  36. package/src/js/interfaces/additional-coverage.interface.js +2 -0
  37. package/src/js/interfaces/calculate-rates.interface.d.ts +5 -0
  38. package/src/js/interfaces/calculate-rates.interface.js +2 -0
  39. package/src/js/interfaces/comparison/comparison-data-collection.interface.d.ts +16 -0
  40. package/src/js/interfaces/comparison/comparison-data-collection.interface.js +2 -0
  41. package/src/js/interfaces/comparison/comparison-insurance-data.interface.d.ts +8 -0
  42. package/src/js/interfaces/comparison/comparison-insurance-data.interface.js +2 -0
  43. package/src/js/interfaces/comparison/comparison-insurance.interface.d.ts +11 -0
  44. package/src/js/interfaces/comparison/comparison-insurance.interface.js +2 -0
  45. package/src/js/interfaces/comparison/comparison.interface.d.ts +8 -0
  46. package/src/js/interfaces/comparison/comparison.interface.js +2 -0
  47. package/src/js/interfaces/comparison/index.d.ts +4 -0
  48. package/src/js/interfaces/comparison/index.js +2 -0
  49. package/src/js/interfaces/environment.interface.d.ts +7 -0
  50. package/src/js/interfaces/environment.interface.js +2 -0
  51. package/src/js/interfaces/index.d.ts +10 -0
  52. package/src/js/interfaces/index.js +19 -0
  53. package/src/js/interfaces/moped-rate.interface.d.ts +38 -0
  54. package/src/js/interfaces/moped-rate.interface.js +2 -0
  55. package/src/js/interfaces/nextable.interface.d.ts +4 -0
  56. package/src/js/interfaces/nextable.interface.js +2 -0
  57. package/src/js/interfaces/rate.interface.d.ts +12 -0
  58. package/src/js/interfaces/rate.interface.js +2 -0
  59. package/src/js/interfaces/requests/additional-coverages-request.interface.d.ts +5 -0
  60. package/src/js/interfaces/requests/additional-coverages-request.interface.js +2 -0
  61. package/src/js/interfaces/requests/index.d.ts +2 -0
  62. package/src/js/interfaces/requests/index.js +2 -0
  63. package/src/js/interfaces/requests/moped-rate-request.interface.d.ts +21 -0
  64. package/src/js/interfaces/requests/moped-rate-request.interface.js +2 -0
  65. package/src/js/interfaces/storage.interface.d.ts +8 -0
  66. package/src/js/interfaces/storage.interface.js +2 -0
  67. package/src/js/interfaces/user.interface.d.ts +23 -0
  68. package/src/js/interfaces/user.interface.js +2 -0
  69. package/src/js/interfaces/utils/index.d.ts +2 -0
  70. package/src/js/interfaces/utils/index.js +2 -0
  71. package/src/js/interfaces/utils/timestampable.interface.d.ts +5 -0
  72. package/src/js/interfaces/utils/timestampable.interface.js +2 -0
  73. package/src/js/interfaces/utils/to-object.interface.d.ts +4 -0
  74. package/src/js/interfaces/utils/to-object.interface.js +2 -0
  75. package/src/js/maps/index.d.ts +2 -0
  76. package/src/js/maps/index.js +7 -0
  77. package/src/js/maps/insurance-key.config.d.ts +2 -0
  78. package/src/js/maps/insurance-key.config.js +13 -0
  79. package/src/js/maps/risk-insurance.map.d.ts +1 -0
  80. package/src/js/maps/risk-insurance.map.js +24 -0
  81. package/src/js/models/comparison/comparison-data-collection.model.d.ts +23 -0
  82. package/src/js/models/comparison/comparison-data-collection.model.js +149 -0
  83. package/src/js/models/comparison/comparison-insurance-data.model.d.ts +15 -0
  84. package/src/js/models/comparison/comparison-insurance-data.model.js +85 -0
  85. package/src/js/models/comparison/comparison-insurance.model.d.ts +17 -0
  86. package/src/js/models/comparison/comparison-insurance.model.js +43 -0
  87. package/src/js/models/comparison/comparison.model.d.ts +20 -0
  88. package/src/js/models/comparison/comparison.model.js +47 -0
  89. package/src/js/models/comparison/index.d.ts +4 -0
  90. package/src/js/models/comparison/index.js +11 -0
  91. package/src/js/models/configuration/configuration.model.d.ts +18 -0
  92. package/src/js/models/configuration/configuration.model.js +52 -0
  93. package/src/js/models/configuration/default-configuration.model.d.ts +5 -0
  94. package/src/js/models/configuration/default-configuration.model.js +34 -0
  95. package/src/js/models/configuration/index.d.ts +2 -0
  96. package/src/js/models/configuration/index.js +7 -0
  97. package/src/js/models/dkm-rate.model.d.ts +4 -0
  98. package/src/js/models/dkm-rate.model.js +26 -0
  99. package/src/js/models/documents.model.d.ts +9 -0
  100. package/src/js/models/documents.model.js +16 -0
  101. package/src/js/models/enra-model.d.ts +7 -0
  102. package/src/js/models/enra-model.js +30 -0
  103. package/src/js/models/index.d.ts +15 -0
  104. package/src/js/models/index.js +45 -0
  105. package/src/js/models/laka-rate.model.d.ts +7 -0
  106. package/src/js/models/laka-rate.model.js +29 -0
  107. package/src/js/models/moneyview-rate.model.d.ts +7 -0
  108. package/src/js/models/moneyview-rate.model.js +30 -0
  109. package/src/js/models/package-rate.model.d.ts +11 -0
  110. package/src/js/models/package-rate.model.js +109 -0
  111. package/src/js/models/pet/index.d.ts +1 -0
  112. package/src/js/models/pet/index.js +5 -0
  113. package/src/js/models/pet/petsecur-rate.model.d.ts +6 -0
  114. package/src/js/models/pet/petsecur-rate.model.js +29 -0
  115. package/src/js/models/rate-collection.model.d.ts +16 -0
  116. package/src/js/models/rate-collection.model.js +91 -0
  117. package/src/js/models/rate.model.d.ts +21 -0
  118. package/src/js/models/rate.model.js +108 -0
  119. package/src/js/models/risk-rate.model.d.ts +6 -0
  120. package/src/js/models/risk-rate.model.js +30 -0
  121. package/src/js/models/rolls-rate.model.d.ts +6 -0
  122. package/src/js/models/rolls-rate.model.js +30 -0
  123. package/src/js/models/undefined-rate.model.d.ts +7 -0
  124. package/src/js/models/undefined-rate.model.js +29 -0
  125. package/src/js/models/user.model.d.ts +36 -0
  126. package/src/js/models/user.model.js +115 -0
  127. package/src/js/models/vergelijkdirect-rate.model.d.ts +6 -0
  128. package/src/js/models/vergelijkdirect-rate.model.js +30 -0
  129. package/src/js/resources/base.resource.d.ts +9 -0
  130. package/src/js/resources/base.resource.js +12 -0
  131. package/src/js/resources/bike.resource.d.ts +8 -0
  132. package/src/js/resources/bike.resource.js +47 -0
  133. package/src/js/resources/car.resource.d.ts +12 -0
  134. package/src/js/resources/car.resource.js +70 -0
  135. package/src/js/resources/caravan.resource.d.ts +12 -0
  136. package/src/js/resources/caravan.resource.js +64 -0
  137. package/src/js/resources/categories.resource.d.ts +13 -0
  138. package/src/js/resources/categories.resource.js +123 -0
  139. package/src/js/resources/comparison-module.resource.d.ts +8 -0
  140. package/src/js/resources/comparison-module.resource.js +41 -0
  141. package/src/js/resources/comparison.resource.d.ts +9 -0
  142. package/src/js/resources/comparison.resource.js +48 -0
  143. package/src/js/resources/data-validation.resource.d.ts +9 -0
  144. package/src/js/resources/data-validation.resource.js +59 -0
  145. package/src/js/resources/data.resource.d.ts +10 -0
  146. package/src/js/resources/data.resource.js +80 -0
  147. package/src/js/resources/document.resource.d.ts +7 -0
  148. package/src/js/resources/document.resource.js +36 -0
  149. package/src/js/resources/home.resource.d.ts +10 -0
  150. package/src/js/resources/home.resource.js +57 -0
  151. package/src/js/resources/household.resource.d.ts +8 -0
  152. package/src/js/resources/household.resource.js +43 -0
  153. package/src/js/resources/housing.resource.d.ts +8 -0
  154. package/src/js/resources/housing.resource.js +44 -0
  155. package/src/js/resources/index.d.ts +19 -0
  156. package/src/js/resources/index.js +41 -0
  157. package/src/js/resources/legal-assistance.resource.d.ts +10 -0
  158. package/src/js/resources/legal-assistance.resource.js +57 -0
  159. package/src/js/resources/liability.resource.d.ts +6 -0
  160. package/src/js/resources/liability.resource.js +35 -0
  161. package/src/js/resources/loan.resource.d.ts +7 -0
  162. package/src/js/resources/loan.resource.js +35 -0
  163. package/src/js/resources/moped.resource.d.ts +13 -0
  164. package/src/js/resources/moped.resource.js +78 -0
  165. package/src/js/resources/motor.resource.d.ts +12 -0
  166. package/src/js/resources/motor.resource.js +70 -0
  167. package/src/js/resources/package.resource.d.ts +14 -0
  168. package/src/js/resources/package.resource.js +84 -0
  169. package/src/js/resources/partner.resource.d.ts +8 -0
  170. package/src/js/resources/partner.resource.js +42 -0
  171. package/src/js/resources/pet.resource.d.ts +8 -0
  172. package/src/js/resources/pet.resource.js +41 -0
  173. package/src/js/resources/travel.resource.d.ts +9 -0
  174. package/src/js/resources/travel.resource.js +49 -0
  175. package/src/js/resources/user.resource.d.ts +7 -0
  176. package/src/js/resources/user.resource.js +35 -0
  177. package/src/js/resources/v1.resource.d.ts +22 -0
  178. package/src/js/resources/v1.resource.js +119 -0
  179. package/src/js/services/bike.service.d.ts +10 -0
  180. package/src/js/services/bike.service.js +97 -0
  181. package/src/js/services/car.service.d.ts +14 -0
  182. package/src/js/services/car.service.js +108 -0
  183. package/src/js/services/caravan.service.d.ts +15 -0
  184. package/src/js/services/caravan.service.js +130 -0
  185. package/src/js/services/comparison-module.service.d.ts +7 -0
  186. package/src/js/services/comparison-module.service.js +16 -0
  187. package/src/js/services/comparison.service.d.ts +9 -0
  188. package/src/js/services/comparison.service.js +102 -0
  189. package/src/js/services/configurations.service.d.ts +12 -0
  190. package/src/js/services/configurations.service.js +81 -0
  191. package/src/js/services/data-validation.service.d.ts +8 -0
  192. package/src/js/services/data-validation.service.js +20 -0
  193. package/src/js/services/data.service.d.ts +9 -0
  194. package/src/js/services/data.service.js +74 -0
  195. package/src/js/services/document.service.d.ts +8 -0
  196. package/src/js/services/document.service.js +86 -0
  197. package/src/js/services/home.service.d.ts +12 -0
  198. package/src/js/services/home.service.js +90 -0
  199. package/src/js/services/household.service.d.ts +10 -0
  200. package/src/js/services/household.service.js +84 -0
  201. package/src/js/services/housing.service.d.ts +10 -0
  202. package/src/js/services/housing.service.js +97 -0
  203. package/src/js/services/index.d.ts +24 -0
  204. package/src/js/services/index.js +51 -0
  205. package/src/js/services/legal-assistance.service.d.ts +12 -0
  206. package/src/js/services/legal-assistance.service.js +90 -0
  207. package/src/js/services/liability.service.d.ts +9 -0
  208. package/src/js/services/liability.service.js +81 -0
  209. package/src/js/services/loan.service.d.ts +9 -0
  210. package/src/js/services/loan.service.js +80 -0
  211. package/src/js/services/moped.service.d.ts +16 -0
  212. package/src/js/services/moped.service.js +129 -0
  213. package/src/js/services/motor.service.d.ts +16 -0
  214. package/src/js/services/motor.service.js +128 -0
  215. package/src/js/services/package.service.d.ts +15 -0
  216. package/src/js/services/package.service.js +160 -0
  217. package/src/js/services/partner.service.d.ts +7 -0
  218. package/src/js/services/partner.service.js +17 -0
  219. package/src/js/services/pet.service.d.ts +10 -0
  220. package/src/js/services/pet.service.js +84 -0
  221. package/src/js/services/rate.service.d.ts +5 -0
  222. package/src/js/services/rate.service.js +43 -0
  223. package/src/js/services/travel.service.d.ts +11 -0
  224. package/src/js/services/travel.service.js +95 -0
  225. package/src/js/services/user.service.d.ts +6 -0
  226. package/src/js/services/user.service.js +13 -0
  227. package/src/js/services/v1.service.d.ts +19 -0
  228. package/src/js/services/v1.service.js +52 -0
  229. package/src/js/types/common/condition-url.type.d.ts +6 -0
  230. package/src/js/types/common/condition-url.type.js +2 -0
  231. package/src/js/types/common/index.d.ts +2 -0
  232. package/src/js/types/common/index.js +2 -0
  233. package/src/js/types/common/timestamps.type.d.ts +6 -0
  234. package/src/js/types/common/timestamps.type.js +2 -0
  235. package/src/js/types/index.d.ts +1 -0
  236. package/src/js/types/index.js +17 -0
  237. package/src/js/utils/compare-rate-by-coverage.util.d.ts +4 -0
  238. package/src/js/utils/compare-rate-by-coverage.util.js +64 -0
  239. package/src/js/utils/index.d.ts +2 -0
  240. package/src/js/utils/index.js +7 -0
  241. package/src/js/utils/range.util.d.ts +2 -0
  242. package/src/js/utils/range.util.js +5 -0
  243. package/src/js/utils/sorting.util.d.ts +5 -0
  244. package/src/js/utils/sorting.util.js +11 -0
  245. package/src/js/utils/supplierPlacementTracker.util.d.ts +4 -0
  246. package/src/js/utils/supplierPlacementTracker.util.js +18 -0
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DefaultConfigurationModel = exports.ConfigurationModel = void 0;
4
+ var configuration_model_1 = require("./configuration.model");
5
+ Object.defineProperty(exports, "ConfigurationModel", { enumerable: true, get: function () { return configuration_model_1.default; } });
6
+ var default_configuration_model_1 = require("./default-configuration.model");
7
+ Object.defineProperty(exports, "DefaultConfigurationModel", { enumerable: true, get: function () { return default_configuration_model_1.default; } });
@@ -0,0 +1,4 @@
1
+ import { RateInterface } from "../interfaces";
2
+ import { Rate } from "./";
3
+ export default class DkmRate extends Rate implements RateInterface {
4
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ var _1 = require("./");
19
+ var DkmRate = /** @class */ (function (_super) {
20
+ __extends(DkmRate, _super);
21
+ function DkmRate() {
22
+ return _super !== null && _super.apply(this, arguments) || this;
23
+ }
24
+ return DkmRate;
25
+ }(_1.Rate));
26
+ exports.default = DkmRate;
@@ -0,0 +1,9 @@
1
+ import { ConditionUrl } from "../types";
2
+ declare class DocumentsModel {
3
+ private readonly conditionUrls;
4
+ private readonly insuranceCards;
5
+ constructor(documents: any);
6
+ getConditionUrls(): [] | [ConditionUrl];
7
+ getInsuranceCards(): [] | [string];
8
+ }
9
+ export default DocumentsModel;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var DocumentsModel = /** @class */ (function () {
4
+ function DocumentsModel(documents) {
5
+ this.conditionUrls = documents.ConditionUrls;
6
+ this.insuranceCards = documents.InsuranceCards;
7
+ }
8
+ DocumentsModel.prototype.getConditionUrls = function () {
9
+ return this.conditionUrls;
10
+ };
11
+ DocumentsModel.prototype.getInsuranceCards = function () {
12
+ return this.insuranceCards;
13
+ };
14
+ return DocumentsModel;
15
+ }());
16
+ exports.default = DocumentsModel;
@@ -0,0 +1,7 @@
1
+ import { RateInterface } from "../interfaces";
2
+ import { Rate } from "./";
3
+ import { AdditionalCoverageInterface, AdditionalCoveragesRequestInterface } from "../interfaces";
4
+ declare class EnraRate extends Rate implements RateInterface {
5
+ getAdditionalCoverages(data: AdditionalCoveragesRequestInterface): Promise<AdditionalCoverageInterface[] | []>;
6
+ }
7
+ export default EnraRate;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ var _1 = require("./");
19
+ var factories_1 = require("../factories");
20
+ var EnraRate = /** @class */ (function (_super) {
21
+ __extends(EnraRate, _super);
22
+ function EnraRate() {
23
+ return _super !== null && _super.apply(this, arguments) || this;
24
+ }
25
+ EnraRate.prototype.getAdditionalCoverages = function (data) {
26
+ return factories_1.ApiServiceFactory.get(this.insuranceCategory).getEnraAdditionalCoverages(data);
27
+ };
28
+ return EnraRate;
29
+ }(_1.Rate));
30
+ exports.default = EnraRate;
@@ -0,0 +1,15 @@
1
+ export { default as DocumentsModel } from "./documents.model";
2
+ export { default as Rate } from "./rate.model";
3
+ export { default as PackageRate } from "./package-rate.model";
4
+ export { default as LakaRate } from "./laka-rate.model";
5
+ export { default as RiskRate } from "./risk-rate.model";
6
+ export { default as RollsRate } from "./rolls-rate.model";
7
+ export { default as EnraRate } from "./enra-model";
8
+ export { default as MoneyviewRate } from "./moneyview-rate.model";
9
+ export { default as VergelijkdirectRate } from "./vergelijkdirect-rate.model";
10
+ export { default as DkmRate } from "./dkm-rate.model";
11
+ export { default as UndefinedRate } from "./undefined-rate.model";
12
+ export { default as RateCollection } from "./rate-collection.model";
13
+ export { default as User } from "./user.model";
14
+ export * from "./pet";
15
+ export * from './comparison';
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.User = exports.RateCollection = exports.UndefinedRate = exports.DkmRate = exports.VergelijkdirectRate = exports.MoneyviewRate = exports.EnraRate = exports.RollsRate = exports.RiskRate = exports.LakaRate = exports.PackageRate = exports.Rate = exports.DocumentsModel = void 0;
18
+ var documents_model_1 = require("./documents.model");
19
+ Object.defineProperty(exports, "DocumentsModel", { enumerable: true, get: function () { return documents_model_1.default; } });
20
+ var rate_model_1 = require("./rate.model");
21
+ Object.defineProperty(exports, "Rate", { enumerable: true, get: function () { return rate_model_1.default; } });
22
+ var package_rate_model_1 = require("./package-rate.model");
23
+ Object.defineProperty(exports, "PackageRate", { enumerable: true, get: function () { return package_rate_model_1.default; } });
24
+ var laka_rate_model_1 = require("./laka-rate.model");
25
+ Object.defineProperty(exports, "LakaRate", { enumerable: true, get: function () { return laka_rate_model_1.default; } });
26
+ var risk_rate_model_1 = require("./risk-rate.model");
27
+ Object.defineProperty(exports, "RiskRate", { enumerable: true, get: function () { return risk_rate_model_1.default; } });
28
+ var rolls_rate_model_1 = require("./rolls-rate.model");
29
+ Object.defineProperty(exports, "RollsRate", { enumerable: true, get: function () { return rolls_rate_model_1.default; } });
30
+ var enra_model_1 = require("./enra-model");
31
+ Object.defineProperty(exports, "EnraRate", { enumerable: true, get: function () { return enra_model_1.default; } });
32
+ var moneyview_rate_model_1 = require("./moneyview-rate.model");
33
+ Object.defineProperty(exports, "MoneyviewRate", { enumerable: true, get: function () { return moneyview_rate_model_1.default; } });
34
+ var vergelijkdirect_rate_model_1 = require("./vergelijkdirect-rate.model");
35
+ Object.defineProperty(exports, "VergelijkdirectRate", { enumerable: true, get: function () { return vergelijkdirect_rate_model_1.default; } });
36
+ var dkm_rate_model_1 = require("./dkm-rate.model");
37
+ Object.defineProperty(exports, "DkmRate", { enumerable: true, get: function () { return dkm_rate_model_1.default; } });
38
+ var undefined_rate_model_1 = require("./undefined-rate.model");
39
+ Object.defineProperty(exports, "UndefinedRate", { enumerable: true, get: function () { return undefined_rate_model_1.default; } });
40
+ var rate_collection_model_1 = require("./rate-collection.model");
41
+ Object.defineProperty(exports, "RateCollection", { enumerable: true, get: function () { return rate_collection_model_1.default; } });
42
+ var user_model_1 = require("./user.model");
43
+ Object.defineProperty(exports, "User", { enumerable: true, get: function () { return user_model_1.default; } });
44
+ __exportStar(require("./pet"), exports);
45
+ __exportStar(require("./comparison"), exports);
@@ -0,0 +1,7 @@
1
+ import { RateInterface } from "../interfaces";
2
+ import { Rate } from "./";
3
+ import { AdditionalCoverageInterface, AdditionalCoveragesRequestInterface } from "../interfaces";
4
+ declare class LakaRate extends Rate implements RateInterface {
5
+ getAdditionalCoverages(data: AdditionalCoveragesRequestInterface): Promise<AdditionalCoverageInterface[] | []>;
6
+ }
7
+ export default LakaRate;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ var _1 = require("./");
19
+ var LakaRate = /** @class */ (function (_super) {
20
+ __extends(LakaRate, _super);
21
+ function LakaRate() {
22
+ return _super !== null && _super.apply(this, arguments) || this;
23
+ }
24
+ LakaRate.prototype.getAdditionalCoverages = function (data) {
25
+ return Promise.resolve([]);
26
+ };
27
+ return LakaRate;
28
+ }(_1.Rate));
29
+ exports.default = LakaRate;
@@ -0,0 +1,7 @@
1
+ import { RateInterface } from "../interfaces";
2
+ import { Rate } from "./";
3
+ import { AdditionalCoverageInterface, AdditionalCoveragesRequestInterface } from "../interfaces";
4
+ declare class MoneyviewRate extends Rate implements RateInterface {
5
+ getAdditionalCoverages(data: AdditionalCoveragesRequestInterface): Promise<AdditionalCoverageInterface[] | []>;
6
+ }
7
+ export default MoneyviewRate;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ var _1 = require("./");
19
+ var factories_1 = require("../factories");
20
+ var MoneyviewRate = /** @class */ (function (_super) {
21
+ __extends(MoneyviewRate, _super);
22
+ function MoneyviewRate() {
23
+ return _super !== null && _super.apply(this, arguments) || this;
24
+ }
25
+ MoneyviewRate.prototype.getAdditionalCoverages = function (data) {
26
+ return factories_1.ApiServiceFactory.get(this.insuranceCategory).getMoneyviewAdditionalCoverages(data);
27
+ };
28
+ return MoneyviewRate;
29
+ }(_1.Rate));
30
+ exports.default = MoneyviewRate;
@@ -0,0 +1,11 @@
1
+ import { RateInterface } from "../interfaces";
2
+ import { Rate } from "./";
3
+ import RateCollection from "./rate-collection.model";
4
+ declare class PackageRate extends Rate implements RateInterface {
5
+ getAdditionalCoverages(): Promise<any>;
6
+ request(): Promise<any>;
7
+ calculate(): Promise<any>;
8
+ getRates(comparison?: string | null): RateCollection;
9
+ getData(): any;
10
+ }
11
+ export default PackageRate;
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __values = (this && this.__values) || function(o) {
18
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
19
+ if (m) return m.call(o);
20
+ if (o && typeof o.length === "number") return {
21
+ next: function () {
22
+ if (o && i >= o.length) o = void 0;
23
+ return { value: o && o[i++], done: !o };
24
+ }
25
+ };
26
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ var _1 = require("./");
30
+ var factories_1 = require("../factories");
31
+ var maps_1 = require("../maps");
32
+ var rate_collection_model_1 = require("./rate-collection.model");
33
+ var PackageRate = /** @class */ (function (_super) {
34
+ __extends(PackageRate, _super);
35
+ function PackageRate() {
36
+ return _super !== null && _super.apply(this, arguments) || this;
37
+ }
38
+ PackageRate.prototype.getAdditionalCoverages = function () {
39
+ return factories_1.ApiServiceFactory.get(this.insuranceCategory).calculateAdditionalCoverages(this.getData());
40
+ };
41
+ PackageRate.prototype.request = function () {
42
+ return factories_1.ApiServiceFactory.get(this.insuranceCategory).requestPackage(this.getData());
43
+ };
44
+ PackageRate.prototype.calculate = function () {
45
+ return factories_1.ApiServiceFactory.get(this.insuranceCategory).calculatePackageDiscount(this.getCompanyName(), this.getData());
46
+ };
47
+ PackageRate.prototype.getRates = function (comparison) {
48
+ var e_1, _a;
49
+ if (comparison === void 0) { comparison = null; }
50
+ var data = _super.prototype.getData.call(this);
51
+ if (comparison !== null) {
52
+ return data[(0, maps_1.mapRiskInsurances)(comparison)];
53
+ }
54
+ var collection = new rate_collection_model_1.default();
55
+ try {
56
+ for (var insuranceKeyConfig_1 = __values(maps_1.insuranceKeyConfig), insuranceKeyConfig_1_1 = insuranceKeyConfig_1.next(); !insuranceKeyConfig_1_1.done; insuranceKeyConfig_1_1 = insuranceKeyConfig_1.next()) {
57
+ var insuranceKey = insuranceKeyConfig_1_1.value;
58
+ if (data.hasOwnProperty(insuranceKey)) {
59
+ collection = collection.merge(data[insuranceKey]);
60
+ }
61
+ }
62
+ }
63
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
64
+ finally {
65
+ try {
66
+ if (insuranceKeyConfig_1_1 && !insuranceKeyConfig_1_1.done && (_a = insuranceKeyConfig_1.return)) _a.call(insuranceKeyConfig_1);
67
+ }
68
+ finally { if (e_1) throw e_1.error; }
69
+ }
70
+ return collection;
71
+ };
72
+ PackageRate.prototype.getData = function () {
73
+ var e_2, _a, e_3, _b;
74
+ var data = _super.prototype.getData.call(this);
75
+ try {
76
+ for (var insuranceKeyConfig_2 = __values(maps_1.insuranceKeyConfig), insuranceKeyConfig_2_1 = insuranceKeyConfig_2.next(); !insuranceKeyConfig_2_1.done; insuranceKeyConfig_2_1 = insuranceKeyConfig_2.next()) {
77
+ var insuranceKey = insuranceKeyConfig_2_1.value;
78
+ if (!data.hasOwnProperty(insuranceKey)) {
79
+ continue;
80
+ }
81
+ var rateArray = [];
82
+ try {
83
+ for (var _c = (e_3 = void 0, __values(data[insuranceKey].all())), _d = _c.next(); !_d.done; _d = _c.next()) {
84
+ var rate = _d.value;
85
+ rateArray.push(rate.getData());
86
+ }
87
+ }
88
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
89
+ finally {
90
+ try {
91
+ if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
92
+ }
93
+ finally { if (e_3) throw e_3.error; }
94
+ }
95
+ data[insuranceKey] = rateArray;
96
+ }
97
+ }
98
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
99
+ finally {
100
+ try {
101
+ if (insuranceKeyConfig_2_1 && !insuranceKeyConfig_2_1.done && (_a = insuranceKeyConfig_2.return)) _a.call(insuranceKeyConfig_2);
102
+ }
103
+ finally { if (e_2) throw e_2.error; }
104
+ }
105
+ return data;
106
+ };
107
+ return PackageRate;
108
+ }(_1.Rate));
109
+ exports.default = PackageRate;
@@ -0,0 +1 @@
1
+ export { default as PetsecurRate } from "./petsecur-rate.model";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PetsecurRate = void 0;
4
+ var petsecur_rate_model_1 = require("./petsecur-rate.model");
5
+ Object.defineProperty(exports, "PetsecurRate", { enumerable: true, get: function () { return petsecur_rate_model_1.default; } });
@@ -0,0 +1,6 @@
1
+ import { RateInterface, AdditionalCoverageInterface } from "../../interfaces";
2
+ import { Rate } from "../../models";
3
+ declare class PetsecurRate extends Rate implements RateInterface {
4
+ getAdditionalCoverages(data: any): Promise<AdditionalCoverageInterface[] | []>;
5
+ }
6
+ export default PetsecurRate;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ var models_1 = require("../../models");
19
+ var PetsecurRate = /** @class */ (function (_super) {
20
+ __extends(PetsecurRate, _super);
21
+ function PetsecurRate() {
22
+ return _super !== null && _super.apply(this, arguments) || this;
23
+ }
24
+ PetsecurRate.prototype.getAdditionalCoverages = function (data) {
25
+ return Promise.resolve(this.get('AdditionalCoverages'));
26
+ };
27
+ return PetsecurRate;
28
+ }(models_1.Rate));
29
+ exports.default = PetsecurRate;
@@ -0,0 +1,16 @@
1
+ import { ToObjectInterface, RateInterface } from "../interfaces";
2
+ declare class RateCollection implements ToObjectInterface, Iterable<RateInterface> {
3
+ private rates;
4
+ private pointer;
5
+ constructor(insuranceCategory?: string | null, rates?: any[] | []);
6
+ all(): RateInterface[];
7
+ count(): number;
8
+ first(): RateInterface;
9
+ last(): RateInterface;
10
+ merge(collection: RateCollection): RateCollection;
11
+ push(rate: RateInterface): RateCollection;
12
+ next(): IteratorResult<RateInterface>;
13
+ [Symbol.iterator](): IterableIterator<RateInterface>;
14
+ toObject(): any;
15
+ }
16
+ export default RateCollection;
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ var __values = (this && this.__values) || function(o) {
3
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
4
+ if (m) return m.call(o);
5
+ if (o && typeof o.length === "number") return {
6
+ next: function () {
7
+ if (o && i >= o.length) o = void 0;
8
+ return { value: o && o[i++], done: !o };
9
+ }
10
+ };
11
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ var models_1 = require("../models");
15
+ var factories_1 = require("../factories");
16
+ var RateCollection = /** @class */ (function () {
17
+ function RateCollection(insuranceCategory, rates) {
18
+ if (insuranceCategory === void 0) { insuranceCategory = null; }
19
+ if (rates === void 0) { rates = []; }
20
+ this.rates = [];
21
+ this.pointer = 0;
22
+ if (insuranceCategory !== null) {
23
+ for (var i = 0; i < rates.length; i++) {
24
+ this.rates.push(factories_1.RateFactory.get(insuranceCategory, rates[i]));
25
+ }
26
+ }
27
+ }
28
+ RateCollection.prototype.all = function () {
29
+ return this.rates;
30
+ };
31
+ RateCollection.prototype.count = function () {
32
+ return this.rates.length;
33
+ };
34
+ RateCollection.prototype.first = function () {
35
+ if (this.rates.length === 0) {
36
+ return new models_1.UndefinedRate();
37
+ }
38
+ return this.rates[0];
39
+ };
40
+ RateCollection.prototype.last = function () {
41
+ if (this.rates.length === 0) {
42
+ return new models_1.UndefinedRate();
43
+ }
44
+ return this.rates[this.rates.length - 1];
45
+ };
46
+ RateCollection.prototype.merge = function (collection) {
47
+ this.rates = this.rates.concat(collection.all());
48
+ return this;
49
+ };
50
+ RateCollection.prototype.push = function (rate) {
51
+ this.rates.push(rate);
52
+ return this;
53
+ };
54
+ RateCollection.prototype.next = function () {
55
+ if (this.pointer < this.count()) {
56
+ return {
57
+ done: false,
58
+ value: this.rates[this.pointer++]
59
+ };
60
+ }
61
+ else {
62
+ return {
63
+ done: true,
64
+ value: null
65
+ };
66
+ }
67
+ };
68
+ RateCollection.prototype[Symbol.iterator] = function () {
69
+ return this;
70
+ };
71
+ RateCollection.prototype.toObject = function () {
72
+ var e_1, _a;
73
+ var res = [];
74
+ try {
75
+ for (var _b = __values(this.rates), _c = _b.next(); !_c.done; _c = _b.next()) {
76
+ var rate = _c.value;
77
+ res.push(rate.getData());
78
+ }
79
+ }
80
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
81
+ finally {
82
+ try {
83
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
84
+ }
85
+ finally { if (e_1) throw e_1.error; }
86
+ }
87
+ return res;
88
+ };
89
+ return RateCollection;
90
+ }());
91
+ exports.default = RateCollection;
@@ -0,0 +1,21 @@
1
+ import { DocumentService } from '../services';
2
+ import { DocumentsModel, RateCollection } from "../models";
3
+ import { RateInterface } from "../interfaces";
4
+ declare abstract class Rate implements RateInterface {
5
+ readonly insuranceCategory: string;
6
+ readonly data: any;
7
+ protected readonly documentService: DocumentService;
8
+ protected readonly documents: Promise<() => Promise<DocumentsModel>>;
9
+ constructor(insuranceCategory: string, data: any);
10
+ getData(): any;
11
+ get(key: string, defaultValue?: any): any | null;
12
+ set(key: string, value: string): this;
13
+ getPrice(): number;
14
+ getCoverage(): number;
15
+ getRates(): RateCollection;
16
+ getCompanyName(): string;
17
+ getInsuranceCategory(): string;
18
+ protected fetchDocuments(): Promise<() => Promise<DocumentsModel>>;
19
+ getDocuments(): Promise<DocumentsModel>;
20
+ }
21
+ export default Rate;