@vqnguyen1/piece-fis-horizon 0.0.2 → 0.0.4
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/package.json +2 -2
- package/project.json +22 -0
- package/src/index.ts +534 -0
- package/src/lib/actions/account-aggregation.ts +360 -0
- package/src/lib/actions/account-restrictions.ts +2427 -0
- package/src/lib/actions/bank-controls.ts +2328 -0
- package/src/lib/actions/card.ts +488 -0
- package/src/lib/actions/collateral.ts +696 -0
- package/src/lib/actions/customer.ts +1691 -0
- package/src/lib/actions/demand-deposit-savings.ts +731 -0
- package/src/lib/actions/get-authorization-token.ts +73 -0
- package/src/lib/actions/loans.ts +902 -0
- package/src/lib/actions/mortgage-loan.ts +1426 -0
- package/src/lib/actions/ready-reserve.ts +818 -0
- package/src/lib/actions/safe-deposit.ts +1506 -0
- package/src/lib/actions/search-customer-relationship-summary.ts +140 -0
- package/src/lib/actions/time-deposit.ts +2922 -0
- package/src/lib/actions/transactions.ts +1310 -0
- package/src/lib/actions/transfers.ts +1581 -0
- package/src/lib/actions/user-security.ts +1032 -0
- package/tsconfig.json +19 -0
- package/tsconfig.lib.json +10 -0
- package/src/index.d.ts +0 -12
- package/src/index.js +0 -62
- package/src/index.js.map +0 -1
- package/src/lib/actions/get-authorization-token.d.ts +0 -10
- package/src/lib/actions/get-authorization-token.js +0 -68
- package/src/lib/actions/get-authorization-token.js.map +0 -1
- package/src/lib/actions/search-customer-relationship-summary.d.ts +0 -15
- package/src/lib/actions/search-customer-relationship-summary.js +0 -122
- package/src/lib/actions/search-customer-relationship-summary.js.map +0 -1
|
@@ -0,0 +1,1581 @@
|
|
|
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
|
+
/**
|
|
9
|
+
* Transfers - Automatic Transfer Inquiry Details
|
|
10
|
+
* GET /accounts/{applicationCode}/{accountNumber}/transfers/{sequenceNumber}
|
|
11
|
+
* Retrieve details for a specific automatic transfer.
|
|
12
|
+
*/
|
|
13
|
+
export const transfers_automatic_transfer_inquiry_details = createAction({
|
|
14
|
+
name: 'transfers_automatic_transfer_inquiry_details',
|
|
15
|
+
auth: fisHorizonAuth,
|
|
16
|
+
displayName: 'Transfers - Automatic Transfer Inquiry Details',
|
|
17
|
+
description: 'Retrieve details for a specific automatic transfer.',
|
|
18
|
+
props: {
|
|
19
|
+
xAuthorization: Property.ShortText({
|
|
20
|
+
displayName: 'Authorization Token',
|
|
21
|
+
description: 'The authorization token obtained from the Get Token endpoint',
|
|
22
|
+
required: true,
|
|
23
|
+
}),
|
|
24
|
+
sourceId: Property.ShortText({
|
|
25
|
+
displayName: 'Source ID',
|
|
26
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
27
|
+
required: false,
|
|
28
|
+
}),
|
|
29
|
+
applicationCode: Property.StaticDropdown({
|
|
30
|
+
displayName: 'Application Code',
|
|
31
|
+
description: 'Application Code for the account',
|
|
32
|
+
required: true,
|
|
33
|
+
options: {
|
|
34
|
+
options: [
|
|
35
|
+
{ label: 'DD - Demand Deposit', value: 'DD' },
|
|
36
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
37
|
+
{ label: 'GL - General Ledger', value: 'GL' },
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
}),
|
|
41
|
+
accountNumber: Property.ShortText({
|
|
42
|
+
displayName: 'Account Number',
|
|
43
|
+
description: 'Account Number (max 17 digits, no decimals)',
|
|
44
|
+
required: true,
|
|
45
|
+
}),
|
|
46
|
+
sequenceNumber: Property.Number({
|
|
47
|
+
displayName: 'Sequence Number',
|
|
48
|
+
description: 'Sequence Number (up to 3 numeric digits, no decimal places)',
|
|
49
|
+
required: true,
|
|
50
|
+
}),
|
|
51
|
+
externalDebitCreditFlag: Property.StaticDropdown({
|
|
52
|
+
displayName: 'External Debit/Credit Flag',
|
|
53
|
+
description: 'Indicates if the transfer is external',
|
|
54
|
+
required: true,
|
|
55
|
+
options: {
|
|
56
|
+
options: [
|
|
57
|
+
{ label: 'Y - Yes', value: 'Y' },
|
|
58
|
+
{ label: 'N - No', value: 'N' },
|
|
59
|
+
{ label: 'Blank', value: '' },
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
}),
|
|
63
|
+
},
|
|
64
|
+
async run(context) {
|
|
65
|
+
const auth = context.auth as any;
|
|
66
|
+
const baseUrl = auth['baseUrl'];
|
|
67
|
+
const organizationId = auth['organizationId'];
|
|
68
|
+
const { xAuthorization, sourceId, applicationCode, accountNumber, sequenceNumber, externalDebitCreditFlag } = context.propsValue;
|
|
69
|
+
|
|
70
|
+
const uuid = crypto.randomUUID();
|
|
71
|
+
|
|
72
|
+
const headers: Record<string, string> = {
|
|
73
|
+
'accept': 'application/json',
|
|
74
|
+
'Content-Type': 'application/json',
|
|
75
|
+
'organization-id': organizationId,
|
|
76
|
+
'uuid': uuid,
|
|
77
|
+
'horizon-authorization': xAuthorization,
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
if (sourceId) {
|
|
81
|
+
headers['source-id'] = sourceId;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const queryParams: Record<string, string> = {};
|
|
85
|
+
if (externalDebitCreditFlag !== undefined) {
|
|
86
|
+
queryParams['externalDebitCreditFlag'] = String(externalDebitCreditFlag);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const queryString = Object.keys(queryParams).length > 0
|
|
90
|
+
? '?' + new URLSearchParams(queryParams).toString()
|
|
91
|
+
: '';
|
|
92
|
+
|
|
93
|
+
const response = await httpClient.sendRequest({
|
|
94
|
+
method: HttpMethod.GET,
|
|
95
|
+
url: `${baseUrl}/transfers/v1/accounts/${applicationCode}/${accountNumber}/transfers/${sequenceNumber}${queryString}`,
|
|
96
|
+
headers,
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
return response.body;
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Transfers - Automatic Transfer Inquiry List
|
|
105
|
+
* GET /accounts/{applicationCode}/{accountNumber}/transfers
|
|
106
|
+
* Retrieve a list of automatic transfers.
|
|
107
|
+
*/
|
|
108
|
+
export const transfers_automatic_transfer_inquiry_list = createAction({
|
|
109
|
+
name: 'transfers_automatic_transfer_inquiry_list',
|
|
110
|
+
auth: fisHorizonAuth,
|
|
111
|
+
displayName: 'Transfers - Automatic Transfer Inquiry List',
|
|
112
|
+
description: 'Retrieve a list of automatic transfers for an account.',
|
|
113
|
+
props: {
|
|
114
|
+
xAuthorization: Property.ShortText({
|
|
115
|
+
displayName: 'Authorization Token',
|
|
116
|
+
description: 'The authorization token obtained from the Get Token endpoint',
|
|
117
|
+
required: true,
|
|
118
|
+
}),
|
|
119
|
+
sourceId: Property.ShortText({
|
|
120
|
+
displayName: 'Source ID',
|
|
121
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
122
|
+
required: false,
|
|
123
|
+
}),
|
|
124
|
+
applicationCode: Property.StaticDropdown({
|
|
125
|
+
displayName: 'Application Code',
|
|
126
|
+
description: 'Application Code for the account',
|
|
127
|
+
required: true,
|
|
128
|
+
options: {
|
|
129
|
+
options: [
|
|
130
|
+
{ label: 'DD - Demand Deposit', value: 'DD' },
|
|
131
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
132
|
+
{ label: 'GL - General Ledger', value: 'GL' },
|
|
133
|
+
{ label: 'CD - Certificate of Deposits', value: 'CD' },
|
|
134
|
+
{ label: 'IR - Retirement Account', value: 'IR' },
|
|
135
|
+
{ label: 'LN - Loan', value: 'LN' },
|
|
136
|
+
{ label: 'RR - Ready Reserve', value: 'RR' },
|
|
137
|
+
{ label: 'ML - Mortgage Loans', value: 'ML' },
|
|
138
|
+
],
|
|
139
|
+
},
|
|
140
|
+
}),
|
|
141
|
+
accountNumber: Property.ShortText({
|
|
142
|
+
displayName: 'Account Number',
|
|
143
|
+
description: 'Account Number (max 17 digits, no decimals)',
|
|
144
|
+
required: true,
|
|
145
|
+
}),
|
|
146
|
+
sortOrder: Property.StaticDropdown({
|
|
147
|
+
displayName: 'Sort Order',
|
|
148
|
+
description: 'Sort by Debit or Credit',
|
|
149
|
+
required: true,
|
|
150
|
+
options: {
|
|
151
|
+
options: [
|
|
152
|
+
{ label: 'D - Debit', value: 'D' },
|
|
153
|
+
{ label: 'C - Credit', value: 'C' },
|
|
154
|
+
],
|
|
155
|
+
},
|
|
156
|
+
}),
|
|
157
|
+
firstNext: Property.StaticDropdown({
|
|
158
|
+
displayName: 'First/Next',
|
|
159
|
+
description: 'First or Next request for pagination',
|
|
160
|
+
required: true,
|
|
161
|
+
options: {
|
|
162
|
+
options: [
|
|
163
|
+
{ label: 'F - First request', value: 'F' },
|
|
164
|
+
{ label: 'N - Next request', value: 'N' },
|
|
165
|
+
],
|
|
166
|
+
},
|
|
167
|
+
}),
|
|
168
|
+
numberToReturn: Property.Number({
|
|
169
|
+
displayName: 'Number to Return',
|
|
170
|
+
description: 'The number of records to be returned in the response',
|
|
171
|
+
required: true,
|
|
172
|
+
}),
|
|
173
|
+
sequenceNumber: Property.Number({
|
|
174
|
+
displayName: 'Sequence Number',
|
|
175
|
+
description: 'Optional: Sequence Number for pagination (up to 3 numeric digits)',
|
|
176
|
+
required: false,
|
|
177
|
+
}),
|
|
178
|
+
},
|
|
179
|
+
async run(context) {
|
|
180
|
+
const auth = context.auth as any;
|
|
181
|
+
const baseUrl = auth['baseUrl'];
|
|
182
|
+
const organizationId = auth['organizationId'];
|
|
183
|
+
const { xAuthorization, sourceId, applicationCode, accountNumber, sortOrder, firstNext, numberToReturn, sequenceNumber } = context.propsValue;
|
|
184
|
+
|
|
185
|
+
const uuid = crypto.randomUUID();
|
|
186
|
+
|
|
187
|
+
const headers: Record<string, string> = {
|
|
188
|
+
'accept': 'application/json',
|
|
189
|
+
'Content-Type': 'application/json',
|
|
190
|
+
'organization-id': organizationId,
|
|
191
|
+
'uuid': uuid,
|
|
192
|
+
'horizon-authorization': xAuthorization,
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
if (sourceId) {
|
|
196
|
+
headers['source-id'] = sourceId;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
const queryParams: Record<string, string> = {
|
|
200
|
+
'sortOrder': sortOrder,
|
|
201
|
+
'firstNext': firstNext,
|
|
202
|
+
'numberToReturn': String(numberToReturn),
|
|
203
|
+
}
|
|
204
|
+
if (sequenceNumber !== undefined) {
|
|
205
|
+
queryParams['sequenceNumber'] = String(sequenceNumber);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
const queryString = '?' + new URLSearchParams(queryParams).toString();
|
|
209
|
+
|
|
210
|
+
const response = await httpClient.sendRequest({
|
|
211
|
+
method: HttpMethod.GET,
|
|
212
|
+
url: `${baseUrl}/transfers/v1/accounts/${applicationCode}/${accountNumber}/transfers${queryString}`,
|
|
213
|
+
headers,
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
return response.body;
|
|
217
|
+
},
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Transfers - Automatic Transfer Add
|
|
222
|
+
* POST /debit-accounts/{debitApplication}/{debitAccount}/transfers
|
|
223
|
+
* Add a new automatic transfer.
|
|
224
|
+
*/
|
|
225
|
+
export const transfers_automatic_transfer_add = createAction({
|
|
226
|
+
name: 'transfers_automatic_transfer_add',
|
|
227
|
+
auth: fisHorizonAuth,
|
|
228
|
+
displayName: 'Transfers - Automatic Transfer Add',
|
|
229
|
+
description: 'Add a new automatic transfer.',
|
|
230
|
+
props: {
|
|
231
|
+
xAuthorization: Property.ShortText({
|
|
232
|
+
displayName: 'Authorization Token',
|
|
233
|
+
description: 'The authorization token obtained from the Get Token endpoint',
|
|
234
|
+
required: true,
|
|
235
|
+
}),
|
|
236
|
+
sourceId: Property.ShortText({
|
|
237
|
+
displayName: 'Source ID',
|
|
238
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
239
|
+
required: false,
|
|
240
|
+
}),
|
|
241
|
+
debitApplication: Property.StaticDropdown({
|
|
242
|
+
displayName: 'Debit Application',
|
|
243
|
+
description: 'Debit Application Code',
|
|
244
|
+
required: true,
|
|
245
|
+
options: {
|
|
246
|
+
options: [
|
|
247
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
248
|
+
{ label: 'GL - General Ledger', value: 'GL' },
|
|
249
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
250
|
+
],
|
|
251
|
+
},
|
|
252
|
+
}),
|
|
253
|
+
debitAccount: Property.ShortText({
|
|
254
|
+
displayName: 'Debit Account Number',
|
|
255
|
+
description: 'The Debit Account Number',
|
|
256
|
+
required: true,
|
|
257
|
+
}),
|
|
258
|
+
creditApplicationCode: Property.StaticDropdown({
|
|
259
|
+
displayName: 'Credit Application Code',
|
|
260
|
+
description: 'Credit Application Code',
|
|
261
|
+
required: true,
|
|
262
|
+
options: {
|
|
263
|
+
options: [
|
|
264
|
+
{ label: 'CD - Certificate of Deposits', value: 'CD' },
|
|
265
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
266
|
+
{ label: 'GL - General Ledger', value: 'GL' },
|
|
267
|
+
{ label: 'ML - Mortgage Loan', value: 'ML' },
|
|
268
|
+
{ label: 'LN - Loan', value: 'LN' },
|
|
269
|
+
{ label: 'IR - Retirement Account', value: 'IR' },
|
|
270
|
+
{ label: 'RR - Ready Reserve', value: 'RR' },
|
|
271
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
272
|
+
],
|
|
273
|
+
},
|
|
274
|
+
}),
|
|
275
|
+
creditAccountNumber: Property.ShortText({
|
|
276
|
+
displayName: 'Credit Account Number',
|
|
277
|
+
description: 'Credit Account Number (max 17 characters)',
|
|
278
|
+
required: true,
|
|
279
|
+
}),
|
|
280
|
+
transferAmount: Property.Number({
|
|
281
|
+
displayName: 'Transfer Amount',
|
|
282
|
+
description: 'Transfer Amount (up to 11 numeric digits including two decimal places)',
|
|
283
|
+
required: false,
|
|
284
|
+
}),
|
|
285
|
+
startNextDate: Property.Number({
|
|
286
|
+
displayName: 'Start/Next Date',
|
|
287
|
+
description: 'Start/Next Transfer Date in CCYYMMDD format (e.g., 20240101)',
|
|
288
|
+
required: true,
|
|
289
|
+
}),
|
|
290
|
+
endingDate: Property.Number({
|
|
291
|
+
displayName: 'Ending Date',
|
|
292
|
+
description: 'Ending Date in CCYYMMDD format (e.g., 20251231)',
|
|
293
|
+
required: true,
|
|
294
|
+
}),
|
|
295
|
+
frequency: Property.Number({
|
|
296
|
+
displayName: 'Frequency',
|
|
297
|
+
description: 'Frequency (1-999)',
|
|
298
|
+
required: true,
|
|
299
|
+
}),
|
|
300
|
+
frequencyCode: Property.StaticDropdown({
|
|
301
|
+
displayName: 'Frequency Code',
|
|
302
|
+
description: 'Frequency Code',
|
|
303
|
+
required: true,
|
|
304
|
+
options: {
|
|
305
|
+
options: [
|
|
306
|
+
{ label: 'M - Months', value: 'M' },
|
|
307
|
+
{ label: 'D - Days', value: 'D' },
|
|
308
|
+
{ label: 'E - Month End', value: 'E' },
|
|
309
|
+
],
|
|
310
|
+
},
|
|
311
|
+
}),
|
|
312
|
+
chargeInsufficientFee: Property.StaticDropdown({
|
|
313
|
+
displayName: 'Charge Insufficient Fee',
|
|
314
|
+
description: 'Charge Insufficient Fee',
|
|
315
|
+
required: true,
|
|
316
|
+
options: {
|
|
317
|
+
options: [
|
|
318
|
+
{ label: 'Y - Yes', value: 'Y' },
|
|
319
|
+
{ label: 'N - No', value: 'N' },
|
|
320
|
+
],
|
|
321
|
+
},
|
|
322
|
+
}),
|
|
323
|
+
generalNotices: Property.StaticDropdown({
|
|
324
|
+
displayName: 'General Notices',
|
|
325
|
+
description: 'General Notices option',
|
|
326
|
+
required: true,
|
|
327
|
+
options: {
|
|
328
|
+
options: [
|
|
329
|
+
{ label: 'T - To Account', value: 'T' },
|
|
330
|
+
{ label: 'F - From Account', value: 'F' },
|
|
331
|
+
{ label: 'B - Both', value: 'B' },
|
|
332
|
+
{ label: 'I - Insufficient', value: 'I' },
|
|
333
|
+
{ label: 'N - None', value: 'N' },
|
|
334
|
+
],
|
|
335
|
+
},
|
|
336
|
+
}),
|
|
337
|
+
calculationOption: Property.StaticDropdown({
|
|
338
|
+
displayName: 'Calculation Option',
|
|
339
|
+
description: 'Calculation Option',
|
|
340
|
+
required: true,
|
|
341
|
+
options: {
|
|
342
|
+
options: [
|
|
343
|
+
{ label: 'A - Calculate using transfer amount', value: 'A' },
|
|
344
|
+
{ label: 'T - Calculate using amortization term', value: 'T' },
|
|
345
|
+
],
|
|
346
|
+
},
|
|
347
|
+
}),
|
|
348
|
+
overrideStartNextDate: Property.StaticDropdown({
|
|
349
|
+
displayName: 'Override Start/Next Date',
|
|
350
|
+
description: 'Override Start/Next Date',
|
|
351
|
+
required: false,
|
|
352
|
+
options: {
|
|
353
|
+
options: [
|
|
354
|
+
{ label: 'Y - Override', value: 'Y' },
|
|
355
|
+
{ label: 'Blank - Do Not Override', value: '' },
|
|
356
|
+
],
|
|
357
|
+
},
|
|
358
|
+
}),
|
|
359
|
+
debitTransactionCode: Property.Number({
|
|
360
|
+
displayName: 'Debit Transaction Code',
|
|
361
|
+
description: 'Debit Transaction Code (DD/SV: 57, 58, 59, 86, 91, 92, 97)',
|
|
362
|
+
required: false,
|
|
363
|
+
}),
|
|
364
|
+
debitDescription: Property.ShortText({
|
|
365
|
+
displayName: 'Debit Description',
|
|
366
|
+
description: 'Debit Description (up to 30 characters)',
|
|
367
|
+
required: false,
|
|
368
|
+
}),
|
|
369
|
+
creditTransactionCode: Property.Number({
|
|
370
|
+
displayName: 'Credit Transaction Code',
|
|
371
|
+
description: 'Credit Transaction Code (DD/SV: 22, 26, 27)',
|
|
372
|
+
required: false,
|
|
373
|
+
}),
|
|
374
|
+
creditDescription: Property.ShortText({
|
|
375
|
+
displayName: 'Credit Description',
|
|
376
|
+
description: 'Credit Description (up to 30 characters)',
|
|
377
|
+
required: false,
|
|
378
|
+
}),
|
|
379
|
+
holdTransfer: Property.StaticDropdown({
|
|
380
|
+
displayName: 'Hold Transfer',
|
|
381
|
+
description: 'Hold Transfer',
|
|
382
|
+
required: false,
|
|
383
|
+
options: {
|
|
384
|
+
options: [
|
|
385
|
+
{ label: 'Y - Yes', value: 'Y' },
|
|
386
|
+
{ label: 'N - No', value: 'N' },
|
|
387
|
+
{ label: 'O - Once', value: 'O' },
|
|
388
|
+
],
|
|
389
|
+
},
|
|
390
|
+
}),
|
|
391
|
+
transferDescription: Property.ShortText({
|
|
392
|
+
displayName: 'Transfer Description',
|
|
393
|
+
description: 'User-entered description of the transfer (up to 40 characters)',
|
|
394
|
+
required: false,
|
|
395
|
+
}),
|
|
396
|
+
externalDr: Property.StaticDropdown({
|
|
397
|
+
displayName: 'External Debit',
|
|
398
|
+
description: 'Indicates if the debit portion of the transfer is external',
|
|
399
|
+
required: false,
|
|
400
|
+
options: {
|
|
401
|
+
options: [
|
|
402
|
+
{ label: 'Y - External', value: 'Y' },
|
|
403
|
+
{ label: 'N - Internal', value: 'N' },
|
|
404
|
+
],
|
|
405
|
+
},
|
|
406
|
+
}),
|
|
407
|
+
externalCr: Property.StaticDropdown({
|
|
408
|
+
displayName: 'External Credit',
|
|
409
|
+
description: 'Indicates if the credit portion of the transfer is external',
|
|
410
|
+
required: false,
|
|
411
|
+
options: {
|
|
412
|
+
options: [
|
|
413
|
+
{ label: 'Y - External', value: 'Y' },
|
|
414
|
+
{ label: 'N - Internal', value: 'N' },
|
|
415
|
+
],
|
|
416
|
+
},
|
|
417
|
+
}),
|
|
418
|
+
additionalOptions: Property.Json({
|
|
419
|
+
displayName: 'Additional Options',
|
|
420
|
+
description: 'Additional transfer options as JSON (debitAccount, availableBalance, amortizationTransfers, loanOptions, external, etc.)',
|
|
421
|
+
required: false,
|
|
422
|
+
}),
|
|
423
|
+
},
|
|
424
|
+
async run(context) {
|
|
425
|
+
const auth = context.auth as any;
|
|
426
|
+
const baseUrl = auth['baseUrl'];
|
|
427
|
+
const organizationId = auth['organizationId'];
|
|
428
|
+
const {
|
|
429
|
+
xAuthorization, sourceId, debitApplication, debitAccount, creditApplicationCode, creditAccountNumber,
|
|
430
|
+
transferAmount, startNextDate, endingDate, frequency, frequencyCode, chargeInsufficientFee,
|
|
431
|
+
generalNotices, calculationOption, overrideStartNextDate, debitTransactionCode, debitDescription,
|
|
432
|
+
creditTransactionCode, creditDescription, holdTransfer, transferDescription, externalDr, externalCr,
|
|
433
|
+
additionalOptions
|
|
434
|
+
} = context.propsValue;
|
|
435
|
+
|
|
436
|
+
const uuid = crypto.randomUUID();
|
|
437
|
+
|
|
438
|
+
const headers: Record<string, string> = {
|
|
439
|
+
'accept': 'application/json',
|
|
440
|
+
'Content-Type': 'application/json',
|
|
441
|
+
'organization-id': organizationId,
|
|
442
|
+
'uuid': uuid,
|
|
443
|
+
'horizon-authorization': xAuthorization,
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
if (sourceId) {
|
|
447
|
+
headers['source-id'] = sourceId;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
const body: Record<string, unknown> = {
|
|
451
|
+
creditAccount: {
|
|
452
|
+
creditApplicationCode: creditApplicationCode,
|
|
453
|
+
creditAccountNumber: creditAccountNumber,
|
|
454
|
+
},
|
|
455
|
+
startNextDate: startNextDate,
|
|
456
|
+
endingDate: endingDate,
|
|
457
|
+
frequency: frequency,
|
|
458
|
+
frequencyCode: frequencyCode,
|
|
459
|
+
chargeInsufficientFee: chargeInsufficientFee,
|
|
460
|
+
generalNotices: generalNotices,
|
|
461
|
+
calculationOption: calculationOption,
|
|
462
|
+
};
|
|
463
|
+
|
|
464
|
+
if (transferAmount !== undefined) {
|
|
465
|
+
body['transferAmount'] = transferAmount;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
if (overrideStartNextDate) {
|
|
469
|
+
body['overrideStartNextDate'] = overrideStartNextDate;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
if (debitTransactionCode || debitDescription || externalDr) {
|
|
473
|
+
const debitAccountObj: Record<string, unknown> = {};
|
|
474
|
+
if (debitTransactionCode) debitAccountObj['debitTransactionCode'] = debitTransactionCode;
|
|
475
|
+
if (debitDescription) debitAccountObj['debitDescription'] = debitDescription;
|
|
476
|
+
if (externalDr) debitAccountObj['externalDr'] = externalDr;
|
|
477
|
+
body['debitAccount'] = debitAccountObj;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
if (creditTransactionCode || creditDescription || externalCr) {
|
|
481
|
+
const creditAccountObj = body['creditAccount'] as Record<string, unknown>;
|
|
482
|
+
if (creditTransactionCode) creditAccountObj['creditTransactionCode'] = creditTransactionCode;
|
|
483
|
+
if (creditDescription) creditAccountObj['creditDescription'] = creditDescription;
|
|
484
|
+
if (externalCr) creditAccountObj['externalCr'] = externalCr;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
if (holdTransfer) {
|
|
488
|
+
body['holdTransfer'] = holdTransfer;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
if (transferDescription) {
|
|
492
|
+
body['transferDescription'] = transferDescription;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
if (additionalOptions && typeof additionalOptions === 'object') {
|
|
496
|
+
Object.assign(body, additionalOptions);
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
const response = await httpClient.sendRequest({
|
|
500
|
+
method: HttpMethod.POST,
|
|
501
|
+
url: `${baseUrl}/transfers/v1/debit-accounts/${debitApplication}/${debitAccount}/transfers`,
|
|
502
|
+
headers,
|
|
503
|
+
body,
|
|
504
|
+
});
|
|
505
|
+
|
|
506
|
+
return response.body;
|
|
507
|
+
},
|
|
508
|
+
});
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* Transfers - Automatic Transfer Change
|
|
512
|
+
* PUT /debit-accounts/{debitApplication}/{debitAccount}/transfers/{sequenceNumber}
|
|
513
|
+
* Maintain an automatic transfer.
|
|
514
|
+
*/
|
|
515
|
+
export const transfers_automatic_transfer_change = createAction({
|
|
516
|
+
name: 'transfers_automatic_transfer_change',
|
|
517
|
+
auth: fisHorizonAuth,
|
|
518
|
+
displayName: 'Transfers - Automatic Transfer Change',
|
|
519
|
+
description: 'Maintain an automatic transfer.',
|
|
520
|
+
props: {
|
|
521
|
+
xAuthorization: Property.ShortText({
|
|
522
|
+
displayName: 'Authorization Token',
|
|
523
|
+
description: 'The authorization token obtained from the Get Token endpoint',
|
|
524
|
+
required: true,
|
|
525
|
+
}),
|
|
526
|
+
sourceId: Property.ShortText({
|
|
527
|
+
displayName: 'Source ID',
|
|
528
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
529
|
+
required: false,
|
|
530
|
+
}),
|
|
531
|
+
debitApplication: Property.StaticDropdown({
|
|
532
|
+
displayName: 'Debit Application',
|
|
533
|
+
description: 'Debit Application Code',
|
|
534
|
+
required: true,
|
|
535
|
+
options: {
|
|
536
|
+
options: [
|
|
537
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
538
|
+
{ label: 'GL - General Ledger', value: 'GL' },
|
|
539
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
540
|
+
],
|
|
541
|
+
},
|
|
542
|
+
}),
|
|
543
|
+
debitAccount: Property.ShortText({
|
|
544
|
+
displayName: 'Debit Account Number',
|
|
545
|
+
description: 'The Debit Account Number',
|
|
546
|
+
required: true,
|
|
547
|
+
}),
|
|
548
|
+
sequenceNumber: Property.Number({
|
|
549
|
+
displayName: 'Sequence Number',
|
|
550
|
+
description: 'Sequence Number (up to 3 numeric digits, no decimal places)',
|
|
551
|
+
required: true,
|
|
552
|
+
}),
|
|
553
|
+
originalDebitApplication: Property.StaticDropdown({
|
|
554
|
+
displayName: 'Original Debit Application',
|
|
555
|
+
description: 'Original Debit Application Code',
|
|
556
|
+
required: true,
|
|
557
|
+
options: {
|
|
558
|
+
options: [
|
|
559
|
+
{ label: 'DD - Demand Deposit', value: 'DD' },
|
|
560
|
+
{ label: 'GL - General Ledger', value: 'GL' },
|
|
561
|
+
{ label: 'LN - Loan', value: 'LN' },
|
|
562
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
563
|
+
],
|
|
564
|
+
},
|
|
565
|
+
}),
|
|
566
|
+
originalDebitAccountNumber: Property.ShortText({
|
|
567
|
+
displayName: 'Original Debit Account Number',
|
|
568
|
+
description: 'Original Debit Account Number (must not be blank)',
|
|
569
|
+
required: true,
|
|
570
|
+
}),
|
|
571
|
+
originalExternalDRFlag: Property.StaticDropdown({
|
|
572
|
+
displayName: 'Original External DR Flag',
|
|
573
|
+
description: 'Original External DR Flag (cannot change from Internal to External or vice versa)',
|
|
574
|
+
required: true,
|
|
575
|
+
options: {
|
|
576
|
+
options: [
|
|
577
|
+
{ label: 'Y - Yes', value: 'Y' },
|
|
578
|
+
{ label: 'N - No', value: 'N' },
|
|
579
|
+
],
|
|
580
|
+
},
|
|
581
|
+
}),
|
|
582
|
+
originalSequenceNumber: Property.Number({
|
|
583
|
+
displayName: 'Original Sequence Number',
|
|
584
|
+
description: 'Original Sequence Number (up to 3 numeric digits)',
|
|
585
|
+
required: true,
|
|
586
|
+
}),
|
|
587
|
+
creditApplicationCode: Property.StaticDropdown({
|
|
588
|
+
displayName: 'Credit Application Code',
|
|
589
|
+
description: 'Credit Application Code',
|
|
590
|
+
required: true,
|
|
591
|
+
options: {
|
|
592
|
+
options: [
|
|
593
|
+
{ label: 'CD - Certificate of Deposits', value: 'CD' },
|
|
594
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
595
|
+
{ label: 'GL - General Ledger', value: 'GL' },
|
|
596
|
+
{ label: 'ML - Mortgage Loan', value: 'ML' },
|
|
597
|
+
{ label: 'LN - Loan', value: 'LN' },
|
|
598
|
+
{ label: 'IR - Retirement Account', value: 'IR' },
|
|
599
|
+
{ label: 'RR - Ready Reserve', value: 'RR' },
|
|
600
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
601
|
+
],
|
|
602
|
+
},
|
|
603
|
+
}),
|
|
604
|
+
creditAccountNumber: Property.ShortText({
|
|
605
|
+
displayName: 'Credit Account Number',
|
|
606
|
+
description: 'Credit Account Number (max 17 characters)',
|
|
607
|
+
required: true,
|
|
608
|
+
}),
|
|
609
|
+
startNextDate: Property.Number({
|
|
610
|
+
displayName: 'Start/Next Date',
|
|
611
|
+
description: 'Start/Next Transfer Date in CCYYMMDD format',
|
|
612
|
+
required: true,
|
|
613
|
+
}),
|
|
614
|
+
endingDate: Property.Number({
|
|
615
|
+
displayName: 'Ending Date',
|
|
616
|
+
description: 'Ending Date in CCYYMMDD format',
|
|
617
|
+
required: true,
|
|
618
|
+
}),
|
|
619
|
+
frequency: Property.Number({
|
|
620
|
+
displayName: 'Frequency',
|
|
621
|
+
description: 'Frequency (1-999)',
|
|
622
|
+
required: true,
|
|
623
|
+
}),
|
|
624
|
+
frequencyCode: Property.StaticDropdown({
|
|
625
|
+
displayName: 'Frequency Code',
|
|
626
|
+
description: 'Frequency Code',
|
|
627
|
+
required: true,
|
|
628
|
+
options: {
|
|
629
|
+
options: [
|
|
630
|
+
{ label: 'M - Months', value: 'M' },
|
|
631
|
+
{ label: 'D - Days', value: 'D' },
|
|
632
|
+
{ label: 'E - Month End', value: 'E' },
|
|
633
|
+
],
|
|
634
|
+
},
|
|
635
|
+
}),
|
|
636
|
+
chargeInsufficientFee: Property.StaticDropdown({
|
|
637
|
+
displayName: 'Charge Insufficient Fee',
|
|
638
|
+
description: 'Charge Insufficient Fee',
|
|
639
|
+
required: true,
|
|
640
|
+
options: {
|
|
641
|
+
options: [
|
|
642
|
+
{ label: 'Y - Yes', value: 'Y' },
|
|
643
|
+
{ label: 'N - No', value: 'N' },
|
|
644
|
+
],
|
|
645
|
+
},
|
|
646
|
+
}),
|
|
647
|
+
generalNotices: Property.StaticDropdown({
|
|
648
|
+
displayName: 'General Notices',
|
|
649
|
+
description: 'General Notices option',
|
|
650
|
+
required: true,
|
|
651
|
+
options: {
|
|
652
|
+
options: [
|
|
653
|
+
{ label: 'T - To Account', value: 'T' },
|
|
654
|
+
{ label: 'F - From Account', value: 'F' },
|
|
655
|
+
{ label: 'B - Both', value: 'B' },
|
|
656
|
+
{ label: 'I - Insufficient', value: 'I' },
|
|
657
|
+
{ label: 'N - None', value: 'N' },
|
|
658
|
+
],
|
|
659
|
+
},
|
|
660
|
+
}),
|
|
661
|
+
calculationOption: Property.StaticDropdown({
|
|
662
|
+
displayName: 'Calculation Option',
|
|
663
|
+
description: 'Calculation Option',
|
|
664
|
+
required: true,
|
|
665
|
+
options: {
|
|
666
|
+
options: [
|
|
667
|
+
{ label: 'A - Calculate using transfer amount', value: 'A' },
|
|
668
|
+
{ label: 'T - Calculate using amortization term', value: 'T' },
|
|
669
|
+
],
|
|
670
|
+
},
|
|
671
|
+
}),
|
|
672
|
+
transferAmount: Property.Number({
|
|
673
|
+
displayName: 'Transfer Amount',
|
|
674
|
+
description: 'Transfer Amount',
|
|
675
|
+
required: false,
|
|
676
|
+
}),
|
|
677
|
+
additionalOptions: Property.Json({
|
|
678
|
+
displayName: 'Additional Options',
|
|
679
|
+
description: 'Additional transfer options as JSON (debitAccount, availableBalance, amortizationTransfers, loanOptions, external, etc.)',
|
|
680
|
+
required: false,
|
|
681
|
+
}),
|
|
682
|
+
},
|
|
683
|
+
async run(context) {
|
|
684
|
+
const auth = context.auth as any;
|
|
685
|
+
const baseUrl = auth['baseUrl'];
|
|
686
|
+
const organizationId = auth['organizationId'];
|
|
687
|
+
const {
|
|
688
|
+
xAuthorization, sourceId, debitApplication, debitAccount, sequenceNumber,
|
|
689
|
+
originalDebitApplication, originalDebitAccountNumber, originalExternalDRFlag, originalSequenceNumber,
|
|
690
|
+
creditApplicationCode, creditAccountNumber, startNextDate, endingDate, frequency, frequencyCode,
|
|
691
|
+
chargeInsufficientFee, generalNotices, calculationOption, transferAmount, additionalOptions
|
|
692
|
+
} = context.propsValue;
|
|
693
|
+
|
|
694
|
+
const uuid = crypto.randomUUID();
|
|
695
|
+
|
|
696
|
+
const headers: Record<string, string> = {
|
|
697
|
+
'accept': 'application/json',
|
|
698
|
+
'Content-Type': 'application/json',
|
|
699
|
+
'organization-id': organizationId,
|
|
700
|
+
'uuid': uuid,
|
|
701
|
+
'horizon-authorization': xAuthorization,
|
|
702
|
+
};
|
|
703
|
+
|
|
704
|
+
if (sourceId) {
|
|
705
|
+
headers['source-id'] = sourceId;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
const body: Record<string, unknown> = {
|
|
709
|
+
originalDebitApplication: originalDebitApplication,
|
|
710
|
+
originalDebitAccountNumber: originalDebitAccountNumber,
|
|
711
|
+
originalExternalDRFlag: originalExternalDRFlag,
|
|
712
|
+
originalSequenceNumber: originalSequenceNumber,
|
|
713
|
+
creditAccount: {
|
|
714
|
+
creditApplicationCode: creditApplicationCode,
|
|
715
|
+
creditAccountNumber: creditAccountNumber,
|
|
716
|
+
},
|
|
717
|
+
startNextDate: startNextDate,
|
|
718
|
+
endingDate: endingDate,
|
|
719
|
+
frequency: frequency,
|
|
720
|
+
frequencyCode: frequencyCode,
|
|
721
|
+
chargeInsufficientFee: chargeInsufficientFee,
|
|
722
|
+
generalNotices: generalNotices,
|
|
723
|
+
calculationOption: calculationOption,
|
|
724
|
+
};
|
|
725
|
+
|
|
726
|
+
if (transferAmount !== undefined) {
|
|
727
|
+
body['transferAmount'] = transferAmount;
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
if (additionalOptions && typeof additionalOptions === 'object') {
|
|
731
|
+
Object.assign(body, additionalOptions);
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
const response = await httpClient.sendRequest({
|
|
735
|
+
method: HttpMethod.PUT,
|
|
736
|
+
url: `${baseUrl}/transfers/v1/debit-accounts/${debitApplication}/${debitAccount}/transfers/${sequenceNumber}`,
|
|
737
|
+
headers,
|
|
738
|
+
body,
|
|
739
|
+
});
|
|
740
|
+
|
|
741
|
+
return response.body;
|
|
742
|
+
},
|
|
743
|
+
});
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* Transfers - Automatic Transfer Delete
|
|
747
|
+
* DELETE /debit-accounts/{debitApplication}/{debitAccount}/transfers/{sequenceNumber}
|
|
748
|
+
* Delete an automatic transfer.
|
|
749
|
+
*/
|
|
750
|
+
export const transfers_automatic_transfer_delete = createAction({
|
|
751
|
+
name: 'transfers_automatic_transfer_delete',
|
|
752
|
+
auth: fisHorizonAuth,
|
|
753
|
+
displayName: 'Transfers - Automatic Transfer Delete',
|
|
754
|
+
description: 'Delete an automatic transfer.',
|
|
755
|
+
props: {
|
|
756
|
+
xAuthorization: Property.ShortText({
|
|
757
|
+
displayName: 'Authorization Token',
|
|
758
|
+
description: 'The authorization token obtained from the Get Token endpoint',
|
|
759
|
+
required: true,
|
|
760
|
+
}),
|
|
761
|
+
sourceId: Property.ShortText({
|
|
762
|
+
displayName: 'Source ID',
|
|
763
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
764
|
+
required: false,
|
|
765
|
+
}),
|
|
766
|
+
debitApplication: Property.StaticDropdown({
|
|
767
|
+
displayName: 'Debit Application',
|
|
768
|
+
description: 'Debit Application Code',
|
|
769
|
+
required: true,
|
|
770
|
+
options: {
|
|
771
|
+
options: [
|
|
772
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
773
|
+
{ label: 'GL - General Ledger', value: 'GL' },
|
|
774
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
775
|
+
],
|
|
776
|
+
},
|
|
777
|
+
}),
|
|
778
|
+
debitAccount: Property.ShortText({
|
|
779
|
+
displayName: 'Debit Account Number',
|
|
780
|
+
description: 'The Debit Account Number',
|
|
781
|
+
required: true,
|
|
782
|
+
}),
|
|
783
|
+
sequenceNumber: Property.Number({
|
|
784
|
+
displayName: 'Sequence Number',
|
|
785
|
+
description: 'Sequence Number (up to 3 numeric digits, no decimal places)',
|
|
786
|
+
required: true,
|
|
787
|
+
}),
|
|
788
|
+
},
|
|
789
|
+
async run(context) {
|
|
790
|
+
const auth = context.auth as any;
|
|
791
|
+
const baseUrl = auth['baseUrl'];
|
|
792
|
+
const organizationId = auth['organizationId'];
|
|
793
|
+
const { xAuthorization, sourceId, debitApplication, debitAccount, sequenceNumber } = context.propsValue;
|
|
794
|
+
|
|
795
|
+
const uuid = crypto.randomUUID();
|
|
796
|
+
|
|
797
|
+
const headers: Record<string, string> = {
|
|
798
|
+
'accept': 'application/json',
|
|
799
|
+
'Content-Type': 'application/json',
|
|
800
|
+
'organization-id': organizationId,
|
|
801
|
+
'uuid': uuid,
|
|
802
|
+
'horizon-authorization': xAuthorization,
|
|
803
|
+
};
|
|
804
|
+
|
|
805
|
+
if (sourceId) {
|
|
806
|
+
headers['source-id'] = sourceId;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
const response = await httpClient.sendRequest({
|
|
810
|
+
method: HttpMethod.DELETE,
|
|
811
|
+
url: `${baseUrl}/transfers/v1/debit-accounts/${debitApplication}/${debitAccount}/transfers/${sequenceNumber}`,
|
|
812
|
+
headers,
|
|
813
|
+
});
|
|
814
|
+
|
|
815
|
+
return response.body;
|
|
816
|
+
},
|
|
817
|
+
});
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* Transfers - Dynamic Transfer Inquiry
|
|
821
|
+
* GET /dynamic-transfers/{primaryApplication}/{primaryAccount}
|
|
822
|
+
* Retrieve the details of a dynamic transfer for a given account.
|
|
823
|
+
*/
|
|
824
|
+
export const transfers_dynamic_transfer_inquiry = createAction({
|
|
825
|
+
name: 'transfers_dynamic_transfer_inquiry',
|
|
826
|
+
auth: fisHorizonAuth,
|
|
827
|
+
displayName: 'Transfers - Dynamic Transfer Inquiry',
|
|
828
|
+
description: 'Retrieve the details of a dynamic transfer for a given account.',
|
|
829
|
+
props: {
|
|
830
|
+
xAuthorization: Property.ShortText({
|
|
831
|
+
displayName: 'Authorization Token',
|
|
832
|
+
description: 'The authorization token obtained from the Get Token endpoint',
|
|
833
|
+
required: true,
|
|
834
|
+
}),
|
|
835
|
+
sourceId: Property.ShortText({
|
|
836
|
+
displayName: 'Source ID',
|
|
837
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
838
|
+
required: false,
|
|
839
|
+
}),
|
|
840
|
+
primaryApplication: Property.StaticDropdown({
|
|
841
|
+
displayName: 'Primary Application',
|
|
842
|
+
description: 'The Primary Account Application',
|
|
843
|
+
required: true,
|
|
844
|
+
options: {
|
|
845
|
+
options: [
|
|
846
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
847
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
848
|
+
],
|
|
849
|
+
},
|
|
850
|
+
}),
|
|
851
|
+
primaryAccount: Property.ShortText({
|
|
852
|
+
displayName: 'Primary Account',
|
|
853
|
+
description: 'The Primary Account Number (right justified, zero filled, max 20 chars)',
|
|
854
|
+
required: true,
|
|
855
|
+
}),
|
|
856
|
+
transferLevel: Property.ShortText({
|
|
857
|
+
displayName: 'Transfer Level',
|
|
858
|
+
description: 'The Processing Level within the Transfer Group (3 characters, e.g., 001)',
|
|
859
|
+
required: true,
|
|
860
|
+
}),
|
|
861
|
+
},
|
|
862
|
+
async run(context) {
|
|
863
|
+
const auth = context.auth as any;
|
|
864
|
+
const baseUrl = auth['baseUrl'];
|
|
865
|
+
const organizationId = auth['organizationId'];
|
|
866
|
+
const { xAuthorization, sourceId, primaryApplication, primaryAccount, transferLevel } = context.propsValue;
|
|
867
|
+
|
|
868
|
+
const uuid = crypto.randomUUID();
|
|
869
|
+
|
|
870
|
+
const headers: Record<string, string> = {
|
|
871
|
+
'accept': 'application/json',
|
|
872
|
+
'Content-Type': 'application/json',
|
|
873
|
+
'organization-id': organizationId,
|
|
874
|
+
'uuid': uuid,
|
|
875
|
+
'horizon-authorization': xAuthorization,
|
|
876
|
+
};
|
|
877
|
+
|
|
878
|
+
if (sourceId) {
|
|
879
|
+
headers['source-id'] = sourceId;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
const queryParams: Record<string, string> = {
|
|
883
|
+
'transferLevel': transferLevel,
|
|
884
|
+
};
|
|
885
|
+
const queryString = '?' + new URLSearchParams(queryParams).toString();
|
|
886
|
+
|
|
887
|
+
const response = await httpClient.sendRequest({
|
|
888
|
+
method: HttpMethod.GET,
|
|
889
|
+
url: `${baseUrl}/transfers/v1/dynamic-transfers/${primaryApplication}/${primaryAccount}${queryString}`,
|
|
890
|
+
headers,
|
|
891
|
+
});
|
|
892
|
+
|
|
893
|
+
return response.body;
|
|
894
|
+
},
|
|
895
|
+
});
|
|
896
|
+
|
|
897
|
+
/**
|
|
898
|
+
* Transfers - Dynamic Transfer Add
|
|
899
|
+
* POST /dynamic-transfers/{primaryApplication}/{primaryAccount}
|
|
900
|
+
* Add a new dynamic transfer relationship between given accounts.
|
|
901
|
+
*/
|
|
902
|
+
export const transfers_dynamic_transfer_add = createAction({
|
|
903
|
+
name: 'transfers_dynamic_transfer_add',
|
|
904
|
+
auth: fisHorizonAuth,
|
|
905
|
+
displayName: 'Transfers - Dynamic Transfer Add',
|
|
906
|
+
description: 'Add a new dynamic transfer relationship between given accounts.',
|
|
907
|
+
props: {
|
|
908
|
+
xAuthorization: Property.ShortText({
|
|
909
|
+
displayName: 'Authorization Token',
|
|
910
|
+
description: 'The authorization token obtained from the Get Token endpoint',
|
|
911
|
+
required: true,
|
|
912
|
+
}),
|
|
913
|
+
sourceId: Property.ShortText({
|
|
914
|
+
displayName: 'Source ID',
|
|
915
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
916
|
+
required: false,
|
|
917
|
+
}),
|
|
918
|
+
primaryApplication: Property.StaticDropdown({
|
|
919
|
+
displayName: 'Primary Application',
|
|
920
|
+
description: 'The Primary Account Application',
|
|
921
|
+
required: true,
|
|
922
|
+
options: {
|
|
923
|
+
options: [
|
|
924
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
925
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
926
|
+
],
|
|
927
|
+
},
|
|
928
|
+
}),
|
|
929
|
+
primaryAccount: Property.ShortText({
|
|
930
|
+
displayName: 'Primary Account',
|
|
931
|
+
description: 'The Primary Account Number (right justified, zero filled, max 20 chars)',
|
|
932
|
+
required: true,
|
|
933
|
+
}),
|
|
934
|
+
modeCode: Property.StaticDropdown({
|
|
935
|
+
displayName: 'Mode Code',
|
|
936
|
+
description: 'Indicates the type of operation',
|
|
937
|
+
required: true,
|
|
938
|
+
options: {
|
|
939
|
+
options: [
|
|
940
|
+
{ label: '1 - Add additional MM, EB, or AL Secondary Accounts', value: '1' },
|
|
941
|
+
{ label: '2 - Create a new MM and/or EB Transfer Relationship', value: '2' },
|
|
942
|
+
{ label: '3 - Create a New AL Transfer Relationship', value: '3' },
|
|
943
|
+
],
|
|
944
|
+
},
|
|
945
|
+
}),
|
|
946
|
+
transferLevel: Property.ShortText({
|
|
947
|
+
displayName: 'Transfer Level',
|
|
948
|
+
description: 'The Processing Level within the Transfer Group (3 characters, e.g., 000). Mode 2 & 3: Must be Zero',
|
|
949
|
+
required: true,
|
|
950
|
+
defaultValue: '000',
|
|
951
|
+
}),
|
|
952
|
+
noticeOption: Property.StaticDropdown({
|
|
953
|
+
displayName: 'Notice Option',
|
|
954
|
+
description: 'Determines how to print Dynamic Transfer notices',
|
|
955
|
+
required: false,
|
|
956
|
+
options: {
|
|
957
|
+
options: [
|
|
958
|
+
{ label: 'A - Primary and Secondary', value: 'A' },
|
|
959
|
+
{ label: 'N - None', value: 'N' },
|
|
960
|
+
{ label: 'P - Primary Only', value: 'P' },
|
|
961
|
+
{ label: 'S - Secondary Only', value: 'S' },
|
|
962
|
+
],
|
|
963
|
+
},
|
|
964
|
+
}),
|
|
965
|
+
manualControlOrder: Property.StaticDropdown({
|
|
966
|
+
displayName: 'Manual Control Order',
|
|
967
|
+
description: 'Allows the bank to assume control of transfer processing order',
|
|
968
|
+
required: false,
|
|
969
|
+
options: {
|
|
970
|
+
options: [
|
|
971
|
+
{ label: 'N - Let system determine and assign levels', value: 'N' },
|
|
972
|
+
{ label: 'Y - Force all levels to Level 0', value: 'Y' },
|
|
973
|
+
],
|
|
974
|
+
},
|
|
975
|
+
}),
|
|
976
|
+
overrideWarnings: Property.StaticDropdown({
|
|
977
|
+
displayName: 'Override Warnings',
|
|
978
|
+
description: 'Override warning messages',
|
|
979
|
+
required: false,
|
|
980
|
+
options: {
|
|
981
|
+
options: [
|
|
982
|
+
{ label: '0 - No', value: 0 },
|
|
983
|
+
{ label: '1 - Yes', value: 1 },
|
|
984
|
+
],
|
|
985
|
+
},
|
|
986
|
+
}),
|
|
987
|
+
transferGroup: Property.ShortText({
|
|
988
|
+
displayName: 'Transfer Group',
|
|
989
|
+
description: 'Transfer Group description (leave blank for system to assign)',
|
|
990
|
+
required: false,
|
|
991
|
+
}),
|
|
992
|
+
expirationDate: Property.ShortText({
|
|
993
|
+
displayName: 'Expiration Date',
|
|
994
|
+
description: 'Expiration Date in CCYYMMDD format (e.g., 20501231)',
|
|
995
|
+
required: false,
|
|
996
|
+
}),
|
|
997
|
+
primaryProcessingSequence: Property.ShortText({
|
|
998
|
+
displayName: 'Primary Processing Sequence',
|
|
999
|
+
description: 'Primary Processing Sequence (5 chars, right justified, zero filled)',
|
|
1000
|
+
required: false,
|
|
1001
|
+
}),
|
|
1002
|
+
numberOfMaintainMinimumAccounts: Property.Number({
|
|
1003
|
+
displayName: 'Number of Maintain Minimum Accounts',
|
|
1004
|
+
description: 'Number of Maintain Minimum Secondary accounts (0-99)',
|
|
1005
|
+
required: false,
|
|
1006
|
+
}),
|
|
1007
|
+
numberOfExcessBalanceAtLastAccounts: Property.Number({
|
|
1008
|
+
displayName: 'Number of Excess Balance/At-Last Accounts',
|
|
1009
|
+
description: 'Number of Excess Balance/At-Last Secondary accounts (0-99)',
|
|
1010
|
+
required: false,
|
|
1011
|
+
}),
|
|
1012
|
+
maintainMinimum: Property.Json({
|
|
1013
|
+
displayName: 'Maintain Minimum Control',
|
|
1014
|
+
description: 'Maintain Minimum Control settings as JSON (balanceThreshold, primaryBalanceCalculatedOption, incrementExceptionOption, thresholdExceptionOption, primaryServiceOption)',
|
|
1015
|
+
required: false,
|
|
1016
|
+
}),
|
|
1017
|
+
excessBalanceAtLast: Property.Json({
|
|
1018
|
+
displayName: 'Excess Balance/At-Last Control',
|
|
1019
|
+
description: 'Excess Balance/At-Last Control settings as JSON (triggerThreshold, targetBalance, primaryBalanceCalculatedOption, primaryServiceOption)',
|
|
1020
|
+
required: false,
|
|
1021
|
+
}),
|
|
1022
|
+
maintainMinimumDetail: Property.Json({
|
|
1023
|
+
displayName: 'Maintain Minimum Detail',
|
|
1024
|
+
description: 'Array of Maintain Minimum Secondary account details',
|
|
1025
|
+
required: false,
|
|
1026
|
+
}),
|
|
1027
|
+
excessBalanceAtLastDetail: Property.Json({
|
|
1028
|
+
displayName: 'Excess Balance/At-Last Detail',
|
|
1029
|
+
description: 'Array of Excess Balance/At-Last Secondary account details',
|
|
1030
|
+
required: false,
|
|
1031
|
+
}),
|
|
1032
|
+
},
|
|
1033
|
+
async run(context) {
|
|
1034
|
+
const auth = context.auth as any;
|
|
1035
|
+
const baseUrl = auth['baseUrl'];
|
|
1036
|
+
const organizationId = auth['organizationId'];
|
|
1037
|
+
const {
|
|
1038
|
+
xAuthorization, sourceId, primaryApplication, primaryAccount, modeCode, transferLevel,
|
|
1039
|
+
noticeOption, manualControlOrder, overrideWarnings, transferGroup, expirationDate,
|
|
1040
|
+
primaryProcessingSequence, numberOfMaintainMinimumAccounts, numberOfExcessBalanceAtLastAccounts,
|
|
1041
|
+
maintainMinimum, excessBalanceAtLast, maintainMinimumDetail, excessBalanceAtLastDetail
|
|
1042
|
+
} = context.propsValue;
|
|
1043
|
+
|
|
1044
|
+
const uuid = crypto.randomUUID();
|
|
1045
|
+
|
|
1046
|
+
const headers: Record<string, string> = {
|
|
1047
|
+
'accept': 'application/json',
|
|
1048
|
+
'Content-Type': 'application/json',
|
|
1049
|
+
'organization-id': organizationId,
|
|
1050
|
+
'uuid': uuid,
|
|
1051
|
+
'horizon-authorization': xAuthorization,
|
|
1052
|
+
};
|
|
1053
|
+
|
|
1054
|
+
if (sourceId) {
|
|
1055
|
+
headers['source-id'] = sourceId;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
const body: Record<string, unknown> = {
|
|
1059
|
+
modeCode: modeCode,
|
|
1060
|
+
transferLevel: transferLevel,
|
|
1061
|
+
};
|
|
1062
|
+
if (noticeOption) body['noticeOption'] = noticeOption;
|
|
1063
|
+
if (manualControlOrder) body['manualControlOrder'] = manualControlOrder;
|
|
1064
|
+
if (overrideWarnings !== undefined) body['overrideWarnings'] = overrideWarnings;
|
|
1065
|
+
if (transferGroup) body['transferGroup'] = transferGroup;
|
|
1066
|
+
if (expirationDate) body['expirationDate'] = expirationDate;
|
|
1067
|
+
if (primaryProcessingSequence) body['primaryProcessingSequence'] = primaryProcessingSequence;
|
|
1068
|
+
if (numberOfMaintainMinimumAccounts !== undefined) body['numberOfMaintainMinimumAccounts'] = numberOfMaintainMinimumAccounts;
|
|
1069
|
+
if (numberOfExcessBalanceAtLastAccounts !== undefined) body['numberOfExcessBalanceAtLastAccounts'] = numberOfExcessBalanceAtLastAccounts;
|
|
1070
|
+
if (maintainMinimum) body['maintainMinimum'] = maintainMinimum;
|
|
1071
|
+
if (excessBalanceAtLast) body['excessBalanceAtLast'] = excessBalanceAtLast;
|
|
1072
|
+
if (maintainMinimumDetail) body['maintainMinimumDetail'] = maintainMinimumDetail;
|
|
1073
|
+
if (excessBalanceAtLastDetail) body['excessBalanceAtLastDetail'] = excessBalanceAtLastDetail;
|
|
1074
|
+
|
|
1075
|
+
const response = await httpClient.sendRequest({
|
|
1076
|
+
method: HttpMethod.POST,
|
|
1077
|
+
url: `${baseUrl}/transfers/v1/dynamic-transfers/${primaryApplication}/${primaryAccount}`,
|
|
1078
|
+
headers,
|
|
1079
|
+
body,
|
|
1080
|
+
});
|
|
1081
|
+
|
|
1082
|
+
return response.body;
|
|
1083
|
+
},
|
|
1084
|
+
});
|
|
1085
|
+
|
|
1086
|
+
/**
|
|
1087
|
+
* Transfers - Dynamic Transfer Change
|
|
1088
|
+
* PUT /dynamic-transfers/{primaryApplication}/{primaryAccount}
|
|
1089
|
+
* Maintain a dynamic transfer relationship between given accounts.
|
|
1090
|
+
*/
|
|
1091
|
+
export const transfers_dynamic_transfer_change = createAction({
|
|
1092
|
+
name: 'transfers_dynamic_transfer_change',
|
|
1093
|
+
auth: fisHorizonAuth,
|
|
1094
|
+
displayName: 'Transfers - Dynamic Transfer Change',
|
|
1095
|
+
description: 'Maintain a dynamic transfer relationship between given accounts.',
|
|
1096
|
+
props: {
|
|
1097
|
+
xAuthorization: Property.ShortText({
|
|
1098
|
+
displayName: 'Authorization Token',
|
|
1099
|
+
description: 'The authorization token obtained from the Get Token endpoint',
|
|
1100
|
+
required: true,
|
|
1101
|
+
}),
|
|
1102
|
+
sourceId: Property.ShortText({
|
|
1103
|
+
displayName: 'Source ID',
|
|
1104
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
1105
|
+
required: false,
|
|
1106
|
+
}),
|
|
1107
|
+
primaryApplication: Property.StaticDropdown({
|
|
1108
|
+
displayName: 'Primary Application',
|
|
1109
|
+
description: 'The Primary Account Application',
|
|
1110
|
+
required: true,
|
|
1111
|
+
options: {
|
|
1112
|
+
options: [
|
|
1113
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
1114
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
1115
|
+
],
|
|
1116
|
+
},
|
|
1117
|
+
}),
|
|
1118
|
+
primaryAccount: Property.ShortText({
|
|
1119
|
+
displayName: 'Primary Account',
|
|
1120
|
+
description: 'The Primary Account Number (right justified, zero filled, max 20 chars)',
|
|
1121
|
+
required: true,
|
|
1122
|
+
}),
|
|
1123
|
+
transferLevel: Property.ShortText({
|
|
1124
|
+
displayName: 'Transfer Level',
|
|
1125
|
+
description: 'The Processing Level within the Transfer Group (3 characters)',
|
|
1126
|
+
required: true,
|
|
1127
|
+
}),
|
|
1128
|
+
noticeOption: Property.StaticDropdown({
|
|
1129
|
+
displayName: 'Notice Option',
|
|
1130
|
+
description: 'Determines how to print Dynamic Transfer notices',
|
|
1131
|
+
required: false,
|
|
1132
|
+
options: {
|
|
1133
|
+
options: [
|
|
1134
|
+
{ label: 'A - Primary and Secondary', value: 'A' },
|
|
1135
|
+
{ label: 'N - None', value: 'N' },
|
|
1136
|
+
{ label: 'P - Primary Only', value: 'P' },
|
|
1137
|
+
{ label: 'S - Secondary Only', value: 'S' },
|
|
1138
|
+
],
|
|
1139
|
+
},
|
|
1140
|
+
}),
|
|
1141
|
+
manualControlOrder: Property.StaticDropdown({
|
|
1142
|
+
displayName: 'Manual Control Order',
|
|
1143
|
+
description: 'Allows the bank to assume control of transfer processing order',
|
|
1144
|
+
required: false,
|
|
1145
|
+
options: {
|
|
1146
|
+
options: [
|
|
1147
|
+
{ label: 'N - Let system determine and assign levels', value: 'N' },
|
|
1148
|
+
{ label: 'Y - Force all levels to Level 0', value: 'Y' },
|
|
1149
|
+
],
|
|
1150
|
+
},
|
|
1151
|
+
}),
|
|
1152
|
+
overrideWarnings: Property.StaticDropdown({
|
|
1153
|
+
displayName: 'Override Warnings',
|
|
1154
|
+
description: 'Override warning messages',
|
|
1155
|
+
required: false,
|
|
1156
|
+
options: {
|
|
1157
|
+
options: [
|
|
1158
|
+
{ label: '0 - No', value: 0 },
|
|
1159
|
+
{ label: '1 - Yes', value: 1 },
|
|
1160
|
+
],
|
|
1161
|
+
},
|
|
1162
|
+
}),
|
|
1163
|
+
transferGroup: Property.ShortText({
|
|
1164
|
+
displayName: 'Transfer Group',
|
|
1165
|
+
description: 'Transfer Group description',
|
|
1166
|
+
required: false,
|
|
1167
|
+
}),
|
|
1168
|
+
expirationDate: Property.ShortText({
|
|
1169
|
+
displayName: 'Expiration Date',
|
|
1170
|
+
description: 'Expiration Date in CCYYMMDD format',
|
|
1171
|
+
required: false,
|
|
1172
|
+
}),
|
|
1173
|
+
primaryProcessingSequence: Property.ShortText({
|
|
1174
|
+
displayName: 'Primary Processing Sequence',
|
|
1175
|
+
description: 'Primary Processing Sequence (5 chars, right justified, zero filled)',
|
|
1176
|
+
required: false,
|
|
1177
|
+
}),
|
|
1178
|
+
numberOfMaintainMinimumAccounts: Property.Number({
|
|
1179
|
+
displayName: 'Number of Maintain Minimum Accounts',
|
|
1180
|
+
description: 'Number of Maintain Minimum Secondary accounts (0-99)',
|
|
1181
|
+
required: false,
|
|
1182
|
+
}),
|
|
1183
|
+
numberOfExcessBalanceAtLastAccounts: Property.Number({
|
|
1184
|
+
displayName: 'Number of Excess Balance/At-Last Accounts',
|
|
1185
|
+
description: 'Number of Excess Balance/At-Last Secondary accounts (0-99)',
|
|
1186
|
+
required: false,
|
|
1187
|
+
}),
|
|
1188
|
+
maintainMinimum: Property.Json({
|
|
1189
|
+
displayName: 'Maintain Minimum Control',
|
|
1190
|
+
description: 'Maintain Minimum Control settings as JSON',
|
|
1191
|
+
required: false,
|
|
1192
|
+
}),
|
|
1193
|
+
excessBalanceAtLast: Property.Json({
|
|
1194
|
+
displayName: 'Excess Balance/At-Last Control',
|
|
1195
|
+
description: 'Excess Balance/At-Last Control settings as JSON',
|
|
1196
|
+
required: false,
|
|
1197
|
+
}),
|
|
1198
|
+
maintainMinimumDetail: Property.Json({
|
|
1199
|
+
displayName: 'Maintain Minimum Detail',
|
|
1200
|
+
description: 'Array of Maintain Minimum Secondary account details',
|
|
1201
|
+
required: false,
|
|
1202
|
+
}),
|
|
1203
|
+
excessBalanceAtLastDetail: Property.Json({
|
|
1204
|
+
displayName: 'Excess Balance/At-Last Detail',
|
|
1205
|
+
description: 'Array of Excess Balance/At-Last Secondary account details',
|
|
1206
|
+
required: false,
|
|
1207
|
+
}),
|
|
1208
|
+
},
|
|
1209
|
+
async run(context) {
|
|
1210
|
+
const auth = context.auth as any;
|
|
1211
|
+
const baseUrl = auth['baseUrl'];
|
|
1212
|
+
const organizationId = auth['organizationId'];
|
|
1213
|
+
const {
|
|
1214
|
+
xAuthorization, sourceId, primaryApplication, primaryAccount, transferLevel,
|
|
1215
|
+
noticeOption, manualControlOrder, overrideWarnings, transferGroup, expirationDate,
|
|
1216
|
+
primaryProcessingSequence, numberOfMaintainMinimumAccounts, numberOfExcessBalanceAtLastAccounts,
|
|
1217
|
+
maintainMinimum, excessBalanceAtLast, maintainMinimumDetail, excessBalanceAtLastDetail
|
|
1218
|
+
} = context.propsValue;
|
|
1219
|
+
|
|
1220
|
+
const uuid = crypto.randomUUID();
|
|
1221
|
+
|
|
1222
|
+
const headers: Record<string, string> = {
|
|
1223
|
+
'accept': 'application/json',
|
|
1224
|
+
'Content-Type': 'application/json',
|
|
1225
|
+
'organization-id': organizationId,
|
|
1226
|
+
'uuid': uuid,
|
|
1227
|
+
'horizon-authorization': xAuthorization,
|
|
1228
|
+
};
|
|
1229
|
+
|
|
1230
|
+
if (sourceId) {
|
|
1231
|
+
headers['source-id'] = sourceId;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
const body: Record<string, unknown> = {
|
|
1235
|
+
transferLevel: transferLevel,
|
|
1236
|
+
};
|
|
1237
|
+
if (noticeOption) body['noticeOption'] = noticeOption;
|
|
1238
|
+
if (manualControlOrder) body['manualControlOrder'] = manualControlOrder;
|
|
1239
|
+
if (overrideWarnings !== undefined) body['overrideWarnings'] = overrideWarnings;
|
|
1240
|
+
if (transferGroup) body['transferGroup'] = transferGroup;
|
|
1241
|
+
if (expirationDate) body['expirationDate'] = expirationDate;
|
|
1242
|
+
if (primaryProcessingSequence) body['primaryProcessingSequence'] = primaryProcessingSequence;
|
|
1243
|
+
if (numberOfMaintainMinimumAccounts !== undefined) body['numberOfMaintainMinimumAccounts'] = numberOfMaintainMinimumAccounts;
|
|
1244
|
+
if (numberOfExcessBalanceAtLastAccounts !== undefined) body['numberOfExcessBalanceAtLastAccounts'] = numberOfExcessBalanceAtLastAccounts;
|
|
1245
|
+
if (maintainMinimum) body['maintainMinimum'] = maintainMinimum;
|
|
1246
|
+
if (excessBalanceAtLast) body['excessBalanceAtLast'] = excessBalanceAtLast;
|
|
1247
|
+
if (maintainMinimumDetail) body['maintainMinimumDetail'] = maintainMinimumDetail;
|
|
1248
|
+
if (excessBalanceAtLastDetail) body['excessBalanceAtLastDetail'] = excessBalanceAtLastDetail;
|
|
1249
|
+
|
|
1250
|
+
const response = await httpClient.sendRequest({
|
|
1251
|
+
method: HttpMethod.PUT,
|
|
1252
|
+
url: `${baseUrl}/transfers/v1/dynamic-transfers/${primaryApplication}/${primaryAccount}`,
|
|
1253
|
+
headers,
|
|
1254
|
+
body,
|
|
1255
|
+
});
|
|
1256
|
+
|
|
1257
|
+
return response.body;
|
|
1258
|
+
},
|
|
1259
|
+
});
|
|
1260
|
+
|
|
1261
|
+
/**
|
|
1262
|
+
* Transfers - Dynamic Transfer Delete
|
|
1263
|
+
* DELETE /dynamic-transfers/{primaryApplication}/{primaryAccount}
|
|
1264
|
+
* Delete a dynamic transfer relationship between given accounts.
|
|
1265
|
+
*/
|
|
1266
|
+
export const transfers_dynamic_transfer_delete = createAction({
|
|
1267
|
+
name: 'transfers_dynamic_transfer_delete',
|
|
1268
|
+
auth: fisHorizonAuth,
|
|
1269
|
+
displayName: 'Transfers - Dynamic Transfer Delete',
|
|
1270
|
+
description: 'Delete a dynamic transfer relationship between given accounts.',
|
|
1271
|
+
props: {
|
|
1272
|
+
xAuthorization: Property.ShortText({
|
|
1273
|
+
displayName: 'Authorization Token',
|
|
1274
|
+
description: 'The authorization token obtained from the Get Token endpoint',
|
|
1275
|
+
required: true,
|
|
1276
|
+
}),
|
|
1277
|
+
sourceId: Property.ShortText({
|
|
1278
|
+
displayName: 'Source ID',
|
|
1279
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
1280
|
+
required: false,
|
|
1281
|
+
}),
|
|
1282
|
+
primaryApplication: Property.StaticDropdown({
|
|
1283
|
+
displayName: 'Primary Application',
|
|
1284
|
+
description: 'The Primary Account Application',
|
|
1285
|
+
required: true,
|
|
1286
|
+
options: {
|
|
1287
|
+
options: [
|
|
1288
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
1289
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
1290
|
+
],
|
|
1291
|
+
},
|
|
1292
|
+
}),
|
|
1293
|
+
primaryAccount: Property.ShortText({
|
|
1294
|
+
displayName: 'Primary Account',
|
|
1295
|
+
description: 'The Primary Account Number',
|
|
1296
|
+
required: true,
|
|
1297
|
+
}),
|
|
1298
|
+
deleteMode: Property.StaticDropdown({
|
|
1299
|
+
displayName: 'Delete Mode',
|
|
1300
|
+
description: 'Indicates if deleting a single account or entire relationship',
|
|
1301
|
+
required: true,
|
|
1302
|
+
options: {
|
|
1303
|
+
options: [
|
|
1304
|
+
{ label: '1 - Delete Single Account', value: 1 },
|
|
1305
|
+
{ label: '2 - Delete Entire Relationship', value: 2 },
|
|
1306
|
+
],
|
|
1307
|
+
},
|
|
1308
|
+
}),
|
|
1309
|
+
transferLevel: Property.ShortText({
|
|
1310
|
+
displayName: 'Transfer Level',
|
|
1311
|
+
description: 'The transfer level (3 characters)',
|
|
1312
|
+
required: true,
|
|
1313
|
+
}),
|
|
1314
|
+
transferType: Property.StaticDropdown({
|
|
1315
|
+
displayName: 'Transfer Type',
|
|
1316
|
+
description: 'Transfer Type (for Delete Single Secondary Mode Only)',
|
|
1317
|
+
required: true,
|
|
1318
|
+
options: {
|
|
1319
|
+
options: [
|
|
1320
|
+
{ label: 'MM - Maintain Minimum', value: 'MM' },
|
|
1321
|
+
{ label: 'EB - Excess Balance', value: 'EB' },
|
|
1322
|
+
{ label: 'AL - At-Last Excess Balance', value: 'AL' },
|
|
1323
|
+
],
|
|
1324
|
+
},
|
|
1325
|
+
}),
|
|
1326
|
+
secondaryApplication: Property.StaticDropdown({
|
|
1327
|
+
displayName: 'Secondary Application',
|
|
1328
|
+
description: 'Secondary Application (for Delete Single Secondary Mode Only)',
|
|
1329
|
+
required: false,
|
|
1330
|
+
options: {
|
|
1331
|
+
options: [
|
|
1332
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
1333
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
1334
|
+
{ label: 'LN - Loans', value: 'LN' },
|
|
1335
|
+
{ label: 'RR - Ready Reserve', value: 'RR' },
|
|
1336
|
+
],
|
|
1337
|
+
},
|
|
1338
|
+
}),
|
|
1339
|
+
secondaryAccount: Property.ShortText({
|
|
1340
|
+
displayName: 'Secondary Account',
|
|
1341
|
+
description: 'Secondary Account Number (for Delete Single Secondary Mode Only)',
|
|
1342
|
+
required: false,
|
|
1343
|
+
}),
|
|
1344
|
+
overrideWarnings: Property.StaticDropdown({
|
|
1345
|
+
displayName: 'Override Warnings',
|
|
1346
|
+
description: 'Override warning messages',
|
|
1347
|
+
required: false,
|
|
1348
|
+
options: {
|
|
1349
|
+
options: [
|
|
1350
|
+
{ label: '0 - No', value: 0 },
|
|
1351
|
+
{ label: '1 - Yes', value: 1 },
|
|
1352
|
+
],
|
|
1353
|
+
},
|
|
1354
|
+
}),
|
|
1355
|
+
},
|
|
1356
|
+
async run(context) {
|
|
1357
|
+
const auth = context.auth as any;
|
|
1358
|
+
const baseUrl = auth['baseUrl'];
|
|
1359
|
+
const organizationId = auth['organizationId'];
|
|
1360
|
+
const {
|
|
1361
|
+
xAuthorization, sourceId, primaryApplication, primaryAccount, deleteMode,
|
|
1362
|
+
transferLevel, transferType, secondaryApplication, secondaryAccount, overrideWarnings
|
|
1363
|
+
} = context.propsValue;
|
|
1364
|
+
|
|
1365
|
+
const uuid = crypto.randomUUID();
|
|
1366
|
+
|
|
1367
|
+
const headers: Record<string, string> = {
|
|
1368
|
+
'accept': 'application/json',
|
|
1369
|
+
'Content-Type': 'application/json',
|
|
1370
|
+
'organization-id': organizationId,
|
|
1371
|
+
'uuid': uuid,
|
|
1372
|
+
'horizon-authorization': xAuthorization,
|
|
1373
|
+
};
|
|
1374
|
+
|
|
1375
|
+
if (sourceId) {
|
|
1376
|
+
headers['source-id'] = sourceId;
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1379
|
+
const queryParams: Record<string, string> = {
|
|
1380
|
+
'deleteMode': String(deleteMode),
|
|
1381
|
+
'transferLevel': transferLevel,
|
|
1382
|
+
'transferType': transferType,
|
|
1383
|
+
}
|
|
1384
|
+
if (secondaryApplication) {
|
|
1385
|
+
queryParams['secondaryApplication'] = secondaryApplication;
|
|
1386
|
+
}
|
|
1387
|
+
if (secondaryAccount) {
|
|
1388
|
+
queryParams['secondaryAccount'] = secondaryAccount;
|
|
1389
|
+
}
|
|
1390
|
+
if (overrideWarnings !== undefined) {
|
|
1391
|
+
queryParams['overrideWarnings'] = String(overrideWarnings);
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
const queryString = '?' + new URLSearchParams(queryParams).toString();
|
|
1395
|
+
|
|
1396
|
+
const response = await httpClient.sendRequest({
|
|
1397
|
+
method: HttpMethod.DELETE,
|
|
1398
|
+
url: `${baseUrl}/transfers/v1/dynamic-transfers/${primaryApplication}/${primaryAccount}${queryString}`,
|
|
1399
|
+
headers,
|
|
1400
|
+
});
|
|
1401
|
+
|
|
1402
|
+
return response.body;
|
|
1403
|
+
},
|
|
1404
|
+
});
|
|
1405
|
+
|
|
1406
|
+
/**
|
|
1407
|
+
* Transfers - Dynamic Transfer Search
|
|
1408
|
+
* GET /dynamic-transfers/list
|
|
1409
|
+
* Retrieve a list of dynamic transfers based on search criteria.
|
|
1410
|
+
*/
|
|
1411
|
+
export const transfers_dynamic_transfer_search = createAction({
|
|
1412
|
+
name: 'transfers_dynamic_transfer_search',
|
|
1413
|
+
auth: fisHorizonAuth,
|
|
1414
|
+
displayName: 'Transfers - Dynamic Transfer Search',
|
|
1415
|
+
description: 'Retrieve a list of dynamic transfers based on search criteria.',
|
|
1416
|
+
props: {
|
|
1417
|
+
xAuthorization: Property.ShortText({
|
|
1418
|
+
displayName: 'Authorization Token',
|
|
1419
|
+
description: 'The authorization token obtained from the Get Token endpoint',
|
|
1420
|
+
required: true,
|
|
1421
|
+
}),
|
|
1422
|
+
sourceId: Property.ShortText({
|
|
1423
|
+
displayName: 'Source ID',
|
|
1424
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
1425
|
+
required: false,
|
|
1426
|
+
}),
|
|
1427
|
+
transferGroup: Property.ShortText({
|
|
1428
|
+
displayName: 'Transfer Group',
|
|
1429
|
+
description: 'Transfer group filter. Wild Card Search Example: Jones* or *Jones*',
|
|
1430
|
+
required: false,
|
|
1431
|
+
}),
|
|
1432
|
+
transferLevel: Property.StaticDropdown({
|
|
1433
|
+
displayName: 'Transfer Level',
|
|
1434
|
+
description: 'Transfer level filter',
|
|
1435
|
+
required: false,
|
|
1436
|
+
options: {
|
|
1437
|
+
options: [
|
|
1438
|
+
{ label: 'All levels', value: ' ' },
|
|
1439
|
+
{ label: '000 - Level 0 (Manual Control)', value: '000' },
|
|
1440
|
+
{ label: '001 - Level 1 relationships', value: '001' },
|
|
1441
|
+
{ label: '002 - Level 2 relationships', value: '002' },
|
|
1442
|
+
{ label: '003 - Level 3 relationships', value: '003' },
|
|
1443
|
+
{ label: '004 - Level 4 relationships', value: '004' },
|
|
1444
|
+
{ label: '005 - Level 5 relationships', value: '005' },
|
|
1445
|
+
{ label: '006 - Level 6 relationships', value: '006' },
|
|
1446
|
+
{ label: '007 - Level 7 relationships', value: '007' },
|
|
1447
|
+
{ label: '008 - Level 8 relationships', value: '008' },
|
|
1448
|
+
{ label: '009 - Level 9 relationships', value: '009' },
|
|
1449
|
+
{ label: '999 - Level 999 (At-Last)', value: '999' },
|
|
1450
|
+
],
|
|
1451
|
+
},
|
|
1452
|
+
}),
|
|
1453
|
+
transferType: Property.StaticDropdown({
|
|
1454
|
+
displayName: 'Transfer Type',
|
|
1455
|
+
description: 'Transfer type filter',
|
|
1456
|
+
required: false,
|
|
1457
|
+
options: {
|
|
1458
|
+
options: [
|
|
1459
|
+
{ label: 'All Transfer Types', value: ' ' },
|
|
1460
|
+
{ label: 'MM - Maintain Min', value: 'MM' },
|
|
1461
|
+
{ label: 'EB - Excess Bal', value: 'EB' },
|
|
1462
|
+
{ label: 'AL - At-Last Excess Bal', value: 'AL' },
|
|
1463
|
+
],
|
|
1464
|
+
},
|
|
1465
|
+
}),
|
|
1466
|
+
applicationCode: Property.StaticDropdown({
|
|
1467
|
+
displayName: 'Application Code',
|
|
1468
|
+
description: 'Primary or secondary application filter',
|
|
1469
|
+
required: false,
|
|
1470
|
+
options: {
|
|
1471
|
+
options: [
|
|
1472
|
+
{ label: 'All Applications', value: ' ' },
|
|
1473
|
+
{ label: 'DD - Demand Deposit', value: 'DD' },
|
|
1474
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
1475
|
+
{ label: 'RR - Ready Reserve', value: 'RR' },
|
|
1476
|
+
{ label: 'LN - Loan', value: 'LN' },
|
|
1477
|
+
],
|
|
1478
|
+
},
|
|
1479
|
+
}),
|
|
1480
|
+
accountNumber: Property.ShortText({
|
|
1481
|
+
displayName: 'Account Number',
|
|
1482
|
+
description: 'Primary or secondary account filter (max 20 chars)',
|
|
1483
|
+
required: false,
|
|
1484
|
+
}),
|
|
1485
|
+
category: Property.StaticDropdown({
|
|
1486
|
+
displayName: 'Category',
|
|
1487
|
+
description: 'Transfer category filter',
|
|
1488
|
+
required: false,
|
|
1489
|
+
options: {
|
|
1490
|
+
options: [
|
|
1491
|
+
{ label: 'All Categories', value: ' ' },
|
|
1492
|
+
{ label: 'ODP - Overdraft Protection', value: 'ODP' },
|
|
1493
|
+
{ label: 'ZBA - Zero Balance Account', value: 'ZBA' },
|
|
1494
|
+
{ label: 'Sweep - Sweep Account', value: 'Sweep' },
|
|
1495
|
+
],
|
|
1496
|
+
},
|
|
1497
|
+
}),
|
|
1498
|
+
showEntireTransferGroup: Property.StaticDropdown({
|
|
1499
|
+
displayName: 'Show Entire Transfer Group',
|
|
1500
|
+
description: 'Show all transfers in the group if at least one meets the criteria',
|
|
1501
|
+
required: false,
|
|
1502
|
+
options: {
|
|
1503
|
+
options: [
|
|
1504
|
+
{ label: 'N - Show only transfers that meet search criteria', value: 'N' },
|
|
1505
|
+
{ label: 'Y - Show all transfers in the group', value: 'Y' },
|
|
1506
|
+
],
|
|
1507
|
+
},
|
|
1508
|
+
}),
|
|
1509
|
+
customerId: Property.ShortText({
|
|
1510
|
+
displayName: 'Customer ID',
|
|
1511
|
+
description: 'The RMS key of the Selected Customer (blank for all customers)',
|
|
1512
|
+
required: false,
|
|
1513
|
+
}),
|
|
1514
|
+
returnNumber: Property.Number({
|
|
1515
|
+
displayName: 'Return Number',
|
|
1516
|
+
description: 'Number of records to return (1-20)',
|
|
1517
|
+
required: false,
|
|
1518
|
+
}),
|
|
1519
|
+
firstNext: Property.StaticDropdown({
|
|
1520
|
+
displayName: 'First/Next',
|
|
1521
|
+
description: 'First or Next request for pagination',
|
|
1522
|
+
required: false,
|
|
1523
|
+
options: {
|
|
1524
|
+
options: [
|
|
1525
|
+
{ label: 'Blank - Error Check Filters only', value: ' ' },
|
|
1526
|
+
{ label: 'F - Send First set of Records', value: 'F' },
|
|
1527
|
+
{ label: 'N - Send Next Set of Records', value: 'N' },
|
|
1528
|
+
],
|
|
1529
|
+
},
|
|
1530
|
+
}),
|
|
1531
|
+
},
|
|
1532
|
+
async run(context) {
|
|
1533
|
+
const auth = context.auth as any;
|
|
1534
|
+
const baseUrl = auth['baseUrl'];
|
|
1535
|
+
const organizationId = auth['organizationId'];
|
|
1536
|
+
const {
|
|
1537
|
+
xAuthorization, sourceId, transferGroup, transferLevel, transferType,
|
|
1538
|
+
applicationCode, accountNumber, category, showEntireTransferGroup,
|
|
1539
|
+
customerId, returnNumber, firstNext
|
|
1540
|
+
} = context.propsValue;
|
|
1541
|
+
|
|
1542
|
+
const uuid = crypto.randomUUID();
|
|
1543
|
+
|
|
1544
|
+
const headers: Record<string, string> = {
|
|
1545
|
+
'accept': 'application/json',
|
|
1546
|
+
'Content-Type': 'application/json',
|
|
1547
|
+
'organization-id': organizationId,
|
|
1548
|
+
'uuid': uuid,
|
|
1549
|
+
'horizon-authorization': xAuthorization,
|
|
1550
|
+
};
|
|
1551
|
+
|
|
1552
|
+
if (sourceId) {
|
|
1553
|
+
headers['source-id'] = sourceId;
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
const queryParams: Record<string, string> = {};
|
|
1557
|
+
|
|
1558
|
+
if (transferGroup) queryParams['transferGroup'] = transferGroup;
|
|
1559
|
+
if (transferLevel) queryParams['transferLevel'] = transferLevel;
|
|
1560
|
+
if (transferType) queryParams['transferType'] = transferType;
|
|
1561
|
+
if (applicationCode) queryParams['applicationCode'] = applicationCode;
|
|
1562
|
+
if (accountNumber) queryParams['accountNumber'] = accountNumber;
|
|
1563
|
+
if (category) queryParams['category'] = category;
|
|
1564
|
+
if (showEntireTransferGroup) queryParams['showEntireTransferGroup'] = showEntireTransferGroup;
|
|
1565
|
+
if (customerId) queryParams['customerId'] = customerId;
|
|
1566
|
+
if (returnNumber !== undefined) queryParams['returnNumber'] = String(returnNumber);
|
|
1567
|
+
if (firstNext) queryParams['firstNext'] = firstNext;
|
|
1568
|
+
|
|
1569
|
+
const queryString = Object.keys(queryParams).length > 0
|
|
1570
|
+
? '?' + new URLSearchParams(queryParams).toString()
|
|
1571
|
+
: '';
|
|
1572
|
+
|
|
1573
|
+
const response = await httpClient.sendRequest({
|
|
1574
|
+
method: HttpMethod.GET,
|
|
1575
|
+
url: `${baseUrl}/transfers/v1/dynamic-transfers/list${queryString}`,
|
|
1576
|
+
headers,
|
|
1577
|
+
});
|
|
1578
|
+
|
|
1579
|
+
return response.body;
|
|
1580
|
+
},
|
|
1581
|
+
});
|