@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,2427 @@
|
|
|
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
|
+
// HOLDS
|
|
10
|
+
// ============================================================================
|
|
11
|
+
|
|
12
|
+
export const account_restrictions_holds_get = createAction({
|
|
13
|
+
name: 'account_restrictions_holds_get',
|
|
14
|
+
auth: fisHorizonAuth,
|
|
15
|
+
displayName: 'Account Restrictions - Holds - Get',
|
|
16
|
+
description: 'Retrieve DD, SV, or LN hold records for a given account.',
|
|
17
|
+
props: {
|
|
18
|
+
xAuthorization: Property.ShortText({
|
|
19
|
+
displayName: 'Authorization Token',
|
|
20
|
+
description: 'JWT token from the authorization endpoint (Bearer token)',
|
|
21
|
+
required: true,
|
|
22
|
+
}),
|
|
23
|
+
applicationCode: Property.StaticDropdown({
|
|
24
|
+
displayName: 'Application Code',
|
|
25
|
+
description: 'Application type (DD - Demand Deposits, SV - Savings, LN - Loans)',
|
|
26
|
+
required: true,
|
|
27
|
+
options: {
|
|
28
|
+
options: [
|
|
29
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
30
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
31
|
+
{ label: 'LN - Loans', value: 'LN' },
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
}),
|
|
35
|
+
accountNumber: Property.ShortText({
|
|
36
|
+
displayName: 'Account Number',
|
|
37
|
+
description: 'Up to 20 digit zero filled account number',
|
|
38
|
+
required: true,
|
|
39
|
+
}),
|
|
40
|
+
firstNext: Property.StaticDropdown({
|
|
41
|
+
displayName: 'First/Next',
|
|
42
|
+
description: 'F - First request, N - Next request for additional records',
|
|
43
|
+
required: true,
|
|
44
|
+
options: {
|
|
45
|
+
options: [
|
|
46
|
+
{ label: 'F - First', value: 'F' },
|
|
47
|
+
{ label: 'N - Next', value: 'N' },
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
}),
|
|
51
|
+
returnNumber: Property.Number({
|
|
52
|
+
displayName: 'Return Number',
|
|
53
|
+
description: 'Number of records to return (1-999)',
|
|
54
|
+
required: true,
|
|
55
|
+
defaultValue: 999,
|
|
56
|
+
}),
|
|
57
|
+
sourceId: Property.ShortText({
|
|
58
|
+
displayName: 'Source ID',
|
|
59
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
60
|
+
required: false,
|
|
61
|
+
}),
|
|
62
|
+
},
|
|
63
|
+
async run(context) {
|
|
64
|
+
const auth = context.auth as any;
|
|
65
|
+
const baseUrl = auth.baseUrl;
|
|
66
|
+
const organizationId = auth.organizationId;
|
|
67
|
+
const { xAuthorization, applicationCode, accountNumber, firstNext, returnNumber, sourceId } = context.propsValue;
|
|
68
|
+
const uuid = crypto.randomUUID();
|
|
69
|
+
|
|
70
|
+
const headers: Record<string, string> = {
|
|
71
|
+
'accept': 'application/json',
|
|
72
|
+
'Content-Type': 'application/json',
|
|
73
|
+
'organization-id': organizationId,
|
|
74
|
+
'uuid': uuid,
|
|
75
|
+
'horizon-authorization': xAuthorization,
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
if (sourceId) {
|
|
79
|
+
headers['source-id'] = sourceId;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const response = await httpClient.sendRequest({
|
|
83
|
+
method: HttpMethod.GET,
|
|
84
|
+
url: `${baseUrl}/account-restrictions/v1/accounts/${applicationCode}/${accountNumber}/transactions/posting-restrictions/holds`,
|
|
85
|
+
headers,
|
|
86
|
+
queryParams: {
|
|
87
|
+
firstNext: firstNext,
|
|
88
|
+
returnNumber: String(returnNumber),
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
return response.body;
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
export const account_restrictions_holds_add = createAction({
|
|
97
|
+
name: 'account_restrictions_holds_add',
|
|
98
|
+
auth: fisHorizonAuth,
|
|
99
|
+
displayName: 'Account Restrictions - Holds - Add',
|
|
100
|
+
description: 'Add a Hold to a given DD/SV/LN account.',
|
|
101
|
+
props: {
|
|
102
|
+
xAuthorization: Property.ShortText({
|
|
103
|
+
displayName: 'Authorization Token',
|
|
104
|
+
description: 'JWT token from the authorization endpoint (Bearer token)',
|
|
105
|
+
required: true,
|
|
106
|
+
}),
|
|
107
|
+
applicationCode: Property.StaticDropdown({
|
|
108
|
+
displayName: 'Application Code',
|
|
109
|
+
description: 'Application type (DD - Demand Deposits, SV - Savings, LN - Loans)',
|
|
110
|
+
required: true,
|
|
111
|
+
options: {
|
|
112
|
+
options: [
|
|
113
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
114
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
115
|
+
{ label: 'LN - Loans', value: 'LN' },
|
|
116
|
+
],
|
|
117
|
+
},
|
|
118
|
+
}),
|
|
119
|
+
accountNumber: Property.ShortText({
|
|
120
|
+
displayName: 'Account Number',
|
|
121
|
+
description: 'Up to 20 digit zero filled account number',
|
|
122
|
+
required: true,
|
|
123
|
+
}),
|
|
124
|
+
amount: Property.Number({
|
|
125
|
+
displayName: 'Amount',
|
|
126
|
+
description: 'Hold amount (up to 13 digits)',
|
|
127
|
+
required: true,
|
|
128
|
+
}),
|
|
129
|
+
expirationDate: Property.Number({
|
|
130
|
+
displayName: 'Expiration Date',
|
|
131
|
+
description: 'Expiration date in YYYYMMDD format (e.g., 20211231)',
|
|
132
|
+
required: true,
|
|
133
|
+
}),
|
|
134
|
+
description: Property.ShortText({
|
|
135
|
+
displayName: 'Description',
|
|
136
|
+
description: 'Payee/Reason/Description (max 25 characters)',
|
|
137
|
+
required: false,
|
|
138
|
+
}),
|
|
139
|
+
holdType: Property.Number({
|
|
140
|
+
displayName: 'Hold Type',
|
|
141
|
+
description: 'Hold Type (00-09)',
|
|
142
|
+
required: false,
|
|
143
|
+
defaultValue: 0,
|
|
144
|
+
}),
|
|
145
|
+
elementSource: Property.ShortText({
|
|
146
|
+
displayName: 'Element Source',
|
|
147
|
+
description: 'Element Source (e.g., ALK)',
|
|
148
|
+
required: false,
|
|
149
|
+
}),
|
|
150
|
+
subSource: Property.ShortText({
|
|
151
|
+
displayName: 'Sub Source',
|
|
152
|
+
description: 'User defined value that identifies transmitting vendor',
|
|
153
|
+
required: false,
|
|
154
|
+
}),
|
|
155
|
+
overrideFlag: Property.ShortText({
|
|
156
|
+
displayName: 'Override Flag',
|
|
157
|
+
description: 'Y to override (only works for error 16, 17, or 32)',
|
|
158
|
+
required: false,
|
|
159
|
+
}),
|
|
160
|
+
sourceId: Property.ShortText({
|
|
161
|
+
displayName: 'Source ID',
|
|
162
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
163
|
+
required: false,
|
|
164
|
+
}),
|
|
165
|
+
},
|
|
166
|
+
async run(context) {
|
|
167
|
+
const auth = context.auth as any;
|
|
168
|
+
const baseUrl = auth.baseUrl;
|
|
169
|
+
const organizationId = auth.organizationId;
|
|
170
|
+
const { xAuthorization, applicationCode, accountNumber, amount, expirationDate, description, holdType, elementSource, subSource, overrideFlag, sourceId } = context.propsValue;
|
|
171
|
+
const uuid = crypto.randomUUID();
|
|
172
|
+
|
|
173
|
+
const headers: Record<string, string> = {
|
|
174
|
+
'accept': 'application/json',
|
|
175
|
+
'Content-Type': 'application/json',
|
|
176
|
+
'organization-id': organizationId,
|
|
177
|
+
'uuid': uuid,
|
|
178
|
+
'horizon-authorization': xAuthorization,
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
if (sourceId) {
|
|
182
|
+
headers['source-id'] = sourceId;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
const body: Record<string, any> = {
|
|
186
|
+
amount: amount,
|
|
187
|
+
expirationDate: expirationDate,
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
if (description) {
|
|
191
|
+
body['description'] = description;
|
|
192
|
+
}
|
|
193
|
+
if (holdType !== undefined && holdType !== null) {
|
|
194
|
+
body['holdType'] = holdType;
|
|
195
|
+
}
|
|
196
|
+
if (elementSource) {
|
|
197
|
+
body['elementSource'] = elementSource;
|
|
198
|
+
}
|
|
199
|
+
if (subSource) {
|
|
200
|
+
body['subSource'] = subSource;
|
|
201
|
+
}
|
|
202
|
+
if (overrideFlag) {
|
|
203
|
+
body['overrideFlag'] = overrideFlag;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
const response = await httpClient.sendRequest({
|
|
207
|
+
method: HttpMethod.POST,
|
|
208
|
+
url: `${baseUrl}/account-restrictions/v1/accounts/${applicationCode}/${accountNumber}/transactions/posting-restrictions/holds`,
|
|
209
|
+
headers,
|
|
210
|
+
body,
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
return response.body;
|
|
214
|
+
},
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
export const account_restrictions_holds_delete = createAction({
|
|
218
|
+
name: 'account_restrictions_holds_delete',
|
|
219
|
+
auth: fisHorizonAuth,
|
|
220
|
+
displayName: 'Account Restrictions - Holds - Delete',
|
|
221
|
+
description: 'Delete a Hold for a given DD/SV/LN account.',
|
|
222
|
+
props: {
|
|
223
|
+
xAuthorization: Property.ShortText({
|
|
224
|
+
displayName: 'Authorization Token',
|
|
225
|
+
description: 'JWT token from the authorization endpoint (Bearer token)',
|
|
226
|
+
required: true,
|
|
227
|
+
}),
|
|
228
|
+
applicationCode: Property.StaticDropdown({
|
|
229
|
+
displayName: 'Application Code',
|
|
230
|
+
description: 'Application type (DD - Demand Deposits, SV - Savings, LN - Loans)',
|
|
231
|
+
required: true,
|
|
232
|
+
options: {
|
|
233
|
+
options: [
|
|
234
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
235
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
236
|
+
{ label: 'LN - Loans', value: 'LN' },
|
|
237
|
+
],
|
|
238
|
+
},
|
|
239
|
+
}),
|
|
240
|
+
accountNumber: Property.ShortText({
|
|
241
|
+
displayName: 'Account Number',
|
|
242
|
+
description: 'Up to 20 digit zero filled account number',
|
|
243
|
+
required: true,
|
|
244
|
+
}),
|
|
245
|
+
amount: Property.Number({
|
|
246
|
+
displayName: 'Amount',
|
|
247
|
+
description: 'Hold amount to delete (up to 13 digits)',
|
|
248
|
+
required: true,
|
|
249
|
+
}),
|
|
250
|
+
expirationDate: Property.Number({
|
|
251
|
+
displayName: 'Expiration Date',
|
|
252
|
+
description: 'Expiration date in YYYYMMDD format',
|
|
253
|
+
required: false,
|
|
254
|
+
}),
|
|
255
|
+
description: Property.ShortText({
|
|
256
|
+
displayName: 'Description',
|
|
257
|
+
description: 'Payee/Reason/Description (max 25 characters)',
|
|
258
|
+
required: false,
|
|
259
|
+
}),
|
|
260
|
+
holdType: Property.Number({
|
|
261
|
+
displayName: 'Hold Type',
|
|
262
|
+
description: 'Hold Type (00-09)',
|
|
263
|
+
required: false,
|
|
264
|
+
}),
|
|
265
|
+
elementSource: Property.ShortText({
|
|
266
|
+
displayName: 'Element Source',
|
|
267
|
+
description: 'Element Source (e.g., ALK)',
|
|
268
|
+
required: false,
|
|
269
|
+
}),
|
|
270
|
+
subSource: Property.ShortText({
|
|
271
|
+
displayName: 'Sub Source',
|
|
272
|
+
description: 'User defined value that identifies transmitting vendor',
|
|
273
|
+
required: false,
|
|
274
|
+
}),
|
|
275
|
+
overrideFlag: Property.ShortText({
|
|
276
|
+
displayName: 'Override Flag',
|
|
277
|
+
description: 'Y to override (only works for error 16, 17, or 32)',
|
|
278
|
+
required: false,
|
|
279
|
+
}),
|
|
280
|
+
sourceId: Property.ShortText({
|
|
281
|
+
displayName: 'Source ID',
|
|
282
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
283
|
+
required: false,
|
|
284
|
+
}),
|
|
285
|
+
},
|
|
286
|
+
async run(context) {
|
|
287
|
+
const auth = context.auth as any;
|
|
288
|
+
const baseUrl = auth.baseUrl;
|
|
289
|
+
const organizationId = auth.organizationId;
|
|
290
|
+
const { xAuthorization, applicationCode, accountNumber, amount, expirationDate, description, holdType, elementSource, subSource, overrideFlag, sourceId } = context.propsValue;
|
|
291
|
+
const uuid = crypto.randomUUID();
|
|
292
|
+
|
|
293
|
+
const headers: Record<string, string> = {
|
|
294
|
+
'accept': 'application/json',
|
|
295
|
+
'Content-Type': 'application/json',
|
|
296
|
+
'organization-id': organizationId,
|
|
297
|
+
'uuid': uuid,
|
|
298
|
+
'horizon-authorization': xAuthorization,
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
if (sourceId) {
|
|
302
|
+
headers['source-id'] = sourceId;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
const body: Record<string, any> = {
|
|
306
|
+
amount: amount,
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
if (expirationDate) {
|
|
310
|
+
body['expirationDate'] = expirationDate;
|
|
311
|
+
}
|
|
312
|
+
if (description) {
|
|
313
|
+
body['description'] = description;
|
|
314
|
+
}
|
|
315
|
+
if (holdType !== undefined && holdType !== null) {
|
|
316
|
+
body['holdType'] = holdType;
|
|
317
|
+
}
|
|
318
|
+
if (elementSource) {
|
|
319
|
+
body['elementSource'] = elementSource;
|
|
320
|
+
}
|
|
321
|
+
if (subSource) {
|
|
322
|
+
body['subSource'] = subSource;
|
|
323
|
+
}
|
|
324
|
+
if (overrideFlag) {
|
|
325
|
+
body['overrideFlag'] = overrideFlag;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
const response = await httpClient.sendRequest({
|
|
329
|
+
method: HttpMethod.POST,
|
|
330
|
+
url: `${baseUrl}/account-restrictions/v1/accounts/${applicationCode}/${accountNumber}/transactions/posting-restrictions/delete-holds`,
|
|
331
|
+
headers,
|
|
332
|
+
body,
|
|
333
|
+
});
|
|
334
|
+
|
|
335
|
+
return response.body;
|
|
336
|
+
},
|
|
337
|
+
});
|
|
338
|
+
|
|
339
|
+
// ============================================================================
|
|
340
|
+
// STOPS
|
|
341
|
+
// ============================================================================
|
|
342
|
+
|
|
343
|
+
export const account_restrictions_stops_get = createAction({
|
|
344
|
+
name: 'account_restrictions_stops_get',
|
|
345
|
+
auth: fisHorizonAuth,
|
|
346
|
+
displayName: 'Account Restrictions - Stops - Get',
|
|
347
|
+
description: 'Retrieve DD, SV, or LN stop records for a given account.',
|
|
348
|
+
props: {
|
|
349
|
+
xAuthorization: Property.ShortText({
|
|
350
|
+
displayName: 'Authorization Token',
|
|
351
|
+
description: 'JWT token from the authorization endpoint (Bearer token)',
|
|
352
|
+
required: true,
|
|
353
|
+
}),
|
|
354
|
+
applicationCode: Property.StaticDropdown({
|
|
355
|
+
displayName: 'Application Code',
|
|
356
|
+
description: 'Application type (DD - Demand Deposits, SV - Savings, LN - Loans)',
|
|
357
|
+
required: true,
|
|
358
|
+
options: {
|
|
359
|
+
options: [
|
|
360
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
361
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
362
|
+
{ label: 'LN - Loans', value: 'LN' },
|
|
363
|
+
],
|
|
364
|
+
},
|
|
365
|
+
}),
|
|
366
|
+
accountNumber: Property.ShortText({
|
|
367
|
+
displayName: 'Account Number',
|
|
368
|
+
description: 'Up to 20 digit zero filled account number',
|
|
369
|
+
required: true,
|
|
370
|
+
}),
|
|
371
|
+
firstNext: Property.StaticDropdown({
|
|
372
|
+
displayName: 'First/Next',
|
|
373
|
+
description: 'F - First request, N - Next request for additional records',
|
|
374
|
+
required: false,
|
|
375
|
+
defaultValue: 'F',
|
|
376
|
+
options: {
|
|
377
|
+
options: [
|
|
378
|
+
{ label: 'F - First', value: 'F' },
|
|
379
|
+
{ label: 'N - Next', value: 'N' },
|
|
380
|
+
],
|
|
381
|
+
},
|
|
382
|
+
}),
|
|
383
|
+
returnNumber: Property.Number({
|
|
384
|
+
displayName: 'Return Number',
|
|
385
|
+
description: 'Number of records to return (1-999)',
|
|
386
|
+
required: false,
|
|
387
|
+
defaultValue: 1,
|
|
388
|
+
}),
|
|
389
|
+
sourceId: Property.ShortText({
|
|
390
|
+
displayName: 'Source ID',
|
|
391
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
392
|
+
required: false,
|
|
393
|
+
}),
|
|
394
|
+
},
|
|
395
|
+
async run(context) {
|
|
396
|
+
const auth = context.auth as any;
|
|
397
|
+
const baseUrl = auth.baseUrl;
|
|
398
|
+
const organizationId = auth.organizationId;
|
|
399
|
+
const { xAuthorization, applicationCode, accountNumber, firstNext, returnNumber, sourceId } = context.propsValue;
|
|
400
|
+
const uuid = crypto.randomUUID();
|
|
401
|
+
|
|
402
|
+
const headers: Record<string, string> = {
|
|
403
|
+
'accept': 'application/json',
|
|
404
|
+
'Content-Type': 'application/json',
|
|
405
|
+
'organization-id': organizationId,
|
|
406
|
+
'uuid': uuid,
|
|
407
|
+
'horizon-authorization': xAuthorization,
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
if (sourceId) {
|
|
411
|
+
headers['source-id'] = sourceId;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
const queryParams: Record<string, string> = {};
|
|
415
|
+
if (firstNext) {
|
|
416
|
+
queryParams['firstNext'] = firstNext;
|
|
417
|
+
}
|
|
418
|
+
if (returnNumber) {
|
|
419
|
+
queryParams['returnNumber'] = String(returnNumber);
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
const response = await httpClient.sendRequest({
|
|
423
|
+
method: HttpMethod.GET,
|
|
424
|
+
url: `${baseUrl}/account-restrictions/v1/accounts/${applicationCode}/${accountNumber}/transactions/posting-restrictions/stops`,
|
|
425
|
+
headers,
|
|
426
|
+
queryParams,
|
|
427
|
+
});
|
|
428
|
+
|
|
429
|
+
return response.body;
|
|
430
|
+
},
|
|
431
|
+
});
|
|
432
|
+
|
|
433
|
+
export const account_restrictions_stops_add = createAction({
|
|
434
|
+
name: 'account_restrictions_stops_add',
|
|
435
|
+
auth: fisHorizonAuth,
|
|
436
|
+
displayName: 'Account Restrictions - Stops - Add',
|
|
437
|
+
description: 'Add a Stop to a given DD/SV/LN account.',
|
|
438
|
+
props: {
|
|
439
|
+
xAuthorization: Property.ShortText({
|
|
440
|
+
displayName: 'Authorization Token',
|
|
441
|
+
description: 'JWT token from the authorization endpoint (Bearer token)',
|
|
442
|
+
required: true,
|
|
443
|
+
}),
|
|
444
|
+
applicationCode: Property.StaticDropdown({
|
|
445
|
+
displayName: 'Application Code',
|
|
446
|
+
description: 'Application type (DD - Demand Deposits, SV - Savings, LN - Loans)',
|
|
447
|
+
required: true,
|
|
448
|
+
options: {
|
|
449
|
+
options: [
|
|
450
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
451
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
452
|
+
{ label: 'LN - Loans', value: 'LN' },
|
|
453
|
+
],
|
|
454
|
+
},
|
|
455
|
+
}),
|
|
456
|
+
accountNumber: Property.ShortText({
|
|
457
|
+
displayName: 'Account Number',
|
|
458
|
+
description: 'Up to 20 digit zero filled account number',
|
|
459
|
+
required: true,
|
|
460
|
+
}),
|
|
461
|
+
amount: Property.Number({
|
|
462
|
+
displayName: 'Amount',
|
|
463
|
+
description: 'Stop amount',
|
|
464
|
+
required: true,
|
|
465
|
+
}),
|
|
466
|
+
amountLimit: Property.Number({
|
|
467
|
+
displayName: 'Amount Limit',
|
|
468
|
+
description: 'Amount/Limit (up to 11 digits)',
|
|
469
|
+
required: true,
|
|
470
|
+
}),
|
|
471
|
+
checkNumber: Property.Number({
|
|
472
|
+
displayName: 'Check Number',
|
|
473
|
+
description: 'Check Number of the Transaction',
|
|
474
|
+
required: true,
|
|
475
|
+
}),
|
|
476
|
+
checkDate: Property.Number({
|
|
477
|
+
displayName: 'Check Date',
|
|
478
|
+
description: 'Check/Request Date in YYYYMMDD format',
|
|
479
|
+
required: true,
|
|
480
|
+
}),
|
|
481
|
+
expirationDate: Property.Number({
|
|
482
|
+
displayName: 'Expiration Date',
|
|
483
|
+
description: 'Expiration date in YYYYMMDD format',
|
|
484
|
+
required: true,
|
|
485
|
+
}),
|
|
486
|
+
userId: Property.ShortText({
|
|
487
|
+
displayName: 'User ID',
|
|
488
|
+
description: 'User ID (max 10 characters)',
|
|
489
|
+
required: true,
|
|
490
|
+
}),
|
|
491
|
+
description: Property.ShortText({
|
|
492
|
+
displayName: 'Description',
|
|
493
|
+
description: 'Payee/Reason/Description (max 25 characters)',
|
|
494
|
+
required: false,
|
|
495
|
+
}),
|
|
496
|
+
lowRangeCheckNumber: Property.Number({
|
|
497
|
+
displayName: 'Low Range Check Number',
|
|
498
|
+
description: 'Check number Low range',
|
|
499
|
+
required: false,
|
|
500
|
+
}),
|
|
501
|
+
highRangeCheckNumber: Property.Number({
|
|
502
|
+
displayName: 'High Range Check Number',
|
|
503
|
+
description: 'Check number High range',
|
|
504
|
+
required: false,
|
|
505
|
+
}),
|
|
506
|
+
deleteMatchCode: Property.StaticDropdown({
|
|
507
|
+
displayName: 'Delete Match Code',
|
|
508
|
+
description: 'Delete match code for stop deletion',
|
|
509
|
+
required: false,
|
|
510
|
+
options: {
|
|
511
|
+
options: [
|
|
512
|
+
{ label: '1 - Delete 1st match on Acct/Check', value: '1' },
|
|
513
|
+
{ label: '2 - Delete 1st match on Acct/Amount', value: '2' },
|
|
514
|
+
{ label: '3 - Delete 1st match on Acct/Chk#/Amount', value: '3' },
|
|
515
|
+
{ label: 'Blank - Add', value: '' },
|
|
516
|
+
],
|
|
517
|
+
},
|
|
518
|
+
}),
|
|
519
|
+
individualId: Property.ShortText({
|
|
520
|
+
displayName: 'Individual ID',
|
|
521
|
+
description: 'Individual ID (max 22 characters)',
|
|
522
|
+
required: false,
|
|
523
|
+
}),
|
|
524
|
+
returnReason: Property.StaticDropdown({
|
|
525
|
+
displayName: 'Return Reason',
|
|
526
|
+
description: 'Return Reason',
|
|
527
|
+
required: false,
|
|
528
|
+
options: {
|
|
529
|
+
options: [
|
|
530
|
+
{ label: 'R02', value: 'R02' },
|
|
531
|
+
{ label: 'R07', value: 'R07' },
|
|
532
|
+
{ label: 'R08', value: 'R08' },
|
|
533
|
+
{ label: 'R10', value: 'R10' },
|
|
534
|
+
{ label: 'R14', value: 'R14' },
|
|
535
|
+
{ label: 'R15', value: 'R15' },
|
|
536
|
+
{ label: 'R16', value: 'R16' },
|
|
537
|
+
{ label: 'R29', value: 'R29' },
|
|
538
|
+
],
|
|
539
|
+
},
|
|
540
|
+
}),
|
|
541
|
+
dateOfDeath: Property.Number({
|
|
542
|
+
displayName: 'Date of Death',
|
|
543
|
+
description: 'Date of Death in YYYYMMDD format',
|
|
544
|
+
required: false,
|
|
545
|
+
}),
|
|
546
|
+
companyId: Property.StaticDropdown({
|
|
547
|
+
displayName: 'Company ID',
|
|
548
|
+
description: 'Company ID',
|
|
549
|
+
required: false,
|
|
550
|
+
options: {
|
|
551
|
+
options: [
|
|
552
|
+
{ label: 'STPALLACH', value: 'STPALLACH' },
|
|
553
|
+
{ label: 'STPACHCR', value: 'STPACHCR' },
|
|
554
|
+
{ label: 'STPACHDR', value: 'STPACHDR' },
|
|
555
|
+
{ label: 'SUSALLACH', value: 'SUSALLACH' },
|
|
556
|
+
{ label: 'SUSACHCR', value: 'SUSACHCR' },
|
|
557
|
+
{ label: 'SUSACHDR', value: 'SUSACHDR' },
|
|
558
|
+
],
|
|
559
|
+
},
|
|
560
|
+
}),
|
|
561
|
+
stopType: Property.Number({
|
|
562
|
+
displayName: 'Stop Type',
|
|
563
|
+
description: 'Stop Payment Type (0-9)',
|
|
564
|
+
required: false,
|
|
565
|
+
}),
|
|
566
|
+
elementSource: Property.ShortText({
|
|
567
|
+
displayName: 'Element Source',
|
|
568
|
+
description: 'Element Source (e.g., ALK)',
|
|
569
|
+
required: false,
|
|
570
|
+
}),
|
|
571
|
+
subSource: Property.ShortText({
|
|
572
|
+
displayName: 'Sub Source',
|
|
573
|
+
description: 'User defined value that identifies transmitting vendor',
|
|
574
|
+
required: false,
|
|
575
|
+
}),
|
|
576
|
+
overrideFlag: Property.ShortText({
|
|
577
|
+
displayName: 'Override Flag',
|
|
578
|
+
description: 'Y to override (only works for error 16, 17, or 32)',
|
|
579
|
+
required: false,
|
|
580
|
+
}),
|
|
581
|
+
sourceId: Property.ShortText({
|
|
582
|
+
displayName: 'Source ID',
|
|
583
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
584
|
+
required: false,
|
|
585
|
+
}),
|
|
586
|
+
},
|
|
587
|
+
async run(context) {
|
|
588
|
+
const auth = context.auth as any;
|
|
589
|
+
const baseUrl = auth.baseUrl;
|
|
590
|
+
const organizationId = auth.organizationId;
|
|
591
|
+
const { xAuthorization, applicationCode, accountNumber, amount, amountLimit, checkNumber, checkDate, expirationDate, userId, description, lowRangeCheckNumber, highRangeCheckNumber, deleteMatchCode, individualId, returnReason, dateOfDeath, companyId, stopType, elementSource, subSource, overrideFlag, sourceId } = context.propsValue;
|
|
592
|
+
const uuid = crypto.randomUUID();
|
|
593
|
+
|
|
594
|
+
const headers: Record<string, string> = {
|
|
595
|
+
'accept': 'application/json',
|
|
596
|
+
'Content-Type': 'application/json',
|
|
597
|
+
'organization-id': organizationId,
|
|
598
|
+
'uuid': uuid,
|
|
599
|
+
'horizon-authorization': xAuthorization,
|
|
600
|
+
};
|
|
601
|
+
|
|
602
|
+
if (sourceId) {
|
|
603
|
+
headers['source-id'] = sourceId;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
const body: Record<string, any> = {
|
|
607
|
+
amount: amount,
|
|
608
|
+
amountLimit: amountLimit,
|
|
609
|
+
checkNumber: checkNumber,
|
|
610
|
+
checkDate: checkDate,
|
|
611
|
+
expirationDate: expirationDate,
|
|
612
|
+
userId: userId,
|
|
613
|
+
};
|
|
614
|
+
|
|
615
|
+
if (description) {
|
|
616
|
+
body['description'] = description;
|
|
617
|
+
}
|
|
618
|
+
if (lowRangeCheckNumber !== undefined && lowRangeCheckNumber !== null) {
|
|
619
|
+
body['lowRangeCheckNumber'] = lowRangeCheckNumber;
|
|
620
|
+
}
|
|
621
|
+
if (highRangeCheckNumber !== undefined && highRangeCheckNumber !== null) {
|
|
622
|
+
body['highRangeCheckNumber'] = highRangeCheckNumber;
|
|
623
|
+
}
|
|
624
|
+
if (deleteMatchCode) {
|
|
625
|
+
body['deleteMatchCode'] = deleteMatchCode;
|
|
626
|
+
}
|
|
627
|
+
if (individualId) {
|
|
628
|
+
body['individualId'] = individualId;
|
|
629
|
+
}
|
|
630
|
+
if (returnReason) {
|
|
631
|
+
body['returnReason'] = returnReason;
|
|
632
|
+
}
|
|
633
|
+
if (dateOfDeath !== undefined && dateOfDeath !== null) {
|
|
634
|
+
body['dateOfDeath'] = dateOfDeath;
|
|
635
|
+
}
|
|
636
|
+
if (companyId) {
|
|
637
|
+
body['companyId'] = companyId;
|
|
638
|
+
}
|
|
639
|
+
if (stopType !== undefined && stopType !== null) {
|
|
640
|
+
body['stopType'] = stopType;
|
|
641
|
+
}
|
|
642
|
+
if (elementSource) {
|
|
643
|
+
body['elementSource'] = elementSource;
|
|
644
|
+
}
|
|
645
|
+
if (subSource) {
|
|
646
|
+
body['subSource'] = subSource;
|
|
647
|
+
}
|
|
648
|
+
if (overrideFlag) {
|
|
649
|
+
body['overrideFlag'] = overrideFlag;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
const response = await httpClient.sendRequest({
|
|
653
|
+
method: HttpMethod.POST,
|
|
654
|
+
url: `${baseUrl}/account-restrictions/v1/accounts/${applicationCode}/${accountNumber}/transactions/posting-restrictions/stops`,
|
|
655
|
+
headers,
|
|
656
|
+
body,
|
|
657
|
+
});
|
|
658
|
+
|
|
659
|
+
return response.body;
|
|
660
|
+
},
|
|
661
|
+
});
|
|
662
|
+
|
|
663
|
+
export const account_restrictions_stops_delete = createAction({
|
|
664
|
+
name: 'account_restrictions_stops_delete',
|
|
665
|
+
auth: fisHorizonAuth,
|
|
666
|
+
displayName: 'Account Restrictions - Stops - Delete',
|
|
667
|
+
description: 'Delete a Stop for a given DD/SV/LN account.',
|
|
668
|
+
props: {
|
|
669
|
+
xAuthorization: Property.ShortText({
|
|
670
|
+
displayName: 'Authorization Token',
|
|
671
|
+
description: 'JWT token from the authorization endpoint (Bearer token)',
|
|
672
|
+
required: true,
|
|
673
|
+
}),
|
|
674
|
+
applicationCode: Property.StaticDropdown({
|
|
675
|
+
displayName: 'Application Code',
|
|
676
|
+
description: 'Application type (DD - Demand Deposits, SV - Savings, LN - Loans)',
|
|
677
|
+
required: true,
|
|
678
|
+
options: {
|
|
679
|
+
options: [
|
|
680
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
681
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
682
|
+
{ label: 'LN - Loans', value: 'LN' },
|
|
683
|
+
],
|
|
684
|
+
},
|
|
685
|
+
}),
|
|
686
|
+
accountNumber: Property.ShortText({
|
|
687
|
+
displayName: 'Account Number',
|
|
688
|
+
description: 'Up to 20 digit zero filled account number',
|
|
689
|
+
required: true,
|
|
690
|
+
}),
|
|
691
|
+
amount: Property.Number({
|
|
692
|
+
displayName: 'Amount',
|
|
693
|
+
description: 'Stop amount',
|
|
694
|
+
required: true,
|
|
695
|
+
}),
|
|
696
|
+
amountLimit: Property.Number({
|
|
697
|
+
displayName: 'Amount Limit',
|
|
698
|
+
description: 'Amount/Limit (up to 11 digits)',
|
|
699
|
+
required: true,
|
|
700
|
+
}),
|
|
701
|
+
checkNumber: Property.Number({
|
|
702
|
+
displayName: 'Check Number',
|
|
703
|
+
description: 'Check Number of the Transaction',
|
|
704
|
+
required: true,
|
|
705
|
+
}),
|
|
706
|
+
checkDate: Property.Number({
|
|
707
|
+
displayName: 'Check Date',
|
|
708
|
+
description: 'Check/Request Date in YYYYMMDD format',
|
|
709
|
+
required: true,
|
|
710
|
+
}),
|
|
711
|
+
expirationDate: Property.Number({
|
|
712
|
+
displayName: 'Expiration Date',
|
|
713
|
+
description: 'Expiration date in YYYYMMDD format',
|
|
714
|
+
required: true,
|
|
715
|
+
}),
|
|
716
|
+
userId: Property.ShortText({
|
|
717
|
+
displayName: 'User ID',
|
|
718
|
+
description: 'User ID (max 10 characters)',
|
|
719
|
+
required: true,
|
|
720
|
+
}),
|
|
721
|
+
deleteMatchCode: Property.StaticDropdown({
|
|
722
|
+
displayName: 'Delete Match Code',
|
|
723
|
+
description: 'Delete match code',
|
|
724
|
+
required: false,
|
|
725
|
+
defaultValue: '2',
|
|
726
|
+
options: {
|
|
727
|
+
options: [
|
|
728
|
+
{ label: '1 - Delete 1st match on Acct/Check', value: '1' },
|
|
729
|
+
{ label: '2 - Delete 1st match on Acct/Amount', value: '2' },
|
|
730
|
+
{ label: '3 - Delete 1st match on Acct/Chk#/Amount', value: '3' },
|
|
731
|
+
],
|
|
732
|
+
},
|
|
733
|
+
}),
|
|
734
|
+
description: Property.ShortText({
|
|
735
|
+
displayName: 'Description',
|
|
736
|
+
description: 'Payee/Reason/Description (max 25 characters)',
|
|
737
|
+
required: false,
|
|
738
|
+
}),
|
|
739
|
+
lowRangeCheckNumber: Property.Number({
|
|
740
|
+
displayName: 'Low Range Check Number',
|
|
741
|
+
description: 'Check number Low range',
|
|
742
|
+
required: false,
|
|
743
|
+
}),
|
|
744
|
+
highRangeCheckNumber: Property.Number({
|
|
745
|
+
displayName: 'High Range Check Number',
|
|
746
|
+
description: 'Check number High range',
|
|
747
|
+
required: false,
|
|
748
|
+
}),
|
|
749
|
+
individualId: Property.ShortText({
|
|
750
|
+
displayName: 'Individual ID',
|
|
751
|
+
description: 'Individual ID (max 22 characters)',
|
|
752
|
+
required: false,
|
|
753
|
+
}),
|
|
754
|
+
returnReason: Property.StaticDropdown({
|
|
755
|
+
displayName: 'Return Reason',
|
|
756
|
+
description: 'Return Reason',
|
|
757
|
+
required: false,
|
|
758
|
+
options: {
|
|
759
|
+
options: [
|
|
760
|
+
{ label: 'R02', value: 'R02' },
|
|
761
|
+
{ label: 'R07', value: 'R07' },
|
|
762
|
+
{ label: 'R08', value: 'R08' },
|
|
763
|
+
{ label: 'R10', value: 'R10' },
|
|
764
|
+
{ label: 'R14', value: 'R14' },
|
|
765
|
+
{ label: 'R15', value: 'R15' },
|
|
766
|
+
{ label: 'R16', value: 'R16' },
|
|
767
|
+
{ label: 'R29', value: 'R29' },
|
|
768
|
+
],
|
|
769
|
+
},
|
|
770
|
+
}),
|
|
771
|
+
dateOfDeath: Property.Number({
|
|
772
|
+
displayName: 'Date of Death',
|
|
773
|
+
description: 'Date of Death in YYYYMMDD format',
|
|
774
|
+
required: false,
|
|
775
|
+
}),
|
|
776
|
+
companyId: Property.StaticDropdown({
|
|
777
|
+
displayName: 'Company ID',
|
|
778
|
+
description: 'Company ID',
|
|
779
|
+
required: false,
|
|
780
|
+
options: {
|
|
781
|
+
options: [
|
|
782
|
+
{ label: 'STPALLACH', value: 'STPALLACH' },
|
|
783
|
+
{ label: 'STPACHCR', value: 'STPACHCR' },
|
|
784
|
+
{ label: 'STPACHDR', value: 'STPACHDR' },
|
|
785
|
+
{ label: 'SUSALLACH', value: 'SUSALLACH' },
|
|
786
|
+
{ label: 'SUSACHCR', value: 'SUSACHCR' },
|
|
787
|
+
{ label: 'SUSACHDR', value: 'SUSACHDR' },
|
|
788
|
+
],
|
|
789
|
+
},
|
|
790
|
+
}),
|
|
791
|
+
stopType: Property.Number({
|
|
792
|
+
displayName: 'Stop Type',
|
|
793
|
+
description: 'Stop Payment Type (0-9)',
|
|
794
|
+
required: false,
|
|
795
|
+
}),
|
|
796
|
+
elementSource: Property.ShortText({
|
|
797
|
+
displayName: 'Element Source',
|
|
798
|
+
description: 'Element Source (e.g., ALK)',
|
|
799
|
+
required: false,
|
|
800
|
+
}),
|
|
801
|
+
subSource: Property.ShortText({
|
|
802
|
+
displayName: 'Sub Source',
|
|
803
|
+
description: 'User defined value that identifies transmitting vendor',
|
|
804
|
+
required: false,
|
|
805
|
+
}),
|
|
806
|
+
overrideFlag: Property.ShortText({
|
|
807
|
+
displayName: 'Override Flag',
|
|
808
|
+
description: 'Y to override (only works for error 16, 17, or 32)',
|
|
809
|
+
required: false,
|
|
810
|
+
}),
|
|
811
|
+
sourceId: Property.ShortText({
|
|
812
|
+
displayName: 'Source ID',
|
|
813
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
814
|
+
required: false,
|
|
815
|
+
}),
|
|
816
|
+
},
|
|
817
|
+
async run(context) {
|
|
818
|
+
const auth = context.auth as any;
|
|
819
|
+
const baseUrl = auth.baseUrl;
|
|
820
|
+
const organizationId = auth.organizationId;
|
|
821
|
+
const { xAuthorization, applicationCode, accountNumber, amount, amountLimit, checkNumber, checkDate, expirationDate, userId, deleteMatchCode, description, lowRangeCheckNumber, highRangeCheckNumber, individualId, returnReason, dateOfDeath, companyId, stopType, elementSource, subSource, overrideFlag, sourceId } = context.propsValue;
|
|
822
|
+
const uuid = crypto.randomUUID();
|
|
823
|
+
|
|
824
|
+
const headers: Record<string, string> = {
|
|
825
|
+
'accept': 'application/json',
|
|
826
|
+
'Content-Type': 'application/json',
|
|
827
|
+
'organization-id': organizationId,
|
|
828
|
+
'uuid': uuid,
|
|
829
|
+
'horizon-authorization': xAuthorization,
|
|
830
|
+
};
|
|
831
|
+
|
|
832
|
+
if (sourceId) {
|
|
833
|
+
headers['source-id'] = sourceId;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
const body: Record<string, any> = {
|
|
837
|
+
amount: amount,
|
|
838
|
+
amountLimit: amountLimit,
|
|
839
|
+
checkNumber: checkNumber,
|
|
840
|
+
checkDate: checkDate,
|
|
841
|
+
expirationDate: expirationDate,
|
|
842
|
+
userId: userId,
|
|
843
|
+
};
|
|
844
|
+
|
|
845
|
+
if (deleteMatchCode) {
|
|
846
|
+
body['deleteMatchCode'] = deleteMatchCode;
|
|
847
|
+
}
|
|
848
|
+
if (description) {
|
|
849
|
+
body['description'] = description;
|
|
850
|
+
}
|
|
851
|
+
if (lowRangeCheckNumber !== undefined && lowRangeCheckNumber !== null) {
|
|
852
|
+
body['lowRangeCheckNumber'] = lowRangeCheckNumber;
|
|
853
|
+
}
|
|
854
|
+
if (highRangeCheckNumber !== undefined && highRangeCheckNumber !== null) {
|
|
855
|
+
body['highRangeCheckNumber'] = highRangeCheckNumber;
|
|
856
|
+
}
|
|
857
|
+
if (individualId) {
|
|
858
|
+
body['individualId'] = individualId;
|
|
859
|
+
}
|
|
860
|
+
if (returnReason) {
|
|
861
|
+
body['returnReason'] = returnReason;
|
|
862
|
+
}
|
|
863
|
+
if (dateOfDeath !== undefined && dateOfDeath !== null) {
|
|
864
|
+
body['dateOfDeath'] = dateOfDeath;
|
|
865
|
+
}
|
|
866
|
+
if (companyId) {
|
|
867
|
+
body['companyId'] = companyId;
|
|
868
|
+
}
|
|
869
|
+
if (stopType !== undefined && stopType !== null) {
|
|
870
|
+
body['stopType'] = stopType;
|
|
871
|
+
}
|
|
872
|
+
if (elementSource) {
|
|
873
|
+
body['elementSource'] = elementSource;
|
|
874
|
+
}
|
|
875
|
+
if (subSource) {
|
|
876
|
+
body['subSource'] = subSource;
|
|
877
|
+
}
|
|
878
|
+
if (overrideFlag) {
|
|
879
|
+
body['overrideFlag'] = overrideFlag;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
const response = await httpClient.sendRequest({
|
|
883
|
+
method: HttpMethod.POST,
|
|
884
|
+
url: `${baseUrl}/account-restrictions/v1/accounts/${applicationCode}/${accountNumber}/transactions/posting-restrictions/delete-stops`,
|
|
885
|
+
headers,
|
|
886
|
+
body,
|
|
887
|
+
});
|
|
888
|
+
|
|
889
|
+
return response.body;
|
|
890
|
+
},
|
|
891
|
+
});
|
|
892
|
+
|
|
893
|
+
// ============================================================================
|
|
894
|
+
// RESTRICTIONS
|
|
895
|
+
// ============================================================================
|
|
896
|
+
|
|
897
|
+
export const account_restrictions_restrictions_get = createAction({
|
|
898
|
+
name: 'account_restrictions_restrictions_get',
|
|
899
|
+
auth: fisHorizonAuth,
|
|
900
|
+
displayName: 'Account Restrictions - Restrictions - Get',
|
|
901
|
+
description: 'Retrieve DD and SV restriction records for a given account.',
|
|
902
|
+
props: {
|
|
903
|
+
xAuthorization: Property.ShortText({
|
|
904
|
+
displayName: 'Authorization Token',
|
|
905
|
+
description: 'JWT token from the authorization endpoint (Bearer token)',
|
|
906
|
+
required: true,
|
|
907
|
+
}),
|
|
908
|
+
applicationCode: Property.StaticDropdown({
|
|
909
|
+
displayName: 'Application Code',
|
|
910
|
+
description: 'Application type (DD - Demand Deposits, SV - Savings)',
|
|
911
|
+
required: true,
|
|
912
|
+
options: {
|
|
913
|
+
options: [
|
|
914
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
915
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
916
|
+
],
|
|
917
|
+
},
|
|
918
|
+
}),
|
|
919
|
+
accountNumber: Property.ShortText({
|
|
920
|
+
displayName: 'Account Number',
|
|
921
|
+
description: 'Up to 20 digit zero filled account number',
|
|
922
|
+
required: true,
|
|
923
|
+
}),
|
|
924
|
+
returnNumber: Property.Number({
|
|
925
|
+
displayName: 'Return Number',
|
|
926
|
+
description: 'Number of records to return (1-999)',
|
|
927
|
+
required: true,
|
|
928
|
+
defaultValue: 999,
|
|
929
|
+
}),
|
|
930
|
+
firstNext: Property.StaticDropdown({
|
|
931
|
+
displayName: 'First/Next',
|
|
932
|
+
description: 'F - First request, N - Next request for additional records',
|
|
933
|
+
required: false,
|
|
934
|
+
defaultValue: 'F',
|
|
935
|
+
options: {
|
|
936
|
+
options: [
|
|
937
|
+
{ label: 'F - First', value: 'F' },
|
|
938
|
+
{ label: 'N - Next', value: 'N' },
|
|
939
|
+
],
|
|
940
|
+
},
|
|
941
|
+
}),
|
|
942
|
+
sourceId: Property.ShortText({
|
|
943
|
+
displayName: 'Source ID',
|
|
944
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
945
|
+
required: false,
|
|
946
|
+
}),
|
|
947
|
+
},
|
|
948
|
+
async run(context) {
|
|
949
|
+
const auth = context.auth as any;
|
|
950
|
+
const baseUrl = auth.baseUrl;
|
|
951
|
+
const organizationId = auth.organizationId;
|
|
952
|
+
const { xAuthorization, applicationCode, accountNumber, returnNumber, firstNext, sourceId } = context.propsValue;
|
|
953
|
+
const uuid = crypto.randomUUID();
|
|
954
|
+
|
|
955
|
+
const headers: Record<string, string> = {
|
|
956
|
+
'accept': 'application/json',
|
|
957
|
+
'Content-Type': 'application/json',
|
|
958
|
+
'organization-id': organizationId,
|
|
959
|
+
'uuid': uuid,
|
|
960
|
+
'horizon-authorization': xAuthorization,
|
|
961
|
+
};
|
|
962
|
+
|
|
963
|
+
if (sourceId) {
|
|
964
|
+
headers['source-id'] = sourceId;
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
const queryParams: Record<string, string> = {
|
|
968
|
+
returnNumber: String(returnNumber),
|
|
969
|
+
};
|
|
970
|
+
if (firstNext) {
|
|
971
|
+
queryParams['firstNext'] = firstNext;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
const response = await httpClient.sendRequest({
|
|
975
|
+
method: HttpMethod.GET,
|
|
976
|
+
url: `${baseUrl}/account-restrictions/v1/accounts/${applicationCode}/${accountNumber}/transactions/posting-restrictions/restriction`,
|
|
977
|
+
headers,
|
|
978
|
+
queryParams,
|
|
979
|
+
});
|
|
980
|
+
|
|
981
|
+
return response.body;
|
|
982
|
+
},
|
|
983
|
+
});
|
|
984
|
+
|
|
985
|
+
export const account_restrictions_restrictions_add = createAction({
|
|
986
|
+
name: 'account_restrictions_restrictions_add',
|
|
987
|
+
auth: fisHorizonAuth,
|
|
988
|
+
displayName: 'Account Restrictions - Restrictions - Add',
|
|
989
|
+
description: 'Add a Restriction to a given DD/SV account.',
|
|
990
|
+
props: {
|
|
991
|
+
xAuthorization: Property.ShortText({
|
|
992
|
+
displayName: 'Authorization Token',
|
|
993
|
+
description: 'JWT token from the authorization endpoint (Bearer token)',
|
|
994
|
+
required: true,
|
|
995
|
+
}),
|
|
996
|
+
applicationCode: Property.StaticDropdown({
|
|
997
|
+
displayName: 'Application Code',
|
|
998
|
+
description: 'Application type (DD - Demand Deposits, SV - Savings)',
|
|
999
|
+
required: true,
|
|
1000
|
+
options: {
|
|
1001
|
+
options: [
|
|
1002
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
1003
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
1004
|
+
],
|
|
1005
|
+
},
|
|
1006
|
+
}),
|
|
1007
|
+
accountNumber: Property.ShortText({
|
|
1008
|
+
displayName: 'Account Number',
|
|
1009
|
+
description: 'Up to 20 digit zero filled account number',
|
|
1010
|
+
required: true,
|
|
1011
|
+
}),
|
|
1012
|
+
expirationDate: Property.Number({
|
|
1013
|
+
displayName: 'Expiration Date',
|
|
1014
|
+
description: 'Expiration date in YYYYMMDD format',
|
|
1015
|
+
required: true,
|
|
1016
|
+
}),
|
|
1017
|
+
userId: Property.ShortText({
|
|
1018
|
+
displayName: 'User ID',
|
|
1019
|
+
description: 'User ID (max 10 characters)',
|
|
1020
|
+
required: true,
|
|
1021
|
+
}),
|
|
1022
|
+
payeeDescription: Property.ShortText({
|
|
1023
|
+
displayName: 'Payee/Description',
|
|
1024
|
+
description: 'Payee/Reason/Description (max 25 characters)',
|
|
1025
|
+
required: false,
|
|
1026
|
+
}),
|
|
1027
|
+
returnReason: Property.StaticDropdown({
|
|
1028
|
+
displayName: 'Return Reason',
|
|
1029
|
+
description: 'Return Reason',
|
|
1030
|
+
required: false,
|
|
1031
|
+
options: {
|
|
1032
|
+
options: [
|
|
1033
|
+
{ label: 'R02', value: 'R02' },
|
|
1034
|
+
{ label: 'R07', value: 'R07' },
|
|
1035
|
+
{ label: 'R08', value: 'R08' },
|
|
1036
|
+
{ label: 'R10', value: 'R10' },
|
|
1037
|
+
{ label: 'R14', value: 'R14' },
|
|
1038
|
+
{ label: 'R15', value: 'R15' },
|
|
1039
|
+
{ label: 'R16', value: 'R16' },
|
|
1040
|
+
{ label: 'R29', value: 'R29' },
|
|
1041
|
+
],
|
|
1042
|
+
},
|
|
1043
|
+
}),
|
|
1044
|
+
dateOfDeath: Property.Number({
|
|
1045
|
+
displayName: 'Date of Death',
|
|
1046
|
+
description: 'Date of Death in YYYYMMDD format',
|
|
1047
|
+
required: false,
|
|
1048
|
+
}),
|
|
1049
|
+
overrideFlag: Property.ShortText({
|
|
1050
|
+
displayName: 'Override Flag',
|
|
1051
|
+
description: 'Y to override (only works for error 16, 17, or 32)',
|
|
1052
|
+
required: false,
|
|
1053
|
+
}),
|
|
1054
|
+
sourceId: Property.ShortText({
|
|
1055
|
+
displayName: 'Source ID',
|
|
1056
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
1057
|
+
required: false,
|
|
1058
|
+
}),
|
|
1059
|
+
},
|
|
1060
|
+
async run(context) {
|
|
1061
|
+
const auth = context.auth as any;
|
|
1062
|
+
const baseUrl = auth.baseUrl;
|
|
1063
|
+
const organizationId = auth.organizationId;
|
|
1064
|
+
const { xAuthorization, applicationCode, accountNumber, expirationDate, userId, payeeDescription, returnReason, dateOfDeath, overrideFlag, sourceId } = context.propsValue;
|
|
1065
|
+
const uuid = crypto.randomUUID();
|
|
1066
|
+
|
|
1067
|
+
const headers: Record<string, string> = {
|
|
1068
|
+
'accept': 'application/json',
|
|
1069
|
+
'Content-Type': 'application/json',
|
|
1070
|
+
'organization-id': organizationId,
|
|
1071
|
+
'uuid': uuid,
|
|
1072
|
+
'horizon-authorization': xAuthorization,
|
|
1073
|
+
};
|
|
1074
|
+
|
|
1075
|
+
if (sourceId) {
|
|
1076
|
+
headers['source-id'] = sourceId;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
const body: Record<string, any> = {
|
|
1080
|
+
expirationDate: expirationDate,
|
|
1081
|
+
userId: userId,
|
|
1082
|
+
};
|
|
1083
|
+
|
|
1084
|
+
if (payeeDescription) {
|
|
1085
|
+
body['payeeDescription'] = payeeDescription;
|
|
1086
|
+
}
|
|
1087
|
+
if (returnReason) {
|
|
1088
|
+
body['returnReason'] = returnReason;
|
|
1089
|
+
}
|
|
1090
|
+
if (dateOfDeath !== undefined && dateOfDeath !== null) {
|
|
1091
|
+
body['dateOfDeath'] = dateOfDeath;
|
|
1092
|
+
}
|
|
1093
|
+
if (overrideFlag) {
|
|
1094
|
+
body['overrideFlag'] = overrideFlag;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
const response = await httpClient.sendRequest({
|
|
1098
|
+
method: HttpMethod.POST,
|
|
1099
|
+
url: `${baseUrl}/account-restrictions/v1/accounts/${applicationCode}/${accountNumber}/transactions/posting-restrictions/restriction`,
|
|
1100
|
+
headers,
|
|
1101
|
+
body,
|
|
1102
|
+
});
|
|
1103
|
+
|
|
1104
|
+
return response.body;
|
|
1105
|
+
},
|
|
1106
|
+
});
|
|
1107
|
+
|
|
1108
|
+
export const account_restrictions_restrictions_delete = createAction({
|
|
1109
|
+
name: 'account_restrictions_restrictions_delete',
|
|
1110
|
+
auth: fisHorizonAuth,
|
|
1111
|
+
displayName: 'Account Restrictions - Restrictions - Delete',
|
|
1112
|
+
description: 'Delete a Restriction for a given DD/SV account.',
|
|
1113
|
+
props: {
|
|
1114
|
+
xAuthorization: Property.ShortText({
|
|
1115
|
+
displayName: 'Authorization Token',
|
|
1116
|
+
description: 'JWT token from the authorization endpoint (Bearer token)',
|
|
1117
|
+
required: true,
|
|
1118
|
+
}),
|
|
1119
|
+
applicationCode: Property.StaticDropdown({
|
|
1120
|
+
displayName: 'Application Code',
|
|
1121
|
+
description: 'Application type (DD - Demand Deposits, SV - Savings)',
|
|
1122
|
+
required: true,
|
|
1123
|
+
options: {
|
|
1124
|
+
options: [
|
|
1125
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
1126
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
1127
|
+
],
|
|
1128
|
+
},
|
|
1129
|
+
}),
|
|
1130
|
+
accountNumber: Property.ShortText({
|
|
1131
|
+
displayName: 'Account Number',
|
|
1132
|
+
description: 'Up to 20 digit zero filled account number',
|
|
1133
|
+
required: true,
|
|
1134
|
+
}),
|
|
1135
|
+
userId: Property.ShortText({
|
|
1136
|
+
displayName: 'User ID',
|
|
1137
|
+
description: 'User ID (max 10 characters)',
|
|
1138
|
+
required: true,
|
|
1139
|
+
}),
|
|
1140
|
+
sourceId: Property.ShortText({
|
|
1141
|
+
displayName: 'Source ID',
|
|
1142
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
1143
|
+
required: false,
|
|
1144
|
+
}),
|
|
1145
|
+
},
|
|
1146
|
+
async run(context) {
|
|
1147
|
+
const auth = context.auth as any;
|
|
1148
|
+
const baseUrl = auth.baseUrl;
|
|
1149
|
+
const organizationId = auth.organizationId;
|
|
1150
|
+
const { xAuthorization, applicationCode, accountNumber, userId, sourceId } = context.propsValue;
|
|
1151
|
+
const uuid = crypto.randomUUID();
|
|
1152
|
+
|
|
1153
|
+
const headers: Record<string, string> = {
|
|
1154
|
+
'accept': 'application/json',
|
|
1155
|
+
'Content-Type': 'application/json',
|
|
1156
|
+
'organization-id': organizationId,
|
|
1157
|
+
'uuid': uuid,
|
|
1158
|
+
'horizon-authorization': xAuthorization,
|
|
1159
|
+
};
|
|
1160
|
+
|
|
1161
|
+
if (sourceId) {
|
|
1162
|
+
headers['source-id'] = sourceId;
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
const response = await httpClient.sendRequest({
|
|
1166
|
+
method: HttpMethod.DELETE,
|
|
1167
|
+
url: `${baseUrl}/account-restrictions/v1/accounts/${applicationCode}/${accountNumber}/transactions/posting-restrictions/restriction`,
|
|
1168
|
+
headers,
|
|
1169
|
+
queryParams: {
|
|
1170
|
+
userId: userId,
|
|
1171
|
+
},
|
|
1172
|
+
});
|
|
1173
|
+
|
|
1174
|
+
return response.body;
|
|
1175
|
+
},
|
|
1176
|
+
});
|
|
1177
|
+
|
|
1178
|
+
// ============================================================================
|
|
1179
|
+
// WATCH
|
|
1180
|
+
// ============================================================================
|
|
1181
|
+
|
|
1182
|
+
export const account_restrictions_watch_get = createAction({
|
|
1183
|
+
name: 'account_restrictions_watch_get',
|
|
1184
|
+
auth: fisHorizonAuth,
|
|
1185
|
+
displayName: 'Account Restrictions - Watch - Get',
|
|
1186
|
+
description: 'Retrieve a DD or SV watch instruction for a given account.',
|
|
1187
|
+
props: {
|
|
1188
|
+
xAuthorization: Property.ShortText({
|
|
1189
|
+
displayName: 'Authorization Token',
|
|
1190
|
+
description: 'JWT token from the authorization endpoint (Bearer token)',
|
|
1191
|
+
required: true,
|
|
1192
|
+
}),
|
|
1193
|
+
applicationCode: Property.StaticDropdown({
|
|
1194
|
+
displayName: 'Application Code',
|
|
1195
|
+
description: 'Application type (DD - Demand Deposits, SV - Savings)',
|
|
1196
|
+
required: true,
|
|
1197
|
+
options: {
|
|
1198
|
+
options: [
|
|
1199
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
1200
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
1201
|
+
],
|
|
1202
|
+
},
|
|
1203
|
+
}),
|
|
1204
|
+
accountNumber: Property.ShortText({
|
|
1205
|
+
displayName: 'Account Number',
|
|
1206
|
+
description: 'Up to 20 digit zero filled account number',
|
|
1207
|
+
required: true,
|
|
1208
|
+
}),
|
|
1209
|
+
firstNext: Property.StaticDropdown({
|
|
1210
|
+
displayName: 'First/Next',
|
|
1211
|
+
description: 'F - First request, N - Next request for additional records',
|
|
1212
|
+
required: true,
|
|
1213
|
+
options: {
|
|
1214
|
+
options: [
|
|
1215
|
+
{ label: 'F - First', value: 'F' },
|
|
1216
|
+
{ label: 'N - Next', value: 'N' },
|
|
1217
|
+
],
|
|
1218
|
+
},
|
|
1219
|
+
}),
|
|
1220
|
+
returnNumber: Property.Number({
|
|
1221
|
+
displayName: 'Return Number',
|
|
1222
|
+
description: 'Number of records to return (1-999)',
|
|
1223
|
+
required: true,
|
|
1224
|
+
defaultValue: 999,
|
|
1225
|
+
}),
|
|
1226
|
+
sourceId: Property.ShortText({
|
|
1227
|
+
displayName: 'Source ID',
|
|
1228
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
1229
|
+
required: false,
|
|
1230
|
+
}),
|
|
1231
|
+
},
|
|
1232
|
+
async run(context) {
|
|
1233
|
+
const auth = context.auth as any;
|
|
1234
|
+
const baseUrl = auth.baseUrl;
|
|
1235
|
+
const organizationId = auth.organizationId;
|
|
1236
|
+
const { xAuthorization, applicationCode, accountNumber, firstNext, returnNumber, sourceId } = context.propsValue;
|
|
1237
|
+
const uuid = crypto.randomUUID();
|
|
1238
|
+
|
|
1239
|
+
const headers: Record<string, string> = {
|
|
1240
|
+
'accept': 'application/json',
|
|
1241
|
+
'Content-Type': 'application/json',
|
|
1242
|
+
'organization-id': organizationId,
|
|
1243
|
+
'uuid': uuid,
|
|
1244
|
+
'horizon-authorization': xAuthorization,
|
|
1245
|
+
};
|
|
1246
|
+
|
|
1247
|
+
if (sourceId) {
|
|
1248
|
+
headers['source-id'] = sourceId;
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
const response = await httpClient.sendRequest({
|
|
1252
|
+
method: HttpMethod.GET,
|
|
1253
|
+
url: `${baseUrl}/account-restrictions/v1/accounts/${applicationCode}/${accountNumber}/transactions/posting-restrictions/watch`,
|
|
1254
|
+
headers,
|
|
1255
|
+
queryParams: {
|
|
1256
|
+
firstNext: firstNext,
|
|
1257
|
+
returnNumber: String(returnNumber),
|
|
1258
|
+
},
|
|
1259
|
+
});
|
|
1260
|
+
|
|
1261
|
+
return response.body;
|
|
1262
|
+
},
|
|
1263
|
+
});
|
|
1264
|
+
|
|
1265
|
+
export const account_restrictions_watch_add = createAction({
|
|
1266
|
+
name: 'account_restrictions_watch_add',
|
|
1267
|
+
auth: fisHorizonAuth,
|
|
1268
|
+
displayName: 'Account Restrictions - Watch - Add',
|
|
1269
|
+
description: 'Add a Watch to a given DD/SV account.',
|
|
1270
|
+
props: {
|
|
1271
|
+
xAuthorization: Property.ShortText({
|
|
1272
|
+
displayName: 'Authorization Token',
|
|
1273
|
+
description: 'JWT token from the authorization endpoint (Bearer token)',
|
|
1274
|
+
required: true,
|
|
1275
|
+
}),
|
|
1276
|
+
applicationCode: Property.StaticDropdown({
|
|
1277
|
+
displayName: 'Application Code',
|
|
1278
|
+
description: 'Application type (DD - Demand Deposits, SV - Savings)',
|
|
1279
|
+
required: true,
|
|
1280
|
+
options: {
|
|
1281
|
+
options: [
|
|
1282
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
1283
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
1284
|
+
],
|
|
1285
|
+
},
|
|
1286
|
+
}),
|
|
1287
|
+
accountNumber: Property.ShortText({
|
|
1288
|
+
displayName: 'Account Number',
|
|
1289
|
+
description: 'Up to 20 digit zero filled account number',
|
|
1290
|
+
required: true,
|
|
1291
|
+
}),
|
|
1292
|
+
expirationDate: Property.Number({
|
|
1293
|
+
displayName: 'Expiration Date',
|
|
1294
|
+
description: 'Expiration date in YYYYMMDD format',
|
|
1295
|
+
required: true,
|
|
1296
|
+
}),
|
|
1297
|
+
userId: Property.ShortText({
|
|
1298
|
+
displayName: 'User ID',
|
|
1299
|
+
description: 'User ID (max 10 characters)',
|
|
1300
|
+
required: true,
|
|
1301
|
+
}),
|
|
1302
|
+
payeeDescription: Property.ShortText({
|
|
1303
|
+
displayName: 'Payee/Description',
|
|
1304
|
+
description: 'Payee/Reason/Description (max 25 characters)',
|
|
1305
|
+
required: false,
|
|
1306
|
+
}),
|
|
1307
|
+
overrideFlag: Property.ShortText({
|
|
1308
|
+
displayName: 'Override Flag',
|
|
1309
|
+
description: 'Y to override (only works for error 16, 17, or 32)',
|
|
1310
|
+
required: false,
|
|
1311
|
+
}),
|
|
1312
|
+
sourceId: Property.ShortText({
|
|
1313
|
+
displayName: 'Source ID',
|
|
1314
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
1315
|
+
required: false,
|
|
1316
|
+
}),
|
|
1317
|
+
},
|
|
1318
|
+
async run(context) {
|
|
1319
|
+
const auth = context.auth as any;
|
|
1320
|
+
const baseUrl = auth.baseUrl;
|
|
1321
|
+
const organizationId = auth.organizationId;
|
|
1322
|
+
const { xAuthorization, applicationCode, accountNumber, expirationDate, userId, payeeDescription, overrideFlag, sourceId } = context.propsValue;
|
|
1323
|
+
const uuid = crypto.randomUUID();
|
|
1324
|
+
|
|
1325
|
+
const headers: Record<string, string> = {
|
|
1326
|
+
'accept': 'application/json',
|
|
1327
|
+
'Content-Type': 'application/json',
|
|
1328
|
+
'organization-id': organizationId,
|
|
1329
|
+
'uuid': uuid,
|
|
1330
|
+
'horizon-authorization': xAuthorization,
|
|
1331
|
+
};
|
|
1332
|
+
|
|
1333
|
+
if (sourceId) {
|
|
1334
|
+
headers['source-id'] = sourceId;
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
const body: Record<string, any> = {
|
|
1338
|
+
expirationDate: expirationDate,
|
|
1339
|
+
userId: userId,
|
|
1340
|
+
};
|
|
1341
|
+
|
|
1342
|
+
if (payeeDescription) {
|
|
1343
|
+
body['payeeDescription'] = payeeDescription;
|
|
1344
|
+
}
|
|
1345
|
+
if (overrideFlag) {
|
|
1346
|
+
body['overrideFlag'] = overrideFlag;
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
const response = await httpClient.sendRequest({
|
|
1350
|
+
method: HttpMethod.POST,
|
|
1351
|
+
url: `${baseUrl}/account-restrictions/v1/accounts/${applicationCode}/${accountNumber}/transactions/posting-restrictions/watch`,
|
|
1352
|
+
headers,
|
|
1353
|
+
body,
|
|
1354
|
+
});
|
|
1355
|
+
|
|
1356
|
+
return response.body;
|
|
1357
|
+
},
|
|
1358
|
+
});
|
|
1359
|
+
|
|
1360
|
+
export const account_restrictions_watch_delete = createAction({
|
|
1361
|
+
name: 'account_restrictions_watch_delete',
|
|
1362
|
+
auth: fisHorizonAuth,
|
|
1363
|
+
displayName: 'Account Restrictions - Watch - Delete',
|
|
1364
|
+
description: 'Delete a Watch for a given DD/SV account.',
|
|
1365
|
+
props: {
|
|
1366
|
+
xAuthorization: Property.ShortText({
|
|
1367
|
+
displayName: 'Authorization Token',
|
|
1368
|
+
description: 'JWT token from the authorization endpoint (Bearer token)',
|
|
1369
|
+
required: true,
|
|
1370
|
+
}),
|
|
1371
|
+
applicationCode: Property.StaticDropdown({
|
|
1372
|
+
displayName: 'Application Code',
|
|
1373
|
+
description: 'Application type (DD - Demand Deposits, SV - Savings)',
|
|
1374
|
+
required: true,
|
|
1375
|
+
options: {
|
|
1376
|
+
options: [
|
|
1377
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
1378
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
1379
|
+
],
|
|
1380
|
+
},
|
|
1381
|
+
}),
|
|
1382
|
+
accountNumber: Property.ShortText({
|
|
1383
|
+
displayName: 'Account Number',
|
|
1384
|
+
description: 'Up to 20 digit zero filled account number',
|
|
1385
|
+
required: true,
|
|
1386
|
+
}),
|
|
1387
|
+
userId: Property.ShortText({
|
|
1388
|
+
displayName: 'User ID',
|
|
1389
|
+
description: 'User ID (max 10 characters)',
|
|
1390
|
+
required: true,
|
|
1391
|
+
}),
|
|
1392
|
+
sourceId: Property.ShortText({
|
|
1393
|
+
displayName: 'Source ID',
|
|
1394
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
1395
|
+
required: false,
|
|
1396
|
+
}),
|
|
1397
|
+
},
|
|
1398
|
+
async run(context) {
|
|
1399
|
+
const auth = context.auth as any;
|
|
1400
|
+
const baseUrl = auth.baseUrl;
|
|
1401
|
+
const organizationId = auth.organizationId;
|
|
1402
|
+
const { xAuthorization, applicationCode, accountNumber, userId, sourceId } = context.propsValue;
|
|
1403
|
+
const uuid = crypto.randomUUID();
|
|
1404
|
+
|
|
1405
|
+
const headers: Record<string, string> = {
|
|
1406
|
+
'accept': 'application/json',
|
|
1407
|
+
'Content-Type': 'application/json',
|
|
1408
|
+
'organization-id': organizationId,
|
|
1409
|
+
'uuid': uuid,
|
|
1410
|
+
'horizon-authorization': xAuthorization,
|
|
1411
|
+
};
|
|
1412
|
+
|
|
1413
|
+
if (sourceId) {
|
|
1414
|
+
headers['source-id'] = sourceId;
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
const response = await httpClient.sendRequest({
|
|
1418
|
+
method: HttpMethod.DELETE,
|
|
1419
|
+
url: `${baseUrl}/account-restrictions/v1/accounts/${applicationCode}/${accountNumber}/transactions/posting-restrictions/watch`,
|
|
1420
|
+
headers,
|
|
1421
|
+
queryParams: {
|
|
1422
|
+
userId: userId,
|
|
1423
|
+
},
|
|
1424
|
+
});
|
|
1425
|
+
|
|
1426
|
+
return response.body;
|
|
1427
|
+
},
|
|
1428
|
+
});
|
|
1429
|
+
|
|
1430
|
+
// ============================================================================
|
|
1431
|
+
// CREDITS ONLY
|
|
1432
|
+
// ============================================================================
|
|
1433
|
+
|
|
1434
|
+
export const account_restrictions_credits_only_get = createAction({
|
|
1435
|
+
name: 'account_restrictions_credits_only_get',
|
|
1436
|
+
auth: fisHorizonAuth,
|
|
1437
|
+
displayName: 'Account Restrictions - Credits Only - Get',
|
|
1438
|
+
description: 'Retrieve a DD or SV credits only instruction for a given account.',
|
|
1439
|
+
props: {
|
|
1440
|
+
xAuthorization: Property.ShortText({
|
|
1441
|
+
displayName: 'Authorization Token',
|
|
1442
|
+
description: 'JWT token from the authorization endpoint (Bearer token)',
|
|
1443
|
+
required: true,
|
|
1444
|
+
}),
|
|
1445
|
+
applicationCode: Property.StaticDropdown({
|
|
1446
|
+
displayName: 'Application Code',
|
|
1447
|
+
description: 'Application type (DD - Demand Deposits, SV - Savings)',
|
|
1448
|
+
required: true,
|
|
1449
|
+
options: {
|
|
1450
|
+
options: [
|
|
1451
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
1452
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
1453
|
+
],
|
|
1454
|
+
},
|
|
1455
|
+
}),
|
|
1456
|
+
accountNumber: Property.ShortText({
|
|
1457
|
+
displayName: 'Account Number',
|
|
1458
|
+
description: 'Up to 20 digit zero filled account number',
|
|
1459
|
+
required: true,
|
|
1460
|
+
}),
|
|
1461
|
+
firstNext: Property.StaticDropdown({
|
|
1462
|
+
displayName: 'First/Next',
|
|
1463
|
+
description: 'F - First request, N - Next request for additional records',
|
|
1464
|
+
required: true,
|
|
1465
|
+
options: {
|
|
1466
|
+
options: [
|
|
1467
|
+
{ label: 'F - First', value: 'F' },
|
|
1468
|
+
{ label: 'N - Next', value: 'N' },
|
|
1469
|
+
],
|
|
1470
|
+
},
|
|
1471
|
+
}),
|
|
1472
|
+
returnNumber: Property.Number({
|
|
1473
|
+
displayName: 'Return Number',
|
|
1474
|
+
description: 'Number of records to return (1-999)',
|
|
1475
|
+
required: true,
|
|
1476
|
+
defaultValue: 999,
|
|
1477
|
+
}),
|
|
1478
|
+
sourceId: Property.ShortText({
|
|
1479
|
+
displayName: 'Source ID',
|
|
1480
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
1481
|
+
required: false,
|
|
1482
|
+
}),
|
|
1483
|
+
},
|
|
1484
|
+
async run(context) {
|
|
1485
|
+
const auth = context.auth as any;
|
|
1486
|
+
const baseUrl = auth.baseUrl;
|
|
1487
|
+
const organizationId = auth.organizationId;
|
|
1488
|
+
const { xAuthorization, applicationCode, accountNumber, firstNext, returnNumber, sourceId } = context.propsValue;
|
|
1489
|
+
const uuid = crypto.randomUUID();
|
|
1490
|
+
|
|
1491
|
+
const headers: Record<string, string> = {
|
|
1492
|
+
'accept': 'application/json',
|
|
1493
|
+
'Content-Type': 'application/json',
|
|
1494
|
+
'organization-id': organizationId,
|
|
1495
|
+
'uuid': uuid,
|
|
1496
|
+
'horizon-authorization': xAuthorization,
|
|
1497
|
+
};
|
|
1498
|
+
|
|
1499
|
+
if (sourceId) {
|
|
1500
|
+
headers['source-id'] = sourceId;
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
const response = await httpClient.sendRequest({
|
|
1504
|
+
method: HttpMethod.GET,
|
|
1505
|
+
url: `${baseUrl}/account-restrictions/v1/accounts/${applicationCode}/${accountNumber}/transactions/posting-restrictions/credits-only`,
|
|
1506
|
+
headers,
|
|
1507
|
+
queryParams: {
|
|
1508
|
+
firstNext: firstNext,
|
|
1509
|
+
returnNumber: String(returnNumber),
|
|
1510
|
+
},
|
|
1511
|
+
});
|
|
1512
|
+
|
|
1513
|
+
return response.body;
|
|
1514
|
+
},
|
|
1515
|
+
});
|
|
1516
|
+
|
|
1517
|
+
export const account_restrictions_credits_only_add = createAction({
|
|
1518
|
+
name: 'account_restrictions_credits_only_add',
|
|
1519
|
+
auth: fisHorizonAuth,
|
|
1520
|
+
displayName: 'Account Restrictions - Credits Only - Add',
|
|
1521
|
+
description: 'Add a Credits Only instruction to a given DD/SV account.',
|
|
1522
|
+
props: {
|
|
1523
|
+
xAuthorization: Property.ShortText({
|
|
1524
|
+
displayName: 'Authorization Token',
|
|
1525
|
+
description: 'JWT token from the authorization endpoint (Bearer token)',
|
|
1526
|
+
required: true,
|
|
1527
|
+
}),
|
|
1528
|
+
applicationCode: Property.StaticDropdown({
|
|
1529
|
+
displayName: 'Application Code',
|
|
1530
|
+
description: 'Application type (DD - Demand Deposits, SV - Savings)',
|
|
1531
|
+
required: true,
|
|
1532
|
+
options: {
|
|
1533
|
+
options: [
|
|
1534
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
1535
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
1536
|
+
],
|
|
1537
|
+
},
|
|
1538
|
+
}),
|
|
1539
|
+
accountNumber: Property.ShortText({
|
|
1540
|
+
displayName: 'Account Number',
|
|
1541
|
+
description: 'Up to 20 digit zero filled account number',
|
|
1542
|
+
required: true,
|
|
1543
|
+
}),
|
|
1544
|
+
expirationDate: Property.Number({
|
|
1545
|
+
displayName: 'Expiration Date',
|
|
1546
|
+
description: 'Expiration date in YYYYMMDD format',
|
|
1547
|
+
required: true,
|
|
1548
|
+
}),
|
|
1549
|
+
userId: Property.ShortText({
|
|
1550
|
+
displayName: 'User ID',
|
|
1551
|
+
description: 'User ID (max 10 characters)',
|
|
1552
|
+
required: true,
|
|
1553
|
+
}),
|
|
1554
|
+
payeeDescription: Property.ShortText({
|
|
1555
|
+
displayName: 'Payee/Description',
|
|
1556
|
+
description: 'Payee/Reason/Description (max 25 characters)',
|
|
1557
|
+
required: false,
|
|
1558
|
+
}),
|
|
1559
|
+
overrideFlag: Property.ShortText({
|
|
1560
|
+
displayName: 'Override Flag',
|
|
1561
|
+
description: 'Y to override (only works for error 16, 17, or 32)',
|
|
1562
|
+
required: false,
|
|
1563
|
+
}),
|
|
1564
|
+
sourceId: Property.ShortText({
|
|
1565
|
+
displayName: 'Source ID',
|
|
1566
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
1567
|
+
required: false,
|
|
1568
|
+
}),
|
|
1569
|
+
},
|
|
1570
|
+
async run(context) {
|
|
1571
|
+
const auth = context.auth as any;
|
|
1572
|
+
const baseUrl = auth.baseUrl;
|
|
1573
|
+
const organizationId = auth.organizationId;
|
|
1574
|
+
const { xAuthorization, applicationCode, accountNumber, expirationDate, userId, payeeDescription, overrideFlag, sourceId } = context.propsValue;
|
|
1575
|
+
const uuid = crypto.randomUUID();
|
|
1576
|
+
|
|
1577
|
+
const headers: Record<string, string> = {
|
|
1578
|
+
'accept': 'application/json',
|
|
1579
|
+
'Content-Type': 'application/json',
|
|
1580
|
+
'organization-id': organizationId,
|
|
1581
|
+
'uuid': uuid,
|
|
1582
|
+
'horizon-authorization': xAuthorization,
|
|
1583
|
+
};
|
|
1584
|
+
|
|
1585
|
+
if (sourceId) {
|
|
1586
|
+
headers['source-id'] = sourceId;
|
|
1587
|
+
}
|
|
1588
|
+
|
|
1589
|
+
const body: Record<string, any> = {
|
|
1590
|
+
expirationDate: expirationDate,
|
|
1591
|
+
userId: userId,
|
|
1592
|
+
};
|
|
1593
|
+
|
|
1594
|
+
if (payeeDescription) {
|
|
1595
|
+
body['payeeDescription'] = payeeDescription;
|
|
1596
|
+
}
|
|
1597
|
+
if (overrideFlag) {
|
|
1598
|
+
body['overrideFlag'] = overrideFlag;
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
const response = await httpClient.sendRequest({
|
|
1602
|
+
method: HttpMethod.POST,
|
|
1603
|
+
url: `${baseUrl}/account-restrictions/v1/accounts/${applicationCode}/${accountNumber}/transactions/posting-restrictions/credits-only`,
|
|
1604
|
+
headers,
|
|
1605
|
+
body,
|
|
1606
|
+
});
|
|
1607
|
+
|
|
1608
|
+
return response.body;
|
|
1609
|
+
},
|
|
1610
|
+
});
|
|
1611
|
+
|
|
1612
|
+
export const account_restrictions_credits_only_delete = createAction({
|
|
1613
|
+
name: 'account_restrictions_credits_only_delete',
|
|
1614
|
+
auth: fisHorizonAuth,
|
|
1615
|
+
displayName: 'Account Restrictions - Credits Only - Delete',
|
|
1616
|
+
description: 'Delete a Credit Only instruction for a given DD/SV account.',
|
|
1617
|
+
props: {
|
|
1618
|
+
xAuthorization: Property.ShortText({
|
|
1619
|
+
displayName: 'Authorization Token',
|
|
1620
|
+
description: 'JWT token from the authorization endpoint (Bearer token)',
|
|
1621
|
+
required: true,
|
|
1622
|
+
}),
|
|
1623
|
+
applicationCode: Property.StaticDropdown({
|
|
1624
|
+
displayName: 'Application Code',
|
|
1625
|
+
description: 'Application type (DD - Demand Deposits, SV - Savings)',
|
|
1626
|
+
required: true,
|
|
1627
|
+
options: {
|
|
1628
|
+
options: [
|
|
1629
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
1630
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
1631
|
+
],
|
|
1632
|
+
},
|
|
1633
|
+
}),
|
|
1634
|
+
accountNumber: Property.ShortText({
|
|
1635
|
+
displayName: 'Account Number',
|
|
1636
|
+
description: 'Up to 20 digit zero filled account number',
|
|
1637
|
+
required: true,
|
|
1638
|
+
}),
|
|
1639
|
+
userId: Property.ShortText({
|
|
1640
|
+
displayName: 'User ID',
|
|
1641
|
+
description: 'User ID (max 10 characters)',
|
|
1642
|
+
required: true,
|
|
1643
|
+
}),
|
|
1644
|
+
sourceId: Property.ShortText({
|
|
1645
|
+
displayName: 'Source ID',
|
|
1646
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
1647
|
+
required: false,
|
|
1648
|
+
}),
|
|
1649
|
+
},
|
|
1650
|
+
async run(context) {
|
|
1651
|
+
const auth = context.auth as any;
|
|
1652
|
+
const baseUrl = auth.baseUrl;
|
|
1653
|
+
const organizationId = auth.organizationId;
|
|
1654
|
+
const { xAuthorization, applicationCode, accountNumber, userId, sourceId } = context.propsValue;
|
|
1655
|
+
const uuid = crypto.randomUUID();
|
|
1656
|
+
|
|
1657
|
+
const headers: Record<string, string> = {
|
|
1658
|
+
'accept': 'application/json',
|
|
1659
|
+
'Content-Type': 'application/json',
|
|
1660
|
+
'organization-id': organizationId,
|
|
1661
|
+
'uuid': uuid,
|
|
1662
|
+
'horizon-authorization': xAuthorization,
|
|
1663
|
+
};
|
|
1664
|
+
|
|
1665
|
+
if (sourceId) {
|
|
1666
|
+
headers['source-id'] = sourceId;
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1669
|
+
const response = await httpClient.sendRequest({
|
|
1670
|
+
method: HttpMethod.DELETE,
|
|
1671
|
+
url: `${baseUrl}/account-restrictions/v1/accounts/${applicationCode}/${accountNumber}/transactions/posting-restrictions/credits-only`,
|
|
1672
|
+
headers,
|
|
1673
|
+
queryParams: {
|
|
1674
|
+
userId: userId,
|
|
1675
|
+
},
|
|
1676
|
+
});
|
|
1677
|
+
|
|
1678
|
+
return response.body;
|
|
1679
|
+
},
|
|
1680
|
+
});
|
|
1681
|
+
|
|
1682
|
+
// ============================================================================
|
|
1683
|
+
// BANK FLOAT
|
|
1684
|
+
// ============================================================================
|
|
1685
|
+
|
|
1686
|
+
export const account_restrictions_bank_float_get = createAction({
|
|
1687
|
+
name: 'account_restrictions_bank_float_get',
|
|
1688
|
+
auth: fisHorizonAuth,
|
|
1689
|
+
displayName: 'Account Restrictions - Bank Float - Get',
|
|
1690
|
+
description: 'Retrieve DD or SV bank float records for a given account.',
|
|
1691
|
+
props: {
|
|
1692
|
+
xAuthorization: Property.ShortText({
|
|
1693
|
+
displayName: 'Authorization Token',
|
|
1694
|
+
description: 'JWT token from the authorization endpoint (Bearer token)',
|
|
1695
|
+
required: true,
|
|
1696
|
+
}),
|
|
1697
|
+
applicationCode: Property.StaticDropdown({
|
|
1698
|
+
displayName: 'Application Code',
|
|
1699
|
+
description: 'Application type (DD - Demand Deposits, SV - Savings)',
|
|
1700
|
+
required: true,
|
|
1701
|
+
options: {
|
|
1702
|
+
options: [
|
|
1703
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
1704
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
1705
|
+
],
|
|
1706
|
+
},
|
|
1707
|
+
}),
|
|
1708
|
+
accountNumber: Property.ShortText({
|
|
1709
|
+
displayName: 'Account Number',
|
|
1710
|
+
description: 'Up to 20 digit zero filled account number',
|
|
1711
|
+
required: true,
|
|
1712
|
+
}),
|
|
1713
|
+
firstNext: Property.StaticDropdown({
|
|
1714
|
+
displayName: 'First/Next',
|
|
1715
|
+
description: 'F - First request, N - Next request for additional records',
|
|
1716
|
+
required: true,
|
|
1717
|
+
options: {
|
|
1718
|
+
options: [
|
|
1719
|
+
{ label: 'F - First', value: 'F' },
|
|
1720
|
+
{ label: 'N - Next', value: 'N' },
|
|
1721
|
+
],
|
|
1722
|
+
},
|
|
1723
|
+
}),
|
|
1724
|
+
returnNumber: Property.Number({
|
|
1725
|
+
displayName: 'Return Number',
|
|
1726
|
+
description: 'Number of records to return (1-999)',
|
|
1727
|
+
required: true,
|
|
1728
|
+
defaultValue: 999,
|
|
1729
|
+
}),
|
|
1730
|
+
sourceId: Property.ShortText({
|
|
1731
|
+
displayName: 'Source ID',
|
|
1732
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
1733
|
+
required: false,
|
|
1734
|
+
}),
|
|
1735
|
+
},
|
|
1736
|
+
async run(context) {
|
|
1737
|
+
const auth = context.auth as any;
|
|
1738
|
+
const baseUrl = auth.baseUrl;
|
|
1739
|
+
const organizationId = auth.organizationId;
|
|
1740
|
+
const { xAuthorization, applicationCode, accountNumber, firstNext, returnNumber, sourceId } = context.propsValue;
|
|
1741
|
+
const uuid = crypto.randomUUID();
|
|
1742
|
+
|
|
1743
|
+
const headers: Record<string, string> = {
|
|
1744
|
+
'accept': 'application/json',
|
|
1745
|
+
'Content-Type': 'application/json',
|
|
1746
|
+
'organization-id': organizationId,
|
|
1747
|
+
'uuid': uuid,
|
|
1748
|
+
'horizon-authorization': xAuthorization,
|
|
1749
|
+
};
|
|
1750
|
+
|
|
1751
|
+
if (sourceId) {
|
|
1752
|
+
headers['source-id'] = sourceId;
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
const response = await httpClient.sendRequest({
|
|
1756
|
+
method: HttpMethod.GET,
|
|
1757
|
+
url: `${baseUrl}/account-restrictions/v1/accounts/${applicationCode}/${accountNumber}/transactions/posting-restrictions/bank-float`,
|
|
1758
|
+
headers,
|
|
1759
|
+
queryParams: {
|
|
1760
|
+
firstNext: firstNext,
|
|
1761
|
+
returnNumber: String(returnNumber),
|
|
1762
|
+
},
|
|
1763
|
+
});
|
|
1764
|
+
|
|
1765
|
+
return response.body;
|
|
1766
|
+
},
|
|
1767
|
+
});
|
|
1768
|
+
|
|
1769
|
+
export const account_restrictions_bank_float_add = createAction({
|
|
1770
|
+
name: 'account_restrictions_bank_float_add',
|
|
1771
|
+
auth: fisHorizonAuth,
|
|
1772
|
+
displayName: 'Account Restrictions - Bank Float - Add',
|
|
1773
|
+
description: 'Add a Bank Float to a given DD/SV account.',
|
|
1774
|
+
props: {
|
|
1775
|
+
xAuthorization: Property.ShortText({
|
|
1776
|
+
displayName: 'Authorization Token',
|
|
1777
|
+
description: 'JWT token from the authorization endpoint (Bearer token)',
|
|
1778
|
+
required: true,
|
|
1779
|
+
}),
|
|
1780
|
+
applicationCode: Property.StaticDropdown({
|
|
1781
|
+
displayName: 'Application Code',
|
|
1782
|
+
description: 'Application type (DD - Demand Deposits, SV - Savings)',
|
|
1783
|
+
required: true,
|
|
1784
|
+
options: {
|
|
1785
|
+
options: [
|
|
1786
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
1787
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
1788
|
+
],
|
|
1789
|
+
},
|
|
1790
|
+
}),
|
|
1791
|
+
accountNumber: Property.ShortText({
|
|
1792
|
+
displayName: 'Account Number',
|
|
1793
|
+
description: 'Up to 20 digit zero filled account number',
|
|
1794
|
+
required: true,
|
|
1795
|
+
}),
|
|
1796
|
+
amount: Property.Number({
|
|
1797
|
+
displayName: 'Amount',
|
|
1798
|
+
description: 'Amount (up to 13 digits with 2 decimal places)',
|
|
1799
|
+
required: true,
|
|
1800
|
+
}),
|
|
1801
|
+
floatDays: Property.Number({
|
|
1802
|
+
displayName: 'Float Days',
|
|
1803
|
+
description: 'Number of float days (0-99)',
|
|
1804
|
+
required: true,
|
|
1805
|
+
}),
|
|
1806
|
+
sourceId: Property.ShortText({
|
|
1807
|
+
displayName: 'Source ID',
|
|
1808
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
1809
|
+
required: false,
|
|
1810
|
+
}),
|
|
1811
|
+
},
|
|
1812
|
+
async run(context) {
|
|
1813
|
+
const auth = context.auth as any;
|
|
1814
|
+
const baseUrl = auth.baseUrl;
|
|
1815
|
+
const organizationId = auth.organizationId;
|
|
1816
|
+
const { xAuthorization, applicationCode, accountNumber, amount, floatDays, sourceId } = context.propsValue;
|
|
1817
|
+
const uuid = crypto.randomUUID();
|
|
1818
|
+
|
|
1819
|
+
const headers: Record<string, string> = {
|
|
1820
|
+
'accept': 'application/json',
|
|
1821
|
+
'Content-Type': 'application/json',
|
|
1822
|
+
'organization-id': organizationId,
|
|
1823
|
+
'uuid': uuid,
|
|
1824
|
+
'horizon-authorization': xAuthorization,
|
|
1825
|
+
};
|
|
1826
|
+
|
|
1827
|
+
if (sourceId) {
|
|
1828
|
+
headers['source-id'] = sourceId;
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
const body: Record<string, any> = {
|
|
1832
|
+
amount: amount,
|
|
1833
|
+
floatDays: floatDays,
|
|
1834
|
+
};
|
|
1835
|
+
|
|
1836
|
+
const response = await httpClient.sendRequest({
|
|
1837
|
+
method: HttpMethod.POST,
|
|
1838
|
+
url: `${baseUrl}/account-restrictions/v1/accounts/${applicationCode}/${accountNumber}/transactions/posting-restrictions/bank-float`,
|
|
1839
|
+
headers,
|
|
1840
|
+
body,
|
|
1841
|
+
});
|
|
1842
|
+
|
|
1843
|
+
return response.body;
|
|
1844
|
+
},
|
|
1845
|
+
});
|
|
1846
|
+
|
|
1847
|
+
export const account_restrictions_bank_float_delete = createAction({
|
|
1848
|
+
name: 'account_restrictions_bank_float_delete',
|
|
1849
|
+
auth: fisHorizonAuth,
|
|
1850
|
+
displayName: 'Account Restrictions - Bank Float - Delete',
|
|
1851
|
+
description: 'Delete a Bank Float for a given DD/SV account.',
|
|
1852
|
+
props: {
|
|
1853
|
+
xAuthorization: Property.ShortText({
|
|
1854
|
+
displayName: 'Authorization Token',
|
|
1855
|
+
description: 'JWT token from the authorization endpoint (Bearer token)',
|
|
1856
|
+
required: true,
|
|
1857
|
+
}),
|
|
1858
|
+
applicationCode: Property.StaticDropdown({
|
|
1859
|
+
displayName: 'Application Code',
|
|
1860
|
+
description: 'Application type (DD - Demand Deposits, SV - Savings)',
|
|
1861
|
+
required: true,
|
|
1862
|
+
options: {
|
|
1863
|
+
options: [
|
|
1864
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
1865
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
1866
|
+
],
|
|
1867
|
+
},
|
|
1868
|
+
}),
|
|
1869
|
+
accountNumber: Property.ShortText({
|
|
1870
|
+
displayName: 'Account Number',
|
|
1871
|
+
description: 'Up to 20 digit zero filled account number',
|
|
1872
|
+
required: true,
|
|
1873
|
+
}),
|
|
1874
|
+
amount: Property.Number({
|
|
1875
|
+
displayName: 'Amount',
|
|
1876
|
+
description: 'Amount (up to 13 digits with 2 decimal places)',
|
|
1877
|
+
required: true,
|
|
1878
|
+
}),
|
|
1879
|
+
floatDays: Property.Number({
|
|
1880
|
+
displayName: 'Float Days',
|
|
1881
|
+
description: 'Number of float days (0-99)',
|
|
1882
|
+
required: false,
|
|
1883
|
+
}),
|
|
1884
|
+
sourceId: Property.ShortText({
|
|
1885
|
+
displayName: 'Source ID',
|
|
1886
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
1887
|
+
required: false,
|
|
1888
|
+
}),
|
|
1889
|
+
},
|
|
1890
|
+
async run(context) {
|
|
1891
|
+
const auth = context.auth as any;
|
|
1892
|
+
const baseUrl = auth.baseUrl;
|
|
1893
|
+
const organizationId = auth.organizationId;
|
|
1894
|
+
const { xAuthorization, applicationCode, accountNumber, amount, floatDays, sourceId } = context.propsValue;
|
|
1895
|
+
const uuid = crypto.randomUUID();
|
|
1896
|
+
|
|
1897
|
+
const headers: Record<string, string> = {
|
|
1898
|
+
'accept': 'application/json',
|
|
1899
|
+
'Content-Type': 'application/json',
|
|
1900
|
+
'organization-id': organizationId,
|
|
1901
|
+
'uuid': uuid,
|
|
1902
|
+
'horizon-authorization': xAuthorization,
|
|
1903
|
+
};
|
|
1904
|
+
|
|
1905
|
+
if (sourceId) {
|
|
1906
|
+
headers['source-id'] = sourceId;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
const queryParams: Record<string, string> = {
|
|
1910
|
+
amount: String(amount),
|
|
1911
|
+
};
|
|
1912
|
+
if (floatDays !== undefined && floatDays !== null) {
|
|
1913
|
+
queryParams['floatDays'] = String(floatDays);
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
const response = await httpClient.sendRequest({
|
|
1917
|
+
method: HttpMethod.DELETE,
|
|
1918
|
+
url: `${baseUrl}/account-restrictions/v1/accounts/${applicationCode}/${accountNumber}/transactions/posting-restrictions/bank-float`,
|
|
1919
|
+
headers,
|
|
1920
|
+
queryParams,
|
|
1921
|
+
});
|
|
1922
|
+
|
|
1923
|
+
return response.body;
|
|
1924
|
+
},
|
|
1925
|
+
});
|
|
1926
|
+
|
|
1927
|
+
// ============================================================================
|
|
1928
|
+
// CUSTOMER FLOAT
|
|
1929
|
+
// ============================================================================
|
|
1930
|
+
|
|
1931
|
+
export const account_restrictions_customer_float_get = createAction({
|
|
1932
|
+
name: 'account_restrictions_customer_float_get',
|
|
1933
|
+
auth: fisHorizonAuth,
|
|
1934
|
+
displayName: 'Account Restrictions - Customer Float - Get',
|
|
1935
|
+
description: 'Retrieve DD or SV customer float records for a given account.',
|
|
1936
|
+
props: {
|
|
1937
|
+
xAuthorization: Property.ShortText({
|
|
1938
|
+
displayName: 'Authorization Token',
|
|
1939
|
+
description: 'JWT token from the authorization endpoint (Bearer token)',
|
|
1940
|
+
required: true,
|
|
1941
|
+
}),
|
|
1942
|
+
applicationCode: Property.StaticDropdown({
|
|
1943
|
+
displayName: 'Application Code',
|
|
1944
|
+
description: 'Application type (DD - Demand Deposits, SV - Savings)',
|
|
1945
|
+
required: true,
|
|
1946
|
+
options: {
|
|
1947
|
+
options: [
|
|
1948
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
1949
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
1950
|
+
],
|
|
1951
|
+
},
|
|
1952
|
+
}),
|
|
1953
|
+
accountNumber: Property.ShortText({
|
|
1954
|
+
displayName: 'Account Number',
|
|
1955
|
+
description: 'Up to 20 digit zero filled account number',
|
|
1956
|
+
required: true,
|
|
1957
|
+
}),
|
|
1958
|
+
firstNext: Property.StaticDropdown({
|
|
1959
|
+
displayName: 'First/Next',
|
|
1960
|
+
description: 'F - First request, N - Next request for additional records',
|
|
1961
|
+
required: true,
|
|
1962
|
+
options: {
|
|
1963
|
+
options: [
|
|
1964
|
+
{ label: 'F - First', value: 'F' },
|
|
1965
|
+
{ label: 'N - Next', value: 'N' },
|
|
1966
|
+
],
|
|
1967
|
+
},
|
|
1968
|
+
}),
|
|
1969
|
+
returnNumber: Property.Number({
|
|
1970
|
+
displayName: 'Return Number',
|
|
1971
|
+
description: 'Number of records to return (1-999)',
|
|
1972
|
+
required: true,
|
|
1973
|
+
defaultValue: 999,
|
|
1974
|
+
}),
|
|
1975
|
+
sourceId: Property.ShortText({
|
|
1976
|
+
displayName: 'Source ID',
|
|
1977
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
1978
|
+
required: false,
|
|
1979
|
+
}),
|
|
1980
|
+
},
|
|
1981
|
+
async run(context) {
|
|
1982
|
+
const auth = context.auth as any;
|
|
1983
|
+
const baseUrl = auth.baseUrl;
|
|
1984
|
+
const organizationId = auth.organizationId;
|
|
1985
|
+
const { xAuthorization, applicationCode, accountNumber, firstNext, returnNumber, sourceId } = context.propsValue;
|
|
1986
|
+
const uuid = crypto.randomUUID();
|
|
1987
|
+
|
|
1988
|
+
const headers: Record<string, string> = {
|
|
1989
|
+
'accept': 'application/json',
|
|
1990
|
+
'Content-Type': 'application/json',
|
|
1991
|
+
'organization-id': organizationId,
|
|
1992
|
+
'uuid': uuid,
|
|
1993
|
+
'horizon-authorization': xAuthorization,
|
|
1994
|
+
};
|
|
1995
|
+
|
|
1996
|
+
if (sourceId) {
|
|
1997
|
+
headers['source-id'] = sourceId;
|
|
1998
|
+
}
|
|
1999
|
+
|
|
2000
|
+
const response = await httpClient.sendRequest({
|
|
2001
|
+
method: HttpMethod.GET,
|
|
2002
|
+
url: `${baseUrl}/account-restrictions/v1/accounts/${applicationCode}/${accountNumber}/transactions/posting-restrictions/customer-float`,
|
|
2003
|
+
headers,
|
|
2004
|
+
queryParams: {
|
|
2005
|
+
firstNext: firstNext,
|
|
2006
|
+
returnNumber: String(returnNumber),
|
|
2007
|
+
},
|
|
2008
|
+
});
|
|
2009
|
+
|
|
2010
|
+
return response.body;
|
|
2011
|
+
},
|
|
2012
|
+
});
|
|
2013
|
+
|
|
2014
|
+
export const account_restrictions_customer_float_add = createAction({
|
|
2015
|
+
name: 'account_restrictions_customer_float_add',
|
|
2016
|
+
auth: fisHorizonAuth,
|
|
2017
|
+
displayName: 'Account Restrictions - Customer Float - Add',
|
|
2018
|
+
description: 'Add a Customer Float to a given DD/SV account.',
|
|
2019
|
+
props: {
|
|
2020
|
+
xAuthorization: Property.ShortText({
|
|
2021
|
+
displayName: 'Authorization Token',
|
|
2022
|
+
description: 'JWT token from the authorization endpoint (Bearer token)',
|
|
2023
|
+
required: true,
|
|
2024
|
+
}),
|
|
2025
|
+
applicationCode: Property.StaticDropdown({
|
|
2026
|
+
displayName: 'Application Code',
|
|
2027
|
+
description: 'Application type (DD - Demand Deposits, SV - Savings)',
|
|
2028
|
+
required: true,
|
|
2029
|
+
options: {
|
|
2030
|
+
options: [
|
|
2031
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
2032
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
2033
|
+
],
|
|
2034
|
+
},
|
|
2035
|
+
}),
|
|
2036
|
+
accountNumber: Property.ShortText({
|
|
2037
|
+
displayName: 'Account Number',
|
|
2038
|
+
description: 'Up to 20 digit zero filled account number',
|
|
2039
|
+
required: true,
|
|
2040
|
+
}),
|
|
2041
|
+
amount: Property.Number({
|
|
2042
|
+
displayName: 'Amount',
|
|
2043
|
+
description: 'Amount (up to 13 digits with 2 decimal places)',
|
|
2044
|
+
required: true,
|
|
2045
|
+
}),
|
|
2046
|
+
floatDays: Property.Number({
|
|
2047
|
+
displayName: 'Float Days',
|
|
2048
|
+
description: 'Number of float days (0-99)',
|
|
2049
|
+
required: true,
|
|
2050
|
+
}),
|
|
2051
|
+
sourceId: Property.ShortText({
|
|
2052
|
+
displayName: 'Source ID',
|
|
2053
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
2054
|
+
required: false,
|
|
2055
|
+
}),
|
|
2056
|
+
},
|
|
2057
|
+
async run(context) {
|
|
2058
|
+
const auth = context.auth as any;
|
|
2059
|
+
const baseUrl = auth.baseUrl;
|
|
2060
|
+
const organizationId = auth.organizationId;
|
|
2061
|
+
const { xAuthorization, applicationCode, accountNumber, amount, floatDays, sourceId } = context.propsValue;
|
|
2062
|
+
const uuid = crypto.randomUUID();
|
|
2063
|
+
|
|
2064
|
+
const headers: Record<string, string> = {
|
|
2065
|
+
'accept': 'application/json',
|
|
2066
|
+
'Content-Type': 'application/json',
|
|
2067
|
+
'organization-id': organizationId,
|
|
2068
|
+
'uuid': uuid,
|
|
2069
|
+
'horizon-authorization': xAuthorization,
|
|
2070
|
+
};
|
|
2071
|
+
|
|
2072
|
+
if (sourceId) {
|
|
2073
|
+
headers['source-id'] = sourceId;
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
const body: Record<string, any> = {
|
|
2077
|
+
amount: amount,
|
|
2078
|
+
floatDays: floatDays,
|
|
2079
|
+
};
|
|
2080
|
+
|
|
2081
|
+
const response = await httpClient.sendRequest({
|
|
2082
|
+
method: HttpMethod.POST,
|
|
2083
|
+
url: `${baseUrl}/account-restrictions/v1/accounts/${applicationCode}/${accountNumber}/transactions/posting-restrictions/customer-float`,
|
|
2084
|
+
headers,
|
|
2085
|
+
body,
|
|
2086
|
+
});
|
|
2087
|
+
|
|
2088
|
+
return response.body;
|
|
2089
|
+
},
|
|
2090
|
+
});
|
|
2091
|
+
|
|
2092
|
+
export const account_restrictions_customer_float_delete = createAction({
|
|
2093
|
+
name: 'account_restrictions_customer_float_delete',
|
|
2094
|
+
auth: fisHorizonAuth,
|
|
2095
|
+
displayName: 'Account Restrictions - Customer Float - Delete',
|
|
2096
|
+
description: 'Delete a Customer Float for a given DD/SV account.',
|
|
2097
|
+
props: {
|
|
2098
|
+
xAuthorization: Property.ShortText({
|
|
2099
|
+
displayName: 'Authorization Token',
|
|
2100
|
+
description: 'JWT token from the authorization endpoint (Bearer token)',
|
|
2101
|
+
required: true,
|
|
2102
|
+
}),
|
|
2103
|
+
applicationCode: Property.StaticDropdown({
|
|
2104
|
+
displayName: 'Application Code',
|
|
2105
|
+
description: 'Application type (DD - Demand Deposits, SV - Savings)',
|
|
2106
|
+
required: true,
|
|
2107
|
+
options: {
|
|
2108
|
+
options: [
|
|
2109
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
2110
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
2111
|
+
],
|
|
2112
|
+
},
|
|
2113
|
+
}),
|
|
2114
|
+
accountNumber: Property.ShortText({
|
|
2115
|
+
displayName: 'Account Number',
|
|
2116
|
+
description: 'Up to 20 digit zero filled account number',
|
|
2117
|
+
required: true,
|
|
2118
|
+
}),
|
|
2119
|
+
amount: Property.Number({
|
|
2120
|
+
displayName: 'Amount',
|
|
2121
|
+
description: 'Amount (up to 13 digits with 2 decimal places)',
|
|
2122
|
+
required: true,
|
|
2123
|
+
}),
|
|
2124
|
+
floatDays: Property.Number({
|
|
2125
|
+
displayName: 'Float Days',
|
|
2126
|
+
description: 'Number of float days (0-99)',
|
|
2127
|
+
required: false,
|
|
2128
|
+
}),
|
|
2129
|
+
sourceId: Property.ShortText({
|
|
2130
|
+
displayName: 'Source ID',
|
|
2131
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
2132
|
+
required: false,
|
|
2133
|
+
}),
|
|
2134
|
+
},
|
|
2135
|
+
async run(context) {
|
|
2136
|
+
const auth = context.auth as any;
|
|
2137
|
+
const baseUrl = auth.baseUrl;
|
|
2138
|
+
const organizationId = auth.organizationId;
|
|
2139
|
+
const { xAuthorization, applicationCode, accountNumber, amount, floatDays, sourceId } = context.propsValue;
|
|
2140
|
+
const uuid = crypto.randomUUID();
|
|
2141
|
+
|
|
2142
|
+
const headers: Record<string, string> = {
|
|
2143
|
+
'accept': 'application/json',
|
|
2144
|
+
'Content-Type': 'application/json',
|
|
2145
|
+
'organization-id': organizationId,
|
|
2146
|
+
'uuid': uuid,
|
|
2147
|
+
'horizon-authorization': xAuthorization,
|
|
2148
|
+
};
|
|
2149
|
+
|
|
2150
|
+
if (sourceId) {
|
|
2151
|
+
headers['source-id'] = sourceId;
|
|
2152
|
+
}
|
|
2153
|
+
|
|
2154
|
+
const queryParams: Record<string, string> = {
|
|
2155
|
+
amount: String(amount),
|
|
2156
|
+
};
|
|
2157
|
+
if (floatDays !== undefined && floatDays !== null) {
|
|
2158
|
+
queryParams['floatDays'] = String(floatDays);
|
|
2159
|
+
}
|
|
2160
|
+
|
|
2161
|
+
const response = await httpClient.sendRequest({
|
|
2162
|
+
method: HttpMethod.DELETE,
|
|
2163
|
+
url: `${baseUrl}/account-restrictions/v1/accounts/${applicationCode}/${accountNumber}/transactions/posting-restrictions/customer-float`,
|
|
2164
|
+
headers,
|
|
2165
|
+
queryParams,
|
|
2166
|
+
});
|
|
2167
|
+
|
|
2168
|
+
return response.body;
|
|
2169
|
+
},
|
|
2170
|
+
});
|
|
2171
|
+
|
|
2172
|
+
// ============================================================================
|
|
2173
|
+
// NO CHECKS
|
|
2174
|
+
// ============================================================================
|
|
2175
|
+
|
|
2176
|
+
export const account_restrictions_no_checks_get = createAction({
|
|
2177
|
+
name: 'account_restrictions_no_checks_get',
|
|
2178
|
+
auth: fisHorizonAuth,
|
|
2179
|
+
displayName: 'Account Restrictions - No Checks - Get',
|
|
2180
|
+
description: 'Retrieve a no checks restriction for a given DD/SV account.',
|
|
2181
|
+
props: {
|
|
2182
|
+
xAuthorization: Property.ShortText({
|
|
2183
|
+
displayName: 'Authorization Token',
|
|
2184
|
+
description: 'JWT token from the authorization endpoint (Bearer token)',
|
|
2185
|
+
required: true,
|
|
2186
|
+
}),
|
|
2187
|
+
applicationCode: Property.StaticDropdown({
|
|
2188
|
+
displayName: 'Application Code',
|
|
2189
|
+
description: 'Application type (DD - Demand Deposits, SV - Savings)',
|
|
2190
|
+
required: true,
|
|
2191
|
+
options: {
|
|
2192
|
+
options: [
|
|
2193
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
2194
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
2195
|
+
],
|
|
2196
|
+
},
|
|
2197
|
+
}),
|
|
2198
|
+
accountNumber: Property.ShortText({
|
|
2199
|
+
displayName: 'Account Number',
|
|
2200
|
+
description: 'Up to 20 digit zero filled account number',
|
|
2201
|
+
required: true,
|
|
2202
|
+
}),
|
|
2203
|
+
firstNext: Property.StaticDropdown({
|
|
2204
|
+
displayName: 'First/Next',
|
|
2205
|
+
description: 'F - First request, N - Next request for additional records',
|
|
2206
|
+
required: true,
|
|
2207
|
+
options: {
|
|
2208
|
+
options: [
|
|
2209
|
+
{ label: 'F - First', value: 'F' },
|
|
2210
|
+
{ label: 'N - Next', value: 'N' },
|
|
2211
|
+
],
|
|
2212
|
+
},
|
|
2213
|
+
}),
|
|
2214
|
+
returnNumber: Property.Number({
|
|
2215
|
+
displayName: 'Return Number',
|
|
2216
|
+
description: 'Number of records to return (1-999)',
|
|
2217
|
+
required: true,
|
|
2218
|
+
defaultValue: 999,
|
|
2219
|
+
}),
|
|
2220
|
+
sourceId: Property.ShortText({
|
|
2221
|
+
displayName: 'Source ID',
|
|
2222
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
2223
|
+
required: false,
|
|
2224
|
+
}),
|
|
2225
|
+
},
|
|
2226
|
+
async run(context) {
|
|
2227
|
+
const auth = context.auth as any;
|
|
2228
|
+
const baseUrl = auth.baseUrl;
|
|
2229
|
+
const organizationId = auth.organizationId;
|
|
2230
|
+
const { xAuthorization, applicationCode, accountNumber, firstNext, returnNumber, sourceId } = context.propsValue;
|
|
2231
|
+
const uuid = crypto.randomUUID();
|
|
2232
|
+
|
|
2233
|
+
const headers: Record<string, string> = {
|
|
2234
|
+
'accept': 'application/json',
|
|
2235
|
+
'Content-Type': 'application/json',
|
|
2236
|
+
'organization-id': organizationId,
|
|
2237
|
+
'uuid': uuid,
|
|
2238
|
+
'horizon-authorization': xAuthorization,
|
|
2239
|
+
};
|
|
2240
|
+
|
|
2241
|
+
if (sourceId) {
|
|
2242
|
+
headers['source-id'] = sourceId;
|
|
2243
|
+
}
|
|
2244
|
+
|
|
2245
|
+
const response = await httpClient.sendRequest({
|
|
2246
|
+
method: HttpMethod.GET,
|
|
2247
|
+
url: `${baseUrl}/account-restrictions/v1/accounts/${applicationCode}/${accountNumber}/transactions/posting-restrictions/no-checks`,
|
|
2248
|
+
headers,
|
|
2249
|
+
queryParams: {
|
|
2250
|
+
firstNext: firstNext,
|
|
2251
|
+
returnNumber: String(returnNumber),
|
|
2252
|
+
},
|
|
2253
|
+
});
|
|
2254
|
+
|
|
2255
|
+
return response.body;
|
|
2256
|
+
},
|
|
2257
|
+
});
|
|
2258
|
+
|
|
2259
|
+
export const account_restrictions_no_checks_add = createAction({
|
|
2260
|
+
name: 'account_restrictions_no_checks_add',
|
|
2261
|
+
auth: fisHorizonAuth,
|
|
2262
|
+
displayName: 'Account Restrictions - No Checks - Add',
|
|
2263
|
+
description: 'Add a no checks restriction to a given DD/SV account.',
|
|
2264
|
+
props: {
|
|
2265
|
+
xAuthorization: Property.ShortText({
|
|
2266
|
+
displayName: 'Authorization Token',
|
|
2267
|
+
description: 'JWT token from the authorization endpoint (Bearer token)',
|
|
2268
|
+
required: true,
|
|
2269
|
+
}),
|
|
2270
|
+
applicationCode: Property.StaticDropdown({
|
|
2271
|
+
displayName: 'Application Code',
|
|
2272
|
+
description: 'Application type (DD - Demand Deposits, SV - Savings)',
|
|
2273
|
+
required: true,
|
|
2274
|
+
options: {
|
|
2275
|
+
options: [
|
|
2276
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
2277
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
2278
|
+
],
|
|
2279
|
+
},
|
|
2280
|
+
}),
|
|
2281
|
+
accountNumber: Property.ShortText({
|
|
2282
|
+
displayName: 'Account Number',
|
|
2283
|
+
description: 'Up to 20 digit zero filled account number',
|
|
2284
|
+
required: true,
|
|
2285
|
+
}),
|
|
2286
|
+
expirationDate: Property.Number({
|
|
2287
|
+
displayName: 'Expiration Date',
|
|
2288
|
+
description: 'Expiration date in YYYYMMDD format',
|
|
2289
|
+
required: true,
|
|
2290
|
+
}),
|
|
2291
|
+
userId: Property.ShortText({
|
|
2292
|
+
displayName: 'User ID',
|
|
2293
|
+
description: 'User ID (max 10 characters)',
|
|
2294
|
+
required: false,
|
|
2295
|
+
}),
|
|
2296
|
+
payeeDescription: Property.ShortText({
|
|
2297
|
+
displayName: 'Payee/Description',
|
|
2298
|
+
description: 'Payee/Reason/Description (max 25 characters)',
|
|
2299
|
+
required: false,
|
|
2300
|
+
}),
|
|
2301
|
+
overrideFlag: Property.ShortText({
|
|
2302
|
+
displayName: 'Override Flag',
|
|
2303
|
+
description: 'Y to override (only works for error 16, 17, or 32)',
|
|
2304
|
+
required: false,
|
|
2305
|
+
}),
|
|
2306
|
+
sourceId: Property.ShortText({
|
|
2307
|
+
displayName: 'Source ID',
|
|
2308
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
2309
|
+
required: false,
|
|
2310
|
+
}),
|
|
2311
|
+
},
|
|
2312
|
+
async run(context) {
|
|
2313
|
+
const auth = context.auth as any;
|
|
2314
|
+
const baseUrl = auth.baseUrl;
|
|
2315
|
+
const organizationId = auth.organizationId;
|
|
2316
|
+
const { xAuthorization, applicationCode, accountNumber, expirationDate, userId, payeeDescription, overrideFlag, sourceId } = context.propsValue;
|
|
2317
|
+
const uuid = crypto.randomUUID();
|
|
2318
|
+
|
|
2319
|
+
const headers: Record<string, string> = {
|
|
2320
|
+
'accept': 'application/json',
|
|
2321
|
+
'Content-Type': 'application/json',
|
|
2322
|
+
'organization-id': organizationId,
|
|
2323
|
+
'uuid': uuid,
|
|
2324
|
+
'horizon-authorization': xAuthorization,
|
|
2325
|
+
};
|
|
2326
|
+
|
|
2327
|
+
if (sourceId) {
|
|
2328
|
+
headers['source-id'] = sourceId;
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2331
|
+
const body: Record<string, any> = {
|
|
2332
|
+
expirationDate: expirationDate,
|
|
2333
|
+
};
|
|
2334
|
+
|
|
2335
|
+
if (userId) {
|
|
2336
|
+
body['userId'] = userId;
|
|
2337
|
+
}
|
|
2338
|
+
if (payeeDescription) {
|
|
2339
|
+
body['payeeDescription'] = payeeDescription;
|
|
2340
|
+
}
|
|
2341
|
+
if (overrideFlag) {
|
|
2342
|
+
body['overrideFlag'] = overrideFlag;
|
|
2343
|
+
}
|
|
2344
|
+
|
|
2345
|
+
const response = await httpClient.sendRequest({
|
|
2346
|
+
method: HttpMethod.POST,
|
|
2347
|
+
url: `${baseUrl}/account-restrictions/v1/accounts/${applicationCode}/${accountNumber}/transactions/posting-restrictions/no-checks`,
|
|
2348
|
+
headers,
|
|
2349
|
+
body,
|
|
2350
|
+
});
|
|
2351
|
+
|
|
2352
|
+
return response.body;
|
|
2353
|
+
},
|
|
2354
|
+
});
|
|
2355
|
+
|
|
2356
|
+
export const account_restrictions_no_checks_delete = createAction({
|
|
2357
|
+
name: 'account_restrictions_no_checks_delete',
|
|
2358
|
+
auth: fisHorizonAuth,
|
|
2359
|
+
displayName: 'Account Restrictions - No Checks - Delete',
|
|
2360
|
+
description: 'Delete a no checks restriction for a given DD/SV account.',
|
|
2361
|
+
props: {
|
|
2362
|
+
xAuthorization: Property.ShortText({
|
|
2363
|
+
displayName: 'Authorization Token',
|
|
2364
|
+
description: 'JWT token from the authorization endpoint (Bearer token)',
|
|
2365
|
+
required: true,
|
|
2366
|
+
}),
|
|
2367
|
+
applicationCode: Property.StaticDropdown({
|
|
2368
|
+
displayName: 'Application Code',
|
|
2369
|
+
description: 'Application type (DD - Demand Deposits, SV - Savings)',
|
|
2370
|
+
required: true,
|
|
2371
|
+
options: {
|
|
2372
|
+
options: [
|
|
2373
|
+
{ label: 'DD - Demand Deposits', value: 'DD' },
|
|
2374
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
2375
|
+
],
|
|
2376
|
+
},
|
|
2377
|
+
}),
|
|
2378
|
+
accountNumber: Property.ShortText({
|
|
2379
|
+
displayName: 'Account Number',
|
|
2380
|
+
description: 'Up to 20 digit zero filled account number',
|
|
2381
|
+
required: true,
|
|
2382
|
+
}),
|
|
2383
|
+
userId: Property.ShortText({
|
|
2384
|
+
displayName: 'User ID',
|
|
2385
|
+
description: 'User ID (max 10 characters)',
|
|
2386
|
+
required: false,
|
|
2387
|
+
}),
|
|
2388
|
+
sourceId: Property.ShortText({
|
|
2389
|
+
displayName: 'Source ID',
|
|
2390
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
2391
|
+
required: false,
|
|
2392
|
+
}),
|
|
2393
|
+
},
|
|
2394
|
+
async run(context) {
|
|
2395
|
+
const auth = context.auth as any;
|
|
2396
|
+
const baseUrl = auth.baseUrl;
|
|
2397
|
+
const organizationId = auth.organizationId;
|
|
2398
|
+
const { xAuthorization, applicationCode, accountNumber, userId, sourceId } = context.propsValue;
|
|
2399
|
+
const uuid = crypto.randomUUID();
|
|
2400
|
+
|
|
2401
|
+
const headers: Record<string, string> = {
|
|
2402
|
+
'accept': 'application/json',
|
|
2403
|
+
'Content-Type': 'application/json',
|
|
2404
|
+
'organization-id': organizationId,
|
|
2405
|
+
'uuid': uuid,
|
|
2406
|
+
'horizon-authorization': xAuthorization,
|
|
2407
|
+
};
|
|
2408
|
+
|
|
2409
|
+
if (sourceId) {
|
|
2410
|
+
headers['source-id'] = sourceId;
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2413
|
+
const queryParams: Record<string, string> = {};
|
|
2414
|
+
if (userId) {
|
|
2415
|
+
queryParams['userId'] = userId;
|
|
2416
|
+
}
|
|
2417
|
+
|
|
2418
|
+
const response = await httpClient.sendRequest({
|
|
2419
|
+
method: HttpMethod.DELETE,
|
|
2420
|
+
url: `${baseUrl}/account-restrictions/v1/accounts/${applicationCode}/${accountNumber}/transactions/posting-restrictions/no-checks`,
|
|
2421
|
+
headers,
|
|
2422
|
+
queryParams,
|
|
2423
|
+
});
|
|
2424
|
+
|
|
2425
|
+
return response.body;
|
|
2426
|
+
},
|
|
2427
|
+
});
|