@vqnguyen1/piece-fis-ibs 0.0.2 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/project.json +22 -0
- package/src/index.ts +320 -0
- package/src/lib/actions/bank-control.ts +378 -0
- package/src/lib/actions/customer.ts +1574 -0
- package/src/lib/actions/deposit.ts +749 -0
- package/src/lib/actions/get-customer.ts +73 -0
- package/src/lib/actions/loan.ts +925 -0
- package/src/lib/actions/search-customers.ts +143 -0
- package/src/lib/actions/security.ts +170 -0
- package/tsconfig.json +19 -0
- package/tsconfig.lib.json +10 -0
- package/src/index.d.ts +0 -16
- package/src/index.js +0 -88
- package/src/index.js.map +0 -1
- package/src/lib/actions/get-customer.d.ts +0 -12
- package/src/lib/actions/get-customer.js +0 -69
- package/src/lib/actions/get-customer.js.map +0 -1
- package/src/lib/actions/search-customers.d.ts +0 -17
- package/src/lib/actions/search-customers.js +0 -127
- package/src/lib/actions/search-customers.js.map +0 -1
|
@@ -0,0 +1,749 @@
|
|
|
1
|
+
import { createAction, Property } from '@activepieces/pieces-framework';
|
|
2
|
+
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
|
3
|
+
import { fisIbsAuth } from '../..';
|
|
4
|
+
|
|
5
|
+
// Helper function to build headers
|
|
6
|
+
function buildHeaders(auth: any, ibsAuthorization?: string): Record<string, string> {
|
|
7
|
+
const headers: Record<string, string> = {
|
|
8
|
+
'Content-Type': 'application/json',
|
|
9
|
+
'organization-id': auth.organizationId,
|
|
10
|
+
'source-id': auth.sourceId,
|
|
11
|
+
'application-id': auth.applicationId,
|
|
12
|
+
'uuid': crypto.randomUUID(),
|
|
13
|
+
'ibs-authorization': ibsAuthorization || auth.ibsAuthorization,
|
|
14
|
+
};
|
|
15
|
+
if (auth.securityTokenType) {
|
|
16
|
+
headers['security-token-type'] = auth.securityTokenType;
|
|
17
|
+
}
|
|
18
|
+
return headers;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// ============================================
|
|
22
|
+
// IBS-Deposit-Accounts.json
|
|
23
|
+
// ============================================
|
|
24
|
+
|
|
25
|
+
export const deposit_get_account = createAction({
|
|
26
|
+
auth: fisIbsAuth,
|
|
27
|
+
name: 'deposit_get_account',
|
|
28
|
+
displayName: 'Deposit - Get Account',
|
|
29
|
+
description: 'Retrieve deposit account information',
|
|
30
|
+
props: {
|
|
31
|
+
ibsAuthorization: Property.ShortText({
|
|
32
|
+
displayName: 'IBS Authorization',
|
|
33
|
+
required: false,
|
|
34
|
+
}),
|
|
35
|
+
acctNbr: Property.ShortText({
|
|
36
|
+
displayName: 'Account Number',
|
|
37
|
+
required: true,
|
|
38
|
+
}),
|
|
39
|
+
},
|
|
40
|
+
async run(context) {
|
|
41
|
+
const auth = context.auth as any;
|
|
42
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
43
|
+
|
|
44
|
+
const response = await httpClient.sendRequest({
|
|
45
|
+
method: HttpMethod.GET,
|
|
46
|
+
url: `${auth.baseUrl}/IBSDPACCT/v4/accounts/${context.propsValue.acctNbr}`,
|
|
47
|
+
headers,
|
|
48
|
+
});
|
|
49
|
+
return response.body;
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export const deposit_create_account = createAction({
|
|
54
|
+
auth: fisIbsAuth,
|
|
55
|
+
name: 'deposit_create_account',
|
|
56
|
+
displayName: 'Deposit - Create Account',
|
|
57
|
+
description: 'Create a new deposit account',
|
|
58
|
+
props: {
|
|
59
|
+
ibsAuthorization: Property.ShortText({
|
|
60
|
+
displayName: 'IBS Authorization',
|
|
61
|
+
required: false,
|
|
62
|
+
}),
|
|
63
|
+
accountData: Property.Object({
|
|
64
|
+
displayName: 'Account Data',
|
|
65
|
+
required: true,
|
|
66
|
+
}),
|
|
67
|
+
},
|
|
68
|
+
async run(context) {
|
|
69
|
+
const auth = context.auth as any;
|
|
70
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
71
|
+
|
|
72
|
+
const response = await httpClient.sendRequest({
|
|
73
|
+
method: HttpMethod.POST,
|
|
74
|
+
url: `${auth.baseUrl}/IBSDPACCT/v4/accounts`,
|
|
75
|
+
headers,
|
|
76
|
+
body: context.propsValue.accountData,
|
|
77
|
+
});
|
|
78
|
+
return response.body;
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
export const deposit_update_account = createAction({
|
|
83
|
+
auth: fisIbsAuth,
|
|
84
|
+
name: 'deposit_update_account',
|
|
85
|
+
displayName: 'Deposit - Update Account',
|
|
86
|
+
description: 'Update a deposit account',
|
|
87
|
+
props: {
|
|
88
|
+
ibsAuthorization: Property.ShortText({
|
|
89
|
+
displayName: 'IBS Authorization',
|
|
90
|
+
required: false,
|
|
91
|
+
}),
|
|
92
|
+
acctNbr: Property.ShortText({
|
|
93
|
+
displayName: 'Account Number',
|
|
94
|
+
required: true,
|
|
95
|
+
}),
|
|
96
|
+
accountData: Property.Object({
|
|
97
|
+
displayName: 'Account Data',
|
|
98
|
+
required: true,
|
|
99
|
+
}),
|
|
100
|
+
},
|
|
101
|
+
async run(context) {
|
|
102
|
+
const auth = context.auth as any;
|
|
103
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
104
|
+
|
|
105
|
+
const response = await httpClient.sendRequest({
|
|
106
|
+
method: HttpMethod.PUT,
|
|
107
|
+
url: `${auth.baseUrl}/IBSDPACCT/v4/accounts/${context.propsValue.acctNbr}`,
|
|
108
|
+
headers,
|
|
109
|
+
body: context.propsValue.accountData,
|
|
110
|
+
});
|
|
111
|
+
return response.body;
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
export const deposit_close_account = createAction({
|
|
116
|
+
auth: fisIbsAuth,
|
|
117
|
+
name: 'deposit_close_account',
|
|
118
|
+
displayName: 'Deposit - Close Account',
|
|
119
|
+
description: 'Close a deposit account',
|
|
120
|
+
props: {
|
|
121
|
+
ibsAuthorization: Property.ShortText({
|
|
122
|
+
displayName: 'IBS Authorization',
|
|
123
|
+
required: false,
|
|
124
|
+
}),
|
|
125
|
+
acctNbr: Property.ShortText({
|
|
126
|
+
displayName: 'Account Number',
|
|
127
|
+
required: true,
|
|
128
|
+
}),
|
|
129
|
+
closeData: Property.Object({
|
|
130
|
+
displayName: 'Close Data',
|
|
131
|
+
required: true,
|
|
132
|
+
}),
|
|
133
|
+
},
|
|
134
|
+
async run(context) {
|
|
135
|
+
const auth = context.auth as any;
|
|
136
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
137
|
+
|
|
138
|
+
const response = await httpClient.sendRequest({
|
|
139
|
+
method: HttpMethod.POST,
|
|
140
|
+
url: `${auth.baseUrl}/IBSDPACCT/v4/accounts/${context.propsValue.acctNbr}/close`,
|
|
141
|
+
headers,
|
|
142
|
+
body: context.propsValue.closeData,
|
|
143
|
+
});
|
|
144
|
+
return response.body;
|
|
145
|
+
},
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
export const deposit_get_balance = createAction({
|
|
149
|
+
auth: fisIbsAuth,
|
|
150
|
+
name: 'deposit_get_balance',
|
|
151
|
+
displayName: 'Deposit - Get Balance',
|
|
152
|
+
description: 'Retrieve deposit account balance',
|
|
153
|
+
props: {
|
|
154
|
+
ibsAuthorization: Property.ShortText({
|
|
155
|
+
displayName: 'IBS Authorization',
|
|
156
|
+
required: false,
|
|
157
|
+
}),
|
|
158
|
+
acctNbr: Property.ShortText({
|
|
159
|
+
displayName: 'Account Number',
|
|
160
|
+
required: true,
|
|
161
|
+
}),
|
|
162
|
+
},
|
|
163
|
+
async run(context) {
|
|
164
|
+
const auth = context.auth as any;
|
|
165
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
166
|
+
|
|
167
|
+
const response = await httpClient.sendRequest({
|
|
168
|
+
method: HttpMethod.GET,
|
|
169
|
+
url: `${auth.baseUrl}/IBSDPACCT/v4/accounts/${context.propsValue.acctNbr}/balance`,
|
|
170
|
+
headers,
|
|
171
|
+
});
|
|
172
|
+
return response.body;
|
|
173
|
+
},
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
export const deposit_get_interest_rates = createAction({
|
|
177
|
+
auth: fisIbsAuth,
|
|
178
|
+
name: 'deposit_get_interest_rates',
|
|
179
|
+
displayName: 'Deposit - Get Interest Rates',
|
|
180
|
+
description: 'Retrieve deposit account interest rates',
|
|
181
|
+
props: {
|
|
182
|
+
ibsAuthorization: Property.ShortText({
|
|
183
|
+
displayName: 'IBS Authorization',
|
|
184
|
+
required: false,
|
|
185
|
+
}),
|
|
186
|
+
acctNbr: Property.ShortText({
|
|
187
|
+
displayName: 'Account Number',
|
|
188
|
+
required: true,
|
|
189
|
+
}),
|
|
190
|
+
},
|
|
191
|
+
async run(context) {
|
|
192
|
+
const auth = context.auth as any;
|
|
193
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
194
|
+
|
|
195
|
+
const response = await httpClient.sendRequest({
|
|
196
|
+
method: HttpMethod.GET,
|
|
197
|
+
url: `${auth.baseUrl}/IBSDPACCT/v4/accounts/${context.propsValue.acctNbr}/interest-rates`,
|
|
198
|
+
headers,
|
|
199
|
+
});
|
|
200
|
+
return response.body;
|
|
201
|
+
},
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
export const deposit_update_interest_rates = createAction({
|
|
205
|
+
auth: fisIbsAuth,
|
|
206
|
+
name: 'deposit_update_interest_rates',
|
|
207
|
+
displayName: 'Deposit - Update Interest Rates',
|
|
208
|
+
description: 'Update deposit account interest rates',
|
|
209
|
+
props: {
|
|
210
|
+
ibsAuthorization: Property.ShortText({
|
|
211
|
+
displayName: 'IBS Authorization',
|
|
212
|
+
required: false,
|
|
213
|
+
}),
|
|
214
|
+
acctNbr: Property.ShortText({
|
|
215
|
+
displayName: 'Account Number',
|
|
216
|
+
required: true,
|
|
217
|
+
}),
|
|
218
|
+
rateData: Property.Object({
|
|
219
|
+
displayName: 'Rate Data',
|
|
220
|
+
required: true,
|
|
221
|
+
}),
|
|
222
|
+
},
|
|
223
|
+
async run(context) {
|
|
224
|
+
const auth = context.auth as any;
|
|
225
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
226
|
+
|
|
227
|
+
const response = await httpClient.sendRequest({
|
|
228
|
+
method: HttpMethod.PUT,
|
|
229
|
+
url: `${auth.baseUrl}/IBSDPACCT/v4/accounts/${context.propsValue.acctNbr}/interest-rates`,
|
|
230
|
+
headers,
|
|
231
|
+
body: context.propsValue.rateData,
|
|
232
|
+
});
|
|
233
|
+
return response.body;
|
|
234
|
+
},
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
// ============================================
|
|
238
|
+
// IBS-Deposit-Transactions.json
|
|
239
|
+
// ============================================
|
|
240
|
+
|
|
241
|
+
export const deposit_get_transactions = createAction({
|
|
242
|
+
auth: fisIbsAuth,
|
|
243
|
+
name: 'deposit_get_transactions',
|
|
244
|
+
displayName: 'Deposit - Get Transactions',
|
|
245
|
+
description: 'Retrieve deposit account transactions',
|
|
246
|
+
props: {
|
|
247
|
+
ibsAuthorization: Property.ShortText({
|
|
248
|
+
displayName: 'IBS Authorization',
|
|
249
|
+
required: false,
|
|
250
|
+
}),
|
|
251
|
+
acctNbr: Property.ShortText({
|
|
252
|
+
displayName: 'Account Number',
|
|
253
|
+
required: true,
|
|
254
|
+
}),
|
|
255
|
+
startDate: Property.ShortText({
|
|
256
|
+
displayName: 'Start Date',
|
|
257
|
+
description: 'YYYY-MM-DD format',
|
|
258
|
+
required: false,
|
|
259
|
+
}),
|
|
260
|
+
endDate: Property.ShortText({
|
|
261
|
+
displayName: 'End Date',
|
|
262
|
+
description: 'YYYY-MM-DD format',
|
|
263
|
+
required: false,
|
|
264
|
+
}),
|
|
265
|
+
},
|
|
266
|
+
async run(context) {
|
|
267
|
+
const auth = context.auth as any;
|
|
268
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
269
|
+
|
|
270
|
+
const params = new URLSearchParams();
|
|
271
|
+
if (context.propsValue.startDate) params.append('startDate', context.propsValue.startDate);
|
|
272
|
+
if (context.propsValue.endDate) params.append('endDate', context.propsValue.endDate);
|
|
273
|
+
|
|
274
|
+
const queryString = params.toString();
|
|
275
|
+
const url = `${auth.baseUrl}/IBSDPTRAN/v4/accounts/${context.propsValue.acctNbr}/transactions${queryString ? '?' + queryString : ''}`;
|
|
276
|
+
|
|
277
|
+
const response = await httpClient.sendRequest({
|
|
278
|
+
method: HttpMethod.GET,
|
|
279
|
+
url,
|
|
280
|
+
headers,
|
|
281
|
+
});
|
|
282
|
+
return response.body;
|
|
283
|
+
},
|
|
284
|
+
});
|
|
285
|
+
|
|
286
|
+
export const deposit_post_transaction = createAction({
|
|
287
|
+
auth: fisIbsAuth,
|
|
288
|
+
name: 'deposit_post_transaction',
|
|
289
|
+
displayName: 'Deposit - Post Transaction',
|
|
290
|
+
description: 'Post a transaction to a deposit account',
|
|
291
|
+
props: {
|
|
292
|
+
ibsAuthorization: Property.ShortText({
|
|
293
|
+
displayName: 'IBS Authorization',
|
|
294
|
+
required: false,
|
|
295
|
+
}),
|
|
296
|
+
acctNbr: Property.ShortText({
|
|
297
|
+
displayName: 'Account Number',
|
|
298
|
+
required: true,
|
|
299
|
+
}),
|
|
300
|
+
transactionData: Property.Object({
|
|
301
|
+
displayName: 'Transaction Data',
|
|
302
|
+
required: true,
|
|
303
|
+
}),
|
|
304
|
+
},
|
|
305
|
+
async run(context) {
|
|
306
|
+
const auth = context.auth as any;
|
|
307
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
308
|
+
|
|
309
|
+
const response = await httpClient.sendRequest({
|
|
310
|
+
method: HttpMethod.POST,
|
|
311
|
+
url: `${auth.baseUrl}/IBSDPTRAN/v4/accounts/${context.propsValue.acctNbr}/transactions`,
|
|
312
|
+
headers,
|
|
313
|
+
body: context.propsValue.transactionData,
|
|
314
|
+
});
|
|
315
|
+
return response.body;
|
|
316
|
+
},
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
export const deposit_reverse_transaction = createAction({
|
|
320
|
+
auth: fisIbsAuth,
|
|
321
|
+
name: 'deposit_reverse_transaction',
|
|
322
|
+
displayName: 'Deposit - Reverse Transaction',
|
|
323
|
+
description: 'Reverse a deposit account transaction',
|
|
324
|
+
props: {
|
|
325
|
+
ibsAuthorization: Property.ShortText({
|
|
326
|
+
displayName: 'IBS Authorization',
|
|
327
|
+
required: false,
|
|
328
|
+
}),
|
|
329
|
+
acctNbr: Property.ShortText({
|
|
330
|
+
displayName: 'Account Number',
|
|
331
|
+
required: true,
|
|
332
|
+
}),
|
|
333
|
+
reversalData: Property.Object({
|
|
334
|
+
displayName: 'Reversal Data',
|
|
335
|
+
required: true,
|
|
336
|
+
}),
|
|
337
|
+
},
|
|
338
|
+
async run(context) {
|
|
339
|
+
const auth = context.auth as any;
|
|
340
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
341
|
+
|
|
342
|
+
const response = await httpClient.sendRequest({
|
|
343
|
+
method: HttpMethod.POST,
|
|
344
|
+
url: `${auth.baseUrl}/IBSDPTRAN/v4/accounts/${context.propsValue.acctNbr}/reversals`,
|
|
345
|
+
headers,
|
|
346
|
+
body: context.propsValue.reversalData,
|
|
347
|
+
});
|
|
348
|
+
return response.body;
|
|
349
|
+
},
|
|
350
|
+
});
|
|
351
|
+
|
|
352
|
+
export const deposit_transfer = createAction({
|
|
353
|
+
auth: fisIbsAuth,
|
|
354
|
+
name: 'deposit_transfer',
|
|
355
|
+
displayName: 'Deposit - Transfer Funds',
|
|
356
|
+
description: 'Transfer funds between deposit accounts',
|
|
357
|
+
props: {
|
|
358
|
+
ibsAuthorization: Property.ShortText({
|
|
359
|
+
displayName: 'IBS Authorization',
|
|
360
|
+
required: false,
|
|
361
|
+
}),
|
|
362
|
+
transferData: Property.Object({
|
|
363
|
+
displayName: 'Transfer Data',
|
|
364
|
+
description: 'Source account, destination account, and amount',
|
|
365
|
+
required: true,
|
|
366
|
+
}),
|
|
367
|
+
},
|
|
368
|
+
async run(context) {
|
|
369
|
+
const auth = context.auth as any;
|
|
370
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
371
|
+
|
|
372
|
+
const response = await httpClient.sendRequest({
|
|
373
|
+
method: HttpMethod.POST,
|
|
374
|
+
url: `${auth.baseUrl}/IBSDPTRAN/v4/transfers`,
|
|
375
|
+
headers,
|
|
376
|
+
body: context.propsValue.transferData,
|
|
377
|
+
});
|
|
378
|
+
return response.body;
|
|
379
|
+
},
|
|
380
|
+
});
|
|
381
|
+
|
|
382
|
+
// ============================================
|
|
383
|
+
// IBS-Deposits-Holds.json
|
|
384
|
+
// ============================================
|
|
385
|
+
|
|
386
|
+
export const deposit_get_holds = createAction({
|
|
387
|
+
auth: fisIbsAuth,
|
|
388
|
+
name: 'deposit_get_holds',
|
|
389
|
+
displayName: 'Deposit - Get Holds',
|
|
390
|
+
description: 'Retrieve deposit account holds',
|
|
391
|
+
props: {
|
|
392
|
+
ibsAuthorization: Property.ShortText({
|
|
393
|
+
displayName: 'IBS Authorization',
|
|
394
|
+
required: false,
|
|
395
|
+
}),
|
|
396
|
+
acctNbr: Property.ShortText({
|
|
397
|
+
displayName: 'Account Number',
|
|
398
|
+
required: true,
|
|
399
|
+
}),
|
|
400
|
+
},
|
|
401
|
+
async run(context) {
|
|
402
|
+
const auth = context.auth as any;
|
|
403
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
404
|
+
|
|
405
|
+
const response = await httpClient.sendRequest({
|
|
406
|
+
method: HttpMethod.GET,
|
|
407
|
+
url: `${auth.baseUrl}/IBSDPHLD/v4/accounts/${context.propsValue.acctNbr}/holds`,
|
|
408
|
+
headers,
|
|
409
|
+
});
|
|
410
|
+
return response.body;
|
|
411
|
+
},
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
export const deposit_create_hold = createAction({
|
|
415
|
+
auth: fisIbsAuth,
|
|
416
|
+
name: 'deposit_create_hold',
|
|
417
|
+
displayName: 'Deposit - Create Hold',
|
|
418
|
+
description: 'Create a hold on a deposit account',
|
|
419
|
+
props: {
|
|
420
|
+
ibsAuthorization: Property.ShortText({
|
|
421
|
+
displayName: 'IBS Authorization',
|
|
422
|
+
required: false,
|
|
423
|
+
}),
|
|
424
|
+
acctNbr: Property.ShortText({
|
|
425
|
+
displayName: 'Account Number',
|
|
426
|
+
required: true,
|
|
427
|
+
}),
|
|
428
|
+
holdData: Property.Object({
|
|
429
|
+
displayName: 'Hold Data',
|
|
430
|
+
required: true,
|
|
431
|
+
}),
|
|
432
|
+
},
|
|
433
|
+
async run(context) {
|
|
434
|
+
const auth = context.auth as any;
|
|
435
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
436
|
+
|
|
437
|
+
const response = await httpClient.sendRequest({
|
|
438
|
+
method: HttpMethod.POST,
|
|
439
|
+
url: `${auth.baseUrl}/IBSDPHLD/v4/accounts/${context.propsValue.acctNbr}/holds`,
|
|
440
|
+
headers,
|
|
441
|
+
body: context.propsValue.holdData,
|
|
442
|
+
});
|
|
443
|
+
return response.body;
|
|
444
|
+
},
|
|
445
|
+
});
|
|
446
|
+
|
|
447
|
+
export const deposit_update_hold = createAction({
|
|
448
|
+
auth: fisIbsAuth,
|
|
449
|
+
name: 'deposit_update_hold',
|
|
450
|
+
displayName: 'Deposit - Update Hold',
|
|
451
|
+
description: 'Update a hold on a deposit account',
|
|
452
|
+
props: {
|
|
453
|
+
ibsAuthorization: Property.ShortText({
|
|
454
|
+
displayName: 'IBS Authorization',
|
|
455
|
+
required: false,
|
|
456
|
+
}),
|
|
457
|
+
acctNbr: Property.ShortText({
|
|
458
|
+
displayName: 'Account Number',
|
|
459
|
+
required: true,
|
|
460
|
+
}),
|
|
461
|
+
holdData: Property.Object({
|
|
462
|
+
displayName: 'Hold Data',
|
|
463
|
+
required: true,
|
|
464
|
+
}),
|
|
465
|
+
},
|
|
466
|
+
async run(context) {
|
|
467
|
+
const auth = context.auth as any;
|
|
468
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
469
|
+
|
|
470
|
+
const response = await httpClient.sendRequest({
|
|
471
|
+
method: HttpMethod.PUT,
|
|
472
|
+
url: `${auth.baseUrl}/IBSDPHLD/v4/accounts/${context.propsValue.acctNbr}/holds`,
|
|
473
|
+
headers,
|
|
474
|
+
body: context.propsValue.holdData,
|
|
475
|
+
});
|
|
476
|
+
return response.body;
|
|
477
|
+
},
|
|
478
|
+
});
|
|
479
|
+
|
|
480
|
+
export const deposit_release_hold = createAction({
|
|
481
|
+
auth: fisIbsAuth,
|
|
482
|
+
name: 'deposit_release_hold',
|
|
483
|
+
displayName: 'Deposit - Release Hold',
|
|
484
|
+
description: 'Release a hold on a deposit account',
|
|
485
|
+
props: {
|
|
486
|
+
ibsAuthorization: Property.ShortText({
|
|
487
|
+
displayName: 'IBS Authorization',
|
|
488
|
+
required: false,
|
|
489
|
+
}),
|
|
490
|
+
acctNbr: Property.ShortText({
|
|
491
|
+
displayName: 'Account Number',
|
|
492
|
+
required: true,
|
|
493
|
+
}),
|
|
494
|
+
holdId: Property.ShortText({
|
|
495
|
+
displayName: 'Hold ID',
|
|
496
|
+
required: true,
|
|
497
|
+
}),
|
|
498
|
+
},
|
|
499
|
+
async run(context) {
|
|
500
|
+
const auth = context.auth as any;
|
|
501
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
502
|
+
|
|
503
|
+
const response = await httpClient.sendRequest({
|
|
504
|
+
method: HttpMethod.DELETE,
|
|
505
|
+
url: `${auth.baseUrl}/IBSDPHLD/v4/accounts/${context.propsValue.acctNbr}/holds/${context.propsValue.holdId}`,
|
|
506
|
+
headers,
|
|
507
|
+
});
|
|
508
|
+
return response.body;
|
|
509
|
+
},
|
|
510
|
+
});
|
|
511
|
+
|
|
512
|
+
// ============================================
|
|
513
|
+
// IBS-Deposit-Escrow-Sub-Accounts.json
|
|
514
|
+
// ============================================
|
|
515
|
+
|
|
516
|
+
export const deposit_get_escrow_accounts = createAction({
|
|
517
|
+
auth: fisIbsAuth,
|
|
518
|
+
name: 'deposit_get_escrow_accounts',
|
|
519
|
+
displayName: 'Deposit - Get Escrow Sub-Accounts',
|
|
520
|
+
description: 'Retrieve escrow sub-account information',
|
|
521
|
+
props: {
|
|
522
|
+
ibsAuthorization: Property.ShortText({
|
|
523
|
+
displayName: 'IBS Authorization',
|
|
524
|
+
required: false,
|
|
525
|
+
}),
|
|
526
|
+
acctNbr: Property.ShortText({
|
|
527
|
+
displayName: 'Account Number',
|
|
528
|
+
required: true,
|
|
529
|
+
}),
|
|
530
|
+
},
|
|
531
|
+
async run(context) {
|
|
532
|
+
const auth = context.auth as any;
|
|
533
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
534
|
+
|
|
535
|
+
const response = await httpClient.sendRequest({
|
|
536
|
+
method: HttpMethod.GET,
|
|
537
|
+
url: `${auth.baseUrl}/IBSDPESC/v4/accounts/${context.propsValue.acctNbr}/escrow-sub-accounts`,
|
|
538
|
+
headers,
|
|
539
|
+
});
|
|
540
|
+
return response.body;
|
|
541
|
+
},
|
|
542
|
+
});
|
|
543
|
+
|
|
544
|
+
export const deposit_create_escrow_account = createAction({
|
|
545
|
+
auth: fisIbsAuth,
|
|
546
|
+
name: 'deposit_create_escrow_account',
|
|
547
|
+
displayName: 'Deposit - Create Escrow Sub-Account',
|
|
548
|
+
description: 'Create an escrow sub-account',
|
|
549
|
+
props: {
|
|
550
|
+
ibsAuthorization: Property.ShortText({
|
|
551
|
+
displayName: 'IBS Authorization',
|
|
552
|
+
required: false,
|
|
553
|
+
}),
|
|
554
|
+
acctNbr: Property.ShortText({
|
|
555
|
+
displayName: 'Account Number',
|
|
556
|
+
required: true,
|
|
557
|
+
}),
|
|
558
|
+
escrowData: Property.Object({
|
|
559
|
+
displayName: 'Escrow Data',
|
|
560
|
+
required: true,
|
|
561
|
+
}),
|
|
562
|
+
},
|
|
563
|
+
async run(context) {
|
|
564
|
+
const auth = context.auth as any;
|
|
565
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
566
|
+
|
|
567
|
+
const response = await httpClient.sendRequest({
|
|
568
|
+
method: HttpMethod.POST,
|
|
569
|
+
url: `${auth.baseUrl}/IBSDPESC/v4/accounts/${context.propsValue.acctNbr}/escrow-sub-accounts`,
|
|
570
|
+
headers,
|
|
571
|
+
body: context.propsValue.escrowData,
|
|
572
|
+
});
|
|
573
|
+
return response.body;
|
|
574
|
+
},
|
|
575
|
+
});
|
|
576
|
+
|
|
577
|
+
export const deposit_update_escrow_account = createAction({
|
|
578
|
+
auth: fisIbsAuth,
|
|
579
|
+
name: 'deposit_update_escrow_account',
|
|
580
|
+
displayName: 'Deposit - Update Escrow Sub-Account',
|
|
581
|
+
description: 'Update an escrow sub-account',
|
|
582
|
+
props: {
|
|
583
|
+
ibsAuthorization: Property.ShortText({
|
|
584
|
+
displayName: 'IBS Authorization',
|
|
585
|
+
required: false,
|
|
586
|
+
}),
|
|
587
|
+
acctNbr: Property.ShortText({
|
|
588
|
+
displayName: 'Account Number',
|
|
589
|
+
required: true,
|
|
590
|
+
}),
|
|
591
|
+
escrowData: Property.Object({
|
|
592
|
+
displayName: 'Escrow Data',
|
|
593
|
+
required: true,
|
|
594
|
+
}),
|
|
595
|
+
},
|
|
596
|
+
async run(context) {
|
|
597
|
+
const auth = context.auth as any;
|
|
598
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
599
|
+
|
|
600
|
+
const response = await httpClient.sendRequest({
|
|
601
|
+
method: HttpMethod.PUT,
|
|
602
|
+
url: `${auth.baseUrl}/IBSDPESC/v4/accounts/${context.propsValue.acctNbr}/escrow-sub-accounts`,
|
|
603
|
+
headers,
|
|
604
|
+
body: context.propsValue.escrowData,
|
|
605
|
+
});
|
|
606
|
+
return response.body;
|
|
607
|
+
},
|
|
608
|
+
});
|
|
609
|
+
|
|
610
|
+
// ============================================
|
|
611
|
+
// IBS-Deposit-Calculator.json
|
|
612
|
+
// ============================================
|
|
613
|
+
|
|
614
|
+
export const deposit_calculate = createAction({
|
|
615
|
+
auth: fisIbsAuth,
|
|
616
|
+
name: 'deposit_calculate',
|
|
617
|
+
displayName: 'Deposit - Calculator',
|
|
618
|
+
description: 'Calculate deposit interest, maturity, or other values',
|
|
619
|
+
props: {
|
|
620
|
+
ibsAuthorization: Property.ShortText({
|
|
621
|
+
displayName: 'IBS Authorization',
|
|
622
|
+
required: false,
|
|
623
|
+
}),
|
|
624
|
+
calculationData: Property.Object({
|
|
625
|
+
displayName: 'Calculation Data',
|
|
626
|
+
required: true,
|
|
627
|
+
}),
|
|
628
|
+
},
|
|
629
|
+
async run(context) {
|
|
630
|
+
const auth = context.auth as any;
|
|
631
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
632
|
+
|
|
633
|
+
const response = await httpClient.sendRequest({
|
|
634
|
+
method: HttpMethod.POST,
|
|
635
|
+
url: `${auth.baseUrl}/IBSDPCALC/v4/calculate`,
|
|
636
|
+
headers,
|
|
637
|
+
body: context.propsValue.calculationData,
|
|
638
|
+
});
|
|
639
|
+
return response.body;
|
|
640
|
+
},
|
|
641
|
+
});
|
|
642
|
+
|
|
643
|
+
// ============================================
|
|
644
|
+
// IBS-Deposit-Origination.json
|
|
645
|
+
// ============================================
|
|
646
|
+
|
|
647
|
+
export const deposit_originate = createAction({
|
|
648
|
+
auth: fisIbsAuth,
|
|
649
|
+
name: 'deposit_originate',
|
|
650
|
+
displayName: 'Deposit - Originate Account',
|
|
651
|
+
description: 'Originate a new deposit account',
|
|
652
|
+
props: {
|
|
653
|
+
ibsAuthorization: Property.ShortText({
|
|
654
|
+
displayName: 'IBS Authorization',
|
|
655
|
+
required: false,
|
|
656
|
+
}),
|
|
657
|
+
originationData: Property.Object({
|
|
658
|
+
displayName: 'Origination Data',
|
|
659
|
+
required: true,
|
|
660
|
+
}),
|
|
661
|
+
},
|
|
662
|
+
async run(context) {
|
|
663
|
+
const auth = context.auth as any;
|
|
664
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
665
|
+
|
|
666
|
+
const response = await httpClient.sendRequest({
|
|
667
|
+
method: HttpMethod.POST,
|
|
668
|
+
url: `${auth.baseUrl}/IBSDPORG/v4/originations`,
|
|
669
|
+
headers,
|
|
670
|
+
body: context.propsValue.originationData,
|
|
671
|
+
});
|
|
672
|
+
return response.body;
|
|
673
|
+
},
|
|
674
|
+
});
|
|
675
|
+
|
|
676
|
+
// ============================================
|
|
677
|
+
// IBS-Deposit-Maintenance.json
|
|
678
|
+
// ============================================
|
|
679
|
+
|
|
680
|
+
export const deposit_update_maintenance = createAction({
|
|
681
|
+
auth: fisIbsAuth,
|
|
682
|
+
name: 'deposit_update_maintenance',
|
|
683
|
+
displayName: 'Deposit - Update Maintenance',
|
|
684
|
+
description: 'Update deposit account maintenance settings',
|
|
685
|
+
props: {
|
|
686
|
+
ibsAuthorization: Property.ShortText({
|
|
687
|
+
displayName: 'IBS Authorization',
|
|
688
|
+
required: false,
|
|
689
|
+
}),
|
|
690
|
+
acctNbr: Property.ShortText({
|
|
691
|
+
displayName: 'Account Number',
|
|
692
|
+
required: true,
|
|
693
|
+
}),
|
|
694
|
+
maintenanceData: Property.Object({
|
|
695
|
+
displayName: 'Maintenance Data',
|
|
696
|
+
required: true,
|
|
697
|
+
}),
|
|
698
|
+
},
|
|
699
|
+
async run(context) {
|
|
700
|
+
const auth = context.auth as any;
|
|
701
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
702
|
+
|
|
703
|
+
const response = await httpClient.sendRequest({
|
|
704
|
+
method: HttpMethod.PUT,
|
|
705
|
+
url: `${auth.baseUrl}/IBSDPMAINT/v4/accounts/${context.propsValue.acctNbr}/maintenance`,
|
|
706
|
+
headers,
|
|
707
|
+
body: context.propsValue.maintenanceData,
|
|
708
|
+
});
|
|
709
|
+
return response.body;
|
|
710
|
+
},
|
|
711
|
+
});
|
|
712
|
+
|
|
713
|
+
// Export all deposit actions
|
|
714
|
+
export const depositActions = [
|
|
715
|
+
// Account Management
|
|
716
|
+
deposit_get_account,
|
|
717
|
+
deposit_create_account,
|
|
718
|
+
deposit_update_account,
|
|
719
|
+
deposit_close_account,
|
|
720
|
+
deposit_get_balance,
|
|
721
|
+
deposit_get_interest_rates,
|
|
722
|
+
deposit_update_interest_rates,
|
|
723
|
+
|
|
724
|
+
// Transactions
|
|
725
|
+
deposit_get_transactions,
|
|
726
|
+
deposit_post_transaction,
|
|
727
|
+
deposit_reverse_transaction,
|
|
728
|
+
deposit_transfer,
|
|
729
|
+
|
|
730
|
+
// Holds
|
|
731
|
+
deposit_get_holds,
|
|
732
|
+
deposit_create_hold,
|
|
733
|
+
deposit_update_hold,
|
|
734
|
+
deposit_release_hold,
|
|
735
|
+
|
|
736
|
+
// Escrow
|
|
737
|
+
deposit_get_escrow_accounts,
|
|
738
|
+
deposit_create_escrow_account,
|
|
739
|
+
deposit_update_escrow_account,
|
|
740
|
+
|
|
741
|
+
// Calculator
|
|
742
|
+
deposit_calculate,
|
|
743
|
+
|
|
744
|
+
// Origination
|
|
745
|
+
deposit_originate,
|
|
746
|
+
|
|
747
|
+
// Maintenance
|
|
748
|
+
deposit_update_maintenance,
|
|
749
|
+
];
|