@vqnguyen1/piece-fiserv-premier 0.0.1
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/README.md +3 -0
- package/package.json +19 -0
- package/src/index.ts +35 -0
- package/src/lib/actions/add-party.ts +44 -0
- package/src/lib/actions/get-party-by-tax-id.ts +58 -0
- package/src/lib/actions/get-party-list.ts +68 -0
- package/src/lib/actions/get-party.ts +51 -0
- package/src/lib/actions/update-party.ts +63 -0
- package/vqnguyen1-piece-fiserv-premier-0.0.1.tgz +0 -0
package/README.md
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vqnguyen1/piece-fiserv-premier",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"type": "commonjs",
|
|
6
|
+
"main": "./src/index.js",
|
|
7
|
+
"types": "./src/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./src/index.js"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"tslib": "^2.3.0"
|
|
13
|
+
},
|
|
14
|
+
"peerDependencies": {
|
|
15
|
+
"@activepieces/pieces-framework": "*",
|
|
16
|
+
"@activepieces/pieces-common": "*",
|
|
17
|
+
"@activepieces/shared": "*"
|
|
18
|
+
}
|
|
19
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { createPiece, PieceAuth } from '@activepieces/pieces-framework';
|
|
2
|
+
import { PieceCategory } from '@activepieces/shared';
|
|
3
|
+
import { getParty } from './lib/actions/get-party';
|
|
4
|
+
import { getPartyByTaxId } from './lib/actions/get-party-by-tax-id';
|
|
5
|
+
import { getPartyList } from './lib/actions/get-party-list';
|
|
6
|
+
import { addParty } from './lib/actions/add-party';
|
|
7
|
+
import { updateParty } from './lib/actions/update-party';
|
|
8
|
+
|
|
9
|
+
export const fiservPremierAuth = PieceAuth.CustomAuth({
|
|
10
|
+
description: 'Fiserv Premier API credentials',
|
|
11
|
+
required: true,
|
|
12
|
+
props: {
|
|
13
|
+
baseUrl: PieceAuth.ShortText({
|
|
14
|
+
displayName: 'Base URL',
|
|
15
|
+
description: 'The base URL for the Fiserv Premier API (e.g., https://api.fiservapps.com)',
|
|
16
|
+
required: true,
|
|
17
|
+
}),
|
|
18
|
+
organizationId: PieceAuth.ShortText({
|
|
19
|
+
displayName: 'Organization ID',
|
|
20
|
+
description: 'Your Fiserv Premier Organization ID',
|
|
21
|
+
required: true,
|
|
22
|
+
}),
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export const fiservPremier = createPiece({
|
|
27
|
+
displayName: 'Fiserv Premier',
|
|
28
|
+
auth: fiservPremierAuth,
|
|
29
|
+
minimumSupportedRelease: '0.20.0',
|
|
30
|
+
logoUrl: 'https://www.fiserv.com/content/dam/fiserv/us/en/images/logos/fiserv-logo.svg',
|
|
31
|
+
authors: ['vqnguyen1'],
|
|
32
|
+
categories: [PieceCategory.BUSINESS_INTELLIGENCE],
|
|
33
|
+
actions: [getParty, getPartyByTaxId, getPartyList, addParty, updateParty],
|
|
34
|
+
triggers: [],
|
|
35
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createAction,
|
|
3
|
+
Property,
|
|
4
|
+
} from '@activepieces/pieces-framework';
|
|
5
|
+
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
|
6
|
+
import { fiservPremierAuth } from '../..';
|
|
7
|
+
|
|
8
|
+
export const addParty = createAction({
|
|
9
|
+
name: 'add_party',
|
|
10
|
+
auth: fiservPremierAuth,
|
|
11
|
+
displayName: 'Add Party',
|
|
12
|
+
description: 'Create a new party (person or organization)',
|
|
13
|
+
props: {
|
|
14
|
+
partyData: Property.Json({
|
|
15
|
+
displayName: 'Party Data',
|
|
16
|
+
description: 'The complete party information as JSON object (PersonPartyInfo or OrgPartyInfo)',
|
|
17
|
+
required: true,
|
|
18
|
+
}),
|
|
19
|
+
},
|
|
20
|
+
async run(context) {
|
|
21
|
+
const auth = context.auth as any;
|
|
22
|
+
const baseUrl = auth.baseUrl;
|
|
23
|
+
const organizationId = auth.organizationId;
|
|
24
|
+
const { partyData } = context.propsValue;
|
|
25
|
+
|
|
26
|
+
const trnId = crypto.randomUUID();
|
|
27
|
+
|
|
28
|
+
const response = await httpClient.sendRequest({
|
|
29
|
+
method: HttpMethod.POST,
|
|
30
|
+
url: `${baseUrl}/banking/efx/v1/partyservice/parties/parties`,
|
|
31
|
+
headers: {
|
|
32
|
+
'accept': 'application/json',
|
|
33
|
+
'EFXHeader': JSON.stringify({
|
|
34
|
+
OrganizationId: organizationId,
|
|
35
|
+
TrnId: trnId,
|
|
36
|
+
}),
|
|
37
|
+
'Content-Type': 'application/json',
|
|
38
|
+
},
|
|
39
|
+
body: partyData,
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
return response.body;
|
|
43
|
+
},
|
|
44
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createAction,
|
|
3
|
+
Property,
|
|
4
|
+
} from '@activepieces/pieces-framework';
|
|
5
|
+
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
|
6
|
+
import { fiservPremierAuth } from '../..';
|
|
7
|
+
|
|
8
|
+
export const getPartyByTaxId = createAction({
|
|
9
|
+
name: 'get_party_by_tax_id',
|
|
10
|
+
auth: fiservPremierAuth,
|
|
11
|
+
displayName: 'Get Party by Tax ID',
|
|
12
|
+
description: 'Get party information by Tax ID',
|
|
13
|
+
props: {
|
|
14
|
+
taxId: Property.ShortText({
|
|
15
|
+
displayName: 'Tax ID',
|
|
16
|
+
description: 'The Tax ID to search for',
|
|
17
|
+
required: true,
|
|
18
|
+
}),
|
|
19
|
+
maxRecords: Property.Number({
|
|
20
|
+
displayName: 'Max Records',
|
|
21
|
+
description: 'Maximum number of records to return',
|
|
22
|
+
required: false,
|
|
23
|
+
defaultValue: 25,
|
|
24
|
+
}),
|
|
25
|
+
},
|
|
26
|
+
async run(context) {
|
|
27
|
+
const auth = context.auth as any;
|
|
28
|
+
const baseUrl = auth.baseUrl;
|
|
29
|
+
const organizationId = auth.organizationId;
|
|
30
|
+
const { taxId, maxRecords } = context.propsValue;
|
|
31
|
+
|
|
32
|
+
const trnId = crypto.randomUUID();
|
|
33
|
+
|
|
34
|
+
const response = await httpClient.sendRequest({
|
|
35
|
+
method: HttpMethod.POST,
|
|
36
|
+
url: `${baseUrl}/banking/efx/v1/partyservice/parties/parties/secured/list`,
|
|
37
|
+
headers: {
|
|
38
|
+
'accept': 'application/json',
|
|
39
|
+
'EFXHeader': JSON.stringify({
|
|
40
|
+
OrganizationId: organizationId,
|
|
41
|
+
TrnId: trnId,
|
|
42
|
+
}),
|
|
43
|
+
'Content-Type': 'application/json',
|
|
44
|
+
},
|
|
45
|
+
body: {
|
|
46
|
+
RecCtrlIn: {
|
|
47
|
+
MaxRecLimit: maxRecords || 25,
|
|
48
|
+
Cursor: '',
|
|
49
|
+
},
|
|
50
|
+
PartyListSel: {
|
|
51
|
+
TaxIdent: taxId,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
return response.body;
|
|
57
|
+
},
|
|
58
|
+
});
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createAction,
|
|
3
|
+
Property,
|
|
4
|
+
} from '@activepieces/pieces-framework';
|
|
5
|
+
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
|
6
|
+
import { fiservPremierAuth } from '../..';
|
|
7
|
+
|
|
8
|
+
export const getPartyList = createAction({
|
|
9
|
+
name: 'get_party_list',
|
|
10
|
+
auth: fiservPremierAuth,
|
|
11
|
+
displayName: 'Get Party List',
|
|
12
|
+
description: 'Get a list of parties with optional filtering',
|
|
13
|
+
props: {
|
|
14
|
+
taxId: Property.ShortText({
|
|
15
|
+
displayName: 'Tax ID',
|
|
16
|
+
description: 'Filter by Tax ID (optional)',
|
|
17
|
+
required: false,
|
|
18
|
+
}),
|
|
19
|
+
maxRecords: Property.Number({
|
|
20
|
+
displayName: 'Max Records',
|
|
21
|
+
description: 'Maximum number of records to return',
|
|
22
|
+
required: false,
|
|
23
|
+
defaultValue: 25,
|
|
24
|
+
}),
|
|
25
|
+
cursor: Property.ShortText({
|
|
26
|
+
displayName: 'Cursor',
|
|
27
|
+
description: 'Cursor for pagination (optional)',
|
|
28
|
+
required: false,
|
|
29
|
+
}),
|
|
30
|
+
},
|
|
31
|
+
async run(context) {
|
|
32
|
+
const auth = context.auth as any;
|
|
33
|
+
const baseUrl = auth.baseUrl;
|
|
34
|
+
const organizationId = auth.organizationId;
|
|
35
|
+
const { taxId, maxRecords, cursor } = context.propsValue;
|
|
36
|
+
|
|
37
|
+
const trnId = crypto.randomUUID();
|
|
38
|
+
|
|
39
|
+
const body: any = {
|
|
40
|
+
RecCtrlIn: {
|
|
41
|
+
MaxRecLimit: maxRecords || 25,
|
|
42
|
+
Cursor: cursor || '',
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
if (taxId) {
|
|
47
|
+
body.PartyListSel = {
|
|
48
|
+
TaxIdent: taxId,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const response = await httpClient.sendRequest({
|
|
53
|
+
method: HttpMethod.POST,
|
|
54
|
+
url: `${baseUrl}/banking/efx/v1/partyservice/parties/parties/secured/list`,
|
|
55
|
+
headers: {
|
|
56
|
+
'accept': 'application/json',
|
|
57
|
+
'EFXHeader': JSON.stringify({
|
|
58
|
+
OrganizationId: organizationId,
|
|
59
|
+
TrnId: trnId,
|
|
60
|
+
}),
|
|
61
|
+
'Content-Type': 'application/json',
|
|
62
|
+
},
|
|
63
|
+
body,
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
return response.body;
|
|
67
|
+
},
|
|
68
|
+
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createAction,
|
|
3
|
+
Property,
|
|
4
|
+
} from '@activepieces/pieces-framework';
|
|
5
|
+
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
|
6
|
+
import { fiservPremierAuth } from '../..';
|
|
7
|
+
|
|
8
|
+
export const getParty = createAction({
|
|
9
|
+
name: 'get_party',
|
|
10
|
+
auth: fiservPremierAuth,
|
|
11
|
+
displayName: 'Get Party',
|
|
12
|
+
description: 'Get party information by Party ID',
|
|
13
|
+
props: {
|
|
14
|
+
partyId: Property.ShortText({
|
|
15
|
+
displayName: 'Party ID',
|
|
16
|
+
description: 'The ID of the party to retrieve',
|
|
17
|
+
required: true,
|
|
18
|
+
}),
|
|
19
|
+
},
|
|
20
|
+
async run(context) {
|
|
21
|
+
const auth = context.auth as any;
|
|
22
|
+
const baseUrl = auth.baseUrl;
|
|
23
|
+
const organizationId = auth.organizationId;
|
|
24
|
+
const { partyId } = context.propsValue;
|
|
25
|
+
|
|
26
|
+
// Generate a unique transaction ID
|
|
27
|
+
const trnId = crypto.randomUUID();
|
|
28
|
+
|
|
29
|
+
const response = await httpClient.sendRequest({
|
|
30
|
+
method: HttpMethod.POST,
|
|
31
|
+
url: `${baseUrl}/banking/efx/v1/partyservice/parties/parties/secured`,
|
|
32
|
+
headers: {
|
|
33
|
+
'accept': 'application/json',
|
|
34
|
+
'EFXHeader': JSON.stringify({
|
|
35
|
+
OrganizationId: organizationId,
|
|
36
|
+
TrnId: trnId,
|
|
37
|
+
}),
|
|
38
|
+
'Content-Type': 'application/json',
|
|
39
|
+
},
|
|
40
|
+
body: {
|
|
41
|
+
PartySel: {
|
|
42
|
+
PartyKeys: {
|
|
43
|
+
PartyId: partyId,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
return response.body;
|
|
50
|
+
},
|
|
51
|
+
});
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createAction,
|
|
3
|
+
Property,
|
|
4
|
+
} from '@activepieces/pieces-framework';
|
|
5
|
+
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
|
6
|
+
import { fiservPremierAuth } from '../..';
|
|
7
|
+
|
|
8
|
+
export const updateParty = createAction({
|
|
9
|
+
name: 'update_party',
|
|
10
|
+
auth: fiservPremierAuth,
|
|
11
|
+
displayName: 'Update Party',
|
|
12
|
+
description: 'Update an existing party',
|
|
13
|
+
props: {
|
|
14
|
+
partyId: Property.ShortText({
|
|
15
|
+
displayName: 'Party ID',
|
|
16
|
+
description: 'The ID of the party to update',
|
|
17
|
+
required: true,
|
|
18
|
+
}),
|
|
19
|
+
partyData: Property.Json({
|
|
20
|
+
displayName: 'Party Data',
|
|
21
|
+
description: 'The updated party information as JSON object (PersonPartyInfo or OrgPartyInfo)',
|
|
22
|
+
required: true,
|
|
23
|
+
}),
|
|
24
|
+
overrideAutoAck: Property.Checkbox({
|
|
25
|
+
displayName: 'Override Auto Acknowledgment',
|
|
26
|
+
description: 'Override automatic acknowledgment',
|
|
27
|
+
required: false,
|
|
28
|
+
defaultValue: true,
|
|
29
|
+
}),
|
|
30
|
+
},
|
|
31
|
+
async run(context) {
|
|
32
|
+
const auth = context.auth as any;
|
|
33
|
+
const baseUrl = auth.baseUrl;
|
|
34
|
+
const organizationId = auth.organizationId;
|
|
35
|
+
const { partyId, partyData, overrideAutoAck } = context.propsValue;
|
|
36
|
+
|
|
37
|
+
const trnId = crypto.randomUUID();
|
|
38
|
+
|
|
39
|
+
const body: any = {
|
|
40
|
+
OvrdAutoAckInd: overrideAutoAck !== undefined ? String(overrideAutoAck) : 'true',
|
|
41
|
+
PartyKeys: {
|
|
42
|
+
PartyId: partyId,
|
|
43
|
+
},
|
|
44
|
+
...partyData,
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const response = await httpClient.sendRequest({
|
|
48
|
+
method: HttpMethod.PUT,
|
|
49
|
+
url: `${baseUrl}/banking/efx/v1/partyservice/parties/parties`,
|
|
50
|
+
headers: {
|
|
51
|
+
'accept': 'application/json',
|
|
52
|
+
'EFXHeader': JSON.stringify({
|
|
53
|
+
OrganizationId: organizationId,
|
|
54
|
+
TrnId: trnId,
|
|
55
|
+
}),
|
|
56
|
+
'Content-Type': 'application/json',
|
|
57
|
+
},
|
|
58
|
+
body,
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
return response.body;
|
|
62
|
+
},
|
|
63
|
+
});
|
|
Binary file
|