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