@cemiar/cemiarlink-sdk 1.0.64 → 1.0.66
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/models/epic/TransactionV2.d.ts +503 -0
- package/dist/models/epic/TransactionV2.js +60 -0
- package/dist/models/epic/Vehicle.d.ts +1 -0
- package/dist/models/epic/index.d.ts +1 -0
- package/dist/models/epic/index.js +1 -0
- package/dist/models/index.d.ts +0 -2
- package/dist/models/index.js +1 -3
- package/dist/services/epic/EpicService.d.ts +2 -0
- package/dist/services/epic/EpicService.js +2 -0
- package/dist/services/epic/TransactionV2EpicService.d.ts +22 -0
- package/dist/services/epic/TransactionV2EpicService.js +52 -0
- package/dist/services/index.d.ts +0 -1
- package/dist/services/index.js +0 -1
- package/package.json +1 -1
- package/dist/models/googleads/GoogleAds.d.ts +0 -44
- package/dist/models/googleads/GoogleAds.js +0 -2
- package/dist/models/googleads/index.d.ts +0 -1
- package/dist/models/googleads/index.js +0 -17
- package/dist/services/GoogleAdsService.d.ts +0 -24
- package/dist/services/GoogleAdsService.js +0 -35
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
import { Address } from './Address';
|
|
2
|
+
import { OptionType } from './OptionType';
|
|
3
|
+
/** Epic SDK 2022.1 transaction models. DateTime values are serialized as strings. */
|
|
4
|
+
export declare namespace TransactionV2Model {
|
|
5
|
+
enum ComparisonType {
|
|
6
|
+
EqualTo = 0,
|
|
7
|
+
Containing = 1,
|
|
8
|
+
GreaterThan = 2,
|
|
9
|
+
LessThan = 3,
|
|
10
|
+
DoesNotEqual = 4
|
|
11
|
+
}
|
|
12
|
+
enum FutureItems {
|
|
13
|
+
Exclude = 0,
|
|
14
|
+
Only = 1,
|
|
15
|
+
Include = 2
|
|
16
|
+
}
|
|
17
|
+
enum Service {
|
|
18
|
+
Include = 0,
|
|
19
|
+
Only = 1,
|
|
20
|
+
Exclude = 2
|
|
21
|
+
}
|
|
22
|
+
enum TransactionStatus {
|
|
23
|
+
None = 0,
|
|
24
|
+
BalanceForward = 1,
|
|
25
|
+
OpenItem = 2
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* TransactionID overrides other filters; PolicyID overrides AccountID.
|
|
29
|
+
* Otherwise, AccountID and AccountTypeCode are required.
|
|
30
|
+
* @see https://help.appliedsystems.com/Help/EpicSDK/2022.1/html/T_ASI_TAM_API_Data_UI_Transaction_TransactionFilter_2016_01.htm
|
|
31
|
+
*/
|
|
32
|
+
interface TransactionFilter {
|
|
33
|
+
AccountID?: number;
|
|
34
|
+
AccountTypeCode?: string;
|
|
35
|
+
ARDueDateBegins?: string;
|
|
36
|
+
ARDueDateEnds?: string;
|
|
37
|
+
Balance?: number;
|
|
38
|
+
BalanceComparisonType?: ComparisonType;
|
|
39
|
+
BilledFromAccountCode?: string;
|
|
40
|
+
BilledFromName?: string;
|
|
41
|
+
BilledFromNameComparisonType?: ComparisonType;
|
|
42
|
+
BilledReservedCode?: string;
|
|
43
|
+
BilledReservedName?: string;
|
|
44
|
+
BilledReservedNameComparisonType?: ComparisonType;
|
|
45
|
+
BilledToAccountCode?: string;
|
|
46
|
+
BilledToName?: string;
|
|
47
|
+
BilledToNameComparisonType?: ComparisonType;
|
|
48
|
+
BillModeCode?: string;
|
|
49
|
+
BillNumber?: number;
|
|
50
|
+
BinderStatus?: string;
|
|
51
|
+
FutureItems?: FutureItems;
|
|
52
|
+
InstallmentGroup?: number;
|
|
53
|
+
InvoiceCreatedBegins?: string;
|
|
54
|
+
InvoiceCreatedEnds?: string;
|
|
55
|
+
InvoiceLastGeneratedDateBegins?: string;
|
|
56
|
+
InvoiceLastGeneratedDateEnds?: string;
|
|
57
|
+
InvoiceNumber?: number;
|
|
58
|
+
InvoiceStatus?: string;
|
|
59
|
+
ItemNumber?: number;
|
|
60
|
+
LateItemNumber?: number;
|
|
61
|
+
PaymentDateBegins?: string;
|
|
62
|
+
PaymentDateEnds?: string;
|
|
63
|
+
PaymentID?: string;
|
|
64
|
+
PolicyID?: number;
|
|
65
|
+
PolicyNumber?: string;
|
|
66
|
+
PolicyNumberComparisonType?: ComparisonType;
|
|
67
|
+
Service?: Service;
|
|
68
|
+
ServiceID?: number;
|
|
69
|
+
SiteID?: string;
|
|
70
|
+
SiteIDComparisonType?: ComparisonType;
|
|
71
|
+
TaxableItemNumber?: number;
|
|
72
|
+
TransactionCode?: string;
|
|
73
|
+
TransactionID?: number;
|
|
74
|
+
TransactionStatus?: TransactionStatus;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* TransactionV1 SDK data returned by the transactionV2 endpoint.
|
|
78
|
+
* @see https://help.appliedsystems.com/Help/EpicSDK/2022.1/html/T_ASI_TAM_API_Data_UI_Transaction_TransactionV1.htm
|
|
79
|
+
*/
|
|
80
|
+
interface Transaction {
|
|
81
|
+
AccountID: number;
|
|
82
|
+
AccountTypeCode: string;
|
|
83
|
+
AttachToOption: OptionType;
|
|
84
|
+
AutoGenerateTaxes: boolean;
|
|
85
|
+
Balance: number;
|
|
86
|
+
BasicInstallmentOption: OptionType;
|
|
87
|
+
BillingValue: Billing;
|
|
88
|
+
BillNumber: number;
|
|
89
|
+
BillNumberOption: OptionType;
|
|
90
|
+
CommissionsValue: Commissions;
|
|
91
|
+
Description: string;
|
|
92
|
+
DetailValue: Detail;
|
|
93
|
+
Discrepancy: string;
|
|
94
|
+
IgnoreAgencyCommissionLessThanProducerBroker: boolean;
|
|
95
|
+
IgnoreFlatCommission: boolean;
|
|
96
|
+
InstallmentCycles: number | null;
|
|
97
|
+
InstallmentDownPayment: number | null;
|
|
98
|
+
InstallmentNumber: number | null;
|
|
99
|
+
InstallmentPlanID: string;
|
|
100
|
+
InstallmentSequenceNumber: number | null;
|
|
101
|
+
InstallmentsValue: InstallmentItem[];
|
|
102
|
+
InstallmentType: string;
|
|
103
|
+
InvoicePaymentOption: OptionType;
|
|
104
|
+
InvoiceValue: Invoice;
|
|
105
|
+
IsReadOnly: boolean;
|
|
106
|
+
ItemNumber: string;
|
|
107
|
+
PackagePolicyReplaceFullAnnualizedCommission: number | null;
|
|
108
|
+
PackagePolicyReplaceFullAnnualizedPremium: number | null;
|
|
109
|
+
PaymentInstallmentItems: PaymentInstallmentItem[];
|
|
110
|
+
PaymentLineID: number | null;
|
|
111
|
+
PaymentMethodValue: PaymentMethod;
|
|
112
|
+
PaymentValue: Payment;
|
|
113
|
+
PolicyID: number;
|
|
114
|
+
PolicyTypeCode: string;
|
|
115
|
+
ServiceID: number | null;
|
|
116
|
+
ServiceItemizationID: number | null;
|
|
117
|
+
TransactionAmount: number;
|
|
118
|
+
TransactionCode: string;
|
|
119
|
+
TransactionID: number;
|
|
120
|
+
UpdateInstallmentsOption: OptionType;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Insert_Transaction accepts the same TransactionV1 data object as retrieval.
|
|
124
|
+
* Field requirements and defaults depend on the transaction code, attachment,
|
|
125
|
+
* billing mode, and whether this is an invoice or payment transaction.
|
|
126
|
+
* @see https://help.appliedsystems.com/Help/EpicSDK/2022.1/html/M_ASI_TAM_API_Web_EpicSDK_Transaction_Transaction_2019_01_Insert_Transaction.htm
|
|
127
|
+
*/
|
|
128
|
+
type CreateTransaction = Omit<Transaction, 'TransactionID'>;
|
|
129
|
+
/**
|
|
130
|
+
* Fetch the existing Transaction, modify it, and submit the complete object.
|
|
131
|
+
* TransactionID and Description are required on update. TransactionAmount and
|
|
132
|
+
* CommissionsValue are ignored; use RevisePremium and AdjustCommission instead.
|
|
133
|
+
* @see https://help.appliedsystems.com/Help/EpicSDK/2022.1/html/M_ASI_TAM_API_Web_EpicSDK_Transaction_Transaction_2019_01_Update_Transaction.htm
|
|
134
|
+
*/
|
|
135
|
+
type UpdateTransaction = Partial<Transaction>;
|
|
136
|
+
/**
|
|
137
|
+
* Call before AdjustCommission and preserve the returned default values.
|
|
138
|
+
* @see https://help.appliedsystems.com/Help/EpicSDK/2022.1/html/M_ASI_TAM_API_Web_EpicSDK_Transaction_Transaction_2019_01_Get_Transaction_DefaultActionAdjustCommission.htm
|
|
139
|
+
*/
|
|
140
|
+
type GetDefaultAdjustCommissionRequest = Pick<Transaction, 'TransactionID'>;
|
|
141
|
+
type GetDefaultAdjustCommissionResult = AdjustCommission[];
|
|
142
|
+
/**
|
|
143
|
+
* Call before RevisePremium and preserve the returned default values.
|
|
144
|
+
* @see https://help.appliedsystems.com/Help/EpicSDK/2022.1/html/M_ASI_TAM_API_Web_EpicSDK_Transaction_Transaction_2019_01_Get_Transaction_DefaultActionRevisePremium.htm
|
|
145
|
+
*/
|
|
146
|
+
type GetDefaultRevisePremiumRequest = Pick<Transaction, 'TransactionID'>;
|
|
147
|
+
type GetDefaultRevisePremiumResult = RevisePremium[];
|
|
148
|
+
/**
|
|
149
|
+
* Call before ReverseTransaction and preserve the returned default values.
|
|
150
|
+
* @see https://help.appliedsystems.com/Help/EpicSDK/2022.1/html/M_ASI_TAM_API_Web_EpicSDK_Transaction_Transaction_2019_01_Get_Transaction_DefaultActionReverseTransaction.htm
|
|
151
|
+
*/
|
|
152
|
+
type GetDefaultReverseRequest = Pick<Transaction, 'TransactionID'>;
|
|
153
|
+
type GetDefaultReverseResult = ReverseTransaction[];
|
|
154
|
+
/**
|
|
155
|
+
* Submit one object obtained from GetDefaultAdjustCommissionResult.
|
|
156
|
+
* @see https://help.appliedsystems.com/Help/EpicSDK/2022.1/html/M_ASI_TAM_API_Web_EpicSDK_Transaction_Transaction_2019_01_Action_Transaction_AdjustCommission.htm
|
|
157
|
+
*/
|
|
158
|
+
interface AdjustCommission {
|
|
159
|
+
AssociatedAccountID: number;
|
|
160
|
+
AssociatedAccountTypeCode: string;
|
|
161
|
+
CommissionSplits: AdjustCommissionSplitItem[];
|
|
162
|
+
IgnoreAgencyCommissionLessThanProducerBroker: boolean;
|
|
163
|
+
IgnoreFlatCommission: boolean;
|
|
164
|
+
IgnoreInstallmentsThatCannotBeUpdated: boolean;
|
|
165
|
+
TransactionID: number;
|
|
166
|
+
UpdateInstallmentsOption: OptionType;
|
|
167
|
+
}
|
|
168
|
+
interface AdjustCommissionSplitItem {
|
|
169
|
+
AgencyCommissionAmount: number;
|
|
170
|
+
AgencyCommissionPercentage: number;
|
|
171
|
+
AgencyCommissionTypeCode: string;
|
|
172
|
+
AgencySplitAmount: number;
|
|
173
|
+
CompanyPayableDueDate: string | null;
|
|
174
|
+
IssuingCompanyLookupCode: string;
|
|
175
|
+
LineID: number;
|
|
176
|
+
PremiumPayableContractID: number;
|
|
177
|
+
PremiumPayableLookupCode: string;
|
|
178
|
+
PremiumPayableTypeCode: string;
|
|
179
|
+
ProducerBrokerCommissions: AdjustCommissionProducerBrokerCommissionItem[];
|
|
180
|
+
TransactionCompanyNumber: number;
|
|
181
|
+
TransactionDetailNumber: number;
|
|
182
|
+
}
|
|
183
|
+
enum AdjustCommissionProducerBrokerCommissionItemFlags {
|
|
184
|
+
View = 0,
|
|
185
|
+
Insert = 1,
|
|
186
|
+
Update = 2,
|
|
187
|
+
Delete = 3
|
|
188
|
+
}
|
|
189
|
+
interface AdjustCommissionProducerBrokerCommissionItem {
|
|
190
|
+
CommissionAmount: number;
|
|
191
|
+
CommissionID: number;
|
|
192
|
+
CommissionPercentage: number;
|
|
193
|
+
CommissionTypeCode: string;
|
|
194
|
+
ContractID: number | null;
|
|
195
|
+
Flag: AdjustCommissionProducerBrokerCommissionItemFlags;
|
|
196
|
+
LookupCode: string;
|
|
197
|
+
OrderNumber: number;
|
|
198
|
+
PayableDueDate: string;
|
|
199
|
+
ProducerBrokerCode: string;
|
|
200
|
+
ProductionCredit: number;
|
|
201
|
+
ShareRevenueAgencyCode: string;
|
|
202
|
+
ShareRevenueAgencyID: number;
|
|
203
|
+
ShareRevenueAgencyName: string;
|
|
204
|
+
ShareRevenueAmount: number | null;
|
|
205
|
+
ShareRevenueBranchCode: string;
|
|
206
|
+
ShareRevenueBranchID: number;
|
|
207
|
+
ShareRevenueBranchName: string;
|
|
208
|
+
ShareRevenueDepartmentCode: string;
|
|
209
|
+
ShareRevenueDepartmentID: number;
|
|
210
|
+
ShareRevenueDepartmentName: string;
|
|
211
|
+
ShareRevenuePercent: number | null;
|
|
212
|
+
ShareRevenueProfitCenterCode: string;
|
|
213
|
+
ShareRevenueProfitCenterID: number;
|
|
214
|
+
ShareRevenueProfitCenterName: string;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Submit one object obtained from GetDefaultRevisePremiumResult.
|
|
218
|
+
* @see https://help.appliedsystems.com/Help/EpicSDK/2022.1/html/M_ASI_TAM_API_Web_EpicSDK_Transaction_Transaction_2019_01_Action_Transaction_RevisePremium.htm
|
|
219
|
+
*/
|
|
220
|
+
interface RevisePremium {
|
|
221
|
+
AssociatedAccountID: number;
|
|
222
|
+
AssociatedAccountTypeCode: string;
|
|
223
|
+
AutomaticallyReverseSplitReceivablesInstallments: boolean;
|
|
224
|
+
DetailAccountingMonth: string;
|
|
225
|
+
DetailARDueDate: string;
|
|
226
|
+
DetailGenerateInvoiceDate: string;
|
|
227
|
+
DetailProductionMonth: string;
|
|
228
|
+
IgnoreFlatCommission: boolean;
|
|
229
|
+
IgnorePayableContractPayableDueDate: boolean;
|
|
230
|
+
IgnorePayableDueDate: boolean;
|
|
231
|
+
InstallmentsOption: OptionType;
|
|
232
|
+
InstallmentsValue: RevisePremiumInstallments;
|
|
233
|
+
IsInstallment: boolean;
|
|
234
|
+
IsSplitReceivable: boolean;
|
|
235
|
+
SplitReceivableValue: RevisePremiumSplitReceivable;
|
|
236
|
+
Timestamp: string | null;
|
|
237
|
+
TransactionAmount: number;
|
|
238
|
+
TransactionCode: string;
|
|
239
|
+
TransactionDescription: string;
|
|
240
|
+
TransactionID: number;
|
|
241
|
+
TransactionReallocateOption: OptionType;
|
|
242
|
+
}
|
|
243
|
+
enum RevisePremiumReviseInstallmentsBasedOn {
|
|
244
|
+
Summary = 0,
|
|
245
|
+
SplitReceivable = 1
|
|
246
|
+
}
|
|
247
|
+
interface RevisePremiumInstallments {
|
|
248
|
+
InstallmentSummary: RevisePremiumInstallmentSummaryItem[];
|
|
249
|
+
ReviseInstallmentsBasedOn: RevisePremiumReviseInstallmentsBasedOn;
|
|
250
|
+
SplitReceivable: RevisePremiumSplitReceivableItem[];
|
|
251
|
+
TotalInstallmentAmount: number;
|
|
252
|
+
}
|
|
253
|
+
enum RevisePremiumSummaryItemFlags {
|
|
254
|
+
View = 0,
|
|
255
|
+
Revise = 1
|
|
256
|
+
}
|
|
257
|
+
interface RevisePremiumInstallmentSummaryItem {
|
|
258
|
+
AccountingMonth: string;
|
|
259
|
+
ARDueDate: string;
|
|
260
|
+
Description: string;
|
|
261
|
+
EffectiveDate: string;
|
|
262
|
+
Flag: RevisePremiumSummaryItemFlags;
|
|
263
|
+
GenerateInvoiceDate: string;
|
|
264
|
+
OriginalAmount: number;
|
|
265
|
+
PlanSequenceNumber: number;
|
|
266
|
+
RevisedAmount: number;
|
|
267
|
+
TransactionCode: string;
|
|
268
|
+
TransactionID: number;
|
|
269
|
+
}
|
|
270
|
+
enum RevisePremiumSplitReceivableItemFlags {
|
|
271
|
+
View = 0,
|
|
272
|
+
Revise = 1
|
|
273
|
+
}
|
|
274
|
+
interface RevisePremiumSplitReceivableItem {
|
|
275
|
+
AccountingMonth: string;
|
|
276
|
+
AccountLookupCode: string;
|
|
277
|
+
ARDueDate: string;
|
|
278
|
+
Contact: string;
|
|
279
|
+
EffectiveDate: string;
|
|
280
|
+
Flag: RevisePremiumSplitReceivableItemFlags;
|
|
281
|
+
GenerateInvoiceDate: string;
|
|
282
|
+
OriginalAmount: number;
|
|
283
|
+
ParentReceivable: boolean;
|
|
284
|
+
PlanSequenceNumber: number;
|
|
285
|
+
ReceivableIndex: number;
|
|
286
|
+
RevisedAmount: number;
|
|
287
|
+
TransactionCode: string;
|
|
288
|
+
TransactionDescription: string;
|
|
289
|
+
TransactionID: number;
|
|
290
|
+
}
|
|
291
|
+
interface RevisePremiumSplitReceivable {
|
|
292
|
+
SendInvoiceTo: RevisePremiumSendInvoiceToItem[];
|
|
293
|
+
TotalBillingSummaryAgencyIncome: number;
|
|
294
|
+
TotalBillingSummaryCompanyNetPremium: number;
|
|
295
|
+
TotalBillingSummaryProducerBrokerExpense: number;
|
|
296
|
+
}
|
|
297
|
+
interface RevisePremiumSendInvoiceToItem {
|
|
298
|
+
AccountLookupCode: string;
|
|
299
|
+
AccountType: string;
|
|
300
|
+
Address: Address;
|
|
301
|
+
AddressDescription: string;
|
|
302
|
+
Contact: string;
|
|
303
|
+
LoanNumber: string;
|
|
304
|
+
OriginalAmount: number;
|
|
305
|
+
OriginalPercentage: number;
|
|
306
|
+
ParentReceivable: boolean;
|
|
307
|
+
ReallocationAmount: number;
|
|
308
|
+
ReallocationPercentage: number;
|
|
309
|
+
ReallocationTypeCode: string;
|
|
310
|
+
SiteID: string;
|
|
311
|
+
TransactionID: number;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Submit one object obtained from GetDefaultReverseResult. Set an item's Flag
|
|
315
|
+
* to Reverse to reverse it; View leaves the item unchanged.
|
|
316
|
+
* @see https://help.appliedsystems.com/Help/EpicSDK/2022.1/html/M_ASI_TAM_API_Web_EpicSDK_Transaction_Transaction_2019_01_Action_Transaction_ReverseTransaction.htm
|
|
317
|
+
*/
|
|
318
|
+
interface ReverseTransaction {
|
|
319
|
+
AssociatedAccountID: number;
|
|
320
|
+
AssociatedAccountTypeCode: string;
|
|
321
|
+
ItemsToReverse: ReverseTransactionItem[];
|
|
322
|
+
Reason: string;
|
|
323
|
+
ReasonDetails: string;
|
|
324
|
+
TransactionID: number;
|
|
325
|
+
}
|
|
326
|
+
enum ReverseTransactionReverseItemFlags {
|
|
327
|
+
View = 0,
|
|
328
|
+
Reverse = 1
|
|
329
|
+
}
|
|
330
|
+
interface ReverseTransactionItem {
|
|
331
|
+
DetailAccountingMonth: string;
|
|
332
|
+
DetailCloseGovernmentPayable: boolean;
|
|
333
|
+
DetailClosePrBrPayable: boolean;
|
|
334
|
+
DetailClosePremiumPayable: boolean;
|
|
335
|
+
DetailDescription: string;
|
|
336
|
+
Flag: ReverseTransactionReverseItemFlags;
|
|
337
|
+
ParentFinanceTransactionID: number;
|
|
338
|
+
ParentTransactionID: number;
|
|
339
|
+
TransactionID: number;
|
|
340
|
+
}
|
|
341
|
+
interface Billing {
|
|
342
|
+
AccountingMonth: string;
|
|
343
|
+
AgencyCode: string;
|
|
344
|
+
ARDueDate: string;
|
|
345
|
+
BillingModeOption: OptionType;
|
|
346
|
+
Binder: boolean | null;
|
|
347
|
+
BranchCode: string;
|
|
348
|
+
DepartmentCode: string;
|
|
349
|
+
EffectiveDate: string;
|
|
350
|
+
GeneralLedgerAccount: string;
|
|
351
|
+
GenerateInvoiceDate: string;
|
|
352
|
+
ProductionMonth: string;
|
|
353
|
+
ProfitCenterCode: string;
|
|
354
|
+
Reason: string;
|
|
355
|
+
ReasonDetails: string;
|
|
356
|
+
}
|
|
357
|
+
interface Commissions {
|
|
358
|
+
RevenueDeferralSchedule: RevenueScheduleItem[];
|
|
359
|
+
Splits: SplitItem[];
|
|
360
|
+
}
|
|
361
|
+
interface RevenueScheduleItem {
|
|
362
|
+
AccountingMonth: string;
|
|
363
|
+
Amount: number;
|
|
364
|
+
Percentage: number;
|
|
365
|
+
RevenueDeferralScheduleTypeCode: string;
|
|
366
|
+
}
|
|
367
|
+
interface SplitItem {
|
|
368
|
+
AgencyCommissionAmount: number;
|
|
369
|
+
AgencyCommissionPercentage: number;
|
|
370
|
+
AgencyCommissionTypeCode: string;
|
|
371
|
+
AgencySplitAmount: number;
|
|
372
|
+
CompanyPayableDueDate: string | null;
|
|
373
|
+
/** 0 = View, 1 = Insert. */
|
|
374
|
+
Flag: 0 | 1;
|
|
375
|
+
IssuingCompanyLookupCode: string;
|
|
376
|
+
LineID: number;
|
|
377
|
+
MultiCarrierScheduleID: number;
|
|
378
|
+
PremiumPayableContractID: number;
|
|
379
|
+
PremiumPayableLookupCode: string;
|
|
380
|
+
PremiumPayableTypeCode: string;
|
|
381
|
+
ProducerBrokerCommissions: ProducerBrokerCommissionItem[];
|
|
382
|
+
}
|
|
383
|
+
interface ProducerBrokerCommissionItem {
|
|
384
|
+
CommissionAmount: number;
|
|
385
|
+
CommissionID: number;
|
|
386
|
+
CommissionPercentage: number;
|
|
387
|
+
CommissionTypeCode: string;
|
|
388
|
+
ContractID: number | null;
|
|
389
|
+
DefaultProducerBrokerCommissionID: number | null;
|
|
390
|
+
/** 0 = View, 1 = Insert. */
|
|
391
|
+
Flag: 0 | 1;
|
|
392
|
+
LookupCode: string;
|
|
393
|
+
OrderNumber: number;
|
|
394
|
+
PayableDueDate: string;
|
|
395
|
+
ProducerBrokerCode: string;
|
|
396
|
+
ProductionCredit: number;
|
|
397
|
+
ShareRevenueAgencyCode: string;
|
|
398
|
+
ShareRevenueAgencyID: number;
|
|
399
|
+
ShareRevenueAgencyName: string;
|
|
400
|
+
ShareRevenueAmount: number | null;
|
|
401
|
+
ShareRevenueBranchCode: string;
|
|
402
|
+
ShareRevenueBranchID: number;
|
|
403
|
+
ShareRevenueBranchName: string;
|
|
404
|
+
ShareRevenueDepartmentCode: string;
|
|
405
|
+
ShareRevenueDepartmentID: number;
|
|
406
|
+
ShareRevenueDepartmentName: string;
|
|
407
|
+
ShareRevenuePercent: number | null;
|
|
408
|
+
ShareRevenueProfitCenterCode: string;
|
|
409
|
+
ShareRevenueProfitCenterID: number;
|
|
410
|
+
ShareRevenueProfitCenterName: string;
|
|
411
|
+
}
|
|
412
|
+
interface Detail {
|
|
413
|
+
Balance: number;
|
|
414
|
+
DetailItemsValue: DetailItem[];
|
|
415
|
+
}
|
|
416
|
+
interface DetailItem {
|
|
417
|
+
Amount: number;
|
|
418
|
+
ARDueDate: string;
|
|
419
|
+
Description: string;
|
|
420
|
+
TransactionCode: string;
|
|
421
|
+
TransactionDetailNumber: number;
|
|
422
|
+
}
|
|
423
|
+
interface InstallmentItem {
|
|
424
|
+
AccountingMonth: string;
|
|
425
|
+
Amount: number;
|
|
426
|
+
ARDueDate: string;
|
|
427
|
+
Description: string;
|
|
428
|
+
EffectiveDate: string;
|
|
429
|
+
GenerateInvoice: boolean;
|
|
430
|
+
GenerateInvoiceDate: string;
|
|
431
|
+
InstallmentNumber: number;
|
|
432
|
+
InstallmentType: string;
|
|
433
|
+
InvoiceGrouping: string;
|
|
434
|
+
InvoiceGroupingExistingInvoiceNumber: number | null;
|
|
435
|
+
InvoiceMessage: string;
|
|
436
|
+
ProductionMonth: string;
|
|
437
|
+
Transaction: string;
|
|
438
|
+
}
|
|
439
|
+
interface Invoice {
|
|
440
|
+
SendInvoiceToOption: OptionType;
|
|
441
|
+
SendInvoiceTos: SendInvoiceToItem[];
|
|
442
|
+
}
|
|
443
|
+
interface SendInvoiceToItem {
|
|
444
|
+
AccountLookupCode: string;
|
|
445
|
+
Address: Address;
|
|
446
|
+
AddressDescription: string;
|
|
447
|
+
BillBrokerNet: boolean | null;
|
|
448
|
+
Contact: string;
|
|
449
|
+
ContactID: number | null;
|
|
450
|
+
DeliveryMethod: string;
|
|
451
|
+
Email: string;
|
|
452
|
+
FaxCountryCode: string;
|
|
453
|
+
FaxExtension: string;
|
|
454
|
+
FaxNumber: string;
|
|
455
|
+
GenerateInvoice: boolean;
|
|
456
|
+
InvoiceGrouping: string;
|
|
457
|
+
InvoiceGroupingExistingInvoiceNumber: number | null;
|
|
458
|
+
InvoiceMessage: string;
|
|
459
|
+
InvoiceNumber: number | null;
|
|
460
|
+
InvoiceToType: string;
|
|
461
|
+
LoanNumber: string;
|
|
462
|
+
SiteID: string;
|
|
463
|
+
SplitReceivableAmount: number | null;
|
|
464
|
+
SplitReceivablePercent: number | null;
|
|
465
|
+
}
|
|
466
|
+
interface PaymentInstallmentItem {
|
|
467
|
+
AccountingMonth: string;
|
|
468
|
+
Amount: number | null;
|
|
469
|
+
Description: string;
|
|
470
|
+
MethodID: number | null;
|
|
471
|
+
PaymentDate: string | null;
|
|
472
|
+
PaymentID: string;
|
|
473
|
+
PaymentReceivedDate: string | null;
|
|
474
|
+
ProductionMonth: string;
|
|
475
|
+
}
|
|
476
|
+
interface PaymentMethod {
|
|
477
|
+
AccountLookupCode: string;
|
|
478
|
+
ContactID: number | null;
|
|
479
|
+
ContactName: string;
|
|
480
|
+
PaymentOptionID: number | null;
|
|
481
|
+
TypeCode: string;
|
|
482
|
+
}
|
|
483
|
+
interface Payment {
|
|
484
|
+
AccountingMonth: string;
|
|
485
|
+
AgencyCode: string;
|
|
486
|
+
BranchCode: string;
|
|
487
|
+
DepartmentCode: string;
|
|
488
|
+
GeneralLedgerCleared: string;
|
|
489
|
+
GeneralLedgerReferNumber: string;
|
|
490
|
+
MethodID: number | null;
|
|
491
|
+
PaymentDate: string | null;
|
|
492
|
+
PaymentID: string;
|
|
493
|
+
PaymentReceivedDate: string | null;
|
|
494
|
+
ProductionMonth: string;
|
|
495
|
+
ProfitCenterCode: string;
|
|
496
|
+
ReceivingAgencyCode: string;
|
|
497
|
+
ReceivingBranchCode: string;
|
|
498
|
+
ReversalVoidItemReversalNumber: string;
|
|
499
|
+
ReversalVoidReasonDetails: string;
|
|
500
|
+
ReversalVoidReasonID: number | null;
|
|
501
|
+
ReversalVoidReferNumber: string;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransactionV2Model = void 0;
|
|
4
|
+
/** Epic SDK 2022.1 transaction models. DateTime values are serialized as strings. */
|
|
5
|
+
var TransactionV2Model;
|
|
6
|
+
(function (TransactionV2Model) {
|
|
7
|
+
let ComparisonType;
|
|
8
|
+
(function (ComparisonType) {
|
|
9
|
+
ComparisonType[ComparisonType["EqualTo"] = 0] = "EqualTo";
|
|
10
|
+
ComparisonType[ComparisonType["Containing"] = 1] = "Containing";
|
|
11
|
+
ComparisonType[ComparisonType["GreaterThan"] = 2] = "GreaterThan";
|
|
12
|
+
ComparisonType[ComparisonType["LessThan"] = 3] = "LessThan";
|
|
13
|
+
ComparisonType[ComparisonType["DoesNotEqual"] = 4] = "DoesNotEqual";
|
|
14
|
+
})(ComparisonType = TransactionV2Model.ComparisonType || (TransactionV2Model.ComparisonType = {}));
|
|
15
|
+
let FutureItems;
|
|
16
|
+
(function (FutureItems) {
|
|
17
|
+
FutureItems[FutureItems["Exclude"] = 0] = "Exclude";
|
|
18
|
+
FutureItems[FutureItems["Only"] = 1] = "Only";
|
|
19
|
+
FutureItems[FutureItems["Include"] = 2] = "Include";
|
|
20
|
+
})(FutureItems = TransactionV2Model.FutureItems || (TransactionV2Model.FutureItems = {}));
|
|
21
|
+
let Service;
|
|
22
|
+
(function (Service) {
|
|
23
|
+
Service[Service["Include"] = 0] = "Include";
|
|
24
|
+
Service[Service["Only"] = 1] = "Only";
|
|
25
|
+
Service[Service["Exclude"] = 2] = "Exclude";
|
|
26
|
+
})(Service = TransactionV2Model.Service || (TransactionV2Model.Service = {}));
|
|
27
|
+
let TransactionStatus;
|
|
28
|
+
(function (TransactionStatus) {
|
|
29
|
+
TransactionStatus[TransactionStatus["None"] = 0] = "None";
|
|
30
|
+
TransactionStatus[TransactionStatus["BalanceForward"] = 1] = "BalanceForward";
|
|
31
|
+
TransactionStatus[TransactionStatus["OpenItem"] = 2] = "OpenItem";
|
|
32
|
+
})(TransactionStatus = TransactionV2Model.TransactionStatus || (TransactionV2Model.TransactionStatus = {}));
|
|
33
|
+
let AdjustCommissionProducerBrokerCommissionItemFlags;
|
|
34
|
+
(function (AdjustCommissionProducerBrokerCommissionItemFlags) {
|
|
35
|
+
AdjustCommissionProducerBrokerCommissionItemFlags[AdjustCommissionProducerBrokerCommissionItemFlags["View"] = 0] = "View";
|
|
36
|
+
AdjustCommissionProducerBrokerCommissionItemFlags[AdjustCommissionProducerBrokerCommissionItemFlags["Insert"] = 1] = "Insert";
|
|
37
|
+
AdjustCommissionProducerBrokerCommissionItemFlags[AdjustCommissionProducerBrokerCommissionItemFlags["Update"] = 2] = "Update";
|
|
38
|
+
AdjustCommissionProducerBrokerCommissionItemFlags[AdjustCommissionProducerBrokerCommissionItemFlags["Delete"] = 3] = "Delete";
|
|
39
|
+
})(AdjustCommissionProducerBrokerCommissionItemFlags = TransactionV2Model.AdjustCommissionProducerBrokerCommissionItemFlags || (TransactionV2Model.AdjustCommissionProducerBrokerCommissionItemFlags = {}));
|
|
40
|
+
let RevisePremiumReviseInstallmentsBasedOn;
|
|
41
|
+
(function (RevisePremiumReviseInstallmentsBasedOn) {
|
|
42
|
+
RevisePremiumReviseInstallmentsBasedOn[RevisePremiumReviseInstallmentsBasedOn["Summary"] = 0] = "Summary";
|
|
43
|
+
RevisePremiumReviseInstallmentsBasedOn[RevisePremiumReviseInstallmentsBasedOn["SplitReceivable"] = 1] = "SplitReceivable";
|
|
44
|
+
})(RevisePremiumReviseInstallmentsBasedOn = TransactionV2Model.RevisePremiumReviseInstallmentsBasedOn || (TransactionV2Model.RevisePremiumReviseInstallmentsBasedOn = {}));
|
|
45
|
+
let RevisePremiumSummaryItemFlags;
|
|
46
|
+
(function (RevisePremiumSummaryItemFlags) {
|
|
47
|
+
RevisePremiumSummaryItemFlags[RevisePremiumSummaryItemFlags["View"] = 0] = "View";
|
|
48
|
+
RevisePremiumSummaryItemFlags[RevisePremiumSummaryItemFlags["Revise"] = 1] = "Revise";
|
|
49
|
+
})(RevisePremiumSummaryItemFlags = TransactionV2Model.RevisePremiumSummaryItemFlags || (TransactionV2Model.RevisePremiumSummaryItemFlags = {}));
|
|
50
|
+
let RevisePremiumSplitReceivableItemFlags;
|
|
51
|
+
(function (RevisePremiumSplitReceivableItemFlags) {
|
|
52
|
+
RevisePremiumSplitReceivableItemFlags[RevisePremiumSplitReceivableItemFlags["View"] = 0] = "View";
|
|
53
|
+
RevisePremiumSplitReceivableItemFlags[RevisePremiumSplitReceivableItemFlags["Revise"] = 1] = "Revise";
|
|
54
|
+
})(RevisePremiumSplitReceivableItemFlags = TransactionV2Model.RevisePremiumSplitReceivableItemFlags || (TransactionV2Model.RevisePremiumSplitReceivableItemFlags = {}));
|
|
55
|
+
let ReverseTransactionReverseItemFlags;
|
|
56
|
+
(function (ReverseTransactionReverseItemFlags) {
|
|
57
|
+
ReverseTransactionReverseItemFlags[ReverseTransactionReverseItemFlags["View"] = 0] = "View";
|
|
58
|
+
ReverseTransactionReverseItemFlags[ReverseTransactionReverseItemFlags["Reverse"] = 1] = "Reverse";
|
|
59
|
+
})(ReverseTransactionReverseItemFlags = TransactionV2Model.ReverseTransactionReverseItemFlags || (TransactionV2Model.ReverseTransactionReverseItemFlags = {}));
|
|
60
|
+
})(TransactionV2Model || (exports.TransactionV2Model = TransactionV2Model = {}));
|
|
@@ -28,6 +28,7 @@ export * from './Response';
|
|
|
28
28
|
export * from './ServiceSummary';
|
|
29
29
|
export * from './ServicingContact';
|
|
30
30
|
export * from './Transaction';
|
|
31
|
+
export * from './TransactionV2';
|
|
31
32
|
export * from './Vehicle';
|
|
32
33
|
export * from './Certificate';
|
|
33
34
|
export * from './CriteriaValue';
|
|
@@ -44,6 +44,7 @@ __exportStar(require("./Response"), exports);
|
|
|
44
44
|
__exportStar(require("./ServiceSummary"), exports);
|
|
45
45
|
__exportStar(require("./ServicingContact"), exports);
|
|
46
46
|
__exportStar(require("./Transaction"), exports);
|
|
47
|
+
__exportStar(require("./TransactionV2"), exports);
|
|
47
48
|
__exportStar(require("./Vehicle"), exports);
|
|
48
49
|
__exportStar(require("./Certificate"), exports);
|
|
49
50
|
__exportStar(require("./CriteriaValue"), exports);
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
export * as AdminModels from './admin';
|
|
2
2
|
export * as EpicModels from './epic';
|
|
3
|
-
export * as GoogleAdsModels from './googleads';
|
|
4
3
|
export * as MailModels from './mail';
|
|
5
4
|
export * as SharepointModels from './sharepoint';
|
|
6
5
|
export * from './admin';
|
|
7
6
|
export * from './epic';
|
|
8
|
-
export * from './googleads';
|
|
9
7
|
export * from './mail';
|
|
10
8
|
export * from './sharepoint';
|
package/dist/models/index.js
CHANGED
|
@@ -36,15 +36,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.SharepointModels = exports.MailModels = exports.
|
|
39
|
+
exports.SharepointModels = exports.MailModels = exports.EpicModels = exports.AdminModels = void 0;
|
|
40
40
|
exports.AdminModels = __importStar(require("./admin"));
|
|
41
41
|
exports.EpicModels = __importStar(require("./epic"));
|
|
42
|
-
exports.GoogleAdsModels = __importStar(require("./googleads"));
|
|
43
42
|
exports.MailModels = __importStar(require("./mail"));
|
|
44
43
|
exports.SharepointModels = __importStar(require("./sharepoint"));
|
|
45
44
|
// Re-export all models directly for convenience
|
|
46
45
|
__exportStar(require("./admin"), exports);
|
|
47
46
|
__exportStar(require("./epic"), exports);
|
|
48
|
-
__exportStar(require("./googleads"), exports);
|
|
49
47
|
__exportStar(require("./mail"), exports);
|
|
50
48
|
__exportStar(require("./sharepoint"), exports);
|
|
@@ -26,10 +26,12 @@ import { BaseEpicService } from './BaseEpicService';
|
|
|
26
26
|
import { CertificateEpicService } from './CertificateEpicService';
|
|
27
27
|
import { DirectBillCommissionEpicService } from './DirectBillCommissionEpicService';
|
|
28
28
|
import { MultiCarrierScheduleEpicService } from './MultiCarrierScheduleEpicService';
|
|
29
|
+
import { TransactionV2EpicService } from './TransactionV2EpicService';
|
|
29
30
|
export declare class EpicService extends BaseEpicService {
|
|
30
31
|
multiCarrierSchedule: MultiCarrierScheduleEpicService;
|
|
31
32
|
directBillCommission: DirectBillCommissionEpicService;
|
|
32
33
|
certificate: CertificateEpicService;
|
|
34
|
+
transactionV2: TransactionV2EpicService;
|
|
33
35
|
constructor(epicUrl: string | undefined, headers: any);
|
|
34
36
|
getActivity(activityId: string): Promise<Activity>;
|
|
35
37
|
getActivities(queryParams: object): Promise<Activity[]>;
|
|
@@ -6,12 +6,14 @@ const BaseEpicService_1 = require("./BaseEpicService");
|
|
|
6
6
|
const CertificateEpicService_1 = require("./CertificateEpicService");
|
|
7
7
|
const DirectBillCommissionEpicService_1 = require("./DirectBillCommissionEpicService");
|
|
8
8
|
const MultiCarrierScheduleEpicService_1 = require("./MultiCarrierScheduleEpicService");
|
|
9
|
+
const TransactionV2EpicService_1 = require("./TransactionV2EpicService");
|
|
9
10
|
class EpicService extends BaseEpicService_1.BaseEpicService {
|
|
10
11
|
constructor(epicUrl, headers) {
|
|
11
12
|
super(epicUrl, headers);
|
|
12
13
|
this.multiCarrierSchedule = new MultiCarrierScheduleEpicService_1.MultiCarrierScheduleEpicService(epicUrl, headers);
|
|
13
14
|
this.directBillCommission = new DirectBillCommissionEpicService_1.DirectBillCommissionEpicService(epicUrl, headers);
|
|
14
15
|
this.certificate = new CertificateEpicService_1.CertificateEpicService(epicUrl, headers);
|
|
16
|
+
this.transactionV2 = new TransactionV2EpicService_1.TransactionV2EpicService(epicUrl, headers);
|
|
15
17
|
}
|
|
16
18
|
async getActivity(activityId) {
|
|
17
19
|
return this.getOne('activity', activityId);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { TransactionV2Model } from '../../models/epic/TransactionV2';
|
|
2
|
+
import { BaseEpicService } from './BaseEpicService';
|
|
3
|
+
/**
|
|
4
|
+
* TransactionV2EpicService provides methods for transaction V2 Epic API operations.
|
|
5
|
+
* It extends BaseEpicService for common API functionality.
|
|
6
|
+
*/
|
|
7
|
+
export declare class TransactionV2EpicService extends BaseEpicService {
|
|
8
|
+
readonly baseUrl = "transactionV2";
|
|
9
|
+
getTransactions(queryParams: TransactionV2Model.TransactionFilter): Promise<TransactionV2Model.Transaction[]>;
|
|
10
|
+
getTransaction(id: number): Promise<TransactionV2Model.Transaction | undefined>;
|
|
11
|
+
createTransaction(payload: TransactionV2Model.CreateTransaction): Promise<number[]>;
|
|
12
|
+
updateTransaction(id: number, payload: TransactionV2Model.UpdateTransaction): Promise<string>;
|
|
13
|
+
/** Retrieve defaults before submitting an adjustCommission action. */
|
|
14
|
+
getDefaultAdjustCommission(id: number): Promise<TransactionV2Model.AdjustCommission[]>;
|
|
15
|
+
/** Retrieve defaults before submitting a revisePremium action. */
|
|
16
|
+
getDefaultRevisePremium(id: number): Promise<TransactionV2Model.RevisePremium[]>;
|
|
17
|
+
/** Retrieve defaults before submitting a reverseTransaction action. */
|
|
18
|
+
getDefaultReverse(id: number): Promise<TransactionV2Model.ReverseTransaction[]>;
|
|
19
|
+
adjustCommission(payload: TransactionV2Model.AdjustCommission): Promise<void>;
|
|
20
|
+
revisePremium(payload: TransactionV2Model.RevisePremium): Promise<void>;
|
|
21
|
+
reverseTransaction(payload: TransactionV2Model.ReverseTransaction): Promise<void>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransactionV2EpicService = void 0;
|
|
4
|
+
const BaseEpicService_1 = require("./BaseEpicService");
|
|
5
|
+
/**
|
|
6
|
+
* TransactionV2EpicService provides methods for transaction V2 Epic API operations.
|
|
7
|
+
* It extends BaseEpicService for common API functionality.
|
|
8
|
+
*/
|
|
9
|
+
class TransactionV2EpicService extends BaseEpicService_1.BaseEpicService {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.baseUrl = 'transactionV2';
|
|
13
|
+
}
|
|
14
|
+
async getTransactions(queryParams) {
|
|
15
|
+
return this.get(this.baseUrl, queryParams);
|
|
16
|
+
}
|
|
17
|
+
async getTransaction(id) {
|
|
18
|
+
const transactions = await this.getTransactions({ TransactionID: id });
|
|
19
|
+
return transactions && transactions.length > 0 ? transactions[0] : undefined;
|
|
20
|
+
}
|
|
21
|
+
async createTransaction(payload) {
|
|
22
|
+
const result = await this.post(this.baseUrl, payload);
|
|
23
|
+
// The HTTP helper returns string IDs; the SDK result is always a numeric array.
|
|
24
|
+
const ids = Array.isArray(result) ? result : [result];
|
|
25
|
+
return ids.map(Number);
|
|
26
|
+
}
|
|
27
|
+
async updateTransaction(id, payload) {
|
|
28
|
+
return await this.put(`${this.baseUrl}/${id}`, payload);
|
|
29
|
+
}
|
|
30
|
+
/** Retrieve defaults before submitting an adjustCommission action. */
|
|
31
|
+
async getDefaultAdjustCommission(id) {
|
|
32
|
+
return this.getOne(`${this.baseUrl}/defaultAdjustCommission`, id);
|
|
33
|
+
}
|
|
34
|
+
/** Retrieve defaults before submitting a revisePremium action. */
|
|
35
|
+
async getDefaultRevisePremium(id) {
|
|
36
|
+
return this.getOne(`${this.baseUrl}/defaultRevisePremium`, id);
|
|
37
|
+
}
|
|
38
|
+
/** Retrieve defaults before submitting a reverseTransaction action. */
|
|
39
|
+
async getDefaultReverse(id) {
|
|
40
|
+
return this.getOne(`${this.baseUrl}/reverse`, id);
|
|
41
|
+
}
|
|
42
|
+
async adjustCommission(payload) {
|
|
43
|
+
await this.put(`${this.baseUrl}/adjustCommission`, payload);
|
|
44
|
+
}
|
|
45
|
+
async revisePremium(payload) {
|
|
46
|
+
await this.put(`${this.baseUrl}/revisePremium`, payload);
|
|
47
|
+
}
|
|
48
|
+
async reverseTransaction(payload) {
|
|
49
|
+
await this.put(`${this.baseUrl}/reverse`, payload);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.TransactionV2EpicService = TransactionV2EpicService;
|
package/dist/services/index.d.ts
CHANGED
package/dist/services/index.js
CHANGED
|
@@ -16,6 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./Admin"), exports);
|
|
18
18
|
__exportStar(require("./epic"), exports);
|
|
19
|
-
__exportStar(require("./GoogleAdsService"), exports);
|
|
20
19
|
__exportStar(require("./Mail"), exports);
|
|
21
20
|
__exportStar(require("./SharepointService"), exports);
|
package/package.json
CHANGED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Google Ads conversion data for upload
|
|
3
|
-
*/
|
|
4
|
-
export interface GoogleAdsConversion {
|
|
5
|
-
gclid: string;
|
|
6
|
-
conversion_action: string;
|
|
7
|
-
conversion_date_time: string;
|
|
8
|
-
conversion_value: number;
|
|
9
|
-
currency_code: string;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Response for conversion upload
|
|
13
|
-
*/
|
|
14
|
-
export interface GoogleAdsConversionUploadResponse {
|
|
15
|
-
job_id: string;
|
|
16
|
-
partial_failure_error?: PartialFailureError;
|
|
17
|
-
results?: any[];
|
|
18
|
-
}
|
|
19
|
-
export interface PartialFailureError {
|
|
20
|
-
details: any[];
|
|
21
|
-
code: string;
|
|
22
|
-
message: string;
|
|
23
|
-
}
|
|
24
|
-
export type ConversionAdjustmentType = "RESTATEMENT" | "RETRACTION" | "ENHANCEMENT";
|
|
25
|
-
export interface GoogleAdsConversionAdjustment {
|
|
26
|
-
gclid: string;
|
|
27
|
-
conversion_date_time: string;
|
|
28
|
-
conversion_action: string;
|
|
29
|
-
adjustment_date_time: string;
|
|
30
|
-
adjustment_type: ConversionAdjustmentType;
|
|
31
|
-
restatement_value?: number;
|
|
32
|
-
restatement_currency_code?: string;
|
|
33
|
-
}
|
|
34
|
-
export interface GoogleAdsConversionAdjustmentResponse {
|
|
35
|
-
success: boolean;
|
|
36
|
-
results: {
|
|
37
|
-
gclid: string;
|
|
38
|
-
conversion_action: string;
|
|
39
|
-
adjustment_type: ConversionAdjustmentType;
|
|
40
|
-
status: "success" | "error";
|
|
41
|
-
error?: string;
|
|
42
|
-
}[];
|
|
43
|
-
partial_failure_error?: PartialFailureError;
|
|
44
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './GoogleAds';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./GoogleAds"), exports);
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { AxiosInstance } from 'axios';
|
|
2
|
-
import { GoogleAdsConversion, GoogleAdsConversionAdjustment, GoogleAdsConversionAdjustmentResponse, GoogleAdsConversionUploadResponse } from '../models/googleads';
|
|
3
|
-
/**
|
|
4
|
-
* GoogleAdsService provides methods to interact with Google Ads API.
|
|
5
|
-
* It offers methods for campaigns, ads, click views, conversion actions, and conversion uploads.
|
|
6
|
-
*/
|
|
7
|
-
export declare class GoogleAdsService {
|
|
8
|
-
axiosInstance: AxiosInstance;
|
|
9
|
-
constructor(baseUrl: string | undefined, headers: object);
|
|
10
|
-
/**
|
|
11
|
-
* Upload offline conversions to Google Ads
|
|
12
|
-
* @param enterprise - The enterprise identifier
|
|
13
|
-
* @param conversions - Array of conversions to upload (each requires gclid, conversion_action, conversion_date_time, conversion_value, currency_code)
|
|
14
|
-
* @returns Upload result including success status and partial failure errors if any
|
|
15
|
-
*/
|
|
16
|
-
uploadConversions(enterprise: string, conversions: GoogleAdsConversion[]): Promise<GoogleAdsConversionUploadResponse>;
|
|
17
|
-
/**
|
|
18
|
-
* Upload offline conversions adjustments to Google Ads
|
|
19
|
-
* @param enterpriseName - The enterprise identifier
|
|
20
|
-
* @param adjustments - Array of conversions adjustments to upload
|
|
21
|
-
* @returns Upload result including success status and partial failure errors if any
|
|
22
|
-
*/
|
|
23
|
-
uploadConversionAdjustments(enterpriseName: string, adjustments: GoogleAdsConversionAdjustment[]): Promise<GoogleAdsConversionAdjustmentResponse>;
|
|
24
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GoogleAdsService = void 0;
|
|
4
|
-
const AxiosClient_1 = require("../utils/AxiosClient");
|
|
5
|
-
const BASE_PATH = 'google-ads';
|
|
6
|
-
/**
|
|
7
|
-
* GoogleAdsService provides methods to interact with Google Ads API.
|
|
8
|
-
* It offers methods for campaigns, ads, click views, conversion actions, and conversion uploads.
|
|
9
|
-
*/
|
|
10
|
-
class GoogleAdsService {
|
|
11
|
-
constructor(baseUrl, headers) {
|
|
12
|
-
this.axiosInstance = new AxiosClient_1.AxiosClient(baseUrl, headers).getInstance();
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Upload offline conversions to Google Ads
|
|
16
|
-
* @param enterprise - The enterprise identifier
|
|
17
|
-
* @param conversions - Array of conversions to upload (each requires gclid, conversion_action, conversion_date_time, conversion_value, currency_code)
|
|
18
|
-
* @returns Upload result including success status and partial failure errors if any
|
|
19
|
-
*/
|
|
20
|
-
async uploadConversions(enterprise, conversions) {
|
|
21
|
-
const { data } = await this.axiosInstance.post(`${BASE_PATH}/${encodeURIComponent(enterprise)}/conversions`, conversions);
|
|
22
|
-
return data;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Upload offline conversions adjustments to Google Ads
|
|
26
|
-
* @param enterpriseName - The enterprise identifier
|
|
27
|
-
* @param adjustments - Array of conversions adjustments to upload
|
|
28
|
-
* @returns Upload result including success status and partial failure errors if any
|
|
29
|
-
*/
|
|
30
|
-
async uploadConversionAdjustments(enterpriseName, adjustments) {
|
|
31
|
-
const { data } = await this.axiosInstance.post(`${BASE_PATH}/${encodeURIComponent(enterpriseName)}/conversion-adjustments`, adjustments);
|
|
32
|
-
return data;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.GoogleAdsService = GoogleAdsService;
|