@vqnguyen1/piece-cufx 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.
Files changed (31) hide show
  1. package/package.json +9 -0
  2. package/src/index.d.ts +1 -0
  3. package/src/index.js +44 -0
  4. package/src/index.js.map +1 -0
  5. package/src/lib/actions/create-or-update-contact.d.ts +3 -0
  6. package/src/lib/actions/create-or-update-contact.js +48 -0
  7. package/src/lib/actions/create-or-update-contact.js.map +1 -0
  8. package/src/lib/actions/create-or-update-party.d.ts +3 -0
  9. package/src/lib/actions/create-or-update-party.js +45 -0
  10. package/src/lib/actions/create-or-update-party.js.map +1 -0
  11. package/src/lib/actions/search-accounts.d.ts +5 -0
  12. package/src/lib/actions/search-accounts.js +56 -0
  13. package/src/lib/actions/search-accounts.js.map +1 -0
  14. package/src/lib/actions/search-contacts.d.ts +6 -0
  15. package/src/lib/actions/search-contacts.js +64 -0
  16. package/src/lib/actions/search-contacts.js.map +1 -0
  17. package/src/lib/actions/search-parties.d.ts +6 -0
  18. package/src/lib/actions/search-parties.js +55 -0
  19. package/src/lib/actions/search-parties.js.map +1 -0
  20. package/src/lib/actions/search-transactions.d.ts +9 -0
  21. package/src/lib/actions/search-transactions.js +72 -0
  22. package/src/lib/actions/search-transactions.js.map +1 -0
  23. package/src/lib/actions/send-cufx-message.d.ts +6 -0
  24. package/src/lib/actions/send-cufx-message.js +60 -0
  25. package/src/lib/actions/send-cufx-message.js.map +1 -0
  26. package/src/lib/auth.d.ts +1 -0
  27. package/src/lib/auth.js +51 -0
  28. package/src/lib/auth.js.map +1 -0
  29. package/src/lib/common/client.d.ts +32 -0
  30. package/src/lib/common/client.js +128 -0
  31. package/src/lib/common/client.js.map +1 -0
package/package.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@vqnguyen1/piece-cufx",
3
+ "version": "0.0.1",
4
+ "main": "./src/index.js",
5
+ "types": "./src/index.d.ts",
6
+ "dependencies": {
7
+ "tslib": "2.6.2"
8
+ }
9
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare const cufx: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
package/src/index.js ADDED
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.cufx = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_common_1 = require("@activepieces/pieces-common");
6
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
7
+ const shared_1 = require("@activepieces/shared");
8
+ const create_or_update_contact_1 = require("./lib/actions/create-or-update-contact");
9
+ const create_or_update_party_1 = require("./lib/actions/create-or-update-party");
10
+ const search_accounts_1 = require("./lib/actions/search-accounts");
11
+ const search_contacts_1 = require("./lib/actions/search-contacts");
12
+ const search_parties_1 = require("./lib/actions/search-parties");
13
+ const search_transactions_1 = require("./lib/actions/search-transactions");
14
+ const send_cufx_message_1 = require("./lib/actions/send-cufx-message");
15
+ const auth_1 = require("./lib/auth");
16
+ exports.cufx = (0, pieces_framework_1.createPiece)({
17
+ displayName: 'CUFX',
18
+ description: 'Credit Union Financial eXchange (CUFX 5.0) — members, accounts, transactions, contacts, and all 52 standard message endpoints.',
19
+ minimumSupportedRelease: '0.36.1',
20
+ logoUrl: 'https://cdn.activepieces.com/pieces/cufx.png',
21
+ categories: [shared_1.PieceCategory.PAYMENT_PROCESSING, shared_1.PieceCategory.ACCOUNTING],
22
+ auth: auth_1.cufxAuth,
23
+ authors: ['vqnguyen1'],
24
+ actions: [
25
+ search_parties_1.searchParties,
26
+ search_accounts_1.searchAccounts,
27
+ search_transactions_1.searchTransactions,
28
+ search_contacts_1.searchContacts,
29
+ create_or_update_party_1.createOrUpdateParty,
30
+ create_or_update_contact_1.createOrUpdateContact,
31
+ send_cufx_message_1.sendCufxMessage,
32
+ (0, pieces_common_1.createCustomApiCallAction)({
33
+ baseUrl: (auth) => { var _a, _b; return String((_b = (_a = auth === null || auth === void 0 ? void 0 : auth.props) === null || _a === void 0 ? void 0 : _a['baseUrl']) !== null && _b !== void 0 ? _b : ''); },
34
+ auth: auth_1.cufxAuth,
35
+ authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
36
+ return ({
37
+ Authorization: `Bearer ${auth.access_token}`,
38
+ });
39
+ }),
40
+ }),
41
+ ],
42
+ triggers: [],
43
+ });
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAAwE;AACxE,qEAA6D;AAC7D,iDAAqD;AACrD,qFAA+E;AAC/E,iFAA2E;AAC3E,mEAA+D;AAC/D,mEAA+D;AAC/D,iEAA6D;AAC7D,2EAAuE;AACvE,uEAAkE;AAClE,qCAAsC;AAEzB,QAAA,IAAI,GAAG,IAAA,8BAAW,EAAC;IAC5B,WAAW,EAAE,MAAM;IACnB,WAAW,EAAE,gIAAgI;IAC7I,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,8CAA8C;IACvD,UAAU,EAAE,CAAC,sBAAa,CAAC,kBAAkB,EAAE,sBAAa,CAAC,UAAU,CAAC;IACxE,IAAI,EAAE,eAAQ;IACd,OAAO,EAAE,CAAC,WAAW,CAAC;IACtB,OAAO,EAAE;QACL,8BAAa;QACb,gCAAc;QACd,wCAAkB;QAClB,gCAAc;QACd,4CAAmB;QACnB,gDAAqB;QACrB,mCAAe;QACf,IAAA,yCAAyB,EAAC;YACtB,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,eAAC,OAAA,MAAM,CAAC,MAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,0CAAG,SAAS,CAAC,mCAAI,EAAE,CAAC,CAAA,EAAA;YACzD,IAAI,EAAE,eAAQ;YACd,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC1B,aAAa,EAAE,UAAU,IAAI,CAAC,YAAY,EAAE;iBAC/C,CAAC,CAAA;cAAA;SACL,CAAC;KACL;IACD,QAAQ,EAAE,EAAE;CACf,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const createOrUpdateContact: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
+ contacts: import("@activepieces/pieces-framework").JsonProperty<true>;
3
+ }>;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createOrUpdateContact = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../auth");
7
+ const client_1 = require("../common/client");
8
+ exports.createOrUpdateContact = (0, pieces_framework_1.createAction)({
9
+ auth: auth_1.cufxAuth,
10
+ name: 'create_or_update_contact',
11
+ displayName: 'Create or Update Contact',
12
+ description: 'Create or update one or more contact points (address, phone, email). Include a contactId to update an existing contact.',
13
+ props: {
14
+ contacts: pieces_framework_1.Property.Json({
15
+ displayName: 'Contact Record(s)',
16
+ description: 'A CUFX Contact object, or an array of them. Omit contactId to create; include it to update.',
17
+ required: true,
18
+ defaultValue: {
19
+ contactType: 'Email',
20
+ contactPoint: {
21
+ email: {
22
+ emailType: 'Home',
23
+ address: '',
24
+ },
25
+ },
26
+ partyIdList: {
27
+ partyId: [''],
28
+ },
29
+ },
30
+ }),
31
+ },
32
+ run(context) {
33
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
34
+ const contacts = client_1.cufxClient.asArray({ value: context.propsValue.contacts });
35
+ const body = yield client_1.cufxClient.sendMessage({
36
+ auth: context.auth,
37
+ entity: 'Contact',
38
+ operation: 'createOrUpdate',
39
+ payload: { contactList: { contact: contacts } },
40
+ });
41
+ return {
42
+ contacts: client_1.cufxClient.unwrapList({ body, entity: 'Contact' }),
43
+ raw: body,
44
+ };
45
+ });
46
+ },
47
+ });
48
+ //# sourceMappingURL=create-or-update-contact.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-or-update-contact.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-or-update-contact.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,kCAAmC;AACnC,6CAA8C;AAEjC,QAAA,qBAAqB,GAAG,IAAA,+BAAY,EAAC;IAC9C,IAAI,EAAE,eAAQ;IACd,IAAI,EAAE,0BAA0B;IAChC,WAAW,EAAE,0BAA0B;IACvC,WAAW,EAAE,yHAAyH;IACtI,KAAK,EAAE;QACH,QAAQ,EAAE,2BAAQ,CAAC,IAAI,CAAC;YACpB,WAAW,EAAE,mBAAmB;YAChC,WAAW,EAAE,6FAA6F;YAC1G,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE;gBACV,WAAW,EAAE,OAAO;gBACpB,YAAY,EAAE;oBACV,KAAK,EAAE;wBACH,SAAS,EAAE,MAAM;wBACjB,OAAO,EAAE,EAAE;qBACd;iBACJ;gBACD,WAAW,EAAE;oBACT,OAAO,EAAE,CAAC,EAAE,CAAC;iBAChB;aACJ;SACJ,CAAC;KACL;IACK,GAAG,CAAC,OAAO;;YACb,MAAM,QAAQ,GAAG,mBAAU,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC5E,MAAM,IAAI,GAAG,MAAM,mBAAU,CAAC,WAAW,CAAC;gBACtC,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,MAAM,EAAE,SAAS;gBACjB,SAAS,EAAE,gBAAgB;gBAC3B,OAAO,EAAE,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE;aAClD,CAAC,CAAC;YACH,OAAO;gBACH,QAAQ,EAAE,mBAAU,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;gBAC5D,GAAG,EAAE,IAAI;aACZ,CAAC;QACN,CAAC;KAAA;CACJ,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const createOrUpdateParty: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
+ parties: import("@activepieces/pieces-framework").JsonProperty<true>;
3
+ }>;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createOrUpdateParty = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../auth");
7
+ const client_1 = require("../common/client");
8
+ exports.createOrUpdateParty = (0, pieces_framework_1.createAction)({
9
+ auth: auth_1.cufxAuth,
10
+ name: 'create_or_update_party',
11
+ displayName: 'Create or Update Party',
12
+ description: 'Create or update one or more members/organizations (parties). Include a partyId to update an existing party.',
13
+ props: {
14
+ parties: pieces_framework_1.Property.Json({
15
+ displayName: 'Party Record(s)',
16
+ description: 'A CUFX Party object, or an array of them. Omit partyId to create; include it to update.',
17
+ required: true,
18
+ defaultValue: {
19
+ type: 'Individual',
20
+ characteristics: {
21
+ individual: {
22
+ firstName: '',
23
+ lastName: '',
24
+ },
25
+ },
26
+ },
27
+ }),
28
+ },
29
+ run(context) {
30
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
31
+ const parties = client_1.cufxClient.asArray({ value: context.propsValue.parties });
32
+ const body = yield client_1.cufxClient.sendMessage({
33
+ auth: context.auth,
34
+ entity: 'Party',
35
+ operation: 'createOrUpdate',
36
+ payload: { partyList: { party: parties } },
37
+ });
38
+ return {
39
+ parties: client_1.cufxClient.unwrapList({ body, entity: 'Party' }),
40
+ raw: body,
41
+ };
42
+ });
43
+ },
44
+ });
45
+ //# sourceMappingURL=create-or-update-party.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-or-update-party.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-or-update-party.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,kCAAmC;AACnC,6CAA8C;AAEjC,QAAA,mBAAmB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,eAAQ;IACd,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EAAE,wBAAwB;IACrC,WAAW,EAAE,8GAA8G;IAC3H,KAAK,EAAE;QACH,OAAO,EAAE,2BAAQ,CAAC,IAAI,CAAC;YACnB,WAAW,EAAE,iBAAiB;YAC9B,WAAW,EAAE,yFAAyF;YACtG,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE;gBACV,IAAI,EAAE,YAAY;gBAClB,eAAe,EAAE;oBACb,UAAU,EAAE;wBACR,SAAS,EAAE,EAAE;wBACb,QAAQ,EAAE,EAAE;qBACf;iBACJ;aACJ;SACJ,CAAC;KACL;IACK,GAAG,CAAC,OAAO;;YACb,MAAM,OAAO,GAAG,mBAAU,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC;YAC1E,MAAM,IAAI,GAAG,MAAM,mBAAU,CAAC,WAAW,CAAC;gBACtC,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,MAAM,EAAE,OAAO;gBACf,SAAS,EAAE,gBAAgB;gBAC3B,OAAO,EAAE,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;aAC7C,CAAC,CAAC;YACH,OAAO;gBACH,OAAO,EAAE,mBAAU,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;gBACzD,GAAG,EAAE,IAAI;aACZ,CAAC;QACN,CAAC;KAAA;CACJ,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const searchAccounts: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
+ accountIds: import("@activepieces/pieces-framework").ArrayProperty<false>;
3
+ partyIds: import("@activepieces/pieces-framework").ArrayProperty<false>;
4
+ accountTypes: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
5
+ }>;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.searchAccounts = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const shared_1 = require("@activepieces/shared");
7
+ const auth_1 = require("../auth");
8
+ const client_1 = require("../common/client");
9
+ exports.searchAccounts = (0, pieces_framework_1.createAction)({
10
+ auth: auth_1.cufxAuth,
11
+ name: 'search_accounts',
12
+ displayName: 'Search Accounts',
13
+ description: 'Read accounts by account ID, member (party) ID, or account type.',
14
+ props: {
15
+ accountIds: pieces_framework_1.Property.Array({
16
+ displayName: 'Account IDs',
17
+ description: 'Return only these account IDs. Leave empty to filter by the other fields.',
18
+ required: false,
19
+ }),
20
+ partyIds: pieces_framework_1.Property.Array({
21
+ displayName: 'Party IDs',
22
+ description: 'Return the accounts owned by these members (parties).',
23
+ required: false,
24
+ }),
25
+ accountTypes: pieces_framework_1.Property.StaticMultiSelectDropdown({
26
+ displayName: 'Account Types',
27
+ required: false,
28
+ options: {
29
+ options: [
30
+ { label: 'Checking', value: 'Checking' },
31
+ { label: 'Savings', value: 'Savings' },
32
+ { label: 'Loan', value: 'Loan' },
33
+ { label: 'Credit Card', value: 'CreditCard' },
34
+ { label: 'Line of Credit', value: 'LineOfCredit' },
35
+ ],
36
+ },
37
+ }),
38
+ },
39
+ run(context) {
40
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
41
+ const { accountIds, partyIds, accountTypes } = context.propsValue;
42
+ const accountFilter = Object.assign(Object.assign(Object.assign({}, (0, shared_1.spreadIfDefined)('accountIdList', client_1.cufxClient.valueList({ key: 'accountId', values: accountIds }))), (0, shared_1.spreadIfDefined)('partyIdList', client_1.cufxClient.valueList({ key: 'partyId', values: partyIds }))), (0, shared_1.spreadIfDefined)('accountTypeList', client_1.cufxClient.valueList({ key: 'accountType', values: accountTypes })));
43
+ const body = yield client_1.cufxClient.sendMessage({
44
+ auth: context.auth,
45
+ entity: 'Account',
46
+ operation: 'read',
47
+ payload: { accountFilter },
48
+ });
49
+ return {
50
+ accounts: client_1.cufxClient.unwrapList({ body, entity: 'Account' }),
51
+ raw: body,
52
+ };
53
+ });
54
+ },
55
+ });
56
+ //# sourceMappingURL=search-accounts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-accounts.js","sourceRoot":"","sources":["../../../../src/lib/actions/search-accounts.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,iDAAuD;AACvD,kCAAmC;AACnC,6CAA8C;AAEjC,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,eAAQ;IACd,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,kEAAkE;IAC/E,KAAK,EAAE;QACH,UAAU,EAAE,2BAAQ,CAAC,KAAK,CAAC;YACvB,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,2EAA2E;YACxF,QAAQ,EAAE,KAAK;SAClB,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,KAAK,CAAC;YACrB,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,uDAAuD;YACpE,QAAQ,EAAE,KAAK;SAClB,CAAC;QACF,YAAY,EAAE,2BAAQ,CAAC,yBAAyB,CAAC;YAC7C,WAAW,EAAE,eAAe;YAC5B,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE;gBACL,OAAO,EAAE;oBACL,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;oBACxC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;oBACtC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;oBAChC,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,YAAY,EAAE;oBAC7C,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc,EAAE;iBACrD;aACJ;SACJ,CAAC;KACL;IACK,GAAG,CAAC,OAAO;;YACb,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAClE,MAAM,aAAa,iDACZ,IAAA,wBAAe,EAAC,eAAe,EAAE,mBAAU,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,GAChG,IAAA,wBAAe,EAAC,aAAa,EAAE,mBAAU,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,GAC1F,IAAA,wBAAe,EAAC,iBAAiB,EAAE,mBAAU,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC,CAC5G,CAAC;YACF,MAAM,IAAI,GAAG,MAAM,mBAAU,CAAC,WAAW,CAAC;gBACtC,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,MAAM,EAAE,SAAS;gBACjB,SAAS,EAAE,MAAM;gBACjB,OAAO,EAAE,EAAE,aAAa,EAAE;aAC7B,CAAC,CAAC;YACH,OAAO;gBACH,QAAQ,EAAE,mBAAU,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;gBAC5D,GAAG,EAAE,IAAI;aACZ,CAAC;QACN,CAAC;KAAA;CACJ,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const searchContacts: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
+ contactIds: import("@activepieces/pieces-framework").ArrayProperty<false>;
3
+ partyIds: import("@activepieces/pieces-framework").ArrayProperty<false>;
4
+ accountIds: import("@activepieces/pieces-framework").ArrayProperty<false>;
5
+ contactTypes: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
6
+ }>;
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.searchContacts = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const shared_1 = require("@activepieces/shared");
7
+ const auth_1 = require("../auth");
8
+ const client_1 = require("../common/client");
9
+ exports.searchContacts = (0, pieces_framework_1.createAction)({
10
+ auth: auth_1.cufxAuth,
11
+ name: 'search_contacts',
12
+ displayName: 'Search Contacts',
13
+ description: 'Read contact points (addresses, phones, emails) by contact, party, account, or contact type.',
14
+ props: {
15
+ contactIds: pieces_framework_1.Property.Array({
16
+ displayName: 'Contact IDs',
17
+ description: 'Return only these contact IDs. Leave empty to filter by the other fields.',
18
+ required: false,
19
+ }),
20
+ partyIds: pieces_framework_1.Property.Array({
21
+ displayName: 'Party IDs',
22
+ description: 'Return the contacts belonging to these members (parties).',
23
+ required: false,
24
+ }),
25
+ accountIds: pieces_framework_1.Property.Array({
26
+ displayName: 'Account IDs',
27
+ description: 'Return the contacts associated with these accounts.',
28
+ required: false,
29
+ }),
30
+ contactTypes: pieces_framework_1.Property.StaticMultiSelectDropdown({
31
+ displayName: 'Contact Types',
32
+ required: false,
33
+ options: {
34
+ options: [
35
+ { label: 'Address', value: 'Address' },
36
+ { label: 'Phone', value: 'Phone' },
37
+ { label: 'Email', value: 'Email' },
38
+ { label: 'SMS', value: 'SMS' },
39
+ { label: 'Instant Messaging', value: 'InstantMessaging' },
40
+ { label: 'Social', value: 'Social' },
41
+ { label: 'Website', value: 'Website' },
42
+ { label: 'Other', value: 'Other' },
43
+ ],
44
+ },
45
+ }),
46
+ },
47
+ run(context) {
48
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
49
+ const { contactIds, partyIds, accountIds, contactTypes } = context.propsValue;
50
+ const contactFilter = Object.assign(Object.assign(Object.assign(Object.assign({}, (0, shared_1.spreadIfDefined)('contactIdList', client_1.cufxClient.valueList({ key: 'contactId', values: contactIds }))), (0, shared_1.spreadIfDefined)('partyIdList', client_1.cufxClient.valueList({ key: 'partyId', values: partyIds }))), (0, shared_1.spreadIfDefined)('accountIdList', client_1.cufxClient.valueList({ key: 'accountId', values: accountIds }))), (0, shared_1.spreadIfDefined)('contactTypeList', client_1.cufxClient.valueList({ key: 'contactType', values: contactTypes })));
51
+ const body = yield client_1.cufxClient.sendMessage({
52
+ auth: context.auth,
53
+ entity: 'Contact',
54
+ operation: 'read',
55
+ payload: { contactFilter },
56
+ });
57
+ return {
58
+ contacts: client_1.cufxClient.unwrapList({ body, entity: 'Contact' }),
59
+ raw: body,
60
+ };
61
+ });
62
+ },
63
+ });
64
+ //# sourceMappingURL=search-contacts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-contacts.js","sourceRoot":"","sources":["../../../../src/lib/actions/search-contacts.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,iDAAuD;AACvD,kCAAmC;AACnC,6CAA8C;AAEjC,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,eAAQ;IACd,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,8FAA8F;IAC3G,KAAK,EAAE;QACH,UAAU,EAAE,2BAAQ,CAAC,KAAK,CAAC;YACvB,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,2EAA2E;YACxF,QAAQ,EAAE,KAAK;SAClB,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,KAAK,CAAC;YACrB,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,2DAA2D;YACxE,QAAQ,EAAE,KAAK;SAClB,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,KAAK,CAAC;YACvB,WAAW,EAAE,aA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E,UAAU,EAAE,CAAC,CAAC,GAChG,IAAA,wBAAe,EAAC,iBAAiB,EAAE,mBAAU,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC,CAC5G,CAAC;YACF,MAAM,IAAI,GAAG,MAAM,mBAAU,CAAC,WAAW,CAAC;gBACtC,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,MAAM,EAAE,SAAS;gBACjB,SAAS,EAAE,MAAM;gBACjB,OAAO,EAAE,EAAE,aAAa,EAAE;aAC7B,CAAC,CAAC;YACH,OAAO;gBACH,QAAQ,EAAE,mBAAU,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;gBAC5D,GAAG,EAAE,IAAI;aACZ,CAAC;QACN,CAAC;KAAA;CACJ,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const searchParties: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
+ partyIds: import("@activepieces/pieces-framework").ArrayProperty<false>;
3
+ taxIds: import("@activepieces/pieces-framework").ArrayProperty<false>;
4
+ accountIds: import("@activepieces/pieces-framework").ArrayProperty<false>;
5
+ partyTypes: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
6
+ }>;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.searchParties = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const shared_1 = require("@activepieces/shared");
7
+ const auth_1 = require("../auth");
8
+ const client_1 = require("../common/client");
9
+ exports.searchParties = (0, pieces_framework_1.createAction)({
10
+ auth: auth_1.cufxAuth,
11
+ name: 'search_parties',
12
+ displayName: 'Search Parties',
13
+ description: 'Read members and organizations (parties) by ID, tax ID, account, or party type.',
14
+ props: {
15
+ partyIds: pieces_framework_1.Property.Array({
16
+ displayName: 'Party IDs',
17
+ description: 'Return only these party IDs. Leave empty to filter by the other fields.',
18
+ required: false,
19
+ }),
20
+ taxIds: pieces_framework_1.Property.Array({
21
+ displayName: 'Tax IDs',
22
+ description: 'SSN, TIN, or EIN values to match, digits only.',
23
+ required: false,
24
+ }),
25
+ accountIds: pieces_framework_1.Property.Array({
26
+ displayName: 'Account IDs',
27
+ description: 'Return the parties associated with these accounts.',
28
+ required: false,
29
+ }),
30
+ partyTypes: pieces_framework_1.Property.StaticMultiSelectDropdown({
31
+ displayName: 'Party Types',
32
+ required: false,
33
+ options: {
34
+ options: ['Individual', 'Organization', 'Trust', 'Estate'].map((value) => ({ label: value, value })),
35
+ },
36
+ }),
37
+ },
38
+ run(context) {
39
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
40
+ const { partyIds, taxIds, accountIds, partyTypes } = context.propsValue;
41
+ const partyFilter = Object.assign(Object.assign(Object.assign(Object.assign({}, (0, shared_1.spreadIfDefined)('partyIdList', client_1.cufxClient.valueList({ key: 'partyId', values: partyIds }))), (0, shared_1.spreadIfDefined)('taxIdList', client_1.cufxClient.valueList({ key: 'taxId', values: taxIds }))), (0, shared_1.spreadIfDefined)('accountIdList', client_1.cufxClient.valueList({ key: 'accountId', values: accountIds }))), (0, shared_1.spreadIfDefined)('partyTypeList', client_1.cufxClient.valueList({ key: 'partyType', values: partyTypes })));
42
+ const body = yield client_1.cufxClient.sendMessage({
43
+ auth: context.auth,
44
+ entity: 'Party',
45
+ operation: 'read',
46
+ payload: { partyFilter },
47
+ });
48
+ return {
49
+ parties: client_1.cufxClient.unwrapList({ body, entity: 'Party' }),
50
+ raw: body,
51
+ };
52
+ });
53
+ },
54
+ });
55
+ //# sourceMappingURL=search-parties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-parties.js","sourceRoot":"","sources":["../../../../src/lib/actions/search-parties.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,i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U,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,GACpF,IAAA,wBAAe,EAAC,eAAe,EAAE,mBAAU,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,GAChG,IAAA,wBAAe,EAAC,eAAe,EAAE,mBAAU,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,CACtG,CAAC;YACF,MAAM,IAAI,GAAG,MAAM,mBAAU,CAAC,WAAW,CAAC;gBACtC,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,MAAM,EAAE,OAAO;gBACf,SAAS,EAAE,MAAM;gBACjB,OAAO,EAAE,EAAE,WAAW,EAAE;aAC3B,CAAC,CAAC;YACH,OAAO;gBACH,OAAO,EAAE,mBAAU,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;gBACzD,GAAG,EAAE,IAAI;aACZ,CAAC;QACN,CAAC;KAAA;CACJ,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare const searchTransactions: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
2
+ accountIds: import("@activepieces/pieces-framework").ArrayProperty<false>;
3
+ transactionType: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
4
+ startDateTime: import("@activepieces/pieces-framework").DateTimeProperty<false>;
5
+ endDateTime: import("@activepieces/pieces-framework").DateTimeProperty<false>;
6
+ minAmount: import("@activepieces/pieces-framework").NumberProperty<false>;
7
+ maxAmount: import("@activepieces/pieces-framework").NumberProperty<false>;
8
+ descriptionContains: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
+ }>;
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.searchTransactions = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const shared_1 = require("@activepieces/shared");
7
+ const auth_1 = require("../auth");
8
+ const client_1 = require("../common/client");
9
+ exports.searchTransactions = (0, pieces_framework_1.createAction)({
10
+ auth: auth_1.cufxAuth,
11
+ name: 'search_transactions',
12
+ displayName: 'Search Transactions',
13
+ description: 'Read transactions by account, posted date range, amount range, type, or description.',
14
+ props: {
15
+ accountIds: pieces_framework_1.Property.Array({
16
+ displayName: 'Account IDs',
17
+ description: 'Return transactions for these accounts.',
18
+ required: false,
19
+ }),
20
+ transactionType: pieces_framework_1.Property.StaticDropdown({
21
+ displayName: 'Transaction Type',
22
+ required: false,
23
+ options: {
24
+ options: [
25
+ { label: 'Debit', value: 'Debit' },
26
+ { label: 'Credit', value: 'Credit' },
27
+ ],
28
+ },
29
+ }),
30
+ startDateTime: pieces_framework_1.Property.DateTime({
31
+ displayName: 'Posted After',
32
+ description: 'Return transactions posted on or after this date/time (UTC).',
33
+ required: false,
34
+ }),
35
+ endDateTime: pieces_framework_1.Property.DateTime({
36
+ displayName: 'Posted Before',
37
+ description: 'Return transactions posted on or before this date/time (UTC).',
38
+ required: false,
39
+ }),
40
+ minAmount: pieces_framework_1.Property.Number({
41
+ displayName: 'Minimum Amount',
42
+ required: false,
43
+ }),
44
+ maxAmount: pieces_framework_1.Property.Number({
45
+ displayName: 'Maximum Amount',
46
+ required: false,
47
+ }),
48
+ descriptionContains: pieces_framework_1.Property.ShortText({
49
+ displayName: 'Description Contains',
50
+ description: 'Return transactions whose description contains this text.',
51
+ required: false,
52
+ }),
53
+ },
54
+ run(context) {
55
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
56
+ const { accountIds, transactionType, startDateTime, endDateTime, minAmount, maxAmount, descriptionContains } = context.propsValue;
57
+ const dateRange = Object.assign(Object.assign({}, (0, shared_1.spreadIfDefined)('startDateTime', startDateTime)), (0, shared_1.spreadIfDefined)('endDateTime', endDateTime));
58
+ const transactionFilter = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0, shared_1.spreadIfDefined)('accountIdList', client_1.cufxClient.valueList({ key: 'accountId', values: accountIds }))), (0, shared_1.spreadIfDefined)('transactionType', transactionType)), (Object.keys(dateRange).length > 0 ? { transactionPostedDateRange: dateRange } : {})), (0, shared_1.spreadIfDefined)('transactionMinAmount', (0, shared_1.isNil)(minAmount) ? undefined : { value: minAmount })), (0, shared_1.spreadIfDefined)('transactionMaxAmount', (0, shared_1.isNil)(maxAmount) ? undefined : { value: maxAmount })), (0, shared_1.spreadIfDefined)('descriptionContains', descriptionContains));
59
+ const body = yield client_1.cufxClient.sendMessage({
60
+ auth: context.auth,
61
+ entity: 'Transaction',
62
+ operation: 'read',
63
+ payload: { transactionFilter },
64
+ });
65
+ return {
66
+ transactions: client_1.cufxClient.unwrapList({ body, entity: 'Transaction' }),
67
+ raw: body,
68
+ };
69
+ });
70
+ },
71
+ });
72
+ //# sourceMappingURL=search-transactions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-transactions.js","sourceRoot":"","sources":["../../../../src/lib/actions/search-transactions.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,iDAA8D;AAC9D,kCAAmC;AACnC,6CAA8C;AAEjC,QAAA,kBAAkB,GAAG,IAAA,+BAAY,EAAC;IAC3C,IAAI,EAAE,eAAQ;IACd,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,sFAAsF;IACnG,KAAK,EAAE;QACH,UAAU,EAAE,2BAAQ,CAAC,KAAK,CAAC;YACvB,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,yCAAyC;YACtD,QAAQ,EAAE,KAAK;SAClB,CAAC;QACF,eAAe,EAAE,2BAAQ,CAAC,cAAc,CAAC;YACrC,WAAW,EAAE,kBAAkB;YAC/B,QAAQ,EAAE,KAAK;YACf,O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CAAC,CAAC,GAChG,IAAA,wBAAe,EAAC,iBAAiB,EAAE,eAAe,CAAC,GACnD,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,0BAA0B,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GACpF,IAAA,wBAAe,EAAC,sBAAsB,EAAE,IAAA,cAAK,EAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,GAC5F,IAAA,wBAAe,EAAC,sBAAsB,EAAE,IAAA,cAAK,EAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,GAC5F,IAAA,wBAAe,EAAC,qBAAqB,EAAE,mBAAmB,CAAC,CACjE,CAAC;YACF,MAAM,IAAI,GAAG,MAAM,mBAAU,CAAC,WAAW,CAAC;gBACtC,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,MAAM,EAAE,aAAa;gBACrB,SAAS,EAAE,MAAM;gBACjB,OAAO,EAAE,EAAE,iBAAiB,EAAE;aACjC,CAAC,CAAC;YACH,OAAO;gBACH,YAAY,EAAE,mBAAU,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC;gBACpE,GAAG,EAAE,IAAI;aACZ,CAAC;QACN,CAAC;KAAA;CACJ,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { CufxOperation } from '../common/client';
2
+ export declare const sendCufxMessage: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
3
+ entity: import("@activepieces/pieces-framework").StaticDropdownProperty<"AccessProfile" | "Account" | "Activity" | "App" | "Application" | "Artifact" | "Bill" | "BillPayee" | "BillPaymentOccurrence" | "BillPaymentRecurring" | "Card" | "Category" | "Collateral" | "Configuration" | "Contact" | "CredentialGroup" | "CreditReport" | "Deposit" | "DepositFunding" | "Document" | "EligibilityRequirement" | "FeeSchedule" | "Field" | "FinancialInstitution" | "Hold" | "Investment" | "InvestmentHolding" | "Loan" | "LoanDisbursement" | "Location" | "MicroDepositFunding" | "NetworkNode" | "Note" | "OverdraftPriority" | "Party" | "PartyAssociation" | "PermissionList" | "Preference" | "ProductOffering" | "ProductServiceEnrollment" | "ProductServiceRequest" | "RegisteredDevice" | "Relationship" | "RemoteDeposit" | "SecureMessage" | "SimpleValidationRequest" | "SystemStatus" | "Transaction" | "TransferOccurrence" | "TransferRecurring" | "User" | "Wire", true>;
4
+ operation: import("@activepieces/pieces-framework").StaticDropdownProperty<CufxOperation, true>;
5
+ payload: import("@activepieces/pieces-framework").JsonProperty<false>;
6
+ }>;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sendCufxMessage = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../auth");
7
+ const client_1 = require("../common/client");
8
+ const OPERATION_OPTIONS = [
9
+ { label: 'Read / Search', value: 'read' },
10
+ { label: 'Create or Update', value: 'createOrUpdate' },
11
+ { label: 'Delete', value: 'delete' },
12
+ ];
13
+ exports.sendCufxMessage = (0, pieces_framework_1.createAction)({
14
+ auth: auth_1.cufxAuth,
15
+ name: 'send_cufx_message',
16
+ displayName: 'Send CUFX Message',
17
+ description: 'Call any of the 52 CUFX message endpoints with a raw message payload.',
18
+ props: {
19
+ entity: pieces_framework_1.Property.StaticDropdown({
20
+ displayName: 'Entity',
21
+ description: 'The CUFX message endpoint to call, e.g. Account calls /AccountMessage.',
22
+ required: true,
23
+ options: {
24
+ options: client_1.CUFX_ENTITIES.map((entity) => ({
25
+ label: entity.replace(/([a-z])([A-Z])/g, '$1 $2'),
26
+ value: entity,
27
+ })),
28
+ },
29
+ }),
30
+ operation: pieces_framework_1.Property.StaticDropdown({
31
+ displayName: 'Operation',
32
+ required: true,
33
+ defaultValue: 'read',
34
+ options: {
35
+ options: OPERATION_OPTIONS,
36
+ },
37
+ }),
38
+ payload: pieces_framework_1.Property.Json({
39
+ displayName: 'Message Payload',
40
+ description: 'The message content without the outer envelope — e.g. `{ "accountFilter": { "accountIdList": { "accountId": ["12345"] } } }`. The messageContext is injected from the connection automatically; include a `messageContext` key here to override individual fields.',
41
+ required: false,
42
+ defaultValue: {},
43
+ }),
44
+ },
45
+ run(context) {
46
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
47
+ const { entity, operation, payload } = context.propsValue;
48
+ if (payload !== undefined && !client_1.cufxClient.isRecord(payload)) {
49
+ throw new Error('Message Payload must be a JSON object.');
50
+ }
51
+ return client_1.cufxClient.sendMessage({
52
+ auth: context.auth,
53
+ entity,
54
+ operation,
55
+ payload,
56
+ });
57
+ });
58
+ },
59
+ });
60
+ //# sourceMappingURL=send-cufx-message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send-cufx-message.js","sourceRoot":"","sources":["../../../../src/lib/actions/send-cufx-message.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,kCAAmC;AACnC,6CAA4E;AAE5E,MAAM,iBAAiB,GAA8C;IACjE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,EAAE;IACzC,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACtD,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;CACvC,CAAC;AAEW,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IACxC,IAAI,EAAE,eAAQ;IACd,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE,uEAAuE;IACpF,KAAK,EAAE;QACH,MAAM,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC5B,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,wEAAwE;YACrF,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACL,OAAO,EAAE,sBAAa,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;oBACpC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC;oBACjD,KAAK,EAAE,MAAM;iBAChB,CAAC,CAAC;aACN;SACJ,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC/B,WAAW,EAAE,WAAW;YACxB,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,MAAM;YACpB,OAAO,EAAE;gBACL,OAAO,EAAE,iBAAiB;aAC7B;SACJ,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,IAAI,CAAC;YACnB,WAAW,EAAE,iBAAiB;YAC9B,WAAW,EAAE,oQAAoQ;YACjR,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,EAAE;SACnB,CAAC;KACL;IACK,GAAG,CAAC,OAAO;;YACb,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAC1D,IAAI,OAAO,KAAK,SAAS,IAAI,CAAC,mBAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;gBACzD,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;YAC9D,CAAC;YACD,OAAO,mBAAU,CAAC,WAAW,CAAC;gBAC1B,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,MAAM;gBACN,SAAS;gBACT,OAAO;aACV,CAAC,CAAC;QACP,CAAC;KAAA;CACJ,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const cufxAuth: import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.cufxAuth = void 0;
4
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
5
+ const shared_1 = require("@activepieces/shared");
6
+ exports.cufxAuth = pieces_framework_1.PieceAuth.OAuth2({
7
+ description: `Connect to a CUFX 5.0 (Credit Union Financial eXchange) deployment using OAuth2 client credentials.
8
+
9
+ 1. **API Base URL** — the root URL of your CUFX service. Message endpoints such as \`/AccountMessage\` are appended automatically.
10
+ 2. **Token URL** — the OAuth2 token endpoint that issues client-credentials access tokens for the deployment.
11
+ 3. **Client ID / Client Secret** — the credentials issued by your financial institution or vendor gateway.
12
+ 4. The remaining fields are optional deployment identifiers. When provided they are stamped into the \`messageContext\` of every request.`,
13
+ required: true,
14
+ grantType: shared_1.OAuth2GrantType.CLIENT_CREDENTIALS,
15
+ authUrl: '',
16
+ tokenUrl: '{tokenUrl}',
17
+ scope: [],
18
+ props: {
19
+ baseUrl: pieces_framework_1.Property.ShortText({
20
+ displayName: 'API Base URL',
21
+ description: 'Root URL of the CUFX service, without a trailing message segment, e.g. https://api.mycu.example.com/cufx/v5.',
22
+ required: true,
23
+ }),
24
+ tokenUrl: pieces_framework_1.Property.ShortText({
25
+ displayName: 'Token URL',
26
+ description: 'OAuth2 token endpoint for the client-credentials grant.',
27
+ required: true,
28
+ }),
29
+ fiId: pieces_framework_1.Property.ShortText({
30
+ displayName: 'Financial Institution ID (fiId)',
31
+ description: 'Identifies the financial institution in multi-tenant deployments. Leave empty if not required.',
32
+ required: false,
33
+ }),
34
+ vendorId: pieces_framework_1.Property.ShortText({
35
+ displayName: 'Vendor ID',
36
+ description: 'Vendor identifier assigned by the financial institution, if required.',
37
+ required: false,
38
+ }),
39
+ appId: pieces_framework_1.Property.ShortText({
40
+ displayName: 'App ID',
41
+ description: 'Application identifier, if required by the deployment.',
42
+ required: false,
43
+ }),
44
+ dataSourceId: pieces_framework_1.Property.ShortText({
45
+ displayName: 'Data Source ID',
46
+ description: 'Identifies a registered data source (e.g. core vs. card processor), if required.',
47
+ required: false,
48
+ }),
49
+ },
50
+ });
51
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":";;;AAAA,qEAAqE;AACrE,iDAAuD;AAE1C,QAAA,QAAQ,GAAG,4BAAS,CAAC,MAAM,CAAC;IACrC,WAAW,EAAE;;;;;0IAKyH;IACtI,QAAQ,EAAE,IAAI;IACd,SAAS,EAAE,wBAAe,CAAC,kBAAkB;IAC7C,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE,YAAY;IACtB,KAAK,EAAE,EAAE;IACT,KAAK,EAAE;QACH,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,8GAA8G;YAC3H,QAAQ,EAAE,IAAI;SACjB,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,yDAAyD;YACtE,QAAQ,EAAE,IAAI;SACjB,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACrB,WAAW,EAAE,iCAAiC;YAC9C,WAAW,EAAE,gGAAgG;YAC7G,QAAQ,EAAE,KAAK;SAClB,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,uEAAuE;YACpF,QAAQ,EAAE,KAAK;SAClB,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACtB,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,wDAAwD;YACrE,QAAQ,EAAE,KAAK;SAClB,CAAC;QACF,YAAY,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,gBAAgB;YAC7B,WAAW,EAAE,kFAAkF;YAC/F,QAAQ,EAAE,KAAK;SAClB,CAAC;KACL;CACJ,CAAC,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { PiecePropValueSchema } from '@activepieces/pieces-framework';
2
+ import { cufxAuth } from '../auth';
3
+ declare function isRecord(value: unknown): value is Record<string, unknown>;
4
+ declare function sendMessage({ auth, entity, operation, payload }: {
5
+ auth: CufxAuthValue;
6
+ entity: CufxEntity;
7
+ operation: CufxOperation;
8
+ payload?: Record<string, unknown>;
9
+ }): Promise<Record<string, unknown>>;
10
+ declare function asArray<T>({ value }: {
11
+ value: T | T[] | undefined | null;
12
+ }): T[];
13
+ declare function unwrapList({ body, entity }: {
14
+ body: Record<string, unknown>;
15
+ entity: CufxEntity;
16
+ }): unknown[];
17
+ declare function valueList({ key, values }: {
18
+ key: string;
19
+ values: unknown[] | undefined;
20
+ }): Record<string, string[]> | undefined;
21
+ export declare const cufxClient: {
22
+ sendMessage: typeof sendMessage;
23
+ unwrapList: typeof unwrapList;
24
+ valueList: typeof valueList;
25
+ asArray: typeof asArray;
26
+ isRecord: typeof isRecord;
27
+ };
28
+ export declare const CUFX_ENTITIES: readonly ["AccessProfile", "Account", "Activity", "App", "Application", "Artifact", "Bill", "BillPayee", "BillPaymentOccurrence", "BillPaymentRecurring", "Card", "Category", "Collateral", "Configuration", "Contact", "CredentialGroup", "CreditReport", "Deposit", "DepositFunding", "Document", "EligibilityRequirement", "FeeSchedule", "Field", "FinancialInstitution", "Hold", "Investment", "InvestmentHolding", "Loan", "LoanDisbursement", "Location", "MicroDepositFunding", "NetworkNode", "Note", "OverdraftPriority", "Party", "PartyAssociation", "PermissionList", "Preference", "ProductOffering", "ProductServiceEnrollment", "ProductServiceRequest", "RegisteredDevice", "Relationship", "RemoteDeposit", "SecureMessage", "SimpleValidationRequest", "SystemStatus", "Transaction", "TransferOccurrence", "TransferRecurring", "User", "Wire"];
29
+ export type CufxEntity = typeof CUFX_ENTITIES[number];
30
+ export type CufxOperation = 'read' | 'createOrUpdate' | 'delete';
31
+ type CufxAuthValue = PiecePropValueSchema<typeof cufxAuth>;
32
+ export {};
@@ -0,0 +1,128 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CUFX_ENTITIES = exports.cufxClient = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_common_1 = require("@activepieces/pieces-common");
6
+ const shared_1 = require("@activepieces/shared");
7
+ function isRecord(value) {
8
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
9
+ }
10
+ function camel({ entity }) {
11
+ return entity.charAt(0).toLowerCase() + entity.slice(1);
12
+ }
13
+ function buildMessageContext({ auth }) {
14
+ var _a, _b, _c, _d;
15
+ return Object.assign(Object.assign(Object.assign(Object.assign({ cufxVersion: '5.0.0' }, (0, shared_1.spreadIfDefined)('fiId', (_a = auth.props) === null || _a === void 0 ? void 0 : _a['fiId'])), (0, shared_1.spreadIfDefined)('vendorId', (_b = auth.props) === null || _b === void 0 ? void 0 : _b['vendorId'])), (0, shared_1.spreadIfDefined)('appId', (_c = auth.props) === null || _c === void 0 ? void 0 : _c['appId'])), (0, shared_1.spreadIfDefined)('dataSourceId', (_d = auth.props) === null || _d === void 0 ? void 0 : _d['dataSourceId']));
16
+ }
17
+ function sendMessage(_a) {
18
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, entity, operation, payload }) {
19
+ var _b, _c;
20
+ const baseUrl = ((_c = (_b = auth.props) === null || _b === void 0 ? void 0 : _b['baseUrl']) !== null && _c !== void 0 ? _c : '').replace(/\/+$/, '');
21
+ if (!baseUrl) {
22
+ throw new Error('The CUFX connection is missing the API Base URL.');
23
+ }
24
+ const _d = payload !== null && payload !== void 0 ? payload : {}, { messageContext } = _d, messageBody = tslib_1.__rest(_d, ["messageContext"]);
25
+ const body = {
26
+ [`${camel({ entity })}Message`]: Object.assign({ messageContext: Object.assign(Object.assign({}, buildMessageContext({ auth })), (isRecord(messageContext) ? messageContext : {})) }, messageBody),
27
+ };
28
+ // CUFX REST semantics: POST = read (filter in body), PUT = create/update,
29
+ // and X-HTTP-METHOD-OVERRIDE expresses GET/DELETE where proxies block them
30
+ const response = yield pieces_common_1.httpClient.sendRequest({
31
+ method: operation === 'read' ? pieces_common_1.HttpMethod.POST : pieces_common_1.HttpMethod.PUT,
32
+ url: `${baseUrl}/${entity}Message`,
33
+ headers: Object.assign(Object.assign({}, (operation === 'read' ? { 'X-HTTP-METHOD-OVERRIDE': 'GET' } : {})), (operation === 'delete' ? { 'X-HTTP-METHOD-OVERRIDE': 'DELETE' } : {})),
34
+ authentication: {
35
+ type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
36
+ token: auth.access_token,
37
+ },
38
+ body,
39
+ });
40
+ return isRecord(response.body) ? response.body : {};
41
+ });
42
+ }
43
+ function asArray({ value }) {
44
+ if (value === undefined || value === null) {
45
+ return [];
46
+ }
47
+ return Array.isArray(value) ? value : [value];
48
+ }
49
+ function unwrapList({ body, entity }) {
50
+ const message = body[`${camel({ entity })}Message`];
51
+ if (!isRecord(message)) {
52
+ return [];
53
+ }
54
+ const list = message[`${camel({ entity })}List`];
55
+ if (!isRecord(list)) {
56
+ return [];
57
+ }
58
+ return asArray({ value: list[camel({ entity })] });
59
+ }
60
+ function valueList({ key, values }) {
61
+ const cleaned = (values !== null && values !== void 0 ? values : []).map((value) => String(value).trim()).filter((value) => value.length > 0);
62
+ if (cleaned.length === 0) {
63
+ return undefined;
64
+ }
65
+ return { [key]: cleaned };
66
+ }
67
+ exports.cufxClient = {
68
+ sendMessage,
69
+ unwrapList,
70
+ valueList,
71
+ asArray,
72
+ isRecord,
73
+ };
74
+ exports.CUFX_ENTITIES = [
75
+ 'AccessProfile',
76
+ 'Account',
77
+ 'Activity',
78
+ 'App',
79
+ 'Application',
80
+ 'Artifact',
81
+ 'Bill',
82
+ 'BillPayee',
83
+ 'BillPaymentOccurrence',
84
+ 'BillPaymentRecurring',
85
+ 'Card',
86
+ 'Category',
87
+ 'Collateral',
88
+ 'Configuration',
89
+ 'Contact',
90
+ 'CredentialGroup',
91
+ 'CreditReport',
92
+ 'Deposit',
93
+ 'DepositFunding',
94
+ 'Document',
95
+ 'EligibilityRequirement',
96
+ 'FeeSchedule',
97
+ 'Field',
98
+ 'FinancialInstitution',
99
+ 'Hold',
100
+ 'Investment',
101
+ 'InvestmentHolding',
102
+ 'Loan',
103
+ 'LoanDisbursement',
104
+ 'Location',
105
+ 'MicroDepositFunding',
106
+ 'NetworkNode',
107
+ 'Note',
108
+ 'OverdraftPriority',
109
+ 'Party',
110
+ 'PartyAssociation',
111
+ 'PermissionList',
112
+ 'Preference',
113
+ 'ProductOffering',
114
+ 'ProductServiceEnrollment',
115
+ 'ProductServiceRequest',
116
+ 'RegisteredDevice',
117
+ 'Relationship',
118
+ 'RemoteDeposit',
119
+ 'SecureMessage',
120
+ 'SimpleValidationRequest',
121
+ 'SystemStatus',
122
+ 'Transaction',
123
+ 'TransferOccurrence',
124
+ 'TransferRecurring',
125
+ 'User',
126
+ 'Wire',
127
+ ];
128
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/lib/common/client.ts"],"names":[],"mappings":";;;;AAAA,+DAAyF;AAEzF,iDAAuD;AAGvD,SAAS,QAAQ,CAAC,KAAc;IAC5B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAChF,CAAC;AAED,SAAS,KAAK,CAAC,EAAE,MAAM,EAA0B;IAC7C,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC5D,CAAC;AAED,SAAS,mBAAmB,CAAC,EAAE,IAAI,EAA2B;;IAC1D,iEACI,WAAW,EAAE,OAAO,IACjB,IAAA,wBAAe,EAAC,MAAM,EAAE,MAAA,IAAI,CAAC,KAAK,0CAAG,MAAM,CAAC,CAAC,GAC7C,IAAA,wB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