@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,1563 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.customerActions = exports.customer_update_profile = exports.customer_get_profile = exports.customer_delete_relationship = exports.customer_update_relationship = exports.customer_create_relationship = exports.customer_get_relationships = exports.customer_delete_remark = exports.customer_update_remark = exports.customer_create_remark = exports.customer_get_remarks = exports.customer_delete_combined_statement = exports.customer_update_combined_statement = exports.customer_create_combined_statement = exports.customer_get_statements = exports.customer_search_by_cip_id = exports.customer_search_by_phone = exports.customer_search_by_tax_number = exports.customer_search_by_customer_number = exports.customer_search_by_name = exports.customer_delete_phone_number = exports.customer_update_phone_number = exports.customer_create_phone_number = exports.customer_get_phone_numbers = exports.customer_delete_email_address = exports.customer_create_email_address = exports.customer_get_email_addresses = exports.customer_update_due_diligence = exports.customer_get_due_diligence = exports.customer_delete_alias = exports.customer_update_alias = exports.customer_create_alias = exports.customer_get_aliases = exports.customer_update_addresses = exports.customer_address_edit = exports.customer_accounts_update_related_address = exports.customer_accounts_create = exports.customer_accounts_update_name_address = exports.customer_accounts_get_name_address = exports.customer_accounts_delete = exports.customer_accounts_address_edit = exports.customer_update_combined = exports.customer_get_combined = exports.customer_create_organization = exports.customer_create_individual = exports.customer_delete = exports.customer_get = 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, contentType = 'application/json') {
|
|
10
|
+
const headers = {
|
|
11
|
+
'Content-Type': contentType,
|
|
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-Customer.json - Customer CRUD
|
|
25
|
+
// ============================================
|
|
26
|
+
exports.customer_get = (0, pieces_framework_1.createAction)({
|
|
27
|
+
auth: __1.fisIbsAuth,
|
|
28
|
+
name: 'customer_get',
|
|
29
|
+
displayName: 'Customer - Get Customer',
|
|
30
|
+
description: 'Retrieve customer information by customer number',
|
|
31
|
+
props: {
|
|
32
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
33
|
+
displayName: 'IBS Authorization',
|
|
34
|
+
required: false,
|
|
35
|
+
}),
|
|
36
|
+
ciApplNbr: pieces_framework_1.Property.ShortText({
|
|
37
|
+
displayName: 'Customer Number',
|
|
38
|
+
description: 'CIS customer number',
|
|
39
|
+
required: true,
|
|
40
|
+
}),
|
|
41
|
+
},
|
|
42
|
+
run(context) {
|
|
43
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
const auth = context.auth;
|
|
45
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
46
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
47
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
48
|
+
url: `${auth.baseUrl}/IBSCICUST/v4/customers/${context.propsValue.ciApplNbr}`,
|
|
49
|
+
headers,
|
|
50
|
+
});
|
|
51
|
+
return response.body;
|
|
52
|
+
});
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
exports.customer_delete = (0, pieces_framework_1.createAction)({
|
|
56
|
+
auth: __1.fisIbsAuth,
|
|
57
|
+
name: 'customer_delete',
|
|
58
|
+
displayName: 'Customer - Delete Customer',
|
|
59
|
+
description: 'Delete a customer record',
|
|
60
|
+
props: {
|
|
61
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
62
|
+
displayName: 'IBS Authorization',
|
|
63
|
+
required: false,
|
|
64
|
+
}),
|
|
65
|
+
ciApplNbr: pieces_framework_1.Property.ShortText({
|
|
66
|
+
displayName: 'Customer Number',
|
|
67
|
+
description: 'CIS customer number',
|
|
68
|
+
required: true,
|
|
69
|
+
}),
|
|
70
|
+
},
|
|
71
|
+
run(context) {
|
|
72
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
const auth = context.auth;
|
|
74
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
75
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
76
|
+
method: pieces_common_1.HttpMethod.DELETE,
|
|
77
|
+
url: `${auth.baseUrl}/IBSCICUST/v4/customers/${context.propsValue.ciApplNbr}`,
|
|
78
|
+
headers,
|
|
79
|
+
});
|
|
80
|
+
return response.body;
|
|
81
|
+
});
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
exports.customer_create_individual = (0, pieces_framework_1.createAction)({
|
|
85
|
+
auth: __1.fisIbsAuth,
|
|
86
|
+
name: 'customer_create_individual',
|
|
87
|
+
displayName: 'Customer - Create Individual',
|
|
88
|
+
description: 'Create a new individual customer',
|
|
89
|
+
props: {
|
|
90
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
91
|
+
displayName: 'IBS Authorization',
|
|
92
|
+
required: false,
|
|
93
|
+
}),
|
|
94
|
+
customerData: pieces_framework_1.Property.Object({
|
|
95
|
+
displayName: 'Customer Data',
|
|
96
|
+
description: 'Individual customer information',
|
|
97
|
+
required: true,
|
|
98
|
+
}),
|
|
99
|
+
},
|
|
100
|
+
run(context) {
|
|
101
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
102
|
+
const auth = context.auth;
|
|
103
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
104
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
105
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
106
|
+
url: `${auth.baseUrl}/IBSCICUST/v4/customers/individuals`,
|
|
107
|
+
headers,
|
|
108
|
+
body: context.propsValue.customerData,
|
|
109
|
+
});
|
|
110
|
+
return response.body;
|
|
111
|
+
});
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
exports.customer_create_organization = (0, pieces_framework_1.createAction)({
|
|
115
|
+
auth: __1.fisIbsAuth,
|
|
116
|
+
name: 'customer_create_organization',
|
|
117
|
+
displayName: 'Customer - Create Organization',
|
|
118
|
+
description: 'Create a new organization customer',
|
|
119
|
+
props: {
|
|
120
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
121
|
+
displayName: 'IBS Authorization',
|
|
122
|
+
required: false,
|
|
123
|
+
}),
|
|
124
|
+
customerData: pieces_framework_1.Property.Object({
|
|
125
|
+
displayName: 'Customer Data',
|
|
126
|
+
description: 'Organization customer information',
|
|
127
|
+
required: true,
|
|
128
|
+
}),
|
|
129
|
+
},
|
|
130
|
+
run(context) {
|
|
131
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
132
|
+
const auth = context.auth;
|
|
133
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
134
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
135
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
136
|
+
url: `${auth.baseUrl}/IBSCICUST/v4/customers/organizations`,
|
|
137
|
+
headers,
|
|
138
|
+
body: context.propsValue.customerData,
|
|
139
|
+
});
|
|
140
|
+
return response.body;
|
|
141
|
+
});
|
|
142
|
+
},
|
|
143
|
+
});
|
|
144
|
+
exports.customer_get_combined = (0, pieces_framework_1.createAction)({
|
|
145
|
+
auth: __1.fisIbsAuth,
|
|
146
|
+
name: 'customer_get_combined',
|
|
147
|
+
displayName: 'Customer - Get Combined Customer',
|
|
148
|
+
description: 'Retrieve combined customer information',
|
|
149
|
+
props: {
|
|
150
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
151
|
+
displayName: 'IBS Authorization',
|
|
152
|
+
required: false,
|
|
153
|
+
}),
|
|
154
|
+
survCustNbr: pieces_framework_1.Property.ShortText({
|
|
155
|
+
displayName: 'Surviving Customer Number',
|
|
156
|
+
required: true,
|
|
157
|
+
}),
|
|
158
|
+
combCustNbr: pieces_framework_1.Property.ShortText({
|
|
159
|
+
displayName: 'Combined Customer Number',
|
|
160
|
+
required: true,
|
|
161
|
+
}),
|
|
162
|
+
},
|
|
163
|
+
run(context) {
|
|
164
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
165
|
+
const auth = context.auth;
|
|
166
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
167
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
168
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
169
|
+
url: `${auth.baseUrl}/IBSCICUST/v4/customers/${context.propsValue.survCustNbr}/combined-customer/${context.propsValue.combCustNbr}`,
|
|
170
|
+
headers,
|
|
171
|
+
});
|
|
172
|
+
return response.body;
|
|
173
|
+
});
|
|
174
|
+
},
|
|
175
|
+
});
|
|
176
|
+
exports.customer_update_combined = (0, pieces_framework_1.createAction)({
|
|
177
|
+
auth: __1.fisIbsAuth,
|
|
178
|
+
name: 'customer_update_combined',
|
|
179
|
+
displayName: 'Customer - Update Combined Customer',
|
|
180
|
+
description: 'Update combined customer information',
|
|
181
|
+
props: {
|
|
182
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
183
|
+
displayName: 'IBS Authorization',
|
|
184
|
+
required: false,
|
|
185
|
+
}),
|
|
186
|
+
survCustNbr: pieces_framework_1.Property.ShortText({
|
|
187
|
+
displayName: 'Surviving Customer Number',
|
|
188
|
+
required: true,
|
|
189
|
+
}),
|
|
190
|
+
combCustNbr: pieces_framework_1.Property.ShortText({
|
|
191
|
+
displayName: 'Combined Customer Number',
|
|
192
|
+
required: true,
|
|
193
|
+
}),
|
|
194
|
+
updateData: pieces_framework_1.Property.Object({
|
|
195
|
+
displayName: 'Update Data',
|
|
196
|
+
required: true,
|
|
197
|
+
}),
|
|
198
|
+
},
|
|
199
|
+
run(context) {
|
|
200
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
201
|
+
const auth = context.auth;
|
|
202
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
203
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
204
|
+
method: pieces_common_1.HttpMethod.PUT,
|
|
205
|
+
url: `${auth.baseUrl}/IBSCICUST/v4/customers/${context.propsValue.survCustNbr}/combined-customer/${context.propsValue.combCustNbr}`,
|
|
206
|
+
headers,
|
|
207
|
+
body: context.propsValue.updateData,
|
|
208
|
+
});
|
|
209
|
+
return response.body;
|
|
210
|
+
});
|
|
211
|
+
},
|
|
212
|
+
});
|
|
213
|
+
// ============================================
|
|
214
|
+
// IBS-Customer-Accounts.json - Account Management
|
|
215
|
+
// ============================================
|
|
216
|
+
exports.customer_accounts_address_edit = (0, pieces_framework_1.createAction)({
|
|
217
|
+
auth: __1.fisIbsAuth,
|
|
218
|
+
name: 'customer_accounts_address_edit',
|
|
219
|
+
displayName: 'Customer - Account Address Edit',
|
|
220
|
+
description: 'Preview address standardization for account name/address data',
|
|
221
|
+
props: {
|
|
222
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
223
|
+
displayName: 'IBS Authorization',
|
|
224
|
+
required: false,
|
|
225
|
+
}),
|
|
226
|
+
addressData: pieces_framework_1.Property.Object({
|
|
227
|
+
displayName: 'Address Data',
|
|
228
|
+
required: true,
|
|
229
|
+
}),
|
|
230
|
+
},
|
|
231
|
+
run(context) {
|
|
232
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
233
|
+
const auth = context.auth;
|
|
234
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
235
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
236
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
237
|
+
url: `${auth.baseUrl}/IBSCIACCT/v4/accounts/address-edit`,
|
|
238
|
+
headers,
|
|
239
|
+
body: context.propsValue.addressData,
|
|
240
|
+
});
|
|
241
|
+
return response.body;
|
|
242
|
+
});
|
|
243
|
+
},
|
|
244
|
+
});
|
|
245
|
+
exports.customer_accounts_delete = (0, pieces_framework_1.createAction)({
|
|
246
|
+
auth: __1.fisIbsAuth,
|
|
247
|
+
name: 'customer_accounts_delete',
|
|
248
|
+
displayName: 'Customer - Delete Account',
|
|
249
|
+
description: 'Delete an account from CIS',
|
|
250
|
+
props: {
|
|
251
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
252
|
+
displayName: 'IBS Authorization',
|
|
253
|
+
required: false,
|
|
254
|
+
}),
|
|
255
|
+
applCde: pieces_framework_1.Property.ShortText({
|
|
256
|
+
displayName: 'Application Code',
|
|
257
|
+
description: 'DP, LN, SB, or CBM',
|
|
258
|
+
required: true,
|
|
259
|
+
}),
|
|
260
|
+
applNbr: pieces_framework_1.Property.ShortText({
|
|
261
|
+
displayName: 'Account Number',
|
|
262
|
+
required: true,
|
|
263
|
+
}),
|
|
264
|
+
},
|
|
265
|
+
run(context) {
|
|
266
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
267
|
+
const auth = context.auth;
|
|
268
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
269
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
270
|
+
method: pieces_common_1.HttpMethod.DELETE,
|
|
271
|
+
url: `${auth.baseUrl}/IBSCIACCT/v4/accounts/${context.propsValue.applCde}/${context.propsValue.applNbr}`,
|
|
272
|
+
headers,
|
|
273
|
+
});
|
|
274
|
+
return response.body;
|
|
275
|
+
});
|
|
276
|
+
},
|
|
277
|
+
});
|
|
278
|
+
exports.customer_accounts_get_name_address = (0, pieces_framework_1.createAction)({
|
|
279
|
+
auth: __1.fisIbsAuth,
|
|
280
|
+
name: 'customer_accounts_get_name_address',
|
|
281
|
+
displayName: 'Customer - Get Account Name/Address',
|
|
282
|
+
description: 'Retrieve account name and address information',
|
|
283
|
+
props: {
|
|
284
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
285
|
+
displayName: 'IBS Authorization',
|
|
286
|
+
required: false,
|
|
287
|
+
}),
|
|
288
|
+
appCde: pieces_framework_1.Property.ShortText({
|
|
289
|
+
displayName: 'Application Code',
|
|
290
|
+
required: true,
|
|
291
|
+
}),
|
|
292
|
+
applNbr: pieces_framework_1.Property.ShortText({
|
|
293
|
+
displayName: 'Account Number',
|
|
294
|
+
required: true,
|
|
295
|
+
}),
|
|
296
|
+
},
|
|
297
|
+
run(context) {
|
|
298
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
299
|
+
const auth = context.auth;
|
|
300
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
301
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
302
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
303
|
+
url: `${auth.baseUrl}/IBSCIACCT/v4/accounts/${context.propsValue.appCde}/${context.propsValue.applNbr}/name-address`,
|
|
304
|
+
headers,
|
|
305
|
+
});
|
|
306
|
+
return response.body;
|
|
307
|
+
});
|
|
308
|
+
},
|
|
309
|
+
});
|
|
310
|
+
exports.customer_accounts_update_name_address = (0, pieces_framework_1.createAction)({
|
|
311
|
+
auth: __1.fisIbsAuth,
|
|
312
|
+
name: 'customer_accounts_update_name_address',
|
|
313
|
+
displayName: 'Customer - Update Account Name/Address',
|
|
314
|
+
description: 'Update account name and address information',
|
|
315
|
+
props: {
|
|
316
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
317
|
+
displayName: 'IBS Authorization',
|
|
318
|
+
required: false,
|
|
319
|
+
}),
|
|
320
|
+
appCde: pieces_framework_1.Property.ShortText({
|
|
321
|
+
displayName: 'Application Code',
|
|
322
|
+
required: true,
|
|
323
|
+
}),
|
|
324
|
+
applNbr: pieces_framework_1.Property.ShortText({
|
|
325
|
+
displayName: 'Account Number',
|
|
326
|
+
required: true,
|
|
327
|
+
}),
|
|
328
|
+
addressData: pieces_framework_1.Property.Object({
|
|
329
|
+
displayName: 'Address Data',
|
|
330
|
+
required: true,
|
|
331
|
+
}),
|
|
332
|
+
},
|
|
333
|
+
run(context) {
|
|
334
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
335
|
+
const auth = context.auth;
|
|
336
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
337
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
338
|
+
method: pieces_common_1.HttpMethod.PUT,
|
|
339
|
+
url: `${auth.baseUrl}/IBSCIACCT/v4/accounts/${context.propsValue.appCde}/${context.propsValue.applNbr}/name-address`,
|
|
340
|
+
headers,
|
|
341
|
+
body: context.propsValue.addressData,
|
|
342
|
+
});
|
|
343
|
+
return response.body;
|
|
344
|
+
});
|
|
345
|
+
},
|
|
346
|
+
});
|
|
347
|
+
exports.customer_accounts_create = (0, pieces_framework_1.createAction)({
|
|
348
|
+
auth: __1.fisIbsAuth,
|
|
349
|
+
name: 'customer_accounts_create',
|
|
350
|
+
displayName: 'Customer - Create Account',
|
|
351
|
+
description: 'Create a new account in CIS',
|
|
352
|
+
props: {
|
|
353
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
354
|
+
displayName: 'IBS Authorization',
|
|
355
|
+
required: false,
|
|
356
|
+
}),
|
|
357
|
+
accountData: pieces_framework_1.Property.Object({
|
|
358
|
+
displayName: 'Account Data',
|
|
359
|
+
required: true,
|
|
360
|
+
}),
|
|
361
|
+
},
|
|
362
|
+
run(context) {
|
|
363
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
364
|
+
const auth = context.auth;
|
|
365
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
366
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
367
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
368
|
+
url: `${auth.baseUrl}/IBSCIACCT/v4/accounts`,
|
|
369
|
+
headers,
|
|
370
|
+
body: context.propsValue.accountData,
|
|
371
|
+
});
|
|
372
|
+
return response.body;
|
|
373
|
+
});
|
|
374
|
+
},
|
|
375
|
+
});
|
|
376
|
+
exports.customer_accounts_update_related_address = (0, pieces_framework_1.createAction)({
|
|
377
|
+
auth: __1.fisIbsAuth,
|
|
378
|
+
name: 'customer_accounts_update_related_address',
|
|
379
|
+
displayName: 'Customer - Update Related Accounts Address',
|
|
380
|
+
description: 'Update customer address on all related accounts',
|
|
381
|
+
props: {
|
|
382
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
383
|
+
displayName: 'IBS Authorization',
|
|
384
|
+
required: false,
|
|
385
|
+
}),
|
|
386
|
+
addressData: pieces_framework_1.Property.Object({
|
|
387
|
+
displayName: 'Address Data',
|
|
388
|
+
required: true,
|
|
389
|
+
}),
|
|
390
|
+
},
|
|
391
|
+
run(context) {
|
|
392
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
393
|
+
const auth = context.auth;
|
|
394
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
395
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
396
|
+
method: pieces_common_1.HttpMethod.PUT,
|
|
397
|
+
url: `${auth.baseUrl}/IBSCIACCT/v4/related-accounts-address`,
|
|
398
|
+
headers,
|
|
399
|
+
body: context.propsValue.addressData,
|
|
400
|
+
});
|
|
401
|
+
return response.body;
|
|
402
|
+
});
|
|
403
|
+
},
|
|
404
|
+
});
|
|
405
|
+
// ============================================
|
|
406
|
+
// IBS-Customer-Demographics.json
|
|
407
|
+
// ============================================
|
|
408
|
+
exports.customer_address_edit = (0, pieces_framework_1.createAction)({
|
|
409
|
+
auth: __1.fisIbsAuth,
|
|
410
|
+
name: 'customer_address_edit',
|
|
411
|
+
displayName: 'Customer - Address Edit Preview',
|
|
412
|
+
description: 'Preview address standardization for customer name/address data',
|
|
413
|
+
props: {
|
|
414
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
415
|
+
displayName: 'IBS Authorization',
|
|
416
|
+
required: false,
|
|
417
|
+
}),
|
|
418
|
+
addressData: pieces_framework_1.Property.Object({
|
|
419
|
+
displayName: 'Address Data',
|
|
420
|
+
required: true,
|
|
421
|
+
}),
|
|
422
|
+
},
|
|
423
|
+
run(context) {
|
|
424
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
425
|
+
const auth = context.auth;
|
|
426
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
427
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
428
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
429
|
+
url: `${auth.baseUrl}/IBSCICUSTDEM/v4/customers/address-edit`,
|
|
430
|
+
headers,
|
|
431
|
+
body: context.propsValue.addressData,
|
|
432
|
+
});
|
|
433
|
+
return response.body;
|
|
434
|
+
});
|
|
435
|
+
},
|
|
436
|
+
});
|
|
437
|
+
exports.customer_update_addresses = (0, pieces_framework_1.createAction)({
|
|
438
|
+
auth: __1.fisIbsAuth,
|
|
439
|
+
name: 'customer_update_addresses',
|
|
440
|
+
displayName: 'Customer - Update Addresses',
|
|
441
|
+
description: 'Update customer address information',
|
|
442
|
+
props: {
|
|
443
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
444
|
+
displayName: 'IBS Authorization',
|
|
445
|
+
required: false,
|
|
446
|
+
}),
|
|
447
|
+
ciApplNbr: pieces_framework_1.Property.ShortText({
|
|
448
|
+
displayName: 'Customer Number',
|
|
449
|
+
required: true,
|
|
450
|
+
}),
|
|
451
|
+
addressData: pieces_framework_1.Property.Object({
|
|
452
|
+
displayName: 'Address Data',
|
|
453
|
+
required: true,
|
|
454
|
+
}),
|
|
455
|
+
},
|
|
456
|
+
run(context) {
|
|
457
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
458
|
+
const auth = context.auth;
|
|
459
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
460
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
461
|
+
method: pieces_common_1.HttpMethod.PUT,
|
|
462
|
+
url: `${auth.baseUrl}/IBSCICUSTDEM/v4/customers/${context.propsValue.ciApplNbr}/addresses`,
|
|
463
|
+
headers,
|
|
464
|
+
body: context.propsValue.addressData,
|
|
465
|
+
});
|
|
466
|
+
return response.body;
|
|
467
|
+
});
|
|
468
|
+
},
|
|
469
|
+
});
|
|
470
|
+
exports.customer_get_aliases = (0, pieces_framework_1.createAction)({
|
|
471
|
+
auth: __1.fisIbsAuth,
|
|
472
|
+
name: 'customer_get_aliases',
|
|
473
|
+
displayName: 'Customer - Get Aliases',
|
|
474
|
+
description: 'Retrieve customer aliases',
|
|
475
|
+
props: {
|
|
476
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
477
|
+
displayName: 'IBS Authorization',
|
|
478
|
+
required: false,
|
|
479
|
+
}),
|
|
480
|
+
custNbr: pieces_framework_1.Property.ShortText({
|
|
481
|
+
displayName: 'Customer Number',
|
|
482
|
+
required: true,
|
|
483
|
+
}),
|
|
484
|
+
},
|
|
485
|
+
run(context) {
|
|
486
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
487
|
+
const auth = context.auth;
|
|
488
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
489
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
490
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
491
|
+
url: `${auth.baseUrl}/IBSCICUSTDEM/v4/customers/${context.propsValue.custNbr}/aliases`,
|
|
492
|
+
headers,
|
|
493
|
+
});
|
|
494
|
+
return response.body;
|
|
495
|
+
});
|
|
496
|
+
},
|
|
497
|
+
});
|
|
498
|
+
exports.customer_create_alias = (0, pieces_framework_1.createAction)({
|
|
499
|
+
auth: __1.fisIbsAuth,
|
|
500
|
+
name: 'customer_create_alias',
|
|
501
|
+
displayName: 'Customer - Create Alias',
|
|
502
|
+
description: 'Create a new customer alias',
|
|
503
|
+
props: {
|
|
504
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
505
|
+
displayName: 'IBS Authorization',
|
|
506
|
+
required: false,
|
|
507
|
+
}),
|
|
508
|
+
custNbr: pieces_framework_1.Property.ShortText({
|
|
509
|
+
displayName: 'Customer Number',
|
|
510
|
+
required: true,
|
|
511
|
+
}),
|
|
512
|
+
aliasData: pieces_framework_1.Property.Object({
|
|
513
|
+
displayName: 'Alias Data',
|
|
514
|
+
required: true,
|
|
515
|
+
}),
|
|
516
|
+
},
|
|
517
|
+
run(context) {
|
|
518
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
519
|
+
const auth = context.auth;
|
|
520
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
521
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
522
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
523
|
+
url: `${auth.baseUrl}/IBSCICUSTDEM/v4/customers/${context.propsValue.custNbr}/aliases`,
|
|
524
|
+
headers,
|
|
525
|
+
body: context.propsValue.aliasData,
|
|
526
|
+
});
|
|
527
|
+
return response.body;
|
|
528
|
+
});
|
|
529
|
+
},
|
|
530
|
+
});
|
|
531
|
+
exports.customer_update_alias = (0, pieces_framework_1.createAction)({
|
|
532
|
+
auth: __1.fisIbsAuth,
|
|
533
|
+
name: 'customer_update_alias',
|
|
534
|
+
displayName: 'Customer - Update Alias',
|
|
535
|
+
description: 'Update a customer alias',
|
|
536
|
+
props: {
|
|
537
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
538
|
+
displayName: 'IBS Authorization',
|
|
539
|
+
required: false,
|
|
540
|
+
}),
|
|
541
|
+
custNbr: pieces_framework_1.Property.ShortText({
|
|
542
|
+
displayName: 'Customer Number',
|
|
543
|
+
required: true,
|
|
544
|
+
}),
|
|
545
|
+
alSeqNbr: pieces_framework_1.Property.ShortText({
|
|
546
|
+
displayName: 'Alias Sequence Number',
|
|
547
|
+
required: true,
|
|
548
|
+
}),
|
|
549
|
+
aliasData: pieces_framework_1.Property.Object({
|
|
550
|
+
displayName: 'Alias Data',
|
|
551
|
+
required: true,
|
|
552
|
+
}),
|
|
553
|
+
},
|
|
554
|
+
run(context) {
|
|
555
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
556
|
+
const auth = context.auth;
|
|
557
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
558
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
559
|
+
method: pieces_common_1.HttpMethod.PUT,
|
|
560
|
+
url: `${auth.baseUrl}/IBSCICUSTDEM/v4/customers/${context.propsValue.custNbr}/aliases/${context.propsValue.alSeqNbr}`,
|
|
561
|
+
headers,
|
|
562
|
+
body: context.propsValue.aliasData,
|
|
563
|
+
});
|
|
564
|
+
return response.body;
|
|
565
|
+
});
|
|
566
|
+
},
|
|
567
|
+
});
|
|
568
|
+
exports.customer_delete_alias = (0, pieces_framework_1.createAction)({
|
|
569
|
+
auth: __1.fisIbsAuth,
|
|
570
|
+
name: 'customer_delete_alias',
|
|
571
|
+
displayName: 'Customer - Delete Alias',
|
|
572
|
+
description: 'Delete a customer alias',
|
|
573
|
+
props: {
|
|
574
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
575
|
+
displayName: 'IBS Authorization',
|
|
576
|
+
required: false,
|
|
577
|
+
}),
|
|
578
|
+
custNbr: pieces_framework_1.Property.ShortText({
|
|
579
|
+
displayName: 'Customer Number',
|
|
580
|
+
required: true,
|
|
581
|
+
}),
|
|
582
|
+
alSeqNbr: pieces_framework_1.Property.ShortText({
|
|
583
|
+
displayName: 'Alias Sequence Number',
|
|
584
|
+
required: true,
|
|
585
|
+
}),
|
|
586
|
+
},
|
|
587
|
+
run(context) {
|
|
588
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
589
|
+
const auth = context.auth;
|
|
590
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
591
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
592
|
+
method: pieces_common_1.HttpMethod.DELETE,
|
|
593
|
+
url: `${auth.baseUrl}/IBSCICUSTDEM/v4/customers/${context.propsValue.custNbr}/aliases/${context.propsValue.alSeqNbr}`,
|
|
594
|
+
headers,
|
|
595
|
+
});
|
|
596
|
+
return response.body;
|
|
597
|
+
});
|
|
598
|
+
},
|
|
599
|
+
});
|
|
600
|
+
exports.customer_get_due_diligence = (0, pieces_framework_1.createAction)({
|
|
601
|
+
auth: __1.fisIbsAuth,
|
|
602
|
+
name: 'customer_get_due_diligence',
|
|
603
|
+
displayName: 'Customer - Get Due Diligence Demographics',
|
|
604
|
+
description: 'Retrieve due diligence demographic information',
|
|
605
|
+
props: {
|
|
606
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
607
|
+
displayName: 'IBS Authorization',
|
|
608
|
+
required: false,
|
|
609
|
+
}),
|
|
610
|
+
custNbr: pieces_framework_1.Property.ShortText({
|
|
611
|
+
displayName: 'Customer Number',
|
|
612
|
+
required: true,
|
|
613
|
+
}),
|
|
614
|
+
},
|
|
615
|
+
run(context) {
|
|
616
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
617
|
+
const auth = context.auth;
|
|
618
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
619
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
620
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
621
|
+
url: `${auth.baseUrl}/IBSCICUSTDEM/v4/customers/${context.propsValue.custNbr}/due-diligence-demographics`,
|
|
622
|
+
headers,
|
|
623
|
+
});
|
|
624
|
+
return response.body;
|
|
625
|
+
});
|
|
626
|
+
},
|
|
627
|
+
});
|
|
628
|
+
exports.customer_update_due_diligence = (0, pieces_framework_1.createAction)({
|
|
629
|
+
auth: __1.fisIbsAuth,
|
|
630
|
+
name: 'customer_update_due_diligence',
|
|
631
|
+
displayName: 'Customer - Update Due Diligence Demographics',
|
|
632
|
+
description: 'Update due diligence demographic information',
|
|
633
|
+
props: {
|
|
634
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
635
|
+
displayName: 'IBS Authorization',
|
|
636
|
+
required: false,
|
|
637
|
+
}),
|
|
638
|
+
custNbr: pieces_framework_1.Property.ShortText({
|
|
639
|
+
displayName: 'Customer Number',
|
|
640
|
+
required: true,
|
|
641
|
+
}),
|
|
642
|
+
dueDiligenceData: pieces_framework_1.Property.Object({
|
|
643
|
+
displayName: 'Due Diligence Data',
|
|
644
|
+
required: true,
|
|
645
|
+
}),
|
|
646
|
+
},
|
|
647
|
+
run(context) {
|
|
648
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
649
|
+
const auth = context.auth;
|
|
650
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
651
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
652
|
+
method: pieces_common_1.HttpMethod.PUT,
|
|
653
|
+
url: `${auth.baseUrl}/IBSCICUSTDEM/v4/customers/${context.propsValue.custNbr}/due-diligence-demographics`,
|
|
654
|
+
headers,
|
|
655
|
+
body: context.propsValue.dueDiligenceData,
|
|
656
|
+
});
|
|
657
|
+
return response.body;
|
|
658
|
+
});
|
|
659
|
+
},
|
|
660
|
+
});
|
|
661
|
+
// ============================================
|
|
662
|
+
// IBS-Customer-Contact-Information.json
|
|
663
|
+
// ============================================
|
|
664
|
+
exports.customer_get_email_addresses = (0, pieces_framework_1.createAction)({
|
|
665
|
+
auth: __1.fisIbsAuth,
|
|
666
|
+
name: 'customer_get_email_addresses',
|
|
667
|
+
displayName: 'Customer - Get Email Addresses',
|
|
668
|
+
description: 'Retrieve customer email addresses',
|
|
669
|
+
props: {
|
|
670
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
671
|
+
displayName: 'IBS Authorization',
|
|
672
|
+
required: false,
|
|
673
|
+
}),
|
|
674
|
+
custNbr: pieces_framework_1.Property.ShortText({
|
|
675
|
+
displayName: 'Customer Number',
|
|
676
|
+
required: true,
|
|
677
|
+
}),
|
|
678
|
+
},
|
|
679
|
+
run(context) {
|
|
680
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
681
|
+
const auth = context.auth;
|
|
682
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
683
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
684
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
685
|
+
url: `${auth.baseUrl}/IBSCICONTACT/v4/customers/${context.propsValue.custNbr}/email-addresses`,
|
|
686
|
+
headers,
|
|
687
|
+
});
|
|
688
|
+
return response.body;
|
|
689
|
+
});
|
|
690
|
+
},
|
|
691
|
+
});
|
|
692
|
+
exports.customer_create_email_address = (0, pieces_framework_1.createAction)({
|
|
693
|
+
auth: __1.fisIbsAuth,
|
|
694
|
+
name: 'customer_create_email_address',
|
|
695
|
+
displayName: 'Customer - Create Email Address',
|
|
696
|
+
description: 'Add a new email address for a customer',
|
|
697
|
+
props: {
|
|
698
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
699
|
+
displayName: 'IBS Authorization',
|
|
700
|
+
required: false,
|
|
701
|
+
}),
|
|
702
|
+
custNbr: pieces_framework_1.Property.ShortText({
|
|
703
|
+
displayName: 'Customer Number',
|
|
704
|
+
required: true,
|
|
705
|
+
}),
|
|
706
|
+
emailData: pieces_framework_1.Property.Object({
|
|
707
|
+
displayName: 'Email Data',
|
|
708
|
+
required: true,
|
|
709
|
+
}),
|
|
710
|
+
},
|
|
711
|
+
run(context) {
|
|
712
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
713
|
+
const auth = context.auth;
|
|
714
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
715
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
716
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
717
|
+
url: `${auth.baseUrl}/IBSCICONTACT/v4/customers/${context.propsValue.custNbr}/email-addresses`,
|
|
718
|
+
headers,
|
|
719
|
+
body: context.propsValue.emailData,
|
|
720
|
+
});
|
|
721
|
+
return response.body;
|
|
722
|
+
});
|
|
723
|
+
},
|
|
724
|
+
});
|
|
725
|
+
exports.customer_delete_email_address = (0, pieces_framework_1.createAction)({
|
|
726
|
+
auth: __1.fisIbsAuth,
|
|
727
|
+
name: 'customer_delete_email_address',
|
|
728
|
+
displayName: 'Customer - Delete Email Address',
|
|
729
|
+
description: 'Delete a customer email address',
|
|
730
|
+
props: {
|
|
731
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
732
|
+
displayName: 'IBS Authorization',
|
|
733
|
+
required: false,
|
|
734
|
+
}),
|
|
735
|
+
custNbr: pieces_framework_1.Property.ShortText({
|
|
736
|
+
displayName: 'Customer Number',
|
|
737
|
+
required: true,
|
|
738
|
+
}),
|
|
739
|
+
reasonCode: pieces_framework_1.Property.ShortText({
|
|
740
|
+
displayName: 'Reason Code',
|
|
741
|
+
required: true,
|
|
742
|
+
}),
|
|
743
|
+
effectiveDate: pieces_framework_1.Property.ShortText({
|
|
744
|
+
displayName: 'Effective Date',
|
|
745
|
+
required: true,
|
|
746
|
+
}),
|
|
747
|
+
},
|
|
748
|
+
run(context) {
|
|
749
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
750
|
+
const auth = context.auth;
|
|
751
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
752
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
753
|
+
method: pieces_common_1.HttpMethod.DELETE,
|
|
754
|
+
url: `${auth.baseUrl}/IBSCICONTACT/v4/customers/${context.propsValue.custNbr}/email-addresses/${context.propsValue.reasonCode}/${context.propsValue.effectiveDate}`,
|
|
755
|
+
headers,
|
|
756
|
+
});
|
|
757
|
+
return response.body;
|
|
758
|
+
});
|
|
759
|
+
},
|
|
760
|
+
});
|
|
761
|
+
exports.customer_get_phone_numbers = (0, pieces_framework_1.createAction)({
|
|
762
|
+
auth: __1.fisIbsAuth,
|
|
763
|
+
name: 'customer_get_phone_numbers',
|
|
764
|
+
displayName: 'Customer - Get Phone Numbers',
|
|
765
|
+
description: 'Retrieve customer phone numbers',
|
|
766
|
+
props: {
|
|
767
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
768
|
+
displayName: 'IBS Authorization',
|
|
769
|
+
required: false,
|
|
770
|
+
}),
|
|
771
|
+
custNbr: pieces_framework_1.Property.ShortText({
|
|
772
|
+
displayName: 'Customer Number',
|
|
773
|
+
required: true,
|
|
774
|
+
}),
|
|
775
|
+
},
|
|
776
|
+
run(context) {
|
|
777
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
778
|
+
const auth = context.auth;
|
|
779
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
780
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
781
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
782
|
+
url: `${auth.baseUrl}/IBSCICONTACT/v4/customers/${context.propsValue.custNbr}/phone-numbers`,
|
|
783
|
+
headers,
|
|
784
|
+
});
|
|
785
|
+
return response.body;
|
|
786
|
+
});
|
|
787
|
+
},
|
|
788
|
+
});
|
|
789
|
+
exports.customer_create_phone_number = (0, pieces_framework_1.createAction)({
|
|
790
|
+
auth: __1.fisIbsAuth,
|
|
791
|
+
name: 'customer_create_phone_number',
|
|
792
|
+
displayName: 'Customer - Create Phone Number',
|
|
793
|
+
description: 'Add a new phone number for a customer',
|
|
794
|
+
props: {
|
|
795
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
796
|
+
displayName: 'IBS Authorization',
|
|
797
|
+
required: false,
|
|
798
|
+
}),
|
|
799
|
+
custNbr: pieces_framework_1.Property.ShortText({
|
|
800
|
+
displayName: 'Customer Number',
|
|
801
|
+
required: true,
|
|
802
|
+
}),
|
|
803
|
+
phoneData: pieces_framework_1.Property.Object({
|
|
804
|
+
displayName: 'Phone Data',
|
|
805
|
+
required: true,
|
|
806
|
+
}),
|
|
807
|
+
},
|
|
808
|
+
run(context) {
|
|
809
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
810
|
+
const auth = context.auth;
|
|
811
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
812
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
813
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
814
|
+
url: `${auth.baseUrl}/IBSCICONTACT/v4/customers/${context.propsValue.custNbr}/phone-numbers`,
|
|
815
|
+
headers,
|
|
816
|
+
body: context.propsValue.phoneData,
|
|
817
|
+
});
|
|
818
|
+
return response.body;
|
|
819
|
+
});
|
|
820
|
+
},
|
|
821
|
+
});
|
|
822
|
+
exports.customer_update_phone_number = (0, pieces_framework_1.createAction)({
|
|
823
|
+
auth: __1.fisIbsAuth,
|
|
824
|
+
name: 'customer_update_phone_number',
|
|
825
|
+
displayName: 'Customer - Update Phone Number',
|
|
826
|
+
description: 'Update a customer phone number',
|
|
827
|
+
props: {
|
|
828
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
829
|
+
displayName: 'IBS Authorization',
|
|
830
|
+
required: false,
|
|
831
|
+
}),
|
|
832
|
+
custNbr: pieces_framework_1.Property.ShortText({
|
|
833
|
+
displayName: 'Customer Number',
|
|
834
|
+
required: true,
|
|
835
|
+
}),
|
|
836
|
+
phoneData: pieces_framework_1.Property.Object({
|
|
837
|
+
displayName: 'Phone Data',
|
|
838
|
+
required: true,
|
|
839
|
+
}),
|
|
840
|
+
},
|
|
841
|
+
run(context) {
|
|
842
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
843
|
+
const auth = context.auth;
|
|
844
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
845
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
846
|
+
method: pieces_common_1.HttpMethod.PUT,
|
|
847
|
+
url: `${auth.baseUrl}/IBSCICONTACT/v4/customers/${context.propsValue.custNbr}/phone-numbers`,
|
|
848
|
+
headers,
|
|
849
|
+
body: context.propsValue.phoneData,
|
|
850
|
+
});
|
|
851
|
+
return response.body;
|
|
852
|
+
});
|
|
853
|
+
},
|
|
854
|
+
});
|
|
855
|
+
exports.customer_delete_phone_number = (0, pieces_framework_1.createAction)({
|
|
856
|
+
auth: __1.fisIbsAuth,
|
|
857
|
+
name: 'customer_delete_phone_number',
|
|
858
|
+
displayName: 'Customer - Delete Phone Number',
|
|
859
|
+
description: 'Delete a customer phone number',
|
|
860
|
+
props: {
|
|
861
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
862
|
+
displayName: 'IBS Authorization',
|
|
863
|
+
required: false,
|
|
864
|
+
}),
|
|
865
|
+
custNbr: pieces_framework_1.Property.ShortText({
|
|
866
|
+
displayName: 'Customer Number',
|
|
867
|
+
required: true,
|
|
868
|
+
}),
|
|
869
|
+
reasonCode: pieces_framework_1.Property.ShortText({
|
|
870
|
+
displayName: 'Reason Code',
|
|
871
|
+
required: true,
|
|
872
|
+
}),
|
|
873
|
+
effectiveDate: pieces_framework_1.Property.ShortText({
|
|
874
|
+
displayName: 'Effective Date',
|
|
875
|
+
required: true,
|
|
876
|
+
}),
|
|
877
|
+
},
|
|
878
|
+
run(context) {
|
|
879
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
880
|
+
const auth = context.auth;
|
|
881
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
882
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
883
|
+
method: pieces_common_1.HttpMethod.DELETE,
|
|
884
|
+
url: `${auth.baseUrl}/IBSCICONTACT/v4/customers/${context.propsValue.custNbr}/phone-numbers/${context.propsValue.reasonCode}/${context.propsValue.effectiveDate}`,
|
|
885
|
+
headers,
|
|
886
|
+
});
|
|
887
|
+
return response.body;
|
|
888
|
+
});
|
|
889
|
+
},
|
|
890
|
+
});
|
|
891
|
+
// ============================================
|
|
892
|
+
// IBS-Customer-Information-Search.json
|
|
893
|
+
// ============================================
|
|
894
|
+
exports.customer_search_by_name = (0, pieces_framework_1.createAction)({
|
|
895
|
+
auth: __1.fisIbsAuth,
|
|
896
|
+
name: 'customer_search_by_name',
|
|
897
|
+
displayName: 'Customer - Search by Name/Address',
|
|
898
|
+
description: 'Search customers by name and address',
|
|
899
|
+
props: {
|
|
900
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
901
|
+
displayName: 'IBS Authorization',
|
|
902
|
+
required: false,
|
|
903
|
+
}),
|
|
904
|
+
lastName: pieces_framework_1.Property.ShortText({
|
|
905
|
+
displayName: 'Last Name',
|
|
906
|
+
required: true,
|
|
907
|
+
}),
|
|
908
|
+
firstName: pieces_framework_1.Property.ShortText({
|
|
909
|
+
displayName: 'First Name',
|
|
910
|
+
required: false,
|
|
911
|
+
}),
|
|
912
|
+
city: pieces_framework_1.Property.ShortText({
|
|
913
|
+
displayName: 'City',
|
|
914
|
+
required: false,
|
|
915
|
+
}),
|
|
916
|
+
state: pieces_framework_1.Property.ShortText({
|
|
917
|
+
displayName: 'State',
|
|
918
|
+
required: false,
|
|
919
|
+
}),
|
|
920
|
+
zipCode: pieces_framework_1.Property.ShortText({
|
|
921
|
+
displayName: 'ZIP Code',
|
|
922
|
+
required: false,
|
|
923
|
+
}),
|
|
924
|
+
},
|
|
925
|
+
run(context) {
|
|
926
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
927
|
+
const auth = context.auth;
|
|
928
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
929
|
+
const params = new URLSearchParams();
|
|
930
|
+
params.append('lastName', context.propsValue.lastName);
|
|
931
|
+
if (context.propsValue.firstName)
|
|
932
|
+
params.append('firstName', context.propsValue.firstName);
|
|
933
|
+
if (context.propsValue.city)
|
|
934
|
+
params.append('city', context.propsValue.city);
|
|
935
|
+
if (context.propsValue.state)
|
|
936
|
+
params.append('state', context.propsValue.state);
|
|
937
|
+
if (context.propsValue.zipCode)
|
|
938
|
+
params.append('zipCode', context.propsValue.zipCode);
|
|
939
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
940
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
941
|
+
url: `${auth.baseUrl}/IBSCISRH/v4/customers/search/name-address?${params.toString()}`,
|
|
942
|
+
headers,
|
|
943
|
+
});
|
|
944
|
+
return response.body;
|
|
945
|
+
});
|
|
946
|
+
},
|
|
947
|
+
});
|
|
948
|
+
exports.customer_search_by_customer_number = (0, pieces_framework_1.createAction)({
|
|
949
|
+
auth: __1.fisIbsAuth,
|
|
950
|
+
name: 'customer_search_by_customer_number',
|
|
951
|
+
displayName: 'Customer - Search by Customer Number',
|
|
952
|
+
description: 'Search customers by customer number',
|
|
953
|
+
props: {
|
|
954
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
955
|
+
displayName: 'IBS Authorization',
|
|
956
|
+
required: false,
|
|
957
|
+
}),
|
|
958
|
+
customerNumber: pieces_framework_1.Property.ShortText({
|
|
959
|
+
displayName: 'Customer Number',
|
|
960
|
+
required: true,
|
|
961
|
+
}),
|
|
962
|
+
},
|
|
963
|
+
run(context) {
|
|
964
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
965
|
+
const auth = context.auth;
|
|
966
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
967
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
968
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
969
|
+
url: `${auth.baseUrl}/IBSCISRH/v4/customers/search/customer-number?customerNumber=${context.propsValue.customerNumber}`,
|
|
970
|
+
headers,
|
|
971
|
+
});
|
|
972
|
+
return response.body;
|
|
973
|
+
});
|
|
974
|
+
},
|
|
975
|
+
});
|
|
976
|
+
exports.customer_search_by_tax_number = (0, pieces_framework_1.createAction)({
|
|
977
|
+
auth: __1.fisIbsAuth,
|
|
978
|
+
name: 'customer_search_by_tax_number',
|
|
979
|
+
displayName: 'Customer - Search by Tax Number',
|
|
980
|
+
description: 'Search customers by SSN or tax ID',
|
|
981
|
+
props: {
|
|
982
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
983
|
+
displayName: 'IBS Authorization',
|
|
984
|
+
required: false,
|
|
985
|
+
}),
|
|
986
|
+
taxNumber: pieces_framework_1.Property.ShortText({
|
|
987
|
+
displayName: 'Tax Number',
|
|
988
|
+
description: 'SSN or Tax ID',
|
|
989
|
+
required: true,
|
|
990
|
+
}),
|
|
991
|
+
},
|
|
992
|
+
run(context) {
|
|
993
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
994
|
+
const auth = context.auth;
|
|
995
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
996
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
997
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
998
|
+
url: `${auth.baseUrl}/IBSCISRH/v4/customers/search/taxnbr?taxNumber=${context.propsValue.taxNumber}`,
|
|
999
|
+
headers,
|
|
1000
|
+
});
|
|
1001
|
+
return response.body;
|
|
1002
|
+
});
|
|
1003
|
+
},
|
|
1004
|
+
});
|
|
1005
|
+
exports.customer_search_by_phone = (0, pieces_framework_1.createAction)({
|
|
1006
|
+
auth: __1.fisIbsAuth,
|
|
1007
|
+
name: 'customer_search_by_phone',
|
|
1008
|
+
displayName: 'Customer - Search by Phone Number',
|
|
1009
|
+
description: 'Search customers by telephone number',
|
|
1010
|
+
props: {
|
|
1011
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
1012
|
+
displayName: 'IBS Authorization',
|
|
1013
|
+
required: false,
|
|
1014
|
+
}),
|
|
1015
|
+
phoneNumber: pieces_framework_1.Property.ShortText({
|
|
1016
|
+
displayName: 'Phone Number',
|
|
1017
|
+
required: true,
|
|
1018
|
+
}),
|
|
1019
|
+
},
|
|
1020
|
+
run(context) {
|
|
1021
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1022
|
+
const auth = context.auth;
|
|
1023
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
1024
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
1025
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
1026
|
+
url: `${auth.baseUrl}/IBSCISRH/v4/customers/search/telephone-number?phoneNumber=${context.propsValue.phoneNumber}`,
|
|
1027
|
+
headers,
|
|
1028
|
+
});
|
|
1029
|
+
return response.body;
|
|
1030
|
+
});
|
|
1031
|
+
},
|
|
1032
|
+
});
|
|
1033
|
+
exports.customer_search_by_cip_id = (0, pieces_framework_1.createAction)({
|
|
1034
|
+
auth: __1.fisIbsAuth,
|
|
1035
|
+
name: 'customer_search_by_cip_id',
|
|
1036
|
+
displayName: 'Customer - Search by CIP ID',
|
|
1037
|
+
description: 'Search customers by CIP identification',
|
|
1038
|
+
props: {
|
|
1039
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
1040
|
+
displayName: 'IBS Authorization',
|
|
1041
|
+
required: false,
|
|
1042
|
+
}),
|
|
1043
|
+
cipId: pieces_framework_1.Property.ShortText({
|
|
1044
|
+
displayName: 'CIP ID',
|
|
1045
|
+
required: true,
|
|
1046
|
+
}),
|
|
1047
|
+
},
|
|
1048
|
+
run(context) {
|
|
1049
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1050
|
+
const auth = context.auth;
|
|
1051
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
1052
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
1053
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
1054
|
+
url: `${auth.baseUrl}/IBSCISRH/v4/customers/search/cip-id?cipId=${context.propsValue.cipId}`,
|
|
1055
|
+
headers,
|
|
1056
|
+
});
|
|
1057
|
+
return response.body;
|
|
1058
|
+
});
|
|
1059
|
+
},
|
|
1060
|
+
});
|
|
1061
|
+
// ============================================
|
|
1062
|
+
// IBS-Customer-Combined-Statements.json
|
|
1063
|
+
// ============================================
|
|
1064
|
+
exports.customer_get_statements = (0, pieces_framework_1.createAction)({
|
|
1065
|
+
auth: __1.fisIbsAuth,
|
|
1066
|
+
name: 'customer_get_statements',
|
|
1067
|
+
displayName: 'Customer - Get Statements',
|
|
1068
|
+
description: 'Retrieve customer combined statement information',
|
|
1069
|
+
props: {
|
|
1070
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
1071
|
+
displayName: 'IBS Authorization',
|
|
1072
|
+
required: false,
|
|
1073
|
+
}),
|
|
1074
|
+
ciCustNbr: pieces_framework_1.Property.ShortText({
|
|
1075
|
+
displayName: 'Customer Number',
|
|
1076
|
+
required: true,
|
|
1077
|
+
}),
|
|
1078
|
+
},
|
|
1079
|
+
run(context) {
|
|
1080
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1081
|
+
const auth = context.auth;
|
|
1082
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
1083
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
1084
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
1085
|
+
url: `${auth.baseUrl}/IBSCISTMT/v4/customers/${context.propsValue.ciCustNbr}/statements`,
|
|
1086
|
+
headers,
|
|
1087
|
+
});
|
|
1088
|
+
return response.body;
|
|
1089
|
+
});
|
|
1090
|
+
},
|
|
1091
|
+
});
|
|
1092
|
+
exports.customer_create_combined_statement = (0, pieces_framework_1.createAction)({
|
|
1093
|
+
auth: __1.fisIbsAuth,
|
|
1094
|
+
name: 'customer_create_combined_statement',
|
|
1095
|
+
displayName: 'Customer - Create Combined Statement Relationship',
|
|
1096
|
+
description: 'Create a combined statement relationship',
|
|
1097
|
+
props: {
|
|
1098
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
1099
|
+
displayName: 'IBS Authorization',
|
|
1100
|
+
required: false,
|
|
1101
|
+
}),
|
|
1102
|
+
statementData: pieces_framework_1.Property.Object({
|
|
1103
|
+
displayName: 'Statement Data',
|
|
1104
|
+
required: true,
|
|
1105
|
+
}),
|
|
1106
|
+
},
|
|
1107
|
+
run(context) {
|
|
1108
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1109
|
+
const auth = context.auth;
|
|
1110
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
1111
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
1112
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
1113
|
+
url: `${auth.baseUrl}/IBSCISTMT/v4/combined-statement-relationships`,
|
|
1114
|
+
headers,
|
|
1115
|
+
body: context.propsValue.statementData,
|
|
1116
|
+
});
|
|
1117
|
+
return response.body;
|
|
1118
|
+
});
|
|
1119
|
+
},
|
|
1120
|
+
});
|
|
1121
|
+
exports.customer_update_combined_statement = (0, pieces_framework_1.createAction)({
|
|
1122
|
+
auth: __1.fisIbsAuth,
|
|
1123
|
+
name: 'customer_update_combined_statement',
|
|
1124
|
+
displayName: 'Customer - Update Combined Statement Relationship',
|
|
1125
|
+
description: 'Update a combined statement relationship',
|
|
1126
|
+
props: {
|
|
1127
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
1128
|
+
displayName: 'IBS Authorization',
|
|
1129
|
+
required: false,
|
|
1130
|
+
}),
|
|
1131
|
+
statementData: pieces_framework_1.Property.Object({
|
|
1132
|
+
displayName: 'Statement Data',
|
|
1133
|
+
required: true,
|
|
1134
|
+
}),
|
|
1135
|
+
},
|
|
1136
|
+
run(context) {
|
|
1137
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1138
|
+
const auth = context.auth;
|
|
1139
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
1140
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
1141
|
+
method: pieces_common_1.HttpMethod.PUT,
|
|
1142
|
+
url: `${auth.baseUrl}/IBSCISTMT/v4/combined-statement-relationships`,
|
|
1143
|
+
headers,
|
|
1144
|
+
body: context.propsValue.statementData,
|
|
1145
|
+
});
|
|
1146
|
+
return response.body;
|
|
1147
|
+
});
|
|
1148
|
+
},
|
|
1149
|
+
});
|
|
1150
|
+
exports.customer_delete_combined_statement = (0, pieces_framework_1.createAction)({
|
|
1151
|
+
auth: __1.fisIbsAuth,
|
|
1152
|
+
name: 'customer_delete_combined_statement',
|
|
1153
|
+
displayName: 'Customer - Delete Combined Statement Relationship',
|
|
1154
|
+
description: 'Delete a combined statement relationship',
|
|
1155
|
+
props: {
|
|
1156
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
1157
|
+
displayName: 'IBS Authorization',
|
|
1158
|
+
required: false,
|
|
1159
|
+
}),
|
|
1160
|
+
ciCustNbr: pieces_framework_1.Property.ShortText({
|
|
1161
|
+
displayName: 'Customer Number',
|
|
1162
|
+
required: true,
|
|
1163
|
+
}),
|
|
1164
|
+
ciCurPriAcctNbr: pieces_framework_1.Property.ShortText({
|
|
1165
|
+
displayName: 'Primary Account Number',
|
|
1166
|
+
required: true,
|
|
1167
|
+
}),
|
|
1168
|
+
},
|
|
1169
|
+
run(context) {
|
|
1170
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1171
|
+
const auth = context.auth;
|
|
1172
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
1173
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
1174
|
+
method: pieces_common_1.HttpMethod.DELETE,
|
|
1175
|
+
url: `${auth.baseUrl}/IBSCISTMT/v4/combined-statement-relationships/${context.propsValue.ciCustNbr}/${context.propsValue.ciCurPriAcctNbr}`,
|
|
1176
|
+
headers,
|
|
1177
|
+
});
|
|
1178
|
+
return response.body;
|
|
1179
|
+
});
|
|
1180
|
+
},
|
|
1181
|
+
});
|
|
1182
|
+
// ============================================
|
|
1183
|
+
// IBS-Customer-Remarks.json
|
|
1184
|
+
// ============================================
|
|
1185
|
+
exports.customer_get_remarks = (0, pieces_framework_1.createAction)({
|
|
1186
|
+
auth: __1.fisIbsAuth,
|
|
1187
|
+
name: 'customer_get_remarks',
|
|
1188
|
+
displayName: 'Customer - Get Remarks',
|
|
1189
|
+
description: 'Retrieve customer remarks',
|
|
1190
|
+
props: {
|
|
1191
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
1192
|
+
displayName: 'IBS Authorization',
|
|
1193
|
+
required: false,
|
|
1194
|
+
}),
|
|
1195
|
+
ciApplCde: pieces_framework_1.Property.ShortText({
|
|
1196
|
+
displayName: 'Application Code',
|
|
1197
|
+
required: true,
|
|
1198
|
+
}),
|
|
1199
|
+
ciApplNbr: pieces_framework_1.Property.ShortText({
|
|
1200
|
+
displayName: 'Application Number',
|
|
1201
|
+
required: true,
|
|
1202
|
+
}),
|
|
1203
|
+
},
|
|
1204
|
+
run(context) {
|
|
1205
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1206
|
+
const auth = context.auth;
|
|
1207
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
1208
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
1209
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
1210
|
+
url: `${auth.baseUrl}/IBSCIRMRK/v4/remarks/${context.propsValue.ciApplCde}/${context.propsValue.ciApplNbr}`,
|
|
1211
|
+
headers,
|
|
1212
|
+
});
|
|
1213
|
+
return response.body;
|
|
1214
|
+
});
|
|
1215
|
+
},
|
|
1216
|
+
});
|
|
1217
|
+
exports.customer_create_remark = (0, pieces_framework_1.createAction)({
|
|
1218
|
+
auth: __1.fisIbsAuth,
|
|
1219
|
+
name: 'customer_create_remark',
|
|
1220
|
+
displayName: 'Customer - Create Remark',
|
|
1221
|
+
description: 'Create a new customer remark',
|
|
1222
|
+
props: {
|
|
1223
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
1224
|
+
displayName: 'IBS Authorization',
|
|
1225
|
+
required: false,
|
|
1226
|
+
}),
|
|
1227
|
+
remarkData: pieces_framework_1.Property.Object({
|
|
1228
|
+
displayName: 'Remark Data',
|
|
1229
|
+
required: true,
|
|
1230
|
+
}),
|
|
1231
|
+
},
|
|
1232
|
+
run(context) {
|
|
1233
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1234
|
+
const auth = context.auth;
|
|
1235
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
1236
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
1237
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
1238
|
+
url: `${auth.baseUrl}/IBSCIRMRK/v4/remarks`,
|
|
1239
|
+
headers,
|
|
1240
|
+
body: context.propsValue.remarkData,
|
|
1241
|
+
});
|
|
1242
|
+
return response.body;
|
|
1243
|
+
});
|
|
1244
|
+
},
|
|
1245
|
+
});
|
|
1246
|
+
exports.customer_update_remark = (0, pieces_framework_1.createAction)({
|
|
1247
|
+
auth: __1.fisIbsAuth,
|
|
1248
|
+
name: 'customer_update_remark',
|
|
1249
|
+
displayName: 'Customer - Update Remark',
|
|
1250
|
+
description: 'Update a customer remark',
|
|
1251
|
+
props: {
|
|
1252
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
1253
|
+
displayName: 'IBS Authorization',
|
|
1254
|
+
required: false,
|
|
1255
|
+
}),
|
|
1256
|
+
remarkData: pieces_framework_1.Property.Object({
|
|
1257
|
+
displayName: 'Remark Data',
|
|
1258
|
+
required: true,
|
|
1259
|
+
}),
|
|
1260
|
+
},
|
|
1261
|
+
run(context) {
|
|
1262
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1263
|
+
const auth = context.auth;
|
|
1264
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
1265
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
1266
|
+
method: pieces_common_1.HttpMethod.PUT,
|
|
1267
|
+
url: `${auth.baseUrl}/IBSCIRMRK/v4/remarks`,
|
|
1268
|
+
headers,
|
|
1269
|
+
body: context.propsValue.remarkData,
|
|
1270
|
+
});
|
|
1271
|
+
return response.body;
|
|
1272
|
+
});
|
|
1273
|
+
},
|
|
1274
|
+
});
|
|
1275
|
+
exports.customer_delete_remark = (0, pieces_framework_1.createAction)({
|
|
1276
|
+
auth: __1.fisIbsAuth,
|
|
1277
|
+
name: 'customer_delete_remark',
|
|
1278
|
+
displayName: 'Customer - Delete Remark',
|
|
1279
|
+
description: 'Delete a customer remark',
|
|
1280
|
+
props: {
|
|
1281
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
1282
|
+
displayName: 'IBS Authorization',
|
|
1283
|
+
required: false,
|
|
1284
|
+
}),
|
|
1285
|
+
ciApplCde: pieces_framework_1.Property.ShortText({
|
|
1286
|
+
displayName: 'Application Code',
|
|
1287
|
+
required: true,
|
|
1288
|
+
}),
|
|
1289
|
+
ciApplNbr: pieces_framework_1.Property.ShortText({
|
|
1290
|
+
displayName: 'Application Number',
|
|
1291
|
+
required: true,
|
|
1292
|
+
}),
|
|
1293
|
+
ciRmrkEffDte: pieces_framework_1.Property.ShortText({
|
|
1294
|
+
displayName: 'Remark Effective Date',
|
|
1295
|
+
required: true,
|
|
1296
|
+
}),
|
|
1297
|
+
ciRmrkPrcsTme: pieces_framework_1.Property.ShortText({
|
|
1298
|
+
displayName: 'Remark Process Time',
|
|
1299
|
+
required: true,
|
|
1300
|
+
}),
|
|
1301
|
+
ciRmrkEffTme: pieces_framework_1.Property.ShortText({
|
|
1302
|
+
displayName: 'Remark Effective Time',
|
|
1303
|
+
required: true,
|
|
1304
|
+
}),
|
|
1305
|
+
},
|
|
1306
|
+
run(context) {
|
|
1307
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1308
|
+
const auth = context.auth;
|
|
1309
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
1310
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
1311
|
+
method: pieces_common_1.HttpMethod.DELETE,
|
|
1312
|
+
url: `${auth.baseUrl}/IBSCIRMRK/v4/remarks/${context.propsValue.ciApplCde}/${context.propsValue.ciApplNbr}/${context.propsValue.ciRmrkEffDte}/${context.propsValue.ciRmrkPrcsTme}/${context.propsValue.ciRmrkEffTme}`,
|
|
1313
|
+
headers,
|
|
1314
|
+
});
|
|
1315
|
+
return response.body;
|
|
1316
|
+
});
|
|
1317
|
+
},
|
|
1318
|
+
});
|
|
1319
|
+
// ============================================
|
|
1320
|
+
// IBS-Customer-Relationships.json
|
|
1321
|
+
// ============================================
|
|
1322
|
+
exports.customer_get_relationships = (0, pieces_framework_1.createAction)({
|
|
1323
|
+
auth: __1.fisIbsAuth,
|
|
1324
|
+
name: 'customer_get_relationships',
|
|
1325
|
+
displayName: 'Customer - Get Relationships',
|
|
1326
|
+
description: 'Retrieve customer relationships',
|
|
1327
|
+
props: {
|
|
1328
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
1329
|
+
displayName: 'IBS Authorization',
|
|
1330
|
+
required: false,
|
|
1331
|
+
}),
|
|
1332
|
+
applCode: pieces_framework_1.Property.ShortText({
|
|
1333
|
+
displayName: 'Application Code',
|
|
1334
|
+
required: true,
|
|
1335
|
+
}),
|
|
1336
|
+
applNumber: pieces_framework_1.Property.ShortText({
|
|
1337
|
+
displayName: 'Application Number',
|
|
1338
|
+
required: true,
|
|
1339
|
+
}),
|
|
1340
|
+
},
|
|
1341
|
+
run(context) {
|
|
1342
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1343
|
+
const auth = context.auth;
|
|
1344
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
1345
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
1346
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
1347
|
+
url: `${auth.baseUrl}/IBSCIRLT/v4/relationships/${context.propsValue.applCode}/${context.propsValue.applNumber}`,
|
|
1348
|
+
headers,
|
|
1349
|
+
});
|
|
1350
|
+
return response.body;
|
|
1351
|
+
});
|
|
1352
|
+
},
|
|
1353
|
+
});
|
|
1354
|
+
exports.customer_create_relationship = (0, pieces_framework_1.createAction)({
|
|
1355
|
+
auth: __1.fisIbsAuth,
|
|
1356
|
+
name: 'customer_create_relationship',
|
|
1357
|
+
displayName: 'Customer - Create Relationship',
|
|
1358
|
+
description: 'Create a new customer relationship',
|
|
1359
|
+
props: {
|
|
1360
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
1361
|
+
displayName: 'IBS Authorization',
|
|
1362
|
+
required: false,
|
|
1363
|
+
}),
|
|
1364
|
+
relationshipData: pieces_framework_1.Property.Object({
|
|
1365
|
+
displayName: 'Relationship Data',
|
|
1366
|
+
required: true,
|
|
1367
|
+
}),
|
|
1368
|
+
},
|
|
1369
|
+
run(context) {
|
|
1370
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1371
|
+
const auth = context.auth;
|
|
1372
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
1373
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
1374
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
1375
|
+
url: `${auth.baseUrl}/IBSCIRLT/v4/relationships`,
|
|
1376
|
+
headers,
|
|
1377
|
+
body: context.propsValue.relationshipData,
|
|
1378
|
+
});
|
|
1379
|
+
return response.body;
|
|
1380
|
+
});
|
|
1381
|
+
},
|
|
1382
|
+
});
|
|
1383
|
+
exports.customer_update_relationship = (0, pieces_framework_1.createAction)({
|
|
1384
|
+
auth: __1.fisIbsAuth,
|
|
1385
|
+
name: 'customer_update_relationship',
|
|
1386
|
+
displayName: 'Customer - Update Relationship',
|
|
1387
|
+
description: 'Update a customer relationship',
|
|
1388
|
+
props: {
|
|
1389
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
1390
|
+
displayName: 'IBS Authorization',
|
|
1391
|
+
required: false,
|
|
1392
|
+
}),
|
|
1393
|
+
relationshipData: pieces_framework_1.Property.Object({
|
|
1394
|
+
displayName: 'Relationship Data',
|
|
1395
|
+
required: true,
|
|
1396
|
+
}),
|
|
1397
|
+
},
|
|
1398
|
+
run(context) {
|
|
1399
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1400
|
+
const auth = context.auth;
|
|
1401
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
1402
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
1403
|
+
method: pieces_common_1.HttpMethod.PUT,
|
|
1404
|
+
url: `${auth.baseUrl}/IBSCIRLT/v4/relationships`,
|
|
1405
|
+
headers,
|
|
1406
|
+
body: context.propsValue.relationshipData,
|
|
1407
|
+
});
|
|
1408
|
+
return response.body;
|
|
1409
|
+
});
|
|
1410
|
+
},
|
|
1411
|
+
});
|
|
1412
|
+
exports.customer_delete_relationship = (0, pieces_framework_1.createAction)({
|
|
1413
|
+
auth: __1.fisIbsAuth,
|
|
1414
|
+
name: 'customer_delete_relationship',
|
|
1415
|
+
displayName: 'Customer - Delete Relationship',
|
|
1416
|
+
description: 'Delete a customer relationship',
|
|
1417
|
+
props: {
|
|
1418
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
1419
|
+
displayName: 'IBS Authorization',
|
|
1420
|
+
required: false,
|
|
1421
|
+
}),
|
|
1422
|
+
relationshipData: pieces_framework_1.Property.Object({
|
|
1423
|
+
displayName: 'Relationship Data',
|
|
1424
|
+
required: true,
|
|
1425
|
+
}),
|
|
1426
|
+
},
|
|
1427
|
+
run(context) {
|
|
1428
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1429
|
+
const auth = context.auth;
|
|
1430
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
1431
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
1432
|
+
method: pieces_common_1.HttpMethod.DELETE,
|
|
1433
|
+
url: `${auth.baseUrl}/IBSCIRLT/v4/relationships`,
|
|
1434
|
+
headers,
|
|
1435
|
+
body: context.propsValue.relationshipData,
|
|
1436
|
+
});
|
|
1437
|
+
return response.body;
|
|
1438
|
+
});
|
|
1439
|
+
},
|
|
1440
|
+
});
|
|
1441
|
+
// ============================================
|
|
1442
|
+
// IBS-Customer-Profile.json
|
|
1443
|
+
// ============================================
|
|
1444
|
+
exports.customer_get_profile = (0, pieces_framework_1.createAction)({
|
|
1445
|
+
auth: __1.fisIbsAuth,
|
|
1446
|
+
name: 'customer_get_profile',
|
|
1447
|
+
displayName: 'Customer - Get Profile',
|
|
1448
|
+
description: 'Retrieve customer profile information',
|
|
1449
|
+
props: {
|
|
1450
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
1451
|
+
displayName: 'IBS Authorization',
|
|
1452
|
+
required: false,
|
|
1453
|
+
}),
|
|
1454
|
+
customerNumber: pieces_framework_1.Property.ShortText({
|
|
1455
|
+
displayName: 'Customer Number',
|
|
1456
|
+
required: true,
|
|
1457
|
+
}),
|
|
1458
|
+
},
|
|
1459
|
+
run(context) {
|
|
1460
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1461
|
+
const auth = context.auth;
|
|
1462
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
1463
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
1464
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
1465
|
+
url: `${auth.baseUrl}/IBSCIPROF/v4/customers/${context.propsValue.customerNumber}/profile`,
|
|
1466
|
+
headers,
|
|
1467
|
+
});
|
|
1468
|
+
return response.body;
|
|
1469
|
+
});
|
|
1470
|
+
},
|
|
1471
|
+
});
|
|
1472
|
+
exports.customer_update_profile = (0, pieces_framework_1.createAction)({
|
|
1473
|
+
auth: __1.fisIbsAuth,
|
|
1474
|
+
name: 'customer_update_profile',
|
|
1475
|
+
displayName: 'Customer - Update Profile',
|
|
1476
|
+
description: 'Update customer profile information',
|
|
1477
|
+
props: {
|
|
1478
|
+
ibsAuthorization: pieces_framework_1.Property.ShortText({
|
|
1479
|
+
displayName: 'IBS Authorization',
|
|
1480
|
+
required: false,
|
|
1481
|
+
}),
|
|
1482
|
+
customerNumber: pieces_framework_1.Property.ShortText({
|
|
1483
|
+
displayName: 'Customer Number',
|
|
1484
|
+
required: true,
|
|
1485
|
+
}),
|
|
1486
|
+
profileData: pieces_framework_1.Property.Object({
|
|
1487
|
+
displayName: 'Profile Data',
|
|
1488
|
+
required: true,
|
|
1489
|
+
}),
|
|
1490
|
+
},
|
|
1491
|
+
run(context) {
|
|
1492
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
1493
|
+
const auth = context.auth;
|
|
1494
|
+
const headers = buildHeaders(auth, context.propsValue.ibsAuthorization);
|
|
1495
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
1496
|
+
method: pieces_common_1.HttpMethod.PUT,
|
|
1497
|
+
url: `${auth.baseUrl}/IBSCIPROF/v4/customers/${context.propsValue.customerNumber}/profile`,
|
|
1498
|
+
headers,
|
|
1499
|
+
body: context.propsValue.profileData,
|
|
1500
|
+
});
|
|
1501
|
+
return response.body;
|
|
1502
|
+
});
|
|
1503
|
+
},
|
|
1504
|
+
});
|
|
1505
|
+
// Export all customer actions
|
|
1506
|
+
exports.customerActions = [
|
|
1507
|
+
// Customer CRUD
|
|
1508
|
+
exports.customer_get,
|
|
1509
|
+
exports.customer_delete,
|
|
1510
|
+
exports.customer_create_individual,
|
|
1511
|
+
exports.customer_create_organization,
|
|
1512
|
+
exports.customer_get_combined,
|
|
1513
|
+
exports.customer_update_combined,
|
|
1514
|
+
// Account Management
|
|
1515
|
+
exports.customer_accounts_address_edit,
|
|
1516
|
+
exports.customer_accounts_delete,
|
|
1517
|
+
exports.customer_accounts_get_name_address,
|
|
1518
|
+
exports.customer_accounts_update_name_address,
|
|
1519
|
+
exports.customer_accounts_create,
|
|
1520
|
+
exports.customer_accounts_update_related_address,
|
|
1521
|
+
// Demographics
|
|
1522
|
+
exports.customer_address_edit,
|
|
1523
|
+
exports.customer_update_addresses,
|
|
1524
|
+
exports.customer_get_aliases,
|
|
1525
|
+
exports.customer_create_alias,
|
|
1526
|
+
exports.customer_update_alias,
|
|
1527
|
+
exports.customer_delete_alias,
|
|
1528
|
+
exports.customer_get_due_diligence,
|
|
1529
|
+
exports.customer_update_due_diligence,
|
|
1530
|
+
// Contact Information
|
|
1531
|
+
exports.customer_get_email_addresses,
|
|
1532
|
+
exports.customer_create_email_address,
|
|
1533
|
+
exports.customer_delete_email_address,
|
|
1534
|
+
exports.customer_get_phone_numbers,
|
|
1535
|
+
exports.customer_create_phone_number,
|
|
1536
|
+
exports.customer_update_phone_number,
|
|
1537
|
+
exports.customer_delete_phone_number,
|
|
1538
|
+
// Search
|
|
1539
|
+
exports.customer_search_by_name,
|
|
1540
|
+
exports.customer_search_by_customer_number,
|
|
1541
|
+
exports.customer_search_by_tax_number,
|
|
1542
|
+
exports.customer_search_by_phone,
|
|
1543
|
+
exports.customer_search_by_cip_id,
|
|
1544
|
+
// Combined Statements
|
|
1545
|
+
exports.customer_get_statements,
|
|
1546
|
+
exports.customer_create_combined_statement,
|
|
1547
|
+
exports.customer_update_combined_statement,
|
|
1548
|
+
exports.customer_delete_combined_statement,
|
|
1549
|
+
// Remarks
|
|
1550
|
+
exports.customer_get_remarks,
|
|
1551
|
+
exports.customer_create_remark,
|
|
1552
|
+
exports.customer_update_remark,
|
|
1553
|
+
exports.customer_delete_remark,
|
|
1554
|
+
// Relationships
|
|
1555
|
+
exports.customer_get_relationships,
|
|
1556
|
+
exports.customer_create_relationship,
|
|
1557
|
+
exports.customer_update_relationship,
|
|
1558
|
+
exports.customer_delete_relationship,
|
|
1559
|
+
// Profile
|
|
1560
|
+
exports.customer_get_profile,
|
|
1561
|
+
exports.customer_update_profile,
|
|
1562
|
+
];
|
|
1563
|
+
//# sourceMappingURL=customer.js.map
|