@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.
- package/README.md +79 -0
- package/package.json +33 -0
- package/src/js/adapters/index.d.ts +1 -0
- package/src/js/adapters/index.js +5 -0
- package/src/js/adapters/local-storage.adapter.d.ts +15 -0
- package/src/js/adapters/local-storage.adapter.js +56 -0
- package/src/js/clients/index.d.ts +1 -0
- package/src/js/clients/index.js +5 -0
- package/src/js/clients/insurance-transmission.client.d.ts +14 -0
- package/src/js/clients/insurance-transmission.client.js +88 -0
- package/src/js/core/http.client.d.ts +32 -0
- package/src/js/core/http.client.js +146 -0
- package/src/js/core/index.d.ts +2 -0
- package/src/js/core/index.js +7 -0
- package/src/js/core/injector.d.ts +17 -0
- package/src/js/core/injector.js +67 -0
- package/src/js/factories/api-service.factory.d.ts +4 -0
- package/src/js/factories/api-service.factory.js +50 -0
- package/src/js/factories/comparison.factory.d.ts +32 -0
- package/src/js/factories/comparison.factory.js +23 -0
- package/src/js/factories/index.d.ts +3 -0
- package/src/js/factories/index.js +9 -0
- package/src/js/factories/rate.factory.d.ts +6 -0
- package/src/js/factories/rate.factory.js +92 -0
- package/src/js/handlers/error.handler.d.ts +7 -0
- package/src/js/handlers/error.handler.js +12 -0
- package/src/js/handlers/index.d.ts +3 -0
- package/src/js/handlers/index.js +9 -0
- package/src/js/handlers/rate-handler.d.ts +10 -0
- package/src/js/handlers/rate-handler.js +70 -0
- package/src/js/handlers/response.handler.d.ts +7 -0
- package/src/js/handlers/response.handler.js +12 -0
- package/src/js/index.d.ts +5 -0
- package/src/js/index.js +21 -0
- package/src/js/interfaces/additional-coverage.interface.d.ts +8 -0
- package/src/js/interfaces/additional-coverage.interface.js +2 -0
- package/src/js/interfaces/calculate-rates.interface.d.ts +5 -0
- package/src/js/interfaces/calculate-rates.interface.js +2 -0
- package/src/js/interfaces/comparison/comparison-data-collection.interface.d.ts +16 -0
- package/src/js/interfaces/comparison/comparison-data-collection.interface.js +2 -0
- package/src/js/interfaces/comparison/comparison-insurance-data.interface.d.ts +8 -0
- package/src/js/interfaces/comparison/comparison-insurance-data.interface.js +2 -0
- package/src/js/interfaces/comparison/comparison-insurance.interface.d.ts +11 -0
- package/src/js/interfaces/comparison/comparison-insurance.interface.js +2 -0
- package/src/js/interfaces/comparison/comparison.interface.d.ts +8 -0
- package/src/js/interfaces/comparison/comparison.interface.js +2 -0
- package/src/js/interfaces/comparison/index.d.ts +4 -0
- package/src/js/interfaces/comparison/index.js +2 -0
- package/src/js/interfaces/environment.interface.d.ts +7 -0
- package/src/js/interfaces/environment.interface.js +2 -0
- package/src/js/interfaces/index.d.ts +10 -0
- package/src/js/interfaces/index.js +19 -0
- package/src/js/interfaces/moped-rate.interface.d.ts +38 -0
- package/src/js/interfaces/moped-rate.interface.js +2 -0
- package/src/js/interfaces/nextable.interface.d.ts +4 -0
- package/src/js/interfaces/nextable.interface.js +2 -0
- package/src/js/interfaces/rate.interface.d.ts +12 -0
- package/src/js/interfaces/rate.interface.js +2 -0
- package/src/js/interfaces/requests/additional-coverages-request.interface.d.ts +5 -0
- package/src/js/interfaces/requests/additional-coverages-request.interface.js +2 -0
- package/src/js/interfaces/requests/index.d.ts +2 -0
- package/src/js/interfaces/requests/index.js +2 -0
- package/src/js/interfaces/requests/moped-rate-request.interface.d.ts +21 -0
- package/src/js/interfaces/requests/moped-rate-request.interface.js +2 -0
- package/src/js/interfaces/storage.interface.d.ts +8 -0
- package/src/js/interfaces/storage.interface.js +2 -0
- package/src/js/interfaces/user.interface.d.ts +23 -0
- package/src/js/interfaces/user.interface.js +2 -0
- package/src/js/interfaces/utils/index.d.ts +2 -0
- package/src/js/interfaces/utils/index.js +2 -0
- package/src/js/interfaces/utils/timestampable.interface.d.ts +5 -0
- package/src/js/interfaces/utils/timestampable.interface.js +2 -0
- package/src/js/interfaces/utils/to-object.interface.d.ts +4 -0
- package/src/js/interfaces/utils/to-object.interface.js +2 -0
- package/src/js/maps/index.d.ts +2 -0
- package/src/js/maps/index.js +7 -0
- package/src/js/maps/insurance-key.config.d.ts +2 -0
- package/src/js/maps/insurance-key.config.js +13 -0
- package/src/js/maps/risk-insurance.map.d.ts +1 -0
- package/src/js/maps/risk-insurance.map.js +24 -0
- package/src/js/models/comparison/comparison-data-collection.model.d.ts +23 -0
- package/src/js/models/comparison/comparison-data-collection.model.js +149 -0
- package/src/js/models/comparison/comparison-insurance-data.model.d.ts +15 -0
- package/src/js/models/comparison/comparison-insurance-data.model.js +85 -0
- package/src/js/models/comparison/comparison-insurance.model.d.ts +17 -0
- package/src/js/models/comparison/comparison-insurance.model.js +43 -0
- package/src/js/models/comparison/comparison.model.d.ts +20 -0
- package/src/js/models/comparison/comparison.model.js +47 -0
- package/src/js/models/comparison/index.d.ts +4 -0
- package/src/js/models/comparison/index.js +11 -0
- package/src/js/models/configuration/configuration.model.d.ts +18 -0
- package/src/js/models/configuration/configuration.model.js +52 -0
- package/src/js/models/configuration/default-configuration.model.d.ts +5 -0
- package/src/js/models/configuration/default-configuration.model.js +34 -0
- package/src/js/models/configuration/index.d.ts +2 -0
- package/src/js/models/configuration/index.js +7 -0
- package/src/js/models/dkm-rate.model.d.ts +4 -0
- package/src/js/models/dkm-rate.model.js +26 -0
- package/src/js/models/documents.model.d.ts +9 -0
- package/src/js/models/documents.model.js +16 -0
- package/src/js/models/enra-model.d.ts +7 -0
- package/src/js/models/enra-model.js +30 -0
- package/src/js/models/index.d.ts +15 -0
- package/src/js/models/index.js +45 -0
- package/src/js/models/laka-rate.model.d.ts +7 -0
- package/src/js/models/laka-rate.model.js +29 -0
- package/src/js/models/moneyview-rate.model.d.ts +7 -0
- package/src/js/models/moneyview-rate.model.js +30 -0
- package/src/js/models/package-rate.model.d.ts +11 -0
- package/src/js/models/package-rate.model.js +109 -0
- package/src/js/models/pet/index.d.ts +1 -0
- package/src/js/models/pet/index.js +5 -0
- package/src/js/models/pet/petsecur-rate.model.d.ts +6 -0
- package/src/js/models/pet/petsecur-rate.model.js +29 -0
- package/src/js/models/rate-collection.model.d.ts +16 -0
- package/src/js/models/rate-collection.model.js +91 -0
- package/src/js/models/rate.model.d.ts +21 -0
- package/src/js/models/rate.model.js +108 -0
- package/src/js/models/risk-rate.model.d.ts +6 -0
- package/src/js/models/risk-rate.model.js +30 -0
- package/src/js/models/rolls-rate.model.d.ts +6 -0
- package/src/js/models/rolls-rate.model.js +30 -0
- package/src/js/models/undefined-rate.model.d.ts +7 -0
- package/src/js/models/undefined-rate.model.js +29 -0
- package/src/js/models/user.model.d.ts +36 -0
- package/src/js/models/user.model.js +115 -0
- package/src/js/models/vergelijkdirect-rate.model.d.ts +6 -0
- package/src/js/models/vergelijkdirect-rate.model.js +30 -0
- package/src/js/resources/base.resource.d.ts +9 -0
- package/src/js/resources/base.resource.js +12 -0
- package/src/js/resources/bike.resource.d.ts +8 -0
- package/src/js/resources/bike.resource.js +47 -0
- package/src/js/resources/car.resource.d.ts +12 -0
- package/src/js/resources/car.resource.js +70 -0
- package/src/js/resources/caravan.resource.d.ts +12 -0
- package/src/js/resources/caravan.resource.js +64 -0
- package/src/js/resources/categories.resource.d.ts +13 -0
- package/src/js/resources/categories.resource.js +123 -0
- package/src/js/resources/comparison-module.resource.d.ts +8 -0
- package/src/js/resources/comparison-module.resource.js +41 -0
- package/src/js/resources/comparison.resource.d.ts +9 -0
- package/src/js/resources/comparison.resource.js +48 -0
- package/src/js/resources/data-validation.resource.d.ts +9 -0
- package/src/js/resources/data-validation.resource.js +59 -0
- package/src/js/resources/data.resource.d.ts +10 -0
- package/src/js/resources/data.resource.js +80 -0
- package/src/js/resources/document.resource.d.ts +7 -0
- package/src/js/resources/document.resource.js +36 -0
- package/src/js/resources/home.resource.d.ts +10 -0
- package/src/js/resources/home.resource.js +57 -0
- package/src/js/resources/household.resource.d.ts +8 -0
- package/src/js/resources/household.resource.js +43 -0
- package/src/js/resources/housing.resource.d.ts +8 -0
- package/src/js/resources/housing.resource.js +44 -0
- package/src/js/resources/index.d.ts +19 -0
- package/src/js/resources/index.js +41 -0
- package/src/js/resources/legal-assistance.resource.d.ts +10 -0
- package/src/js/resources/legal-assistance.resource.js +57 -0
- package/src/js/resources/liability.resource.d.ts +6 -0
- package/src/js/resources/liability.resource.js +35 -0
- package/src/js/resources/loan.resource.d.ts +7 -0
- package/src/js/resources/loan.resource.js +35 -0
- package/src/js/resources/moped.resource.d.ts +13 -0
- package/src/js/resources/moped.resource.js +78 -0
- package/src/js/resources/motor.resource.d.ts +12 -0
- package/src/js/resources/motor.resource.js +70 -0
- package/src/js/resources/package.resource.d.ts +14 -0
- package/src/js/resources/package.resource.js +84 -0
- package/src/js/resources/partner.resource.d.ts +8 -0
- package/src/js/resources/partner.resource.js +42 -0
- package/src/js/resources/pet.resource.d.ts +8 -0
- package/src/js/resources/pet.resource.js +41 -0
- package/src/js/resources/travel.resource.d.ts +9 -0
- package/src/js/resources/travel.resource.js +49 -0
- package/src/js/resources/user.resource.d.ts +7 -0
- package/src/js/resources/user.resource.js +35 -0
- package/src/js/resources/v1.resource.d.ts +22 -0
- package/src/js/resources/v1.resource.js +119 -0
- package/src/js/services/bike.service.d.ts +10 -0
- package/src/js/services/bike.service.js +97 -0
- package/src/js/services/car.service.d.ts +14 -0
- package/src/js/services/car.service.js +108 -0
- package/src/js/services/caravan.service.d.ts +15 -0
- package/src/js/services/caravan.service.js +130 -0
- package/src/js/services/comparison-module.service.d.ts +7 -0
- package/src/js/services/comparison-module.service.js +16 -0
- package/src/js/services/comparison.service.d.ts +9 -0
- package/src/js/services/comparison.service.js +102 -0
- package/src/js/services/configurations.service.d.ts +12 -0
- package/src/js/services/configurations.service.js +81 -0
- package/src/js/services/data-validation.service.d.ts +8 -0
- package/src/js/services/data-validation.service.js +20 -0
- package/src/js/services/data.service.d.ts +9 -0
- package/src/js/services/data.service.js +74 -0
- package/src/js/services/document.service.d.ts +8 -0
- package/src/js/services/document.service.js +86 -0
- package/src/js/services/home.service.d.ts +12 -0
- package/src/js/services/home.service.js +90 -0
- package/src/js/services/household.service.d.ts +10 -0
- package/src/js/services/household.service.js +84 -0
- package/src/js/services/housing.service.d.ts +10 -0
- package/src/js/services/housing.service.js +97 -0
- package/src/js/services/index.d.ts +24 -0
- package/src/js/services/index.js +51 -0
- package/src/js/services/legal-assistance.service.d.ts +12 -0
- package/src/js/services/legal-assistance.service.js +90 -0
- package/src/js/services/liability.service.d.ts +9 -0
- package/src/js/services/liability.service.js +81 -0
- package/src/js/services/loan.service.d.ts +9 -0
- package/src/js/services/loan.service.js +80 -0
- package/src/js/services/moped.service.d.ts +16 -0
- package/src/js/services/moped.service.js +129 -0
- package/src/js/services/motor.service.d.ts +16 -0
- package/src/js/services/motor.service.js +128 -0
- package/src/js/services/package.service.d.ts +15 -0
- package/src/js/services/package.service.js +160 -0
- package/src/js/services/partner.service.d.ts +7 -0
- package/src/js/services/partner.service.js +17 -0
- package/src/js/services/pet.service.d.ts +10 -0
- package/src/js/services/pet.service.js +84 -0
- package/src/js/services/rate.service.d.ts +5 -0
- package/src/js/services/rate.service.js +43 -0
- package/src/js/services/travel.service.d.ts +11 -0
- package/src/js/services/travel.service.js +95 -0
- package/src/js/services/user.service.d.ts +6 -0
- package/src/js/services/user.service.js +13 -0
- package/src/js/services/v1.service.d.ts +19 -0
- package/src/js/services/v1.service.js +52 -0
- package/src/js/types/common/condition-url.type.d.ts +6 -0
- package/src/js/types/common/condition-url.type.js +2 -0
- package/src/js/types/common/index.d.ts +2 -0
- package/src/js/types/common/index.js +2 -0
- package/src/js/types/common/timestamps.type.d.ts +6 -0
- package/src/js/types/common/timestamps.type.js +2 -0
- package/src/js/types/index.d.ts +1 -0
- package/src/js/types/index.js +17 -0
- package/src/js/utils/compare-rate-by-coverage.util.d.ts +4 -0
- package/src/js/utils/compare-rate-by-coverage.util.js +64 -0
- package/src/js/utils/index.d.ts +2 -0
- package/src/js/utils/index.js +7 -0
- package/src/js/utils/range.util.d.ts +2 -0
- package/src/js/utils/range.util.js +5 -0
- package/src/js/utils/sorting.util.d.ts +5 -0
- package/src/js/utils/sorting.util.js +11 -0
- package/src/js/utils/supplierPlacementTracker.util.d.ts +4 -0
- package/src/js/utils/supplierPlacementTracker.util.js +18 -0
|
@@ -0,0 +1,97 @@
|
|
|
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
var resources_1 = require("../resources");
|
|
55
|
+
var models_1 = require("../models");
|
|
56
|
+
var handlers_1 = require("../handlers");
|
|
57
|
+
var utils_1 = require("../utils");
|
|
58
|
+
var index_1 = require("./index");
|
|
59
|
+
var HousingService = /** @class */ (function (_super) {
|
|
60
|
+
__extends(HousingService, _super);
|
|
61
|
+
function HousingService() {
|
|
62
|
+
var _this = _super.call(this) || this;
|
|
63
|
+
_this.client = new resources_1.HousingResource();
|
|
64
|
+
return _this;
|
|
65
|
+
}
|
|
66
|
+
HousingService.prototype.getRates = function (data) {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
68
|
+
var services, rates;
|
|
69
|
+
return __generator(this, function (_a) {
|
|
70
|
+
switch (_a.label) {
|
|
71
|
+
case 0: return [4 /*yield*/, this.client.getRates(data)];
|
|
72
|
+
case 1:
|
|
73
|
+
services = _a.sent();
|
|
74
|
+
rates = this.handleRates(services);
|
|
75
|
+
return [2 /*return*/, new models_1.RateCollection('housing', rates.sort(utils_1.sortBy.price))];
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
HousingService.prototype.getMoneyviewRates = function (data) {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
82
|
+
var moneyview, moneyviewRateHandler, rates;
|
|
83
|
+
return __generator(this, function (_a) {
|
|
84
|
+
switch (_a.label) {
|
|
85
|
+
case 0: return [4 /*yield*/, this.client.getMoneyviewRates(data)];
|
|
86
|
+
case 1:
|
|
87
|
+
moneyview = _a.sent();
|
|
88
|
+
moneyviewRateHandler = new handlers_1.RateHandler(moneyview);
|
|
89
|
+
rates = moneyviewRateHandler.handle();
|
|
90
|
+
return [2 /*return*/, new models_1.RateCollection('housing', rates.sort(utils_1.sortBy.price))];
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
return HousingService;
|
|
96
|
+
}(index_1.RateService));
|
|
97
|
+
exports.default = HousingService;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export { default as DataService } from "./data.service";
|
|
2
|
+
export { default as RateService } from "./rate.service";
|
|
3
|
+
export { default as PetService } from "./pet.service";
|
|
4
|
+
export { default as LoanService } from "./loan.service";
|
|
5
|
+
export { default as HomeService } from "./home.service";
|
|
6
|
+
export { default as MopedService } from "./moped.service";
|
|
7
|
+
export { default as MotorService } from "./motor.service";
|
|
8
|
+
export { default as CaravanService } from "./caravan.service";
|
|
9
|
+
export { default as BikeService } from "./bike.service";
|
|
10
|
+
export { default as HouseholdService } from "./household.service";
|
|
11
|
+
export { default as V1Service } from "./v1.service";
|
|
12
|
+
export { default as HousingService } from "./housing.service";
|
|
13
|
+
export { default as LiabilityService } from "./liability.service";
|
|
14
|
+
export { default as LegalAssistanceService } from "./legal-assistance.service";
|
|
15
|
+
export { default as PartnerService } from "./partner.service";
|
|
16
|
+
export { default as ComparisonModuleService } from "./comparison-module.service";
|
|
17
|
+
export { default as ConfigurationsService } from "./configurations.service";
|
|
18
|
+
export { default as PackageService } from "./package.service";
|
|
19
|
+
export { default as DocumentService } from "./document.service";
|
|
20
|
+
export { default as ComparisonService } from "./comparison.service";
|
|
21
|
+
export { default as DataValidationService } from "./data-validation.service";
|
|
22
|
+
export { default as CarService } from "./car.service";
|
|
23
|
+
export { default as TravelService } from "./travel.service";
|
|
24
|
+
export { default as UserService } from "./user.service";
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserService = exports.TravelService = exports.CarService = exports.DataValidationService = exports.ComparisonService = exports.DocumentService = exports.PackageService = exports.ConfigurationsService = exports.ComparisonModuleService = exports.PartnerService = exports.LegalAssistanceService = exports.LiabilityService = exports.HousingService = exports.V1Service = exports.HouseholdService = exports.BikeService = exports.CaravanService = exports.MotorService = exports.MopedService = exports.HomeService = exports.LoanService = exports.PetService = exports.RateService = exports.DataService = void 0;
|
|
4
|
+
var data_service_1 = require("./data.service");
|
|
5
|
+
Object.defineProperty(exports, "DataService", { enumerable: true, get: function () { return data_service_1.default; } });
|
|
6
|
+
var rate_service_1 = require("./rate.service");
|
|
7
|
+
Object.defineProperty(exports, "RateService", { enumerable: true, get: function () { return rate_service_1.default; } });
|
|
8
|
+
var pet_service_1 = require("./pet.service");
|
|
9
|
+
Object.defineProperty(exports, "PetService", { enumerable: true, get: function () { return pet_service_1.default; } });
|
|
10
|
+
var loan_service_1 = require("./loan.service");
|
|
11
|
+
Object.defineProperty(exports, "LoanService", { enumerable: true, get: function () { return loan_service_1.default; } });
|
|
12
|
+
var home_service_1 = require("./home.service");
|
|
13
|
+
Object.defineProperty(exports, "HomeService", { enumerable: true, get: function () { return home_service_1.default; } });
|
|
14
|
+
var moped_service_1 = require("./moped.service");
|
|
15
|
+
Object.defineProperty(exports, "MopedService", { enumerable: true, get: function () { return moped_service_1.default; } });
|
|
16
|
+
var motor_service_1 = require("./motor.service");
|
|
17
|
+
Object.defineProperty(exports, "MotorService", { enumerable: true, get: function () { return motor_service_1.default; } });
|
|
18
|
+
var caravan_service_1 = require("./caravan.service");
|
|
19
|
+
Object.defineProperty(exports, "CaravanService", { enumerable: true, get: function () { return caravan_service_1.default; } });
|
|
20
|
+
var bike_service_1 = require("./bike.service");
|
|
21
|
+
Object.defineProperty(exports, "BikeService", { enumerable: true, get: function () { return bike_service_1.default; } });
|
|
22
|
+
var household_service_1 = require("./household.service");
|
|
23
|
+
Object.defineProperty(exports, "HouseholdService", { enumerable: true, get: function () { return household_service_1.default; } });
|
|
24
|
+
var v1_service_1 = require("./v1.service");
|
|
25
|
+
Object.defineProperty(exports, "V1Service", { enumerable: true, get: function () { return v1_service_1.default; } });
|
|
26
|
+
var housing_service_1 = require("./housing.service");
|
|
27
|
+
Object.defineProperty(exports, "HousingService", { enumerable: true, get: function () { return housing_service_1.default; } });
|
|
28
|
+
var liability_service_1 = require("./liability.service");
|
|
29
|
+
Object.defineProperty(exports, "LiabilityService", { enumerable: true, get: function () { return liability_service_1.default; } });
|
|
30
|
+
var legal_assistance_service_1 = require("./legal-assistance.service");
|
|
31
|
+
Object.defineProperty(exports, "LegalAssistanceService", { enumerable: true, get: function () { return legal_assistance_service_1.default; } });
|
|
32
|
+
var partner_service_1 = require("./partner.service");
|
|
33
|
+
Object.defineProperty(exports, "PartnerService", { enumerable: true, get: function () { return partner_service_1.default; } });
|
|
34
|
+
var comparison_module_service_1 = require("./comparison-module.service");
|
|
35
|
+
Object.defineProperty(exports, "ComparisonModuleService", { enumerable: true, get: function () { return comparison_module_service_1.default; } });
|
|
36
|
+
var configurations_service_1 = require("./configurations.service");
|
|
37
|
+
Object.defineProperty(exports, "ConfigurationsService", { enumerable: true, get: function () { return configurations_service_1.default; } });
|
|
38
|
+
var package_service_1 = require("./package.service");
|
|
39
|
+
Object.defineProperty(exports, "PackageService", { enumerable: true, get: function () { return package_service_1.default; } });
|
|
40
|
+
var document_service_1 = require("./document.service");
|
|
41
|
+
Object.defineProperty(exports, "DocumentService", { enumerable: true, get: function () { return document_service_1.default; } });
|
|
42
|
+
var comparison_service_1 = require("./comparison.service");
|
|
43
|
+
Object.defineProperty(exports, "ComparisonService", { enumerable: true, get: function () { return comparison_service_1.default; } });
|
|
44
|
+
var data_validation_service_1 = require("./data-validation.service");
|
|
45
|
+
Object.defineProperty(exports, "DataValidationService", { enumerable: true, get: function () { return data_validation_service_1.default; } });
|
|
46
|
+
var car_service_1 = require("./car.service");
|
|
47
|
+
Object.defineProperty(exports, "CarService", { enumerable: true, get: function () { return car_service_1.default; } });
|
|
48
|
+
var travel_service_1 = require("./travel.service");
|
|
49
|
+
Object.defineProperty(exports, "TravelService", { enumerable: true, get: function () { return travel_service_1.default; } });
|
|
50
|
+
var user_service_1 = require("./user.service");
|
|
51
|
+
Object.defineProperty(exports, "UserService", { enumerable: true, get: function () { return user_service_1.default; } });
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RateCollection } from "../models";
|
|
2
|
+
import { AdditionalCoverageInterface, CalculateRatesInterface } from "../interfaces";
|
|
3
|
+
import { RateService } from "./index";
|
|
4
|
+
declare class LegalAssistanceService extends RateService implements CalculateRatesInterface {
|
|
5
|
+
private client;
|
|
6
|
+
constructor();
|
|
7
|
+
getRates(data: any): Promise<RateCollection>;
|
|
8
|
+
getRiskAdditionalCoverages(data: any): Promise<AdditionalCoverageInterface[] | []>;
|
|
9
|
+
getMoneyviewAdditionalCoverages(data: any): Promise<AdditionalCoverageInterface[] | []>;
|
|
10
|
+
getVergelijkdirectAdditionalCoverages(data: any): Promise<AdditionalCoverageInterface[] | []>;
|
|
11
|
+
}
|
|
12
|
+
export default LegalAssistanceService;
|
|
@@ -0,0 +1,90 @@
|
|
|
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
var resources_1 = require("../resources");
|
|
55
|
+
var models_1 = require("../models");
|
|
56
|
+
var utils_1 = require("../utils");
|
|
57
|
+
var index_1 = require("./index");
|
|
58
|
+
var LegalAssistanceService = /** @class */ (function (_super) {
|
|
59
|
+
__extends(LegalAssistanceService, _super);
|
|
60
|
+
function LegalAssistanceService() {
|
|
61
|
+
var _this = _super.call(this) || this;
|
|
62
|
+
_this.client = new resources_1.LegalAssistanceResource();
|
|
63
|
+
return _this;
|
|
64
|
+
}
|
|
65
|
+
LegalAssistanceService.prototype.getRates = function (data) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
67
|
+
var services, rates;
|
|
68
|
+
return __generator(this, function (_a) {
|
|
69
|
+
switch (_a.label) {
|
|
70
|
+
case 0: return [4 /*yield*/, this.client.getRates(data)];
|
|
71
|
+
case 1:
|
|
72
|
+
services = _a.sent();
|
|
73
|
+
rates = this.handleRates(services);
|
|
74
|
+
return [2 /*return*/, new models_1.RateCollection('legal-assistance', rates.sort(utils_1.sortBy.price))];
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
LegalAssistanceService.prototype.getRiskAdditionalCoverages = function (data) {
|
|
80
|
+
return this.client.getRiskAdditionalCoverages(data);
|
|
81
|
+
};
|
|
82
|
+
LegalAssistanceService.prototype.getMoneyviewAdditionalCoverages = function (data) {
|
|
83
|
+
return this.client.getMoneyviewAdditionalCoverages(data);
|
|
84
|
+
};
|
|
85
|
+
LegalAssistanceService.prototype.getVergelijkdirectAdditionalCoverages = function (data) {
|
|
86
|
+
return this.client.getVergelijkdirectAdditionalCoverages(data);
|
|
87
|
+
};
|
|
88
|
+
return LegalAssistanceService;
|
|
89
|
+
}(index_1.RateService));
|
|
90
|
+
exports.default = LegalAssistanceService;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RateCollection } from "../models";
|
|
2
|
+
import { CalculateRatesInterface } from "../interfaces";
|
|
3
|
+
import { RateService } from "./index";
|
|
4
|
+
declare class LiabilityService extends RateService implements CalculateRatesInterface {
|
|
5
|
+
private client;
|
|
6
|
+
constructor();
|
|
7
|
+
getRates(data: any): Promise<RateCollection>;
|
|
8
|
+
}
|
|
9
|
+
export default LiabilityService;
|
|
@@ -0,0 +1,81 @@
|
|
|
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
var resources_1 = require("../resources");
|
|
55
|
+
var models_1 = require("../models");
|
|
56
|
+
var utils_1 = require("../utils");
|
|
57
|
+
var index_1 = require("./index");
|
|
58
|
+
var LiabilityService = /** @class */ (function (_super) {
|
|
59
|
+
__extends(LiabilityService, _super);
|
|
60
|
+
function LiabilityService() {
|
|
61
|
+
var _this = _super.call(this) || this;
|
|
62
|
+
_this.client = new resources_1.LiabilityResource();
|
|
63
|
+
return _this;
|
|
64
|
+
}
|
|
65
|
+
LiabilityService.prototype.getRates = function (data) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
67
|
+
var services, rates;
|
|
68
|
+
return __generator(this, function (_a) {
|
|
69
|
+
switch (_a.label) {
|
|
70
|
+
case 0: return [4 /*yield*/, this.client.getRates(data)];
|
|
71
|
+
case 1:
|
|
72
|
+
services = _a.sent();
|
|
73
|
+
rates = this.handleRates(services);
|
|
74
|
+
return [2 /*return*/, new models_1.RateCollection('liability', rates.sort(utils_1.sortBy.price))];
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
return LiabilityService;
|
|
80
|
+
}(index_1.RateService));
|
|
81
|
+
exports.default = LiabilityService;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CalculateRatesInterface } from "../interfaces";
|
|
2
|
+
import { RateCollection } from "../models";
|
|
3
|
+
import { RateService } from "../services";
|
|
4
|
+
declare class LoanService extends RateService implements CalculateRatesInterface {
|
|
5
|
+
private client;
|
|
6
|
+
constructor();
|
|
7
|
+
getRates(data: any): Promise<RateCollection>;
|
|
8
|
+
}
|
|
9
|
+
export default LoanService;
|
|
@@ -0,0 +1,80 @@
|
|
|
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
var models_1 = require("../models");
|
|
55
|
+
var services_1 = require("../services");
|
|
56
|
+
var resources_1 = require("../resources");
|
|
57
|
+
var LoanService = /** @class */ (function (_super) {
|
|
58
|
+
__extends(LoanService, _super);
|
|
59
|
+
function LoanService() {
|
|
60
|
+
var _this = _super.call(this) || this;
|
|
61
|
+
_this.client = new resources_1.LoanResource();
|
|
62
|
+
return _this;
|
|
63
|
+
}
|
|
64
|
+
LoanService.prototype.getRates = function (data) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
66
|
+
var services, rates;
|
|
67
|
+
return __generator(this, function (_a) {
|
|
68
|
+
switch (_a.label) {
|
|
69
|
+
case 0: return [4 /*yield*/, this.client.getRates(data)];
|
|
70
|
+
case 1:
|
|
71
|
+
services = _a.sent();
|
|
72
|
+
rates = this.handleRates(services);
|
|
73
|
+
return [2 /*return*/, new models_1.RateCollection('loan', rates)];
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
return LoanService;
|
|
79
|
+
}(services_1.RateService));
|
|
80
|
+
exports.default = LoanService;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RateCollection } from "../models";
|
|
2
|
+
import { MopedRatesRequestInterface, AdditionalCoverageInterface, CalculateRatesInterface } from "../interfaces";
|
|
3
|
+
import { RateService } from "./index";
|
|
4
|
+
declare class MopedService extends RateService implements CalculateRatesInterface {
|
|
5
|
+
private client;
|
|
6
|
+
constructor();
|
|
7
|
+
findMoped(licensePlate: string): Promise<any>;
|
|
8
|
+
checkValidity(data: any): Promise<any>;
|
|
9
|
+
getRates(data: MopedRatesRequestInterface): Promise<RateCollection>;
|
|
10
|
+
getCoverageRateComparison(data: MopedRatesRequestInterface): Promise<RateCollection>;
|
|
11
|
+
getRiskAdditionalCoverages(data: any): Promise<AdditionalCoverageInterface[] | []>;
|
|
12
|
+
getVergelijkdirectAdditionalCoverages(data: any): Promise<AdditionalCoverageInterface[] | []>;
|
|
13
|
+
getEnraAdditionalCoverages(data: any): Promise<AdditionalCoverageInterface[] | []>;
|
|
14
|
+
getMoneyviewAdditionalCoverages(data: any): Promise<AdditionalCoverageInterface[] | []>;
|
|
15
|
+
}
|
|
16
|
+
export default MopedService;
|
|
@@ -0,0 +1,129 @@
|
|
|
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
var resources_1 = require("../resources");
|
|
55
|
+
var models_1 = require("../models");
|
|
56
|
+
var utils_1 = require("../utils");
|
|
57
|
+
var index_1 = require("./index");
|
|
58
|
+
var MopedService = /** @class */ (function (_super) {
|
|
59
|
+
__extends(MopedService, _super);
|
|
60
|
+
function MopedService() {
|
|
61
|
+
var _this = _super.call(this) || this;
|
|
62
|
+
_this.client = new resources_1.MopedResource();
|
|
63
|
+
return _this;
|
|
64
|
+
}
|
|
65
|
+
MopedService.prototype.findMoped = function (licensePlate) {
|
|
66
|
+
return this.client.findMoped(licensePlate);
|
|
67
|
+
};
|
|
68
|
+
MopedService.prototype.checkValidity = function (data) {
|
|
69
|
+
return this.client.checkValidity(data);
|
|
70
|
+
};
|
|
71
|
+
MopedService.prototype.getRates = function (data) {
|
|
72
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
73
|
+
var services, rates;
|
|
74
|
+
return __generator(this, function (_a) {
|
|
75
|
+
switch (_a.label) {
|
|
76
|
+
case 0: return [4 /*yield*/, this.client.getRates(data)];
|
|
77
|
+
case 1:
|
|
78
|
+
services = _a.sent();
|
|
79
|
+
rates = this.handleRates(services);
|
|
80
|
+
return [2 /*return*/, new models_1.RateCollection('moped', rates.sort(utils_1.sortBy.price))];
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
MopedService.prototype.getCoverageRateComparison = function (data) {
|
|
86
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
87
|
+
var services, rates;
|
|
88
|
+
return __generator(this, function (_a) {
|
|
89
|
+
switch (_a.label) {
|
|
90
|
+
case 0: return [4 /*yield*/, this.client.getCoverageRateComparison(data)];
|
|
91
|
+
case 1:
|
|
92
|
+
services = _a.sent();
|
|
93
|
+
rates = this.handleRates(services);
|
|
94
|
+
return [2 /*return*/, new models_1.RateCollection('moped', (0, utils_1.compareRateByCoverage)(rates))];
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
MopedService.prototype.getRiskAdditionalCoverages = function (data) {
|
|
100
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
101
|
+
return __generator(this, function (_a) {
|
|
102
|
+
return [2 /*return*/, this.client.getRiskAdditionalCoverages(data)];
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
MopedService.prototype.getVergelijkdirectAdditionalCoverages = function (data) {
|
|
107
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
108
|
+
return __generator(this, function (_a) {
|
|
109
|
+
return [2 /*return*/, this.client.getVergelijkdirectAdditionalCoverages(data)];
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
MopedService.prototype.getEnraAdditionalCoverages = function (data) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
115
|
+
return __generator(this, function (_a) {
|
|
116
|
+
return [2 /*return*/, this.client.getEnraAdditionalCoverages(data)];
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
MopedService.prototype.getMoneyviewAdditionalCoverages = function (data) {
|
|
121
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
122
|
+
return __generator(this, function (_a) {
|
|
123
|
+
return [2 /*return*/, this.client.getMoneyviewAdditionalCoverages(data)];
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
return MopedService;
|
|
128
|
+
}(index_1.RateService));
|
|
129
|
+
exports.default = MopedService;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RateCollection } from "../models";
|
|
2
|
+
import { AdditionalCoverageInterface, CalculateRatesInterface } from "../interfaces";
|
|
3
|
+
import { RateService } from "../services";
|
|
4
|
+
declare class MotorService extends RateService implements CalculateRatesInterface {
|
|
5
|
+
private client;
|
|
6
|
+
constructor();
|
|
7
|
+
findMotor(licensePlate: string): Promise<any>;
|
|
8
|
+
checkValidity(data: any): Promise<any>;
|
|
9
|
+
getRates(data: any): Promise<RateCollection>;
|
|
10
|
+
getCoverageRateComparison(data: any): Promise<RateCollection>;
|
|
11
|
+
getCoverageRateComparisonForCoverage(coverage: string, data: any): Promise<RateCollection>;
|
|
12
|
+
getRiskAdditionalCoverages(data: any): Promise<AdditionalCoverageInterface[] | []>;
|
|
13
|
+
getMoneyviewAdditionalCoverages(data: any): Promise<AdditionalCoverageInterface[] | []>;
|
|
14
|
+
getRollsAdditionalCoverages(data: any): Promise<AdditionalCoverageInterface[] | []>;
|
|
15
|
+
}
|
|
16
|
+
export default MotorService;
|