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