@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,731 @@
|
|
|
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 Demand Deposit Savings API
|
|
9
|
+
const API_PATH = '/demand-deposit-savings/v2';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Add a new demand deposit account
|
|
13
|
+
*/
|
|
14
|
+
export const demand_deposit_savings_add_demand_deposit = createAction({
|
|
15
|
+
name: 'demand_deposit_savings_add_demand_deposit',
|
|
16
|
+
auth: fisHorizonAuth,
|
|
17
|
+
displayName: 'Demand Deposit Savings - Add Demand Deposit Account',
|
|
18
|
+
description: 'Add a new demand deposit account',
|
|
19
|
+
props: {
|
|
20
|
+
xAuthorization: Property.ShortText({
|
|
21
|
+
displayName: 'Authorization Token (JWT)',
|
|
22
|
+
description: 'The JWT token obtained from the Authorization - Get Token action',
|
|
23
|
+
required: true,
|
|
24
|
+
}),
|
|
25
|
+
sourceId: Property.ShortText({
|
|
26
|
+
displayName: 'Source ID',
|
|
27
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
28
|
+
required: false,
|
|
29
|
+
}),
|
|
30
|
+
addUpdate: Property.StaticDropdown({
|
|
31
|
+
displayName: 'Add/Update Mode',
|
|
32
|
+
description: 'The mode for adding the account',
|
|
33
|
+
required: true,
|
|
34
|
+
options: {
|
|
35
|
+
options: [
|
|
36
|
+
{ label: 'A - Add Account Mode', value: 'A' },
|
|
37
|
+
{ label: 'N - Add, default fields from Request Account Type', value: 'N' },
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
}),
|
|
41
|
+
customerId: Property.ShortText({
|
|
42
|
+
displayName: 'Customer ID',
|
|
43
|
+
description: 'Right-justified, zero filled. Up to 14 digits.',
|
|
44
|
+
required: true,
|
|
45
|
+
}),
|
|
46
|
+
accountNumber: Property.ShortText({
|
|
47
|
+
displayName: 'Account Number',
|
|
48
|
+
description: 'Up to 10 numeric digits, no decimal places',
|
|
49
|
+
required: true,
|
|
50
|
+
}),
|
|
51
|
+
productType: Property.ShortText({
|
|
52
|
+
displayName: 'Product Type',
|
|
53
|
+
description: 'User defined, up to 3 characters',
|
|
54
|
+
required: true,
|
|
55
|
+
}),
|
|
56
|
+
branchNumber: Property.ShortText({
|
|
57
|
+
displayName: 'Branch Number',
|
|
58
|
+
description: 'Right justified, zero filled, 3 numeric digits',
|
|
59
|
+
required: true,
|
|
60
|
+
}),
|
|
61
|
+
primaryShortName: Property.ShortText({
|
|
62
|
+
displayName: 'Primary Short Name',
|
|
63
|
+
description: 'The primary short name for the account',
|
|
64
|
+
required: true,
|
|
65
|
+
}),
|
|
66
|
+
accountReconciliationCode: Property.StaticDropdown({
|
|
67
|
+
displayName: 'Account Reconciliation Code',
|
|
68
|
+
description: 'Account reconciliation code',
|
|
69
|
+
required: false,
|
|
70
|
+
options: {
|
|
71
|
+
options: [
|
|
72
|
+
{ label: 'Blank - No Account Reconciliation', value: '' },
|
|
73
|
+
{ label: 'Y - Recon with Auto Issues', value: 'Y' },
|
|
74
|
+
{ label: 'M - Recon without Auto Issues', value: 'M' },
|
|
75
|
+
{ label: 'X - Recon with Auto Issues', value: 'X' },
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
}),
|
|
79
|
+
censusTrackNumber: Property.Number({
|
|
80
|
+
displayName: 'Census Track Number',
|
|
81
|
+
description: 'Census track number (0-9999999)',
|
|
82
|
+
required: false,
|
|
83
|
+
}),
|
|
84
|
+
confidentialAccount: Property.Checkbox({
|
|
85
|
+
displayName: 'Confidential Account',
|
|
86
|
+
description: 'Whether the account is confidential',
|
|
87
|
+
required: false,
|
|
88
|
+
defaultValue: false,
|
|
89
|
+
}),
|
|
90
|
+
employeeCode: Property.StaticDropdown({
|
|
91
|
+
displayName: 'Employee Code',
|
|
92
|
+
description: 'Employee code',
|
|
93
|
+
required: false,
|
|
94
|
+
options: {
|
|
95
|
+
options: [
|
|
96
|
+
{ label: 'Blank - Not Applicable', value: '' },
|
|
97
|
+
{ label: 'O - Officer', value: 'O' },
|
|
98
|
+
{ label: 'D - Director', value: 'D' },
|
|
99
|
+
{ label: 'E - Employee', value: 'E' },
|
|
100
|
+
{ label: 'B - Other Bank Official', value: 'B' },
|
|
101
|
+
{ label: 'P - Public Official', value: 'P' },
|
|
102
|
+
],
|
|
103
|
+
},
|
|
104
|
+
}),
|
|
105
|
+
exceptionFeeTable: Property.ShortText({
|
|
106
|
+
displayName: 'Exception Fee Table',
|
|
107
|
+
description: 'User defined, up to 3 characters. Required when addUpdate = A',
|
|
108
|
+
required: false,
|
|
109
|
+
}),
|
|
110
|
+
generalLedgerType: Property.ShortText({
|
|
111
|
+
displayName: 'General Ledger Type',
|
|
112
|
+
description: 'User defined, up to 4 characters. Required when addUpdate = A',
|
|
113
|
+
required: false,
|
|
114
|
+
}),
|
|
115
|
+
homeBankingCode: Property.StaticDropdown({
|
|
116
|
+
displayName: 'Home Banking Code',
|
|
117
|
+
description: 'Home banking code. Required when addUpdate = A',
|
|
118
|
+
required: false,
|
|
119
|
+
options: {
|
|
120
|
+
options: [
|
|
121
|
+
{ label: 'C - Charge', value: 'C' },
|
|
122
|
+
{ label: 'N - Not Home Banking', value: 'N' },
|
|
123
|
+
{ label: 'W - Waive', value: 'W' },
|
|
124
|
+
],
|
|
125
|
+
},
|
|
126
|
+
}),
|
|
127
|
+
homeBankingFeeStartDate: Property.ShortText({
|
|
128
|
+
displayName: 'Home Banking Fee Start Date',
|
|
129
|
+
description: 'Format: MMDDYY',
|
|
130
|
+
required: false,
|
|
131
|
+
}),
|
|
132
|
+
legalHousingTrust: Property.StaticDropdown({
|
|
133
|
+
displayName: 'Legal Housing Trust',
|
|
134
|
+
description: 'Legal housing trust code',
|
|
135
|
+
required: false,
|
|
136
|
+
options: {
|
|
137
|
+
options: [
|
|
138
|
+
{ label: 'Blank - Not Applicable', value: '' },
|
|
139
|
+
{ label: '1 - Post only Positive Interest', value: '1' },
|
|
140
|
+
{ label: '2 - Post Positive and Negative Interest', value: '2' },
|
|
141
|
+
],
|
|
142
|
+
},
|
|
143
|
+
}),
|
|
144
|
+
miscellaneousFeeTable: Property.ShortText({
|
|
145
|
+
displayName: 'Miscellaneous Fee Table',
|
|
146
|
+
description: 'User defined, up to 3 characters. Required when addUpdate = A',
|
|
147
|
+
required: false,
|
|
148
|
+
}),
|
|
149
|
+
newProdType: Property.ShortText({
|
|
150
|
+
displayName: 'New Product Type',
|
|
151
|
+
description: 'Must be a valid product type, up to 3 characters',
|
|
152
|
+
required: false,
|
|
153
|
+
}),
|
|
154
|
+
numberOfDaysForAutoClose: Property.Number({
|
|
155
|
+
displayName: 'Number of Days for Auto Close',
|
|
156
|
+
description: '000 = Auto Close, 999 = Do Not Auto Close, 1-998 = Wait Number of Days',
|
|
157
|
+
required: false,
|
|
158
|
+
}),
|
|
159
|
+
officerCode: Property.ShortText({
|
|
160
|
+
displayName: 'Officer Code',
|
|
161
|
+
description: 'User defined, up to 3 characters',
|
|
162
|
+
required: false,
|
|
163
|
+
}),
|
|
164
|
+
openingBalance: Property.Number({
|
|
165
|
+
displayName: 'Opening Balance',
|
|
166
|
+
description: 'Opening balance (0.00 - 99999999999.99)',
|
|
167
|
+
required: false,
|
|
168
|
+
}),
|
|
169
|
+
additionalFields: Property.Json({
|
|
170
|
+
displayName: 'Additional Fields',
|
|
171
|
+
description: 'Additional fields to include in the request body as JSON object',
|
|
172
|
+
required: false,
|
|
173
|
+
}),
|
|
174
|
+
},
|
|
175
|
+
async run(context) {
|
|
176
|
+
const auth = context.auth as any;
|
|
177
|
+
const baseUrl = auth.baseUrl;
|
|
178
|
+
const organizationId = auth.organizationId;
|
|
179
|
+
const props = context.propsValue;
|
|
180
|
+
|
|
181
|
+
const uuid = crypto.randomUUID();
|
|
182
|
+
|
|
183
|
+
const headers: Record<string, string> = {
|
|
184
|
+
'accept': 'application/json',
|
|
185
|
+
'Content-Type': 'application/json',
|
|
186
|
+
'organization-id': organizationId,
|
|
187
|
+
'uuid': uuid,
|
|
188
|
+
'x-authorization': props.xAuthorization,
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
if (props.sourceId) {
|
|
192
|
+
headers['source-id'] = props.sourceId;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
const body: Record<string, unknown> = {
|
|
196
|
+
addUpdate: props.addUpdate,
|
|
197
|
+
customerId: props.customerId,
|
|
198
|
+
accountNumber: props.accountNumber,
|
|
199
|
+
productType: props.productType,
|
|
200
|
+
branchNumber: props.branchNumber,
|
|
201
|
+
primaryShortName: props.primaryShortName,
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
if (props.accountReconciliationCode !== undefined && props.accountReconciliationCode !== null) {
|
|
205
|
+
body['accountReconciliationCode'] = props.accountReconciliationCode;
|
|
206
|
+
}
|
|
207
|
+
if (props.censusTrackNumber !== undefined && props.censusTrackNumber !== null) {
|
|
208
|
+
body['censusTrackNumber'] = props.censusTrackNumber;
|
|
209
|
+
}
|
|
210
|
+
if (props.confidentialAccount !== undefined && props.confidentialAccount !== null) {
|
|
211
|
+
body['confidentialAccount'] = props.confidentialAccount;
|
|
212
|
+
}
|
|
213
|
+
if (props.employeeCode !== undefined && props.employeeCode !== null) {
|
|
214
|
+
body['employeeCode'] = props.employeeCode;
|
|
215
|
+
}
|
|
216
|
+
if (props.exceptionFeeTable) {
|
|
217
|
+
body['exceptionFeeTable'] = props.exceptionFeeTable;
|
|
218
|
+
}
|
|
219
|
+
if (props.generalLedgerType) {
|
|
220
|
+
body['generalLedgerType'] = props.generalLedgerType;
|
|
221
|
+
}
|
|
222
|
+
if (props.homeBankingCode) {
|
|
223
|
+
body['homeBankingCode'] = props.homeBankingCode;
|
|
224
|
+
}
|
|
225
|
+
if (props.homeBankingFeeStartDate) {
|
|
226
|
+
body['homeBankingFeeStartDate'] = props.homeBankingFeeStartDate;
|
|
227
|
+
}
|
|
228
|
+
if (props.legalHousingTrust !== undefined && props.legalHousingTrust !== null) {
|
|
229
|
+
body['legalHousingTrust'] = props.legalHousingTrust;
|
|
230
|
+
}
|
|
231
|
+
if (props.miscellaneousFeeTable) {
|
|
232
|
+
body['miscellaneousFeeTable'] = props.miscellaneousFeeTable;
|
|
233
|
+
}
|
|
234
|
+
if (props.newProdType) {
|
|
235
|
+
body['newProdType'] = props.newProdType;
|
|
236
|
+
}
|
|
237
|
+
if (props.numberOfDaysForAutoClose !== undefined && props.numberOfDaysForAutoClose !== null) {
|
|
238
|
+
body['numberOfDaysForAutoClose'] = props.numberOfDaysForAutoClose;
|
|
239
|
+
}
|
|
240
|
+
if (props.officerCode) {
|
|
241
|
+
body['officerCode'] = props.officerCode;
|
|
242
|
+
}
|
|
243
|
+
if (props.openingBalance !== undefined && props.openingBalance !== null) {
|
|
244
|
+
body['openingBalance'] = props.openingBalance;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// Merge additional fields if provided
|
|
248
|
+
if (props.additionalFields && typeof props.additionalFields === 'object') {
|
|
249
|
+
Object.assign(body, props.additionalFields);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
const response = await httpClient.sendRequest({
|
|
253
|
+
method: HttpMethod.POST,
|
|
254
|
+
url: `${baseUrl}${API_PATH}/accounts/demand-deposits`,
|
|
255
|
+
headers,
|
|
256
|
+
body,
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
return response.body;
|
|
260
|
+
},
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Add a new savings account
|
|
265
|
+
*/
|
|
266
|
+
export const demand_deposit_savings_add_savings = createAction({
|
|
267
|
+
name: 'demand_deposit_savings_add_savings',
|
|
268
|
+
auth: fisHorizonAuth,
|
|
269
|
+
displayName: 'Demand Deposit Savings - Add Savings Account',
|
|
270
|
+
description: 'Add a new savings account',
|
|
271
|
+
props: {
|
|
272
|
+
xAuthorization: Property.ShortText({
|
|
273
|
+
displayName: 'Authorization Token (JWT)',
|
|
274
|
+
description: 'The JWT token obtained from the Authorization - Get Token action',
|
|
275
|
+
required: true,
|
|
276
|
+
}),
|
|
277
|
+
sourceId: Property.ShortText({
|
|
278
|
+
displayName: 'Source ID',
|
|
279
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
280
|
+
required: false,
|
|
281
|
+
}),
|
|
282
|
+
addUpdate: Property.StaticDropdown({
|
|
283
|
+
displayName: 'Add/Update Mode',
|
|
284
|
+
description: 'The mode for adding the account',
|
|
285
|
+
required: true,
|
|
286
|
+
options: {
|
|
287
|
+
options: [
|
|
288
|
+
{ label: 'A - Add Account Mode', value: 'A' },
|
|
289
|
+
{ label: 'N - Add, default fields from Request Account Type', value: 'N' },
|
|
290
|
+
],
|
|
291
|
+
},
|
|
292
|
+
}),
|
|
293
|
+
customerId: Property.ShortText({
|
|
294
|
+
displayName: 'Customer ID',
|
|
295
|
+
description: 'Right-justified, zero filled. Up to 14 digits.',
|
|
296
|
+
required: true,
|
|
297
|
+
}),
|
|
298
|
+
accountNumber: Property.ShortText({
|
|
299
|
+
displayName: 'Account Number',
|
|
300
|
+
description: 'Up to 10 numeric digits, no decimal places',
|
|
301
|
+
required: true,
|
|
302
|
+
}),
|
|
303
|
+
productType: Property.ShortText({
|
|
304
|
+
displayName: 'Product Type',
|
|
305
|
+
description: 'User defined, up to 3 characters',
|
|
306
|
+
required: true,
|
|
307
|
+
}),
|
|
308
|
+
branchNumber: Property.ShortText({
|
|
309
|
+
displayName: 'Branch Number',
|
|
310
|
+
description: 'Right justified, zero filled, 3 numeric digits',
|
|
311
|
+
required: true,
|
|
312
|
+
}),
|
|
313
|
+
primaryShortName: Property.ShortText({
|
|
314
|
+
displayName: 'Primary Short Name',
|
|
315
|
+
description: 'The primary short name for the account',
|
|
316
|
+
required: true,
|
|
317
|
+
}),
|
|
318
|
+
accountReconciliationCode: Property.StaticDropdown({
|
|
319
|
+
displayName: 'Account Reconciliation Code',
|
|
320
|
+
description: 'Account reconciliation code',
|
|
321
|
+
required: false,
|
|
322
|
+
options: {
|
|
323
|
+
options: [
|
|
324
|
+
{ label: 'Blank - No Account Reconciliation', value: '' },
|
|
325
|
+
{ label: 'Y - Recon with Auto Issues', value: 'Y' },
|
|
326
|
+
{ label: 'M - Recon without Auto Issues', value: 'M' },
|
|
327
|
+
{ label: 'X - Recon with Auto Issues', value: 'X' },
|
|
328
|
+
],
|
|
329
|
+
},
|
|
330
|
+
}),
|
|
331
|
+
censusTrackNumber: Property.Number({
|
|
332
|
+
displayName: 'Census Track Number',
|
|
333
|
+
description: 'Census track number (0-9999999)',
|
|
334
|
+
required: false,
|
|
335
|
+
}),
|
|
336
|
+
confidentialAccount: Property.Checkbox({
|
|
337
|
+
displayName: 'Confidential Account',
|
|
338
|
+
description: 'Whether the account is confidential',
|
|
339
|
+
required: false,
|
|
340
|
+
defaultValue: false,
|
|
341
|
+
}),
|
|
342
|
+
employeeCode: Property.StaticDropdown({
|
|
343
|
+
displayName: 'Employee Code',
|
|
344
|
+
description: 'Employee code',
|
|
345
|
+
required: false,
|
|
346
|
+
options: {
|
|
347
|
+
options: [
|
|
348
|
+
{ label: 'Blank - Not Applicable', value: '' },
|
|
349
|
+
{ label: 'O - Officer', value: 'O' },
|
|
350
|
+
{ label: 'D - Director', value: 'D' },
|
|
351
|
+
{ label: 'E - Employee', value: 'E' },
|
|
352
|
+
{ label: 'B - Other Bank Official', value: 'B' },
|
|
353
|
+
{ label: 'P - Public Official', value: 'P' },
|
|
354
|
+
],
|
|
355
|
+
},
|
|
356
|
+
}),
|
|
357
|
+
exceptionFeeTable: Property.ShortText({
|
|
358
|
+
displayName: 'Exception Fee Table',
|
|
359
|
+
description: 'User defined, up to 3 characters. Required when addUpdate = A',
|
|
360
|
+
required: false,
|
|
361
|
+
}),
|
|
362
|
+
generalLedgerType: Property.ShortText({
|
|
363
|
+
displayName: 'General Ledger Type',
|
|
364
|
+
description: 'User defined, up to 4 characters. Required when addUpdate = A',
|
|
365
|
+
required: false,
|
|
366
|
+
}),
|
|
367
|
+
homeBankingCode: Property.StaticDropdown({
|
|
368
|
+
displayName: 'Home Banking Code',
|
|
369
|
+
description: 'Home banking code. Required when addUpdate = A',
|
|
370
|
+
required: false,
|
|
371
|
+
options: {
|
|
372
|
+
options: [
|
|
373
|
+
{ label: 'C - Charge', value: 'C' },
|
|
374
|
+
{ label: 'N - Not Home Banking', value: 'N' },
|
|
375
|
+
{ label: 'W - Waive', value: 'W' },
|
|
376
|
+
],
|
|
377
|
+
},
|
|
378
|
+
}),
|
|
379
|
+
homeBankingFeeStartDate: Property.ShortText({
|
|
380
|
+
displayName: 'Home Banking Fee Start Date',
|
|
381
|
+
description: 'Format: MMDDYY',
|
|
382
|
+
required: false,
|
|
383
|
+
}),
|
|
384
|
+
legalHousingTrust: Property.StaticDropdown({
|
|
385
|
+
displayName: 'Legal Housing Trust',
|
|
386
|
+
description: 'Legal housing trust code',
|
|
387
|
+
required: false,
|
|
388
|
+
options: {
|
|
389
|
+
options: [
|
|
390
|
+
{ label: 'Blank - Not Applicable', value: '' },
|
|
391
|
+
{ label: '1 - Post only Positive Interest', value: '1' },
|
|
392
|
+
{ label: '2 - Post Positive and Negative Interest', value: '2' },
|
|
393
|
+
],
|
|
394
|
+
},
|
|
395
|
+
}),
|
|
396
|
+
miscellaneousFeeTable: Property.ShortText({
|
|
397
|
+
displayName: 'Miscellaneous Fee Table',
|
|
398
|
+
description: 'User defined, up to 3 characters. Required when addUpdate = A',
|
|
399
|
+
required: false,
|
|
400
|
+
}),
|
|
401
|
+
newProdType: Property.ShortText({
|
|
402
|
+
displayName: 'New Product Type',
|
|
403
|
+
description: 'Must be a valid product type, up to 3 characters',
|
|
404
|
+
required: false,
|
|
405
|
+
}),
|
|
406
|
+
numberOfDaysForAutoClose: Property.Number({
|
|
407
|
+
displayName: 'Number of Days for Auto Close',
|
|
408
|
+
description: '000 = Auto Close, 999 = Do Not Auto Close, 1-998 = Wait Number of Days',
|
|
409
|
+
required: false,
|
|
410
|
+
}),
|
|
411
|
+
officerCode: Property.ShortText({
|
|
412
|
+
displayName: 'Officer Code',
|
|
413
|
+
description: 'User defined, up to 3 characters',
|
|
414
|
+
required: false,
|
|
415
|
+
}),
|
|
416
|
+
openingBalance: Property.Number({
|
|
417
|
+
displayName: 'Opening Balance',
|
|
418
|
+
description: 'Opening balance (0.00 - 99999999999.99)',
|
|
419
|
+
required: false,
|
|
420
|
+
}),
|
|
421
|
+
clubAccount: Property.Json({
|
|
422
|
+
displayName: 'Club Account',
|
|
423
|
+
description: 'Club account details as JSON (amount, generateCouponOrder, numberOfCoupons, transferApplicationCode, transferAccount)',
|
|
424
|
+
required: false,
|
|
425
|
+
}),
|
|
426
|
+
additionalFields: Property.Json({
|
|
427
|
+
displayName: 'Additional Fields',
|
|
428
|
+
description: 'Additional fields to include in the request body as JSON object',
|
|
429
|
+
required: false,
|
|
430
|
+
}),
|
|
431
|
+
},
|
|
432
|
+
async run(context) {
|
|
433
|
+
const auth = context.auth as any;
|
|
434
|
+
const baseUrl = auth.baseUrl;
|
|
435
|
+
const organizationId = auth.organizationId;
|
|
436
|
+
const props = context.propsValue;
|
|
437
|
+
|
|
438
|
+
const uuid = crypto.randomUUID();
|
|
439
|
+
|
|
440
|
+
const headers: Record<string, string> = {
|
|
441
|
+
'accept': 'application/json',
|
|
442
|
+
'Content-Type': 'application/json',
|
|
443
|
+
'organization-id': organizationId,
|
|
444
|
+
'uuid': uuid,
|
|
445
|
+
'x-authorization': props.xAuthorization,
|
|
446
|
+
};
|
|
447
|
+
|
|
448
|
+
if (props.sourceId) {
|
|
449
|
+
headers['source-id'] = props.sourceId;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
const body: Record<string, unknown> = {
|
|
453
|
+
addUpdate: props.addUpdate,
|
|
454
|
+
customerId: props.customerId,
|
|
455
|
+
accountNumber: props.accountNumber,
|
|
456
|
+
productType: props.productType,
|
|
457
|
+
branchNumber: props.branchNumber,
|
|
458
|
+
primaryShortName: props.primaryShortName,
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
if (props.accountReconciliationCode !== undefined && props.accountReconciliationCode !== null) {
|
|
462
|
+
body['accountReconciliationCode'] = props.accountReconciliationCode;
|
|
463
|
+
}
|
|
464
|
+
if (props.censusTrackNumber !== undefined && props.censusTrackNumber !== null) {
|
|
465
|
+
body['censusTrackNumber'] = props.censusTrackNumber;
|
|
466
|
+
}
|
|
467
|
+
if (props.confidentialAccount !== undefined && props.confidentialAccount !== null) {
|
|
468
|
+
body['confidentialAccount'] = props.confidentialAccount;
|
|
469
|
+
}
|
|
470
|
+
if (props.employeeCode !== undefined && props.employeeCode !== null) {
|
|
471
|
+
body['employeeCode'] = props.employeeCode;
|
|
472
|
+
}
|
|
473
|
+
if (props.exceptionFeeTable) {
|
|
474
|
+
body['exceptionFeeTable'] = props.exceptionFeeTable;
|
|
475
|
+
}
|
|
476
|
+
if (props.generalLedgerType) {
|
|
477
|
+
body['generalLedgerType'] = props.generalLedgerType;
|
|
478
|
+
}
|
|
479
|
+
if (props.homeBankingCode) {
|
|
480
|
+
body['homeBankingCode'] = props.homeBankingCode;
|
|
481
|
+
}
|
|
482
|
+
if (props.homeBankingFeeStartDate) {
|
|
483
|
+
body['homeBankingFeeStartDate'] = props.homeBankingFeeStartDate;
|
|
484
|
+
}
|
|
485
|
+
if (props.legalHousingTrust !== undefined && props.legalHousingTrust !== null) {
|
|
486
|
+
body['legalHousingTrust'] = props.legalHousingTrust;
|
|
487
|
+
}
|
|
488
|
+
if (props.miscellaneousFeeTable) {
|
|
489
|
+
body['miscellaneousFeeTable'] = props.miscellaneousFeeTable;
|
|
490
|
+
}
|
|
491
|
+
if (props.newProdType) {
|
|
492
|
+
body['newProdType'] = props.newProdType;
|
|
493
|
+
}
|
|
494
|
+
if (props.numberOfDaysForAutoClose !== undefined && props.numberOfDaysForAutoClose !== null) {
|
|
495
|
+
body['numberOfDaysForAutoClose'] = props.numberOfDaysForAutoClose;
|
|
496
|
+
}
|
|
497
|
+
if (props.officerCode) {
|
|
498
|
+
body['officerCode'] = props.officerCode;
|
|
499
|
+
}
|
|
500
|
+
if (props.openingBalance !== undefined && props.openingBalance !== null) {
|
|
501
|
+
body['openingBalance'] = props.openingBalance;
|
|
502
|
+
}
|
|
503
|
+
if (props.clubAccount && typeof props.clubAccount === 'object') {
|
|
504
|
+
body['clubAccount'] = props.clubAccount;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
// Merge additional fields if provided
|
|
508
|
+
if (props.additionalFields && typeof props.additionalFields === 'object') {
|
|
509
|
+
Object.assign(body, props.additionalFields);
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
const response = await httpClient.sendRequest({
|
|
513
|
+
method: HttpMethod.POST,
|
|
514
|
+
url: `${baseUrl}${API_PATH}/accounts/savings`,
|
|
515
|
+
headers,
|
|
516
|
+
body,
|
|
517
|
+
});
|
|
518
|
+
|
|
519
|
+
return response.body;
|
|
520
|
+
},
|
|
521
|
+
});
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* Generate a digital signature for the Demand Deposit/Savings dynamic account inquiry
|
|
525
|
+
*/
|
|
526
|
+
export const demand_deposit_savings_dynamic_signature = createAction({
|
|
527
|
+
name: 'demand_deposit_savings_dynamic_signature',
|
|
528
|
+
auth: fisHorizonAuth,
|
|
529
|
+
displayName: 'Demand Deposit Savings - Generate Dynamic Signature',
|
|
530
|
+
description: 'Generate a digital signature to be used with the dynamic accounts inquiry API. The signature represents which data fields will be requested.',
|
|
531
|
+
props: {
|
|
532
|
+
xAuthorization: Property.ShortText({
|
|
533
|
+
displayName: 'Authorization Token (JWT)',
|
|
534
|
+
description: 'The JWT token obtained from the Authorization - Get Token action',
|
|
535
|
+
required: true,
|
|
536
|
+
}),
|
|
537
|
+
sourceId: Property.ShortText({
|
|
538
|
+
displayName: 'Source ID',
|
|
539
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
540
|
+
required: false,
|
|
541
|
+
}),
|
|
542
|
+
accountInformation: Property.Json({
|
|
543
|
+
displayName: 'Account Information Fields',
|
|
544
|
+
description: 'JSON object containing arrays of field names to include. Sections: generalInformation, regulatory, waive, statement, cards, serviceCharge, clubAccount, specialAttention, trustAuthorizationTrustCertification, notary, depositInsuranceDeterminationModernizationCodes',
|
|
545
|
+
required: false,
|
|
546
|
+
}),
|
|
547
|
+
accountBalanceSummary: Property.Json({
|
|
548
|
+
displayName: 'Account Balance Summary Fields',
|
|
549
|
+
description: 'JSON object containing arrays of field names to include. Sections: balanceInformation, chargeOff, historicalBalances, preliminaryChargeOffDetails',
|
|
550
|
+
required: false,
|
|
551
|
+
}),
|
|
552
|
+
},
|
|
553
|
+
async run(context) {
|
|
554
|
+
const auth = context.auth as any;
|
|
555
|
+
const baseUrl = auth.baseUrl;
|
|
556
|
+
const organizationId = auth.organizationId;
|
|
557
|
+
const props = context.propsValue;
|
|
558
|
+
|
|
559
|
+
const uuid = crypto.randomUUID();
|
|
560
|
+
|
|
561
|
+
const headers: Record<string, string> = {
|
|
562
|
+
'accept': 'application/json',
|
|
563
|
+
'Content-Type': 'application/json',
|
|
564
|
+
'organization-id': organizationId,
|
|
565
|
+
'uuid': uuid,
|
|
566
|
+
'x-authorization': props.xAuthorization,
|
|
567
|
+
};
|
|
568
|
+
|
|
569
|
+
if (props.sourceId) {
|
|
570
|
+
headers['source-id'] = props.sourceId;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
const body: Record<string, unknown> = {};
|
|
574
|
+
|
|
575
|
+
if (props.accountInformation && typeof props.accountInformation === 'object') {
|
|
576
|
+
body['accountInformation'] = props.accountInformation;
|
|
577
|
+
}
|
|
578
|
+
if (props.accountBalanceSummary && typeof props.accountBalanceSummary === 'object') {
|
|
579
|
+
body['accountBalanceSummary'] = props.accountBalanceSummary;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
const response = await httpClient.sendRequest({
|
|
583
|
+
method: HttpMethod.POST,
|
|
584
|
+
url: `${baseUrl}${API_PATH}/dynamic/accounts/signature`,
|
|
585
|
+
headers,
|
|
586
|
+
body,
|
|
587
|
+
});
|
|
588
|
+
|
|
589
|
+
return response.body;
|
|
590
|
+
},
|
|
591
|
+
});
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* Return a list of fields for the given digital signature
|
|
595
|
+
*/
|
|
596
|
+
export const demand_deposit_savings_dynamic_fields = createAction({
|
|
597
|
+
name: 'demand_deposit_savings_dynamic_fields',
|
|
598
|
+
auth: fisHorizonAuth,
|
|
599
|
+
displayName: 'Demand Deposit Savings - Get Dynamic Fields',
|
|
600
|
+
description: 'Retrieve a list of fields for the dynamic accounts inquiry. If digitalSignature is empty, returns all available field names. If a valid signature is provided, returns only the fields associated with that signature.',
|
|
601
|
+
props: {
|
|
602
|
+
xAuthorization: Property.ShortText({
|
|
603
|
+
displayName: 'Authorization Token (JWT)',
|
|
604
|
+
description: 'The JWT token obtained from the Authorization - Get Token action',
|
|
605
|
+
required: true,
|
|
606
|
+
}),
|
|
607
|
+
sourceId: Property.ShortText({
|
|
608
|
+
displayName: 'Source ID',
|
|
609
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
610
|
+
required: false,
|
|
611
|
+
}),
|
|
612
|
+
digitalSignature: Property.ShortText({
|
|
613
|
+
displayName: 'Digital Signature',
|
|
614
|
+
description: 'Optional: Digital signature in hexadecimal format. If empty, returns all available fields.',
|
|
615
|
+
required: false,
|
|
616
|
+
}),
|
|
617
|
+
},
|
|
618
|
+
async run(context) {
|
|
619
|
+
const auth = context.auth as any;
|
|
620
|
+
const baseUrl = auth.baseUrl;
|
|
621
|
+
const organizationId = auth.organizationId;
|
|
622
|
+
const props = context.propsValue;
|
|
623
|
+
|
|
624
|
+
const uuid = crypto.randomUUID();
|
|
625
|
+
|
|
626
|
+
const headers: Record<string, string> = {
|
|
627
|
+
'accept': 'application/json',
|
|
628
|
+
'Content-Type': 'application/json',
|
|
629
|
+
'organization-id': organizationId,
|
|
630
|
+
'uuid': uuid,
|
|
631
|
+
'x-authorization': props.xAuthorization,
|
|
632
|
+
};
|
|
633
|
+
|
|
634
|
+
if (props.sourceId) {
|
|
635
|
+
headers['source-id'] = props.sourceId;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
const body: Record<string, unknown> = {};
|
|
639
|
+
|
|
640
|
+
if (props.digitalSignature) {
|
|
641
|
+
body['digitalSignature'] = props.digitalSignature;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
const response = await httpClient.sendRequest({
|
|
645
|
+
method: HttpMethod.POST,
|
|
646
|
+
url: `${baseUrl}${API_PATH}/dynamic/accounts/fields`,
|
|
647
|
+
headers,
|
|
648
|
+
body,
|
|
649
|
+
});
|
|
650
|
+
|
|
651
|
+
return response.body;
|
|
652
|
+
},
|
|
653
|
+
});
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* Return Demand Deposit/Savings account information represented by the given digital signature
|
|
657
|
+
*/
|
|
658
|
+
export const demand_deposit_savings_dynamic_inquiry = createAction({
|
|
659
|
+
name: 'demand_deposit_savings_dynamic_inquiry',
|
|
660
|
+
auth: fisHorizonAuth,
|
|
661
|
+
displayName: 'Demand Deposit Savings - Dynamic Account Inquiry',
|
|
662
|
+
description: 'Retrieve account information for a Demand Deposit or Savings account. The digital signature determines which fields are returned.',
|
|
663
|
+
props: {
|
|
664
|
+
xAuthorization: Property.ShortText({
|
|
665
|
+
displayName: 'Authorization Token (JWT)',
|
|
666
|
+
description: 'The JWT token obtained from the Authorization - Get Token action',
|
|
667
|
+
required: true,
|
|
668
|
+
}),
|
|
669
|
+
sourceId: Property.ShortText({
|
|
670
|
+
displayName: 'Source ID',
|
|
671
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
672
|
+
required: false,
|
|
673
|
+
}),
|
|
674
|
+
digitalSignature: Property.ShortText({
|
|
675
|
+
displayName: 'Digital Signature',
|
|
676
|
+
description: 'Digital signature containing the list of fields in hexadecimal format. Generate using the Dynamic Signature action.',
|
|
677
|
+
required: true,
|
|
678
|
+
}),
|
|
679
|
+
accountNumber: Property.ShortText({
|
|
680
|
+
displayName: 'Account Number',
|
|
681
|
+
description: 'Up to 20 digit zero-filled account number',
|
|
682
|
+
required: true,
|
|
683
|
+
}),
|
|
684
|
+
applicationCode: Property.StaticDropdown({
|
|
685
|
+
displayName: 'Application Code',
|
|
686
|
+
description: 'The application type',
|
|
687
|
+
required: true,
|
|
688
|
+
options: {
|
|
689
|
+
options: [
|
|
690
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
691
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
692
|
+
],
|
|
693
|
+
},
|
|
694
|
+
}),
|
|
695
|
+
},
|
|
696
|
+
async run(context) {
|
|
697
|
+
const auth = context.auth as any;
|
|
698
|
+
const baseUrl = auth.baseUrl;
|
|
699
|
+
const organizationId = auth.organizationId;
|
|
700
|
+
const props = context.propsValue;
|
|
701
|
+
|
|
702
|
+
const uuid = crypto.randomUUID();
|
|
703
|
+
|
|
704
|
+
const headers: Record<string, string> = {
|
|
705
|
+
'accept': 'application/json',
|
|
706
|
+
'Content-Type': 'application/json',
|
|
707
|
+
'organization-id': organizationId,
|
|
708
|
+
'uuid': uuid,
|
|
709
|
+
'x-authorization': props.xAuthorization,
|
|
710
|
+
};
|
|
711
|
+
|
|
712
|
+
if (props.sourceId) {
|
|
713
|
+
headers['source-id'] = props.sourceId;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
const body: Record<string, unknown> = {
|
|
717
|
+
digitalSignature: props.digitalSignature,
|
|
718
|
+
accountNumber: props.accountNumber,
|
|
719
|
+
applicationCode: props.applicationCode,
|
|
720
|
+
};
|
|
721
|
+
|
|
722
|
+
const response = await httpClient.sendRequest({
|
|
723
|
+
method: HttpMethod.POST,
|
|
724
|
+
url: `${baseUrl}${API_PATH}/dynamic/accounts/inquiry`,
|
|
725
|
+
headers,
|
|
726
|
+
body,
|
|
727
|
+
});
|
|
728
|
+
|
|
729
|
+
return response.body;
|
|
730
|
+
},
|
|
731
|
+
});
|