cemiar-epic-service-common 1.0.113 → 1.0.115
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.
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { Address } from './Address';
|
|
2
|
-
export interface
|
|
2
|
+
export interface Driver {
|
|
3
3
|
DriverID: number;
|
|
4
4
|
LineID: number;
|
|
5
|
-
AccidentItems:
|
|
6
|
-
ConvictionItems:
|
|
7
|
-
DriverResidentValue:
|
|
5
|
+
AccidentItems: DriverModel.AccidentItem[];
|
|
6
|
+
ConvictionItems: DriverModel.ConvictionItem[];
|
|
7
|
+
DriverResidentValue: DriverModel.DriverResident;
|
|
8
8
|
}
|
|
9
|
-
export declare namespace
|
|
9
|
+
export declare namespace DriverModel {
|
|
10
10
|
interface AccidentItem {
|
|
11
11
|
AccidentID: number;
|
|
12
12
|
AccidentDate: string | null;
|
|
13
13
|
Description: string;
|
|
14
14
|
VehicleNumber: number | null;
|
|
15
|
+
VehicleID: number | null;
|
|
15
16
|
AmountPaidOrEstimate: number | null;
|
|
16
17
|
AtFaultPercentage: number | null;
|
|
17
18
|
TypeOfAccidentOrClaimCode: string;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface Vehicle {
|
|
2
2
|
VehicleID: number;
|
|
3
3
|
LineID: number;
|
|
4
|
-
Description:
|
|
5
|
-
Additionnals:
|
|
6
|
-
AdditionnalCoverages:
|
|
7
|
-
Discounts:
|
|
8
|
-
VehicleRating:
|
|
4
|
+
Description: VehicleModel.Description;
|
|
5
|
+
Additionnals: VehicleModel.Additionnal[];
|
|
6
|
+
AdditionnalCoverages: VehicleModel.AdditionnalCoverage[];
|
|
7
|
+
Discounts: VehicleModel.Discount[];
|
|
8
|
+
VehicleRating: VehicleModel.VehicleRating;
|
|
9
9
|
Limits: any;
|
|
10
10
|
}
|
|
11
|
-
export declare namespace
|
|
11
|
+
export declare namespace VehicleModel {
|
|
12
12
|
interface Description {
|
|
13
13
|
TradeName: string;
|
|
14
14
|
Model: string;
|
|
@@ -55,10 +55,9 @@ class BaseEpicService {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
async post(endpoint, data) {
|
|
58
|
-
const { data: axiosResponse } = await this.axiosInstance.post(endpoint, data);
|
|
59
|
-
this.handleError(axiosResponse);
|
|
60
|
-
axiosResponse.result = axiosResponse.result.replace(/ /g, '');
|
|
61
58
|
try {
|
|
59
|
+
const { data: axiosResponse } = await this.axiosInstance.post(endpoint, data);
|
|
60
|
+
axiosResponse.result = axiosResponse.result.replace(/ /g, '');
|
|
62
61
|
const responseArray = axiosResponse.result.split(':')[1].split(',');
|
|
63
62
|
if (responseArray.length === 1) {
|
|
64
63
|
return responseArray[0];
|
package/dist/services/Epic.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { Company } from '../models/epic/Company';
|
|
|
7
7
|
import { Contact, CreateContact } from '../models/epic/Contact';
|
|
8
8
|
import { CreateCustomer, Customer } from '../models/epic/Customer';
|
|
9
9
|
import { DirectBillCommission } from '../models/epic/DirectBillCommission';
|
|
10
|
-
import {
|
|
10
|
+
import { Driver } from '../models/epic/Driver';
|
|
11
11
|
import { Habitational } from '../models/epic/Habitational';
|
|
12
12
|
import { Line } from '../models/epic/Line';
|
|
13
13
|
import { LookUp } from '../models/epic/Lookup';
|
|
@@ -18,7 +18,7 @@ import { PolicyV2, PolicyV2Model } from '../models/epic/PolicyV2';
|
|
|
18
18
|
import { Receipt } from '../models/epic/Receipt';
|
|
19
19
|
import { RenewalStage } from '../models/epic/RenewalStage';
|
|
20
20
|
import { CreatePaymentTransaction, CreateTransaction, FinanceTransaction, FinanceTransactionResult, Transaction, TransactionApplyCreditsToDebits } from '../models/epic/Transaction';
|
|
21
|
-
import {
|
|
21
|
+
import { Vehicle } from '../models/epic/Vehicle';
|
|
22
22
|
import BaseEpicService from './BaseEpicService';
|
|
23
23
|
import { JobEpicService } from './JobEpicService';
|
|
24
24
|
export default class EpicService extends BaseEpicService {
|
|
@@ -87,8 +87,10 @@ export default class EpicService extends BaseEpicService {
|
|
|
87
87
|
createOpportunity(payload: object): Promise<string | string[]>;
|
|
88
88
|
getClaim(claimId: string): Promise<Claim>;
|
|
89
89
|
getClaims(queryParams: object): Promise<Claim[]>;
|
|
90
|
-
getPersonalAutoVehicles(queryParams: object): Promise<
|
|
91
|
-
getPersonalAutoDrivers(queryParams: object): Promise<
|
|
90
|
+
getPersonalAutoVehicles(queryParams: object): Promise<Vehicle[]>;
|
|
91
|
+
getPersonalAutoDrivers(queryParams: object): Promise<Driver[]>;
|
|
92
|
+
getCommercialAutoVehicles(queryParams: object): Promise<Vehicle[]>;
|
|
93
|
+
getCommercialAutoDrivers(queryParams: object): Promise<Driver[]>;
|
|
92
94
|
getPolicyLine(lineId: string): Promise<Line>;
|
|
93
95
|
getPolicyLines(queryParams: object): Promise<Line[]>;
|
|
94
96
|
createPolicyLine(policyLine: object): Promise<string>;
|
package/dist/services/Epic.js
CHANGED
|
@@ -220,6 +220,12 @@ class EpicService extends BaseEpicService_1.default {
|
|
|
220
220
|
async getPersonalAutoDrivers(queryParams) {
|
|
221
221
|
return this.get('personalAuto/driver', queryParams);
|
|
222
222
|
}
|
|
223
|
+
async getCommercialAutoVehicles(queryParams) {
|
|
224
|
+
return this.get('commercialAuto/vehicle', queryParams);
|
|
225
|
+
}
|
|
226
|
+
async getCommercialAutoDrivers(queryParams) {
|
|
227
|
+
return this.get('commercialAuto/driver', queryParams);
|
|
228
|
+
}
|
|
223
229
|
async getPolicyLine(lineId) {
|
|
224
230
|
return this.getOne('policyLine', lineId);
|
|
225
231
|
}
|