@vqnguyen1/piece-jxchange 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 (34) hide show
  1. package/package.json +10 -0
  2. package/src/index.d.ts +11 -0
  3. package/src/index.js +33 -0
  4. package/src/index.js.map +1 -0
  5. package/src/lib/actions/account-history-search.d.ts +19 -0
  6. package/src/lib/actions/account-history-search.js +67 -0
  7. package/src/lib/actions/account-history-search.js.map +1 -0
  8. package/src/lib/actions/account-inquiry.d.ts +14 -0
  9. package/src/lib/actions/account-inquiry.js +39 -0
  10. package/src/lib/actions/account-inquiry.js.map +1 -0
  11. package/src/lib/actions/call-operation.d.ts +18 -0
  12. package/src/lib/actions/call-operation.js +74 -0
  13. package/src/lib/actions/call-operation.js.map +1 -0
  14. package/src/lib/actions/customer-inquiry.d.ts +13 -0
  15. package/src/lib/actions/customer-inquiry.js +38 -0
  16. package/src/lib/actions/customer-inquiry.js.map +1 -0
  17. package/src/lib/actions/customer-search.d.ts +20 -0
  18. package/src/lib/actions/customer-search.js +84 -0
  19. package/src/lib/actions/customer-search.js.map +1 -0
  20. package/src/lib/actions/internal-transfer.d.ts +18 -0
  21. package/src/lib/actions/internal-transfer.js +59 -0
  22. package/src/lib/actions/internal-transfer.js.map +1 -0
  23. package/src/lib/actions/ping.d.ts +13 -0
  24. package/src/lib/actions/ping.js +31 -0
  25. package/src/lib/actions/ping.js.map +1 -0
  26. package/src/lib/auth.d.ts +11 -0
  27. package/src/lib/auth.js +62 -0
  28. package/src/lib/auth.js.map +1 -0
  29. package/src/lib/common/client.d.ts +50 -0
  30. package/src/lib/common/client.js +159 -0
  31. package/src/lib/common/client.js.map +1 -0
  32. package/src/lib/common/props.d.ts +11 -0
  33. package/src/lib/common/props.js +28 -0
  34. package/src/lib/common/props.js.map +1 -0
package/package.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@vqnguyen1/piece-jxchange",
3
+ "version": "0.0.1",
4
+ "main": "./src/index.js",
5
+ "types": "./src/index.d.ts",
6
+ "dependencies": {
7
+ "fast-xml-parser": "5.7.0",
8
+ "tslib": "2.6.2"
9
+ }
10
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ export declare const jxchange: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ gatewayUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ username: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
+ password: import("@activepieces/pieces-framework").SecretTextProperty<true>;
5
+ instRtId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
6
+ instEnv: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ validConsmName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
8
+ validConsmProd: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
+ auditUsrId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
10
+ auditWsId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
11
+ }>>;
package/src/index.js ADDED
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.jxchange = void 0;
4
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
5
+ const shared_1 = require("@activepieces/shared");
6
+ const account_history_search_1 = require("./lib/actions/account-history-search");
7
+ const account_inquiry_1 = require("./lib/actions/account-inquiry");
8
+ const call_operation_1 = require("./lib/actions/call-operation");
9
+ const customer_inquiry_1 = require("./lib/actions/customer-inquiry");
10
+ const customer_search_1 = require("./lib/actions/customer-search");
11
+ const internal_transfer_1 = require("./lib/actions/internal-transfer");
12
+ const ping_1 = require("./lib/actions/ping");
13
+ const auth_1 = require("./lib/auth");
14
+ exports.jxchange = (0, pieces_framework_1.createPiece)({
15
+ displayName: 'Jack Henry jXchange',
16
+ description: 'Core banking via the Jack Henry jXchange Third Party Gateway — customers, accounts, transactions, and 600+ SOAP operations.',
17
+ minimumSupportedRelease: '0.36.1',
18
+ logoUrl: 'https://cdn.activepieces.com/pieces/jxchange.png',
19
+ categories: [shared_1.PieceCategory.PAYMENT_PROCESSING, shared_1.PieceCategory.ACCOUNTING],
20
+ auth: auth_1.jxchangeAuth,
21
+ authors: ['vqnguyen1'],
22
+ actions: [
23
+ ping_1.ping,
24
+ customer_search_1.customerSearch,
25
+ customer_inquiry_1.customerInquiry,
26
+ account_inquiry_1.accountInquiry,
27
+ account_history_search_1.accountHistorySearch,
28
+ internal_transfer_1.internalTransfer,
29
+ call_operation_1.callOperation,
30
+ ],
31
+ triggers: [],
32
+ });
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,qEAA6D;AAC7D,iDAAqD;AACrD,iFAA4E;AAC5E,mEAA+D;AAC/D,iEAA6D;AAC7D,qEAAiE;AACjE,mEAA+D;AAC/D,uEAAmE;AACnE,6CAA0C;AAC1C,qCAA0C;AAE7B,QAAA,QAAQ,GAAG,IAAA,8BAAW,EAAC;IAChC,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,6HAA6H;IAC1I,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,kDAAkD;IAC3D,UAAU,EAAE,CAAC,sBAAa,CAAC,kBAAkB,EAAE,sBAAa,CAAC,UAAU,CAAC;IACxE,IAAI,EAAE,mBAAY;IAClB,OAAO,EAAE,CAAC,WAAW,CAAC;IACtB,OAAO,EAAE;QACL,WAAI;QACJ,gCAAc;QACd,kCAAe;QACf,gCAAc;QACd,6CAAoB;QACpB,oCAAgB;QAChB,8BAAa;KAChB;IACD,QAAQ,EAAE,EAAE;CACf,CAAC,CAAC"}
@@ -0,0 +1,19 @@
1
+ export declare const accountHistorySearch: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ gatewayUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ username: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
+ password: import("@activepieces/pieces-framework").SecretTextProperty<true>;
5
+ instRtId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
6
+ instEnv: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ validConsmName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
8
+ validConsmProd: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
+ auditUsrId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
10
+ auditWsId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
11
+ }>, {
12
+ acctId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
13
+ acctType: import("@activepieces/pieces-framework").ShortTextProperty<true>;
14
+ startDate: import("@activepieces/pieces-framework").ShortTextProperty<false>;
15
+ endDate: import("@activepieces/pieces-framework").ShortTextProperty<false>;
16
+ lowAmount: import("@activepieces/pieces-framework").NumberProperty<false>;
17
+ highAmount: import("@activepieces/pieces-framework").NumberProperty<false>;
18
+ maxRecords: import("@activepieces/pieces-framework").NumberProperty<false>;
19
+ }>;
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.accountHistorySearch = 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 props_1 = require("../common/props");
9
+ exports.accountHistorySearch = (0, pieces_framework_1.createAction)({
10
+ auth: auth_1.jxchangeAuth,
11
+ name: 'account_history_search',
12
+ displayName: 'Search Account History',
13
+ description: 'List transactions posted to an account, filterable by date and amount (AcctHistSrch).',
14
+ props: {
15
+ acctId: pieces_framework_1.Property.ShortText({
16
+ displayName: 'Account Number',
17
+ required: true,
18
+ }),
19
+ acctType: props_1.jxProps.acctTypeText({ displayName: 'Account Type' }),
20
+ startDate: pieces_framework_1.Property.ShortText({
21
+ displayName: 'Start Date',
22
+ description: 'Earliest posting date to include, format YYYY-MM-DD.',
23
+ required: false,
24
+ }),
25
+ endDate: pieces_framework_1.Property.ShortText({
26
+ displayName: 'End Date',
27
+ description: 'Latest posting date to include, format YYYY-MM-DD.',
28
+ required: false,
29
+ }),
30
+ lowAmount: pieces_framework_1.Property.Number({
31
+ displayName: 'Minimum Amount',
32
+ required: false,
33
+ }),
34
+ highAmount: pieces_framework_1.Property.Number({
35
+ displayName: 'Maximum Amount',
36
+ required: false,
37
+ }),
38
+ maxRecords: pieces_framework_1.Property.Number({
39
+ displayName: 'Max Records',
40
+ required: false,
41
+ defaultValue: 100,
42
+ }),
43
+ },
44
+ run(context) {
45
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
46
+ const { acctId, acctType, startDate, endDate, lowAmount, highAmount, maxRecords } = context.propsValue;
47
+ const innerXml = client_1.jxClient.buildSrchMsgRqHdr({ auth: context.auth.props, maxRec: maxRecords !== null && maxRecords !== void 0 ? maxRecords : 100 })
48
+ + client_1.jxClient.buildAccountId({ name: 'InAcctId', acctId, acctType })
49
+ + client_1.jxClient.tag({ name: 'StartDt', value: startDate })
50
+ + client_1.jxClient.tag({ name: 'EndDt', value: endDate })
51
+ + client_1.jxClient.tag({ name: 'LowAmt', value: lowAmount })
52
+ + client_1.jxClient.tag({ name: 'HighAmt', value: highAmount });
53
+ const response = yield client_1.jxClient.call({
54
+ auth: context.auth.props,
55
+ service: 'Inquiry',
56
+ operation: 'AcctHistSrch',
57
+ innerXml,
58
+ });
59
+ const recArray = response['AcctHistSrchRecArray'];
60
+ return {
61
+ transactions: client_1.jxClient.asArray({ value: recArray === null || recArray === void 0 ? void 0 : recArray['AcctHistSrchRec'] }),
62
+ raw: response,
63
+ };
64
+ });
65
+ },
66
+ });
67
+ //# sourceMappingURL=account-history-search.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account-history-search.js","sourceRoot":"","sources":["../../../../src/lib/actions/account-history-search.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,kCAAuC;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E,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,GAAG,EAAE,CAAC;kBAC9F,iBAAQ,CAAC,cAAc,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;kBAC/D,iBAAQ,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;kBACnD,iBAAQ,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;kBAC/C,iBAAQ,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;kBAClD,iBAAQ,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;YAE3D,MAAM,QAAQ,GAAG,MAAM,iBAAQ,CAAC,IAAI,CAAC;gBACjC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;gBACxB,OAAO,EAAE,SAAS;gBAClB,SAAS,EAAE,cAAc;gBACzB,QAAQ;aACX,CAAC,CAAC;YAEH,MAAM,QAAQ,GAAG,QAAQ,CAAC,sBAAsB,CAAwC,CAAC;YACzF,OAAO;gBACH,YAAY,EAAE,iBAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,iBAAiB,CAAC,EAAE,CAAC;gBACxE,GAAG,EAAE,QAAQ;aAChB,CAAC;QACN,CAAC;KAAA;CACJ,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ export declare const accountInquiry: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ gatewayUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ username: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
+ password: import("@activepieces/pieces-framework").SecretTextProperty<true>;
5
+ instRtId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
6
+ instEnv: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ validConsmName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
8
+ validConsmProd: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
+ auditUsrId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
10
+ auditWsId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
11
+ }>, {
12
+ acctId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
13
+ acctType: import("@activepieces/pieces-framework").ShortTextProperty<true>;
14
+ }>;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.accountInquiry = 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 props_1 = require("../common/props");
9
+ exports.accountInquiry = (0, pieces_framework_1.createAction)({
10
+ auth: auth_1.jxchangeAuth,
11
+ name: 'account_inquiry',
12
+ displayName: 'Get Account',
13
+ description: 'Fetch account details and balances (AcctInq).',
14
+ props: {
15
+ acctId: pieces_framework_1.Property.ShortText({
16
+ displayName: 'Account Number',
17
+ required: true,
18
+ }),
19
+ acctType: props_1.jxProps.acctTypeText({ displayName: 'Account Type' }),
20
+ },
21
+ run(context) {
22
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
23
+ const innerXml = client_1.jxClient.buildMsgRqHdr({ auth: context.auth.props })
24
+ + client_1.jxClient.buildAccountId({
25
+ name: 'InAcctId',
26
+ acctId: context.propsValue.acctId,
27
+ acctType: context.propsValue.acctType,
28
+ });
29
+ const response = yield client_1.jxClient.call({
30
+ auth: context.auth.props,
31
+ service: 'Inquiry',
32
+ operation: 'AcctInq',
33
+ innerXml,
34
+ });
35
+ return response;
36
+ });
37
+ },
38
+ });
39
+ //# sourceMappingURL=account-inquiry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account-inquiry.js","sourceRoot":"","sources":["../../../../src/lib/actions/account-inquiry.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,kCAAuC;AACvC,6CAA4C;AAC5C,2CAA0C;AAE7B,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,+CAA+C;IAC5D,KAAK,EAAE;QACH,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,gBAAgB;YAC7B,QAAQ,EAAE,IAAI;SACjB,CAAC;QACF,QAAQ,EAAE,eAAO,CAAC,YAAY,CAAC,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC;KAClE;IACK,GAAG,CAAC,OAAO;;YACb,MAAM,QAAQ,GAAG,iBAAQ,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;kBAC/D,iBAAQ,CAAC,cAAc,CAAC;oBACtB,IAAI,EAAE,UAAU;oBAChB,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM;oBACjC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ;iBACxC,CAAC,CAAC;YAEP,MAAM,QAAQ,GAAG,MAAM,iBAAQ,CAAC,IAAI,CAAC;gBACjC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;gBACxB,OAAO,EAAE,SAAS;gBAClB,SAAS,EAAE,SAAS;gBACpB,QAAQ;aACX,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC;QACpB,CAAC;KAAA;CACJ,CAAC,CAAC"}
@@ -0,0 +1,18 @@
1
+ export declare const callOperation: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ gatewayUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ username: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
+ password: import("@activepieces/pieces-framework").SecretTextProperty<true>;
5
+ instRtId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
6
+ instEnv: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ validConsmName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
8
+ validConsmProd: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
+ auditUsrId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
10
+ auditWsId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
11
+ }>, {
12
+ service: import("@activepieces/pieces-framework").StaticDropdownProperty<"ACH" | "BillPay" | "BrdCst" | "CrCard" | "Custom" | "Customer" | "Deposit" | "ENS" | "IMS" | "Image" | "Inquiry" | "Loan" | "Report" | "Teller" | "Transaction" | "Wire" | "Workflow", true>;
13
+ operation: import("@activepieces/pieces-framework").ShortTextProperty<true>;
14
+ headerType: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
15
+ maxRecords: import("@activepieces/pieces-framework").NumberProperty<false>;
16
+ bodyXml: import("@activepieces/pieces-framework").LongTextProperty<false>;
17
+ endpointOverride: import("@activepieces/pieces-framework").ShortTextProperty<false>;
18
+ }>;
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.callOperation = 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 props_1 = require("../common/props");
9
+ exports.callOperation = (0, pieces_framework_1.createAction)({
10
+ auth: auth_1.jxchangeAuth,
11
+ name: 'call_operation',
12
+ displayName: 'Call jXchange Operation',
13
+ description: 'Call any operation on any TPG service — the escape hatch for the ~600 operations without a dedicated action.',
14
+ props: {
15
+ service: props_1.jxProps.serviceDropdown({
16
+ description: 'The TPG service that owns the operation (matches the WSDL name, e.g. Inquiry for AcctSrch).',
17
+ }),
18
+ operation: pieces_framework_1.Property.ShortText({
19
+ displayName: 'Operation',
20
+ description: 'Exact operation name from the WSDL, e.g. StopChkAdd, WireTrnInq, AcctSrch.',
21
+ required: true,
22
+ }),
23
+ headerType: pieces_framework_1.Property.StaticDropdown({
24
+ displayName: 'Request Header',
25
+ description: 'Inquiry/add/mod operations use MsgRqHdr; search operations (…Srch) use SrchMsgRqHdr; Ping uses none.',
26
+ required: true,
27
+ defaultValue: 'MsgRqHdr',
28
+ options: {
29
+ options: [
30
+ { label: 'Standard (MsgRqHdr)', value: 'MsgRqHdr' },
31
+ { label: 'Search (SrchMsgRqHdr)', value: 'SrchMsgRqHdr' },
32
+ { label: 'None', value: 'none' },
33
+ ],
34
+ },
35
+ }),
36
+ maxRecords: pieces_framework_1.Property.Number({
37
+ displayName: 'Max Records',
38
+ description: 'Only used with the Search header.',
39
+ required: false,
40
+ defaultValue: 100,
41
+ }),
42
+ bodyXml: pieces_framework_1.Property.LongText({
43
+ displayName: 'Request Body XML',
44
+ description: 'The operation-specific elements that follow the header, e.g. `<CustId>12345</CustId>`. The envelope, WS-Security header, and jXchangeHdr are added for you.',
45
+ required: false,
46
+ }),
47
+ endpointOverride: pieces_framework_1.Property.ShortText({
48
+ displayName: 'Endpoint Override',
49
+ description: 'Full service URL to use instead of Gateway URL + Service, for gateways with non-standard paths.',
50
+ required: false,
51
+ }),
52
+ },
53
+ run(context) {
54
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
55
+ const { service, operation, headerType, maxRecords, bodyXml, endpointOverride } = context.propsValue;
56
+ let header = '';
57
+ if (headerType === 'MsgRqHdr') {
58
+ header = client_1.jxClient.buildMsgRqHdr({ auth: context.auth.props });
59
+ }
60
+ else if (headerType === 'SrchMsgRqHdr') {
61
+ header = client_1.jxClient.buildSrchMsgRqHdr({ auth: context.auth.props, maxRec: maxRecords !== null && maxRecords !== void 0 ? maxRecords : 100 });
62
+ }
63
+ const response = yield client_1.jxClient.call({
64
+ auth: context.auth.props,
65
+ service,
66
+ operation,
67
+ innerXml: header + (bodyXml !== null && bodyXml !== void 0 ? bodyXml : ''),
68
+ endpointOverride,
69
+ });
70
+ return response;
71
+ });
72
+ },
73
+ });
74
+ //# sourceMappingURL=call-operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"call-operation.js","sourceRoot":"","sources":["../../../../src/lib/actions/call-operation.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,kCAAuC;AACvC,6CAA4C;AAC5C,2CAA0C;AAE7B,QAAA,aAAa,GAAG,IAAA,+BAAY,EAAC;IACtC,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,yBAAyB;IACtC,WAAW,EAAE,8GAA8G;IAC3H,KAAK,EAAE;QACH,OAAO,EAAE,eAAO,CAAC,eAAe,CAAC;YAC7B,WAAW,EAAE,6FAA6F;SAC7G,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,4EAA4E;YACzF,QAAQ,EAAE,IAAI;SACjB,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAChC,WAAW,EAAE,gBAAgB;YAC7B,WAAW,EAAE,sGAAsG;YACnH,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,UAAU;YACxB,OAAO,EAAE;gBACL,OAAO,EAAE;oBACL,EAAE,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAE,UAAU,EAAE;oBACnD,EAAE,KAAK,EAAE,uBAAuB,EAAE,KAAK,EAAE,cAAc,EAAE;oBACzD,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;iBACnC;aACJ;SACJ,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACxB,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,mCAAmC;Y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-0,0 +1,13 @@
1
+ export declare const customerInquiry: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ gatewayUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ username: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
+ password: import("@activepieces/pieces-framework").SecretTextProperty<true>;
5
+ instRtId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
6
+ instEnv: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ validConsmName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
8
+ validConsmProd: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
+ auditUsrId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
10
+ auditWsId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
11
+ }>, {
12
+ custId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
13
+ }>;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.customerInquiry = 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.customerInquiry = (0, pieces_framework_1.createAction)({
9
+ auth: auth_1.jxchangeAuth,
10
+ name: 'customer_inquiry',
11
+ displayName: 'Get Customer',
12
+ description: 'Fetch the full core record for one customer (CustInq).',
13
+ props: {
14
+ custId: pieces_framework_1.Property.ShortText({
15
+ displayName: 'Customer ID',
16
+ description: 'The core customer ID — use Search Customers to find it by name.',
17
+ required: true,
18
+ }),
19
+ },
20
+ run(context) {
21
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
22
+ var _a;
23
+ const innerXml = client_1.jxClient.buildMsgRqHdr({ auth: context.auth.props })
24
+ + client_1.jxClient.tag({ name: 'CustId', value: context.propsValue.custId });
25
+ const response = yield client_1.jxClient.call({
26
+ auth: context.auth.props,
27
+ service: 'Customer',
28
+ operation: 'CustInq',
29
+ innerXml,
30
+ });
31
+ return {
32
+ customer: (_a = response['CustRec']) !== null && _a !== void 0 ? _a : null,
33
+ raw: response,
34
+ };
35
+ });
36
+ },
37
+ });
38
+ //# sourceMappingURL=customer-inquiry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customer-inquiry.js","sourceRoot":"","sources":["../../../../src/lib/actions/customer-inquiry.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,kCAAuC;AACvC,6CAA4C;AAE/B,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IACxC,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,wDAAwD;IACrE,KAAK,EAAE;QACH,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,iEAAiE;YAC9E,QAAQ,EAAE,IAAI;SACjB,CAAC;KACL;IACK,GAAG,CAAC,OAAO;;;YACb,MAAM,QAAQ,GAAG,iBAAQ,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;kBAC/D,iBAAQ,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;YAEzE,MAAM,QAAQ,GAAG,MAAM,iBAAQ,CAAC,IAAI,CAAC;gBACjC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;gBACxB,OAAO,EAAE,UAAU;gBACnB,SAAS,EAAE,SAAS;gBACpB,QAAQ;aACX,CAAC,CAAC;YAEH,OAAO;gBACH,QAAQ,EAAE,MAAA,QAAQ,CAAC,SAAS,CAAC,mCAAI,IAAI;gBACrC,GAAG,EAAE,QAAQ;aAChB,CAAC;QACN,CAAC;KAAA;CACJ,CAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ export declare const customerSearch: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ gatewayUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ username: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
+ password: import("@activepieces/pieces-framework").SecretTextProperty<true>;
5
+ instRtId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
6
+ instEnv: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ validConsmName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
8
+ validConsmProd: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
+ auditUsrId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
10
+ auditWsId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
11
+ }>, {
12
+ lastName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
13
+ firstName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
14
+ companyName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
15
+ phoneNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
16
+ taxId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
17
+ acctId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
18
+ acctType: import("@activepieces/pieces-framework").ShortTextProperty<false>;
19
+ maxRecords: import("@activepieces/pieces-framework").NumberProperty<false>;
20
+ }>;
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.customerSearch = 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.customerSearch = (0, pieces_framework_1.createAction)({
9
+ auth: auth_1.jxchangeAuth,
10
+ name: 'customer_search',
11
+ displayName: 'Search Customers',
12
+ description: 'Search core customers by name, phone, tax ID, or account (CustSrch).',
13
+ props: {
14
+ lastName: pieces_framework_1.Property.ShortText({
15
+ displayName: 'Last Name',
16
+ required: false,
17
+ }),
18
+ firstName: pieces_framework_1.Property.ShortText({
19
+ displayName: 'First Name',
20
+ required: false,
21
+ }),
22
+ companyName: pieces_framework_1.Property.ShortText({
23
+ displayName: 'Company Name',
24
+ description: 'Business/common name — use instead of first/last name for organizations.',
25
+ required: false,
26
+ }),
27
+ phoneNumber: pieces_framework_1.Property.ShortText({
28
+ displayName: 'Phone Number',
29
+ required: false,
30
+ }),
31
+ taxId: pieces_framework_1.Property.ShortText({
32
+ displayName: 'Tax ID',
33
+ description: 'SSN or EIN, digits only.',
34
+ required: false,
35
+ }),
36
+ acctId: pieces_framework_1.Property.ShortText({
37
+ displayName: 'Account Number',
38
+ description: 'Find the customers attached to this account.',
39
+ required: false,
40
+ }),
41
+ acctType: pieces_framework_1.Property.ShortText({
42
+ displayName: 'Account Type',
43
+ description: 'Required when Account Number is set, e.g. D, S, T, L.',
44
+ required: false,
45
+ }),
46
+ maxRecords: pieces_framework_1.Property.Number({
47
+ displayName: 'Max Records',
48
+ required: false,
49
+ defaultValue: 50,
50
+ }),
51
+ },
52
+ run(context) {
53
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
54
+ const { lastName, firstName, companyName, phoneNumber, taxId, acctId, acctType, maxRecords } = context.propsValue;
55
+ const personName = [companyName, firstName, lastName].some((v) => v)
56
+ ? '<PersonName>'
57
+ + client_1.jxClient.tag({ name: 'ComName', value: companyName })
58
+ + client_1.jxClient.tag({ name: 'FirstName', value: firstName })
59
+ + client_1.jxClient.tag({ name: 'LastName', value: lastName })
60
+ + '</PersonName>'
61
+ : '';
62
+ const accountId = acctId
63
+ ? client_1.jxClient.buildAccountId({ name: 'AccountId', acctId, acctType: acctType !== null && acctType !== void 0 ? acctType : '' })
64
+ : '';
65
+ const innerXml = client_1.jxClient.buildSrchMsgRqHdr({ auth: context.auth.props, maxRec: maxRecords !== null && maxRecords !== void 0 ? maxRecords : 50 })
66
+ + personName
67
+ + client_1.jxClient.tag({ name: 'PhoneNum', value: phoneNumber })
68
+ + accountId
69
+ + client_1.jxClient.tag({ name: 'TaxId', value: taxId });
70
+ const response = yield client_1.jxClient.call({
71
+ auth: context.auth.props,
72
+ service: 'Customer',
73
+ operation: 'CustSrch',
74
+ innerXml,
75
+ });
76
+ const recArray = response['CustSrchRecArray'];
77
+ return {
78
+ customers: client_1.jxClient.asArray({ value: recArray === null || recArray === void 0 ? void 0 : recArray['CustSrchRec'] }),
79
+ raw: response,
80
+ };
81
+ });
82
+ },
83
+ });
84
+ //# sourceMappingURL=customer-search.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customer-search.js","sourceRoot":"","sources":["../../../../src/lib/actions/customer-search.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,kCAAuC;AACvC,6CAA4C;AAE/B,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,sEAAsE;IACnF,KAAK,EAAE;QACH,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,WAAW;YACxB,QAAQ,EAAE,KAAK;SAClB,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,KAAK;SAClB,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,0EAA0E;YACvF,QAAQ,EAAE,KAAK;SAClB,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,cAAc;YAC3B,QAAQ,EAAE,KAAK;SAClB,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACtB,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,0BAA0B;YACvC,QAAQ,EAAE,KAAK;SACl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AE,EAAE,CAAC;gBAClF,CAAC,CAAC,EAAE,CAAC;YAET,MAAM,QAAQ,GAAG,iBAAQ,CAAC,iBAAiB,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,EAAE,EAAE,CAAC;kBAC7F,UAAU;kBACV,iBAAQ,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;kBACtD,SAAS;kBACT,iBAAQ,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;YAEpD,MAAM,QAAQ,GAAG,MAAM,iBAAQ,CAAC,IAAI,CAAC;gBACjC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;gBACxB,OAAO,EAAE,UAAU;gBACnB,SAAS,EAAE,UAAU;gBACrB,QAAQ;aACX,CAAC,CAAC;YAEH,MAAM,QAAQ,GAAG,QAAQ,CAAC,kBAAkB,CAAwC,CAAC;YACrF,OAAO;gBACH,SAAS,EAAE,iBAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,aAAa,CAAC,EAAE,CAAC;gBACjE,GAAG,EAAE,QAAQ;aAChB,CAAC;QACN,CAAC;KAAA;CACJ,CAAC,CAAC"}
@@ -0,0 +1,18 @@
1
+ export declare const internalTransfer: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ gatewayUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ username: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
+ password: import("@activepieces/pieces-framework").SecretTextProperty<true>;
5
+ instRtId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
6
+ instEnv: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ validConsmName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
8
+ validConsmProd: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
+ auditUsrId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
10
+ auditWsId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
11
+ }>, {
12
+ fromAcctId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
13
+ fromAcctType: import("@activepieces/pieces-framework").ShortTextProperty<true>;
14
+ toAcctId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
15
+ toAcctType: import("@activepieces/pieces-framework").ShortTextProperty<true>;
16
+ amount: import("@activepieces/pieces-framework").NumberProperty<true>;
17
+ transferType: import("@activepieces/pieces-framework").ShortTextProperty<false>;
18
+ }>;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.internalTransfer = 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 props_1 = require("../common/props");
9
+ exports.internalTransfer = (0, pieces_framework_1.createAction)({
10
+ auth: auth_1.jxchangeAuth,
11
+ name: 'internal_transfer',
12
+ displayName: 'Add Internal Transfer',
13
+ description: 'Move funds between two accounts on the core (XferAdd). This posts a real transaction.',
14
+ props: {
15
+ fromAcctId: pieces_framework_1.Property.ShortText({
16
+ displayName: 'From Account Number',
17
+ required: true,
18
+ }),
19
+ fromAcctType: props_1.jxProps.acctTypeText({ displayName: 'From Account Type' }),
20
+ toAcctId: pieces_framework_1.Property.ShortText({
21
+ displayName: 'To Account Number',
22
+ required: true,
23
+ }),
24
+ toAcctType: props_1.jxProps.acctTypeText({ displayName: 'To Account Type' }),
25
+ amount: pieces_framework_1.Property.Number({
26
+ displayName: 'Amount',
27
+ description: 'Transfer amount in dollars, e.g. 125.50.',
28
+ required: true,
29
+ }),
30
+ transferType: pieces_framework_1.Property.ShortText({
31
+ displayName: 'Transfer Type',
32
+ description: 'Optional core transfer type code (XferType). Leave empty for the core default.',
33
+ required: false,
34
+ }),
35
+ },
36
+ run(context) {
37
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
38
+ var _a, _b;
39
+ const { fromAcctId, fromAcctType, toAcctId, toAcctType, amount, transferType } = context.propsValue;
40
+ const innerXml = client_1.jxClient.buildMsgRqHdr({ auth: context.auth.props })
41
+ + client_1.jxClient.buildAccountId({ name: 'AcctIdFrom', acctId: fromAcctId, acctType: fromAcctType })
42
+ + client_1.jxClient.buildAccountId({ name: 'AcctIdTo', acctId: toAcctId, acctType: toAcctType })
43
+ + `<XferRec>${client_1.jxClient.tag({ name: 'Amt', value: amount })}</XferRec>`
44
+ + (transferType ? `<Ver_1/>${client_1.jxClient.tag({ name: 'XferType', value: transferType })}` : '');
45
+ const response = yield client_1.jxClient.call({
46
+ auth: context.auth.props,
47
+ service: 'Transaction',
48
+ operation: 'XferAdd',
49
+ innerXml,
50
+ });
51
+ return {
52
+ transferKey: (_a = response['XferKey']) !== null && _a !== void 0 ? _a : null,
53
+ status: (_b = response['RsStat']) !== null && _b !== void 0 ? _b : null,
54
+ raw: response,
55
+ };
56
+ });
57
+ },
58
+ });
59
+ //# sourceMappingURL=internal-transfer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal-transfer.js","sourceRoot":"","sources":["../../../../src/lib/actions/internal-transfer.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,kCAAuC;AACvC,6CAA4C;AAC5C,2CAA0C;AAE7B,QAAA,gBAAgB,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,uBAAuB;IACpC,WAAW,EAAE,uFAAuF;IACpG,KAAK,EAAE;QACH,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,qBAAqB;YAClC,QAAQ,EAAE,IAAI;SACjB,CAAC;QACF,YAA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,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YAEjG,MAAM,QAAQ,GAAG,MAAM,iBAAQ,CAAC,IAAI,CAAC;gBACjC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;gBACxB,OAAO,EAAE,aAAa;gBACtB,SAAS,EAAE,SAAS;gBACpB,QAAQ;aACX,CAAC,CAAC;YAEH,OAAO;gBACH,WAAW,EAAE,MAAA,QAAQ,CAAC,SAAS,CAAC,mCAAI,IAAI;gBACxC,MAAM,EAAE,MAAA,QAAQ,CAAC,QAAQ,CAAC,mCAAI,IAAI;gBAClC,GAAG,EAAE,QAAQ;aAChB,CAAC;QACN,CAAC;KAAA;CACJ,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare const ping: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ gatewayUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ username: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
+ password: import("@activepieces/pieces-framework").SecretTextProperty<true>;
5
+ instRtId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
6
+ instEnv: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ validConsmName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
8
+ validConsmProd: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
+ auditUsrId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
10
+ auditWsId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
11
+ }>, {
12
+ service: import("@activepieces/pieces-framework").StaticDropdownProperty<"ACH" | "BillPay" | "BrdCst" | "CrCard" | "Custom" | "Customer" | "Deposit" | "ENS" | "IMS" | "Image" | "Inquiry" | "Loan" | "Report" | "Teller" | "Transaction" | "Wire" | "Workflow", true>;
13
+ }>;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ping = 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 props_1 = require("../common/props");
9
+ exports.ping = (0, pieces_framework_1.createAction)({
10
+ auth: auth_1.jxchangeAuth,
11
+ name: 'ping',
12
+ displayName: 'Ping',
13
+ description: 'Test connectivity and credentials against a jXchange service.',
14
+ props: {
15
+ service: props_1.jxProps.serviceDropdown({
16
+ description: 'Every jXchange service exposes a Ping operation — pick the one to test.',
17
+ }),
18
+ },
19
+ run(context) {
20
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
21
+ const response = yield client_1.jxClient.call({
22
+ auth: context.auth.props,
23
+ service: context.propsValue.service,
24
+ operation: 'Ping',
25
+ innerXml: client_1.jxClient.tag({ name: 'PingRq', value: 'activepieces connectivity check' }),
26
+ });
27
+ return response;
28
+ });
29
+ },
30
+ });
31
+ //# sourceMappingURL=ping.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ping.js","sourceRoot":"","sources":["../../../../src/lib/actions/ping.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,kCAAuC;AACvC,6CAA4C;AAC5C,2CAA0C;AAE7B,QAAA,IAAI,GAAG,IAAA,+BAAY,EAAC;IAC7B,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,MAAM;IACnB,WAAW,EAAE,+DAA+D;IAC5E,KAAK,EAAE;QACH,OAAO,EAAE,eAAO,CAAC,eAAe,CAAC;YAC7B,WAAW,EAAE,yEAAyE;SACzF,CAAC;KACL;IACK,GAAG,CAAC,OAAO;;YACb,MAAM,QAAQ,GAAG,MAAM,iBAAQ,CAAC,IAAI,CAAC;gBACjC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;gBACxB,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO;gBACnC,SAAS,EAAE,MAAM;gBACjB,QAAQ,EAAE,iBAAQ,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,iCAAiC,EAAE,CAAC;aACvF,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC;QACpB,CAAC;KAAA;CACJ,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ export declare const jxchangeAuth: import("@activepieces/pieces-framework").CustomAuthProperty<{
2
+ gatewayUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ username: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
+ password: import("@activepieces/pieces-framework").SecretTextProperty<true>;
5
+ instRtId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
6
+ instEnv: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ validConsmName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
8
+ validConsmProd: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
+ auditUsrId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
10
+ auditWsId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
11
+ }>;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.jxchangeAuth = void 0;
4
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
5
+ exports.jxchangeAuth = pieces_framework_1.PieceAuth.CustomAuth({
6
+ description: `Connect to a Jack Henry jXchange Third Party Gateway (TPG).
7
+
8
+ 1. **Gateway URL** — the base ServiceGateway URL your institution was assigned, e.g. \`https://jxpilot.jackhenry.com/jxchange/2008/ServiceGateway\`. Service endpoints like \`Inquiry.svc\` are appended automatically.
9
+ 2. **Username / Password** — the WS-Security credentials issued for your third-party consumer product.
10
+ 3. **Institution Routing ID** — your bank's routing number (InstRtId) as enrolled with jXchange.
11
+ 4. **Environment** — the target core environment (InstEnv), e.g. \`TEST\` or \`PROD\`, if your gateway requires it.
12
+ 5. **Consumer Name / Product** — the ValidConsmName / ValidConsmProd values Jack Henry assigned to your integration, if required.`,
13
+ required: true,
14
+ props: {
15
+ gatewayUrl: pieces_framework_1.Property.ShortText({
16
+ displayName: 'Gateway URL',
17
+ description: 'Base TPG ServiceGateway URL, without the trailing service (.svc) segment.',
18
+ required: true,
19
+ }),
20
+ username: pieces_framework_1.Property.ShortText({
21
+ displayName: 'Username',
22
+ description: 'WS-Security username issued by Jack Henry.',
23
+ required: true,
24
+ }),
25
+ password: pieces_framework_1.PieceAuth.SecretText({
26
+ displayName: 'Password',
27
+ description: 'WS-Security password issued by Jack Henry.',
28
+ required: true,
29
+ }),
30
+ instRtId: pieces_framework_1.Property.ShortText({
31
+ displayName: 'Institution Routing ID',
32
+ description: 'The institution routing/transit number (InstRtId) enrolled with jXchange.',
33
+ required: true,
34
+ }),
35
+ instEnv: pieces_framework_1.Property.ShortText({
36
+ displayName: 'Environment (InstEnv)',
37
+ description: 'Target core environment, e.g. TEST or PROD. Leave empty if your gateway does not use it.',
38
+ required: false,
39
+ }),
40
+ validConsmName: pieces_framework_1.Property.ShortText({
41
+ displayName: 'Consumer Name (ValidConsmName)',
42
+ description: 'Consumer name assigned by Jack Henry, if required by your gateway.',
43
+ required: false,
44
+ }),
45
+ validConsmProd: pieces_framework_1.Property.ShortText({
46
+ displayName: 'Consumer Product (ValidConsmProd)',
47
+ description: 'Consumer product assigned by Jack Henry, if required by your gateway.',
48
+ required: false,
49
+ }),
50
+ auditUsrId: pieces_framework_1.Property.ShortText({
51
+ displayName: 'Audit User ID',
52
+ description: 'Value stamped into AuditUsrId on every request. Defaults to "activepieces".',
53
+ required: false,
54
+ }),
55
+ auditWsId: pieces_framework_1.Property.ShortText({
56
+ displayName: 'Audit Workstation ID',
57
+ description: 'Value stamped into AuditWsId on every request. Defaults to "activepieces".',
58
+ required: false,
59
+ }),
60
+ },
61
+ });
62
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[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S,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,sBAAsB;YACnC,WAAW,EAAE,4EAA4E;YACzF,QAAQ,EAAE,KAAK;SAClB,CAAC;KACL;CACJ,CAAC,CAAC"}
@@ -0,0 +1,50 @@
1
+ declare function tag({ name, value }: {
2
+ name: string;
3
+ value: string | number | undefined | null;
4
+ }): string;
5
+ declare function buildMsgRqHdr({ auth }: {
6
+ auth: JxchangeAuthProps;
7
+ }): string;
8
+ declare function buildSrchMsgRqHdr({ auth, maxRec, cursor }: {
9
+ auth: JxchangeAuthProps;
10
+ maxRec: number;
11
+ cursor?: string;
12
+ }): string;
13
+ declare function buildAccountId({ name, acctId, acctType }: {
14
+ name: string;
15
+ acctId: string;
16
+ acctType: string;
17
+ }): string;
18
+ declare function call({ auth, service, operation, innerXml, endpointOverride }: {
19
+ auth: JxchangeAuthProps;
20
+ service: JxService;
21
+ operation: string;
22
+ innerXml: string;
23
+ endpointOverride?: string;
24
+ }): Promise<Record<string, unknown>>;
25
+ declare function asArray<T>({ value }: {
26
+ value: T | T[] | undefined | null;
27
+ }): T[];
28
+ export declare const jxClient: {
29
+ call: typeof call;
30
+ tag: typeof tag;
31
+ buildMsgRqHdr: typeof buildMsgRqHdr;
32
+ buildSrchMsgRqHdr: typeof buildSrchMsgRqHdr;
33
+ buildAccountId: typeof buildAccountId;
34
+ asArray: typeof asArray;
35
+ };
36
+ export declare const JX_NAMESPACE = "http://jackhenry.com/jxchange/TPG/2008";
37
+ export declare const JX_SERVICES: readonly ["ACH", "BillPay", "BrdCst", "CrCard", "Custom", "Customer", "Deposit", "ENS", "IMS", "Image", "Inquiry", "Loan", "Report", "Teller", "Transaction", "Wire", "Workflow"];
38
+ export type JxService = typeof JX_SERVICES[number];
39
+ export type JxchangeAuthProps = {
40
+ gatewayUrl: string;
41
+ username: string;
42
+ password: string;
43
+ instRtId: string;
44
+ instEnv?: string;
45
+ validConsmName?: string;
46
+ validConsmProd?: string;
47
+ auditUsrId?: string;
48
+ auditWsId?: string;
49
+ };
50
+ export {};
@@ -0,0 +1,159 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JX_SERVICES = exports.JX_NAMESPACE = exports.jxClient = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_common_1 = require("@activepieces/pieces-common");
6
+ const fast_xml_parser_1 = require("fast-xml-parser");
7
+ function escapeXml({ value }) {
8
+ return value
9
+ .replace(/&/g, '&amp;')
10
+ .replace(/</g, '&lt;')
11
+ .replace(/>/g, '&gt;')
12
+ .replace(/"/g, '&quot;')
13
+ .replace(/'/g, '&apos;');
14
+ }
15
+ function tag({ name, value }) {
16
+ if (value === undefined || value === null || value === '') {
17
+ return '';
18
+ }
19
+ return `<${name}>${escapeXml({ value: String(value) })}</${name}>`;
20
+ }
21
+ function buildJxchangeHdr({ auth }) {
22
+ const consumerParts = [auth.validConsmName, auth.validConsmProd].some((v) => v)
23
+ ? '<Ver_3/><Ver_4/><Ver_5/>'
24
+ + tag({ name: 'ValidConsmName', value: auth.validConsmName })
25
+ + tag({ name: 'ValidConsmProd', value: auth.validConsmProd })
26
+ : '';
27
+ return '<jXchangeHdr>'
28
+ + tag({ name: 'AuditUsrId', value: auth.auditUsrId || 'activepieces' })
29
+ + tag({ name: 'AuditWsId', value: auth.auditWsId || 'activepieces' })
30
+ + '<Ver_1/><Ver_2/>'
31
+ + tag({ name: 'InstRtId', value: auth.instRtId })
32
+ + tag({ name: 'InstEnv', value: auth.instEnv })
33
+ + consumerParts
34
+ + '</jXchangeHdr>';
35
+ }
36
+ function buildMsgRqHdr({ auth }) {
37
+ return `<MsgRqHdr>${buildJxchangeHdr({ auth })}</MsgRqHdr>`;
38
+ }
39
+ function buildSrchMsgRqHdr({ auth, maxRec, cursor }) {
40
+ return '<SrchMsgRqHdr>'
41
+ + buildJxchangeHdr({ auth })
42
+ + tag({ name: 'MaxRec', value: maxRec })
43
+ + tag({ name: 'Cursor', value: cursor })
44
+ + '</SrchMsgRqHdr>';
45
+ }
46
+ function buildAccountId({ name, acctId, acctType }) {
47
+ return `<${name}>${tag({ name: 'AcctId', value: acctId })}${tag({ name: 'AcctType', value: acctType })}</${name}>`;
48
+ }
49
+ function buildEnvelope({ auth, operation, innerXml }) {
50
+ return `<?xml version="1.0" encoding="UTF-8"?>
51
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
52
+ <soapenv:Header>
53
+ <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="1">
54
+ <wsse:UsernameToken>
55
+ <wsse:Username>${escapeXml({ value: auth.username })}</wsse:Username>
56
+ <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">${escapeXml({ value: auth.password })}</wsse:Password>
57
+ </wsse:UsernameToken>
58
+ </wsse:Security>
59
+ </soapenv:Header>
60
+ <soapenv:Body>
61
+ <${operation} xmlns="${exports.JX_NAMESPACE}">${innerXml}</${operation}>
62
+ </soapenv:Body>
63
+ </soapenv:Envelope>`;
64
+ }
65
+ function parseSoapBody({ xml }) {
66
+ // parseTagValue: false keeps account numbers and routing ids as strings — numeric
67
+ // parsing would strip leading zeros from banking identifiers
68
+ const parser = new fast_xml_parser_1.XMLParser({
69
+ ignoreAttributes: true,
70
+ removeNSPrefix: true,
71
+ parseTagValue: false,
72
+ });
73
+ const parsed = parser.parse(xml);
74
+ const envelope = parsed['Envelope'];
75
+ const body = envelope === null || envelope === void 0 ? void 0 : envelope['Body'];
76
+ if (!body) {
77
+ throw new Error(`jXchange returned a response that is not a SOAP envelope: ${xml.slice(0, 500)}`);
78
+ }
79
+ return body;
80
+ }
81
+ function throwIfFault({ body }) {
82
+ var _a, _b, _c, _d;
83
+ const fault = body['Fault'];
84
+ if (!fault) {
85
+ return;
86
+ }
87
+ const reason = (_c = (_a = fault['faultstring']) !== null && _a !== void 0 ? _a : (_b = fault['Reason']) === null || _b === void 0 ? void 0 : _b['Text']) !== null && _c !== void 0 ? _c : 'Unknown SOAP fault';
88
+ const detail = (_d = fault['detail']) !== null && _d !== void 0 ? _d : fault['Detail'];
89
+ throw new Error(`jXchange fault: ${JSON.stringify(reason)}${detail ? ` — detail: ${JSON.stringify(detail)}` : ''}`);
90
+ }
91
+ function call(_a) {
92
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, service, operation, innerXml, endpointOverride }) {
93
+ const baseUrl = auth.gatewayUrl.replace(/\/+$/, '');
94
+ const url = endpointOverride || `${baseUrl}/${service}.svc`;
95
+ const envelope = buildEnvelope({ auth, operation, innerXml });
96
+ let responseXml;
97
+ try {
98
+ const response = yield pieces_common_1.httpClient.sendRequest({
99
+ method: pieces_common_1.HttpMethod.POST,
100
+ url,
101
+ headers: {
102
+ 'Content-Type': 'text/xml;charset=UTF-8',
103
+ SOAPAction: `${SOAP_ACTION_PREFIX}${operation}`,
104
+ },
105
+ body: envelope,
106
+ });
107
+ responseXml = String(response.body);
108
+ }
109
+ catch (e) {
110
+ // SOAP faults arrive as HTTP 500 with a fault envelope in the body —
111
+ // surface the fault reason instead of a generic HTTP error
112
+ if (e instanceof pieces_common_1.HttpError && typeof e.response.body === 'string' && e.response.body.includes('Envelope')) {
113
+ const faultBody = parseSoapBody({ xml: e.response.body });
114
+ throwIfFault({ body: faultBody });
115
+ }
116
+ throw e;
117
+ }
118
+ const body = parseSoapBody({ xml: responseXml });
119
+ throwIfFault({ body });
120
+ const operationResponse = body[`${operation}Response`];
121
+ return operationResponse !== null && operationResponse !== void 0 ? operationResponse : body;
122
+ });
123
+ }
124
+ function asArray({ value }) {
125
+ if (value === undefined || value === null) {
126
+ return [];
127
+ }
128
+ return Array.isArray(value) ? value : [value];
129
+ }
130
+ exports.jxClient = {
131
+ call,
132
+ tag,
133
+ buildMsgRqHdr,
134
+ buildSrchMsgRqHdr,
135
+ buildAccountId,
136
+ asArray,
137
+ };
138
+ exports.JX_NAMESPACE = 'http://jackhenry.com/jxchange/TPG/2008';
139
+ const SOAP_ACTION_PREFIX = 'http://jackhenry.com/ws/';
140
+ exports.JX_SERVICES = [
141
+ 'ACH',
142
+ 'BillPay',
143
+ 'BrdCst',
144
+ 'CrCard',
145
+ 'Custom',
146
+ 'Customer',
147
+ 'Deposit',
148
+ 'ENS',
149
+ 'IMS',
150
+ 'Image',
151
+ 'Inquiry',
152
+ 'Loan',
153
+ 'Report',
154
+ 'Teller',
155
+ 'Transaction',
156
+ 'Wire',
157
+ 'Workflow',
158
+ ];
159
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/lib/common/client.ts"],"names":[],"mappings":";;;;AAAA,+DAAgF;AAChF,qDAA4C;AAE5C,SAAS,SAAS,CAAC,EAAE,KAAK,EAAqB;IAC3C,OAAO,KAAK;SACP,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC;SACvB,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,GAAG,CAAC,EAAE,IAAI,EAAE,KAAK,EAA+D;IACrF,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE,EAAE,CAAC;QACxD,OAAO,EAAE,CAAC;IACd,CAAC;IACD,OAAO,IAAI,IAAI,IAAI,SAAS,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,GAAG,CAAC;AACvE,CAAC;AAED,SAAS,gBAAgB,CAAC,EAAE,IAAI,EAA+B;IAC3D,MAAM,aAAa,GAAG,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,cAAc,CAAC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AA,WAAW,GAAG;IACvB,KAAK;IACL,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,SAAS;IACT,KAAK;IACL,KAAK;IACL,OAAO;IACP,SAAS;IACT,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,aAAa;IACb,MAAM;IACN,UAAU;CACJ,CAAC"}
@@ -0,0 +1,11 @@
1
+ declare function serviceDropdown({ description }: {
2
+ description: string;
3
+ }): import("@activepieces/pieces-framework").StaticDropdownProperty<"ACH" | "BillPay" | "BrdCst" | "CrCard" | "Custom" | "Customer" | "Deposit" | "ENS" | "IMS" | "Image" | "Inquiry" | "Loan" | "Report" | "Teller" | "Transaction" | "Wire" | "Workflow", true>;
4
+ declare function acctTypeText({ displayName }: {
5
+ displayName: string;
6
+ }): import("@activepieces/pieces-framework").ShortTextProperty<true>;
7
+ export declare const jxProps: {
8
+ serviceDropdown: typeof serviceDropdown;
9
+ acctTypeText: typeof acctTypeText;
10
+ };
11
+ export {};
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.jxProps = void 0;
4
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
5
+ const client_1 = require("./client");
6
+ function serviceDropdown({ description }) {
7
+ return pieces_framework_1.Property.StaticDropdown({
8
+ displayName: 'Service',
9
+ description,
10
+ required: true,
11
+ defaultValue: 'Inquiry',
12
+ options: {
13
+ options: client_1.JX_SERVICES.map((service) => ({ label: service, value: service })),
14
+ },
15
+ });
16
+ }
17
+ function acctTypeText({ displayName }) {
18
+ return pieces_framework_1.Property.ShortText({
19
+ displayName,
20
+ description: 'Core account type code, e.g. D (checking/DDA), S (savings), T (time deposit/CD), L (loan), G (general ledger).',
21
+ required: true,
22
+ });
23
+ }
24
+ exports.jxProps = {
25
+ serviceDropdown,
26
+ acctTypeText,
27
+ };
28
+ //# sourceMappingURL=props.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.js","sourceRoot":"","sources":["../../../../src/lib/common/props.ts"],"names":[],"mappings":";;;AAAA,qEAA0D;AAC1D,qCAAuC;AAEvC,SAAS,eAAe,CAAC,EAAE,WAAW,EAA2B;IAC7D,OAAO,2BAAQ,CAAC,cAAc,CAAC;QAC3B,WAAW,EAAE,SAAS;QACtB,WAAW;QACX,QAAQ,EAAE,IAAI;QACd,YAAY,EAAE,SAAS;QACvB,OAAO,EAAE;YACL,OAAO,EAAE,oBAAW,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;SAC9E;KACJ,CAAC,CAAC;AACP,CAAC;AAED,SAAS,YAAY,CAAC,EAAE,WAAW,EAA2B;IAC1D,OAAO,2BAAQ,CAAC,SAAS,CAAC;QACtB,WAAW;QACX,WAAW,EAAE,gHAAgH;QAC7H,QAAQ,EAAE,IAAI;KACjB,CAAC,CAAC;AACP,CAAC;AAEY,QAAA,OAAO,GAAG;IACnB,eAAe;IACf,YAAY;CACf,CAAC"}