@vqnguyen1/piece-fis-ibs 0.0.4 → 0.0.5

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 (36) hide show
  1. package/package.json +2 -2
  2. package/project.json +22 -0
  3. package/src/index.ts +320 -0
  4. package/src/lib/actions/bank-control.ts +378 -0
  5. package/src/lib/actions/customer.ts +1574 -0
  6. package/src/lib/actions/deposit.ts +749 -0
  7. package/src/lib/actions/get-customer.ts +73 -0
  8. package/src/lib/actions/loan.ts +925 -0
  9. package/src/lib/actions/search-customers.ts +143 -0
  10. package/src/lib/actions/security.ts +170 -0
  11. package/tsconfig.json +19 -0
  12. package/tsconfig.lib.json +10 -0
  13. package/src/index.d.ts +0 -16
  14. package/src/index.js +0 -204
  15. package/src/index.js.map +0 -1
  16. package/src/lib/actions/bank-control.d.ts +0 -110
  17. package/src/lib/actions/bank-control.js +0 -371
  18. package/src/lib/actions/bank-control.js.map +0 -1
  19. package/src/lib/actions/customer.d.ts +0 -888
  20. package/src/lib/actions/customer.js +0 -1563
  21. package/src/lib/actions/customer.js.map +0 -1
  22. package/src/lib/actions/deposit.d.ts +0 -406
  23. package/src/lib/actions/deposit.js +0 -739
  24. package/src/lib/actions/deposit.js.map +0 -1
  25. package/src/lib/actions/get-customer.d.ts +0 -12
  26. package/src/lib/actions/get-customer.js +0 -69
  27. package/src/lib/actions/get-customer.js.map +0 -1
  28. package/src/lib/actions/loan.d.ts +0 -506
  29. package/src/lib/actions/loan.js +0 -910
  30. package/src/lib/actions/loan.js.map +0 -1
  31. package/src/lib/actions/search-customers.d.ts +0 -17
  32. package/src/lib/actions/search-customers.js +0 -127
  33. package/src/lib/actions/search-customers.js.map +0 -1
  34. package/src/lib/actions/security.d.ts +0 -38
  35. package/src/lib/actions/security.js +0 -173
  36. package/src/lib/actions/security.js.map +0 -1
@@ -1,910 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.loanActions = exports.loan_board = exports.loan_disburse = exports.loan_get_transactions = exports.loan_get_pending_rate_changes = exports.loan_change_rate_immediate = exports.loan_payoff = exports.loan_get_payoff_quote = exports.loan_create_fee = exports.loan_get_fees = exports.loan_delete_collateral = exports.loan_update_collateral = exports.loan_create_collateral = exports.loan_get_collateral = exports.loan_reverse_payment = exports.loan_post_payment = exports.loan_get_payment_info = exports.loan_increase_note = exports.loan_renew_note = exports.loan_get_note_balances = exports.loan_create_note = exports.loan_get_notes = exports.loan_update_account = exports.loan_create_account = exports.loan_get_account = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const __1 = require("../..");
8
- // Helper function to build headers
9
- function buildHeaders(auth, ibsAuthorization) {
10
- const headers = {
11
- 'Content-Type': 'application/json',
12
- 'organization-id': auth.organizationId,
13
- 'source-id': auth.sourceId,
14
- 'application-id': auth.applicationId,
15
- 'uuid': crypto.randomUUID(),
16
- 'ibs-authorization': ibsAuthorization || auth.ibsAuthorization,
17
- };
18
- if (auth.securityTokenType) {
19
- headers['security-token-type'] = auth.securityTokenType;
20
- }
21
- return headers;
22
- }
23
- // ============================================
24
- // IBS-Loan-Accounts.json
25
- // ============================================
26
- exports.loan_get_account = (0, pieces_framework_1.createAction)({
27
- auth: __1.fisIbsAuth,
28
- name: 'loan_get_account',
29
- displayName: 'Loan - Get Account',
30
- description: 'Retrieve loan account information',
31
- props: {
32
- ibsAuthorization: pieces_framework_1.Property.ShortText({
33
- displayName: 'IBS Authorization',
34
- required: false,
35
- }),
36
- acctNbr: pieces_framework_1.Property.ShortText({
37
- displayName: 'Account Number',
38
- required: true,
39
- }),
40
- },
41
- run(context) {
42
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
43
- const auth = context.auth;
44
- const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
45
- const response = yield pieces_common_1.httpClient.sendRequest({
46
- method: pieces_common_1.HttpMethod.GET,
47
- url: `${auth.baseUrl}/IBSLNACCT/v4/accounts/${context.propsValue.acctNbr}`,
48
- headers,
49
- });
50
- return response.body;
51
- });
52
- },
53
- });
54
- exports.loan_create_account = (0, pieces_framework_1.createAction)({
55
- auth: __1.fisIbsAuth,
56
- name: 'loan_create_account',
57
- displayName: 'Loan - Create Account',
58
- description: 'Create a new loan account',
59
- props: {
60
- ibsAuthorization: pieces_framework_1.Property.ShortText({
61
- displayName: 'IBS Authorization',
62
- required: false,
63
- }),
64
- accountData: pieces_framework_1.Property.Object({
65
- displayName: 'Account Data',
66
- required: true,
67
- }),
68
- },
69
- run(context) {
70
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
71
- const auth = context.auth;
72
- const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
73
- const response = yield pieces_common_1.httpClient.sendRequest({
74
- method: pieces_common_1.HttpMethod.POST,
75
- url: `${auth.baseUrl}/IBSLNACCT/v4/accounts`,
76
- headers,
77
- body: context.propsValue.accountData,
78
- });
79
- return response.body;
80
- });
81
- },
82
- });
83
- exports.loan_update_account = (0, pieces_framework_1.createAction)({
84
- auth: __1.fisIbsAuth,
85
- name: 'loan_update_account',
86
- displayName: 'Loan - Update Account',
87
- description: 'Update a loan account',
88
- props: {
89
- ibsAuthorization: pieces_framework_1.Property.ShortText({
90
- displayName: 'IBS Authorization',
91
- required: false,
92
- }),
93
- acctNbr: pieces_framework_1.Property.ShortText({
94
- displayName: 'Account Number',
95
- required: true,
96
- }),
97
- accountData: pieces_framework_1.Property.Object({
98
- displayName: 'Account Data',
99
- required: true,
100
- }),
101
- },
102
- run(context) {
103
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
104
- const auth = context.auth;
105
- const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
106
- const response = yield pieces_common_1.httpClient.sendRequest({
107
- method: pieces_common_1.HttpMethod.PUT,
108
- url: `${auth.baseUrl}/IBSLNACCT/v4/accounts/${context.propsValue.acctNbr}`,
109
- headers,
110
- body: context.propsValue.accountData,
111
- });
112
- return response.body;
113
- });
114
- },
115
- });
116
- // ============================================
117
- // IBS-Loan-Notes.json
118
- // ============================================
119
- exports.loan_get_notes = (0, pieces_framework_1.createAction)({
120
- auth: __1.fisIbsAuth,
121
- name: 'loan_get_notes',
122
- displayName: 'Loan - Get Notes',
123
- description: 'Retrieve loan notes',
124
- props: {
125
- ibsAuthorization: pieces_framework_1.Property.ShortText({
126
- displayName: 'IBS Authorization',
127
- required: false,
128
- }),
129
- acctNbr: pieces_framework_1.Property.ShortText({
130
- displayName: 'Account Number',
131
- required: true,
132
- }),
133
- },
134
- run(context) {
135
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
136
- const auth = context.auth;
137
- const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
138
- const response = yield pieces_common_1.httpClient.sendRequest({
139
- method: pieces_common_1.HttpMethod.GET,
140
- url: `${auth.baseUrl}/IBSLNNOTE/v4/accounts/${context.propsValue.acctNbr}/notes`,
141
- headers,
142
- });
143
- return response.body;
144
- });
145
- },
146
- });
147
- exports.loan_create_note = (0, pieces_framework_1.createAction)({
148
- auth: __1.fisIbsAuth,
149
- name: 'loan_create_note',
150
- displayName: 'Loan - Create Note',
151
- description: 'Create a new loan note',
152
- props: {
153
- ibsAuthorization: pieces_framework_1.Property.ShortText({
154
- displayName: 'IBS Authorization',
155
- required: false,
156
- }),
157
- acctNbr: pieces_framework_1.Property.ShortText({
158
- displayName: 'Account Number',
159
- required: true,
160
- }),
161
- noteData: pieces_framework_1.Property.Object({
162
- displayName: 'Note Data',
163
- required: true,
164
- }),
165
- },
166
- run(context) {
167
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
168
- const auth = context.auth;
169
- const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
170
- const response = yield pieces_common_1.httpClient.sendRequest({
171
- method: pieces_common_1.HttpMethod.POST,
172
- url: `${auth.baseUrl}/IBSLNNOTE/v4/accounts/${context.propsValue.acctNbr}/notes`,
173
- headers,
174
- body: context.propsValue.noteData,
175
- });
176
- return response.body;
177
- });
178
- },
179
- });
180
- exports.loan_get_note_balances = (0, pieces_framework_1.createAction)({
181
- auth: __1.fisIbsAuth,
182
- name: 'loan_get_note_balances',
183
- displayName: 'Loan - Get Note Balances',
184
- description: 'Retrieve loan note balances',
185
- props: {
186
- ibsAuthorization: pieces_framework_1.Property.ShortText({
187
- displayName: 'IBS Authorization',
188
- required: false,
189
- }),
190
- acctNbr: pieces_framework_1.Property.ShortText({
191
- displayName: 'Account Number',
192
- required: true,
193
- }),
194
- noteNbr: pieces_framework_1.Property.ShortText({
195
- displayName: 'Note Number',
196
- required: true,
197
- }),
198
- },
199
- run(context) {
200
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
201
- const auth = context.auth;
202
- const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
203
- const response = yield pieces_common_1.httpClient.sendRequest({
204
- method: pieces_common_1.HttpMethod.GET,
205
- url: `${auth.baseUrl}/IBSLNNOTE/v4/accounts/${context.propsValue.acctNbr}/notes/${context.propsValue.noteNbr}/balances`,
206
- headers,
207
- });
208
- return response.body;
209
- });
210
- },
211
- });
212
- exports.loan_renew_note = (0, pieces_framework_1.createAction)({
213
- auth: __1.fisIbsAuth,
214
- name: 'loan_renew_note',
215
- displayName: 'Loan - Renew Note',
216
- description: 'Renew a loan note',
217
- props: {
218
- ibsAuthorization: pieces_framework_1.Property.ShortText({
219
- displayName: 'IBS Authorization',
220
- required: false,
221
- }),
222
- acctNbr: pieces_framework_1.Property.ShortText({
223
- displayName: 'Account Number',
224
- required: true,
225
- }),
226
- noteNbr: pieces_framework_1.Property.ShortText({
227
- displayName: 'Note Number',
228
- required: true,
229
- }),
230
- renewalData: pieces_framework_1.Property.Object({
231
- displayName: 'Renewal Data',
232
- required: true,
233
- }),
234
- },
235
- run(context) {
236
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
237
- const auth = context.auth;
238
- const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
239
- const response = yield pieces_common_1.httpClient.sendRequest({
240
- method: pieces_common_1.HttpMethod.POST,
241
- url: `${auth.baseUrl}/IBSLNNOTE/v4/accounts/${context.propsValue.acctNbr}/notes/${context.propsValue.noteNbr}/renewals`,
242
- headers,
243
- body: context.propsValue.renewalData,
244
- });
245
- return response.body;
246
- });
247
- },
248
- });
249
- exports.loan_increase_note = (0, pieces_framework_1.createAction)({
250
- auth: __1.fisIbsAuth,
251
- name: 'loan_increase_note',
252
- displayName: 'Loan - Increase Note',
253
- description: 'Increase a loan note amount',
254
- props: {
255
- ibsAuthorization: pieces_framework_1.Property.ShortText({
256
- displayName: 'IBS Authorization',
257
- required: false,
258
- }),
259
- acctNbr: pieces_framework_1.Property.ShortText({
260
- displayName: 'Account Number',
261
- required: true,
262
- }),
263
- noteNbr: pieces_framework_1.Property.ShortText({
264
- displayName: 'Note Number',
265
- required: true,
266
- }),
267
- increaseData: pieces_framework_1.Property.Object({
268
- displayName: 'Increase Data',
269
- required: true,
270
- }),
271
- },
272
- run(context) {
273
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
274
- const auth = context.auth;
275
- const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
276
- const response = yield pieces_common_1.httpClient.sendRequest({
277
- method: pieces_common_1.HttpMethod.POST,
278
- url: `${auth.baseUrl}/IBSLNNOTE/v4/accounts/${context.propsValue.acctNbr}/notes/${context.propsValue.noteNbr}/increase`,
279
- headers,
280
- body: context.propsValue.increaseData,
281
- });
282
- return response.body;
283
- });
284
- },
285
- });
286
- // ============================================
287
- // IBS-Loan-Payments.json
288
- // ============================================
289
- exports.loan_get_payment_info = (0, pieces_framework_1.createAction)({
290
- auth: __1.fisIbsAuth,
291
- name: 'loan_get_payment_info',
292
- displayName: 'Loan - Get Payment Info',
293
- description: 'Retrieve loan payment information',
294
- props: {
295
- ibsAuthorization: pieces_framework_1.Property.ShortText({
296
- displayName: 'IBS Authorization',
297
- required: false,
298
- }),
299
- acctNbr: pieces_framework_1.Property.ShortText({
300
- displayName: 'Account Number',
301
- required: true,
302
- }),
303
- noteNbr: pieces_framework_1.Property.ShortText({
304
- displayName: 'Note Number',
305
- required: true,
306
- }),
307
- },
308
- run(context) {
309
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
310
- const auth = context.auth;
311
- const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
312
- const response = yield pieces_common_1.httpClient.sendRequest({
313
- method: pieces_common_1.HttpMethod.GET,
314
- url: `${auth.baseUrl}/IBSLNPMT/v4/accounts/${context.propsValue.acctNbr}/notes/${context.propsValue.noteNbr}/payments`,
315
- headers,
316
- });
317
- return response.body;
318
- });
319
- },
320
- });
321
- exports.loan_post_payment = (0, pieces_framework_1.createAction)({
322
- auth: __1.fisIbsAuth,
323
- name: 'loan_post_payment',
324
- displayName: 'Loan - Post Payment',
325
- description: 'Post a loan payment',
326
- props: {
327
- ibsAuthorization: pieces_framework_1.Property.ShortText({
328
- displayName: 'IBS Authorization',
329
- required: false,
330
- }),
331
- acctNbr: pieces_framework_1.Property.ShortText({
332
- displayName: 'Account Number',
333
- required: true,
334
- }),
335
- noteNbr: pieces_framework_1.Property.ShortText({
336
- displayName: 'Note Number',
337
- required: true,
338
- }),
339
- paymentData: pieces_framework_1.Property.Object({
340
- displayName: 'Payment Data',
341
- required: true,
342
- }),
343
- },
344
- run(context) {
345
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
346
- const auth = context.auth;
347
- const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
348
- const response = yield pieces_common_1.httpClient.sendRequest({
349
- method: pieces_common_1.HttpMethod.POST,
350
- url: `${auth.baseUrl}/IBSLNPMT/v4/accounts/${context.propsValue.acctNbr}/notes/${context.propsValue.noteNbr}/payments`,
351
- headers,
352
- body: context.propsValue.paymentData,
353
- });
354
- return response.body;
355
- });
356
- },
357
- });
358
- exports.loan_reverse_payment = (0, pieces_framework_1.createAction)({
359
- auth: __1.fisIbsAuth,
360
- name: 'loan_reverse_payment',
361
- displayName: 'Loan - Reverse Payment',
362
- description: 'Reverse a loan payment',
363
- props: {
364
- ibsAuthorization: pieces_framework_1.Property.ShortText({
365
- displayName: 'IBS Authorization',
366
- required: false,
367
- }),
368
- acctNbr: pieces_framework_1.Property.ShortText({
369
- displayName: 'Account Number',
370
- required: true,
371
- }),
372
- noteNbr: pieces_framework_1.Property.ShortText({
373
- displayName: 'Note Number',
374
- required: true,
375
- }),
376
- reversalData: pieces_framework_1.Property.Object({
377
- displayName: 'Reversal Data',
378
- required: true,
379
- }),
380
- },
381
- run(context) {
382
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
383
- const auth = context.auth;
384
- const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
385
- const response = yield pieces_common_1.httpClient.sendRequest({
386
- method: pieces_common_1.HttpMethod.POST,
387
- url: `${auth.baseUrl}/IBSLNPMT/v4/accounts/${context.propsValue.acctNbr}/notes/${context.propsValue.noteNbr}/reversals`,
388
- headers,
389
- body: context.propsValue.reversalData,
390
- });
391
- return response.body;
392
- });
393
- },
394
- });
395
- // ============================================
396
- // IBS-Loan-Collateral.json
397
- // ============================================
398
- exports.loan_get_collateral = (0, pieces_framework_1.createAction)({
399
- auth: __1.fisIbsAuth,
400
- name: 'loan_get_collateral',
401
- displayName: 'Loan - Get Collateral',
402
- description: 'Retrieve loan collateral information',
403
- props: {
404
- ibsAuthorization: pieces_framework_1.Property.ShortText({
405
- displayName: 'IBS Authorization',
406
- required: false,
407
- }),
408
- acctNbr: pieces_framework_1.Property.ShortText({
409
- displayName: 'Account Number',
410
- required: true,
411
- }),
412
- noteNbr: pieces_framework_1.Property.ShortText({
413
- displayName: 'Note Number',
414
- required: true,
415
- }),
416
- },
417
- run(context) {
418
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
419
- const auth = context.auth;
420
- const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
421
- const response = yield pieces_common_1.httpClient.sendRequest({
422
- method: pieces_common_1.HttpMethod.GET,
423
- url: `${auth.baseUrl}/IBSLNCOLL/v4/accounts/${context.propsValue.acctNbr}/notes/${context.propsValue.noteNbr}/multiple-collateral`,
424
- headers,
425
- });
426
- return response.body;
427
- });
428
- },
429
- });
430
- exports.loan_create_collateral = (0, pieces_framework_1.createAction)({
431
- auth: __1.fisIbsAuth,
432
- name: 'loan_create_collateral',
433
- displayName: 'Loan - Create Collateral',
434
- description: 'Add collateral to a loan note',
435
- props: {
436
- ibsAuthorization: pieces_framework_1.Property.ShortText({
437
- displayName: 'IBS Authorization',
438
- required: false,
439
- }),
440
- acctNbr: pieces_framework_1.Property.ShortText({
441
- displayName: 'Account Number',
442
- required: true,
443
- }),
444
- noteNbr: pieces_framework_1.Property.ShortText({
445
- displayName: 'Note Number',
446
- required: true,
447
- }),
448
- collateralData: pieces_framework_1.Property.Object({
449
- displayName: 'Collateral Data',
450
- required: true,
451
- }),
452
- },
453
- run(context) {
454
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
455
- const auth = context.auth;
456
- const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
457
- const response = yield pieces_common_1.httpClient.sendRequest({
458
- method: pieces_common_1.HttpMethod.POST,
459
- url: `${auth.baseUrl}/IBSLNCOLL/v4/accounts/${context.propsValue.acctNbr}/notes/${context.propsValue.noteNbr}/collateral`,
460
- headers,
461
- body: context.propsValue.collateralData,
462
- });
463
- return response.body;
464
- });
465
- },
466
- });
467
- exports.loan_update_collateral = (0, pieces_framework_1.createAction)({
468
- auth: __1.fisIbsAuth,
469
- name: 'loan_update_collateral',
470
- displayName: 'Loan - Update Collateral',
471
- description: 'Update loan collateral',
472
- props: {
473
- ibsAuthorization: pieces_framework_1.Property.ShortText({
474
- displayName: 'IBS Authorization',
475
- required: false,
476
- }),
477
- acctNbr: pieces_framework_1.Property.ShortText({
478
- displayName: 'Account Number',
479
- required: true,
480
- }),
481
- noteNbr: pieces_framework_1.Property.ShortText({
482
- displayName: 'Note Number',
483
- required: true,
484
- }),
485
- seqNbr: pieces_framework_1.Property.ShortText({
486
- displayName: 'Sequence Number',
487
- required: true,
488
- }),
489
- collateralData: pieces_framework_1.Property.Object({
490
- displayName: 'Collateral Data',
491
- required: true,
492
- }),
493
- },
494
- run(context) {
495
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
496
- const auth = context.auth;
497
- const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
498
- const response = yield pieces_common_1.httpClient.sendRequest({
499
- method: pieces_common_1.HttpMethod.PUT,
500
- url: `${auth.baseUrl}/IBSLNCOLL/v4/accounts/${context.propsValue.acctNbr}/notes/${context.propsValue.noteNbr}/collateral/${context.propsValue.seqNbr}`,
501
- headers,
502
- body: context.propsValue.collateralData,
503
- });
504
- return response.body;
505
- });
506
- },
507
- });
508
- exports.loan_delete_collateral = (0, pieces_framework_1.createAction)({
509
- auth: __1.fisIbsAuth,
510
- name: 'loan_delete_collateral',
511
- displayName: 'Loan - Delete Collateral',
512
- description: 'Remove collateral from a loan note',
513
- props: {
514
- ibsAuthorization: pieces_framework_1.Property.ShortText({
515
- displayName: 'IBS Authorization',
516
- required: false,
517
- }),
518
- acctNbr: pieces_framework_1.Property.ShortText({
519
- displayName: 'Account Number',
520
- required: true,
521
- }),
522
- noteNbr: pieces_framework_1.Property.ShortText({
523
- displayName: 'Note Number',
524
- required: true,
525
- }),
526
- seqNbr: pieces_framework_1.Property.ShortText({
527
- displayName: 'Sequence Number',
528
- required: true,
529
- }),
530
- },
531
- run(context) {
532
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
533
- const auth = context.auth;
534
- const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
535
- const response = yield pieces_common_1.httpClient.sendRequest({
536
- method: pieces_common_1.HttpMethod.DELETE,
537
- url: `${auth.baseUrl}/IBSLNCOLL/v4/accounts/${context.propsValue.acctNbr}/notes/${context.propsValue.noteNbr}/collateral/${context.propsValue.seqNbr}`,
538
- headers,
539
- });
540
- return response.body;
541
- });
542
- },
543
- });
544
- // ============================================
545
- // IBS-Loan-Fees.json
546
- // ============================================
547
- exports.loan_get_fees = (0, pieces_framework_1.createAction)({
548
- auth: __1.fisIbsAuth,
549
- name: 'loan_get_fees',
550
- displayName: 'Loan - Get Fees',
551
- description: 'Retrieve loan fee information',
552
- props: {
553
- ibsAuthorization: pieces_framework_1.Property.ShortText({
554
- displayName: 'IBS Authorization',
555
- required: false,
556
- }),
557
- acctNbr: pieces_framework_1.Property.ShortText({
558
- displayName: 'Account Number',
559
- required: true,
560
- }),
561
- noteNbr: pieces_framework_1.Property.ShortText({
562
- displayName: 'Note Number',
563
- required: true,
564
- }),
565
- },
566
- run(context) {
567
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
568
- const auth = context.auth;
569
- const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
570
- const response = yield pieces_common_1.httpClient.sendRequest({
571
- method: pieces_common_1.HttpMethod.GET,
572
- url: `${auth.baseUrl}/IBSLNFEE/v4/accounts/${context.propsValue.acctNbr}/notes/${context.propsValue.noteNbr}/fees`,
573
- headers,
574
- });
575
- return response.body;
576
- });
577
- },
578
- });
579
- exports.loan_create_fee = (0, pieces_framework_1.createAction)({
580
- auth: __1.fisIbsAuth,
581
- name: 'loan_create_fee',
582
- displayName: 'Loan - Create Fee',
583
- description: 'Add a fee to a loan note',
584
- props: {
585
- ibsAuthorization: pieces_framework_1.Property.ShortText({
586
- displayName: 'IBS Authorization',
587
- required: false,
588
- }),
589
- acctNbr: pieces_framework_1.Property.ShortText({
590
- displayName: 'Account Number',
591
- required: true,
592
- }),
593
- noteNbr: pieces_framework_1.Property.ShortText({
594
- displayName: 'Note Number',
595
- required: true,
596
- }),
597
- feeData: pieces_framework_1.Property.Object({
598
- displayName: 'Fee Data',
599
- required: true,
600
- }),
601
- },
602
- run(context) {
603
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
604
- const auth = context.auth;
605
- const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
606
- const response = yield pieces_common_1.httpClient.sendRequest({
607
- method: pieces_common_1.HttpMethod.POST,
608
- url: `${auth.baseUrl}/IBSLNFEE/v4/accounts/${context.propsValue.acctNbr}/notes/${context.propsValue.noteNbr}/fees`,
609
- headers,
610
- body: context.propsValue.feeData,
611
- });
612
- return response.body;
613
- });
614
- },
615
- });
616
- // ============================================
617
- // IBS-Loan-Payoffs.json
618
- // ============================================
619
- exports.loan_get_payoff_quote = (0, pieces_framework_1.createAction)({
620
- auth: __1.fisIbsAuth,
621
- name: 'loan_get_payoff_quote',
622
- displayName: 'Loan - Get Payoff Quote',
623
- description: 'Get a payoff quote for a loan',
624
- props: {
625
- ibsAuthorization: pieces_framework_1.Property.ShortText({
626
- displayName: 'IBS Authorization',
627
- required: false,
628
- }),
629
- acctNbr: pieces_framework_1.Property.ShortText({
630
- displayName: 'Account Number',
631
- required: true,
632
- }),
633
- noteNbr: pieces_framework_1.Property.ShortText({
634
- displayName: 'Note Number',
635
- required: true,
636
- }),
637
- payoffDate: pieces_framework_1.Property.ShortText({
638
- displayName: 'Payoff Date',
639
- description: 'YYYY-MM-DD format',
640
- required: false,
641
- }),
642
- },
643
- run(context) {
644
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
645
- const auth = context.auth;
646
- const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
647
- const params = new URLSearchParams();
648
- if (context.propsValue.payoffDate)
649
- params.append('payoffDate', context.propsValue.payoffDate);
650
- const queryString = params.toString();
651
- const url = `${auth.baseUrl}/IBSLNPOFF/v4/accounts/${context.propsValue.acctNbr}/notes/${context.propsValue.noteNbr}/payoff-quote${queryString ? '?' + queryString : ''}`;
652
- const response = yield pieces_common_1.httpClient.sendRequest({
653
- method: pieces_common_1.HttpMethod.GET,
654
- url,
655
- headers,
656
- });
657
- return response.body;
658
- });
659
- },
660
- });
661
- exports.loan_payoff = (0, pieces_framework_1.createAction)({
662
- auth: __1.fisIbsAuth,
663
- name: 'loan_payoff',
664
- displayName: 'Loan - Payoff',
665
- description: 'Pay off a loan',
666
- props: {
667
- ibsAuthorization: pieces_framework_1.Property.ShortText({
668
- displayName: 'IBS Authorization',
669
- required: false,
670
- }),
671
- acctNbr: pieces_framework_1.Property.ShortText({
672
- displayName: 'Account Number',
673
- required: true,
674
- }),
675
- noteNbr: pieces_framework_1.Property.ShortText({
676
- displayName: 'Note Number',
677
- required: true,
678
- }),
679
- payoffData: pieces_framework_1.Property.Object({
680
- displayName: 'Payoff Data',
681
- required: true,
682
- }),
683
- },
684
- run(context) {
685
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
686
- const auth = context.auth;
687
- const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
688
- const response = yield pieces_common_1.httpClient.sendRequest({
689
- method: pieces_common_1.HttpMethod.POST,
690
- url: `${auth.baseUrl}/IBSLNPOFF/v4/accounts/${context.propsValue.acctNbr}/notes/${context.propsValue.noteNbr}/payoff`,
691
- headers,
692
- body: context.propsValue.payoffData,
693
- });
694
- return response.body;
695
- });
696
- },
697
- });
698
- // ============================================
699
- // IBS-Loan-Rate-Changes.json
700
- // ============================================
701
- exports.loan_change_rate_immediate = (0, pieces_framework_1.createAction)({
702
- auth: __1.fisIbsAuth,
703
- name: 'loan_change_rate_immediate',
704
- displayName: 'Loan - Change Rate (Immediate)',
705
- description: 'Immediately change the interest rate on a loan',
706
- props: {
707
- ibsAuthorization: pieces_framework_1.Property.ShortText({
708
- displayName: 'IBS Authorization',
709
- required: false,
710
- }),
711
- acctNbr: pieces_framework_1.Property.ShortText({
712
- displayName: 'Account Number',
713
- required: true,
714
- }),
715
- noteNbr: pieces_framework_1.Property.ShortText({
716
- displayName: 'Note Number',
717
- required: true,
718
- }),
719
- rateData: pieces_framework_1.Property.Object({
720
- displayName: 'Rate Data',
721
- required: true,
722
- }),
723
- },
724
- run(context) {
725
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
726
- const auth = context.auth;
727
- const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
728
- const response = yield pieces_common_1.httpClient.sendRequest({
729
- method: pieces_common_1.HttpMethod.POST,
730
- url: `${auth.baseUrl}/IBSLNRATE/v4/accounts/${context.propsValue.acctNbr}/notes/${context.propsValue.noteNbr}/rate-changes-immediate`,
731
- headers,
732
- body: context.propsValue.rateData,
733
- });
734
- return response.body;
735
- });
736
- },
737
- });
738
- exports.loan_get_pending_rate_changes = (0, pieces_framework_1.createAction)({
739
- auth: __1.fisIbsAuth,
740
- name: 'loan_get_pending_rate_changes',
741
- displayName: 'Loan - Get Pending Rate Changes',
742
- description: 'Get pending rate changes for a loan',
743
- props: {
744
- ibsAuthorization: pieces_framework_1.Property.ShortText({
745
- displayName: 'IBS Authorization',
746
- required: false,
747
- }),
748
- acctNbr: pieces_framework_1.Property.ShortText({
749
- displayName: 'Account Number',
750
- required: true,
751
- }),
752
- noteNbr: pieces_framework_1.Property.ShortText({
753
- displayName: 'Note Number',
754
- required: true,
755
- }),
756
- },
757
- run(context) {
758
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
759
- const auth = context.auth;
760
- const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
761
- const response = yield pieces_common_1.httpClient.sendRequest({
762
- method: pieces_common_1.HttpMethod.GET,
763
- url: `${auth.baseUrl}/IBSLNRATE/v4/accounts/${context.propsValue.acctNbr}/notes/${context.propsValue.noteNbr}/rate-changes-pending`,
764
- headers,
765
- });
766
- return response.body;
767
- });
768
- },
769
- });
770
- // ============================================
771
- // IBS-Loan-Note-Transactions.json
772
- // ============================================
773
- exports.loan_get_transactions = (0, pieces_framework_1.createAction)({
774
- auth: __1.fisIbsAuth,
775
- name: 'loan_get_transactions',
776
- displayName: 'Loan - Get Transactions',
777
- description: 'Get loan note transactions',
778
- props: {
779
- ibsAuthorization: pieces_framework_1.Property.ShortText({
780
- displayName: 'IBS Authorization',
781
- required: false,
782
- }),
783
- acctNbr: pieces_framework_1.Property.ShortText({
784
- displayName: 'Account Number',
785
- required: true,
786
- }),
787
- noteNbr: pieces_framework_1.Property.ShortText({
788
- displayName: 'Note Number',
789
- required: true,
790
- }),
791
- },
792
- run(context) {
793
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
794
- const auth = context.auth;
795
- const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
796
- const response = yield pieces_common_1.httpClient.sendRequest({
797
- method: pieces_common_1.HttpMethod.GET,
798
- url: `${auth.baseUrl}/IBSLNTRAN/v4/accounts/${context.propsValue.acctNbr}/notes/${context.propsValue.noteNbr}/transactions`,
799
- headers,
800
- });
801
- return response.body;
802
- });
803
- },
804
- });
805
- exports.loan_disburse = (0, pieces_framework_1.createAction)({
806
- auth: __1.fisIbsAuth,
807
- name: 'loan_disburse',
808
- displayName: 'Loan - Disburse',
809
- description: 'Disburse funds from a loan',
810
- props: {
811
- ibsAuthorization: pieces_framework_1.Property.ShortText({
812
- displayName: 'IBS Authorization',
813
- required: false,
814
- }),
815
- acctNbr: pieces_framework_1.Property.ShortText({
816
- displayName: 'Account Number',
817
- required: true,
818
- }),
819
- noteNbr: pieces_framework_1.Property.ShortText({
820
- displayName: 'Note Number',
821
- required: true,
822
- }),
823
- disbursementData: pieces_framework_1.Property.Object({
824
- displayName: 'Disbursement Data',
825
- required: true,
826
- }),
827
- },
828
- run(context) {
829
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
830
- const auth = context.auth;
831
- const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
832
- const response = yield pieces_common_1.httpClient.sendRequest({
833
- method: pieces_common_1.HttpMethod.POST,
834
- url: `${auth.baseUrl}/IBSLNTRAN/v4/accounts/${context.propsValue.acctNbr}/notes/${context.propsValue.noteNbr}/disbursement`,
835
- headers,
836
- body: context.propsValue.disbursementData,
837
- });
838
- return response.body;
839
- });
840
- },
841
- });
842
- // ============================================
843
- // IBS-Loan-Boarding.json
844
- // ============================================
845
- exports.loan_board = (0, pieces_framework_1.createAction)({
846
- auth: __1.fisIbsAuth,
847
- name: 'loan_board',
848
- displayName: 'Loan - Board Loan',
849
- description: 'Board a new loan into the system',
850
- props: {
851
- ibsAuthorization: pieces_framework_1.Property.ShortText({
852
- displayName: 'IBS Authorization',
853
- required: false,
854
- }),
855
- loanData: pieces_framework_1.Property.Object({
856
- displayName: 'Loan Data',
857
- required: true,
858
- }),
859
- },
860
- run(context) {
861
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
862
- const auth = context.auth;
863
- const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
864
- const response = yield pieces_common_1.httpClient.sendRequest({
865
- method: pieces_common_1.HttpMethod.POST,
866
- url: `${auth.baseUrl}/IBSLNBOARD/v4/loans`,
867
- headers,
868
- body: context.propsValue.loanData,
869
- });
870
- return response.body;
871
- });
872
- },
873
- });
874
- // Export all loan actions
875
- exports.loanActions = [
876
- // Account Management
877
- exports.loan_get_account,
878
- exports.loan_create_account,
879
- exports.loan_update_account,
880
- // Notes
881
- exports.loan_get_notes,
882
- exports.loan_create_note,
883
- exports.loan_get_note_balances,
884
- exports.loan_renew_note,
885
- exports.loan_increase_note,
886
- // Payments
887
- exports.loan_get_payment_info,
888
- exports.loan_post_payment,
889
- exports.loan_reverse_payment,
890
- // Collateral
891
- exports.loan_get_collateral,
892
- exports.loan_create_collateral,
893
- exports.loan_update_collateral,
894
- exports.loan_delete_collateral,
895
- // Fees
896
- exports.loan_get_fees,
897
- exports.loan_create_fee,
898
- // Payoffs
899
- exports.loan_get_payoff_quote,
900
- exports.loan_payoff,
901
- // Rate Changes
902
- exports.loan_change_rate_immediate,
903
- exports.loan_get_pending_rate_changes,
904
- // Transactions
905
- exports.loan_get_transactions,
906
- exports.loan_disburse,
907
- // Boarding
908
- exports.loan_board,
909
- ];
910
- //# sourceMappingURL=loan.js.map