@vqnguyen1/piece-fis-ibs-cards 0.0.1 → 0.0.3
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/src/index.d.ts +16 -0
- package/src/index.js +166 -0
- package/src/index.js.map +1 -0
- 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/cards.d.ts +565 -0
- package/src/lib/actions/cards.js +1733 -0
- package/src/lib/actions/cards.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
- package/project.json +0 -22
- package/src/index.ts +0 -244
- package/src/lib/actions/bank-control.ts +0 -378
- package/src/lib/actions/cards.ts +0 -1732
- package/src/lib/actions/security.ts +0 -170
- package/tsconfig.json +0 -19
- package/tsconfig.lib.json +0 -10
|
@@ -1,378 +0,0 @@
|
|
|
1
|
-
import { createAction, Property } from '@activepieces/pieces-framework';
|
|
2
|
-
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
|
3
|
-
import { fisIbsCardsAuth } 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-Bank-Control.json - Bank Control Functions
|
|
23
|
-
// ============================================
|
|
24
|
-
|
|
25
|
-
export const bank_control_get_branch_detail = createAction({
|
|
26
|
-
auth: fisIbsCardsAuth,
|
|
27
|
-
name: 'bank_control_get_branch_detail',
|
|
28
|
-
displayName: 'Bank Control - Get Branch Detail',
|
|
29
|
-
description: 'Retrieve detail information about specified branch (Segment 105)',
|
|
30
|
-
props: {
|
|
31
|
-
ibsAuthorization: Property.ShortText({
|
|
32
|
-
displayName: 'IBS Authorization',
|
|
33
|
-
description: 'IBS Authorization token (if different from connection)',
|
|
34
|
-
required: false,
|
|
35
|
-
}),
|
|
36
|
-
branchNumber: Property.Number({
|
|
37
|
-
displayName: 'Branch Number',
|
|
38
|
-
description: 'Branch number to retrieve details for',
|
|
39
|
-
required: true,
|
|
40
|
-
}),
|
|
41
|
-
effectiveDate: Property.ShortText({
|
|
42
|
-
displayName: 'Effective Date',
|
|
43
|
-
description: 'Effective date (MM/DD/YY) - optional, used to view past/future segments',
|
|
44
|
-
required: false,
|
|
45
|
-
}),
|
|
46
|
-
},
|
|
47
|
-
async run(context) {
|
|
48
|
-
const auth = context.auth as any;
|
|
49
|
-
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
50
|
-
|
|
51
|
-
const params = new URLSearchParams();
|
|
52
|
-
if (context.propsValue.effectiveDate) {
|
|
53
|
-
params.append('effDte', context.propsValue.effectiveDate);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const queryString = params.toString();
|
|
57
|
-
const url = `${auth.baseUrl}/IBSBC/v4/branches/${context.propsValue.branchNumber}/detail${queryString ? '?' + queryString : ''}`;
|
|
58
|
-
|
|
59
|
-
const response = await httpClient.sendRequest({
|
|
60
|
-
method: HttpMethod.GET,
|
|
61
|
-
url,
|
|
62
|
-
headers,
|
|
63
|
-
});
|
|
64
|
-
return response.body;
|
|
65
|
-
},
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
export const bank_control_get_branch_info = createAction({
|
|
69
|
-
auth: fisIbsCardsAuth,
|
|
70
|
-
name: 'bank_control_get_branch_info',
|
|
71
|
-
displayName: 'Bank Control - Get Branch Info',
|
|
72
|
-
description: 'Retrieve basic information about specified branch',
|
|
73
|
-
props: {
|
|
74
|
-
ibsAuthorization: Property.ShortText({
|
|
75
|
-
displayName: 'IBS Authorization',
|
|
76
|
-
description: 'IBS Authorization token (if different from connection)',
|
|
77
|
-
required: false,
|
|
78
|
-
}),
|
|
79
|
-
branchNumber: Property.Number({
|
|
80
|
-
displayName: 'Branch Number',
|
|
81
|
-
description: 'Branch number to retrieve information for',
|
|
82
|
-
required: true,
|
|
83
|
-
}),
|
|
84
|
-
},
|
|
85
|
-
async run(context) {
|
|
86
|
-
const auth = context.auth as any;
|
|
87
|
-
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
88
|
-
|
|
89
|
-
const response = await httpClient.sendRequest({
|
|
90
|
-
method: HttpMethod.GET,
|
|
91
|
-
url: `${auth.baseUrl}/IBSBC/v4/branches/${context.propsValue.branchNumber}`,
|
|
92
|
-
headers,
|
|
93
|
-
});
|
|
94
|
-
return response.body;
|
|
95
|
-
},
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
export const bank_control_get_processing_date = createAction({
|
|
99
|
-
auth: fisIbsCardsAuth,
|
|
100
|
-
name: 'bank_control_get_processing_date',
|
|
101
|
-
displayName: 'Bank Control - Get Processing Date',
|
|
102
|
-
description: 'Retrieve current processing date information for the bank',
|
|
103
|
-
props: {
|
|
104
|
-
ibsAuthorization: Property.ShortText({
|
|
105
|
-
displayName: 'IBS Authorization',
|
|
106
|
-
description: 'IBS Authorization token (if different from connection)',
|
|
107
|
-
required: false,
|
|
108
|
-
}),
|
|
109
|
-
},
|
|
110
|
-
async run(context) {
|
|
111
|
-
const auth = context.auth as any;
|
|
112
|
-
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
113
|
-
|
|
114
|
-
const response = await httpClient.sendRequest({
|
|
115
|
-
method: HttpMethod.GET,
|
|
116
|
-
url: `${auth.baseUrl}/IBSBC/v4/processing-date`,
|
|
117
|
-
headers,
|
|
118
|
-
});
|
|
119
|
-
return response.body;
|
|
120
|
-
},
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
export const bank_control_get_holiday_calendar = createAction({
|
|
124
|
-
auth: fisIbsCardsAuth,
|
|
125
|
-
name: 'bank_control_get_holiday_calendar',
|
|
126
|
-
displayName: 'Bank Control - Get Holiday Calendar',
|
|
127
|
-
description: 'Retrieve bank holiday calendar information',
|
|
128
|
-
props: {
|
|
129
|
-
ibsAuthorization: Property.ShortText({
|
|
130
|
-
displayName: 'IBS Authorization',
|
|
131
|
-
description: 'IBS Authorization token (if different from connection)',
|
|
132
|
-
required: false,
|
|
133
|
-
}),
|
|
134
|
-
year: Property.Number({
|
|
135
|
-
displayName: 'Year',
|
|
136
|
-
description: 'Year to retrieve holidays for (optional)',
|
|
137
|
-
required: false,
|
|
138
|
-
}),
|
|
139
|
-
},
|
|
140
|
-
async run(context) {
|
|
141
|
-
const auth = context.auth as any;
|
|
142
|
-
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
143
|
-
|
|
144
|
-
const params = new URLSearchParams();
|
|
145
|
-
if (context.propsValue.year) {
|
|
146
|
-
params.append('year', context.propsValue.year.toString());
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
const queryString = params.toString();
|
|
150
|
-
const url = `${auth.baseUrl}/IBSBC/v4/holiday-calendar${queryString ? '?' + queryString : ''}`;
|
|
151
|
-
|
|
152
|
-
const response = await httpClient.sendRequest({
|
|
153
|
-
method: HttpMethod.GET,
|
|
154
|
-
url,
|
|
155
|
-
headers,
|
|
156
|
-
});
|
|
157
|
-
return response.body;
|
|
158
|
-
},
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
export const bank_control_get_gl_account = createAction({
|
|
162
|
-
auth: fisIbsCardsAuth,
|
|
163
|
-
name: 'bank_control_get_gl_account',
|
|
164
|
-
displayName: 'Bank Control - Get GL Account',
|
|
165
|
-
description: 'Retrieve general ledger account information',
|
|
166
|
-
props: {
|
|
167
|
-
ibsAuthorization: Property.ShortText({
|
|
168
|
-
displayName: 'IBS Authorization',
|
|
169
|
-
description: 'IBS Authorization token (if different from connection)',
|
|
170
|
-
required: false,
|
|
171
|
-
}),
|
|
172
|
-
glAccountNumber: Property.ShortText({
|
|
173
|
-
displayName: 'GL Account Number',
|
|
174
|
-
description: 'General ledger account number',
|
|
175
|
-
required: true,
|
|
176
|
-
}),
|
|
177
|
-
},
|
|
178
|
-
async run(context) {
|
|
179
|
-
const auth = context.auth as any;
|
|
180
|
-
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
181
|
-
|
|
182
|
-
const response = await httpClient.sendRequest({
|
|
183
|
-
method: HttpMethod.GET,
|
|
184
|
-
url: `${auth.baseUrl}/IBSBC/v4/gl-accounts/${context.propsValue.glAccountNumber}`,
|
|
185
|
-
headers,
|
|
186
|
-
});
|
|
187
|
-
return response.body;
|
|
188
|
-
},
|
|
189
|
-
});
|
|
190
|
-
|
|
191
|
-
export const bank_control_get_institution_info = createAction({
|
|
192
|
-
auth: fisIbsCardsAuth,
|
|
193
|
-
name: 'bank_control_get_institution_info',
|
|
194
|
-
displayName: 'Bank Control - Get Institution Info',
|
|
195
|
-
description: 'Retrieve institution information',
|
|
196
|
-
props: {
|
|
197
|
-
ibsAuthorization: Property.ShortText({
|
|
198
|
-
displayName: 'IBS Authorization',
|
|
199
|
-
description: 'IBS Authorization token (if different from connection)',
|
|
200
|
-
required: false,
|
|
201
|
-
}),
|
|
202
|
-
institutionNumber: Property.Number({
|
|
203
|
-
displayName: 'Institution Number',
|
|
204
|
-
description: 'Institution number (optional - defaults to current institution)',
|
|
205
|
-
required: false,
|
|
206
|
-
}),
|
|
207
|
-
},
|
|
208
|
-
async run(context) {
|
|
209
|
-
const auth = context.auth as any;
|
|
210
|
-
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
211
|
-
|
|
212
|
-
const params = new URLSearchParams();
|
|
213
|
-
if (context.propsValue.institutionNumber) {
|
|
214
|
-
params.append('instNbr', context.propsValue.institutionNumber.toString());
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
const queryString = params.toString();
|
|
218
|
-
const url = `${auth.baseUrl}/IBSBC/v4/institution${queryString ? '?' + queryString : ''}`;
|
|
219
|
-
|
|
220
|
-
const response = await httpClient.sendRequest({
|
|
221
|
-
method: HttpMethod.GET,
|
|
222
|
-
url,
|
|
223
|
-
headers,
|
|
224
|
-
});
|
|
225
|
-
return response.body;
|
|
226
|
-
},
|
|
227
|
-
});
|
|
228
|
-
|
|
229
|
-
export const bank_control_get_officer = createAction({
|
|
230
|
-
auth: fisIbsCardsAuth,
|
|
231
|
-
name: 'bank_control_get_officer',
|
|
232
|
-
displayName: 'Bank Control - Get Officer',
|
|
233
|
-
description: 'Retrieve officer information',
|
|
234
|
-
props: {
|
|
235
|
-
ibsAuthorization: Property.ShortText({
|
|
236
|
-
displayName: 'IBS Authorization',
|
|
237
|
-
description: 'IBS Authorization token (if different from connection)',
|
|
238
|
-
required: false,
|
|
239
|
-
}),
|
|
240
|
-
officerId: Property.ShortText({
|
|
241
|
-
displayName: 'Officer ID',
|
|
242
|
-
description: 'Officer identifier',
|
|
243
|
-
required: true,
|
|
244
|
-
}),
|
|
245
|
-
},
|
|
246
|
-
async run(context) {
|
|
247
|
-
const auth = context.auth as any;
|
|
248
|
-
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
249
|
-
|
|
250
|
-
const response = await httpClient.sendRequest({
|
|
251
|
-
method: HttpMethod.GET,
|
|
252
|
-
url: `${auth.baseUrl}/IBSBC/v4/officers/${context.propsValue.officerId}`,
|
|
253
|
-
headers,
|
|
254
|
-
});
|
|
255
|
-
return response.body;
|
|
256
|
-
},
|
|
257
|
-
});
|
|
258
|
-
|
|
259
|
-
export const bank_control_get_product_codes = createAction({
|
|
260
|
-
auth: fisIbsCardsAuth,
|
|
261
|
-
name: 'bank_control_get_product_codes',
|
|
262
|
-
displayName: 'Bank Control - Get Product Codes',
|
|
263
|
-
description: 'Retrieve product codes and their descriptions',
|
|
264
|
-
props: {
|
|
265
|
-
ibsAuthorization: Property.ShortText({
|
|
266
|
-
displayName: 'IBS Authorization',
|
|
267
|
-
description: 'IBS Authorization token (if different from connection)',
|
|
268
|
-
required: false,
|
|
269
|
-
}),
|
|
270
|
-
productType: Property.StaticDropdown({
|
|
271
|
-
displayName: 'Product Type',
|
|
272
|
-
description: 'Type of product to retrieve codes for',
|
|
273
|
-
required: false,
|
|
274
|
-
options: {
|
|
275
|
-
options: [
|
|
276
|
-
{ label: 'Deposit', value: 'D' },
|
|
277
|
-
{ label: 'Loan', value: 'L' },
|
|
278
|
-
{ label: 'Card', value: 'C' },
|
|
279
|
-
],
|
|
280
|
-
},
|
|
281
|
-
}),
|
|
282
|
-
},
|
|
283
|
-
async run(context) {
|
|
284
|
-
const auth = context.auth as any;
|
|
285
|
-
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
286
|
-
|
|
287
|
-
const params = new URLSearchParams();
|
|
288
|
-
if (context.propsValue.productType) {
|
|
289
|
-
params.append('prodType', context.propsValue.productType);
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
const queryString = params.toString();
|
|
293
|
-
const url = `${auth.baseUrl}/IBSBC/v4/product-codes${queryString ? '?' + queryString : ''}`;
|
|
294
|
-
|
|
295
|
-
const response = await httpClient.sendRequest({
|
|
296
|
-
method: HttpMethod.GET,
|
|
297
|
-
url,
|
|
298
|
-
headers,
|
|
299
|
-
});
|
|
300
|
-
return response.body;
|
|
301
|
-
},
|
|
302
|
-
});
|
|
303
|
-
|
|
304
|
-
export const bank_control_get_transaction_codes = createAction({
|
|
305
|
-
auth: fisIbsCardsAuth,
|
|
306
|
-
name: 'bank_control_get_transaction_codes',
|
|
307
|
-
displayName: 'Bank Control - Get Transaction Codes',
|
|
308
|
-
description: 'Retrieve transaction codes and their descriptions',
|
|
309
|
-
props: {
|
|
310
|
-
ibsAuthorization: Property.ShortText({
|
|
311
|
-
displayName: 'IBS Authorization',
|
|
312
|
-
description: 'IBS Authorization token (if different from connection)',
|
|
313
|
-
required: false,
|
|
314
|
-
}),
|
|
315
|
-
transactionType: Property.StaticDropdown({
|
|
316
|
-
displayName: 'Transaction Type',
|
|
317
|
-
description: 'Type of transaction codes to retrieve',
|
|
318
|
-
required: false,
|
|
319
|
-
options: {
|
|
320
|
-
options: [
|
|
321
|
-
{ label: 'Deposit', value: 'D' },
|
|
322
|
-
{ label: 'Loan', value: 'L' },
|
|
323
|
-
{ label: 'Card', value: 'C' },
|
|
324
|
-
{ label: 'GL', value: 'G' },
|
|
325
|
-
],
|
|
326
|
-
},
|
|
327
|
-
}),
|
|
328
|
-
},
|
|
329
|
-
async run(context) {
|
|
330
|
-
const auth = context.auth as any;
|
|
331
|
-
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
332
|
-
|
|
333
|
-
const params = new URLSearchParams();
|
|
334
|
-
if (context.propsValue.transactionType) {
|
|
335
|
-
params.append('tranType', context.propsValue.transactionType);
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
const queryString = params.toString();
|
|
339
|
-
const url = `${auth.baseUrl}/IBSBC/v4/transaction-codes${queryString ? '?' + queryString : ''}`;
|
|
340
|
-
|
|
341
|
-
const response = await httpClient.sendRequest({
|
|
342
|
-
method: HttpMethod.GET,
|
|
343
|
-
url,
|
|
344
|
-
headers,
|
|
345
|
-
});
|
|
346
|
-
return response.body;
|
|
347
|
-
},
|
|
348
|
-
});
|
|
349
|
-
|
|
350
|
-
export const bank_control_get_routing_number = createAction({
|
|
351
|
-
auth: fisIbsCardsAuth,
|
|
352
|
-
name: 'bank_control_get_routing_number',
|
|
353
|
-
displayName: 'Bank Control - Get Routing Number',
|
|
354
|
-
description: 'Retrieve routing number information',
|
|
355
|
-
props: {
|
|
356
|
-
ibsAuthorization: Property.ShortText({
|
|
357
|
-
displayName: 'IBS Authorization',
|
|
358
|
-
description: 'IBS Authorization token (if different from connection)',
|
|
359
|
-
required: false,
|
|
360
|
-
}),
|
|
361
|
-
routingNumber: Property.ShortText({
|
|
362
|
-
displayName: 'Routing Number',
|
|
363
|
-
description: 'ABA routing number to look up',
|
|
364
|
-
required: true,
|
|
365
|
-
}),
|
|
366
|
-
},
|
|
367
|
-
async run(context) {
|
|
368
|
-
const auth = context.auth as any;
|
|
369
|
-
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
370
|
-
|
|
371
|
-
const response = await httpClient.sendRequest({
|
|
372
|
-
method: HttpMethod.GET,
|
|
373
|
-
url: `${auth.baseUrl}/IBSBC/v4/routing-numbers/${context.propsValue.routingNumber}`,
|
|
374
|
-
headers,
|
|
375
|
-
});
|
|
376
|
-
return response.body;
|
|
377
|
-
},
|
|
378
|
-
});
|