@cemiar/cemiarlink-sdk 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +7 -7
- package/dist/index.js +12 -12
- package/dist/models/admin/index.d.ts +9 -9
- package/dist/models/admin/index.js +9 -9
- package/dist/models/epic/Contact.d.ts +1 -1
- package/dist/models/epic/Customer.d.ts +1 -1
- package/dist/models/epic/Driver.d.ts +1 -1
- package/dist/models/epic/Employee.d.ts +3 -3
- package/dist/models/epic/Habitational.d.ts +1 -1
- package/dist/models/epic/Line.d.ts +3 -3
- package/dist/models/epic/MultiCarrierSchedule.d.ts +1 -1
- package/dist/models/epic/Policy.d.ts +3 -3
- package/dist/models/epic/PolicyV2.d.ts +1 -1
- package/dist/models/epic/Receipt.d.ts +1 -1
- package/dist/models/epic/Transaction.d.ts +1 -1
- package/dist/models/epic/index.d.ts +17 -17
- package/dist/models/epic/index.js +17 -17
- package/dist/services/Admin.d.ts +1 -1
- package/dist/services/Admin.js +15 -15
- package/dist/services/BaseEpicService.js +2 -2
- package/dist/services/Epic.d.ts +13 -13
- package/dist/services/Epic.js +7 -7
- package/dist/services/JobEpicService.d.ts +2 -2
- package/dist/services/JobEpicService.js +2 -2
- package/dist/services/MultiCarrierScheduleEpicService.d.ts +2 -2
- package/dist/services/MultiCarrierScheduleEpicService.js +2 -2
- package/dist/utils/Excel.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { default as AdminService } from './services/Admin
|
|
2
|
-
export { default as BaseEpicService } from './services/BaseEpicService
|
|
3
|
-
export { default as Epic } from './services/Epic
|
|
4
|
-
export { default as JobEpicService } from './services/JobEpicService
|
|
5
|
-
export { default as MultiCarrierScheduleEpicService } from './services/MultiCarrierScheduleEpicService
|
|
6
|
-
export * as AdminModels from './models/admin/index
|
|
7
|
-
export * as EpicModels from './models/epic/index
|
|
1
|
+
export { default as AdminService } from './services/Admin';
|
|
2
|
+
export { default as BaseEpicService } from './services/BaseEpicService';
|
|
3
|
+
export { default as Epic } from './services/Epic';
|
|
4
|
+
export { default as JobEpicService } from './services/JobEpicService';
|
|
5
|
+
export { default as MultiCarrierScheduleEpicService } from './services/MultiCarrierScheduleEpicService';
|
|
6
|
+
export * as AdminModels from './models/admin/index';
|
|
7
|
+
export * as EpicModels from './models/epic/index';
|
package/dist/index.js
CHANGED
|
@@ -38,17 +38,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.EpicModels = exports.AdminModels = exports.MultiCarrierScheduleEpicService = exports.JobEpicService = exports.Epic = exports.BaseEpicService = exports.AdminService = void 0;
|
|
40
40
|
// Réexport des services
|
|
41
|
-
var
|
|
42
|
-
Object.defineProperty(exports, "AdminService", { enumerable: true, get: function () { return __importDefault(
|
|
43
|
-
var
|
|
44
|
-
Object.defineProperty(exports, "BaseEpicService", { enumerable: true, get: function () { return __importDefault(
|
|
45
|
-
var
|
|
46
|
-
Object.defineProperty(exports, "Epic", { enumerable: true, get: function () { return __importDefault(
|
|
47
|
-
var
|
|
48
|
-
Object.defineProperty(exports, "JobEpicService", { enumerable: true, get: function () { return __importDefault(
|
|
49
|
-
var
|
|
50
|
-
Object.defineProperty(exports, "MultiCarrierScheduleEpicService", { enumerable: true, get: function () { return __importDefault(
|
|
41
|
+
var Admin_1 = require("./services/Admin");
|
|
42
|
+
Object.defineProperty(exports, "AdminService", { enumerable: true, get: function () { return __importDefault(Admin_1).default; } });
|
|
43
|
+
var BaseEpicService_1 = require("./services/BaseEpicService");
|
|
44
|
+
Object.defineProperty(exports, "BaseEpicService", { enumerable: true, get: function () { return __importDefault(BaseEpicService_1).default; } });
|
|
45
|
+
var Epic_1 = require("./services/Epic");
|
|
46
|
+
Object.defineProperty(exports, "Epic", { enumerable: true, get: function () { return __importDefault(Epic_1).default; } });
|
|
47
|
+
var JobEpicService_1 = require("./services/JobEpicService");
|
|
48
|
+
Object.defineProperty(exports, "JobEpicService", { enumerable: true, get: function () { return __importDefault(JobEpicService_1).default; } });
|
|
49
|
+
var MultiCarrierScheduleEpicService_1 = require("./services/MultiCarrierScheduleEpicService");
|
|
50
|
+
Object.defineProperty(exports, "MultiCarrierScheduleEpicService", { enumerable: true, get: function () { return __importDefault(MultiCarrierScheduleEpicService_1).default; } });
|
|
51
51
|
// Réexport des modèles admin
|
|
52
|
-
exports.AdminModels = __importStar(require("./models/admin/index
|
|
52
|
+
exports.AdminModels = __importStar(require("./models/admin/index"));
|
|
53
53
|
// Réexport des modèles epic
|
|
54
|
-
exports.EpicModels = __importStar(require("./models/epic/index
|
|
54
|
+
exports.EpicModels = __importStar(require("./models/epic/index"));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from './BusMessage
|
|
2
|
-
export * from './Counter
|
|
3
|
-
export * from './Email
|
|
4
|
-
export * from './ExcelSheet
|
|
5
|
-
export * from './ExtractTable
|
|
6
|
-
export * from './IDictionary
|
|
7
|
-
export * from './KimobyResult
|
|
8
|
-
export * from './PdfReader
|
|
9
|
-
export * from './Primaco
|
|
1
|
+
export * from './BusMessage';
|
|
2
|
+
export * from './Counter';
|
|
3
|
+
export * from './Email';
|
|
4
|
+
export * from './ExcelSheet';
|
|
5
|
+
export * from './ExtractTable';
|
|
6
|
+
export * from './IDictionary';
|
|
7
|
+
export * from './KimobyResult';
|
|
8
|
+
export * from './PdfReader';
|
|
9
|
+
export * from './Primaco';
|
|
@@ -14,12 +14,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./BusMessage
|
|
18
|
-
__exportStar(require("./Counter
|
|
19
|
-
__exportStar(require("./Email
|
|
20
|
-
__exportStar(require("./ExcelSheet
|
|
21
|
-
__exportStar(require("./ExtractTable
|
|
22
|
-
__exportStar(require("./IDictionary
|
|
23
|
-
__exportStar(require("./KimobyResult
|
|
24
|
-
__exportStar(require("./PdfReader
|
|
25
|
-
__exportStar(require("./Primaco
|
|
17
|
+
__exportStar(require("./BusMessage"), exports);
|
|
18
|
+
__exportStar(require("./Counter"), exports);
|
|
19
|
+
__exportStar(require("./Email"), exports);
|
|
20
|
+
__exportStar(require("./ExcelSheet"), exports);
|
|
21
|
+
__exportStar(require("./ExtractTable"), exports);
|
|
22
|
+
__exportStar(require("./IDictionary"), exports);
|
|
23
|
+
__exportStar(require("./KimobyResult"), exports);
|
|
24
|
+
__exportStar(require("./PdfReader"), exports);
|
|
25
|
+
__exportStar(require("./Primaco"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Address } from './Address
|
|
2
|
-
import { AgencyDefinedCode } from './Line
|
|
3
|
-
import { OptionType } from './OptionType
|
|
1
|
+
import { Address } from './Address';
|
|
2
|
+
import { AgencyDefinedCode } from './Line';
|
|
3
|
+
import { OptionType } from './OptionType';
|
|
4
4
|
export interface Employee {
|
|
5
5
|
AccountName: string;
|
|
6
6
|
AccountStatus: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Address } from './Address
|
|
2
|
-
import { OptionType } from './OptionType
|
|
3
|
-
import { ServicingContact } from './ServicingContact
|
|
1
|
+
import { Address } from './Address';
|
|
2
|
+
import { OptionType } from './OptionType';
|
|
3
|
+
import { ServicingContact } from './ServicingContact';
|
|
4
4
|
export interface BillingValue {
|
|
5
5
|
BillBrokerNet: boolean;
|
|
6
6
|
BillingPlan: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ServicingContact } from './ServicingContact
|
|
2
|
-
import { ServiceSummary } from './ServiceSummary
|
|
3
|
-
import { Line } from './Line
|
|
1
|
+
import { ServicingContact } from './ServicingContact';
|
|
2
|
+
import { ServiceSummary } from './ServiceSummary';
|
|
3
|
+
import { Line } from './Line';
|
|
4
4
|
export interface Policy {
|
|
5
5
|
AccountId: string;
|
|
6
6
|
AgencyCode: string;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export * from './Activity
|
|
2
|
-
export * from './Address
|
|
3
|
-
export * from './Attachment
|
|
4
|
-
export * from './Broker
|
|
5
|
-
export * from './Commission
|
|
6
|
-
export * from './Company
|
|
7
|
-
export * from './Contact
|
|
8
|
-
export * from './Customer
|
|
9
|
-
export * from './Habitational
|
|
10
|
-
export * from './Lookup
|
|
11
|
-
export * from './Opportunity
|
|
12
|
-
export * from './Policy
|
|
13
|
-
export * from './Response
|
|
14
|
-
export * from './ServiceSummary
|
|
15
|
-
export * from './ServicingContact
|
|
16
|
-
export * from './Transaction
|
|
17
|
-
export * from './Employee
|
|
1
|
+
export * from './Activity';
|
|
2
|
+
export * from './Address';
|
|
3
|
+
export * from './Attachment';
|
|
4
|
+
export * from './Broker';
|
|
5
|
+
export * from './Commission';
|
|
6
|
+
export * from './Company';
|
|
7
|
+
export * from './Contact';
|
|
8
|
+
export * from './Customer';
|
|
9
|
+
export * from './Habitational';
|
|
10
|
+
export * from './Lookup';
|
|
11
|
+
export * from './Opportunity';
|
|
12
|
+
export * from './Policy';
|
|
13
|
+
export * from './Response';
|
|
14
|
+
export * from './ServiceSummary';
|
|
15
|
+
export * from './ServicingContact';
|
|
16
|
+
export * from './Transaction';
|
|
17
|
+
export * from './Employee';
|
|
@@ -14,20 +14,20 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./Activity
|
|
18
|
-
__exportStar(require("./Address
|
|
19
|
-
__exportStar(require("./Attachment
|
|
20
|
-
__exportStar(require("./Broker
|
|
21
|
-
__exportStar(require("./Commission
|
|
22
|
-
__exportStar(require("./Company
|
|
23
|
-
__exportStar(require("./Contact
|
|
24
|
-
__exportStar(require("./Customer
|
|
25
|
-
__exportStar(require("./Habitational
|
|
26
|
-
__exportStar(require("./Lookup
|
|
27
|
-
__exportStar(require("./Opportunity
|
|
28
|
-
__exportStar(require("./Policy
|
|
29
|
-
__exportStar(require("./Response
|
|
30
|
-
__exportStar(require("./ServiceSummary
|
|
31
|
-
__exportStar(require("./ServicingContact
|
|
32
|
-
__exportStar(require("./Transaction
|
|
33
|
-
__exportStar(require("./Employee
|
|
17
|
+
__exportStar(require("./Activity"), exports);
|
|
18
|
+
__exportStar(require("./Address"), exports);
|
|
19
|
+
__exportStar(require("./Attachment"), exports);
|
|
20
|
+
__exportStar(require("./Broker"), exports);
|
|
21
|
+
__exportStar(require("./Commission"), exports);
|
|
22
|
+
__exportStar(require("./Company"), exports);
|
|
23
|
+
__exportStar(require("./Contact"), exports);
|
|
24
|
+
__exportStar(require("./Customer"), exports);
|
|
25
|
+
__exportStar(require("./Habitational"), exports);
|
|
26
|
+
__exportStar(require("./Lookup"), exports);
|
|
27
|
+
__exportStar(require("./Opportunity"), exports);
|
|
28
|
+
__exportStar(require("./Policy"), exports);
|
|
29
|
+
__exportStar(require("./Response"), exports);
|
|
30
|
+
__exportStar(require("./ServiceSummary"), exports);
|
|
31
|
+
__exportStar(require("./ServicingContact"), exports);
|
|
32
|
+
__exportStar(require("./Transaction"), exports);
|
|
33
|
+
__exportStar(require("./Employee"), exports);
|
package/dist/services/Admin.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
|
-
import { AzureOCRResponse, ClassificationResult, Counter, Email, EmailAws, BusMessagePayload, ExtractBody, ExtractInsurerResponse, ExtractTableResponse, FlashPaymentRequest, PdfReaderBody, PdfReaderResponse, SendMailResult, TableExtractBody } from "../models/admin/index
|
|
2
|
+
import { AzureOCRResponse, ClassificationResult, Counter, Email, EmailAws, BusMessagePayload, ExtractBody, ExtractInsurerResponse, ExtractTableResponse, FlashPaymentRequest, PdfReaderBody, PdfReaderResponse, SendMailResult, TableExtractBody } from "../models/admin/index";
|
|
3
3
|
export default class AdminService {
|
|
4
4
|
axiosInstance: AxiosInstance;
|
|
5
5
|
taskId?: string;
|
package/dist/services/Admin.js
CHANGED
|
@@ -5,13 +5,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const fs_1 = __importDefault(require("fs"));
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
8
|
+
const AxiosClient_1 = require("../utils/AxiosClient");
|
|
9
|
+
const MissingInfo_1 = require("../exceptions/MissingInfo");
|
|
10
|
+
const Excel_1 = __importDefault(require("../utils/Excel"));
|
|
11
11
|
class AdminService {
|
|
12
12
|
constructor(adminUrl, headers, taskId) {
|
|
13
13
|
this.taskId = taskId;
|
|
14
|
-
this.axiosInstance = new
|
|
14
|
+
this.axiosInstance = new AxiosClient_1.AxiosClient(adminUrl, headers).getInstance();
|
|
15
15
|
}
|
|
16
16
|
async updateCemiarTask(status) {
|
|
17
17
|
const dateTime = new Date();
|
|
@@ -66,7 +66,7 @@ class AdminService {
|
|
|
66
66
|
}
|
|
67
67
|
catch (error) {
|
|
68
68
|
if (((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.status) === 400) {
|
|
69
|
-
throw new
|
|
69
|
+
throw new MissingInfo_1.MissingInfo(error.response.data.message);
|
|
70
70
|
}
|
|
71
71
|
throw error;
|
|
72
72
|
}
|
|
@@ -79,10 +79,10 @@ class AdminService {
|
|
|
79
79
|
let data = [];
|
|
80
80
|
let filePath = `./temp/Rapport ${fileName} du ${date}`;
|
|
81
81
|
if (fs_1.default.existsSync(`${filePath}.csv`)) {
|
|
82
|
-
data = await
|
|
82
|
+
data = await Excel_1.default.getFromCSV(`${filePath}.csv`);
|
|
83
83
|
}
|
|
84
84
|
else if (fs_1.default.existsSync(`${filePath}.xlsx`)) {
|
|
85
|
-
data = await
|
|
85
|
+
data = await Excel_1.default.getFromXLSX(`${filePath}.xlsx`, sheetNumber);
|
|
86
86
|
}
|
|
87
87
|
else {
|
|
88
88
|
return [];
|
|
@@ -93,10 +93,10 @@ class AdminService {
|
|
|
93
93
|
let data = [];
|
|
94
94
|
let filePath = `./test/${fileName}`;
|
|
95
95
|
if (fs_1.default.existsSync(`${filePath}.csv`)) {
|
|
96
|
-
data = await
|
|
96
|
+
data = await Excel_1.default.getFromCSV(`${filePath}.csv`);
|
|
97
97
|
}
|
|
98
98
|
else if (fs_1.default.existsSync(`${filePath}.xlsx`)) {
|
|
99
|
-
data = await
|
|
99
|
+
data = await Excel_1.default.getFromXLSX(`${filePath}.xlsx`, sheetNumber);
|
|
100
100
|
}
|
|
101
101
|
else {
|
|
102
102
|
return [];
|
|
@@ -130,12 +130,12 @@ class AdminService {
|
|
|
130
130
|
}
|
|
131
131
|
async createReport(sheatData, headers, name) {
|
|
132
132
|
if (name.includes('.xlsx')) {
|
|
133
|
-
|
|
133
|
+
Excel_1.default.createFile(sheatData, headers, name);
|
|
134
134
|
}
|
|
135
135
|
if (name.includes('.csv')) {
|
|
136
|
-
|
|
136
|
+
Excel_1.default.appendFile(headers, name);
|
|
137
137
|
for (const row of sheatData) {
|
|
138
|
-
|
|
138
|
+
Excel_1.default.appendFile(row, name);
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
}
|
|
@@ -147,7 +147,7 @@ class AdminService {
|
|
|
147
147
|
}
|
|
148
148
|
catch (error) {
|
|
149
149
|
if (((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.status) === 400) {
|
|
150
|
-
throw new
|
|
150
|
+
throw new MissingInfo_1.MissingInfo(error.response.data.message);
|
|
151
151
|
}
|
|
152
152
|
throw error;
|
|
153
153
|
}
|
|
@@ -160,7 +160,7 @@ class AdminService {
|
|
|
160
160
|
}
|
|
161
161
|
catch (error) {
|
|
162
162
|
if (((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.status) === 400) {
|
|
163
|
-
throw new
|
|
163
|
+
throw new MissingInfo_1.MissingInfo(error.response.data.message);
|
|
164
164
|
}
|
|
165
165
|
throw error;
|
|
166
166
|
}
|
|
@@ -174,7 +174,7 @@ class AdminService {
|
|
|
174
174
|
}
|
|
175
175
|
catch (error) {
|
|
176
176
|
if (((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.status) === 400) {
|
|
177
|
-
throw new
|
|
177
|
+
throw new MissingInfo_1.MissingInfo(error.response.data.message);
|
|
178
178
|
}
|
|
179
179
|
throw error;
|
|
180
180
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const AxiosClient_1 = require("../utils/AxiosClient");
|
|
4
4
|
class BaseEpicService {
|
|
5
5
|
constructor(epicUrl, headers) {
|
|
6
|
-
this.axiosInstance = new
|
|
6
|
+
this.axiosInstance = new AxiosClient_1.AxiosClient(epicUrl, headers).getInstance();
|
|
7
7
|
}
|
|
8
8
|
handleError(axiosResponse) {
|
|
9
9
|
if (axiosResponse.bodyError) {
|
package/dist/services/Epic.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { BaseEpicService, JobEpicService, MultiCarrierScheduleEpicService } from "../index
|
|
2
|
-
import { AdditionalInterest } from "../models/epic/AdditionalInterest
|
|
3
|
-
import { Claim } from "../models/epic/Claim
|
|
4
|
-
import { DirectBillCommission } from "../models/epic/DirectBillCommission
|
|
5
|
-
import { Driver } from "../models/epic/Driver
|
|
6
|
-
import { GeneralLedgerReconcileBank } from "../models/epic/GeneralLedgerReconcileBank
|
|
7
|
-
import { Activity, Attachment, AttachmentDetail, Broker, Commission, Company, Contact, CreateActivity, CreateAttachment, CreateContact, CreateCustomer, CreatePaymentTransaction, CreatePolicy, CreateTransaction, Customer, Employee, FinanceTransaction, FinanceTransactionResult, Habitational, LookUp, Opportunity, Policy, Transaction, TransactionApplyCreditsToDebits } from "../models/epic/index
|
|
8
|
-
import { Line } from "../models/epic/Line
|
|
9
|
-
import { PayableContract } from "../models/epic/PayableContract
|
|
10
|
-
import { PolicyV2, PolicyV2Model } from "../models/epic/PolicyV2
|
|
11
|
-
import { Receipt } from "../models/epic/Receipt
|
|
12
|
-
import { RenewalStage } from "../models/epic/RenewalStage
|
|
13
|
-
import { Vehicle } from "../models/epic/Vehicle
|
|
1
|
+
import { BaseEpicService, JobEpicService, MultiCarrierScheduleEpicService } from "../index";
|
|
2
|
+
import { AdditionalInterest } from "../models/epic/AdditionalInterest";
|
|
3
|
+
import { Claim } from "../models/epic/Claim";
|
|
4
|
+
import { DirectBillCommission } from "../models/epic/DirectBillCommission";
|
|
5
|
+
import { Driver } from "../models/epic/Driver";
|
|
6
|
+
import { GeneralLedgerReconcileBank } from "../models/epic/GeneralLedgerReconcileBank";
|
|
7
|
+
import { Activity, Attachment, AttachmentDetail, Broker, Commission, Company, Contact, CreateActivity, CreateAttachment, CreateContact, CreateCustomer, CreatePaymentTransaction, CreatePolicy, CreateTransaction, Customer, Employee, FinanceTransaction, FinanceTransactionResult, Habitational, LookUp, Opportunity, Policy, Transaction, TransactionApplyCreditsToDebits } from "../models/epic/index";
|
|
8
|
+
import { Line } from "../models/epic/Line";
|
|
9
|
+
import { PayableContract } from "../models/epic/PayableContract";
|
|
10
|
+
import { PolicyV2, PolicyV2Model } from "../models/epic/PolicyV2";
|
|
11
|
+
import { Receipt } from "../models/epic/Receipt";
|
|
12
|
+
import { RenewalStage } from "../models/epic/RenewalStage";
|
|
13
|
+
import { Vehicle } from "../models/epic/Vehicle";
|
|
14
14
|
export default class EpicService extends BaseEpicService {
|
|
15
15
|
job: JobEpicService;
|
|
16
16
|
multiCarrierSchedule: MultiCarrierScheduleEpicService;
|
package/dist/services/Epic.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
class EpicService extends
|
|
3
|
+
const EpicException_1 = require("../exceptions/EpicException");
|
|
4
|
+
const index_1 = require("../index");
|
|
5
|
+
class EpicService extends index_1.BaseEpicService {
|
|
6
6
|
constructor(epicUrl, headers) {
|
|
7
7
|
super(epicUrl, headers);
|
|
8
|
-
this.job = new
|
|
9
|
-
this.multiCarrierSchedule = new
|
|
8
|
+
this.job = new index_1.JobEpicService(epicUrl, headers);
|
|
9
|
+
this.multiCarrierSchedule = new index_1.MultiCarrierScheduleEpicService(epicUrl, headers);
|
|
10
10
|
}
|
|
11
11
|
async getActivity(activityId) {
|
|
12
12
|
return this.getOne('activity', activityId);
|
|
@@ -151,7 +151,7 @@ class EpicService extends index_js_1.BaseEpicService {
|
|
|
151
151
|
const { data: axiosResponse } = await this.axiosInstance.put(`transaction/applyCreditsToDebits/${transactionId}`, payload);
|
|
152
152
|
if (!axiosResponse.success) {
|
|
153
153
|
if (axiosResponse.code == '400' || axiosResponse.code == '401' || axiosResponse.code == '404') {
|
|
154
|
-
throw new
|
|
154
|
+
throw new EpicException_1.EpicException(axiosResponse.message || axiosResponse.Message);
|
|
155
155
|
}
|
|
156
156
|
throw new Error(axiosResponse.message || axiosResponse.Message);
|
|
157
157
|
}
|
|
@@ -260,7 +260,7 @@ class EpicService extends index_js_1.BaseEpicService {
|
|
|
260
260
|
const { data: axiosResponse } = await this.axiosInstance.post(`receipt/${receiptId}`, payload);
|
|
261
261
|
if (!axiosResponse.success) {
|
|
262
262
|
if (axiosResponse.code == '400' || axiosResponse.code == '401' || axiosResponse.code == '404') {
|
|
263
|
-
throw new
|
|
263
|
+
throw new EpicException_1.EpicException(axiosResponse.message || axiosResponse.Message);
|
|
264
264
|
}
|
|
265
265
|
throw new Error(axiosResponse.message || axiosResponse.Message);
|
|
266
266
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseEpicService } from "../index
|
|
2
|
-
import { DirectBillCommission, Reconciliation } from "../models/epic/DirectBillCommission
|
|
1
|
+
import { BaseEpicService } from "../index";
|
|
2
|
+
import { DirectBillCommission, Reconciliation } from "../models/epic/DirectBillCommission";
|
|
3
3
|
export default class JobEpicService extends BaseEpicService {
|
|
4
4
|
readonly baseUrl = "job";
|
|
5
5
|
reconcile(payload: Reconciliation): Promise<string>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
class JobEpicService extends
|
|
3
|
+
const index_1 = require("../index");
|
|
4
|
+
class JobEpicService extends index_1.BaseEpicService {
|
|
5
5
|
constructor() {
|
|
6
6
|
super(...arguments);
|
|
7
7
|
this.baseUrl = 'job';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseEpicService } from "../index
|
|
2
|
-
import { MultiCarrierScheduleModel } from "../models/epic/MultiCarrierSchedule
|
|
1
|
+
import { BaseEpicService } from "../index";
|
|
2
|
+
import { MultiCarrierScheduleModel } from "../models/epic/MultiCarrierSchedule";
|
|
3
3
|
export default class MultiCarrierScheduleEpicService extends BaseEpicService {
|
|
4
4
|
readonly baseUrl = "multiCarrierSchedule";
|
|
5
5
|
getMultiCarrierSchedules(req: MultiCarrierScheduleModel.GetRequest): Promise<MultiCarrierScheduleModel.MultiCarrierSchedule[]>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
class MultiCarrierScheduleEpicService extends
|
|
3
|
+
const index_1 = require("../index");
|
|
4
|
+
class MultiCarrierScheduleEpicService extends index_1.BaseEpicService {
|
|
5
5
|
constructor() {
|
|
6
6
|
super(...arguments);
|
|
7
7
|
this.baseUrl = 'multiCarrierSchedule';
|
package/dist/utils/Excel.d.ts
CHANGED