@cemiar/cemiarlink-sdk 1.0.20 → 1.0.22

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 (120) hide show
  1. package/README.md +2 -2
  2. package/package.json +38 -38
  3. package/dist/exceptions/EpicException.d.ts +0 -3
  4. package/dist/exceptions/EpicException.js +0 -10
  5. package/dist/exceptions/MissingInfo.d.ts +0 -3
  6. package/dist/exceptions/MissingInfo.js +0 -10
  7. package/dist/exceptions/NotProcessYet.d.ts +0 -3
  8. package/dist/exceptions/NotProcessYet.js +0 -10
  9. package/dist/models/admin/BusMessage.d.ts +0 -4
  10. package/dist/models/admin/BusMessage.js +0 -2
  11. package/dist/models/admin/Counter.d.ts +0 -8
  12. package/dist/models/admin/Counter.js +0 -2
  13. package/dist/models/admin/Email.d.ts +0 -49
  14. package/dist/models/admin/Email.js +0 -2
  15. package/dist/models/admin/ExcelSheet.d.ts +0 -5
  16. package/dist/models/admin/ExcelSheet.js +0 -2
  17. package/dist/models/admin/ExtractTable.d.ts +0 -37
  18. package/dist/models/admin/ExtractTable.js +0 -2
  19. package/dist/models/admin/IDictionary.d.ts +0 -3
  20. package/dist/models/admin/IDictionary.js +0 -2
  21. package/dist/models/admin/KimobyResult.d.ts +0 -17
  22. package/dist/models/admin/KimobyResult.js +0 -2
  23. package/dist/models/admin/PdfReader.d.ts +0 -26
  24. package/dist/models/admin/PdfReader.js +0 -2
  25. package/dist/models/admin/Primaco.d.ts +0 -14
  26. package/dist/models/admin/Primaco.js +0 -2
  27. package/dist/models/epic/Activity.d.ts +0 -83
  28. package/dist/models/epic/Activity.js +0 -2
  29. package/dist/models/epic/AdditionalInterest.d.ts +0 -15
  30. package/dist/models/epic/AdditionalInterest.js +0 -2
  31. package/dist/models/epic/Address.d.ts +0 -10
  32. package/dist/models/epic/Address.js +0 -2
  33. package/dist/models/epic/Attachment.d.ts +0 -51
  34. package/dist/models/epic/Attachment.js +0 -2
  35. package/dist/models/epic/Broker.d.ts +0 -38
  36. package/dist/models/epic/Broker.js +0 -2
  37. package/dist/models/epic/Claim.d.ts +0 -24
  38. package/dist/models/epic/Claim.js +0 -2
  39. package/dist/models/epic/Commission.d.ts +0 -76
  40. package/dist/models/epic/Commission.js +0 -2
  41. package/dist/models/epic/Company.d.ts +0 -9
  42. package/dist/models/epic/Company.js +0 -2
  43. package/dist/models/epic/Contact.d.ts +0 -49
  44. package/dist/models/epic/Contact.js +0 -2
  45. package/dist/models/epic/Customer.d.ts +0 -98
  46. package/dist/models/epic/Customer.js +0 -2
  47. package/dist/models/epic/DirectBillCommission.d.ts +0 -18
  48. package/dist/models/epic/DirectBillCommission.js +0 -2
  49. package/dist/models/epic/Driver.d.ts +0 -67
  50. package/dist/models/epic/Driver.js +0 -2
  51. package/dist/models/epic/Employee.d.ts +0 -145
  52. package/dist/models/epic/Employee.js +0 -2
  53. package/dist/models/epic/GeneralLedgerReconcileBank.d.ts +0 -117
  54. package/dist/models/epic/GeneralLedgerReconcileBank.js +0 -2
  55. package/dist/models/epic/Habitational.d.ts +0 -156
  56. package/dist/models/epic/Habitational.js +0 -2
  57. package/dist/models/epic/JournalEntry.d.ts +0 -69
  58. package/dist/models/epic/JournalEntry.js +0 -2
  59. package/dist/models/epic/Line.d.ts +0 -169
  60. package/dist/models/epic/Line.js +0 -2
  61. package/dist/models/epic/Lookup.d.ts +0 -5
  62. package/dist/models/epic/Lookup.js +0 -2
  63. package/dist/models/epic/MultiCarrierSchedule.d.ts +0 -70
  64. package/dist/models/epic/MultiCarrierSchedule.js +0 -11
  65. package/dist/models/epic/Opportunity.d.ts +0 -45
  66. package/dist/models/epic/Opportunity.js +0 -2
  67. package/dist/models/epic/OptionType.d.ts +0 -4
  68. package/dist/models/epic/OptionType.js +0 -2
  69. package/dist/models/epic/PayableContract.d.ts +0 -19
  70. package/dist/models/epic/PayableContract.js +0 -2
  71. package/dist/models/epic/Policy.d.ts +0 -129
  72. package/dist/models/epic/Policy.js +0 -2
  73. package/dist/models/epic/PolicyV2.d.ts +0 -157
  74. package/dist/models/epic/PolicyV2.js +0 -2
  75. package/dist/models/epic/Receipt.d.ts +0 -142
  76. package/dist/models/epic/Receipt.js +0 -2
  77. package/dist/models/epic/RenewalStage.d.ts +0 -5
  78. package/dist/models/epic/RenewalStage.js +0 -2
  79. package/dist/models/epic/Response.d.ts +0 -9
  80. package/dist/models/epic/Response.js +0 -2
  81. package/dist/models/epic/ServiceSummary.d.ts +0 -16
  82. package/dist/models/epic/ServiceSummary.js +0 -8
  83. package/dist/models/epic/ServicingContact.d.ts +0 -6
  84. package/dist/models/epic/ServicingContact.js +0 -2
  85. package/dist/models/epic/Transaction.d.ts +0 -261
  86. package/dist/models/epic/Transaction.js +0 -2
  87. package/dist/models/epic/Vehicle.d.ts +0 -87
  88. package/dist/models/epic/Vehicle.js +0 -2
  89. package/dist/models/mail/EmailAttachment.d.ts +0 -5
  90. package/dist/models/mail/EmailAttachment.js +0 -2
  91. package/dist/models/mail/EmailReport.d.ts +0 -10
  92. package/dist/models/mail/EmailReport.js +0 -2
  93. package/dist/models/mail/GetEmailReportOptions.d.ts +0 -5
  94. package/dist/models/mail/GetEmailReportOptions.js +0 -2
  95. package/dist/models/mail/GmailMail.d.ts +0 -8
  96. package/dist/models/mail/GmailMail.js +0 -2
  97. package/dist/models/mail/TransactionWatchList.d.ts +0 -7
  98. package/dist/models/mail/TransactionWatchList.js +0 -2
  99. package/dist/models/sharepoint/Sharepoint.d.ts +0 -25
  100. package/dist/models/sharepoint/Sharepoint.js +0 -2
  101. package/dist/services/Admin.d.ts +0 -40
  102. package/dist/services/Admin.js +0 -222
  103. package/dist/services/BaseEpicService.d.ts +0 -16
  104. package/dist/services/BaseEpicService.js +0 -107
  105. package/dist/services/Epic.d.ts +0 -129
  106. package/dist/services/Epic.js +0 -313
  107. package/dist/services/JobEpicService.d.ts +0 -11
  108. package/dist/services/JobEpicService.js +0 -21
  109. package/dist/services/Mail.d.ts +0 -52
  110. package/dist/services/Mail.js +0 -318
  111. package/dist/services/MultiCarrierScheduleEpicService.d.ts +0 -12
  112. package/dist/services/MultiCarrierScheduleEpicService.js +0 -24
  113. package/dist/services/SharepointService.d.ts +0 -13
  114. package/dist/services/SharepointService.js +0 -44
  115. package/dist/utils/AxiosClient.d.ts +0 -6
  116. package/dist/utils/AxiosClient.js +0 -35
  117. package/dist/utils/DeepPartial.d.ts +0 -3
  118. package/dist/utils/DeepPartial.js +0 -2
  119. package/dist/utils/Excel.d.ts +0 -8
  120. package/dist/utils/Excel.js +0 -99
@@ -1,129 +0,0 @@
1
- import { Activity, CreateActivity } from '../models/epic/Activity';
2
- import { AdditionalInterest } from '../models/epic/AdditionalInterest';
3
- import { Attachment, AttachmentDetail, CreateAttachment } from '../models/epic/Attachment';
4
- import { Claim } from '../models/epic/Claim';
5
- import { Commission } from '../models/epic/Commission';
6
- import { Company } from '../models/epic/Company';
7
- import { Contact, CreateContact } from '../models/epic/Contact';
8
- import { CreateCustomer, Customer } from '../models/epic/Customer';
9
- import { DirectBillCommission } from '../models/epic/DirectBillCommission';
10
- import { Driver } from '../models/epic/Driver';
11
- import { GeneralLedgerReconcileBank } from '../models/epic/GeneralLedgerReconcileBank';
12
- import { Habitational } from '../models/epic/Habitational';
13
- import { Line } from '../models/epic/Line';
14
- import { LookUp } from '../models/epic/Lookup';
15
- import { Opportunity } from '../models/epic/Opportunity';
16
- import { PayableContract } from '../models/epic/PayableContract';
17
- import { CreatePolicy, Policy } from '../models/epic/Policy';
18
- import { PolicyV2, PolicyV2Model } from '../models/epic/PolicyV2';
19
- import { Receipt } from '../models/epic/Receipt';
20
- import { RenewalStage } from '../models/epic/RenewalStage';
21
- import { BaseEpicService } from './BaseEpicService';
22
- import { JobEpicService } from './JobEpicService';
23
- import { MultiCarrierScheduleEpicService } from './MultiCarrierScheduleEpicService';
24
- import { Broker } from '../models/epic/Broker';
25
- import { Employee } from '../models/epic/Employee';
26
- import { CreatePaymentTransaction, CreateTransaction, FinanceTransaction, FinanceTransactionResult, Transaction, TransactionApplyCreditsToDebits } from '../models/epic/Transaction';
27
- import { Vehicle } from '../models/epic/Vehicle';
28
- import { CreateJournalEntry, JournalEntry } from '../models/epic/JournalEntry';
29
- /**
30
- * EpicService provides methods to interact with the Epic API for activities, attachments, policies, transactions, and more.
31
- * It extends BaseEpicService and includes job and multi-carrier schedule services for specialized operations.
32
- */
33
- export declare class EpicService extends BaseEpicService {
34
- job: JobEpicService;
35
- multiCarrierSchedule: MultiCarrierScheduleEpicService;
36
- constructor(epicUrl: string | undefined, headers: any);
37
- getActivity(activityId: string): Promise<Activity>;
38
- getActivities(queryParams: object): Promise<Activity[]>;
39
- updateActivity(activityId: string, payload: object): Promise<string>;
40
- createActivity(payload: CreateActivity): Promise<string | string[]>;
41
- copyActivity(id: string, payload: object): Promise<string>;
42
- getAttachments(queryParams: object): Promise<Attachment[]>;
43
- getAttachment(attachmentId: string): Promise<Attachment>;
44
- updateAttachment(attachmentId: string, payload: object): Promise<string>;
45
- createAttachment(payload: CreateAttachment): Promise<string | string[]>;
46
- getAttachmentContent(attachmentId: string): Promise<AttachmentDetail>;
47
- deleteAttachment(attachmentId: string): Promise<string>;
48
- getPolicies(queryParams: object): Promise<Policy[]>;
49
- getPolicy(id: string): Promise<Policy>;
50
- renewPolicy(id: string, payload: object): Promise<string>;
51
- updatePolicy(id: string, payload: object): Promise<string>;
52
- issuePolicy(id: string, payload: object): Promise<string>;
53
- cancelPolicy(id: string, payload: object): Promise<string>;
54
- endorsePolicy(id: string, payload: object): Promise<string>;
55
- createPolicy(payload: CreatePolicy): Promise<string | string[]>;
56
- getPoliciesV2(queryParams: object): Promise<PolicyV2[]>;
57
- getPolicyV2(id: string): Promise<PolicyV2>;
58
- createPolicyV2(payload: object): Promise<string>;
59
- updatePolicyV2(id: string, payload: object): Promise<string>;
60
- renewPolicyV2(payload: PolicyV2Model.RenewPolicy): Promise<string>;
61
- endorseExistingLinePolicyV2(payload: PolicyV2Model.EndorseExistingLine): Promise<void>;
62
- cancelPolicyV2(payload: PolicyV2Model.CancelPolicy): Promise<string>;
63
- issuePolicyV2(payload: PolicyV2Model.IssuePolicy): Promise<void>;
64
- issueEndorsementPolicyV2(payload: PolicyV2Model.IssueEndorsement): Promise<void>;
65
- issueCancellationPolicyV2(payload: PolicyV2Model.IssueCancellation): Promise<void>;
66
- getPolicyV2RenewalStages(ids: number[]): Promise<RenewalStage[]>;
67
- getEmployee(id: string): Promise<Broker>;
68
- getEmployees(queryParams: object): Promise<Broker[]>;
69
- getEmployeeV2(id: number): Promise<Employee>;
70
- getEmployeesV2(queryParams: object): Promise<Employee[]>;
71
- createEmployee(payload: object): Promise<string>;
72
- updateEmployee(id: number, payload: object): Promise<string>;
73
- getLookUp(queryParams: object): Promise<LookUp[]>;
74
- getContact(id: string, queryParams: object): Promise<Contact>;
75
- getContacts(queryParams: object): Promise<Contact[]>;
76
- createContact(payload: CreateContact): Promise<string | string[]>;
77
- updateContact(id: string, accountType: string, payload: object): Promise<string>;
78
- getTransactions(queryParams: object): Promise<Transaction[]>;
79
- getTransaction(transactionId: string): Promise<Transaction>;
80
- financeTransaction(transactionId: string, payload: FinanceTransaction): Promise<string | FinanceTransactionResult>;
81
- reverseTransaction(transactionId: string, payload: object): Promise<string>;
82
- transactionApplyCreditsToDebits(transactionId: string, payload: TransactionApplyCreditsToDebits): Promise<Receipt[]>;
83
- updateTransaction(transactionId: string, payload: object): Promise<string>;
84
- createTransaction(payload: CreateTransaction): Promise<string | string[]>;
85
- createPaymentTransaction(payload: CreatePaymentTransaction): Promise<string | string[]>;
86
- getCompany(companyId: string): Promise<Company>;
87
- getCompanies(queryParams: object): Promise<Company[]>;
88
- getCustomers(queryParams: object): Promise<Customer[]>;
89
- getCustomer(clientId: string): Promise<Customer>;
90
- updateCustomer(clientId: string, payload: object): Promise<string>;
91
- createCustomer(payload: CreateCustomer): Promise<string | string[]>;
92
- getHabitationals(queryParams: object): Promise<Habitational[]>;
93
- getCommissions(commissionId: string, queryParams: object): Promise<Commission>;
94
- getCommission(commissionId: string): Promise<Commission>;
95
- getOpportunity(opportunityId: string): Promise<Opportunity>;
96
- getOpportunities(queryParams: object): Promise<Opportunity[]>;
97
- updateOpportunity(opportunityId: string, payload: object): Promise<string>;
98
- createOpportunity(payload: object): Promise<string | string[]>;
99
- getClaim(claimId: string): Promise<Claim>;
100
- getClaims(queryParams: object): Promise<Claim[]>;
101
- getPersonalAutoVehicles(queryParams: object): Promise<Vehicle[]>;
102
- getPersonalAutoDrivers(queryParams: object): Promise<Driver[]>;
103
- getCommercialAutoVehicles(queryParams: object): Promise<Vehicle[]>;
104
- getCommercialAutoDrivers(queryParams: object): Promise<Driver[]>;
105
- getPolicyLine(lineId: string): Promise<Line>;
106
- getPolicyLines(queryParams: object): Promise<Line[]>;
107
- createPolicyLine(policyLine: object): Promise<string>;
108
- updatePolicyLine(lineId: string, payload: object): Promise<string>;
109
- getDirectBillCommission(commissionId: string): Promise<DirectBillCommission>;
110
- getDirectBillCommissions(queryParams: object): Promise<DirectBillCommission[]>;
111
- updateDirectBillCommission(commissionId: string, payload: object): Promise<string>;
112
- getReceipts(queryParams: object): Promise<Receipt[]>;
113
- getReceipt(receiptId: string): Promise<Receipt>;
114
- updateReceipt(receiptId: string, payload: object): Promise<string>;
115
- createReceipt(payload: object): Promise<string | string[]>;
116
- receiptApplyCreditsToDebits(receiptId: string, payload: object): Promise<Receipt[]>;
117
- getPayableContracts(queryParams: object): Promise<PayableContract[]>;
118
- getPayableContract(payableContractId: string, queryParams: object): Promise<PayableContract[]>;
119
- getGeneralLedgerReconcileBanks(queryParams: object): Promise<GeneralLedgerReconcileBank[]>;
120
- getGeneralLedgerReconcileBank(bankId: string): Promise<GeneralLedgerReconcileBank>;
121
- createGeneralLedgerReconcileBank(payload: Partial<GeneralLedgerReconcileBank>): Promise<string | string[]>;
122
- updateGeneralLedgerBank(bankId: string, payload: object): Promise<string>;
123
- getAdditionalInterests(queryParams: object): Promise<AdditionalInterest[]>;
124
- getJournalEntry(journalEntryId: string): Promise<JournalEntry>;
125
- getJournalEntries(queryParams: object): Promise<JournalEntry[]>;
126
- createJournalEntry(payload: CreateJournalEntry): Promise<string | string[]>;
127
- updateJournalEntry(journalEntryId: string, payload: JournalEntry): Promise<string>;
128
- }
129
- export type EpicServiceType = EpicService;
@@ -1,313 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EpicService = void 0;
4
- const EpicException_1 = require("../exceptions/EpicException");
5
- const BaseEpicService_1 = require("./BaseEpicService");
6
- const JobEpicService_1 = require("./JobEpicService");
7
- const MultiCarrierScheduleEpicService_1 = require("./MultiCarrierScheduleEpicService");
8
- /**
9
- * EpicService provides methods to interact with the Epic API for activities, attachments, policies, transactions, and more.
10
- * It extends BaseEpicService and includes job and multi-carrier schedule services for specialized operations.
11
- */
12
- class EpicService extends BaseEpicService_1.BaseEpicService {
13
- constructor(epicUrl, headers) {
14
- super(epicUrl, headers);
15
- this.job = new JobEpicService_1.JobEpicService(epicUrl, headers);
16
- this.multiCarrierSchedule = new MultiCarrierScheduleEpicService_1.MultiCarrierScheduleEpicService(epicUrl, headers);
17
- }
18
- async getActivity(activityId) {
19
- return this.getOne('activity', activityId);
20
- }
21
- async getActivities(queryParams) {
22
- return this.get('activity', queryParams);
23
- }
24
- async updateActivity(activityId, payload) {
25
- return this.put(`activity/${activityId}`, payload);
26
- }
27
- async createActivity(payload) {
28
- return this.post(`activity`, payload);
29
- }
30
- async copyActivity(id, payload) {
31
- return this.put(`activity/copy/${id}`, payload);
32
- }
33
- async getAttachments(queryParams) {
34
- return this.get('attachment', queryParams);
35
- }
36
- async getAttachment(attachmentId) {
37
- return this.getOne('attachment', attachmentId);
38
- }
39
- async updateAttachment(attachmentId, payload) {
40
- return this.put(`attachment/${attachmentId}`, payload);
41
- }
42
- async createAttachment(payload) {
43
- return this.post(`attachment`, payload);
44
- }
45
- async getAttachmentContent(attachmentId) {
46
- return this.get(`attachment/download/${attachmentId}`);
47
- }
48
- async deleteAttachment(attachmentId) {
49
- return this.delete('attachment', attachmentId);
50
- }
51
- async getPolicies(queryParams) {
52
- return await this.get('policy', queryParams);
53
- }
54
- async getPolicy(id) {
55
- return this.getOne('policy', id);
56
- }
57
- async renewPolicy(id, payload) {
58
- return await this.put(`renewpolicy/${id}`, payload);
59
- }
60
- async updatePolicy(id, payload) {
61
- return await this.put(`policy/${id}`, payload);
62
- }
63
- async issuePolicy(id, payload) {
64
- return await this.put(`issuePolicy/${id}`, payload);
65
- }
66
- async cancelPolicy(id, payload) {
67
- return await this.put(`cancelPolicy/${id}`, payload);
68
- }
69
- async endorsePolicy(id, payload) {
70
- return await this.put(`endorsePolicy/${id}`, payload);
71
- }
72
- async createPolicy(payload) {
73
- return await this.post(`policy`, payload);
74
- }
75
- async getPoliciesV2(queryParams) {
76
- return this.get('policyV2', queryParams);
77
- }
78
- async getPolicyV2(id) {
79
- return this.getOne('policyV2', id);
80
- }
81
- async createPolicyV2(payload) {
82
- return this.post(`policyV2`, payload);
83
- }
84
- async updatePolicyV2(id, payload) {
85
- return await this.put(`policyV2/${id}`, payload);
86
- }
87
- async renewPolicyV2(payload) {
88
- const policyId = await this.post(`policyV2/renew`, payload);
89
- return policyId;
90
- }
91
- async endorseExistingLinePolicyV2(payload) {
92
- await this.put(`policyV2/endorse`, payload);
93
- return;
94
- }
95
- async cancelPolicyV2(payload) {
96
- return await this.put(`policyV2/cancel`, payload);
97
- }
98
- async issuePolicyV2(payload) {
99
- await this.put(`policyV2/issue`, payload);
100
- return;
101
- }
102
- async issueEndorsementPolicyV2(payload) {
103
- await this.put(`policyV2/endorse/issue`, payload);
104
- return;
105
- }
106
- async issueCancellationPolicyV2(payload) {
107
- await this.put(`policyV2/cancel/issue`, payload);
108
- return;
109
- }
110
- async getPolicyV2RenewalStages(ids) {
111
- return this.get('policyV2/renewalStage', {
112
- ids: ids.join(','),
113
- });
114
- }
115
- async getEmployee(id) {
116
- return await this.getOne('employee', id);
117
- }
118
- async getEmployees(queryParams) {
119
- return await this.get(`employee`, queryParams);
120
- }
121
- async getEmployeeV2(id) {
122
- return this.getOne(`employeeV2`, id);
123
- }
124
- async getEmployeesV2(queryParams) {
125
- return await this.get(`employeeV2`, queryParams);
126
- }
127
- async createEmployee(payload) {
128
- return this.post(`employeeV2`, payload);
129
- }
130
- async updateEmployee(id, payload) {
131
- return await this.put(`employeeV2/${id}`, payload);
132
- }
133
- async getLookUp(queryParams) {
134
- return await this.get(`lookup`, queryParams);
135
- }
136
- async getContact(id, queryParams) {
137
- return await this.getOne(`contact`, id, queryParams);
138
- }
139
- async getContacts(queryParams) {
140
- return await this.get(`contact`, queryParams);
141
- }
142
- async createContact(payload) {
143
- return await this.post(`contact`, payload);
144
- }
145
- async updateContact(id, accountType, payload) {
146
- return await this.put(`contact/${id}/${accountType}`, payload);
147
- }
148
- async getTransactions(queryParams) {
149
- return await this.get('transaction', queryParams);
150
- }
151
- async getTransaction(transactionId) {
152
- return this.getOne('transaction', transactionId);
153
- }
154
- async financeTransaction(transactionId, payload) {
155
- return await this.put(`transaction/finance/${transactionId}`, payload);
156
- }
157
- async reverseTransaction(transactionId, payload) {
158
- return await this.put(`transaction/reverse/${transactionId}`, payload);
159
- }
160
- async transactionApplyCreditsToDebits(transactionId, payload) {
161
- const { data: axiosResponse } = await this.axiosInstance.put(`transaction/applyCreditsToDebits/${transactionId}`, payload);
162
- if (!axiosResponse.success) {
163
- if (axiosResponse.code == '400' || axiosResponse.code == '401' || axiosResponse.code == '404') {
164
- throw new EpicException_1.EpicException(axiosResponse.message || axiosResponse.Message);
165
- }
166
- throw new Error(axiosResponse.message || axiosResponse.Message);
167
- }
168
- return axiosResponse.result;
169
- }
170
- async updateTransaction(transactionId, payload) {
171
- return await this.put(`transaction/${transactionId}`, payload);
172
- }
173
- async createTransaction(payload) {
174
- return await this.post(`transaction`, payload);
175
- }
176
- async createPaymentTransaction(payload) {
177
- return await this.post(`paymentTransaction`, payload);
178
- }
179
- async getCompany(companyId) {
180
- return await this.getOne(`company`, companyId);
181
- }
182
- async getCompanies(queryParams) {
183
- return await this.get(`company`, queryParams);
184
- }
185
- async getCustomers(queryParams) {
186
- return await this.get('customer', queryParams);
187
- }
188
- async getCustomer(clientId) {
189
- return this.getOne('customer', clientId);
190
- }
191
- async updateCustomer(clientId, payload) {
192
- return await this.put(`customer/${clientId}`, payload);
193
- }
194
- async createCustomer(payload) {
195
- return await this.post(`customer`, payload);
196
- }
197
- async getHabitationals(queryParams) {
198
- return await this.get('habitational', queryParams);
199
- }
200
- async getCommissions(commissionId, queryParams) {
201
- return this.getOne('commission', commissionId, queryParams);
202
- }
203
- async getCommission(commissionId) {
204
- return this.getOne('commission', commissionId);
205
- }
206
- async getOpportunity(opportunityId) {
207
- return this.getOne('opportunity', opportunityId);
208
- }
209
- async getOpportunities(queryParams) {
210
- return this.get('opportunity', queryParams);
211
- }
212
- async updateOpportunity(opportunityId, payload) {
213
- return this.put(`opportunity/${opportunityId}`, payload);
214
- }
215
- async createOpportunity(payload) {
216
- return this.post(`opportunity`, payload);
217
- }
218
- async getClaim(claimId) {
219
- return this.getOne('claim', claimId);
220
- }
221
- async getClaims(queryParams) {
222
- return this.get('claim', queryParams);
223
- }
224
- async getPersonalAutoVehicles(queryParams) {
225
- return this.get('personalAuto/vehicle', queryParams);
226
- }
227
- async getPersonalAutoDrivers(queryParams) {
228
- return this.get('personalAuto/driver', queryParams);
229
- }
230
- async getCommercialAutoVehicles(queryParams) {
231
- return this.get('commercialAuto/vehicle', queryParams);
232
- }
233
- async getCommercialAutoDrivers(queryParams) {
234
- return this.get('commercialAuto/driver', queryParams);
235
- }
236
- async getPolicyLine(lineId) {
237
- return this.getOne('policyLine', lineId);
238
- }
239
- async getPolicyLines(queryParams) {
240
- return this.get('policyLine', queryParams);
241
- }
242
- async createPolicyLine(policyLine) {
243
- return this.post('policyLine', policyLine);
244
- }
245
- async updatePolicyLine(lineId, payload) {
246
- return this.put(`policyLine/${lineId}`, payload);
247
- }
248
- async getDirectBillCommission(commissionId) {
249
- return this.getOne('directBillCommission', commissionId);
250
- }
251
- async getDirectBillCommissions(queryParams) {
252
- return this.get('directBillCommission', queryParams);
253
- }
254
- async updateDirectBillCommission(commissionId, payload) {
255
- return await this.put(`directBillCommission/${commissionId}`, payload);
256
- }
257
- async getReceipts(queryParams) {
258
- return await this.get('receipt', queryParams);
259
- }
260
- async getReceipt(receiptId) {
261
- return this.getOne('receipt', receiptId);
262
- }
263
- async updateReceipt(receiptId, payload) {
264
- return await this.put(`receipt/${receiptId}`, payload);
265
- }
266
- async createReceipt(payload) {
267
- return await this.post(`receipt`, payload);
268
- }
269
- async receiptApplyCreditsToDebits(receiptId, payload) {
270
- const { data: axiosResponse } = await this.axiosInstance.post(`receipt/${receiptId}`, payload);
271
- if (!axiosResponse.success) {
272
- if (axiosResponse.code == '400' || axiosResponse.code == '401' || axiosResponse.code == '404') {
273
- throw new EpicException_1.EpicException(axiosResponse.message || axiosResponse.Message);
274
- }
275
- throw new Error(axiosResponse.message || axiosResponse.Message);
276
- }
277
- return axiosResponse.result;
278
- }
279
- async getPayableContracts(queryParams) {
280
- return this.get(`payableContract`, queryParams);
281
- }
282
- async getPayableContract(payableContractId, queryParams) {
283
- return this.get(`payableContract/${payableContractId}`, queryParams);
284
- }
285
- async getGeneralLedgerReconcileBanks(queryParams) {
286
- return this.get('generalLedgerBank', queryParams);
287
- }
288
- async getGeneralLedgerReconcileBank(bankId) {
289
- return this.getOne('generalLedgerBank', bankId);
290
- }
291
- async createGeneralLedgerReconcileBank(payload) {
292
- return await this.post('generalLedgerBank', payload);
293
- }
294
- async updateGeneralLedgerBank(bankId, payload) {
295
- return await this.put(`generalLedgerBank/${bankId}`, payload);
296
- }
297
- async getAdditionalInterests(queryParams) {
298
- return this.get('personalAuto/additionalinterests', queryParams);
299
- }
300
- async getJournalEntry(journalEntryId) {
301
- return this.getOne('journalEntry', journalEntryId);
302
- }
303
- async getJournalEntries(queryParams) {
304
- return this.get('journalEntry', queryParams);
305
- }
306
- async createJournalEntry(payload) {
307
- return await this.post(`journalEntry`, payload);
308
- }
309
- async updateJournalEntry(journalEntryId, payload) {
310
- return await this.put(`journalEntry/${journalEntryId}`, payload);
311
- }
312
- }
313
- exports.EpicService = EpicService;
@@ -1,11 +0,0 @@
1
- import { BaseEpicService } from "./BaseEpicService";
2
- import { DirectBillCommission, Reconciliation } from "../models/epic/DirectBillCommission";
3
- /**
4
- * JobEpicService provides methods for job-related Epic API operations such as reconciliation and direct bill commission updates.
5
- * It extends BaseEpicService for common API functionality.
6
- */
7
- export declare class JobEpicService extends BaseEpicService {
8
- readonly baseUrl = "job";
9
- reconcile(payload: Reconciliation): Promise<string>;
10
- updateDirectBillCommission(commissionId: string, payload: Partial<DirectBillCommission>): Promise<string>;
11
- }
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.JobEpicService = void 0;
4
- const BaseEpicService_1 = require("./BaseEpicService");
5
- /**
6
- * JobEpicService provides methods for job-related Epic API operations such as reconciliation and direct bill commission updates.
7
- * It extends BaseEpicService for common API functionality.
8
- */
9
- class JobEpicService extends BaseEpicService_1.BaseEpicService {
10
- constructor() {
11
- super(...arguments);
12
- this.baseUrl = 'job';
13
- }
14
- async reconcile(payload) {
15
- return this.post(`${this.baseUrl}/reconcile`, payload);
16
- }
17
- async updateDirectBillCommission(commissionId, payload) {
18
- return this.put(`${this.baseUrl}/directBillCommission/${commissionId}`, payload);
19
- }
20
- }
21
- exports.JobEpicService = JobEpicService;
@@ -1,52 +0,0 @@
1
- import { AxiosInstance } from 'axios';
2
- import nodemailer from 'nodemailer';
3
- import { EmailAttachment } from '../models/mail/EmailAttachment';
4
- import { EmailReport } from '../models/mail/EmailReport';
5
- import GetEmailReportOptions from '../models/mail/GetEmailReportOptions';
6
- import { GMailFolder } from '../models/mail/GmailMail';
7
- import { TransactionWatch } from '../models/mail/TransactionWatchList';
8
- /**
9
- * MailService provides email-related features such as sending emails, managing folders, retrieving messages, and handling attachments.
10
- * It uses Nodemailer and Axios for communication with Gmail and the Cemiar mail API.
11
- */
12
- export declare class MailService {
13
- user?: string;
14
- axiosInstance: AxiosInstance;
15
- transporter: nodemailer.Transporter;
16
- constructor(mailUrl: string | undefined, headers: any, user?: string, password?: string);
17
- getEmailFolders(): Promise<GMailFolder[]>;
18
- getEmailMessageIds(filter: object): Promise<string[]>;
19
- updateEmailMetadata(mailId: string, payload: object): Promise<void>;
20
- private getEmailContent;
21
- private findAttachment;
22
- private findData;
23
- private fetchAttachment;
24
- private extractSubject;
25
- private extractTextContent;
26
- private extractRecipientEmail;
27
- private extractReturnAddress;
28
- private extractTransactionWatchData;
29
- private buildQueryString;
30
- /**
31
- * Asynchronously retrieves an email report based on the provided mail object and attachment type.
32
- *
33
- * @param to - email recipient
34
- * @param subjectType
35
- * @param {GetEmailReportOptions | undefined} options - The options for fetching email report.
36
- * @returns {object | undefined} - The data of the retrieved report or undefined if not found or an error occurs.
37
- * @throws {Error} - If an error occurs during the process.
38
- */
39
- getEmailReport(to: string, subjectType: string, options?: GetEmailReportOptions): Promise<void>;
40
- /**
41
- * Asynchronously retrieves all emails' reports based on a date.
42
- *
43
- * @param {Date} date - The date of email reports to fetch.
44
- * @param {GetEmailReportOptions | undefined} options - The options for fetching email report.
45
- * @returns {EmailReport[]} - The list of reports.
46
- * @throws {Error} - If an error occurs during the process.
47
- */
48
- getEmailReports(date: Date, options?: GetEmailReportOptions): Promise<EmailReport[]>;
49
- getTransactionWatchList(to: string, subjectType: string): Promise<TransactionWatch[]>;
50
- deleteEmail(id: string): Promise<void>;
51
- sendMail(subject: string, text: string, html: string, to: string[], attachments?: EmailAttachment[], cc?: string[]): Promise<void>;
52
- }