@vqnguyen1/piece-fis-horizon 0.0.1 → 0.0.3

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 (31) hide show
  1. package/package.json +12 -7
  2. package/project.json +22 -0
  3. package/src/index.ts +534 -0
  4. package/src/lib/actions/account-aggregation.ts +360 -0
  5. package/src/lib/actions/account-restrictions.ts +2427 -0
  6. package/src/lib/actions/bank-controls.ts +2328 -0
  7. package/src/lib/actions/card.ts +488 -0
  8. package/src/lib/actions/collateral.ts +696 -0
  9. package/src/lib/actions/customer.ts +1691 -0
  10. package/src/lib/actions/demand-deposit-savings.ts +731 -0
  11. package/src/lib/actions/get-authorization-token.ts +73 -0
  12. package/src/lib/actions/loans.ts +902 -0
  13. package/src/lib/actions/mortgage-loan.ts +1426 -0
  14. package/src/lib/actions/ready-reserve.ts +818 -0
  15. package/src/lib/actions/safe-deposit.ts +1506 -0
  16. package/src/lib/actions/search-customer-relationship-summary.ts +140 -0
  17. package/src/lib/actions/time-deposit.ts +2922 -0
  18. package/src/lib/actions/transactions.ts +1310 -0
  19. package/src/lib/actions/transfers.ts +1581 -0
  20. package/src/lib/actions/user-security.ts +1032 -0
  21. package/tsconfig.json +19 -0
  22. package/tsconfig.lib.json +10 -0
  23. package/src/index.d.ts +0 -12
  24. package/src/index.js +0 -62
  25. package/src/index.js.map +0 -1
  26. package/src/lib/actions/get-authorization-token.d.ts +0 -10
  27. package/src/lib/actions/get-authorization-token.js +0 -68
  28. package/src/lib/actions/get-authorization-token.js.map +0 -1
  29. package/src/lib/actions/search-customer-relationship-summary.d.ts +0 -15
  30. package/src/lib/actions/search-customer-relationship-summary.js +0 -122
  31. package/src/lib/actions/search-customer-relationship-summary.js.map +0 -1
@@ -0,0 +1,818 @@
1
+ import {
2
+ createAction,
3
+ Property,
4
+ } from '@activepieces/pieces-framework';
5
+ import { httpClient, HttpMethod } from '@activepieces/pieces-common';
6
+ import { fisHorizonAuth } from '../..';
7
+
8
+ // Base URL path for Ready Reserve API
9
+ const API_PATH = '/ready-reserve/v1';
10
+
11
+ /**
12
+ * Ready Reserve - Add Account
13
+ * POST /accounts/ready-reserve
14
+ * Add a new ready reserve account
15
+ */
16
+ export const ready_reserve_add_account = createAction({
17
+ name: 'ready_reserve_add_account',
18
+ auth: fisHorizonAuth,
19
+ displayName: 'Ready Reserve - Add Account',
20
+ description: 'Add a new ready reserve revolving line of credit account',
21
+ props: {
22
+ xAuthorization: Property.ShortText({
23
+ displayName: 'Authorization Token (JWT)',
24
+ description: 'The JWT token obtained from the Authorization - Get Token action',
25
+ required: true,
26
+ }),
27
+ sourceId: Property.ShortText({
28
+ displayName: 'Source ID',
29
+ description: 'Optional: 6 character ID provided by FIS',
30
+ required: false,
31
+ }),
32
+ // Required fields
33
+ customerId: Property.ShortText({
34
+ displayName: 'Customer ID',
35
+ description: 'Customer ID obtained from RM01 or RM06 transactions. Up to 14 characters.',
36
+ required: true,
37
+ }),
38
+ customerShortName: Property.ShortText({
39
+ displayName: 'Customer Short Name',
40
+ description: 'Customer short name obtained from RM01 transaction. Up to 20 characters.',
41
+ required: true,
42
+ }),
43
+ branchNumber: Property.Number({
44
+ displayName: 'Branch Number',
45
+ description: 'Branch number (0-999). User defined value.',
46
+ required: true,
47
+ }),
48
+ productType: Property.Number({
49
+ displayName: 'Product Type',
50
+ description: 'Account type (0-99). User defined value.',
51
+ required: true,
52
+ }),
53
+ accountNumber: Property.ShortText({
54
+ displayName: 'Account Number',
55
+ description: 'Account number. Up to 10 characters.',
56
+ required: true,
57
+ }),
58
+ accountExpireDate: Property.ShortText({
59
+ displayName: 'Account Expiration Date',
60
+ description: 'Account expiration date in MMDDYY format.',
61
+ required: true,
62
+ }),
63
+ creditLimit: Property.Number({
64
+ displayName: 'Credit Limit',
65
+ description: 'Credit limit in whole dollars (0-9999999).',
66
+ required: true,
67
+ }),
68
+ yearBaseCode: Property.StaticDropdown({
69
+ displayName: 'Year Base Code',
70
+ description: 'Year base code for interest calculation.',
71
+ required: true,
72
+ options: {
73
+ options: [
74
+ { label: '3 - 360/Actual', value: 3 },
75
+ { label: '4 - 365 or 366/Actual', value: 4 },
76
+ ],
77
+ },
78
+ }),
79
+ generalLedgerType: Property.Number({
80
+ displayName: 'General Ledger Type',
81
+ description: 'General ledger type (0-9999). User defined value.',
82
+ required: true,
83
+ }),
84
+ individualOrJoint: Property.StaticDropdown({
85
+ displayName: 'Individual or Joint',
86
+ description: 'Whether the account is individual or joint.',
87
+ required: true,
88
+ options: {
89
+ options: [
90
+ { label: 'I - Individual', value: 'I' },
91
+ { label: 'J - Joint', value: 'J' },
92
+ ],
93
+ },
94
+ }),
95
+ issueDate: Property.Number({
96
+ displayName: 'Issue Date',
97
+ description: 'Issue date in MMDDYY format (numeric).',
98
+ required: true,
99
+ }),
100
+ paymentSplitCode: Property.StaticDropdown({
101
+ displayName: 'Payment Split Code',
102
+ description: 'Payment split code.',
103
+ required: true,
104
+ options: {
105
+ options: [
106
+ { label: '1 - To Date', value: '1' },
107
+ { label: '2 - As Billed', value: '2' },
108
+ ],
109
+ },
110
+ }),
111
+ primaryOfficer: Property.ShortText({
112
+ displayName: 'Primary Officer',
113
+ description: 'Primary officer. Up to 3 characters.',
114
+ required: true,
115
+ }),
116
+ // Optional fields
117
+ equityLineCode: Property.StaticDropdown({
118
+ displayName: 'Equity Line Code',
119
+ description: 'Equity line code.',
120
+ required: false,
121
+ options: {
122
+ options: [
123
+ { label: 'Blank - Overdraft Protection', value: ' ' },
124
+ { label: 'E - Equity Line', value: 'E' },
125
+ ],
126
+ },
127
+ }),
128
+ variableRateCode: Property.Number({
129
+ displayName: 'Variable Rate Code',
130
+ description: 'Variable rate code (0-99). User defined value.',
131
+ required: false,
132
+ }),
133
+ initialRate: Property.Number({
134
+ displayName: 'Initial Rate',
135
+ description: 'Initial rate to charge. 10000 = 10.0%. Max 99999.',
136
+ required: false,
137
+ }),
138
+ initialRateExpirationDate: Property.ShortText({
139
+ displayName: 'Initial Rate Expiration Date',
140
+ description: 'Initial rate expiration date in MMDDYY format.',
141
+ required: false,
142
+ }),
143
+ specialAmountToChange: Property.Number({
144
+ displayName: 'Special Amount to Change',
145
+ description: 'Special amount to change (0-9999999.99).',
146
+ required: false,
147
+ }),
148
+ specialAmountExpirationDate: Property.ShortText({
149
+ displayName: 'Special Amount Expiration Date',
150
+ description: 'Special amount expiration date in MMDDYY format.',
151
+ required: false,
152
+ }),
153
+ fixedPaymentAmount: Property.Number({
154
+ displayName: 'Fixed Payment Amount',
155
+ description: 'Fixed payment amount (0-99999.99).',
156
+ required: false,
157
+ }),
158
+ paymentPercent: Property.Number({
159
+ displayName: 'Payment Percent',
160
+ description: 'Payment percent (0-9.9999999).',
161
+ required: false,
162
+ }),
163
+ interestRate: Property.Number({
164
+ displayName: 'Interest Rate',
165
+ description: 'Rate of interest. 10000 = 10.0%. Max 99999.',
166
+ required: false,
167
+ }),
168
+ varianceOfInterest: Property.Number({
169
+ displayName: 'Variance of Interest',
170
+ description: 'Variance of interest. Max 99999.',
171
+ required: false,
172
+ }),
173
+ eodCode: Property.StaticDropdown({
174
+ displayName: 'EOD Code',
175
+ description: 'Employee, Officer, Director or Insider code.',
176
+ required: false,
177
+ options: {
178
+ options: [
179
+ { label: 'Blank - Not Applicable', value: ' ' },
180
+ { label: 'E - Employee', value: 'E' },
181
+ { label: 'O - Officer', value: 'O' },
182
+ { label: 'D - Director', value: 'D' },
183
+ { label: 'R - Other Insider', value: 'R' },
184
+ ],
185
+ },
186
+ }),
187
+ vipCode: Property.StaticDropdown({
188
+ displayName: 'VIP Code',
189
+ description: 'VIP code.',
190
+ required: false,
191
+ options: {
192
+ options: [
193
+ { label: 'Blank - No', value: ' ' },
194
+ { label: 'V - Yes', value: 'V' },
195
+ ],
196
+ },
197
+ }),
198
+ insuranceCode: Property.StaticDropdown({
199
+ displayName: 'Insurance Code',
200
+ description: 'Insurance code.',
201
+ required: false,
202
+ options: {
203
+ options: [
204
+ { label: 'Blank - No Insurance Coverage', value: ' ' },
205
+ { label: 'I - Individual Insurance Coverage', value: 'I' },
206
+ { label: 'J - Joint Insurance Coverage', value: 'J' },
207
+ ],
208
+ },
209
+ }),
210
+ manualPaymentsOnly: Property.StaticDropdown({
211
+ displayName: 'Manual Payments Only',
212
+ description: 'Manual payments only indicator.',
213
+ required: false,
214
+ options: {
215
+ options: [
216
+ { label: 'Blank - No', value: ' ' },
217
+ { label: '* - Yes', value: '*' },
218
+ ],
219
+ },
220
+ }),
221
+ insuranceExpiration: Property.Number({
222
+ displayName: 'Insurance Expiration',
223
+ description: 'Insurance expiration date in MMYY format (numeric, 0-1299).',
224
+ required: false,
225
+ }),
226
+ overCreditLimitPercent: Property.Number({
227
+ displayName: 'Over Credit Limit Percent',
228
+ description: 'Over credit limit percent. Max 99999.',
229
+ required: false,
230
+ }),
231
+ billOverLimitAmount: Property.StaticDropdown({
232
+ displayName: 'Bill Over Limit Amount',
233
+ description: 'Bill over limit amount indicator.',
234
+ required: false,
235
+ options: {
236
+ options: [
237
+ { label: 'Blank - No', value: ' ' },
238
+ { label: 'Y - Yes', value: 'Y' },
239
+ ],
240
+ },
241
+ }),
242
+ atsTransfer: Property.StaticDropdown({
243
+ displayName: 'ATS Transfer',
244
+ description: 'Automatic Transfer Service (ATS) transfer indicator.',
245
+ required: false,
246
+ options: {
247
+ options: [
248
+ { label: 'Blank - No', value: ' ' },
249
+ { label: 'A - Yes', value: 'A' },
250
+ ],
251
+ },
252
+ }),
253
+ atsApplicationType: Property.StaticDropdown({
254
+ displayName: 'ATS Application Type',
255
+ description: 'ATS application type. Required when ATS Transfer is A.',
256
+ required: false,
257
+ options: {
258
+ options: [
259
+ { label: 'DD - Checking Account', value: 'DD' },
260
+ { label: 'SV - Savings Account', value: 'SV' },
261
+ ],
262
+ },
263
+ }),
264
+ atsAccountNumber: Property.ShortText({
265
+ displayName: 'ATS Account Number',
266
+ description: 'ATS account number. Required when ATS Transfer is A. Up to 10 characters.',
267
+ required: false,
268
+ }),
269
+ firstOrSecondMortgage: Property.StaticDropdown({
270
+ displayName: 'First or Second Mortgage',
271
+ description: 'First or second mortgage indicator.',
272
+ required: false,
273
+ options: {
274
+ options: [
275
+ { label: '1 - 1098 is generated', value: 1 },
276
+ { label: '2 - 1098 is generated', value: 2 },
277
+ { label: '3 - 1098 is not generated', value: 3 },
278
+ ],
279
+ },
280
+ }),
281
+ firstMortgageHolder: Property.ShortText({
282
+ displayName: 'First Mortgage Holder',
283
+ description: '1st mortgage holder. Up to 30 characters.',
284
+ required: false,
285
+ }),
286
+ serviceChargeAmount: Property.Number({
287
+ displayName: 'Service Charge Amount',
288
+ description: 'Service charge amount (0-9999999.99).',
289
+ required: false,
290
+ }),
291
+ serviceChargeFrequency: Property.StaticDropdown({
292
+ displayName: 'Service Charge Frequency',
293
+ description: 'Service charge frequency. Required if Service Charge Amount is not 0.',
294
+ required: false,
295
+ options: {
296
+ options: [
297
+ { label: 'M - Monthly', value: 'M' },
298
+ { label: 'Q - Quarterly', value: 'Q' },
299
+ { label: 'S - Semi-Annually', value: 'S' },
300
+ { label: 'A - Annually', value: 'A' },
301
+ ],
302
+ },
303
+ }),
304
+ serviceChargeDueDate: Property.Number({
305
+ displayName: 'Service Charge Due Date',
306
+ description: 'Service charge due date in MMDDYY format (numeric). Required if Service Charge Amount is not 0.',
307
+ required: false,
308
+ }),
309
+ ahOrClInsuranceExpiration: Property.Number({
310
+ displayName: 'AH/CL Insurance Expiration',
311
+ description: 'Accident and Health/Credit Life insurance expiration date in MMDDYY format (numeric).',
312
+ required: false,
313
+ }),
314
+ overLimitAmount: Property.Number({
315
+ displayName: 'Over Limit Amount',
316
+ description: 'Over limit amount (0-999999999.99).',
317
+ required: false,
318
+ }),
319
+ secured: Property.StaticDropdown({
320
+ displayName: 'Secured',
321
+ description: 'Secured indicator.',
322
+ required: false,
323
+ options: {
324
+ options: [
325
+ { label: 'Blank - No', value: ' ' },
326
+ { label: 'Y - Yes', value: 'Y' },
327
+ ],
328
+ },
329
+ }),
330
+ collateralCode: Property.ShortText({
331
+ displayName: 'Collateral Code',
332
+ description: 'Collateral code. User defined. Up to 3 characters.',
333
+ required: false,
334
+ }),
335
+ purposeCode: Property.ShortText({
336
+ displayName: 'Purpose Code',
337
+ description: 'Purpose code. User defined. Up to 5 characters.',
338
+ required: false,
339
+ }),
340
+ censusTrackNumber: Property.ShortText({
341
+ displayName: 'Census Track Number',
342
+ description: 'Census track number. User defined. Up to 8 characters.',
343
+ required: false,
344
+ }),
345
+ callCode: Property.ShortText({
346
+ displayName: 'Call Code',
347
+ description: 'Call code. User defined. Up to 5 characters.',
348
+ required: false,
349
+ }),
350
+ riskCode: Property.ShortText({
351
+ displayName: 'Risk Code',
352
+ description: 'Risk code. User defined. Up to 3 characters.',
353
+ required: false,
354
+ }),
355
+ smsaCode: Property.ShortText({
356
+ displayName: 'SMSA Code',
357
+ description: 'Standard Metropolitan Statistical Area code. User defined. Up to 8 characters.',
358
+ required: false,
359
+ }),
360
+ classCode: Property.ShortText({
361
+ displayName: 'Class Code',
362
+ description: 'Class code. User defined. Up to 2 characters.',
363
+ required: false,
364
+ }),
365
+ feeType: Property.Number({
366
+ displayName: 'Fee Type',
367
+ description: 'Fee type (0-99). User defined.',
368
+ required: false,
369
+ }),
370
+ minimumPaymentAmount: Property.Number({
371
+ displayName: 'Minimum Payment Amount',
372
+ description: 'Minimum payment amount (0-999.99).',
373
+ required: false,
374
+ }),
375
+ },
376
+ async run(context) {
377
+ const auth = context.auth as any;
378
+ const baseUrl = auth['baseUrl'];
379
+ const organizationId = auth['organizationId'];
380
+ const props = context.propsValue;
381
+
382
+ const uuid = crypto.randomUUID();
383
+
384
+ const headers: Record<string, string> = {
385
+ 'accept': 'application/json',
386
+ 'Content-Type': 'application/json',
387
+ 'organization-id': organizationId,
388
+ 'uuid': uuid,
389
+ 'horizon-authorization': props.xAuthorization,
390
+ };
391
+
392
+ if (props.sourceId) {
393
+ headers['source-id'] = props.sourceId;
394
+ }
395
+
396
+ // Build request body with required fields
397
+ const body: Record<string, unknown> = {
398
+ customerId: props.customerId,
399
+ customerShortName: props.customerShortName,
400
+ branchNumber: props.branchNumber,
401
+ productType: props.productType,
402
+ accountNumber: props.accountNumber,
403
+ accountExpireDate: props.accountExpireDate,
404
+ creditLimit: props.creditLimit,
405
+ yearBaseCode: props.yearBaseCode,
406
+ generalLedgerType: props.generalLedgerType,
407
+ individualOrJoint: props.individualOrJoint,
408
+ issueDate: props.issueDate,
409
+ paymentSplitCode: props.paymentSplitCode,
410
+ primaryOfficer: props.primaryOfficer,
411
+ };
412
+
413
+ // Add optional fields if provided
414
+ if (props.equityLineCode !== undefined && props.equityLineCode !== null) {
415
+ body['equityLineCode'] = props.equityLineCode;
416
+ }
417
+ if (props.variableRateCode !== undefined && props.variableRateCode !== null) {
418
+ body['variableRateCode'] = props.variableRateCode;
419
+ }
420
+ if (props.initialRate !== undefined && props.initialRate !== null) {
421
+ body['initialRate'] = props.initialRate;
422
+ }
423
+ if (props.initialRateExpirationDate) {
424
+ body['initialRateExpirationDate'] = props.initialRateExpirationDate;
425
+ }
426
+ if (props.specialAmountToChange !== undefined && props.specialAmountToChange !== null) {
427
+ body['specialAmountToChange'] = props.specialAmountToChange;
428
+ }
429
+ if (props.specialAmountExpirationDate) {
430
+ body['specialAmountExpirationDate'] = props.specialAmountExpirationDate;
431
+ }
432
+ if (props.fixedPaymentAmount !== undefined && props.fixedPaymentAmount !== null) {
433
+ body['fixedPaymentAmount'] = props.fixedPaymentAmount;
434
+ }
435
+ if (props.paymentPercent !== undefined && props.paymentPercent !== null) {
436
+ body['paymentPercent'] = props.paymentPercent;
437
+ }
438
+ if (props.interestRate !== undefined && props.interestRate !== null) {
439
+ body['interestRate'] = props.interestRate;
440
+ }
441
+ if (props.varianceOfInterest !== undefined && props.varianceOfInterest !== null) {
442
+ body['varianceOfInterest'] = props.varianceOfInterest;
443
+ }
444
+ if (props.eodCode !== undefined && props.eodCode !== null) {
445
+ body['eodCode'] = props.eodCode;
446
+ }
447
+ if (props.vipCode !== undefined && props.vipCode !== null) {
448
+ body['vipCode'] = props.vipCode;
449
+ }
450
+ if (props.insuranceCode !== undefined && props.insuranceCode !== null) {
451
+ body['insuranceCode'] = props.insuranceCode;
452
+ }
453
+ if (props.manualPaymentsOnly !== undefined && props.manualPaymentsOnly !== null) {
454
+ body['manualPaymentsOnly'] = props.manualPaymentsOnly;
455
+ }
456
+ if (props.insuranceExpiration !== undefined && props.insuranceExpiration !== null) {
457
+ body['insuranceExpiration'] = props.insuranceExpiration;
458
+ }
459
+ if (props.overCreditLimitPercent !== undefined && props.overCreditLimitPercent !== null) {
460
+ body['overCreditLimitPercent'] = props.overCreditLimitPercent;
461
+ }
462
+ if (props.billOverLimitAmount !== undefined && props.billOverLimitAmount !== null) {
463
+ body['billOverLimitAmount'] = props.billOverLimitAmount;
464
+ }
465
+ if (props.atsTransfer !== undefined && props.atsTransfer !== null) {
466
+ body['atsTransfer'] = props.atsTransfer;
467
+ }
468
+ if (props.atsApplicationType) {
469
+ body['atsApplicationType'] = props.atsApplicationType;
470
+ }
471
+ if (props.atsAccountNumber) {
472
+ body['atsAccountNumber'] = props.atsAccountNumber;
473
+ }
474
+ if (props.firstOrSecondMortgage !== undefined && props.firstOrSecondMortgage !== null) {
475
+ body['firstOrSecondMortgage'] = props.firstOrSecondMortgage;
476
+ }
477
+ if (props.firstMortgageHolder) {
478
+ body['firstMortgageHolder'] = props.firstMortgageHolder;
479
+ }
480
+ if (props.serviceChargeAmount !== undefined && props.serviceChargeAmount !== null) {
481
+ body['serviceChargeAmount'] = props.serviceChargeAmount;
482
+ }
483
+ if (props.serviceChargeFrequency) {
484
+ body['serviceChargeFrequency'] = props.serviceChargeFrequency;
485
+ }
486
+ if (props.serviceChargeDueDate !== undefined && props.serviceChargeDueDate !== null) {
487
+ body['serviceChargeDueDate'] = props.serviceChargeDueDate;
488
+ }
489
+ if (props.ahOrClInsuranceExpiration !== undefined && props.ahOrClInsuranceExpiration !== null) {
490
+ body['ahOrClInsuranceExpiration'] = props.ahOrClInsuranceExpiration;
491
+ }
492
+ if (props.overLimitAmount !== undefined && props.overLimitAmount !== null) {
493
+ body['overLimitAmount'] = props.overLimitAmount;
494
+ }
495
+ if (props.secured !== undefined && props.secured !== null) {
496
+ body['secured'] = props.secured;
497
+ }
498
+ if (props.collateralCode) {
499
+ body['collateralCode'] = props.collateralCode;
500
+ }
501
+ if (props.purposeCode) {
502
+ body['purposeCode'] = props.purposeCode;
503
+ }
504
+ if (props.censusTrackNumber) {
505
+ body['censusTrackNumber'] = props.censusTrackNumber;
506
+ }
507
+ if (props.callCode) {
508
+ body['callCode'] = props.callCode;
509
+ }
510
+ if (props.riskCode) {
511
+ body['riskCode'] = props.riskCode;
512
+ }
513
+ if (props.smsaCode) {
514
+ body['smsaCode'] = props.smsaCode;
515
+ }
516
+ if (props.classCode) {
517
+ body['classCode'] = props.classCode;
518
+ }
519
+ if (props.feeType !== undefined && props.feeType !== null) {
520
+ body['feeType'] = props.feeType;
521
+ }
522
+ if (props.minimumPaymentAmount !== undefined && props.minimumPaymentAmount !== null) {
523
+ body['minimumPaymentAmount'] = props.minimumPaymentAmount;
524
+ }
525
+
526
+ const response = await httpClient.sendRequest({
527
+ method: HttpMethod.POST,
528
+ url: `${baseUrl}${API_PATH}/accounts/ready-reserve`,
529
+ headers,
530
+ body,
531
+ });
532
+
533
+ return response.body;
534
+ },
535
+ });
536
+
537
+ /**
538
+ * Ready Reserve - Account Inquiry
539
+ * GET /accounts/{applicationCode}/{accountNumber}
540
+ * Retrieve basic information relating to a ready reserve account
541
+ */
542
+ export const ready_reserve_account_inquiry = createAction({
543
+ name: 'ready_reserve_account_inquiry',
544
+ auth: fisHorizonAuth,
545
+ displayName: 'Ready Reserve - Account Inquiry',
546
+ description: 'Retrieve basic information relating to a ready reserve account',
547
+ props: {
548
+ xAuthorization: Property.ShortText({
549
+ displayName: 'Authorization Token (JWT)',
550
+ description: 'The JWT token obtained from the Authorization - Get Token action',
551
+ required: true,
552
+ }),
553
+ sourceId: Property.ShortText({
554
+ displayName: 'Source ID',
555
+ description: 'Optional: 6 character ID provided by FIS',
556
+ required: false,
557
+ }),
558
+ applicationCode: Property.StaticDropdown({
559
+ displayName: 'Application Code',
560
+ description: 'Application code. Valid value: RR = Ready Reserve',
561
+ required: true,
562
+ options: {
563
+ options: [
564
+ { label: 'RR - Ready Reserve', value: 'RR' },
565
+ ],
566
+ },
567
+ }),
568
+ accountNumber: Property.ShortText({
569
+ displayName: 'Account Number',
570
+ description: 'Up to 20 digit zero-filled account number.',
571
+ required: true,
572
+ }),
573
+ customerId: Property.ShortText({
574
+ displayName: 'Customer ID',
575
+ description: 'Optional: Unique identifier associated with a customer. Right-justified, zero filled, up to 14 digits.',
576
+ required: false,
577
+ }),
578
+ returnUppercase: Property.StaticDropdown({
579
+ displayName: 'Return Uppercase',
580
+ description: 'Return response in uppercase.',
581
+ required: false,
582
+ options: {
583
+ options: [
584
+ { label: 'Y - Yes', value: 'Y' },
585
+ { label: 'N - No', value: 'N' },
586
+ ],
587
+ },
588
+ }),
589
+ },
590
+ async run(context) {
591
+ const auth = context.auth as any;
592
+ const baseUrl = auth['baseUrl'];
593
+ const organizationId = auth['organizationId'];
594
+ const props = context.propsValue;
595
+
596
+ const uuid = crypto.randomUUID();
597
+
598
+ const headers: Record<string, string> = {
599
+ 'accept': 'application/json',
600
+ 'organization-id': organizationId,
601
+ 'uuid': uuid,
602
+ 'horizon-authorization': props.xAuthorization,
603
+ };
604
+
605
+ if (props.sourceId) {
606
+ headers['source-id'] = props.sourceId;
607
+ }
608
+
609
+ const queryParams: Record<string, string> = {};
610
+ if (props.customerId) {
611
+ queryParams['customerId'] = props.customerId;
612
+ }
613
+ if (props.returnUppercase) {
614
+ queryParams['returnUppercase'] = props.returnUppercase;
615
+ }
616
+
617
+ const queryString = Object.keys(queryParams).length > 0
618
+ ? '?' + new URLSearchParams(queryParams).toString()
619
+ : '';
620
+
621
+ const response = await httpClient.sendRequest({
622
+ method: HttpMethod.GET,
623
+ url: `${baseUrl}${API_PATH}/accounts/${props.applicationCode}/${props.accountNumber}${queryString}`,
624
+ headers,
625
+ });
626
+
627
+ return response.body;
628
+ },
629
+ });
630
+
631
+ /**
632
+ * Ready Reserve - Transaction Inquiry
633
+ * GET /accounts/{applicationCode}/{accountNumber}/transactions
634
+ * Retrieve a list of historic transactions relating to an account
635
+ */
636
+ export const ready_reserve_transaction_inquiry = createAction({
637
+ name: 'ready_reserve_transaction_inquiry',
638
+ auth: fisHorizonAuth,
639
+ displayName: 'Ready Reserve - Transaction Inquiry',
640
+ description: 'Retrieve a list of historic transactions relating to a ready reserve account',
641
+ props: {
642
+ xAuthorization: Property.ShortText({
643
+ displayName: 'Authorization Token (JWT)',
644
+ description: 'The JWT token obtained from the Authorization - Get Token action',
645
+ required: true,
646
+ }),
647
+ sourceId: Property.ShortText({
648
+ displayName: 'Source ID',
649
+ description: 'Optional: 6 character ID provided by FIS',
650
+ required: false,
651
+ }),
652
+ applicationCode: Property.StaticDropdown({
653
+ displayName: 'Application Code',
654
+ description: 'Application code. Valid value: RR = Ready Reserve',
655
+ required: true,
656
+ options: {
657
+ options: [
658
+ { label: 'RR - Ready Reserve', value: 'RR' },
659
+ ],
660
+ },
661
+ }),
662
+ accountNumber: Property.ShortText({
663
+ displayName: 'Account Number',
664
+ description: 'Up to 20 digit zero-filled account number.',
665
+ required: true,
666
+ }),
667
+ dateSelectOption: Property.StaticDropdown({
668
+ displayName: 'Date Select Option',
669
+ description: 'Date selection option for filtering transactions.',
670
+ required: true,
671
+ options: {
672
+ options: [
673
+ { label: 'M - Return only today\'s memo posted transactions', value: 'M' },
674
+ { label: 'P - All transactions posted during last BOSS processing run', value: 'P' },
675
+ { label: 'R - User specified date range (Effective Dates)', value: 'R' },
676
+ { label: 'S - All transactions since last statement date', value: 'S' },
677
+ { label: 'T - User specified date range (Transaction Dates)', value: 'T' },
678
+ ],
679
+ },
680
+ }),
681
+ firstNext: Property.StaticDropdown({
682
+ displayName: 'First/Next',
683
+ description: 'First or next request indicator.',
684
+ required: true,
685
+ options: {
686
+ options: [
687
+ { label: 'F - First request', value: 'F' },
688
+ { label: 'N - Next request for additional transactions', value: 'N' },
689
+ ],
690
+ },
691
+ }),
692
+ numberToReturn: Property.Number({
693
+ displayName: 'Number to Return',
694
+ description: 'Number of transactions to return at a time. Max 999. A value of 999 returns as many as can fit in the buffer.',
695
+ required: true,
696
+ }),
697
+ beginDate: Property.Number({
698
+ displayName: 'Begin Date',
699
+ description: 'Begin date in CCYYMMDD format (numeric). Required when Date Select Option is R, T, or M.',
700
+ required: false,
701
+ }),
702
+ endDate: Property.Number({
703
+ displayName: 'End Date',
704
+ description: 'End date in CCYYMMDD format (numeric). Only valid when Date Select Option is R or T. Defaults to 99999999 if zero.',
705
+ required: false,
706
+ }),
707
+ returnMemoPostTransaction: Property.StaticDropdown({
708
+ displayName: 'Return Memo Post Transaction',
709
+ description: 'Return memo post transaction indicator.',
710
+ required: false,
711
+ options: {
712
+ options: [
713
+ { label: 'A - Return all of today\'s memo post transactions', value: 'A' },
714
+ { label: 'Y - Return memo post transactions excluding those not affecting available balance', value: 'Y' },
715
+ { label: 'N - Do not return memo post transactions', value: 'N' },
716
+ { label: 'Blank - Do not return memo post transactions', value: '' },
717
+ ],
718
+ },
719
+ }),
720
+ returnPackagePostItems: Property.StaticDropdown({
721
+ displayName: 'Return Package Post Items',
722
+ description: 'Return package post items indicator.',
723
+ required: false,
724
+ options: {
725
+ options: [
726
+ { label: 'A - Return all items (including PKPST)', value: 'A' },
727
+ { label: 'P - Return history items and package posted check', value: 'P' },
728
+ { label: 'Blank - Not used', value: '' },
729
+ ],
730
+ },
731
+ }),
732
+ returnScheduledExternalTransfers: Property.StaticDropdown({
733
+ displayName: 'Return Scheduled External Transfers',
734
+ description: 'Return scheduled external transfers indicator. Note: Only works for LN and ML Internal Credit Auto Transfers.',
735
+ required: false,
736
+ options: {
737
+ options: [
738
+ { label: 'Y - Return scheduled Auto Transfers', value: 'Y' },
739
+ { label: 'N - Do not return scheduled Auto Transfers', value: 'N' },
740
+ { label: 'Blank - Do not return scheduled Auto Transfers', value: '' },
741
+ ],
742
+ },
743
+ }),
744
+ sequenceOption: Property.StaticDropdown({
745
+ displayName: 'Sequence Option',
746
+ description: 'Sequence option for ordering results.',
747
+ required: false,
748
+ options: {
749
+ options: [
750
+ { label: 'A - Ascending order (default)', value: 'A' },
751
+ { label: 'D - Descending order', value: 'D' },
752
+ ],
753
+ },
754
+ }),
755
+ searchToken: Property.ShortText({
756
+ displayName: 'Search Token',
757
+ description: 'Search token for stateless middleware processing. Up to 20 characters.',
758
+ required: false,
759
+ }),
760
+ },
761
+ async run(context) {
762
+ const auth = context.auth as any;
763
+ const baseUrl = auth['baseUrl'];
764
+ const organizationId = auth['organizationId'];
765
+ const props = context.propsValue;
766
+
767
+ const uuid = crypto.randomUUID();
768
+
769
+ const headers: Record<string, string> = {
770
+ 'accept': 'application/json',
771
+ 'organization-id': organizationId,
772
+ 'uuid': uuid,
773
+ 'horizon-authorization': props.xAuthorization,
774
+ };
775
+
776
+ if (props.sourceId) {
777
+ headers['source-id'] = props.sourceId;
778
+ }
779
+
780
+ const queryParams: Record<string, string> = {
781
+ dateSelectOption: props.dateSelectOption,
782
+ firstNext: props.firstNext,
783
+ numberToReturn: String(props.numberToReturn),
784
+ };
785
+
786
+ if (props.beginDate !== undefined && props.beginDate !== null) {
787
+ queryParams['beginDate'] = String(props.beginDate);
788
+ }
789
+ if (props.endDate !== undefined && props.endDate !== null) {
790
+ queryParams['endDate'] = String(props.endDate);
791
+ }
792
+ if (props.returnMemoPostTransaction !== undefined && props.returnMemoPostTransaction !== null) {
793
+ queryParams['returnMemoPostTransaction'] = props.returnMemoPostTransaction;
794
+ }
795
+ if (props.returnPackagePostItems !== undefined && props.returnPackagePostItems !== null) {
796
+ queryParams['returnPackagePostItems'] = props.returnPackagePostItems;
797
+ }
798
+ if (props.returnScheduledExternalTransfers !== undefined && props.returnScheduledExternalTransfers !== null) {
799
+ queryParams['returnScheduledExternalTransfers'] = props.returnScheduledExternalTransfers;
800
+ }
801
+ if (props.sequenceOption) {
802
+ queryParams['sequenceOption'] = props.sequenceOption;
803
+ }
804
+ if (props.searchToken) {
805
+ queryParams['searchToken'] = props.searchToken;
806
+ }
807
+
808
+ const queryString = '?' + new URLSearchParams(queryParams).toString();
809
+
810
+ const response = await httpClient.sendRequest({
811
+ method: HttpMethod.GET,
812
+ url: `${baseUrl}${API_PATH}/accounts/${props.applicationCode}/${props.accountNumber}/transactions${queryString}`,
813
+ headers,
814
+ });
815
+
816
+ return response.body;
817
+ },
818
+ });